@frigade/react 2.4.11 → 2.4.13

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/dist/index.cjs CHANGED
@@ -3,18 +3,18 @@
3
3
  var react = require('@emotion/react');
4
4
  var U = require('@radix-ui/react-dialog');
5
5
  var jsxRuntime = require('@emotion/react/jsx-runtime');
6
- var mo = require('react');
6
+ var ho = require('react');
7
7
  var clsx = require('clsx');
8
- var Dr = require('known-css-properties');
9
- var $r = require('dompurify');
8
+ var Wr = require('known-css-properties');
9
+ var Ur = require('dompurify');
10
10
  var js = require('@frigade/js');
11
- var En = require('embla-carousel-react');
12
- var Pe = require('@radix-ui/react-collapsible');
11
+ var Mn = require('embla-carousel-react');
12
+ var we = require('@radix-ui/react-collapsible');
13
13
  var reactHookForm = require('react-hook-form');
14
- var Se = require('@radix-ui/react-radio-group');
15
- var A = require('@radix-ui/react-select');
16
- var qe = require('@radix-ui/react-checkbox');
17
- var Q = require('@radix-ui/react-popover');
14
+ var Te = require('@radix-ui/react-radio-group');
15
+ var L = require('@radix-ui/react-select');
16
+ var eo = require('@radix-ui/react-checkbox');
17
+ var oe = require('@radix-ui/react-popover');
18
18
 
19
19
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
20
20
 
@@ -37,25 +37,25 @@ function _interopNamespace(e) {
37
37
  }
38
38
 
39
39
  var U__namespace = /*#__PURE__*/_interopNamespace(U);
40
- var mo__namespace = /*#__PURE__*/_interopNamespace(mo);
41
- var Dr__default = /*#__PURE__*/_interopDefault(Dr);
42
- var $r__default = /*#__PURE__*/_interopDefault($r);
40
+ var ho__namespace = /*#__PURE__*/_interopNamespace(ho);
41
+ var Wr__default = /*#__PURE__*/_interopDefault(Wr);
42
+ var Ur__default = /*#__PURE__*/_interopDefault(Ur);
43
43
  var js__namespace = /*#__PURE__*/_interopNamespace(js);
44
- var En__default = /*#__PURE__*/_interopDefault(En);
45
- var Pe__namespace = /*#__PURE__*/_interopNamespace(Pe);
46
- var Se__namespace = /*#__PURE__*/_interopNamespace(Se);
47
- var A__namespace = /*#__PURE__*/_interopNamespace(A);
48
- var qe__namespace = /*#__PURE__*/_interopNamespace(qe);
49
- var Q__namespace = /*#__PURE__*/_interopNamespace(Q);
44
+ var Mn__default = /*#__PURE__*/_interopDefault(Mn);
45
+ var we__namespace = /*#__PURE__*/_interopNamespace(we);
46
+ var Te__namespace = /*#__PURE__*/_interopNamespace(Te);
47
+ var L__namespace = /*#__PURE__*/_interopNamespace(L);
48
+ var eo__namespace = /*#__PURE__*/_interopNamespace(eo);
49
+ var oe__namespace = /*#__PURE__*/_interopNamespace(oe);
50
50
 
51
- var Ao=Object.defineProperty,Fr=Object.defineProperties;var vr=Object.getOwnPropertyDescriptors;var Ne=Object.getOwnPropertySymbols;var Vo=Object.prototype.hasOwnProperty,$o=Object.prototype.propertyIsEnumerable;var Lo=(e,o,t)=>o in e?Ao(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,i=(e,o)=>{for(var t in o||(o={}))Vo.call(o,t)&&Lo(e,t,o[t]);if(Ne)for(var t of Ne(o))$o.call(o,t)&&Lo(e,t,o[t]);return e},l=(e,o)=>Fr(e,vr(o));var Tr=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(o,t)=>(typeof require!="undefined"?require:o)[t]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var f=(e,o)=>{var t={};for(var r in e)Vo.call(e,r)&&o.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&Ne)for(var r of Ne(e))o.indexOf(r)<0&&$o.call(e,r)&&(t[r]=e[r]);return t};var ee=(e,o)=>{for(var t in o)Ao(e,t,{get:o[t],enumerable:!0});};var W=(e,o,t)=>new Promise((r,n)=>{var a=c=>{try{p(t.next(c));}catch(m){n(m);}},s=c=>{try{p(t.throw(c));}catch(m){n(m);}},p=c=>c.done?r(c.value):Promise.resolve(c.value).then(a,s);p((t=t.apply(e,o)).next());});function xe(e){return jsxRuntime.jsx("svg",l(i({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"})}))}var zo={borderWidths:{md:"1px"}};var ze=[5,10,20,35,50,65,80,95,98],_o=[...ze],ao=[...ze];_o[4]=40;ao[4]=60;var Br={blue:{h:213,s:100,l:ze},gray:{h:220,s:10,l:ze},green:{h:141,s:90,l:_o},red:{h:9,s:90,l:ao},yellow:{h:50,s:90,l:ao}};var L={};for(let[e,{h:o,s:t,l:r}]of Object.entries(Br))L[e]=Object.fromEntries(r.map((n,a)=>[`${(a+1)*100}`,`hsl(${o} ${t}% ${n}%)`]));var Go=l(i({black:"hsl(0 0% 0%)",white:"hsl(0 0% 100%)"},L),{gray100:L.gray[100],gray200:L.gray[200],gray300:L.gray[300],gray400:L.gray[400],gray500:L.gray[500],gray600:L.gray[600],gray700:L.gray[700],gray800:L.gray[800],gray900:L.gray[900],blue400:L.blue[400],blue500:L.blue[500],blue800:L.blue[800],blue900:L.blue[900],green400:L.blue[400],green500:L.green[500],green800:L.green[800],red500:L.red[500],transparent:"#FFFFFF00",inherit:"inherit"});var Uo={md:"8px",lg:"20px",round:"50%"};var d=e=>`var(--fr-colors-${e})`,Ko={negative:{100:d("red-100"),200:d("red-200"),300:d("red-300"),400:d("red-400"),500:d("red-500"),600:d("red-600"),700:d("red-700"),800:d("red-800"),900:d("red-900"),background:d("negative-500"),border:d("negative-500"),foreground:d("white"),surface:d("negative-500"),active:{background:d("negative-400"),border:d("negative-400"),foreground:d("white"),surface:d("negative-400")},focus:{background:d("negative-500"),border:d("negative-500"),foreground:d("white"),surface:d("negative-500")},hover:{background:d("negative-400"),border:d("negative-400"),foreground:d("white"),surface:d("negative-400")}},neutral:{100:d("gray-100"),200:d("gray-200"),300:d("gray-300"),400:d("gray-400"),500:d("gray-500"),600:d("gray-600"),700:d("gray-700"),800:d("gray-800"),900:d("gray-900"),background:d("white"),border:d("neutral-800"),foreground:d("black"),surface:d("neutral-700"),active:{background:d("white"),border:d("neutral-900"),foreground:d("black"),surface:d("neutral-700")},focus:{background:d("white"),border:d("neutral-900"),foreground:d("black"),surface:d("neutral-700")},hover:{background:d("white"),border:d("neutral-900"),foreground:d("black"),surface:d("neutral-700")}},positive:{100:d("green-100"),200:d("green-200"),300:d("green-300"),400:d("green-400"),500:d("green-500"),600:d("green-600"),700:d("green-700"),800:d("green-800"),900:d("green-900"),background:d("positive-500"),border:d("positive-500"),foreground:d("white"),surface:d("positive-500"),active:{background:d("positive-400"),border:d("positive-400"),foreground:d("white"),surface:d("positive-400")},focus:{background:d("positive-500"),border:d("positive-500"),foreground:d("white"),surface:d("positive-500")},hover:{background:d("positive-400"),border:d("positive-400"),foreground:d("white"),surface:d("positive-400")}},primary:{100:d("blue-100"),200:d("blue-200"),300:d("blue-300"),400:d("blue-400"),500:d("blue-500"),600:d("blue-600"),700:d("blue-700"),800:d("blue-800"),900:d("blue-900"),background:d("primary-500"),border:d("primary-500"),foreground:d("white"),surface:d("primary-500"),active:{background:d("primary-400"),border:d("primary-400"),foreground:d("white"),surface:d("primary-400")},focus:{background:d("primary-500"),border:d("primary-500"),foreground:d("white"),surface:d("primary-500")},hover:{background:d("primary-400"),border:d("primary-400"),foreground:d("white"),surface:d("primary-400")}},secondary:{100:d("gray-100"),200:d("gray-200"),300:d("gray-300"),400:d("gray-400"),500:d("gray-500"),600:d("gray-600"),700:d("gray-700"),800:d("gray-800"),900:d("gray-900"),background:d("white"),border:d("secondary-800"),foreground:d("black"),surface:d("secondary-900"),active:{background:d("secondary-900"),border:d("secondary-800"),foreground:d("black"),surface:d("secondary-800")},focus:{background:d("secondary-900"),border:d("secondary-800"),foreground:d("black"),surface:d("secondary-900")},hover:{background:d("secondary-900"),border:d("secondary-800"),foreground:d("black"),surface:d("secondary-800")}}};var jo={md:"0px 4px 20px rgba(0, 0, 0, 0.1)"};var Rr="px",kr=e=>typeof e=="number"?`${4*e}${Rr}`:e,Er=[-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,-.5,0,.5,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,"auto"],Jo=Object.fromEntries(Er.map(e=>[e,kr(e)]));var Xo={fontFamilies:{default:"inherit"},fontSizes:{xs:"12px",sm:"14px",md:"16px",lg:"18px",xl:"20px","2xl":"24px","3xl":"30px","4xl":"36px","5xl":"48px"},fontWeights:{thin:"100",extralight:"200",light:"300",regular:"400",medium:"500",demibold:"600",bold:"700",extrabold:"800",black:"900"},letterSpacings:{md:"0.02em"},lineHeights:{xs:"18px",sm:"22px",md:"24px",lg:"26px",xl:"30px","2xl":"38px","3xl":"46px","4xl":"60px"}};var _e=l(i(l(i({},zo),{colors:i(i({},Go),Ko)}),Xo),{radii:Uo,shadows:jo,space:Jo});function ke(e,o="",t="."){return Object.keys(e).reduce((r,n)=>{let s=`${o.length?`${o}${t}`:""}${n}`,p=e[n];return typeof p=="object"&&p!==null&&!Array.isArray(p)?Object.assign(r,ke(p,s,t)):r[s]=p,r},{})}function so(e){let o=ke(e,"--fr","-");for(let[t,r]of Object.entries(o))if(t.indexOf(".")>-1){let n=t.replace(/\./g,"-");o[n]=r,delete o[t];}return o}function qo(e,o="--fr"){let t={};return Object.keys(e).forEach(r=>{let n=e[r],a=r.replace(/\./g,"-");typeof n=="object"&&n!==null&&!Array.isArray(n)?t[r]=qo(n,`${o}-${r}`):t[r]=`var(${o}-${a})`;}),t}var lo=so(_e),B=qo(_e);var Or=new Set(["alt","size","src"]),Ir=Dr__default.default.all.filter(e=>e.indexOf("-")!=0&&!Or.has(e)).map(e=>[e.replace(/-([a-z])/g,(o,t)=>t.toUpperCase()),null]),Hr=Object.fromEntries(Ir),Ge=ke(B.colors),Mr={color:Ge,backgroundColor:Ge,borderColor:Ge,border:i(i({},B.borderWidths),Ge),borderRadius:B.radii,borderWidth:B.borderWidths,boxShadow:B.shadows,fontFamily:B.fontFamilies,fontSize:B.fontSizes,fontWeight:B.fontWeights,gap:B.space,lineHeight:B.lineHeights,margin:B.space,marginBottom:B.space,marginLeft:B.space,marginRight:B.space,marginTop:B.space,padding:B.space,paddingBottom:B.space,paddingLeft:B.space,paddingRight:B.space,paddingTop:B.space},Zo=i(i({},Hr),Mr),Yo={bg:["backgroundColor"],m:["margin"],mt:["marginTop"],mr:["marginRight"],mb:["marginBottom"],ml:["marginLeft"],mx:["marginLeft","marginRight"],my:["marginTop","marginBottom"],p:["padding"],pt:["paddingTop"],pr:["paddingRight"],pb:["paddingBottom"],pl:["paddingLeft"],px:["paddingLeft","paddingRight"],py:["paddingTop","paddingBottom"]},Qo=new Set(["active","disabled","focus","focusVisible","focusWithin","hover"]);function Wr(e){return Array.isArray(e)?new Map(e.map(o=>[o,o])):typeof e=="object"&&e!==null?new Map(Object.entries(e)):typeof e=="string"||typeof e=="number"?new Map([[e,e]]):new Map}var et=new Map(Object.entries(Zo).map(([e,o])=>[e,Wr(o)])),Lr=new Map(Object.entries(Yo).map(([e,o])=>[e,new Set(o)])),Ar=new Set(["height","width"]),Vr=new Set(["canvas","embed","iframe","img","input","object","video"]);function ot(e){let[o,t]=e.split(":");return [o,Qo.has(t)?t:null]}function tt(e,o="div"){let t=Object.assign({},e),r={};function n(a){if(a==null)return r;let p=`&:${a.replace(/[A-Z]/g,c=>`-${c.toLocaleLowerCase()}`)}`;return r[p]==null&&(r[p]={}),r[p]}return Object.entries(t).forEach(([a,s])=>{let[p,c]=ot(a),m=Lr.get(p);m!=null&&(m.forEach(g=>{let b=`${g}${c?":"+c:""}`;t[b]=s;}),delete t[a]);}),Object.entries(t).forEach(([a,s])=>{let[p,c]=ot(a),m=et.get(p);if(m!=null){if(s==null)delete t[a];else if(typeof s=="string"&&s.indexOf(" ")>-1){let g=s.split(" ");n(c)[p]=g.map(b=>{var x;return (x=m.get(b.toString()))!=null?x:b}).join(" ");}else m.has(s.toString())?n(c)[p]=m.get(s.toString()):n(c)[p]=s;(typeof o!="string"||!Vr.has(o)||!Ar.has(p))&&delete t[a];}}),Object.keys(t).forEach(a=>{let s=a.substring(1);a.indexOf("_")===0&&et.has(s)&&(t[s]=t[a],delete t[a]);}),{cssFromProps:r,unmatchedProps:t}}function Nr(){if(typeof window=="undefined"){let{JSDOM:e}=Tr("jsdom");return new e("<!DOCTYPE html>").window}return window}function rt(e){return e?{__html:$r__default.default(Nr()).sanitize(e,{ALLOWED_TAGS:["b","strong","i","em","a","span","div","p","pre","s","u","br","img","code","li","ol","ul","table","tbody","thead","tr","td","th","h1","h2","h3","h4","video","p"],ALLOWED_ATTR:["style","class","target","id","href","alt","src","controls","autoplay","loop","muted","playsinline"]})}:{__html:""}}function _r(e){return e&&`fr-${e}`}function at(e){return e&&(Array.isArray(e)?e.filter(o=>o!=null).map(o=>at(o)).join(" "):_r(e))}function Gr(p,s){var c=p,{as:e,children:o,className:t,css:r={},part:n}=c,a=f(c,["as","children","className","css","part"]);let m=e!=null?e:"div",{cssFromProps:g,unmatchedProps:b}=tt(a,m),x=at(n),u=t||x?clsx.clsx(t,x):void 0,F=[{boxSizing:"border-box"},g,r];return typeof o=="string"?jsxRuntime.jsx(m,l(i({className:u,css:F},b),{ref:s,dangerouslySetInnerHTML:rt(o)})):jsxRuntime.jsx(m,l(i({className:u,css:F},b),{ref:s,children:o}))}var y=mo__namespace.forwardRef(Gr);var I={};ee(I,{Link:()=>Pn,Plain:()=>Cn,Primary:()=>hn,Secondary:()=>bn});var S={};ee(S,{Body1:()=>ln,Body2:()=>pn,Caption:()=>dn,Display1:()=>on,Display2:()=>tn,H1:()=>rn,H2:()=>nn,H3:()=>an,H4:()=>sn});var po={};ee(po,{Body1:()=>Zr,Body2:()=>Yr,Caption:()=>Qr,Display1:()=>Ur,Display2:()=>Kr,H1:()=>jr,H2:()=>Jr,H3:()=>Xr,H4:()=>qr});var oe={color:"neutral.foreground",fontFamily:"default",margin:"0"},Ur=l(i({},oe),{fontSize:"5xl",fontWeight:"bold",lineHeight:"4xl"}),Kr=l(i({},oe),{fontSize:"4xl",fontWeight:"bold",lineHeight:"3xl"}),jr=l(i({},oe),{fontSize:"3xl",fontWeight:"demibold",lineHeight:"2xl"}),Jr=l(i({},oe),{fontSize:"2xl",fontWeight:"demibold",lineHeight:"xl"}),Xr=l(i({},oe),{fontSize:"xl",fontWeight:"demibold",lineHeight:"lg"}),qr=l(i({},oe),{fontSize:"md",fontWeight:"demibold",lineHeight:"md"}),Zr=l(i({},oe),{fontSize:"md",fontWeight:"regular",lineHeight:"md"}),Yr=l(i({},oe),{fontSize:"sm",fontWeight:"regular",lineHeight:"sm"}),Qr=l(i({},oe),{fontSize:"xs",fontWeight:"regular",lineHeight:"xs"});var en=["Display1","Display2","H1","H2","H3","H4","Body1","Body2","Caption"],te=Object.fromEntries(en.map(e=>{let o=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():"span",t=mo__namespace.forwardRef((p,s)=>{var c=p,{as:r=o,children:n}=c,a=f(c,["as","children"]);return jsxRuntime.jsx(y,l(i(i({as:r},po[e]),a),{ref:s,children:n}))});return t.displayName=`Text.${e}`,[e,t]})),on=te.Display1,tn=te.Display2,rn=te.H1,nn=te.H2,an=te.H3,sn=te.H4,ln=te.Body1,pn=te.Body2,dn=te.Caption;var uo={};ee(uo,{Link:()=>gn,Plain:()=>yn,Primary:()=>mn,Secondary:()=>fn,loadingCSSStyle:()=>co});var Ue={borderWidth:"md",borderRadius:"md",borderStyle:"solid","cursor:disabled":"not-allowed",display:"flex",gap:"2",padding:"2 4",fontFamily:"inherit"},mn=l(i({},Ue),{backgroundColor:"primary.surface",borderColor:"primary.border",color:"primary.foreground","backgroundColor:disabled":"primary.surface","backgroundColor:hover":"primary.hover.surface","opacity:disabled":"0.6","pointerEvents:disabled":"none"}),fn=l(i({},Ue),{backgroundColor:"secondary.background",borderColor:"secondary.border",color:"secondary.foreground","backgroundColor:hover":"secondary.hover.background","backgroundColor:disabled":"secondary.background","opacity:disabled":"0.6"}),gn=l(i({},Ue),{backgroundColor:"transparent",borderColor:"transparent",color:"primary.surface","color:hover":"primary.hover.surface"}),yn=l(i({},Ue),{backgroundColor:"transparent",borderColor:"transparent",color:"neutral.foreground"}),xn=react.keyframes({from:{transform:"rotate(0turn)"},to:{transform:"rotate(1turn)"}}),co={position:"relative",color:"transparent","&:after":{content:'""',position:"absolute",width:"16px",height:"16px",top:0,left:0,right:0,bottom:0,margin:"auto",border:"4px solid transparent",borderTopColor:"var(--fr-colors-primary-foreground)",borderRadius:"50%",animation:xn+" 1s ease infinite"}};function Ke(s){var p=s,{as:e,children:o,part:t,title:r,variant:n="Primary"}=p,a=f(p,["as","children","part","title","variant"]);var m;let c=n.toLocaleLowerCase();return jsxRuntime.jsxs(y,l(i(l(i({as:e!=null?e:"button",part:[`button-${c}`,t]},uo[n]),{css:i(i({},(m=a.css)!=null?m:{}),a.loading?co:{})}),a),{loading:void 0,children:[o,r&&jsxRuntime.jsx(S.Body2,{color:"inherit",css:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},flexGrow:"1",fontWeight:"medium",lineHeight:"20px",part:"button-title",textWrap:"nowrap",children:r})]}))}function hn(t){var r=t,{children:e}=r,o=f(r,["children"]);return jsxRuntime.jsx(Ke,l(i({},o),{variant:"Primary",children:e}))}function bn(t){var r=t,{children:e}=r,o=f(r,["children"]);return jsxRuntime.jsx(Ke,l(i({},o),{variant:"Secondary",children:e}))}function Pn(t){var r=t,{children:e}=r,o=f(r,["children"]);return jsxRuntime.jsx(Ke,l(i({},o),{variant:"Link",children:e}))}function Cn(t){var r=t,{children:e}=r,o=f(r,["children"]);return jsxRuntime.jsx(Ke,l(i({},o),{variant:"Plain",children:e}))}var P={};ee(P,{Column:()=>Fn,Row:()=>wn});var wn=mo__namespace.forwardRef((e,o)=>jsxRuntime.jsx(y,l(i({display:"flex",flexDirection:"row"},e),{ref:o}))),Fn=mo__namespace.forwardRef((e,o)=>jsxRuntime.jsx(y,l(i({display:"flex",flexDirection:"column"},e),{ref:o})));function fo(n){var a=n,{dismissible:e,flowId:o,part:t}=a,r=f(a,["dismissible","flowId","part"]);return jsxRuntime.jsx(K,l(i({as:null,flowId:o},r),{children:({handleDismiss:s,handlePrimary:p,handleSecondary:c,parentProps:{containerProps:m},step:g})=>{var C,R,v,k,E;let b=(C=g.props)!=null?C:{},x=(v=(R=g.primaryButton)==null?void 0:R.title)!=null?v:g.primaryButtonTitle,u=(E=(k=g.secondaryButton)==null?void 0:k.title)!=null?E:g.secondaryButtonTitle,F=g.$state.blocked;return jsxRuntime.jsxs(h,l(i(i({alignItems:"center",borderWidth:"md",display:"flex",flexDirection:"row",gap:3,justifyContent:"flex-start",part:["banner",t]},m),b),{children:[g.imageUri&&jsxRuntime.jsx(y,{as:"img",part:"image",src:g.imageUri,style:{height:40,width:40,alignSelf:"center"}}),jsxRuntime.jsxs(P.Column,{marginInlineEnd:"auto",part:"banner-title-wrapper",children:[jsxRuntime.jsx(h.Title,{part:"title",children:g.title}),jsxRuntime.jsx(h.Subtitle,{part:"subtitle",children:g.subtitle})]}),jsxRuntime.jsx(h.Secondary,{disabled:F,title:u,onClick:c}),jsxRuntime.jsx(h.Primary,{disabled:F,title:x,onClick:p}),e&&jsxRuntime.jsx(h.Dismiss,{onClick:s})]}))}}))}var Xe={};ee(Xe,{Carousel:()=>Bt,Collapsible:()=>Je,CollapsibleStep:()=>Ie});var De={};ee(De,{Bar:()=>he,Dots:()=>ut,Segments:()=>ft});function he(r){var n=r,{current:e,total:o}=n,t=f(n,["current","total"]);let a=o>0?Math.min(e/o,1):0,s=a===0?"10px":`${100*a}%`;return jsxRuntime.jsx(y,l(i({part:"progress-bar",backgroundColor:"blue800",borderRadius:"md",height:"10px"},t),{children:jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"progress-bar-fill",borderRadius:"md",height:"100%",style:{width:s},transition:"width 300ms ease-out"})}))}function ut(r){var n=r,{current:e,total:o}=n,t=f(n,["current","total"]);if(o==1)return null;let a=[...Array(o)].map((s,p)=>jsxRuntime.jsx(y,{as:"circle",r:4,cx:4+16*p,cy:"4px",fill:e-1===p?B.colors.blue500:B.colors.blue800},p));return jsxRuntime.jsx(y,l(i({as:"svg",height:"8px",part:"progress-dots",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8},t),{children:a}))}function ft(r){var n=r,{current:e,total:o}=n,t=f(n,["current","total"]);let a=[...Array(o)].map((s,p)=>jsxRuntime.jsx(y,{backgroundColor:e-1===p?"primary.surface":"blue800",borderRadius:"md",flexGrow:1,height:"100%"},p));return jsxRuntime.jsx(P.Row,l(i({gap:1,height:"10px",part:"progress-segments"},t),{children:a}))}function yt(e){return jsxRuntime.jsx("svg",l(i({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:"size-4"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}))}function vn(){return jsxRuntime.jsx(y,{as:"svg",color:"primary.foreground",fill:"none",height:"8px",part:"check-icon",viewBox:"0 0 10 8",width:"10px",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function xt(t){var r=t,{checked:e=!1}=r,o=f(r,["checked"]);return jsxRuntime.jsx(y,l(i({backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"check-indicator",position:"relative",height:"22px",width:"22px"},o),{children:e&&jsxRuntime.jsx(y,{alignItems:"center",bg:"green500",borderWidth:"md",borderStyle:"solid",borderColor:"green500",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"check-indicator-checked",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsxRuntime.jsx(vn,{})})}))}function re(e,{onPrimary:o,onSecondary:t}={}){let{navigate:r}=mo.useContext(H),n={"flow.back":()=>e.flow.back(),"flow.complete":()=>e.flow.complete(),"flow.forward":()=>e.flow.forward(),"flow.restart":()=>e.flow.restart(),"flow.skip":()=>e.flow.skip(),"flow.start":()=>e.flow.start(),"step.complete":()=>e.complete(),"step.skip":()=>e.skip(),"step.reset":()=>e.reset(),"step.start":()=>e.start()};return {handlePrimary:mo.useCallback((a,s,p=!0)=>W(this,null,function*(){if((yield o==null?void 0:o(e,a,s))===!1)return a.preventDefault(),!1;if(e.primaryButton!=null){let m=e.primaryButton.action===!1?!1:n[e.primaryButton.action];typeof m=="function"?m():m!==!1&&(yield e.complete(s,p)),e.primaryButton.uri!=null&&r(e.primaryButton.uri,e.primaryButton.target);}else yield e.complete(s,p),e.primaryButtonUri!=null&&r(e.primaryButtonUri,e.primaryButtonUriTarget);return !0}),[e]),handleSecondary:mo.useCallback((a,s)=>W(this,null,function*(){if((yield t==null?void 0:t(e,a,s))===!1)return a.preventDefault(),!1;if(e.secondaryButton!=null){let c=e.secondaryButton.action===!1?!1:n[e.secondaryButton.action];typeof c=="function"?c():c!==!1&&e.complete(s),e.secondaryButton.uri!=null&&r(e.secondaryButton.uri,e.secondaryButton.target);}else e.complete(s),e.secondaryButtonUri!=null&&r(e.secondaryButtonUri,e.secondaryButtonUriTarget);return !0}),[e])}}function bt({onPrimary:e,onSecondary:o,step:t}){var m,g;let{handlePrimary:r,handleSecondary:n}=re(t,{onPrimary:e,onSecondary:o}),{blocked:a,completed:s,skipped:p}=t.$state,c=s||p||!a?jsxRuntime.jsx(xt,{checked:s||p,marginLeft:"auto"}):jsxRuntime.jsx(y,{as:yt,height:"22px",marginLeft:"auto",width:"22px"});return jsxRuntime.jsxs(h,{borderWidth:1,containerType:"inline-size",css:{"@container (max-width: 600px)":{flexBasis:"85%"},"@container (min-width: 601px) and (max-width: 900px)":{flexBasis:"45%"},"@container (min-width: 1200px)":{flexBasis:"25%"}},flex:"0 0 30%",gap:"2",p:"4",part:"carousel-step",userSelect:"none",disabled:a,opacity:a?.5:1,children:[jsxRuntime.jsxs(P.Row,{marginBottom:"2",part:"carousel-step-header",children:[t.iconUri&&jsxRuntime.jsx(h.Media,{borderRadius:"0",height:"24px",src:t.iconUri,width:"24px"}),c]}),jsxRuntime.jsx(h.Title,{children:t.title}),jsxRuntime.jsx(h.Subtitle,{children:t.subtitle}),jsxRuntime.jsxs(P.Row,{css:{"@container (max-width: 200px)":{"& > button":{flexBasis:"50%",flexGrow:1},flexDirection:"column-reverse"}},gap:"2",marginTop:"auto",paddingTop:"3",part:"carousel-step-footer",children:[jsxRuntime.jsx(h.Secondary,{disabled:a,onClick:n,title:(m=t.secondaryButton)==null?void 0:m.title}),jsxRuntime.jsx(h.Primary,{disabled:a,onClick:r,title:(g=t.primaryButton)==null?void 0:g.title})]})]})}function Ct(e){return jsxRuntime.jsx("svg",l(i({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M3 10a.75.75 0 0 1 .75-.75h10.638L10.23 5.29a.75.75 0 1 1 1.04-1.08l5.5 5.25a.75.75 0 0 1 0 1.08l-5.5 5.25a.75.75 0 1 1-1.04-1.08l4.158-3.96H3.75A.75.75 0 0 1 3 10Z",clipRule:"evenodd"})}))}function wt(e){return jsxRuntime.jsx("svg",l(i({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M17 10a.75.75 0 0 1-.75.75H5.612l4.158 3.96a.75.75 0 1 1-1.04 1.08l-5.5-5.25a.75.75 0 0 1 0-1.08l5.5-5.25a.75.75 0 1 1 1.04 1.08L5.612 9.25H16.25A.75.75 0 0 1 17 10Z",clipRule:"evenodd"})}))}var Ft=react.keyframes`
51
+ var zo=Object.defineProperty,kr=Object.defineProperties;var Er=Object.getOwnPropertyDescriptors;var Ge=Object.getOwnPropertySymbols;var _o=Object.prototype.hasOwnProperty,Go=Object.prototype.propertyIsEnumerable;var No=(e,o,t)=>o in e?zo(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,i=(e,o)=>{for(var t in o||(o={}))_o.call(o,t)&&No(e,t,o[t]);if(Ge)for(var t of Ge(o))Go.call(o,t)&&No(e,t,o[t]);return e},l=(e,o)=>kr(e,Er(o));var Dr=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(o,t)=>(typeof require!="undefined"?require:o)[t]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var f=(e,o)=>{var t={};for(var n in e)_o.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&Ge)for(var n of Ge(e))o.indexOf(n)<0&&Go.call(e,n)&&(t[n]=e[n]);return t};var te=(e,o)=>{for(var t in o)zo(e,t,{get:o[t],enumerable:!0});};var W=(e,o,t)=>new Promise((n,r)=>{var a=c=>{try{p(t.next(c));}catch(u){r(u);}},s=c=>{try{p(t.throw(c));}catch(u){r(u);}},p=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,s);p((t=t.apply(e,o)).next());});function Pe(e){return jsxRuntime.jsx("svg",l(i({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"})}))}var Ko={borderWidths:{md:"1px"}};var Ue=[5,10,20,35,50,65,80,95,98],jo=[...Ue],uo=[...Ue];jo[4]=40;uo[4]=60;var Or={blue:{h:213,s:100,l:Ue},gray:{h:220,s:10,l:Ue},green:{h:141,s:90,l:jo},red:{h:9,s:90,l:uo},yellow:{h:50,s:90,l:uo}};var A={};for(let[e,{h:o,s:t,l:n}]of Object.entries(Or))A[e]=Object.fromEntries(n.map((r,a)=>[`${(a+1)*100}`,`hsl(${o} ${t}% ${r}%)`]));var Jo=l(i({black:"hsl(0 0% 0%)",white:"hsl(0 0% 100%)"},A),{gray100:A.gray[100],gray200:A.gray[200],gray300:A.gray[300],gray400:A.gray[400],gray500:A.gray[500],gray600:A.gray[600],gray700:A.gray[700],gray800:A.gray[800],gray900:A.gray[900],blue400:A.blue[400],blue500:A.blue[500],blue800:A.blue[800],blue900:A.blue[900],green400:A.blue[400],green500:A.green[500],green800:A.green[800],red500:A.red[500],transparent:"#FFFFFF00",inherit:"inherit"});var Xo={md:"8px",lg:"20px",round:"50%"};var d=e=>`var(--fr-colors-${e})`,qo={negative:{100:d("red-100"),200:d("red-200"),300:d("red-300"),400:d("red-400"),500:d("red-500"),600:d("red-600"),700:d("red-700"),800:d("red-800"),900:d("red-900"),background:d("negative-500"),border:d("negative-500"),foreground:d("white"),surface:d("negative-500"),active:{background:d("negative-400"),border:d("negative-400"),foreground:d("white"),surface:d("negative-400")},focus:{background:d("negative-500"),border:d("negative-500"),foreground:d("white"),surface:d("negative-500")},hover:{background:d("negative-400"),border:d("negative-400"),foreground:d("white"),surface:d("negative-400")}},neutral:{100:d("gray-100"),200:d("gray-200"),300:d("gray-300"),400:d("gray-400"),500:d("gray-500"),600:d("gray-600"),700:d("gray-700"),800:d("gray-800"),900:d("gray-900"),background:d("white"),border:d("neutral-800"),foreground:d("black"),surface:d("neutral-700"),active:{background:d("white"),border:d("neutral-900"),foreground:d("black"),surface:d("neutral-700")},focus:{background:d("white"),border:d("neutral-900"),foreground:d("black"),surface:d("neutral-700")},hover:{background:d("white"),border:d("neutral-900"),foreground:d("black"),surface:d("neutral-700")}},positive:{100:d("green-100"),200:d("green-200"),300:d("green-300"),400:d("green-400"),500:d("green-500"),600:d("green-600"),700:d("green-700"),800:d("green-800"),900:d("green-900"),background:d("positive-500"),border:d("positive-500"),foreground:d("white"),surface:d("positive-500"),active:{background:d("positive-400"),border:d("positive-400"),foreground:d("white"),surface:d("positive-400")},focus:{background:d("positive-500"),border:d("positive-500"),foreground:d("white"),surface:d("positive-500")},hover:{background:d("positive-400"),border:d("positive-400"),foreground:d("white"),surface:d("positive-400")}},primary:{100:d("blue-100"),200:d("blue-200"),300:d("blue-300"),400:d("blue-400"),500:d("blue-500"),600:d("blue-600"),700:d("blue-700"),800:d("blue-800"),900:d("blue-900"),background:d("primary-500"),border:d("primary-500"),foreground:d("white"),surface:d("primary-500"),active:{background:d("primary-400"),border:d("primary-400"),foreground:d("white"),surface:d("primary-400")},focus:{background:d("primary-500"),border:d("primary-500"),foreground:d("white"),surface:d("primary-500")},hover:{background:d("primary-400"),border:d("primary-400"),foreground:d("white"),surface:d("primary-400")}},secondary:{100:d("gray-100"),200:d("gray-200"),300:d("gray-300"),400:d("gray-400"),500:d("gray-500"),600:d("gray-600"),700:d("gray-700"),800:d("gray-800"),900:d("gray-900"),background:d("white"),border:d("secondary-800"),foreground:d("black"),surface:d("secondary-900"),active:{background:d("secondary-900"),border:d("secondary-800"),foreground:d("black"),surface:d("secondary-800")},focus:{background:d("secondary-900"),border:d("secondary-800"),foreground:d("black"),surface:d("secondary-900")},hover:{background:d("secondary-900"),border:d("secondary-800"),foreground:d("black"),surface:d("secondary-800")}}};var Zo={md:"0px 4px 20px rgba(0, 0, 0, 0.1)"};var Ir="px",Hr=e=>typeof e=="number"?`${4*e}${Ir}`:e,Mr=[-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,-.5,0,.5,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,"auto"],Yo=Object.fromEntries(Mr.map(e=>[e,Hr(e)]));var Qo={fontFamilies:{default:"inherit"},fontSizes:{xs:"12px",sm:"14px",md:"16px",lg:"18px",xl:"20px","2xl":"24px","3xl":"30px","4xl":"36px","5xl":"48px"},fontWeights:{thin:"100",extralight:"200",light:"300",regular:"400",medium:"500",demibold:"600",bold:"700",extrabold:"800",black:"900"},letterSpacings:{md:"0.02em"},lineHeights:{xs:"18px",sm:"22px",md:"24px",lg:"26px",xl:"30px","2xl":"38px","3xl":"46px","4xl":"60px"}};var Ke=l(i(l(i({},Ko),{colors:i(i({},Jo),qo)}),Qo),{radii:Xo,shadows:Zo,space:Yo});function Oe(e,o="",t="."){return Object.keys(e).reduce((n,r)=>{let s=`${o.length?`${o}${t}`:""}${r}`,p=e[r];return typeof p=="object"&&p!==null&&!Array.isArray(p)?Object.assign(n,Oe(p,s,t)):n[s]=p,n},{})}function mo(e){let o=Oe(e,"--fr","-");for(let[t,n]of Object.entries(o))if(t.indexOf(".")>-1){let r=t.replace(/\./g,"-");o[r]=n,delete o[t];}return o}function et(e,o="--fr"){let t={};return Object.keys(e).forEach(n=>{let r=e[n],a=n.replace(/\./g,"-");typeof r=="object"&&r!==null&&!Array.isArray(r)?t[n]=et(r,`${o}-${n}`):t[n]=`var(${o}-${a})`;}),t}var fo=mo(Ke),R=et(Ke);var Ar=new Set(["alt","size","src"]),Lr=Wr__default.default.all.filter(e=>e.indexOf("-")!=0&&!Ar.has(e)).map(e=>[e.replace(/-([a-z])/g,(o,t)=>t.toUpperCase()),null]),Vr=Object.fromEntries(Lr),je=Oe(R.colors),$r={color:je,backgroundColor:je,borderColor:je,border:i(i({},R.borderWidths),je),borderRadius:R.radii,borderWidth:R.borderWidths,boxShadow:R.shadows,fontFamily:R.fontFamilies,fontSize:R.fontSizes,fontWeight:R.fontWeights,gap:R.space,lineHeight:R.lineHeights,margin:R.space,marginBottom:R.space,marginLeft:R.space,marginRight:R.space,marginTop:R.space,padding:R.space,paddingBottom:R.space,paddingLeft:R.space,paddingRight:R.space,paddingTop:R.space},ot=i(i({},Vr),$r),tt={bg:["backgroundColor"],m:["margin"],mt:["marginTop"],mr:["marginRight"],mb:["marginBottom"],ml:["marginLeft"],mx:["marginLeft","marginRight"],my:["marginTop","marginBottom"],p:["padding"],pt:["paddingTop"],pr:["paddingRight"],pb:["paddingBottom"],pl:["paddingLeft"],px:["paddingLeft","paddingRight"],py:["paddingTop","paddingBottom"]},rt=new Set(["active","disabled","focus","focusVisible","focusWithin","hover"]);function Nr(e){return Array.isArray(e)?new Map(e.map(o=>[o,o])):typeof e=="object"&&e!==null?new Map(Object.entries(e)):typeof e=="string"||typeof e=="number"?new Map([[e,e]]):new Map}var nt=new Map(Object.entries(ot).map(([e,o])=>[e,Nr(o)])),zr=new Map(Object.entries(tt).map(([e,o])=>[e,new Set(o)])),_r=new Set(["height","width"]),Gr=new Set(["canvas","embed","iframe","img","input","object","video"]);function it(e){let[o,t]=e.split(":");return [o,rt.has(t)?t:null]}function at(e,o="div"){let t=Object.assign({},e),n={};function r(a){if(a==null)return n;let p=`&:${a.replace(/[A-Z]/g,c=>`-${c.toLocaleLowerCase()}`)}`;return n[p]==null&&(n[p]={}),n[p]}return Object.entries(t).forEach(([a,s])=>{let[p,c]=it(a),u=zr.get(p);u!=null&&(u.forEach(y=>{let b=`${y}${c?":"+c:""}`;t[b]=s;}),delete t[a]);}),Object.entries(t).forEach(([a,s])=>{let[p,c]=it(a),u=nt.get(p);if(u!=null){if(s==null)delete t[a];else if(typeof s=="string"&&s.indexOf(" ")>-1){let y=s.split(" ");r(c)[p]=y.map(b=>{var x;return (x=u.get(b.toString()))!=null?x:b}).join(" ");}else u.has(s.toString())?r(c)[p]=u.get(s.toString()):r(c)[p]=s;(typeof o!="string"||!Gr.has(o)||!_r.has(p))&&delete t[a];}}),Object.keys(t).forEach(a=>{let s=a.substring(1);a.indexOf("_")===0&&nt.has(s)&&(t[s]=t[a],delete t[a]);}),{cssFromProps:n,unmatchedProps:t}}function Kr(){if(typeof window=="undefined"){let{JSDOM:e}=Dr("jsdom");return new e("<!DOCTYPE html>").window}return window}function st(e){return e?{__html:Ur__default.default(Kr()).sanitize(e,{ALLOWED_TAGS:["b","strong","i","em","a","span","div","p","pre","s","u","br","img","code","li","ol","ul","table","tbody","thead","tr","td","th","h1","h2","h3","h4","video","p"],ALLOWED_ATTR:["style","class","target","id","href","alt","src","controls","autoplay","loop","muted","playsinline"]})}:{__html:""}}function Jr(e){return e&&`fr-${e}`}function dt(e){return e&&(Array.isArray(e)?e.filter(o=>o!=null).map(o=>dt(o)).join(" "):Jr(e))}function Xr(p,s){var c=p,{as:e,children:o,className:t,css:n={},part:r}=c,a=f(c,["as","children","className","css","part"]);let u=e!=null?e:"div",{cssFromProps:y,unmatchedProps:b}=at(a,u),x=dt(r),m=t||x?clsx.clsx(t,x):void 0,F=[{boxSizing:"border-box"},y,n];return typeof o=="string"?jsxRuntime.jsx(u,l(i({className:m,css:F},b),{ref:s,dangerouslySetInnerHTML:st(o)})):jsxRuntime.jsx(u,l(i({className:m,css:F},b),{ref:s,children:o}))}var g=ho__namespace.forwardRef(Xr);var I={};te(I,{Link:()=>vn,Plain:()=>Tn,Primary:()=>wn,Secondary:()=>Fn});var C={};te(C,{Body1:()=>mn,Body2:()=>fn,Caption:()=>gn,Display1:()=>sn,Display2:()=>ln,H1:()=>pn,H2:()=>dn,H3:()=>cn,H4:()=>un});var go={};te(go,{Body1:()=>tn,Body2:()=>rn,Caption:()=>nn,Display1:()=>qr,Display2:()=>Zr,H1:()=>Yr,H2:()=>Qr,H3:()=>en,H4:()=>on});var re={color:"neutral.foreground",fontFamily:"default",margin:"0"},qr=l(i({},re),{fontSize:"5xl",fontWeight:"bold",lineHeight:"4xl"}),Zr=l(i({},re),{fontSize:"4xl",fontWeight:"bold",lineHeight:"3xl"}),Yr=l(i({},re),{fontSize:"3xl",fontWeight:"demibold",lineHeight:"2xl"}),Qr=l(i({},re),{fontSize:"2xl",fontWeight:"demibold",lineHeight:"xl"}),en=l(i({},re),{fontSize:"xl",fontWeight:"demibold",lineHeight:"lg"}),on=l(i({},re),{fontSize:"md",fontWeight:"demibold",lineHeight:"md"}),tn=l(i({},re),{fontSize:"md",fontWeight:"regular",lineHeight:"md"}),rn=l(i({},re),{fontSize:"sm",fontWeight:"regular",lineHeight:"sm"}),nn=l(i({},re),{fontSize:"xs",fontWeight:"regular",lineHeight:"xs"});var an=["Display1","Display2","H1","H2","H3","H4","Body1","Body2","Caption"],ne=Object.fromEntries(an.map(e=>{let o=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():"span",t=ho__namespace.forwardRef((p,s)=>{var c=p,{as:n=o,children:r}=c,a=f(c,["as","children"]);return jsxRuntime.jsx(g,l(i(i({as:n},go[e]),a),{ref:s,children:r}))});return t.displayName=`Text.${e}`,[e,t]})),sn=ne.Display1,ln=ne.Display2,pn=ne.H1,dn=ne.H2,cn=ne.H3,un=ne.H4,mn=ne.Body1,fn=ne.Body2,gn=ne.Caption;var xo={};te(xo,{Link:()=>Pn,Plain:()=>Cn,Primary:()=>hn,Secondary:()=>bn,loadingCSSStyle:()=>yo});var Je={borderWidth:"md",borderRadius:"md",borderStyle:"solid","cursor:disabled":"not-allowed",display:"flex",gap:"2",padding:"2 4",fontFamily:"inherit"},hn=l(i({},Je),{backgroundColor:"primary.surface",borderColor:"primary.border",color:"primary.foreground","backgroundColor:disabled":"primary.surface","backgroundColor:hover":"primary.hover.surface","opacity:disabled":"0.6","pointerEvents:disabled":"none"}),bn=l(i({},Je),{backgroundColor:"secondary.background",borderColor:"secondary.border",color:"secondary.foreground","backgroundColor:hover":"secondary.hover.background","backgroundColor:disabled":"secondary.background","opacity:disabled":"0.6"}),Pn=l(i({},Je),{backgroundColor:"transparent",borderColor:"transparent",color:"primary.surface","color:hover":"primary.hover.surface"}),Cn=l(i({},Je),{backgroundColor:"transparent",borderColor:"transparent",color:"neutral.foreground"}),Sn=react.keyframes({from:{transform:"rotate(0turn)"},to:{transform:"rotate(1turn)"}}),yo={position:"relative",color:"transparent","&:after":{content:'""',position:"absolute",width:"16px",height:"16px",top:0,left:0,right:0,bottom:0,margin:"auto",border:"4px solid transparent",borderTopColor:"var(--fr-colors-primary-foreground)",borderRadius:"50%",animation:Sn+" 1s ease infinite"}};function Xe(s){var p=s,{as:e,children:o,part:t,title:n,variant:r="Primary"}=p,a=f(p,["as","children","part","title","variant"]);var u;let c=r.toLocaleLowerCase();return jsxRuntime.jsxs(g,l(i(l(i({as:e!=null?e:"button",part:[`button-${c}`,t]},xo[r]),{css:i(i({},(u=a.css)!=null?u:{}),a.loading?yo:{})}),a),{loading:void 0,children:[o,n&&jsxRuntime.jsx(C.Body2,{color:"inherit",css:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},flexGrow:"1",fontWeight:"medium",lineHeight:"20px",part:"button-title",textWrap:"nowrap",children:n})]}))}function wn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(Xe,l(i({},o),{variant:"Primary",children:e}))}function Fn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(Xe,l(i({},o),{variant:"Secondary",children:e}))}function vn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(Xe,l(i({},o),{variant:"Link",children:e}))}function Tn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(Xe,l(i({},o),{variant:"Plain",children:e}))}var P={};te(P,{Column:()=>kn,Row:()=>Rn});var Rn=ho__namespace.forwardRef((e,o)=>jsxRuntime.jsx(g,l(i({display:"flex",flexDirection:"row"},e),{ref:o}))),kn=ho__namespace.forwardRef((e,o)=>jsxRuntime.jsx(g,l(i({display:"flex",flexDirection:"column"},e),{ref:o})));function bo(r){var a=r,{dismissible:e,flowId:o,part:t}=a,n=f(a,["dismissible","flowId","part"]);return jsxRuntime.jsx(j,l(i({as:null,flowId:o},n),{children:({handleDismiss:s,handlePrimary:p,handleSecondary:c,parentProps:{containerProps:u},step:y})=>{var S,B,v,k,E;let b=(S=y.props)!=null?S:{},x=(v=(B=y.primaryButton)==null?void 0:B.title)!=null?v:y.primaryButtonTitle,m=(E=(k=y.secondaryButton)==null?void 0:k.title)!=null?E:y.secondaryButtonTitle,F=y.$state.blocked;return jsxRuntime.jsxs(h,l(i(i({alignItems:"center",borderWidth:"md",display:"flex",flexDirection:"row",gap:3,justifyContent:"flex-start",part:["banner",t]},u),b),{children:[y.imageUri&&jsxRuntime.jsx(g,{as:"img",part:"image",src:y.imageUri,style:{height:40,width:40,alignSelf:"center"}}),jsxRuntime.jsxs(P.Column,{marginInlineEnd:"auto",part:"banner-title-wrapper",children:[jsxRuntime.jsx(h.Title,{part:"title",children:y.title}),jsxRuntime.jsx(h.Subtitle,{part:"subtitle",children:y.subtitle})]}),jsxRuntime.jsx(h.Secondary,{disabled:F,title:m,onClick:c}),jsxRuntime.jsx(h.Primary,{disabled:F,title:x,onClick:p}),e&&jsxRuntime.jsx(h.Dismiss,{onClick:s})]}))}}))}var Ye={};te(Ye,{Carousel:()=>Dt,Collapsible:()=>Ze,CollapsibleStep:()=>We});var He={};te(He,{Bar:()=>Ce,Dots:()=>yt,Segments:()=>ht});function Ce(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);let a=o>0?Math.min(e/o,1):0,s=a===0?"10px":`${100*a}%`;return jsxRuntime.jsx(g,l(i({part:"progress-bar",backgroundColor:"blue800",borderRadius:"md",height:"10px"},t),{children:jsxRuntime.jsx(g,{backgroundColor:"primary.surface",part:"progress-bar-fill",borderRadius:"md",height:"100%",style:{width:s},transition:"width 300ms ease-out"})}))}function yt(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);if(o==1)return null;let a=[...Array(o)].map((s,p)=>jsxRuntime.jsx(g,{as:"circle",r:4,cx:4+16*p,cy:"4px",fill:e-1===p?R.colors.blue500:R.colors.blue800},p));return jsxRuntime.jsx(g,l(i({as:"svg",height:"8px",part:"progress-dots",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8},t),{children:a}))}function ht(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);let a=[...Array(o)].map((s,p)=>jsxRuntime.jsx(g,{backgroundColor:e-1===p?"primary.surface":"blue800",borderRadius:"md",flexGrow:1,height:"100%"},p));return jsxRuntime.jsx(P.Row,l(i({gap:1,height:"10px",part:"progress-segments"},t),{children:a}))}function Pt(e){return jsxRuntime.jsx("svg",l(i({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:"size-4"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}))}function En(){return jsxRuntime.jsx(g,{as:"svg",color:"primary.foreground",fill:"none",height:"8px",part:"check-icon",viewBox:"0 0 10 8",width:"10px",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ct(t){var n=t,{checked:e=!1}=n,o=f(n,["checked"]);return jsxRuntime.jsx(g,l(i({backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"check-indicator",position:"relative",height:"22px",width:"22px"},o),{children:e&&jsxRuntime.jsx(g,{alignItems:"center",bg:"green500",borderWidth:"md",borderStyle:"solid",borderColor:"green500",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"check-indicator-checked",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsxRuntime.jsx(En,{})})}))}function ie(e,{onPrimary:o,onSecondary:t}={}){let{navigate:n}=ho.useContext(H),r={"flow.back":()=>e.flow.back(),"flow.complete":()=>e.flow.complete(),"flow.forward":()=>e.flow.forward(),"flow.restart":()=>e.flow.restart(),"flow.skip":()=>e.flow.skip(),"flow.start":()=>e.flow.start(),"step.complete":()=>e.complete(),"step.skip":()=>e.skip(),"step.reset":()=>e.reset(),"step.start":()=>e.start()};return {handlePrimary:ho.useCallback((a,s,p=!0)=>W(this,null,function*(){if((yield o==null?void 0:o(e,a,s))===!1)return a.preventDefault(),!1;if(e.primaryButton!=null){let u=e.primaryButton.action===!1?!1:r[e.primaryButton.action];typeof u=="function"?u():u!==!1&&(yield e.complete(s,p)),e.primaryButton.uri!=null&&n(e.primaryButton.uri,e.primaryButton.target);}else yield e.complete(s,p),e.primaryButtonUri!=null&&n(e.primaryButtonUri,e.primaryButtonUriTarget);return !0}),[e]),handleSecondary:ho.useCallback((a,s)=>W(this,null,function*(){if((yield t==null?void 0:t(e,a,s))===!1)return a.preventDefault(),!1;if(e.secondaryButton!=null){let c=e.secondaryButton.action===!1?!1:r[e.secondaryButton.action];typeof c=="function"?c():c!==!1&&e.complete(s),e.secondaryButton.uri!=null&&n(e.secondaryButton.uri,e.secondaryButton.target);}else e.complete(s),e.secondaryButtonUri!=null&&n(e.secondaryButtonUri,e.secondaryButtonUriTarget);return !0}),[e])}}function wt({onPrimary:e,onSecondary:o,step:t}){var u,y;let{handlePrimary:n,handleSecondary:r}=ie(t,{onPrimary:e,onSecondary:o}),{blocked:a,completed:s,skipped:p}=t.$state,c=s||p||!a?jsxRuntime.jsx(Ct,{checked:s||p,marginLeft:"auto"}):jsxRuntime.jsx(g,{as:Pt,height:"22px",marginLeft:"auto",width:"22px"});return jsxRuntime.jsxs(h,{borderWidth:1,containerType:"inline-size",css:{"@container (max-width: 600px)":{flexBasis:"85%"},"@container (min-width: 601px) and (max-width: 900px)":{flexBasis:"45%"},"@container (min-width: 1200px)":{flexBasis:"25%"}},flex:"0 0 30%",gap:"2",p:"4",part:"carousel-step",userSelect:"none",disabled:a,opacity:a?.5:1,children:[jsxRuntime.jsxs(P.Row,{marginBottom:"2",part:"carousel-step-header",children:[t.iconUri&&jsxRuntime.jsx(h.Media,{borderRadius:"0",height:"24px",src:t.iconUri,width:"24px"}),c]}),jsxRuntime.jsx(h.Title,{children:t.title}),jsxRuntime.jsx(h.Subtitle,{children:t.subtitle}),jsxRuntime.jsxs(P.Row,{css:{"@container (max-width: 200px)":{"& > button":{flexBasis:"50%",flexGrow:1},flexDirection:"column-reverse"}},gap:"2",marginTop:"auto",paddingTop:"3",part:"carousel-step-footer",children:[jsxRuntime.jsx(h.Secondary,{disabled:a,onClick:r,title:(u=t.secondaryButton)==null?void 0:u.title}),jsxRuntime.jsx(h.Primary,{disabled:a,onClick:n,title:(y=t.primaryButton)==null?void 0:y.title})]})]})}function vt(e){return jsxRuntime.jsx("svg",l(i({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M3 10a.75.75 0 0 1 .75-.75h10.638L10.23 5.29a.75.75 0 1 1 1.04-1.08l5.5 5.25a.75.75 0 0 1 0 1.08l-5.5 5.25a.75.75 0 1 1-1.04-1.08l4.158-3.96H3.75A.75.75 0 0 1 3 10Z",clipRule:"evenodd"})}))}function Bt(e){return jsxRuntime.jsx("svg",l(i({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M17 10a.75.75 0 0 1-.75.75H5.612l4.158 3.96a.75.75 0 1 1-1.04 1.08l-5.5-5.25a.75.75 0 0 1 0-1.08l5.5-5.25a.75.75 0 1 1 1.04 1.08L5.612 9.25H16.25A.75.75 0 0 1 17 10Z",clipRule:"evenodd"})}))}var Rt=react.keyframes`
52
52
  from {
53
53
  opacity: 0;
54
54
  }
55
55
  to {
56
56
  opacity: 1;
57
57
  }
58
- `;function vt({flow:e,sort:o,onPrimary:t,onSecondary:r}){var C,R;let[n,a]=mo.useState(),[s]=mo.useState({align:"start",container:".fr-carousel-content",skipSnaps:!0,slides:".fr-carousel-step",startIndex:o=="completed-last"?0:(R=(C=Array.from(e.steps.values()).find(v=>!v.$state.completed&&!v.$state.skipped))==null?void 0:C.order)!=null?R:0}),[p,c]=En__default.default(s),[m,g]=mo.useState(),[b,x]=mo.useState();mo.useLayoutEffect(()=>{c&&(m==null&&g(c.canScrollNext()),b==null&&x(c.canScrollPrev()),c.on("select",()=>{g(c.canScrollNext()),x(c.canScrollPrev());}));},[c]),mo.useEffect(()=>{if(!n){let v=Array.from(e.steps.values()),k=v.filter(T=>T.$state.completed||T.$state.skipped).sort((T,w)=>T.order-w.order),E=v.filter(T=>!T.$state.completed&&!T.$state.skipped).sort((T,w)=>T.order-w.order);a(o==="completed-last"?[...E,...k].map(T=>T.id):v.map(T=>T.id));}},[]);let u=e.getNumberOfCompletedSteps(),F=e.getNumberOfAvailableSteps();return n?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(P.Row,{css:{"@container (max-width: 750px)":{flexDirection:"column",gap:B.space[5]}},justifyContent:"space-between",part:"carousel-header",children:[jsxRuntime.jsxs(P.Column,{part:"carousel-header-content",children:[jsxRuntime.jsx(S.H3,{children:e.title}),jsxRuntime.jsx(S.Body2,{color:"neutral.400",children:e.subtitle})]}),jsxRuntime.jsxs(P.Row,{alignItems:"center",gap:2,part:"progress",children:[jsxRuntime.jsxs(S.Body2,{fontWeight:"demibold",part:"progress-text",children:[u,"/",F]}),jsxRuntime.jsx(he,{current:u,total:F,minWidth:"200px"})]})]}),jsxRuntime.jsxs(y,{margin:`0 ${B.space[-4]}`,overflow:"hidden",part:"carousel-wrapper",px:"4",position:"relative",ref:p,children:[jsxRuntime.jsx(P.Row,{gap:4,part:"carousel-content",children:Array.from(e.steps.values()).sort((v,k)=>n.indexOf(v.id)-n.indexOf(k.id)).map(v=>jsxRuntime.jsx(bt,{onPrimary:t,onSecondary:r,step:v},v.id))}),b&&jsxRuntime.jsx(P.Column,{animation:`${Ft} 300ms ease-out`,background:"linear-gradient(to right, rgba(255, 255, 255, 0.5), transparent 50%)",bottom:"0",left:"0",justifyContent:"center",paddingLeft:"3",part:"carousel-prev-wrapper",position:"absolute",top:"0",children:jsxRuntime.jsx(I.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>c.scrollPrev(),padding:"2",children:jsxRuntime.jsx(wt,{height:"24px",width:"24px"})})}),m&&jsxRuntime.jsx(P.Column,{animation:`${Ft} 300ms ease-out`,background:"linear-gradient(to left, rgba(255, 255, 255, 0.5), transparent 50%)",bottom:"0",justifyContent:"center",paddingRight:"3",part:"carousel-next-wrapper",position:"absolute",right:"0",top:"0",children:jsxRuntime.jsx(I.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>c.scrollNext(),padding:"2",children:jsxRuntime.jsx(Ct,{height:"24px",width:"24px"})})})]})]}):null}function Bt(o){var e=f(o,[]);return jsxRuntime.jsx(K,l(i({as:h,borderWidth:1,containerType:"inline-size",p:"4",part:"carousel"},e),{children:t=>jsxRuntime.jsx(vt,i(i({},e),t))}))}var Ie={};ee(Ie,{Content:()=>xo,Root:()=>ho,Trigger:()=>bo});function kt(e){return jsxRuntime.jsx("svg",l(i({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6"},e),{children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})}))}var On=react.keyframes`
58
+ `;function kt({flow:e,sort:o,onPrimary:t,onSecondary:n}){var S,B;let[r,a]=ho.useState(),[s]=ho.useState({align:"start",container:".fr-carousel-content",skipSnaps:!0,slides:".fr-carousel-step",startIndex:o=="completed-last"?0:(B=(S=Array.from(e.steps.values()).find(v=>!v.$state.completed&&!v.$state.skipped))==null?void 0:S.order)!=null?B:0}),[p,c]=Mn__default.default(s),[u,y]=ho.useState(),[b,x]=ho.useState();ho.useLayoutEffect(()=>{c&&(u==null&&y(c.canScrollNext()),b==null&&x(c.canScrollPrev()),c.on("select",()=>{y(c.canScrollNext()),x(c.canScrollPrev());}));},[c]),ho.useEffect(()=>{if(!r){let v=Array.from(e.steps.values()),k=v.filter(T=>T.$state.completed||T.$state.skipped).sort((T,w)=>T.order-w.order),E=v.filter(T=>!T.$state.completed&&!T.$state.skipped).sort((T,w)=>T.order-w.order);a(o==="completed-last"?[...E,...k].map(T=>T.id):v.map(T=>T.id));}},[]);let m=e.getNumberOfCompletedSteps(),F=e.getNumberOfAvailableSteps();return r?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(P.Row,{css:{"@container (max-width: 750px)":{flexDirection:"column",gap:R.space[5]}},justifyContent:"space-between",part:"carousel-header",children:[jsxRuntime.jsxs(P.Column,{part:"carousel-header-content",children:[jsxRuntime.jsx(C.H3,{children:e.title}),jsxRuntime.jsx(C.Body2,{color:"neutral.400",children:e.subtitle})]}),jsxRuntime.jsxs(P.Row,{alignItems:"center",gap:2,part:"progress",children:[jsxRuntime.jsxs(C.Body2,{fontWeight:"demibold",part:"progress-text",children:[m,"/",F]}),jsxRuntime.jsx(Ce,{current:m,total:F,minWidth:"200px"})]})]}),jsxRuntime.jsxs(g,{margin:`0 ${R.space[-4]}`,overflow:"hidden",part:"carousel-wrapper",px:"4",position:"relative",ref:p,children:[jsxRuntime.jsx(P.Row,{gap:4,part:"carousel-content",children:Array.from(e.steps.values()).sort((v,k)=>r.indexOf(v.id)-r.indexOf(k.id)).map(v=>jsxRuntime.jsx(wt,{onPrimary:t,onSecondary:n,step:v},v.id))}),b&&jsxRuntime.jsx(P.Column,{animation:`${Rt} 300ms ease-out`,background:"linear-gradient(to right, rgba(255, 255, 255, 0.5), transparent 50%)",bottom:"0",left:"0",justifyContent:"center",paddingLeft:"3",part:"carousel-prev-wrapper",position:"absolute",top:"0",children:jsxRuntime.jsx(I.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>c.scrollPrev(),padding:"2",children:jsxRuntime.jsx(Bt,{height:"24px",width:"24px"})})}),u&&jsxRuntime.jsx(P.Column,{animation:`${Rt} 300ms ease-out`,background:"linear-gradient(to left, rgba(255, 255, 255, 0.5), transparent 50%)",bottom:"0",justifyContent:"center",paddingRight:"3",part:"carousel-next-wrapper",position:"absolute",right:"0",top:"0",children:jsxRuntime.jsx(I.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>c.scrollNext(),padding:"2",children:jsxRuntime.jsx(vt,{height:"24px",width:"24px"})})})]})]}):null}function Dt(o){var e=f(o,[]);return jsxRuntime.jsx(j,l(i({as:h,borderWidth:1,containerType:"inline-size",p:"4",part:"carousel"},e),{children:t=>jsxRuntime.jsx(kt,i(i({},e),t))}))}var We={};te(We,{Content:()=>So,Root:()=>wo,Trigger:()=>Fo});function It(e){return jsxRuntime.jsx("svg",l(i({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6"},e),{children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})}))}var An=react.keyframes`
59
59
  from {
60
60
  height: 0;
61
61
  opacity: 0;
@@ -64,7 +64,7 @@ var Ao=Object.defineProperty,Fr=Object.defineProperties;var vr=Object.getOwnProp
64
64
  height: var(--radix-collapsible-content-height);
65
65
  opacity: 1;
66
66
  }
67
- `,In=react.keyframes`
67
+ `,Ln=react.keyframes`
68
68
  from {
69
69
  height: var(--radix-collapsible-content-height);
70
70
  opacity: 1;
@@ -73,7 +73,7 @@ var Ao=Object.defineProperty,Fr=Object.defineProperties;var vr=Object.getOwnProp
73
73
  height: 0;
74
74
  opacity: 0;
75
75
  }
76
- `,Hn=()=>jsxRuntime.jsx(y,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function Mn({checked:e=!1}){return jsxRuntime.jsx(y,{backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"field-radio-value",position:"relative",height:"22px",width:"22px",children:e&&jsxRuntime.jsx(y,{alignItems:"center",bg:"green500",borderWidth:"md",borderStyle:"solid",borderColor:"green500",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"field-radio-indicator",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsxRuntime.jsx(Hn,{})})})}function xo({children:e}){return jsxRuntime.jsx(Pe__namespace.Content,{asChild:!0,children:jsxRuntime.jsxs(P.Column,{css:{'&[data-state="open"]':{animation:`${On} 300ms ease-out`},'&[data-state="closed"]':{animation:`${In} 300ms ease-out`},overflow:"hidden"},gap:5,part:"collapsible-content",children:[jsxRuntime.jsx(y,{}),e]})})}function ho(a){var s=a,{children:e,disabled:o=!1,onOpenChange:t=()=>{},open:r=!1}=s,n=f(s,["children","disabled","onOpenChange","open"]);return jsxRuntime.jsx(Pe__namespace.Root,{asChild:!0,disabled:o,open:r,onOpenChange:t,children:jsxRuntime.jsx(h,l(i({borderWidth:"md",css:{'&[data-state="open"] .fr-collapsible-step-icon':{transform:"rotate(180deg)"}},gap:0,part:"collapsible-step"},n),{children:e}))})}function bo({isCompleted:e,isBlocked:o,title:t}){return jsxRuntime.jsx(Pe__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(P.Row,{alignItems:"center",justifyContent:"space-between",margin:-5,padding:5,zIndex:1,opacity:o?.4:1,disabled:o,pointerEvents:o?"none":"auto",cursor:o?"not-allowed":"pointer",part:"collapsible-header",children:[jsxRuntime.jsxs(P.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsx(Mn,{checked:e}),jsxRuntime.jsx(S.Body2,{fontWeight:"demibold",userSelect:"none",part:"collapsible-title",children:t})]}),jsxRuntime.jsx(y,{as:kt,color:"neutral.100",css:{"& path":{vectorEffect:"non-scaling-stroke"}},display:"block",height:"16px",order:2,part:"collapsible-step-icon",width:"16px"})]})})}var Dt=mo.createContext({onPrimary:()=>{},onSecondary:()=>{},openStepId:null,setOpenStepId:()=>{},stepTypes:{}});function Ot({handlePrimary:e,handleSecondary:o,open:t,onOpenChange:r,step:n}){var F,C,R,v,k,E;let{$state:{blocked:a,completed:s,skipped:p},subtitle:c,title:m}=n,g=(C=(F=n.primaryButton)==null?void 0:F.title)!=null?C:n.primaryButtonTitle,b=(v=(R=n.secondaryButton)==null?void 0:R.title)!=null?v:n.secondaryButtonTitle,x=(k=n.props)!=null?k:{},u=!!a;return jsxRuntime.jsxs(ho,l(i({open:t,onOpenChange:r},x),{children:[jsxRuntime.jsx(bo,{isBlocked:n.$state.blocked,isCompleted:s||p,title:m}),jsxRuntime.jsxs(xo,{children:[jsxRuntime.jsx(h.Media,{aspectRatio:2.5,objectFit:"cover",src:(E=n.videoUri)!=null?E:n.imageUri,type:n.videoUri?"video":"image"}),jsxRuntime.jsx(h.Subtitle,{color:"neutral.400",children:c}),jsxRuntime.jsxs(P.Row,{gap:3,part:"collapsible-footer",children:[jsxRuntime.jsx(h.Secondary,{title:b,onClick:o}),jsxRuntime.jsx(h.Primary,{disabled:u,title:g,onClick:e})]})]})]}))}var Vn={default:Ot};function $n(r){var n=r,{flow:e,step:o}=n,t=f(n,["flow","step"]);var C;let{onPrimary:a,onSecondary:s,openStepId:p,setOpenStepId:c,stepTypes:m}=mo.useContext(Dt),{handlePrimary:g,handleSecondary:b}=re(o,{onPrimary:a,onSecondary:s}),x=(p!=null?p:e.getCurrentStep().id)===o.id,u=(C=m[o.type])!=null?C:Ot;function F(R){return W(this,null,function*(){c(R?o.id:""),R&&!o.$state.completed&&(yield o.start(),c(null));})}return jsxRuntime.jsx(u,l(i({flow:e,onOpenChange:F,open:x,step:o},t),{handlePrimary:g,handleSecondary:b}),o.id)}function Je(p){var c=p,{dismissible:e,flowId:o,onPrimary:t,onSecondary:r,part:n,stepTypes:a={}}=c,s=f(c,["dismissible","flowId","onPrimary","onSecondary","part","stepTypes"]);let[m,g]=mo.useState(null),b=i(i({},Vn),a);return jsxRuntime.jsx(Dt.Provider,{value:{openStepId:m,setOpenStepId:g,onPrimary:t,onSecondary:r,stepTypes:b},children:jsxRuntime.jsx(K,l(i({as:h,borderWidth:"md",flowId:o,part:["checklist",n]},s),{children:C=>{var R=C,{flow:x,handleDismiss:u}=R,F=f(R,["flow","handleDismiss"]);let k=Array.from(x.steps.entries()).filter(([,w])=>w.$state.visible===!0).map(([,w])=>jsxRuntime.jsx($n,l(i({flow:x,handleDismiss:u},F),{step:w}),w.id)),E=x.getNumberOfCompletedSteps(),T=x.getNumberOfAvailableSteps();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(P.Column,{gap:2,children:[jsxRuntime.jsx(h.Header,{dismissible:e,handleDismiss:u,part:"checklist-header",subtitle:x.subtitle,title:x.title}),jsxRuntime.jsxs(P.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsxs(S.Body2,{fontWeight:"demibold",children:[E,"/",T]}),jsxRuntime.jsx(he,{current:E,total:T,flexGrow:1})]})]}),k]})}}))})}var Jn=new Set(["required","min","max","minLength","maxLength","pattern"]);function Xn({fieldComponent:e,control:o,fieldData:t,submit:r}){let n=reactHookForm.useFormContext();t.pattern!=null&&(typeof t.pattern=="string"?t.pattern=new RegExp(t.pattern.replace(/^\/|\/$/g,"")):typeof t.pattern=="object"&&typeof t.pattern.value=="string"&&(t.pattern.value=new RegExp(t.pattern.value.replace(/^\/|\/$/g,""))));let a=Object.fromEntries(Object.entries(t).filter(([p])=>Jn.has(p))),s=reactHookForm.useController({name:t.id,control:o,rules:a});return jsxRuntime.jsx(e,l(i({},s),{fieldData:t,formContext:n,submit:r}))}function Ht({fieldTypes:e,handleDismiss:o,handlePrimary:t,handleSecondary:r,parentProps:{dismissible:n},step:a}){var k,E,T,w,D,O;let{__readOnly:s}=mo.useContext(H),p=reactHookForm.useForm({delayError:2e3,mode:"onChange"}),[c,m]=mo.useState(!1),g=[],{control:b,handleSubmit:x}=p,u=(k=a.props)!=null?k:{};function F(N,ve){m(!0),t(ve,N,s===!0).then(()=>m(!1));}(E=a.fields)==null||E.forEach(N=>{e[N.type]!=null&&g.push(jsxRuntime.jsx(Xn,{control:b,fieldComponent:e[N.type],fieldData:N,submit:x(F)},`${a.flow.id}-${N.id}`));});let C=(w=(T=a.primaryButton)==null?void 0:T.title)!=null?w:a.primaryButtonTitle,R=(O=(D=a.secondaryButton)==null?void 0:D.title)!=null?O:a.secondaryButtonTitle,v=!!(a.$state.blocked||!p.formState.isValid);return jsxRuntime.jsxs(P.Column,l(i({gap:5,part:"form-step"},u),{children:[jsxRuntime.jsx(h.Header,{dismissible:n,handleDismiss:o,part:"form-step-header",subtitle:a.subtitle,title:a.title}),jsxRuntime.jsx(reactHookForm.FormProvider,l(i({},p),{children:g})),jsxRuntime.jsxs(P.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[R&&jsxRuntime.jsx(I.Secondary,{onClick:r,title:R}),jsxRuntime.jsx(I.Primary,{disabled:v||c,onClick:x(F),title:C!=null?C:"Submit",loading:c})]},"form-footer")]}))}function Mt({error:e}){var o;return (o=e==null?void 0:e.message)!=null&&o.length?jsxRuntime.jsx(S.Caption,{color:"red500",display:"block",part:"field-error",mt:"1",textAlign:"end",children:e==null?void 0:e.message}):null}function Po({children:e,id:o,required:t=!1}){return jsxRuntime.jsxs(S.Body2,{as:"label",htmlFor:o,part:"field-label",fontWeight:"medium",mb:"2",display:"block",children:[e,jsxRuntime.jsx(y,{part:"field-label-required",display:"inline",children:t&&"*"})]})}var Co={backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md"},He=l(i({},Co),{px:"4",py:"2",display:"block",outline:"none",width:"100%"});function ne({children:e,field:o,fieldData:t,fieldState:r}){var m;let{id:n,label:a,placeholder:s}=t,{error:p}=r,c=l(i(i(i({id:n},o),s?{placeholder:s}:{}),He),{"aria-invalid":!!p,value:(m=o.value)!=null?m:""});return jsxRuntime.jsxs(y,{part:"field",children:[jsxRuntime.jsx(Po,{id:n,required:!!t.required,children:a}),e(c),jsxRuntime.jsx(Mt,{error:p})]})}var ei=()=>jsxRuntime.jsx(y,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),oi=mo__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsxs(y,{as:"label",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",htmlFor:o,justifyContent:"space-between",part:"field-radio",px:4,py:2,children:[jsxRuntime.jsx(S.Body2,{part:"field-radio-label",children:e}),jsxRuntime.jsx(Se__namespace.Item,{id:o,value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(y,{as:"button",backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"field-radio-value",position:"relative",height:"24px",width:"24px",children:jsxRuntime.jsx(y,{as:Se__namespace.Indicator,alignItems:"center",bg:"primary.surface",borderWidth:"md",borderStyle:"solid",borderColor:"primary.border",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"field-radio-indicator",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsxRuntime.jsx(ei,{})})})})]}));function wo(e){let{field:{onChange:o,value:t},fieldData:{options:r=[]}}=e,n=r.map(({label:a,value:s})=>jsxRuntime.jsx(oi,{value:s,label:a},s));return jsxRuntime.jsx(ne,l(i({},e),{children:()=>jsxRuntime.jsx(Se__namespace.Root,{value:t,onValueChange:o,asChild:!0,children:jsxRuntime.jsx(P.Column,{gap:2,part:"field-radio-group",children:n})})}))}function Vt(e){return jsxRuntime.jsx("svg",l(i({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}))}var ri=mo__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsx(A__namespace.Item,{value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(y,{"backgroundColor:hover":"blue900",borderRadius:"md",outline:"none",part:"field-select-option",px:"3",py:"2",children:jsxRuntime.jsx(A__namespace.ItemText,{asChild:!0,children:jsxRuntime.jsx(S.Body2,{part:"field-select-option-label",children:e})})})}));function Fo(e){let{field:{onChange:o,value:t},fieldData:{options:r=[],placeholder:n}}=e,a=r.map(({label:s,value:p})=>jsxRuntime.jsx(ri,{value:p,label:s},p));return jsxRuntime.jsx(ne,l(i({},e),{children:()=>jsxRuntime.jsxs(A__namespace.Root,{value:t,onValueChange:o,children:[jsxRuntime.jsx(A__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(S.Body2,l(i({},He),{alignItems:"center",display:"flex",justifyContent:"space-between",part:"field-select",children:[jsxRuntime.jsx(A__namespace.Value,{placeholder:n!=null?n:"Select one"}),jsxRuntime.jsx(A__namespace.Icon,{children:jsxRuntime.jsx(y,{as:Vt,color:"neutral.100",display:"block",height:"24px",part:"field-select-icon",width:"24px"})})]}))}),jsxRuntime.jsx(A__namespace.Portal,{children:jsxRuntime.jsx(A__namespace.Content,{position:"popper",sideOffset:4,asChild:!0,children:jsxRuntime.jsx(y,l(i({},He),{boxShadow:"md",maxHeight:"var(--radix-select-content-available-height)",p:"1",part:"field-select-options",width:"var(--radix-popper-anchor-width)",zIndex:"99999",children:jsxRuntime.jsx(A__namespace.Viewport,{children:a})}))})})]})}))}function vo(e){return jsxRuntime.jsx(ne,l(i({},e),{children:o=>jsxRuntime.jsx(S.Body2,i({as:"input",part:"field-text",type:"text"},o))}))}function To(e){return jsxRuntime.jsx(ne,l(i({},e),{children:o=>jsxRuntime.jsx(S.Body2,i({as:"textarea",part:"field-textarea"},o))}))}function Ut(e){return jsxRuntime.jsx("svg",l(i({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"})}))}function Kt(e){let{field:{onChange:o,value:t},fieldData:{options:r,label:n,id:a=[]}}=e;return jsxRuntime.jsxs(y,{part:"field",display:"flex",gap:2,alignItems:"center",children:[jsxRuntime.jsx(qe__namespace.Root,{defaultChecked:!0,onCheckedChange:o,value:t,checked:t===!0,asChild:!0,children:jsxRuntime.jsx(y,l(i({},Co),{as:"button",width:"25px",minWidth:"25px",height:"25px",justifyContent:"center",alignItems:"center",display:"flex","backgroundColor:hover":"blue900",part:"field-checkbox",id:a,children:jsxRuntime.jsx(qe__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(y,{width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center",children:jsxRuntime.jsx(Ut,{height:"14",fill:"currentColor"})})})}))}),jsxRuntime.jsx(S.Body2,{part:"field-checkbox-label",as:"label",htmlFor:a,children:n})]})}var ii={checkbox:Kt,radio:wo,select:Fo,text:vo,textarea:To};function Fe(n){var a=n,{fieldTypes:e={},flowId:o,part:t}=a,r=f(a,["fieldTypes","flowId","part"]);let s=Object.assign({},ii,e);return jsxRuntime.jsx(K,l(i({flowId:o,part:["form",t]},r),{children:p=>jsxRuntime.jsx(Ht,i({fieldTypes:s},p))}))}var Ye={};ee(Ye,{NPS:()=>Me});function Xt({field:e,fieldData:o,submit:t}){var n,a;let r=[...Array(11)].map((s,p)=>{let c=e.value===p?I.Primary:I.Secondary;return jsxRuntime.jsx(c,{borderWidth:"1px",onClick:()=>{e.onChange(p),t();},title:`${p}`,css:{".fr-button-title":{fontSize:"15px"}}},p)});return jsxRuntime.jsxs(P.Column,{gap:2,children:[jsxRuntime.jsx(P.Row,{gap:2,part:"field-nps",css:{"@media (min-width: 660px)":{flexWrap:"nowrap",justifyContent:"space-between"},flexWrap:"wrap",justifyContent:"center"},children:r}),jsxRuntime.jsxs(P.Row,{justifyContent:"space-between",part:"field-nps-label",children:[jsxRuntime.jsx(S.Caption,{part:"field-nps-left-label",color:"neutral.400",children:(n=o.negativeLabel)!=null?n:"Not likely at all"}),jsxRuntime.jsx(S.Caption,{part:"field-nps-right-label",color:"neutral.400",children:(a=o.positiveLabel)!=null?a:"Extremely likely"})]})]})}function Me(a){var s=a,{as:e=M,flowId:o,fieldTypes:t,part:r}=s,n=f(s,["as","flowId","fieldTypes","part"]);let{flow:p}=ie(o);return jsxRuntime.jsx(Fe,i({alignSelf:"end",as:e,flowId:o,fieldTypes:i({nps:Xt},t),modal:!1,onEscapeKeyDown:c=>{typeof n.onEscapeKeyDown=="function"&&n.onEscapeKeyDown(c),c.defaultPrevented||p.skip();},part:["nps",r],css:l(i({},!p||p.getCurrentStepIndex()==0?{".fr-form-step-footer":{display:"none"}}:{}),{".fr-form":{padding:"20px","@media (min-width: 660px)":{minWidth:"600px"},minWidth:"100%"},".fr-form-step":{gap:"14px","@media (min-width: 660px)":{gap:"1"}}})},n))}function fe(e,{onComplete:o,onDismiss:t}={}){let r=mo.useRef(null);return mo.useEffect(()=>{e!=null&&(e.isCompleted&&r.current===!1&&W(this,null,function*(){yield o==null?void 0:o(e);}),r.current=e==null?void 0:e.isCompleted);},[e==null?void 0:e.isCompleted]),{handleDismiss:mo.useCallback(n=>W(this,null,function*(){if((yield t==null?void 0:t(e,n))===!1)return n.preventDefault(),!1;e.skip();}),[e])}}function Qe(){let e="DOMRect"in globalThis?new DOMRect:{height:0,width:0,x:0,y:0,bottom:0,top:0,right:0,left:0,toJSON:()=>{}},[o,t]=mo.useState(e),[r,n]=mo.useState(null),a=mo.useCallback(s=>{n(s);},[]);return mo.useLayoutEffect(()=>{if(!r)return;let s=()=>{let p=r.getBoundingClientRect();t(p);};return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[r]),{node:r,rect:o,ref:a}}var mi=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function Yt(r){var n=r,{style:e={},part:o=""}=n,t=f(n,["style","part"]);return jsxRuntime.jsxs(y,l(i({part:`dot-wrapper ${o}`,style:i({height:"48px",position:"absolute",width:"48px"},e)},t),{children:[jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"dot-pulse",css:{animation:`2s ease-out infinite ${mi}`,borderRadius:"24px",height:"48px",left:0,position:"absolute",top:0,transformOrigin:"center center",width:"48px"}}),jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"dot",style:{borderRadius:"12px",height:"24px",left:"12px",position:"absolute",top:"12px",width:"24px"}})]}))}function eo(r){var n=r,{part:e,src:o}=n,t=f(n,["part","src"]);return jsxRuntime.jsx(y,i({as:"img",maxWidth:"unset",part:["image",e],src:o},t))}function yi(e){var o,t,r,n,a;return e.includes("youtube")?`https://www.youtube.com/embed/${(o=e.split("v=")[1])==null?void 0:o.split("&")[0]}`:e.includes("youtu.be")?`https://www.youtube.com/embed/${(t=e.split("youtu.be/")[1])==null?void 0:t.split("&")[0]}`:e.includes("vimeo")?`https://player.vimeo.com/video/${(r=e.split("vimeo.com/")[1])==null?void 0:r.split("&")[0]}`:e.includes("wistia")?`https://fast.wistia.net/embed/iframe/${(n=e.split("wistia.com/medias/")[1])==null?void 0:n.split("&")[0]}`:e.includes("loom")?`https://loom.com/embed/${(a=e.split("loom.com/share/")[1])==null?void 0:a.split("&")[0]}?hideEmbedTopBar=true&hide_title=true&hide_share=true&hide_owner=true`:null}function oo(r){var n=r,{part:e,src:o}=n,t=f(n,["part","src"]);let a=yi(o);return a?jsxRuntime.jsx(y,i({allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,as:"iframe",backgroundColor:"neutral.100",borderWidth:"0",part:["video",e],src:a},t)):o!=null&&o.endsWith(".mp4")?jsxRuntime.jsx(y,i({as:"video",controls:!0,part:["video",e],src:o},t)):(console.error(`Could not map videoUri ${o} to a known provider (Youtube, Vimeo, Wistia, Loom) or valid mp4 file.`),null)}function le(r){var n=r,{src:e,type:o}=n,t=f(n,["src","type"]);return jsxRuntime.jsx(o==="video"?oo:eo,i({src:e},t))}function er({props:e,alignAttr:o,sideAttr:t}){let r=t!=null?t:"bottom",n={},a=()=>{var m;if(["after","before"].includes(e.align)){if(o=="start")return "before";if(o=="end")return "after"}return (m=e.align)!=null?m:"after"},s="-24px",p={top:"bottom",right:"left",bottom:"top",left:"right"};n[p[r]]=s;let c=a();return ["before","end"].includes(c)?["top","bottom"].includes(r)?n.right=s:n.bottom=s:["after","start"].includes(c)?["top","bottom"].includes(r)?n.left=s:n.top=s:["top","bottom"].includes(r)?n.left=`calc(50% + ${s})`:n.top=`calc(50% + ${s})`,n}var to={content:["align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","forceMount","hideWhenDetached","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenAutoFocus","onPointerDownOutside","side","sideOffset","sticky"],root:["defaultOpen","modal","onOpenChange","open"]};function or(e,o){var a,s,p,c,m;let t=Object.fromEntries(to.content.map(g=>[g,e[g]]).filter(g=>g[1]!==void 0)),r=Object.fromEntries(to.root.map(g=>[g,e[g]]).filter(g=>g[1]!==void 0)),n={};for(let g of Object.keys(e))!to.content.includes(g)&&!to.root.includes(g)&&(n[g]=e[g]);if(t.align=(a=t.align)!=null?a:"after",t.side=(s=t.side)!=null?s:"bottom",["before","after"].includes(t.align)){let g={after:"end",before:"start"},b=(v,k)=>["top","bottom"].includes(k)?v=="after"?"marginLeft":"marginRight":v=="after"?"marginTop":"marginBottom",x=(p=t.alignOffset)!=null?p:0,u=(c=t.style)!=null?c:{},F=(m=t.side)!=null?m:"bottom",C=t.align;t.style=l(i({},u),{[b(C,F)]:x});let R=["top","bottom"].includes(F)?o.width:o.height;t.alignOffset=(R+x)*-1,t.align=g[C];}return {contentProps:t,otherProps:n,rootProps:r}}var tr=react.keyframes`
76
+ `,Vn=()=>jsxRuntime.jsx(g,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function $n({checked:e=!1}){return jsxRuntime.jsx(g,{backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"field-radio-value",position:"relative",height:"22px",width:"22px",children:e&&jsxRuntime.jsx(g,{alignItems:"center",bg:"green500",borderWidth:"md",borderStyle:"solid",borderColor:"green500",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"field-radio-indicator",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsxRuntime.jsx(Vn,{})})})}function So({children:e}){return jsxRuntime.jsx(we__namespace.Content,{asChild:!0,children:jsxRuntime.jsxs(P.Column,{css:{'&[data-state="open"]':{animation:`${An} 300ms ease-out`},'&[data-state="closed"]':{animation:`${Ln} 300ms ease-out`},overflow:"hidden"},gap:5,part:"collapsible-content",children:[jsxRuntime.jsx(g,{}),e]})})}function wo(a){var s=a,{children:e,disabled:o=!1,onOpenChange:t=()=>{},open:n=!1}=s,r=f(s,["children","disabled","onOpenChange","open"]);return jsxRuntime.jsx(we__namespace.Root,{asChild:!0,disabled:o,open:n,onOpenChange:t,children:jsxRuntime.jsx(h,l(i({borderWidth:"md",css:{'&[data-state="open"] .fr-collapsible-step-icon':{transform:"rotate(180deg)"}},gap:0,part:"collapsible-step"},r),{children:e}))})}function Fo({isCompleted:e,isBlocked:o,title:t}){return jsxRuntime.jsx(we__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(P.Row,{alignItems:"center",justifyContent:"space-between",margin:-5,padding:5,zIndex:1,opacity:o?.4:1,disabled:o,pointerEvents:o?"none":"auto",cursor:o?"not-allowed":"pointer",part:"collapsible-header",children:[jsxRuntime.jsxs(P.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsx($n,{checked:e}),jsxRuntime.jsx(C.Body2,{fontWeight:"demibold",userSelect:"none",part:"collapsible-title",children:t})]}),jsxRuntime.jsx(g,{as:It,color:"neutral.100",css:{"& path":{vectorEffect:"non-scaling-stroke"}},display:"block",height:"16px",order:2,part:"collapsible-step-icon",width:"16px"})]})})}var Mt=ho.createContext({onPrimary:()=>{},onSecondary:()=>{},openStepId:null,setOpenStepId:()=>{},stepTypes:{}});function Wt({handlePrimary:e,handleSecondary:o,open:t,onOpenChange:n,step:r}){var F,S,B,v,k,E;let{$state:{blocked:a,completed:s,skipped:p},subtitle:c,title:u}=r,y=(S=(F=r.primaryButton)==null?void 0:F.title)!=null?S:r.primaryButtonTitle,b=(v=(B=r.secondaryButton)==null?void 0:B.title)!=null?v:r.secondaryButtonTitle,x=(k=r.props)!=null?k:{},m=!!a;return jsxRuntime.jsxs(wo,l(i({open:t,onOpenChange:n},x),{children:[jsxRuntime.jsx(Fo,{isBlocked:r.$state.blocked,isCompleted:s||p,title:u}),jsxRuntime.jsxs(So,{children:[jsxRuntime.jsx(h.Media,{aspectRatio:2.5,objectFit:"cover",src:(E=r.videoUri)!=null?E:r.imageUri,type:r.videoUri?"video":"image"}),jsxRuntime.jsx(h.Subtitle,{color:"neutral.400",children:c}),jsxRuntime.jsxs(P.Row,{gap:3,part:"collapsible-footer",children:[jsxRuntime.jsx(h.Secondary,{title:b,onClick:o}),jsxRuntime.jsx(h.Primary,{disabled:m,title:y,onClick:e})]})]})]}))}var Gn={default:Wt};function Un(n){var r=n,{flow:e,step:o}=r,t=f(r,["flow","step"]);var S;let{onPrimary:a,onSecondary:s,openStepId:p,setOpenStepId:c,stepTypes:u}=ho.useContext(Mt),{handlePrimary:y,handleSecondary:b}=ie(o,{onPrimary:a,onSecondary:s}),x=(p!=null?p:e.getCurrentStep().id)===o.id,m=(S=u[o.type])!=null?S:Wt;function F(B){return W(this,null,function*(){c(B?o.id:""),B&&!o.$state.completed&&(yield o.start(),c(null));})}return jsxRuntime.jsx(m,l(i({flow:e,onOpenChange:F,open:x,step:o},t),{handlePrimary:y,handleSecondary:b}),o.id)}function Ze(p){var c=p,{dismissible:e,flowId:o,onPrimary:t,onSecondary:n,part:r,stepTypes:a={}}=c,s=f(c,["dismissible","flowId","onPrimary","onSecondary","part","stepTypes"]);let[u,y]=ho.useState(null),b=i(i({},Gn),a);return jsxRuntime.jsx(Mt.Provider,{value:{openStepId:u,setOpenStepId:y,onPrimary:t,onSecondary:n,stepTypes:b},children:jsxRuntime.jsx(j,l(i({as:h,borderWidth:"md",flowId:o,part:["checklist",r]},s),{children:S=>{var B=S,{flow:x,handleDismiss:m}=B,F=f(B,["flow","handleDismiss"]);let k=Array.from(x.steps.entries()).filter(([,w])=>w.$state.visible===!0).map(([,w])=>jsxRuntime.jsx(Un,l(i({flow:x,handleDismiss:m},F),{step:w}),w.id)),E=x.getNumberOfCompletedSteps(),T=x.getNumberOfAvailableSteps();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(P.Column,{gap:2,children:[jsxRuntime.jsx(h.Header,{dismissible:e,handleDismiss:m,part:"checklist-header",subtitle:x.subtitle,title:x.title}),jsxRuntime.jsxs(P.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsxs(C.Body2,{fontWeight:"demibold",children:[E,"/",T]}),jsxRuntime.jsx(Ce,{current:E,total:T,flexGrow:1})]})]}),k]})}}))})}var Qn=new Set(["required","min","max","minLength","maxLength","pattern"]);function ei({fieldComponent:e,control:o,fieldData:t,submit:n}){let r=reactHookForm.useFormContext();t.pattern!=null&&(typeof t.pattern=="string"?t.pattern=new RegExp(t.pattern.replace(/^\/|\/$/g,"")):typeof t.pattern=="object"&&typeof t.pattern.value=="string"&&(t.pattern.value=new RegExp(t.pattern.value.replace(/^\/|\/$/g,""))));let a=Object.fromEntries(Object.entries(t).filter(([p])=>Qn.has(p))),s=reactHookForm.useController({name:t.id,control:o,rules:a});return jsxRuntime.jsx(e,l(i({},s),{fieldData:t,formContext:r,submit:n}))}function Lt({fieldTypes:e,handleDismiss:o,handlePrimary:t,handleSecondary:n,parentProps:{dismissible:r},step:a}){var E,T,w,D,O,q;let{__readOnly:s}=ho.useContext(H),p=((E=a.fields)!=null?E:[]).filter(N=>e[N.type]!=null&&N.id),c=reactHookForm.useForm({delayError:2e3,mode:"onChange",defaultValues:p.reduce((N,K)=>{var ce;return N[K.id]=(ce=K.value)!=null?ce:"",N},{})}),[u,y]=ho.useState(!1),b=[],{control:x,handleSubmit:m}=c,F=(T=a.props)!=null?T:{};function S(N,K){y(!0),t(K,N,s===!0).then(()=>y(!1));}p.forEach(N=>{e[N.type]!=null&&b.push(jsxRuntime.jsx(ei,{control:x,fieldComponent:e[N.type],fieldData:N,submit:m(S)},`${a.flow.id}-${N.id}`));});let B=(D=(w=a.primaryButton)==null?void 0:w.title)!=null?D:a.primaryButtonTitle,v=(q=(O=a.secondaryButton)==null?void 0:O.title)!=null?q:a.secondaryButtonTitle,k=!!(a.$state.blocked||!c.formState.isValid);return jsxRuntime.jsxs(P.Column,l(i({gap:5,part:"form-step"},F),{children:[jsxRuntime.jsx(h.Header,{dismissible:r,handleDismiss:o,part:"form-step-header",subtitle:a.subtitle,title:a.title}),jsxRuntime.jsx(reactHookForm.FormProvider,l(i({},c),{children:b})),jsxRuntime.jsxs(P.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[v&&jsxRuntime.jsx(I.Secondary,{onClick:n,title:v}),jsxRuntime.jsx(I.Primary,{disabled:k||u,onClick:m(S),title:B!=null?B:"Submit",loading:u})]},"form-footer")]}))}function Vt({error:e}){var o;return (o=e==null?void 0:e.message)!=null&&o.length?jsxRuntime.jsx(C.Caption,{color:"red500",display:"block",part:"field-error",mt:"1",textAlign:"end",children:e==null?void 0:e.message}):null}function vo({children:e,id:o,required:t=!1}){return jsxRuntime.jsxs(C.Body2,{as:"label",htmlFor:o,part:"field-label",fontWeight:"medium",mb:"2",display:"block",children:[e,jsxRuntime.jsx(g,{part:"field-label-required",display:"inline",children:t&&"*"})]})}var To={backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md"},Ae=l(i({},To),{px:"4",py:"2",display:"block",outline:"none",width:"100%"}),Qe={alignItems:"center",bg:"primary.surface",borderWidth:"md",borderStyle:"solid",borderColor:"primary.border",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",position:"absolute",top:"-1px",width:"calc(100% + 2px)",color:"primary.foreground"};function Q({children:e,field:o,fieldData:t,fieldState:n}){var u;let{id:r,label:a,placeholder:s}=t,{error:p}=n,c=l(i(i(i({id:r},o),s?{placeholder:s}:{}),Ae),{"aria-invalid":!!p,value:(u=o.value)!=null?u:""});return jsxRuntime.jsxs(g,{part:"field",children:[jsxRuntime.jsx(vo,{id:r,required:!!t.required,children:a}),e(c),jsxRuntime.jsx(Vt,{error:p})]})}function ve(e){return jsxRuntime.jsx("svg",l(i({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"})}))}var ii=ho__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsxs(g,{as:"label",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",htmlFor:o,justifyContent:"space-between",part:"field-radio",px:4,py:2,children:[jsxRuntime.jsx(C.Body2,{part:"field-radio-label",children:e}),jsxRuntime.jsx(Te__namespace.Item,{id:o,value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(g,{as:"button",backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"field-radio-value",position:"relative",height:"24px",width:"24px",children:jsxRuntime.jsx(g,l(i({as:Te__namespace.Indicator},Qe),{children:jsxRuntime.jsx(ve,{height:"14",width:"14"})}))})})]}));function Bo(e){let{field:{onChange:o,value:t},fieldData:{options:n=[]}}=e,r=n.map(({label:a,value:s})=>jsxRuntime.jsx(ii,{value:s,label:a},s));return jsxRuntime.jsx(Q,l(i({},e),{children:()=>jsxRuntime.jsx(Te__namespace.Root,{value:t,onValueChange:o,asChild:!0,children:jsxRuntime.jsx(P.Column,{gap:2,part:"field-radio-group",children:r})})}))}function Gt(e){return jsxRuntime.jsx("svg",l(i({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}))}function Kt(e){let{field:{onChange:o,value:t},fieldData:{options:n=[]}}=e,[r,a]=ho__namespace.useState([]);function s(p){let c=[];r.includes(p)?c=[...r.filter(u=>u!==p)]:c=[...r,p],a(c),o(c);}return jsxRuntime.jsx(Q,l(i({},e),{children:()=>jsxRuntime.jsx(P.Column,{gap:2,part:"field-select-multiple",children:n.map(({label:p,value:c})=>jsxRuntime.jsx(eo__namespace.Root,{value:r.includes(c)?c:void 0,onCheckedChange:()=>s(c),asChild:!0,children:jsxRuntime.jsxs(g,{as:"button",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",justifyContent:"space-between",part:"field-check",px:4,py:2,children:[jsxRuntime.jsx(C.Body2,{part:"field-check-label",children:p}),jsxRuntime.jsx(g,{backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"field-check-value",position:"relative",height:"24px",width:"24px",children:jsxRuntime.jsx(eo__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(g,l(i({},Qe),{children:jsxRuntime.jsx(ve,{height:"14",width:"14"})}))})})]})},c))})}))}var li=ho__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsx(L__namespace.Item,{value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(g,{"backgroundColor:hover":"blue900",borderRadius:"md",outline:"none",part:"field-select-option",px:"3",py:"2",children:jsxRuntime.jsx(L__namespace.ItemText,{asChild:!0,children:jsxRuntime.jsx(C.Body2,{part:"field-select-option-label",children:e})})})}));function Ro(e){let{field:{onChange:o,value:t},fieldData:{options:n=[],placeholder:r}}=e,a=n.map(({label:s,value:p})=>jsxRuntime.jsx(li,{value:p,label:s},p));return e.fieldData.multiple?jsxRuntime.jsx(Kt,i({},e)):jsxRuntime.jsx(Q,l(i({},e),{children:()=>jsxRuntime.jsxs(L__namespace.Root,{value:t,onValueChange:o,children:[jsxRuntime.jsx(L__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(C.Body2,l(i({},Ae),{alignItems:"center",display:"flex",justifyContent:"space-between",part:"field-select",children:[jsxRuntime.jsx(L__namespace.Value,{placeholder:r!=null?r:"Select one"}),jsxRuntime.jsx(L__namespace.Icon,{children:jsxRuntime.jsx(g,{as:Gt,color:"neutral.100",display:"block",height:"24px",part:"field-select-icon",width:"24px"})})]}))}),jsxRuntime.jsx(L__namespace.Portal,{children:jsxRuntime.jsx(L__namespace.Content,{position:"popper",sideOffset:4,asChild:!0,children:jsxRuntime.jsx(g,l(i({},Ae),{boxShadow:"md",maxHeight:"var(--radix-select-content-available-height)",p:"1",part:"field-select-options",width:"var(--radix-popper-anchor-width)",zIndex:"99999",children:jsxRuntime.jsx(L__namespace.Viewport,{children:a})}))})})]})}))}function ko(e){return jsxRuntime.jsx(Q,l(i({},e),{children:o=>jsxRuntime.jsx(C.Body2,i({as:"input",part:"field-text",type:"text"},o))}))}function Eo(e){return jsxRuntime.jsx(Q,l(i({},e),{children:o=>jsxRuntime.jsx(C.Body2,i({as:"textarea",part:"field-textarea"},o))}))}function Zt(e){let{field:{onChange:o,value:t},fieldData:{options:n,label:r,id:a=[]}}=e;return jsxRuntime.jsxs(g,{part:"field",display:"flex",gap:2,alignItems:"center",children:[jsxRuntime.jsx(eo__namespace.Root,{defaultChecked:!0,onCheckedChange:o,value:t,checked:t===!0,asChild:!0,children:jsxRuntime.jsx(g,l(i({},To),{as:"button",width:"25px",minWidth:"25px",height:"25px",justifyContent:"center",alignItems:"center",display:"flex","backgroundColor:hover":"blue900",part:"field-checkbox",id:a,children:jsxRuntime.jsx(eo__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(g,{width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center",children:jsxRuntime.jsx(ve,{height:"14",fill:"currentColor"})})})}))}),jsxRuntime.jsx(C.Body2,{part:"field-checkbox-label",as:"label",htmlFor:a,children:r})]})}var di={checkbox:Zt,radio:Bo,select:Ro,text:ko,textarea:Eo};function Re(r){var a=r,{fieldTypes:e={},flowId:o,part:t}=a,n=f(a,["fieldTypes","flowId","part"]);let s=Object.assign({},di,e);return jsxRuntime.jsx(j,l(i({flowId:o,part:["form",t]},n),{children:p=>jsxRuntime.jsx(Lt,i({fieldTypes:s},p))}))}var ro={};te(ro,{NPS:()=>Ve});function er({field:e,fieldData:o,submit:t}){var r,a;let n=[...Array(11)].map((s,p)=>{let c=e.value===p?I.Primary:I.Secondary;return jsxRuntime.jsx(c,{borderWidth:"1px",onClick:()=>{e.onChange(p),t();},title:`${p}`,css:{".fr-button-title":{fontSize:"15px"}}},p)});return jsxRuntime.jsxs(P.Column,{gap:2,children:[jsxRuntime.jsx(P.Row,{gap:2,part:"field-nps",css:{"@media (min-width: 660px)":{flexWrap:"nowrap",justifyContent:"space-between"},flexWrap:"wrap",justifyContent:"center"},children:n}),jsxRuntime.jsxs(P.Row,{justifyContent:"space-between",part:"field-nps-label",children:[jsxRuntime.jsx(C.Caption,{part:"field-nps-left-label",color:"neutral.400",children:(r=o.negativeLabel)!=null?r:"Not likely at all"}),jsxRuntime.jsx(C.Caption,{part:"field-nps-right-label",color:"neutral.400",children:(a=o.positiveLabel)!=null?a:"Extremely likely"})]})]})}function Ve(a){var s=a,{as:e=M,flowId:o,fieldTypes:t,part:n}=s,r=f(s,["as","flowId","fieldTypes","part"]);let{flow:p}=se(o);return jsxRuntime.jsx(Re,i({alignSelf:"end",as:e,flowId:o,fieldTypes:i({nps:er},t),modal:!1,onEscapeKeyDown:c=>{typeof r.onEscapeKeyDown=="function"&&r.onEscapeKeyDown(c),c.defaultPrevented||p.skip();},part:["nps",n],css:l(i({},!p||p.getCurrentStepIndex()==0?{".fr-form-step-footer":{display:"none"}}:{}),{".fr-form":{padding:"20px","@media (min-width: 660px)":{minWidth:"600px"},minWidth:"100%"},".fr-form-step":{gap:"14px","@media (min-width: 660px)":{gap:"1"}}})},r))}function xe(e,{onComplete:o,onDismiss:t}={}){let n=ho.useRef(null);return ho.useEffect(()=>{e!=null&&(e.isCompleted&&n.current===!1&&W(this,null,function*(){yield o==null?void 0:o(e);}),n.current=e==null?void 0:e.isCompleted);},[e==null?void 0:e.isCompleted]),{handleDismiss:ho.useCallback(r=>W(this,null,function*(){if((yield t==null?void 0:t(e,r))===!1)return r.preventDefault(),!1;e.skip();}),[e])}}function no(){let e="DOMRect"in globalThis?new DOMRect:{height:0,width:0,x:0,y:0,bottom:0,top:0,right:0,left:0,toJSON:()=>{}},[o,t]=ho.useState(e),[n,r]=ho.useState(null),a=ho.useCallback(s=>{r(s);},[]);return ho.useLayoutEffect(()=>{if(!n)return;let s=()=>{let p=n.getBoundingClientRect();t(p);};return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[n]),{node:n,rect:o,ref:a}}var hi=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function rr(n){var r=n,{style:e={},part:o=""}=r,t=f(r,["style","part"]);return jsxRuntime.jsxs(g,l(i({part:`dot-wrapper ${o}`,style:i({height:"48px",position:"absolute",width:"48px"},e)},t),{children:[jsxRuntime.jsx(g,{backgroundColor:"primary.surface",part:"dot-pulse",css:{animation:`2s ease-out infinite ${hi}`,borderRadius:"24px",height:"48px",left:0,position:"absolute",top:0,transformOrigin:"center center",width:"48px"}}),jsxRuntime.jsx(g,{backgroundColor:"primary.surface",part:"dot",style:{borderRadius:"12px",height:"24px",left:"12px",position:"absolute",top:"12px",width:"24px"}})]}))}function io(n){var r=n,{part:e,src:o}=r,t=f(r,["part","src"]);return jsxRuntime.jsx(g,i({as:"img",maxWidth:"unset",part:["image",e],src:o},t))}function Ci(e){var o,t,n,r,a;return e.includes("youtube")?`https://www.youtube.com/embed/${(o=e.split("v=")[1])==null?void 0:o.split("&")[0]}`:e.includes("youtu.be")?`https://www.youtube.com/embed/${(t=e.split("youtu.be/")[1])==null?void 0:t.split("&")[0]}`:e.includes("vimeo")?`https://player.vimeo.com/video/${(n=e.split("vimeo.com/")[1])==null?void 0:n.split("&")[0]}`:e.includes("wistia")?`https://fast.wistia.net/embed/iframe/${(r=e.split("wistia.com/medias/")[1])==null?void 0:r.split("&")[0]}`:e.includes("loom")?`https://loom.com/embed/${(a=e.split("loom.com/share/")[1])==null?void 0:a.split("&")[0]}?hideEmbedTopBar=true&hide_title=true&hide_share=true&hide_owner=true`:null}function ao(n){var r=n,{part:e,src:o}=r,t=f(r,["part","src"]);let a=Ci(o);return a?jsxRuntime.jsx(g,i({allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,as:"iframe",backgroundColor:"neutral.100",borderWidth:"0",part:["video",e],src:a},t)):o!=null&&o.endsWith(".mp4")?jsxRuntime.jsx(g,i({as:"video",controls:!0,part:["video",e],src:o},t)):(console.error(`Could not map videoUri ${o} to a known provider (Youtube, Vimeo, Wistia, Loom) or valid mp4 file.`),null)}function de(n){var r=n,{src:e,type:o}=r,t=f(r,["src","type"]);return jsxRuntime.jsx(o==="video"?ao:io,i({src:e},t))}function ir({props:e,alignAttr:o,sideAttr:t}){let n=t!=null?t:"bottom",r={},a=()=>{var u;if(["after","before"].includes(e.align)){if(o=="start")return "before";if(o=="end")return "after"}return (u=e.align)!=null?u:"after"},s="-24px",p={top:"bottom",right:"left",bottom:"top",left:"right"};r[p[n]]=s;let c=a();return ["before","end"].includes(c)?["top","bottom"].includes(n)?r.right=s:r.bottom=s:["after","start"].includes(c)?["top","bottom"].includes(n)?r.left=s:r.top=s:["top","bottom"].includes(n)?r.left=`calc(50% + ${s})`:r.top=`calc(50% + ${s})`,r}var so={content:["align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","forceMount","hideWhenDetached","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenAutoFocus","onPointerDownOutside","side","sideOffset","sticky"],root:["defaultOpen","modal","onOpenChange","open"]};function ar(e,o){var a,s,p,c,u;let t=Object.fromEntries(so.content.map(y=>[y,e[y]]).filter(y=>y[1]!==void 0)),n=Object.fromEntries(so.root.map(y=>[y,e[y]]).filter(y=>y[1]!==void 0)),r={};for(let y of Object.keys(e))!so.content.includes(y)&&!so.root.includes(y)&&(r[y]=e[y]);if(t.align=(a=t.align)!=null?a:"after",t.side=(s=t.side)!=null?s:"bottom",["before","after"].includes(t.align)){let y={after:"end",before:"start"},b=(v,k)=>["top","bottom"].includes(k)?v=="after"?"marginLeft":"marginRight":v=="after"?"marginTop":"marginBottom",x=(p=t.alignOffset)!=null?p:0,m=(c=t.style)!=null?c:{},F=(u=t.side)!=null?u:"bottom",S=t.align;t.style=l(i({},m),{[b(S,F)]:x});let B=["top","bottom"].includes(F)?o.width:o.height;t.alignOffset=(B+x)*-1,t.align=y[S];}return {contentProps:t,otherProps:r,rootProps:n}}var sr=react.keyframes`
77
77
  from {
78
78
  opacity: 0;
79
79
  }
@@ -83,7 +83,7 @@ var Ao=Object.defineProperty,Fr=Object.defineProperties;var vr=Object.getOwnProp
83
83
  to {
84
84
  opacity: 1;
85
85
  }
86
- `;function rr(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function $(s){var p=s,{anchor:e,children:o,className:t,spotlight:r=!1,style:n}=p,a=f(p,["anchor","children","className","spotlight","style"]);let{node:c,rect:m,ref:g}=Qe(),{node:b,rect:x,ref:u}=Qe(),Wo=or(a,m),{contentProps:F,otherProps:$e}=Wo,Be=$e,{part:C}=Be,R=f(Be,["part"]),{rootProps:v}=Wo,[k,E]=mo.useState(F.align),[T,w]=mo.useState(F.side),[D,O]=mo.useState(0),[N,ve]=mo.useState(0);if(c!==null){let z=c.getAttribute("data-align"),Y=c.getAttribute("data-side");k!==z&&E(z),T!==Y&&w(Y);}let se=mo.useRef(null);if(mo.useEffect(()=>{let z=document.querySelector(e);z!=null?(u(z),se.current=z):console.debug(`[frigade] Tooltip: No anchor found for query: ${e}`);},[e]),mo.useEffect(()=>{function z(ye){if(ye.matches(e))return rr(ye)?ye:null;let pe=ye.querySelectorAll(e);return pe.length>0&&rr(pe[0])?pe[0]:null}let Y=new MutationObserver(ye=>{for(let pe of ye)if(pe.type==="childList"){for(let Re of pe.addedNodes){if(Re.nodeType!==Node.ELEMENT_NODE)continue;let de=z(Re);if(de!=null){u(de),se.current=de,console.debug("[frigade] Tooltip: MutationObserver added anchor: ",de);break}}for(let Re of pe.removedNodes){if(Re.nodeType!==Node.ELEMENT_NODE)continue;let de=z(Re);if(de!=null){u(null),se.current=null,console.debug("[frigade] Tooltip: MutationObserver removed anchor: ",de);break}}}});return Y.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>Y.disconnect()},[]),mo.useEffect(()=>{let{scrollX:z,scrollY:Y}=window;O(x.left+z),ve(x.top+Y);},[x.left,x.top]),b==null)return null;let Ve="0";typeof window!="undefined"&&(Ve=window.getComputedStyle(b).borderRadius);let Te=er({props:a,alignAttr:k,sideAttr:T});return jsxRuntime.jsxs(Q__namespace.Root,l(i({defaultOpen:!0},v),{children:[jsxRuntime.jsx(Q__namespace.Anchor,{virtualRef:se}),jsxRuntime.jsx(Q__namespace.Portal,{children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r&&jsxRuntime.jsx(y,i({animation:`${tr} 300ms ease-out`,boxShadow:"0 0 0 20000px rgb(0 0 0 / 0.5)",part:"tooltip-spotlight",pointerEvents:"none",position:"absolute",style:{borderRadius:Ve,height:x.height,left:D,top:N,width:x.width}},a.zIndex!=null?{zIndex:a.zIndex}:{})),jsxRuntime.jsx(Q__namespace.Content,l(i({asChild:!0},F),{ref:g,children:jsxRuntime.jsxs(h,l(i({animation:`${tr} 300ms ease-out`,boxShadow:"md",position:"relative",className:t,maxWidth:"min(360px, calc(100vw - 25px))",part:["tooltip",C],pointerEvents:"auto",style:n},R),{children:[jsxRuntime.jsx(Yt,{style:Te}),o]}))}))]})})]}))}$.Close=e=>jsxRuntime.jsx(Q__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(I.Plain,l(i({css:{top:"0px",right:"-6px"},part:"close",position:"absolute"},e),{children:jsxRuntime.jsx(xe,{height:"20",fill:"currentColor"})}))});$.Media=t=>{var r=t,{src:e}=r,o=f(r,["src"]);return e==null?null:jsxRuntime.jsx(le,i({borderRadius:"md md 0 0",borderWidth:"0",css:{aspectRatio:"2",objectFit:"cover"},margin:"-5 -5 0",src:e},o))};$.Primary=r=>{var n=r,{onClick:e,title:o}=n,t=f(n,["onClick","title"]);return o==null?null:jsxRuntime.jsx(I.Primary,i({title:o,onClick:e},t))};$.Progress=t=>{var r=t,{children:e}=r,o=f(r,["children"]);return e==null?null:jsxRuntime.jsx(S.Body2,l(i({part:"progress"},o),{children:e}))};$.Secondary=r=>{var n=r,{onClick:e,title:o}=n,t=f(n,["onClick","title"]);return o==null?null:jsxRuntime.jsx(I.Secondary,i({title:o,onClick:e},t))};$.Subtitle=t=>{var r=t,{children:e}=r,o=f(r,["children"]);return e==null?null:jsxRuntime.jsx(S.Body2,l(i({part:"subtitle"},o),{children:e}))};$.Title=t=>{var r=t,{children:e}=r,o=f(r,["children"]);return e==null?null:jsxRuntime.jsx(S.H4,l(i({part:"title"},o),{children:e}))};function nr(c){var m=c,{dismissible:e=!0,flow:o,onDismiss:t,onEscapeKeyDown:r,onPrimary:n,onSecondary:a,step:s}=m,p=f(m,["dismissible","flow","onDismiss","onEscapeKeyDown","onPrimary","onSecondary","step"]);var v,k,E,T,w,D;let{handleDismiss:g}=fe(o,{onDismiss:t}),{handlePrimary:b,handleSecondary:x}=re(s,{onPrimary:n,onSecondary:a}),u=(v=s.props)!=null?v:{},F=(E=(k=s.primaryButton)==null?void 0:k.title)!=null?E:s.primaryButtonTitle,C=(w=(T=s.secondaryButton)==null?void 0:T.title)!=null?w:s.secondaryButtonTitle,R=s.$state.blocked;return jsxRuntime.jsxs($,l(i(i({anchor:s.selector,collisionPadding:12,onOpenAutoFocus:O=>O.preventDefault(),onPointerDownOutside:O=>O.preventDefault(),onInteractOutside:O=>O.preventDefault()},p),u),{onEscapeKeyDown:O=>{typeof r=="function"&&r(O),O.defaultPrevented||g(O);},children:[e&&jsxRuntime.jsx($.Close,{onClick:g}),jsxRuntime.jsx($.Media,{src:(D=s.videoUri)!=null?D:s.imageUri,type:s.videoUri?"video":"image"}),jsxRuntime.jsxs(P.Column,{gap:1,part:"tooltip-header",children:[jsxRuntime.jsx($.Title,{children:s.title}),jsxRuntime.jsx($.Subtitle,{color:"neutral.400",children:s.subtitle})]}),jsxRuntime.jsxs(P.Row,{alignItems:"center",gap:3,justifyContent:"flex-end",part:"tooltip-footer",children:[o.getNumberOfAvailableSteps()>1&&jsxRuntime.jsx($.Progress,{marginRight:"auto",transform:"translateY(1px)",children:`${o.getCurrentStepOrder()+1}/${o.getNumberOfAvailableSteps()}`}),jsxRuntime.jsx($.Secondary,{disabled:R,onClick:x,title:C}),jsxRuntime.jsx($.Primary,{disabled:R,onClick:b,title:F})]})]}),s.id)}function We(e,o=!0){let{currentModal:t,modals:r,setModals:n}=mo.useContext(H),[a,s]=mo.useState(!1);mo.useEffect(()=>{o&&(e!=null&&e.isVisible)&&e&&!r.has(e.id)&&n(c=>new Set(c).add(e.id));},[e==null?void 0:e.id,e==null?void 0:e.isVisible]),mo.useEffect(()=>{let c=t===(e==null?void 0:e.id);o&&(e==null?void 0:e.id)!=null&&c!==a&&s(c);},[e==null?void 0:e.id,t]);function p(){o&&r.has(e==null?void 0:e.id)&&n(c=>{let m=new Set(c);return m.delete(e==null?void 0:e.id),m});}return {isCurrentModal:a||!o,removeModal:p}}function Eo(a){var s=a,{flowId:e,onComplete:o,variables:t,part:r}=s,n=f(s,["flowId","onComplete","variables","part"]);let[p,c]=mo.useState(!1),{flow:m}=ie(e,{variables:t}),{hasInitialized:g,registerComponent:b,unregisterComponent:x}=mo.useContext(H);fe(m,{onComplete:o});let{isCurrentModal:u,removeModal:F}=We(m);if(mo.useEffect(()=>{!(m!=null&&m.isVisible)&&u&&F();},[m==null?void 0:m.isVisible,u]),mo.useEffect(()=>()=>{x(e);},[]),m==null||m.isVisible===!1||!u||(b(e,()=>{p||c(!0);}),!g||!p))return null;let C=m.getCurrentStep();return C==null||C.start(),jsxRuntime.jsx(nr,i({"data-flow-id":m.id,flow:m,part:["tour",r],step:C},n))}function lr(e){let[o,t]=mo.useState(),[r,n]=mo.useState(),{flow:a}=ie(r),{frigade:s}=mo.useContext(H);return mo.useEffect(()=>{W(this,null,function*(){var m;let p=yield s.getCollection(e);if(!p||s.hasFailedToLoad()){t(void 0);return}let c=(m=p.flows.find(({flow:g})=>g.isVisible))==null?void 0:m.flow;c!=null&&c.id!==r&&n(c.id),t(p);});},[e,a==null?void 0:a.isVisible]),{collection:o,currentFlow:a}}function Do(r){var n=r,{collectionId:e,part:o}=n,t=f(n,["collectionId","part"]);var c,m,g;let a={ANNOUNCEMENT:Oo,BANNER:fo,CARD:h,CHECKLIST:Je,EMBEDDED_TIP:h,FORM:Fe,NPS_SURVEY:Me,SURVEY:Me,TOUR:Eo},{currentFlow:s}=lr(e),p=(m=a[(c=s==null?void 0:s.rawData)==null?void 0:c.flowType])!=null?m:null;return s==null||p==null?null:((g=s==null?void 0:s.rawData)==null?void 0:g.flowType)===js.FlowType.FORM?jsxRuntime.jsx(y,l(i({part:["collection",o],"data-collection-id":e},t),{children:jsxRuntime.jsx(Fe,{flowId:s.id,as:M},s.id)})):jsxRuntime.jsx(y,l(i({part:["collection",o],"data-collection-id":e},t),{children:jsxRuntime.jsx(p,{flowId:s.id},s.id)}))}function Le(){let{frigade:e}=mo.useContext(H);return {frigade:e,isLoading:!(e!=null&&e.isReady())}}function pr(){let[e,o]=mo.useState(),{frigade:t}=Le();return mo.useEffect(()=>{t.getCollections().then(r=>{r==null||r.forEach((n,a)=>{n.collectionType==="DEFAULT"&&o(a);});});},[]),e==null?null:jsxRuntime.jsx(Do,{as:null,collectionId:e})}var H=mo.createContext({apiKey:"",modals:new Set,setModals:()=>{},currentModal:null,navigate:()=>{},hasInitialized:!1,registerComponent:()=>{},unregisterComponent:()=>{}});function dr(){let{frigade:e}=Le();return mo.useEffect(()=>{W(this,null,function*(){(yield e.getFlows()).forEach(t=>{t.steps.forEach(r=>{if(r.imageUri){let n=new Image;n.src=r.imageUri;}});});});},[]),null}function gr(s){var p=s,{children:e,css:o={},defaultCollection:t=!0,navigate:r,theme:n}=p,a=f(p,["children","css","defaultCollection","navigate","theme"]);let c=n?so(n):{},[m,g]=mo.useState(new Set),b=mo.useRef(new Map),x=mo.useRef(),[u,F]=mo.useState(!1),C=mo.useMemo(()=>(F(!1),x.current=void 0,g(new Set),new js.Frigade(a.apiKey,{apiKey:a.apiKey,apiUrl:a.apiUrl,userId:a.userId,groupId:a.groupId,userProperties:a.userProperties,groupProperties:a.groupProperties,generateGuestId:a.generateGuestId,syncOnWindowUpdates:a.syncOnWindowUpdates,__readOnly:a.__readOnly,__flowStateOverrides:a.__flowStateOverrides})),[a.userId,a.groupId,a.apiKey]);mo.useEffect(()=>{if(a.__flowStateOverrides){let w=C.getConfig();w.__flowStateOverrides=a.__flowStateOverrides,C.reload(w);}},[a.__flowStateOverrides]);function R(){let w=[...b.current.entries()].map(([D,O])=>[D,O.callback]);C.batchRegister(w),F(!0);}function v(w,D){if(x.current&&clearTimeout(x.current),u){b.current.has(w)?C.getFlow(w).then(O=>D(O.isVisible)):(C.getFlow(w).then(O=>O.register(D)),b.current.set(w,{callback:D}));return}b.current.has(w)||b.current.set(w,{callback:D}),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>R(),0);}function k(w){b.current.has(w)&&C.getFlow(w).then(D=>{b.current.delete(w),D==null||D.unregister();});}let E=r!=null?r:(w,D="_self")=>{window.open(w,D);};mo.useEffect(()=>()=>{C.destroy();},[]);let T=m.size>0?m.values().next().value:null;return jsxRuntime.jsxs(H.Provider,{value:l(i({modals:m,setModals:g,currentModal:T,navigate:E},a),{frigade:C,registerComponent:v,unregisterComponent:k,hasInitialized:u}),children:[jsxRuntime.jsx(react.Global,{styles:{":root":i(i(i({},lo),c),o)}}),jsxRuntime.jsxs(react.ThemeProvider,{theme:B,children:[t&&jsxRuntime.jsx(pr,{}),e]}),a.preloadImages!==!1&&jsxRuntime.jsx(dr,{})]})}function ie(e,o){let[t,r]=mo.useState(),[,n]=mo.useState(""),{frigade:a}=mo.useContext(H),s=mo.useCallback(p=>{p.id===e&&(o!=null&&o.variables&&p.applyVariables(o.variables),setTimeout(()=>{r(p),n(Math.random().toString());},0));},[o==null?void 0:o.variables,e,a]);return mo.useEffect(()=>{if(!(!(a!=null&&a.isReady())||e==null))return W(this,null,function*(){let p=yield a.getFlow(e);if(!p||a.hasFailedToLoad()){r(void 0);return}o!=null&&o.variables&&p.applyVariables(o.variables),r(p);}),a.onStateChange(s),()=>{a.removeStateChangeHandler(s);}},[e,a,s]),mo.useEffect(()=>{!(o!=null&&o.variables)||!t||s(t);},[o==null?void 0:o.variables]),{flow:t}}function K(m){var g=m,{as:e,children:o,flowId:t,onComplete:r,onDismiss:n,onPrimary:a,onSecondary:s,variables:p}=g,c=f(g,["as","children","flowId","onComplete","onDismiss","onPrimary","onSecondary","variables"]);var Be,Y;let[b,x]=mo.useState(!1),{flow:u}=ie(t,{variables:p}),z=i(i({},(Be=u==null?void 0:u.props)!=null?Be:{}),c),{dismissible:F=!1,forceMount:C=!1,modal:R=!1}=z,v=f(z,["dismissible","forceMount","modal"]),{hasInitialized:k,registerComponent:E,unregisterComponent:T}=mo.useContext(H),w=u==null?void 0:u.getCurrentStep(),{handleDismiss:D}=fe(u,{onComplete:r,onDismiss:n}),{handlePrimary:O,handleSecondary:N}=re(w,{onPrimary:a,onSecondary:s}),ve=R||typeof e=="function"&&(e==null?void 0:e.displayName)==="Dialog"||[js.FlowType.ANNOUNCEMENT,js.FlowType.TOUR].includes((Y=u==null?void 0:u.rawData)==null?void 0:Y.flowType),{isCurrentModal:se,removeModal:Ve}=We(u,ve);mo.useEffect(()=>{!(u!=null&&u.isVisible)&&se&&Ve();},[u==null?void 0:u.isVisible,se]),mo.useEffect(()=>()=>{T(t);},[]),mo.useEffect(()=>{(u!=null&&u.isCompleted||u!=null&&u.isSkipped)&&T(t);},[u==null?void 0:u.isCompleted,u==null?void 0:u.isSkipped]);let Te=C&&((u==null?void 0:u.isCompleted)||(u==null?void 0:u.isSkipped));if(!u||!Te&&!se||(E(t,()=>{b||x(!0);}),!u.isVisible&&!Te)||!k||!b)return null;(Te||!u.isCompleted&&!u.isSkipped)&&w.start();let Wo=e===null?mo.Fragment:e!=null?e:y,$e=l(i({},v),{"data-flow-id":u.id});return jsxRuntime.jsx(Wo,l(i({},e===null?{}:$e),{children:o({flow:u,handleDismiss:D,handlePrimary:O,handleSecondary:N,parentProps:{dismissible:F,flowId:t,variables:p,containerProps:$e},step:w})}))}function Pr(t){var r=t,{part:e}=r,o=f(r,["part"]);return jsxRuntime.jsx(K,l(i({as:h,gap:5,borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",part:["card",e]},o),{children:({handleDismiss:n,handlePrimary:a,handleSecondary:s,parentProps:{dismissible:p},step:c})=>{var b,x,u,F;let m=(x=(b=c.primaryButton)==null?void 0:b.title)!=null?x:c.primaryButtonTitle,g=(F=(u=c.secondaryButton)==null?void 0:u.title)!=null?F:c.secondaryButtonTitle;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(h.Header,{dismissible:p,handleDismiss:n,subtitle:c.subtitle,title:c.title}),jsxRuntime.jsx(h.Media,{src:c.imageUri,css:{objectFit:"contain",width:"100%"}}),jsxRuntime.jsxs(P.Row,{gap:3,justifyContent:"flex-end",part:"card-footer",children:[jsxRuntime.jsx(h.Secondary,{title:g,onClick:s}),jsxRuntime.jsx(h.Primary,{title:m,onClick:a})]})]})}}))}var h=mo__namespace.forwardRef((n,r)=>{var a=n,{children:e,flowId:o}=a,t=f(a,["children","flowId"]);var p;if(o!=null)return jsxRuntime.jsx(Pr,i({flowId:o},t));let s=(p=t.as)!=null?p:P.Column;return jsxRuntime.jsx(s,l(i({backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderRadius:"md",borderWidth:"0",gap:5,p:5},t),{ref:r,children:e}))});h.Dismiss=e=>jsxRuntime.jsx(I.Plain,l(i({part:"dismiss",padding:0},e),{children:jsxRuntime.jsx(xe,{height:"20",fill:"currentColor"})}));h.Header=a=>{var s=a,{dismissible:e,handleDismiss:o,subtitle:t,title:r}=s,n=f(s,["dismissible","handleDismiss","subtitle","title"]);return jsxRuntime.jsxs(P.Row,l(i({alignItems:"flex-start",flexWrap:"wrap",gap:1,part:"card-header"},n),{children:[jsxRuntime.jsx(h.Title,{maxWidth:"calc(100% - 32px)",children:r}),e&&jsxRuntime.jsx(h.Dismiss,{onClick:o,marginLeft:"auto"}),jsxRuntime.jsx(h.Subtitle,{color:"neutral.400",flexBasis:"100%",children:t})]}))};h.Media=t=>{var r=t,{src:e}=r,o=f(r,["src"]);return e==null||(e==null?void 0:e.length)===0?null:jsxRuntime.jsx(le,i({borderRadius:"md",src:e},o))};h.Primary=r=>{var n=r,{onClick:e,title:o}=n,t=f(n,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsxRuntime.jsx(I.Primary,i({title:o,onClick:e},t))};h.Secondary=r=>{var n=r,{onClick:e,title:o}=n,t=f(n,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsxRuntime.jsx(I.Secondary,i({title:o,onClick:e},t))};h.Subtitle=t=>{var r=t,{children:e}=r,o=f(r,["children"]);return e==null?null:jsxRuntime.jsx(S.Body2,l(i({display:"block",color:"neutral.400",part:"subtitle"},o),{children:e}))};h.Title=t=>{var r=t,{children:e}=r,o=f(r,["children"]);return e==null?null:jsxRuntime.jsx(S.H4,l(i({display:"block",part:"title"},o),{children:e}))};var io={content:["onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onInteractOutside"],root:["defaultOpen","modal","onOpenChange","open"]};function Sr(e){let o=Object.fromEntries(io.content.map(n=>[n,e[n]]).filter(n=>n[1]!==void 0)),t=Object.fromEntries(io.root.map(n=>[n,e[n]]).filter(n=>n[1]!==void 0)),r={};for(let n of Object.keys(e))!io.content.some(a=>a===n)&&!io.root.some(a=>a===n)&&(r[n]=e[n]);return {contentProps:o,otherProps:r,rootProps:t}}var Ji=react.keyframes`
86
+ `;function lr(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function $(s){var p=s,{anchor:e,children:o,className:t,spotlight:n=!1,style:r}=p,a=f(p,["anchor","children","className","spotlight","style"]);let{node:c,rect:u,ref:y}=no(),{node:b,rect:x,ref:m}=no(),$o=ar(a,u),{contentProps:F,otherProps:_e}=$o,Ee=_e,{part:S}=Ee,B=f(Ee,["part"]),{rootProps:v}=$o,[k,E]=ho.useState(F.align),[T,w]=ho.useState(F.side),[D,O]=ho.useState(0),[q,N]=ho.useState(0);if(c!==null){let _=c.getAttribute("data-align"),ee=c.getAttribute("data-side");k!==_&&E(_),T!==ee&&w(ee);}let K=ho.useRef(null);if(ho.useEffect(()=>{let _=document.querySelector(e);_!=null?(m(_),K.current=_):console.debug(`[frigade] Tooltip: No anchor found for query: ${e}`);},[e]),ho.useEffect(()=>{function _(be){if(be.matches(e))return lr(be)?be:null;let ue=be.querySelectorAll(e);return ue.length>0&&lr(ue[0])?ue[0]:null}let ee=new MutationObserver(be=>{for(let ue of be)if(ue.type==="childList"){for(let De of ue.addedNodes){if(De.nodeType!==Node.ELEMENT_NODE)continue;let me=_(De);if(me!=null){m(me),K.current=me,console.debug("[frigade] Tooltip: MutationObserver added anchor: ",me);break}}for(let De of ue.removedNodes){if(De.nodeType!==Node.ELEMENT_NODE)continue;let me=_(De);if(me!=null){m(null),K.current=null,console.debug("[frigade] Tooltip: MutationObserver removed anchor: ",me);break}}}});return ee.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>ee.disconnect()},[]),ho.useEffect(()=>{let{scrollX:_,scrollY:ee}=window;O(x.left+_),N(x.top+ee);},[x.left,x.top]),b==null)return null;let ce="0";typeof window!="undefined"&&(ce=window.getComputedStyle(b).borderRadius);let ke=ir({props:a,alignAttr:k,sideAttr:T});return jsxRuntime.jsxs(oe__namespace.Root,l(i({defaultOpen:!0},v),{children:[jsxRuntime.jsx(oe__namespace.Anchor,{virtualRef:K}),jsxRuntime.jsx(oe__namespace.Portal,{children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[n&&jsxRuntime.jsx(g,i({animation:`${sr} 300ms ease-out`,boxShadow:"0 0 0 20000px rgb(0 0 0 / 0.5)",part:"tooltip-spotlight",pointerEvents:"none",position:"absolute",style:{borderRadius:ce,height:x.height,left:D,top:q,width:x.width}},a.zIndex!=null?{zIndex:a.zIndex}:{})),jsxRuntime.jsx(oe__namespace.Content,l(i({asChild:!0},F),{ref:y,children:jsxRuntime.jsxs(h,l(i({animation:`${sr} 300ms ease-out`,boxShadow:"md",position:"relative",className:t,maxWidth:"min(360px, calc(100vw - 25px))",part:["tooltip",S],pointerEvents:"auto",style:r},B),{children:[jsxRuntime.jsx(rr,{style:ke}),o]}))}))]})})]}))}$.Close=e=>jsxRuntime.jsx(oe__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(I.Plain,l(i({css:{top:"0px",right:"-6px"},part:"close",position:"absolute"},e),{children:jsxRuntime.jsx(Pe,{height:"20",fill:"currentColor"})}))});$.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null?null:jsxRuntime.jsx(de,i({borderRadius:"md md 0 0",borderWidth:"0",css:{aspectRatio:"2",objectFit:"cover"},margin:"-5 -5 0",src:e},o))};$.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(I.Primary,i({title:o,onClick:e},t))};$.Progress=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(C.Body2,l(i({part:"progress"},o),{children:e}))};$.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(I.Secondary,i({title:o,onClick:e},t))};$.Subtitle=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(C.Body2,l(i({part:"subtitle"},o),{children:e}))};$.Title=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(C.H4,l(i({part:"title"},o),{children:e}))};function pr(c){var u=c,{dismissible:e=!0,flow:o,onDismiss:t,onEscapeKeyDown:n,onPrimary:r,onSecondary:a,step:s}=u,p=f(u,["dismissible","flow","onDismiss","onEscapeKeyDown","onPrimary","onSecondary","step"]);var v,k,E,T,w,D;let{handleDismiss:y}=xe(o,{onDismiss:t}),{handlePrimary:b,handleSecondary:x}=ie(s,{onPrimary:r,onSecondary:a}),m=(v=s.props)!=null?v:{},F=(E=(k=s.primaryButton)==null?void 0:k.title)!=null?E:s.primaryButtonTitle,S=(w=(T=s.secondaryButton)==null?void 0:T.title)!=null?w:s.secondaryButtonTitle,B=s.$state.blocked;return jsxRuntime.jsxs($,l(i(i({anchor:s.selector,collisionPadding:12,onOpenAutoFocus:O=>O.preventDefault(),onPointerDownOutside:O=>O.preventDefault(),onInteractOutside:O=>O.preventDefault()},p),m),{onEscapeKeyDown:O=>{typeof n=="function"&&n(O),O.defaultPrevented||y(O);},children:[e&&jsxRuntime.jsx($.Close,{onClick:y}),jsxRuntime.jsx($.Media,{src:(D=s.videoUri)!=null?D:s.imageUri,type:s.videoUri?"video":"image"}),jsxRuntime.jsxs(P.Column,{gap:1,part:"tooltip-header",children:[jsxRuntime.jsx($.Title,{children:s.title}),jsxRuntime.jsx($.Subtitle,{color:"neutral.400",children:s.subtitle})]}),jsxRuntime.jsxs(P.Row,{alignItems:"center",gap:3,justifyContent:"flex-end",part:"tooltip-footer",children:[o.getNumberOfAvailableSteps()>1&&jsxRuntime.jsx($.Progress,{marginRight:"auto",transform:"translateY(1px)",children:`${o.getCurrentStepOrder()+1}/${o.getNumberOfAvailableSteps()}`}),jsxRuntime.jsx($.Secondary,{disabled:B,onClick:x,title:S}),jsxRuntime.jsx($.Primary,{disabled:B,onClick:b,title:F})]})]}),s.id)}function $e(e,o=!0){let{currentModal:t,modals:n,setModals:r}=ho.useContext(H),[a,s]=ho.useState(!1);ho.useEffect(()=>{o&&(e!=null&&e.isVisible)&&e&&!n.has(e.id)&&r(c=>new Set(c).add(e.id));},[e==null?void 0:e.id,e==null?void 0:e.isVisible]),ho.useEffect(()=>{let c=t===(e==null?void 0:e.id);o&&(e==null?void 0:e.id)!=null&&c!==a&&s(c);},[e==null?void 0:e.id,t]);function p(){o&&n.has(e==null?void 0:e.id)&&r(c=>{let u=new Set(c);return u.delete(e==null?void 0:e.id),u});}return {isCurrentModal:a||!o,removeModal:p}}function Ho(a){var s=a,{flowId:e,onComplete:o,variables:t,part:n}=s,r=f(s,["flowId","onComplete","variables","part"]);let[p,c]=ho.useState(!1),{flow:u}=se(e,{variables:t}),{hasInitialized:y,registerComponent:b,unregisterComponent:x}=ho.useContext(H);xe(u,{onComplete:o});let{isCurrentModal:m,removeModal:F}=$e(u);if(ho.useEffect(()=>{!(u!=null&&u.isVisible)&&m&&F();},[u==null?void 0:u.isVisible,m]),ho.useEffect(()=>()=>{x(e);},[]),u==null||u.isVisible===!1||!m||(b(e,()=>{p||c(!0);}),!y||!p))return null;let S=u.getCurrentStep();return S==null||S.start(),jsxRuntime.jsx(pr,i({"data-flow-id":u.id,flow:u,part:["tour",n],step:S},r))}function mr(e){let[o,t]=ho.useState(),[n,r]=ho.useState(),{flow:a}=se(n),{frigade:s}=ho.useContext(H);return ho.useEffect(()=>{W(this,null,function*(){var u;let p=yield s.getCollection(e);if(!p||s.hasFailedToLoad()){t(void 0);return}let c=(u=p.flows.find(({flow:y})=>y.isVisible))==null?void 0:u.flow;c!=null&&c.id!==n&&r(c.id),t(p);});},[e,a==null?void 0:a.isVisible]),{collection:o,currentFlow:a}}function Mo(n){var r=n,{collectionId:e,part:o}=r,t=f(r,["collectionId","part"]);var c,u,y;let a={ANNOUNCEMENT:Wo,BANNER:bo,CARD:h,CHECKLIST:Ze,EMBEDDED_TIP:h,FORM:Re,NPS_SURVEY:Ve,SURVEY:Ve,TOUR:Ho},{currentFlow:s}=mr(e),p=(u=a[(c=s==null?void 0:s.rawData)==null?void 0:c.flowType])!=null?u:null;return s==null||p==null?null:((y=s==null?void 0:s.rawData)==null?void 0:y.flowType)===js.FlowType.FORM?jsxRuntime.jsx(g,l(i({part:["collection",o],"data-collection-id":e},t),{children:jsxRuntime.jsx(Re,{flowId:s.id,as:M},s.id)})):jsxRuntime.jsx(g,l(i({part:["collection",o],"data-collection-id":e},t),{children:jsxRuntime.jsx(p,{flowId:s.id},s.id)}))}function Ne(){let{frigade:e}=ho.useContext(H);return {frigade:e,isLoading:!(e!=null&&e.isReady())}}function fr(){let[e,o]=ho.useState(),{frigade:t}=Ne();return ho.useEffect(()=>{t.getCollections().then(n=>{n==null||n.forEach((r,a)=>{r.collectionType==="DEFAULT"&&o(a);});});},[]),e==null?null:jsxRuntime.jsx(Mo,{as:null,collectionId:e})}var H=ho.createContext({apiKey:"",modals:new Set,setModals:()=>{},currentModal:null,navigate:()=>{},hasInitialized:!1,registerComponent:()=>{},unregisterComponent:()=>{}});function gr(){let{frigade:e}=Ne();return ho.useEffect(()=>{W(this,null,function*(){(yield e.getFlows()).forEach(t=>{t.steps.forEach(n=>{if(n.imageUri){let r=new Image;r.src=n.imageUri;}});});});},[]),null}function Pr(s){var p=s,{children:e,css:o={},defaultCollection:t=!0,navigate:n,theme:r}=p,a=f(p,["children","css","defaultCollection","navigate","theme"]);let c=r?mo(r):{},[u,y]=ho.useState(new Set),b=ho.useRef(new Map),x=ho.useRef(),[m,F]=ho.useState(!1),S=ho.useMemo(()=>(F(!1),x.current=void 0,y(new Set),new js.Frigade(a.apiKey,{apiKey:a.apiKey,apiUrl:a.apiUrl,userId:a.userId,groupId:a.groupId,userProperties:a.userProperties,groupProperties:a.groupProperties,generateGuestId:a.generateGuestId,syncOnWindowUpdates:a.syncOnWindowUpdates,__readOnly:a.__readOnly,__flowStateOverrides:a.__flowStateOverrides})),[a.userId,a.groupId,a.apiKey]);ho.useEffect(()=>{if(a.__flowStateOverrides){let w=S.getConfig();w.__flowStateOverrides=a.__flowStateOverrides,S.reload(w);}},[a.__flowStateOverrides]);function B(){let w=[...b.current.entries()].map(([D,O])=>[D,O.callback]);S.batchRegister(w),F(!0);}function v(w,D){if(x.current&&clearTimeout(x.current),m){b.current.has(w)?S.getFlow(w).then(O=>D(O.isVisible)):(S.getFlow(w).then(O=>O.register(D)),b.current.set(w,{callback:D}));return}b.current.has(w)||b.current.set(w,{callback:D}),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>B(),0);}function k(w){b.current.has(w)&&S.getFlow(w).then(D=>{b.current.delete(w),D==null||D.unregister();});}let E=n!=null?n:(w,D="_self")=>{window.open(w,D);};ho.useEffect(()=>()=>{S.destroy();},[]);let T=u.size>0?u.values().next().value:null;return jsxRuntime.jsxs(H.Provider,{value:l(i({modals:u,setModals:y,currentModal:T,navigate:E},a),{frigade:S,registerComponent:v,unregisterComponent:k,hasInitialized:m}),children:[jsxRuntime.jsx(react.Global,{styles:{":root":i(i(i({},fo),c),o)}}),jsxRuntime.jsxs(react.ThemeProvider,{theme:R,children:[t&&jsxRuntime.jsx(fr,{}),e]}),a.preloadImages!==!1&&jsxRuntime.jsx(gr,{})]})}function se(e,o){let[t,n]=ho.useState(),[,r]=ho.useState(""),{frigade:a}=ho.useContext(H),s=ho.useCallback(p=>{p.id===e&&(o!=null&&o.variables&&p.applyVariables(o.variables),setTimeout(()=>{n(p),r(Math.random().toString());},0));},[o==null?void 0:o.variables,e,a]);return ho.useEffect(()=>{if(!(!(a!=null&&a.isReady())||e==null))return W(this,null,function*(){let p=yield a.getFlow(e);if(!p||a.hasFailedToLoad()){n(void 0);return}o!=null&&o.variables&&p.applyVariables(o.variables),n(p);}),a.onStateChange(s),()=>{a.removeStateChangeHandler(s);}},[e,a,s]),ho.useEffect(()=>{!(o!=null&&o.variables)||!t||s(t);},[o==null?void 0:o.variables]),{flow:t}}function j(u){var y=u,{as:e,children:o,flowId:t,onComplete:n,onDismiss:r,onPrimary:a,onSecondary:s,variables:p}=y,c=f(y,["as","children","flowId","onComplete","onDismiss","onPrimary","onSecondary","variables"]);var Ee,ee;let[b,x]=ho.useState(!1),{flow:m}=se(t,{variables:p}),_=i(i({},(Ee=m==null?void 0:m.props)!=null?Ee:{}),c),{dismissible:F=!1,forceMount:S=!1,modal:B=!1}=_,v=f(_,["dismissible","forceMount","modal"]),{hasInitialized:k,registerComponent:E,unregisterComponent:T}=ho.useContext(H),w=m==null?void 0:m.getCurrentStep(),{handleDismiss:D}=xe(m,{onComplete:n,onDismiss:r}),{handlePrimary:O,handleSecondary:q}=ie(w,{onPrimary:a,onSecondary:s}),N=B||typeof e=="function"&&(e==null?void 0:e.displayName)==="Dialog"||[js.FlowType.ANNOUNCEMENT,js.FlowType.TOUR].includes((ee=m==null?void 0:m.rawData)==null?void 0:ee.flowType),{isCurrentModal:K,removeModal:ce}=$e(m,N);ho.useEffect(()=>{!(m!=null&&m.isVisible)&&K&&ce();},[m==null?void 0:m.isVisible,K]),ho.useEffect(()=>()=>{T(t);},[]),ho.useEffect(()=>{(m!=null&&m.isCompleted||m!=null&&m.isSkipped)&&T(t);},[m==null?void 0:m.isCompleted,m==null?void 0:m.isSkipped]);let ke=S&&((m==null?void 0:m.isCompleted)||(m==null?void 0:m.isSkipped));if(!m||!ke&&!K||(E(t,()=>{b||x(!0);}),!m.isVisible&&!ke)||!k||!b)return null;(ke||!m.isCompleted&&!m.isSkipped)&&w.start();let $o=e===null?ho.Fragment:e!=null?e:g,_e=l(i({},v),{"data-flow-id":m.id});return jsxRuntime.jsx($o,l(i({},e===null?{}:_e),{children:o({flow:m,handleDismiss:D,handlePrimary:O,handleSecondary:q,parentProps:{dismissible:F,flowId:t,variables:p,containerProps:_e},step:w})}))}function vr(t){var n=t,{part:e}=n,o=f(n,["part"]);return jsxRuntime.jsx(j,l(i({as:h,gap:5,borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",part:["card",e]},o),{children:({handleDismiss:r,handlePrimary:a,handleSecondary:s,parentProps:{dismissible:p},step:c})=>{var b,x,m,F;let u=(x=(b=c.primaryButton)==null?void 0:b.title)!=null?x:c.primaryButtonTitle,y=(F=(m=c.secondaryButton)==null?void 0:m.title)!=null?F:c.secondaryButtonTitle;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(h.Header,{dismissible:p,handleDismiss:r,subtitle:c.subtitle,title:c.title}),jsxRuntime.jsx(h.Media,{src:c.imageUri,css:{objectFit:"contain",width:"100%"}}),jsxRuntime.jsxs(P.Row,{gap:3,justifyContent:"flex-end",part:"card-footer",children:[jsxRuntime.jsx(h.Secondary,{title:y,onClick:s}),jsxRuntime.jsx(h.Primary,{title:u,onClick:a})]})]})}}))}var h=ho__namespace.forwardRef((r,n)=>{var a=r,{children:e,flowId:o}=a,t=f(a,["children","flowId"]);var p;if(o!=null)return jsxRuntime.jsx(vr,i({flowId:o},t));let s=(p=t.as)!=null?p:P.Column;return jsxRuntime.jsx(s,l(i({backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderRadius:"md",borderWidth:"0",gap:5,p:5},t),{ref:n,children:e}))});h.Dismiss=e=>jsxRuntime.jsx(I.Plain,l(i({part:"dismiss",padding:0},e),{children:jsxRuntime.jsx(Pe,{height:"20",fill:"currentColor"})}));h.Header=a=>{var s=a,{dismissible:e,handleDismiss:o,subtitle:t,title:n}=s,r=f(s,["dismissible","handleDismiss","subtitle","title"]);return jsxRuntime.jsxs(P.Row,l(i({alignItems:"flex-start",flexWrap:"wrap",gap:1,part:"card-header"},r),{children:[jsxRuntime.jsx(h.Title,{maxWidth:"calc(100% - 32px)",children:n}),e&&jsxRuntime.jsx(h.Dismiss,{onClick:o,marginLeft:"auto"}),jsxRuntime.jsx(h.Subtitle,{color:"neutral.400",flexBasis:"100%",children:t})]}))};h.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null||(e==null?void 0:e.length)===0?null:jsxRuntime.jsx(de,i({borderRadius:"md",src:e},o))};h.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsxRuntime.jsx(I.Primary,i({title:o,onClick:e},t))};h.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsxRuntime.jsx(I.Secondary,i({title:o,onClick:e},t))};h.Subtitle=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(C.Body2,l(i({display:"block",color:"neutral.400",part:"subtitle"},o),{children:e}))};h.Title=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(C.H4,l(i({display:"block",part:"title"},o),{children:e}))};var co={content:["onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onInteractOutside"],root:["defaultOpen","modal","onOpenChange","open"]};function Br(e){let o=Object.fromEntries(co.content.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),t=Object.fromEntries(co.root.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),n={};for(let r of Object.keys(e))!co.content.some(a=>a===r)&&!co.root.some(a=>a===r)&&(n[r]=e[r]);return {contentProps:o,otherProps:n,rootProps:t}}var Qi=react.keyframes`
87
87
  from {
88
88
  opacity: 0;
89
89
  }
@@ -93,44 +93,44 @@ var Ao=Object.defineProperty,Fr=Object.defineProperties;var vr=Object.getOwnProp
93
93
  to {
94
94
  opacity: 1;
95
95
  }
96
- `;function M(n){var a=n,{children:e,className:o,modal:t=!0}=a,r=f(a,["children","className","modal"]);let{rootProps:s,contentProps:p,otherProps:g}=Sr(r),b=g,{zIndex:c}=b,m=f(b,["zIndex"]);return jsxRuntime.jsx(U__namespace.Root,l(i({defaultOpen:!0,modal:t},s),{children:jsxRuntime.jsx(U__namespace.Portal,{children:jsxRuntime.jsxs(y,{animation:`${Ji} 300ms ease-out`,className:o,display:"grid",inset:"0",padding:"6",part:"dialog-wrapper",pointerEvents:"none",position:"fixed",zIndex:c!=null?c:10,children:[jsxRuntime.jsx(U__namespace.Overlay,{asChild:!0,children:jsxRuntime.jsx(y,{background:"rgb(0 0 0 / 0.5)",inset:"0",part:"dialog-overlay",position:"absolute"})}),jsxRuntime.jsx(U__namespace.Content,l(i({asChild:!0,onOpenAutoFocus:x=>x.preventDefault(),onPointerDownOutside:x=>x.preventDefault(),onInteractOutside:x=>x.preventDefault()},p),{children:jsxRuntime.jsx(h,l(i({alignSelf:"center",boxShadow:"md",justifySelf:"center",maxWidth:"430px",p:8,part:"dialog",pointerEvents:"auto",position:"relative"},m),{children:e}))}))]})})}))}M.Dismiss=e=>jsxRuntime.jsx(U__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(I.Plain,l(i({part:"close",position:"absolute",right:"2px",top:"2px"},e),{children:jsxRuntime.jsx(xe,{height:"20",fill:"currentColor"})}))});M.Subtitle=t=>{var r=t,{children:e}=r,o=f(r,["children"]);return jsxRuntime.jsx(U__namespace.Description,{asChild:!0,children:jsxRuntime.jsx(S.Body2,l(i({part:"subtitle"},o),{children:e}))})};M.Media=t=>{var r=t,{src:e}=r,o=f(r,["src"]);return e==null?null:jsxRuntime.jsx(le,i({borderRadius:"md",src:e},o))};M.Primary=r=>{var n=r,{onClick:e,title:o}=n,t=f(n,["onClick","title"]);return o==null?null:jsxRuntime.jsx(I.Primary,i({title:o,onClick:e},t))};M.ProgressDots=({current:e,total:o})=>{if(o==1)return null;let t=[...Array(o)].map((r,n)=>jsxRuntime.jsx(y,{as:"circle",r:4,cx:4+16*n,cy:"4px",fill:e===n?B.colors.blue500:B.colors.blue800,part:e===n?"progress-dot-selected":"progress-dot"},n));return jsxRuntime.jsx(y,{as:"svg",height:"8px",marginInline:"auto",part:"progress",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8,children:t})};M.Secondary=r=>{var n=r,{onClick:e,title:o}=n,t=f(n,["onClick","title"]);return o==null?null:jsxRuntime.jsx(I.Secondary,i({title:o,onClick:e},t))};M.Title=t=>{var r=t,{children:e}=r,o=f(r,["children"]);return jsxRuntime.jsx(U__namespace.Title,{asChild:!0,children:jsxRuntime.jsx(S.H4,l(i({part:"title"},o),{children:e}))})};M.displayName="Dialog";var wr=["dismissible","flowId","forceMount","onComplete","onDismiss","onPrimary","onSecondary","variables"];function Oo(r){var n=r,{flowId:e,part:o}=n,t=f(n,["flowId","part"]);let a=Object.fromEntries(Object.entries(t).filter(([p])=>wr.some(c=>p===c))),s=Object.fromEntries(Object.entries(t).filter(([p])=>wr.indexOf(p)===-1));return jsxRuntime.jsx(K,l(i({as:null,flowId:e},a),{children:({flow:p,handleDismiss:c,handlePrimary:m,handleSecondary:g,parentProps:{containerProps:b,dismissible:x},step:u})=>{var k,E,T,w,D,O;let F=(k=u.props)!=null?k:{},C=(T=(E=u.primaryButton)==null?void 0:E.title)!=null?T:u.primaryButtonTitle,R=(D=(w=u.secondaryButton)==null?void 0:w.title)!=null?D:u.secondaryButtonTitle,v=u.$state.blocked;return jsxRuntime.jsx(M,l(i(i({part:["announcement",o],textAlign:"center"},b),s),{onEscapeKeyDown:N=>{if(t.dismissible===!1){N.preventDefault();return}typeof t.onEscapeKeyDown=="function"&&t.onEscapeKeyDown(N),N.defaultPrevented||c(N);},children:jsxRuntime.jsxs(P.Column,l(i({gap:5,part:"announcement-step"},F),{children:[x&&jsxRuntime.jsx(M.Dismiss,{onClick:c}),jsxRuntime.jsxs(P.Column,{gap:1,part:"announcement-header",children:[jsxRuntime.jsx(M.Title,{children:u.title}),jsxRuntime.jsx(M.Subtitle,{children:u.subtitle})]}),jsxRuntime.jsx(M.Media,{src:(O=u.videoUri)!=null?O:u.imageUri,type:u.videoUri?"video":"image",css:{aspectRatio:"1.5",objectFit:"cover",width:"100%"}}),jsxRuntime.jsx(M.ProgressDots,{current:p.getCurrentStepIndex(),total:p.getNumberOfAvailableSteps()}),jsxRuntime.jsxs(P.Row,{css:{"& > button":{flexBasis:"50%",flexGrow:1}},gap:3,part:"announcement-footer",children:[R&&jsxRuntime.jsx(M.Secondary,{disabled:v,onClick:g,title:R}),C&&jsxRuntime.jsx(M.Primary,{disabled:v,onClick:m,title:C})]})]}))}))}}))}function Zi(){let{userId:e,frigade:o}=mo.useContext(H);function t(n){return W(this,null,function*(){yield o.identify(e,n);})}function r(n,a){return W(this,null,function*(){yield o.track(n,a);})}return {userId:e,addProperties:t,track:r}}function Qi(){var n;let{frigade:e}=mo.useContext(H);function o(a){return W(this,null,function*(){if(!e.config.groupId){console.error("No Group ID is set. Cannot set properties without a Group ID.");return}yield e.group(e.config.groupId,a);})}function t(a,s){return W(this,null,function*(){yield e.track(a,s);})}function r(a,s){return W(this,null,function*(){yield e.group(a,s);})}return {groupId:(n=e==null?void 0:e.config)==null?void 0:n.groupId,setGroupId:r,addProperties:o,track:t}}
96
+ `;function M(r){var a=r,{children:e,className:o,modal:t=!0}=a,n=f(a,["children","className","modal"]);let{rootProps:s,contentProps:p,otherProps:y}=Br(n),b=y,{zIndex:c}=b,u=f(b,["zIndex"]);return jsxRuntime.jsx(U__namespace.Root,l(i({defaultOpen:!0,modal:t},s),{children:jsxRuntime.jsx(U__namespace.Portal,{children:jsxRuntime.jsxs(g,{animation:`${Qi} 300ms ease-out`,className:o,display:"grid",inset:"0",padding:"6",part:"dialog-wrapper",pointerEvents:"none",position:"fixed",zIndex:c!=null?c:10,children:[jsxRuntime.jsx(U__namespace.Overlay,{asChild:!0,children:jsxRuntime.jsx(g,{background:"rgb(0 0 0 / 0.5)",inset:"0",part:"dialog-overlay",position:"absolute"})}),jsxRuntime.jsx(U__namespace.Content,l(i({asChild:!0,onOpenAutoFocus:x=>x.preventDefault(),onPointerDownOutside:x=>x.preventDefault(),onInteractOutside:x=>x.preventDefault()},p),{children:jsxRuntime.jsx(h,l(i({alignSelf:"center",boxShadow:"md",justifySelf:"center",maxHeight:"100%",maxWidth:"430px",overflowY:"auto",padding:8,part:"dialog",pointerEvents:"auto",position:"relative"},u),{children:e}))}))]})})}))}M.Dismiss=e=>jsxRuntime.jsx(U__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(I.Plain,l(i({part:"close",position:"absolute",right:"2px",top:"2px"},e),{children:jsxRuntime.jsx(Pe,{height:"20",fill:"currentColor"})}))});M.Subtitle=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(U__namespace.Description,{asChild:!0,children:jsxRuntime.jsx(C.Body2,l(i({part:"subtitle"},o),{children:e}))})};M.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null?null:jsxRuntime.jsx(de,i({borderRadius:"md",src:e},o))};M.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(I.Primary,i({title:o,onClick:e},t))};M.ProgressDots=({current:e,total:o})=>{if(o==1)return null;let t=[...Array(o)].map((n,r)=>jsxRuntime.jsx(g,{as:"circle",r:4,cx:4+16*r,cy:"4px",fill:e===r?R.colors.blue500:R.colors.blue800,part:e===r?"progress-dot-selected":"progress-dot"},r));return jsxRuntime.jsx(g,{as:"svg",height:"8px",marginInline:"auto",part:"progress",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8,children:t})};M.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(I.Secondary,i({title:o,onClick:e},t))};M.Title=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(U__namespace.Title,{asChild:!0,children:jsxRuntime.jsx(C.H4,l(i({part:"title"},o),{children:e}))})};M.displayName="Dialog";var Rr=["dismissible","flowId","forceMount","onComplete","onDismiss","onPrimary","onSecondary","variables"];function Wo(n){var r=n,{flowId:e,part:o}=r,t=f(r,["flowId","part"]);let a=Object.fromEntries(Object.entries(t).filter(([p])=>Rr.some(c=>p===c))),s=Object.fromEntries(Object.entries(t).filter(([p])=>Rr.indexOf(p)===-1));return jsxRuntime.jsx(j,l(i({as:null,flowId:e},a),{children:({flow:p,handleDismiss:c,handlePrimary:u,handleSecondary:y,parentProps:{containerProps:b,dismissible:x},step:m})=>{var k,E,T,w,D,O;let F=(k=m.props)!=null?k:{},S=(T=(E=m.primaryButton)==null?void 0:E.title)!=null?T:m.primaryButtonTitle,B=(D=(w=m.secondaryButton)==null?void 0:w.title)!=null?D:m.secondaryButtonTitle,v=m.$state.blocked;return jsxRuntime.jsx(M,l(i(i({part:["announcement",o],textAlign:"center"},b),s),{onEscapeKeyDown:q=>{if(t.dismissible===!1){q.preventDefault();return}typeof t.onEscapeKeyDown=="function"&&t.onEscapeKeyDown(q),q.defaultPrevented||c(q);},children:jsxRuntime.jsxs(P.Column,l(i({gap:5,part:"announcement-step"},F),{children:[x&&jsxRuntime.jsx(M.Dismiss,{onClick:c}),jsxRuntime.jsxs(P.Column,{gap:1,part:"announcement-header",children:[jsxRuntime.jsx(M.Title,{children:m.title}),jsxRuntime.jsx(M.Subtitle,{children:m.subtitle})]}),jsxRuntime.jsx(M.Media,{src:(O=m.videoUri)!=null?O:m.imageUri,type:m.videoUri?"video":"image",css:{objectFit:"cover",width:"100%"}}),jsxRuntime.jsx(M.ProgressDots,{current:p.getCurrentStepIndex(),total:p.getNumberOfAvailableSteps()}),jsxRuntime.jsxs(P.Row,{css:{"& > button":{flexBasis:"50%",flexGrow:1}},gap:3,part:"announcement-footer",children:[B&&jsxRuntime.jsx(M.Secondary,{disabled:v,onClick:y,title:B}),S&&jsxRuntime.jsx(M.Primary,{disabled:v,onClick:u,title:S})]})]}))}))}}))}function ta(){let{userId:e,frigade:o}=ho.useContext(H);function t(r){return W(this,null,function*(){yield o.identify(e,r);})}function n(r,a){return W(this,null,function*(){yield o.track(r,a);})}return {userId:e,addProperties:t,track:n}}function na(){var r;let{frigade:e}=ho.useContext(H);function o(a){return W(this,null,function*(){if(!e.config.groupId){console.error("No Group ID is set. Cannot set properties without a Group ID.");return}yield e.group(e.config.groupId,a);})}function t(a,s){return W(this,null,function*(){yield e.track(a,s);})}function n(a,s){return W(this,null,function*(){yield e.group(a,s);})}return {groupId:(r=e==null?void 0:e.config)==null?void 0:r.groupId,setGroupId:n,addProperties:o,track:t}}
97
97
 
98
98
  exports.FrigadeJS = js__namespace;
99
- exports.Announcement = Oo;
100
- exports.Banner = fo;
101
- exports.BaseField = ne;
102
- exports.Box = y;
99
+ exports.Announcement = Wo;
100
+ exports.Banner = bo;
101
+ exports.BaseField = Q;
102
+ exports.Box = g;
103
103
  exports.Button = I;
104
104
  exports.Card = h;
105
- exports.Checklist = Xe;
106
- exports.Collection = Do;
105
+ exports.Checklist = Ye;
106
+ exports.Collection = Mo;
107
107
  exports.Dialog = M;
108
108
  exports.Flex = P;
109
- exports.Flow = K;
110
- exports.Form = Fe;
111
- exports.Image = eo;
112
- exports.Label = Po;
113
- exports.Media = le;
114
- exports.Progress = De;
115
- exports.Provider = gr;
116
- exports.RadioField = wo;
117
- exports.SelectField = Fo;
118
- exports.Survey = Ye;
119
- exports.Text = S;
120
- exports.TextField = vo;
121
- exports.TextareaField = To;
109
+ exports.Flow = j;
110
+ exports.Form = Re;
111
+ exports.Image = io;
112
+ exports.Label = vo;
113
+ exports.Media = de;
114
+ exports.Progress = He;
115
+ exports.Provider = Pr;
116
+ exports.RadioField = Bo;
117
+ exports.SelectField = Ro;
118
+ exports.Survey = ro;
119
+ exports.Text = C;
120
+ exports.TextField = ko;
121
+ exports.TextareaField = Eo;
122
122
  exports.Tooltip = $;
123
- exports.Tour = Eo;
124
- exports.Video = oo;
125
- exports.themeVariables = lo;
126
- exports.tokens = _e;
127
- exports.useBoundingClientRect = Qe;
128
- exports.useFlow = ie;
129
- exports.useFlowHandlers = fe;
130
- exports.useFrigade = Le;
131
- exports.useGroup = Qi;
132
- exports.useModal = We;
133
- exports.useStepHandlers = re;
134
- exports.useUser = Zi;
123
+ exports.Tour = Ho;
124
+ exports.Video = ao;
125
+ exports.themeVariables = fo;
126
+ exports.tokens = Ke;
127
+ exports.useBoundingClientRect = no;
128
+ exports.useFlow = se;
129
+ exports.useFlowHandlers = xe;
130
+ exports.useFrigade = Ne;
131
+ exports.useGroup = na;
132
+ exports.useModal = $e;
133
+ exports.useStepHandlers = ie;
134
+ exports.useUser = ta;
135
135
  //# sourceMappingURL=out.js.map
136
136
  //# sourceMappingURL=index.cjs.map