@flarehr/apollo-benefits 0.1.106 → 0.3.2936
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/README.md +19 -0
- package/dist/assets/@splitsoftware-fa896d3c.js +18 -0
- package/dist/assets/all_tab_color-548783b9.svg +21 -0
- package/dist/assets/all_tab_gray-a5051313.svg +6 -0
- package/dist/assets/check-57fe1dcb.svg +15 -0
- package/dist/assets/datadog-61404ce0.js +5 -0
- package/dist/assets/date-fns-70f07e11.js +1 -0
- package/dist/assets/default_backdrop-fdd955b8.png +0 -0
- package/dist/assets/external_link-599a0aec.svg +3 -0
- package/dist/assets/framer-motion-cbd82d4a.js +1 -0
- package/dist/assets/index-20199eea.js +5 -0
- package/dist/assets/index-a7a0ae69.js +35 -0
- package/dist/assets/index-ed3c23ba.css +1 -0
- package/dist/assets/lodash-5d893f8c.js +1 -0
- package/dist/assets/logo-a34e9b4b.png +0 -0
- package/dist/assets/oidc-client-6f6e47c2.js +101 -0
- package/dist/assets/padlock-8c081120.svg +26 -0
- package/dist/assets/suitcase-6471ad05.svg +17 -0
- package/dist/assets/vendor-68288830.js +792 -0
- package/dist/assets/warning-a7f1af23.svg +14 -0
- package/dist/assets/welcome_image_mobile-dbde6c80.png +0 -0
- package/dist/assets/welcome_image_v2-869c59e4.png +0 -0
- package/dist/assets/wellbeing_banner-6903d615.png +0 -0
- package/dist/assets/workplace_link_banner_mobile-6ebaa24b.png +0 -0
- package/dist/assets/workplace_link_banner_v2-c81ed849.png +0 -0
- package/dist/config.json +14 -0
- package/dist/favicon.ico +0 -0
- package/dist/icons/android-chrome-192x192.png +0 -0
- package/dist/icons/android-chrome-512x512.png +0 -0
- package/dist/icons/apple-touch-icon.png +0 -0
- package/dist/icons/favicon-16x16.png +0 -0
- package/dist/icons/favicon-32x32.png +0 -0
- package/dist/index.html +115 -0
- package/dist/manifest.json +21 -0
- package/dist/sw-esm.js +16 -0
- package/package.json +129 -60
- package/LICENSE +0 -21
- package/dist/lib/apollo-benefits/apollo-benefits.esm.js +0 -1
- package/dist/lib/apollo-benefits/assets/car-placeholder.svg +0 -5
- package/dist/lib/apollo-benefits/assets/check.svg +0 -13
- package/dist/lib/apollo-benefits/index.esm.js +0 -0
- package/dist/lib/apollo-benefits/p-06a1f65f.js +0 -1
- package/dist/lib/apollo-benefits/p-077d7f8d.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-0a21a709.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-14054f15.js +0 -1
- package/dist/lib/apollo-benefits/p-24a37d64.js +0 -1
- package/dist/lib/apollo-benefits/p-2b3f3b72.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-3111d565.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-327396fa.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-3af26279.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-3d4d2683.js +0 -1
- package/dist/lib/apollo-benefits/p-4474bcf8.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-50fe790f.js +0 -1
- package/dist/lib/apollo-benefits/p-53bcbd1d.js +0 -1
- package/dist/lib/apollo-benefits/p-64a2b03a.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-68c136da.js +0 -1
- package/dist/lib/apollo-benefits/p-6bd16f5b.js +0 -1
- package/dist/lib/apollo-benefits/p-71dbc8ff.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-774d9bc5.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-7a2ca86d.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-7a572b50.js +0 -1
- package/dist/lib/apollo-benefits/p-7c2cd94a.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-839493d7.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-acf61bdc.js +0 -1
- package/dist/lib/apollo-benefits/p-b33fc683.js +0 -1
- package/dist/lib/apollo-benefits/p-beb8f728.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-d7bea1d9.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-ddb176cb.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-e241f55b.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-ef8ea713.entry.js +0 -1
- package/dist/lib/apollo-benefits/p-f603197d.js +0 -15
- package/dist/lib/cjs/active-router-0ecaf2b8.js +0 -75
- package/dist/lib/cjs/ap-ben-choose-vehicle-section_4.cjs.entry.js +0 -2684
- package/dist/lib/cjs/ap-ben-complete-section_4.cjs.entry.js +0 -108
- package/dist/lib/cjs/ap-ben-notifications-section.cjs.entry.js +0 -238
- package/dist/lib/cjs/apollo-benefits.cjs.js +0 -25
- package/dist/lib/cjs/app-globals-67583b8b.js +0 -12
- package/dist/lib/cjs/async-6a7926f0.js +0 -753
- package/dist/lib/cjs/cars-calculator-app.cjs.entry.js +0 -52
- package/dist/lib/cjs/cars-calculator.service-11b0cd88.js +0 -901
- package/dist/lib/cjs/context-consumer.cjs.entry.js +0 -29
- package/dist/lib/cjs/datorama-akita-31d23240.js +0 -2551
- package/dist/lib/cjs/delay-d31618c3.js +0 -206
- package/dist/lib/cjs/distinctUntilChanged-e8538790.js +0 -371
- package/dist/lib/cjs/dom-utils-b8befdd5.js +0 -63
- package/dist/lib/cjs/fl-button.cjs.entry.js +0 -30
- package/dist/lib/cjs/fl-dropdown-async_2.cjs.entry.js +0 -467
- package/dist/lib/cjs/fl-dropdown.cjs.entry.js +0 -232
- package/dist/lib/cjs/fl-loading-indicator.cjs.entry.js +0 -26
- package/dist/lib/cjs/fl-style-guide.cjs.entry.js +0 -91
- package/dist/lib/cjs/index-f1fadf90.js +0 -1735
- package/dist/lib/cjs/index.cjs.js +0 -2
- package/dist/lib/cjs/loader.cjs.js +0 -27
- package/dist/lib/cjs/location-utils-36fe7e5e.js +0 -237
- package/dist/lib/cjs/match-path-be4ea5f6.js +0 -279
- package/dist/lib/cjs/session.query-d61ba7ec.js +0 -1731
- package/dist/lib/cjs/stencil-async-content.cjs.entry.js +0 -32
- package/dist/lib/cjs/stencil-route-link.cjs.entry.js +0 -78
- package/dist/lib/cjs/stencil-route-switch.cjs.entry.js +0 -104
- package/dist/lib/cjs/stencil-route-title.cjs.entry.js +0 -32
- package/dist/lib/cjs/stencil-route.cjs.entry.js +0 -97
- package/dist/lib/cjs/stencil-router-prompt.cjs.entry.js +0 -59
- package/dist/lib/cjs/stencil-router-redirect.cjs.entry.js +0 -32
- package/dist/lib/cjs/stencil-router.cjs.entry.js +0 -640
- package/dist/lib/collection/assets/image/complete.svg +0 -122
- package/dist/lib/collection/collection-manifest.json +0 -53
- package/dist/lib/collection/components/cars-calculator-app/api/api-client.js +0 -5
- package/dist/lib/collection/components/cars-calculator-app/api/cars-calculator.api.js +0 -45
- package/dist/lib/collection/components/cars-calculator-app/cars-calculator-app.css +0 -22
- package/dist/lib/collection/components/cars-calculator-app/cars-calculator-app.js +0 -93
- package/dist/lib/collection/components/cars-calculator-app/modal-section/modal-section.css +0 -0
- package/dist/lib/collection/components/cars-calculator-app/modal-section/modal-section.js +0 -144
- package/dist/lib/collection/components/cars-calculator-app/notifications-section/notifications-section.js +0 -25
- package/dist/lib/collection/components/cars-calculator-app/pages/assets/car-placeholder.svg +0 -5
- package/dist/lib/collection/components/cars-calculator-app/pages/assets/check.svg +0 -13
- package/dist/lib/collection/components/cars-calculator-app/pages/choose-vehicle-section.component.js +0 -193
- package/dist/lib/collection/components/cars-calculator-app/pages/complete-section.component.js +0 -38
- package/dist/lib/collection/components/cars-calculator-app/pages/cost-breakdown-section.component.js +0 -47
- package/dist/lib/collection/components/cars-calculator-app/pages/model-variants-section.component.css +0 -34
- package/dist/lib/collection/components/cars-calculator-app/pages/model-variants-section.component.js +0 -64
- package/dist/lib/collection/components/cars-calculator-app/pages/personal-info-section.component.js +0 -66
- package/dist/lib/collection/components/cars-calculator-app/pages/quote-result-section.component.js +0 -86
- package/dist/lib/collection/components/cars-calculator-app/pages/submit-quote-section.component.js +0 -75
- package/dist/lib/collection/components/cars-calculator-app/services/app-configuration.service.js +0 -13
- package/dist/lib/collection/components/cars-calculator-app/services/cars-calculator.service.js +0 -103
- package/dist/lib/collection/components/cars-calculator-app/services/notifications.service.js +0 -37
- package/dist/lib/collection/components/cars-calculator-app/services/notifications.store.js +0 -3
- package/dist/lib/collection/components/cars-calculator-app/services/session.query.js +0 -35
- package/dist/lib/collection/components/cars-calculator-app/services/session.store.js +0 -78
- package/dist/lib/collection/global/config.js +0 -2
- package/dist/lib/collection/global/main.dev.js +0 -5
- package/dist/lib/collection/global/main.js +0 -5
- package/dist/lib/collection/index.js +0 -2
- package/dist/lib/collection/utils/config.js +0 -2
- package/dist/lib/collection/utils/index.js +0 -15
- package/dist/lib/collection/utils/lazy.js +0 -29
- package/dist/lib/esm/active-router-7c2ca849.js +0 -73
- package/dist/lib/esm/ap-ben-choose-vehicle-section_4.entry.js +0 -2677
- package/dist/lib/esm/ap-ben-complete-section_4.entry.js +0 -101
- package/dist/lib/esm/ap-ben-notifications-section.entry.js +0 -234
- package/dist/lib/esm/apollo-benefits.js +0 -23
- package/dist/lib/esm/app-globals-65714cca.js +0 -10
- package/dist/lib/esm/async-68e9cad7.js +0 -738
- package/dist/lib/esm/cars-calculator-app.entry.js +0 -48
- package/dist/lib/esm/cars-calculator.service-2cde6288.js +0 -894
- package/dist/lib/esm/context-consumer.entry.js +0 -25
- package/dist/lib/esm/datorama-akita-c87196a0.js +0 -2545
- package/dist/lib/esm/delay-115d4292.js +0 -200
- package/dist/lib/esm/distinctUntilChanged-bf69e0f8.js +0 -363
- package/dist/lib/esm/dom-utils-109a7d75.js +0 -55
- package/dist/lib/esm/fl-button.entry.js +0 -26
- package/dist/lib/esm/fl-dropdown-async_2.entry.js +0 -462
- package/dist/lib/esm/fl-dropdown.entry.js +0 -228
- package/dist/lib/esm/fl-loading-indicator.entry.js +0 -22
- package/dist/lib/esm/fl-style-guide.entry.js +0 -87
- package/dist/lib/esm/index-19c4d245.js +0 -1703
- package/dist/lib/esm/index.js +0 -1
- package/dist/lib/esm/loader.js +0 -23
- package/dist/lib/esm/location-utils-312665d3.js +0 -226
- package/dist/lib/esm/match-path-4b5c7d98.js +0 -276
- package/dist/lib/esm/polyfills/core-js.js +0 -11
- package/dist/lib/esm/polyfills/css-shim.js +0 -1
- package/dist/lib/esm/polyfills/dom.js +0 -79
- package/dist/lib/esm/polyfills/es5-html-element.js +0 -1
- package/dist/lib/esm/polyfills/index.js +0 -34
- package/dist/lib/esm/polyfills/system.js +0 -6
- package/dist/lib/esm/session.query-0f1c9503.js +0 -1719
- package/dist/lib/esm/stencil-async-content.entry.js +0 -28
- package/dist/lib/esm/stencil-route-link.entry.js +0 -74
- package/dist/lib/esm/stencil-route-switch.entry.js +0 -100
- package/dist/lib/esm/stencil-route-title.entry.js +0 -28
- package/dist/lib/esm/stencil-route.entry.js +0 -93
- package/dist/lib/esm/stencil-router-prompt.entry.js +0 -55
- package/dist/lib/esm/stencil-router-redirect.entry.js +0 -28
- package/dist/lib/esm/stencil-router.entry.js +0 -636
- package/dist/lib/index.cjs.js +0 -1
- package/dist/lib/index.js +0 -1
- package/dist/lib/loader/cdn.js +0 -3
- package/dist/lib/loader/index.cjs.js +0 -3
- package/dist/lib/loader/index.d.ts +0 -13
- package/dist/lib/loader/index.es2017.js +0 -3
- package/dist/lib/loader/index.js +0 -4
- package/dist/lib/loader/package.json +0 -10
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/button/button.css +0 -45
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/dropdown/dropdown.css +0 -9
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/dropdown-async/dropdown-async.css +0 -9
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/loading-indicator/loading-indicator.css +0 -141
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/promise-button/promise-button.css +0 -5
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/style-guide/style-guide.css +0 -0
- package/dist/lib/node_modules/@stencil/router/dist/collection/components/route/route.css +0 -3
- package/dist/lib/types/components/cars-calculator-app/api/api-client.d.ts +0 -2
- package/dist/lib/types/components/cars-calculator-app/api/cars-calculator.api.d.ts +0 -96
- package/dist/lib/types/components/cars-calculator-app/cars-calculator-app.d.ts +0 -15
- package/dist/lib/types/components/cars-calculator-app/modal-section/modal-section.d.ts +0 -16
- package/dist/lib/types/components/cars-calculator-app/notifications-section/notifications-section.d.ts +0 -5
- package/dist/lib/types/components/cars-calculator-app/pages/choose-vehicle-section.component.d.ts +0 -23
- package/dist/lib/types/components/cars-calculator-app/pages/complete-section.component.d.ts +0 -5
- package/dist/lib/types/components/cars-calculator-app/pages/cost-breakdown-section.component.d.ts +0 -6
- package/dist/lib/types/components/cars-calculator-app/pages/model-variants-section.component.d.ts +0 -12
- package/dist/lib/types/components/cars-calculator-app/pages/personal-info-section.component.d.ts +0 -10
- package/dist/lib/types/components/cars-calculator-app/pages/quote-result-section.component.d.ts +0 -13
- package/dist/lib/types/components/cars-calculator-app/pages/submit-quote-section.component.d.ts +0 -10
- package/dist/lib/types/components/cars-calculator-app/services/app-configuration.service.d.ts +0 -7
- package/dist/lib/types/components/cars-calculator-app/services/cars-calculator.service.d.ts +0 -11
- package/dist/lib/types/components/cars-calculator-app/services/notifications.service.d.ts +0 -15
- package/dist/lib/types/components/cars-calculator-app/services/notifications.store.d.ts +0 -14
- package/dist/lib/types/components/cars-calculator-app/services/session.query.d.ts +0 -25
- package/dist/lib/types/components/cars-calculator-app/services/session.store.d.ts +0 -74
- package/dist/lib/types/components.d.ts +0 -170
- package/dist/lib/types/global/config.d.ts +0 -2
- package/dist/lib/types/global/main.d.ts +0 -1
- package/dist/lib/types/global/main.dev.d.ts +0 -1
- package/dist/lib/types/index.d.ts +0 -2
- package/dist/lib/types/stencil-public-runtime.d.ts +0 -1555
- package/dist/lib/types/utils/config.d.ts +0 -2
- package/dist/lib/types/utils/index.d.ts +0 -7
- package/dist/lib/types/utils/lazy.d.ts +0 -12
- package/readme.md +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{G as lt,y as Ui,p as ke,q as k,k as Dt,l as Ni,T as Pe,F as Ft,n as Gi,o as Ht,V as Wi,w as ps,r as $i}from"./vendor-68288830.js";const gs=lt({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),te=lt({}),Ee=lt(null),ee=typeof document<"u",ys=ee?Ui:ke,vs=lt({strict:!1});function Hi(t,e,n,s){const{visualElement:i}=k(te),o=k(vs),r=k(Ee),a=k(gs).reducedMotion,c=Dt();s=s||o.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:i,props:n,presenceContext:r,blockInitialAnimation:r?r.initial===!1:!1,reducedMotionConfig:a}));const l=c.current;Ni(()=>{l&&l.update(n,r)});const u=Dt(!!window.HandoffAppearAnimations);return ys(()=>{l&&(l.render(),u.current&&l.animationState&&l.animationState.animateChanges())}),ke(()=>{l&&(l.updateFeatures(),!u.current&&l.animationState&&l.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,u.current=!1)}),l}function dt(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function zi(t,e,n){return Pe(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):dt(n)&&(n.current=s))},[e])}function Mt(t){return typeof t=="string"||Array.isArray(t)}function ne(t){return typeof t=="object"&&typeof t.start=="function"}const je=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Oe=["initial",...je];function se(t){return ne(t.animate)||Oe.some(e=>Mt(t[e]))}function xs(t){return!!(se(t)||t.variants)}function Ki(t,e){if(se(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Mt(n)?n:void 0,animate:Mt(s)?s:void 0}}return t.inherit!==!1?e:{}}function _i(t){const{initial:e,animate:n}=Ki(t,k(te));return Ft(()=>({initial:e,animate:n}),[un(e),un(n)])}function un(t){return Array.isArray(t)?t.join(" "):t}const hn={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"]},Lt={};for(const t in hn)Lt[t]={isEnabled:e=>hn[t].some(n=>!!e[n])};function Xi(t){for(const e in t)Lt[e]={...Lt[e],...t[e]}}const zt=lt({}),Ps=lt({}),Yi=Symbol.for("motionComponentSymbol");function qi({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&Xi(t);function o(a,c){let l;const u={...k(gs),...a,layoutId:Zi(a)},{isStatic:h}=u,f=_i(a),d=s(a,h);if(!h&&ee){f.visualElement=Hi(i,d,u,e);const m=k(Ps),p=k(vs).strict;f.visualElement&&(l=f.visualElement.loadFeatures(u,p,t,m))}return Ht(te.Provider,{value:f},l&&f.visualElement?Ht(l,{visualElement:f.visualElement,...u}):null,n(i,a,zi(d,f.visualElement,c),d,h,f.visualElement))}const r=Gi(o);return r[Yi]=i,r}function Zi({layoutId:t}){const e=k(zt).id;return e&&t!==void 0?e+"-"+t:t}function Qi(t){function e(s,i={}){return qi(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const Ji=["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 Ie(t){return typeof t!="string"||t.includes("-")?!1:!!(Ji.indexOf(t)>-1||/[A-Z]/.test(t))}const Kt={};function tr(t){Object.assign(Kt,t)}const Bt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ut=new Set(Bt);function Ts(t,{layout:e,layoutId:n}){return ut.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Kt[t]||t==="opacity")}const O=t=>!!(t&&t.getVelocity),er={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nr=Bt.length;function sr(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let r=0;r<nr;r++){const a=Bt[r];if(t[a]!==void 0){const c=er[a]||a;o+=`${c}(${t[a]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}const bs=t=>e=>typeof e=="string"&&e.startsWith(t),Vs=bs("--"),Te=bs("var(--"),ir=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,rr=(t,e)=>e&&typeof t=="number"?e.transform(t):t,et=(t,e,n)=>Math.min(Math.max(n,t),e),ht={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},St={...ht,transform:t=>et(0,1,t)},It={...ht,default:1},At=t=>Math.round(t*1e5)/1e5,ie=/(-)?([\d]*\.?[\d])+/g,Ss=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,or=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function kt(t){return typeof t=="string"}const Et=t=>({test:e=>kt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Z=Et("deg"),G=Et("%"),v=Et("px"),ar=Et("vh"),cr=Et("vw"),fn={...G,parse:t=>G.parse(t)/100,transform:t=>G.transform(t*100)},dn={...ht,transform:Math.round},As={borderWidth:v,borderTopWidth:v,borderRightWidth:v,borderBottomWidth:v,borderLeftWidth:v,borderRadius:v,radius:v,borderTopLeftRadius:v,borderTopRightRadius:v,borderBottomRightRadius:v,borderBottomLeftRadius:v,width:v,maxWidth:v,height:v,maxHeight:v,size:v,top:v,right:v,bottom:v,left:v,padding:v,paddingTop:v,paddingRight:v,paddingBottom:v,paddingLeft:v,margin:v,marginTop:v,marginRight:v,marginBottom:v,marginLeft:v,rotate:Z,rotateX:Z,rotateY:Z,rotateZ:Z,scale:It,scaleX:It,scaleY:It,scaleZ:It,skew:Z,skewX:Z,skewY:Z,distance:v,translateX:v,translateY:v,translateZ:v,x:v,y:v,z:v,perspective:v,transformPerspective:v,opacity:St,originX:fn,originY:fn,originZ:v,zIndex:dn,fillOpacity:St,strokeOpacity:St,numOctaves:dn};function Ue(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let c=!1,l=!1,u=!0;for(const h in e){const f=e[h];if(Vs(h)){o[h]=f;continue}const d=As[h],m=rr(f,d);if(ut.has(h)){if(c=!0,r[h]=m,!u)continue;f!==(d.default||0)&&(u=!1)}else h.startsWith("origin")?(l=!0,a[h]=m):i[h]=m}if(e.transform||(c||s?i.transform=sr(t.transform,n,u,s):i.transform&&(i.transform="none")),l){const{originX:h="50%",originY:f="50%",originZ:d=0}=a;i.transformOrigin=`${h} ${f} ${d}`}}const Ne=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Cs(t,e,n){for(const s in e)!O(e[s])&&!Ts(s,n)&&(t[s]=e[s])}function lr({transformTemplate:t},e,n){return Ft(()=>{const s=Ne();return Ue(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function ur(t,e,n){const s=t.style||{},i={};return Cs(i,s,t),Object.assign(i,lr(t,e,n)),t.transformValues?t.transformValues(i):i}function hr(t,e,n){const s={},i=ur(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const fr=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function _t(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||fr.has(t)}let ws=t=>!_t(t);function dr(t){t&&(ws=e=>e.startsWith("on")?!_t(e):t(e))}try{dr(require("@emotion/is-prop-valid").default)}catch{}function mr(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(ws(i)||n===!0&&_t(i)||!e&&!_t(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function mn(t,e,n){return typeof t=="string"?t:v.transform(e+n*t)}function pr(t,e,n){const s=mn(e,t.x,t.width),i=mn(n,t.y,t.height);return`${s} ${i}`}const gr={offset:"stroke-dashoffset",array:"stroke-dasharray"},yr={offset:"strokeDashoffset",array:"strokeDasharray"};function vr(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?gr:yr;t[o.offset]=v.transform(-s);const r=v.transform(e),a=v.transform(n);t[o.array]=`${r} ${a}`}function Ge(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:c=0,...l},u,h,f){if(Ue(t,l,u,f),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:m,dimensions:p}=t;d.transform&&(p&&(m.transform=d.transform),delete d.transform),p&&(i!==void 0||o!==void 0||m.transform)&&(m.transformOrigin=pr(p,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),r!==void 0&&vr(d,r,a,c,!1)}const Ds=()=>({...Ne(),attrs:{}}),We=t=>typeof t=="string"&&t.toLowerCase()==="svg";function xr(t,e,n,s){const i=Ft(()=>{const o=Ds();return Ge(o,e,{enableHardwareAcceleration:!1},We(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Cs(o,t.style,t),i.style={...o,...i.style}}return i}function Pr(t=!1){return(n,s,i,{latestValues:o},r)=>{const c=(Ie(n)?xr:hr)(s,o,r,n),u={...mr(s,typeof n=="string",t),...c,ref:i},{children:h}=s,f=Ft(()=>O(h)?h.get():h,[h]);return Ht(n,{...u,children:f})}}const $e=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Ms(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}const Ls=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 Rs(t,e,n,s){Ms(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Ls.has(i)?i:$e(i),e.attrs[i])}function He(t,e){const{style:n}=t,s={};for(const i in n)(O(n[i])||e.style&&O(e.style[i])||Ts(i,t))&&(s[i]=n[i]);return s}function Fs(t,e){const n=He(t,e);for(const s in t)if(O(t[s])||O(e[s])){const i=Bt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[i]=t[s]}return n}function ze(t,e,n,s={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),e}function Tr(t){const e=Dt(null);return e.current===null&&(e.current=t()),e.current}const Xt=t=>Array.isArray(t),br=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Vr=t=>Xt(t)?t[t.length-1]||0:t;function Wt(t){const e=O(t)?t.get():t;return br(e)?e.toValue():e}function Sr({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:Ar(s,i,o,t),renderState:e()};return n&&(r.mount=a=>n(s,a,r)),r}const Bs=t=>(e,n)=>{const s=k(te),i=k(Ee),o=()=>Sr(t,e,s,i);return n?o():Tr(o)};function Ar(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=Wt(o[f]);let{initial:r,animate:a}=t;const c=se(t),l=xs(t);e&&l&&!c&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const h=u?a:r;return h&&typeof h!="boolean"&&!ne(h)&&(Array.isArray(h)?h:[h]).forEach(d=>{const m=ze(t,d);if(!m)return;const{transitionEnd:p,transition:x,...b}=m;for(const y in b){let g=b[y];if(Array.isArray(g)){const P=u?g.length-1:0;g=g[P]}g!==null&&(i[y]=g)}for(const y in p)i[y]=p[y]}),i}const M=t=>t;class pn{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function Cr(t){let e=new pn,n=new pn,s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(c,l=!1,u=!1)=>{const h=u&&i,f=h?e:n;return l&&r.add(c),f.add(c)&&h&&i&&(s=e.order.length),c},cancel:c=>{n.remove(c),r.delete(c)},process:c=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let l=0;l<s;l++){const u=e.order[l];u(c),r.has(u)&&(a.schedule(u),t())}i=!1,o&&(o=!1,a.process(c))}};return a}const Ut=["prepare","read","update","preRender","render","postRender"],wr=40;function Dr(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=Ut.reduce((h,f)=>(h[f]=Cr(()=>n=!0),h),{}),r=h=>o[h].process(i),a=()=>{const h=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(h-i.timestamp,wr),1),i.timestamp=h,i.isProcessing=!0,Ut.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))},c=()=>{n=!0,s=!0,i.isProcessing||t(a)};return{schedule:Ut.reduce((h,f)=>{const d=o[f];return h[f]=(m,p=!1,x=!1)=>(n||c(),d.schedule(m,p,x)),h},{}),cancel:h=>Ut.forEach(f=>o[f].cancel(h)),state:i,steps:o}}const{schedule:S,cancel:_,state:B,steps:ce}=Dr(typeof requestAnimationFrame<"u"?requestAnimationFrame:M,!0),Mr={useVisualState:Bs({scrapeMotionValuesFromProps:Fs,createRenderState:Ds,onMount:(t,e,{renderState:n,latestValues:s})=>{S.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),S.render(()=>{Ge(n,s,{enableHardwareAcceleration:!1},We(e.tagName),t.transformTemplate),Rs(e,n)})}})},Lr={useVisualState:Bs({scrapeMotionValuesFromProps:He,createRenderState:Ne})};function Rr(t,{forwardMotionProps:e=!1},n,s){return{...Ie(t)?Mr:Lr,preloadedFeatures:n,useRender:Pr(e),createVisualElement:s,Component:t}}function H(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const ks=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function re(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Fr=t=>e=>ks(e)&&t(e,re(e));function z(t,e,n,s){return H(t,e,Fr(n),s)}const Br=(t,e)=>n=>e(t(n)),J=(...t)=>t.reduce(Br);function Es(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const gn=Es("dragHorizontal"),yn=Es("dragVertical");function js(t){let e=!1;if(t==="y")e=yn();else if(t==="x")e=gn();else{const n=gn(),s=yn();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function Os(){const t=js(!0);return t?(t(),!1):!0}class st{constructor(e){this.isMounted=!1,this.node=e}update(){}}function vn(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End"),i=(o,r)=>{if(o.type==="touch"||Os())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[s]&&S.update(()=>a[s](o,r))};return z(t.current,n,i,{passive:!t.getProps()[s]})}class kr extends st{mount(){this.unmount=J(vn(this.node,!0),vn(this.node,!1))}unmount(){}}class Er extends st{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{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=J(H(this.node.current,"focus",()=>this.onFocus()),H(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Is=(t,e)=>e?t===e?!0:Is(t,e.parentElement):!1;function le(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,re(n))}class jr extends st{constructor(){super(...arguments),this.removeStartListeners=M,this.removeEndListeners=M,this.removeAccessibleListeners=M,this.startPointerPress=(e,n)=>{if(this.removeEndListeners(),this.isPressing)return;const s=this.node.getProps(),o=z(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:u}=this.node.getProps();S.update(()=>{Is(this.node.current,a.target)?l&&l(a,c):u&&u(a,c)})},{passive:!(s.onTap||s.onPointerUp)}),r=z(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=J(o,r),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const r=a=>{a.key!=="Enter"||!this.checkPressEnd()||le("up",(c,l)=>{const{onTap:u}=this.node.getProps();u&&S.update(()=>u(c,l))})};this.removeEndListeners(),this.removeEndListeners=H(this.node.current,"keyup",r),le("down",(a,c)=>{this.startPress(a,c)})},n=H(this.node.current,"keydown",e),s=()=>{this.isPressing&&le("cancel",(o,r)=>this.cancelPress(o,r))},i=H(this.node.current,"blur",s);this.removeAccessibleListeners=J(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&S.update(()=>s(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Os()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&S.update(()=>s(e,n))}mount(){const e=this.node.getProps(),n=z(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=H(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=J(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const be=new WeakMap,ue=new WeakMap,Or=t=>{const e=be.get(t.target);e&&e(t)},Ir=t=>{t.forEach(Or)};function Ur({root:t,...e}){const n=t||document;ue.has(n)||ue.set(n,{});const s=ue.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Ir,{root:t,...e})),s[i]}function Nr(t,e,n){const s=Ur(e);return be.set(t,n),s.observe(t),()=>{be.delete(t),s.unobserve(t)}}const Gr={some:0,all:1};class Wr extends st{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Gr[i]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),f=l?u:h;f&&f(c)};return Nr(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some($r(e,n))&&this.startObserver()}unmount(){}}function $r({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Hr={inView:{Feature:Wr},tap:{Feature:jr},focus:{Feature:Er},hover:{Feature:kr}};function Us(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function zr(t){const e={};return t.values.forEach((n,s)=>e[s]=n.get()),e}function Kr(t){const e={};return t.values.forEach((n,s)=>e[s]=n.getVelocity()),e}function oe(t,e,n){const s=t.getProps();return ze(s,e,n!==void 0?n:s.custom,zr(t),Kr(t))}const _r="framerAppearId",Xr="data-"+$e(_r);let Yr=M,Ke=M;const tt=t=>t*1e3,K=t=>t/1e3,qr={current:!1},Ns=t=>Array.isArray(t)&&typeof t[0]=="number";function Gs(t){return!!(!t||typeof t=="string"&&Ws[t]||Ns(t)||Array.isArray(t)&&t.every(Gs))}const Vt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ws={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vt([0,.65,.55,1]),circOut:Vt([.55,0,1,.45]),backIn:Vt([.31,.01,.66,-.59]),backOut:Vt([.33,1.53,.69,.99])};function $s(t){if(t)return Ns(t)?Vt(t):Array.isArray(t)?t.map($s):Ws[t]}function Zr(t,e,n,{delay:s=0,duration:i,repeat:o=0,repeatType:r="loop",ease:a,times:c}={}){const l={[e]:n};c&&(l.offset=c);const u=$s(a);return Array.isArray(u)&&(l.easing=u),t.animate(l,{delay:s,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}function Qr(t,{repeat:e,repeatType:n="loop"}){const s=e&&n!=="loop"&&e%2===1?0:t.length-1;return t[s]}const Hs=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Jr=1e-7,to=12;function eo(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Hs(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Jr&&++a<to);return r}function jt(t,e,n,s){if(t===e&&n===s)return M;const i=o=>eo(o,0,1,t,n);return o=>o===0||o===1?o:Hs(i(o),e,s)}const no=jt(.42,0,1,1),so=jt(0,0,.58,1),zs=jt(.42,0,.58,1),io=t=>Array.isArray(t)&&typeof t[0]!="number",Ks=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,_s=t=>e=>1-t(1-e),Xs=t=>1-Math.sin(Math.acos(t)),_e=_s(Xs),ro=Ks(_e),Ys=jt(.33,1.53,.69,.99),Xe=_s(Ys),oo=Ks(Xe),ao=t=>(t*=2)<1?.5*Xe(t):.5*(2-Math.pow(2,-10*(t-1))),co={linear:M,easeIn:no,easeInOut:zs,easeOut:so,circIn:Xs,circInOut:ro,circOut:_e,backIn:Xe,backInOut:oo,backOut:Ys,anticipate:ao},xn=t=>{if(Array.isArray(t)){Ke(t.length===4);const[e,n,s,i]=t;return jt(e,n,s,i)}else if(typeof t=="string")return co[t];return t},Ye=(t,e)=>n=>!!(kt(n)&&or.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),qs=(t,e,n)=>s=>{if(!kt(s))return s;const[i,o,r,a]=s.match(ie);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},lo=t=>et(0,255,t),he={...ht,transform:t=>Math.round(lo(t))},ct={test:Ye("rgb","red"),parse:qs("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+he.transform(t)+", "+he.transform(e)+", "+he.transform(n)+", "+At(St.transform(s))+")"};function uo(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Ve={test:Ye("#"),parse:uo,transform:ct.transform},mt={test:Ye("hsl","hue"),parse:qs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+G.transform(At(e))+", "+G.transform(At(n))+", "+At(St.transform(s))+")"},j={test:t=>ct.test(t)||Ve.test(t)||mt.test(t),parse:t=>ct.test(t)?ct.parse(t):mt.test(t)?mt.parse(t):Ve.parse(t),transform:t=>kt(t)?t:t.hasOwnProperty("red")?ct.transform(t):mt.transform(t)},w=(t,e,n)=>-n*t+n*e+t;function fe(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function ho({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;i=fe(c,a,t+1/3),o=fe(c,a,t),r=fe(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}const de=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},fo=[Ve,ct,mt],mo=t=>fo.find(e=>e.test(t));function Pn(t){const e=mo(t);let n=e.parse(t);return e===mt&&(n=ho(n)),n}const Zs=(t,e)=>{const n=Pn(t),s=Pn(e),i={...n};return o=>(i.red=de(n.red,s.red,o),i.green=de(n.green,s.green,o),i.blue=de(n.blue,s.blue,o),i.alpha=w(n.alpha,s.alpha,o),ct.transform(i))};function po(t){var e,n;return isNaN(t)&&kt(t)&&(((e=t.match(ie))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Ss))===null||n===void 0?void 0:n.length)||0)>0}const Qs={regex:ir,countKey:"Vars",token:"${v}",parse:M},Js={regex:Ss,countKey:"Colors",token:"${c}",parse:j.parse},ti={regex:ie,countKey:"Numbers",token:"${n}",parse:ht.parse};function me(t,{regex:e,countKey:n,token:s,parse:i}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,s),t.values.push(...o.map(i)))}function Yt(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&me(n,Qs),me(n,Js),me(n,ti),n}function ei(t){return Yt(t).values}function ni(t){const{values:e,numColors:n,numVars:s,tokenised:i}=Yt(t),o=e.length;return r=>{let a=i;for(let c=0;c<o;c++)c<s?a=a.replace(Qs.token,r[c]):c<s+n?a=a.replace(Js.token,j.transform(r[c])):a=a.replace(ti.token,At(r[c]));return a}}const go=t=>typeof t=="number"?0:t;function yo(t){const e=ei(t);return ni(t)(e.map(go))}const nt={test:po,parse:ei,createTransformer:ni,getAnimatableNone:yo},si=(t,e)=>n=>`${n>0?e:t}`;function ii(t,e){return typeof t=="number"?n=>w(t,e,n):j.test(t)?Zs(t,e):t.startsWith("var(")?si(t,e):oi(t,e)}const ri=(t,e)=>{const n=[...t],s=n.length,i=t.map((o,r)=>ii(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}},vo=(t,e)=>{const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=ii(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}},oi=(t,e)=>{const n=nt.createTransformer(e),s=Yt(t),i=Yt(e);return s.numVars===i.numVars&&s.numColors===i.numColors&&s.numNumbers>=i.numNumbers?J(ri(s.values,i.values),n):si(t,e)},Rt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},Tn=(t,e)=>n=>w(t,e,n);function xo(t){return typeof t=="number"?Tn:typeof t=="string"?j.test(t)?Zs:oi:Array.isArray(t)?ri:typeof t=="object"?vo:Tn}function Po(t,e,n){const s=[],i=n||xo(t[0]),o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const c=Array.isArray(e)?e[r]||M:e;a=J(c,a)}s.push(a)}return s}function ai(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(Ke(o===e.length),o===1)return()=>e[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=Po(e,s,i),a=r.length,c=l=>{let u=0;if(a>1)for(;u<t.length-2&&!(l<t[u+1]);u++);const h=Rt(t[u],t[u+1],l);return r[u](h)};return n?l=>c(et(t[0],t[o-1],l)):c}function To(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Rt(0,e,s);t.push(w(n,1,i))}}function bo(t){const e=[0];return To(e,t.length-1),e}function Vo(t,e){return t.map(n=>n*e)}function So(t,e){return t.map(()=>e||zs).splice(0,t.length-1)}function qt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=io(s)?s.map(xn):xn(s),o={done:!1,value:e[0]},r=Vo(n&&n.length===e.length?n:bo(e),t),a=ai(r,e,{ease:Array.isArray(i)?i:So(e,i)});return{calculatedDuration:t,next:c=>(o.value=a(c),o.done=c>=t,o)}}function ci(t,e){return e?t*(1e3/e):0}const Ao=5;function li(t,e,n){const s=Math.max(e-Ao,0);return ci(n-t(s),e-s)}const pe=.001,Co=.01,bn=10,wo=.05,Do=1;function Mo({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o;Yr(t<=tt(bn));let r=1-e;r=et(wo,Do,r),t=et(Co,bn,K(t)),r<1?(i=l=>{const u=l*r,h=u*t,f=u-n,d=Se(l,r),m=Math.exp(-h);return pe-f/d*m},o=l=>{const h=l*r*t,f=h*n+n,d=Math.pow(r,2)*Math.pow(l,2)*t,m=Math.exp(-h),p=Se(Math.pow(l,2),r);return(-i(l)+pe>0?-1:1)*((f-d)*m)/p}):(i=l=>{const u=Math.exp(-l*t),h=(l-n)*t+1;return-pe+u*h},o=l=>{const u=Math.exp(-l*t),h=(n-l)*(t*t);return u*h});const a=5/t,c=Ro(i,o,a);if(t=tt(t),isNaN(c))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(c,2)*s;return{stiffness:l,damping:r*2*Math.sqrt(s*l),duration:t}}}const Lo=12;function Ro(t,e,n){let s=n;for(let i=1;i<Lo;i++)s=s-t(s)/e(s);return s}function Se(t,e){return t*Math.sqrt(1-e*e)}const Fo=["duration","bounce"],Bo=["stiffness","damping","mass"];function Vn(t,e){return e.some(n=>t[n]!==void 0)}function ko(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Vn(t,Bo)&&Vn(t,Fo)){const n=Mo(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}function ui({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:c,mass:l,velocity:u,duration:h,isResolvedFromDuration:f}=ko(s),d=u?-K(u):0,m=c/(2*Math.sqrt(a*l)),p=o-i,x=K(Math.sqrt(a/l)),b=Math.abs(p)<5;n||(n=b?.01:2),e||(e=b?.005:.5);let y;if(m<1){const g=Se(x,m);y=P=>{const T=Math.exp(-m*x*P);return o-T*((d+m*x*p)/g*Math.sin(g*P)+p*Math.cos(g*P))}}else if(m===1)y=g=>o-Math.exp(-x*g)*(p+(d+x*p)*g);else{const g=x*Math.sqrt(m*m-1);y=P=>{const T=Math.exp(-m*x*P),E=Math.min(g*P,300);return o-T*((d+m*x*p)*Math.sinh(E)+g*p*Math.cosh(E))/g}}return{calculatedDuration:f&&h||null,next:g=>{const P=y(g);if(f)r.done=g>=h;else{let T=d;g!==0&&(m<1?T=li(y,g,P):T=0);const E=Math.abs(T)<=n,A=Math.abs(o-P)<=e;r.done=E&&A}return r.value=r.done?o:P,r}}}function Sn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:c,restDelta:l=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},d=V=>a!==void 0&&V<a||c!==void 0&&V>c,m=V=>a===void 0?c:c===void 0||Math.abs(a-V)<Math.abs(c-V)?a:c;let p=n*e;const x=h+p,b=r===void 0?x:r(x);b!==x&&(p=b-h);const y=V=>-p*Math.exp(-V/s),g=V=>b+y(V),P=V=>{const D=y(V),W=g(V);f.done=Math.abs(D)<=l,f.value=f.done?b:W};let T,E;const A=V=>{d(f.value)&&(T=V,E=ui({keyframes:[f.value,m(f.value)],velocity:li(g,V,f.value),damping:i,stiffness:o,restDelta:l,restSpeed:u}))};return A(0),{calculatedDuration:null,next:V=>{let D=!1;return!E&&T===void 0&&(D=!0,P(V),A(V)),T!==void 0&&V>T?E.next(V-T):(!D&&P(V),f)}}}const Eo=t=>{const e=({timestamp:n})=>t(n);return{start:()=>S.update(e,!0),stop:()=>_(e),now:()=>B.isProcessing?B.timestamp:performance.now()}},An=2e4;function Cn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<An;)e+=n,s=t.next(e);return e>=An?1/0:e}const jo={decay:Sn,inertia:Sn,tween:qt,keyframes:qt,spring:ui};function Zt({autoplay:t=!0,delay:e=0,driver:n=Eo,keyframes:s,type:i="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:a="loop",onPlay:c,onStop:l,onComplete:u,onUpdate:h,...f}){let d=1,m=!1,p,x;const b=()=>{x=new Promise(C=>{p=C})};b();let y;const g=jo[i]||qt;let P;g!==qt&&typeof s[0]!="number"&&(P=ai([0,100],s,{clamp:!1}),s=[0,100]);const T=g({...f,keyframes:s});let E;a==="mirror"&&(E=g({...f,keyframes:[...s].reverse(),velocity:-(f.velocity||0)}));let A="idle",V=null,D=null,W=null;T.calculatedDuration===null&&o&&(T.calculatedDuration=Cn(T));const{calculatedDuration:$}=T;let X=1/0,Y=1/0;$!==null&&(X=$+r,Y=X*(o+1)-r);let F=0;const R=C=>{if(D===null)return;d>0&&(D=Math.min(D,C)),d<0&&(D=Math.min(C-Y/d,D)),V!==null?F=V:F=Math.round(C-D)*d;const xt=F-e*(d>=0?1:-1),sn=d>=0?xt<0:xt>Y;F=Math.max(xt,0),A==="finished"&&V===null&&(F=Y);let rn=F,on=T;if(o){const ae=F/X;let Ot=Math.floor(ae),it=ae%1;!it&&ae>=1&&(it=1),it===1&&Ot--,Ot=Math.min(Ot,o+1);const cn=!!(Ot%2);cn&&(a==="reverse"?(it=1-it,r&&(it-=r/X)):a==="mirror"&&(on=E));let ln=et(0,1,it);F>Y&&(ln=a==="reverse"&&cn?1:0),rn=ln*X}const Pt=sn?{done:!1,value:s[0]}:on.next(rn);P&&(Pt.value=P(Pt.value));let{done:an}=Pt;!sn&&$!==null&&(an=d>=0?F>=Y:F<=0);const Ii=V===null&&(A==="finished"||A==="running"&&an);return h&&h(Pt.value),Ii&&Oi(),Pt},q=()=>{y&&y.stop(),y=void 0},ft=()=>{A="idle",q(),p(),b(),D=W=null},Oi=()=>{A="finished",u&&u(),q(),p()},en=()=>{if(m)return;y||(y=n(R));const C=y.now();c&&c(),V!==null?D=C-V:(!D||A==="finished")&&(D=C),A==="finished"&&b(),W=D,V=null,A="running",y.start()};t&&en();const nn={then(C,xt){return x.then(C,xt)},get time(){return K(F)},set time(C){C=tt(C),F=C,V!==null||!y||d===0?V=C:D=y.now()-C/d},get duration(){const C=T.calculatedDuration===null?Cn(T):T.calculatedDuration;return K(C)},get speed(){return d},set speed(C){C===d||!y||(d=C,nn.time=K(F))},get state(){return A},play:en,pause:()=>{A="paused",V=F},stop:()=>{m=!0,A!=="idle"&&(A="idle",l&&l(),ft())},cancel:()=>{W!==null&&R(W),ft()},complete:()=>{A="finished"},sample:C=>(D=0,R(C))};return nn}function Oo(t){let e;return()=>(e===void 0&&(e=t()),e)}const Io=Oo(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Uo=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Nt=10,No=2e4,Go=(t,e)=>e.type==="spring"||t==="backgroundColor"||!Gs(e.ease);function Wo(t,e,{onUpdate:n,onComplete:s,...i}){if(!(Io()&&Uo.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let r=!1,a,c;const l=()=>{c=new Promise(y=>{a=y})};l();let{keyframes:u,duration:h=300,ease:f,times:d}=i;if(Go(e,i)){const y=Zt({...i,repeat:0,delay:0});let g={done:!1,value:u[0]};const P=[];let T=0;for(;!g.done&&T<No;)g=y.sample(T),P.push(g.value),T+=Nt;d=void 0,u=P,h=T-Nt,f="linear"}const m=Zr(t.owner.current,e,u,{...i,duration:h,ease:f,times:d});i.syncStart&&(m.startTime=B.isProcessing?B.timestamp:document.timeline?document.timeline.currentTime:performance.now());const p=()=>m.cancel(),x=()=>{S.update(p),a(),l()};return m.onfinish=()=>{t.set(Qr(u,i)),s&&s(),x()},{then(y,g){return c.then(y,g)},attachTimeline(y){return m.timeline=y,m.onfinish=null,M},get time(){return K(m.currentTime||0)},set time(y){m.currentTime=tt(y)},get speed(){return m.playbackRate},set speed(y){m.playbackRate=y},get duration(){return K(h)},play:()=>{r||(m.play(),_(p))},pause:()=>m.pause(),stop:()=>{if(r=!0,m.playState==="idle")return;const{currentTime:y}=m;if(y){const g=Zt({...i,autoplay:!1});t.setWithVelocity(g.sample(y-Nt).value,g.sample(y).value,Nt)}x()},complete:()=>m.finish(),cancel:x}}function $o({keyframes:t,delay:e,onUpdate:n,onComplete:s}){const i=()=>(n&&n(t[t.length-1]),s&&s(),{time:0,speed:1,duration:0,play:M,pause:M,stop:M,then:o=>(o(),Promise.resolve()),cancel:M,complete:M});return e?Zt({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}const Ho={type:"spring",stiffness:500,damping:25,restSpeed:10},zo=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Ko={type:"keyframes",duration:.8},_o={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Xo=(t,{keyframes:e})=>e.length>2?Ko:ut.has(t)?t.startsWith("scale")?zo(e[1]):Ho:_o,Ae=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(nt.test(e)||e==="0")&&!e.startsWith("url(")),Yo=new Set(["brightness","contrast","saturate","opacity"]);function qo(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(ie)||[];if(!s)return t;const i=n.replace(s,"");let o=Yo.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Zo=/([a-z-]*)\(.*?\)/g,Ce={...nt,getAnimatableNone:t=>{const e=t.match(Zo);return e?e.map(qo).join(" "):t}},Qo={...As,color:j,backgroundColor:j,outlineColor:j,fill:j,stroke:j,borderColor:j,borderTopColor:j,borderRightColor:j,borderBottomColor:j,borderLeftColor:j,filter:Ce,WebkitFilter:Ce},qe=t=>Qo[t];function hi(t,e){let n=qe(t);return n!==Ce&&(n=nt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const fi=t=>/^0[^.\s]+$/.test(t);function Jo(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||fi(t)}function ta(t,e,n,s){const i=Ae(e,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const r=s.from!==void 0?s.from:t.get();let a;const c=[];for(let l=0;l<o.length;l++)o[l]===null&&(o[l]=l===0?r:o[l-1]),Jo(o[l])&&c.push(l),typeof o[l]=="string"&&o[l]!=="none"&&o[l]!=="0"&&(a=o[l]);if(i&&c.length&&a)for(let l=0;l<c.length;l++){const u=c[l];o[u]=hi(e,a)}return o}function ea({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}function di(t,e){return t[e]||t.default||t}const Ze=(t,e,n,s={})=>i=>{const o=di(s,t)||{},r=o.delay||s.delay||0;let{elapsed:a=0}=s;a=a-tt(r);const c=ta(e,t,n,o),l=c[0],u=c[c.length-1],h=Ae(t,l),f=Ae(t,u);let d={keyframes:c,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:m=>{e.set(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(ea(o)||(d={...d,...Xo(t,d)}),d.duration&&(d.duration=tt(d.duration)),d.repeatDelay&&(d.repeatDelay=tt(d.repeatDelay)),!h||!f||qr.current||o.type===!1)return $o(d);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const m=Wo(e,t,d);if(m)return m}return Zt(d)};function Qt(t){return!!(O(t)&&t.add)}const mi=t=>/^\-?\d*\.?\d+$/.test(t);function Qe(t,e){t.indexOf(e)===-1&&t.push(e)}function Je(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class tn{constructor(){this.subscriptions=[]}add(e){return Qe(this.subscriptions,e),()=>Je(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const na=t=>!isNaN(parseFloat(t));class sa{constructor(e,n={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(s,i=!0)=>{this.prev=this.current,this.current=s;const{delta:o,timestamp:r}=B;this.lastUpdated!==r&&(this.timeDelta=o,this.lastUpdated=r,S.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>S.postRender(this.velocityCheck),this.velocityCheck=({timestamp:s})=>{s!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=na(this.current),this.owner=n.owner}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new tn);const s=this.events[e].add(n);return e==="change"?()=>{s(),S.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=e,this.timeDelta=s}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?ci(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),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 yt(t,e){return new sa(t,e)}const pi=t=>e=>e.test(t),ia={test:t=>t==="auto",parse:t=>t},gi=[ht,v,G,Z,cr,ar,ia],Tt=t=>gi.find(pi(t)),ra=[...gi,j,nt],oa=t=>ra.find(pi(t));function aa(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,yt(n))}function ca(t,e){const n=oe(t,e);let{transitionEnd:s={},transition:i={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...s};for(const r in o){const a=Vr(o[r]);aa(t,r,a)}}function la(t,e,n){var s,i;const o=Object.keys(e).filter(a=>!t.hasValue(a)),r=o.length;if(r)for(let a=0;a<r;a++){const c=o[a],l=e[c];let u=null;Array.isArray(l)&&(u=l[0]),u===null&&(u=(i=(s=n[c])!==null&&s!==void 0?s:t.readValue(c))!==null&&i!==void 0?i:e[c]),u!=null&&(typeof u=="string"&&(mi(u)||fi(u))?u=parseFloat(u):!oa(u)&&nt.test(l)&&(u=hi(c,l)),t.addValue(c,yt(u,{owner:t})),n[c]===void 0&&(n[c]=u),u!==null&&t.setBaseTarget(c,u))}}function ua(t,e){return e?(e[t]||e.default||e).from:void 0}function ha(t,e,n){const s={};for(const i in t){const o=ua(i,e);if(o!==void 0)s[i]=o;else{const r=n.getValue(i);r&&(s[i]=r.get())}}return s}function fa({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function yi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");s&&(o=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const h in a){const f=t.getValue(h),d=a[h];if(!f||d===void 0||u&&fa(u,h))continue;const m={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!f.hasAnimated){const x=t.getProps()[Xr];x&&(m.elapsed=window.HandoffAppearAnimations(x,h,f,S),m.syncStart=!0)}f.start(Ze(h,f,d,t.shouldReduceMotion&&ut.has(h)?{type:!1}:m));const p=f.animation;Qt(c)&&(c.add(h),p.then(()=>c.remove(h))),l.push(p)}return r&&Promise.all(l).then(()=>{r&&ca(t,r)}),l}function we(t,e,n={}){const s=oe(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(yi(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:h}=i;return da(t,e,l+c,u,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,l]=a==="beforeChildren"?[o,r]:[r,o];return c().then(()=>l())}else return Promise.all([o(),r(n.delay)])}function da(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,c=i===1?(l=0)=>l*s:(l=0)=>a-l*s;return Array.from(t.variantChildren).sort(ma).forEach((l,u)=>{l.notify("AnimationStart",e),r.push(we(l,e,{...o,delay:n+c(u)}).then(()=>l.notify("AnimationComplete",e)))}),Promise.all(r)}function ma(t,e){return t.sortNodePosition(e)}function pa(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>we(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=we(t,e,n);else{const i=typeof e=="function"?oe(t,e,n.custom):e;s=Promise.all(yi(t,i,n))}return s.then(()=>t.notify("AnimationComplete",e))}const ga=[...je].reverse(),ya=je.length;function va(t){return e=>Promise.all(e.map(({animation:n,options:s})=>pa(t,n,s)))}function xa(t){let e=va(t);const n=Ta();let s=!0;const i=(c,l)=>{const u=oe(t,l);if(u){const{transition:h,transitionEnd:f,...d}=u;c={...c,...d,...f}}return c};function o(c){e=c(t)}function r(c,l){const u=t.getProps(),h=t.getVariantContext(!0)||{},f=[],d=new Set;let m={},p=1/0;for(let b=0;b<ya;b++){const y=ga[b],g=n[y],P=u[y]!==void 0?u[y]:h[y],T=Mt(P),E=y===l?g.isActive:null;E===!1&&(p=b);let A=P===h[y]&&P!==u[y]&&T;if(A&&s&&t.manuallyAnimateOnMount&&(A=!1),g.protectedKeys={...m},!g.isActive&&E===null||!P&&!g.prevProp||ne(P)||typeof P=="boolean")continue;const V=Pa(g.prevProp,P);let D=V||y===l&&g.isActive&&!A&&T||b>p&&T;const W=Array.isArray(P)?P:[P];let $=W.reduce(i,{});E===!1&&($={});const{prevResolvedValues:X={}}=g,Y={...X,...$},F=R=>{D=!0,d.delete(R),g.needsAnimating[R]=!0};for(const R in Y){const q=$[R],ft=X[R];m.hasOwnProperty(R)||(q!==ft?Xt(q)&&Xt(ft)?!Us(q,ft)||V?F(R):g.protectedKeys[R]=!0:q!==void 0?F(R):d.add(R):q!==void 0&&d.has(R)?F(R):g.protectedKeys[R]=!0)}g.prevProp=P,g.prevResolvedValues=$,g.isActive&&(m={...m,...$}),s&&t.blockInitialAnimation&&(D=!1),D&&!A&&f.push(...W.map(R=>({animation:R,options:{type:y,...c}})))}if(d.size){const b={};d.forEach(y=>{const g=t.getBaseTarget(y);g!==void 0&&(b[y]=g)}),f.push({animation:b})}let x=!!f.length;return s&&u.initial===!1&&!t.manuallyAnimateOnMount&&(x=!1),s=!1,x?e(f):Promise.resolve()}function a(c,l,u){var h;if(n[c].isActive===l)return Promise.resolve();(h=t.variantChildren)===null||h===void 0||h.forEach(d=>{var m;return(m=d.animationState)===null||m===void 0?void 0:m.setActive(c,l)}),n[c].isActive=l;const f=r(u,c);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n}}function Pa(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Us(e,t):!1}function rt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ta(){return{animate:rt(!0),whileInView:rt(),whileHover:rt(),whileTap:rt(),whileDrag:rt(),whileFocus:rt(),exit:rt()}}class ba extends st{constructor(e){super(e),e.animationState||(e.animationState=xa(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),ne(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Va=0;class Sa extends st{constructor(){super(...arguments),this.id=Va++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n,custom:s}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const o=this.node.animationState.setActive("exit",!e,{custom:s??this.node.getProps().custom});n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const Aa={animation:{Feature:ba},exit:{Feature:Sa}},wn=(t,e)=>Math.abs(t-e);function Ca(t,e){const n=wn(t.x,e.x),s=wn(t.y,e.y);return Math.sqrt(n**2+s**2)}class vi{constructor(e,n,{transformPagePoint:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const l=ye(this.lastMoveEventInfo,this.history),u=this.startEvent!==null,h=Ca(l.offset,{x:0,y:0})>=3;if(!u&&!h)return;const{point:f}=l,{timestamp:d}=B;this.history.push({...f,timestamp:d});const{onStart:m,onMove:p}=this.handlers;u||(m&&m(this.lastMoveEvent,l),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,l)},this.handlePointerMove=(l,u)=>{this.lastMoveEvent=l,this.lastMoveEventInfo=ge(u,this.transformPagePoint),S.update(this.updatePoint,!0)},this.handlePointerUp=(l,u)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:h,onSessionEnd:f}=this.handlers,d=ye(l.type==="pointercancel"?this.lastMoveEventInfo:ge(u,this.transformPagePoint),this.history);this.startEvent&&h&&h(l,d),f&&f(l,d)},!ks(e))return;this.handlers=n,this.transformPagePoint=s;const i=re(e),o=ge(i,this.transformPagePoint),{point:r}=o,{timestamp:a}=B;this.history=[{...r,timestamp:a}];const{onSessionStart:c}=n;c&&c(e,ye(o,this.history)),this.removeListeners=J(z(window,"pointermove",this.handlePointerMove),z(window,"pointerup",this.handlePointerUp),z(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),_(this.updatePoint)}}function ge(t,e){return e?{point:e(t.point)}:t}function Dn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ye({point:t},e){return{point:t,delta:Dn(t,xi(e)),offset:Dn(t,wa(e)),velocity:Da(e,.1)}}function wa(t){return t[0]}function xi(t){return t[t.length-1]}function Da(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=xi(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>tt(e)));)n--;if(!s)return{x:0,y:0};const o=K(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function I(t){return t.max-t.min}function De(t,e=0,n=.01){return Math.abs(t-e)<=n}function Mn(t,e,n,s=.5){t.origin=s,t.originPoint=w(e.min,e.max,t.origin),t.scale=I(n)/I(e),(De(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=w(n.min,n.max,t.origin)-t.originPoint,(De(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Ct(t,e,n,s){Mn(t.x,e.x,n.x,s?s.originX:void 0),Mn(t.y,e.y,n.y,s?s.originY:void 0)}function Ln(t,e,n){t.min=n.min+e.min,t.max=t.min+I(e)}function Ma(t,e,n){Ln(t.x,e.x,n.x),Ln(t.y,e.y,n.y)}function Rn(t,e,n){t.min=e.min-n.min,t.max=t.min+I(e)}function wt(t,e,n){Rn(t.x,e.x,n.x),Rn(t.y,e.y,n.y)}function La(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?w(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?w(n,t,s.max):Math.min(t,n)),t}function Fn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Ra(t,{top:e,left:n,bottom:s,right:i}){return{x:Fn(t.x,n,i),y:Fn(t.y,e,s)}}function Bn(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Fa(t,e){return{x:Bn(t.x,e.x),y:Bn(t.y,e.y)}}function Ba(t,e){let n=.5;const s=I(t),i=I(e);return i>s?n=Rt(e.min,e.max-s,t.min):s>i&&(n=Rt(t.min,t.max-i,e.min)),et(0,1,n)}function ka(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Me=.35;function Ea(t=Me){return t===!1?t=0:t===!0&&(t=Me),{x:kn(t,"left","right"),y:kn(t,"top","bottom")}}function kn(t,e,n){return{min:En(t,e),max:En(t,n)}}function En(t,e){return typeof t=="number"?t:t[e]||0}const jn=()=>({translate:0,scale:1,origin:0,originPoint:0}),pt=()=>({x:jn(),y:jn()}),On=()=>({min:0,max:0}),L=()=>({x:On(),y:On()});function N(t){return[t("x"),t("y")]}function Pi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function ja({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Oa(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ve(t){return t===void 0||t===1}function Le({scale:t,scaleX:e,scaleY:n}){return!ve(t)||!ve(e)||!ve(n)}function ot(t){return Le(t)||Ti(t)||t.z||t.rotate||t.rotateX||t.rotateY}function Ti(t){return In(t.x)||In(t.y)}function In(t){return t&&t!=="0%"}function Jt(t,e,n){const s=t-n,i=e*s;return n+i}function Un(t,e,n,s,i){return i!==void 0&&(t=Jt(t,i,s)),Jt(t,n,s)+e}function Re(t,e=0,n=1,s,i){t.min=Un(t.min,e,n,s,i),t.max=Un(t.max,e,n,s,i)}function bi(t,{x:e,y:n}){Re(t.x,e.translate,e.scale,e.originPoint),Re(t.y,n.translate,n.scale,n.originPoint)}function Ia(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const c=o.instance;c&&c.style&&c.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&>(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,bi(t,r)),s&&ot(o.latestValues)&>(t,o.latestValues))}e.x=Nn(e.x),e.y=Nn(e.y)}function Nn(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Q(t,e){t.min=t.min+e,t.max=t.max+e}function Gn(t,e,[n,s,i]){const o=e[i]!==void 0?e[i]:.5,r=w(t.min,t.max,o);Re(t,e[n],e[s],r,e.scale)}const Ua=["x","scaleX","originX"],Na=["y","scaleY","originY"];function gt(t,e){Gn(t.x,e,Ua),Gn(t.y,e,Na)}function Vi(t,e){return Pi(Oa(t.getBoundingClientRect(),e))}function Ga(t,e,n){const s=Vi(t,n),{scroll:i}=e;return i&&(Q(s.x,i.offset.x),Q(s.y,i.offset.y)),s}const Wa=new WeakMap;class $a{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=L(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=c=>{this.stopAnimation(),n&&this.snapToCursor(re(c,"page").point)},o=(c,l)=>{const{drag:u,dragPropagation:h,onDragStart:f}=this.getProps();if(u&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=js(u),!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),N(m=>{let p=this.getAxisMotionValue(m).get()||0;if(G.test(p)){const{projection:x}=this.visualElement;if(x&&x.layout){const b=x.layout.layoutBox[m];b&&(p=I(b)*(parseFloat(p)/100))}}this.originPoint[m]=p}),f&&S.update(()=>f(c,l),!1,!0);const{animationState:d}=this.visualElement;d&&d.setActive("whileDrag",!0)},r=(c,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:f,onDrag:d}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:m}=l;if(h&&this.currentDirection===null){this.currentDirection=Ha(m),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",l.point,m),this.updateAxis("y",l.point,m),this.visualElement.render(),d&&d(c,l)},a=(c,l)=>this.stop(c,l);this.panSession=new vi(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&S.update(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Gt(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=La(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),{layout:s}=this.visualElement.projection||{},i=this.constraints;e&&dt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Ra(s.layoutBox,e):this.constraints=!1,this.elastic=Ea(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&N(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=ka(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!dt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Ga(s,i.root,this.visualElement.getTransformPagePoint());let r=Fa(i.layout.layoutBox,o);if(n){const a=n(ja(r));this.hasMutatedConstraints=!!a,a&&(r=Pi(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=N(u=>{if(!Gt(u,n,this.currentDirection))return;let h=c&&c[u]||{};r&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,m)});return Promise.all(l).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(Ze(e,s,0,n))}stopAnimation(){N(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){N(n=>{const{drag:s}=this.getProps();if(!Gt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-w(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!dt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};N(r=>{const a=this.getAxisMotionValue(r);if(a){const c=a.get();i[r]=Ba({min:c,max:c},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),N(r=>{if(!Gt(r,e,null))return;const a=this.getAxisMotionValue(r),{min:c,max:l}=this.constraints[r];a.set(w(c,l,i[r]))})}addListeners(){if(!this.visualElement.current)return;Wa.set(this.visualElement,this);const e=this.visualElement.current,n=z(e,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();dt(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),s();const r=H(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(N(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=c[u].translate,h.set(h.get()+c[u].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Me,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Gt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Ha(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class za extends st{constructor(e){super(e),this.removeGroupControls=M,this.removeListeners=M,this.controls=new $a(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||M}unmount(){this.removeGroupControls(),this.removeListeners()}}const Wn=t=>(e,n)=>{t&&S.update(()=>t(e,n))};class Ka extends st{constructor(){super(...arguments),this.removePointerDownListener=M}onPointerDown(e){this.session=new vi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Wn(e),onStart:Wn(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&S.update(()=>i(o,r))}}}mount(){this.removePointerDownListener=z(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function _a(){const t=k(Ee);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=Wi();return ke(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const $t={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function $n(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const bt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(v.test(t))t=parseFloat(t);else return t;const n=$n(t,e.target.x),s=$n(t,e.target.y);return`${n}% ${s}%`}},Xa={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=nt.parse(t);if(i.length>5)return s;const o=nt.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=c;const l=w(a,c,.5);return typeof i[2+r]=="number"&&(i[2+r]/=l),typeof i[3+r]=="number"&&(i[3+r]/=l),o(i)}};class Ya extends ps.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;tr(qa),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),$t.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,r=s.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||S.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Si(t){const[e,n]=_a(),s=k(zt);return ps.createElement(Ya,{...t,layoutGroup:s,switchLayoutGroup:k(Ps),isPresent:e,safeToRemove:n})}const qa={borderRadius:{...bt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bt,borderTopRightRadius:bt,borderBottomLeftRadius:bt,borderBottomRightRadius:bt,boxShadow:Xa},Ai=["TopLeft","TopRight","BottomLeft","BottomRight"],Za=Ai.length,Hn=t=>typeof t=="string"?parseFloat(t):t,zn=t=>typeof t=="number"||v.test(t);function Qa(t,e,n,s,i,o){i?(t.opacity=w(0,n.opacity!==void 0?n.opacity:1,Ja(s)),t.opacityExit=w(e.opacity!==void 0?e.opacity:1,0,tc(s))):o&&(t.opacity=w(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let r=0;r<Za;r++){const a=`border${Ai[r]}Radius`;let c=Kn(e,a),l=Kn(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||zn(c)===zn(l)?(t[a]=Math.max(w(Hn(c),Hn(l),s),0),(G.test(l)||G.test(c))&&(t[a]+="%")):t[a]=l}(e.rotate||n.rotate)&&(t.rotate=w(e.rotate||0,n.rotate||0,s))}function Kn(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Ja=Ci(0,.5,_e),tc=Ci(.5,.95,M);function Ci(t,e,n){return s=>s<t?0:s>e?1:n(Rt(t,e,s))}function _n(t,e){t.min=e.min,t.max=e.max}function U(t,e){_n(t.x,e.x),_n(t.y,e.y)}function Xn(t,e,n,s,i){return t-=e,t=Jt(t,1/n,s),i!==void 0&&(t=Jt(t,1/i,s)),t}function ec(t,e=0,n=1,s=.5,i,o=t,r=t){if(G.test(e)&&(e=parseFloat(e),e=w(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=w(o.min,o.max,s);t===o&&(a-=e),t.min=Xn(t.min,e,n,a,i),t.max=Xn(t.max,e,n,a,i)}function Yn(t,e,[n,s,i],o,r){ec(t,e[n],e[s],e[i],e.scale,o,r)}const nc=["x","scaleX","originX"],sc=["y","scaleY","originY"];function qn(t,e,n,s){Yn(t.x,e,nc,n?n.x:void 0,s?s.x:void 0),Yn(t.y,e,sc,n?n.y:void 0,s?s.y:void 0)}function Zn(t){return t.translate===0&&t.scale===1}function wi(t){return Zn(t.x)&&Zn(t.y)}function ic(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Di(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function Qn(t){return I(t.x)/I(t.y)}class rc{constructor(){this.members=[]}add(e){Qe(this.members,e),e.scheduleRender()}remove(e){if(Je(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Jn(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(s=`translate3d(${i}px, ${o}px, 0) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:c,rotateX:l,rotateY:u}=n;c&&(s+=`rotate(${c}deg) `),l&&(s+=`rotateX(${l}deg) `),u&&(s+=`rotateY(${u}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return(r!==1||a!==1)&&(s+=`scale(${r}, ${a})`),s||"none"}const oc=(t,e)=>t.depth-e.depth;class ac{constructor(){this.children=[],this.isDirty=!1}add(e){Qe(this.children,e),this.isDirty=!0}remove(e){Je(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(oc),this.isDirty=!1,this.children.forEach(e)}}function cc(t,e){const n=performance.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(_(s),t(o-e))};return S.read(s,!0),()=>_(s)}function lc(t){window.MotionDebug&&window.MotionDebug.record(t)}function uc(t){return t instanceof SVGElement&&t.tagName!=="svg"}function hc(t,e,n){const s=O(t)?t:yt(t);return s.start(Ze("",s,e,n)),s.animation}const ts=["","X","Y","Z"],es=1e3;let fc=0;const at={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Mi({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=fc++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{at.totalNodes=at.resolvedTargetDeltas=at.recalculatedProjection=0,this.nodes.forEach(pc),this.nodes.forEach(Pc),this.nodes.forEach(Tc),this.nodes.forEach(gc),lc(at)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new ac)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new tn),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const c=this.eventHandlers.get(r);c&&c.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=uc(r),this.instance=r;const{layoutId:c,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(l||c)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=cc(f,250),$t.hasAnimatedSinceResize&&($t.hasAnimatedSinceResize=!1,this.nodes.forEach(ss))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||l)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:d,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||Cc,{onLayoutAnimationStart:x,onLayoutAnimationComplete:b}=u.getProps(),y=!this.targetLayout||!Di(this.targetLayout,m)||d,g=!f&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,g);const P={...di(p,"layout"),onPlay:x,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P)}else f||ss(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,_(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(bc),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ns);return}this.isUpdating||this.nodes.forEach(vc),this.isUpdating=!1,this.nodes.forEach(xc),this.nodes.forEach(dc),this.nodes.forEach(mc),this.clearAllSnapshots();const a=performance.now();B.delta=et(0,1e3/60,a-B.timestamp),B.timestamp=a,B.isProcessing=!0,ce.update.process(B),ce.preRender.process(B),ce.render.process(B),B.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(yc),this.sharedNodes.forEach(Vc)}scheduleUpdateProjection(){S.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){S.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=L(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:r,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!wi(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;r&&(a||ot(this.latestValues)||u)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return r&&(c=this.removeTransform(c)),wc(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return L();const a=r.measureViewportBox(),{scroll:c}=this.root;return c&&(Q(a.x,c.offset.x),Q(a.y,c.offset.y)),a}removeElementScroll(r){const a=L();U(a,r);for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:u,options:h}=l;if(l!==this.root&&u&&h.layoutScroll){if(u.isRoot){U(a,r);const{scroll:f}=this.root;f&&(Q(a.x,-f.offset.x),Q(a.y,-f.offset.y))}Q(a.x,u.offset.x),Q(a.y,u.offset.y)}}return a}applyTransform(r,a=!1){const c=L();U(c,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&>(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),ot(u.latestValues)&>(c,u.latestValues)}return ot(this.latestValues)&>(c,this.latestValues),c}removeTransform(r){const a=L();U(a,r);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!ot(l.latestValues))continue;Le(l.latestValues)&&l.updateSnapshot();const u=L(),h=l.measurePageBox();U(u,h),qn(a,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,u)}return ot(this.latestValues)&&qn(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}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!==B.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var a;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==c;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=B.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),wt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),U(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=L(),this.targetWithTransforms=L()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ma(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):U(this.target,this.layout.layoutBox),bi(this.target,this.targetDelta)):U(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),wt(this.relativeTargetOrigin,this.target,d.target),U(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}at.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Le(this.parent.latestValues)||Ti(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var r;const a=this.getLead(),c=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||!((r=this.parent)===null||r===void 0)&&r.isProjectionDirty)&&(l=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===B.timestamp&&(l=!1),l)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;U(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;Ia(this.layoutCorrected,this.treeScale,this.path,c),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox);const{target:m}=a;if(!m){this.projectionTransform&&(this.projectionDelta=pt(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=pt(),this.projectionDeltaWithTransform=pt());const p=this.projectionTransform;Ct(this.projectionDelta,this.layoutCorrected,m,this.latestValues),this.projectionTransform=Jn(this.projectionDelta,this.treeScale),(this.projectionTransform!==p||this.treeScale.x!==f||this.treeScale.y!==d)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),at.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(r,a=!1){const c=this.snapshot,l=c?c.latestValues:{},u={...this.latestValues},h=pt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=L(),d=c?c.source:void 0,m=this.layout?this.layout.source:void 0,p=d!==m,x=this.getStack(),b=!x||x.members.length<=1,y=!!(p&&!b&&this.options.crossfade===!0&&!this.path.some(Ac));this.animationProgress=0;let g;this.mixTargetDelta=P=>{const T=P/1e3;is(h.x,r.x,T),is(h.y,r.y,T),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Sc(this.relativeTarget,this.relativeTargetOrigin,f,T),g&&ic(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=L()),U(g,this.relativeTarget)),p&&(this.animationValues=u,Qa(u,l,this.latestValues,T,y,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(_(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=S.update(()=>{$t.hasAnimatedSinceResize=!0,this.currentAnimation=hc(0,es,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(es),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=r;if(!(!a||!c||!l)){if(this!==r&&this.layout&&l&&Li(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||L();const h=I(this.layout.layoutBox.x);c.x.min=r.target.x.min,c.x.max=c.x.min+h;const f=I(this.layout.layoutBox.y);c.y.min=r.target.y.min,c.y.max=c.y.min+f}U(a,c),gt(a,u),Ct(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new rc),this.sharedNodes.get(r).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:a}=this.options;return a?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:a}=this.options;return a?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:c}=r;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const l={};for(let u=0;u<ts.length;u++){const h="rotate"+ts[u];c[h]&&(l[h]=c[h],r.setStaticValue(h,0))}r.render();for(const u in l)r.setStaticValue(u,l[u]);r.scheduleRender()}getProjectionStyles(r={}){var a,c;const l={};if(!this.instance||this.isSVG)return l;if(this.isVisible)l.visibility="";else return{visibility:"hidden"};const u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=Wt(r.pointerEvents)||"",l.transform=u?u(this.latestValues,""):"none",l;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=Wt(r.pointerEvents)||""),this.hasProjected&&!ot(this.latestValues)&&(p.transform=u?u({},""):"none",this.hasProjected=!1),p}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),l.transform=Jn(this.projectionDeltaWithTransform,this.treeScale,f),u&&(l.transform=u(f,l.transform));const{x:d,y:m}=this.projectionDelta;l.transformOrigin=`${d.origin*100}% ${m.origin*100}% 0`,h.animationValues?l.opacity=h===this?(c=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:l.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const p in Kt){if(f[p]===void 0)continue;const{correct:x,applyTo:b}=Kt[p],y=l.transform==="none"?f[p]:x(f[p],h);if(b){const g=b.length;for(let P=0;P<g;P++)l[b[P]]=y}else l[p]=y}return this.options.layoutId&&(l.pointerEvents=h===this?Wt(r.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(ns),this.root.sharedNodes.clear()}}}function dc(t){t.updateLayout()}function mc(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;o==="size"?N(h=>{const f=r?n.measuredBox[h]:n.layoutBox[h],d=I(f);f.min=s[h].min,f.max=f.min+d}):Li(o,n.layoutBox,s)&&N(h=>{const f=r?n.measuredBox[h]:n.layoutBox[h],d=I(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=pt();Ct(a,s,n.layoutBox);const c=pt();r?Ct(c,t.applyTransform(i,!0),n.measuredBox):Ct(c,s,n.layoutBox);const l=!wi(a);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const m=L();wt(m,n.layoutBox,f.layoutBox);const p=L();wt(p,s,d.layoutBox),Di(m,p)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function pc(t){at.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function gc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function yc(t){t.clearSnapshot()}function ns(t){t.clearMeasurements()}function vc(t){t.isLayoutDirty=!1}function xc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ss(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Pc(t){t.resolveTargetDelta()}function Tc(t){t.calcProjection()}function bc(t){t.resetRotation()}function Vc(t){t.removeLeadSnapshot()}function is(t,e,n){t.translate=w(e.translate,0,n),t.scale=w(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function rs(t,e,n,s){t.min=w(e.min,n.min,s),t.max=w(e.max,n.max,s)}function Sc(t,e,n,s){rs(t.x,e.x,n.x,s),rs(t.y,e.y,n.y,s)}function Ac(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Cc={duration:.45,ease:[.4,0,.1,1]},os=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),as=os("applewebkit/")&&!os("chrome/")?Math.round:M;function cs(t){t.min=as(t.min),t.max=as(t.max)}function wc(t){cs(t.x),cs(t.y)}function Li(t,e,n){return t==="position"||t==="preserve-aspect"&&!De(Qn(e),Qn(n),.2)}const Dc=Mi({attachResizeListener:(t,e)=>H(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),xe={current:void 0},Ri=Mi({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!xe.current){const t=new Dc({});t.mount(window),t.setOptions({layoutScroll:!0}),xe.current=t}return xe.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Mc={pan:{Feature:Ka},drag:{Feature:za,ProjectionNode:Ri,MeasureLayout:Si}},Lc=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Rc(t){const e=Lc.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}function Fe(t,e,n=1){const[s,i]=Rc(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return mi(r)?parseFloat(r):r}else return Te(i)?Fe(i,e,n+1):i}function Fc(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(i=>{const o=i.get();if(!Te(o))return;const r=Fe(o,s);r&&i.set(r)});for(const i in e){const o=e[i];if(!Te(o))continue;const r=Fe(o,s);r&&(e[i]=r,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:e,transitionEnd:n}}const Bc=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Fi=t=>Bc.has(t),kc=t=>Object.keys(t).some(Fi),ls=t=>t===ht||t===v,us=(t,e)=>parseFloat(t.split(", ")[e]),hs=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/);if(i)return us(i[1],e);{const o=s.match(/^matrix\((.+)\)$/);return o?us(o[1],t):0}},Ec=new Set(["x","y","z"]),jc=Bt.filter(t=>!Ec.has(t));function Oc(t){const e=[];return jc.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}const vt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:hs(4,13),y:hs(5,14)};vt.translateX=vt.x;vt.translateY=vt.y;const Ic=(t,e,n)=>{const s=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:r}=o,a={};r==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(l=>{a[l]=vt[l](s,o)}),e.render();const c=e.measureViewportBox();return n.forEach(l=>{const u=e.getValue(l);u&&u.jump(a[l]),t[l]=vt[l](c,o)}),t},Uc=(t,e,n={},s={})=>{e={...e},s={...s};const i=Object.keys(e).filter(Fi);let o=[],r=!1;const a=[];if(i.forEach(c=>{const l=t.getValue(c);if(!t.hasValue(c))return;let u=n[c],h=Tt(u);const f=e[c];let d;if(Xt(f)){const m=f.length,p=f[0]===null?1:0;u=f[p],h=Tt(u);for(let x=p;x<m&&f[x]!==null;x++)d?Ke(Tt(f[x])===d):d=Tt(f[x])}else d=Tt(f);if(h!==d)if(ls(h)&&ls(d)){const m=l.get();typeof m=="string"&&l.set(parseFloat(m)),typeof f=="string"?e[c]=parseFloat(f):Array.isArray(f)&&d===v&&(e[c]=f.map(parseFloat))}else h!=null&&h.transform&&(d!=null&&d.transform)&&(u===0||f===0)?u===0?l.set(d.transform(u)):e[c]=h.transform(f):(r||(o=Oc(t),r=!0),a.push(c),s[c]=s[c]!==void 0?s[c]:e[c],l.jump(f))}),a.length){const c=a.indexOf("height")>=0?window.pageYOffset:null,l=Ic(e,t,a);return o.length&&o.forEach(([u,h])=>{t.getValue(u).set(h)}),t.render(),ee&&c!==null&&window.scrollTo({top:c}),{target:l,transitionEnd:s}}else return{target:e,transitionEnd:s}};function Nc(t,e,n,s){return kc(e)?Uc(t,e,n,s):{target:e,transitionEnd:s}}const Gc=(t,e,n,s)=>{const i=Fc(t,e,s);return e=i.target,s=i.transitionEnd,Nc(t,e,n,s)},Be={current:null},Bi={current:!1};function Wc(){if(Bi.current=!0,!!ee)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Be.current=t.matches;t.addListener(e),e()}else Be.current=!1}function $c(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(O(o))t.addValue(i,o),Qt(s)&&s.add(i);else if(O(r))t.addValue(i,yt(o,{owner:t})),Qt(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,yt(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const fs=new WeakMap,ki=Object.keys(Lt),Hc=ki.length,ds=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],zc=Oe.length;class Kc{constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>S.render(this.render,!1,!0);const{latestValues:a,renderState:c}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=r,this.isControllingVariants=se(n),this.isVariantNode=xs(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n,{});for(const h in u){const f=u[h];a[h]!==void 0&&O(f)&&(f.set(a[h],!1),Qt(l)&&l.add(h))}}scrapeMotionValuesFromProps(e,n){return{}}mount(e){this.current=e,fs.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((n,s)=>this.bindToMotionValue(s,n)),Bi.current||Wc(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Be.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){fs.delete(this.current),this.projection&&this.projection.unmount(),_(this.notifyUpdate),_(this.render),this.valueSubscriptions.forEach(e=>e()),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)this.features[e].unmount();this.current=null}bindToMotionValue(e,n){const s=ut.has(e),i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&S.update(this.notifyUpdate,!1,!0),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},s,i,o){let r,a;for(let c=0;c<Hc;c++){const l=ki[c],{isEnabled:u,Feature:h,ProjectionNode:f,MeasureLayout:d}=Lt[l];f&&(r=f),u(n)&&(!this.features[l]&&h&&(this.features[l]=new h(this)),d&&(a=d))}if(!this.projection&&r){this.projection=new r(this.latestValues,this.parent&&this.parent.projection);const{layoutId:c,layout:l,drag:u,dragConstraints:h,layoutScroll:f,layoutRoot:d}=n;this.projection.setOptions({layoutId:c,layout:l,alwaysMeasureLayout:!!u||h&&dt(h),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof l=="string"?l:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:d})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):L()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}makeTargetAnimatable(e,n=!0){return this.makeTargetAnimatableFromInstance(e,this.props,n)}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<ds.length;s++){const i=ds[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=e["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=$c(this,this.scrapeMotionValuesFromProps(e,this.prevProps),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}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const s=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(s.initial=this.props.initial),s}const n={};for(let s=0;s<zc;s++){const i=Oe[s],o=this.props[i];(Mt(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,n)),this.values.set(e,n),this.latestValues[e]=n.get()}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=yt(n,{owner:this}),this.addValue(e,s)),s}readValue(e){var n;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(n=this.getBaseTargetFromProps(this.props,e))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props,i=typeof s=="string"||typeof s=="object"?(n=ze(this.props,s))===null||n===void 0?void 0:n[e]:void 0;if(s&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!O(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new tn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Ei extends Kc{sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...s},{transformValues:i},o){let r=ha(s,e||{},this);if(i&&(n&&(n=i(n)),s&&(s=i(s)),r&&(r=i(r))),o){la(this,s,r);const a=Gc(this,s,r,n);n=a.transitionEnd,s=a.target}return{transition:e,transitionEnd:n,...s}}}function _c(t){return window.getComputedStyle(t)}class Xc extends Ei{readValueFromInstance(e,n){if(ut.has(n)){const s=qe(n);return s&&s.default||0}else{const s=_c(e),i=(Vs(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Vi(e,n)}build(e,n,s,i){Ue(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n){return He(e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;O(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){Ms(e,n,s,i)}}class Yc extends Ei{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(ut.has(n)){const s=qe(n);return s&&s.default||0}return n=Ls.has(n)?n:$e(n),e.getAttribute(n)}measureInstanceViewportBox(){return L()}scrapeMotionValuesFromProps(e,n){return Fs(e,n)}build(e,n,s,i){Ge(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){Rs(e,n,s,i)}mount(e){this.isSVGTag=We(e.tagName),super.mount(e)}}const qc=(t,e)=>Ie(t)?new Yc(e,{enableHardwareAcceleration:!1}):new Xc(e,{enableHardwareAcceleration:!0}),Zc={layout:{ProjectionNode:Ri,MeasureLayout:Si}},Qc={...Aa,...Hr,...Mc,...Zc},ol=Qi((t,e)=>Rr(t,e,Qc,qc));function Jc(){const t=Dt(!1);return ys(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function tl(){const t=Jc(),[e,n]=$i(0),s=Pe(()=>{t.current&&n(e+1)},[e]);return[Pe(()=>S.postRender(s),[s]),e]}const el=lt(null),nl=t=>!t.isLayoutDirty&&t.willUpdate(!1);function ms(){const t=new Set,e=new WeakMap,n=()=>t.forEach(nl);return{add:s=>{t.add(s),e.set(s,s.addEventListener("willUpdate",n))},remove:s=>{t.delete(s);const i=e.get(s);i&&(i(),e.delete(s)),n()},dirty:n}}const ji=t=>t===!0,sl=t=>ji(t===!0)||t==="id",al=({children:t,id:e,inherit:n=!0})=>{const s=k(zt),i=k(el),[o,r]=tl(),a=Dt(null),c=s.id||i;a.current===null&&(sl(n)&&c&&(e=e?c+"-"+e:c),a.current={id:e,group:ji(n)&&s.group||ms()});const l=Ft(()=>({...a.current,forceRender:o}),[r]);return Ht(zt.Provider,{value:l},t)};export{al as L,ol as m};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
var Mn=Object.defineProperty;var Un=(e,n,s)=>n in e?Mn(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s;var g=(e,n,s)=>(Un(e,typeof n!="symbol"?n+"":n,s),s);import{Q as We,t as Vn,v as Dn,E as Fn,x as Wn,z as Gt,A as je,B as t,S as rt,C as A,D as we,H as ke,I as $e,J as He,K as qt,L as ce,M as jn,N as it,O as L,P as kt,R,U as V,W as Z,X as Hn,r as p,p as h,T as ye,Y as Kt,Z as Yt,F as tt,$ as b,a0 as Ye,a1 as Qt,a2 as zn,a3 as pe,a4 as Se,w as xe,a5 as Gn,q as ze,a6 as qn,o as Kn,a7 as Yn,k as G,a8 as Qn,a9 as Jn,aa as _,ab as he,ac as ct,ad as Xn,ae as Zn,af as es,ag as ts,ah as ns,ai as xt,aj as ss,ak as as,al as rs,am as _e,an as Jt,ao as Xt,ap as Te,aq as Ee,ar as Nt,as as At,at as is,au as Zt,av as cs,aw as ls,ax as os,ay as ds,az as ms,aA as lt,aB as ot,aC as U,n as us,aD as hs,aE as ps,aF as gs,aG as fs,aH as bs,aI as ys,aJ as vs,aK as ws,aL as ks}from"./vendor-68288830.js";import{O as Ce}from"./oidc-client-6f6e47c2.js";import{u as xs,a as Ns,S as As}from"./@splitsoftware-fa896d3c.js";import{f as re,p as Cs,a as Ct}from"./date-fns-70f07e11.js";import{m as Pt}from"./framer-motion-cbd82d4a.js";import{i as Ps}from"./datadog-61404ce0.js";import"./lodash-5d893f8c.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))a(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const c of i.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function s(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function a(r){if(r.ep)return;r.ep=!0;const i=s(r);fetch(r.href,i)}})();We.prototype.selectCached=function(e,n=s=>null){return this.selectHasCache().pipe(Vn(0),Dn(s=>s?Fn:Wn(e()).pipe(Gt(n))))};class M{static setParameters(n,s){this._apiBaseUrl=n,this._jwt=s}static get instance(){return je(this._apiBaseUrl).headers({Authorization:`Bearer ${this._jwt}`,"X-APP-VERSION":"0.3.2936"})}}g(M,"_apiBaseUrl"),g(M,"_jwt");class Is extends M{}class ee extends M{}class be{static setParameters(n,s,a){this._apiBaseUrl=n,this._jwt=s,this._profileId=a}static get instance(){return je(this._apiBaseUrl).headers({Authorization:`Bearer ${this._jwt}`,"X-PROFILE-ID":this._profileId,"X-APP-VERSION":"0.3.2936"})}}g(be,"_apiBaseUrl"),g(be,"_jwt"),g(be,"_profileId");const en=({size:e})=>t("svg",{className:`animate-spin h-${e??5} w-${e??5}`,viewBox:"0 0 24 24",fill:"none",children:[t("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),t("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),Ge=()=>t("div",{className:"flex justify-center items-center h-screen text-primary",children:[t(en,{size:5}),t("div",{className:"pl-3 text-xl font-light text-primary",children:"Loading..."})]}),tn="/benefits/app/assets/logo-a34e9b4b.png",Ss=()=>t("div",{className:"flex flex-col justify-center items-center h-screen text-grey-900",children:[t("img",{className:"block h-8 w-auto",src:tn,alt:"Flare Benefits"}),t("h1",{className:"mt-8",children:"You have been successfully logged out of Flare Benefits"})]});var It,St;const Me=["money","mind","body","work","life"];var nn=(e=>(e.WellbeingHub="wellbeing",e.FlareApp="flareMobileApp",e.SalaryPackagingCars="salaryPackagingCars",e))(nn||{});const Ts=["default","pba"];function Es(){return{user:A,config:A,navTab:"benefits",appView:"employee",redirectPath:A,deepLink:A,referrer:A,promotionId:A,mode:"default",shopifyUrl:A,isWelcomeModalOpen:!1}}let Ls=(It=we({name:"benefits-app",resettable:!0,producerFn:ke}),It(St=class extends rt{constructor(){super(Es())}})||St);const P=new Ls;class Rs extends We{constructor(s){super(s);g(this,"signedInUser$",this.select(s=>s.user));g(this,"appConfig$",this.select(s=>s.config));g(this,"navPage$",this.select(s=>s.navTab));g(this,"appView$",this.select(s=>s.appView));g(this,"signedInUserRole$",this.select(s=>$e.pipe(s.user,He(()=>"user",a=>a.benefitsProfile.role))));this.store=s}}const H=new Rs(P);function T(e,n){return qt(e,jn(()=>n))}function Os(e){return T(e,null)}function Ue(e,n="Option value is none."){if(ce(e))throw new Error(n);return e.value}function Tt(e,n){return qt(e,He(()=>n===null,s=>s===n))}const Bs=()=>{const e=async()=>{const a=await je(`${window.location.origin}/benefits/app/config.json`).get().json();P.update({config:it(a)})},n=()=>Ue(H.getValue().config);return{fetchConfigAsync:e,getConfig:n,getPublicBackendUrl:()=>n().apiBaseUrl.replace("backend","public")}},W=Bs();function me(e,n){const s=new URLSearchParams(n);return L(s.get(e))}function Qe(e,n){const s=new URLSearchParams(n.replace(/^#+/,""));return L(s.get(e))}const nt=e=>{const n=W.getConfig().apiGatewayBaseUrl+"/benefits/app/#";if(e!=null&&e.startsWith(n)||e!=null&&e.startsWith("#"))return e.split("#")[1]};function $s(e,n){return this.replace(e,n||e)}String.prototype.replaceIf=$s;const _s=(e,n)=>e==null?void 0:e.replaceIf("${profileId}",n==null?void 0:n.basicProfile.profileId).replaceIf("${accountId}",n==null?void 0:n.basicProfile.accountId).replaceIf("${partnerId}",n==null?void 0:n.basicProfile.partnerId).replaceIf("${customerId}",n==null?void 0:n.basicProfile.customerId);class Ms{async getBenefitsAsync(){return M.instance.url("benefits").get().json()}async postDocumentAsync(n){return M.instance.url("document").addon(kt).formData(n).post().badRequest(s=>{throw new Error(s.message)}).json()}async postImageAsync(n){return M.instance.url("image").addon(kt).formData(n).post().badRequest(s=>{throw new Error(s.message)}).json()}async getShopifyUrl(){return M.instance.url("shopify-url").get().json()}}const sn=new Ms;class Us{async setShopifyUrl(){const n=await this.fetchShopifyUrl();P.update({shopifyUrl:n})}getShopifyUrl(){return H.getValue().shopifyUrl}updateIsWelcomeModalOpen(n){P.update({isWelcomeModalOpen:n})}getIsWelcomeModalOpen(){return P.getValue().isWelcomeModalOpen}getReferrer(){const n=P.getValue().referrer;return R(n)?n.value:void 0}getPromotionId(){const n=P.getValue().promotionId;return R(n)?n.value:void 0}setReferrer(n){P.update({referrer:n})}setPromotionId(n){P.update({promotionId:n})}async fetchShopifyUrl(){return L((await sn.getShopifyUrl()).redirectUrl)}}const J=new Us,Vs=()=>{const e="redirectPath",n="mode",s=i=>{P.update({redirectPath:i})},a=i=>{P.update({deepLink:i})},r=i=>{P.update({mode:i})};return{extractRedirectPath:()=>{const i=me(e,window.location.search);R(i)&&(s(i),a(i))},extractMode(){const i=me(n,window.location.search);R(i)&&Ts.includes(i.value)&&r(i.value)},extractTrackingParameters:()=>{const i=me("referrer",window.location.search),c=me("promotionId",window.location.search);R(i)&&J.setReferrer(i),R(c)&&J.setPromotionId(c)},redirectToPathIfExists(){const i=H.getValue().redirectPath;R(i)&&(s(A),V(i.value))}}},Le=Vs();class an{constructor(n){g(this,"_value",A);this.factory=n}get value(){if(R(this._value))return this._value.value;const n=this.factory();return this._value=it(n),n}}var Et,Lt,j=(e=>(e[e.Unauthorized=0]="Unauthorized",e[e.SignInPending=1]="SignInPending",e[e.Authenticated=2]="Authenticated",e[e.SignOutPending=3]="SignOutPending",e[e.Error=4]="Error",e))(j||{});function Ds(){return{authStatus:0,jwt:A}}let Fs=(Et=we({name:"authentication",resettable:!0,producerFn:ke}),Et(Lt=class extends rt{constructor(){super(Ds())}})||Lt);const ne=new Fs;var Re=(e=>(e.SignIn="callback",e.SignOut="logout",e.SilentRefresh="silent-refresh",e))(Re||{});class Ws{constructor(){g(this,"userManager");g(this,"tokenQueryParameter","token");g(this,"b2cJwtQueryParameter","b2cJwt");g(this,"profileIdQueryParameter","profileId");g(this,"getHostOidcUrl",()=>`${window.location.origin}/benefits/app/#/oidc`);this.userManager=new an(()=>{const n=new Ce.UserManager(this.userManagerSettings());return n.events.addAccessTokenExpired(()=>this.signOutRedirectAsync()),n.events.addUserLoaded(this.sessionUpdatedHandler),this.configureLogging(),n})}async refreshIfExpired(){const n=await this.userManager.value.getUser();n!=null&&n.expired&&this.userManager.value.signinSilent()}tokenExists(n){const s=me(this.tokenQueryParameter,n);return Z.isSome(s)}b2cJwtExists(n){const s=Qe(this.b2cJwtQueryParameter,n);return Z.isSome(s)}isOidcRoute(n){return n.includes("callback")||n.includes("logout")||n.includes("silent-refresh")}async initFromB2cJwt(n,s){const a=Ue(Qe(this.b2cJwtQueryParameter,s),`"${this.b2cJwtQueryParameter}" fragment is required`),r=Ue(Qe(this.profileIdQueryParameter,s),`"${this.profileIdQueryParameter}" fragment is required`);be.setParameters(W.getConfig().workplaceBackendUrl,a,r);const i=await be.instance.url("token").get().json();window.location.href=n+"?token="+i.token}async initFromToken(n,s){if(this.isOidcRoute(n))return;const a=me(this.tokenQueryParameter,s);if(Z.isNone(a))throw ne.update({authStatus:j.Error}),Error(`"${this.tokenQueryParameter}" URL query parameter is required`);await this.signInRedirectAsync(a)}signOutRedirectAsync(){return ne.update({authStatus:j.SignOutPending}),this.userManager.value.signoutRedirect()}async signInRedirectCallbackAsync(){await this.userManager.value.signinRedirectCallback(window.location.href.replace("/oidc/callback?","")),ne.update({authStatus:j.Authenticated})}async signOutRedirectCallbackAsync(){await this.userManager.value.signoutRedirectCallback(),Hn()}async silentRefreshCallbackAsync(){await this.userManager.value.signinSilentCallback()}async signOut(){return ne.update({authStatus:j.Unauthorized,jwt:Z.none})}async signInRedirectAsync(n){ne.update({authStatus:j.SignInPending}),await this.userManager.value.signinRedirect({extraQueryParams:{irt:n.value}})}sessionUpdatedHandler(n){ne.update({jwt:Z.fromNullable(n.access_token)})}userManagerSettings(){return{authority:W.getConfig().oidcAuthority,client_id:"apollo-benefits-ui",redirect_uri:`${this.getHostOidcUrl()}/callback?`,response_type:"id_token token",scope:"openid",post_logout_redirect_uri:`${this.getHostOidcUrl()}/logout?`,silent_redirect_uri:`${this.getHostOidcUrl()}/silent-refresh?`,automaticSilentRenew:!0,accessTokenExpiringNotificationTime:10,filterProtocolClaims:!0,loadUserInfo:!0,clockSkew:2592e3}}configureLogging(){Ce.Log.logger=console,Ce.Log.level=Ce.Log.DEBUG}}const z=new Ws,js=({mode:e})=>{const[n,s]=p(!1);return h(()=>{(async()=>{switch(e){case Re.SignIn:await z.signInRedirectCallbackAsync(),window.location.hash="#",V("/"),Le.redirectToPathIfExists();break;case Re.SignOut:await z.signOutRedirectCallbackAsync(),s(!0);break;case Re.SilentRefresh:await z.silentRefreshCallbackAsync();break}})()},[]),n?t(Ss,{}):t(Ge,{})},Hs=({fragment:e})=>(h(()=>{(async()=>await z.initFromB2cJwt(window.location.pathname,e))()},[]),t(Ge,{}));class zs extends We{constructor(s){super(s);g(this,"authState$",this.select());this.store=s}get isUnauthorized(){return this.getValue().authStatus===j.Unauthorized||this.getValue().authStatus===j.Error}get isAuthorized(){return this.getValue().authStatus===j.Authenticated}get jwt(){const s=this.getValue().jwt;return R(s)?s.value:""}}const rn=new zs(ne);class Gs{constructor(){g(this,"_isLocked");g(this,"queue");g(this,"lock",n=>{this._isLocked=!0,setTimeout(this.unlockAndFlushQueue,n)});g(this,"unlockAndFlushQueue",async()=>{this._isLocked=!1,await Promise.all(this.queue.map(n=>M.instance.url("benefits/track-event").post(n).res())),this.queue=[]});this._isLocked=!1,this.queue=[]}async postTrackEventAsync(n){return this.isLocked?(this.queue.push(n),Promise.resolve()):M.instance.url("benefits/track-event").post(n).res()}get isLocked(){return this._isLocked}}const Ve=new Gs,Rt=e=>{switch(e){case"cars-calculator-gated":case"cars-calculator-ungated":return"cars-calculator";case"typeform":return"typeform";case"external-link":case"activity-advertisement":return"advertisement";case void 0:return"unknown";default:return e}};class cn{constructor(n){g(this,"trackEventAsync");this.trackEventAsync=n}async trackAppLoadedAsync(){return this.trackEventAsync("appLoaded")}async trackBenefitsOpenedAsync(){return this.trackEventAsync("benefitsOpened")}async trackAppOfferViewedAsync(){return this.trackEventAsync("appOfferViewed")}async trackAppOfferAcceptedAsync(){return this.trackEventAsync("appOfferAccepted")}async trackWellbeingOpenedAsync(){return this.trackEventAsync("wellbeingOpened")}async trackAdminOpenedAsync(){return this.trackEventAsync("adminOpened")}async trackConsentStartedAsync(){return this.trackEventAsync("consentStarted")}async trackConsentCompletedAsync(){return this.trackEventAsync("consentCompleted")}async trackRegistrationStartedAsync(){return this.trackEventAsync("registrationStarted")}async trackRegistrationSubmittedAsync(){return this.trackEventAsync("registrationSubmitted")}async trackRegistrationResentAsync(){return this.trackEventAsync("registrationResent")}async trackRegistrationVerifiedAsync(){return this.trackEventAsync("registrationVerified")}async trackRegistrationFailedAsync(n){return this.trackEventAsync({registrationFailed:{reason:n}})}async trackRegistrationCompletedAsync(){return this.trackEventAsync("registrationCompleted")}async trackRegistrationErrorViewedAsync(n){return this.trackEventAsync({registrationErrorViewed:{reason:n}})}async trackRegistrationErrorDismissedAsync(){return this.trackEventAsync("registrationErrorDismissed")}async trackMarketplaceOfferViewedAsync(n,s,a){const r={offer:n,experiment:s,treatment:a};return this.trackEventAsync({marketplaceOfferViewed:r})}async trackMarketplaceOfferAcceptedAsync(n,s,a){const r={offer:n,experiment:s,treatment:a};return this.trackEventAsync({marketplaceOfferAccepted:r})}async trackPerksListViewedAsync(n){const s={pillar:n};return this.trackEventAsync({perksListViewed:s})}async trackEntriesListViewedAsync(n){const s={pillar:n};return this.trackEventAsync({entriesListViewed:s})}async trackFeaturePerkViewedAsync({benefitId:n,benefit:s}){const a={perkId:n,perkPillar:s.category,perkTitle:s.title,placement:"feature"};return this.trackEventAsync({perkViewed:a})}async trackExplorePerkViewedAsync({benefitId:n,benefit:s}){const a={perkId:n,perkPillar:s.category,perkTitle:s.title,placement:"explore"};return this.trackEventAsync({perkViewed:a})}async trackDocumentClickedAsync({benefitId:n,benefit:s}){const a={perkId:n,perkPillar:s.category,perkTitle:s.title,type:"document"};return this.trackEventAsync({attachmentOpened:a})}async trackPerkVisitedAsync({benefitId:n,benefit:s}){const a={perkId:n,perkPillar:s.category,perkTitle:s.title};return this.trackEventAsync({perkVisited:a})}async trackPerksListSearched(n){const s={query:n};return this.trackEventAsync({perksListSearched:s})}async trackRoleAssignedAsync(n){return this.trackEventAsync({roleAssigned:n})}async trackEntryViewed(n){return this.trackEventAsync({entryViewed:n})}async trackEntriesListSearchedAsync(n){const s={query:n};return this.trackEventAsync({entriesListSearched:s})}async trackCategoryOpenedAsync(n,s){const a={categoryId:n,categoryName:s};return this.trackEventAsync({categoryOpened:a})}async trackCategoryClosedAsync(n,s,a){const r={categoryId:n,categoryName:s,screen:a};return this.trackEventAsync({categoryClosed:r})}async trackDiscountsOpenedAsync(n,s){const a={categoryId:n,categoryName:s};return this.trackEventAsync({discountsOpened:a})}async trackActivityActionedAsync(n,s,a,r){r==="external-link"?this.trackActivityCompletedAsync(n,s,a,r):this.trackActivityStartedAsync(n,s,a,r)}async trackActivityStartedAsync(n,s,a,r){const i={categoryId:n,id:s,name:a,type:Rt(r)};return this.trackEventAsync({activityStarted:i})}async trackActivityCompletedAsync(n,s,a,r){const i={categoryId:n,id:s,name:a,type:Rt(r)};return this.trackEventAsync({activityCompleted:i})}async trackBenefitsPlanViewedAsync(n){const s={categories:n};return this.trackEventAsync({benefitsPlanViewed:s})}async trackDeepLinkOpenedAsync(n){const s={link:n};return this.trackEventAsync({deepLinkOpened:s})}async trackPromotionViewedAsync(n,s,a,r){return this.trackEventAsync({promotionViewed:{promotionId:n,location:s,categoryId:a,categoryName:r}})}async trackPromotionSelectedAsync(n,s,a,r,i){return this.trackEventAsync({promotionSelected:{promotionId:n,location:s,categoryId:a,categoryName:r,targetUrl:i}})}}const qs=async e=>{try{await Ve.postTrackEventAsync({event:e,treatments:[]})}catch{return}},st=new cn(qs);var ie=(e=>(e.Consent="apollo-benefits-consent",e.CustomerRegistration="apollo-benefits-customer-registration",e))(ie||{});const Ks=e=>{if(e){const n=[];return Object.values(ie).map(s=>{var a;n.push({featureFlag:s,treatment:(a=e[s])==null?void 0:a.treatment})}),n}return[]},O=()=>{const[e,n]=p(),{isReady:s,client:a}=xs(),[r,i]=p(st);h(()=>{(async()=>{if(s){a==null||a.setMaxListeners(30);const l=a==null?void 0:a.getTreatmentsWithConfig(Object.values(ie)),m=Ks(l);n(m)}})()},[s]);const c=ye(async l=>{try{await Ve.postTrackEventAsync({event:l,treatments:e||[],referrer:J.getReferrer(),promotionId:J.getPromotionId(),path:window.location.hash})}catch{return}},[e]);return h(()=>{i(new cn(c))},[c]),{service:r}};const Ys=async(e,n)=>{try{await je(W.getConfig().apolloBaseUrl).middlewares([Kt(),Yt({throttle:1e4})]).url("/workplace-backend/v1.0/shopify-url").headers({Authorization:`Bearer ${e}`,"Profile-Id":n}).get().json()}catch(s){console.error("Error fetching Shopify URL:",s)}},Qs="/benefits/app/assets/external_link-599a0aec.svg";function K(...e){return e.filter(Boolean).join(" ")}const Js=e=>`${e[0].toUpperCase()}${e.slice(1)}`,Ot=({user:{featureFlags:e,basicProfile:n,workplaceLinkConfig:s}})=>{const[a,r]=p(A),{service:i}=O(),c=tt(()=>{const m=new Map([["benefits","/"]]);return e.wellbeing&&m.set("wellbeing","/wellbeing-hub"),Array.from(m)},[]);h(()=>{const m=[H.navPage$.subscribe(o=>{r(L(o))})];return()=>{m.map(o=>o.unsubscribe())}},[]);const l=async()=>{s!=null&&s.workplaceBackendToken&&await Ys(s==null?void 0:s.workplaceBackendToken,n.profileId)};return t("nav",{className:"-mb-px flex","aria-label":"Tabs",children:[c.map(([m,o])=>t("div",{onClick:async()=>{r(L(m)),V(o)},className:K(Tt(a,m)?"border-primary text-primary":"border-transparent text-gray-500","cursor-pointer hover:text-gray-700 hover:border-gray-300 px-4 md:ml-4 flex-grow md:flex-grow-0","py-4 text-center border-b-4 text-base leading-6 font-semibold cursor-pointer capitalize"),"aria-current":Tt(a,m)?"page":void 0,children:t("span",{children:m})},m)),t("div",{className:"border-transparent text-gray-500 cursor-pointer hover:text-gray-700 hover:border-gray-300 px-4 md:ml-4 flex-grow md:flex-grow-0 py-4 text-center border-b-4 text-base leading-6 font-semibold cursor-pointer capitalize",children:t("button",{className:"inline-flex",rel:"noreferrer",onClick:()=>{i.trackDiscountsOpenedAsync("discounts","Discounts"),l()},children:[t("span",{children:"discounts"}),t("img",{className:"ml-2",src:Qs})]})})]})},Xs=()=>{const[e,n]=p("employee");return h(()=>{const s=[H.appView$.subscribe(n)];return()=>{s.map(a=>a.unsubscribe())}},[]),t("span",{className:"relative z-0 inline-flex shadow-sm rounded-md",children:[t("button",{type:"button",className:K(e==="admin"?"text-primary bg-white cursor-default":"text-gray-700 bg-gray-50","relative inline-flex items-center px-4 py-1 rounded-l-md border border-gray-300 text-sm font-medium hover:bg-white focus:z-10 focus:outline-none"),onClick:()=>{e!=="admin"&&V("/admin")},children:"Admin view"}),t("button",{type:"button",className:K(e==="employee"?"text-primary bg-white cursor-default":"text-gray-700 bg-gray-50","-ml-px relative inline-flex items-center px-4 py-1 rounded-r-md border border-gray-300 text-sm font-medium hover:bg-white focus:z-10 focus:outline-none"),onClick:()=>{e!=="employee"&&V("/")},children:"Employee view"})]})},Zs=[{name:"Admin view",href:"#/admin"},{name:"Employee view",href:"#/"}],ln=()=>t("span",{className:"inline-block h-8 w-8 rounded-full overflow-hidden bg-white border",children:t("svg",{className:"h-full w-full text-gray-300",fill:"currentColor",viewBox:"0 0 24 24",children:t("path",{d:"M24 20.993V24H0v-2.996A14.977 14.977 0 0112.004 15c4.904 0 9.26 2.354 11.996 5.993zM16.002 8.999a4 4 0 11-8 0 4 4 0 018 0z"})})}),ea=({user:e})=>t(b,{children:t(pe,{as:"div","data-dd-action-name":"User menu",className:"z-30 relative inline-block text-left",children:({open:n})=>t(b,{children:[t("div",{children:t(pe.Button,{className:`max-w-xs bg-white flex items-center text-sm rounded-full hover:outline-none hover:ring-2 hover:ring-offset-2 hover:ring-primary ${n?"outline-none ring-2 ring-offset-2 ring-primary":""} `,children:t(ln,{})})}),t(Se,{enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:t(pe.Items,{className:"absolute right-0 mt-2 w-56 divide-y divide-gray-100 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:t("div",{className:"px-1 py-1 ",children:[t(pe.Item,{children:()=>t("div",{className:"mx-3 py-2",children:[t("div",{className:"text-base font-medium text-gray-800 dd-privacy-mask",children:e.basicProfile.firstName}),t("div",{className:"text-sm font-medium text-gray-500 dd-privacy-mask",children:e.basicProfile.email})]})}),t("div",{className:"border-t border-grey-900",children:t(pe.Item,{children:({active:s})=>t("button",{onClick:()=>z.signOutRedirectAsync(),className:`${s?"bg-secondary text-primary rounded-md":"text-gray-900 "} group flex w-full items-center mt-2 mb-1 px-3 py-2 text-sm font-medium`,children:"Logout"})})})]})})})]})})}),dt=e=>{const n=e.user;if(ce(n))return t(b,{});const[s,a]=p(!1),r=n.value.benefitsProfile.role!=="user";return h(()=>{const i=[H.appView$.subscribe(c=>{a(c==="employee")})];return()=>{i.map(c=>c.unsubscribe())}},[]),t(b,{children:t(Ye,{as:"nav",className:"bg-gray-50 border-0 md:border-b md:border-gray-200",children:({open:i})=>t(b,{children:[t("div",{className:`mx-auto px-4 sm:px-6 lg:px-8 border-b border-gray-200 md:border-none ${r&&!s?"":"max-w-[90rem]"}`,children:t("div",{className:"flex justify-between h-16",children:[t("div",{className:"flex",children:t("a",{href:"#",onClick:()=>V("/"),className:"flex-shrink-0 flex items-center",children:t("img",{className:"block h-8 w-auto",src:tn,alt:"Flare Benefits"})})}),t("div",{className:"ml-10 flex flex-wrap flex-grow content-end",children:t("div",{className:"hidden sm:block",children:s&&t(Ot,{user:n.value})})}),t("div",{className:"flex flex-wrap content-center",children:t("div",{className:"hidden md:block",children:r&&t(Xs,{})})}),t("div",{className:"hidden md:ml-6 md:flex md:items-center",children:t(ea,{user:n.value})}),t("div",{className:"-mr-2 flex items-center md:hidden",children:t(Ye.Button,{className:"bg-white inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary",children:[t("span",{className:"sr-only",children:"Open main menu"}),i?t(Qt,{className:"block h-6 w-6","aria-hidden":"true"}):t(zn,{className:"block h-6 w-6","aria-hidden":"true"})]})})]})}),t(Ye.Panel,{className:"md:hidden",children:t("div",{className:"pt-4 pb-3 border-b border-gray-200",children:[t("div",{className:"flex items-center px-4",children:[t("div",{className:"flex-shrink-0",children:t(ln,{})}),t("div",{className:"ml-3",children:[t("div",{className:"text-base font-medium text-gray-800 dd-privacy-mask",children:n.value.basicProfile.firstName}),t("div",{className:"text-sm font-medium text-gray-500 dd-privacy-mask",children:n.value.basicProfile.email})]})]}),t("div",{className:"mt-3 space-y-1",children:[r&&t(b,{children:Zs.map(c=>t("a",{href:c.href,className:"block px-4 py-2 text-base font-medium text-gray-500 hover:text-primary hover:bg-secondary",children:c.name},c.name))}),t("a",{onClick:()=>z.signOutRedirectAsync(),className:"block cursor-pointer px-4 py-2 text-base font-medium text-gray-500 hover:text-primary hover:bg-secondary",children:"Logout"})]})]})}),s&&t("div",{className:"sm:hidden bg-white border-b border-gray-200",children:t(Ot,{user:n.value})})]})})})},ta="/customer-profile/backend/v1.0/workplace-link/config";class na{async getConfigAsync(){return ee.instance.url(ta).get().json()}}const sa=new na,aa=e=>({identityProvider:e==null?void 0:e.identityProvider,isEstablished:e==null?void 0:e.isEstablished}),ra="/flare-app-identity/backend/v1.0/auth/token";class ia{async getTokenAsync(){return ee.instance.url(ra).get().json()}}const ca=new ia;class la{async getUserProfile(){return await M.instance.url("users/self").get().json()}async getBasicProfileByEmail(n){const s=await M.instance.url(`users?email=${n}`).get().notFound(()=>null).json();return L(s)}saveConsent(){M.instance.url("users/consent").post()}}const Je=new la;class Bt{constructor(){g(this,"basicProfile");g(this,"benefitsProfile");g(this,"featureFlags");g(this,"account")}static toDomain(n){return{basicProfile:n.basicProfile,benefitsProfile:n.benefitsProfile,featureFlags:n.featureFlags,accountName:n.account?n.account.name+(n.account.legalEntityName?" - "+n.account.legalEntityName:""):void 0}}}const ae=class ae{static get profileId(){if(ce(this._profileId))throw Error("ProfileId is missing.");return this._profileId.value}static set profileId(n){this._profileId=L(n)}static set accountId(n){this._accountId=L(n)}static get profileIdOrDefault(){return T(this._profileId,"")}static get accountIdOrDefault(){return T(this._accountId,"")}static get partnerIdOrDefault(){return T(this._partnerId,"")}extractProfileId(n){const s=L(Gn(n).sub);if(ce(s))throw Error("profileId property is missing.");ae.profileId=s.value}async loadSignedInUserProfileAsync(){const n=Bt.toDomain(await Je.getUserProfile());ae.accountId=n.basicProfile.accountId,P.update(s=>{s.user=L(n)})}saveUserConsent(){return Je.saveConsent(),P.update(n=>{const s=T(n.user,void 0);s&&(n.user=L({...s,benefitsProfile:{...s.benefitsProfile,hasConsent:!0}}))}),Promise.resolve()}async setWorkplaceLinkConfig(){const n=aa(await sa.getConfigAsync()),s=n.isEstablished?await this.fetchWorkplaceBackendTokenAsync():void 0;P.update(a=>{const r=T(a.user,void 0);r&&(a.user=L({...r,workplaceLinkConfig:{...n,workplaceBackendToken:s}}))})}setIsEstablished(){P.update(n=>{const s=T(n.user,void 0);s&&(n.user=L({...s,workplaceLinkConfig:{...s.workplaceLinkConfig,isEstablished:!0}}))})}async updateCustomerIdAsync(n){const s=Bt.toDomain(await Je.getUserProfile()),a=s.basicProfile.customerId?await this.fetchWorkplaceBackendTokenAsync():void 0;P.update(r=>{const i=T(r.user,void 0);i&&(r.user=L({...i,workplaceLinkConfig:{...i.workplaceLinkConfig,workplaceBackendToken:a},basicProfile:{...i.basicProfile,customerId:s.basicProfile.customerId}})),n&&n()})}async fetchWorkplaceBackendTokenAsync(){try{return(await ca.getTokenAsync()).token}catch{return}}};g(ae,"_profileId",A),g(ae,"_accountId",A),g(ae,"_partnerId",A);let at=ae;const le=xe.createContext(A),on=xe.createContext(!1),se=new at,Oe=()=>{const e=ze(le),{service:n}=O();return h(()=>{n.trackAppOfferAcceptedAsync()},[]),t(b,{children:[t(dt,{user:e}),t("div",{className:"p-4",children:t("workplace-link",{"access-token":rn.jwt,"backend-url":W.getConfig().apiGatewayBaseUrl,source:"WebBenefits",channel:"web"})})]})},dn=()=>{const e=qn(),n=e.startsWith("state")||e.startsWith("code")||e.startsWith("error");return t(b,{children:n?t(Oe,{}):t("div",{className:"notfound",children:[t("h1",{children:"Error 404"}),t("p",{children:"That page doesn't exist."}),t("a",{href:"#/",children:t("h4",{children:"Back to Home"})})]})})};function ge(e){return xe.useContext(on)?Kn(e.component,e):t(Ge,{})}const mt=e=>({listen:n=>e.listen(({location:s})=>n(s)),location:e.location,push:e.push,replace:e.replace}),oa=()=>{const n=window.setInterval(async()=>{J.setShopifyUrl()},12e4);return L(n)},da=()=>{h(()=>{let e=A;return(async()=>(await J.setShopifyUrl(),e=oa()))(),()=>{R(e)&&window.clearInterval(e.value)}},[])},ma="/benefits-plan/backend/v1.0/categories",ua=(e,n)=>`/benefits-plan/backend/v1.0/categories/${e}/products/${n}`;class ha{constructor(){g(this,"_backendClientWithCacheEnabled")}get backendClientWithCacheEnabled(){return this._backendClientWithCacheEnabled||(this._backendClientWithCacheEnabled=ee.instance.middlewares([Kt(),Yt({throttle:1e4})])),this._backendClientWithCacheEnabled}async getCategoriesAsync(){return this.backendClientWithCacheEnabled.url(ma).get().json()}async getProductActivitesAsync(n,s){const a=ua(n,s);return ee.instance.url(a).get().json()}}const ut=new ha,ht=async(e,n)=>{const[s]=await Promise.all([e,new Promise(a=>window.setTimeout(a,n))]);return s};class pa{constructor(){g(this,"client",new an(()=>{const n=W.getConfig();return Yn({space:n.contentfulSpace,environment:n.contentfulEnvironment,accessToken:n.contentfulApiKey})}))}async loadCollectionsAsync(){return(await this.client.value.getEntries({content_type:"benefitsCollection"})).items.map(s=>{var r,i,c,l,m;const{fields:a}=s;return{id:s.sys.id,title:a.title,description:a.description,coverPhotoUrl:((c=(i=(r=a.coverPhoto)==null?void 0:r.fields)==null?void 0:i.file)==null?void 0:c.url)??"",pillar:((l=a.pillar)==null?void 0:l.toLowerCase())??"money",articles:((m=a.contentLibrary)==null?void 0:m.map(o=>({id:o.sys.id,title:o.fields.title,subtitle:o.fields.subtitle,coverPhotoUrl:o.fields.coverPhoto.fields.file.url,pillar:o.fields.pillar.toLowerCase(),primaryContentType:o.fields.primaryContentType.toLowerCase(),slug:"",externalLink:""})))??[],state:"visible"}})}async loadAvailableEntryPreviewsAsync(){return(await this.client.value.getEntries({"sys.contentType.sys.id[in]":"benefitsWellbeingArticle,benefitsExternalLink",select:"sys.id,fields"})).items.map(s=>{const{fields:a}=s;return{id:s.sys.id,title:a.title,subtitle:a.subtitle,coverPhotoUrl:a.coverPhoto.fields.file.url,pillar:a.pillar.toLowerCase(),primaryContentType:a.primaryContentType.toLowerCase(),slug:a.slug,externalLink:a.externalLink}})}async loadArticleAsync(n){const s=await this.client.value.getEntries({content_type:"benefitsWellbeingArticle",limit:1,include:10,"fields.slug":n});if(s.items.length===0)throw Error("Couldn't find this article");return s.items[0].fields}async loadBenefitsPlanCategoryAsync(){return(await this.client.value.getEntries({content_type:"benefitsWebCategoryTile"})).items.map(s=>s.fields)}async loadBenefitsLandingModalAsync(n){const s=await this.client.value.getEntries({content_type:"benefitsWebLandingModal",limit:1,"fields.slug":n});if(s.items.length!==0)return s.items[0].fields}async loadBenefitsPlanWebHomeAsync(){const n=await this.client.value.getEntries({content_type:"benefitsBenefitsPlanWeb",limit:1,"fields.slug":"home"});if(n.items.length===0)throw Error("Couldn't find benefits plan home.");return n.items[0].fields}async tryLoadActivityAdvertisementAsync(n){var s;try{return(s=(await this.client.value.getEntry(n)).fields.webBenefitsLandingModal)==null?void 0:s.fields}catch{return}}async loadFeaturedOffersAsync(){var a;const n=await this.client.value.getEntries({content_type:"benefitsProductOfferCategory"}),s=((a=n.includes)==null?void 0:a.Entry)??[];return n.items.map(({fields:{category:r,offers:i}})=>({category:r,offers:i.map(c=>{var o;if(typeof c!="object")return;const{sys:{id:l,type:m}}=c;return m==="Entry"?c.fields:m==="Link"?(o=s.find(y=>y.sys.id===l))==null?void 0:o.fields:void 0}).filter(c=>c)}))}}const oe=new pa,mn=["Start","Get Estimate","View","Ineligible"],ga=async()=>ht(oe.loadBenefitsPlanCategoryAsync(),700),fa=async()=>ht(oe.loadBenefitsPlanWebHomeAsync(),700),un=e=>{switch(e.action){case"activity-assessment":return"activity-assessment";case"cars-calculator-ungated":return"cars-calculator-ungated";case"cars-calculator-gated":return"cars-calculator-gated";case"typeform":return e.typeformId?"typeform":"none";case"shopify":return"shopify";case"external-link":return e.link?"external-link":"none";case"activity-advertisement":return"activity-advertisement";default:return"none"}},ba=async e=>{const n=e.products.length>0?await ut.getProductActivitesAsync(e.id,e.products[0].id):{activities:[]};return(await Promise.all(n.activities.filter(a=>a.activityType==="Advertisement").map(async a=>{const r=await oe.tryLoadActivityAdvertisementAsync(a.articleId);return r?{...r,id:a.id,title:a.title}:void 0}))).filter(a=>!!a)},hn=(e,n)=>{var s;return{id:e.slug,modalBody:e.body,disclaimer:e.disclaimer,heroImageDesktop:e.heroImageDesktop,heroImageMobile:e.heroImageMobile,buttonText:e.actionButtonText,component:un(e),typeformId:e.typeformId,order:e.order||100,externalUrl:((s=e.link)==null?void 0:s.replace(/\s+/g,""))||void 0,categoryTitle:e.categoryTitle,assessmentId:e.assessmentId,selectionTile:e.tileDisplayTitle&&e.tileSubtitle&&e.tileImage?{activityId:e.id||"unknown",activityName:e.title||"unknown",displayTitle:e.tileDisplayTitle,subtitle:e.tileSubtitle,tileImage:e.tileImage,buttonText:(n==null?void 0:n.landingModal.fields.actionButtonText)||"Learn More",order:e.order||100}:void 0}},$t=(e,n,s)=>{const a=s.map(r=>hn(r,n));return{id:e.id,title:n.categoryTitle,displayTitle:n.displayTitle,subtitle:n.subtitle,iconUrl:e.iconUrl,order:n.order,landings:a.filter(r=>r.component!=="none").sort((r,i)=>r.order-i.order)}},ya=async e=>{try{const n=await oe.loadBenefitsLandingModalAsync(e);if(n&&(n==null?void 0:n.action)!=="activity-advertisement")return[hn(n)]}catch{return[]}return[]},va=async()=>{try{const e=await ut.getCategoriesAsync(),n=await ga();return(await Promise.all(e.categories.filter(a=>n.find(i=>i.categoryTitle.toLowerCase()===a.title.toLowerCase())&&mn.includes(a.status)).map(async a=>{try{const r=n.find(i=>i.categoryTitle.toLowerCase()===a.title.toLowerCase());switch(un(r.landingModal.fields)){case"activity-advertisement":{const i=await ba(a);return i.length>0?$t(a,r,i):void 0}default:return $t(a,r,[r.landingModal.fields])}}catch{return}}))).filter(a=>!!a&&a.landings.length>0).sort((a,r)=>a.order-r.order)}catch{return[]}},wa=async e=>{try{const n=await ut.getCategoriesAsync(),s=await oe.loadFeaturedOffersAsync(),a=n.categories.filter(r=>mn.includes(r.status));return s.flatMap(r=>{const i=a.find(c=>c.title.toLocaleLowerCase()===r.category.toLocaleLowerCase());return i?r.offers.filter(c=>c.displayLocations.includes(e)).map(c=>({...c,categoryName:i.title,categoryId:i.id})):[]}).map(r=>{try{return{title:r.title,subtitle:r.subtitle,categoryId:r.categoryId,categoryName:r.categoryName,slug:r.slug,location:e,coverPhotoMobileUrl:r.coverPhoto.fields.file.url,coverPhotoDesktopUrl:r.webBannerImage.fields.file.url,linkButtonText:r.linkButtonLabel,linkUrl:r.linkUrl,order:r.displayPriority??0}}catch{return}}).filter(r=>r).sort((r,i)=>i.order-r.order)}catch{return[]}},ka=()=>{const e=()=>H.getValue().mode;return{isDefault:()=>e()==="default",isPba:()=>e()==="pba"}},pn=ka(),xa=({children:e,onSwipedLeft:n,onSwipedRight:s,onSwipedUp:a,onSwipedDown:r,...i})=>{const[l,m]=p(0),[o,y]=p(0),[v,x]=p(0),[k,f]=p(0);return t("div",{onTouchStart:u=>{y(0),m(u.targetTouches[0].clientX),f(0),x(u.targetTouches[0].clientY)},onTouchMove:u=>{y(u.targetTouches[0].clientX),f(u.targetTouches[0].clientY)},onTouchEnd:()=>{if(!l||!o||!v||!k)return;const S=l-o>50,D=v-k>50;Math.abs(l-o)>Math.abs(v-k)?S?n==null||n():s==null||s():D?a==null||a():r==null||r()},...i,children:e})},Na=({autoplay:e,slidesContainerClassName:n,onSlideChange:s,children:a})=>{const[r,i]=p(0),c=G(),l=(e==null?void 0:e.enabled)&&a.length>1;if(!a)return t(b,{});const m=()=>{l&&(c.current=setInterval(v,e.interval))},o=()=>clearInterval(c.current),y=()=>{o(),m()},v=()=>{i(f=>f===a.length-1?0:f+1),y()},x=()=>{i(f=>f===0?a.length-1:f-1),y()},k=f=>{i(f),y()};return h(()=>(m(),o),[]),h(()=>{s==null||s(r)},[r]),t(xa,{onSwipedLeft:x,onSwipedRight:v,children:[t("div",{className:"relative",children:[a.length>1&&t(Aa,{className:"hidden md:flex absolute top-0 left-4",onClick:x}),t("div",{className:`${n??""} flex flex-row overflow-hidden`,children:a.map((f,w)=>t(Pa,{index:w,activeIndex:r,children:f},w))}),a.length>1&&t(Ca,{className:"hidden md:flex absolute top-0 right-4",onClick:v})]}),a.length>1&&t(Ia,{itemsCount:a.length,activeIndex:r,onClick:k})]})},Aa=({className:e,onClick:n})=>t("div",{className:`flex h-full items-center z-10 ${e??""}`,children:t(Qn,{className:"w-7 h-7 p-1 rounded-full bg-white shadow cursor-pointer hover:bg-gray-200/50",onClick:n})}),Ca=({className:e,onClick:n})=>t("div",{className:`flex h-full items-center z-10 ${e??""}`,children:t(Jn,{className:"w-7 h-7 p-1 rounded-full bg-white shadow cursor-pointer hover:bg-gray-200/50",onClick:n})}),Pa=({index:e,activeIndex:n,children:s})=>{let a;return e<n&&(a=`-${(e+1)*100}%`),e===n&&(a=`-${e*100}%`),e>n&&(a=`-${(e-1)*100}%`),t("div",{className:"w-full flex-none transition duration-500",style:{transform:`translate( ${a}, 0)`},children:s})},Ia=({itemsCount:e,activeIndex:n,onClick:s})=>t("div",{className:"mt-2 flex justify-center gap-2",children:Array(e).fill(null).map((a,r)=>t("span",{className:`inline-block w-2 h-2 cursor-pointer outline outline-4 rounded-full ${r===n?"bg-primary outline-primary/25":"bg-gray-300 outline-transparent"}`,onClick:()=>s(r)},r))}),ue=e=>{const n=nt(e.href),[s,a]=p();h(()=>{const i=[H.signedInUser$.subscribe(c=>{R(c)?a(c.value):a(void 0)})];return()=>{i.map(c=>c.unsubscribe())}},[]);const r=i=>()=>{V(i),e.onClick&&e.onClick()};return t(b,{children:n?t("a",{className:e.className,onClick:r(n),children:e.children}):t("a",{href:_s(e.href,s),className:e.className,onClick:e.onClick,target:"_blank",rel:"noopener noreferrer",children:e.children})})},N=({height:e,width:n,className:s})=>t("div",{className:s,children:t("div",{className:"flex animate-pulse flex-row h-full",children:t("div",{style:{width:`${n?`${n}rem`:"100%"}`,height:`${e}rem`},className:"bg-gray-300 rounded"})})}),Sa=()=>t(b,{children:t("div",{className:"w-full bg-gray-50 border-grey-100 border rounded-lg flex",children:t("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 place-items-center md:h-72 p-4 md:p-9",children:[t("div",{className:"w-full flex flex-col gap-4 md:gap-8",children:[t(N,{className:"w-1/5",height:1.5}),t(N,{className:"w-2/5",height:1.5}),t(N,{className:"w-4/5",height:1.5})]}),t(N,{className:"hidden md:block w-full",width:20,height:10})]})})}),Ta=({offers:e})=>{const n=G({}),{service:s}=O(),a=ye(i=>{if(!(e!=null&&e.length)||n.current[i])return;const c=e.find((l,m)=>m===i);c.isAppOffer?s.trackAppOfferViewedAsync():s.trackPromotionViewedAsync(c.slug,c.location,c.categoryId,c.categoryName),n.current[i]=!0},[e,s,n]),r=ye(i=>{s.trackPromotionSelectedAsync(i.slug,i.location,i.categoryId,i.categoryName,i.linkUrl)},[s]);return e?t(Na,{autoplay:{enabled:!0,interval:5e3},slidesContainerClassName:"bg-white border-grey-100 border rounded",onSlideChange:a,children:e.map(i=>t(ue,{className:"cursor-pointer",onClick:()=>r(i),href:i.linkUrl,children:t("div",{className:"md:h-[22.5rem] w-full flex flex-col md:flex-row text-gray-900",children:[t("div",{className:"md:hidden overflow-hidden w-full",children:t("img",{src:i.coverPhotoMobileUrl})}),t("div",{className:"flex flex-1 flex-col flex-grow justify-center py-4 px-4 md:py-0 md:pl-16 md:pr-0",children:[t("div",{className:"text-2xl leading-8 lg:text-3xl xl:text-4xl lg:leading-10 font-extrabold pt-4",children:i.title}),t("div",{className:"text-md md:text-lg leading-6 mt-2 font-medium max-w-lg",children:i.subtitle}),t("div",{className:"pt-5",children:t("span",{className:"block w-full mx-auto md:w-auto text-center md:inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm leading-6 font-semibold rounded-md text-white bg-primary",children:t("span",{children:i.linkButtonText})})})]}),t("div",{className:"hidden md:block overflow-hidden",children:t("img",{src:i.coverPhotoDesktopUrl,className:"object-scale-down h-full"})})]})}))}):t(Sa,{})};const Ea=({children:e,className:n})=>t("div",{className:"gradient-tile "+n,children:e}),La=({title:e,subtitle:n,externalUrl:s,icon:a,onClick:r})=>t("a",{className:"w-full cursor-pointer",href:s,target:s&&"_blank"||void 0,onClick:r,children:t(Ea,{className:"pl-6 pr-4 py-4 md:w-48 md:h-48 md:px-4 md:py-6 bg-white bg-opacity-50 hover:bg-opacity-100 shadow hover:shadow-lg border-2 rounded-md flex md:flex-col md:justify-items-center md:items-center",children:[t("div",{className:"flex justify-start item-center self-center",children:a}),t("div",{className:"ml-6 md:ml-0 md:text-center md:mt-auto",children:[t("div",{className:"text-blue-600 text-l md:text-xl font-bold leading-7",children:e}),t("div",{className:"text-gray-900 text-base font-medium leading-normal",children:n})]})]})}),Ra={renderText:e=>e.split(`
|
|
2
|
+
`).flatMap((n,s)=>[s>0&&t("br",{}),n]),renderNode:{[_.BLOCKS.PARAGRAPH]:(e,n)=>t("p",{className:"relative text-gray-500 text-sm font-normal leading-5",children:n}),[_.INLINES.HYPERLINK]:(e,n)=>t("a",{className:"text-blue-600 underline",href:e.data.uri,target:"_blank",rel:"noopener noreferrer",children:n})}},Oa=({body:e})=>t(b,{children:he.documentToReactComponents(e,Ra)}),Ba=()=>t(b,{children:[t(N,{className:"mb-1 md:mb-2",width:20,height:4}),t(N,{className:"mb-5 md:mb-10",width:40,height:2}),t("div",{className:"flex flex-col md:flex-row gap-3 md:gap-8 flex-wrap",children:[t(N,{className:"hidden md:block",width:12,height:12}),t(N,{className:"md:hidden block",height:6}),t(N,{className:"hidden md:block",width:12,height:12}),t(N,{className:"md:hidden block",height:6}),t(N,{className:"hidden md:block",width:12,height:12}),t(N,{className:"md:hidden block",height:6}),t(N,{className:"hidden md:block",width:12,height:12}),t(N,{className:"md:hidden block",height:6}),t(N,{className:"hidden md:block",width:12,height:12}),t(N,{className:"md:hidden block",height:6}),t(N,{className:"hidden md:block",width:12,height:12}),t(N,{className:"md:hidden block",height:6})]})]}),$a=({categories:e,content:n})=>{const{service:s}=O(),[a,r]=p(!0),i=J.getIsWelcomeModalOpen();return h(()=>{if(!a&&!i){const c=e?e.map(l=>l.title):[];s.trackBenefitsPlanViewedAsync(c)}},[a,i]),h(()=>{e&&(n!=null&&n.title)?r(!1):r(!0)},[e,n==null?void 0:n.title]),t("div",{className:"relative",children:[t("div",{className:"bg-[linear-gradient(0deg,_#2E66F7_0%,_#0005D2_100%)] absolute w-full h-full blur-[250px] opacity-10"}),e&&(n!=null&&n.title)?t(b,{children:[t("div",{className:"text-gray-700 text-2xl md:text-4xl font-bold md:font-extrabold leading-loose md:leading-10 mb-1 md:mb-2",children:n.title}),n.subtitle&&t("div",{className:"text-black text-base md:text-2xl font-normal leading-normal md:leading-loose mb-5 md:mb-10",children:n.subtitle}),t("div",{className:"flex flex-col md:flex-row gap-3 md:gap-8 flex-wrap mb-6",children:e==null?void 0:e.map(c=>t("div",{className:"category-container flex md:flex-col",children:t(La,{title:c.displayTitle||c.title,subtitle:c.subtitle,icon:t("img",{src:c.iconUrl,className:"w-10 h-10 md:w-16 md:h-16"}),onClick:()=>V("/categories/"+c.title.toLocaleLowerCase())},c.id)}))}),n.disclaimer&&t(Oa,{body:n.disclaimer})]}):t(Ba,{})]})},_a="/benefits/app/assets/all_tab_color-548783b9.svg",Ma="/benefits/app/assets/all_tab_gray-a5051313.svg",gn={money:"text-blue-400",mind:"text-green-400",body:"text-red-400",work:"text-orange-400",life:"text-yellow-400"},_t=["all",...Me],Ua=({children:e})=>t("nav",{className:"flex p-2 space-x-8 bg-gray-50","aria-label":"Tabs",children:e}),Va=e=>{const{children:n,onClick:s,className:a,selected:r}=e;return t("div",{onClick:s,className:K(a??"",r?"bg-white shadow-md text-gray-800":"text-gray-600 hover:bg-gray-100","w-full py-2 capitalize text-base leading-6 font-semibold rounded-lg focus:outline-none","cursor-pointer flex items-center justify-center"),"aria-current":r?"page":void 0,children:n})},Da=({currentTab:e,tabNameList:n,onTabClicked:s})=>t(b,{children:[t("label",{htmlFor:"tabs",className:"sr-only",children:"Select a tab"}),t("select",{id:"tabs",name:"tabs",className:"block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-primary focus:border-primary sm:text-sm rounded-md",value:e,onChange:a=>{const r=a.currentTarget.value;s(r)},children:n.map(a=>t("option",{value:a,children:Js(a)}))})]}),Fa={money:Xn.faUsdSquare,mind:Zn.faSpa,body:es.faHeartbeat,work:ts.faBriefcase,life:ns.faUmbrellaBeach},fn=(e,n)=>t(ct,{size:n??"lg",icon:Fa[e]}),bn=({currentTab:e,onTabClicked:n})=>{const s=c=>fn(c,"1x"),a=c=>t("div",{className:gn[c],children:s(c)}),r={all:t("img",{className:"h-3.5 w-3.5",src:Ma,alt:""}),...Object.fromEntries(Me.map(c=>[c,s(c)]))},i={all:t("img",{className:"h-3.5 w-3.5",src:_a,alt:""}),...Object.fromEntries(Me.map(c=>[c,a(c)]))};return t(b,{children:[t("div",{className:"sm:hidden",children:t(Da,{currentTab:e,onTabClicked:c=>n(c),tabNameList:[..._t]})}),t("div",{className:"hidden sm:block",children:t(Ua,{children:_t.map(c=>t(Va,{onClick:()=>{n(c)},selected:e===c,className:"uiid-explore-perks-tabs",children:[e===c?i[c]:r[c],t("span",{className:"uiid-explore-tab-name ml-3",children:c})]},c))})})]})},yn=({onSearchEvent:e})=>{const n=G(null),s=G(null),[a,r]=p(!1);return h(()=>{const i=[n.current&&xt(n.current,"input").pipe(ss("target","value"),Gt(c=>{r(!!c)}),as(500)).subscribe(async c=>{e(c)}),s.current&&xt(s.current,"click").subscribe(()=>{n.current.value="",r(!1),e("")})];return()=>{i.map(c=>c==null?void 0:c.unsubscribe())}},[]),t("div",{className:"flex relative rounded-md shadow-sm",children:[t("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none","aria-hidden":"true",children:t(rs,{className:"mr-3 h-4 w-4 text-gray-400","aria-hidden":"true"})}),t("input",{type:"text",name:"search",id:"search",ref:n,placeholder:"Search perks",className:"uiid-search-bar-input block w-full pl-9 rounded-none rounded-md sm:text-sm border-gray-300"}),t("div",{className:K(a?"":"hidden","absolute inset-y-0 right-0 pr-3 flex items-center z-10 cursor-pointer"),ref:s,children:t(_e,{className:"h-5 w-5 text-gray-400 ","aria-hidden":"true"})})]})};var Mt,Ut;const Wa=()=>({all:[],money:[],mind:[],body:[],work:[],life:[]}),ja=()=>({perksTab:"all",searchString:""});let Ha=(Mt=we({name:"explore-perks",cache:{ttl:"3600000"},idKey:"benefitId",resettable:!0,producerFn:ke}),Mt(Ut=class extends Jt{constructor(){super(ja())}})||Ut);const ve=new Ha,za=()=>({setTab:e=>{ve.update(n=>{n.perksTab=e})},searchPerks:e=>{ve.update(n=>{n.searchString=e,n.perksTab="all"})}}),Xe=za(),vn=({children:e,className:n})=>t("div",{className:K(n??"","grid items-stretch sm:grid-cols-2 lg:grid-cols-3 gap-8"),children:e}),wn=({children:e})=>t("div",{className:"uiid-preview-empty flex items-center justify-center sm:col-span-2 lg:col-span-3 justify-items-center content-center bg-gray-100 rounded-lg overflow-hidden h-72",children:t("div",{className:"text-xl font-medium text-gray-400 text-center",children:e})}),Ga="/benefits/app/assets/workplace_link_banner_mobile-6ebaa24b.png",qa="/benefits/app/assets/workplace_link_banner_v2-c81ed849.png",Ka="/workplace-link";class X extends Xt{constructor(s){super(s);g(this,"perksTab$",this.select(s=>s.perksTab));g(this,"all$",Te([this.selectAll()]).pipe(Ee(([s])=>X.filterPerks(s,"","all"))));g(this,"classifiedPerks$",Te([this.selectAll(),this.select(s=>s.searchString)]).pipe(Ee(([s,a])=>{const r=a?X.searchPerks(s,a):s;return X.classifyPerks(r)})));g(this,"perksOnStage$",Te([this.selectAll(),this.select(s=>s.searchString),this.select(s=>s.perksTab)]).pipe(Ee(([s,a,r])=>this.getHasCache()?Z.fromNullable(X.filterPerks(s,a,r)):A)));this.store=s}static filterPerks(s,a,r){const i=X.searchPerks(s,a).filter(c=>r==="all"||c.benefit.category===r);return X.excludeLocalPerk(i,Ka)}static searchPerks(s,a){return s.filter(r=>r.benefit.title.toLowerCase().includes(a.toLowerCase())||r.benefit.subtitle.toLowerCase().includes(a.toLowerCase()))}static classifyPerks(s){const a=Wa();return s.forEach(r=>{const i=r.benefit.category;a[i].push(r)}),a.all=s,a}static findLocalPerk(s,a){const r=s.filter(i=>{var c;return(c=nt(i.benefit.url))==null?void 0:c.startsWith(a)});return r.length===0?void 0:r[0]}static excludeLocalPerk(s,a){return s.filter(i=>{var c;return!((c=nt(i.benefit.url))!=null&&c.startsWith(a))})}}const De=new X(ve);var Vt,Dt;function Ya(){return{loading:!1,featuredPerks:A,featuredProductOffers:void 0,viewPerk:{isOpen:!1,perk:A},viewLanding:{isOpen:!1,landingSelection:[]},categories:void 0,benefitsPlanHome:void 0}}let Qa=(Vt=we({name:"home-page",resettable:!0,producerFn:ke}),Vt(Dt=class extends rt{constructor(){super(Ya())}})||Dt);const Y=new Qa;class Ja extends We{constructor(s){super(s);g(this,"homePageState$",this.select(s=>s.featuredPerks));g(this,"viewPerkState$",this.select(s=>s.viewPerk));g(this,"viewLandingState$",this.select(s=>s.viewLanding));g(this,"categoryState$",this.select(s=>s.categories));g(this,"benefitsPlanHomeState$",this.select(s=>s.benefitsPlanHome));g(this,"bannerItems$",this.select(s=>s.featuredProductOffers));this.store=s}}const Q=new Ja(Y),Xa=()=>({getViewPageState:()=>{const e=n=>{Y.update(s=>{s.featuredPerks=L(n)}),ve.set(n.availableBenefits)};return De.selectCached(()=>sn.getBenefitsAsync(),e)},getMarketplaceCategoryState:()=>{const e=n=>{Y.update(s=>{s.categories=n})};return Q.selectCached(()=>va(),e)},getBenefitsPlanHome:()=>{const e=n=>{Y.update(s=>{s.benefitsPlanHome=n})};return Q.selectCached(()=>fa(),e)},getBannerItems:e=>{const n=a=>{Y.update(r=>{r.featuredProductOffers=a})},s=()=>wa("webBanner").then(a=>e.featureFlags[nn.FlareApp]?a.concat([{isAppOffer:!0,title:"Workplace benefits in your pocket!",subtitle:"Download the Flare app for easy access to your workplace benefits and much more.",categoryId:"",categoryName:"",slug:"",location:"webBanner",coverPhotoMobileUrl:Ga,coverPhotoDesktopUrl:qa,linkButtonText:"Get Flare App",linkUrl:"#/workplace-link"}]):a);return Q.selectCached(()=>s(),n)},reloadViewPageState:()=>{ve.setHasCache(!1)},openPerk:e=>{Y.update(n=>{n.viewLanding={isOpen:!1,landingSelection:[],category:void 0},n.viewPerk={isOpen:!0,perk:it(e)}})},closePerk:()=>{Y.update(e=>{e.viewPerk.isOpen=!1})},openLanding:(e,n)=>{Y.update(s=>{s.viewPerk.isOpen=!1,s.viewLanding={isOpen:!0,landingSelection:e,category:n}})},closeLanding:()=>{Y.update(e=>{e.viewLanding={isOpen:!1,landingSelection:[],category:void 0}})}}),$=Xa(),kn="/benefits/app/assets/default_backdrop-fdd955b8.png",pt=e=>{const n=t(b,{children:[t("div",{className:"flex-shrink-0",children:t("img",{className:K(e.imageClassName??"h-48 w-full object-cover"),src:e.imageUrl,alt:""})}),t("div",{className:"flex-1 bg-white p-4 flex flex-col justify-between",children:e.children})]});return t("div",{onClick:e.onClick,className:K(e.className??"",e.onClick?"cursor-pointer":"","flex flex-col rounded-lg shadow-lg overflow-hidden"),children:e.externalLink?t("a",{href:e.externalLink,target:"_blank",rel:"noopener noreferrer",children:n}):n})},Za=e=>Nt.match(e.toLowerCase()).with("body",()=>"bg-pink-100 text-pink-800").with("life",()=>"bg-yellow-100 text-yellow-800").with("mind",()=>"bg-green-100 text-green-800").with("money",()=>"bg-blue-100 text-blue-800").with("work",()=>"bg-orange-100 text-orange-800").with(Nt.__,()=>"bg-gray-100 text-gray-800").exhaustive(),gt=e=>{const n=Za(e.name),s=e.size==="xs"?"text-xs":"text-sm";return t("div",{className:K(e.className??"","capitalize inline-flex items-center px-2 py-0.5 rounded font-medium",n,s),children:e.name})},xn=({perk:e,onClick:n,className:s})=>{var a;return t(pt,{className:s,imageUrl:((a=e.backdrop)==null?void 0:a.downloadUrl)??kn,onClick:n,children:t("div",{className:"flex-1 pt-2 pb-7 px-2",children:[t(gt,{className:"uiid-perk-tag",name:e.category}),t("div",{className:"block mt-2",children:[t("p",{className:"uiid-perk-item-title text-xl font-semibold text-gray-900",children:e.title}),t("p",{className:"uiid-perk-item-subtitle mt-1 text-sm text-gray-500",children:e.subtitle})]})]})})},Nn=()=>t("div",{className:"flex flex-col animate-pulse shadow-lg rounded-lg overflow-hidden",children:[t("div",{className:"flex-shrink-0",children:t("div",{className:"h-48 bg-gray-300"})}),t("div",{className:"flex-1 bg-white p-6 pb-9 flex flex-col justify-between",children:t("div",{className:"flex-1",children:[t("div",{className:"h-6 bg-gray-300 rounded w-12"}),t("div",{className:"block mt-2",children:[t("div",{className:"h-4 mt-4 bg-gray-300 rounded w-1/2"}),t("div",{className:"h-4 mt-2 bg-gray-300 rounded w-3/4"})]})]})})]}),An=()=>t(b,{children:[...Array(3).keys()].map((e,n)=>t(Nn,{},n))}),er=()=>{const[e,n]=p(A),{service:s}=O();h(()=>{const i=[De.perksOnStage$.subscribe(n)];return()=>{i.map(c=>c.unsubscribe())}},[]);const a=async i=>{$.openPerk(i),await s.trackExplorePerkViewedAsync(i)},r=T(e,[]).length>0?T(e,[]).map(i=>{const{benefit:c,benefitId:l}=i;return t(xn,{className:"uiid-explore-perk",perk:c,onClick:()=>a(i)},l)}):t(wn,{children:[t("p",{children:"Sorry, no entries were found matching your search request."}),t("p",{children:"Please try another search."})]});return t(vn,{className:"uiid-perks-grid",children:ce(e)?t(An,{}):r})},tr=()=>{const[e,n]=p(0),[s,a]=p("all"),{service:r}=O();h(()=>{(async()=>r.trackPerksListViewedAsync(s))();const c=[De.all$.subscribe(l=>{n(l.length)}),De.perksTab$.subscribe(a)];return()=>{c.map(l=>l.unsubscribe())}},[]),h(()=>()=>{Xe.searchPerks("")},[]);const i=async c=>{Xe.setTab(c),await r.trackPerksListViewedAsync(c)};return t("div",{className:"flex flex-col",style:{minHeight:window.innerHeight},children:[t("div",{className:"sm:flex sm:items-center sm:justify-between",children:[t("div",{className:"flex",children:[t("div",{className:"text-2xl md:text-4xl font-bold md:font-extrabold leading-loose md:leading-10 text-gray-700",children:"Explore other perks"}),t("div",{className:"text-2xl md:text-4xl font-bold md:font-extrabold leading-loose md:leading-10 text-gray-500 ml-2",children:["(",e,")"]})]}),t("div",{className:"mt-4 sm:mt-0",children:t(yn,{onSearchEvent:async c=>{Xe.searchPerks(c),c&&await r.trackPerksListSearched(c)}})})]}),t("div",{className:"mt-4",children:t(bn,{currentTab:s,onTabClicked:i})}),t("div",{className:"mt-6",children:t(er,{})})]})},nr=e=>{const{perks:n}=e,[s,a]=p(!0),{service:r}=O();h(()=>{a(ce(n))},[n]);const i=l=>{$.openPerk(l),r.trackFeaturePerkViewedAsync(l)},c=T(n,[]).map(l=>{const{benefit:m,benefitId:o}=l;return t(xn,{className:"uiid-featured-perk",perk:m,onClick:()=>i(l)},o)});return t("div",{className:"flex flex-col",children:[t("div",{className:"text-2xl md:text-4xl font-bold md:font-extrabold leading-loose md:leading-10 text-gray-700",children:"Featured Perks"}),t("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-8 pt-6",children:s?t(An,{}):c})]})},ft=({isOpen:e,fullWidthMobile:n,onClose:s,children:a})=>t(Se.Root,{show:e,as:b,children:t(At,{as:"div",static:!0,className:"modal fixed z-40 inset-0 overflow-y-auto",open:e,onClose:s,children:t("div",{className:`flex items-center justify-center min-h-screen md:max-h-screen mt-auto text-center ${n?"w-screen md:w-auto md:p-4":"p-4"}`,children:[t(Se.Child,{as:b,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:t(At.Overlay,{className:"fixed inset-0 bg-black bg-opacity-75 transition-opacity"})}),t("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:""}),t(Se.Child,{as:b,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:t("div",{className:`inline-block align-bottom transition-all md:align-middle bg-white text-left shadow-xl transform ${n?"mt-auto md:mb-auto md:rounded-lg overflow-visible":"rounded-lg overflow-hidden"}`,children:a})})]})})}),sr=e=>n=>!!n&&e(n),bt=e=>sr(e.test.bind(e)),yt=/^\+?(614|6104|04)([0-9]{2})([0-9]{3})([0-9]{3})$/,ar=/^[0-9]{6}$/,rr=/^[0-9]*$/,Cn=e=>{if(!e)return;const n=e.replace(/\s/g,""),s=e.replace(/\s/g,"").match(yt);return s==null?n:`04${s[2]} ${s[3]} ${s[4]}`},ir=e=>{const n=e.replace(/\s/g,""),s=e.replace(/\s/g,"").match(yt);return s==null?n:`+614${s[2]}${s[3]}${s[4]}`},Pn=bt(yt),In=bt(ar),cr=bt(rr),lr=({formId:e,profile:n,categoryId:s,categoryName:a})=>{const{service:r}=O(),i=()=>{r.trackActivityCompletedAsync(s,s,a,"typeform")};let c={};return n&&(c={email:n.email,first_name:n.firstName,last_name:n.lastName,mobile:Cn(n.mobilePhone),profile_id:n.profileId,account_id:n.accountId,partner_id:n.partnerId,customer_id:n.customerId,campaign_class:"Platform",campaign_source:"Flare",campaign_medium:"Web Benefits",campaign_name:"Benefits Assessment",skip_welcome:"true"}),t(is.Widget,{id:e,className:"mx-auto w-screen h-screen md:h-[40rem] md:w-[95vw] md:max-w-[70rem]",hidden:c,inlineOnMobile:!0,onSubmit:i})},or=(e,n,s)=>{var m,o,y,v,x,k,f,w,B,d,u,S;const a=ze(le),r=T(a,void 0),i=r==null?void 0:r.basicProfile,c=r==null?void 0:r.accountName;let l={};switch(i&&(l={email:i.email,"first-name":i.firstName,"last-name":i.lastName,mobile:i.mobilePhone,"employer-name":c,"profile-id":i.profileId,"account-id":i.accountId,"partner-id":i.partnerId,"customer-id":i==null?void 0:i.customerId,"sf-class":"Platform","sf-source":"Flare","sf-medium":"Web Benefits","sf-name":"Benefits Assessment"}),s.component){case"activity-assessment":return t("div",{className:"p-10 overflow-hidden bg-white md:bg-transparent w-screen md:w-auto",children:((m=r==null?void 0:r.workplaceLinkConfig)==null?void 0:m.workplaceBackendToken)&&t("benefits-plan-assessment",{"base-url":e,"profile-id":i.profileId,"access-token":(o=r.workplaceLinkConfig)==null?void 0:o.workplaceBackendToken,"image-url":`${s.heroImageDesktop.fields.file.url}?fm=jpg&q=90&w=640&h=480`,title:(f=(k=(x=(v=(y=s.modalBody)==null?void 0:y.content)==null?void 0:v.find(I=>I.nodeType==="heading-1"))==null?void 0:x.content)==null?void 0:k.find(I=>I.nodeType==="text"))==null?void 0:f.value,description:(S=(u=(d=(B=(w=s.modalBody)==null?void 0:w.content)==null?void 0:B.find((I,D)=>D===1))==null?void 0:d.content)==null?void 0:u.find(I=>I.nodeType==="text"))==null?void 0:S.value,"assessment-id":s.assessmentId,"track-client":"webBenefits","track-source":"WebBenefits","track-channel":"web","vertical-alignment":"items-center","skip-intro":"true"})});case"cars-calculator-ungated":return t("div",{className:"md:p-1",children:t("cars-calculator",{"datadog-disabled":!0,...l,"backend-url":e,"hide-employer-name":!0})});case"cars-calculator-gated":return t("div",{className:"md:p-1",children:t("cars-calculator",{"datadog-disabled":!0,...l,"backend-url":e,"is-gated":!0,"hide-employer-name":!0})});case"typeform":return s.typeformId?t(lr,{formId:s.typeformId,profile:i,categoryId:n.id||"",categoryName:n.title||""}):t(b,{});default:return t(b,{})}},dr=({category:e,landing:n,apolloBaseUrl:s})=>or(s,e,n),te=({url:e,children:n,className:s,type:a,disabled:r,onClick:i})=>{const c=`block w-full mx-auto md:w-auto md:ml-0 text-center px-4 py-2 border border-transparent shadow-sm
|
|
3
|
+
text-sm leading-6 font-semibold rounded-md text-white bg-primary disabled:bg-gray-100 disabled:border-gray-300 disabled:text-gray-400 ${s}`;return e?t(ue,{className:c,href:e,onClick:i,children:n}):t("button",{type:a||"button",className:c,disabled:r,onClick:i,children:n})},mr={renderText:e=>e.split(`
|
|
4
|
+
`).flatMap((n,s)=>[s>0&&t("br",{}),n]),renderNode:{[_.BLOCKS.PARAGRAPH]:(e,n)=>t("p",{className:"text-xs leading-4 font-normal text-gray-600",children:n}),[_.INLINES.HYPERLINK]:(e,n)=>t(ue,{className:"text-blue-600",href:e.data.uri,children:n}),[_.BLOCKS.LIST_ITEM]:(e,n)=>he.documentToReactComponents(e,{renderNode:{[_.BLOCKS.PARAGRAPH]:(s,a)=>t("p",{className:"text-gray-600 leading-5 text-sm ",children:a}),[_.BLOCKS.LIST_ITEM]:(s,a)=>t("li",{className:"flex gap-2",children:[t(ct,{className:"text-primary w-3 h-5",icon:Zt}),a]})}})}},ur=({body:e})=>t(b,{children:he.documentToReactComponents(e,mr)}),hr={renderText:e=>e.split(`
|
|
5
|
+
`).flatMap((n,s)=>[s>0&&t("br",{}),n]),renderNode:{[_.BLOCKS.HEADING_1]:(e,n)=>t("h1",{className:"text-2xl leading-8 font-bold pb-2",children:n}),[_.BLOCKS.PARAGRAPH]:(e,n)=>t("p",{className:"text-base leading-6 font-normal text-gray-600 pb-4",children:n}),[_.BLOCKS.UL_LIST]:(e,n)=>t("ul",{className:"py-4 px-3 md:px-8 rounded-lg border-gray-200 border-2 shadow-sm flex flex-col space-y-2 mb-4",children:n}),[_.BLOCKS.LIST_ITEM]:(e,n)=>he.documentToReactComponents(e,{renderNode:{[_.BLOCKS.PARAGRAPH]:(s,a)=>t("p",{className:"text-gray-600 leading-5 text-sm ",children:a}),[_.BLOCKS.LIST_ITEM]:(s,a)=>t("li",{className:"flex gap-2",children:[t(ct,{className:"text-primary w-3 h-5",icon:Zt}),a]})}})}},pr=({body:e})=>t(b,{children:he.documentToReactComponents(e,hr)}),gr=({data:e,onClick:n,onClose:s,onPrevious:a})=>{var m;let r;const i=ze(le),c=T(i,void 0),l=(e==null?void 0:e.component)==="activity-assessment"&&!((m=c==null?void 0:c.workplaceLinkConfig)!=null&&m.workplaceBackendToken);return(e==null?void 0:e.component)==="shopify"?r=T(J.getShopifyUrl(),"#"):((e==null?void 0:e.component)==="external-link"||l)&&(e!=null&&e.externalUrl)&&(r=e==null?void 0:e.externalUrl),e?t("div",{className:a?"absolute md:relative bg-white rounded-lg":"rounded-lg",children:t("div",{className:"relative",children:[s&&t("div",{className:"absolute top-0 right-0 pt-2 md:pt-4 pr-4 z-30",children:t("button",{type:"button",className:"uiid-perk-details-close-button focus:outline-none bg-white rounded-md text-gray-500",onClick:s,children:[t("span",{className:"sr-only",children:"Close"}),t(_e,{className:"h-6 w-6 border-0","aria-hidden":"true"})]})}),a&&t("div",{className:"absolute top-0 left-0 pl-4 pt-4 md:pl-4 md:pt-5 lg:pl-16 lg:pt-8 xl:pl-20 xl:pt-12 z-30",children:t("button",{type:"button",className:"uiid-perk-details-close-button focus:outline-none bg-white rounded-md text-gray-500",onClick:a,children:t("span",{className:"inline-flex text-sm leading-5 font-medium text-gray-600",children:[t(cs,{className:"h-5 w-5 border-0 mr-2","aria-hidden":"true"}),"Back"]})})}),t("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 md:gap-10 lg:gap-14 xl:gap-16 p-0 md:p-10 lg:p-16 xl:p-20 md:relative",children:[e.heroImageDesktop&&t("img",{src:`${e.heroImageDesktop.fields.file.url}?fm=jpg&q=90&w=640&h=480`,className:"mx-auto w-full order-2 self-start hidden md:block"}),e.heroImageMobile&&t("img",{src:`${e.heroImageMobile.fields.file.url}?fm=jpg&q=90&w=640&h=480`,className:"mx-auto mt-10 w-full self-start block md:hidden"}),t("div",{className:"flex flex-col self-start p-4 md:p-0 md: mt-4",children:[t(pr,{body:e.modalBody}),t(te,{className:"mb-6",onClick:n,url:r,children:e.buttonText}),e.disclaimer&&t(ur,{body:e.disclaimer})]})]})]})}):t(b,{})},fr=({items:e,onClick:n})=>t("div",{className:"mx-auto w-screen md:h-auto md:w-[95vw] md:max-w-[70rem] lg:px-16 px-6 py-6 md:py-16",children:[t("h1",{className:"text-2xl leading-8 font-bold text-gray-600 text-center",children:"Offers available"}),t("div",{className:"w-full mx-auto flex flex-wrap items-stretch justify-center gap-8 gap-y-8 md:gap-x-24 py-10",children:e.map((s,a)=>t(pt,{imageUrl:s.imageUrl,className:"md:w-80 w-full",imageClassName:"md:h-32 w-full object-cover",children:[t("div",{children:[t("h2",{className:"text-lg font-bold text-gray-900 pb-0",children:s.title}),t("h3",{className:"text-sm text-gray-600 pb-2",children:s.subtitle}),t("div",{className:"flex pb-4",children:t("div",{className:"w-auto px-2 py-0.5 rounded text-xs font-medium bg-blue-100 text-blue-800",children:s.type})})]}),t(te,{className:"md:w-full mx-0 mb-1",onClick:()=>n(s.id),children:s.buttonText})]},s.id))})]}),br=()=>t("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 md:gap-10 lg:gap-14 xl:gap-16 p-5 md:p-10 lg:p-16 xl:p-20 md:relative",children:[t(N,{className:"mx-auto w-full order-2 self-start hidden md:block",height:25}),t(N,{className:"ml-auto my-10 w-full self-start block md:hidden",height:12}),t("div",{className:"flex-col gap-3 md:gap-6 flex-wrap hidden md:flex",children:[t(N,{width:18,height:2}),t(N,{width:18,height:4}),t(N,{width:20,height:10}),t(N,{width:10,height:2}),t(N,{width:20,height:6})]}),t("div",{className:"flex flex-col md:flex-row gap-3 md:gap-6 flex-wrap md:hidden",children:[t(N,{height:2}),t(N,{height:4}),t(N,{height:2}),t(N,{height:6})]})]}),yr=()=>{const[e,n]=p(!1),[s,a]=p(),[r,i]=p([]),[c,l]=p(),[m,o]=p("LOADING"),y=G(null),v=G(null),x=G(null),{service:k}=O(),f=()=>{var C;return(C=y.current)==null?void 0:C.scrollIntoView({behavior:"smooth",block:"start"})},w=()=>{var C;return(C=v.current)==null?void 0:C.scrollIntoView({behavior:"smooth",block:"start"})},B=()=>{var C;return(C=x.current)==null?void 0:C.scrollIntoView({behavior:"smooth",block:"start"})},d=()=>m==="LOADING",u=()=>m==="SELECTION",S=()=>m==="LANDING",I=()=>m==="ACTION",D=ze(le),qe=T(D,void 0),On=()=>{var C,E,de;I()?w():(c==null?void 0:c.component)!=="shopify"&&(c==null?void 0:c.component)!=="external-link"&&((c==null?void 0:c.component)!=="activity-assessment"||(C=qe==null?void 0:qe.workplaceLinkConfig)!=null&&C.workplaceBackendToken)&&o("ACTION"),c&&s&&k.trackActivityActionedAsync(s.id,((E=c.selectionTile)==null?void 0:E.activityId)||c.id,((de=c.selectionTile)==null?void 0:de.activityName)||s.title,c.component)},Ne=()=>{s&&k.trackCategoryClosedAsync(s.id,s.title,m),V("/")},Bn=C=>{const E=r.filter(de=>de.id===C)[0];C===(c==null?void 0:c.id)?o("LANDING"):l(E),E&&s&&k.trackActivityStartedAsync(s.id,E.selectionTile.activityId,E.selectionTile.activityName,E.component)},$n=()=>{o("SELECTION")};h(()=>{I()&&w(),S()&&B(),u()&&f()},[m,c]),h(()=>{c&&m!=="LANDING"&&setTimeout(()=>o("LANDING"),100)},[c]),h(()=>{e&&s&&k.trackCategoryOpenedAsync(s.id,s.title)},[s,e]),h(()=>{const C=[Q.viewLandingState$.subscribe(({isOpen:E,category:de,landingSelection:Ae})=>{n(E),E&&(a(de),i(Ae),Ae.filter(_n=>_n.selectionTile).length>1?(o("SELECTION"),l(void 0)):Ae.length>0?(l(Ae[0]),o("LANDING")):(l(void 0),o("LOADING")))})];return()=>{C.map(E=>E.unsubscribe())}},[]);const wt=r.filter(C=>C.selectionTile).map(C=>{var E;return{title:C.selectionTile.displayTitle,id:C.id,subtitle:C.selectionTile.subtitle,buttonText:C.selectionTile.buttonText||"Learn more",type:"Advertisement",imageUrl:`${(E=C.selectionTile.tileImage)==null?void 0:E.fields.file.url}?fm=jpg&q=90&w=640&h=480`}})||[],Ke=wt.length>1;return t(ft,{isOpen:e,fullWidthMobile:!0,onClose:Ne,children:t("div",{className:"w-screen md:w-auto md:max-w-[70rem] md:rounded-lg",children:[t("div",{className:`${e?"block":"hidden"} absolute top-0 right-0 pt-4 pr-4 z-30`,children:t("button",{type:"button",className:"uiid-perk-details-close-button focus:outline-none bg-white rounded-md text-gray-500",onClick:Ne,children:[t("span",{className:"sr-only",children:"Close"}),t(_e,{className:"h-6 w-6 border-0","aria-hidden":"true"})]})}),t("div",{className:d()?"md:grid":"hidden",children:t(br,{})}),Ke&&t("div",{ref:y,className:u()?"md:grid":"md:hidden",children:t(fr,{items:wt,onClick:Bn})}),t("div",{ref:x,className:S()?"md:grid":"hidden",children:t(gr,{data:c,onClick:On,onClose:Ke&&Ne||void 0,onPrevious:Ke&&$n||void 0})}),t("div",{ref:v,className:`${I()?"block":"hidden"} h-screen md:h-auto absolute md:relative md:rounded-lg bg-white`,children:t("div",{className:"m-auto relative",children:[t("div",{className:"md:hidden absolute top-0 right-0 pt-4 pr-4 z-30",children:t("button",{type:"button",className:"uiid-perk-details-close-button focus:outline-none bg-white rounded-md text-gray-500",onClick:Ne,children:[t("span",{className:"sr-only",children:"Close"}),t(_e,{className:"h-6 w-6 border-0","aria-hidden":"true"})]})}),s&&c&&t(dr,{apolloBaseUrl:W.getConfig().apolloBaseUrl,category:s,landing:c})]})})]})})},Sn="dd/MM/yyyy",Tn="hh:mm a",Ze="ccc d MMM",vr="p",wr=(e,n,s)=>{if(e.data.dateRange){const a=q(s,!1),r=q(new Date(e.data.dateRange.end),e.data.dateRange.allDay);switch(n){case"Upcoming":return e.type==="customEvent"&&a<=r;case"Past":return e.type==="customEvent"&&a>r;case"Library":return e.type==="eventTemplate"}}else switch(n){case"Library":return e.type==="eventTemplate"}return!1},Si=(e,n)=>e.filter(s=>wr(s,n,new Date)),q=(e,n)=>n?new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),0,0,0,0):new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0),Ti=(e,n)=>{const s=new Date,a=Cs(`${e} ${n||"12:00 AM"}`,`${Sn} ${Tn}`,s);return n?Ct(a):(s.setUTCFullYear(a.getFullYear()),s.setUTCMonth(a.getMonth()),s.setUTCDate(a.getDate()),s.setUTCHours(0,0,0,0),Ct(s))},Ei=(e,n)=>({date:re(q(e,n),Sn),time:n?void 0:re(e,Tn)}),Li=(e,n,s)=>{if(!e.data.dateRange)return 1;if(!n.data.dateRange)return-1;if(e.data.dateRange&&n.data.dateRange){const a=q(new Date(e.data.dateRange.start),e.data.dateRange.allDay),r=q(new Date(n.data.dateRange.start),n.data.dateRange.allDay),i=a<r?-1:1;return s.filter==="Past"?i*-1:i}else return 0},kr=(e,n,s)=>{const a=q(new Date(e),s),r=q(new Date(n),s),i=a.getTime()===r.getTime()?re(a,Ze):`${re(a,Ze)} - ${re(r,Ze)}`,c=s?"":`, ${re(new Date(e),vr)}`;return`${i}${c}`},Ri=(e,n)=>n?e?e.getMonth()!==n.getMonth()?Ft(e):void 0:"More":e?Ft(e):void 0,Oi=(e,n)=>e&&n?e.getFullYear()!==n.getFullYear()?e.getFullYear().toString():void 0:e==null?void 0:e.getFullYear().toString(),Bi=(e,n,s)=>{const a=e[n],r=e[n-1];if(n===0){if(a.data.dateRange){const i=q(new Date(a.data.dateRange.start),a.data.dateRange.allDay);return s(i,void 0)}}else if(r.data.dateRange){const i=q(new Date(r.data.dateRange.start),r.data.dateRange.allDay);if(a.data.dateRange){const c=q(new Date(a.data.dateRange.start),a.data.dateRange.allDay);return s(c,i)}else return s(void 0,i)}},Ft=e=>e.toLocaleString("default",{month:"long"})+" "+(e==null?void 0:e.getFullYear().toString()),xr=({actionButton:e,item:n,itemId:s,onClose:a})=>{var c,l;const r=((c=n.backdrop)==null?void 0:c.downloadUrl)??kn,i=(l=n.icon)==null?void 0:l.downloadUrl;return t("div",{className:"uiid-perk-details md:w-160 first-letter:overflow-hidden",children:[t("div",{className:"absolute top-0 right-0 pt-4 pr-4 z-30",children:t("button",{type:"button",className:"uiid-perk-details-close-button focus:outline-none bg-white rounded-md text-gray-500",onClick:a,children:[t("span",{className:"sr-only",children:"Close"}),t(Qt,{className:"h-6 w-6 border-0","aria-hidden":"true"})]})}),e&&t("div",{className:"absolute top-0 left-0 pt-4 pl-4 z-30",children:e}),t("div",{className:"relative bg-cover bg-center",style:`background-image: url(${r})`,children:[t("div",{className:"absolute inset-0 bg-gradient-to-t from-black opacity-90"}),t("div",{className:"relative flex items-end py-4 px-8 h-64",children:t("div",{className:"flex items-center",children:[!n.dateRange&&t("div",{className:"h-24 w-24 flex-shrink-0",children:t("div",{className:"bg-gray-200 rounded-lg",children:i?t("img",{className:"h-24 w-24 object-contain rounded-lg",src:i,alt:""}):t("div",{className:"h-24 w-24 rounded-lg text-gray-800 grid",children:t("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-12 w-12 place-self-center",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1,d:"M12 8v13m0-13V6a2 2 0 112 2h-2zm0 0V5.5A2.5 2.5 0 109.5 8H12zm-7 4h14M5 12a2 2 0 110-4h14a2 2 0 110 4M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"})})})})}),t("div",{className:`text-white ${n.dateRange?"":"pl-4"}`,children:[t("div",{className:"uiid-perk-details-title text-xl leading-6 md:text-3xl md:leading-9 font-extrabold",children:n.title}),t("div",{className:"relative text-sm leading-4 md:text-base md:leading-6 font-medium",children:[n.dateRange?kr(n.dateRange.start,n.dateRange.end,n.dateRange.allDay):n.subtitle,n.dateRange&&n.location&&t(b,{children:[t("span",{className:"pipe pipe-white pipe-medium mx-3"}),t("span",{children:n.location})]})]}),t(gt,{className:"uiid-perk-details-tag",name:n.category,size:"xs"})]})]})})]}),t("div",{className:"flex flex-col p-8",children:[t("div",{className:"flex-grow",children:[n.dateRange&&t("p",{className:"text-lg leading-8 font-semibold mb-4",children:n.subtitle}),t("p",{className:"whitespace-pre-wrap",children:n.description}),n.linkLabel&&n.url&&t(ue,{href:n.url,onClick:()=>s&&st.trackPerkVisitedAsync({benefit:n,benefitId:s}),className:"w-auto mt-6 inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 text-sm leading-5 font-medium",children:n.linkLabel})]}),n.attachments&&n.attachments.length>0&&t("div",{className:"border border-gray-200 rounded-md mt-8",children:t("div",{className:"pl-3 pr-4 py-3 flex items-center justify-between text-sm",children:[t("div",{className:"w-0 flex-1 flex items-center",children:[t(ls,{className:"flex-shrink-0 h-5 w-5 text-gray-400","aria-hidden":"true"}),t("span",{className:"ml-2 flex-1 w-0 truncate",children:n.attachments[0].title})]}),t("div",{className:"ml-4 flex-shrink-0",children:t("a",{href:n.attachments[0].downloadUrl,target:"_blank",className:"font-medium text-primary",onClick:()=>s&&st.trackDocumentClickedAsync({benefit:n,benefitId:s}),children:"View"})})]})})]})]})},Nr=()=>{const[e,n]=p(!1),[s,a]=p(A);h(()=>{const i=[Q.viewPerkState$.subscribe(({isOpen:c,perk:l})=>{n(c),a(l)})];return()=>{i.map(c=>c.unsubscribe())}},[]);const r=Os(s);return r?t(ft,{isOpen:e,onClose:$.closePerk,children:t(xr,{item:r.benefit,itemId:r.benefitId,onClose:$.closePerk})}):t("div",{})},Pe=({category:e,slug:n})=>{const s=xe.useContext(le),[a,r]=p(A),[i,c]=p(),[l,m]=p(),[o,y]=p(),[v,x]=p();da();const{service:k}=O();h(()=>{k.trackBenefitsOpenedAsync()},[]),h(()=>{n&&(!v||v.length>0&&v[0].id!=n)&&(async()=>x(await ya(n)))()},[n,v]),h(()=>{const d=[Q.homePageState$.subscribe(u=>{r(u)}),Q.categoryState$.subscribe(u=>{c(u)}),Q.benefitsPlanHomeState$.subscribe(u=>{m(u)}),Q.bannerItems$.subscribe(u=>{y(u)}),$.getViewPageState().subscribe(),$.getMarketplaceCategoryState().subscribe(),$.getBenefitsPlanHome().subscribe(),$.getBannerItems(Ue(s)).subscribe()];return()=>{d.map(u=>u.unsubscribe())}},[]),h(()=>{if(e&&!i&&$.openLanding([]),e&&i){const d=i==null?void 0:i.find(u=>u.title.toLocaleLowerCase()===e.toLocaleLowerCase());d?$.openLanding(d.landings,d):($.closeLanding(),V("/"))}},[i,e]),h(()=>{!n&&!e&&(x(void 0),$.closeLanding())},[n,e]),h(()=>{if(n&&!v&&$.openLanding([]),n&&i&&v)if(v.length>0){const d=i==null?void 0:i.find(u=>{var S;return u.title.toLocaleLowerCase()===((S=v[0].categoryTitle)==null?void 0:S.toLocaleLowerCase())});$.openLanding(v,d)}else $.closeLanding(),V("/")},[n,v,i]);const f=$e.pipe(a,os(d=>d.promotedBenefits)),w=$e.pipe(f,He(()=>!1,d=>d.length>0)),B=pn.isPba();return t(b,{children:[!B&&t(dt,{user:s}),t("div",{className:"max-w-[90rem] min-w-5xl mx-auto py-8 px-4 sm:px-6 lg:px-8",children:[t("div",{className:"md:mb-16 mb-5",children:t(Ta,{offers:o})}),(!i||i.length>0&&l)&&t("div",{className:"md:mb-16 mb-5",children:t($a,{categories:i,content:l})}),w&&t("div",{className:"md:mb-16 mb-5",children:t(nr,{perks:f})}),t("div",{children:t(tr,{})})]}),t(Nr,{}),t(yr,{})]})};var Wt,jt;const Ar=()=>({all:[],money:[],mind:[],body:[],work:[],life:[]}),Cr=()=>({currentTab:"all",searchString:""});let Pr=(Wt=we({name:"explore-wellbeing",cache:{ttl:"3600000"},resettable:!0,producerFn:ke}),Wt(jt=class extends Jt{constructor(){super(Cr())}})||jt);const Be=new Pr;class Fe extends Xt{constructor(s){super(s);g(this,"currentTab$",this.select(s=>s.currentTab));g(this,"previewsOnStage$",Te([this.selectAll(),this.select(s=>s.searchString),this.select(s=>s.currentTab)]).pipe(Ee(([s,a,r])=>this.getHasCache()?Z.fromNullable(Fe.filterPreviews(s,a,r)):A)));this.store=s}get isPreviewsLoaded(){var s;return(((s=this.getValue().ids)==null?void 0:s.length)??0)>0}static filterPreviews(s,a,r){return Fe.searchPreviews(s,a).filter(i=>r==="all"||i.pillar===r)}static searchPreviews(s,a){return s.filter(r=>r.title.toLowerCase().includes(a.toLowerCase())||r.subtitle.toLowerCase().includes(a.toLowerCase()))}static classifyPreviews(s){const a=Ar();return s.forEach(r=>{const i=r.pillar;a[i].push(r)}),a.all=s,a}}const vt=new Fe(Be),Ir=()=>({setTab:e=>{Be.update(n=>{n.currentTab=e})},searchPreviews:e=>{Be.update(n=>{n.searchString=e,n.currentTab="all"})},loadEntryPreviews:()=>vt.selectCached(()=>oe.loadAvailableEntryPreviewsAsync(),e=>Be.set(e))}),fe=Ir(),Sr=()=>t(b,{children:[...Array(3).keys()].map((e,n)=>t(Nn,{},n))}),Tr=()=>{const[e,n]=p(A),{service:s}=O();h(()=>{const i=[vt.previewsOnStage$.subscribe(n)];return()=>{i.map(c=>c.unsubscribe())}},[]);const a=async i=>{i.externalLink||V(`/wellbeing-hub/articles/${i.slug}`),s.trackEntryViewed({contentId:i.id,contentTitle:i.slug,contentType:i.primaryContentType,contentPillar:i.pillar})},r=T(e,[]).length>0?T(e,[]).map(i=>t(pt,{className:"uiid-preview-item",imageUrl:`${i.coverPhotoUrl}?fm=jpg&q=50&w=640&h=480`,externalLink:i.externalLink,onClick:()=>a(i),children:t("div",{className:"flex-1 pb-7 pt-2 px-2",children:[t("div",{className:"flex items-center",children:[t(gt,{className:"uiid-preview-tag",name:i.pillar}),t("div",{className:"text-sm leading-5 font-normal px-2 text-gray-300",children:"|"}),t("div",{className:"text-xs leading-4 font-semibold tracking-wider uppercase text-gray-400",children:i.primaryContentType}),t("div",{className:"flex-grow"}),i.externalLink&&t(ds,{className:"h-5 w-5 text-gray-400 border-0"})]}),t("div",{className:"block mt-2",children:[t("p",{className:"uiid-preview-item-title text-xl font-semibold text-gray-900",children:i.title}),t("p",{className:"uiid-preview-item-subtitle mt-1 text-sm text-gray-500",children:i.subtitle})]})]})},i.id)):t(wn,{children:[t("p",{children:"Sorry, no entries were found matching your search request."}),t("p",{children:"Please try another search."})]});return t(vn,{className:"uiid-preview-grid",children:ce(e)?t(Sr,{}):r})},Er=()=>{const[e,n]=p("all"),{service:s}=O();h(()=>{const i=[vt.currentTab$.subscribe(n),fe.loadEntryPreviews().subscribe()];return()=>{i.map(c=>c.unsubscribe())}},[]),h(()=>()=>{fe.searchPreviews("")},[]);const a=async i=>{fe.setTab(i),V(`/wellbeing-hub/${i}`),s.trackEntriesListViewedAsync(i)},r=async i=>{fe.searchPreviews(i),s.trackEntriesListSearchedAsync(i)};return t("div",{className:"flex flex-col",style:{minHeight:window.innerHeight},children:[t("div",{className:"sm:flex sm:items-center sm:justify-between",children:[t("div",{className:"flex",children:t("div",{className:"text-3xl leading-9 font-semibold text-gray-700",children:"Explore the 5 pillars of wellness"})}),t("div",{className:"mt-4 sm:mt-0",children:t(yn,{onSearchEvent:r})})]}),t("div",{className:"mt-4",children:t(bn,{currentTab:e,onTabClicked:a})}),t("div",{className:"mt-6",children:t(Tr,{})})]})},Lr="/benefits/app/assets/wellbeing_banner-6903d615.png",Rr=({bgImageUrl:e,className:n,children:s,excludeGradient:a})=>{const r=e?{backgroundImage:`url(${e})`}:{};return t("div",{className:K("relative w-full rounded-lg bg-cover bg-center",n??""),style:r,children:[!a&&t(b,{children:[t("div",{className:"absolute inset-0 rounded-lg bg-black bg-opacity-10"}),t("div",{className:"absolute inset-0 rounded-lg bg-gradient-to-r from-black opacity-80"})]}),t("div",{className:"relative h-full rounded-lg overflow-hidden",children:s})]})},Or=({children:e})=>t("div",{className:"relative filter inline-flex items-center w-12 h-12 rounded-lg text-md font-medium bg-black bg-opacity-40 text-gray-800",children:[t("div",{className:"absolute inset-0 rounded-lg bg-gradient-to-b from-black bg-opacity-50"}),t("div",{className:"relative h-full w-full flex flex-wrap content-center justify-center",children:e})]}),Br=()=>t("div",{className:"flex gap-4",children:Me.map(e=>t(Or,{children:t("div",{className:gn[e],children:fn(e)})}))}),$r=()=>t(Rr,{className:"h-full",bgImageUrl:Lr,children:t("div",{className:"px-4 py-10 md:px-8 md:py-24 text-white",children:[t("div",{className:"text-2xl leading-8 font-bold",children:"Wellbeing Hub"}),t("div",{className:"max-w-sm text-md md:text-lg leading-6 mt-1 font-medium hidden md:block",children:"Providing education, support and tools to help you live a healthier and happier life!"}),t("div",{className:"pt-4 hidden md:block",children:t(Br,{})})]})}),Ht=({pillarFilter:e})=>{const n=G(null),{service:s}=O();return h(()=>{s.trackWellbeingOpenedAsync()},[]),h(()=>{var a;fe.setTab(e??"all"),s.trackEntriesListViewedAsync(e??"all"),e&&((a=n.current)==null||a.scrollIntoView({behavior:"smooth"}))},[e,n]),t("div",{className:"max-w-7xl min-w-5xl mx-auto px-4 py-8 sm:px-6 lg:px-8 mb-20",children:[t("div",{className:"flex flex-col md:flex-row",children:t("div",{className:"w-full",children:t($r,{})})}),t("div",{className:"mt-8 pt-4",ref:n,children:t(Er,{})})]})},_r=({pages:e,homePageUrl:n})=>t("nav",{className:"bg-white border-b border-gray-200 flex","aria-label":"Breadcrumb",children:t("ol",{role:"list",className:"max-w-screen-xl w-full mx-auto px-4 flex space-x-4 sm:px-6 lg:px-8",children:[t("li",{className:"flex",children:t("div",{className:"flex items-center",children:t("a",{href:n??"#",className:"text-gray-400 hover:text-gray-500",children:[t(ms,{className:"flex-shrink-0 h-5 w-5","aria-hidden":"true"}),t("span",{className:"sr-only",children:"Home"})]})})}),e.map((s,a)=>t("li",{className:"flex",children:t("div",{className:"flex items-center",children:[t("svg",{className:"flex-shrink-0 w-6 h-full text-gray-200",viewBox:"0 0 24 44",preserveAspectRatio:"none",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:t("path",{d:"M.293 0l22 22-22 22h1.414l22-22-22-22H.293z"})}),t("a",{href:s.href,className:"ml-4 text-sm font-medium text-gray-500 hover:text-gray-700","aria-current":e.length===a+1?"page":void 0,children:s.name})]})},s.name))]})}),Mr=(e,n,s)=>{h(()=>{let a=!0;return e(()=>a),()=>{a=!1,$e.pipe(n,He(()=>{},r=>r()))}},s)},Ur=(e,n)=>{h(()=>{window.scrollTo(e)},n)},Vr=(e,n)=>{Ur({top:0,...e},n)},Dr={renderNode:{[_.BLOCKS.EMBEDDED_ASSET]:e=>{const{title:n,description:s,file:a}=e.data.target.fields;return t("figure",{children:[t("img",{src:`${a.url}?fm=jpg&q=90&w=640&h=480`,alt:n}),t("figcaption",{children:s})]})}}},Fr=({body:e})=>t("article",{className:"prose prose-lg prose-indigo",children:he.documentToReactComponents(e,Dr)}),Wr=()=>t("div",{className:"max-w-3xl mx-auto py-6 px-4 sm:py-10 sm:px-6 lg:px-8 animate-pulse",children:[t("div",{class:"h-8 bg-gray-200 rounded w-2/3"}),t("div",{className:"flex space-x-3 mt-4",children:[t("div",{className:"flex-shrink-0",children:t("div",{class:"rounded-full bg-gray-200 h-10 w-10 mr-1"})}),t("div",{className:"min-w-0 flex flex-col justify-between flex-1",children:[t("div",{class:"h-4 bg-gray-200 rounded w-1/3"}),t("div",{class:"h-4 bg-gray-200 rounded w-1/4"})]})]}),t("div",{className:"mt-8",children:t("div",{class:"flex-1 space-y-8 py-1",children:[t("div",{class:"h-8 bg-gray-200 rounded w-3/4"}),t("div",{class:"h-48 bg-gray-200 rounded w-full"}),t("div",{class:"h-24 bg-gray-200 rounded w-3/4"}),t("div",{class:"h-36 bg-gray-200 rounded w-full"}),t("div",{class:"h-12 bg-gray-200 rounded w-1/4"})]})})]}),jr=({articleSlug:e})=>{const[n,s]=p();if(Mr(async r=>{const i=await ht(oe.loadArticleAsync(e),700);r()&&s(i)},Z.none,[e]),Vr(),!n)return t(Pt.div,{initial:{opacity:0},animate:{opacity:1},children:t(Wr,{})},"loading");const a=[{name:n==null?void 0:n.pillar,href:`#/wellbeing-hub/${n==null?void 0:n.pillar.toLowerCase()}`}];return t(b,{children:[t(_r,{pages:a,homePageUrl:"#/wellbeing-hub"}),t(Pt.div,{initial:{opacity:0},animate:{opacity:1},children:t("div",{className:"max-w-3xl mx-auto py-6 px-4 sm:py-10 sm:px-6 lg:px-8",children:[t("h2",{className:"text-4xl leading-10 font-extrabold tracking-tight",children:n.title}),t("div",{className:"flex space-x-3 mt-4",children:[t("div",{className:"flex-shrink-0",children:t("img",{className:"h-10 w-10 rounded-full",src:`${n.author.fields.avatar.fields.file.url}?fm=jpg&q=90&w=640&h=480`,alt:""})}),t("div",{className:"min-w-0 flex-1",children:[t("p",{className:"text-sm font-medium text-gray-900",children:n.author.fields.name}),t("p",{className:"text-sm text-gray-500",children:re(new Date(n.originalPublicationDate),"dd MMM yyyy")})]})]}),t("div",{className:"mt-8",children:t(Fr,{body:n.articleBody})})]})},"article")]})},Hr=()=>{const e=xe.useContext(le),n=pn.isPba();return t(b,{children:[!n&&t(dt,{user:e}),t(lt,{history:mt(ot()),children:[t(U,{path:"/wellbeing-hub",component:Ht}),t(U,{path:"/wellbeing-hub/:pillarFilter",component:Ht}),t(U,{path:"/wellbeing-hub/articles/:articleSlug",component:jr})]})]})};var En=(e=>(e.Auth_AccountDisabled="Sorry, your account has been deactivated. Please contact Flare if there are any issues.",e.Auth_AccountLocked="Sorry, your account is currently locked due to too many attempts. Please try again later.",e.Auth_Unregistered="Sorry, we are currently experiencing some issues. Please try again later.",e.Auth_InvalidVerificationCode="Your one time passcode doesn't look right. Please try again.",e.Auth_SessionExpired="Sorry, looks like your session has expired. Please try again.",e.Validation_InvalidPhoneNumber="Please enter a valid Australian mobile number beginning with 04.",e))(En||{});const Ln="Sorry, we are currently experiencing some issues. Please try again later.",zr=e=>e&&En[e]||Ln,Gr="/benefits-onboarding/backend/auth/signup",qr="/benefits-onboarding/backend/auth/verify",Kr="/benefits-onboarding/backend/auth/resend",F=e=>{const n=e.json;throw new Error(zr(n==null?void 0:n.code))};class Yr{signUpAsync(n){return ee.instance.url(Gr).post(n).internalError(F).badRequest(F).unauthorized(F).fetchError(F).res()}verifyAsync(n){return ee.instance.url(qr).post(n).internalError(F).badRequest(F).unauthorized(F).fetchError(F).res()}resendAsync(){return ee.instance.url(Kr).post().internalError(F).badRequest(F).unauthorized(F).fetchError(F).res()}}const et=new Yr,Qr="/benefits/app/assets/check-57fe1dcb.svg",Jr=e=>t("div",{className:"h-96 grid",children:[t("div",{className:"grid place-self-center",children:[t("div",{className:"bg-[#EAF0FE] w-16 h-16 rounded-lg flex items-center justify-center mx-auto mb-10",children:t("img",{className:"w-10",src:Qr})}),t("h1",{className:"text-3xl leading-9 font-bold text-gray-900 font-sans mb-3",children:"You’re all set!"}),t("p",{className:"px-8 text-base leading-6 font-normal text-gray-500",children:"Your benefits plan and exclusive offers are waiting for you."})]}),t(te,{className:"md:w-full md:text-base py-3 place-self-end",onClick:e.onComplete,children:"Start exploring your benefits"})]}),Xr="/benefits/app/assets/warning-a7f1af23.svg",Zr=e=>t("div",{className:"h-96 grid",children:[t("div",{className:"grid place-self-center",children:[t("div",{className:"bg-[#FEE2E2] w-16 h-16 rounded-lg flex items-center justify-center mx-auto mb-10",children:t("img",{className:"w-10",src:Xr})}),t("h1",{className:"text-3xl leading-9 font-bold text-gray-900 font-sans mb-3",children:"Something went wrong"}),t("p",{className:"px-8 text-base leading-6 font-normal text-gray-500",children:"We’re having some technical difficulties at the moment. Click the button below to proceed to your benefits."})]}),t(te,{className:"md:w-full md:text-base py-3 place-self-end",onClick:e.onError,children:"Dismiss"})]}),ei="/benefits/app/assets/suitcase-6471ad05.svg",ti=us(({label:e,id:n,type:s,placeholder:a,setPlaceholderOnFocus:r,value:i,className:c,onChange:l,onBlur:m,error:o},y)=>{const v=f=>{f.target instanceof HTMLInputElement&&l(f.target.value.trim())},x=f=>{f.target instanceof HTMLInputElement&&m&&m(f.target.value.trim())},k=()=>{a&&r&&!(i!=null&&i.trim())&&l(a)};return t("div",{className:c,children:[t("label",{htmlFor:n,className:"block text-sm font-medium leading-5 text-gray-900 text-left",children:e}),t("div",{className:"mt-1",children:t("input",{className:"block min-h-[2.25rem] w-full rounded-md border-0 py-1.5 pr-20 text-gray-900 ring-1 ring-inset placeholder:text-gray-400 focus:ring-2 focus:ring-inset text-base sm:text-sm sm:leading-6 ring-gray-300 focus:ring-primary-600",type:s,value:i,name:n,id:n,placeholder:a,onChange:v,onBlur:x,onFocus:k,ref:y})}),o&&t("p",{className:"my-2 text-sm text-red-600 text-left",children:o})]})}),ni=e=>{const n=s=>{s.preventDefault(),e.onSubmit()};return t(b,{children:[t("div",{className:"bg-[#EAF0FE] w-16 h-16 rounded-lg flex items-center justify-center mx-auto mb-10",children:t("img",{className:"w-10",src:ei})}),t("h1",{className:"text-3xl leading-9 font-bold text-gray-900 font-sans mb-3",children:"Confirm your employment"}),t("p",{className:"text-base leading-6 font-normal text-gray-500 mb-6",children:"Your employer has partnered with Flare to provide you access to exclusive benefits. Add your personal mobile number to verify your identity."}),t("form",{onSubmit:n,children:[t(ti,{type:"text",value:e.mobileNumber,label:"Australian Mobile Number",id:"mobile",placeholder:"04",setPlaceholderOnFocus:!0,onChange:e.onChange,error:e.errorMessage}),t(te,{className:"md:w-full md:text-base py-3 mt-10",type:"submit",disabled:!Pn(e.mobileNumber.replace(/\s/g,"")),children:"Continue"})]})]})},si="/benefits/app/assets/padlock-8c081120.svg",ai=e=>{const[n,s]=p(e),a=G(),r=ye(()=>{a.current&&clearInterval(a.current)},[]);h(()=>r,[r]);const i=ye(()=>{let c=e;a.current&&clearInterval(a.current),a.current=setInterval(()=>{if(c<0){a.current&&clearInterval(a.current);return}s(c--)},1e3)},[e]);return{countdown:n,restart:i}},ri=({value:e="",numInputs:n=6,onChange:s})=>{const[a,r]=p(0),i=G([]),c=()=>e?e.toString().split(""):[];h(()=>{i.current=i.current.slice(0,n)},[n]),h(()=>{var d;(d=i.current[0])==null||d.focus()},[]);const l=d=>d===""||!isNaN(Number(d)),m=d=>{const u=d.join("");s(u)},o=d=>{const u=c();u[a]=d[0]||"",m(u)},y=d=>{var S,I;const u=Math.max(Math.min(n-1,d),0);i.current[u]&&((S=i.current[u])==null||S.focus(),(I=i.current[u])==null||I.select(),r(u))},v=d=>{const{value:u}=d.target;l(u)&&(o(u),y(a+1))},x=d=>{const{value:u}=d.target;l(u)||u.length===n&&(u.split("").some(I=>!l(I))||(m(u.split("")),y(n-1)))},k=d=>u=>{r(u),d.target.select()},f=()=>{r(a-1)},w=d=>{const u=c();[d.code,d.key].includes("Backspace")?(d.preventDefault(),o(""),y(a-1)):d.code==="Delete"?(d.preventDefault(),o("")):d.code==="ArrowLeft"?(d.preventDefault(),y(a-1)):d.code==="ArrowRight"||d.key===u[a]?(d.preventDefault(),y(a+1)):(d.code==="Spacebar"||d.code==="Space"||d.code==="ArrowUp"||d.code==="ArrowDown")&&d.preventDefault()},B=d=>{d.preventDefault();const u=c();let S=a;const I=d.clipboardData.getData("text/plain").slice(0,n-a).split("");if(!I.some(D=>isNaN(Number(D)))){for(let D=0;D<n;++D)D>=a&&I.length>0&&(u[D]=I.shift()??"",S++);y(S),m(u)}};return t("div",{className:"inline-flex gap-2",children:Array.from({length:n},(d,u)=>u).map(d=>t(b,{children:t("input",{className:"border-gray-300 caret-transparent selection:bg-transparent rounded-lg col-span-1 text-center w-10 h-12 text-xl leading-7 font-normal",value:c()[d]??"",ref:u=>i.current[d]=u,onChange:v,onFocus:u=>k(u)(d),onBlur:f,onKeyDown:w,onPaste:B,autoComplete:"off",type:"text",inputMode:"numeric",onInput:x,"aria-label":"One Time Password"})},d))})},ii=e=>{const{countdown:n,restart:s}=ai(60);h(s,[s]);const a=c=>{c.preventDefault(),e.onSubmit()},r=()=>{s(),e.onResend()},i=Cn(e.mobileNumber);return t(b,{children:[t("div",{className:"bg-[#EAF0FE] w-16 h-16 rounded-lg flex items-center justify-center mx-auto mb-7",children:t("img",{className:"w-10",src:si})}),t("h1",{className:"text-3xl leading-9 font-bold text-gray-900 font-sans mb-3",children:"Verify your mobile number"}),i&&t("p",{className:"px-14 text-base leading-6 font-normal text-gray-500 mb-6",children:["An SMS verification code has been sent to the number"," ",t("span",{className:"whitespace-nowrap",children:i})]}),t("form",{onSubmit:a,children:[t(ri,{value:e.otp,numInputs:6,onChange:e.onChange}),t("p",{className:"mt-2 text-center text-xs text-gray-600 disabled:opacity-75 ",children:["Didn't get the code?",t("button",{type:"button",disabled:n!==0,className:"underline mx-2 text-primary disabled:text-gray-600 disabled:hover:bg-transparent disabled:cursor-text disabled:px-0",onClick:r,children:"Resend SMS"}),n!==0&&t(b,{children:["in ",n," secs"]})]}),t("p",{className:"my-2 text-sm text-red-600 text-center",children:e.errorMessage||""}),t(te,{className:"md:w-full md:text-base py-3 mt-7",type:"submit",disabled:!In(e.otp),children:"Continue"}),t(te,{className:"inline md:w-full md:text-base py-3 mt-4 bg-white !border-gray-300 !text-gray-600",onClick:e.onBack,children:[t(hs,{className:"inline-flex h-4 w-4 mr-2"}),"Back"]})]})]})},zt={source:"WebBenefits",channel:"web"},ci=e=>{const[n,s]=p("Loading"),[a,r]=p(),[i,c]=p(),[l,m]=p(),{service:o}=O();h(()=>{var w,B;(w=e.config)!=null&&w.isEstablished?s("Complete"):((B=e.config)==null?void 0:B.identityProvider)==="flare-app-identity"?(s("Signup"),o.trackRegistrationStartedAsync()):(s("Error"),o.trackRegistrationErrorViewedAsync("InitialConfigError"))},[]);const y=async()=>{if(r(""),i&&Pn(i.replace(/\s/g,"")))try{s("Loading"),m(void 0),await et.signUpAsync({mobileNumber:ir(i),...zt}),s("Verify"),o.trackRegistrationSubmittedAsync()}catch{s("Error"),o.trackRegistrationErrorViewedAsync("SignupError")}},v=async()=>{if(r(""),l&&In(l))try{s("Loading"),await et.verifyAsync({otp:l,...zt}),s("Complete"),o.trackRegistrationVerifiedAsync()}catch(w){s("Verify"),w instanceof Error&&w.message&&w.message!==Ln?(r(w.message),o.trackRegistrationFailedAsync(w.message)):(s("Error"),o.trackRegistrationFailedAsync("InternalError"),o.trackRegistrationErrorViewedAsync("VerificationError"))}},x=async()=>{r("");try{m(void 0),o.trackRegistrationResentAsync(),await et.resendAsync()}catch{s("Error"),o.trackRegistrationErrorViewedAsync("ResendError")}},k=()=>{e.onComplete(),o.trackRegistrationCompletedAsync()},f=()=>{e.onError(),o.trackRegistrationErrorDismissedAsync()};return t("div",{className:"min-h-[25rem]",children:[n==="Loading"&&t("div",{className:"flex items-center justify-center h-96 text-primary",children:[t("span",{className:"sr-only",children:"Loading"}),t(en,{size:10})]}),n==="Signup"&&t(ni,{onSubmit:y,onChange:w=>{c(w),r("")},mobileNumber:i||"",errorMessage:a}),n==="Verify"&&t(ii,{onSubmit:v,onBack:()=>s("Signup"),onResend:x,onChange:w=>{(!w||cr(w))&&m(w),r("")},mobileNumber:i,otp:l,errorMessage:a}),n==="Complete"&&t(Jr,{onComplete:k}),n==="Error"&&t(Zr,{onError:f})]})},li="/benefits/app/assets/welcome_image_mobile-dbde6c80.png",oi="/benefits/app/assets/welcome_image_v2-869c59e4.png",di=({hasNextStep:e,onClick:n})=>{const{service:s}=O();h(()=>{s.trackConsentStartedAsync()},[]);const a=()=>{s.trackConsentCompletedAsync(),n()},r=e?"Get started":"Start exploring your benefits";return t("div",{children:[t("div",{className:"min-h-[12rem] items-center hidden md:flex",children:t("img",{className:"mx-auto align-middle w-[30rem]",src:oi})}),t("div",{className:"min-h-[8rem] flex items-center md:hidden",children:t("img",{className:"mx-auto align-middle w-[30rem]",src:li})}),t("h1",{className:"text-3xl leading-9 font-bold text-gray-900 font-sans mb-3 mt-4",children:[t("span",{className:"w-full block",children:"Welcome to your"}),t("span",{className:"w-full block",children:"workplace benefits"})]}),t("p",{className:"text-base leading-6 font-normal text-gray-500 mb-6",children:"Get access to savings and perks from Australia’s most-loved brands, plus special offers to help you save on bigger expenses like household utilities, health insurance and more."}),t(te,{className:"md:w-full md:text-base py-3 mb-6 focus:outline-none",onClick:a,children:r}),t("p",{className:"text-xs leading-4 font-normal text-gray-500 mb-0",children:["By clicking “",r,"” you accept the"," ",t(ue,{className:"text-primary underline",href:"https://www.flarehr.com/flare-app-terms-and-conditions",children:"Terms & Conditions"})," ","and acknowledge and consent to your data being processed in accordance with Flare's"," ",t(ue,{className:"text-primary underline",href:"https://www.flarehr.com/privacy-policy",children:"Privacy Policy"}),"."]})]})},mi=({userProfile:e,isCategoryOpen:n})=>{var w;const[s,a]=p(!1),[r,i]=p(!1),[c,l]=p("Consent"),{treatments:m,isReady:o}=Ns({names:[ie.Consent,ie.CustomerRegistration]}),y=tt(()=>{var B;return s&&((B=e==null?void 0:e.workplaceLinkConfig)==null?void 0:B.isEstablished)===!1},[s,(w=e==null?void 0:e.workplaceLinkConfig)==null?void 0:w.isEstablished]),v=tt(()=>r&&((e==null?void 0:e.benefitsProfile.hasConsent)===!1||y)&&!n,[r,e==null?void 0:e.benefitsProfile.hasConsent,n,y]);h(()=>J.updateIsWelcomeModalOpen(v),[v]),h(()=>{(async()=>await se.setWorkplaceLinkConfig())()},[]),h(()=>{o&&(i(m[ie.Consent].treatment=="on"),a(m[ie.CustomerRegistration].treatment=="on"))},[o,m]);const x=()=>{e!=null&&e.benefitsProfile.hasConsent||se.saveUserConsent(),y&&l("WorkplaceLink")},k=()=>{Ve.lock(5e3),se.updateCustomerIdAsync(Ve.unlockAndFlushQueue),se.setIsEstablished()},f=()=>{se.setIsEstablished()};return t(b,{children:t(ft,{isOpen:v,fullWidthMobile:!0,onClose:()=>({}),children:t("div",{className:"p-8 md:p-16 text-center md:w-[35rem] w-screen",children:[c==="Consent"&&t(di,{onClick:x,hasNextStep:y}),c==="WorkplaceLink"&&t(ci,{onComplete:k,onError:f,config:e==null?void 0:e.workplaceLinkConfig})]})})})},Ie=({category:e})=>{const[n,s]=p();return h(()=>{const a=[H.signedInUser$.subscribe(r=>{R(r)?s(r.value):s(void 0)})];return()=>{a.map(r=>r.unsubscribe())}},[]),t(b,{children:[t(lt,{history:mt(ot()),children:[t(U,{path:"/",component:Pe}),t(U,{path:"/categories/:category",component:Pe}),t(U,{path:"/landing/:slug",component:Pe}),t(U,{path:"/wellbeing-hub/:subroute*",component:Hr}),t(U,{default:!0,component:Pe})]}),t(mi,{userProfile:n,isCategoryOpen:!!e})]})},Rn=e=>{analytics.identify(e.basicProfile.profileId,{profile:e.basicProfile.profileId,account:e.basicProfile.accountId,partner:e.basicProfile.partnerId,benefitsRole:e.benefitsProfile.role})},ui=e=>{const n=`${e.eventName} ${e.eventAction}`,s={...e};delete s.eventName,delete s.eventAction,analytics.track(n,s)},hi=e=>()=>{},_i={identifyUser:Rn,trackEvent:ui,handleTrackingOnClick:hi},pi=ps(()=>gs(()=>import("./index-a7a0ae69.js"),["assets/index-a7a0ae69.js","assets/vendor-68288830.js","assets/lodash-5d893f8c.js","assets/framer-motion-cbd82d4a.js","assets/date-fns-70f07e11.js","assets/oidc-client-6f6e47c2.js","assets/@splitsoftware-fa896d3c.js","assets/datadog-61404ce0.js"])),gi=()=>{const[e,n]=p({user:A}),[s,a]=p(!1),[r,i]=p(!1),[c,l]=p(),[m,o]=p({}),{service:y}=O();if(typeof window<"u"&&window.location.pathname.replace("/benefits/app","")!=="/")return window.location.pathname="/benefits/app/",null;h(()=>{(async()=>{if(await W.fetchConfigAsync(),Le.extractRedirectPath(),Le.extractMode(),Le.extractTrackingParameters(),z.tokenExists(window.location.search)){await z.signOut(),await z.initFromToken(window.location.pathname,window.location.search);return}i(!0)})();const x=[H.signedInUser$.subscribe(k=>{n({user:k}),R(k)&&Rn(k.value)}),rn.authState$.subscribe(async({authStatus:k,jwt:f})=>{R(f)&&k===j.Authenticated?(await z.refreshIfExpired(),M.setParameters(W.getConfig().apiBaseUrl,f.value),ee.setParameters(W.getConfig().apolloBaseUrl,f.value),Is.setParameters(W.getConfig().apiV2BaseUrl,f.value),se.extractProfileId(f.value),await se.loadSignedInUserProfileAsync(),a(k===j.Authenticated)):a(!1)})];return()=>{x.map(k=>k.unsubscribe())}},[]);const v=x=>{switch(x.url.replace(/^\/+/,"").split("/")[0]){case"":P.update({appView:"employee",navTab:"benefits"});break;case"admin":P.update({appView:"admin",navTab:"benefits"});break;case"wellbeing-hub":P.update({appView:"employee",navTab:"wellbeing"});break}};return h(()=>{if(r&&s){y.trackAppLoadedAsync();const x=H.getValue().deepLink;R(x)&&(y.trackDeepLinkOpenedAsync(x.value),P.update({deepLink:A}))}},[r,s]),h(()=>{if(r&&s&&R(e.user)){const x=e.user.value.basicProfile,f={core:{authorizationKey:W.getConfig().splitAuthorizationKey,key:x.profileId}},w={accountId:x.accountId,partnerId:x.partnerId};o(w),l(f)}},[r,s,e.user]),r?t("div",{id:"preact_root",className:"min-h-screen",children:t(As,{config:c,attributes:m,children:t(on.Provider,{value:s,children:t(le.Provider,{value:e.user,children:t(lt,{history:mt(ot()),onChange:v,children:[t(ge,{path:"/",component:Ie}),t(ge,{path:"/categories/:category",component:Ie}),t(ge,{path:"/landing/:slug",component:Ie}),t(ge,{path:"/wellbeing-hub/:subroute*",component:Ie}),t(ge,{path:"/admin/:subroute*",component:pi}),t(U,{path:"/oidc/:mode*",component:js}),t(U,{path:"/b2c/:fragment",component:Hs}),t(U,{path:"/workplace-link",component:Oe}),t(U,{path:"state=:fragment*",component:Oe}),t(U,{path:"/code*",component:Oe}),t(dn,{default:!0})]})})})})}):t(Ge,{})};typeof window<"u"&&(fs({storage:window.sessionStorage,key:"benefits-client-v2"}),bs(),ys.polyfill(),Ps());vs(t(ks,{children:t(ws,{fallback:dn,children:t(gi,{})})}),document.body);export{M as B,kn as D,dt as H,xr as I,en as L,ft as M,gt as P,Bt as U,O as a,Ue as b,K as c,le as d,Is as e,oe as f,Os as g,Js as h,Me as i,q as j,kr as k,Bi as l,_i as m,Oi as n,Ri as o,Ti as p,wr as q,Li as r,Ei as s,Si as t,Je as u,$ as v,ht as w,sn as x,tn as y,mt as z};
|