@flarehr/superhero-pba-support-admin 1.0.1575 → 1.0.1579
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/bundle.js +1 -1
- package/package.json +1 -1
package/build/bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";var e,t,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(e,t){for(var n in t)e[n]=t[n];return e}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function y(t,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?e.call(arguments,2):i),"function"==typeof t&&null!=t.defaultProps)for(s in t.defaultProps)void 0===a[s]&&(a[s]=t.defaultProps[s]);return v(t,a,r,o,null)}function v(e,i,r,o,s){var a={type:e,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!=t.vnode&&t.vnode(a),a}function b(e){return e.children}function w(e,t){this.props=e,this.context=t}function x(e,t){if(null==t)return e.__?x(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?x(e):null}function _(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return _(e)}}function k(e){(!e.__d&&(e.__d=!0)&&i.push(e)&&!T.__r++||r!==t.debounceRendering)&&((r=t.debounceRendering)||o)(T)}function T(){var e,n,r,o,a,l,c,d;for(i.sort(s);e=i.shift();)e.__d&&(n=i.length,o=void 0,l=(a=(r=e).__v).__e,c=[],d=[],r.__P&&((o=f({},a)).__v=a.__v+1,t.vnode&&t.vnode(o),D(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,M(c,o,d),o.__e!=l&&_(o)),i.length>n&&i.sort(s));T.__r=0}function S(e,t,n,i,r,o,s,a,l,c,d){var p,f,g,y,w,_=i&&i.__k||h,k=t.length;for(n.__d=l,function(e,t,n){var i,r,o,s,a,l=t.length,c=n.length,d=c,u=0;for(e.__k=[],i=0;i<l;i++)s=i+u,null!=(r=e.__k[i]=null==(r=t[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.__=e,r.__b=e.__b+1,a=E(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==e.__d&&(e.__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==e.__d&&(e.__d=x(o)),L(o,o))}(n,t,_),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,D(e,g,f,r,o,s,a,l,c,d),y=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&O(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=C(g,l,e)):"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 C(e,t,n){var i,r;if("function"==typeof e.type){for(i=e.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=e,t=C(i[r],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function A(e,t){return t=t||[],null==e||"boolean"==typeof e||(m(e)?e.some((function(e){A(e,t)})):t.push(e)),t}function E(e,t,n,i){var r=e.key,o=e.type,s=n-1,a=n+1,l=t[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<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&r==l.key&&o===l.type)return s;s--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&r==l.key&&o===l.type)return a;a++}}return-1}function P(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||p.test(t)?n:n+"px"}function N(e,t,n,i,r){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||P(e.style,t,"");if(n)for(t in n)i&&n[t]===i[t]||P(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?i?n.u=i.u:(n.u=a,e.addEventListener(t,o?c:l,o)):e.removeEventListener(t,o?c:l,o);else{if("http://www.w3.org/2000/svg"==r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(s){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function R(e){return function(n){if(this.l){var i=this.l[n.type+e];if(null==n.t)n.t=a++;else if(n.t<i.u)return;return i(t.event?t.event(n):n)}}}function D(n,i,r,o,s,a,l,c,d,h){var p,y,v,_,k,T,C,A,E,P,R,D,M,O,L,j=i.type;if(void 0!==i.constructor)return null;128&r.__u&&(d=!!(32&r.__u),a=[c=i.__e=r.__e]),(p=t.__b)&&p(i);e:if("function"==typeof j)try{if(A=i.props,E=(p=j.contextType)&&o[p.__c],P=p?E?E.props.value:p.__:o,r.__c?C=(y=i.__c=r.__c).__=y.__E:("prototype"in j&&j.prototype.render?i.__c=y=new j(A,P):(i.__c=y=new w(A,P),y.constructor=j,y.render=V),E&&E.sub(y),y.props=A,y.state||(y.state={}),y.context=P,y.__n=o,v=y.__d=!0,y.__h=[],y._sb=[]),null==y.__s&&(y.__s=y.state),null!=j.getDerivedStateFromProps&&(y.__s==y.state&&(y.__s=f({},y.__s)),f(y.__s,j.getDerivedStateFromProps(A,y.__s))),_=y.props,k=y.state,y.__v=i,v)null==j.getDerivedStateFromProps&&null!=y.componentWillMount&&y.componentWillMount(),null!=y.componentDidMount&&y.__h.push(y.componentDidMount);else{if(null==j.getDerivedStateFromProps&&A!==_&&null!=y.componentWillReceiveProps&&y.componentWillReceiveProps(A,P),!y.__e&&(null!=y.shouldComponentUpdate&&!1===y.shouldComponentUpdate(A,y.__s,P)||i.__v===r.__v)){for(i.__v!==r.__v&&(y.props=A,y.state=y.__s,y.__d=!1),i.__e=r.__e,i.__k=r.__k,i.__k.forEach((function(e){e&&(e.__=i)})),R=0;R<y._sb.length;R++)y.__h.push(y._sb[R]);y._sb=[],y.__h.length&&l.push(y);break e}null!=y.componentWillUpdate&&y.componentWillUpdate(A,y.__s,P),null!=y.componentDidUpdate&&y.__h.push((function(){y.componentDidUpdate(_,k,T)}))}if(y.context=P,y.props=A,y.__P=n,y.__e=!1,D=t.__r,M=0,"prototype"in j&&j.prototype.render){for(y.state=y.__s,y.__d=!1,D&&D(i),p=y.render(y.props,y.state,y.context),O=0;O<y._sb.length;O++)y.__h.push(y._sb[O]);y._sb=[]}else do{y.__d=!1,D&&D(i),p=y.render(y.props,y.state,y.context),y.state=y.__s}while(y.__d&&++M<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),C&&(y.__E=y.__=null)}catch(I){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),t.__e(I,i,r)}else null==a&&i.__v===r.__v?(i.__k=r.__k,i.__e=r.__e):i.__e=function(t,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)){t=y,s[d]=null;break}if(null==t){if(null===k)return document.createTextNode(_);t=document.createElementNS(o,k,_.is&&_),s=null,l=!1}if(null===k)w===_||l&&t.data===_||(t.data=_);else{if(s=s&&e.call(t.childNodes),w=i.props||u,!l&&null!=s)for(w={},d=0;d<t.attributes.length;d++)w[(y=t.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(t,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(t,d,y,w[d],o);if(h)l||p&&(h.__html===p.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),n.__k=[];else if(p&&(t.innerHTML=""),S(t,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!==t[d]||"progress"===k&&!v||"option"===k&&v!==w[d])&&N(t,d,v,w[d],o),d="checked",void 0!==b&&b!==t[d]&&N(t,d,b,w[d],o))}return t}(r.__e,i,r,o,s,a,l,d,h);(p=t.diffed)&&p(i)}function M(e,n,i){n.__d=void 0;for(var r=0;r<i.length;r++)O(i[r],i[++r],i[++r]);t.__c&&t.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(i){t.__e(i,n.__v)}}))}function O(e,n,i){try{"function"==typeof e?e(n):e.current=n}catch(r){t.__e(r,i)}}function L(e,n,i){var r,o;if(t.unmount&&t.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||O(r,null,n)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){t.__e(s,n)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&L(r[o],n,i||"function"!=typeof e.type);i||null==e.__e||g(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function V(e,t,n){return this.constructor(e,n)}function j(n,i,r){var o,s,a,l;t.__&&t.__(n,i),s=(o="function"==typeof r)?null:r&&r.__k||i.__k,a=[],l=[],D(i,n=(!o&&r||i).__k=y(b,null,[n]),s||u,u,i.namespaceURI,!o&&r?[r]:s?null:i.firstChild?e.call(i.childNodes):null,a,!o&&r?r:s?s.__e:i.firstChild,o,l),M(a,n,l)}function I(e,t){j(e,t,I)}function U(t,n,i){var r,o,s,a,l=f({},t.props);for(s in t.type&&t.type.defaultProps&&(a=t.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?e.call(arguments,2):i),v(t.type,l,r||t.key,o||t.ref,null)}function F(e,t){var n={__c:t="__cC"+d++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,i;return this.getChildContext||(n=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,k(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}e=h.slice,t={__e:function(e,t,n,i){for(var r,o,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(e)),s=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,i||{}),s=r.__d),s)return r.__E=r}catch(a){e=a}throw e}},n=0,w.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},n),this.props)),e&&f(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),k(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),k(this))},w.prototype.render=b,i=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=function(e,t){return e.__v.__b-t.__v.__b},T.__r=0,a=0,l=R(!1),c=R(!0),d=0;var B=0;function z(e,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:e,props:c,key:i,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--B,__i:-1,__u:0,__source:o,__self:s};if("function"==typeof e&&(a=e.defaultProps))for(l in a)void 0===c[l]&&(c[l]=a[l]);return t.vnode&&t.vnode(d),d}const $="*,: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{inset: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}.mb-1{margin-bottom:.25rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.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-1{margin-top:.25rem}.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%}.max-w-2xl{max-width:42rem}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-shrink-0,.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}.flex-wrap{flex-wrap:wrap}.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}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.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-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-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))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * 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{border-width:1px}.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-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.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-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity))}.bg-indigo-50{--tw-bg-opacity: 1;background-color:rgb(238 242 255 / var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / 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-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity: .75}.p-2{padding:.5rem}.p-3{padding:.75rem}.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-0{padding-top:0;padding-bottom:0}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.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}.text-xs{font-size:.75rem;line-height:1rem}.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-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.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-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / 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))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / 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-blue-700\\/10{--tw-ring-color: rgb(29 78 216 / .1)}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-gray-600\\/10{--tw-ring-color: rgb(75 85 99 / .1)}.ring-green-600\\/20{--tw-ring-color: rgb(22 163 74 / .2)}.ring-indigo-700\\/10{--tw-ring-color: rgb(67 56 202 / .1)}.ring-purple-700\\/10{--tw-ring-color: rgb(126 34 206 / .1)}.ring-red-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(252 165 165 / var(--tw-ring-opacity))}.ring-red-600\\/10{--tw-ring-color: rgb(220 38 38 / .1)}.ring-yellow-600\\/20{--tw-ring-color: rgb(202 138 4 / .2)}.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,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-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / 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))}.hover\\:text-indigo-800:hover{--tw-text-opacity: 1;color:rgb(55 48 163 / var(--tw-text-opacity))}.hover\\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.hover\\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(185 28 28 / 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-1: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(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)}.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}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}@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 H,q,W,K,Y=0,X=[],G=[],J=t,Z=J.__b,Q=J.__r,ee=J.diffed,te=J.__c,ne=J.unmount,ie=J.__;function re(e,t){J.__h&&J.__h(q,e,Y||t),Y=0;var n=q.__H||(q.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:G}),n.__[e]}function oe(e){return Y=1,function(e,t,n){var i=re(H++,2);if(i.t=e,!i.__c&&(i.__=[n?n(t):ve(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],n=i.t(t,e);t!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=q,!q.u)){var r=function(e,t,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var s=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&i.__c.props===e)&&(!o||o.call(this,e,t,n))};q.u=!0;var o=q.shouldComponentUpdate,s=q.componentWillUpdate;q.componentWillUpdate=function(e,t,n){if(this.__e){var i=o;o=void 0,r(e,t,n),o=i}s&&s.call(this,e,t,n)},q.shouldComponentUpdate=r}return i.__N||i.__}(ve,e)}function se(e,t){var n=re(H++,3);!J.__s&&ye(n.__H,t)&&(n.__=e,n.i=t,q.__H.__h.push(n))}function ae(e,t){var n=re(H++,4);!J.__s&&ye(n.__H,t)&&(n.__=e,n.i=t,q.__h.push(n))}function le(e){return Y=5,ce((function(){return{current:e}}),[])}function ce(e,t){var n=re(H++,7);return ye(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function de(e,t){return Y=8,ce((function(){return e}),t)}function ue(e){var t=q.context[e.__c],n=re(H++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(q)),t.props.value):e.__}function he(){for(var e;e=X.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(fe),e.__H.__h.forEach(ge),e.__H.__h=[]}catch(t){e.__H.__h=[],J.__e(t,e.__v)}}J.__b=function(e){q=null,Z&&Z(e)},J.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ie&&ie(e,t)},J.__r=function(e){Q&&Q(e),H=0;var t=(q=e.__c).__H;t&&(W===q?(t.__h=[],q.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=G,e.__N=e.i=void 0}))):(t.__h.forEach(fe),t.__h.forEach(ge),t.__h=[],H=0)),W=q},J.diffed=function(e){ee&&ee(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==X.push(t)&&K===J.requestAnimationFrame||((K=J.requestAnimationFrame)||me)(he)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==G&&(e.__=e.__V),e.i=void 0,e.__V=G}))),W=q=null},J.__c=function(e,t){t.some((function(e){try{e.__h.forEach(fe),e.__h=e.__h.filter((function(e){return!e.__||ge(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],J.__e(n,e.__v)}})),te&&te(e,t)},J.unmount=function(e){ne&&ne(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{fe(e)}catch(n){t=n}})),n.__H=void 0,t&&J.__e(t,n.__v))};var pe="function"==typeof requestAnimationFrame;function me(e){var t,n=function(){clearTimeout(i),pe&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,100);pe&&(t=requestAnimationFrame(n))}function fe(e){var t=q,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),q=t}function ge(e){var t=q;e.__c=e.__(),q=t}function ye(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ve(e,t){return"function"==typeof t?t(e):t}const be=function({tabTitles:e,currentTab:t,onChange:n}){const[i,r]=oe(t),o=de((e=>{r(e),n(e)}),[n]);return z("div",{class:"border-b border-gray-200",children:z("nav",{"aria-label":"Tabs",class:"flex space-x-8 ml-2",children:e.map((e=>z("a",{class:"cursor-pointer border-transparent text-gray-500 whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm "+(i===e?"border-b-2 border-indigo-500 text-indigo-600":"hover:text-gray-700 hover:border-gray-300 "),onClick:()=>o(e),children:e},e)))})})};var we=(e=>(e.Assessment="Assessment",e.Quiz="Quiz",e.Poll="Poll",e.Trivia="Trivia",e.Article="Article",e.Url="Url",e.Contact="Contact",e.Deeplink="Deeplink",e.Advertisement="Advertisement",e))(we||{}),xe=(e=>(e.Cars="Cars",e.Health="Health",e.Everyday="Everyday",e.Devices="Devices",e.Energy="Energy",e.SavingsAccount="Savings Account*",e.HomeLoan="Home Loan*",e.MobileAndInternet="Mobile & Internet",e))(xe||{});const _e=e=>{const t=e,n=t.response?.data?t.response.data:void 0;return n?.message??t.message},ke=(e,t=3)=>{const n=e.split(" ");return n.length>t?`${n.slice(0,t).join(" ")}...`:e},Te=(e,t)=>{switch(e){case we.Trivia:return"Trivia";case we.Assessment:switch(t){case xe.Cars:return"SalaryPackagingCars";case xe.HomeLoan:return"HomeLoan"}return t.replace(/\s+/g,"");default:return"None"}},Se=e=>{switch(e){case xe.SavingsAccount:return["Banking"];case xe.Cars:return["Cars"];case xe.Devices:case xe.Health:case xe.Energy:case xe.Everyday:return[e];case"None":return["Miscellaneous"];case xe.HomeLoan:case xe.MobileAndInternet:default:return[]}},Ce=e=>{switch(e){case xe.Cars:return["NovatedLease"];case xe.Health:return["HealthInsurance"];case xe.SavingsAccount:return["SavingsAccount"];case xe.Devices:case xe.Energy:return[e];case xe.HomeLoan:return["HomeLoan"];case xe.MobileAndInternet:case xe.Everyday:default:return[]}},Ae=(e,t,n)=>{const i=e.products[0],r=Ee(e,t);r?r.isFeatured=n??!1:i.activities.push({id:t,isFeatured:n??!1})},Ee=(e,t)=>e.products[0].activities.find((e=>e.id===t));function Pe(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ne}=Object.prototype,{getPrototypeOf:Re}=Object,{iterator:De,toStringTag:Me}=Symbol,Oe=(e=>t=>{const n=Ne.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Le=e=>(e=e.toLowerCase(),t=>Oe(t)===e),Ve=e=>t=>typeof t===e,{isArray:je}=Array,Ie=Ve("undefined");function Ue(e){return null!==e&&!Ie(e)&&null!==e.constructor&&!Ie(e.constructor)&&ze(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Fe=Le("ArrayBuffer");const Be=Ve("string"),ze=Ve("function"),$e=Ve("number"),He=e=>null!==e&&"object"==typeof e,qe=e=>{if("object"!==Oe(e))return!1;const t=Re(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Me in e||De in e)},We=Le("Date"),Ke=Le("File"),Ye=Le("Blob"),Xe=Le("FileList");const Ge="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},Je=void 0!==Ge.FormData?Ge.FormData:void 0,Ze=Le("URLSearchParams"),[Qe,et,tt,nt]=["ReadableStream","Request","Response","Headers"].map(Le);function it(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let i,r;if("object"!=typeof e&&(e=[e]),je(e))for(i=0,r=e.length;i<r;i++)t.call(null,e[i],i,e);else{if(Ue(e))return;const r=n?Object.getOwnPropertyNames(e):Object.keys(e),o=r.length;let s;for(i=0;i<o;i++)s=r[i],t.call(null,e[s],s,e)}}function rt(e,t){if(Ue(e))return null;t=t.toLowerCase();const n=Object.keys(e);let i,r=n.length;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const ot="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,st=e=>!Ie(e)&&e!==ot;const at=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&Re(Uint8Array)),lt=Le("HTMLFormElement"),ct=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),dt=Le("RegExp"),ut=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};it(n,((n,r)=>{let o;!1!==(o=t(n,r,e))&&(i[r]=o||n)})),Object.defineProperties(e,i)};const ht=Le("AsyncFunction"),pt=(mt="function"==typeof setImmediate,ft=ze(ot.postMessage),mt?setImmediate:ft?(gt=`axios@${Math.random()}`,yt=[],ot.addEventListener("message",(({source:e,data:t})=>{e===ot&&t===gt&&yt.length&&yt.shift()()}),!1),e=>{yt.push(e),ot.postMessage(gt,"*")}):e=>setTimeout(e));var mt,ft,gt,yt;const vt="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ot):"undefined"!=typeof process&&process.nextTick||pt,bt={isArray:je,isArrayBuffer:Fe,isBuffer:Ue,isFormData:e=>{let t;return e&&(Je&&e instanceof Je||ze(e.append)&&("formdata"===(t=Oe(e))||"object"===t&&ze(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Fe(e.buffer),t},isString:Be,isNumber:$e,isBoolean:e=>!0===e||!1===e,isObject:He,isPlainObject:qe,isEmptyObject:e=>{if(!He(e)||Ue(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},isReadableStream:Qe,isRequest:et,isResponse:tt,isHeaders:nt,isUndefined:Ie,isDate:We,isFile:Ke,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:Ye,isRegExp:dt,isFunction:ze,isStream:e=>He(e)&&ze(e.pipe),isURLSearchParams:Ze,isTypedArray:at,isFileList:Xe,forEach:it,merge:function e(){const{caseless:t,skipUndefined:n}=st(this)&&this||{},i={},r=(r,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;const s=t&&rt(i,o)||o;qe(i[s])&&qe(r)?i[s]=e(i[s],r):qe(r)?i[s]=e({},r):je(r)?i[s]=r.slice():n&&Ie(r)||(i[s]=r)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&it(arguments[o],r);return i},extend:(e,t,n,{allOwnKeys:i}={})=>(it(t,((t,i)=>{n&&ze(t)?Object.defineProperty(e,i,{value:Pe(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{value:t,writable:!0,enumerable:!0,configurable:!0})}),{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,i)=>{let r,o,s;const a={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),o=r.length;o-- >0;)s=r[o],i&&!i(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&Re(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Oe,kindOfTest:Le,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return-1!==i&&i===n},toArray:e=>{if(!e)return null;if(je(e))return e;let t=e.length;if(!$e(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[De]).call(e);let i;for(;(i=n.next())&&!i.done;){const n=i.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const i=[];for(;null!==(n=e.exec(t));)i.push(n);return i},isHTMLForm:lt,hasOwnProperty:ct,hasOwnProp:ct,reduceDescriptors:ut,freezeMethods:e=>{ut(e,((t,n)=>{if(ze(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=e[n];ze(i)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},i=e=>{e.forEach((e=>{n[e]=!0}))};return je(e)?i(e):i(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:rt,global:ot,isContextDefined:st,isSpecCompliantForm:function(e){return!!(e&&ze(e.append)&&"FormData"===e[Me]&&e[De])},toJSONObject:e=>{const t=new Array(10),n=(e,i)=>{if(He(e)){if(t.indexOf(e)>=0)return;if(Ue(e))return e;if(!("toJSON"in e)){t[i]=e;const r=je(e)?[]:{};return it(e,((e,t)=>{const o=n(e,i+1);!Ie(o)&&(r[t]=o)})),t[i]=void 0,r}}return e};return n(e,0)},isAsyncFn:ht,isThenable:e=>e&&(He(e)||ze(e))&&ze(e.then)&&ze(e.catch),setImmediate:pt,asap:vt,isIterable:e=>null!=e&&ze(e[De])};let wt=class e extends Error{static from(t,n,i,r,o,s){const a=new e(t.message,n||t.code,i,r,o);return a.cause=t,a.name=t.name,null!=t.status&&null==a.status&&(a.status=t.status),s&&Object.assign(a,s),a}constructor(e,t,n,i,r){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status)}toJSON(){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:bt.toJSONObject(this.config),code:this.code,status:this.status}}};wt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",wt.ERR_BAD_OPTION="ERR_BAD_OPTION",wt.ECONNABORTED="ECONNABORTED",wt.ETIMEDOUT="ETIMEDOUT",wt.ERR_NETWORK="ERR_NETWORK",wt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",wt.ERR_DEPRECATED="ERR_DEPRECATED",wt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",wt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",wt.ERR_CANCELED="ERR_CANCELED",wt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",wt.ERR_INVALID_URL="ERR_INVALID_URL";function xt(e){return bt.isPlainObject(e)||bt.isArray(e)}function _t(e){return bt.endsWith(e,"[]")?e.slice(0,-2):e}function kt(e,t,n){return e?e.concat(t).map((function(e,t){return e=_t(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Tt=bt.toFlatObject(bt,{},null,(function(e){return/^is[A-Z]/.test(e)}));function St(e,t,n){if(!bt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const i=(n=bt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!bt.isUndefined(t[e])}))).metaTokens,r=n.visitor||c,o=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&bt.isSpecCompliantForm(t);if(!bt.isFunction(r))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(bt.isDate(e))return e.toISOString();if(bt.isBoolean(e))return e.toString();if(!a&&bt.isBlob(e))throw new wt("Blob is not supported. Use a Buffer instead.");return bt.isArrayBuffer(e)||bt.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,r){let a=e;if(bt.isReactNative(t)&&bt.isReactNativeBlob(e))return t.append(kt(r,n,o),l(e)),!1;if(e&&!r&&"object"==typeof e)if(bt.endsWith(n,"{}"))n=i?n:n.slice(0,-2),e=JSON.stringify(e);else if(bt.isArray(e)&&function(e){return bt.isArray(e)&&!e.some(xt)}(e)||(bt.isFileList(e)||bt.endsWith(n,"[]"))&&(a=bt.toArray(e)))return n=_t(n),a.forEach((function(e,i){!bt.isUndefined(e)&&null!==e&&t.append(!0===s?kt([n],i,o):null===s?n:n+"[]",l(e))})),!1;return!!xt(e)||(t.append(kt(r,n,o),l(e)),!1)}const d=[],u=Object.assign(Tt,{defaultVisitor:c,convertValue:l,isVisitable:xt});if(!bt.isObject(e))throw new TypeError("data must be an object");return function e(n,i){if(!bt.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+i.join("."));d.push(n),bt.forEach(n,(function(n,o){!0===(!(bt.isUndefined(n)||null===n)&&r.call(t,n,bt.isString(o)?o.trim():o,i,u))&&e(n,i?i.concat(o):[o])})),d.pop()}}(e),t}function Ct(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function At(e,t){this._pairs=[],e&&St(e,this,t)}const Et=At.prototype;function Pt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Nt(e,t,n){if(!t)return e;const i=n&&n.encode||Pt,r=bt.isFunction(n)?{serialize:n}:n,o=r&&r.serialize;let s;if(s=o?o(t,r):bt.isURLSearchParams(t)?t.toString():new At(t,r).toString(i),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}Et.append=function(e,t){this._pairs.push([e,t])},Et.toString=function(e){const t=e?function(t){return e.call(this,t,Ct)}:Ct;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class Rt{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){bt.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}const Dt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Mt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:At,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ot="undefined"!=typeof window&&"undefined"!=typeof document,Lt="object"==typeof navigator&&navigator||void 0,Vt=Ot&&(!Lt||["ReactNative","NativeScript","NS"].indexOf(Lt.product)<0),jt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,It=Ot&&window.location.href||"http://localhost",Ut={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ot,hasStandardBrowserEnv:Vt,hasStandardBrowserWebWorkerEnv:jt,navigator:Lt,origin:It},Symbol.toStringTag,{value:"Module"})),...Mt};function Ft(e){function t(e,n,i,r){let o=e[r++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=r>=e.length;if(o=!o&&bt.isArray(i)?i.length:o,a)return bt.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s;i[o]&&bt.isObject(i[o])||(i[o]=[]);return t(e,n,i[o],r)&&bt.isArray(i[o])&&(i[o]=function(e){const t={},n=Object.keys(e);let i;const r=n.length;let o;for(i=0;i<r;i++)o=n[i],t[o]=e[o];return t}(i[o])),!s}if(bt.isFormData(e)&&bt.isFunction(e.entries)){const n={};return bt.forEachEntry(e,((e,i)=>{t(function(e){return bt.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),i,n,0)})),n}return null}const Bt={transitional:Dt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,r=bt.isObject(e);r&&bt.isHTMLForm(e)&&(e=new FormData(e));if(bt.isFormData(e))return i?JSON.stringify(Ft(e)):e;if(bt.isArrayBuffer(e)||bt.isBuffer(e)||bt.isStream(e)||bt.isFile(e)||bt.isBlob(e)||bt.isReadableStream(e))return e;if(bt.isArrayBufferView(e))return e.buffer;if(bt.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return St(e,new Ut.classes.URLSearchParams,{visitor:function(e,t,n,i){return Ut.isNode&&bt.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((o=bt.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return St(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return r||i?(t.setContentType("application/json",!1),function(e,t,n){if(bt.isString(e))try{return(t||JSON.parse)(e),bt.trim(e)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Bt.transitional,n=t&&t.forcedJSONParsing,i="json"===this.responseType;if(bt.isResponse(e)||bt.isReadableStream(e))return e;if(e&&bt.isString(e)&&(n&&!this.responseType||i)){const n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(r){if(n){if("SyntaxError"===r.name)throw wt.from(r,wt.ERR_BAD_RESPONSE,this,null,this.response);throw r}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ut.classes.FormData,Blob:Ut.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};bt.forEach(["delete","get","head","post","put","patch"],(e=>{Bt.headers[e]={}}));const zt=bt.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"]),$t=Symbol("internals");function Ht(e){return e&&String(e).trim().toLowerCase()}function qt(e){return!1===e||null==e?e:bt.isArray(e)?e.map(qt):String(e)}function Wt(e,t,n,i,r){return bt.isFunction(i)?i.call(this,t,n):(r&&(t=n),bt.isString(t)?bt.isString(i)?-1!==t.indexOf(i):bt.isRegExp(i)?i.test(t):void 0:void 0)}let Kt=class{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function r(e,t,n){const r=Ht(t);if(!r)throw new Error("header name must be a non-empty string");const o=bt.findKey(i,r);(!o||void 0===i[o]||!0===n||void 0===n&&!1!==i[o])&&(i[o||t]=qt(e))}const o=(e,t)=>bt.forEach(e,((e,n)=>r(e,n,t)));if(bt.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(bt.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,i,r;return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),i=e.substring(r+1).trim(),!n||t[n]&&zt[n]||("set-cookie"===n?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)})),t})(e),t);else if(bt.isObject(e)&&bt.isIterable(e)){let n,i,r={};for(const t of e){if(!bt.isArray(t))throw TypeError("Object iterator must return a key-value pair");r[i=t[0]]=(n=r[i])?bt.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(r,t)}else null!=e&&r(t,e,n);return this}get(e,t){if(e=Ht(e)){const n=bt.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}(e);if(bt.isFunction(t))return t.call(this,e,n);if(bt.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ht(e)){const n=bt.findKey(this,e);return!(!n||void 0===this[n]||t&&!Wt(0,this[n],n,t))}return!1}delete(e,t){const n=this;let i=!1;function r(e){if(e=Ht(e)){const r=bt.findKey(n,e);!r||t&&!Wt(0,n[r],r,t)||(delete n[r],i=!0)}}return bt.isArray(e)?e.forEach(r):r(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const r=t[n];e&&!Wt(0,this[r],r,e,!0)||(delete this[r],i=!0)}return i}normalize(e){const t=this,n={};return bt.forEach(this,((i,r)=>{const o=bt.findKey(n,r);if(o)return t[o]=qt(i),void delete t[r];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(r):String(r).trim();s!==r&&delete t[r],t[s]=qt(i),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return bt.forEach(this,((n,i)=>{null!=n&&!1!==n&&(t[i]=e&&bt.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[$t]=this[$t]={accessors:{}}).accessors,n=this.prototype;function i(e){const i=Ht(e);t[i]||(!function(e,t){const n=bt.toCamelCase(" "+t);["get","set","has"].forEach((i=>{Object.defineProperty(e,i+n,{value:function(e,n,r){return this[i].call(this,t,e,n,r)},configurable:!0})}))}(n,e),t[i]=!0)}return bt.isArray(e)?e.forEach(i):i(e),this}};function Yt(e,t){const n=this||Bt,i=t||n,r=Kt.from(i.headers);let o=i.data;return bt.forEach(e,(function(e){o=e.call(n,o,r.normalize(),t?t.status:void 0)})),r.normalize(),o}function Xt(e){return!(!e||!e.__CANCEL__)}Kt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),bt.reduceDescriptors(Kt.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),bt.freezeMethods(Kt);let Gt=class extends wt{constructor(e,t,n){super(null==e?"canceled":e,wt.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Jt(e,t,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new wt("Request failed with status code "+n.status,[wt.ERR_BAD_REQUEST,wt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Zt=(e,t,n=3)=>{let i=0;const r=function(e,t){e=e||10;const n=new Array(e),i=new Array(e);let r,o=0,s=0;return t=void 0!==t?t: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%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-r<t)return;const h=c&&l-c;return h?Math.round(1e3*u/h):void 0}}(50,250);return function(e,t){let n,i,r=0,o=1e3/t;const s=(t,o=Date.now())=>{r=o,n=null,i&&(clearTimeout(i),i=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-r;a>=o?s(e,t):(n=e,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;e({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,[t?"download":"upload"]:!0})}),n)},Qt=(e,t)=>{const n=null!=e;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},en=e=>(...t)=>bt.asap((()=>e(...t))),tn=Ut.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ut.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ut.origin),Ut.navigator&&/(msie|trident)/i.test(Ut.navigator.userAgent)):()=>!0,nn=Ut.hasStandardBrowserEnv?{write(e,t,n,i,r,o,s){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];bt.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),bt.isString(i)&&a.push(`path=${i}`),bt.isString(r)&&a.push(`domain=${r}`),!0===o&&a.push("secure"),bt.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function rn(e,t,n){let i=!("string"==typeof(r=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r));var r;return e&&(i||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const on=e=>e instanceof Kt?{...e}:e;function sn(e,t){t=t||{};const n={};function i(e,t,n,i){return bt.isPlainObject(e)&&bt.isPlainObject(t)?bt.merge.call({caseless:i},e,t):bt.isPlainObject(t)?bt.merge({},t):bt.isArray(t)?t.slice():t}function r(e,t,n,r){return bt.isUndefined(t)?bt.isUndefined(e)?void 0:i(void 0,e,0,r):i(e,t,0,r)}function o(e,t){if(!bt.isUndefined(t))return i(void 0,t)}function s(e,t){return bt.isUndefined(t)?bt.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function a(n,r,o){return o in t?i(n,r):o in e?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:(e,t,n)=>r(on(e),on(t),0,!0)};return bt.forEach(Object.keys({...e,...t}),(function(i){if("__proto__"===i||"constructor"===i||"prototype"===i)return;const o=bt.hasOwnProp(l,i)?l[i]:r,s=o(e[i],t[i],i);bt.isUndefined(s)&&o!==a||(n[i]=s)})),n}const an=e=>{const t=sn({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:r,xsrfCookieName:o,headers:s,auth:a}=t;if(t.headers=s=Kt.from(s),t.url=Nt(rn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),bt.isFormData(n))if(Ut.hasStandardBrowserEnv||Ut.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(bt.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach((([e,n])=>{t.includes(e.toLowerCase())&&s.set(e,n)}))}if(Ut.hasStandardBrowserEnv&&(i&&bt.isFunction(i)&&(i=i(t)),i||!1!==i&&tn(t.url))){const e=r&&o&&nn.read(o);e&&s.set(r,e)}return t},ln="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const i=an(e);let r=i.data;const o=Kt.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=Kt.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());Jt((function(e){t(e),m()}),(function(e){n(e),m()}),{data:u&&"text"!==u&&"json"!==u?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:i,config:e,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 wt("Request aborted",wt.ECONNABORTED,e,f)),f=null)},f.onerror=function(t){const i=t&&t.message?t.message:"Network Error",r=new wt(i,wt.ERR_NETWORK,e,f);r.event=t||null,n(r),f=null},f.ontimeout=function(){let t=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const r=i.transitional||Dt;i.timeoutErrorMessage&&(t=i.timeoutErrorMessage),n(new wt(t,r.clarifyTimeoutError?wt.ETIMEDOUT:wt.ECONNABORTED,e,f)),f=null},void 0===r&&o.setContentType(null),"setRequestHeader"in f&&bt.forEach(o.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),bt.isUndefined(i.withCredentials)||(f.withCredentials=!!i.withCredentials),u&&"json"!==u&&(f.responseType=i.responseType),p&&([l,d]=Zt(p,!0),f.addEventListener("progress",l)),h&&f.upload&&([a,c]=Zt(h),f.upload.addEventListener("progress",a),f.upload.addEventListener("loadend",c)),(i.cancelToken||i.signal)&&(s=t=>{f&&(n(!t||t.type?new Gt(null,e,f):t),f.abort(),f=null)},i.cancelToken&&i.cancelToken.subscribe(s),i.signal&&(i.signal.aborted?s():i.signal.addEventListener("abort",s)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(i.url);y&&-1===Ut.protocols.indexOf(y)?n(new wt("Unsupported protocol "+y+":",wt.ERR_BAD_REQUEST,e)):f.send(r||null)}))},cn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,i=new AbortController;const r=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;i.abort(t instanceof wt?t:new Gt(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null,r(new wt(`timeout of ${t}ms exceeded`,wt.ETIMEDOUT))}),t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(r):e.removeEventListener("abort",r)})),e=null)};e.forEach((e=>e.addEventListener("abort",r)));const{signal:a}=i;return a.unsubscribe=()=>bt.asap(s),a}},dn=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let i,r=0;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},un=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},hn=(e,t,n,i)=>{const r=async function*(e,t){for await(const n of un(e))yield*dn(n,t)}(e,t);let o,s=0,a=e=>{o||(o=!0,i&&i(e))};return new ReadableStream({async pull(e){try{const{done:t,value:i}=await r.next();if(t)return a(),void e.close();let o=i.byteLength;if(n){let e=s+=o;n(e)}e.enqueue(new Uint8Array(i))}catch(t){throw a(t),t}},cancel:e=>(a(e),r.return())},{highWaterMark:2})},{isFunction:pn}=bt,mn=(({Request:e,Response:t})=>({Request:e,Response:t}))(bt.global),{ReadableStream:fn,TextEncoder:gn}=bt.global,yn=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},vn=e=>{e=bt.merge.call({skipUndefined:!0},mn,e);const{fetch:t,Request:n,Response:i}=e,r=t?pn(t):"function"==typeof fetch,o=pn(n),s=pn(i);if(!r)return!1;const a=r&&pn(fn),l=r&&("function"==typeof gn?(e=>t=>e.encode(t))(new gn):async e=>new Uint8Array(await new n(e).arrayBuffer())),c=o&&a&&yn((()=>{let e=!1;const t=new n(Ut.origin,{body:new fn,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),d=s&&a&&yn((()=>bt.isReadableStream(new i("").body))),u={stream:d&&(e=>e.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!u[e]&&(u[e]=(t,n)=>{let i=t&&t[e];if(i)return i.call(t);throw new wt(`Response type '${e}' is not supported`,wt.ERR_NOT_SUPPORT,n)})}));const h=async(e,t)=>{const i=bt.toFiniteNumber(e.getContentLength());return null==i?(async e=>{if(null==e)return 0;if(bt.isBlob(e))return e.size;if(bt.isSpecCompliantForm(e)){const t=new n(Ut.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return bt.isArrayBufferView(e)||bt.isArrayBuffer(e)?e.byteLength:(bt.isURLSearchParams(e)&&(e+=""),bt.isString(e)?(await l(e)).byteLength:void 0)})(t):i};return async e=>{let{url:r,method:s,data:a,signal:l,cancelToken:p,timeout:m,onDownloadProgress:f,onUploadProgress:g,responseType:y,headers:v,withCredentials:b="same-origin",fetchOptions:w}=an(e),x=t||fetch;y=y?(y+"").toLowerCase():"text";let _=cn([l,p&&p.toAbortSignal()],m),k=null;const T=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let S;try{if(g&&c&&"get"!==s&&"head"!==s&&0!==(S=await h(v,a))){let e,t=new n(r,{method:"POST",body:a,duplex:"half"});if(bt.isFormData(a)&&(e=t.headers.get("content-type"))&&v.setContentType(e),t.body){const[e,n]=Qt(S,Zt(en(g)));a=hn(t.body,65536,e,n)}}bt.isString(b)||(b=b?"include":"omit");const t=o&&"credentials"in n.prototype,l={...w,signal:_,method:s.toUpperCase(),headers:v.normalize().toJSON(),body:a,duplex:"half",credentials:t?b:void 0};k=o&&new n(r,l);let p=await(o?x(k,w):x(r,l));const m=d&&("stream"===y||"response"===y);if(d&&(f||m&&T)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=p[t]}));const t=bt.toFiniteNumber(p.headers.get("content-length")),[n,r]=f&&Qt(t,Zt(en(f),!0))||[];p=new i(hn(p.body,65536,n,(()=>{r&&r(),T&&T()})),e)}y=y||"text";let C=await u[bt.findKey(u,y)||"text"](p,e);return!m&&T&&T(),await new Promise(((t,n)=>{Jt(t,n,{data:C,headers:Kt.from(p.headers),status:p.status,statusText:p.statusText,config:e,request:k})}))}catch(C){if(T&&T(),C&&"TypeError"===C.name&&/Load failed|fetch/i.test(C.message))throw Object.assign(new wt("Network Error",wt.ERR_NETWORK,e,k,C&&C.response),{cause:C.cause||C});throw wt.from(C,C&&C.code,e,k,C&&C.response)}}},bn=new Map,wn=e=>{let t=e&&e.env||{};const{fetch:n,Request:i,Response:r}=t,o=[i,r,n];let s,a,l=o.length,c=bn;for(;l--;)s=o[l],a=c.get(s),void 0===a&&c.set(s,a=l?new Map:vn(t)),c=a;return a};wn();const xn={http:null,xhr:ln,fetch:{get:wn}};bt.forEach(xn,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));const _n=e=>`- ${e}`,kn=e=>bt.isFunction(e)||null===e||!1===e;const Tn={getAdapter:function(e,t){e=bt.isArray(e)?e:[e];const{length:n}=e;let i,r;const o={};for(let s=0;s<n;s++){let n;if(i=e[s],r=i,!kn(i)&&(r=xn[(n=String(i)).toLowerCase()],void 0===r))throw new wt(`Unknown adapter '${n}'`);if(r&&(bt.isFunction(r)||(r=r.get(t))))break;o[n||"#"+s]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let t=n?e.length>1?"since :\n"+e.map(_n).join("\n"):" "+_n(e[0]):"as no adapter specified";throw new wt("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return r},adapters:xn};function Sn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Gt(null,e)}function Cn(e){Sn(e),e.headers=Kt.from(e.headers),e.data=Yt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Tn.getAdapter(e.adapter||Bt.adapter,e)(e).then((function(t){return Sn(e),t.data=Yt.call(e,e.transformResponse,t),t.headers=Kt.from(t.headers),t}),(function(t){return Xt(t)||(Sn(e),t&&t.response&&(t.response.data=Yt.call(e,e.transformResponse,t.response),t.response.headers=Kt.from(t.response.headers))),Promise.reject(t)}))}const An="1.13.6",En={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{En[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Pn={};En.transitional=function(e,t,n){function i(e,t){return"[Axios v"+An+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,o)=>{if(!1===e)throw new wt(i(r," has been removed"+(t?" in "+t:"")),wt.ERR_DEPRECATED);return t&&!Pn[r]&&(Pn[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,o)}},En.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Nn={assertOptions:function(e,t,n){if("object"!=typeof e)throw new wt("options must be an object",wt.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let r=i.length;for(;r-- >0;){const o=i[r],s=t[o];if(s){const t=e[o],n=void 0===t||s(t,o,e);if(!0!==n)throw new wt("option "+o+" must be "+n,wt.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new wt("Unknown option "+o,wt.ERR_BAD_OPTION)}},validators:En},Rn=Nn.validators;let Dn=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Rt,response:new Rt}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(i){}}throw n}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=sn(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:r}=t;void 0!==n&&Nn.assertOptions(n,{silentJSONParsing:Rn.transitional(Rn.boolean),forcedJSONParsing:Rn.transitional(Rn.boolean),clarifyTimeoutError:Rn.transitional(Rn.boolean),legacyInterceptorReqResOrdering:Rn.transitional(Rn.boolean)},!1),null!=i&&(bt.isFunction(i)?t.paramsSerializer={serialize:i}:Nn.assertOptions(i,{encode:Rn.function,serialize:Rn.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Nn.assertOptions(t,{baseUrl:Rn.spelling("baseURL"),withXsrfToken:Rn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=r&&bt.merge(r.common,r[t.method]);r&&bt.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete r[e]})),t.headers=Kt.concat(o,r);const s=[];let a=!0;this.interceptors.request.forEach((function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;a=a&&e.synchronous;const n=t.transitional||Dt;n&&n.legacyInterceptorReqResOrdering?s.unshift(e.fulfilled,e.rejected):s.push(e.fulfilled,e.rejected)}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let d,u=0;if(!a){const e=[Cn.bind(this),void 0];for(e.unshift(...s),e.push(...l),d=e.length,c=Promise.resolve(t);u<d;)c=c.then(e[u++],e[u++]);return c}d=s.length;let h=t;for(;u<d;){const e=s[u++],t=s[u++];try{h=e(h)}catch(p){t.call(this,p);break}}try{c=Cn.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(e){return Nt(rn((e=sn(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};bt.forEach(["delete","get","head","options"],(function(e){Dn.prototype[e]=function(t,n){return this.request(sn(n||{},{method:e,url:t,data:(n||{}).data}))}})),bt.forEach(["post","put","patch"],(function(e){function t(t){return function(n,i,r){return this.request(sn(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Dn.prototype[e]=t(),Dn.prototype[e+"Form"]=t(!0)}));const Mn={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Mn).forEach((([e,t])=>{Mn[t]=e}));const On=function e(t){const n=new Dn(t),i=Pe(Dn.prototype.request,n);return bt.extend(i,Dn.prototype,n,{allOwnKeys:!0}),bt.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return e(sn(t,n))},i}(Bt);On.Axios=Dn,On.CanceledError=Gt,On.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const i=new Promise((e=>{n.subscribe(e),t=e})).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e((function(e,i,r){n.reason||(n.reason=new Gt(e,i,r),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e((function(e){t=e})),cancel:t}}},On.isCancel=Xt,On.VERSION=An,On.toFormData=St,On.AxiosError=wt,On.Cancel=On.CanceledError,On.all=function(e){return Promise.all(e)},On.spread=function(e){return function(t){return e.apply(null,t)}},On.isAxiosError=function(e){return bt.isObject(e)&&!0===e.isAxiosError},On.mergeConfig=sn,On.AxiosHeaders=Kt,On.formToJSON=e=>Ft(bt.isHTMLForm(e)?new FormData(e):e),On.getAdapter=Tn.getAdapter,On.HttpStatusCode=Mn,On.default=On;const{Axios:Ln,AxiosError:Vn,CanceledError:jn,isCancel:In,CancelToken:Un,VERSION:Fn,all:Bn,Cancel:zn,isAxiosError:$n,spread:Hn,toFormData:qn,AxiosHeaders:Wn,HttpStatusCode:Kn,formToJSON:Yn,getAdapter:Xn,mergeConfig:Gn}=On;let Jn,Zn,Qn;const ei=e=>(e.params={...e.params??{},source:"Admin",channel:"admin"},e),ti=(e,t,n)=>{const i=`${e}/${n}`,r=On.create({baseURL:i,headers:{Authorization:`Bearer ${t}`}});switch(r.interceptors.request.use(ei),n){case"customer-profile":Jn=r;break;case"flare-app-identity":Zn=r;break;case"benefits-plan":Qn=r}return r},ni=async(e,t)=>{if(!Qn)throw new Error("Api has not been initialized");return await Qn.put(`/_admin/v1.0/categories/${e}`,t)},ii=async(e,t,n,i)=>{if(!Qn)throw new Error("Api has not been initialized");try{if(await Qn.put(`/_admin/v1.0/activities/${e}`,t),n){const t=Ee(n,e);if(t?.isFeatured!==i){Ae(n,e,i??!1);const t=n;await ni(n.id,t)}}}catch(r){throw new Error(`${_e(r)}`)}},ri=e=>{const[t,n]=oe(!1),i=le(),r=de((async t=>{try{const n=e.find((e=>e.id===t));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(t,i)}catch(i){throw new Error(`Failed to update category visibility. Error: ${_e(i)}`)}finally{n(!1)}}),[e]),o=de((async e=>{try{await(async e=>{if(!Qn)throw new Error("Api has not been initialized");return await Qn.post("/_admin/v1.0/categories",e)})(e)}catch(t){throw new Error(`${_e(t)}`)}}),[]),s=de((async(e,t)=>{try{await ni(e,t)}catch(n){throw new Error(`${_e(n)}`)}}),[]);return{isModalOpen:t,handleAction:de((async e=>{switch(e.type){case"updateVisibility":i.current=e.categoryId,n(!0);break;case"updateCategory":await s(e.categoryId,e.category);break;case"createCategory":await o(e.category);break;default:console.error(`Unhandled action type: ${e}`)}}),[o,s]),handleModalConfirm:de((async()=>{i.current&&await r(i.current)}),[r]),handleModalCancel:de((()=>{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(e,t,n){if(di.randomUUID&&!e)return di.randomUUID();var i=(e=e||{}).random||(e.rng||ci)();return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(e,t=0){return(si[e[t+0]]+si[e[t+1]]+si[e[t+2]]+si[e[t+3]]+"-"+si[e[t+4]]+si[e[t+5]]+"-"+si[e[t+6]]+si[e[t+7]]+"-"+si[e[t+8]]+si[e[t+9]]+"-"+si[e[t+10]]+si[e[t+11]]+si[e[t+12]]+si[e[t+13]]+si[e[t+14]]+si[e[t+15]]).toLowerCase()}(i)}const hi=({title:e,children:t})=>z("div",{className:"mt-2",children:[z("div",{className:"mt-9",children:z("h1",{className:"text-2xl font-semibold text-gray-900",children:e})}),z("div",{className:"w-1/2",children:t})]}),pi=({formFields:e,formData:t,isSubmitting:n,formMode:i,messages:r,categoryId:o,handleInputChange:s})=>z(b,{children:[e.map((e=>e.display&&!e.display(o)?null:z(b,{children:[z("label",{className:"sm:col-start-1",children:e.label}),z("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"===e.type?"w-6 h-full":""),type:e.type,name:e.name,value:(e.type,t[e.name]),checked:"checkbox"===e.type?!!t[e.name]:void 0,disabled:e.disabled&&e.disabled(i.mode),required:e.isRequired,onChange:s})]},e.name))),z("div",{className:"sm:col-start-4 flex justify-end",children:z("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"})}),z("div",{className:"sm:col-start-1 sm:col-span-3 text-left",children:r.map(((e,t)=>z("div",{className:"text-sm text-left font-semibold "+("error"===e.type?"text-red-600":"text-green-600 cursor-pointer"),children:e.text},t)))})]}),mi={categoryId:"",title:"",subtitle:"",iconUrl:"",displayOrder:0},fi=[{name:"categoryId",isRequired:!1,label:"Category Id",type:"text",disabled:e=>"update"==e},{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:e,onChange:t})=>{const{isSubmitting:n,messages:i,formData:r,handleSubmit:o,handleInputChange:s}=((e,t)=>{const[n,i]=oe(!1),[r,o]=oe([]),[s,a]=oe(mi),{handleAction:l}=ri([]);se((()=>{if("update"===e.mode){const t={categoryId:e.initialCategory.id,title:e.initialCategory.title,subtitle:e.initialCategory.subtitle,iconUrl:e.initialCategory.iconUrl,displayOrder:e.initialCategory.displayOrder};a(t)}}),[e]);const c=de(((e,t)=>{o((n=>[...n,{text:e,type:t}]))}),[]),d=de((()=>{a({...mi})}),[]),u=de((()=>{let e=!0;for(const t of fi)!t.isRequired||"text"!==t.type||s[t.name]&&""!==s[t.name].toString().trim()||(c(`${t.label} is required.`,"error"),e=!1);return e}),[s,c]),h=de((()=>({...s,enabled:!1,products:[{id:ui(),title:s.title,description:s.subtitle,enabled:!0,iconUrl:s.iconUrl,activities:[]}]})),[s]),p=de((e=>({...s,enabled:e.enabled,products:e.products})),[s]);return{isSubmitting:n,messages:r,formData:s,setMessages:o,handleSubmit:async n=>{if(n.preventDefault(),i(!0),o([]),u())try{if("create"===e.mode){const e=h();await l({type:"createCategory",category:e})}if("update"===e.mode){const t=p(e.initialCategory);await l({type:"updateCategory",categoryId:e.initialCategory.id,category:t})}c(`Category successfully ${"create"===e.mode?"created":"updated"}.`,"success"),d(),t()}catch(r){c(`Error ${"create"===e.mode?"adding":"updating"} category: ${r}`,"error")}finally{i(!1)}else i(!1)},handleInputChange:e=>{const t=e.target,{name:n,value:i,type:r}=t;a((e=>({...e,[n]:"number"===r?Number(i):i})))}}})(e,t),a="create"===e.mode?"New Benefits Plan Category":"Update Benefits Plan Category";return z(hi,{title:a,children:z("form",{onSubmit:o,children:z("div",{className:"sm:grid sm:grid-cols-4 sm:items-baseline sm:gap-10 mt-8",children:z(pi,{formMode:e,formFields:fi,formData:r,isSubmitting:n,messages:i,handleInputChange:s})})})})},yi=({disabled:e,children:t,onClick:n,...i})=>{const[r,o]=oe(!1);return z("button",{disabled:e||r,onClick:async()=>{if(n&&!r){o(!0);try{await n()}catch(e){console.error("Error executing promise:",e)}finally{o(!1)}}},type:"submit",...i,children:t})};function vi(e,t){for(var n in t)e[n]=t[n];return e}function bi(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var i in t)if("__source"!==i&&e[i]!==t[i])return!0;return!1}function wi(e,t){this.props=e,this.context=t}(wi.prototype=new w).isPureReactComponent=!0,wi.prototype.shouldComponentUpdate=function(e,t){return bi(this.props,e)||bi(this.state,t)};var xi=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xi&&xi(e)};var _i="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var ki=t.__e;t.__e=function(e,t,n,i){if(e.then)for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);ki(e,t,n,i)};var Ti=t.unmount;function Si(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=vi({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Si(e,t,n)}))),e}function Ci(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Ci(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Ai(){this.__u=0,this.t=null,this.__b=null}function Ei(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Pi(){this.u=null,this.o=null}t.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Ti&&Ti(e)},(Ai.prototype=new w).__c=function(e,t){var n=t.__c,i=this;null==i.t&&(i.t=[]),i.t.push(n);var r=Ei(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 e=i.state.__a;i.__v.__k[0]=Ci(e,e.__c.__P,e.__c.__O)}var t;for(i.setState({__a:i.__b=null});t=i.t.pop();)t.forceUpdate()}};i.__u++||32&t.__u||i.setState({__a:i.__b=i.__v.__k[0]}),e.then(s,s)},Ai.prototype.componentWillUnmount=function(){this.t=[]},Ai.prototype.render=function(e,t){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=t.__a&&y(b,null,e.fallback);return r&&(r.__u&=-33),[y(b,null,t.__a?null:e.children),r]};var Ni=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};(Pi.prototype=new w).__a=function(e){var t=this,n=Ei(t.__v),i=t.o.get(e);return i[0]++,function(r){var o=function(){t.props.revealOrder?(i.push(r),Ni(t,e,i)):r()};n?n(o):o()}},Pi.prototype.render=function(e){this.u=null,this.o=new Map;var t=A(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Pi.prototype.componentDidUpdate=Pi.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Ni(e,n,t)}))};var Ri="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Di=/^(?: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,Li="undefined"!=typeof document,Vi=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};w.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(w.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var ji=t.event;function Ii(){}function Ui(){return this.cancelBubble}function Fi(){return this.defaultPrevented}t.event=function(e){return ji&&(e=ji(e)),e.persist=Ii,e.isPropagationStopped=Ui,e.isDefaultPrevented=Fi,e.nativeEvent=e};var Bi={enumerable:!1,configurable:!0,get:function(){return this.class}},zi=t.vnode;t.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,i={};for(var r in t){var o=t[r];if(!("value"===r&&"defaultValue"in t&&null==o||Li&&"children"===r&&"noscript"===n||"class"===r||"className"===r)){var s=r.toLowerCase();"defaultValue"===r&&"value"in t&&null==t.value?r="value":"download"===r&&!0===o?o="":"translate"===s&&"no"===o?o=!1:"ondoubleclick"===s?r="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||Vi(t.type)?"onfocus"===s?r="onfocusin":"onblur"===s?r="onfocusout":Mi.test(r)?r=s:-1===n.indexOf("-")&&Di.test(r)?r=r.replace(Oi,"-$&").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=A(t.children).forEach((function(e){e.props.selected=-1!=i.value.indexOf(e.props.value)}))),"select"==n&&null!=i.defaultValue&&(i.value=A(t.children).forEach((function(e){e.props.selected=i.multiple?-1!=i.defaultValue.indexOf(e.props.value):i.defaultValue==e.props.value}))),t.class&&!t.className?(i.class=t.class,Object.defineProperty(i,"className",Bi)):(t.className&&!t.class||t.class&&t.className)&&(i.class=i.className=t.className),e.props=i}(e),e.$$typeof=Ri,zi&&zi(e)};var $i=t.__r;t.__r=function(e){$i&&$i(e),e.__c};var Hi=t.diffed;t.diffed=function(e){Hi&&Hi(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};var qi=ae;const Wi=e=>y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6",...e},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:e,heading:t,message:n,onConfirm:i,onCancel:r})=>e?z("div",{className:"relative z-10","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",children:[z("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"}),z("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:z("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:z("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:[z("div",{className:"bg-white px-4 pb-4 pt-5 sm:p-6 sm:pb-4",children:z("div",{className:"sm:flex sm:items-start",children:[z("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:z(Wi,{className:"h-6 w-6 text-red-600"})}),z("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[z("h1",{className:"text-base font-semibold leading-6 text-gray-900",id:"modal-title",children:t}),z("div",{className:"mt-2",children:z("p",{className:"text-sm text-gray-500",children:n})})]})]})}),z("div",{className:"bg-gray-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6",children:[z(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"}),z("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:e,renderTableRows:t})=>z("div",{className:"-mx-4 mt-8 sm:-mx-4",children:z("div",{className:"inline-block min-w-full overflow-x-auto shadow border-b border-gray-200 align-middle sm:rounded-lg",children:z("table",{className:"min-w-full divide-y divide-gray-500",children:[z("thead",{className:"bg-gray-50",children:z("tr",{className:"divide-x divide-gray-20",children:e.map((e=>z("th",{scope:"col",className:e.className,children:e.name},e.name)))})}),z("tbody",{className:"divide-y divide-gray-200 bg-white",children:t()})]})})}),Xi=({error:e,isModalOpen:t,modalHeading:n,modalTitle:i,tableHeaders:r,headingText:o,buttonText:s,filterElement:a,onCreateButton:l,onModalConfirm:c,renderTableRows:d,handleModalCancel:u})=>z(b,{children:[z("div",{className:"p-4 text-red-700",children:e}),!e&&z("div",{className:"m-4",children:[z("div",{className:"flex items-center",children:[z("div",{className:"flex-auto",children:z("h1",{className:"text-base font-semibold leading-6 text-gray-900",children:o})}),z("div",{className:"ml-16 mt-0 flex-none",children:z("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,z(Yi,{headers:r,renderTableRows:d})]}),z(Ki,{isOpen:t,heading:n,message:i,onConfirm:c,onCancel:u})]}),Gi=e=>y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"#6366F1",className:"size-6",...e},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})),Ji=({onClick:e,children:t})=>z("div",{className:"mt-4",children:z("div",{className:"flex justify-normal",children:[z("span",{onClick:e,children:z(Gi,{className:"h-6 w-6 border-0 cursor-pointer"})}),z("label",{className:"block text-sm font-bold text-gray-700 pt-0.5 ml-1",children:t})]})}),Zi=({buttonName:e,onClick:t,children:n})=>z(b,{children:[z(Ji,{onClick:t,children:e}),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"}],er=e=>{const[t,n]=oe(null),[i,r]=oe({mode:"view"}),{isModalOpen:o,handleAction:s,handleModalConfirm:a,handleModalCancel:l}=ri(e.categories);return z(b,{children:["view"===i.mode&&z(Xi,{error:t,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(),e.onChange()}catch(t){n(`${t}`)}},handleModalCancel:l,renderTableRows:()=>z(b,{children:e.categories.map((e=>{const t=e.products.reduce(((e,t)=>e+t.activities.length),0);return z("tr",{className:"divide-x divide-gray-200",children:[z("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-gray-900",children:e.id}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 items-center justify-center sm:table-cell",children:z("img",{src:e.iconUrl,alt:e.title,className:"h-8 w-8"})}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.title}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:e.subtitle}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:t}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.displayOrder}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.enabled?"Yes":"No"}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("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:e.id})},children:"Edit"})})}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("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 e=>{await s({type:"updateVisibility",categoryId:e})})(e.id),children:e.enabled?"Disable":"Enable"})})})]},e.id)}))}),onCreateButton:()=>r({mode:"create"})}),"view"!==i.mode&&z(Zi,{buttonName:"Benefits Plan Categories",onClick:()=>{r({mode:"view"})},children:z(gi,{formMode:"create"===i.mode?{mode:"create"}:{mode:"update",initialCategory:e.categories.find((e=>"update"===i.mode&&e.id===i.itemId))},onChange:e.onChange})})]})},tr=({visible:e,children:t})=>{const n=le(e);return e&&!n.current&&(n.current=!0),n.current?z("div",{hidden:!e,children:t}):null},nr=e=>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,...e},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[e,t]=oe(!1),[n,i]=oe([]),[r,o]=oe(!1),s=le([]),a=le(),l=de((async e=>{t(!0),s.current=e;try{const t=await(async()=>{if(!Qn)throw new Error("Api has not been initialized");return(await Qn.get("/_admin/v1.0/activities")).data})(),n=rr(e,t);i(n)}catch(n){throw new Error(`Failed to load activities. Error: ${_e(n)}`)}finally{t(!1)}}),[]),c=de((async e=>{t(!0);try{const t=await(async e=>{if(!Qn)throw new Error("Api has not been initialized");return(await Qn.get(`/_admin/v1.0/activities/${e}`)).data})(e);t.enabled=!t.enabled,await ii(e,t)}catch(n){throw new Error(`Failed to update activity visibility. Error: ${_e(n)}`)}finally{t(!1)}}),[]);return{activities:n,isLoading:e,isModalOpen:r,loadActivities:l,handleAction:de((async e=>{switch(e.type){case"updateVisibility":a.current=e.activityId,o(!0);break;case"updateActivity":await ii(e.activityId,e.activity,e.selectedCategory,e.isFeaturedActivity);break;case"createActivity":await(async(e,t,n)=>{if(!Qn)throw new Error("Api has not been initialized");try{const i=await Qn.post("/_admin/v1.0/activities",e);if(t){Ae(t,i.data.id,n??!1);const e=t;await ni(t.id,e)}}catch(i){throw new Error(`${_e(i)}`)}})(e.activity,e.selectedCategory,e.isFeaturedActivity);break;default:console.error(`Unhandled action type: ${e}`)}}),[]),handleModalConfirm:de((async()=>{a.current&&(await c(a.current),o(!1))}),[c]),handleModalCancel:de((()=>{o(!1)}),[])}},rr=(e,t)=>{const n=or(e);return t.map((e=>({...e,category:n.get(e.id)?.find((()=>!0))})))},or=e=>{const t=sr(e),n=new Map;return t.forEach((({activity:e,categoryId:t,categoryTitle:i})=>{const r=e.id;n.has(r)||n.set(r,[]);const o=n.get(r);o.some((e=>e.id===t))||o.push({id:t,title:i,isFeatured:e.isFeatured})})),n},sr=e=>e.flatMap((e=>e.products.flatMap((t=>t.activities.map((t=>({activity:t,categoryId:e.id,categoryTitle:e.title}))))))),ar="None",lr=[{name:"activityId",isRequired:!1,label:"Activity Id",type:"text",disabled:e=>"update"==e},{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:e=>e!==ar}],cr=[{activityType:we.Advertisement,formFields:[{name:"bannerUrl",isRequired:!0,label:"Banner Url",type:"text"},{name:"articleId",isRequired:!0,label:"Article Id",type:"text"}]},{activityType:we.Article,formFields:[{name:"articleId",isRequired:!0,label:"Article Id",type:"text"}]},{activityType:we.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"},{name:"allowanceProductId",isRequired:!1,label:"Allowance Product Id",type:"text"}]},{activityType:we.Url,formFields:[{name:"url",isRequired:!0,label:"Url",type:"text"}]},{activityType:we.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,allowanceProductId:""},ur=({formMode:e,categories:t,onChange:n})=>{const{isSubmitting:i,messages:r,formData:o,selectedActivityType:s,currentFormFields:a,selectedCategory:l,handleSubmit:c,handleInputChange:d,handleActivityTypeChange:u,handleCategoryChange:h}=((e,t,n)=>{const[i,r]=oe(we.Article),[o,s]=oe({id:ar,title:ar}),[a,l]=oe([]),[c,d]=oe(!1),[u,h]=oe(dr),{handleAction:p}=ir(),m=ce((()=>[...lr,...cr.find((e=>e.activityType===i))?.formFields||[]]),[i]),f=de(((e,t)=>{l((n=>[...n,{text:e,type:t}]))}),[]);se((()=>{if("update"===e.mode){const t=e.initialActivity,n={activityId:t.id,title:t.title,points:t.points,description:t.description,iconUrl:t.iconUrl,url:t.url,articleId:t.articleId,bannerUrl:t.bannerUrl,buttonText:t.buttonText,primaryLabel:t.estimateLabel?.primaryLabel,secondaryLabel:t.estimateLabel?.secondaryLabel,isFeatured:t.category?.isFeatured,allowanceProductId:t.allowanceProductId};h({...n}),r(t.activityType),s(t.category??{id:ar,title:ar})}}),[e]);const g=de((()=>{h({...dr}),r(we.Article),s({id:ar,title:ar})}),[]),y=de((()=>{let e=!0;for(const t of m){const n=u[t.name];!t.isRequired||"text"!==t.type||n&&""!==n.toString().trim()||(f(`${t.label} is required.`,"error"),e=!1)}return e}),[f,m,u]),v=async()=>{const{url:e,articleId:n,bannerUrl:r,buttonText:s,primaryLabel:a,secondaryLabel:l,isFeatured:c,allowanceProductId:d}=u,h={...u,activityType:i,calculationType:Te(i,o.title),enabled:!1,savingsInCents:0,configurationTags:Ce(o.title),tags:Se(o.title),estimateLabel:a?{primaryLabel:a,secondaryLabel:l}:void 0,url:e||void 0,articleId:n||void 0,bannerUrl:r||void 0,buttonText:s||void 0,allowanceProductId:d?.trim()?d.trim():void 0};let m;o.title!==ar&&(m=t.find((e=>e.id===o.id)));try{await p({type:"createActivity",activity:h,selectedCategory:m,isFeaturedActivity:c}),f("Activity successfully created.","success"),g()}catch(y){throw f(`Error creating activity: ${y}`,"error"),y}},b=async e=>{const{primaryLabel:n,secondaryLabel:i,isFeatured:r,allowanceProductId:s}=u,a={...e,...u,estimateLabel:n?{primaryLabel:n,secondaryLabel:i}:void 0,allowanceProductId:s?.trim()?s.trim():void 0};let l;o.title!==ar&&(l=t.find((e=>e.id===o.id)));try{await p({type:"updateActivity",activityId:e.id,activity:a,selectedCategory:l,isFeaturedActivity:r}),f("Activity successfully updated.","success")}catch(c){throw f(`Error updating activity: ${c}`,"error"),c}};return{isSubmitting:c,messages:a,formData:u,selectedActivityType:i,currentFormFields:m,selectedCategory:o,setMessages:l,handleSubmit:async t=>{if(t.preventDefault(),d(!0),l([]),y())try{"create"===e.mode?await v():"update"===e.mode&&await b(e.initialActivity),n()}finally{d(!1)}else d(!1)},handleInputChange:e=>{const t=e.target,{name:n,value:i,type:r}=t;h((e=>({...e,[n]:"checkbox"===r?t.checked:"number"===r?Number(i):i})))},handleActivityTypeChange:e=>{const t=e.target;r(t.value)},handleCategoryChange:e=>{const n=e.target.value;if(n===ar)s({id:ar,title:ar});else{const e=t.find((e=>e.id===n));e&&s({id:e.id,title:e.title})}}}})(e,t,n),p="create"===e.mode?"New Benefits Plan Activities":"Update Benefits Plan Activities";return z(hi,{title:p,children:z("form",{onSubmit:c,children:[z("div",{className:"sm:grid sm:grid-cols-4 sm:items-baseline mt-8",children:[z("label",{className:"sm:col-start-1",children:"Type"}),z("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"===e.mode,onChange:u,children:Object.values(we).map((e=>z("option",{value:e,children:e},e)))})]}),z("div",{className:"sm:grid sm:grid-cols-3 sm:items-baseline sm:gap-10 mt-8 sm:ml-12",children:[z("label",{className:"sm:col-start-1",children:"Category"}),z("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"===e.mode,onChange:h,children:[z("option",{value:ar,children:ar}),t.map((e=>z("option",{value:e.id,children:e.title},e.id)))]}),z(pi,{formMode:e,formFields:a,formData:o,isSubmitting:i,messages:r,categoryId:l.id,handleInputChange:d})]})]})})},hr=()=>{const[e,t]=oe(!1),[n,i]=oe([]),[r,o]=oe(null),[s,a]=oe(""),[l,c]=oe(!1),[d,u]=oe(null),h=de((async e=>{a(e),t(!0),o(null);try{const t=await(async e=>{if(!Qn)throw new Error("Api has not been initialized");return(await Qn.get(`/_admin/v1.0/activities/${e}/steps`)).data})(e);i(t)}catch(n){o(`Failed to load steps. Error: ${_e(n)}`)}finally{t(!1)}}),[]),p=de((e=>{u(e),c(!0)}),[]),m=de((async()=>{if(d)try{await(async(e,t)=>{if(!Qn)throw new Error("Api has not been initialized");await Qn.delete(`/_admin/v1.0/activities/${e}/steps/${t}`)})(s,d),c(!1),u(null),await h(s)}catch(e){o(`Failed to delete step. Error: ${_e(e)}`),c(!1),u(null)}}),[d,s,h]),f=de((()=>{c(!1),u(null)}),[]);return{isLoading:e,steps:n,error:r,isDeleteModalOpen:l,loadSteps:h,handleDeleteClick:p,handleDeleteConfirm:m,handleDeleteCancel:f}};var pr=(e=>(e.Ineligible="Ineligible",e.Completion="Completion",e.Content="Content",e.Consent="Consent",e.Question="Question",e))(pr||{}),mr=(e=>(e.Currency="Currency",e.DateTime="DateTime",e.Date="Date",e.Text="Text",e.MultiSelect="MultiSelect",e.SingleSelect="SingleSelect",e.TriviaSingleSelect="TriviaSingleSelect",e.Lookup="Lookup",e))(mr||{}),fr=(e=>(e.String="String",e.DateTime="DateTime",e.Date="Date",e.Integer="Integer",e.Decimal="Decimal",e.Boolean="Boolean",e.Lookup="Lookup",e))(fr||{}),gr=(e=>(e.Default="default",e.Onboarding="onboarding",e.WebBenefits="webBenefits",e))(gr||{});const yr=({activityId:e,steps:t,formMode:n,onChange:i})=>{const r="update"===n.mode,[o,s]=oe(""),[a,l]=oe(pr.Content),[c,d]=oe(""),[u,h]=oe(0),[p,m]=oe(""),[f,g]=oe(""),[y,v]=oe(""),[b,w]=oe([]),[x,_]=oe(""),[k,T]=oe(""),[S,C]=oe(""),[A,E]=oe(""),[P,N]=oe(""),[R,D]=oe([]),[M,O]=oe(""),[L,V]=oe([]),[j,I]=oe(""),[U,F]=oe(0),[B,$]=oe(!1),[H,q]=oe(""),[W,K]=oe(""),[Y,X]=oe(""),[G,J]=oe(""),[Z,Q]=oe(""),[ee,te]=oe([]),[ne,ie]=oe(!1),[re,ae]=oe(!1),[le,ce]=oe(null);se((()=>{if("update"!==n.mode)return;(async()=>{ie(!0),ce(null);try{const t=await(async(e,t)=>{if(!Qn)throw new Error("Api has not been initialized");return(await Qn.get(`/_admin/v1.0/activities/${e}/steps/${t}`)).data.step})(e,n.stepId);s(t.title),l(t.stepType),d(t.buttonText),h(t.progressPercentage),m(t.hint??""),g(t.description??""),v(t.imageUrl??""),w(t.nextSteps??[]),_(t.consentText??""),T(t.template??""),C(t.dataType??""),E(t.customerAttribute??""),N(t.analyticsEvent??""),D(t.options??[]),O(t.correctValue??""),V(t.branching??[]),I(t.lookupUrl??""),F(t.minimumSearchCharacterLength??0),te(t.invalidDays??[]),t.validation&&($(!0),q(t.validation.minimumValue??""),K(t.validation.minimumValueAddDays??""),X(t.validation.maximumValue??""),J(t.validation.matchExpression??""),Q(t.validation.invalidMessage))}catch(t){ce(`Failed to load step. Error: ${_e(t)}`)}finally{ie(!1)}})()}),[e,n]);const de=()=>B&&Z.trim()?{minimumValue:H||void 0,minimumValueAddDays:""!==W?Number(W):void 0,maximumValue:Y||void 0,matchExpression:G||void 0,invalidMessage:Z}:null;if(ne)return z("p",{class:"p-5 text-sm text-gray-500",children:"Loading step…"});const ue=a===pr.Question,he=vr.includes(k),pe=k===mr.TriviaSingleSelect,me=k===mr.Lookup,fe=a===pr.Content||a===pr.Consent||a===pr.Ineligible,ge=a===pr.Content||a===pr.Consent||a===pr.Ineligible||a===pr.Question;return z("div",{class:"m-4 mt-8 max-w-2xl",children:[z("h1",{class:"text-base font-semibold leading-6 text-gray-900 mb-6",children:r?"Edit Step":"New Step"}),le&&z("div",{class:"mb-4 p-4 text-red-700 bg-red-50 rounded-md",children:le}),z("div",{class:"space-y-6",children:[z("div",{class:wr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Core"}),z(xr,{label:"Step Type",children:r?z("span",{class:"inline-flex items-center rounded-md bg-indigo-50 px-2 py-1 text-sm font-medium text-indigo-700 ring-1 ring-inset ring-indigo-700/10",children:a}):z("select",{value:a,onChange:e=>l(e.target.value),class:br,children:Object.values(pr).map((e=>z("option",{value:e,children:e},e)))})}),z(xr,{label:"Title *",children:z("input",{type:"text",value:o,onInput:e=>s(e.target.value),class:br})}),z(xr,{label:"Button Text *",children:z("input",{type:"text",value:c,onInput:e=>d(e.target.value),class:br})}),z(xr,{label:"Progress Percentage *",children:z("input",{type:"number",min:0,max:100,value:u,onInput:e=>h(Number(e.target.value)),class:br})}),z(xr,{label:"Hint",children:z("input",{type:"text",value:p,onInput:e=>m(e.target.value),class:br})})]}),fe&&z("div",{class:wr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Content"}),fe&&z(xr,{label:"Description",children:z("textarea",{value:f,onInput:e=>g(e.target.value),rows:3,class:br})}),fe&&z(xr,{label:"Image URL",children:z("input",{type:"text",value:y,onInput:e=>v(e.target.value),class:br})}),a===pr.Consent&&z(xr,{label:"Consent Text",children:z("textarea",{value:x,onInput:e=>_(e.target.value),rows:3,class:br})})]}),ge&&z("div",{class:wr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Next Steps"}),z(_r,{rows:b,allSteps:t,onChange:w})]}),ue&&z("div",{class:wr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Question"}),z(xr,{label:"Template",children:z("select",{value:k,onChange:e=>T(e.target.value),class:br,children:[z("option",{value:"",children:"— none —"}),Object.values(mr).map((e=>z("option",{value:e,children:e},e)))]})}),z(xr,{label:"Data Type",children:z("select",{value:S,onChange:e=>C(e.target.value),class:br,children:[z("option",{value:"",children:"— none —"}),Object.values(fr).map((e=>z("option",{value:e,children:e},e)))]})}),z(xr,{label:"Customer Attribute",children:z("input",{type:"text",value:A,onInput:e=>E(e.target.value),class:br})}),z(xr,{label:"Analytics Event",children:z("input",{type:"text",value:P,onInput:e=>N(e.target.value),class:br})})]}),ue&&he&&z("div",{class:wr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:["Options",pe&&" — select the correct answer"]}),z(kr,{rows:R,correctValue:M,isTrivia:pe,onChange:D,onCorrectValueChange:O})]}),ue&&k===mr.SingleSelect&&z("div",{class:wr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Branching"}),z(Tr,{rows:L,options:R,allSteps:t,onChange:V})]}),ue&&me&&z("div",{class:wr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Lookup"}),z(xr,{label:"Lookup URL",children:z("input",{type:"text",value:j,onInput:e=>I(e.target.value),class:br})}),z(xr,{label:"Minimum Search Character Length",children:z("input",{type:"number",min:0,value:U,onInput:e=>F(Number(e.target.value)),class:br})})]}),ue&&z("div",{class:wr,children:[z("div",{class:"flex items-center gap-2",children:[z("input",{type:"checkbox",id:"hasValidation",checked:B,onChange:e=>$(e.target.checked)}),z("label",{for:"hasValidation",class:"text-xs font-semibold uppercase tracking-wide text-gray-500 cursor-pointer",children:"Validation"})]}),B&&z("div",{class:"mt-3 space-y-3",children:[z(xr,{label:"Minimum Value",children:z("input",{type:"text",value:H,onInput:e=>q(e.target.value),class:br})}),z(xr,{label:"Minimum Value Add Days",children:z("input",{type:"number",value:W,onInput:e=>{const t=e.target.value;K(""===t?"":Number(t))},class:br})}),z(xr,{label:"Maximum Value",children:z("input",{type:"text",value:Y,onInput:e=>X(e.target.value),class:br})}),z(xr,{label:"Match Expression",children:z("input",{type:"text",value:G,onInput:e=>J(e.target.value),class:br})}),z(xr,{label:"Invalid Message *",children:z("input",{type:"text",value:Z,onInput:e=>Q(e.target.value),class:br})})]})]}),ue&&z("div",{class:wr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Invalid Days"}),z(Sr,{tags:ee,onChange:te,placeholder:"e.g. Saturday"})]})]}),z("div",{class:"mt-8 flex justify-end",children:z("button",{type:"button",disabled:re,onClick:async()=>{ae(!0),ce(null);try{const t=vr.includes(k),r=k===mr.TriviaSingleSelect,s=k===mr.Lookup,l=a===pr.Question,d=a===pr.Content||a===pr.Consent||a===pr.Ineligible||a===pr.Question,h=t&&R.length>0?R:null,m=k===mr.SingleSelect&&L.length>0?L:null,g=d&&b.length>0?b:null;"create"===n.mode?await(async(e,t)=>{if(!Qn)throw new Error("Api has not been initialized");await Qn.post(`/_admin/v1.0/activities/${e}/steps`,t)})(e,{stepType:a,title:o,description:f||null,hint:p||null,progressPercentage:u,buttonText:c,template:l&&k?k:null,dataType:l&&S?S:null,options:h,branching:m,correctValue:r&&M?M:null,validation:l?de():null,invalidDays:l&&ee.length>0?ee:null,nextSteps:g,customerAttribute:l&&A?A:null,analyticsEvent:l&&P?P:null,imageUrl:y||null,consentText:a===pr.Consent&&x?x:null,lookupUrl:s&&j?j:null,minimumSearchCharacterLength:s?U:0,default:null}):await(async(e,t,n)=>{if(!Qn)throw new Error("Api has not been initialized");await Qn.put(`/_admin/v1.0/activities/${e}/steps/${t}`,n)})(e,n.stepId,{title:o,description:f||null,hint:p||null,progressPercentage:u,buttonText:c,template:l&&k?k:null,dataType:l&&S?S:null,options:h,branching:m,correctValue:r&&M?M:null,validation:l?de():null,invalidDays:l&&ee.length>0?ee:null,nextSteps:g,customerAttribute:l&&A?A:null,analyticsEvent:l&&P?P:null,imageUrl:y||null,consentText:a===pr.Consent&&x?x:null,lookupUrl:s&&j?j:null,minimumSearchCharacterLength:s?U:0,default:null}),i()}catch(t){ce(`Failed to save step. Error: ${_e(t)}`)}finally{ae(!1)}},class:"rounded-md bg-indigo-500 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-900 disabled:opacity-50 disabled:cursor-not-allowed",children:re?"Saving…":"Save"})})]})},vr=[mr.SingleSelect,mr.MultiSelect,mr.TriviaSingleSelect],br="block w-full rounded-md border border-gray-300 px-3 py-2 text-sm shadow-sm focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500",wr="border border-gray-200 rounded-md p-4 space-y-4",xr=({label:e,children:t})=>z("div",{children:[z("label",{class:"block text-sm font-medium text-gray-700 mb-1",children:e}),t]}),_r=({rows:e,allSteps:t,onChange:n})=>{const i=(t,i,r)=>n(e.map(((e,n)=>n===t?{...e,[i]:r}:e)));return z("div",{class:"space-y-2",children:[e.map(((r,o)=>z("div",{class:"flex gap-2 items-center",children:[z("select",{class:br,value:r.client,onChange:e=>i(o,"client",e.target.value),children:Object.values(gr).map((e=>z("option",{value:e,children:e},e)))}),z("select",{class:br,value:r.nextStepId,onChange:e=>i(o,"nextStepId",e.target.value),children:[z("option",{value:"",children:"— none —"}),t.map((e=>z("option",{value:e.id,children:e.title},e.id)))]}),z("button",{type:"button",class:"text-red-500 hover:text-red-700 text-sm px-2",onClick:()=>(t=>n(e.filter(((e,n)=>n!==t))))(o),children:"✕"})]},o))),z("button",{type:"button",class:"text-sm text-indigo-600 hover:text-indigo-800",onClick:()=>n([...e,{client:gr.Default,nextStepId:""}]),children:"+ Add next step"})]})},kr=({rows:e,correctValue:t,isTrivia:n,onChange:i,onCorrectValueChange:r})=>{const o=(t,n,r)=>i(e.map(((e,i)=>i===t?{...e,[n]:r}:e)));return z("div",{class:"space-y-2",children:[e.map(((s,a)=>z("div",{class:"flex gap-2 items-center",children:[n&&z("input",{type:"radio",name:"correctOption",checked:t===s.value,onChange:()=>r(s.value),title:"Mark as correct answer",class:"mt-1 shrink-0"}),z("input",{class:br,placeholder:"Text (label)",value:s.text,onInput:e=>o(a,"text",e.target.value)}),z("input",{class:br,placeholder:"Value",value:s.value,onInput:e=>o(a,"value",e.target.value)}),z("button",{type:"button",class:"text-red-500 hover:text-red-700 text-sm px-2",onClick:()=>(t=>i(e.filter(((e,n)=>n!==t))))(a),children:"✕"})]},a))),z("button",{type:"button",class:"text-sm text-indigo-600 hover:text-indigo-800",onClick:()=>i([...e,{text:"",value:""}]),children:"+ Add option"})]})},Tr=({rows:e,options:t,allSteps:n,onChange:i})=>z("div",{class:"space-y-3",children:[e.map(((r,o)=>z("div",{class:"border border-gray-200 rounded p-3 space-y-2",children:[z("div",{class:"flex gap-2 items-center",children:[z("select",{class:br,value:r.value,onChange:t=>((t,n)=>i(e.map(((e,i)=>i===t?{...e,value:n}:e))))(o,t.target.value),children:[z("option",{value:"",children:"— none —"}),t.map((e=>z("option",{value:e.value,children:e.text},e.value)))]}),z("button",{type:"button",class:"text-red-500 hover:text-red-700 text-sm px-2",onClick:()=>(t=>i(e.filter(((e,n)=>n!==t))))(o),children:"✕"})]}),z("p",{class:"text-xs text-gray-500",children:"Next steps for this branch:"}),z(_r,{rows:r.nextSteps,allSteps:n,onChange:t=>((t,n)=>i(e.map(((e,i)=>i===t?{...e,nextSteps:n}:e))))(o,t)})]},o))),z("button",{type:"button",class:"text-sm text-indigo-600 hover:text-indigo-800",onClick:()=>i([...e,{value:"",nextSteps:[{client:gr.Default,nextStepId:""}]}]),children:"+ Add branch"})]}),Sr=({tags:e,onChange:t,placeholder:n})=>{const[i,r]=oe(""),o=()=>{const n=i.trim();n&&!e.includes(n)&&(t([...e,n]),r(""))};return z("div",{class:"space-y-2",children:[z("div",{class:"flex flex-wrap gap-1",children:e.map((n=>z("span",{class:"inline-flex items-center gap-1 rounded bg-gray-100 px-2 py-0.5 text-xs text-gray-700",children:[n,z("button",{type:"button",class:"text-gray-400 hover:text-red-500",onClick:()=>(n=>t(e.filter((e=>e!==n))))(n),children:"✕"})]},n)))}),z("div",{class:"flex gap-2",children:[z("input",{class:br,placeholder:n??"Add value…",value:i,onInput:e=>r(e.target.value),onKeyDown:e=>"Enter"===e.key&&(e.preventDefault(),o())}),z("button",{type:"button",class:"rounded-md border border-gray-300 px-3 py-2 text-sm hover:bg-gray-50",onClick:o,children:"Add"})]})]})},Cr=[{name:"#",className:"px-3 py-3.5 pl-4 text-left text-sm font-semibold text-gray-900"},{name:"Step Id",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Type",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Title",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Edit",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"},{name:"Delete",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"}],Ar=({activityId:e})=>{const[t,n]=oe({mode:"list"}),{isLoading:i,steps:r,error:o,isDeleteModalOpen:s,loadSteps:a,handleDeleteClick:l,handleDeleteConfirm:c,handleDeleteCancel:d}=hr();se((()=>{a(e)}),[e,a]);return z(b,{children:["list"===t.mode&&z("div",{className:"mt-2",children:[z("div",{className:"mt-9 flex items-center justify-between",children:[z("div",{children:[z("h1",{className:"text-2xl font-semibold text-gray-900",children:"Activity Steps"}),z("p",{className:"text-sm text-gray-500 mt-1",children:["Activity ID: ",e]})]}),z("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:()=>n({mode:"create"}),children:"New Step"})]}),i&&z("p",{className:"p-5",children:"Loading..."}),o&&z("div",{className:"p-4 text-red-700",children:o}),!i&&!o&&r.length>0&&z(Yi,{headers:Cr,renderTableRows:()=>z(b,{children:r.map(((e,t)=>z("tr",{className:"divide-x divide-gray-200",children:[z("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-gray-900 pl-4",children:t+1}),z("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-gray-500",children:e.id}),z("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-gray-500",children:z("span",{className:`inline-flex items-center rounded-md px-2 py-1 text-xs font-medium ring-1 ring-inset ${Er(e.stepType)}`,children:e.stepType})}),z("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-gray-500",children:e.title}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("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:()=>n({mode:"update",stepId:e.id}),children:"Edit"})})}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-red-600 shadow-sm ring-1 ring-inset ring-red-300 hover:bg-red-50",onClick:()=>l(e.id),children:"Delete"})})})]},e.id)))})}),!i&&!o&&0===r.length&&z("p",{className:"mt-4 text-sm text-gray-500",children:"No steps found for this activity."})]}),("create"===t.mode||"update"===t.mode)&&z(Zi,{buttonName:"Activity Steps",onClick:()=>n({mode:"list"}),children:z(yr,{activityId:e,steps:r,formMode:"create"===t.mode?{mode:"create"}:{mode:"update",stepId:t.stepId},onChange:()=>{n({mode:"list"}),a(e)}})}),z(Ki,{isOpen:s,heading:"Delete Step",message:"Are you sure you want to delete this step? This action cannot be undone.",onConfirm:c,onCancel:d})]})},Er=e=>{switch(e){case pr.Question:return"bg-blue-50 text-blue-700 ring-blue-700/10";case pr.Content:return"bg-green-50 text-green-700 ring-green-600/20";case pr.Consent:return"bg-yellow-50 text-yellow-700 ring-yellow-600/20";case pr.Completion:return"bg-purple-50 text-purple-700 ring-purple-700/10";case pr.Ineligible:return"bg-red-50 text-red-700 ring-red-600/10";default:return"bg-gray-50 text-gray-700 ring-gray-600/10"}},Pr=[{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"},{name:"Steps",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"}],Nr="All",Rr=({categories:e,onChange:t})=>{const[n,i]=oe(null),[r,o]=oe({mode:"view"}),[s,a]=oe({id:Nr,title:Nr}),[l,c]=oe([]),{isLoading:d,activities:u,isModalOpen:h,loadActivities:p,handleAction:m,handleModalConfirm:f,handleModalCancel:g}=ir();se((()=>{(async()=>{try{await p(e)}catch(t){i(`${t}`)}})()}),[e,p]),se((()=>{c(s.title===Nr?u:u.filter((e=>e.category?.id===s.id)))}),[u,s]);const y=z("div",{className:"flex items-center space-x-2 mt-4",children:[z(nr,{}),z("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:t=>{const n=t.target.value;if(n===Nr)a({id:Nr,title:Nr});else{const t=e.find((e=>e.id===n));t&&a({id:t.id,title:t.title})}},children:[z("option",{value:Nr,children:Nr}),e.map((e=>z("option",{value:e.id,children:e.title},e.id)))]})]});return z(b,{children:["view"===r.mode&&z(b,{children:[d&&z("p",{className:"p-5",children:"Loading..."}),!d&&z(Xi,{error:n,isModalOpen:h,modalHeading:"Warning!",modalTitle:"Are you sure you want to change the visibility of this activity in the app?",tableHeaders:Pr,headingText:"Benefits Plan Activities",buttonText:"New Activity",filterElement:y,onModalConfirm:async()=>{try{await f(),t()}catch(e){i(`${e}`)}},handleModalCancel:g,renderTableRows:()=>z(b,{children:l.map((e=>z("tr",{className:"divide-x divide-gray-200",children:[z("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-gray-900",children:e.id}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 xl:table-cell",children:z("span",{className:"flex justify-center",children:z("img",{src:e.iconUrl,alt:e.title,className:"h-8 w-8"})})}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:ke(e.title)}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 2xl:table-cell",children:ke(e.description)}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 xl:table-cell",children:e.activityType}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.points}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.category?.title??"None"}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.enabled?"Yes":"No"}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("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:e.id})},children:"Edit"})})}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("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:e.id}),children:e.enabled?"Disable":"Enable"})})}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:e.activityType===we.Assessment&&z("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:"steps",activityId:e.id}),children:"Steps"})})})]},e.id)))}),onCreateButton:()=>o({mode:"create"})})]}),("create"===r.mode||"update"===r.mode)&&z(Zi,{buttonName:"Benefits Plan Activities",onClick:()=>{o({mode:"view"})},children:z(ur,{categories:e,formMode:"create"===r.mode?{mode:"create"}:{mode:"update",initialActivity:u.find((e=>e.id===r.itemId))},onChange:t})}),"steps"===r.mode&&z(Zi,{buttonName:"Benefits Plan Activities",onClick:()=>{o({mode:"view"})},children:z(Ar,{activityId:r.activityId})})]})};var Dr=(e=>(e.Categories="Categories",e.Activities="Activities",e))(Dr||{});const Mr=()=>{const[e,t]=oe("Categories"),[n,i]=oe([]),[r,o]=oe(!1),[s,a]=oe(null),l=de((t=>t===e),[e]),c=de((async()=>{o(!0),a(null);try{const e=(await(async()=>{if(!Qn)throw new Error("Api has not been initialized");return(await Qn.get("/_admin/v1.0/categories")).data})()).categories.sort(((e,t)=>e.displayOrder-t.displayOrder));i(e)}catch(e){console.error(e),a("Failed to load categories.")}finally{o(!1)}}),[]);se((()=>{c()}),[c]);const d=async()=>{await c()};return z(b,{children:[z(be,{tabTitles:Object.entries(Dr).map((([,e])=>e)),currentTab:e,onChange:t}),r&&z("p",{className:"p-5",children:"Loading..."}),s&&z("div",{className:"p-4 text-red-700",children:s}),!r&&z(b,{children:[z(tr,{visible:l("Categories"),children:z(er,{categories:n,onChange:d})}),z(tr,{visible:l("Activities"),children:z(Rr,{categories:n,onChange:d})})]})]})};function Or(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy(((...t)=>e(...t)),{get:(n,i)=>"create"===i?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function Lr(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const Vr=e=>Array.isArray(e);function jr(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}function Ir(e){return"string"==typeof e||Array.isArray(e)}function Ur(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function Fr(e,t,n,i){if("function"==typeof t){const[r,o]=Ur(i);t=t(void 0!==n?n:e.custom,r,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[r,o]=Ur(i);t=t(void 0!==n?n:e.custom,r,o)}return t}function Br(e,t,n){const i=e.getProps();return Fr(i,t,void 0!==n?n:i.custom,e)}const zr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$r=["initial",...zr],Hr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],qr=new Set(Hr),Wr=e=>1e3*e,Kr=e=>e/1e3,Yr={type:"spring",stiffness:500,damping:25,restSpeed:10},Xr={type:"keyframes",duration:.8},Gr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Jr=(e,{keyframes:t})=>t.length>2?Xr:qr.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Yr:Gr;function Zr(e,t){return e?e[t]||e.default||e:void 0}const Qr=!1,eo=e=>null!==e;function to(e,{repeat:t,repeatType:n="loop"},i){const r=e.filter(eo),o=t&&"loop"!==n&&t%2==1?0:r.length-1;return o&&void 0!==i?i:r[o]}const no=e=>e;const io=["read","resolveKeyframes","update","preRender","render","postRender"];function ro(e,t){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=io.reduce(((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,i=!1,r=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(t){o.has(t)&&(l.schedule(t),e()),t(s)}const l={schedule:(e,r=!1,s=!1)=>{const a=s&&i?t:n;return r&&o.add(e),a.has(e)||a.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{s=e,i?r=!0:(i=!0,[t,n]=[n,t],n.clear(),t.forEach(a),i=!1,r&&(r=!1,l.process(e)))}};return l}(o),e)),{}),{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&&t&&(i=!1,e(p))};return{schedule:io.reduce(((t,o)=>{const a=s[o];return t[o]=(t,o=!1,s=!1)=>(n||(n=!0,i=!0,r.isProcessing||e(p)),a.schedule(t,o,s)),t}),{}),cancel:e=>{for(let t=0;t<io.length;t++)s[io[t]].cancel(e)},state:r,steps:s}}const{schedule:oo,cancel:so,state:ao,steps:lo}=ro("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:no,!0),co=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,uo=1e-7,ho=12;function po(e,t,n,i){if(e===t&&n===i)return no;const r=t=>function(e,t,n,i,r){let o,s,a=0;do{s=t+(n-t)/2,o=co(s,i,r)-e,o>0?n=s:t=s}while(Math.abs(o)>uo&&++a<ho);return s}(t,0,1,e,n);return e=>0===e||1===e?e:co(r(e),t,i)}const mo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,fo=e=>t=>1-e(1-t),go=po(.33,1.53,.69,.99),yo=fo(go),vo=mo(yo),bo=e=>(e*=2)<1?.5*yo(e):.5*(2-Math.pow(2,-10*(e-1))),wo=e=>1-Math.sin(Math.acos(e)),xo=fo(wo),_o=mo(wo),ko=e=>/^0[^.\s]+$/u.test(e);let To=no;const So=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Co=e=>t=>"string"==typeof t&&t.startsWith(e),Ao=Co("--"),Eo=Co("var(--"),Po=e=>!!Eo(e)&&No.test(e.split("/*")[0].trim()),No=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ro=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Do(e,t,n=1){const[i,r]=function(e){const t=Ro.exec(e);if(!t)return[,];const[,n,i,r]=t;return[`--${null!=n?n:i}`,r]}(e);if(!i)return;const o=window.getComputedStyle(t).getPropertyValue(i);if(o){const e=o.trim();return So(e)?parseFloat(e):e}return Po(r)?Do(r,t,n+1):r}const Mo=(e,t,n)=>n>t?t:n<e?e:n,Oo={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Lo={...Oo,transform:e=>Mo(0,1,e)},Vo={...Oo,default:1},jo=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Io=jo("deg"),Uo=jo("%"),Fo=jo("px"),Bo=jo("vh"),zo=jo("vw"),$o={...Uo,parse:e=>Uo.parse(e)/100,transform:e=>Uo.transform(100*e)},Ho=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),qo=e=>e===Oo||e===Fo,Wo=(e,t)=>parseFloat(e.split(", ")[t]),Ko=(e,t)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/u);if(r)return Wo(r[1],t);{const t=i.match(/^matrix\((.+)\)$/u);return t?Wo(t[1],e):0}},Yo=new Set(["x","y","z"]),Xo=Hr.filter((e=>!Yo.has(e)));const Go={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Ko(4,13),y:Ko(5,14)};Go.translateX=Go.x,Go.translateY=Go.y;const Jo=e=>t=>t.test(e),Zo=[Oo,Fo,Uo,Io,zo,Bo,{test:e=>"auto"===e,parse:e=>e}],Qo=e=>Zo.find(Jo(e)),es=new Set;let ts=!1,ns=!1;function is(){if(ns){const e=Array.from(es).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return Xo.forEach((n=>{const i=e.getValue(n);void 0!==i&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var i;null===(i=e.getValue(t))||void 0===i||i.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}ns=!1,ts=!1,es.forEach((e=>e.complete())),es.clear()}function rs(){es.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(ns=!0)}))}class os{constructor(e,t,n,i,r,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(es.add(this),ts||(ts=!0,oo.read(rs),oo.resolveKeyframes(is))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:i}=this;for(let r=0;r<e.length;r++)if(null===e[r])if(0===r){const r=null==i?void 0:i.get(),o=e[e.length-1];if(void 0!==r)e[0]=r;else if(n&&t){const i=n.readValue(t,o);null!=i&&(e[0]=i)}void 0===e[0]&&(e[0]=o),i&&void 0===r&&i.set(e[0])}else e[r]=e[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),es.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,es.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ss=e=>Math.round(1e5*e)/1e5,as=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const ls=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,cs=(e,t)=>n=>Boolean("string"==typeof n&&ls.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),ds=(e,t,n)=>i=>{if("string"!=typeof i)return i;const[r,o,s,a]=i.match(as);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},us={...Oo,transform:e=>Math.round((e=>Mo(0,255,e))(e))},hs={test:cs("rgb","red"),parse:ds("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+us.transform(e)+", "+us.transform(t)+", "+us.transform(n)+", "+ss(Lo.transform(i))+")"};const ps={test:cs("#"),parse:function(e){let t="",n="",i="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}},transform:hs.transform},ms={test:cs("hsl","hue"),parse:ds("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+Uo.transform(ss(t))+", "+Uo.transform(ss(n))+", "+ss(Lo.transform(i))+")"},fs={test:e=>hs.test(e)||ps.test(e)||ms.test(e),parse:e=>hs.test(e)?hs.parse(e):ms.test(e)?ms.parse(e):ps.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?hs.transform(e):ms.transform(e)},gs=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const ys="number",vs="color",bs="var",ws="var(",xs="${}",_s=/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 ks(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},r=[];let o=0;const s=t.replace(_s,(e=>(fs.test(e)?(i.color.push(o),r.push(vs),n.push(fs.parse(e))):e.startsWith(ws)?(i.var.push(o),r.push(bs),n.push(e)):(i.number.push(o),r.push(ys),n.push(parseFloat(e))),++o,xs))).split(xs);return{values:n,split:s,indexes:i,types:r}}function Ts(e){return ks(e).values}function Ss(e){const{split:t,types:n}=ks(e),i=t.length;return e=>{let r="";for(let o=0;o<i;o++)if(r+=t[o],void 0!==e[o]){const t=n[o];r+=t===ys?ss(e[o]):t===vs?fs.transform(e[o]):e[o]}return r}}const Cs=e=>"number"==typeof e?0:e;const As={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(as))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(gs))||void 0===n?void 0:n.length)||0)>0},parse:Ts,createTransformer:Ss,getAnimatableNone:function(e){const t=Ts(e);return Ss(e)(t.map(Cs))}},Es=new Set(["brightness","contrast","saturate","opacity"]);function Ps(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[i]=n.match(as)||[];if(!i)return e;const r=n.replace(i,"");let o=Es.has(t)?1:0;return i!==n&&(o*=100),t+"("+o+r+")"}const Ns=/\b([a-z-]*)\(.*?\)/gu,Rs={...As,getAnimatableNone:e=>{const t=e.match(Ns);return t?t.map(Ps).join(" "):e}},Ds={borderWidth:Fo,borderTopWidth:Fo,borderRightWidth:Fo,borderBottomWidth:Fo,borderLeftWidth:Fo,borderRadius:Fo,radius:Fo,borderTopLeftRadius:Fo,borderTopRightRadius:Fo,borderBottomRightRadius:Fo,borderBottomLeftRadius:Fo,width:Fo,maxWidth:Fo,height:Fo,maxHeight:Fo,top:Fo,right:Fo,bottom:Fo,left:Fo,padding:Fo,paddingTop:Fo,paddingRight:Fo,paddingBottom:Fo,paddingLeft:Fo,margin:Fo,marginTop:Fo,marginRight:Fo,marginBottom:Fo,marginLeft:Fo,backgroundPositionX:Fo,backgroundPositionY:Fo},Ms={rotate:Io,rotateX:Io,rotateY:Io,rotateZ:Io,scale:Vo,scaleX:Vo,scaleY:Vo,scaleZ:Vo,skew:Io,skewX:Io,skewY:Io,distance:Fo,translateX:Fo,translateY:Fo,translateZ:Fo,x:Fo,y:Fo,z:Fo,perspective:Fo,transformPerspective:Fo,opacity:Lo,originX:$o,originY:$o,originZ:Fo},Os={...Oo,transform:Math.round},Ls={...Ds,...Ms,zIndex:Os,size:Fo,fillOpacity:Lo,strokeOpacity:Lo,numOctaves:Os},Vs={...Ls,color:fs,backgroundColor:fs,outlineColor:fs,fill:fs,stroke:fs,borderColor:fs,borderTopColor:fs,borderRightColor:fs,borderBottomColor:fs,borderLeftColor:fs,filter:Rs,WebkitFilter:Rs},js=e=>Vs[e];function Is(e,t){let n=js(e);return n!==Rs&&(n=As),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Us=new Set(["auto","none","0"]);class Fs extends os{constructor(e,t,n,i,r){super(e,t,n,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let a=0;a<e.length;a++){let n=e[a];if("string"==typeof n&&(n=n.trim(),Po(n))){const i=Do(n,t.current);void 0!==i&&(e[a]=i),a===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!Ho.has(n)||2!==e.length)return;const[i,r]=e,o=Qo(i),s=Qo(r);if(o!==s)if(qo(o)&&qo(s))for(let a=0;a<e.length;a++){const t=e[a];"string"==typeof t&&(e[a]=parseFloat(t))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)("number"==typeof(i=e[r])?0===i:null===i||"none"===i||"0"===i||ko(i))&&n.push(r);var i;n.length&&function(e,t,n){let i,r=0;for(;r<e.length&&!i;){const t=e[r];"string"==typeof t&&!Us.has(t)&&ks(t).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=Is(n,i)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Go[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const i=t[t.length-1];void 0!==i&&e.getValue(n,i).jump(i,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,s=i[o];i[o]=Go[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}function Bs(e){return"function"==typeof e}let zs;function $s(){zs=void 0}const Hs={now:()=>(void 0===zs&&Hs.set(ao.isProcessing||Qr?ao.timestamp:performance.now()),zs),set:e=>{zs=e,queueMicrotask($s)}},qs=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!As.test(e)&&"0"!==e||e.startsWith("url(")));class Ws{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Hs.now(),this.options={autoplay:e,delay:t,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||(rs(),is()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=Hs.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:r,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(e,t,n,i){const r=e[0];if(null===r)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],s=qs(r,t),a=qs(o,t);return!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||Bs(n))&&i)}(e,n,i,r)){if(!o)return null==a||a(to(e,this.options,t)),null==s||s(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}function Ks(e,t){return t?e*(1e3/t):0}const Ys=5;function Xs(e,t,n){const i=Math.max(t-Ys,0);return Ks(n-e(i),t-i)}const Gs=.001,Js=.01,Zs=10,Qs=.05,ea=1;function ta({duration:e=800,bounce:t=.25,velocity:n=0,mass:i=1}){let r,o,s=1-t;s=Mo(Qs,ea,s),e=Mo(Js,Zs,Kr(e)),s<1?(r=t=>{const i=t*s,r=i*e,o=i-n,a=ia(t,s),l=Math.exp(-r);return Gs-o/a*l},o=t=>{const i=t*s*e,o=i*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-i),c=ia(Math.pow(t,2),s);return(-r(t)+Gs>0?-1:1)*((o-a)*l)/c}):(r=t=>Math.exp(-t*e)*((t-n)*e+1)-Gs,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let i=n;for(let r=1;r<na;r++)i-=e(i)/t(i);return i}(r,o,5/e);if(e=Wr(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(a,2)*i;return{stiffness:t,damping:2*s*Math.sqrt(i*t),duration:e}}}const na=12;function ia(e,t){return e*Math.sqrt(1-t*t)}const ra=["duration","bounce"],oa=["stiffness","damping","mass"];function sa(e,t){return t.some((t=>void 0!==e[t]))}function aa({keyframes:e,restDelta:t,restSpeed:n,...i}){const r=e[0],o=e[e.length-1],s={done:!1,value:r},{stiffness:a,damping:l,mass:c,duration:d,velocity:u,isResolvedFromDuration:h}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!sa(e,oa)&&sa(e,ra)){const n=ta(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...i,velocity:-Kr(i.velocity||0)}),p=u||0,m=l/(2*Math.sqrt(a*c)),f=o-r,g=Kr(Math.sqrt(a/c)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),t||(t=y?.005:.5),m<1){const e=ia(g,m);v=t=>{const n=Math.exp(-m*g*t);return o-n*((p+m*g*f)/e*Math.sin(e*t)+f*Math.cos(e*t))}}else if(1===m)v=e=>o-Math.exp(-g*e)*(f+(p+g*f)*e);else{const e=g*Math.sqrt(m*m-1);v=t=>{const n=Math.exp(-m*g*t),i=Math.min(e*t,300);return o-n*((p+m*g*f)*Math.sinh(i)+e*f*Math.cosh(i))/e}}return{calculatedDuration:h&&d||null,next:e=>{const i=v(e);if(h)s.done=e>=d;else{let r=0;m<1&&(r=0===e?Wr(p):Xs(v,e,i));const a=Math.abs(r)<=n,l=Math.abs(o-i)<=t;s.done=a&&l}return s.value=s.done?o:i,s}}}function la({keyframes:e,velocity:t=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=e[0],h={done:!1,value:u},p=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let m=n*t;const f=u+m,g=void 0===s?f:s(f);g!==f&&(m=g-u);const y=e=>-m*Math.exp(-e/i),v=e=>g+y(e),b=e=>{const t=y(e),n=v(e);h.done=Math.abs(t)<=c,h.value=h.done?g:n};let w,x;const _=e=>{var t;(t=h.value,void 0!==a&&t<a||void 0!==l&&t>l)&&(w=e,x=aa({keyframes:[h.value,p(h.value)],velocity:Xs(v,e,h.value),damping:r,stiffness:o,restDelta:c,restSpeed:d}))};return _(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==w||(t=!0,b(e),_(e)),void 0!==w&&e>=w?x.next(e-w):(!t&&b(e),h)}}}const ca=po(.42,0,1,1),da=po(0,0,.58,1),ua=po(.42,0,.58,1),ha=e=>Array.isArray(e)&&"number"==typeof e[0],pa={linear:no,easeIn:ca,easeInOut:ua,easeOut:da,circIn:wo,circInOut:_o,circOut:xo,backIn:yo,backInOut:vo,backOut:go,anticipate:bo},ma=e=>{if(ha(e)){To(4===e.length);const[t,n,i,r]=e;return po(t,n,i,r)}return"string"==typeof e?pa[e]:e},fa=(e,t)=>n=>t(e(n)),ga=(...e)=>e.reduce(fa),ya=(e,t,n)=>{const i=t-e;return 0===i?1:(n-e)/i},va=(e,t,n)=>e+(t-e)*n;function ba(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function wa(e,t){return n=>n>0?t:e}const xa=(e,t,n)=>{const i=e*e,r=n*(t*t-i)+i;return r<0?0:Math.sqrt(r)},_a=[ps,hs,ms];function ka(e){const t=(n=e,_a.find((e=>e.test(n))));var n;if(!Boolean(t))return!1;let i=t.parse(e);return t===ms&&(i=function({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,n/=100;let r=0,o=0,s=0;if(t/=100){const i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;r=ba(a,i,e+1/3),o=ba(a,i,e),s=ba(a,i,e-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 Ta=(e,t)=>{const n=ka(e),i=ka(t);if(!n||!i)return wa(e,t);const r={...n};return e=>(r.red=xa(n.red,i.red,e),r.green=xa(n.green,i.green,e),r.blue=xa(n.blue,i.blue,e),r.alpha=va(n.alpha,i.alpha,e),hs.transform(r))},Sa=new Set(["none","hidden"]);function Ca(e,t){return n=>va(e,t,n)}function Aa(e){return"number"==typeof e?Ca:"string"==typeof e?Po(e)?wa:fs.test(e)?Ta:Na:Array.isArray(e)?Ea:"object"==typeof e?fs.test(e)?Ta:Pa:wa}function Ea(e,t){const n=[...e],i=n.length,r=e.map(((e,n)=>Aa(e)(e,t[n])));return e=>{for(let t=0;t<i;t++)n[t]=r[t](e);return n}}function Pa(e,t){const n={...e,...t},i={};for(const r in n)void 0!==e[r]&&void 0!==t[r]&&(i[r]=Aa(e[r])(e[r],t[r]));return e=>{for(const t in i)n[t]=i[t](e);return n}}const Na=(e,t)=>{const n=As.createTransformer(t),i=ks(e),r=ks(t);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?Sa.has(e)&&!r.values.length||Sa.has(t)&&!i.values.length?function(e,t){return Sa.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):ga(Ea(function(e,t){var n;const i=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],a=e.indexes[s][r[s]],l=null!==(n=e.values[a])&&void 0!==n?n:0;i[o]=l,r[s]++}return i}(i,r),r.values),n):wa(e,t)};function Ra(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return va(e,t,n);return Aa(e)(e,t)}function Da(e,t,{clamp:n=!0,ease:i,mixer:r}={}){const o=e.length;if(To(o===t.length),1===o)return()=>t[0];if(2===o&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const i=[],r=n||Ra,o=e.length-1;for(let s=0;s<o;s++){let n=r(e[s],e[s+1]);if(t){const e=Array.isArray(t)?t[s]||no:t;n=ga(e,n)}i.push(n)}return i}(t,i,r),a=s.length,l=t=>{let n=0;if(a>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const i=ya(e[n],e[n+1],t);return s[n](i)};return n?t=>l(Mo(e[0],e[o-1],t)):l}function Ma(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const r=ya(0,t,i);e.push(va(n,1,r))}}(t,e.length-1),t}function Oa({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const r=(e=>Array.isArray(e)&&"number"!=typeof e[0])(i)?i.map(ma):ma(i),o={done:!1,value:t[0]},s=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:Ma(t),e),a=Da(s,t,{ease:Array.isArray(r)?r:(l=t,c=r,l.map((()=>c||ua)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(o.value=a(t),o.done=t>=e,o)}}const La=e=>{const t=({timestamp:t})=>e(t);return{start:()=>oo.update(t,!0),stop:()=>so(t),now:()=>ao.isProcessing?ao.timestamp:Hs.now()}},Va={decay:la,inertia:la,tween:Oa,keyframes:Oa,spring:aa},ja=e=>e/100;class Ia extends Ws{constructor(e){super(e),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:e}=this.options;e&&e()};const{name:t,motionValue:n,element:i,keyframes:r}=this.options,o=(null==i?void 0:i.KeyframeResolver)||os;this.resolver=new o(r,((e,t)=>this.onKeyframesResolved(e,t)),t,n,i),this.resolver.scheduleResolve()}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=this.options,s=Bs(t)?t:Va[t]||Oa;let a,l;s!==Oa&&"number"!=typeof e[0]&&(a=ga(ja,Ra(e[0],e[1])),e=[0,100]);const c=s({...this.options,keyframes:e});"mirror"===r&&(l=s({...this.options,keyframes:[...e].reverse(),velocity:-o})),null===c.calculatedDuration&&(c.calculatedDuration=function(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}(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:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.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,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-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 e=Math.min(this.currentTime,c)/d;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,h+1);Boolean(t%2)&&("reverse"===p?(n=1-n,m&&(n-=m/d)):"mirror"===p&&(b=o)),v=Mo(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=to(a,this.options,i)),f&&f(w.value),_&&this.finish(),w}get duration(){const{resolved:e}=this;return e?Kr(e.calculatedDuration):0}get time(){return Kr(this.currentTime)}set time(e){e=Wr(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Kr(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=La,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();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 e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e: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:e}=this.options;e&&e()}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(e){return this.startTime=0,this.tick(e,!0)}}const Ua=new Set(["opacity","clipPath","filter","transform"]),Fa=(e,t)=>{let n="";const i=Math.max(Math.round(t/10),2);for(let r=0;r<i;r++)n+=e(ya(0,i-1,r))+", ";return`linear(${n.substring(0,n.length-2)})`};function Ba(e){let t;return()=>(void 0===t&&(t=e()),t)}const za={linearEasing:void 0};function $a(e,t){const n=Ba(e);return()=>{var e;return null!==(e=za[t])&&void 0!==e?e:n()}}const Ha=$a((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}),"linearEasing");function qa(e){return Boolean("function"==typeof e&&Ha()||!e||"string"==typeof e&&(e in Ka||Ha())||ha(e)||Array.isArray(e)&&e.every(qa))}const Wa=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,Ka={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wa([0,.65,.55,1]),circOut:Wa([.55,0,1,.45]),backIn:Wa([.31,.01,.66,-.59]),backOut:Wa([.33,1.53,.69,.99])};function Ya(e,t){return e?"function"==typeof e&&Ha()?Fa(e,t):ha(e)?Wa(e):Array.isArray(e)?e.map((e=>Ya(e,t)||Ka.easeOut)):Ka[e]:void 0}function Xa(e,t,n,{delay:i=0,duration:r=300,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const d=Ya(a,r);return Array.isArray(d)&&(c.easing=d),e.animate(c,{delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"})}function Ga(e,t){e.timeline=t,e.onfinish=null}const Ja=Ba((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));const Za={anticipate:bo,backInOut:vo,circInOut:_o};class Qa extends Ws{constructor(e){super(e);const{name:t,motionValue:n,element:i,keyframes:r}=this.options;this.resolver=new Fs(r,((e,t)=>this.onKeyframesResolved(e,t)),t,n,i),this.resolver.scheduleResolve()}initPlayback(e,t){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&&Ha()&&o in Za&&(o=Za[o]),Bs((d=this.options).type)||"spring"===d.type||!qa(d.ease)){const{onComplete:t,onUpdate:n,motionValue:a,element:l,...c}=this.options,d=function(e,t){const n=new Ia({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:e[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"}}(e,c);1===(e=d.keyframes).length&&(e[1]=e[0]),i=d.duration,r=d.times,o=d.ease,s="keyframes"}const u=Xa(a.owner.current,l,e,{...this.options,duration:i,times:r,ease:o});return u.startTime=null!=c?c:this.calcStartTime(),this.pendingTimeline?(Ga(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;a.set(to(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:i,times:r,type:s,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return Kr(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return Kr(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=Wr(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return no;const{animation:n}=t;Ga(n,e)}else this.pendingTimeline=e;return no}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:i,type:r,ease:o,times:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:a,element:l,...c}=this.options,d=new Ia({...c,keyframes:n,duration:i,type:r,ease:o,times:s,isGenerator:!0}),u=Wr(this.time);e.setWithVelocity(d.sample(u-10).value,d.sample(u).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:r,damping:o,type:s}=e;return Ja()&&n&&Ua.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!i&&"mirror"!==r&&0!==o&&"inertia"!==s}}const el=Ba((()=>void 0!==window.ScrollTimeline));class tl{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map((n=>el()&&n.attachTimeline?n.attachTimeline(e):t(n)));return()=>{n.forEach(((e,t)=>{e&&e(),this.animations[t].stop()}))}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach((t=>t[e]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const nl=(e,t,n,i={},r,o)=>s=>{const a=Zr(i,e)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=Wr(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:r};(function({when:e,delay:t,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,...Jr(e,d)}),d.duration&&(d.duration=Wr(d.duration)),d.repeatDelay&&(d.repeatDelay=Wr(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!==t.get()){const e=to(d.keyframes,a);if(void 0!==e)return oo.update((()=>{d.onUpdate(e),d.onComplete()})),new tl([])}return!o&&Qa.supports(d)?new Qa(d):new Ia(d)},il=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),rl=e=>Vr(e)?e[e.length-1]||0:e;function ol(e,t){-1===e.indexOf(t)&&e.push(t)}function sl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class al{constructor(){this.subscriptions=[]}add(e){return ol(this.subscriptions,e),()=>sl(this.subscriptions,e)}notify(e,t,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](e,t,n);else for(let r=0;r<i;r++){const i=this.subscriptions[r];i&&i(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class ll{constructor(e,t={}){this.version="11.11.11",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=Hs.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Hs.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new al);const n=this.events[e].add(t);return"change"===e?()=>{n(),oo.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Hs.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Ks(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),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 cl(e,t){return new ll(e,t)}function dl(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,cl(n))}const ul=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),hl="data-"+ul("framerAppearId");function pl(e){return e.props[hl]}const ml=e=>Boolean(e&&e.getVelocity);function fl(e,t){const n=e.getValue("willChange");if(i=n,Boolean(ml(i)&&i.add))return n.add(t);var i}function gl({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,i}function yl(e,t,{delay:n=0,transitionOverride:i,type:r}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;i&&(s=i);const c=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const u in l){const t=e.getValue(u,null!==(o=e.latestValues[u])&&void 0!==o?o:null),i=l[u];if(void 0===i||d&&gl(d,u))continue;const r={delay:n,...Zr(s||{},u)};let a=!1;if(window.MotionHandoffAnimation){const t=pl(e);if(t){const e=window.MotionHandoffAnimation(t,u,oo);null!==e&&(r.startTime=e,a=!0)}}fl(e,u),t.start(nl(u,t,i,e.shouldReduceMotion&&qr.has(u)?{type:!1}:r,e,a));const h=t.animation;h&&c.push(h)}return a&&Promise.all(c).then((()=>{oo.update((()=>{a&&function(e,t){const n=Br(e,t);let{transitionEnd:i={},transition:r={},...o}=n||{};o={...o,...i};for(const s in o)dl(e,s,rl(o[s]))}(e,a)}))})),c}function vl(e,t,n={}){var i;const r=Br(e,t,"exit"===n.type?null===(i=e.presenceContext)||void 0===i?void 0:i.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(yl(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(i=0)=>{const{delayChildren:r=0,staggerChildren:s,staggerDirection:a}=o;return function(e,t,n=0,i=0,r=1,o){const s=[],a=(e.variantChildren.size-1)*i,l=1===r?(e=0)=>e*i:(e=0)=>a-e*i;return Array.from(e.variantChildren).sort(bl).forEach(((e,i)=>{e.notify("AnimationStart",t),s.push(vl(e,t,{...o,delay:n+l(i)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(s)}(e,t,r+i,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then((()=>t()))}return Promise.all([s(),a(n.delay)])}function bl(e,t){return e.sortNodePosition(t)}const wl=$r.length;function xl(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&xl(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<wl;n++){const i=$r[n],r=e.props[i];(Ir(r)||!1===r)&&(t[i]=r)}return t}const _l=[...zr].reverse(),kl=zr.length;function Tl(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let i;if(e.notify("AnimationStart",t),Array.isArray(t)){const r=t.map((t=>vl(e,t,n)));i=Promise.all(r)}else if("string"==typeof t)i=vl(e,t,n);else{const r="function"==typeof t?Br(e,t,n.custom):t;i=Promise.all(yl(e,r,n))}return i.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}function Sl(e){let t=Tl(e),n=El(),i=!0;const r=t=>(n,i)=>{var r;const o=Br(e,i,"exit"===t?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);if(o){const{transition:e,transitionEnd:t,...i}=o;n={...n,...i,...t}}return n};function o(o){const{props:s}=e,a=xl(e.parent)||{},l=[],c=new Set;let d={},u=1/0;for(let t=0;t<kl;t++){const h=_l[t],p=n[h],m=void 0!==s[h]?s[h]:a[h],f=Ir(m),g=h===o?p.isActive:null;!1===g&&(u=t);let y=m===a[h]&&m!==s[h]&&f;if(y&&i&&e.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...d},!p.isActive&&null===g||!m&&!p.prevProp||Lr(m)||"boolean"==typeof m)continue;const v=Cl(p.prevProp,m);let b=v||h===o&&p.isActive&&!y&&f||t>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=t=>{b=!0,c.has(t)&&(w=!0,c.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in T){const t=_[e],n=k[e];if(d.hasOwnProperty(e))continue;let i=!1;i=Vr(t)&&Vr(n)?!jr(t,n):t!==n,i?null!=t?S(e):c.add(e):void 0!==t&&c.has(e)?S(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=_,p.isActive&&(d={...d,..._}),i&&e.blockInitialAnimation&&(b=!1);b&&(!(y&&v)||w)&&l.push(...x.map((e=>({animation:e,options:{type:h}}))))}if(c.size){const t={};c.forEach((n=>{const i=e.getBaseTarget(n),r=e.getValue(n);r&&(r.liveStyle=!0),t[n]=null!=i?i:null})),l.push({animation:t})}let h=Boolean(l.length);return!i||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(h=!1),i=!1,h?t(l):Promise.resolve()}return{animateChanges:o,setActive:function(t,i){var r;if(n[t].isActive===i)return Promise.resolve();null===(r=e.variantChildren)||void 0===r||r.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,i)})),n[t].isActive=i;const s=o(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=El(),i=!0}}}function Cl(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!jr(t,e)}function Al(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function El(){return{animate:Al(!0),whileInView:Al(),whileHover:Al(),whileTap:Al(),whileDrag:Al(),whileFocus:Al(),exit:Al()}}class Pl{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Nl=0;const Rl={animation:{Feature:class extends Pl{constructor(e){super(e),e.animationState||(e.animationState=Sl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Lr(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends Pl{constructor(){super(...arguments),this.id=Nl++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const i=this.node.animationState.setActive("exit",!e);t&&!e&&i.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},Dl=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function Ml(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const Ol=e=>t=>Dl(t)&&e(t,Ml(t));function Ll(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}function Vl(e,t,n,i){return Ll(e,t,Ol(n),i)}const jl=(e,t)=>Math.abs(e-t);class Il{constructor(e,t,{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 e=Bl(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=jl(e.x,t.x),i=jl(e.y,t.y);return Math.sqrt(n**2+i**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:i}=e,{timestamp:r}=ao;this.history.push({...i,timestamp:r});const{onStart:o,onMove:s}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Ul(t,this.transformPagePoint),oo.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Bl("pointercancel"===e.type?this.lastMoveEventInfo:Ul(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),i&&i(e,o)},!Dl(e))return;this.dragSnapToOrigin=r,this.handlers=t,this.transformPagePoint=n,this.contextWindow=i||window;const o=Ul(Ml(e),this.transformPagePoint),{point:s}=o,{timestamp:a}=ao;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,Bl(o,this.history)),this.removeListeners=ga(Vl(this.contextWindow,"pointermove",this.handlePointerMove),Vl(this.contextWindow,"pointerup",this.handlePointerUp),Vl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),so(this.updatePoint)}}function Ul(e,t){return t?{point:t(e.point)}:e}function Fl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Bl({point:e},t){return{point:e,delta:Fl(e,$l(t)),offset:Fl(e,zl(t)),velocity:Hl(t,.1)}}function zl(e){return e[0]}function $l(e){return e[e.length-1]}function Hl(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const r=$l(e);for(;n>=0&&(i=e[n],!(r.timestamp-i.timestamp>Wr(t)));)n--;if(!i)return{x:0,y:0};const o=Kr(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 ql(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const Wl=ql("dragHorizontal"),Kl=ql("dragVertical");function Yl(e){let t=!1;if("y"===e)t=Kl();else if("x"===e)t=Wl();else{const e=Wl(),n=Kl();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function Xl(){const e=Yl(!0);return!e||(e(),!1)}function Gl(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}const Jl=.9999,Zl=1.0001,Ql=-.01,ec=.01;function tc(e){return e.max-e.min}function nc(e,t,n,i=.5){e.origin=i,e.originPoint=va(t.min,t.max,e.origin),e.scale=tc(n)/tc(t),e.translate=va(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Jl&&e.scale<=Zl||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ql&&e.translate<=ec||isNaN(e.translate))&&(e.translate=0)}function ic(e,t,n,i){nc(e.x,t.x,n.x,i?i.originX:void 0),nc(e.y,t.y,n.y,i?i.originY:void 0)}function rc(e,t,n){e.min=n.min+t.min,e.max=e.min+tc(t)}function oc(e,t,n){e.min=t.min-n.min,e.max=e.min+tc(t)}function sc(e,t,n){oc(e.x,t.x,n.x),oc(e.y,t.y,n.y)}function ac(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function lc(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}const cc=.35;function dc(e,t,n){return{min:uc(e,t),max:uc(e,n)}}function uc(e,t){return"number"==typeof e?e:e[t]||0}const hc=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),pc=()=>({x:{min:0,max:0},y:{min:0,max:0}});function mc(e){return[e("x"),e("y")]}function fc({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function gc(e){return void 0===e||1===e}function yc({scale:e,scaleX:t,scaleY:n}){return!gc(e)||!gc(t)||!gc(n)}function vc(e){return yc(e)||bc(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function bc(e){return wc(e.x)||wc(e.y)}function wc(e){return e&&"0%"!==e}function xc(e,t,n){return n+t*(e-n)}function _c(e,t,n,i,r){return void 0!==r&&(e=xc(e,r,i)),xc(e,n,i)+t}function kc(e,t=0,n=1,i,r){e.min=_c(e.min,t,n,i,r),e.max=_c(e.max,t,n,i,r)}function Tc(e,{x:t,y:n}){kc(e.x,t.translate,t.scale,t.originPoint),kc(e.y,n.translate,n.scale,n.originPoint)}const Sc=.999999999999,Cc=1.0000000000001;function Ac(e,t){e.min=e.min+t,e.max=e.max+t}function Ec(e,t,n,i,r=.5){kc(e,t,n,va(e.min,e.max,r),i)}function Pc(e,t){Ec(e.x,t.x,t.scaleX,t.scale,t.originX),Ec(e.y,t.y,t.scaleY,t.scale,t.originY)}function Nc(e,t){return fc(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(e.getBoundingClientRect(),t))}const Rc=({current:e})=>e?e.ownerDocument.defaultView:null,Dc=new WeakMap;class Mc{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=pc(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new Il(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Ml(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:i,onDragStart:r}=this.getProps();if(n&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Yl(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),mc((e=>{let t=this.getAxisMotionValue(e).get()||0;if(Uo.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[e];if(i){t=tc(i)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),r&&oo.postRender((()=>r(e,t))),fl(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:r,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=t;if(i&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(s),void(null!==this.currentDirection&&r&&r(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>mc((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:Rc(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=t;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&oo.postRender((()=>r(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:i}=this.getProps();if(!n||!Oc(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},i){return void 0!==t&&e<t?e=i?va(t,e,i.min):Math.max(e,t):void 0!==n&&e>n&&(e=i?va(n,e,i.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,r=this.constraints;t&&Gl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!i)&&function(e,{top:t,left:n,bottom:i,right:r}){return{x:ac(e.x,n,r),y:ac(e.y,t,i)}}(i.layoutBox,t),this.elastic=function(e=cc){return!1===e?e=0:!0===e&&(e=cc),{x:dc(e,"left","right"),y:dc(e,"top","bottom")}}(n),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&mc((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(i.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Gl(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=function(e,t,n){const i=Nc(e,n),{scroll:r}=t;return r&&(Ac(i.x,r.offset.x),Ac(i.y,r.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:lc(e.x,t.x),y:lc(e.y,t.y)}}(i.layout.layoutBox,r);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=fc(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=mc((s=>{if(!Oc(s,t,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?e[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(e,t){const n=this.getAxisMotionValue(e);return fl(this.visualElement,e),n.start(nl(e,n,0,t,this.visualElement,!1))}stopAnimation(){mc((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){mc((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),i=n[t];return i||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){mc((t=>{const{drag:n}=this.getProps();if(!Oc(t,n,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(t);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[t];r.set(e[t]-va(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Gl(t)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};mc((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();i[e]=function(e,t){let n=.5;const i=tc(e),r=tc(t);return r>i?n=ya(t.min,t.max-i,e.min):i>r&&(n=ya(e.min,e.max-r,t.min)),Mo(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),mc((t=>{if(!Oc(t,e,null))return;const n=this.getAxisMotionValue(t),{min:r,max:o}=this.constraints[t];n.set(va(r,o,i[t]))}))}addListeners(){if(!this.visualElement.current)return;Dc.set(this.visualElement,this);const e=Vl(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Gl(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),oo.read(t);const r=Ll(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(mc((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{r(),e(),i(),o&&o()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=cc,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:s}}}function Oc(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Lc=e=>(t,n)=>{e&&oo.postRender((()=>e(t,n)))};const Vc=F(null);function jc(){const e=ue(Vc);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:i}=e,r=function(){var e=re(H++,11);if(!e.__){for(var t=q.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}();se((()=>i(r)),[]);const o=de((()=>n&&n(r)),[r,n]);return!t&&n?[!1,o]:[!0]}const Ic=F({}),Uc=F({}),Fc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Bc(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const zc={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Fo.test(e))return e;e=parseFloat(e)}return`${Bc(e,t.target.x)}% ${Bc(e,t.target.y)}%`}},$c={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,r=As.parse(e);if(r.length>5)return i;const o=As.createTransformer(e),s="number"!=typeof r[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;r[0+s]/=a,r[1+s]/=l;const c=va(a,l,.5);return"number"==typeof r[2+s]&&(r[2+s]/=c),"number"==typeof r[3+s]&&(r[3+s]/=c),o(r)}},Hc={};const{schedule:qc}=ro(queueMicrotask,!1);class Wc extends w{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:i}=this.props,{projection:r}=e;var o;o=Yc,Object.assign(Hc,o),r&&(t.group&&t.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()})),Fc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:i,isPresent:r}=this.props,o=n.projection;return o?(o.isPresent=r,i||e.layoutDependency!==t||void 0===t?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||oo.postRender((()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),qc.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Kc(e){const[t,n]=jc(),i=ue(Ic);return z(Wc,{...e,layoutGroup:i,switchLayoutGroup:ue(Uc),isPresent:t,safeToRemove:n})}const Yc={borderRadius:{...zc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zc,borderTopRightRadius:zc,borderBottomLeftRadius:zc,borderBottomRightRadius:zc,boxShadow:$c},Xc=["TopLeft","TopRight","BottomLeft","BottomRight"],Gc=Xc.length,Jc=e=>"string"==typeof e?parseFloat(e):e,Zc=e=>"number"==typeof e||Fo.test(e);function Qc(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const ed=nd(0,.5,xo),td=nd(.5,.95,no);function nd(e,t,n){return i=>i<e?0:i>t?1:n(ya(e,t,i))}function id(e,t){e.min=t.min,e.max=t.max}function rd(e,t){id(e.x,t.x),id(e.y,t.y)}function od(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function sd(e,t,n,i,r){return e=xc(e-=t,1/n,i),void 0!==r&&(e=xc(e,1/r,i)),e}function ad(e,t,[n,i,r],o,s){!function(e,t=0,n=1,i=.5,r,o=e,s=e){Uo.test(t)&&(t=parseFloat(t),t=va(s.min,s.max,t/100)-s.min);if("number"!=typeof t)return;let a=va(o.min,o.max,i);e===o&&(a-=t),e.min=sd(e.min,t,n,a,r),e.max=sd(e.max,t,n,a,r)}(e,t[n],t[i],t[r],t.scale,o,s)}const ld=["x","scaleX","originX"],cd=["y","scaleY","originY"];function dd(e,t,n,i){ad(e.x,t,ld,n?n.x:void 0,i?i.x:void 0),ad(e.y,t,cd,n?n.y:void 0,i?i.y:void 0)}function ud(e){return 0===e.translate&&1===e.scale}function hd(e){return ud(e.x)&&ud(e.y)}function pd(e,t){return e.min===t.min&&e.max===t.max}function md(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function fd(e,t){return md(e.x,t.x)&&md(e.y,t.y)}function gd(e){return tc(e.x)/tc(e.y)}function yd(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class vd{constructor(){this.members=[]}add(e){ol(this.members,e),e.scheduleRender()}remove(e){if(sl(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let i=t;i>=0;i--){const e=this.members[i];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const bd=(e,t)=>e.depth-t.depth;class wd{constructor(){this.children=[],this.isDirty=!1}add(e){ol(this.children,e),this.isDirty=!0}remove(e){sl(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(bd),this.isDirty=!1,this.children.forEach(e)}}function xd(e){const t=ml(e)?e.get():e;return il(t)?t.toValue():t}const _d={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},kd="undefined"!=typeof window&&void 0!==window.MotionDebug,Td=["","X","Y","Z"],Sd={visibility:"hidden"};let Cd=0;function Ad(e,t,n,i){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),i&&(i[e]=0))}function Ed(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=pl(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",oo,!(t||i))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&Ed(i)}function Pd({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=Cd++,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,kd&&(_d.totalNodes=_d.resolvedTargetDeltas=_d.recalculatedProjection=0),this.nodes.forEach(Dd),this.nodes.forEach(Ud),this.nodes.forEach(Fd),this.nodes.forEach(Md),kd&&window.MotionDebug.record(_d)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,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 t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new wd)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new al),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var i;this.isSVG=(i=t)instanceof SVGElement&&"svg"!==i.tagName,this.instance=t;const{layoutId:r,layout:o,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||r)&&(this.isLayoutDirty=!0),e){let n;const i=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Hs.now(),i=({timestamp:r})=>{const o=r-n;o>=t&&(so(i),e(o-t))};return oo.read(i,!0),()=>so(i)}(i,250),Fc.hasAnimatedSinceResize&&(Fc.hasAnimatedSinceResize=!1,this.nodes.forEach(Id))}))}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&s&&(r||o)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const r=this.options.transition||s.getDefaultTransition()||Wd,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!fd(this.targetLayout,i)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...Zr(r,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Id(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,so(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(Bd),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ed(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let r=0;r<this.path.length;r++){const e=this.path[r];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Ld);this.isUpdating||this.nodes.forEach(Vd),this.isUpdating=!1,this.nodes.forEach(jd),this.nodes.forEach(Nd),this.nodes.forEach(Rd),this.clearAllSnapshots();const e=Hs.now();ao.delta=Mo(0,1e3/60,e-ao.timestamp),ao.timestamp=e,ao.isProcessing=!0,lo.update.process(ao),lo.preRender.process(ao),lo.render.process(ao),ao.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,qc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Od),this.sharedNodes.forEach(zd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,oo.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){oo.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 e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=pc(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=i(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!r)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!hd(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;e&&(t||vc(this.latestValues)||o)&&(r(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var i;return e&&(n=this.removeTransform(n)),Xd((i=n).x),Xd(i.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return pc();const n=t.measureViewportBox();if(!((null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)||this.path.some(Jd))){const{scroll:e}=this.root;e&&(Ac(n.x,e.offset.x),Ac(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n=pc();if(rd(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let i=0;i<this.path.length;i++){const t=this.path[i],{scroll:r,options:o}=t;t!==this.root&&r&&o.layoutScroll&&(r.wasRoot&&rd(n,e),Ac(n.x,r.offset.x),Ac(n.y,r.offset.y))}return n}applyTransform(e,t=!1){const n=pc();rd(n,e);for(let i=0;i<this.path.length;i++){const e=this.path[i];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&Pc(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),vc(e.latestValues)&&Pc(n,e.latestValues)}return vc(this.latestValues)&&Pc(n,this.latestValues),n}removeTransform(e){const t=pc();rd(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!vc(e.latestValues))continue;yc(e.latestValues)&&e.updateSnapshot();const i=pc();rd(i,e.measurePageBox()),dd(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,i)}return vc(this.latestValues)&&dd(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.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!==ao.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;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(!(e||i&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:o}=this.options;if(this.layout&&(r||o)){if(this.resolvedRelativeTargetAt=ao.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=pc(),this.relativeTargetOrigin=pc(),sc(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),rd(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=pc(),this.targetWithTransforms=pc()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,rc(s.x,a.x,l.x),rc(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):rd(this.target,this.layout.layoutBox),Tc(this.target,this.targetDelta)):rd(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=pc(),this.relativeTargetOrigin=pc(),sc(this.relativeTargetOrigin,this.target,e.target),rd(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}kd&&_d.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!yc(this.parent.latestValues)&&!bc(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 e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let i=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===ao.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;rd(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,i=!1){const r=n.length;if(!r)return;let o,s;t.x=t.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&&Pc(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Tc(e,s)),i&&vc(o.latestValues)&&Pc(e,o.latestValues))}t.x<Cc&&t.x>Sc&&(t.x=1),t.y<Cc&&t.y>Sc&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms=pc());const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(od(this.prevProjectionDelta.x,this.projectionDelta.x),od(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),ic(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&yd(this.projectionDelta.x,this.prevProjectionDelta.x)&&yd(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),kd&&_d.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=hc(),this.projectionDelta=hc(),this.projectionDeltaWithTransform=hc()}setAnimationOrigin(e,t=!1){const n=this.snapshot,i=n?n.latestValues:{},r={...this.latestValues},o=hc();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s=pc(),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(qd));let u;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,h,p,m,f,g;$d(o.x,e.x,n),$d(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(sc(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=s,g=n,Hd(p.x,m.x,f.x,g),Hd(p.y,m.y,f.y,g),u&&(l=this.relativeTarget,h=u,pd(l.x,h.x)&&pd(l.y,h.y))&&(this.isProjectionDirty=!1),u||(u=pc()),rd(u,this.relativeTarget)),a&&(this.animationValues=r,function(e,t,n,i,r,o){r?(e.opacity=va(0,void 0!==n.opacity?n.opacity:1,ed(i)),e.opacityExit=va(void 0!==t.opacity?t.opacity:1,0,td(i))):o&&(e.opacity=va(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<Gc;s++){const r=`border${Xc[s]}Radius`;let o=Qc(t,r),a=Qc(n,r);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||Zc(o)===Zc(a)?(e[r]=Math.max(va(Jc(o),Jc(a),i),0),(Uo.test(a)||Uo.test(o))&&(e[r]+="%")):e[r]=a)}(t.rotate||n.rotate)&&(e.rotate=va(t.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(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(so(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=oo.update((()=>{Fc.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const i=ml(e)?e:cl(e);return i.start(nl("",i,t,n)),i.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.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 e=this.getStack();e&&e.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 e=this.getLead();let{targetWithTransforms:t,target:n,layout:i,latestValues:r}=e;if(t&&n&&i){if(this!==e&&this.layout&&i&&Gd(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||pc();const t=tc(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const i=tc(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+i}rd(t,n),Pc(t,r),ic(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new vd);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const i={};n.z&&Ad("z",e,i,this.animationValues);for(let r=0;r<Td.length;r++)Ad(`rotate${Td[r]}`,e,i,this.animationValues),Ad(`skew${Td[r]}`,e,i,this.animationValues);e.render();for(const r in i)e.setStaticValue(r,i[r]),this.animationValues&&(this.animationValues[r]=i[r]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Sd;const i={visibility:""},r=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=xd(null==e?void 0:e.pointerEvents)||"",i.transform=r?r(this.latestValues,""):"none",i;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=xd(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!vc(this.latestValues)&&(t.transform=r?r({},""):"none",this.hasProjected=!1),t}const s=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=function(e,t,n){let i="";const r=e.x.translate/t.x,o=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((r||o||s)&&(i=`translate3d(${r}px, ${o}px, ${s}px) `),1===t.x&&1===t.y||(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:r,rotateY:o,skewX:s,skewY:a}=n;e&&(i=`perspective(${e}px) ${i}`),t&&(i+=`rotate(${t}deg) `),r&&(i+=`rotateX(${r}deg) `),o&&(i+=`rotateY(${o}deg) `),s&&(i+=`skewX(${s}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.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!==(t=s.opacity)&&void 0!==t?t: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 Hc){if(void 0===s[c])continue;const{correct:e,applyTo:t}=Hc[c],n="none"===i.transform?s[c]:e(s[c],o);if(t){const e=t.length;for(let r=0;r<e;r++)i[t[r]]=n}else i[c]=n}return this.options.layoutId&&(i.pointerEvents=o===this?xd(null==e?void 0:e.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Ld),this.root.sharedNodes.clear()}}}function Nd(e){e.updateLayout()}function Rd(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:i}=e.layout,{animationType:r}=e.options,o=n.source!==e.layout.source;"size"===r?mc((e=>{const i=o?n.measuredBox[e]:n.layoutBox[e],r=tc(i);i.min=t[e].min,i.max=i.min+r})):Gd(r,n.layoutBox,t)&&mc((i=>{const r=o?n.measuredBox[i]:n.layoutBox[i],s=tc(t[i]);r.max=r.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[i].max=e.relativeTarget[i].min+s)}));const s=hc();ic(s,t,n.layoutBox);const a=hc();o?ic(a,e.applyTransform(i,!0),n.measuredBox):ic(a,t,n.layoutBox);const l=!hd(s);let c=!1;if(!e.resumeFrom){const i=e.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:r,layout:o}=i;if(r&&o){const s=pc();sc(s,n.layoutBox,r.layoutBox);const a=pc();sc(a,t,o.layoutBox),fd(s,a)||(c=!0),i.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=i)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Dd(e){kd&&_d.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Md(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Od(e){e.clearSnapshot()}function Ld(e){e.clearMeasurements()}function Vd(e){e.isLayoutDirty=!1}function jd(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Id(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Ud(e){e.resolveTargetDelta()}function Fd(e){e.calcProjection()}function Bd(e){e.resetSkewAndRotation()}function zd(e){e.removeLeadSnapshot()}function $d(e,t,n){e.translate=va(t.translate,0,n),e.scale=va(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Hd(e,t,n,i){e.min=va(t.min,n.min,i),e.max=va(t.max,n.max,i)}function qd(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Wd={duration:.45,ease:[.4,0,.1,1]},Kd=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Yd=Kd("applewebkit/")&&!Kd("chrome/")?Math.round:no;function Xd(e){e.min=Yd(e.min),e.max=Yd(e.max)}function Gd(e,t,n){return"position"===e||"preserve-aspect"===e&&(i=gd(t),r=gd(n),o=.2,!(Math.abs(i-r)<=o));var i,r,o}function Jd(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Zd=Pd({attachResizeListener:(e,t)=>Ll(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Qd={current:void 0},eu=Pd({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Qd.current){const e=new Zd({});e.mount(window),e.setOptions({layoutScroll:!0}),Qd.current=e}return Qd.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),tu={pan:{Feature:class extends Pl{constructor(){super(...arguments),this.removePointerDownListener=no}onPointerDown(e){this.session=new Il(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Rc(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Lc(e),onStart:Lc(t),onMove:n,onEnd:(e,t)=>{delete this.session,i&&oo.postRender((()=>i(e,t)))}}}mount(){this.removePointerDownListener=Vl(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Pl{constructor(e){super(e),this.removeGroupControls=no,this.removeListeners=no,this.controls=new Mc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||no}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:eu,MeasureLayout:Kc}};function nu(e,t){const n=t?"pointerenter":"pointerleave",i=t?"onHoverStart":"onHoverEnd";return Vl(e.current,n,((n,r)=>{if("touch"===n.pointerType||Xl())return;const o=e.getProps();e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",t);const s=o[i];s&&oo.postRender((()=>s(n,r)))}),{passive:!e.getProps()[i]})}const iu=(e,t)=>!!t&&(e===t||iu(e,t.parentElement));function ru(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ml(n))}const ou=new WeakMap,su=new WeakMap,au=e=>{const t=ou.get(e.target);t&&t(e)},lu=e=>{e.forEach(au)};function cu(e,t,n){const i=function({root:e,...t}){const n=e||document;su.has(n)||su.set(n,{});const i=su.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(lu,{root:e,...t})),i[r]}(t);return ou.set(e,n),i.observe(e),()=>{ou.delete(e),i.unobserve(e)}}const du={some:0,all:1};const uu={inView:{Feature:class extends Pl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:i="some",once:r}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:du[i]};return cu(this.node.current,o,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,r&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=t?n:i;o&&o(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Pl{constructor(){super(...arguments),this.removeStartListeners=no,this.removeEndListeners=no,this.removeAccessibleListeners=no,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=Vl(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i,globalTapTarget:r}=this.node.getProps(),o=r||iu(this.node.current,e.target)?n:i;o&&oo.update((()=>o(e,t)))}),{passive:!(n.onTap||n.onPointerUp)}),r=Vl(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=ga(i,r),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=Ll(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=Ll(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&ru("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&oo.postRender((()=>n(e,t)))}))})),ru("down",((e,t)=>{this.startPress(e,t)}))})),t=Ll(this.node.current,"blur",(()=>{this.isPressing&&ru("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=ga(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&oo.postRender((()=>n(e,t)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Xl()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&oo.postRender((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=Vl(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=Ll(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ga(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Pl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&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=ga(Ll(this.node.current,"focus",(()=>this.onFocus())),Ll(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Pl{mount(){this.unmount=ga(nu(this.node,!0),nu(this.node,!1))}unmount(){}}}},hu={layout:{ProjectionNode:eu,MeasureLayout:Kc}},pu=F({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),mu=F({}),fu="undefined"!=typeof window,gu=fu?ae:se,yu=F({strict:!1});function vu(e,t,n,i,r){var o,s;const{visualElement:a}=ue(mu),l=ue(yu),c=ue(Vc),d=ue(pu).reducedMotion,u=le();i=i||l.renderer,!u.current&&i&&(u.current=i(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:d}));const h=u.current,p=ue(Uc);!h||h.projection||!r||"html"!==h.type&&"svg"!==h.type||function(e,t,n,i){const{layoutId:r,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:bu(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:Boolean(s)||a&&Gl(a),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:c})}(u.current,n,r,p);const m=le(!1);qi((()=>{h&&m.current&&h.update(n,c)}));const f=n[hl],g=le(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 gu((()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),qc.render(h.render),g.current&&h.animationState&&h.animationState.animateChanges())})),se((()=>{h&&(!g.current&&h.animationState&&h.animationState.animateChanges(),g.current&&(queueMicrotask((()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,f)})),g.current=!1))})),h}function bu(e){if(e)return!1!==e.options.allowProjection?e.projection:bu(e.parent)}function wu(e,t,n){return de((i=>{i&&e.mount&&e.mount(i),t&&(i?t.mount(i):t.unmount()),n&&("function"==typeof n?n(i):Gl(n)&&(n.current=i))}),[t])}function xu(e){return Lr(e.animate)||$r.some((t=>Ir(e[t])))}function _u(e){return Boolean(xu(e)||e.variants)}function ku(e){const{initial:t,animate:n}=function(e,t){if(xu(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Ir(t)?t:void 0,animate:Ir(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,ue(mu));return ce((()=>({initial:t,animate:n})),[Tu(t),Tu(n)])}function Tu(e){return Array.isArray(e)?e.join(" "):e}const Su={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"]},Cu={};for(const Jh in Su)Cu[Jh]={isEnabled:e=>Su[Jh].some((t=>!!e[t]))};const Au=Symbol.for("motionComponentSymbol");function Eu({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:i,Component:r}){e&&function(e){for(const t in e)Cu[t]={...Cu[t],...e[t]}}(e);const o=function(e){function t(t){var n=vi({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=_i,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}((function(e,o){let s;const a={...ue(pu),...e,layoutId:Pu(e)},{isStatic:l}=a,c=ku(e),d=i(e,l);if(!l&&fu){ue(yu).strict;const e=function(e){const{drag:t,layout:n}=Cu;if(!t&&!n)return{};const i={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(a);s=e.MeasureLayout,c.visualElement=vu(r,d,a,t,e.ProjectionNode)}return z(mu.Provider,{value:c,children:[s&&c.visualElement?z(s,{visualElement:c.visualElement,...a}):null,n(r,e,wu(d,c.visualElement,o),d,l,c.visualElement)]})}));return o[Au]=r,o}function Pu({layoutId:e}){const t=ue(Ic).id;return t&&void 0!==e?t+"-"+e:e}const Nu=["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 Ru(e){return"string"==typeof e&&!e.includes("-")&&!!(Nu.indexOf(e)>-1||/[A-Z]/u.test(e))}function Du(e,{style:t,vars:n},i,r){Object.assign(e.style,t,r&&r.getProjectionStyles(i));for(const o in n)e.style.setProperty(o,n[o])}const Mu=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 Ou(e,t,n,i){Du(e,t,void 0,i);for(const r in t.attrs)e.setAttribute(Mu.has(r)?r:ul(r),t.attrs[r])}function Lu(e,{layout:t,layoutId:n}){return qr.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Hc[e]||"opacity"===e)}function Vu(e,t,n){var i;const{style:r}=e,o={};for(const s in r)(ml(r[s])||t.style&&ml(t.style[s])||Lu(s,e)||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 ju(e,t,n){const i=Vu(e,t,n);for(const r in e)if(ml(e[r])||ml(t[r])){i[-1!==Hr.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]}return i}const Iu=e=>(t,n)=>{const i=ue(mu),r=ue(Vc),o=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},i,r,o){const s={latestValues:Uu(i,r,o,e),renderState:t()};return n&&(s.mount=e=>n(i,e,s)),s}(e,t,i,r);return n?o():function(e){const t=le(null);return null===t.current&&(t.current=e()),t.current}(o)};function Uu(e,t,n,i){const r={},o=i(e,{});for(const h in o)r[h]=xd(o[h]);let{initial:s,animate:a}=e;const l=xu(e),c=_u(e);t&&c&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let d=!!n&&!1===n.initial;d=d||!1===s;const u=d?a:s;if(u&&"boolean"!=typeof u&&!Lr(u)){const t=Array.isArray(u)?u:[u];for(let n=0;n<t.length;n++){const i=Fr(e,t[n]);if(i){const{transitionEnd:e,transition:t,...n}=i;for(const i in n){let e=n[i];if(Array.isArray(e)){e=e[d?e.length-1:0]}null!==e&&(r[i]=e)}for(const i in e)r[i]=e[i]}}}return r}const Fu=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Bu=()=>({...Fu(),attrs:{}}),zu=(e,t)=>t&&"number"==typeof e?t.transform(e):e,$u={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Hu=Hr.length;function qu(e,t,n){const{style:i,vars:r,transformOrigin:o}=e;let s=!1,a=!1;for(const l in t){const e=t[l];if(qr.has(l))s=!0;else if(Ao(l))r[l]=e;else{const t=zu(e,Ls[l]);l.startsWith("origin")?(a=!0,o[l]=t):i[l]=t}}if(t.transform||(s||n?i.transform=function(e,t,n){let i="",r=!0;for(let o=0;o<Hu;o++){const s=Hr[o],a=e[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 e=zu(a,Ls[s]);l||(r=!1,i+=`${$u[s]||s}(${e}) `),n&&(t[s]=e)}}return i=i.trim(),n?i=n(t,r?"":i):r&&(i="none"),i}(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;i.transformOrigin=`${e} ${t} ${n}`}}function Wu(e,t,n){return"string"==typeof e?e:Fo.transform(t+n*e)}const Ku={offset:"stroke-dashoffset",array:"stroke-dasharray"},Yu={offset:"strokeDashoffset",array:"strokeDasharray"};function Xu(e,{attrX:t,attrY:n,attrScale:i,originX:r,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},d,u){if(qu(e,c,u),d)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:m}=e;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(void 0!==r||void 0!==o||p.transform)&&(p.transformOrigin=function(e,t,n){return`${Wu(t,e.x,e.width)} ${Wu(n,e.y,e.height)}`}(m,void 0!==r?r:.5,void 0!==o?o:.5)),void 0!==t&&(h.x=t),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&function(e,t,n=1,i=0,r=!0){e.pathLength=1;const o=r?Ku:Yu;e[o.offset]=Fo.transform(-i);const s=Fo.transform(t),a=Fo.transform(n);e[o.array]=`${s} ${a}`}(h,s,a,l,!1)}const Gu=e=>"string"==typeof e&&"svg"===e.toLowerCase(),Ju={useVisualState:Iu({scrapeMotionValuesFromProps:ju,createRenderState:Bu,onMount:(e,t,{renderState:n,latestValues:i})=>{oo.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}})),oo.render((()=>{Xu(n,i,Gu(t.tagName),e.transformTemplate),Ou(t,n)}))}})},Zu={useVisualState:Iu({scrapeMotionValuesFromProps:Vu,createRenderState:Fu})};function Qu(e,t,n){for(const i in t)ml(t[i])||Lu(i,n)||(e[i]=t[i])}function eh(e,t){const n={};return Qu(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return ce((()=>{const n=Fu();return qu(n,t,e),Object.assign({},n.vars,n.style)}),[t])}(e,t)),n}function th(e,t){const n={},i=eh(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const nh=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 ih(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||nh.has(e)}let rh=e=>!ih(e);try{(oh=require("@emotion/is-prop-valid").default)&&(rh=e=>e.startsWith("on")?!ih(e):oh(e))}catch(Gh){}var oh;function sh(e,t,n,i){const r=ce((()=>{const n=Bu();return Xu(n,t,Gu(i),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};Qu(t,e.style,e),r.style={...t,...r.style}}return r}function ah(e=!1){return(t,n,i,{latestValues:r},o)=>{const s=(Ru(t)?sh:th)(n,r,o,t),a=function(e,t,n){const i={};for(const r in e)"values"===r&&"object"==typeof e.values||(rh(r)||!0===n&&ih(r)||!t&&!ih(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}(n,"string"==typeof t,e),l=t!==b?{...a,...s,ref:i}:{},{children:c}=n;return y(t,{...l,children:ce((()=>ml(c)?c.get():c),[c])})}}function lh(e,t){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return Eu({...Ru(n)?Ju:Zu,preloadedFeatures:e,useRender:ah(i),createVisualElement:t,Component:n})}}const ch={current:null},dh={current:!1};const uh=new WeakMap,hh=[...Zo,fs,As],ph=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class mh{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,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=os,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 e=Hs.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,oo.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=xu(t),this.isVariantNode=_u(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const u in d){const e=d[u];void 0!==a[u]&&ml(e)&&e.set(a[u],!1)}}mount(e){this.current=e,uh.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),dh.current||function(){if(dh.current=!0,fu)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ch.current=e.matches;e.addListener(t),t()}else ch.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||ch.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){uh.delete(this.current),this.projection&&this.projection.unmount(),so(this.notifyUpdate),so(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=qr.has(e),i=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&oo.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),r=t.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{i(),r(),o&&o(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Cu){const t=Cu[e];if(!t)continue;const{isEnabled:n,Feature:i}=t;if(!this.features[e]&&i&&n(this.props)&&(this.features[e]=new i(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):pc()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<ph.length;n++){const t=ph[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const i=e["on"+t];i&&(this.propEventSubscriptions[t]=this.on(t,i))}this.prevMotionValues=function(e,t,n){for(const i in t){const r=t[i],o=n[i];if(ml(r))e.addValue(i,r);else if(ml(o))e.addValue(i,cl(r,{owner:e}));else if(o!==r)if(e.hasValue(i)){const t=e.getValue(i);!0===t.liveStyle?t.jump(r):t.hasAnimated||t.set(r)}else{const t=e.getStaticValue(i);e.addValue(i,cl(void 0!==t?t:r,{owner:e}))}}for(const i in n)void 0===t[i]&&e.removeValue(i);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=cl(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let i=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=i&&("string"==typeof i&&(So(i)||ko(i))?i=parseFloat(i):(r=i,!hh.find(Jo(r))&&As.test(t)&&(i=Is(e,t))),this.setBaseTarget(e,ml(i)?i.get():i)),ml(i)?i.get():i}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let i;if("string"==typeof n||"object"==typeof n){const r=Fr(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);r&&(i=r[e])}if(n&&void 0!==i)return i;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||ml(r)?void 0!==this.initialValues[e]&&void 0===i?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new al),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class fh extends mh{constructor(){super(...arguments),this.KeyframeResolver=Fs}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}}class gh extends fh{constructor(){super(...arguments),this.type="html",this.renderInstance=Du}readValueFromInstance(e,t){if(qr.has(t)){const e=js(t);return e&&e.default||0}{const i=(n=e,window.getComputedStyle(n)),r=(Ao(t)?i.getPropertyValue(t):i[t])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Nc(e,t)}build(e,t,n){qu(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Vu(e,t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ml(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}class yh extends fh{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=pc}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(qr.has(t)){const e=js(t);return e&&e.default||0}return t=Mu.has(t)?t:ul(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return ju(e,t,n)}build(e,t,n){Xu(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,i){Ou(e,t,0,i)}mount(e){this.isSVGTag=Gu(e.tagName),super.mount(e)}}const vh=Or(lh({...Rl,...uu,...tu,...hu},((e,t)=>Ru(e)?new yh(t):new gh(t,{allowProjection:e!==b}))));var bh=(e=>(e.EmailAddress="EmailAddress",e.MobileNumber="MobileNumber",e.CustomerId="CustomerId",e))(bh||{});const wh=[{searchType:"EmailAddress",name:"Email Address",label:"emailAddress"},{searchType:"MobileNumber",name:"Mobile Number",label:"mobileNumber"},{searchType:"CustomerId",name:"PBA Customer Id",label:"customerId"}];var xh=(e=>(e.Established="Established",e.Unestablished="Unestablished",e))(xh||{});const _h=e=>!!/\+\d{1,14}$/.test(e),kh=e=>!!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),Th=()=>{const[e,t]=oe([]),[n,i]=oe(!1),[r,o]=oe(""),[s,a]=oe(!1),[l,c]=oe(!1),d=le(),u=le(),h=le({searchType:bh.MobileNumber,searchValue:""}),p=de((async(e,n)=>{let r;if(h.current={searchType:e,searchValue:n},i(!0),a(!1),o(""),e===bh.EmailAddress)r=(async e=>{if(!Jn)throw new Error("Api has not been initialized");const t=(e=>({emailAddress:e}))(e);return(await Jn.post("/_admin/v1.0/customers/emailAddress",JSON.stringify(t))).data})(n);else if(e===bh.MobileNumber)r=(async e=>{if(!Jn)throw new Error("Api has not been initialized");const t={mobileNumber:e},n=[],i=await Jn.post("/_admin/v1.0/customer/mobileNumber",JSON.stringify(t));return n.push(i.data),n})(n);else{if(e!==bh.CustomerId)return i(!1),void o("Invalid search type.");r=(async e=>{if(!Jn)throw new Error("Api has not been initialized");const t=[],n=await Jn.get(`/_admin/v1.0/customer/${e}`);return t.push(n.data),t})(n)}r.then((e=>{t(e),i(!1),e.length>0?(d.current=e[0].id,a(!0)):o("No results found!")})).catch((()=>{o("Error: Unable to Retrieve Customer Information."),i(!1)}))}),[]),m=async()=>{await p(h.current.searchType,h.current.searchValue)},f=async(e,t)=>{d.current&&(await(async(e,t,n)=>{if(!Zn)throw new Error("Api has not been initialized");const i={mobileNumber:t,reason:n};await Zn.put(`/_admin/v1.0/customers/${e}/mobileNumber`,JSON.stringify(i))})(d.current,e,t),h.current.searchType===bh.MobileNumber&&(h.current.searchValue=e),await m())},g=async(e,t)=>{d.current&&(await(async(e,t,n)=>{if(!Zn)throw new Error("Api has not been initialized");const i={emailAddress:t,reason:n};await Zn.put(`/_admin/v1.0/customers/${e}/emailAddress`,JSON.stringify(i))})(d.current,e,t),await m())};return{searchFilter:h,searchCustomerResult:e,isLoading:n,isModalOpen:l,error:r,showCustomerDetails:s,searchCustomer:p,handleAction:async t=>{const{action:n}=t;switch(n){case"workplaceUnlink":await(async t=>{e.find((e=>e.apolloProfiles.find((e=>e.profileId===t&&e.status===xh.Established))))&&(c(!0),u.current=t)})(t.profileId);break;case"updateMobileNumber":await f(t.mobileNumber,t.reason);break;case"updateEmailAddress":await g(t.emailAddress,t.reason);break;default:console.error(`Unhandled action type: ${n}`)}},handleModalConfirm:async()=>{u.current&&(async e=>{if(!Jn)throw new Error("Api has not been initialized");await Jn.put(`/_admin/v1.0/workplace-link/${e}/unestablish`)})(u.current).then((async()=>{await m()})).catch((()=>{o("Error: Unable to Unlink Profile.")})).finally((()=>{c(!1)}))},handleModalCancel:async()=>{c(!1)}}},Sh=()=>{const[e,t]=oe(bh.MobileNumber),[n,i]=oe("+61"),[r,o]=oe({emailAddress:"",mobileNumber:"",customerId:""}),s=de((()=>{o({emailAddress:"",mobileNumber:"",customerId:""})}),[]),a=de((e=>!!_h(e)||(o((e=>({...e,mobileNumber:"Invalid Mobile Number!"}))),!1)),[]),l=de(((e,t)=>{const n=e.trim();if(!n){const{label:e,name:n}=(e=>{const t=wh.find((t=>bh[t.searchType]===bh[e]));return t?{name:t.name,label:t.label}:{name:"",label:""}})(t);return o((t=>({...t,[e]:`Empty ${n}`}))),!1}return!(t===bh.EmailAddress&&!kh(n))||(o((e=>({...e,emailAddress:"Invalid Email Address!"}))),!1)}),[]);return{searchType:e,searchValue:n,errors:r,setSearchType:t,setSearchValue:i,clearErrors:s,isValidSearch:de(((e,t)=>{switch(e){case bh.EmailAddress:case bh.CustomerId:return l(t,e);case bh.MobileNumber:return a(t);default:return!1}}),[l,a])}},Ch=({labelText:e,name:t,type:n,value:i,pattern:r,className:o,allowedKeyPattern:s,required:a,onClick:l,onChange:c,...d})=>{const u=de((e=>{s&&!s.test(e.key)&&e.preventDefault()}),[s]);return z(b,{children:[e&&z("label",{className:"block text-sm font-bold text-gray-700",children:e}),z("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:t,type:n,value:i,onKeyPress:u,pattern:r,onClick:l,onChange:c,...d})]})},Ah=({message:e,className:t,onClick:n})=>z("div",{className:t,onClick:n,children:e}),Eh=e=>{const{searchType:t,searchValue:n,errors:i,setSearchType:r,setSearchValue:o,clearErrors:s,isValidSearch:a}=Sh(),[l,c]=oe(!0),d=()=>{s(),c(!1)},u=e=>{const t=e.currentTarget;c(!1),o(t.value),s()};return z(b,{children:z("div",{className:"flex flex-col p-2",children:[z("label",{className:"block text-sm font-bold text-gray-700",children:"Search for PBA Customer with Email Address, Mobile Number or CustomerId :"}),z("form",{className:"w-1/3",onSubmit:i=>{i.preventDefault(),a(t,n)&&(c(!0),e.onSubmit(t,n))},children:[z("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:t,onChange:e=>{s();const t=e.currentTarget.value;r(t),o("")},"data-testid":"select",children:wh.map((e=>z("option",{value:e.searchType,children:e.name},e.searchType)))}),z("div",{className:"sm:flex justify-between sm:mt-6 mt-2",children:[t===bh.EmailAddress&&z(Ch,{labelText:"Email Address",name:"emailAddress",placeholder:"users@email.com",type:"text",value:n,className:"sm:w-3/5",onClick:d,onChange:u}),t===bh.MobileNumber&&z(Ch,{allowedKeyPattern:/[0-9+]/,labelText:"Mobile Number",name:"mobileNumber",placeholder:"+619999999999",type:"tel",value:n,className:"sm:w-3/5",onClick:d,onChange:u}),t===bh.CustomerId&&z(Ch,{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})]}),z("div",{className:"mt-2",children:Object.values(i).map(((e,t)=>z(Ah,{message:e,className:"text-sm text-red-600 sm:text-right"},t)))}),z("div",{className:"sm:flex justify-end sm:mt-6",children:z("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=e=>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,...e},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})),Nh=e=>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,...e},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})),Rh=e=>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,...e},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"})),Dh=e=>y("svg",{fill:"#000000",width:"800px",height:"800px",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",...e},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"})),Mh=e=>y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"green",className:"w-5 h-5",...e},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"})),Oh=e=>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",...e},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"})),Lh=e=>{const t=new Date(e);return new Date(t.getTime()-6e4*t.getTimezoneOffset()).toISOString().substring(0,10)},Vh=e=>{const[t,n]=oe(e.data.apolloProfiles.length>0),i=e.data.apolloProfiles.length>0,r=ce((()=>e.data.apolloProfiles.slice().sort(((e,t)=>{const n=e.status.localeCompare(t.status);return 0!==n?n:e.profileId.localeCompare(t.profileId)}))),[e.data.apolloProfiles]),o=()=>z(b,{children:z(t?Nh:Ph,{className:"h-6 w-6 border-0 cursor-pointer"})});return z(b,{children:[z("tr",{className:"divide-x divide-gray-200",children:[z("td",{className:"whitespace-nowrap px-2 text-sm",children:z("span",{onClick:()=>{i&&n(!t)},children:[!i&&z(Rh,{className:"h-6 w-6 border-0"}),i&&z(o,{})]})}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.id}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.name?.firstName}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.name?.lastName}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:z("div",{className:"flex justify-between items-center",children:[e.data.email?.value,e.data?.email?.isVerified&&z(Mh,{className:"h-4 w-4 border-0"}),e.searchType!==bh.EmailAddress&&z("span",{onClick:()=>e.onEdit("emailAddress"),children:z(Oh,{className:"h-4 w-4 ml-2 border-0 cursor-pointer hover:text-blue-500"})})]})}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:z("div",{className:"flex justify-between items-center",children:[e.data.mobileNumber,e.searchType!==bh.EmailAddress&&z("span",{onClick:()=>e.onEdit("mobileNumber"),children:z(Oh,{className:"h-4 w-4 ml-2 border-0 cursor-pointer hover:text-blue-500"})})]})}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.kyc?.address.state}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.kyc?.dateOfBirth.substring(0,10)}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.kyc?"True":"False"})]},e.key),t&&z(b,{children:z("tr",{className:"divide-x divide-gray-200",children:z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",colspan:10,children:[z("label",{className:"block text-sm font-bold text-gray-700",children:"Apollo Profiles"}),z("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:z("table",{className:"min-w-full divide-y divide-gray-500",children:[z("thead",{className:"bg-gray-50",children:z("tr",{className:"divide-x divide-gray-200",children:[z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Profile ID"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Account ID"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Partner ID"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Status"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Date"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Account Name"}),z("th",{className:"relative py-3.5 pl-3 pr-4 sm:pr-6",children:z("span",{className:"sr-only",children:"Action"})})]})}),z("tbody",{className:"divide-y divide-gray-200 bg-white",children:r.map(((t,n)=>z("tr",{className:"divide-x divide-gray-200",children:[z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.profileId}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.accountId}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.partnerId}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.status}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:Lh(t.statusUpdatedAtUtc)}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.accountName}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:z("span",{onClick:()=>e.onAction({action:"workplaceUnlink",profileId:t.profileId}),children:z(Dh,{className:"h-6 w-6 border-0 "+(t.status===xh.Established?"cursor-pointer":"cursor-not-allowed opacity-50")})})})]},n)))})]})})]})})})]})},jh=e=>z("div",{className:"-mx-4 mt-8 sm:-mx-4",children:z("div",{className:"inline-block min-w-full overflow-x-auto shadow border-b border-gray-200 align-middle sm:rounded-lg",children:z("table",{className:"min-w-full divide-y divide-gray-500",children:[z("thead",{className:"bg-gray-50",children:z("tr",{className:"divide-x divide-gray-200",children:[z("th",{className:"relative py-3.5 pl-3 pr-4 sm:pr-6",children:z("span",{className:"sr-only",children:"Action"})}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Customer ID"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"First Name"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Last Name"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Email"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Mobile"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"State"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"DOB"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"KYC Check"})]})}),z("tbody",{className:"divide-y divide-gray-200 bg-white",children:e.data.map(((t,n)=>z(Vh,{title:"Apollo Profiles",data:t,searchType:e.searchType,onAction:e.onAction,onEdit:e.onEdit},n)))})]})})}),Ih=e=>{const{inputValue:t,reason:n,isCustomerIdentityVerified:i,messages:r,isSubmitting:o,setInputValue:s,setReason:a,setIsVerifiedCustomerIdentity:l,clearMessages:c,handleSubmit:d}=((e,t)=>{const[n,i]=oe(e.value),[r,o]=oe(!1),[s,a]=oe(""),[l,c]=oe([]),[d,u]=oe(!1),h=de((()=>{c([])}),[]),p=de((()=>{o(!1),a("")}),[]),m=de(((e,t)=>{c((n=>[...n,{text:e,type:t}]))}),[]),f=de((()=>""!==s.trim()),[s]),g=de((()=>!("emailAddress"===e.type&&!kh(n)&&(m("Please enter a valid email address.","error"),1)||"mobileNumber"===e.type&&!_h(n)&&(m("Please enter a valid mobile number.","error"),1)||!f()&&(m("Reason cannot be empty.","error"),1))),[e.type,n,m,f]),y=de((t=>{if(t instanceof Vn){const n=t.response?.data?.message||`Failed to update ${"emailAddress"===e.type?"email address":"mobile number"}.`;m(n,"error")}else m("An unexpected error occurred.","error")}),[m,e.type]),v=de((async()=>{if(h(),g()){u(!0);try{await t("emailAddress"===e.type?{action:"updateEmailAddress",emailAddress:n,reason:s}:{action:"updateMobileNumber",mobileNumber:n,reason:s}),m(("emailAddress"===e.type?"Email Address":"Mobile Number")+" Updated.","success"),p()}catch(i){y(i)}finally{u(!1)}}}),[h,g,e.type,p,t,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}})(e.formData,e.onSubmit),u=e=>{const t=e.currentTarget;s(t.value),c()};return z(b,{children:z("div",{className:"flex flex-row mt-6 ml-4",children:z("form",{onSubmit:async e=>{e.preventDefault(),await d()},children:z("div",{className:"sm:grid sm:grid-cols-6 sm:items-baseline sm:gap-4 mt-4",children:[z("label",{className:"col-start-1 block text-sm font-bold text-gray-700",children:"mobileNumber"===e.formData.type?"Mobile Number":"Email Address"}),z("div",{className:"sm:col-start-2",children:["mobileNumber"===e.formData.type&&z(Ch,{allowedKeyPattern:/[0-9+]/,name:"mobileNumber",placeholder:"",type:"tel",value:t,className:"w-full",onClick:c,pattern:"[0-9+]*",onChange:u}),"emailAddress"===e.formData.type&&z(Ch,{name:"emailAddress",placeholder:"",type:"email",value:t,className:"w-full",onClick:c,onChange:u})]}),z("div",{className:"col-start-4 col-span-3 row-span-3 flex-col text-left",children:r.map(((e,t)=>z(Ah,{message:e.text,className:"text-sm text-left font-semibold "+("error"===e.type?"text-red-600":"text-green-600")},t)))}),z("div",{className:"col-start-2 col-span-2 relative flex items-start",children:[z("div",{className:"flex h-6 items-center",children:z("input",{id:"verifiedCheckbox","aria-describedby":"verified-customer-identity",name:"verifiedCheckbox",type:"checkbox",checked:i,onChange:e=>{const t=e.currentTarget;l(t.checked),c()},className:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",required:!0})}),z("div",{className:"ml-2 text-sm leading-6",children:z("label",{className:"font-medium text-gray-900",children:"Verified Customer Identity"})})]}),z("div",{className:"col-start-2",children:z(Ch,{name:"reason",placeholder:"Zendesk Ticket ID",type:"text",value:n,className:"w-full",onClick:c,onChange:e=>{const t=e.currentTarget;a(t.value),c()}})}),z("div",{className:"sm:row-start-1 sm:col-start-3 sm:flex sm:justify-center sm:mt-0 mt-2",children:z("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"})})]})})})})},Uh=()=>z("div",{className:"w-full p-4 space-y-4 animate-pulse",children:[z("div",{className:"flex space-x-4",children:[z("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),z("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),z("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),z("div",{className:"w-1/4 h-4 bg-gray-300 rounded"})]}),[...Array(5)].map(((e,t)=>z("div",{className:"flex space-x-4",children:[z("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),z("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),z("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),z("div",{className:"w-1/4 h-6 bg-gray-200 rounded"})]},t)))]}),Fh=()=>{const{searchCustomerResult:e,isLoading:t,error:n,showCustomerDetails:i,isModalOpen:r,searchFilter:o,searchCustomer:s,handleAction:a,handleModalConfirm:l,handleModalCancel:c}=Th(),[d,u]=oe("searchResult"),[h,p]=oe(1);return z(b,{children:["searchResult"===d&&z(b,{children:[z(vh.div,{initial:{x:100*h,opacity:0},animate:{x:0,opacity:1},exit:{x:-100*h,opacity:0},transition:{duration:.5},children:[z(Eh,{onSubmit:s}),!t&&i&&z(vh.div,{initial:{y:-50,opacity:0},animate:{y:0,opacity:1},transition:{duration:.5,delay:.2},children:z(jh,{data:e,searchType:o.current.searchType,onAction:a,onEdit:e=>{p(1),u("mobileNumber"===e?"editMobileNumber":"editEmailAddress")}})},"customerTable")]},d),t&&z(Uh,{}),n&&z("div",{className:"p-4 mt-2 text-red-700",children:n})]}),"searchResult"!==d&&z(vh.div,{initial:{x:100*h,opacity:0},animate:{x:0,opacity:1},exit:{x:-100*h,opacity:0},transition:{duration:.5},children:z(Zi,{buttonName:"Customer Management",onClick:()=>{p(-1),u("searchResult")},children:z(Ih,{formData:"editMobileNumber"==d?{value:e[0].mobileNumber,type:"mobileNumber"}:{value:e[0].email.value,type:"emailAddress"},onSubmit:a})})},d),z(Ki,{isOpen:r,heading:"Warning",message:"Are you sure you want to remove workplace access?",onConfirm:l,onCancel:c})]})};var Bh=(e=>(e.Search="Search",e.BenefitsPlan="Benefits Plan",e))(Bh||{});function zh(){return(zh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var $h=["context","children"];function Hh(e){return this.getChildContext=function(){return e.context},U(e.children,function(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)t.indexOf(n=o[i])>=0||(r[n]=e[n]);return r}(e,$h))}function qh(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=y(Hh,zh({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var i=[],r={},o=0,s=t.attributes,a=t.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(r[s[o].name]=s[o].value,r[Wh(s[o].name)]=s[o].value);for(o=a.length;o--;){var l=e(a[o],null),c=a[o].slot;c?r[c]=y(Xh,{name:c},l):i[o]=l}var d=n?y(Xh,null,i):i;return y(n||t.nodeName.toLowerCase(),r,d)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?I:j)(this._vdom,this._root)}function Wh(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function Kh(e,t,n){if(this._vdom){var i={};i[e]=n=null==n?void 0:n,i[Wh(e)]=n,this._vdom=U(this._vdom,i),j(this._vdom,this._root)}}function Yh(){j(this._vdom=null,this._root)}function Xh(e,t){var n=this;return y("slot",zh({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}!function(e,t,n,i){function r(){var t=Reflect.construct(HTMLElement,[],r);return t._vdomComponent=e,t._root=t,t}(r.prototype=Object.create(HTMLElement.prototype)).constructor=r,r.prototype.connectedCallback=qh,r.prototype.attributeChangedCallback=Kh,r.prototype.disconnectedCallback=Yh,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),r.observedAttributes=n,n.forEach((function(e){Object.defineProperty(r.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define(t,r)}((e=>{const t={backendUrl:e["backend-url"],accessToken:e["access-token"]};se((()=>{ti(t.backendUrl,t.accessToken,"customer-profile"),ti(t.backendUrl,t.accessToken,"flare-app-identity"),ti(t.backendUrl,t.accessToken,"benefits-plan")}),[t.backendUrl,t.accessToken]);const[n,i]=oe("Search"),r=de((e=>e===n),[n]);return z(b,{children:[z("style",{children:$.toString()}),z(be,{tabTitles:Object.entries(Bh).map((([,e])=>e)),currentTab:n,onChange:i}),z(tr,{visible:r("Search"),children:z(Fh,{})}),z(tr,{visible:r("Benefits Plan"),children:z(Mr,{})})]})}),"superhero-pba-support-admin",["backend-url","access-token"])}();
|
|
1
|
+
!function(){"use strict";var e,t,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(e,t){for(var n in t)e[n]=t[n];return e}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function y(t,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?e.call(arguments,2):i),"function"==typeof t&&null!=t.defaultProps)for(s in t.defaultProps)void 0===a[s]&&(a[s]=t.defaultProps[s]);return v(t,a,r,o,null)}function v(e,i,r,o,s){var a={type:e,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!=t.vnode&&t.vnode(a),a}function b(e){return e.children}function w(e,t){this.props=e,this.context=t}function x(e,t){if(null==t)return e.__?x(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?x(e):null}function _(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return _(e)}}function k(e){(!e.__d&&(e.__d=!0)&&i.push(e)&&!T.__r++||r!==t.debounceRendering)&&((r=t.debounceRendering)||o)(T)}function T(){var e,n,r,o,a,l,c,d;for(i.sort(s);e=i.shift();)e.__d&&(n=i.length,o=void 0,l=(a=(r=e).__v).__e,c=[],d=[],r.__P&&((o=f({},a)).__v=a.__v+1,t.vnode&&t.vnode(o),D(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(e,t,n,i,r,o,s,a,l,c,d){var p,f,g,y,w,_=i&&i.__k||h,k=t.length;for(n.__d=l,function(e,t,n){var i,r,o,s,a,l=t.length,c=n.length,d=c,u=0;for(e.__k=[],i=0;i<l;i++)s=i+u,null!=(r=e.__k[i]=null==(r=t[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.__=e,r.__b=e.__b+1,a=E(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==e.__d&&(e.__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==e.__d&&(e.__d=x(o)),L(o,o))}(n,t,_),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,D(e,g,f,r,o,s,a,l,c,d),y=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&M(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=C(g,l,e)):"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 C(e,t,n){var i,r;if("function"==typeof e.type){for(i=e.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=e,t=C(i[r],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function A(e,t){return t=t||[],null==e||"boolean"==typeof e||(m(e)?e.some((function(e){A(e,t)})):t.push(e)),t}function E(e,t,n,i){var r=e.key,o=e.type,s=n-1,a=n+1,l=t[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<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&r==l.key&&o===l.type)return s;s--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&r==l.key&&o===l.type)return a;a++}}return-1}function P(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||p.test(t)?n:n+"px"}function N(e,t,n,i,r){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||P(e.style,t,"");if(n)for(t in n)i&&n[t]===i[t]||P(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?i?n.u=i.u:(n.u=a,e.addEventListener(t,o?c:l,o)):e.removeEventListener(t,o?c:l,o);else{if("http://www.w3.org/2000/svg"==r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(s){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function R(e){return function(n){if(this.l){var i=this.l[n.type+e];if(null==n.t)n.t=a++;else if(n.t<i.u)return;return i(t.event?t.event(n):n)}}}function D(n,i,r,o,s,a,l,c,d,h){var p,y,v,_,k,T,C,A,E,P,R,D,O,M,L,j=i.type;if(void 0!==i.constructor)return null;128&r.__u&&(d=!!(32&r.__u),a=[c=i.__e=r.__e]),(p=t.__b)&&p(i);e:if("function"==typeof j)try{if(A=i.props,E=(p=j.contextType)&&o[p.__c],P=p?E?E.props.value:p.__:o,r.__c?C=(y=i.__c=r.__c).__=y.__E:("prototype"in j&&j.prototype.render?i.__c=y=new j(A,P):(i.__c=y=new w(A,P),y.constructor=j,y.render=V),E&&E.sub(y),y.props=A,y.state||(y.state={}),y.context=P,y.__n=o,v=y.__d=!0,y.__h=[],y._sb=[]),null==y.__s&&(y.__s=y.state),null!=j.getDerivedStateFromProps&&(y.__s==y.state&&(y.__s=f({},y.__s)),f(y.__s,j.getDerivedStateFromProps(A,y.__s))),_=y.props,k=y.state,y.__v=i,v)null==j.getDerivedStateFromProps&&null!=y.componentWillMount&&y.componentWillMount(),null!=y.componentDidMount&&y.__h.push(y.componentDidMount);else{if(null==j.getDerivedStateFromProps&&A!==_&&null!=y.componentWillReceiveProps&&y.componentWillReceiveProps(A,P),!y.__e&&(null!=y.shouldComponentUpdate&&!1===y.shouldComponentUpdate(A,y.__s,P)||i.__v===r.__v)){for(i.__v!==r.__v&&(y.props=A,y.state=y.__s,y.__d=!1),i.__e=r.__e,i.__k=r.__k,i.__k.forEach((function(e){e&&(e.__=i)})),R=0;R<y._sb.length;R++)y.__h.push(y._sb[R]);y._sb=[],y.__h.length&&l.push(y);break e}null!=y.componentWillUpdate&&y.componentWillUpdate(A,y.__s,P),null!=y.componentDidUpdate&&y.__h.push((function(){y.componentDidUpdate(_,k,T)}))}if(y.context=P,y.props=A,y.__P=n,y.__e=!1,D=t.__r,O=0,"prototype"in j&&j.prototype.render){for(y.state=y.__s,y.__d=!1,D&&D(i),p=y.render(y.props,y.state,y.context),M=0;M<y._sb.length;M++)y.__h.push(y._sb[M]);y._sb=[]}else do{y.__d=!1,D&&D(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),C&&(y.__E=y.__=null)}catch(I){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),t.__e(I,i,r)}else null==a&&i.__v===r.__v?(i.__k=r.__k,i.__e=r.__e):i.__e=function(t,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)){t=y,s[d]=null;break}if(null==t){if(null===k)return document.createTextNode(_);t=document.createElementNS(o,k,_.is&&_),s=null,l=!1}if(null===k)w===_||l&&t.data===_||(t.data=_);else{if(s=s&&e.call(t.childNodes),w=i.props||u,!l&&null!=s)for(w={},d=0;d<t.attributes.length;d++)w[(y=t.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(t,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(t,d,y,w[d],o);if(h)l||p&&(h.__html===p.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),n.__k=[];else if(p&&(t.innerHTML=""),S(t,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!==t[d]||"progress"===k&&!v||"option"===k&&v!==w[d])&&N(t,d,v,w[d],o),d="checked",void 0!==b&&b!==t[d]&&N(t,d,b,w[d],o))}return t}(r.__e,i,r,o,s,a,l,d,h);(p=t.diffed)&&p(i)}function O(e,n,i){n.__d=void 0;for(var r=0;r<i.length;r++)M(i[r],i[++r],i[++r]);t.__c&&t.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(i){t.__e(i,n.__v)}}))}function M(e,n,i){try{"function"==typeof e?e(n):e.current=n}catch(r){t.__e(r,i)}}function L(e,n,i){var r,o;if(t.unmount&&t.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||M(r,null,n)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){t.__e(s,n)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&L(r[o],n,i||"function"!=typeof e.type);i||null==e.__e||g(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function V(e,t,n){return this.constructor(e,n)}function j(n,i,r){var o,s,a,l;t.__&&t.__(n,i),s=(o="function"==typeof r)?null:r&&r.__k||i.__k,a=[],l=[],D(i,n=(!o&&r||i).__k=y(b,null,[n]),s||u,u,i.namespaceURI,!o&&r?[r]:s?null:i.firstChild?e.call(i.childNodes):null,a,!o&&r?r:s?s.__e:i.firstChild,o,l),O(a,n,l)}function I(e,t){j(e,t,I)}function U(t,n,i){var r,o,s,a,l=f({},t.props);for(s in t.type&&t.type.defaultProps&&(a=t.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?e.call(arguments,2):i),v(t.type,l,r||t.key,o||t.ref,null)}function F(e,t){var n={__c:t="__cC"+d++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,i;return this.getChildContext||(n=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,k(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}e=h.slice,t={__e:function(e,t,n,i){for(var r,o,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(e)),s=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,i||{}),s=r.__d),s)return r.__E=r}catch(a){e=a}throw e}},n=0,w.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},n),this.props)),e&&f(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),k(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),k(this))},w.prototype.render=b,i=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=function(e,t){return e.__v.__b-t.__v.__b},T.__r=0,a=0,l=R(!1),c=R(!0),d=0;var B=0;function z(e,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:e,props:c,key:i,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--B,__i:-1,__u:0,__source:o,__self:s};if("function"==typeof e&&(a=e.defaultProps))for(l in a)void 0===c[l]&&(c[l]=a[l]);return t.vnode&&t.vnode(d),d}const $="*,: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{inset: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}.mb-1{margin-bottom:.25rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.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-1{margin-top:.25rem}.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%}.max-w-2xl{max-width:42rem}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-shrink-0,.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}.flex-wrap{flex-wrap:wrap}.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}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.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-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-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))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * 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{border-width:1px}.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-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.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-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity))}.bg-indigo-50{--tw-bg-opacity: 1;background-color:rgb(238 242 255 / var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / 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-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity: .75}.p-2{padding:.5rem}.p-3{padding:.75rem}.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-0{padding-top:0;padding-bottom:0}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.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}.text-xs{font-size:.75rem;line-height:1rem}.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-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.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-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / 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))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / 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-blue-700\\/10{--tw-ring-color: rgb(29 78 216 / .1)}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-gray-600\\/10{--tw-ring-color: rgb(75 85 99 / .1)}.ring-green-600\\/20{--tw-ring-color: rgb(22 163 74 / .2)}.ring-indigo-700\\/10{--tw-ring-color: rgb(67 56 202 / .1)}.ring-purple-700\\/10{--tw-ring-color: rgb(126 34 206 / .1)}.ring-red-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(252 165 165 / var(--tw-ring-opacity))}.ring-red-600\\/10{--tw-ring-color: rgb(220 38 38 / .1)}.ring-yellow-600\\/20{--tw-ring-color: rgb(202 138 4 / .2)}.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,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-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / 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))}.hover\\:text-indigo-800:hover{--tw-text-opacity: 1;color:rgb(55 48 163 / var(--tw-text-opacity))}.hover\\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.hover\\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(185 28 28 / 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-1: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(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)}.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}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}@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 H,q,W,K,Y=0,X=[],G=[],J=t,Z=J.__b,Q=J.__r,ee=J.diffed,te=J.__c,ne=J.unmount,ie=J.__;function re(e,t){J.__h&&J.__h(q,e,Y||t),Y=0;var n=q.__H||(q.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:G}),n.__[e]}function oe(e){return Y=1,function(e,t,n){var i=re(H++,2);if(i.t=e,!i.__c&&(i.__=[n?n(t):ve(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],n=i.t(t,e);t!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=q,!q.u)){var r=function(e,t,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var s=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&i.__c.props===e)&&(!o||o.call(this,e,t,n))};q.u=!0;var o=q.shouldComponentUpdate,s=q.componentWillUpdate;q.componentWillUpdate=function(e,t,n){if(this.__e){var i=o;o=void 0,r(e,t,n),o=i}s&&s.call(this,e,t,n)},q.shouldComponentUpdate=r}return i.__N||i.__}(ve,e)}function se(e,t){var n=re(H++,3);!J.__s&&ye(n.__H,t)&&(n.__=e,n.i=t,q.__H.__h.push(n))}function ae(e,t){var n=re(H++,4);!J.__s&&ye(n.__H,t)&&(n.__=e,n.i=t,q.__h.push(n))}function le(e){return Y=5,ce((function(){return{current:e}}),[])}function ce(e,t){var n=re(H++,7);return ye(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function de(e,t){return Y=8,ce((function(){return e}),t)}function ue(e){var t=q.context[e.__c],n=re(H++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(q)),t.props.value):e.__}function he(){for(var e;e=X.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(fe),e.__H.__h.forEach(ge),e.__H.__h=[]}catch(t){e.__H.__h=[],J.__e(t,e.__v)}}J.__b=function(e){q=null,Z&&Z(e)},J.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ie&&ie(e,t)},J.__r=function(e){Q&&Q(e),H=0;var t=(q=e.__c).__H;t&&(W===q?(t.__h=[],q.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=G,e.__N=e.i=void 0}))):(t.__h.forEach(fe),t.__h.forEach(ge),t.__h=[],H=0)),W=q},J.diffed=function(e){ee&&ee(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==X.push(t)&&K===J.requestAnimationFrame||((K=J.requestAnimationFrame)||me)(he)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==G&&(e.__=e.__V),e.i=void 0,e.__V=G}))),W=q=null},J.__c=function(e,t){t.some((function(e){try{e.__h.forEach(fe),e.__h=e.__h.filter((function(e){return!e.__||ge(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],J.__e(n,e.__v)}})),te&&te(e,t)},J.unmount=function(e){ne&&ne(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{fe(e)}catch(n){t=n}})),n.__H=void 0,t&&J.__e(t,n.__v))};var pe="function"==typeof requestAnimationFrame;function me(e){var t,n=function(){clearTimeout(i),pe&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,100);pe&&(t=requestAnimationFrame(n))}function fe(e){var t=q,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),q=t}function ge(e){var t=q;e.__c=e.__(),q=t}function ye(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ve(e,t){return"function"==typeof t?t(e):t}const be=function({tabTitles:e,currentTab:t,onChange:n}){const[i,r]=oe(t),o=de((e=>{r(e),n(e)}),[n]);return z("div",{class:"border-b border-gray-200",children:z("nav",{"aria-label":"Tabs",class:"flex space-x-8 ml-2",children:e.map((e=>z("a",{class:"cursor-pointer border-transparent text-gray-500 whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm "+(i===e?"border-b-2 border-indigo-500 text-indigo-600":"hover:text-gray-700 hover:border-gray-300 "),onClick:()=>o(e),children:e},e)))})})};var we=(e=>(e.Assessment="Assessment",e.Quiz="Quiz",e.Poll="Poll",e.Trivia="Trivia",e.Article="Article",e.Url="Url",e.Contact="Contact",e.Deeplink="Deeplink",e.Advertisement="Advertisement",e))(we||{}),xe=(e=>(e.Cars="Cars",e.Health="Health",e.Everyday="Everyday",e.Devices="Devices",e.Energy="Energy",e.SavingsAccount="Savings Account*",e.HomeLoan="Home Loan*",e.MobileAndInternet="Mobile & Internet",e))(xe||{});const _e=e=>{const t=e,n=t.response?.data?t.response.data:void 0;return n?.message??t.message},ke=(e,t=3)=>{const n=e.split(" ");return n.length>t?`${n.slice(0,t).join(" ")}...`:e},Te=(e,t)=>{switch(e){case we.Trivia:return"Trivia";case we.Assessment:switch(t){case xe.Cars:return"SalaryPackagingCars";case xe.HomeLoan:return"HomeLoan"}return t.replace(/\s+/g,"");default:return"None"}},Se=e=>{switch(e){case xe.SavingsAccount:return["Banking"];case xe.Cars:return["Cars"];case xe.Devices:case xe.Health:case xe.Energy:case xe.Everyday:return[e];case"None":return["Miscellaneous"];case xe.HomeLoan:case xe.MobileAndInternet:default:return[]}},Ce=e=>{switch(e){case xe.Cars:return["NovatedLease"];case xe.Health:return["HealthInsurance"];case xe.SavingsAccount:return["SavingsAccount"];case xe.Devices:case xe.Energy:return[e];case xe.HomeLoan:return["HomeLoan"];case xe.MobileAndInternet:case xe.Everyday:default:return[]}},Ae=(e,t,n)=>{const i=e.products[0],r=Ee(e,t);r?r.isFeatured=n??!1:i.activities.push({id:t,isFeatured:n??!1})},Ee=(e,t)=>e.products[0].activities.find((e=>e.id===t));function Pe(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ne}=Object.prototype,{getPrototypeOf:Re}=Object,{iterator:De,toStringTag:Oe}=Symbol,Me=(e=>t=>{const n=Ne.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Le=e=>(e=e.toLowerCase(),t=>Me(t)===e),Ve=e=>t=>typeof t===e,{isArray:je}=Array,Ie=Ve("undefined");function Ue(e){return null!==e&&!Ie(e)&&null!==e.constructor&&!Ie(e.constructor)&&ze(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Fe=Le("ArrayBuffer");const Be=Ve("string"),ze=Ve("function"),$e=Ve("number"),He=e=>null!==e&&"object"==typeof e,qe=e=>{if("object"!==Me(e))return!1;const t=Re(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Oe in e||De in e)},We=Le("Date"),Ke=Le("File"),Ye=Le("Blob"),Xe=Le("FileList");const Ge="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},Je=void 0!==Ge.FormData?Ge.FormData:void 0,Ze=Le("URLSearchParams"),[Qe,et,tt,nt]=["ReadableStream","Request","Response","Headers"].map(Le);function it(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let i,r;if("object"!=typeof e&&(e=[e]),je(e))for(i=0,r=e.length;i<r;i++)t.call(null,e[i],i,e);else{if(Ue(e))return;const r=n?Object.getOwnPropertyNames(e):Object.keys(e),o=r.length;let s;for(i=0;i<o;i++)s=r[i],t.call(null,e[s],s,e)}}function rt(e,t){if(Ue(e))return null;t=t.toLowerCase();const n=Object.keys(e);let i,r=n.length;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const ot="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,st=e=>!Ie(e)&&e!==ot;const at=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&Re(Uint8Array)),lt=Le("HTMLFormElement"),ct=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),dt=Le("RegExp"),ut=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};it(n,((n,r)=>{let o;!1!==(o=t(n,r,e))&&(i[r]=o||n)})),Object.defineProperties(e,i)};const ht=Le("AsyncFunction"),pt=(mt="function"==typeof setImmediate,ft=ze(ot.postMessage),mt?setImmediate:ft?(gt=`axios@${Math.random()}`,yt=[],ot.addEventListener("message",(({source:e,data:t})=>{e===ot&&t===gt&&yt.length&&yt.shift()()}),!1),e=>{yt.push(e),ot.postMessage(gt,"*")}):e=>setTimeout(e));var mt,ft,gt,yt;const vt="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ot):"undefined"!=typeof process&&process.nextTick||pt,bt={isArray:je,isArrayBuffer:Fe,isBuffer:Ue,isFormData:e=>{let t;return e&&(Je&&e instanceof Je||ze(e.append)&&("formdata"===(t=Me(e))||"object"===t&&ze(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Fe(e.buffer),t},isString:Be,isNumber:$e,isBoolean:e=>!0===e||!1===e,isObject:He,isPlainObject:qe,isEmptyObject:e=>{if(!He(e)||Ue(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},isReadableStream:Qe,isRequest:et,isResponse:tt,isHeaders:nt,isUndefined:Ie,isDate:We,isFile:Ke,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:Ye,isRegExp:dt,isFunction:ze,isStream:e=>He(e)&&ze(e.pipe),isURLSearchParams:Ze,isTypedArray:at,isFileList:Xe,forEach:it,merge:function e(){const{caseless:t,skipUndefined:n}=st(this)&&this||{},i={},r=(r,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;const s=t&&rt(i,o)||o;qe(i[s])&&qe(r)?i[s]=e(i[s],r):qe(r)?i[s]=e({},r):je(r)?i[s]=r.slice():n&&Ie(r)||(i[s]=r)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&it(arguments[o],r);return i},extend:(e,t,n,{allOwnKeys:i}={})=>(it(t,((t,i)=>{n&&ze(t)?Object.defineProperty(e,i,{value:Pe(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{value:t,writable:!0,enumerable:!0,configurable:!0})}),{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,i)=>{let r,o,s;const a={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),o=r.length;o-- >0;)s=r[o],i&&!i(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&Re(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Me,kindOfTest:Le,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return-1!==i&&i===n},toArray:e=>{if(!e)return null;if(je(e))return e;let t=e.length;if(!$e(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[De]).call(e);let i;for(;(i=n.next())&&!i.done;){const n=i.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const i=[];for(;null!==(n=e.exec(t));)i.push(n);return i},isHTMLForm:lt,hasOwnProperty:ct,hasOwnProp:ct,reduceDescriptors:ut,freezeMethods:e=>{ut(e,((t,n)=>{if(ze(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=e[n];ze(i)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},i=e=>{e.forEach((e=>{n[e]=!0}))};return je(e)?i(e):i(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:rt,global:ot,isContextDefined:st,isSpecCompliantForm:function(e){return!!(e&&ze(e.append)&&"FormData"===e[Oe]&&e[De])},toJSONObject:e=>{const t=new Array(10),n=(e,i)=>{if(He(e)){if(t.indexOf(e)>=0)return;if(Ue(e))return e;if(!("toJSON"in e)){t[i]=e;const r=je(e)?[]:{};return it(e,((e,t)=>{const o=n(e,i+1);!Ie(o)&&(r[t]=o)})),t[i]=void 0,r}}return e};return n(e,0)},isAsyncFn:ht,isThenable:e=>e&&(He(e)||ze(e))&&ze(e.then)&&ze(e.catch),setImmediate:pt,asap:vt,isIterable:e=>null!=e&&ze(e[De])};let wt=class e extends Error{static from(t,n,i,r,o,s){const a=new e(t.message,n||t.code,i,r,o);return a.cause=t,a.name=t.name,null!=t.status&&null==a.status&&(a.status=t.status),s&&Object.assign(a,s),a}constructor(e,t,n,i,r){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status)}toJSON(){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:bt.toJSONObject(this.config),code:this.code,status:this.status}}};wt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",wt.ERR_BAD_OPTION="ERR_BAD_OPTION",wt.ECONNABORTED="ECONNABORTED",wt.ETIMEDOUT="ETIMEDOUT",wt.ERR_NETWORK="ERR_NETWORK",wt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",wt.ERR_DEPRECATED="ERR_DEPRECATED",wt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",wt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",wt.ERR_CANCELED="ERR_CANCELED",wt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",wt.ERR_INVALID_URL="ERR_INVALID_URL";function xt(e){return bt.isPlainObject(e)||bt.isArray(e)}function _t(e){return bt.endsWith(e,"[]")?e.slice(0,-2):e}function kt(e,t,n){return e?e.concat(t).map((function(e,t){return e=_t(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Tt=bt.toFlatObject(bt,{},null,(function(e){return/^is[A-Z]/.test(e)}));function St(e,t,n){if(!bt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const i=(n=bt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!bt.isUndefined(t[e])}))).metaTokens,r=n.visitor||c,o=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&bt.isSpecCompliantForm(t);if(!bt.isFunction(r))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(bt.isDate(e))return e.toISOString();if(bt.isBoolean(e))return e.toString();if(!a&&bt.isBlob(e))throw new wt("Blob is not supported. Use a Buffer instead.");return bt.isArrayBuffer(e)||bt.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,r){let a=e;if(bt.isReactNative(t)&&bt.isReactNativeBlob(e))return t.append(kt(r,n,o),l(e)),!1;if(e&&!r&&"object"==typeof e)if(bt.endsWith(n,"{}"))n=i?n:n.slice(0,-2),e=JSON.stringify(e);else if(bt.isArray(e)&&function(e){return bt.isArray(e)&&!e.some(xt)}(e)||(bt.isFileList(e)||bt.endsWith(n,"[]"))&&(a=bt.toArray(e)))return n=_t(n),a.forEach((function(e,i){!bt.isUndefined(e)&&null!==e&&t.append(!0===s?kt([n],i,o):null===s?n:n+"[]",l(e))})),!1;return!!xt(e)||(t.append(kt(r,n,o),l(e)),!1)}const d=[],u=Object.assign(Tt,{defaultVisitor:c,convertValue:l,isVisitable:xt});if(!bt.isObject(e))throw new TypeError("data must be an object");return function e(n,i){if(!bt.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+i.join("."));d.push(n),bt.forEach(n,(function(n,o){!0===(!(bt.isUndefined(n)||null===n)&&r.call(t,n,bt.isString(o)?o.trim():o,i,u))&&e(n,i?i.concat(o):[o])})),d.pop()}}(e),t}function Ct(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function At(e,t){this._pairs=[],e&&St(e,this,t)}const Et=At.prototype;function Pt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Nt(e,t,n){if(!t)return e;const i=n&&n.encode||Pt,r=bt.isFunction(n)?{serialize:n}:n,o=r&&r.serialize;let s;if(s=o?o(t,r):bt.isURLSearchParams(t)?t.toString():new At(t,r).toString(i),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}Et.append=function(e,t){this._pairs.push([e,t])},Et.toString=function(e){const t=e?function(t){return e.call(this,t,Ct)}:Ct;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class Rt{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){bt.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}const Dt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Ot={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:At,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Mt="undefined"!=typeof window&&"undefined"!=typeof document,Lt="object"==typeof navigator&&navigator||void 0,Vt=Mt&&(!Lt||["ReactNative","NativeScript","NS"].indexOf(Lt.product)<0),jt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,It=Mt&&window.location.href||"http://localhost",Ut={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Mt,hasStandardBrowserEnv:Vt,hasStandardBrowserWebWorkerEnv:jt,navigator:Lt,origin:It},Symbol.toStringTag,{value:"Module"})),...Ot};function Ft(e){function t(e,n,i,r){let o=e[r++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=r>=e.length;if(o=!o&&bt.isArray(i)?i.length:o,a)return bt.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s;i[o]&&bt.isObject(i[o])||(i[o]=[]);return t(e,n,i[o],r)&&bt.isArray(i[o])&&(i[o]=function(e){const t={},n=Object.keys(e);let i;const r=n.length;let o;for(i=0;i<r;i++)o=n[i],t[o]=e[o];return t}(i[o])),!s}if(bt.isFormData(e)&&bt.isFunction(e.entries)){const n={};return bt.forEachEntry(e,((e,i)=>{t(function(e){return bt.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),i,n,0)})),n}return null}const Bt={transitional:Dt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,r=bt.isObject(e);r&&bt.isHTMLForm(e)&&(e=new FormData(e));if(bt.isFormData(e))return i?JSON.stringify(Ft(e)):e;if(bt.isArrayBuffer(e)||bt.isBuffer(e)||bt.isStream(e)||bt.isFile(e)||bt.isBlob(e)||bt.isReadableStream(e))return e;if(bt.isArrayBufferView(e))return e.buffer;if(bt.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return St(e,new Ut.classes.URLSearchParams,{visitor:function(e,t,n,i){return Ut.isNode&&bt.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((o=bt.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return St(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return r||i?(t.setContentType("application/json",!1),function(e,t,n){if(bt.isString(e))try{return(t||JSON.parse)(e),bt.trim(e)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Bt.transitional,n=t&&t.forcedJSONParsing,i="json"===this.responseType;if(bt.isResponse(e)||bt.isReadableStream(e))return e;if(e&&bt.isString(e)&&(n&&!this.responseType||i)){const n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(r){if(n){if("SyntaxError"===r.name)throw wt.from(r,wt.ERR_BAD_RESPONSE,this,null,this.response);throw r}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ut.classes.FormData,Blob:Ut.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};bt.forEach(["delete","get","head","post","put","patch"],(e=>{Bt.headers[e]={}}));const zt=bt.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"]),$t=Symbol("internals");function Ht(e,t){if(!1!==e&&null!=e)if(bt.isArray(e))e.forEach((e=>Ht(e,t)));else if(!(e=>!/[\r\n]/.test(e))(String(e)))throw new Error(`Invalid character in header content ["${t}"]`)}function qt(e){return e&&String(e).trim().toLowerCase()}function Wt(e){return!1===e||null==e?e:bt.isArray(e)?e.map(Wt):function(e){let t=e.length;for(;t>0;){const n=e.charCodeAt(t-1);if(10!==n&&13!==n)break;t-=1}return t===e.length?e:e.slice(0,t)}(String(e))}function Kt(e,t,n,i,r){return bt.isFunction(i)?i.call(this,t,n):(r&&(t=n),bt.isString(t)?bt.isString(i)?-1!==t.indexOf(i):bt.isRegExp(i)?i.test(t):void 0:void 0)}let Yt=class{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function r(e,t,n){const r=qt(t);if(!r)throw new Error("header name must be a non-empty string");const o=bt.findKey(i,r);(!o||void 0===i[o]||!0===n||void 0===n&&!1!==i[o])&&(Ht(e,t),i[o||t]=Wt(e))}const o=(e,t)=>bt.forEach(e,((e,n)=>r(e,n,t)));if(bt.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(bt.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,i,r;return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),i=e.substring(r+1).trim(),!n||t[n]&&zt[n]||("set-cookie"===n?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)})),t})(e),t);else if(bt.isObject(e)&&bt.isIterable(e)){let n,i,r={};for(const t of e){if(!bt.isArray(t))throw TypeError("Object iterator must return a key-value pair");r[i=t[0]]=(n=r[i])?bt.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(r,t)}else null!=e&&r(t,e,n);return this}get(e,t){if(e=qt(e)){const n=bt.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}(e);if(bt.isFunction(t))return t.call(this,e,n);if(bt.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=qt(e)){const n=bt.findKey(this,e);return!(!n||void 0===this[n]||t&&!Kt(0,this[n],n,t))}return!1}delete(e,t){const n=this;let i=!1;function r(e){if(e=qt(e)){const r=bt.findKey(n,e);!r||t&&!Kt(0,n[r],r,t)||(delete n[r],i=!0)}}return bt.isArray(e)?e.forEach(r):r(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const r=t[n];e&&!Kt(0,this[r],r,e,!0)||(delete this[r],i=!0)}return i}normalize(e){const t=this,n={};return bt.forEach(this,((i,r)=>{const o=bt.findKey(n,r);if(o)return t[o]=Wt(i),void delete t[r];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(r):String(r).trim();s!==r&&delete t[r],t[s]=Wt(i),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return bt.forEach(this,((n,i)=>{null!=n&&!1!==n&&(t[i]=e&&bt.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[$t]=this[$t]={accessors:{}}).accessors,n=this.prototype;function i(e){const i=qt(e);t[i]||(!function(e,t){const n=bt.toCamelCase(" "+t);["get","set","has"].forEach((i=>{Object.defineProperty(e,i+n,{value:function(e,n,r){return this[i].call(this,t,e,n,r)},configurable:!0})}))}(n,e),t[i]=!0)}return bt.isArray(e)?e.forEach(i):i(e),this}};function Xt(e,t){const n=this||Bt,i=t||n,r=Yt.from(i.headers);let o=i.data;return bt.forEach(e,(function(e){o=e.call(n,o,r.normalize(),t?t.status:void 0)})),r.normalize(),o}function Gt(e){return!(!e||!e.__CANCEL__)}Yt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),bt.reduceDescriptors(Yt.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),bt.freezeMethods(Yt);let Jt=class extends wt{constructor(e,t,n){super(null==e?"canceled":e,wt.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Zt(e,t,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new wt("Request failed with status code "+n.status,[wt.ERR_BAD_REQUEST,wt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Qt=(e,t,n=3)=>{let i=0;const r=function(e,t){e=e||10;const n=new Array(e),i=new Array(e);let r,o=0,s=0;return t=void 0!==t?t: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%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-r<t)return;const h=c&&l-c;return h?Math.round(1e3*u/h):void 0}}(50,250);return function(e,t){let n,i,r=0,o=1e3/t;const s=(t,o=Date.now())=>{r=o,n=null,i&&(clearTimeout(i),i=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-r;a>=o?s(e,t):(n=e,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;e({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,[t?"download":"upload"]:!0})}),n)},en=(e,t)=>{const n=null!=e;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},tn=e=>(...t)=>bt.asap((()=>e(...t))),nn=Ut.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ut.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ut.origin),Ut.navigator&&/(msie|trident)/i.test(Ut.navigator.userAgent)):()=>!0,rn=Ut.hasStandardBrowserEnv?{write(e,t,n,i,r,o,s){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];bt.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),bt.isString(i)&&a.push(`path=${i}`),bt.isString(r)&&a.push(`domain=${r}`),!0===o&&a.push("secure"),bt.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function on(e,t,n){let i=!("string"==typeof(r=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r));var r;return e&&(i||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const sn=e=>e instanceof Yt?{...e}:e;function an(e,t){t=t||{};const n={};function i(e,t,n,i){return bt.isPlainObject(e)&&bt.isPlainObject(t)?bt.merge.call({caseless:i},e,t):bt.isPlainObject(t)?bt.merge({},t):bt.isArray(t)?t.slice():t}function r(e,t,n,r){return bt.isUndefined(t)?bt.isUndefined(e)?void 0:i(void 0,e,0,r):i(e,t,0,r)}function o(e,t){if(!bt.isUndefined(t))return i(void 0,t)}function s(e,t){return bt.isUndefined(t)?bt.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function a(n,r,o){return o in t?i(n,r):o in e?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:(e,t,n)=>r(sn(e),sn(t),0,!0)};return bt.forEach(Object.keys({...e,...t}),(function(i){if("__proto__"===i||"constructor"===i||"prototype"===i)return;const o=bt.hasOwnProp(l,i)?l[i]:r,s=o(e[i],t[i],i);bt.isUndefined(s)&&o!==a||(n[i]=s)})),n}const ln=e=>{const t=an({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:r,xsrfCookieName:o,headers:s,auth:a}=t;if(t.headers=s=Yt.from(s),t.url=Nt(on(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),bt.isFormData(n))if(Ut.hasStandardBrowserEnv||Ut.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(bt.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach((([e,n])=>{t.includes(e.toLowerCase())&&s.set(e,n)}))}if(Ut.hasStandardBrowserEnv&&(i&&bt.isFunction(i)&&(i=i(t)),i||!1!==i&&nn(t.url))){const e=r&&o&&rn.read(o);e&&s.set(r,e)}return t},cn="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const i=ln(e);let r=i.data;const o=Yt.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=Yt.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());Zt((function(e){t(e),m()}),(function(e){n(e),m()}),{data:u&&"text"!==u&&"json"!==u?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:i,config:e,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 wt("Request aborted",wt.ECONNABORTED,e,f)),f=null)},f.onerror=function(t){const i=t&&t.message?t.message:"Network Error",r=new wt(i,wt.ERR_NETWORK,e,f);r.event=t||null,n(r),f=null},f.ontimeout=function(){let t=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const r=i.transitional||Dt;i.timeoutErrorMessage&&(t=i.timeoutErrorMessage),n(new wt(t,r.clarifyTimeoutError?wt.ETIMEDOUT:wt.ECONNABORTED,e,f)),f=null},void 0===r&&o.setContentType(null),"setRequestHeader"in f&&bt.forEach(o.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),bt.isUndefined(i.withCredentials)||(f.withCredentials=!!i.withCredentials),u&&"json"!==u&&(f.responseType=i.responseType),p&&([l,d]=Qt(p,!0),f.addEventListener("progress",l)),h&&f.upload&&([a,c]=Qt(h),f.upload.addEventListener("progress",a),f.upload.addEventListener("loadend",c)),(i.cancelToken||i.signal)&&(s=t=>{f&&(n(!t||t.type?new Jt(null,e,f):t),f.abort(),f=null)},i.cancelToken&&i.cancelToken.subscribe(s),i.signal&&(i.signal.aborted?s():i.signal.addEventListener("abort",s)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(i.url);y&&-1===Ut.protocols.indexOf(y)?n(new wt("Unsupported protocol "+y+":",wt.ERR_BAD_REQUEST,e)):f.send(r||null)}))},dn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,i=new AbortController;const r=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;i.abort(t instanceof wt?t:new Jt(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null,r(new wt(`timeout of ${t}ms exceeded`,wt.ETIMEDOUT))}),t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(r):e.removeEventListener("abort",r)})),e=null)};e.forEach((e=>e.addEventListener("abort",r)));const{signal:a}=i;return a.unsubscribe=()=>bt.asap(s),a}},un=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let i,r=0;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},hn=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},pn=(e,t,n,i)=>{const r=async function*(e,t){for await(const n of hn(e))yield*un(n,t)}(e,t);let o,s=0,a=e=>{o||(o=!0,i&&i(e))};return new ReadableStream({async pull(e){try{const{done:t,value:i}=await r.next();if(t)return a(),void e.close();let o=i.byteLength;if(n){let e=s+=o;n(e)}e.enqueue(new Uint8Array(i))}catch(t){throw a(t),t}},cancel:e=>(a(e),r.return())},{highWaterMark:2})},{isFunction:mn}=bt,fn=(({Request:e,Response:t})=>({Request:e,Response:t}))(bt.global),{ReadableStream:gn,TextEncoder:yn}=bt.global,vn=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},bn=e=>{e=bt.merge.call({skipUndefined:!0},fn,e);const{fetch:t,Request:n,Response:i}=e,r=t?mn(t):"function"==typeof fetch,o=mn(n),s=mn(i);if(!r)return!1;const a=r&&mn(gn),l=r&&("function"==typeof yn?(e=>t=>e.encode(t))(new yn):async e=>new Uint8Array(await new n(e).arrayBuffer())),c=o&&a&&vn((()=>{let e=!1;const t=new gn,i=new n(Ut.origin,{body:t,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return t.cancel(),e&&!i})),d=s&&a&&vn((()=>bt.isReadableStream(new i("").body))),u={stream:d&&(e=>e.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!u[e]&&(u[e]=(t,n)=>{let i=t&&t[e];if(i)return i.call(t);throw new wt(`Response type '${e}' is not supported`,wt.ERR_NOT_SUPPORT,n)})}));const h=async(e,t)=>{const i=bt.toFiniteNumber(e.getContentLength());return null==i?(async e=>{if(null==e)return 0;if(bt.isBlob(e))return e.size;if(bt.isSpecCompliantForm(e)){const t=new n(Ut.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return bt.isArrayBufferView(e)||bt.isArrayBuffer(e)?e.byteLength:(bt.isURLSearchParams(e)&&(e+=""),bt.isString(e)?(await l(e)).byteLength:void 0)})(t):i};return async e=>{let{url:r,method:s,data:a,signal:l,cancelToken:p,timeout:m,onDownloadProgress:f,onUploadProgress:g,responseType:y,headers:v,withCredentials:b="same-origin",fetchOptions:w}=ln(e),x=t||fetch;y=y?(y+"").toLowerCase():"text";let _=dn([l,p&&p.toAbortSignal()],m),k=null;const T=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let S;try{if(g&&c&&"get"!==s&&"head"!==s&&0!==(S=await h(v,a))){let e,t=new n(r,{method:"POST",body:a,duplex:"half"});if(bt.isFormData(a)&&(e=t.headers.get("content-type"))&&v.setContentType(e),t.body){const[e,n]=en(S,Qt(tn(g)));a=pn(t.body,65536,e,n)}}bt.isString(b)||(b=b?"include":"omit");const t=o&&"credentials"in n.prototype,l={...w,signal:_,method:s.toUpperCase(),headers:v.normalize().toJSON(),body:a,duplex:"half",credentials:t?b:void 0};k=o&&new n(r,l);let p=await(o?x(k,w):x(r,l));const m=d&&("stream"===y||"response"===y);if(d&&(f||m&&T)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=p[t]}));const t=bt.toFiniteNumber(p.headers.get("content-length")),[n,r]=f&&en(t,Qt(tn(f),!0))||[];p=new i(pn(p.body,65536,n,(()=>{r&&r(),T&&T()})),e)}y=y||"text";let C=await u[bt.findKey(u,y)||"text"](p,e);return!m&&T&&T(),await new Promise(((t,n)=>{Zt(t,n,{data:C,headers:Yt.from(p.headers),status:p.status,statusText:p.statusText,config:e,request:k})}))}catch(C){if(T&&T(),C&&"TypeError"===C.name&&/Load failed|fetch/i.test(C.message))throw Object.assign(new wt("Network Error",wt.ERR_NETWORK,e,k,C&&C.response),{cause:C.cause||C});throw wt.from(C,C&&C.code,e,k,C&&C.response)}}},wn=new Map,xn=e=>{let t=e&&e.env||{};const{fetch:n,Request:i,Response:r}=t,o=[i,r,n];let s,a,l=o.length,c=wn;for(;l--;)s=o[l],a=c.get(s),void 0===a&&c.set(s,a=l?new Map:bn(t)),c=a;return a};xn();const _n={http:null,xhr:cn,fetch:{get:xn}};bt.forEach(_n,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));const kn=e=>`- ${e}`,Tn=e=>bt.isFunction(e)||null===e||!1===e;const Sn={getAdapter:function(e,t){e=bt.isArray(e)?e:[e];const{length:n}=e;let i,r;const o={};for(let s=0;s<n;s++){let n;if(i=e[s],r=i,!Tn(i)&&(r=_n[(n=String(i)).toLowerCase()],void 0===r))throw new wt(`Unknown adapter '${n}'`);if(r&&(bt.isFunction(r)||(r=r.get(t))))break;o[n||"#"+s]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let t=n?e.length>1?"since :\n"+e.map(kn).join("\n"):" "+kn(e[0]):"as no adapter specified";throw new wt("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return r},adapters:_n};function Cn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Jt(null,e)}function An(e){Cn(e),e.headers=Yt.from(e.headers),e.data=Xt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Sn.getAdapter(e.adapter||Bt.adapter,e)(e).then((function(t){return Cn(e),t.data=Xt.call(e,e.transformResponse,t),t.headers=Yt.from(t.headers),t}),(function(t){return Gt(t)||(Cn(e),t&&t.response&&(t.response.data=Xt.call(e,e.transformResponse,t.response),t.response.headers=Yt.from(t.response.headers))),Promise.reject(t)}))}const En="1.15.0",Pn={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Pn[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Nn={};Pn.transitional=function(e,t,n){function i(e,t){return"[Axios v"+En+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,o)=>{if(!1===e)throw new wt(i(r," has been removed"+(t?" in "+t:"")),wt.ERR_DEPRECATED);return t&&!Nn[r]&&(Nn[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,o)}},Pn.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Rn={assertOptions:function(e,t,n){if("object"!=typeof e)throw new wt("options must be an object",wt.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let r=i.length;for(;r-- >0;){const o=i[r],s=t[o];if(s){const t=e[o],n=void 0===t||s(t,o,e);if(!0!==n)throw new wt("option "+o+" must be "+n,wt.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new wt("Unknown option "+o,wt.ERR_BAD_OPTION)}},validators:Pn},Dn=Rn.validators;let On=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Rt,response:new Rt}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=(()=>{if(!e.stack)return"";const t=e.stack.indexOf("\n");return-1===t?"":e.stack.slice(t+1)})();try{if(n.stack){if(t){const e=t.indexOf("\n"),i=-1===e?-1:t.indexOf("\n",e+1),r=-1===i?"":t.slice(i+1);String(n.stack).endsWith(r)||(n.stack+="\n"+t)}}else n.stack=t}catch(i){}}throw n}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=an(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:r}=t;void 0!==n&&Rn.assertOptions(n,{silentJSONParsing:Dn.transitional(Dn.boolean),forcedJSONParsing:Dn.transitional(Dn.boolean),clarifyTimeoutError:Dn.transitional(Dn.boolean),legacyInterceptorReqResOrdering:Dn.transitional(Dn.boolean)},!1),null!=i&&(bt.isFunction(i)?t.paramsSerializer={serialize:i}:Rn.assertOptions(i,{encode:Dn.function,serialize:Dn.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Rn.assertOptions(t,{baseUrl:Dn.spelling("baseURL"),withXsrfToken:Dn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=r&&bt.merge(r.common,r[t.method]);r&&bt.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete r[e]})),t.headers=Yt.concat(o,r);const s=[];let a=!0;this.interceptors.request.forEach((function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;a=a&&e.synchronous;const n=t.transitional||Dt;n&&n.legacyInterceptorReqResOrdering?s.unshift(e.fulfilled,e.rejected):s.push(e.fulfilled,e.rejected)}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let d,u=0;if(!a){const e=[An.bind(this),void 0];for(e.unshift(...s),e.push(...l),d=e.length,c=Promise.resolve(t);u<d;)c=c.then(e[u++],e[u++]);return c}d=s.length;let h=t;for(;u<d;){const e=s[u++],t=s[u++];try{h=e(h)}catch(p){t.call(this,p);break}}try{c=An.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(e){return Nt(on((e=an(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};bt.forEach(["delete","get","head","options"],(function(e){On.prototype[e]=function(t,n){return this.request(an(n||{},{method:e,url:t,data:(n||{}).data}))}})),bt.forEach(["post","put","patch"],(function(e){function t(t){return function(n,i,r){return this.request(an(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}On.prototype[e]=t(),On.prototype[e+"Form"]=t(!0)}));const Mn={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Mn).forEach((([e,t])=>{Mn[t]=e}));const Ln=function e(t){const n=new On(t),i=Pe(On.prototype.request,n);return bt.extend(i,On.prototype,n,{allOwnKeys:!0}),bt.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return e(an(t,n))},i}(Bt);Ln.Axios=On,Ln.CanceledError=Jt,Ln.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const i=new Promise((e=>{n.subscribe(e),t=e})).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e((function(e,i,r){n.reason||(n.reason=new Jt(e,i,r),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e((function(e){t=e})),cancel:t}}},Ln.isCancel=Gt,Ln.VERSION=En,Ln.toFormData=St,Ln.AxiosError=wt,Ln.Cancel=Ln.CanceledError,Ln.all=function(e){return Promise.all(e)},Ln.spread=function(e){return function(t){return e.apply(null,t)}},Ln.isAxiosError=function(e){return bt.isObject(e)&&!0===e.isAxiosError},Ln.mergeConfig=an,Ln.AxiosHeaders=Yt,Ln.formToJSON=e=>Ft(bt.isHTMLForm(e)?new FormData(e):e),Ln.getAdapter=Sn.getAdapter,Ln.HttpStatusCode=Mn,Ln.default=Ln;const{Axios:Vn,AxiosError:jn,CanceledError:In,isCancel:Un,CancelToken:Fn,VERSION:Bn,all:zn,Cancel:$n,isAxiosError:Hn,spread:qn,toFormData:Wn,AxiosHeaders:Kn,HttpStatusCode:Yn,formToJSON:Xn,getAdapter:Gn,mergeConfig:Jn}=Ln;let Zn,Qn,ei;const ti=e=>(e.params={...e.params??{},source:"Admin",channel:"admin"},e),ni=(e,t,n)=>{const i=`${e}/${n}`,r=Ln.create({baseURL:i,headers:{Authorization:`Bearer ${t}`}});switch(r.interceptors.request.use(ti),n){case"customer-profile":Zn=r;break;case"flare-app-identity":Qn=r;break;case"benefits-plan":ei=r}return r},ii=async(e,t)=>{if(!ei)throw new Error("Api has not been initialized");return await ei.put(`/_admin/v1.0/categories/${e}`,t)},ri=async(e,t,n,i)=>{if(!ei)throw new Error("Api has not been initialized");try{if(await ei.put(`/_admin/v1.0/activities/${e}`,t),n){const t=Ee(n,e);if(t?.isFeatured!==i){Ae(n,e,i??!1);const t=n;await ii(n.id,t)}}}catch(r){throw new Error(`${_e(r)}`)}},oi=e=>{const[t,n]=oe(!1),i=le(),r=de((async t=>{try{const n=e.find((e=>e.id===t));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 ii(t,i)}catch(i){throw new Error(`Failed to update category visibility. Error: ${_e(i)}`)}finally{n(!1)}}),[e]),o=de((async e=>{try{await(async e=>{if(!ei)throw new Error("Api has not been initialized");return await ei.post("/_admin/v1.0/categories",e)})(e)}catch(t){throw new Error(`${_e(t)}`)}}),[]),s=de((async(e,t)=>{try{await ii(e,t)}catch(n){throw new Error(`${_e(n)}`)}}),[]);return{isModalOpen:t,handleAction:de((async e=>{switch(e.type){case"updateVisibility":i.current=e.categoryId,n(!0);break;case"updateCategory":await s(e.categoryId,e.category);break;case"createCategory":await o(e.category);break;default:console.error(`Unhandled action type: ${e}`)}}),[o,s]),handleModalConfirm:de((async()=>{i.current&&await r(i.current)}),[r]),handleModalCancel:de((()=>{n(!1)}),[])}};for(var si,ai=[],li=0;li<256;++li)ai.push((li+256).toString(16).slice(1));var ci=new Uint8Array(16);function di(){if(!si&&!(si="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 si(ci)}const ui={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function hi(e,t,n){if(ui.randomUUID&&!e)return ui.randomUUID();var i=(e=e||{}).random||(e.rng||di)();return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(e,t=0){return(ai[e[t+0]]+ai[e[t+1]]+ai[e[t+2]]+ai[e[t+3]]+"-"+ai[e[t+4]]+ai[e[t+5]]+"-"+ai[e[t+6]]+ai[e[t+7]]+"-"+ai[e[t+8]]+ai[e[t+9]]+"-"+ai[e[t+10]]+ai[e[t+11]]+ai[e[t+12]]+ai[e[t+13]]+ai[e[t+14]]+ai[e[t+15]]).toLowerCase()}(i)}const pi=({title:e,children:t})=>z("div",{className:"mt-2",children:[z("div",{className:"mt-9",children:z("h1",{className:"text-2xl font-semibold text-gray-900",children:e})}),z("div",{className:"w-1/2",children:t})]}),mi=({formFields:e,formData:t,isSubmitting:n,formMode:i,messages:r,categoryId:o,handleInputChange:s})=>z(b,{children:[e.map((e=>e.display&&!e.display(o)?null:z(b,{children:[z("label",{className:"sm:col-start-1",children:e.label}),z("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"===e.type?"w-6 h-full":""),type:e.type,name:e.name,value:(e.type,t[e.name]),checked:"checkbox"===e.type?!!t[e.name]:void 0,disabled:e.disabled&&e.disabled(i.mode),required:e.isRequired,onChange:s})]},e.name))),z("div",{className:"sm:col-start-4 flex justify-end",children:z("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"})}),z("div",{className:"sm:col-start-1 sm:col-span-3 text-left",children:r.map(((e,t)=>z("div",{className:"text-sm text-left font-semibold "+("error"===e.type?"text-red-600":"text-green-600 cursor-pointer"),children:e.text},t)))})]}),fi={categoryId:"",title:"",subtitle:"",iconUrl:"",displayOrder:0},gi=[{name:"categoryId",isRequired:!1,label:"Category Id",type:"text",disabled:e=>"update"==e},{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"}],yi=({formMode:e,onChange:t})=>{const{isSubmitting:n,messages:i,formData:r,handleSubmit:o,handleInputChange:s}=((e,t)=>{const[n,i]=oe(!1),[r,o]=oe([]),[s,a]=oe(fi),{handleAction:l}=oi([]);se((()=>{if("update"===e.mode){const t={categoryId:e.initialCategory.id,title:e.initialCategory.title,subtitle:e.initialCategory.subtitle,iconUrl:e.initialCategory.iconUrl,displayOrder:e.initialCategory.displayOrder};a(t)}}),[e]);const c=de(((e,t)=>{o((n=>[...n,{text:e,type:t}]))}),[]),d=de((()=>{a({...fi})}),[]),u=de((()=>{let e=!0;for(const t of gi)!t.isRequired||"text"!==t.type||s[t.name]&&""!==s[t.name].toString().trim()||(c(`${t.label} is required.`,"error"),e=!1);return e}),[s,c]),h=de((()=>({...s,enabled:!1,products:[{id:hi(),title:s.title,description:s.subtitle,enabled:!0,iconUrl:s.iconUrl,activities:[]}]})),[s]),p=de((e=>({...s,enabled:e.enabled,products:e.products})),[s]);return{isSubmitting:n,messages:r,formData:s,setMessages:o,handleSubmit:async n=>{if(n.preventDefault(),i(!0),o([]),u())try{if("create"===e.mode){const e=h();await l({type:"createCategory",category:e})}if("update"===e.mode){const t=p(e.initialCategory);await l({type:"updateCategory",categoryId:e.initialCategory.id,category:t})}c(`Category successfully ${"create"===e.mode?"created":"updated"}.`,"success"),d(),t()}catch(r){c(`Error ${"create"===e.mode?"adding":"updating"} category: ${r}`,"error")}finally{i(!1)}else i(!1)},handleInputChange:e=>{const t=e.target,{name:n,value:i,type:r}=t;a((e=>({...e,[n]:"number"===r?Number(i):i})))}}})(e,t),a="create"===e.mode?"New Benefits Plan Category":"Update Benefits Plan Category";return z(pi,{title:a,children:z("form",{onSubmit:o,children:z("div",{className:"sm:grid sm:grid-cols-4 sm:items-baseline sm:gap-10 mt-8",children:z(mi,{formMode:e,formFields:gi,formData:r,isSubmitting:n,messages:i,handleInputChange:s})})})})},vi=({disabled:e,children:t,onClick:n,...i})=>{const[r,o]=oe(!1);return z("button",{disabled:e||r,onClick:async()=>{if(n&&!r){o(!0);try{await n()}catch(e){console.error("Error executing promise:",e)}finally{o(!1)}}},type:"submit",...i,children:t})};function bi(e,t){for(var n in t)e[n]=t[n];return e}function wi(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var i in t)if("__source"!==i&&e[i]!==t[i])return!0;return!1}function xi(e,t){this.props=e,this.context=t}(xi.prototype=new w).isPureReactComponent=!0,xi.prototype.shouldComponentUpdate=function(e,t){return wi(this.props,e)||wi(this.state,t)};var _i=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),_i&&_i(e)};var ki="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var Ti=t.__e;t.__e=function(e,t,n,i){if(e.then)for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);Ti(e,t,n,i)};var Si=t.unmount;function Ci(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=bi({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ci(e,t,n)}))),e}function Ai(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Ai(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Ei(){this.__u=0,this.t=null,this.__b=null}function Pi(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ni(){this.u=null,this.o=null}t.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Si&&Si(e)},(Ei.prototype=new w).__c=function(e,t){var n=t.__c,i=this;null==i.t&&(i.t=[]),i.t.push(n);var r=Pi(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 e=i.state.__a;i.__v.__k[0]=Ai(e,e.__c.__P,e.__c.__O)}var t;for(i.setState({__a:i.__b=null});t=i.t.pop();)t.forceUpdate()}};i.__u++||32&t.__u||i.setState({__a:i.__b=i.__v.__k[0]}),e.then(s,s)},Ei.prototype.componentWillUnmount=function(){this.t=[]},Ei.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=Ci(this.__b,n,i.__O=i.__P)}this.__b=null}var r=t.__a&&y(b,null,e.fallback);return r&&(r.__u&=-33),[y(b,null,t.__a?null:e.children),r]};var Ri=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};(Ni.prototype=new w).__a=function(e){var t=this,n=Pi(t.__v),i=t.o.get(e);return i[0]++,function(r){var o=function(){t.props.revealOrder?(i.push(r),Ri(t,e,i)):r()};n?n(o):o()}},Ni.prototype.render=function(e){this.u=null,this.o=new Map;var t=A(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Ni.prototype.componentDidUpdate=Ni.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Ri(e,n,t)}))};var Di="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Oi=/^(?: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)/,Li=/[A-Z0-9]/g,Vi="undefined"!=typeof document,ji=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};w.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(w.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Ii=t.event;function Ui(){}function Fi(){return this.cancelBubble}function Bi(){return this.defaultPrevented}t.event=function(e){return Ii&&(e=Ii(e)),e.persist=Ui,e.isPropagationStopped=Fi,e.isDefaultPrevented=Bi,e.nativeEvent=e};var zi={enumerable:!1,configurable:!0,get:function(){return this.class}},$i=t.vnode;t.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,i={};for(var r in t){var o=t[r];if(!("value"===r&&"defaultValue"in t&&null==o||Vi&&"children"===r&&"noscript"===n||"class"===r||"className"===r)){var s=r.toLowerCase();"defaultValue"===r&&"value"in t&&null==t.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(t.type)?"onfocus"===s?r="onfocusin":"onblur"===s?r="onfocusout":Mi.test(r)?r=s:-1===n.indexOf("-")&&Oi.test(r)?r=r.replace(Li,"-$&").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=A(t.children).forEach((function(e){e.props.selected=-1!=i.value.indexOf(e.props.value)}))),"select"==n&&null!=i.defaultValue&&(i.value=A(t.children).forEach((function(e){e.props.selected=i.multiple?-1!=i.defaultValue.indexOf(e.props.value):i.defaultValue==e.props.value}))),t.class&&!t.className?(i.class=t.class,Object.defineProperty(i,"className",zi)):(t.className&&!t.class||t.class&&t.className)&&(i.class=i.className=t.className),e.props=i}(e),e.$$typeof=Di,$i&&$i(e)};var Hi=t.__r;t.__r=function(e){Hi&&Hi(e),e.__c};var qi=t.diffed;t.diffed=function(e){qi&&qi(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};var Wi=ae;const Ki=e=>y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6",...e},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"})),Yi=({isOpen:e,heading:t,message:n,onConfirm:i,onCancel:r})=>e?z("div",{className:"relative z-10","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",children:[z("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"}),z("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:z("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:z("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:[z("div",{className:"bg-white px-4 pb-4 pt-5 sm:p-6 sm:pb-4",children:z("div",{className:"sm:flex sm:items-start",children:[z("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:z(Ki,{className:"h-6 w-6 text-red-600"})}),z("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[z("h1",{className:"text-base font-semibold leading-6 text-gray-900",id:"modal-title",children:t}),z("div",{className:"mt-2",children:z("p",{className:"text-sm text-gray-500",children:n})})]})]})}),z("div",{className:"bg-gray-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6",children:[z(vi,{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"}),z("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,Xi=({headers:e,renderTableRows:t})=>z("div",{className:"-mx-4 mt-8 sm:-mx-4",children:z("div",{className:"inline-block min-w-full overflow-x-auto shadow border-b border-gray-200 align-middle sm:rounded-lg",children:z("table",{className:"min-w-full divide-y divide-gray-500",children:[z("thead",{className:"bg-gray-50",children:z("tr",{className:"divide-x divide-gray-20",children:e.map((e=>z("th",{scope:"col",className:e.className,children:e.name},e.name)))})}),z("tbody",{className:"divide-y divide-gray-200 bg-white",children:t()})]})})}),Gi=({error:e,isModalOpen:t,modalHeading:n,modalTitle:i,tableHeaders:r,headingText:o,buttonText:s,filterElement:a,onCreateButton:l,onModalConfirm:c,renderTableRows:d,handleModalCancel:u})=>z(b,{children:[z("div",{className:"p-4 text-red-700",children:e}),!e&&z("div",{className:"m-4",children:[z("div",{className:"flex items-center",children:[z("div",{className:"flex-auto",children:z("h1",{className:"text-base font-semibold leading-6 text-gray-900",children:o})}),z("div",{className:"ml-16 mt-0 flex-none",children:z("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,z(Xi,{headers:r,renderTableRows:d})]}),z(Yi,{isOpen:t,heading:n,message:i,onConfirm:c,onCancel:u})]}),Ji=e=>y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"#6366F1",className:"size-6",...e},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})),Zi=({onClick:e,children:t})=>z("div",{className:"mt-4",children:z("div",{className:"flex justify-normal",children:[z("span",{onClick:e,children:z(Ji,{className:"h-6 w-6 border-0 cursor-pointer"})}),z("label",{className:"block text-sm font-bold text-gray-700 pt-0.5 ml-1",children:t})]})}),Qi=({buttonName:e,onClick:t,children:n})=>z(b,{children:[z(Zi,{onClick:t,children:e}),n]}),er=[{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=e=>{const[t,n]=oe(null),[i,r]=oe({mode:"view"}),{isModalOpen:o,handleAction:s,handleModalConfirm:a,handleModalCancel:l}=oi(e.categories);return z(b,{children:["view"===i.mode&&z(Gi,{error:t,isModalOpen:o,modalHeading:"Warning!",modalTitle:"Are you sure you want to change the visibility of this category in the app?",tableHeaders:er,headingText:"Benefits Plan Categories",buttonText:"New Category",onModalConfirm:async()=>{try{await a(),e.onChange()}catch(t){n(`${t}`)}},handleModalCancel:l,renderTableRows:()=>z(b,{children:e.categories.map((e=>{const t=e.products.reduce(((e,t)=>e+t.activities.length),0);return z("tr",{className:"divide-x divide-gray-200",children:[z("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-gray-900",children:e.id}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 items-center justify-center sm:table-cell",children:z("img",{src:e.iconUrl,alt:e.title,className:"h-8 w-8"})}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.title}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:e.subtitle}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:t}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.displayOrder}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.enabled?"Yes":"No"}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("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:e.id})},children:"Edit"})})}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("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 e=>{await s({type:"updateVisibility",categoryId:e})})(e.id),children:e.enabled?"Disable":"Enable"})})})]},e.id)}))}),onCreateButton:()=>r({mode:"create"})}),"view"!==i.mode&&z(Qi,{buttonName:"Benefits Plan Categories",onClick:()=>{r({mode:"view"})},children:z(yi,{formMode:"create"===i.mode?{mode:"create"}:{mode:"update",initialCategory:e.categories.find((e=>"update"===i.mode&&e.id===i.itemId))},onChange:e.onChange})})]})},nr=({visible:e,children:t})=>{const n=le(e);return e&&!n.current&&(n.current=!0),n.current?z("div",{hidden:!e,children:t}):null},ir=e=>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,...e},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"})),rr=()=>{const[e,t]=oe(!1),[n,i]=oe([]),[r,o]=oe(!1),s=le([]),a=le(),l=de((async e=>{t(!0),s.current=e;try{const t=await(async()=>{if(!ei)throw new Error("Api has not been initialized");return(await ei.get("/_admin/v1.0/activities")).data})(),n=or(e,t);i(n)}catch(n){throw new Error(`Failed to load activities. Error: ${_e(n)}`)}finally{t(!1)}}),[]),c=de((async e=>{t(!0);try{const t=await(async e=>{if(!ei)throw new Error("Api has not been initialized");return(await ei.get(`/_admin/v1.0/activities/${e}`)).data})(e);t.enabled=!t.enabled,await ri(e,t)}catch(n){throw new Error(`Failed to update activity visibility. Error: ${_e(n)}`)}finally{t(!1)}}),[]);return{activities:n,isLoading:e,isModalOpen:r,loadActivities:l,handleAction:de((async e=>{switch(e.type){case"updateVisibility":a.current=e.activityId,o(!0);break;case"updateActivity":await ri(e.activityId,e.activity,e.selectedCategory,e.isFeaturedActivity);break;case"createActivity":await(async(e,t,n)=>{if(!ei)throw new Error("Api has not been initialized");try{const i=await ei.post("/_admin/v1.0/activities",e);if(t){Ae(t,i.data.id,n??!1);const e=t;await ii(t.id,e)}}catch(i){throw new Error(`${_e(i)}`)}})(e.activity,e.selectedCategory,e.isFeaturedActivity);break;default:console.error(`Unhandled action type: ${e}`)}}),[]),handleModalConfirm:de((async()=>{a.current&&(await c(a.current),o(!1))}),[c]),handleModalCancel:de((()=>{o(!1)}),[])}},or=(e,t)=>{const n=sr(e);return t.map((e=>({...e,category:n.get(e.id)?.find((()=>!0))})))},sr=e=>{const t=ar(e),n=new Map;return t.forEach((({activity:e,categoryId:t,categoryTitle:i})=>{const r=e.id;n.has(r)||n.set(r,[]);const o=n.get(r);o.some((e=>e.id===t))||o.push({id:t,title:i,isFeatured:e.isFeatured})})),n},ar=e=>e.flatMap((e=>e.products.flatMap((t=>t.activities.map((t=>({activity:t,categoryId:e.id,categoryTitle:e.title}))))))),lr="None",cr=[{name:"activityId",isRequired:!1,label:"Activity Id",type:"text",disabled:e=>"update"==e},{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:e=>e!==lr}],dr=[{activityType:we.Advertisement,formFields:[{name:"bannerUrl",isRequired:!0,label:"Banner Url",type:"text"},{name:"articleId",isRequired:!0,label:"Article Id",type:"text"}]},{activityType:we.Article,formFields:[{name:"articleId",isRequired:!0,label:"Article Id",type:"text"}]},{activityType:we.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"},{name:"allowanceProductId",isRequired:!1,label:"Allowance Product Id",type:"text"}]},{activityType:we.Url,formFields:[{name:"url",isRequired:!0,label:"Url",type:"text"}]},{activityType:we.Deeplink,formFields:[{name:"url",isRequired:!0,label:"Url",type:"text"}]}],ur={activityId:"",title:"",description:"",points:0,iconUrl:"",url:"",articleId:"",bannerUrl:"",buttonText:"",primaryLabel:"",secondaryLabel:"",isFeatured:!1,allowanceProductId:""},hr=({formMode:e,categories:t,onChange:n})=>{const{isSubmitting:i,messages:r,formData:o,selectedActivityType:s,currentFormFields:a,selectedCategory:l,handleSubmit:c,handleInputChange:d,handleActivityTypeChange:u,handleCategoryChange:h}=((e,t,n)=>{const[i,r]=oe(we.Article),[o,s]=oe({id:lr,title:lr}),[a,l]=oe([]),[c,d]=oe(!1),[u,h]=oe(ur),{handleAction:p}=rr(),m=ce((()=>[...cr,...dr.find((e=>e.activityType===i))?.formFields||[]]),[i]),f=de(((e,t)=>{l((n=>[...n,{text:e,type:t}]))}),[]);se((()=>{if("update"===e.mode){const t=e.initialActivity,n={activityId:t.id,title:t.title,points:t.points,description:t.description,iconUrl:t.iconUrl,url:t.url,articleId:t.articleId,bannerUrl:t.bannerUrl,buttonText:t.buttonText,primaryLabel:t.estimateLabel?.primaryLabel,secondaryLabel:t.estimateLabel?.secondaryLabel,isFeatured:t.category?.isFeatured,allowanceProductId:t.allowanceProductId};h({...n}),r(t.activityType),s(t.category??{id:lr,title:lr})}}),[e]);const g=de((()=>{h({...ur}),r(we.Article),s({id:lr,title:lr})}),[]),y=de((()=>{let e=!0;for(const t of m){const n=u[t.name];!t.isRequired||"text"!==t.type||n&&""!==n.toString().trim()||(f(`${t.label} is required.`,"error"),e=!1)}return e}),[f,m,u]),v=async()=>{const{url:e,articleId:n,bannerUrl:r,buttonText:s,primaryLabel:a,secondaryLabel:l,isFeatured:c,allowanceProductId:d}=u,h={...u,activityType:i,calculationType:Te(i,o.title),enabled:!1,savingsInCents:0,configurationTags:Ce(o.title),tags:Se(o.title),estimateLabel:a?{primaryLabel:a,secondaryLabel:l}:void 0,url:e||void 0,articleId:n||void 0,bannerUrl:r||void 0,buttonText:s||void 0,allowanceProductId:d?.trim()?d.trim():void 0};let m;o.title!==lr&&(m=t.find((e=>e.id===o.id)));try{await p({type:"createActivity",activity:h,selectedCategory:m,isFeaturedActivity:c}),f("Activity successfully created.","success"),g()}catch(y){throw f(`Error creating activity: ${y}`,"error"),y}},b=async e=>{const{primaryLabel:n,secondaryLabel:i,isFeatured:r,allowanceProductId:s}=u,a={...e,...u,estimateLabel:n?{primaryLabel:n,secondaryLabel:i}:void 0,allowanceProductId:s?.trim()?s.trim():void 0};let l;o.title!==lr&&(l=t.find((e=>e.id===o.id)));try{await p({type:"updateActivity",activityId:e.id,activity:a,selectedCategory:l,isFeaturedActivity:r}),f("Activity successfully updated.","success")}catch(c){throw f(`Error updating activity: ${c}`,"error"),c}};return{isSubmitting:c,messages:a,formData:u,selectedActivityType:i,currentFormFields:m,selectedCategory:o,setMessages:l,handleSubmit:async t=>{if(t.preventDefault(),d(!0),l([]),y())try{"create"===e.mode?await v():"update"===e.mode&&await b(e.initialActivity),n()}finally{d(!1)}else d(!1)},handleInputChange:e=>{const t=e.target,{name:n,value:i,type:r}=t;h((e=>({...e,[n]:"checkbox"===r?t.checked:"number"===r?Number(i):i})))},handleActivityTypeChange:e=>{const t=e.target;r(t.value)},handleCategoryChange:e=>{const n=e.target.value;if(n===lr)s({id:lr,title:lr});else{const e=t.find((e=>e.id===n));e&&s({id:e.id,title:e.title})}}}})(e,t,n),p="create"===e.mode?"New Benefits Plan Activities":"Update Benefits Plan Activities";return z(pi,{title:p,children:z("form",{onSubmit:c,children:[z("div",{className:"sm:grid sm:grid-cols-4 sm:items-baseline mt-8",children:[z("label",{className:"sm:col-start-1",children:"Type"}),z("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"===e.mode,onChange:u,children:Object.values(we).map((e=>z("option",{value:e,children:e},e)))})]}),z("div",{className:"sm:grid sm:grid-cols-3 sm:items-baseline sm:gap-10 mt-8 sm:ml-12",children:[z("label",{className:"sm:col-start-1",children:"Category"}),z("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"===e.mode,onChange:h,children:[z("option",{value:lr,children:lr}),t.map((e=>z("option",{value:e.id,children:e.title},e.id)))]}),z(mi,{formMode:e,formFields:a,formData:o,isSubmitting:i,messages:r,categoryId:l.id,handleInputChange:d})]})]})})},pr=()=>{const[e,t]=oe(!1),[n,i]=oe([]),[r,o]=oe(null),[s,a]=oe(""),[l,c]=oe(!1),[d,u]=oe(null),h=de((async e=>{a(e),t(!0),o(null);try{const t=await(async e=>{if(!ei)throw new Error("Api has not been initialized");return(await ei.get(`/_admin/v1.0/activities/${e}/steps`)).data})(e);i(t)}catch(n){o(`Failed to load steps. Error: ${_e(n)}`)}finally{t(!1)}}),[]),p=de((e=>{u(e),c(!0)}),[]),m=de((async()=>{if(d)try{await(async(e,t)=>{if(!ei)throw new Error("Api has not been initialized");await ei.delete(`/_admin/v1.0/activities/${e}/steps/${t}`)})(s,d),c(!1),u(null),await h(s)}catch(e){o(`Failed to delete step. Error: ${_e(e)}`),c(!1),u(null)}}),[d,s,h]),f=de((()=>{c(!1),u(null)}),[]);return{isLoading:e,steps:n,error:r,isDeleteModalOpen:l,loadSteps:h,handleDeleteClick:p,handleDeleteConfirm:m,handleDeleteCancel:f}};var mr=(e=>(e.Ineligible="Ineligible",e.Completion="Completion",e.Content="Content",e.Consent="Consent",e.Question="Question",e))(mr||{}),fr=(e=>(e.Currency="Currency",e.DateTime="DateTime",e.Date="Date",e.Text="Text",e.MultiSelect="MultiSelect",e.SingleSelect="SingleSelect",e.TriviaSingleSelect="TriviaSingleSelect",e.Lookup="Lookup",e))(fr||{}),gr=(e=>(e.String="String",e.DateTime="DateTime",e.Date="Date",e.Integer="Integer",e.Decimal="Decimal",e.Boolean="Boolean",e.Lookup="Lookup",e))(gr||{}),yr=(e=>(e.Default="default",e.Onboarding="onboarding",e.WebBenefits="webBenefits",e))(yr||{});const vr=({activityId:e,steps:t,formMode:n,onChange:i})=>{const r="update"===n.mode,[o,s]=oe(""),[a,l]=oe(mr.Content),[c,d]=oe(""),[u,h]=oe(0),[p,m]=oe(""),[f,g]=oe(""),[y,v]=oe(""),[b,w]=oe([]),[x,_]=oe(""),[k,T]=oe(""),[S,C]=oe(""),[A,E]=oe(""),[P,N]=oe(""),[R,D]=oe([]),[O,M]=oe(""),[L,V]=oe([]),[j,I]=oe(""),[U,F]=oe(0),[B,$]=oe(!1),[H,q]=oe(""),[W,K]=oe(""),[Y,X]=oe(""),[G,J]=oe(""),[Z,Q]=oe(""),[ee,te]=oe([]),[ne,ie]=oe(!1),[re,ae]=oe(!1),[le,ce]=oe(null);se((()=>{if("update"!==n.mode)return;(async()=>{ie(!0),ce(null);try{const t=await(async(e,t)=>{if(!ei)throw new Error("Api has not been initialized");return(await ei.get(`/_admin/v1.0/activities/${e}/steps/${t}`)).data.step})(e,n.stepId);s(t.title),l(t.stepType),d(t.buttonText),h(t.progressPercentage),m(t.hint??""),g(t.description??""),v(t.imageUrl??""),w(t.nextSteps??[]),_(t.consentText??""),T(t.template??""),C(t.dataType??""),E(t.customerAttribute??""),N(t.analyticsEvent??""),D(t.options??[]),M(t.correctValue??""),V(t.branching??[]),I(t.lookupUrl??""),F(t.minimumSearchCharacterLength??0),te(t.invalidDays??[]),t.validation&&($(!0),q(t.validation.minimumValue??""),K(t.validation.minimumValueAddDays??""),X(t.validation.maximumValue??""),J(t.validation.matchExpression??""),Q(t.validation.invalidMessage))}catch(t){ce(`Failed to load step. Error: ${_e(t)}`)}finally{ie(!1)}})()}),[e,n]);const de=()=>B&&Z.trim()?{minimumValue:H||void 0,minimumValueAddDays:""!==W?Number(W):void 0,maximumValue:Y||void 0,matchExpression:G||void 0,invalidMessage:Z}:null;if(ne)return z("p",{class:"p-5 text-sm text-gray-500",children:"Loading step…"});const ue=a===mr.Question,he=br.includes(k),pe=k===fr.TriviaSingleSelect,me=k===fr.Lookup,fe=a===mr.Content||a===mr.Consent||a===mr.Ineligible,ge=a===mr.Content||a===mr.Consent||a===mr.Ineligible||a===mr.Question;return z("div",{class:"m-4 mt-8 max-w-2xl",children:[z("h1",{class:"text-base font-semibold leading-6 text-gray-900 mb-6",children:r?"Edit Step":"New Step"}),le&&z("div",{class:"mb-4 p-4 text-red-700 bg-red-50 rounded-md",children:le}),z("div",{class:"space-y-6",children:[z("div",{class:xr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Core"}),z(_r,{label:"Step Type",children:r?z("span",{class:"inline-flex items-center rounded-md bg-indigo-50 px-2 py-1 text-sm font-medium text-indigo-700 ring-1 ring-inset ring-indigo-700/10",children:a}):z("select",{value:a,onChange:e=>l(e.target.value),class:wr,children:Object.values(mr).map((e=>z("option",{value:e,children:e},e)))})}),z(_r,{label:"Title *",children:z("input",{type:"text",value:o,onInput:e=>s(e.target.value),class:wr})}),z(_r,{label:"Button Text *",children:z("input",{type:"text",value:c,onInput:e=>d(e.target.value),class:wr})}),z(_r,{label:"Progress Percentage *",children:z("input",{type:"number",min:0,max:100,value:u,onInput:e=>h(Number(e.target.value)),class:wr})}),z(_r,{label:"Hint",children:z("input",{type:"text",value:p,onInput:e=>m(e.target.value),class:wr})})]}),fe&&z("div",{class:xr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Content"}),fe&&z(_r,{label:"Description",children:z("textarea",{value:f,onInput:e=>g(e.target.value),rows:3,class:wr})}),fe&&z(_r,{label:"Image URL",children:z("input",{type:"text",value:y,onInput:e=>v(e.target.value),class:wr})}),a===mr.Consent&&z(_r,{label:"Consent Text",children:z("textarea",{value:x,onInput:e=>_(e.target.value),rows:3,class:wr})})]}),ge&&z("div",{class:xr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Next Steps"}),z(kr,{rows:b,allSteps:t,onChange:w})]}),ue&&z("div",{class:xr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Question"}),z(_r,{label:"Template",children:z("select",{value:k,onChange:e=>T(e.target.value),class:wr,children:[z("option",{value:"",children:"— none —"}),Object.values(fr).map((e=>z("option",{value:e,children:e},e)))]})}),z(_r,{label:"Data Type",children:z("select",{value:S,onChange:e=>C(e.target.value),class:wr,children:[z("option",{value:"",children:"— none —"}),Object.values(gr).map((e=>z("option",{value:e,children:e},e)))]})}),z(_r,{label:"Customer Attribute",children:z("input",{type:"text",value:A,onInput:e=>E(e.target.value),class:wr})}),z(_r,{label:"Analytics Event",children:z("input",{type:"text",value:P,onInput:e=>N(e.target.value),class:wr})})]}),ue&&he&&z("div",{class:xr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:["Options",pe&&" — select the correct answer"]}),z(Tr,{rows:R,correctValue:O,isTrivia:pe,onChange:D,onCorrectValueChange:M})]}),ue&&k===fr.SingleSelect&&z("div",{class:xr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Branching"}),z(Sr,{rows:L,options:R,allSteps:t,onChange:V})]}),ue&&me&&z("div",{class:xr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Lookup"}),z(_r,{label:"Lookup URL",children:z("input",{type:"text",value:j,onInput:e=>I(e.target.value),class:wr})}),z(_r,{label:"Minimum Search Character Length",children:z("input",{type:"number",min:0,value:U,onInput:e=>F(Number(e.target.value)),class:wr})})]}),ue&&z("div",{class:xr,children:[z("div",{class:"flex items-center gap-2",children:[z("input",{type:"checkbox",id:"hasValidation",checked:B,onChange:e=>$(e.target.checked)}),z("label",{for:"hasValidation",class:"text-xs font-semibold uppercase tracking-wide text-gray-500 cursor-pointer",children:"Validation"})]}),B&&z("div",{class:"mt-3 space-y-3",children:[z(_r,{label:"Minimum Value",children:z("input",{type:"text",value:H,onInput:e=>q(e.target.value),class:wr})}),z(_r,{label:"Minimum Value Add Days",children:z("input",{type:"number",value:W,onInput:e=>{const t=e.target.value;K(""===t?"":Number(t))},class:wr})}),z(_r,{label:"Maximum Value",children:z("input",{type:"text",value:Y,onInput:e=>X(e.target.value),class:wr})}),z(_r,{label:"Match Expression",children:z("input",{type:"text",value:G,onInput:e=>J(e.target.value),class:wr})}),z(_r,{label:"Invalid Message *",children:z("input",{type:"text",value:Z,onInput:e=>Q(e.target.value),class:wr})})]})]}),ue&&z("div",{class:xr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Invalid Days"}),z(Cr,{tags:ee,onChange:te,placeholder:"e.g. Saturday"})]})]}),z("div",{class:"mt-8 flex justify-end",children:z("button",{type:"button",disabled:re,onClick:async()=>{ae(!0),ce(null);try{const t=br.includes(k),r=k===fr.TriviaSingleSelect,s=k===fr.Lookup,l=a===mr.Question,d=a===mr.Content||a===mr.Consent||a===mr.Ineligible||a===mr.Question,h=t&&R.length>0?R:null,m=k===fr.SingleSelect&&L.length>0?L:null,g=d&&b.length>0?b:null;"create"===n.mode?await(async(e,t)=>{if(!ei)throw new Error("Api has not been initialized");await ei.post(`/_admin/v1.0/activities/${e}/steps`,t)})(e,{stepType:a,title:o,description:f||null,hint:p||null,progressPercentage:u,buttonText:c,template:l&&k?k:null,dataType:l&&S?S:null,options:h,branching:m,correctValue:r&&O?O:null,validation:l?de():null,invalidDays:l&&ee.length>0?ee:null,nextSteps:g,customerAttribute:l&&A?A:null,analyticsEvent:l&&P?P:null,imageUrl:y||null,consentText:a===mr.Consent&&x?x:null,lookupUrl:s&&j?j:null,minimumSearchCharacterLength:s?U:0,default:null}):await(async(e,t,n)=>{if(!ei)throw new Error("Api has not been initialized");await ei.put(`/_admin/v1.0/activities/${e}/steps/${t}`,n)})(e,n.stepId,{title:o,description:f||null,hint:p||null,progressPercentage:u,buttonText:c,template:l&&k?k:null,dataType:l&&S?S:null,options:h,branching:m,correctValue:r&&O?O:null,validation:l?de():null,invalidDays:l&&ee.length>0?ee:null,nextSteps:g,customerAttribute:l&&A?A:null,analyticsEvent:l&&P?P:null,imageUrl:y||null,consentText:a===mr.Consent&&x?x:null,lookupUrl:s&&j?j:null,minimumSearchCharacterLength:s?U:0,default:null}),i()}catch(t){ce(`Failed to save step. Error: ${_e(t)}`)}finally{ae(!1)}},class:"rounded-md bg-indigo-500 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-900 disabled:opacity-50 disabled:cursor-not-allowed",children:re?"Saving…":"Save"})})]})},br=[fr.SingleSelect,fr.MultiSelect,fr.TriviaSingleSelect],wr="block w-full rounded-md border border-gray-300 px-3 py-2 text-sm shadow-sm focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500",xr="border border-gray-200 rounded-md p-4 space-y-4",_r=({label:e,children:t})=>z("div",{children:[z("label",{class:"block text-sm font-medium text-gray-700 mb-1",children:e}),t]}),kr=({rows:e,allSteps:t,onChange:n})=>{const i=(t,i,r)=>n(e.map(((e,n)=>n===t?{...e,[i]:r}:e)));return z("div",{class:"space-y-2",children:[e.map(((r,o)=>z("div",{class:"flex gap-2 items-center",children:[z("select",{class:wr,value:r.client,onChange:e=>i(o,"client",e.target.value),children:Object.values(yr).map((e=>z("option",{value:e,children:e},e)))}),z("select",{class:wr,value:r.nextStepId,onChange:e=>i(o,"nextStepId",e.target.value),children:[z("option",{value:"",children:"— none —"}),t.map((e=>z("option",{value:e.id,children:e.title},e.id)))]}),z("button",{type:"button",class:"text-red-500 hover:text-red-700 text-sm px-2",onClick:()=>(t=>n(e.filter(((e,n)=>n!==t))))(o),children:"✕"})]},o))),z("button",{type:"button",class:"text-sm text-indigo-600 hover:text-indigo-800",onClick:()=>n([...e,{client:yr.Default,nextStepId:""}]),children:"+ Add next step"})]})},Tr=({rows:e,correctValue:t,isTrivia:n,onChange:i,onCorrectValueChange:r})=>{const o=(t,n,r)=>i(e.map(((e,i)=>i===t?{...e,[n]:r}:e)));return z("div",{class:"space-y-2",children:[e.map(((s,a)=>z("div",{class:"flex gap-2 items-center",children:[n&&z("input",{type:"radio",name:"correctOption",checked:t===s.value,onChange:()=>r(s.value),title:"Mark as correct answer",class:"mt-1 shrink-0"}),z("input",{class:wr,placeholder:"Text (label)",value:s.text,onInput:e=>o(a,"text",e.target.value)}),z("input",{class:wr,placeholder:"Value",value:s.value,onInput:e=>o(a,"value",e.target.value)}),z("button",{type:"button",class:"text-red-500 hover:text-red-700 text-sm px-2",onClick:()=>(t=>i(e.filter(((e,n)=>n!==t))))(a),children:"✕"})]},a))),z("button",{type:"button",class:"text-sm text-indigo-600 hover:text-indigo-800",onClick:()=>i([...e,{text:"",value:""}]),children:"+ Add option"})]})},Sr=({rows:e,options:t,allSteps:n,onChange:i})=>z("div",{class:"space-y-3",children:[e.map(((r,o)=>z("div",{class:"border border-gray-200 rounded p-3 space-y-2",children:[z("div",{class:"flex gap-2 items-center",children:[z("select",{class:wr,value:r.value,onChange:t=>((t,n)=>i(e.map(((e,i)=>i===t?{...e,value:n}:e))))(o,t.target.value),children:[z("option",{value:"",children:"— none —"}),t.map((e=>z("option",{value:e.value,children:e.text},e.value)))]}),z("button",{type:"button",class:"text-red-500 hover:text-red-700 text-sm px-2",onClick:()=>(t=>i(e.filter(((e,n)=>n!==t))))(o),children:"✕"})]}),z("p",{class:"text-xs text-gray-500",children:"Next steps for this branch:"}),z(kr,{rows:r.nextSteps,allSteps:n,onChange:t=>((t,n)=>i(e.map(((e,i)=>i===t?{...e,nextSteps:n}:e))))(o,t)})]},o))),z("button",{type:"button",class:"text-sm text-indigo-600 hover:text-indigo-800",onClick:()=>i([...e,{value:"",nextSteps:[{client:yr.Default,nextStepId:""}]}]),children:"+ Add branch"})]}),Cr=({tags:e,onChange:t,placeholder:n})=>{const[i,r]=oe(""),o=()=>{const n=i.trim();n&&!e.includes(n)&&(t([...e,n]),r(""))};return z("div",{class:"space-y-2",children:[z("div",{class:"flex flex-wrap gap-1",children:e.map((n=>z("span",{class:"inline-flex items-center gap-1 rounded bg-gray-100 px-2 py-0.5 text-xs text-gray-700",children:[n,z("button",{type:"button",class:"text-gray-400 hover:text-red-500",onClick:()=>(n=>t(e.filter((e=>e!==n))))(n),children:"✕"})]},n)))}),z("div",{class:"flex gap-2",children:[z("input",{class:wr,placeholder:n??"Add value…",value:i,onInput:e=>r(e.target.value),onKeyDown:e=>"Enter"===e.key&&(e.preventDefault(),o())}),z("button",{type:"button",class:"rounded-md border border-gray-300 px-3 py-2 text-sm hover:bg-gray-50",onClick:o,children:"Add"})]})]})},Ar=[{name:"#",className:"px-3 py-3.5 pl-4 text-left text-sm font-semibold text-gray-900"},{name:"Step Id",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Type",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Title",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Edit",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"},{name:"Delete",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"}],Er=({activityId:e})=>{const[t,n]=oe({mode:"list"}),{isLoading:i,steps:r,error:o,isDeleteModalOpen:s,loadSteps:a,handleDeleteClick:l,handleDeleteConfirm:c,handleDeleteCancel:d}=pr();se((()=>{a(e)}),[e,a]);return z(b,{children:["list"===t.mode&&z("div",{className:"mt-2",children:[z("div",{className:"mt-9 flex items-center justify-between",children:[z("div",{children:[z("h1",{className:"text-2xl font-semibold text-gray-900",children:"Activity Steps"}),z("p",{className:"text-sm text-gray-500 mt-1",children:["Activity ID: ",e]})]}),z("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:()=>n({mode:"create"}),children:"New Step"})]}),i&&z("p",{className:"p-5",children:"Loading..."}),o&&z("div",{className:"p-4 text-red-700",children:o}),!i&&!o&&r.length>0&&z(Xi,{headers:Ar,renderTableRows:()=>z(b,{children:r.map(((e,t)=>z("tr",{className:"divide-x divide-gray-200",children:[z("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-gray-900 pl-4",children:t+1}),z("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-gray-500",children:e.id}),z("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-gray-500",children:z("span",{className:`inline-flex items-center rounded-md px-2 py-1 text-xs font-medium ring-1 ring-inset ${Pr(e.stepType)}`,children:e.stepType})}),z("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-gray-500",children:e.title}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("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:()=>n({mode:"update",stepId:e.id}),children:"Edit"})})}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-red-600 shadow-sm ring-1 ring-inset ring-red-300 hover:bg-red-50",onClick:()=>l(e.id),children:"Delete"})})})]},e.id)))})}),!i&&!o&&0===r.length&&z("p",{className:"mt-4 text-sm text-gray-500",children:"No steps found for this activity."})]}),("create"===t.mode||"update"===t.mode)&&z(Qi,{buttonName:"Activity Steps",onClick:()=>n({mode:"list"}),children:z(vr,{activityId:e,steps:r,formMode:"create"===t.mode?{mode:"create"}:{mode:"update",stepId:t.stepId},onChange:()=>{n({mode:"list"}),a(e)}})}),z(Yi,{isOpen:s,heading:"Delete Step",message:"Are you sure you want to delete this step? This action cannot be undone.",onConfirm:c,onCancel:d})]})},Pr=e=>{switch(e){case mr.Question:return"bg-blue-50 text-blue-700 ring-blue-700/10";case mr.Content:return"bg-green-50 text-green-700 ring-green-600/20";case mr.Consent:return"bg-yellow-50 text-yellow-700 ring-yellow-600/20";case mr.Completion:return"bg-purple-50 text-purple-700 ring-purple-700/10";case mr.Ineligible:return"bg-red-50 text-red-700 ring-red-600/10";default:return"bg-gray-50 text-gray-700 ring-gray-600/10"}},Nr=[{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"},{name:"Steps",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"}],Rr="All",Dr=({categories:e,onChange:t})=>{const[n,i]=oe(null),[r,o]=oe({mode:"view"}),[s,a]=oe({id:Rr,title:Rr}),[l,c]=oe([]),{isLoading:d,activities:u,isModalOpen:h,loadActivities:p,handleAction:m,handleModalConfirm:f,handleModalCancel:g}=rr();se((()=>{(async()=>{try{await p(e)}catch(t){i(`${t}`)}})()}),[e,p]),se((()=>{c(s.title===Rr?u:u.filter((e=>e.category?.id===s.id)))}),[u,s]);const y=z("div",{className:"flex items-center space-x-2 mt-4",children:[z(ir,{}),z("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:t=>{const n=t.target.value;if(n===Rr)a({id:Rr,title:Rr});else{const t=e.find((e=>e.id===n));t&&a({id:t.id,title:t.title})}},children:[z("option",{value:Rr,children:Rr}),e.map((e=>z("option",{value:e.id,children:e.title},e.id)))]})]});return z(b,{children:["view"===r.mode&&z(b,{children:[d&&z("p",{className:"p-5",children:"Loading..."}),!d&&z(Gi,{error:n,isModalOpen:h,modalHeading:"Warning!",modalTitle:"Are you sure you want to change the visibility of this activity in the app?",tableHeaders:Nr,headingText:"Benefits Plan Activities",buttonText:"New Activity",filterElement:y,onModalConfirm:async()=>{try{await f(),t()}catch(e){i(`${e}`)}},handleModalCancel:g,renderTableRows:()=>z(b,{children:l.map((e=>z("tr",{className:"divide-x divide-gray-200",children:[z("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-gray-900",children:e.id}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 xl:table-cell",children:z("span",{className:"flex justify-center",children:z("img",{src:e.iconUrl,alt:e.title,className:"h-8 w-8"})})}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:ke(e.title)}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 2xl:table-cell",children:ke(e.description)}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 xl:table-cell",children:e.activityType}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.points}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.category?.title??"None"}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.enabled?"Yes":"No"}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("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:e.id})},children:"Edit"})})}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("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:e.id}),children:e.enabled?"Disable":"Enable"})})}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:e.activityType===we.Assessment&&z("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:"steps",activityId:e.id}),children:"Steps"})})})]},e.id)))}),onCreateButton:()=>o({mode:"create"})})]}),("create"===r.mode||"update"===r.mode)&&z(Qi,{buttonName:"Benefits Plan Activities",onClick:()=>{o({mode:"view"})},children:z(hr,{categories:e,formMode:"create"===r.mode?{mode:"create"}:{mode:"update",initialActivity:u.find((e=>e.id===r.itemId))},onChange:t})}),"steps"===r.mode&&z(Qi,{buttonName:"Benefits Plan Activities",onClick:()=>{o({mode:"view"})},children:z(Er,{activityId:r.activityId})})]})};var Or=(e=>(e.Categories="Categories",e.Activities="Activities",e))(Or||{});const Mr=()=>{const[e,t]=oe("Categories"),[n,i]=oe([]),[r,o]=oe(!1),[s,a]=oe(null),l=de((t=>t===e),[e]),c=de((async()=>{o(!0),a(null);try{const e=(await(async()=>{if(!ei)throw new Error("Api has not been initialized");return(await ei.get("/_admin/v1.0/categories")).data})()).categories.sort(((e,t)=>e.displayOrder-t.displayOrder));i(e)}catch(e){console.error(e),a("Failed to load categories.")}finally{o(!1)}}),[]);se((()=>{c()}),[c]);const d=async()=>{await c()};return z(b,{children:[z(be,{tabTitles:Object.entries(Or).map((([,e])=>e)),currentTab:e,onChange:t}),r&&z("p",{className:"p-5",children:"Loading..."}),s&&z("div",{className:"p-4 text-red-700",children:s}),!r&&z(b,{children:[z(nr,{visible:l("Categories"),children:z(tr,{categories:n,onChange:d})}),z(nr,{visible:l("Activities"),children:z(Dr,{categories:n,onChange:d})})]})]})};function Lr(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy(((...t)=>e(...t)),{get:(n,i)=>"create"===i?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function Vr(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const jr=e=>Array.isArray(e);function Ir(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}function Ur(e){return"string"==typeof e||Array.isArray(e)}function Fr(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function Br(e,t,n,i){if("function"==typeof t){const[r,o]=Fr(i);t=t(void 0!==n?n:e.custom,r,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[r,o]=Fr(i);t=t(void 0!==n?n:e.custom,r,o)}return t}function zr(e,t,n){const i=e.getProps();return Br(i,t,void 0!==n?n:i.custom,e)}const $r=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Hr=["initial",...$r],qr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Wr=new Set(qr),Kr=e=>1e3*e,Yr=e=>e/1e3,Xr={type:"spring",stiffness:500,damping:25,restSpeed:10},Gr={type:"keyframes",duration:.8},Jr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Zr=(e,{keyframes:t})=>t.length>2?Gr:Wr.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Xr:Jr;function Qr(e,t){return e?e[t]||e.default||e:void 0}const eo=!1,to=e=>null!==e;function no(e,{repeat:t,repeatType:n="loop"},i){const r=e.filter(to),o=t&&"loop"!==n&&t%2==1?0:r.length-1;return o&&void 0!==i?i:r[o]}const io=e=>e;const ro=["read","resolveKeyframes","update","preRender","render","postRender"];function oo(e,t){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=ro.reduce(((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,i=!1,r=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(t){o.has(t)&&(l.schedule(t),e()),t(s)}const l={schedule:(e,r=!1,s=!1)=>{const a=s&&i?t:n;return r&&o.add(e),a.has(e)||a.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{s=e,i?r=!0:(i=!0,[t,n]=[n,t],n.clear(),t.forEach(a),i=!1,r&&(r=!1,l.process(e)))}};return l}(o),e)),{}),{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&&t&&(i=!1,e(p))};return{schedule:ro.reduce(((t,o)=>{const a=s[o];return t[o]=(t,o=!1,s=!1)=>(n||(n=!0,i=!0,r.isProcessing||e(p)),a.schedule(t,o,s)),t}),{}),cancel:e=>{for(let t=0;t<ro.length;t++)s[ro[t]].cancel(e)},state:r,steps:s}}const{schedule:so,cancel:ao,state:lo,steps:co}=oo("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:io,!0),uo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ho=1e-7,po=12;function mo(e,t,n,i){if(e===t&&n===i)return io;const r=t=>function(e,t,n,i,r){let o,s,a=0;do{s=t+(n-t)/2,o=uo(s,i,r)-e,o>0?n=s:t=s}while(Math.abs(o)>ho&&++a<po);return s}(t,0,1,e,n);return e=>0===e||1===e?e:uo(r(e),t,i)}const fo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,go=e=>t=>1-e(1-t),yo=mo(.33,1.53,.69,.99),vo=go(yo),bo=fo(vo),wo=e=>(e*=2)<1?.5*vo(e):.5*(2-Math.pow(2,-10*(e-1))),xo=e=>1-Math.sin(Math.acos(e)),_o=go(xo),ko=fo(xo),To=e=>/^0[^.\s]+$/u.test(e);let So=io;const Co=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Ao=e=>t=>"string"==typeof t&&t.startsWith(e),Eo=Ao("--"),Po=Ao("var(--"),No=e=>!!Po(e)&&Ro.test(e.split("/*")[0].trim()),Ro=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Do=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Oo(e,t,n=1){const[i,r]=function(e){const t=Do.exec(e);if(!t)return[,];const[,n,i,r]=t;return[`--${null!=n?n:i}`,r]}(e);if(!i)return;const o=window.getComputedStyle(t).getPropertyValue(i);if(o){const e=o.trim();return Co(e)?parseFloat(e):e}return No(r)?Oo(r,t,n+1):r}const Mo=(e,t,n)=>n>t?t:n<e?e:n,Lo={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Vo={...Lo,transform:e=>Mo(0,1,e)},jo={...Lo,default:1},Io=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Uo=Io("deg"),Fo=Io("%"),Bo=Io("px"),zo=Io("vh"),$o=Io("vw"),Ho={...Fo,parse:e=>Fo.parse(e)/100,transform:e=>Fo.transform(100*e)},qo=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Wo=e=>e===Lo||e===Bo,Ko=(e,t)=>parseFloat(e.split(", ")[t]),Yo=(e,t)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/u);if(r)return Ko(r[1],t);{const t=i.match(/^matrix\((.+)\)$/u);return t?Ko(t[1],e):0}},Xo=new Set(["x","y","z"]),Go=qr.filter((e=>!Xo.has(e)));const Jo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Yo(4,13),y:Yo(5,14)};Jo.translateX=Jo.x,Jo.translateY=Jo.y;const Zo=e=>t=>t.test(e),Qo=[Lo,Bo,Fo,Uo,$o,zo,{test:e=>"auto"===e,parse:e=>e}],es=e=>Qo.find(Zo(e)),ts=new Set;let ns=!1,is=!1;function rs(){if(is){const e=Array.from(ts).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return Go.forEach((n=>{const i=e.getValue(n);void 0!==i&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var i;null===(i=e.getValue(t))||void 0===i||i.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}is=!1,ns=!1,ts.forEach((e=>e.complete())),ts.clear()}function os(){ts.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(is=!0)}))}class ss{constructor(e,t,n,i,r,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ts.add(this),ns||(ns=!0,so.read(os),so.resolveKeyframes(rs))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:i}=this;for(let r=0;r<e.length;r++)if(null===e[r])if(0===r){const r=null==i?void 0:i.get(),o=e[e.length-1];if(void 0!==r)e[0]=r;else if(n&&t){const i=n.readValue(t,o);null!=i&&(e[0]=i)}void 0===e[0]&&(e[0]=o),i&&void 0===r&&i.set(e[0])}else e[r]=e[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ts.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ts.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const as=e=>Math.round(1e5*e)/1e5,ls=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const cs=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ds=(e,t)=>n=>Boolean("string"==typeof n&&cs.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),us=(e,t,n)=>i=>{if("string"!=typeof i)return i;const[r,o,s,a]=i.match(ls);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},hs={...Lo,transform:e=>Math.round((e=>Mo(0,255,e))(e))},ps={test:ds("rgb","red"),parse:us("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+hs.transform(e)+", "+hs.transform(t)+", "+hs.transform(n)+", "+as(Vo.transform(i))+")"};const ms={test:ds("#"),parse:function(e){let t="",n="",i="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}},transform:ps.transform},fs={test:ds("hsl","hue"),parse:us("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+Fo.transform(as(t))+", "+Fo.transform(as(n))+", "+as(Vo.transform(i))+")"},gs={test:e=>ps.test(e)||ms.test(e)||fs.test(e),parse:e=>ps.test(e)?ps.parse(e):fs.test(e)?fs.parse(e):ms.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?ps.transform(e):fs.transform(e)},ys=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const vs="number",bs="color",ws="var",xs="var(",_s="${}",ks=/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 Ts(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},r=[];let o=0;const s=t.replace(ks,(e=>(gs.test(e)?(i.color.push(o),r.push(bs),n.push(gs.parse(e))):e.startsWith(xs)?(i.var.push(o),r.push(ws),n.push(e)):(i.number.push(o),r.push(vs),n.push(parseFloat(e))),++o,_s))).split(_s);return{values:n,split:s,indexes:i,types:r}}function Ss(e){return Ts(e).values}function Cs(e){const{split:t,types:n}=Ts(e),i=t.length;return e=>{let r="";for(let o=0;o<i;o++)if(r+=t[o],void 0!==e[o]){const t=n[o];r+=t===vs?as(e[o]):t===bs?gs.transform(e[o]):e[o]}return r}}const As=e=>"number"==typeof e?0:e;const Es={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(ls))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(ys))||void 0===n?void 0:n.length)||0)>0},parse:Ss,createTransformer:Cs,getAnimatableNone:function(e){const t=Ss(e);return Cs(e)(t.map(As))}},Ps=new Set(["brightness","contrast","saturate","opacity"]);function Ns(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[i]=n.match(ls)||[];if(!i)return e;const r=n.replace(i,"");let o=Ps.has(t)?1:0;return i!==n&&(o*=100),t+"("+o+r+")"}const Rs=/\b([a-z-]*)\(.*?\)/gu,Ds={...Es,getAnimatableNone:e=>{const t=e.match(Rs);return t?t.map(Ns).join(" "):e}},Os={borderWidth:Bo,borderTopWidth:Bo,borderRightWidth:Bo,borderBottomWidth:Bo,borderLeftWidth:Bo,borderRadius:Bo,radius:Bo,borderTopLeftRadius:Bo,borderTopRightRadius:Bo,borderBottomRightRadius:Bo,borderBottomLeftRadius:Bo,width:Bo,maxWidth:Bo,height:Bo,maxHeight:Bo,top:Bo,right:Bo,bottom:Bo,left:Bo,padding:Bo,paddingTop:Bo,paddingRight:Bo,paddingBottom:Bo,paddingLeft:Bo,margin:Bo,marginTop:Bo,marginRight:Bo,marginBottom:Bo,marginLeft:Bo,backgroundPositionX:Bo,backgroundPositionY:Bo},Ms={rotate:Uo,rotateX:Uo,rotateY:Uo,rotateZ:Uo,scale:jo,scaleX:jo,scaleY:jo,scaleZ:jo,skew:Uo,skewX:Uo,skewY:Uo,distance:Bo,translateX:Bo,translateY:Bo,translateZ:Bo,x:Bo,y:Bo,z:Bo,perspective:Bo,transformPerspective:Bo,opacity:Vo,originX:Ho,originY:Ho,originZ:Bo},Ls={...Lo,transform:Math.round},Vs={...Os,...Ms,zIndex:Ls,size:Bo,fillOpacity:Vo,strokeOpacity:Vo,numOctaves:Ls},js={...Vs,color:gs,backgroundColor:gs,outlineColor:gs,fill:gs,stroke:gs,borderColor:gs,borderTopColor:gs,borderRightColor:gs,borderBottomColor:gs,borderLeftColor:gs,filter:Ds,WebkitFilter:Ds},Is=e=>js[e];function Us(e,t){let n=Is(e);return n!==Ds&&(n=Es),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Fs=new Set(["auto","none","0"]);class Bs extends ss{constructor(e,t,n,i,r){super(e,t,n,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let a=0;a<e.length;a++){let n=e[a];if("string"==typeof n&&(n=n.trim(),No(n))){const i=Oo(n,t.current);void 0!==i&&(e[a]=i),a===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!qo.has(n)||2!==e.length)return;const[i,r]=e,o=es(i),s=es(r);if(o!==s)if(Wo(o)&&Wo(s))for(let a=0;a<e.length;a++){const t=e[a];"string"==typeof t&&(e[a]=parseFloat(t))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)("number"==typeof(i=e[r])?0===i:null===i||"none"===i||"0"===i||To(i))&&n.push(r);var i;n.length&&function(e,t,n){let i,r=0;for(;r<e.length&&!i;){const t=e[r];"string"==typeof t&&!Fs.has(t)&&Ts(t).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=Us(n,i)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Jo[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const i=t[t.length-1];void 0!==i&&e.getValue(n,i).jump(i,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,s=i[o];i[o]=Jo[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}function zs(e){return"function"==typeof e}let $s;function Hs(){$s=void 0}const qs={now:()=>(void 0===$s&&qs.set(lo.isProcessing||eo?lo.timestamp:performance.now()),$s),set:e=>{$s=e,queueMicrotask(Hs)}},Ws=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Es.test(e)&&"0"!==e||e.startsWith("url(")));class Ks{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=qs.now(),this.options={autoplay:e,delay:t,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||(os(),rs()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=qs.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:r,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(e,t,n,i){const r=e[0];if(null===r)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],s=Ws(r,t),a=Ws(o,t);return!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||zs(n))&&i)}(e,n,i,r)){if(!o)return null==a||a(no(e,this.options,t)),null==s||s(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}function Ys(e,t){return t?e*(1e3/t):0}const Xs=5;function Gs(e,t,n){const i=Math.max(t-Xs,0);return Ys(n-e(i),t-i)}const Js=.001,Zs=.01,Qs=10,ea=.05,ta=1;function na({duration:e=800,bounce:t=.25,velocity:n=0,mass:i=1}){let r,o,s=1-t;s=Mo(ea,ta,s),e=Mo(Zs,Qs,Yr(e)),s<1?(r=t=>{const i=t*s,r=i*e,o=i-n,a=ra(t,s),l=Math.exp(-r);return Js-o/a*l},o=t=>{const i=t*s*e,o=i*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-i),c=ra(Math.pow(t,2),s);return(-r(t)+Js>0?-1:1)*((o-a)*l)/c}):(r=t=>Math.exp(-t*e)*((t-n)*e+1)-Js,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let i=n;for(let r=1;r<ia;r++)i-=e(i)/t(i);return i}(r,o,5/e);if(e=Kr(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(a,2)*i;return{stiffness:t,damping:2*s*Math.sqrt(i*t),duration:e}}}const ia=12;function ra(e,t){return e*Math.sqrt(1-t*t)}const oa=["duration","bounce"],sa=["stiffness","damping","mass"];function aa(e,t){return t.some((t=>void 0!==e[t]))}function la({keyframes:e,restDelta:t,restSpeed:n,...i}){const r=e[0],o=e[e.length-1],s={done:!1,value:r},{stiffness:a,damping:l,mass:c,duration:d,velocity:u,isResolvedFromDuration:h}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!aa(e,sa)&&aa(e,oa)){const n=na(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...i,velocity:-Yr(i.velocity||0)}),p=u||0,m=l/(2*Math.sqrt(a*c)),f=o-r,g=Yr(Math.sqrt(a/c)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),t||(t=y?.005:.5),m<1){const e=ra(g,m);v=t=>{const n=Math.exp(-m*g*t);return o-n*((p+m*g*f)/e*Math.sin(e*t)+f*Math.cos(e*t))}}else if(1===m)v=e=>o-Math.exp(-g*e)*(f+(p+g*f)*e);else{const e=g*Math.sqrt(m*m-1);v=t=>{const n=Math.exp(-m*g*t),i=Math.min(e*t,300);return o-n*((p+m*g*f)*Math.sinh(i)+e*f*Math.cosh(i))/e}}return{calculatedDuration:h&&d||null,next:e=>{const i=v(e);if(h)s.done=e>=d;else{let r=0;m<1&&(r=0===e?Kr(p):Gs(v,e,i));const a=Math.abs(r)<=n,l=Math.abs(o-i)<=t;s.done=a&&l}return s.value=s.done?o:i,s}}}function ca({keyframes:e,velocity:t=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=e[0],h={done:!1,value:u},p=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let m=n*t;const f=u+m,g=void 0===s?f:s(f);g!==f&&(m=g-u);const y=e=>-m*Math.exp(-e/i),v=e=>g+y(e),b=e=>{const t=y(e),n=v(e);h.done=Math.abs(t)<=c,h.value=h.done?g:n};let w,x;const _=e=>{var t;(t=h.value,void 0!==a&&t<a||void 0!==l&&t>l)&&(w=e,x=la({keyframes:[h.value,p(h.value)],velocity:Gs(v,e,h.value),damping:r,stiffness:o,restDelta:c,restSpeed:d}))};return _(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==w||(t=!0,b(e),_(e)),void 0!==w&&e>=w?x.next(e-w):(!t&&b(e),h)}}}const da=mo(.42,0,1,1),ua=mo(0,0,.58,1),ha=mo(.42,0,.58,1),pa=e=>Array.isArray(e)&&"number"==typeof e[0],ma={linear:io,easeIn:da,easeInOut:ha,easeOut:ua,circIn:xo,circInOut:ko,circOut:_o,backIn:vo,backInOut:bo,backOut:yo,anticipate:wo},fa=e=>{if(pa(e)){So(4===e.length);const[t,n,i,r]=e;return mo(t,n,i,r)}return"string"==typeof e?ma[e]:e},ga=(e,t)=>n=>t(e(n)),ya=(...e)=>e.reduce(ga),va=(e,t,n)=>{const i=t-e;return 0===i?1:(n-e)/i},ba=(e,t,n)=>e+(t-e)*n;function wa(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function xa(e,t){return n=>n>0?t:e}const _a=(e,t,n)=>{const i=e*e,r=n*(t*t-i)+i;return r<0?0:Math.sqrt(r)},ka=[ms,ps,fs];function Ta(e){const t=(n=e,ka.find((e=>e.test(n))));var n;if(!Boolean(t))return!1;let i=t.parse(e);return t===fs&&(i=function({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,n/=100;let r=0,o=0,s=0;if(t/=100){const i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;r=wa(a,i,e+1/3),o=wa(a,i,e),s=wa(a,i,e-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 Sa=(e,t)=>{const n=Ta(e),i=Ta(t);if(!n||!i)return xa(e,t);const r={...n};return e=>(r.red=_a(n.red,i.red,e),r.green=_a(n.green,i.green,e),r.blue=_a(n.blue,i.blue,e),r.alpha=ba(n.alpha,i.alpha,e),ps.transform(r))},Ca=new Set(["none","hidden"]);function Aa(e,t){return n=>ba(e,t,n)}function Ea(e){return"number"==typeof e?Aa:"string"==typeof e?No(e)?xa:gs.test(e)?Sa:Ra:Array.isArray(e)?Pa:"object"==typeof e?gs.test(e)?Sa:Na:xa}function Pa(e,t){const n=[...e],i=n.length,r=e.map(((e,n)=>Ea(e)(e,t[n])));return e=>{for(let t=0;t<i;t++)n[t]=r[t](e);return n}}function Na(e,t){const n={...e,...t},i={};for(const r in n)void 0!==e[r]&&void 0!==t[r]&&(i[r]=Ea(e[r])(e[r],t[r]));return e=>{for(const t in i)n[t]=i[t](e);return n}}const Ra=(e,t)=>{const n=Es.createTransformer(t),i=Ts(e),r=Ts(t);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?Ca.has(e)&&!r.values.length||Ca.has(t)&&!i.values.length?function(e,t){return Ca.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):ya(Pa(function(e,t){var n;const i=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],a=e.indexes[s][r[s]],l=null!==(n=e.values[a])&&void 0!==n?n:0;i[o]=l,r[s]++}return i}(i,r),r.values),n):xa(e,t)};function Da(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return ba(e,t,n);return Ea(e)(e,t)}function Oa(e,t,{clamp:n=!0,ease:i,mixer:r}={}){const o=e.length;if(So(o===t.length),1===o)return()=>t[0];if(2===o&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const i=[],r=n||Da,o=e.length-1;for(let s=0;s<o;s++){let n=r(e[s],e[s+1]);if(t){const e=Array.isArray(t)?t[s]||io:t;n=ya(e,n)}i.push(n)}return i}(t,i,r),a=s.length,l=t=>{let n=0;if(a>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const i=va(e[n],e[n+1],t);return s[n](i)};return n?t=>l(Mo(e[0],e[o-1],t)):l}function Ma(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const r=va(0,t,i);e.push(ba(n,1,r))}}(t,e.length-1),t}function La({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const r=(e=>Array.isArray(e)&&"number"!=typeof e[0])(i)?i.map(fa):fa(i),o={done:!1,value:t[0]},s=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:Ma(t),e),a=Oa(s,t,{ease:Array.isArray(r)?r:(l=t,c=r,l.map((()=>c||ha)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(o.value=a(t),o.done=t>=e,o)}}const Va=e=>{const t=({timestamp:t})=>e(t);return{start:()=>so.update(t,!0),stop:()=>ao(t),now:()=>lo.isProcessing?lo.timestamp:qs.now()}},ja={decay:ca,inertia:ca,tween:La,keyframes:La,spring:la},Ia=e=>e/100;class Ua extends Ks{constructor(e){super(e),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:e}=this.options;e&&e()};const{name:t,motionValue:n,element:i,keyframes:r}=this.options,o=(null==i?void 0:i.KeyframeResolver)||ss;this.resolver=new o(r,((e,t)=>this.onKeyframesResolved(e,t)),t,n,i),this.resolver.scheduleResolve()}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=this.options,s=zs(t)?t:ja[t]||La;let a,l;s!==La&&"number"!=typeof e[0]&&(a=ya(Ia,Da(e[0],e[1])),e=[0,100]);const c=s({...this.options,keyframes:e});"mirror"===r&&(l=s({...this.options,keyframes:[...e].reverse(),velocity:-o})),null===c.calculatedDuration&&(c.calculatedDuration=function(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}(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:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.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,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-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 e=Math.min(this.currentTime,c)/d;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,h+1);Boolean(t%2)&&("reverse"===p?(n=1-n,m&&(n-=m/d)):"mirror"===p&&(b=o)),v=Mo(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=no(a,this.options,i)),f&&f(w.value),_&&this.finish(),w}get duration(){const{resolved:e}=this;return e?Yr(e.calculatedDuration):0}get time(){return Yr(this.currentTime)}set time(e){e=Kr(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Yr(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=Va,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();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 e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e: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:e}=this.options;e&&e()}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(e){return this.startTime=0,this.tick(e,!0)}}const Fa=new Set(["opacity","clipPath","filter","transform"]),Ba=(e,t)=>{let n="";const i=Math.max(Math.round(t/10),2);for(let r=0;r<i;r++)n+=e(va(0,i-1,r))+", ";return`linear(${n.substring(0,n.length-2)})`};function za(e){let t;return()=>(void 0===t&&(t=e()),t)}const $a={linearEasing:void 0};function Ha(e,t){const n=za(e);return()=>{var e;return null!==(e=$a[t])&&void 0!==e?e:n()}}const qa=Ha((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}),"linearEasing");function Wa(e){return Boolean("function"==typeof e&&qa()||!e||"string"==typeof e&&(e in Ya||qa())||pa(e)||Array.isArray(e)&&e.every(Wa))}const Ka=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,Ya={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ka([0,.65,.55,1]),circOut:Ka([.55,0,1,.45]),backIn:Ka([.31,.01,.66,-.59]),backOut:Ka([.33,1.53,.69,.99])};function Xa(e,t){return e?"function"==typeof e&&qa()?Ba(e,t):pa(e)?Ka(e):Array.isArray(e)?e.map((e=>Xa(e,t)||Ya.easeOut)):Ya[e]:void 0}function Ga(e,t,n,{delay:i=0,duration:r=300,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const d=Xa(a,r);return Array.isArray(d)&&(c.easing=d),e.animate(c,{delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"})}function Ja(e,t){e.timeline=t,e.onfinish=null}const Za=za((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));const Qa={anticipate:wo,backInOut:bo,circInOut:ko};class el extends Ks{constructor(e){super(e);const{name:t,motionValue:n,element:i,keyframes:r}=this.options;this.resolver=new Bs(r,((e,t)=>this.onKeyframesResolved(e,t)),t,n,i),this.resolver.scheduleResolve()}initPlayback(e,t){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&&qa()&&o in Qa&&(o=Qa[o]),zs((d=this.options).type)||"spring"===d.type||!Wa(d.ease)){const{onComplete:t,onUpdate:n,motionValue:a,element:l,...c}=this.options,d=function(e,t){const n=new Ua({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:e[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"}}(e,c);1===(e=d.keyframes).length&&(e[1]=e[0]),i=d.duration,r=d.times,o=d.ease,s="keyframes"}const u=Ga(a.owner.current,l,e,{...this.options,duration:i,times:r,ease:o});return u.startTime=null!=c?c:this.calcStartTime(),this.pendingTimeline?(Ja(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;a.set(no(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:i,times:r,type:s,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return Yr(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return Yr(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=Kr(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return io;const{animation:n}=t;Ja(n,e)}else this.pendingTimeline=e;return io}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:i,type:r,ease:o,times:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:a,element:l,...c}=this.options,d=new Ua({...c,keyframes:n,duration:i,type:r,ease:o,times:s,isGenerator:!0}),u=Kr(this.time);e.setWithVelocity(d.sample(u-10).value,d.sample(u).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:r,damping:o,type:s}=e;return Za()&&n&&Fa.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!i&&"mirror"!==r&&0!==o&&"inertia"!==s}}const tl=za((()=>void 0!==window.ScrollTimeline));class nl{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map((n=>tl()&&n.attachTimeline?n.attachTimeline(e):t(n)));return()=>{n.forEach(((e,t)=>{e&&e(),this.animations[t].stop()}))}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach((t=>t[e]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const il=(e,t,n,i={},r,o)=>s=>{const a=Qr(i,e)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=Kr(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:r};(function({when:e,delay:t,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,...Zr(e,d)}),d.duration&&(d.duration=Kr(d.duration)),d.repeatDelay&&(d.repeatDelay=Kr(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!==t.get()){const e=no(d.keyframes,a);if(void 0!==e)return so.update((()=>{d.onUpdate(e),d.onComplete()})),new nl([])}return!o&&el.supports(d)?new el(d):new Ua(d)},rl=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),ol=e=>jr(e)?e[e.length-1]||0:e;function sl(e,t){-1===e.indexOf(t)&&e.push(t)}function al(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class ll{constructor(){this.subscriptions=[]}add(e){return sl(this.subscriptions,e),()=>al(this.subscriptions,e)}notify(e,t,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](e,t,n);else for(let r=0;r<i;r++){const i=this.subscriptions[r];i&&i(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class cl{constructor(e,t={}){this.version="11.11.11",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=qs.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=qs.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new ll);const n=this.events[e].add(t);return"change"===e?()=>{n(),so.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=qs.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Ys(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),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 dl(e,t){return new cl(e,t)}function ul(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,dl(n))}const hl=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),pl="data-"+hl("framerAppearId");function ml(e){return e.props[pl]}const fl=e=>Boolean(e&&e.getVelocity);function gl(e,t){const n=e.getValue("willChange");if(i=n,Boolean(fl(i)&&i.add))return n.add(t);var i}function yl({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,i}function vl(e,t,{delay:n=0,transitionOverride:i,type:r}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;i&&(s=i);const c=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const u in l){const t=e.getValue(u,null!==(o=e.latestValues[u])&&void 0!==o?o:null),i=l[u];if(void 0===i||d&&yl(d,u))continue;const r={delay:n,...Qr(s||{},u)};let a=!1;if(window.MotionHandoffAnimation){const t=ml(e);if(t){const e=window.MotionHandoffAnimation(t,u,so);null!==e&&(r.startTime=e,a=!0)}}gl(e,u),t.start(il(u,t,i,e.shouldReduceMotion&&Wr.has(u)?{type:!1}:r,e,a));const h=t.animation;h&&c.push(h)}return a&&Promise.all(c).then((()=>{so.update((()=>{a&&function(e,t){const n=zr(e,t);let{transitionEnd:i={},transition:r={},...o}=n||{};o={...o,...i};for(const s in o)ul(e,s,ol(o[s]))}(e,a)}))})),c}function bl(e,t,n={}){var i;const r=zr(e,t,"exit"===n.type?null===(i=e.presenceContext)||void 0===i?void 0:i.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(vl(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(i=0)=>{const{delayChildren:r=0,staggerChildren:s,staggerDirection:a}=o;return function(e,t,n=0,i=0,r=1,o){const s=[],a=(e.variantChildren.size-1)*i,l=1===r?(e=0)=>e*i:(e=0)=>a-e*i;return Array.from(e.variantChildren).sort(wl).forEach(((e,i)=>{e.notify("AnimationStart",t),s.push(bl(e,t,{...o,delay:n+l(i)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(s)}(e,t,r+i,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then((()=>t()))}return Promise.all([s(),a(n.delay)])}function wl(e,t){return e.sortNodePosition(t)}const xl=Hr.length;function _l(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&_l(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<xl;n++){const i=Hr[n],r=e.props[i];(Ur(r)||!1===r)&&(t[i]=r)}return t}const kl=[...$r].reverse(),Tl=$r.length;function Sl(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let i;if(e.notify("AnimationStart",t),Array.isArray(t)){const r=t.map((t=>bl(e,t,n)));i=Promise.all(r)}else if("string"==typeof t)i=bl(e,t,n);else{const r="function"==typeof t?zr(e,t,n.custom):t;i=Promise.all(vl(e,r,n))}return i.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}function Cl(e){let t=Sl(e),n=Pl(),i=!0;const r=t=>(n,i)=>{var r;const o=zr(e,i,"exit"===t?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);if(o){const{transition:e,transitionEnd:t,...i}=o;n={...n,...i,...t}}return n};function o(o){const{props:s}=e,a=_l(e.parent)||{},l=[],c=new Set;let d={},u=1/0;for(let t=0;t<Tl;t++){const h=kl[t],p=n[h],m=void 0!==s[h]?s[h]:a[h],f=Ur(m),g=h===o?p.isActive:null;!1===g&&(u=t);let y=m===a[h]&&m!==s[h]&&f;if(y&&i&&e.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...d},!p.isActive&&null===g||!m&&!p.prevProp||Vr(m)||"boolean"==typeof m)continue;const v=Al(p.prevProp,m);let b=v||h===o&&p.isActive&&!y&&f||t>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=t=>{b=!0,c.has(t)&&(w=!0,c.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in T){const t=_[e],n=k[e];if(d.hasOwnProperty(e))continue;let i=!1;i=jr(t)&&jr(n)?!Ir(t,n):t!==n,i?null!=t?S(e):c.add(e):void 0!==t&&c.has(e)?S(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=_,p.isActive&&(d={...d,..._}),i&&e.blockInitialAnimation&&(b=!1);b&&(!(y&&v)||w)&&l.push(...x.map((e=>({animation:e,options:{type:h}}))))}if(c.size){const t={};c.forEach((n=>{const i=e.getBaseTarget(n),r=e.getValue(n);r&&(r.liveStyle=!0),t[n]=null!=i?i:null})),l.push({animation:t})}let h=Boolean(l.length);return!i||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(h=!1),i=!1,h?t(l):Promise.resolve()}return{animateChanges:o,setActive:function(t,i){var r;if(n[t].isActive===i)return Promise.resolve();null===(r=e.variantChildren)||void 0===r||r.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,i)})),n[t].isActive=i;const s=o(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Pl(),i=!0}}}function Al(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Ir(t,e)}function El(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Pl(){return{animate:El(!0),whileInView:El(),whileHover:El(),whileTap:El(),whileDrag:El(),whileFocus:El(),exit:El()}}class Nl{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Rl=0;const Dl={animation:{Feature:class extends Nl{constructor(e){super(e),e.animationState||(e.animationState=Cl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Vr(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends Nl{constructor(){super(...arguments),this.id=Rl++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const i=this.node.animationState.setActive("exit",!e);t&&!e&&i.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},Ol=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function Ml(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const Ll=e=>t=>Ol(t)&&e(t,Ml(t));function Vl(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}function jl(e,t,n,i){return Vl(e,t,Ll(n),i)}const Il=(e,t)=>Math.abs(e-t);class Ul{constructor(e,t,{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 e=zl(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Il(e.x,t.x),i=Il(e.y,t.y);return Math.sqrt(n**2+i**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:i}=e,{timestamp:r}=lo;this.history.push({...i,timestamp:r});const{onStart:o,onMove:s}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Fl(t,this.transformPagePoint),so.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=zl("pointercancel"===e.type?this.lastMoveEventInfo:Fl(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),i&&i(e,o)},!Ol(e))return;this.dragSnapToOrigin=r,this.handlers=t,this.transformPagePoint=n,this.contextWindow=i||window;const o=Fl(Ml(e),this.transformPagePoint),{point:s}=o,{timestamp:a}=lo;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,zl(o,this.history)),this.removeListeners=ya(jl(this.contextWindow,"pointermove",this.handlePointerMove),jl(this.contextWindow,"pointerup",this.handlePointerUp),jl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ao(this.updatePoint)}}function Fl(e,t){return t?{point:t(e.point)}:e}function Bl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zl({point:e},t){return{point:e,delta:Bl(e,Hl(t)),offset:Bl(e,$l(t)),velocity:ql(t,.1)}}function $l(e){return e[0]}function Hl(e){return e[e.length-1]}function ql(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const r=Hl(e);for(;n>=0&&(i=e[n],!(r.timestamp-i.timestamp>Kr(t)));)n--;if(!i)return{x:0,y:0};const o=Yr(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 Wl(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const Kl=Wl("dragHorizontal"),Yl=Wl("dragVertical");function Xl(e){let t=!1;if("y"===e)t=Yl();else if("x"===e)t=Kl();else{const e=Kl(),n=Yl();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function Gl(){const e=Xl(!0);return!e||(e(),!1)}function Jl(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}const Zl=.9999,Ql=1.0001,ec=-.01,tc=.01;function nc(e){return e.max-e.min}function ic(e,t,n,i=.5){e.origin=i,e.originPoint=ba(t.min,t.max,e.origin),e.scale=nc(n)/nc(t),e.translate=ba(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Zl&&e.scale<=Ql||isNaN(e.scale))&&(e.scale=1),(e.translate>=ec&&e.translate<=tc||isNaN(e.translate))&&(e.translate=0)}function rc(e,t,n,i){ic(e.x,t.x,n.x,i?i.originX:void 0),ic(e.y,t.y,n.y,i?i.originY:void 0)}function oc(e,t,n){e.min=n.min+t.min,e.max=e.min+nc(t)}function sc(e,t,n){e.min=t.min-n.min,e.max=e.min+nc(t)}function ac(e,t,n){sc(e.x,t.x,n.x),sc(e.y,t.y,n.y)}function lc(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function cc(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}const dc=.35;function uc(e,t,n){return{min:hc(e,t),max:hc(e,n)}}function hc(e,t){return"number"==typeof e?e:e[t]||0}const pc=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),mc=()=>({x:{min:0,max:0},y:{min:0,max:0}});function fc(e){return[e("x"),e("y")]}function gc({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function yc(e){return void 0===e||1===e}function vc({scale:e,scaleX:t,scaleY:n}){return!yc(e)||!yc(t)||!yc(n)}function bc(e){return vc(e)||wc(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function wc(e){return xc(e.x)||xc(e.y)}function xc(e){return e&&"0%"!==e}function _c(e,t,n){return n+t*(e-n)}function kc(e,t,n,i,r){return void 0!==r&&(e=_c(e,r,i)),_c(e,n,i)+t}function Tc(e,t=0,n=1,i,r){e.min=kc(e.min,t,n,i,r),e.max=kc(e.max,t,n,i,r)}function Sc(e,{x:t,y:n}){Tc(e.x,t.translate,t.scale,t.originPoint),Tc(e.y,n.translate,n.scale,n.originPoint)}const Cc=.999999999999,Ac=1.0000000000001;function Ec(e,t){e.min=e.min+t,e.max=e.max+t}function Pc(e,t,n,i,r=.5){Tc(e,t,n,ba(e.min,e.max,r),i)}function Nc(e,t){Pc(e.x,t.x,t.scaleX,t.scale,t.originX),Pc(e.y,t.y,t.scaleY,t.scale,t.originY)}function Rc(e,t){return gc(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(e.getBoundingClientRect(),t))}const Dc=({current:e})=>e?e.ownerDocument.defaultView:null,Oc=new WeakMap;class Mc{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=mc(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new Ul(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Ml(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:i,onDragStart:r}=this.getProps();if(n&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Xl(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),fc((e=>{let t=this.getAxisMotionValue(e).get()||0;if(Fo.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[e];if(i){t=nc(i)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),r&&so.postRender((()=>r(e,t))),gl(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:r,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=t;if(i&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(s),void(null!==this.currentDirection&&r&&r(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>fc((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:Dc(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=t;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&so.postRender((()=>r(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:i}=this.getProps();if(!n||!Lc(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},i){return void 0!==t&&e<t?e=i?ba(t,e,i.min):Math.max(e,t):void 0!==n&&e>n&&(e=i?ba(n,e,i.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,r=this.constraints;t&&Jl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!i)&&function(e,{top:t,left:n,bottom:i,right:r}){return{x:lc(e.x,n,r),y:lc(e.y,t,i)}}(i.layoutBox,t),this.elastic=function(e=dc){return!1===e?e=0:!0===e&&(e=dc),{x:uc(e,"left","right"),y:uc(e,"top","bottom")}}(n),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&fc((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(i.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Jl(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=function(e,t,n){const i=Rc(e,n),{scroll:r}=t;return r&&(Ec(i.x,r.offset.x),Ec(i.y,r.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:cc(e.x,t.x),y:cc(e.y,t.y)}}(i.layout.layoutBox,r);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=gc(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=fc((s=>{if(!Lc(s,t,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?e[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(e,t){const n=this.getAxisMotionValue(e);return gl(this.visualElement,e),n.start(il(e,n,0,t,this.visualElement,!1))}stopAnimation(){fc((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){fc((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),i=n[t];return i||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){fc((t=>{const{drag:n}=this.getProps();if(!Lc(t,n,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(t);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[t];r.set(e[t]-ba(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Jl(t)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};fc((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();i[e]=function(e,t){let n=.5;const i=nc(e),r=nc(t);return r>i?n=va(t.min,t.max-i,e.min):i>r&&(n=va(e.min,e.max-r,t.min)),Mo(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),fc((t=>{if(!Lc(t,e,null))return;const n=this.getAxisMotionValue(t),{min:r,max:o}=this.constraints[t];n.set(ba(r,o,i[t]))}))}addListeners(){if(!this.visualElement.current)return;Oc.set(this.visualElement,this);const e=jl(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Jl(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),so.read(t);const r=Vl(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(fc((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{r(),e(),i(),o&&o()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=dc,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:s}}}function Lc(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Vc=e=>(t,n)=>{e&&so.postRender((()=>e(t,n)))};const jc=F(null);function Ic(){const e=ue(jc);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:i}=e,r=function(){var e=re(H++,11);if(!e.__){for(var t=q.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}();se((()=>i(r)),[]);const o=de((()=>n&&n(r)),[r,n]);return!t&&n?[!1,o]:[!0]}const Uc=F({}),Fc=F({}),Bc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function zc(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const $c={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Bo.test(e))return e;e=parseFloat(e)}return`${zc(e,t.target.x)}% ${zc(e,t.target.y)}%`}},Hc={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,r=Es.parse(e);if(r.length>5)return i;const o=Es.createTransformer(e),s="number"!=typeof r[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;r[0+s]/=a,r[1+s]/=l;const c=ba(a,l,.5);return"number"==typeof r[2+s]&&(r[2+s]/=c),"number"==typeof r[3+s]&&(r[3+s]/=c),o(r)}},qc={};const{schedule:Wc}=oo(queueMicrotask,!1);class Kc extends w{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:i}=this.props,{projection:r}=e;var o;o=Xc,Object.assign(qc,o),r&&(t.group&&t.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()})),Bc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:i,isPresent:r}=this.props,o=n.projection;return o?(o.isPresent=r,i||e.layoutDependency!==t||void 0===t?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||so.postRender((()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Wc.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Yc(e){const[t,n]=Ic(),i=ue(Uc);return z(Kc,{...e,layoutGroup:i,switchLayoutGroup:ue(Fc),isPresent:t,safeToRemove:n})}const Xc={borderRadius:{...$c,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:$c,borderTopRightRadius:$c,borderBottomLeftRadius:$c,borderBottomRightRadius:$c,boxShadow:Hc},Gc=["TopLeft","TopRight","BottomLeft","BottomRight"],Jc=Gc.length,Zc=e=>"string"==typeof e?parseFloat(e):e,Qc=e=>"number"==typeof e||Bo.test(e);function ed(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const td=id(0,.5,_o),nd=id(.5,.95,io);function id(e,t,n){return i=>i<e?0:i>t?1:n(va(e,t,i))}function rd(e,t){e.min=t.min,e.max=t.max}function od(e,t){rd(e.x,t.x),rd(e.y,t.y)}function sd(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ad(e,t,n,i,r){return e=_c(e-=t,1/n,i),void 0!==r&&(e=_c(e,1/r,i)),e}function ld(e,t,[n,i,r],o,s){!function(e,t=0,n=1,i=.5,r,o=e,s=e){Fo.test(t)&&(t=parseFloat(t),t=ba(s.min,s.max,t/100)-s.min);if("number"!=typeof t)return;let a=ba(o.min,o.max,i);e===o&&(a-=t),e.min=ad(e.min,t,n,a,r),e.max=ad(e.max,t,n,a,r)}(e,t[n],t[i],t[r],t.scale,o,s)}const cd=["x","scaleX","originX"],dd=["y","scaleY","originY"];function ud(e,t,n,i){ld(e.x,t,cd,n?n.x:void 0,i?i.x:void 0),ld(e.y,t,dd,n?n.y:void 0,i?i.y:void 0)}function hd(e){return 0===e.translate&&1===e.scale}function pd(e){return hd(e.x)&&hd(e.y)}function md(e,t){return e.min===t.min&&e.max===t.max}function fd(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function gd(e,t){return fd(e.x,t.x)&&fd(e.y,t.y)}function yd(e){return nc(e.x)/nc(e.y)}function vd(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class bd{constructor(){this.members=[]}add(e){sl(this.members,e),e.scheduleRender()}remove(e){if(al(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let i=t;i>=0;i--){const e=this.members[i];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const wd=(e,t)=>e.depth-t.depth;class xd{constructor(){this.children=[],this.isDirty=!1}add(e){sl(this.children,e),this.isDirty=!0}remove(e){al(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(wd),this.isDirty=!1,this.children.forEach(e)}}function _d(e){const t=fl(e)?e.get():e;return rl(t)?t.toValue():t}const kd={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Td="undefined"!=typeof window&&void 0!==window.MotionDebug,Sd=["","X","Y","Z"],Cd={visibility:"hidden"};let Ad=0;function Ed(e,t,n,i){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),i&&(i[e]=0))}function Pd(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ml(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",so,!(t||i))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&Pd(i)}function Nd({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=Ad++,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,Td&&(kd.totalNodes=kd.resolvedTargetDeltas=kd.recalculatedProjection=0),this.nodes.forEach(Od),this.nodes.forEach(Fd),this.nodes.forEach(Bd),this.nodes.forEach(Md),Td&&window.MotionDebug.record(kd)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,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 t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new xd)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ll),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var i;this.isSVG=(i=t)instanceof SVGElement&&"svg"!==i.tagName,this.instance=t;const{layoutId:r,layout:o,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||r)&&(this.isLayoutDirty=!0),e){let n;const i=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=qs.now(),i=({timestamp:r})=>{const o=r-n;o>=t&&(ao(i),e(o-t))};return so.read(i,!0),()=>ao(i)}(i,250),Bc.hasAnimatedSinceResize&&(Bc.hasAnimatedSinceResize=!1,this.nodes.forEach(Ud))}))}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&s&&(r||o)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const r=this.options.transition||s.getDefaultTransition()||Kd,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!gd(this.targetLayout,i)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...Qr(r,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Ud(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ao(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(zd),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Pd(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let r=0;r<this.path.length;r++){const e=this.path[r];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Vd);this.isUpdating||this.nodes.forEach(jd),this.isUpdating=!1,this.nodes.forEach(Id),this.nodes.forEach(Rd),this.nodes.forEach(Dd),this.clearAllSnapshots();const e=qs.now();lo.delta=Mo(0,1e3/60,e-lo.timestamp),lo.timestamp=e,lo.isProcessing=!0,co.update.process(lo),co.preRender.process(lo),co.render.process(lo),lo.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Wc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ld),this.sharedNodes.forEach($d)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,so.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){so.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 e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=mc(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=i(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!r)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!pd(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;e&&(t||bc(this.latestValues)||o)&&(r(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var i;return e&&(n=this.removeTransform(n)),Gd((i=n).x),Gd(i.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return mc();const n=t.measureViewportBox();if(!((null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)||this.path.some(Zd))){const{scroll:e}=this.root;e&&(Ec(n.x,e.offset.x),Ec(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n=mc();if(od(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let i=0;i<this.path.length;i++){const t=this.path[i],{scroll:r,options:o}=t;t!==this.root&&r&&o.layoutScroll&&(r.wasRoot&&od(n,e),Ec(n.x,r.offset.x),Ec(n.y,r.offset.y))}return n}applyTransform(e,t=!1){const n=mc();od(n,e);for(let i=0;i<this.path.length;i++){const e=this.path[i];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&Nc(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),bc(e.latestValues)&&Nc(n,e.latestValues)}return bc(this.latestValues)&&Nc(n,this.latestValues),n}removeTransform(e){const t=mc();od(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!bc(e.latestValues))continue;vc(e.latestValues)&&e.updateSnapshot();const i=mc();od(i,e.measurePageBox()),ud(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,i)}return bc(this.latestValues)&&ud(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.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!==lo.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;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(!(e||i&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:o}=this.options;if(this.layout&&(r||o)){if(this.resolvedRelativeTargetAt=lo.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mc(),this.relativeTargetOrigin=mc(),ac(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),od(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=mc(),this.targetWithTransforms=mc()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,oc(s.x,a.x,l.x),oc(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):od(this.target,this.layout.layoutBox),Sc(this.target,this.targetDelta)):od(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mc(),this.relativeTargetOrigin=mc(),ac(this.relativeTargetOrigin,this.target,e.target),od(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Td&&kd.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!vc(this.parent.latestValues)&&!wc(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 e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let i=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===lo.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;od(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,i=!1){const r=n.length;if(!r)return;let o,s;t.x=t.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&&Nc(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Sc(e,s)),i&&bc(o.latestValues)&&Nc(e,o.latestValues))}t.x<Ac&&t.x>Cc&&(t.x=1),t.y<Ac&&t.y>Cc&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms=mc());const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(sd(this.prevProjectionDelta.x,this.projectionDelta.x),sd(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),rc(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&vd(this.projectionDelta.x,this.prevProjectionDelta.x)&&vd(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Td&&kd.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=pc(),this.projectionDelta=pc(),this.projectionDeltaWithTransform=pc()}setAnimationOrigin(e,t=!1){const n=this.snapshot,i=n?n.latestValues:{},r={...this.latestValues},o=pc();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s=mc(),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(Wd));let u;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,h,p,m,f,g;Hd(o.x,e.x,n),Hd(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ac(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=s,g=n,qd(p.x,m.x,f.x,g),qd(p.y,m.y,f.y,g),u&&(l=this.relativeTarget,h=u,md(l.x,h.x)&&md(l.y,h.y))&&(this.isProjectionDirty=!1),u||(u=mc()),od(u,this.relativeTarget)),a&&(this.animationValues=r,function(e,t,n,i,r,o){r?(e.opacity=ba(0,void 0!==n.opacity?n.opacity:1,td(i)),e.opacityExit=ba(void 0!==t.opacity?t.opacity:1,0,nd(i))):o&&(e.opacity=ba(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<Jc;s++){const r=`border${Gc[s]}Radius`;let o=ed(t,r),a=ed(n,r);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||Qc(o)===Qc(a)?(e[r]=Math.max(ba(Zc(o),Zc(a),i),0),(Fo.test(a)||Fo.test(o))&&(e[r]+="%")):e[r]=a)}(t.rotate||n.rotate)&&(e.rotate=ba(t.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(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ao(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=so.update((()=>{Bc.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const i=fl(e)?e:dl(e);return i.start(il("",i,t,n)),i.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.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 e=this.getStack();e&&e.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 e=this.getLead();let{targetWithTransforms:t,target:n,layout:i,latestValues:r}=e;if(t&&n&&i){if(this!==e&&this.layout&&i&&Jd(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||mc();const t=nc(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const i=nc(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+i}od(t,n),Nc(t,r),rc(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new bd);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const i={};n.z&&Ed("z",e,i,this.animationValues);for(let r=0;r<Sd.length;r++)Ed(`rotate${Sd[r]}`,e,i,this.animationValues),Ed(`skew${Sd[r]}`,e,i,this.animationValues);e.render();for(const r in i)e.setStaticValue(r,i[r]),this.animationValues&&(this.animationValues[r]=i[r]);e.scheduleRender()}getProjectionStyles(e){var t,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=_d(null==e?void 0:e.pointerEvents)||"",i.transform=r?r(this.latestValues,""):"none",i;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=_d(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!bc(this.latestValues)&&(t.transform=r?r({},""):"none",this.hasProjected=!1),t}const s=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=function(e,t,n){let i="";const r=e.x.translate/t.x,o=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((r||o||s)&&(i=`translate3d(${r}px, ${o}px, ${s}px) `),1===t.x&&1===t.y||(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:r,rotateY:o,skewX:s,skewY:a}=n;e&&(i=`perspective(${e}px) ${i}`),t&&(i+=`rotate(${t}deg) `),r&&(i+=`rotateX(${r}deg) `),o&&(i+=`rotateY(${o}deg) `),s&&(i+=`skewX(${s}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.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!==(t=s.opacity)&&void 0!==t?t: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 qc){if(void 0===s[c])continue;const{correct:e,applyTo:t}=qc[c],n="none"===i.transform?s[c]:e(s[c],o);if(t){const e=t.length;for(let r=0;r<e;r++)i[t[r]]=n}else i[c]=n}return this.options.layoutId&&(i.pointerEvents=o===this?_d(null==e?void 0:e.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Vd),this.root.sharedNodes.clear()}}}function Rd(e){e.updateLayout()}function Dd(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:i}=e.layout,{animationType:r}=e.options,o=n.source!==e.layout.source;"size"===r?fc((e=>{const i=o?n.measuredBox[e]:n.layoutBox[e],r=nc(i);i.min=t[e].min,i.max=i.min+r})):Jd(r,n.layoutBox,t)&&fc((i=>{const r=o?n.measuredBox[i]:n.layoutBox[i],s=nc(t[i]);r.max=r.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[i].max=e.relativeTarget[i].min+s)}));const s=pc();rc(s,t,n.layoutBox);const a=pc();o?rc(a,e.applyTransform(i,!0),n.measuredBox):rc(a,t,n.layoutBox);const l=!pd(s);let c=!1;if(!e.resumeFrom){const i=e.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:r,layout:o}=i;if(r&&o){const s=mc();ac(s,n.layoutBox,r.layoutBox);const a=mc();ac(a,t,o.layoutBox),gd(s,a)||(c=!0),i.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=i)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Od(e){Td&&kd.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Md(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ld(e){e.clearSnapshot()}function Vd(e){e.clearMeasurements()}function jd(e){e.isLayoutDirty=!1}function Id(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ud(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Fd(e){e.resolveTargetDelta()}function Bd(e){e.calcProjection()}function zd(e){e.resetSkewAndRotation()}function $d(e){e.removeLeadSnapshot()}function Hd(e,t,n){e.translate=ba(t.translate,0,n),e.scale=ba(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function qd(e,t,n,i){e.min=ba(t.min,n.min,i),e.max=ba(t.max,n.max,i)}function Wd(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Kd={duration:.45,ease:[.4,0,.1,1]},Yd=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Xd=Yd("applewebkit/")&&!Yd("chrome/")?Math.round:io;function Gd(e){e.min=Xd(e.min),e.max=Xd(e.max)}function Jd(e,t,n){return"position"===e||"preserve-aspect"===e&&(i=yd(t),r=yd(n),o=.2,!(Math.abs(i-r)<=o));var i,r,o}function Zd(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Qd=Nd({attachResizeListener:(e,t)=>Vl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),eu={current:void 0},tu=Nd({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!eu.current){const e=new Qd({});e.mount(window),e.setOptions({layoutScroll:!0}),eu.current=e}return eu.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),nu={pan:{Feature:class extends Nl{constructor(){super(...arguments),this.removePointerDownListener=io}onPointerDown(e){this.session=new Ul(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Dc(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Vc(e),onStart:Vc(t),onMove:n,onEnd:(e,t)=>{delete this.session,i&&so.postRender((()=>i(e,t)))}}}mount(){this.removePointerDownListener=jl(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Nl{constructor(e){super(e),this.removeGroupControls=io,this.removeListeners=io,this.controls=new Mc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||io}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:tu,MeasureLayout:Yc}};function iu(e,t){const n=t?"pointerenter":"pointerleave",i=t?"onHoverStart":"onHoverEnd";return jl(e.current,n,((n,r)=>{if("touch"===n.pointerType||Gl())return;const o=e.getProps();e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",t);const s=o[i];s&&so.postRender((()=>s(n,r)))}),{passive:!e.getProps()[i]})}const ru=(e,t)=>!!t&&(e===t||ru(e,t.parentElement));function ou(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ml(n))}const su=new WeakMap,au=new WeakMap,lu=e=>{const t=su.get(e.target);t&&t(e)},cu=e=>{e.forEach(lu)};function du(e,t,n){const i=function({root:e,...t}){const n=e||document;au.has(n)||au.set(n,{});const i=au.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(cu,{root:e,...t})),i[r]}(t);return su.set(e,n),i.observe(e),()=>{su.delete(e),i.unobserve(e)}}const uu={some:0,all:1};const hu={inView:{Feature:class extends Nl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:i="some",once:r}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:uu[i]};return du(this.node.current,o,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,r&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=t?n:i;o&&o(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Nl{constructor(){super(...arguments),this.removeStartListeners=io,this.removeEndListeners=io,this.removeAccessibleListeners=io,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=jl(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i,globalTapTarget:r}=this.node.getProps(),o=r||ru(this.node.current,e.target)?n:i;o&&so.update((()=>o(e,t)))}),{passive:!(n.onTap||n.onPointerUp)}),r=jl(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=ya(i,r),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=Vl(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=Vl(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&ou("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&so.postRender((()=>n(e,t)))}))})),ou("down",((e,t)=>{this.startPress(e,t)}))})),t=Vl(this.node.current,"blur",(()=>{this.isPressing&&ou("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=ya(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&so.postRender((()=>n(e,t)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Gl()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&so.postRender((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=jl(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=Vl(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ya(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Nl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&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=ya(Vl(this.node.current,"focus",(()=>this.onFocus())),Vl(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Nl{mount(){this.unmount=ya(iu(this.node,!0),iu(this.node,!1))}unmount(){}}}},pu={layout:{ProjectionNode:tu,MeasureLayout:Yc}},mu=F({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),fu=F({}),gu="undefined"!=typeof window,yu=gu?ae:se,vu=F({strict:!1});function bu(e,t,n,i,r){var o,s;const{visualElement:a}=ue(fu),l=ue(vu),c=ue(jc),d=ue(mu).reducedMotion,u=le();i=i||l.renderer,!u.current&&i&&(u.current=i(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:d}));const h=u.current,p=ue(Fc);!h||h.projection||!r||"html"!==h.type&&"svg"!==h.type||function(e,t,n,i){const{layoutId:r,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:wu(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:Boolean(s)||a&&Jl(a),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:c})}(u.current,n,r,p);const m=le(!1);Wi((()=>{h&&m.current&&h.update(n,c)}));const f=n[pl],g=le(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 yu((()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),Wc.render(h.render),g.current&&h.animationState&&h.animationState.animateChanges())})),se((()=>{h&&(!g.current&&h.animationState&&h.animationState.animateChanges(),g.current&&(queueMicrotask((()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,f)})),g.current=!1))})),h}function wu(e){if(e)return!1!==e.options.allowProjection?e.projection:wu(e.parent)}function xu(e,t,n){return de((i=>{i&&e.mount&&e.mount(i),t&&(i?t.mount(i):t.unmount()),n&&("function"==typeof n?n(i):Jl(n)&&(n.current=i))}),[t])}function _u(e){return Vr(e.animate)||Hr.some((t=>Ur(e[t])))}function ku(e){return Boolean(_u(e)||e.variants)}function Tu(e){const{initial:t,animate:n}=function(e,t){if(_u(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Ur(t)?t:void 0,animate:Ur(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,ue(fu));return ce((()=>({initial:t,animate:n})),[Su(t),Su(n)])}function Su(e){return Array.isArray(e)?e.join(" "):e}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"]},Au={};for(const Zh in Cu)Au[Zh]={isEnabled:e=>Cu[Zh].some((t=>!!e[t]))};const Eu=Symbol.for("motionComponentSymbol");function Pu({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:i,Component:r}){e&&function(e){for(const t in e)Au[t]={...Au[t],...e[t]}}(e);const o=function(e){function t(t){var n=bi({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=ki,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}((function(e,o){let s;const a={...ue(mu),...e,layoutId:Nu(e)},{isStatic:l}=a,c=Tu(e),d=i(e,l);if(!l&&gu){ue(vu).strict;const e=function(e){const{drag:t,layout:n}=Au;if(!t&&!n)return{};const i={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(a);s=e.MeasureLayout,c.visualElement=bu(r,d,a,t,e.ProjectionNode)}return z(fu.Provider,{value:c,children:[s&&c.visualElement?z(s,{visualElement:c.visualElement,...a}):null,n(r,e,xu(d,c.visualElement,o),d,l,c.visualElement)]})}));return o[Eu]=r,o}function Nu({layoutId:e}){const t=ue(Uc).id;return t&&void 0!==e?t+"-"+e:e}const Ru=["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 Du(e){return"string"==typeof e&&!e.includes("-")&&!!(Ru.indexOf(e)>-1||/[A-Z]/u.test(e))}function Ou(e,{style:t,vars:n},i,r){Object.assign(e.style,t,r&&r.getProjectionStyles(i));for(const o in n)e.style.setProperty(o,n[o])}const Mu=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 Lu(e,t,n,i){Ou(e,t,void 0,i);for(const r in t.attrs)e.setAttribute(Mu.has(r)?r:hl(r),t.attrs[r])}function Vu(e,{layout:t,layoutId:n}){return Wr.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!qc[e]||"opacity"===e)}function ju(e,t,n){var i;const{style:r}=e,o={};for(const s in r)(fl(r[s])||t.style&&fl(t.style[s])||Vu(s,e)||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 Iu(e,t,n){const i=ju(e,t,n);for(const r in e)if(fl(e[r])||fl(t[r])){i[-1!==qr.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]}return i}const Uu=e=>(t,n)=>{const i=ue(fu),r=ue(jc),o=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},i,r,o){const s={latestValues:Fu(i,r,o,e),renderState:t()};return n&&(s.mount=e=>n(i,e,s)),s}(e,t,i,r);return n?o():function(e){const t=le(null);return null===t.current&&(t.current=e()),t.current}(o)};function Fu(e,t,n,i){const r={},o=i(e,{});for(const h in o)r[h]=_d(o[h]);let{initial:s,animate:a}=e;const l=_u(e),c=ku(e);t&&c&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let d=!!n&&!1===n.initial;d=d||!1===s;const u=d?a:s;if(u&&"boolean"!=typeof u&&!Vr(u)){const t=Array.isArray(u)?u:[u];for(let n=0;n<t.length;n++){const i=Br(e,t[n]);if(i){const{transitionEnd:e,transition:t,...n}=i;for(const i in n){let e=n[i];if(Array.isArray(e)){e=e[d?e.length-1:0]}null!==e&&(r[i]=e)}for(const i in e)r[i]=e[i]}}}return r}const Bu=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),zu=()=>({...Bu(),attrs:{}}),$u=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Hu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qu=qr.length;function Wu(e,t,n){const{style:i,vars:r,transformOrigin:o}=e;let s=!1,a=!1;for(const l in t){const e=t[l];if(Wr.has(l))s=!0;else if(Eo(l))r[l]=e;else{const t=$u(e,Vs[l]);l.startsWith("origin")?(a=!0,o[l]=t):i[l]=t}}if(t.transform||(s||n?i.transform=function(e,t,n){let i="",r=!0;for(let o=0;o<qu;o++){const s=qr[o],a=e[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 e=$u(a,Vs[s]);l||(r=!1,i+=`${Hu[s]||s}(${e}) `),n&&(t[s]=e)}}return i=i.trim(),n?i=n(t,r?"":i):r&&(i="none"),i}(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;i.transformOrigin=`${e} ${t} ${n}`}}function Ku(e,t,n){return"string"==typeof e?e:Bo.transform(t+n*e)}const Yu={offset:"stroke-dashoffset",array:"stroke-dasharray"},Xu={offset:"strokeDashoffset",array:"strokeDasharray"};function Gu(e,{attrX:t,attrY:n,attrScale:i,originX:r,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},d,u){if(Wu(e,c,u),d)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:m}=e;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(void 0!==r||void 0!==o||p.transform)&&(p.transformOrigin=function(e,t,n){return`${Ku(t,e.x,e.width)} ${Ku(n,e.y,e.height)}`}(m,void 0!==r?r:.5,void 0!==o?o:.5)),void 0!==t&&(h.x=t),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&function(e,t,n=1,i=0,r=!0){e.pathLength=1;const o=r?Yu:Xu;e[o.offset]=Bo.transform(-i);const s=Bo.transform(t),a=Bo.transform(n);e[o.array]=`${s} ${a}`}(h,s,a,l,!1)}const Ju=e=>"string"==typeof e&&"svg"===e.toLowerCase(),Zu={useVisualState:Uu({scrapeMotionValuesFromProps:Iu,createRenderState:zu,onMount:(e,t,{renderState:n,latestValues:i})=>{so.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}})),so.render((()=>{Gu(n,i,Ju(t.tagName),e.transformTemplate),Lu(t,n)}))}})},Qu={useVisualState:Uu({scrapeMotionValuesFromProps:ju,createRenderState:Bu})};function eh(e,t,n){for(const i in t)fl(t[i])||Vu(i,n)||(e[i]=t[i])}function th(e,t){const n={};return eh(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return ce((()=>{const n=Bu();return Wu(n,t,e),Object.assign({},n.vars,n.style)}),[t])}(e,t)),n}function nh(e,t){const n={},i=th(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const ih=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 rh(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ih.has(e)}let oh=e=>!rh(e);try{(sh=require("@emotion/is-prop-valid").default)&&(oh=e=>e.startsWith("on")?!rh(e):sh(e))}catch(Jh){}var sh;function ah(e,t,n,i){const r=ce((()=>{const n=zu();return Gu(n,t,Ju(i),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};eh(t,e.style,e),r.style={...t,...r.style}}return r}function lh(e=!1){return(t,n,i,{latestValues:r},o)=>{const s=(Du(t)?ah:nh)(n,r,o,t),a=function(e,t,n){const i={};for(const r in e)"values"===r&&"object"==typeof e.values||(oh(r)||!0===n&&rh(r)||!t&&!rh(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}(n,"string"==typeof t,e),l=t!==b?{...a,...s,ref:i}:{},{children:c}=n;return y(t,{...l,children:ce((()=>fl(c)?c.get():c),[c])})}}function ch(e,t){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return Pu({...Du(n)?Zu:Qu,preloadedFeatures:e,useRender:lh(i),createVisualElement:t,Component:n})}}const dh={current:null},uh={current:!1};const hh=new WeakMap,ph=[...Qo,gs,Es],mh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class fh{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,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=ss,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 e=qs.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,so.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=_u(t),this.isVariantNode=ku(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const u in d){const e=d[u];void 0!==a[u]&&fl(e)&&e.set(a[u],!1)}}mount(e){this.current=e,hh.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),uh.current||function(){if(uh.current=!0,gu)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>dh.current=e.matches;e.addListener(t),t()}else dh.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||dh.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){hh.delete(this.current),this.projection&&this.projection.unmount(),ao(this.notifyUpdate),ao(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=Wr.has(e),i=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&so.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),r=t.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{i(),r(),o&&o(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Au){const t=Au[e];if(!t)continue;const{isEnabled:n,Feature:i}=t;if(!this.features[e]&&i&&n(this.props)&&(this.features[e]=new i(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):mc()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<mh.length;n++){const t=mh[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const i=e["on"+t];i&&(this.propEventSubscriptions[t]=this.on(t,i))}this.prevMotionValues=function(e,t,n){for(const i in t){const r=t[i],o=n[i];if(fl(r))e.addValue(i,r);else if(fl(o))e.addValue(i,dl(r,{owner:e}));else if(o!==r)if(e.hasValue(i)){const t=e.getValue(i);!0===t.liveStyle?t.jump(r):t.hasAnimated||t.set(r)}else{const t=e.getStaticValue(i);e.addValue(i,dl(void 0!==t?t:r,{owner:e}))}}for(const i in n)void 0===t[i]&&e.removeValue(i);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=dl(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let i=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=i&&("string"==typeof i&&(Co(i)||To(i))?i=parseFloat(i):(r=i,!ph.find(Zo(r))&&Es.test(t)&&(i=Us(e,t))),this.setBaseTarget(e,fl(i)?i.get():i)),fl(i)?i.get():i}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let i;if("string"==typeof n||"object"==typeof n){const r=Br(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);r&&(i=r[e])}if(n&&void 0!==i)return i;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||fl(r)?void 0!==this.initialValues[e]&&void 0===i?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new ll),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class gh extends fh{constructor(){super(...arguments),this.KeyframeResolver=Bs}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}}class yh extends gh{constructor(){super(...arguments),this.type="html",this.renderInstance=Ou}readValueFromInstance(e,t){if(Wr.has(t)){const e=Is(t);return e&&e.default||0}{const i=(n=e,window.getComputedStyle(n)),r=(Eo(t)?i.getPropertyValue(t):i[t])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Rc(e,t)}build(e,t,n){Wu(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return ju(e,t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;fl(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}class vh extends gh{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mc}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Wr.has(t)){const e=Is(t);return e&&e.default||0}return t=Mu.has(t)?t:hl(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Iu(e,t,n)}build(e,t,n){Gu(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,i){Lu(e,t,0,i)}mount(e){this.isSVGTag=Ju(e.tagName),super.mount(e)}}const bh=Lr(ch({...Dl,...hu,...nu,...pu},((e,t)=>Du(e)?new vh(t):new yh(t,{allowProjection:e!==b}))));var wh=(e=>(e.EmailAddress="EmailAddress",e.MobileNumber="MobileNumber",e.CustomerId="CustomerId",e))(wh||{});const xh=[{searchType:"EmailAddress",name:"Email Address",label:"emailAddress"},{searchType:"MobileNumber",name:"Mobile Number",label:"mobileNumber"},{searchType:"CustomerId",name:"PBA Customer Id",label:"customerId"}];var _h=(e=>(e.Established="Established",e.Unestablished="Unestablished",e))(_h||{});const kh=e=>!!/\+\d{1,14}$/.test(e),Th=e=>!!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),Sh=()=>{const[e,t]=oe([]),[n,i]=oe(!1),[r,o]=oe(""),[s,a]=oe(!1),[l,c]=oe(!1),d=le(),u=le(),h=le({searchType:wh.MobileNumber,searchValue:""}),p=de((async(e,n)=>{let r;if(h.current={searchType:e,searchValue:n},i(!0),a(!1),o(""),e===wh.EmailAddress)r=(async e=>{if(!Zn)throw new Error("Api has not been initialized");const t=(e=>({emailAddress:e}))(e);return(await Zn.post("/_admin/v1.0/customers/emailAddress",JSON.stringify(t))).data})(n);else if(e===wh.MobileNumber)r=(async e=>{if(!Zn)throw new Error("Api has not been initialized");const t={mobileNumber:e},n=[],i=await Zn.post("/_admin/v1.0/customer/mobileNumber",JSON.stringify(t));return n.push(i.data),n})(n);else{if(e!==wh.CustomerId)return i(!1),void o("Invalid search type.");r=(async e=>{if(!Zn)throw new Error("Api has not been initialized");const t=[],n=await Zn.get(`/_admin/v1.0/customer/${e}`);return t.push(n.data),t})(n)}r.then((e=>{t(e),i(!1),e.length>0?(d.current=e[0].id,a(!0)):o("No results found!")})).catch((()=>{o("Error: Unable to Retrieve Customer Information."),i(!1)}))}),[]),m=async()=>{await p(h.current.searchType,h.current.searchValue)},f=async(e,t)=>{d.current&&(await(async(e,t,n)=>{if(!Qn)throw new Error("Api has not been initialized");const i={mobileNumber:t,reason:n};await Qn.put(`/_admin/v1.0/customers/${e}/mobileNumber`,JSON.stringify(i))})(d.current,e,t),h.current.searchType===wh.MobileNumber&&(h.current.searchValue=e),await m())},g=async(e,t)=>{d.current&&(await(async(e,t,n)=>{if(!Qn)throw new Error("Api has not been initialized");const i={emailAddress:t,reason:n};await Qn.put(`/_admin/v1.0/customers/${e}/emailAddress`,JSON.stringify(i))})(d.current,e,t),await m())};return{searchFilter:h,searchCustomerResult:e,isLoading:n,isModalOpen:l,error:r,showCustomerDetails:s,searchCustomer:p,handleAction:async t=>{const{action:n}=t;switch(n){case"workplaceUnlink":await(async t=>{e.find((e=>e.apolloProfiles.find((e=>e.profileId===t&&e.status===_h.Established))))&&(c(!0),u.current=t)})(t.profileId);break;case"updateMobileNumber":await f(t.mobileNumber,t.reason);break;case"updateEmailAddress":await g(t.emailAddress,t.reason);break;default:console.error(`Unhandled action type: ${n}`)}},handleModalConfirm:async()=>{u.current&&(async e=>{if(!Zn)throw new Error("Api has not been initialized");await Zn.put(`/_admin/v1.0/workplace-link/${e}/unestablish`)})(u.current).then((async()=>{await m()})).catch((()=>{o("Error: Unable to Unlink Profile.")})).finally((()=>{c(!1)}))},handleModalCancel:async()=>{c(!1)}}},Ch=()=>{const[e,t]=oe(wh.MobileNumber),[n,i]=oe("+61"),[r,o]=oe({emailAddress:"",mobileNumber:"",customerId:""}),s=de((()=>{o({emailAddress:"",mobileNumber:"",customerId:""})}),[]),a=de((e=>!!kh(e)||(o((e=>({...e,mobileNumber:"Invalid Mobile Number!"}))),!1)),[]),l=de(((e,t)=>{const n=e.trim();if(!n){const{label:e,name:n}=(e=>{const t=xh.find((t=>wh[t.searchType]===wh[e]));return t?{name:t.name,label:t.label}:{name:"",label:""}})(t);return o((t=>({...t,[e]:`Empty ${n}`}))),!1}return!(t===wh.EmailAddress&&!Th(n))||(o((e=>({...e,emailAddress:"Invalid Email Address!"}))),!1)}),[]);return{searchType:e,searchValue:n,errors:r,setSearchType:t,setSearchValue:i,clearErrors:s,isValidSearch:de(((e,t)=>{switch(e){case wh.EmailAddress:case wh.CustomerId:return l(t,e);case wh.MobileNumber:return a(t);default:return!1}}),[l,a])}},Ah=({labelText:e,name:t,type:n,value:i,pattern:r,className:o,allowedKeyPattern:s,required:a,onClick:l,onChange:c,...d})=>{const u=de((e=>{s&&!s.test(e.key)&&e.preventDefault()}),[s]);return z(b,{children:[e&&z("label",{className:"block text-sm font-bold text-gray-700",children:e}),z("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:t,type:n,value:i,onKeyPress:u,pattern:r,onClick:l,onChange:c,...d})]})},Eh=({message:e,className:t,onClick:n})=>z("div",{className:t,onClick:n,children:e}),Ph=e=>{const{searchType:t,searchValue:n,errors:i,setSearchType:r,setSearchValue:o,clearErrors:s,isValidSearch:a}=Ch(),[l,c]=oe(!0),d=()=>{s(),c(!1)},u=e=>{const t=e.currentTarget;c(!1),o(t.value),s()};return z(b,{children:z("div",{className:"flex flex-col p-2",children:[z("label",{className:"block text-sm font-bold text-gray-700",children:"Search for PBA Customer with Email Address, Mobile Number or CustomerId :"}),z("form",{className:"w-1/3",onSubmit:i=>{i.preventDefault(),a(t,n)&&(c(!0),e.onSubmit(t,n))},children:[z("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:t,onChange:e=>{s();const t=e.currentTarget.value;r(t),o("")},"data-testid":"select",children:xh.map((e=>z("option",{value:e.searchType,children:e.name},e.searchType)))}),z("div",{className:"sm:flex justify-between sm:mt-6 mt-2",children:[t===wh.EmailAddress&&z(Ah,{labelText:"Email Address",name:"emailAddress",placeholder:"users@email.com",type:"text",value:n,className:"sm:w-3/5",onClick:d,onChange:u}),t===wh.MobileNumber&&z(Ah,{allowedKeyPattern:/[0-9+]/,labelText:"Mobile Number",name:"mobileNumber",placeholder:"+619999999999",type:"tel",value:n,className:"sm:w-3/5",onClick:d,onChange:u}),t===wh.CustomerId&&z(Ah,{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})]}),z("div",{className:"mt-2",children:Object.values(i).map(((e,t)=>z(Eh,{message:e,className:"text-sm text-red-600 sm:text-right"},t)))}),z("div",{className:"sm:flex justify-end sm:mt-6",children:z("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"})})]})]})})},Nh=e=>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,...e},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})),Rh=e=>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,...e},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})),Dh=e=>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,...e},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"})),Oh=e=>y("svg",{fill:"#000000",width:"800px",height:"800px",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",...e},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"})),Mh=e=>y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"green",className:"w-5 h-5",...e},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"})),Lh=e=>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",...e},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"})),Vh=e=>{const t=new Date(e);return new Date(t.getTime()-6e4*t.getTimezoneOffset()).toISOString().substring(0,10)},jh=e=>{const[t,n]=oe(e.data.apolloProfiles.length>0),i=e.data.apolloProfiles.length>0,r=ce((()=>e.data.apolloProfiles.slice().sort(((e,t)=>{const n=e.status.localeCompare(t.status);return 0!==n?n:e.profileId.localeCompare(t.profileId)}))),[e.data.apolloProfiles]),o=()=>z(b,{children:z(t?Rh:Nh,{className:"h-6 w-6 border-0 cursor-pointer"})});return z(b,{children:[z("tr",{className:"divide-x divide-gray-200",children:[z("td",{className:"whitespace-nowrap px-2 text-sm",children:z("span",{onClick:()=>{i&&n(!t)},children:[!i&&z(Dh,{className:"h-6 w-6 border-0"}),i&&z(o,{})]})}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.id}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.name?.firstName}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.name?.lastName}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:z("div",{className:"flex justify-between items-center",children:[e.data.email?.value,e.data?.email?.isVerified&&z(Mh,{className:"h-4 w-4 border-0"}),e.searchType!==wh.EmailAddress&&z("span",{onClick:()=>e.onEdit("emailAddress"),children:z(Lh,{className:"h-4 w-4 ml-2 border-0 cursor-pointer hover:text-blue-500"})})]})}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:z("div",{className:"flex justify-between items-center",children:[e.data.mobileNumber,e.searchType!==wh.EmailAddress&&z("span",{onClick:()=>e.onEdit("mobileNumber"),children:z(Lh,{className:"h-4 w-4 ml-2 border-0 cursor-pointer hover:text-blue-500"})})]})}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.kyc?.address.state}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.kyc?.dateOfBirth.substring(0,10)}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.kyc?"True":"False"})]},e.key),t&&z(b,{children:z("tr",{className:"divide-x divide-gray-200",children:z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",colspan:10,children:[z("label",{className:"block text-sm font-bold text-gray-700",children:"Apollo Profiles"}),z("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:z("table",{className:"min-w-full divide-y divide-gray-500",children:[z("thead",{className:"bg-gray-50",children:z("tr",{className:"divide-x divide-gray-200",children:[z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Profile ID"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Account ID"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Partner ID"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Status"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Date"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Account Name"}),z("th",{className:"relative py-3.5 pl-3 pr-4 sm:pr-6",children:z("span",{className:"sr-only",children:"Action"})})]})}),z("tbody",{className:"divide-y divide-gray-200 bg-white",children:r.map(((t,n)=>z("tr",{className:"divide-x divide-gray-200",children:[z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.profileId}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.accountId}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.partnerId}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.status}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:Vh(t.statusUpdatedAtUtc)}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.accountName}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:z("span",{onClick:()=>e.onAction({action:"workplaceUnlink",profileId:t.profileId}),children:z(Oh,{className:"h-6 w-6 border-0 "+(t.status===_h.Established?"cursor-pointer":"cursor-not-allowed opacity-50")})})})]},n)))})]})})]})})})]})},Ih=e=>z("div",{className:"-mx-4 mt-8 sm:-mx-4",children:z("div",{className:"inline-block min-w-full overflow-x-auto shadow border-b border-gray-200 align-middle sm:rounded-lg",children:z("table",{className:"min-w-full divide-y divide-gray-500",children:[z("thead",{className:"bg-gray-50",children:z("tr",{className:"divide-x divide-gray-200",children:[z("th",{className:"relative py-3.5 pl-3 pr-4 sm:pr-6",children:z("span",{className:"sr-only",children:"Action"})}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Customer ID"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"First Name"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Last Name"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Email"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Mobile"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"State"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"DOB"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"KYC Check"})]})}),z("tbody",{className:"divide-y divide-gray-200 bg-white",children:e.data.map(((t,n)=>z(jh,{title:"Apollo Profiles",data:t,searchType:e.searchType,onAction:e.onAction,onEdit:e.onEdit},n)))})]})})}),Uh=e=>{const{inputValue:t,reason:n,isCustomerIdentityVerified:i,messages:r,isSubmitting:o,setInputValue:s,setReason:a,setIsVerifiedCustomerIdentity:l,clearMessages:c,handleSubmit:d}=((e,t)=>{const[n,i]=oe(e.value),[r,o]=oe(!1),[s,a]=oe(""),[l,c]=oe([]),[d,u]=oe(!1),h=de((()=>{c([])}),[]),p=de((()=>{o(!1),a("")}),[]),m=de(((e,t)=>{c((n=>[...n,{text:e,type:t}]))}),[]),f=de((()=>""!==s.trim()),[s]),g=de((()=>!("emailAddress"===e.type&&!Th(n)&&(m("Please enter a valid email address.","error"),1)||"mobileNumber"===e.type&&!kh(n)&&(m("Please enter a valid mobile number.","error"),1)||!f()&&(m("Reason cannot be empty.","error"),1))),[e.type,n,m,f]),y=de((t=>{if(t instanceof jn){const n=t.response?.data?.message||`Failed to update ${"emailAddress"===e.type?"email address":"mobile number"}.`;m(n,"error")}else m("An unexpected error occurred.","error")}),[m,e.type]),v=de((async()=>{if(h(),g()){u(!0);try{await t("emailAddress"===e.type?{action:"updateEmailAddress",emailAddress:n,reason:s}:{action:"updateMobileNumber",mobileNumber:n,reason:s}),m(("emailAddress"===e.type?"Email Address":"Mobile Number")+" Updated.","success"),p()}catch(i){y(i)}finally{u(!1)}}}),[h,g,e.type,p,t,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}})(e.formData,e.onSubmit),u=e=>{const t=e.currentTarget;s(t.value),c()};return z(b,{children:z("div",{className:"flex flex-row mt-6 ml-4",children:z("form",{onSubmit:async e=>{e.preventDefault(),await d()},children:z("div",{className:"sm:grid sm:grid-cols-6 sm:items-baseline sm:gap-4 mt-4",children:[z("label",{className:"col-start-1 block text-sm font-bold text-gray-700",children:"mobileNumber"===e.formData.type?"Mobile Number":"Email Address"}),z("div",{className:"sm:col-start-2",children:["mobileNumber"===e.formData.type&&z(Ah,{allowedKeyPattern:/[0-9+]/,name:"mobileNumber",placeholder:"",type:"tel",value:t,className:"w-full",onClick:c,pattern:"[0-9+]*",onChange:u}),"emailAddress"===e.formData.type&&z(Ah,{name:"emailAddress",placeholder:"",type:"email",value:t,className:"w-full",onClick:c,onChange:u})]}),z("div",{className:"col-start-4 col-span-3 row-span-3 flex-col text-left",children:r.map(((e,t)=>z(Eh,{message:e.text,className:"text-sm text-left font-semibold "+("error"===e.type?"text-red-600":"text-green-600")},t)))}),z("div",{className:"col-start-2 col-span-2 relative flex items-start",children:[z("div",{className:"flex h-6 items-center",children:z("input",{id:"verifiedCheckbox","aria-describedby":"verified-customer-identity",name:"verifiedCheckbox",type:"checkbox",checked:i,onChange:e=>{const t=e.currentTarget;l(t.checked),c()},className:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",required:!0})}),z("div",{className:"ml-2 text-sm leading-6",children:z("label",{className:"font-medium text-gray-900",children:"Verified Customer Identity"})})]}),z("div",{className:"col-start-2",children:z(Ah,{name:"reason",placeholder:"Zendesk Ticket ID",type:"text",value:n,className:"w-full",onClick:c,onChange:e=>{const t=e.currentTarget;a(t.value),c()}})}),z("div",{className:"sm:row-start-1 sm:col-start-3 sm:flex sm:justify-center sm:mt-0 mt-2",children:z("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"})})]})})})})},Fh=()=>z("div",{className:"w-full p-4 space-y-4 animate-pulse",children:[z("div",{className:"flex space-x-4",children:[z("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),z("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),z("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),z("div",{className:"w-1/4 h-4 bg-gray-300 rounded"})]}),[...Array(5)].map(((e,t)=>z("div",{className:"flex space-x-4",children:[z("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),z("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),z("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),z("div",{className:"w-1/4 h-6 bg-gray-200 rounded"})]},t)))]}),Bh=()=>{const{searchCustomerResult:e,isLoading:t,error:n,showCustomerDetails:i,isModalOpen:r,searchFilter:o,searchCustomer:s,handleAction:a,handleModalConfirm:l,handleModalCancel:c}=Sh(),[d,u]=oe("searchResult"),[h,p]=oe(1);return z(b,{children:["searchResult"===d&&z(b,{children:[z(bh.div,{initial:{x:100*h,opacity:0},animate:{x:0,opacity:1},exit:{x:-100*h,opacity:0},transition:{duration:.5},children:[z(Ph,{onSubmit:s}),!t&&i&&z(bh.div,{initial:{y:-50,opacity:0},animate:{y:0,opacity:1},transition:{duration:.5,delay:.2},children:z(Ih,{data:e,searchType:o.current.searchType,onAction:a,onEdit:e=>{p(1),u("mobileNumber"===e?"editMobileNumber":"editEmailAddress")}})},"customerTable")]},d),t&&z(Fh,{}),n&&z("div",{className:"p-4 mt-2 text-red-700",children:n})]}),"searchResult"!==d&&z(bh.div,{initial:{x:100*h,opacity:0},animate:{x:0,opacity:1},exit:{x:-100*h,opacity:0},transition:{duration:.5},children:z(Qi,{buttonName:"Customer Management",onClick:()=>{p(-1),u("searchResult")},children:z(Uh,{formData:"editMobileNumber"==d?{value:e[0].mobileNumber,type:"mobileNumber"}:{value:e[0].email.value,type:"emailAddress"},onSubmit:a})})},d),z(Yi,{isOpen:r,heading:"Warning",message:"Are you sure you want to remove workplace access?",onConfirm:l,onCancel:c})]})};var zh=(e=>(e.Search="Search",e.BenefitsPlan="Benefits Plan",e))(zh||{});function $h(){return($h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var Hh=["context","children"];function qh(e){return this.getChildContext=function(){return e.context},U(e.children,function(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)t.indexOf(n=o[i])>=0||(r[n]=e[n]);return r}(e,Hh))}function Wh(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=y(qh,$h({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var i=[],r={},o=0,s=t.attributes,a=t.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(r[s[o].name]=s[o].value,r[Kh(s[o].name)]=s[o].value);for(o=a.length;o--;){var l=e(a[o],null),c=a[o].slot;c?r[c]=y(Gh,{name:c},l):i[o]=l}var d=n?y(Gh,null,i):i;return y(n||t.nodeName.toLowerCase(),r,d)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?I:j)(this._vdom,this._root)}function Kh(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function Yh(e,t,n){if(this._vdom){var i={};i[e]=n=null==n?void 0:n,i[Kh(e)]=n,this._vdom=U(this._vdom,i),j(this._vdom,this._root)}}function Xh(){j(this._vdom=null,this._root)}function Gh(e,t){var n=this;return y("slot",$h({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}!function(e,t,n,i){function r(){var t=Reflect.construct(HTMLElement,[],r);return t._vdomComponent=e,t._root=t,t}(r.prototype=Object.create(HTMLElement.prototype)).constructor=r,r.prototype.connectedCallback=Wh,r.prototype.attributeChangedCallback=Yh,r.prototype.disconnectedCallback=Xh,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),r.observedAttributes=n,n.forEach((function(e){Object.defineProperty(r.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define(t,r)}((e=>{const t={backendUrl:e["backend-url"],accessToken:e["access-token"]};se((()=>{ni(t.backendUrl,t.accessToken,"customer-profile"),ni(t.backendUrl,t.accessToken,"flare-app-identity"),ni(t.backendUrl,t.accessToken,"benefits-plan")}),[t.backendUrl,t.accessToken]);const[n,i]=oe("Search"),r=de((e=>e===n),[n]);return z(b,{children:[z("style",{children:$.toString()}),z(be,{tabTitles:Object.entries(zh).map((([,e])=>e)),currentTab:n,onChange:i}),z(nr,{visible:r("Search"),children:z(Bh,{})}),z(nr,{visible:r("Benefits Plan"),children:z(Mr,{})})]})}),"superhero-pba-support-admin",["backend-url","access-token"])}();
|