@frigade/react 2.5.10 → 2.5.12

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,17 +3,17 @@
3
3
  var react = require('@emotion/react');
4
4
  var j = require('@radix-ui/react-dialog');
5
5
  var jsxRuntime = require('@emotion/react/jsx-runtime');
6
- var Fo = require('react');
6
+ var To = require('react');
7
7
  var clsx = require('clsx');
8
- var tn = require('known-css-properties');
9
- var un = require('dompurify');
8
+ var nn = require('known-css-properties');
9
+ var fn = require('dompurify');
10
10
  var js = require('@frigade/js');
11
- var ti = require('embla-carousel-react');
12
- var Te = require('@radix-ui/react-collapsible');
11
+ var ni = require('embla-carousel-react');
12
+ var ke = require('@radix-ui/react-collapsible');
13
13
  var reactHookForm = require('react-hook-form');
14
- var De = require('@radix-ui/react-radio-group');
14
+ var Oe = require('@radix-ui/react-radio-group');
15
15
  var N = require('@radix-ui/react-select');
16
- var ro = require('@radix-ui/react-checkbox');
16
+ var ao = require('@radix-ui/react-checkbox');
17
17
  var reactRemoveScroll = require('react-remove-scroll');
18
18
  var react$1 = require('@floating-ui/react');
19
19
  var reactDom = require('react-dom');
@@ -40,25 +40,25 @@ function _interopNamespace(e) {
40
40
  }
41
41
 
42
42
  var j__namespace = /*#__PURE__*/_interopNamespace(j);
43
- var Fo__namespace = /*#__PURE__*/_interopNamespace(Fo);
44
- var tn__default = /*#__PURE__*/_interopDefault(tn);
45
- var un__default = /*#__PURE__*/_interopDefault(un);
43
+ var To__namespace = /*#__PURE__*/_interopNamespace(To);
44
+ var nn__default = /*#__PURE__*/_interopDefault(nn);
45
+ var fn__default = /*#__PURE__*/_interopDefault(fn);
46
46
  var js__namespace = /*#__PURE__*/_interopNamespace(js);
47
- var ti__default = /*#__PURE__*/_interopDefault(ti);
48
- var Te__namespace = /*#__PURE__*/_interopNamespace(Te);
49
- var De__namespace = /*#__PURE__*/_interopNamespace(De);
47
+ var ni__default = /*#__PURE__*/_interopDefault(ni);
48
+ var ke__namespace = /*#__PURE__*/_interopNamespace(ke);
49
+ var Oe__namespace = /*#__PURE__*/_interopNamespace(Oe);
50
50
  var N__namespace = /*#__PURE__*/_interopNamespace(N);
51
- var ro__namespace = /*#__PURE__*/_interopNamespace(ro);
51
+ var ao__namespace = /*#__PURE__*/_interopNamespace(ao);
52
52
  var re__namespace = /*#__PURE__*/_interopNamespace(re);
53
53
 
54
- var Zo=Object.defineProperty,Jr=Object.defineProperties;var qr=Object.getOwnPropertyDescriptors;var Ke=Object.getOwnPropertySymbols;var Yo=Object.prototype.hasOwnProperty,Qo=Object.prototype.propertyIsEnumerable;var qo=(e,t,o)=>t in e?Zo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,i=(e,t)=>{for(var o in t||(t={}))Yo.call(t,o)&&qo(e,o,t[o]);if(Ke)for(var o of Ke(t))Qo.call(t,o)&&qo(e,o,t[o]);return e},l=(e,t)=>Jr(e,qr(t));var Zr=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,o)=>(typeof require!="undefined"?require:t)[o]}):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,t)=>{var o={};for(var n in e)Yo.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&Ke)for(var n of Ke(e))t.indexOf(n)<0&&Qo.call(e,n)&&(o[n]=e[n]);return o};var ie=(e,t)=>{for(var o in t)Zo(e,o,{get:t[o],enumerable:!0});};var M=(e,t,o)=>new Promise((n,r)=>{var a=d=>{try{s(o.next(d));}catch(u){r(u);}},p=d=>{try{s(o.throw(d));}catch(u){r(u);}},s=d=>d.done?n(d.value):Promise.resolve(d.value).then(a,p);s((o=o.apply(e,t)).next());});function Fe(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 ot={borderWidths:{md:"1px"}};var je=[5,10,20,35,50,65,80,95,98],tt=[...je],ho=[...je];tt[4]=40;ho[4]=60;var Yr={blue:{h:213,s:100,l:je},gray:{h:220,s:10,l:je},green:{h:141,s:90,l:tt},red:{h:9,s:90,l:ho},yellow:{h:50,s:90,l:ho}};var W={};for(let[e,{h:t,s:o,l:n}]of Object.entries(Yr))W[e]=Object.fromEntries(n.map((r,a)=>[`${(a+1)*100}`,`hsl(${t} ${o}% ${r}%)`]));var rt=l(i({black:"hsl(0 0% 0%)",white:"hsl(0 0% 100%)"},W),{gray100:W.gray[100],gray200:W.gray[200],gray300:W.gray[300],gray400:W.gray[400],gray500:W.gray[500],gray600:W.gray[600],gray700:W.gray[700],gray800:W.gray[800],gray900:W.gray[900],blue400:W.blue[400],blue500:W.blue[500],blue800:W.blue[800],blue900:W.blue[900],green400:W.blue[400],green500:W.green[500],green800:W.green[800],red500:W.red[500],transparent:"#FFFFFF00",inherit:"inherit"});var nt={md:"8px",lg:"20px",round:"50%"};var c=e=>`var(--fr-colors-${e})`,it={negative:{100:c("red-100"),200:c("red-200"),300:c("red-300"),400:c("red-400"),500:c("red-500"),600:c("red-600"),700:c("red-700"),800:c("red-800"),900:c("red-900"),background:c("negative-500"),border:c("negative-500"),foreground:c("white"),surface:c("negative-500"),active:{background:c("negative-400"),border:c("negative-400"),foreground:c("white"),surface:c("negative-400")},focus:{background:c("negative-500"),border:c("negative-500"),foreground:c("white"),surface:c("negative-500")},hover:{background:c("negative-400"),border:c("negative-400"),foreground:c("white"),surface:c("negative-400")}},neutral:{100:c("gray-100"),200:c("gray-200"),300:c("gray-300"),400:c("gray-400"),500:c("gray-500"),600:c("gray-600"),700:c("gray-700"),800:c("gray-800"),900:c("gray-900"),background:c("white"),border:c("neutral-800"),foreground:c("black"),surface:c("neutral-700"),active:{background:c("white"),border:c("neutral-900"),foreground:c("black"),surface:c("neutral-700")},focus:{background:c("white"),border:c("neutral-900"),foreground:c("black"),surface:c("neutral-700")},hover:{background:c("white"),border:c("neutral-900"),foreground:c("black"),surface:c("neutral-700")}},positive:{100:c("green-100"),200:c("green-200"),300:c("green-300"),400:c("green-400"),500:c("green-500"),600:c("green-600"),700:c("green-700"),800:c("green-800"),900:c("green-900"),background:c("positive-500"),border:c("positive-500"),foreground:c("white"),surface:c("positive-500"),active:{background:c("positive-400"),border:c("positive-400"),foreground:c("white"),surface:c("positive-400")},focus:{background:c("positive-500"),border:c("positive-500"),foreground:c("white"),surface:c("positive-500")},hover:{background:c("positive-400"),border:c("positive-400"),foreground:c("white"),surface:c("positive-400")}},primary:{100:c("blue-100"),200:c("blue-200"),300:c("blue-300"),400:c("blue-400"),500:c("blue-500"),600:c("blue-600"),700:c("blue-700"),800:c("blue-800"),900:c("blue-900"),background:c("primary-500"),border:c("primary-500"),foreground:c("white"),surface:c("primary-500"),active:{background:c("primary-400"),border:c("primary-400"),foreground:c("white"),surface:c("primary-400")},focus:{background:c("primary-500"),border:c("primary-500"),foreground:c("white"),surface:c("primary-500")},hover:{background:c("primary-400"),border:c("primary-400"),foreground:c("white"),surface:c("primary-400")}},secondary:{100:c("gray-100"),200:c("gray-200"),300:c("gray-300"),400:c("gray-400"),500:c("gray-500"),600:c("gray-600"),700:c("gray-700"),800:c("gray-800"),900:c("gray-900"),background:c("white"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-900"),active:{background:c("secondary-900"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-800")},focus:{background:c("secondary-900"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-900")},hover:{background:c("secondary-900"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-800")}}};var at={md:"0px 4px 20px rgba(0, 0, 0, 0.1)"};var Qr="px",en=e=>typeof e=="number"?`${4*e}${Qr}`:e,on=[-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"],st=Object.fromEntries(on.map(e=>[e,en(e)]));var lt={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 Xe=l(i(l(i({},ot),{colors:i(i({},rt),it)}),lt),{radii:nt,shadows:at,space:st});function Ae(e,t="",o="."){return Object.keys(e).reduce((n,r)=>{let p=`${t.length?`${t}${o}`:""}${r}`,s=e[r];return typeof s=="object"&&s!==null&&!Array.isArray(s)?Object.assign(n,Ae(s,p,o)):n[p]=s,n},{})}function bo(e){let t=Ae(e,"--fr","-");for(let[o,n]of Object.entries(t))if(o.indexOf(".")>-1){let r=o.replace(/\./g,"-");t[r]=n,delete t[o];}return t}function pt(e,t="--fr"){let o={};return Object.keys(e).forEach(n=>{let r=e[n],a=n.replace(/\./g,"-");typeof r=="object"&&r!==null&&!Array.isArray(r)?o[n]=pt(r,`${t}-${n}`):o[n]=`var(${t}-${a})`;}),o}var Po=bo(Xe),D=pt(Xe);var rn=new Set(["alt","size","src"]),nn=tn__default.default.all.filter(e=>e.indexOf("-")!=0&&!rn.has(e)).map(e=>[e.replace(/-([a-z])/g,(t,o)=>o.toUpperCase()),null]),an=Object.fromEntries(nn),Je=Ae(D.colors),sn={color:Je,backgroundColor:Je,borderColor:Je,border:i(i({},D.borderWidths),Je),borderRadius:D.radii,borderWidth:D.borderWidths,boxShadow:D.shadows,fontFamily:D.fontFamilies,fontSize:D.fontSizes,fontWeight:D.fontWeights,gap:D.space,lineHeight:D.lineHeights,margin:D.space,marginBottom:D.space,marginLeft:D.space,marginRight:D.space,marginTop:D.space,padding:D.space,paddingBottom:D.space,paddingLeft:D.space,paddingRight:D.space,paddingTop:D.space},dt=i(i({},an),sn),ct={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"]},ut=new Set(["active","disabled","focus","focusVisible","focusWithin","hover"]);function ln(e){return Array.isArray(e)?new Map(e.map(t=>[t,t])):typeof e=="object"&&e!==null?new Map(Object.entries(e)):typeof e=="string"||typeof e=="number"?new Map([[e,e]]):new Map}var mt=new Map(Object.entries(dt).map(([e,t])=>[e,ln(t)])),pn=new Map(Object.entries(ct).map(([e,t])=>[e,new Set(t)])),dn=new Set(["height","width"]),cn=new Set(["canvas","embed","iframe","img","input","object","video"]);function ft(e){let[t,o]=e.split(":");return [t,ut.has(o)?o:null]}function gt(e,t="div"){let o=Object.assign({},e),n={};function r(a){if(a==null)return n;let s=`&:${a.replace(/[A-Z]/g,d=>`-${d.toLocaleLowerCase()}`)}`;return n[s]==null&&(n[s]={}),n[s]}return Object.entries(o).forEach(([a,p])=>{let[s,d]=ft(a),u=pn.get(s);u!=null&&(u.forEach(m=>{let g=`${m}${d?":"+d:""}`;o[g]=p;}),delete o[a]);}),Object.entries(o).forEach(([a,p])=>{let[s,d]=ft(a),u=mt.get(s);if(u!=null){if(p==null)delete o[a];else if(typeof p=="string"&&p.indexOf(" ")>-1){let m=p.split(" ");r(d)[s]=m.map(g=>{var b;return (b=u.get(g.toString()))!=null?b:g}).join(" ");}else u.has(p.toString())?r(d)[s]=u.get(p.toString()):r(d)[s]=p;(typeof t!="string"||!cn.has(t)||!dn.has(s))&&delete o[a];}}),Object.keys(o).forEach(a=>{let p=a.substring(1);a.indexOf("_")===0&&mt.has(p)&&(o[p]=o[a],delete o[a]);}),{cssFromProps:n,unmatchedProps:o}}function mn(){if(typeof window=="undefined"){let{JSDOM:e}=Zr("jsdom");return new e("<!DOCTYPE html>").window}return window}function yt(e){return e?{__html:un__default.default(mn()).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","style"],ALLOWED_ATTR:["style","class","target","id","href","alt","src","controls","autoplay","loop","muted","playsinline"]})}:{__html:""}}function gn(e){return e&&`fr-${e}`}function bt(e){return e&&(Array.isArray(e)?e.filter(t=>t!=null).map(t=>bt(t)).join(" "):gn(e))}function yn(s,p){var d=s,{as:e,children:t,className:o,css:n={},part:r}=d,a=f(d,["as","children","className","css","part"]);let u=e!=null?e:"div",{cssFromProps:m,unmatchedProps:g}=gt(a,u),b=bt(r),x=o||b?clsx.clsx(o,b):void 0,T=[{boxSizing:"border-box"},m,n];return typeof t=="string"?jsxRuntime.jsx(u,l(i({className:x,css:T},g),{ref:p,dangerouslySetInnerHTML:yt(t)})):jsxRuntime.jsx(u,l(i({className:x,css:T},g),{ref:p,children:t}))}var y=Fo__namespace.forwardRef(yn);var O={};ie(O,{Link:()=>Gn,Plain:()=>Kn,Primary:()=>zn,Secondary:()=>Un});var F={};ie(F,{Body1:()=>In,Body2:()=>Hn,Caption:()=>$n,Display1:()=>Bn,Display2:()=>Tn,H1:()=>kn,H2:()=>En,H3:()=>Dn,H4:()=>On});var Co={};ie(Co,{Body1:()=>wn,Body2:()=>Fn,Caption:()=>vn,Display1:()=>xn,Display2:()=>hn,H1:()=>bn,H2:()=>Pn,H3:()=>Cn,H4:()=>Sn});var ae={color:"neutral.foreground",fontFamily:"default",margin:"0"},xn=l(i({},ae),{fontSize:"5xl",fontWeight:"bold",lineHeight:"4xl"}),hn=l(i({},ae),{fontSize:"4xl",fontWeight:"bold",lineHeight:"3xl"}),bn=l(i({},ae),{fontSize:"3xl",fontWeight:"demibold",lineHeight:"2xl"}),Pn=l(i({},ae),{fontSize:"2xl",fontWeight:"demibold",lineHeight:"xl"}),Cn=l(i({},ae),{fontSize:"xl",fontWeight:"demibold",lineHeight:"lg"}),Sn=l(i({},ae),{fontSize:"md",fontWeight:"demibold",lineHeight:"md"}),wn=l(i({},ae),{fontSize:"md",fontWeight:"regular",lineHeight:"md"}),Fn=l(i({},ae),{fontSize:"sm",fontWeight:"regular",lineHeight:"sm"}),vn=l(i({},ae),{fontSize:"xs",fontWeight:"regular",lineHeight:"xs"});var Rn=["Display1","Display2","H1","H2","H3","H4","Body1","Body2","Caption"],se=Object.fromEntries(Rn.map(e=>{let t=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():"span",o=Fo__namespace.forwardRef((s,p)=>{var d=s,{as:n=t,children:r}=d,a=f(d,["as","children"]);return jsxRuntime.jsx(y,l(i(i({as:n},Co[e]),a),{ref:p,children:r}))});return o.displayName=`Text.${e}`,[e,o]})),Bn=se.Display1,Tn=se.Display2,kn=se.H1,En=se.H2,Dn=se.H3,On=se.H4,In=se.Body1,Hn=se.Body2,$n=se.Caption;var wo={};ie(wo,{Link:()=>Ln,Plain:()=>Nn,Primary:()=>Wn,Secondary:()=>Vn,loadingCSSStyle:()=>So});var qe={borderWidth:"md",borderRadius:"md",borderStyle:"solid","cursor:disabled":"not-allowed",display:"flex",gap:"2",padding:"2 4",fontFamily:"inherit"},Wn=l(i({},qe),{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"}),Vn=l(i({},qe),{backgroundColor:"secondary.background",borderColor:"secondary.border",color:"secondary.foreground","backgroundColor:hover":"secondary.hover.background","backgroundColor:disabled":"secondary.background","opacity:disabled":"0.6"}),Ln=l(i({},qe),{backgroundColor:"transparent",borderColor:"transparent",color:"primary.surface","color:hover":"primary.hover.surface"}),Nn=l(i({},qe),{backgroundColor:"transparent",borderColor:"transparent",color:"neutral.foreground"}),_n=react.keyframes({from:{transform:"rotate(0turn)"},to:{transform:"rotate(1turn)"}}),So={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:_n+" 1s ease infinite"}};function Ze(p){var s=p,{as:e,children:t,part:o,title:n,variant:r="Primary"}=s,a=f(s,["as","children","part","title","variant"]);var u;let d=r.toLocaleLowerCase();return jsxRuntime.jsxs(y,l(i(l(i({as:e!=null?e:"button",part:[`button-${d}`,o]},wo[r]),{css:i(i({},(u=a.css)!=null?u:{}),a.loading?So:{})}),a),{loading:void 0,children:[t,n&&jsxRuntime.jsx(F.Body2,{color:"inherit",css:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},flexGrow:"1",fontWeight:"medium",lineHeight:"20px",part:"button-title",textWrap:"nowrap",children:n})]}))}function zn(o){var n=o,{children:e}=n,t=f(n,["children"]);return jsxRuntime.jsx(Ze,l(i({},t),{variant:"Primary",children:e}))}function Un(o){var n=o,{children:e}=n,t=f(n,["children"]);return jsxRuntime.jsx(Ze,l(i({},t),{variant:"Secondary",children:e}))}function Gn(o){var n=o,{children:e}=n,t=f(n,["children"]);return jsxRuntime.jsx(Ze,l(i({},t),{variant:"Link",children:e}))}function Kn(o){var n=o,{children:e}=n,t=f(n,["children"]);return jsxRuntime.jsx(Ze,l(i({},t),{variant:"Plain",children:e}))}var S={};ie(S,{Column:()=>Jn,Row:()=>Xn});var Xn=Fo__namespace.forwardRef((e,t)=>jsxRuntime.jsx(y,l(i({display:"flex",flexDirection:"row"},e),{ref:t}))),Jn=Fo__namespace.forwardRef((e,t)=>jsxRuntime.jsx(y,l(i({display:"flex",flexDirection:"column"},e),{ref:t})));function vo(r){var a=r,{dismissible:e,flowId:t,part:o}=a,n=f(a,["dismissible","flowId","part"]);return jsxRuntime.jsx(z,l(i({as:null,flowId:t},n),{children:({handleDismiss:p,handlePrimary:s,handleSecondary:d,parentProps:{containerProps:u},step:m})=>{var v,B,w,P,C;let g=(v=m.props)!=null?v:{},b=(w=(B=m.primaryButton)==null?void 0:B.title)!=null?w:m.primaryButtonTitle,x=(C=(P=m.secondaryButton)==null?void 0:P.title)!=null?C:m.secondaryButtonTitle,T=m.$state.blocked;return jsxRuntime.jsxs(h,l(i(i({alignItems:"center","aria-label":"Banner",borderWidth:"md",display:"flex",flexDirection:"row",gap:3,justifyContent:"flex-start",part:["banner",o],role:"complementary"},u),g),{children:[m.imageUri&&jsxRuntime.jsx(y,{as:"img",part:"image",src:m.imageUri,style:{height:40,width:40,alignSelf:"center"}}),jsxRuntime.jsxs(S.Column,{marginInlineEnd:"auto",part:"banner-title-wrapper",children:[jsxRuntime.jsx(h.Title,{part:"title",children:m.title}),jsxRuntime.jsx(h.Subtitle,{part:"subtitle",children:m.subtitle})]}),jsxRuntime.jsx(h.Secondary,{disabled:T,title:x,onClick:d}),jsxRuntime.jsx(h.Primary,{disabled:T,title:b,onClick:s}),e&&jsxRuntime.jsx(h.Dismiss,{onClick:p})]}))}}))}var oo={};ie(oo,{Carousel:()=>Lt,Collapsible:()=>eo,CollapsibleStep:()=>Ve});var Re={};ie(Re,{Bar:()=>ve,Dots:()=>vt,Fraction:()=>Ye,Segments:()=>Bt});function ve(n){var r=n,{current:e,total:t}=r,o=f(r,["current","total"]);let a=t>0?Math.min(e/t,1):0,p=a===0?"10px":`${100*a}%`;return jsxRuntime.jsx(y,l(i({part:"progress-bar",backgroundColor:"neutral.800",borderRadius:"md",height:"10px"},o),{children:jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"progress-bar-fill",borderRadius:"md",height:"100%",style:{width:p},transition:"width 300ms ease-out"})}))}function vt(n){var r=n,{current:e,total:t}=r,o=f(r,["current","total"]);if(t==1)return null;let a=[...Array(t)].map((p,s)=>jsxRuntime.jsx(y,{as:"circle",r:4,cx:4+16*s,cy:"4px",fill:e-1===s?D.colors.blue500:D.colors.blue800},s));return jsxRuntime.jsx(y,l(i({as:"svg",height:"8px",part:"progress-dots",viewBox:`0 0 ${16*t-8} 8`,width:16*t-8},o),{children:a}))}function Ye(n){var r=n,{current:e,total:t}=r,o=f(r,["current","total"]);return jsxRuntime.jsx(F.Body2,l(i({part:"progress-fraction"},o),{children:`${e}/${t}`}))}function Bt(n){var r=n,{current:e,total:t}=r,o=f(r,["current","total"]);let a=[...Array(t)].map((p,s)=>jsxRuntime.jsx(y,{backgroundColor:e-1===s?"primary.surface":"blue800",borderRadius:"md",flexGrow:1,height:"100%"},s));return jsxRuntime.jsx(S.Row,l(i({gap:1,height:"10px",part:"progress-segments"},o),{children:a}))}function kt(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 Zn(){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 Et(o){var n=o,{checked:e=!1}=n,t=f(n,["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"},t),{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(Zn,{})})}))}function le(e,{onPrimary:t,onSecondary:o}={}){let{navigate:n}=Fo.useContext(V),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:Fo.useCallback((a,p,s=!0)=>M(this,null,function*(){if((yield t==null?void 0:t(e,a,p))===!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(p,s)),e.primaryButton.uri!=null&&n(e.primaryButton.uri,e.primaryButton.target);}else yield e.complete(p,s),e.primaryButtonUri!=null&&n(e.primaryButtonUri,e.primaryButtonUriTarget);return !0}),[e]),handleSecondary:Fo.useCallback((a,p)=>M(this,null,function*(){if((yield o==null?void 0:o(e,a,p))===!1)return a.preventDefault(),!1;if(e.secondaryButton!=null){let d=e.secondaryButton.action===!1?!1:r[e.secondaryButton.action];typeof d=="function"?d():d!==!1&&e.complete(p),e.secondaryButton.uri!=null&&n(e.secondaryButton.uri,e.secondaryButton.target);}else e.complete(p),e.secondaryButtonUri!=null&&n(e.secondaryButtonUri,e.secondaryButtonUriTarget);return !0}),[e])}}function Ot({onPrimary:e,onSecondary:t,step:o}){var u,m;let{handlePrimary:n,handleSecondary:r}=le(o,{onPrimary:e,onSecondary:t}),{blocked:a,completed:p,skipped:s}=o.$state,d=p||s||!a?jsxRuntime.jsx(Et,{checked:p||s,marginLeft:"auto"}):jsxRuntime.jsx(y,{as:kt,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(S.Row,{marginBottom:"2",part:"carousel-step-header",children:[o.iconUri&&jsxRuntime.jsx(h.Media,{borderRadius:"0",height:"24px",src:o.iconUri,width:"24px"}),d]}),jsxRuntime.jsx(h.Title,{children:o.title}),jsxRuntime.jsx(h.Subtitle,{children:o.subtitle}),jsxRuntime.jsxs(S.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=o.secondaryButton)==null?void 0:u.title}),jsxRuntime.jsx(h.Primary,{disabled:a,onClick:n,title:(m=o.primaryButton)==null?void 0:m.title})]})]})}function Ht(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 At(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 Mt=react.keyframes`
54
+ var tt=Object.defineProperty,Zr=Object.defineProperties;var Yr=Object.getOwnPropertyDescriptors;var Xe=Object.getOwnPropertySymbols;var rt=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable;var ot=(e,t,o)=>t in e?tt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,i=(e,t)=>{for(var o in t||(t={}))rt.call(t,o)&&ot(e,o,t[o]);if(Xe)for(var o of Xe(t))nt.call(t,o)&&ot(e,o,t[o]);return e},s=(e,t)=>Zr(e,Yr(t));var Qr=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,o)=>(typeof require!="undefined"?require:t)[o]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var m=(e,t)=>{var o={};for(var n in e)rt.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&Xe)for(var n of Xe(e))t.indexOf(n)<0&&nt.call(e,n)&&(o[n]=e[n]);return o};var ie=(e,t)=>{for(var o in t)tt(e,o,{get:t[o],enumerable:!0});};var M=(e,t,o)=>new Promise((n,r)=>{var a=d=>{try{l(o.next(d));}catch(u){r(u);}},p=d=>{try{l(o.throw(d));}catch(u){r(u);}},l=d=>d.done?n(d.value):Promise.resolve(d.value).then(a,p);l((o=o.apply(e,t)).next());});function ve(e){return jsxRuntime.jsx("svg",s(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 at={borderWidths:{md:"1px"}};var Je=[5,10,20,35,50,65,80,95,98],st=[...Je],So=[...Je];st[4]=40;So[4]=60;var en={blue:{h:213,s:100,l:Je},gray:{h:220,s:10,l:Je},green:{h:141,s:90,l:st},red:{h:9,s:90,l:So},yellow:{h:50,s:90,l:So}};var W={};for(let[e,{h:t,s:o,l:n}]of Object.entries(en))W[e]=Object.fromEntries(n.map((r,a)=>[`${(a+1)*100}`,`hsl(${t} ${o}% ${r}%)`]));var lt=s(i({black:"hsl(0 0% 0%)",white:"hsl(0 0% 100%)"},W),{gray100:W.gray[100],gray200:W.gray[200],gray300:W.gray[300],gray400:W.gray[400],gray500:W.gray[500],gray600:W.gray[600],gray700:W.gray[700],gray800:W.gray[800],gray900:W.gray[900],blue400:W.blue[400],blue500:W.blue[500],blue800:W.blue[800],blue900:W.blue[900],green400:W.blue[400],green500:W.green[500],green800:W.green[800],red500:W.red[500],transparent:"#FFFFFF00",inherit:"inherit"});var pt={md:"8px",lg:"20px",round:"50%"};var c=e=>`var(--fr-colors-${e})`,dt={negative:{100:c("red-100"),200:c("red-200"),300:c("red-300"),400:c("red-400"),500:c("red-500"),600:c("red-600"),700:c("red-700"),800:c("red-800"),900:c("red-900"),background:c("negative-500"),border:c("negative-500"),foreground:c("white"),surface:c("negative-500"),active:{background:c("negative-400"),border:c("negative-400"),foreground:c("white"),surface:c("negative-400")},focus:{background:c("negative-500"),border:c("negative-500"),foreground:c("white"),surface:c("negative-500")},hover:{background:c("negative-400"),border:c("negative-400"),foreground:c("white"),surface:c("negative-400")}},neutral:{100:c("gray-100"),200:c("gray-200"),300:c("gray-300"),400:c("gray-400"),500:c("gray-500"),600:c("gray-600"),700:c("gray-700"),800:c("gray-800"),900:c("gray-900"),background:c("white"),border:c("neutral-800"),foreground:c("black"),surface:c("neutral-700"),active:{background:c("white"),border:c("neutral-900"),foreground:c("black"),surface:c("neutral-700")},focus:{background:c("white"),border:c("neutral-900"),foreground:c("black"),surface:c("neutral-700")},hover:{background:c("white"),border:c("neutral-900"),foreground:c("black"),surface:c("neutral-700")}},positive:{100:c("green-100"),200:c("green-200"),300:c("green-300"),400:c("green-400"),500:c("green-500"),600:c("green-600"),700:c("green-700"),800:c("green-800"),900:c("green-900"),background:c("positive-500"),border:c("positive-500"),foreground:c("white"),surface:c("positive-500"),active:{background:c("positive-400"),border:c("positive-400"),foreground:c("white"),surface:c("positive-400")},focus:{background:c("positive-500"),border:c("positive-500"),foreground:c("white"),surface:c("positive-500")},hover:{background:c("positive-400"),border:c("positive-400"),foreground:c("white"),surface:c("positive-400")}},primary:{100:c("blue-100"),200:c("blue-200"),300:c("blue-300"),400:c("blue-400"),500:c("blue-500"),600:c("blue-600"),700:c("blue-700"),800:c("blue-800"),900:c("blue-900"),background:c("primary-500"),border:c("primary-500"),foreground:c("white"),surface:c("primary-500"),active:{background:c("primary-400"),border:c("primary-400"),foreground:c("white"),surface:c("primary-400")},focus:{background:c("primary-500"),border:c("primary-500"),foreground:c("white"),surface:c("primary-500")},hover:{background:c("primary-400"),border:c("primary-400"),foreground:c("white"),surface:c("primary-400")}},secondary:{100:c("gray-100"),200:c("gray-200"),300:c("gray-300"),400:c("gray-400"),500:c("gray-500"),600:c("gray-600"),700:c("gray-700"),800:c("gray-800"),900:c("gray-900"),background:c("white"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-900"),active:{background:c("secondary-900"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-800")},focus:{background:c("secondary-900"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-900")},hover:{background:c("secondary-900"),border:c("secondary-800"),foreground:c("black"),surface:c("secondary-800")}}};var ct={md:"0px 4px 20px rgba(0, 0, 0, 0.1)"};var on="px",tn=e=>typeof e=="number"?`${4*e}${on}`:e,rn=[-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"],ut=Object.fromEntries(rn.map(e=>[e,tn(e)]));var mt={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 qe=s(i(s(i({},at),{colors:i(i({},lt),dt)}),mt),{radii:pt,shadows:ct,space:ut});function Me(e,t="",o="."){return Object.keys(e).reduce((n,r)=>{let p=`${t.length?`${t}${o}`:""}${r}`,l=e[r];return typeof l=="object"&&l!==null&&!Array.isArray(l)?Object.assign(n,Me(l,p,o)):n[p]=l,n},{})}function wo(e){let t=Me(e,"--fr","-");for(let[o,n]of Object.entries(t))if(o.indexOf(".")>-1){let r=o.replace(/\./g,"-");t[r]=n,delete t[o];}return t}function ft(e,t="--fr"){let o={};return Object.keys(e).forEach(n=>{let r=e[n],a=n.replace(/\./g,"-");typeof r=="object"&&r!==null&&!Array.isArray(r)?o[n]=ft(r,`${t}-${n}`):o[n]=`var(${t}-${a})`;}),o}var Fo=wo(qe),D=ft(qe);var an=new Set(["alt","size","src"]),sn=nn__default.default.all.filter(e=>e.indexOf("-")!=0&&!an.has(e)).map(e=>[e.replace(/-([a-z])/g,(t,o)=>o.toUpperCase()),null]),ln=Object.fromEntries(sn),Ze=Me(D.colors),pn={color:Ze,backgroundColor:Ze,borderColor:Ze,border:i(i({},D.borderWidths),Ze),borderRadius:D.radii,borderWidth:D.borderWidths,boxShadow:D.shadows,fontFamily:D.fontFamilies,fontSize:D.fontSizes,fontWeight:D.fontWeights,gap:D.space,lineHeight:D.lineHeights,margin:D.space,marginBottom:D.space,marginLeft:D.space,marginRight:D.space,marginTop:D.space,padding:D.space,paddingBottom:D.space,paddingLeft:D.space,paddingRight:D.space,paddingTop:D.space},gt=i(i({},ln),pn),yt={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"]},xt=new Set(["active","disabled","focus","focusVisible","focusWithin","hover"]);function dn(e){return Array.isArray(e)?new Map(e.map(t=>[t,t])):typeof e=="object"&&e!==null?new Map(Object.entries(e)):typeof e=="string"||typeof e=="number"?new Map([[e,e]]):new Map}var ht=new Map(Object.entries(gt).map(([e,t])=>[e,dn(t)])),cn=new Map(Object.entries(yt).map(([e,t])=>[e,new Set(t)])),un=new Set(["height","width"]),mn=new Set(["canvas","embed","iframe","img","input","object","video"]);function bt(e){let[t,o]=e.split(":");return [t,xt.has(o)?o:null]}function Pt(e,t="div"){let o=Object.assign({},e),n={};function r(a){if(a==null)return n;let l=`&:${a.replace(/[A-Z]/g,d=>`-${d.toLocaleLowerCase()}`)}`;return n[l]==null&&(n[l]={}),n[l]}return Object.entries(o).forEach(([a,p])=>{let[l,d]=bt(a),u=cn.get(l);u!=null&&(u.forEach(f=>{let g=`${f}${d?":"+d:""}`;o[g]=p;}),delete o[a]);}),Object.entries(o).forEach(([a,p])=>{let[l,d]=bt(a),u=ht.get(l);if(u!=null){if(p==null)delete o[a];else if(typeof p=="string"&&p.indexOf(" ")>-1){let f=p.split(" ");r(d)[l]=f.map(g=>{var b;return (b=u.get(g.toString()))!=null?b:g}).join(" ");}else u.has(p.toString())?r(d)[l]=u.get(p.toString()):r(d)[l]=p;(typeof t!="string"||!mn.has(t)||!un.has(l))&&delete o[a];}}),Object.keys(o).forEach(a=>{let p=a.substring(1);a.indexOf("_")===0&&ht.has(p)&&(o[p]=o[a],delete o[a]);}),{cssFromProps:n,unmatchedProps:o}}function gn(){if(typeof window=="undefined"){let{JSDOM:e}=Qr("jsdom");return new e("<!DOCTYPE html>").window}return window}function Ct(e){return e?{__html:fn__default.default(gn()).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","style"],ALLOWED_ATTR:["style","class","target","id","href","alt","src","controls","autoplay","loop","muted","playsinline"]})}:{__html:""}}function xn(e){return e&&`fr-${e}`}function Ft(e){return e&&(Array.isArray(e)?e.filter(t=>t!=null).map(t=>Ft(t)).join(" "):xn(e))}function hn(l,p){var d=l,{as:e,children:t,className:o,css:n={},part:r}=d,a=m(d,["as","children","className","css","part"]);let u=e!=null?e:"div",{cssFromProps:f,unmatchedProps:g}=Pt(a,u),b=Ft(r),x=o||b?clsx.clsx(o,b):void 0,T=[{boxSizing:"border-box"},f,n];return typeof t=="string"?jsxRuntime.jsx(u,s(i({className:x,css:T},g),{ref:p,dangerouslySetInnerHTML:Ct(t)})):jsxRuntime.jsx(u,s(i({className:x,css:T},g),{ref:p,children:t}))}var y=To__namespace.forwardRef(hn);var O={};ie(O,{Link:()=>jn,Plain:()=>Xn,Primary:()=>Gn,Secondary:()=>Kn});var w={};ie(w,{Body1:()=>$n,Body2:()=>An,Caption:()=>Mn,Display1:()=>kn,Display2:()=>En,H1:()=>Dn,H2:()=>On,H3:()=>In,H4:()=>Hn});var vo={};ie(vo,{Body1:()=>vn,Body2:()=>Rn,Caption:()=>Bn,Display1:()=>bn,Display2:()=>Pn,H1:()=>Cn,H2:()=>Sn,H3:()=>wn,H4:()=>Fn});var ae={color:"neutral.foreground",fontFamily:"default",margin:"0"},bn=s(i({},ae),{fontSize:"5xl",fontWeight:"bold",lineHeight:"4xl"}),Pn=s(i({},ae),{fontSize:"4xl",fontWeight:"bold",lineHeight:"3xl"}),Cn=s(i({},ae),{fontSize:"3xl",fontWeight:"demibold",lineHeight:"2xl"}),Sn=s(i({},ae),{fontSize:"2xl",fontWeight:"demibold",lineHeight:"xl"}),wn=s(i({},ae),{fontSize:"xl",fontWeight:"demibold",lineHeight:"lg"}),Fn=s(i({},ae),{fontSize:"md",fontWeight:"demibold",lineHeight:"md"}),vn=s(i({},ae),{fontSize:"md",fontWeight:"regular",lineHeight:"md"}),Rn=s(i({},ae),{fontSize:"sm",fontWeight:"regular",lineHeight:"sm"}),Bn=s(i({},ae),{fontSize:"xs",fontWeight:"regular",lineHeight:"xs"});var Tn=["Display1","Display2","H1","H2","H3","H4","Body1","Body2","Caption"],se=Object.fromEntries(Tn.map(e=>{let t=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():"span",o=To__namespace.forwardRef((l,p)=>{var d=l,{as:n=t,children:r}=d,a=m(d,["as","children"]);return jsxRuntime.jsx(y,s(i(i({as:n},vo[e]),a),{ref:p,children:r}))});return o.displayName=`Text.${e}`,[e,o]})),kn=se.Display1,En=se.Display2,Dn=se.H1,On=se.H2,In=se.H3,Hn=se.H4,$n=se.Body1,An=se.Body2,Mn=se.Caption;var Bo={};ie(Bo,{Link:()=>_n,Plain:()=>zn,Primary:()=>Ln,Secondary:()=>Nn,loadingCSSStyle:()=>Ro});var Ye={borderWidth:"md",borderRadius:"md",borderStyle:"solid","cursor:disabled":"not-allowed",display:"flex",gap:"2",padding:"2 4",fontFamily:"inherit"},Ln=s(i({},Ye),{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"}),Nn=s(i({},Ye),{backgroundColor:"secondary.background",borderColor:"secondary.border",color:"secondary.foreground","backgroundColor:hover":"secondary.hover.background","backgroundColor:disabled":"secondary.background","opacity:disabled":"0.6"}),_n=s(i({},Ye),{backgroundColor:"transparent",borderColor:"transparent",color:"primary.surface","color:hover":"primary.hover.surface"}),zn=s(i({},Ye),{backgroundColor:"transparent",borderColor:"transparent",color:"neutral.foreground"}),Un=react.keyframes({from:{transform:"rotate(0turn)"},to:{transform:"rotate(1turn)"}}),Ro={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:Un+" 1s ease infinite"}};function Qe(p){var l=p,{as:e,children:t,part:o,title:n,variant:r="Primary"}=l,a=m(l,["as","children","part","title","variant"]);var u;let d=r.toLocaleLowerCase();return jsxRuntime.jsxs(y,s(i(s(i({as:e!=null?e:"button",part:[`button-${d}`,o]},Bo[r]),{css:i(i({},(u=a.css)!=null?u:{}),a.loading?Ro:{})}),a),{loading:void 0,children:[t,n&&jsxRuntime.jsx(w.Body2,{color:"inherit",css:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},flexGrow:"1",fontWeight:"medium",lineHeight:"20px",part:"button-title",textWrap:"nowrap",children:n})]}))}function Gn(o){var n=o,{children:e}=n,t=m(n,["children"]);return jsxRuntime.jsx(Qe,s(i({},t),{variant:"Primary",children:e}))}function Kn(o){var n=o,{children:e}=n,t=m(n,["children"]);return jsxRuntime.jsx(Qe,s(i({},t),{variant:"Secondary",children:e}))}function jn(o){var n=o,{children:e}=n,t=m(n,["children"]);return jsxRuntime.jsx(Qe,s(i({},t),{variant:"Link",children:e}))}function Xn(o){var n=o,{children:e}=n,t=m(n,["children"]);return jsxRuntime.jsx(Qe,s(i({},t),{variant:"Plain",children:e}))}var S={};ie(S,{Column:()=>Zn,Row:()=>qn});var qn=To__namespace.forwardRef((e,t)=>jsxRuntime.jsx(y,s(i({display:"flex",flexDirection:"row"},e),{ref:t}))),Zn=To__namespace.forwardRef((e,t)=>jsxRuntime.jsx(y,s(i({display:"flex",flexDirection:"column"},e),{ref:t})));function ko(r){var a=r,{dismissible:e,flowId:t,part:o}=a,n=m(a,["dismissible","flowId","part"]);return jsxRuntime.jsx(z,s(i({as:null,flowId:t},n),{children:({handleDismiss:p,handlePrimary:l,handleSecondary:d,parentProps:{containerProps:u},step:f})=>{var v,B,F,P,C;let g=(v=f.props)!=null?v:{},b=(F=(B=f.primaryButton)==null?void 0:B.title)!=null?F:f.primaryButtonTitle,x=(C=(P=f.secondaryButton)==null?void 0:P.title)!=null?C:f.secondaryButtonTitle,T=f.$state.blocked;return jsxRuntime.jsxs(h,s(i(i({alignItems:"center","aria-label":"Banner",borderWidth:"md",display:"flex",flexDirection:"row",gap:3,justifyContent:"flex-start",part:["banner",o],role:"complementary"},u),g),{children:[f.imageUri&&jsxRuntime.jsx(y,{as:"img",part:"image",src:f.imageUri,style:{height:40,width:40,alignSelf:"center"}}),jsxRuntime.jsxs(S.Column,{marginInlineEnd:"auto",part:"banner-title-wrapper",children:[jsxRuntime.jsx(h.Title,{part:"title",children:f.title}),jsxRuntime.jsx(h.Subtitle,{part:"subtitle",children:f.subtitle})]}),jsxRuntime.jsx(h.Secondary,{disabled:T,title:x,onClick:d}),jsxRuntime.jsx(h.Primary,{disabled:T,title:b,onClick:l}),e&&jsxRuntime.jsx(h.Dismiss,{onClick:p})]}))}}))}var ro={};ie(ro,{Carousel:()=>Ut,Collapsible:()=>to,CollapsibleStep:()=>Le});var Pe={};ie(Pe,{Bar:()=>Re,Dots:()=>Et,Fraction:()=>Be,Segments:()=>eo});function Re(n){var r=n,{current:e,total:t}=r,o=m(r,["current","total"]);let a=t>0?Math.min(e/t,1):0,p=a===0?"10px":`${100*a}%`;return jsxRuntime.jsx(y,s(i({part:"progress-bar",backgroundColor:"neutral.800",borderRadius:"md",height:"10px"},o),{children:jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"progress-bar-fill",borderRadius:"md",height:"100%",style:{width:p},transition:"width 300ms ease-out"})}))}function Et(n){var r=n,{current:e,total:t}=r,o=m(r,["current","total"]);if(t==1)return null;let a=[...Array(t)].map((p,l)=>jsxRuntime.jsx(y,{as:"circle",r:4,cx:4+16*l,cy:"4px",fill:e-1===l?D.colors.blue500:D.colors.blue800},l));return jsxRuntime.jsx(y,s(i({as:"svg",height:"8px",part:"progress-dots",viewBox:`0 0 ${16*t-8} 8`,width:16*t-8},o),{children:a}))}function Be(n){var r=n,{current:e,total:t}=r,o=m(r,["current","total"]);return jsxRuntime.jsx(w.Body2,s(i({part:"progress-fraction"},o),{children:`${e}/${t}`}))}function eo(n){var r=n,{current:e,total:t}=r,o=m(r,["current","total"]);let a=[...Array(t)].map((p,l)=>jsxRuntime.jsx(y,{backgroundColor:e-1===l?"primary.surface":"blue800",borderRadius:"md",flexGrow:1,height:"100%",minWidth:"10px",part:"progress-segment"},l));return jsxRuntime.jsx(S.Row,s(i({gap:1,height:"10px",part:"progress-segments"},o),{children:a}))}function It(e){return jsxRuntime.jsx("svg",s(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 Qn(){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 Ht(o){var n=o,{checked:e=!1}=n,t=m(n,["checked"]);return jsxRuntime.jsx(y,s(i({backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"check-indicator",position:"relative",height:"22px",width:"22px"},t),{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(Qn,{})})}))}function le(e,{onPrimary:t,onSecondary:o}={}){let{navigate:n}=To.useContext(V),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:To.useCallback((a,p,l=!0)=>M(this,null,function*(){if((yield t==null?void 0:t(e,a,p))===!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(p,l)),e.primaryButton.uri!=null&&n(e.primaryButton.uri,e.primaryButton.target);}else yield e.complete(p,l),e.primaryButtonUri!=null&&n(e.primaryButtonUri,e.primaryButtonUriTarget);return !0}),[e]),handleSecondary:To.useCallback((a,p)=>M(this,null,function*(){if((yield o==null?void 0:o(e,a,p))===!1)return a.preventDefault(),!1;if(e.secondaryButton!=null){let d=e.secondaryButton.action===!1?!1:r[e.secondaryButton.action];typeof d=="function"?d():d!==!1&&e.complete(p),e.secondaryButton.uri!=null&&n(e.secondaryButton.uri,e.secondaryButton.target);}else e.complete(p),e.secondaryButtonUri!=null&&n(e.secondaryButtonUri,e.secondaryButtonUriTarget);return !0}),[e])}}function At({onPrimary:e,onSecondary:t,step:o}){var u,f;let{handlePrimary:n,handleSecondary:r}=le(o,{onPrimary:e,onSecondary:t}),{blocked:a,completed:p,skipped:l}=o.$state,d=p||l||!a?jsxRuntime.jsx(Ht,{checked:p||l,marginLeft:"auto"}):jsxRuntime.jsx(y,{as:It,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(S.Row,{marginBottom:"2",part:"carousel-step-header",children:[o.iconUri&&jsxRuntime.jsx(h.Media,{borderRadius:"0",height:"24px",src:o.iconUri,width:"24px"}),d]}),jsxRuntime.jsx(h.Title,{children:o.title}),jsxRuntime.jsx(h.Subtitle,{children:o.subtitle}),jsxRuntime.jsxs(S.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=o.secondaryButton)==null?void 0:u.title}),jsxRuntime.jsx(h.Primary,{disabled:a,onClick:n,title:(f=o.primaryButton)==null?void 0:f.title})]})]})}function Wt(e){return jsxRuntime.jsx("svg",s(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 Lt(e){return jsxRuntime.jsx("svg",s(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 Nt=react.keyframes`
55
55
  from {
56
56
  opacity: 0;
57
57
  }
58
58
  to {
59
59
  opacity: 1;
60
60
  }
61
- `;function Wt({flow:e,sort:t,onPrimary:o,onSecondary:n}){var v,B;let[r,a]=Fo.useState(),[p]=Fo.useState({align:"start",container:".fr-carousel-content",skipSnaps:!0,slides:".fr-carousel-step",startIndex:t=="completed-last"?0:(B=(v=Array.from(e.steps.values()).find(w=>!w.$state.completed&&!w.$state.skipped))==null?void 0:v.order)!=null?B:0}),[s,d]=ti__default.default(p),[u,m]=Fo.useState(),[g,b]=Fo.useState();Fo.useLayoutEffect(()=>{d&&(u==null&&m(d.canScrollNext()),g==null&&b(d.canScrollPrev()),d.on("select",()=>{m(d.canScrollNext()),b(d.canScrollPrev());}));},[d]),Fo.useEffect(()=>{if(!r){let w=Array.from(e.steps.values()),P=w.filter(R=>R.$state.completed||R.$state.skipped).sort((R,k)=>R.order-k.order),C=w.filter(R=>!R.$state.completed&&!R.$state.skipped).sort((R,k)=>R.order-k.order);a(t==="completed-last"?[...C,...P].map(R=>R.id):w.map(R=>R.id));}},[]);let x=e.getNumberOfCompletedSteps(),T=e.getNumberOfAvailableSteps();return r?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(S.Row,{css:{"@container (max-width: 750px)":{flexDirection:"column",gap:D.space[5]}},justifyContent:"space-between",part:"carousel-header",children:[jsxRuntime.jsxs(S.Column,{part:"carousel-header-content",children:[jsxRuntime.jsx(F.H3,{children:e.title}),jsxRuntime.jsx(F.Body2,{color:"neutral.400",children:e.subtitle})]}),jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:2,part:"progress",children:[jsxRuntime.jsxs(F.Body2,{fontWeight:"demibold",part:"progress-text",children:[x,"/",T]}),jsxRuntime.jsx(ve,{current:x,total:T,minWidth:"200px"})]})]}),jsxRuntime.jsxs(y,{margin:`0 ${D.space[-4]}`,overflow:"hidden",part:"carousel-wrapper",px:"4",position:"relative",ref:s,children:[jsxRuntime.jsx(S.Row,{gap:4,part:"carousel-content",children:Array.from(e.steps.values()).filter(w=>w.$state.visible).sort((w,P)=>r.indexOf(w.id)-r.indexOf(P.id)).map(w=>jsxRuntime.jsx(Ot,{onPrimary:o,onSecondary:n,step:w},w.id))}),g&&jsxRuntime.jsx(S.Column,{animation:`${Mt} 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(O.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollPrev(),padding:"2",children:jsxRuntime.jsx(At,{height:"24px",width:"24px"})})}),u&&jsxRuntime.jsx(S.Column,{animation:`${Mt} 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(O.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollNext(),padding:"2",children:jsxRuntime.jsx(Ht,{height:"24px",width:"24px"})})})]})]}):null}function Lt(t){var e=f(t,[]);return jsxRuntime.jsx(z,l(i({as:h,borderWidth:1,containerType:"inline-size",p:"4",part:"carousel"},e),{children:o=>jsxRuntime.jsx(Wt,i(i({},e),o))}))}var Ve={};ie(Ve,{Content:()=>To,Root:()=>ko,Trigger:()=>Eo});function _t(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 ni=react.keyframes`
61
+ `;function _t({flow:e,sort:t,onPrimary:o,onSecondary:n}){var v,B;let[r,a]=To.useState(),[p]=To.useState({align:"start",container:".fr-carousel-content",skipSnaps:!0,slides:".fr-carousel-step",startIndex:t=="completed-last"?0:(B=(v=Array.from(e.steps.values()).find(F=>!F.$state.completed&&!F.$state.skipped))==null?void 0:v.order)!=null?B:0}),[l,d]=ni__default.default(p),[u,f]=To.useState(),[g,b]=To.useState();To.useLayoutEffect(()=>{d&&(u==null&&f(d.canScrollNext()),g==null&&b(d.canScrollPrev()),d.on("select",()=>{f(d.canScrollNext()),b(d.canScrollPrev());}));},[d]),To.useEffect(()=>{if(!r){let F=Array.from(e.steps.values()),P=F.filter(R=>R.$state.completed||R.$state.skipped).sort((R,k)=>R.order-k.order),C=F.filter(R=>!R.$state.completed&&!R.$state.skipped).sort((R,k)=>R.order-k.order);a(t==="completed-last"?[...C,...P].map(R=>R.id):F.map(R=>R.id));}},[]);let x=e.getNumberOfCompletedSteps(),T=e.getNumberOfAvailableSteps();return r?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(S.Row,{css:{"@container (max-width: 750px)":{flexDirection:"column",gap:D.space[5]}},justifyContent:"space-between",part:"carousel-header",children:[jsxRuntime.jsxs(S.Column,{part:"carousel-header-content",children:[jsxRuntime.jsx(w.H3,{children:e.title}),jsxRuntime.jsx(w.Body2,{color:"neutral.400",children:e.subtitle})]}),jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:2,part:"progress",children:[jsxRuntime.jsxs(w.Body2,{fontWeight:"demibold",part:"progress-text",children:[x,"/",T]}),jsxRuntime.jsx(Re,{current:x,total:T,minWidth:"200px"})]})]}),jsxRuntime.jsxs(y,{margin:`0 ${D.space[-4]}`,overflow:"hidden",part:"carousel-wrapper",px:"4",position:"relative",ref:l,children:[jsxRuntime.jsx(S.Row,{gap:4,part:"carousel-content",children:Array.from(e.steps.values()).filter(F=>F.$state.visible).sort((F,P)=>r.indexOf(F.id)-r.indexOf(P.id)).map(F=>jsxRuntime.jsx(At,{onPrimary:o,onSecondary:n,step:F},F.id))}),g&&jsxRuntime.jsx(S.Column,{animation:`${Nt} 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(O.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollPrev(),padding:"2",children:jsxRuntime.jsx(Lt,{height:"24px",width:"24px"})})}),u&&jsxRuntime.jsx(S.Column,{animation:`${Nt} 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(O.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollNext(),padding:"2",children:jsxRuntime.jsx(Wt,{height:"24px",width:"24px"})})})]})]}):null}function Ut(t){var e=m(t,[]);return jsxRuntime.jsx(z,s(i({as:h,borderWidth:1,containerType:"inline-size",p:"4",part:"carousel"},e),{children:o=>jsxRuntime.jsx(_t,i(i({},e),o))}))}var Le={};ie(Le,{Content:()=>Oo,Root:()=>Io,Trigger:()=>Ho});function Kt(e){return jsxRuntime.jsx("svg",s(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 ai=react.keyframes`
62
62
  from {
63
63
  height: 0;
64
64
  opacity: 0;
@@ -67,7 +67,7 @@ var Zo=Object.defineProperty,Jr=Object.defineProperties;var qr=Object.getOwnProp
67
67
  height: var(--radix-collapsible-content-height);
68
68
  opacity: 1;
69
69
  }
70
- `,ii=react.keyframes`
70
+ `,si=react.keyframes`
71
71
  from {
72
72
  height: var(--radix-collapsible-content-height);
73
73
  opacity: 1;
@@ -76,7 +76,7 @@ var Zo=Object.defineProperty,Jr=Object.defineProperties;var qr=Object.getOwnProp
76
76
  height: 0;
77
77
  opacity: 0;
78
78
  }
79
- `,ai=()=>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 si({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(ai,{})})})}function To({children:e}){return jsxRuntime.jsx(Te__namespace.Content,{asChild:!0,children:jsxRuntime.jsxs(S.Column,{css:{'&[data-state="open"]':{animation:`${ni} 300ms ease-out`},'&[data-state="closed"]':{animation:`${ii} 300ms ease-out`},overflow:"hidden"},gap:5,part:"collapsible-content",children:[jsxRuntime.jsx(y,{}),e]})})}function ko(a){var p=a,{children:e,disabled:t=!1,onOpenChange:o=()=>{},open:n=!1}=p,r=f(p,["children","disabled","onOpenChange","open"]);return jsxRuntime.jsx(Te__namespace.Root,{asChild:!0,disabled:t,open:n,onOpenChange:o,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 Eo({isCompleted:e,isBlocked:t,title:o}){return jsxRuntime.jsx(Te__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(S.Row,{alignItems:"center",justifyContent:"space-between",margin:-5,padding:5,zIndex:1,opacity:t?.4:1,disabled:t,pointerEvents:t?"none":"auto",cursor:t?"not-allowed":"pointer",part:"collapsible-header",children:[jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsx(si,{checked:e}),jsxRuntime.jsx(F.Body2,{fontWeight:"demibold",userSelect:"none",part:"collapsible-title",children:o})]}),jsxRuntime.jsx(y,{as:_t,color:"neutral.100",css:{"& path":{vectorEffect:"non-scaling-stroke"}},display:"block",height:"16px",order:2,part:"collapsible-step-icon",width:"16px"})]})})}var Ut=Fo.createContext({onPrimary:()=>{},onSecondary:()=>{},openStepId:null,setOpenStepId:()=>{},stepTypes:{}});function Gt({handlePrimary:e,handleSecondary:t,open:o,onOpenChange:n,step:r}){var T,v,B,w,P,C;let{$state:{blocked:a,completed:p,skipped:s},subtitle:d,title:u}=r,m=(v=(T=r.primaryButton)==null?void 0:T.title)!=null?v:r.primaryButtonTitle,g=(w=(B=r.secondaryButton)==null?void 0:B.title)!=null?w:r.secondaryButtonTitle,b=(P=r.props)!=null?P:{},x=!!a;return jsxRuntime.jsxs(ko,l(i({open:o,onOpenChange:n},b),{children:[jsxRuntime.jsx(Eo,{isBlocked:r.$state.blocked,isCompleted:p||s,title:u}),jsxRuntime.jsxs(To,{children:[jsxRuntime.jsx(h.Media,{aspectRatio:2.5,objectFit:"cover",overflowClipMargin:"unset",src:(C=r.videoUri)!=null?C:r.imageUri,transform:"translate3d(0, 0, 1px)",type:r.videoUri?"video":"image"}),jsxRuntime.jsx(h.Subtitle,{color:"neutral.400",children:d}),jsxRuntime.jsxs(S.Row,{gap:3,part:"collapsible-footer",children:[jsxRuntime.jsx(h.Secondary,{title:g,onClick:t}),jsxRuntime.jsx(h.Primary,{disabled:x,title:m,onClick:e})]})]})]}))}var ci={default:Gt};function ui(n){var r=n,{flow:e,step:t}=r,o=f(r,["flow","step"]);var v;let{onPrimary:a,onSecondary:p,openStepId:s,setOpenStepId:d,stepTypes:u}=Fo.useContext(Ut),{handlePrimary:m,handleSecondary:g}=le(t,{onPrimary:a,onSecondary:p}),b=(s!=null?s:e.getCurrentStep().id)===t.id,x=(v=u[t.type])!=null?v:Gt;function T(B){return M(this,null,function*(){d(B?t.id:""),B&&!t.$state.completed&&(yield t.start(),d(null));})}return jsxRuntime.jsx(x,l(i({flow:e,onOpenChange:T,open:b,step:t},o),{handlePrimary:m,handleSecondary:g}),t.id)}function eo(s){var d=s,{dismissible:e,flowId:t,onPrimary:o,onSecondary:n,part:r,stepTypes:a={}}=d,p=f(d,["dismissible","flowId","onPrimary","onSecondary","part","stepTypes"]);let[u,m]=Fo.useState(null),g=i(i({},ci),a);return jsxRuntime.jsx(Ut.Provider,{value:{openStepId:u,setOpenStepId:m,onPrimary:o,onSecondary:n,stepTypes:g},children:jsxRuntime.jsx(z,l(i({as:h,borderWidth:"md",flowId:t,part:["checklist",r]},p),{children:v=>{var B=v,{flow:b,handleDismiss:x}=B,T=f(B,["flow","handleDismiss"]);let P=Array.from(b.steps.entries()).filter(([,k])=>k.$state.visible===!0).map(([,k])=>jsxRuntime.jsx(ui,l(i({flow:b,handleDismiss:x},T),{step:k}),k.id)),C=b.getNumberOfCompletedSteps(),R=b.getNumberOfAvailableSteps();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(S.Column,{gap:2,children:[jsxRuntime.jsx(h.Header,{dismissible:e,handleDismiss:x,part:"checklist-header",subtitle:b.subtitle,title:b.title}),jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsxs(F.Body2,{fontWeight:"demibold",children:[C,"/",R]}),jsxRuntime.jsx(ve,{current:C,total:R,flexGrow:1})]})]}),P]})}}))})}var Ci=new Set(["required","min","max","minLength","maxLength","pattern"]);function Si({fieldComponent:e,control:t,fieldData:o,submit:n}){let r=reactHookForm.useFormContext();o.pattern!=null&&(typeof o.pattern=="string"?o.pattern=new RegExp(o.pattern.replace(/^\/|\/$/g,"")):typeof o.pattern=="object"&&typeof o.pattern.value=="string"&&(o.pattern.value=new RegExp(o.pattern.value.replace(/^\/|\/$/g,""))));let a=Object.fromEntries(Object.entries(o).filter(([s])=>Ci.has(s))),p=reactHookForm.useController({name:o.id,control:t,rules:a});return jsxRuntime.jsx(e,l(i({},p),{fieldData:o,formContext:r,submit:n}))}function Xt({fieldTypes:e,handleDismiss:t,handlePrimary:o,handleSecondary:n,parentProps:{dismissible:r},step:a}){var C,R,k,$,L;let{__readOnly:p}=Fo.useContext(V),s=Fo.useMemo(()=>{var E,I;return (I=(E=a.fields)==null?void 0:E.filter(A=>e[A.type]!=null&&A.id))!=null?I:[]},[a.fields,e]),d=reactHookForm.useForm({delayError:2e3,mode:"onChange",defaultValues:s.reduce((E,I)=>{var A;return E[I.id]=(A=I.value)!=null?A:"",E},{})});Fo.useEffect(()=>{d.formState.isDirty||d.reset(s.reduce((E,I)=>{var A;return E[I.id]=(A=I.value)!=null?A:"",E},{}));},[s]);let[u,m]=Fo.useState(!1),g=[],{control:b,handleSubmit:x}=d,T=(C=a.props)!=null?C:{};function v(E,I){m(!0),o(I,E,p===!0).then(()=>m(!1));}s.forEach(E=>{e[E.type]!=null&&g.push(jsxRuntime.jsx(Si,{control:b,fieldComponent:e[E.type],fieldData:E,submit:x(v)},`${a.flow.id}-${E.id}`));});let B=(k=(R=a.primaryButton)==null?void 0:R.title)!=null?k:a.primaryButtonTitle,w=(L=($=a.secondaryButton)==null?void 0:$.title)!=null?L:a.secondaryButtonTitle,P=!!(a.$state.blocked||!d.formState.isValid);return Fo.useEffect(()=>{d.clearErrors();},[a]),jsxRuntime.jsxs(S.Column,l(i({gap:5,part:"form-step"},T),{children:[jsxRuntime.jsx(h.Header,{dismissible:r,handleDismiss:t,part:"form-step-header",subtitle:a.subtitle,title:a.title}),jsxRuntime.jsx(reactHookForm.FormProvider,l(i({},d),{children:g})),jsxRuntime.jsxs(S.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[w&&jsxRuntime.jsx(O.Secondary,{onClick:n,title:w}),jsxRuntime.jsx(O.Primary,{disabled:P||u,onClick:x(v),title:B!=null?B:"Submit",loading:u})]},`form-footer-${a.id}`)]}))}function Jt({error:e}){var t;return (t=e==null?void 0:e.message)!=null&&t.length?jsxRuntime.jsx(F.Caption,{color:"red500",display:"block",part:"field-error",mt:"1",textAlign:"end",children:e==null?void 0:e.message}):null}function Do({children:e,id:t,required:o=!1}){return jsxRuntime.jsxs(F.Body2,{as:"label",htmlFor:t,part:"field-label",fontWeight:"medium",mb:"2",display:"block",children:[e,jsxRuntime.jsx(y,{part:"field-label-required",display:"inline",children:o&&"*"})]})}var Oo={backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md"},Le=l(i({},Oo),{px:"4",py:"2",display:"block",outline:"none",width:"100%"}),to={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 Y({children:e,field:t,fieldData:o,fieldState:n}){var u;let{id:r,label:a,placeholder:p}=o,{error:s}=n,d=l(i(i(i({id:r},t),p?{placeholder:p}:{}),Le),{"aria-invalid":!!s,value:(u=t.value)!=null?u:""});return jsxRuntime.jsxs(y,{part:"field",children:[jsxRuntime.jsx(Do,{id:r,required:!!o.required,children:a}),e(d),jsxRuntime.jsx(Jt,{error:s})]})}function Ee(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 Bi=Fo__namespace.forwardRef(({label:e,value:t},o)=>jsxRuntime.jsxs(y,{as:"label",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",htmlFor:t,justifyContent:"space-between",part:"field-radio",px:4,py:2,children:[jsxRuntime.jsx(F.Body2,{part:"field-radio-label",children:e}),jsxRuntime.jsx(De__namespace.Item,{id:t,value:t,ref:o,asChild:!0,children:jsxRuntime.jsx(y,{as:"button",backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",flex:"0 0 auto",padding:"0",part:"field-radio-value",position:"relative",height:"24px",width:"24px",children:jsxRuntime.jsx(y,l(i({as:De__namespace.Indicator},to),{children:jsxRuntime.jsx(Ee,{height:"14",width:"14"})}))})})]}));function Io(e){let{field:{onChange:t,value:o},fieldData:{options:n=[]}}=e,r=n.map(({label:a,value:p})=>jsxRuntime.jsx(Bi,{value:p,label:a},p));return jsxRuntime.jsx(Y,l(i({},e),{children:()=>jsxRuntime.jsx(De__namespace.Root,{value:o,onValueChange:t,asChild:!0,children:jsxRuntime.jsx(S.Column,{gap:2,part:"field-radio-group",children:r})})}))}function er(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 tr(e){let{field:{onChange:t,value:o},fieldData:{options:n=[]}}=e,[r,a]=Fo__namespace.useState([]);function p(s){let d=[];r.includes(s)?d=[...r.filter(u=>u!==s)]:d=[...r,s],a(d),t(d);}return jsxRuntime.jsx(Y,l(i({},e),{children:()=>jsxRuntime.jsx(S.Column,{gap:2,part:"field-select-multiple",children:n.map(({label:s,value:d})=>jsxRuntime.jsx(ro__namespace.Root,{value:r.includes(d)?d:void 0,onCheckedChange:()=>p(d),asChild:!0,children:jsxRuntime.jsxs(y,{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(F.Body2,{part:"field-check-label",children:s}),jsxRuntime.jsx(y,{backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",flex:"0 0 auto",id:d,padding:"0",part:"field-check-value",position:"relative",height:"24px",width:"24px",children:jsxRuntime.jsx(ro__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(y,l(i({},to),{children:jsxRuntime.jsx(Ee,{height:"14",width:"14"})}))})})]})},d))})}))}var Ei=Fo__namespace.forwardRef(({label:e,value:t},o)=>jsxRuntime.jsx(N__namespace.Item,{value:t,ref:o,asChild:!0,children:jsxRuntime.jsx(y,{"backgroundColor:hover":"neutral.900",borderRadius:"md",outline:"none",part:"field-select-option",px:"3",py:"2",children:jsxRuntime.jsx(N__namespace.ItemText,{asChild:!0,children:jsxRuntime.jsx(F.Body2,{part:"field-select-option-label",children:e})})})}));function Ho(e){let{field:{onChange:t,value:o},fieldData:{options:n=[],placeholder:r}}=e,a=n.map(({label:p,value:s})=>jsxRuntime.jsx(Ei,{value:s,label:p},s));return e.fieldData.multiple?jsxRuntime.jsx(tr,i({},e)):jsxRuntime.jsx(Y,l(i({},e),{children:()=>jsxRuntime.jsxs(N__namespace.Root,{value:o,onValueChange:t,children:[jsxRuntime.jsx(N__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(F.Body2,l(i({},Le),{alignItems:"center",display:"flex",justifyContent:"space-between",part:"field-select",children:[jsxRuntime.jsx(N__namespace.Value,{placeholder:r!=null?r:"Select one"}),jsxRuntime.jsx(N__namespace.Icon,{children:jsxRuntime.jsx(y,{as:er,color:"neutral.100",display:"block",height:"24px",part:"field-select-icon",width:"24px"})})]}))}),jsxRuntime.jsx(N__namespace.Portal,{children:jsxRuntime.jsx(N__namespace.Content,{position:"popper",sideOffset:4,asChild:!0,children:jsxRuntime.jsx(y,l(i({},Le),{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(N__namespace.Viewport,{children:a})}))})})]})}))}function $o(e){return jsxRuntime.jsx(Y,l(i({},e),{children:t=>jsxRuntime.jsx(F.Body2,i({as:"input",part:"field-text",type:"text"},t))}))}function Ao(e){return jsxRuntime.jsx(Y,l(i({},e),{children:t=>jsxRuntime.jsx(F.Body2,i({as:"textarea",part:"field-textarea"},t))}))}function sr(e){let{field:{onChange:t,value:o},fieldData:{options:n,label:r,id:a=[]}}=e;return jsxRuntime.jsxs(y,{part:"field",display:"flex",gap:2,alignItems:"center",children:[jsxRuntime.jsx(ro__namespace.Root,{defaultChecked:!0,onCheckedChange:t,value:o,checked:o===!0,asChild:!0,children:jsxRuntime.jsx(y,l(i({},Oo),{as:"button",width:"25px",minWidth:"25px",height:"25px",justifyContent:"center",alignItems:"center",display:"flex","backgroundColor:hover":"neutral.900",part:"field-checkbox",id:a,children:jsxRuntime.jsx(ro__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(y,{width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center",children:jsxRuntime.jsx(Ee,{height:"14",fill:"currentColor"})})})}))}),jsxRuntime.jsx(F.Body2,{part:"field-checkbox-label",as:"label",htmlFor:a,children:r})]})}var Oi={checkbox:sr,radio:Io,select:Ho,text:$o,textarea:Ao};function Ie(r){var a=r,{fieldTypes:e={},flowId:t,part:o}=a,n=f(a,["fieldTypes","flowId","part"]);let p=Object.assign({},Oi,e);return jsxRuntime.jsx(z,l(i({flowId:t,part:["form",o]},n),{children:s=>jsxRuntime.jsx(Xt,i({fieldTypes:p},s))}))}var ao={};ie(ao,{NPS:()=>_e});function dr({field:e,fieldData:t,submit:o}){var r,a;let n=[...Array(11)].map((p,s)=>{let d=e.value===s?O.Primary:O.Secondary;return jsxRuntime.jsx(d,{borderWidth:"1px",onClick:()=>{e.onChange(s),o();},title:`${s}`,css:{".fr-button-title":{fontSize:"15px"}}},s)});return jsxRuntime.jsxs(S.Column,{gap:2,children:[jsxRuntime.jsx(S.Row,{gap:2,part:"field-nps",css:{"@media (min-width: 660px)":{flexWrap:"nowrap",justifyContent:"space-between"},flexWrap:"wrap",justifyContent:"center"},children:n}),jsxRuntime.jsxs(S.Row,{justifyContent:"space-between",part:"field-nps-label",children:[jsxRuntime.jsx(F.Caption,{part:"field-nps-left-label",color:"neutral.400",children:(r=t.negativeLabel)!=null?r:"Not likely at all"}),jsxRuntime.jsx(F.Caption,{part:"field-nps-right-label",color:"neutral.400",children:(a=t.positiveLabel)!=null?a:"Extremely likely"})]})]})}function _e(a){var p=a,{as:e=H,flowId:t,fieldTypes:o,part:n}=p,r=f(p,["as","flowId","fieldTypes","part"]);let{flow:s}=Se(t);return jsxRuntime.jsx(Ie,l(i({alignSelf:"end",as:e,flowId:t,fieldTypes:i({nps:dr},o),modal:!1,onEscapeKeyDown:d=>{typeof r.onEscapeKeyDown=="function"&&r.onEscapeKeyDown(d),d.defaultPrevented||s.skip();},part:["nps",n]},r),{css:i({},i(l(i({},!s||s.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.css))}))}function $i(r,n){var a=r,{children:e,part:t}=a,o=f(a,["children","part"]);return jsxRuntime.jsx(reactRemoveScroll.RemoveScroll,{forwardProps:!0,ref:n,children:jsxRuntime.jsx(y,l(i({backgroundColor:"black",inset:"0",opacity:"0.5",part:["overlay",t],position:"absolute"},o),{children:e}))})}var so=Fo__namespace.forwardRef($i);var Mi=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function fr(n){var r=n,{clickable:e=!1,part:t=""}=r,o=f(r,["clickable","part"]);return jsxRuntime.jsxs(y,l(i({borderRadius:"24px",height:"24px",part:`ping-wrapper ${t}`,position:"relative",width:"24px",cursor:e?"pointer":void 0},o),{children:[jsxRuntime.jsx(y,{backgroundColor:"primary.surface",animation:`2s ease-out infinite ${Mi}`,borderRadius:"24px",height:"48px",left:"-12px",part:"ping-pulse",pointerEvents:"none",position:"absolute",top:"-12px",transformOrigin:"center center",width:"48px"}),jsxRuntime.jsx(y,{backgroundColor:"primary.surface",borderRadius:"12px",height:"24px",left:"0",part:"ping",position:"absolute",top:"0",width:"24px","backgroundColor:hover":e?"primary.hover.surface":void 0})]}))}function zi({maxX:e,maxY:t,radius:o,x1:n,x2:r,y1:a,y2:p}){return o>0?`path("${[`M${n+o},${a}`,`H${r-o}`,`A${o} ${o} 0,0,1 ${r} ${a+o}`,`V${p-o}`,`A${o} ${o} 0,0,1 ${r-o} ${p}`,`H${n+o}`,`A${o} ${o} 0,0,1 ${n} ${p-o}`,`V${t}`,`H${e}`,"V0","H0",`V${t}`,`H${n}`,`V${a+o}`,`A${o} ${o} 0,0,1 ${n+o} ${a}`,"Z"].join(" ")}")`:`path("M${n},${a} H${r} V${p} H${n} V${t} H${e} V0 H0 V${t} H${n} Z")`}function Ui(e){if(!window||!("nodeType"in e))return 0;let t=Number(window.getComputedStyle(e).borderRadius.replace(/\D/g,""));return Number.isNaN(t)?0:t}function Mo(r){var a=r,{anchor:e,part:t,style:o={}}=a,n=f(a,["anchor","part","style"]);let[p,s]=Fo.useState({maxX:0,maxY:0,radius:0,x1:0,x2:0,y1:0,y2:0}),{refs:d}=react$1.useFloating({middleware:[{name:"clipPath",fn({elements:u,rects:m}){return s({maxX:u.floating.clientWidth,maxY:u.floating.clientHeight,radius:Ui(u.reference),x1:m.reference.x,x2:m.reference.x+m.reference.width,y1:m.reference.y,y2:m.reference.y+m.reference.height}),{}}}],open:!0,placement:"top-center",transform:!1,whileElementsMounted:react$1.autoUpdate});return Fo.useEffect(()=>{try{let u=document.querySelector(e);u!=null?d.setReference(u):console.debug(`[frigade] Spotlight: No anchor found for selector: ${e}`);}catch(u){}},[e]),jsxRuntime.jsx(so,i({part:["spotlight",t],ref:d.setFloating,style:i({clipPath:zi(p)},o)},n))}function gr({align:e,side:t}){let o={},n="-12px",r={top:"bottom",right:"left",bottom:"top",left:"right"};return o[r[t]]=n,["before","end"].includes(e)?["top","bottom"].includes(t)?o.right=n:o.bottom=n:["after","start"].includes(e)?["top","bottom"].includes(t)?o.left=n:o.top=n:["top","bottom"].includes(t)?o.left=`calc(50% + ${n})`:o.top=`calc(50% + ${n})`,o}function xr(e,t){try{if(e.matches(t)&&hr(e))return e;let o=e.querySelectorAll(t);if(o.length>0&&hr(o[0]))return o[0]}catch(o){return null}}function hr(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function br(e){let[t,o]=Fo.useState(null);return Fo.useEffect(()=>{try{let n=document.querySelector(e);n!=null&&o(n);}catch(n){}},[e]),Fo.useEffect(()=>{let n=new MutationObserver(r=>{for(let a of r)if(a.type==="childList"){for(let p of a.addedNodes){if(p.nodeType!==Node.ELEMENT_NODE)continue;let s=xr(p,e);if(s!=null){o(s);break}}for(let p of a.removedNodes){if(p.nodeType!==Node.ELEMENT_NODE)continue;if(xr(p,e)!=null){o(null);break}}}});return n.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>n.disconnect()},[e]),{anchorElement:t}}function ra(e){switch(e){case"after":return "end";case"before":return "start";default:return e}}function Pr({align:e,alignOffset:t,anchor:o,onOpenChange:n=()=>{},open:r,side:a,sideOffset:p}){let s=`${a}-${ra(e)}`;function d({rects:R}){let k={alignmentAxis:t,mainAxis:p};return ["after","before"].includes(e)&&(["bottom","top"].includes(a)?k.alignmentAxis=t-R.floating.width:k.alignmentAxis=t-R.floating.height),k}let{context:u,floatingStyles:m,placement:g,refs:b}=react$1.useFloating({middleware:[react$1.offset(d,[e,t,a,p]),react$1.flip(),react$1.shift()],onOpenChange:n,open:r,placement:s,whileElementsMounted:react$1.autoUpdate}),x=react$1.useClick(u),T=react$1.useDismiss(u,{outsidePress:!1}),v=react$1.useRole(u),{getFloatingProps:B,getReferenceProps:w}=react$1.useInteractions([x,T,v]),{anchorElement:P}=br(o);Fo.useEffect(()=>{P!=null?b.setReference(P):console.debug(`[frigade] Hint: No anchor found for selector: ${o}`);},[P]);let C=g.split("-");return e==="before"?C[1]=C[1]==="end"?"after":"before":e==="after"&&(C[1]=C[1]==="start"?"before":"after"),{context:u,getFloatingProps:B,getReferenceProps:w,floatingStyles:m,placement:C.join("-"),refs:b}}function Vo(T){var v=T,{align:e="center",alignOffset:t=0,anchor:o,children:n,defaultOpen:r=!0,modal:a=!1,onOpenChange:p=()=>{},open:s,part:d,side:u="bottom",sideOffset:m=0,spotlight:g=!1,style:b={}}=v,x=f(v,["align","alignOffset","anchor","children","defaultOpen","modal","onOpenChange","open","part","side","sideOffset","spotlight","style"]);let[B,w]=Fo.useState(r),P=s!=null?s:B,{getFloatingProps:C,getReferenceProps:R,floatingStyles:k,placement:$,refs:L}=Pr({align:e,alignOffset:t,anchor:o,onOpenChange:he=>{p(he),s==null&&w(he);},open:P,side:u,sideOffset:m}),[E,I]=$.split("-"),A=R();return L.reference.current==null?null:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g&&P&&jsxRuntime.jsx(Mo,{anchor:o}),a&&!g&&P&&jsxRuntime.jsx(so,{lockScroll:!0}),jsxRuntime.jsxs(y,l(i(i({part:["hint",d],ref:L.setFloating,style:i(i({},k),b)},C()),x),{children:[P&&n,jsxRuntime.jsx(fr,l(i({},A),{position:"absolute",style:gr({align:I,side:E}),clickable:r===!1}))]}))]})}var sa=react.keyframes`
79
+ `,li=()=>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 pi({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(li,{})})})}function Oo({children:e}){return jsxRuntime.jsx(ke__namespace.Content,{asChild:!0,children:jsxRuntime.jsxs(S.Column,{css:{'&[data-state="open"]':{animation:`${ai} 300ms ease-out`},'&[data-state="closed"]':{animation:`${si} 300ms ease-out`},overflow:"hidden"},gap:5,part:"collapsible-content",children:[jsxRuntime.jsx(y,{}),e]})})}function Io(a){var p=a,{children:e,disabled:t=!1,onOpenChange:o=()=>{},open:n=!1}=p,r=m(p,["children","disabled","onOpenChange","open"]);return jsxRuntime.jsx(ke__namespace.Root,{asChild:!0,disabled:t,open:n,onOpenChange:o,children:jsxRuntime.jsx(h,s(i({borderWidth:"md",css:{'&[data-state="open"] .fr-collapsible-step-icon':{transform:"rotate(180deg)"}},gap:0,part:"collapsible-step"},r),{children:e}))})}function Ho({isCompleted:e,isBlocked:t,title:o}){return jsxRuntime.jsx(ke__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(S.Row,{alignItems:"center",justifyContent:"space-between",margin:-5,padding:5,zIndex:1,opacity:t?.4:1,disabled:t,pointerEvents:t?"none":"auto",cursor:t?"not-allowed":"pointer",part:"collapsible-header",children:[jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsx(pi,{checked:e}),jsxRuntime.jsx(w.Body2,{fontWeight:"demibold",userSelect:"none",part:"collapsible-title",children:o})]}),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 Xt=To.createContext({onPrimary:()=>{},onSecondary:()=>{},openStepId:null,setOpenStepId:()=>{},stepTypes:{}});function Jt({handlePrimary:e,handleSecondary:t,open:o,onOpenChange:n,step:r}){var T,v,B,F,P,C;let{$state:{blocked:a,completed:p,skipped:l},subtitle:d,title:u}=r,f=(v=(T=r.primaryButton)==null?void 0:T.title)!=null?v:r.primaryButtonTitle,g=(F=(B=r.secondaryButton)==null?void 0:B.title)!=null?F:r.secondaryButtonTitle,b=(P=r.props)!=null?P:{},x=!!a;return jsxRuntime.jsxs(Io,s(i({open:o,onOpenChange:n},b),{children:[jsxRuntime.jsx(Ho,{isBlocked:r.$state.blocked,isCompleted:p||l,title:u}),jsxRuntime.jsxs(Oo,{children:[jsxRuntime.jsx(h.Media,{aspectRatio:2.5,objectFit:"cover",overflowClipMargin:"unset",src:(C=r.videoUri)!=null?C:r.imageUri,transform:"translate3d(0, 0, 1px)",type:r.videoUri?"video":"image"}),jsxRuntime.jsx(h.Subtitle,{color:"neutral.400",children:d}),jsxRuntime.jsxs(S.Row,{gap:3,part:"collapsible-footer",children:[jsxRuntime.jsx(h.Secondary,{title:g,onClick:t}),jsxRuntime.jsx(h.Primary,{disabled:x,title:f,onClick:e})]})]})]}))}var mi={default:Jt};function fi(n){var r=n,{flow:e,step:t}=r,o=m(r,["flow","step"]);var v;let{onPrimary:a,onSecondary:p,openStepId:l,setOpenStepId:d,stepTypes:u}=To.useContext(Xt),{handlePrimary:f,handleSecondary:g}=le(t,{onPrimary:a,onSecondary:p}),b=(l!=null?l:e.getCurrentStep().id)===t.id,x=(v=u[t.type])!=null?v:Jt;function T(B){return M(this,null,function*(){d(B?t.id:""),B&&!t.$state.completed&&(yield t.start(),d(null));})}return jsxRuntime.jsx(x,s(i({flow:e,onOpenChange:T,open:b,step:t},o),{handlePrimary:f,handleSecondary:g}),t.id)}function to(l){var d=l,{dismissible:e,flowId:t,onPrimary:o,onSecondary:n,part:r,stepTypes:a={}}=d,p=m(d,["dismissible","flowId","onPrimary","onSecondary","part","stepTypes"]);let[u,f]=To.useState(null),g=i(i({},mi),a);return jsxRuntime.jsx(Xt.Provider,{value:{openStepId:u,setOpenStepId:f,onPrimary:o,onSecondary:n,stepTypes:g},children:jsxRuntime.jsx(z,s(i({as:h,borderWidth:"md",flowId:t,part:["checklist",r]},p),{children:v=>{var B=v,{flow:b,handleDismiss:x}=B,T=m(B,["flow","handleDismiss"]);let P=Array.from(b.steps.entries()).filter(([,k])=>k.$state.visible===!0).map(([,k])=>jsxRuntime.jsx(fi,s(i({flow:b,handleDismiss:x},T),{step:k}),k.id)),C=b.getNumberOfCompletedSteps(),R=b.getNumberOfAvailableSteps();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(S.Column,{gap:2,children:[jsxRuntime.jsx(h.Header,{dismissible:e,handleDismiss:x,part:"checklist-header",subtitle:b.subtitle,title:b.title}),jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsxs(w.Body2,{fontWeight:"demibold",children:[C,"/",R]}),jsxRuntime.jsx(Re,{current:C,total:R,flexGrow:1})]})]}),P]})}}))})}var wi=new Set(["required","min","max","minLength","maxLength","pattern"]);function Fi({fieldComponent:e,control:t,fieldData:o,submit:n}){let r=reactHookForm.useFormContext();o.pattern!=null&&(typeof o.pattern=="string"?o.pattern=new RegExp(o.pattern.replace(/^\/|\/$/g,"")):typeof o.pattern=="object"&&typeof o.pattern.value=="string"&&(o.pattern.value=new RegExp(o.pattern.value.replace(/^\/|\/$/g,""))));let a=Object.fromEntries(Object.entries(o).filter(([l])=>wi.has(l))),p=reactHookForm.useController({name:o.id,control:t,rules:a});return jsxRuntime.jsx(e,s(i({},p),{fieldData:o,formContext:r,submit:n}))}function Yt({fieldTypes:e,handleDismiss:t,handlePrimary:o,handleSecondary:n,parentProps:{dismissible:r},step:a}){var C,R,k,$,L;let{__readOnly:p}=To.useContext(V),l=To.useMemo(()=>{var E,I;return (I=(E=a.fields)==null?void 0:E.filter(A=>e[A.type]!=null&&A.id))!=null?I:[]},[a.fields,e]),d=reactHookForm.useForm({delayError:2e3,mode:"onChange",defaultValues:l.reduce((E,I)=>{var A;return E[I.id]=(A=I.value)!=null?A:"",E},{})});To.useEffect(()=>{d.formState.isDirty||d.reset(l.reduce((E,I)=>{var A;return E[I.id]=(A=I.value)!=null?A:"",E},{}));},[l]);let[u,f]=To.useState(!1),g=[],{control:b,handleSubmit:x}=d,T=(C=a.props)!=null?C:{};function v(E,I){f(!0),o(I,E,p===!0).then(()=>f(!1));}l.forEach(E=>{e[E.type]!=null&&g.push(jsxRuntime.jsx(Fi,{control:b,fieldComponent:e[E.type],fieldData:E,submit:x(v)},`${a.flow.id}-${E.id}`));});let B=(k=(R=a.primaryButton)==null?void 0:R.title)!=null?k:a.primaryButtonTitle,F=(L=($=a.secondaryButton)==null?void 0:$.title)!=null?L:a.secondaryButtonTitle,P=!!(a.$state.blocked||!d.formState.isValid);return To.useEffect(()=>{d.clearErrors();},[a]),jsxRuntime.jsxs(S.Column,s(i({gap:5,part:"form-step"},T),{children:[jsxRuntime.jsx(h.Header,{dismissible:r,handleDismiss:t,part:"form-step-header",subtitle:a.subtitle,title:a.title}),jsxRuntime.jsx(reactHookForm.FormProvider,s(i({},d),{children:g})),jsxRuntime.jsxs(S.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[F&&jsxRuntime.jsx(O.Secondary,{onClick:n,title:F}),jsxRuntime.jsx(O.Primary,{disabled:P||u,onClick:x(v),title:B!=null?B:"Submit",loading:u})]},`form-footer-${a.id}`)]}))}function Qt({error:e}){var t;return (t=e==null?void 0:e.message)!=null&&t.length?jsxRuntime.jsx(w.Caption,{color:"red500",display:"block",part:"field-error",mt:"1",textAlign:"end",children:e==null?void 0:e.message}):null}function $o({children:e,id:t,required:o=!1}){return jsxRuntime.jsxs(w.Body2,{as:"label",htmlFor:t,part:"field-label",fontWeight:"medium",mb:"2",display:"block",children:[e,jsxRuntime.jsx(y,{part:"field-label-required",display:"inline",children:o&&"*"})]})}var Ao={backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md"},Ne=s(i({},Ao),{px:"4",py:"2",display:"block",outline:"none",width:"100%"}),no={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 Y({children:e,field:t,fieldData:o,fieldState:n}){var u;let{id:r,label:a,placeholder:p}=o,{error:l}=n,d=s(i(i(i({id:r},t),p?{placeholder:p}:{}),Ne),{"aria-invalid":!!l,value:(u=t.value)!=null?u:""});return jsxRuntime.jsxs(y,{part:"field",children:[jsxRuntime.jsx($o,{id:r,required:!!o.required,children:a}),e(d),jsxRuntime.jsx(Qt,{error:l})]})}function De(e){return jsxRuntime.jsx("svg",s(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 ki=To__namespace.forwardRef(({label:e,value:t},o)=>jsxRuntime.jsxs(y,{as:"label",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",htmlFor:t,justifyContent:"space-between",part:"field-radio",px:4,py:2,children:[jsxRuntime.jsx(w.Body2,{part:"field-radio-label",children:e}),jsxRuntime.jsx(Oe__namespace.Item,{id:t,value:t,ref:o,asChild:!0,children:jsxRuntime.jsx(y,{as:"button",backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",flex:"0 0 auto",padding:"0",part:"field-radio-value",position:"relative",height:"24px",width:"24px",children:jsxRuntime.jsx(y,s(i({as:Oe__namespace.Indicator},no),{children:jsxRuntime.jsx(De,{height:"14",width:"14"})}))})})]}));function Mo(e){let{field:{onChange:t,value:o},fieldData:{options:n=[]}}=e,r=n.map(({label:a,value:p})=>jsxRuntime.jsx(ki,{value:p,label:a},p));return jsxRuntime.jsx(Y,s(i({},e),{children:()=>jsxRuntime.jsx(Oe__namespace.Root,{value:o,onValueChange:t,asChild:!0,children:jsxRuntime.jsx(S.Column,{gap:2,part:"field-radio-group",children:r})})}))}function io(e){return jsxRuntime.jsx("svg",s(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 ir(e){let{field:{onChange:t,value:o},fieldData:{options:n=[]}}=e,[r,a]=To__namespace.useState([]);function p(l){let d=[];r.includes(l)?d=[...r.filter(u=>u!==l)]:d=[...r,l],a(d),t(d);}return jsxRuntime.jsx(Y,s(i({},e),{children:()=>jsxRuntime.jsx(S.Column,{gap:2,part:"field-select-multiple",children:n.map(({label:l,value:d})=>jsxRuntime.jsx(ao__namespace.Root,{value:r.includes(d)?d:void 0,onCheckedChange:()=>p(d),asChild:!0,children:jsxRuntime.jsxs(y,{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(w.Body2,{part:"field-check-label",children:l}),jsxRuntime.jsx(y,{backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",flex:"0 0 auto",id:d,padding:"0",part:"field-check-value",position:"relative",height:"24px",width:"24px",children:jsxRuntime.jsx(ao__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(y,s(i({},no),{children:jsxRuntime.jsx(De,{height:"14",width:"14"})}))})})]})},d))})}))}var Oi=To__namespace.forwardRef(({label:e,value:t},o)=>jsxRuntime.jsx(N__namespace.Item,{value:t,ref:o,asChild:!0,children:jsxRuntime.jsx(y,{"backgroundColor:hover":"neutral.900",borderRadius:"md",outline:"none",part:"field-select-option",px:"3",py:"2",children:jsxRuntime.jsx(N__namespace.ItemText,{asChild:!0,children:jsxRuntime.jsx(w.Body2,{part:"field-select-option-label",children:e})})})}));function Wo(e){let{field:{onChange:t,value:o},fieldData:{options:n=[],placeholder:r}}=e,a=n.map(({label:p,value:l})=>jsxRuntime.jsx(Oi,{value:l,label:p},l));return e.fieldData.multiple?jsxRuntime.jsx(ir,i({},e)):jsxRuntime.jsx(Y,s(i({},e),{children:()=>jsxRuntime.jsxs(N__namespace.Root,{value:o,onValueChange:t,children:[jsxRuntime.jsx(N__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(w.Body2,s(i({},Ne),{alignItems:"center",display:"flex",justifyContent:"space-between",part:"field-select",children:[jsxRuntime.jsx(N__namespace.Value,{placeholder:r!=null?r:"Select one"}),jsxRuntime.jsx(N__namespace.Icon,{children:jsxRuntime.jsx(y,{as:io,color:"neutral.100",display:"block",height:"24px",part:"field-select-icon",width:"24px"})})]}))}),jsxRuntime.jsx(N__namespace.Portal,{children:jsxRuntime.jsx(N__namespace.Content,{position:"popper",sideOffset:4,asChild:!0,children:jsxRuntime.jsx(y,s(i({},Ne),{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(N__namespace.Viewport,{children:a})}))})})]})}))}function Vo(e){return jsxRuntime.jsx(Y,s(i({},e),{children:t=>jsxRuntime.jsx(w.Body2,i({as:"input",part:"field-text",type:"text"},t))}))}function Lo(e){return jsxRuntime.jsx(Y,s(i({},e),{children:t=>jsxRuntime.jsx(w.Body2,i({as:"textarea",part:"field-textarea"},t))}))}function dr(e){let{field:{onChange:t,value:o},fieldData:{options:n,label:r,id:a=[]}}=e;return jsxRuntime.jsxs(y,{part:"field",display:"flex",gap:2,alignItems:"center",children:[jsxRuntime.jsx(ao__namespace.Root,{defaultChecked:!0,onCheckedChange:t,value:o,checked:o===!0,asChild:!0,children:jsxRuntime.jsx(y,s(i({},Ao),{as:"button",width:"25px",minWidth:"25px",height:"25px",justifyContent:"center",alignItems:"center",display:"flex","backgroundColor:hover":"neutral.900",part:"field-checkbox",id:a,children:jsxRuntime.jsx(ao__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(y,{width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center",children:jsxRuntime.jsx(De,{height:"14",fill:"currentColor"})})})}))}),jsxRuntime.jsx(w.Body2,{part:"field-checkbox-label",as:"label",htmlFor:a,children:r})]})}var Hi={checkbox:dr,radio:Mo,select:Wo,text:Vo,textarea:Lo};function He(r){var a=r,{fieldTypes:e={},flowId:t,part:o}=a,n=m(a,["fieldTypes","flowId","part"]);let p=Object.assign({},Hi,e);return jsxRuntime.jsx(z,s(i({flowId:t,part:["form",o]},n),{children:l=>jsxRuntime.jsx(Yt,i({fieldTypes:p},l))}))}var po={};ie(po,{NPS:()=>ze});function mr({field:e,fieldData:t,submit:o}){var r,a;let n=[...Array(11)].map((p,l)=>{let d=e.value===l?O.Primary:O.Secondary;return jsxRuntime.jsx(d,{borderWidth:"1px",onClick:()=>{e.onChange(l),o();},title:`${l}`,css:{".fr-button-title":{fontSize:"15px"}}},l)});return jsxRuntime.jsxs(S.Column,{gap:2,children:[jsxRuntime.jsx(S.Row,{gap:2,part:"field-nps",css:{"@media (min-width: 660px)":{flexWrap:"nowrap",justifyContent:"space-between"},flexWrap:"wrap",justifyContent:"center"},children:n}),jsxRuntime.jsxs(S.Row,{justifyContent:"space-between",part:"field-nps-label",children:[jsxRuntime.jsx(w.Caption,{part:"field-nps-left-label",color:"neutral.400",children:(r=t.negativeLabel)!=null?r:"Not likely at all"}),jsxRuntime.jsx(w.Caption,{part:"field-nps-right-label",color:"neutral.400",children:(a=t.positiveLabel)!=null?a:"Extremely likely"})]})]})}function ze(a){var p=a,{as:e=H,flowId:t,fieldTypes:o,part:n}=p,r=m(p,["as","flowId","fieldTypes","part"]);let{flow:l}=we(t);return jsxRuntime.jsx(He,s(i({alignSelf:"end",as:e,flowId:t,fieldTypes:i({nps:mr},o),modal:!1,onEscapeKeyDown:d=>{typeof r.onEscapeKeyDown=="function"&&r.onEscapeKeyDown(d),d.defaultPrevented||l.skip();},part:["nps",n]},r),{css:i({},i(s(i({},!l||l.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.css))}))}function Mi(r,n){var a=r,{children:e,part:t}=a,o=m(a,["children","part"]);return jsxRuntime.jsx(reactRemoveScroll.RemoveScroll,{forwardProps:!0,ref:n,children:jsxRuntime.jsx(y,s(i({backgroundColor:"black",inset:"0",opacity:"0.5",part:["overlay",t],position:"absolute"},o),{children:e}))})}var co=To__namespace.forwardRef(Mi);var Vi=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function xr(n){var r=n,{clickable:e=!1,part:t=""}=r,o=m(r,["clickable","part"]);return jsxRuntime.jsxs(y,s(i({borderRadius:"24px",height:"24px",part:`ping-wrapper ${t}`,position:"relative",width:"24px",cursor:e?"pointer":void 0},o),{children:[jsxRuntime.jsx(y,{backgroundColor:"primary.surface",animation:`2s ease-out infinite ${Vi}`,borderRadius:"24px",height:"48px",left:"-12px",part:"ping-pulse",pointerEvents:"none",position:"absolute",top:"-12px",transformOrigin:"center center",width:"48px"}),jsxRuntime.jsx(y,{backgroundColor:"primary.surface",borderRadius:"12px",height:"24px",left:"0",part:"ping",position:"absolute",top:"0",width:"24px","backgroundColor:hover":e?"primary.hover.surface":void 0})]}))}function Gi({maxX:e,maxY:t,radius:o,x1:n,x2:r,y1:a,y2:p}){return o>0?`path("${[`M${n+o},${a}`,`H${r-o}`,`A${o} ${o} 0,0,1 ${r} ${a+o}`,`V${p-o}`,`A${o} ${o} 0,0,1 ${r-o} ${p}`,`H${n+o}`,`A${o} ${o} 0,0,1 ${n} ${p-o}`,`V${t}`,`H${e}`,"V0","H0",`V${t}`,`H${n}`,`V${a+o}`,`A${o} ${o} 0,0,1 ${n+o} ${a}`,"Z"].join(" ")}")`:`path("M${n},${a} H${r} V${p} H${n} V${t} H${e} V0 H0 V${t} H${n} Z")`}function Ki(e){if(!window||!("nodeType"in e))return 0;let t=Number(window.getComputedStyle(e).borderRadius.replace(/\D/g,""));return Number.isNaN(t)?0:t}function No(r){var a=r,{anchor:e,part:t,style:o={}}=a,n=m(a,["anchor","part","style"]);let[p,l]=To.useState({maxX:0,maxY:0,radius:0,x1:0,x2:0,y1:0,y2:0}),{refs:d}=react$1.useFloating({middleware:[{name:"clipPath",fn({elements:u,rects:f}){return l({maxX:u.floating.clientWidth,maxY:u.floating.clientHeight,radius:Ki(u.reference),x1:f.reference.x,x2:f.reference.x+f.reference.width,y1:f.reference.y,y2:f.reference.y+f.reference.height}),{}}}],open:!0,placement:"top-center",transform:!1,whileElementsMounted:react$1.autoUpdate});return To.useEffect(()=>{try{let u=document.querySelector(e);u!=null?d.setReference(u):console.debug(`[frigade] Spotlight: No anchor found for selector: ${e}`);}catch(u){}},[e]),jsxRuntime.jsx(co,i({part:["spotlight",t],ref:d.setFloating,style:i({clipPath:Gi(p)},o)},n))}function hr({align:e,side:t}){let o={},n="-12px",r={top:"bottom",right:"left",bottom:"top",left:"right"};return o[r[t]]=n,["before","end"].includes(e)?["top","bottom"].includes(t)?o.right=n:o.bottom=n:["after","start"].includes(e)?["top","bottom"].includes(t)?o.left=n:o.top=n:["top","bottom"].includes(t)?o.left=`calc(50% + ${n})`:o.top=`calc(50% + ${n})`,o}function Pr(e,t){try{if(e.matches(t)&&Cr(e))return e;let o=e.querySelectorAll(t);if(o.length>0&&Cr(o[0]))return o[0]}catch(o){return null}}function Cr(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function Sr(e){let[t,o]=To.useState(null);return To.useEffect(()=>{try{let n=document.querySelector(e);n!=null&&o(n);}catch(n){}},[e]),To.useEffect(()=>{let n=new MutationObserver(r=>{for(let a of r)if(a.type==="childList"){for(let p of a.addedNodes){if(p.nodeType!==Node.ELEMENT_NODE)continue;let l=Pr(p,e);if(l!=null){o(l);break}}for(let p of a.removedNodes){if(p.nodeType!==Node.ELEMENT_NODE)continue;if(Pr(p,e)!=null){o(null);break}}}});return n.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>n.disconnect()},[e]),{anchorElement:t}}function ia(e){switch(e){case"after":return "end";case"before":return "start";default:return e}}function wr({align:e,alignOffset:t,anchor:o,onOpenChange:n=()=>{},open:r,side:a,sideOffset:p}){let l=`${a}-${ia(e)}`;function d({rects:R}){let k={alignmentAxis:t,mainAxis:p};return ["after","before"].includes(e)&&(["bottom","top"].includes(a)?k.alignmentAxis=t-R.floating.width:k.alignmentAxis=t-R.floating.height),k}let{context:u,floatingStyles:f,placement:g,refs:b}=react$1.useFloating({middleware:[react$1.offset(d,[e,t,a,p]),react$1.flip(),react$1.shift()],onOpenChange:n,open:r,placement:l,whileElementsMounted:react$1.autoUpdate}),x=react$1.useClick(u),T=react$1.useDismiss(u,{outsidePress:!1}),v=react$1.useRole(u),{getFloatingProps:B,getReferenceProps:F}=react$1.useInteractions([x,T,v]),{anchorElement:P}=Sr(o);To.useEffect(()=>{P!=null?b.setReference(P):console.debug(`[frigade] Hint: No anchor found for selector: ${o}`);},[P]);let C=g.split("-");return e==="before"?C[1]=C[1]==="end"?"after":"before":e==="after"&&(C[1]=C[1]==="start"?"before":"after"),{context:u,getFloatingProps:B,getReferenceProps:F,floatingStyles:f,placement:C.join("-"),refs:b}}function zo(T){var v=T,{align:e="center",alignOffset:t=0,anchor:o,children:n,defaultOpen:r=!0,modal:a=!1,onOpenChange:p=()=>{},open:l,part:d,side:u="bottom",sideOffset:f=0,spotlight:g=!1,style:b={}}=v,x=m(v,["align","alignOffset","anchor","children","defaultOpen","modal","onOpenChange","open","part","side","sideOffset","spotlight","style"]);let[B,F]=To.useState(r),P=l!=null?l:B,{getFloatingProps:C,getReferenceProps:R,floatingStyles:k,placement:$,refs:L}=wr({align:e,alignOffset:t,anchor:o,onOpenChange:he=>{p(he),l==null&&F(he);},open:P,side:u,sideOffset:f}),[E,I]=$.split("-"),A=R();return L.reference.current==null?null:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g&&P&&jsxRuntime.jsx(No,{anchor:o}),a&&!g&&P&&jsxRuntime.jsx(co,{lockScroll:!0}),jsxRuntime.jsxs(y,s(i(i({part:["hint",d],ref:L.setFloating,style:i(i({},k),b)},C()),x),{children:[P&&n,jsxRuntime.jsx(xr,s(i({},A),{position:"absolute",style:hr({align:I,side:E}),clickable:r===!1}))]}))]})}var pa=react.keyframes`
80
80
  from {
81
81
  opacity: 0;
82
82
  }
@@ -86,7 +86,7 @@ var Zo=Object.defineProperty,Jr=Object.defineProperties;var qr=Object.getOwnProp
86
86
  to {
87
87
  opacity: 1;
88
88
  }
89
- `;function lo(v){var B=v,{align:e,alignOffset:t,defaultOpen:o,dismissible:n,flow:r,handleDismiss:a,modal:p,onPrimary:s,onSecondary:d,part:u,side:m,sideOffset:g,spotlight:b,step:x}=B,T=f(B,["align","alignOffset","defaultOpen","dismissible","flow","handleDismiss","modal","onPrimary","onSecondary","part","side","sideOffset","spotlight","step"]);var $,L,E,I,A;let{handlePrimary:w,handleSecondary:P}=le(x,{onPrimary:s,onSecondary:d}),C=(L=($=x.primaryButton)==null?void 0:$.title)!=null?L:x.primaryButtonTitle,R=(I=(E=x.secondaryButton)==null?void 0:E.title)!=null?I:x.secondaryButtonTitle,k=!!x.$state.blocked;return jsxRuntime.jsx(Vo,l(i({align:e,alignOffset:t,anchor:x.selector,"data-step-id":x.id,defaultOpen:o,modal:p,part:u,side:m,sideOffset:g,spotlight:b},T),{children:jsxRuntime.jsxs(h,{animation:`${sa} 300ms ease-out`,boxShadow:"md",maxWidth:"min(360px, calc(100vw - 25px))",children:[jsxRuntime.jsx(h.Media,{aspectRatio:"2",borderRadius:"md md 0 0",borderWidth:"0",margin:"-5 -5 0",objectFit:"cover",overflowClipMargin:"unset",src:(A=x.videoUri)!=null?A:x.imageUri,transform:"translate3d(0, 0, 1px)",type:x.videoUri?"video":"image"}),jsxRuntime.jsx(h.Header,{css:{".fr-dismiss":{position:"absolute",right:"12px",top:"12px"}},dismissible:n,handleDismiss:a,subtitle:x.subtitle,title:x.title}),jsxRuntime.jsxs(h.Footer,{children:[r.getNumberOfAvailableSteps()>1&&jsxRuntime.jsx(Ye,{current:r.getCurrentStepOrder()+1,marginRight:"auto",total:r.getNumberOfAvailableSteps()}),jsxRuntime.jsx(h.Secondary,{disabled:k,onClick:P,title:R}),jsxRuntime.jsx(h.Primary,{disabled:k,onClick:w,title:C})]})]})}))}function wr(e,t,o){let[n,r]=Fo.useState(!1),a=Fo.useRef();return Fo.useEffect(()=>{a.current=typeof t=="string"?document.querySelector(t):t,r(!0);},[]),n?reactDom.createPortal(e,a.current,o):null}function po(T){var v=T,{align:e="after",alignOffset:t=0,as:o,defaultOpen:n,dismissible:r=!1,flowId:a,modal:p,part:s,sequential:d=!0,side:u="bottom",sideOffset:m=0,spotlight:g,zIndex:b=9999}=v,x=f(v,["align","alignOffset","as","defaultOpen","dismissible","flowId","modal","part","sequential","side","sideOffset","spotlight","zIndex"]);let{onDismiss:B,onPrimary:w,onSecondary:P}=x;return wr(jsxRuntime.jsx(z,l(i({as:o,flowId:a,part:"tour"},x),{children:({flow:C,handleDismiss:R,parentProps:{containerProps:k},step:$})=>{var E,I,A,he;let L=i({align:e,alignOffset:t,dismissible:r,flow:C,handleDismiss:R,modal:p,onPrimary:w,onSecondary:P,part:s,side:u,sideOffset:m,spotlight:g,step:$,zIndex:(A=(I=(E=$.props)==null?void 0:E.zIndex)!=null?I:k==null?void 0:k.zIndex)!=null?A:b},(he=$.props)!=null?he:{});return d?jsxRuntime.jsx(lo,i({defaultOpen:n!=null?n:!0},L),$.id):Array.from(C.steps.values()).filter(Q=>{let{blocked:$e,completed:ue,skipped:ee,visible:we}=Q.$state;return !$e&&!ue&&!ee&&we}).map(Q=>{var Ge,K,oe,ne,te;function $e(me){return M(this,null,function*(){return (yield B==null?void 0:B(C,me))===!1?(me.preventDefault(),!1):(Q.skip(),!0)})}let ue=g&&Q.id===$.id,ee=(oe=(K=(Ge=Q.props)==null?void 0:Ge.zIndex)!=null?K:k==null?void 0:k.zIndex)!=null?oe:b,we=i({align:e,alignOffset:t,dismissible:r,flow:C,handleDismiss:$e,onPrimary:w,onSecondary:P,part:s,side:u,sideOffset:m,spotlight:g,zIndex:ee},(ne=Q.props)!=null?ne:{});return jsxRuntime.jsx(lo,i({css:{"&:has([aria-expanded=true])":{zIndex:Number(ee)+2},".fr-overlay":{zIndex:Number(ee)+1},".fr-progress-fraction":{display:"none"}},defaultOpen:(te=n||ue)!=null?te:!1,step:Q},we),`${Q.id}-${ue}`)})}})),"body")}function co(){let{frigade:e}=Fo.useContext(V),[,t]=Fo.useState(!1),o,n=Fo.useCallback(p=>{e==null||e.getCollections().then(()=>{p();});let s=()=>{clearTimeout(o),o=setTimeout(()=>{t(d=>!d),p();},0);};return e==null||e.onStateChange(s),()=>{e==null||e.removeStateChangeHandler(s);}},[]),r=()=>{let p;try{p=e==null?void 0:e.getCollectionsSync();}catch(s){}return p};return {collections:Fo.useSyncExternalStore(n,r,r)}}function Fr(e){var s,d,u,m;let{frigade:t}=Fo.useContext(V),{collections:o}=co(),n=o==null?void 0:o.get(e),a=(m=((u=(d=(s=o==null?void 0:o.get(e))==null?void 0:s.flows)==null?void 0:d.filter(g=>g.visible).map(g=>l(i({},g),{flow:t==null?void 0:t.getFlowSync(g.flowId)})))!=null?u:[]).find(({flow:g})=>g.isVisible))==null?void 0:m.flowId,{flow:p}=Se(a);return {collection:n,currentFlow:p}}function No(r){var a=r,{collectionId:e,part:t,variables:o={}}=a,n=f(a,["collectionId","part","variables"]);var u,m,g;let p={ANNOUNCEMENT:_o,BANNER:vo,CARD:h,CHECKLIST:eo,EMBEDDED_TIP:h,FORM:Ie,NPS_SURVEY:_e,SURVEY:_e,TOUR:po},{currentFlow:s}=Fr(e),d=(m=p[(u=s==null?void 0:s.rawData)==null?void 0:u.flowType])!=null?m:null;return s==null||d==null?null:((g=s==null?void 0:s.rawData)==null?void 0:g.flowType)===js.FlowType.FORM?jsxRuntime.jsx(y,l(i({part:["collection",t],"data-collection-id":e},n),{children:jsxRuntime.jsx(Ie,{flowId:s.id,as:H,variables:o},s.id)})):jsxRuntime.jsx(y,l(i({part:["collection",t],"data-collection-id":e},n),{children:jsxRuntime.jsx(d,{flowId:s.id,variables:o},s.id)}))}function vr(){var o,n;let{collections:e}=co(),t=(n=Array.from((o=e==null?void 0:e.entries())!=null?o:[]).find(r=>r[1].collectionType==="DEFAULT"))==null?void 0:n[0];return t==null?null:jsxRuntime.jsx(No,{as:null,collectionId:t})}var V=Fo.createContext({apiKey:"",navigate:()=>{},hasInitialized:!1,registerComponent:()=>{},unregisterComponent:()=>{},variables:{}});function zo(){let{frigade:e}=Fo.useContext(V);return {frigade:e,isLoading:!(e!=null&&e.isReady())}}function Rr(){let{frigade:e}=zo();return Fo.useEffect(()=>{M(this,null,function*(){(yield e.getFlows()).forEach(o=>{o.steps.forEach(n=>{if(n.imageUri){let r=new Image;r.src=n.imageUri;}});});});},[]),null}var Br="2.5.10";function Dr(p){var s=p,{children:e,css:t={},defaultCollection:o=!0,navigate:n,theme:r}=s,a=f(s,["children","css","defaultCollection","navigate","theme"]);let d=r?bo(r):{},u=Fo.useRef(new Map),m=Fo.useRef(),[g,b]=Fo.useState(!1),x=Fo.useMemo(()=>(b(!1),m.current=void 0,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,__platformVersion:Br,__platformName:"React"})),[a.userId,a.groupId,a.apiKey]);Fo.useEffect(()=>{if(a.__flowStateOverrides){let P=x.getConfig();P.__flowStateOverrides=a.__flowStateOverrides,x.reload(P);}},[a.__flowStateOverrides]);function T(){let P=[...u.current.entries()].map(([C,R])=>[C,R.callback]);x.batchRegister(P),b(!0);}function v(P,C){if(m.current&&clearTimeout(m.current),g){u.current.has(P)?x.getFlow(P).then(R=>C(R.isVisible)):(x.getFlow(P).then(R=>R.register(C)),u.current.set(P,{callback:C}));return}u.current.has(P)||u.current.set(P,{callback:C}),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>T(),0);}function B(P){u.current.has(P)&&x.getFlow(P).then(C=>{u.current.delete(P),C==null||C.unregister();});}let w=n!=null?n:(P,C="_self")=>{window.open(P,C);};return Fo.useEffect(()=>()=>{x.destroy();},[]),jsxRuntime.jsxs(V.Provider,{value:l(i({navigate:w},a),{frigade:x,registerComponent:v,unregisterComponent:B,hasInitialized:g,variables:a.variables||{}}),children:[jsxRuntime.jsx(react.Global,{styles:{":root":i(i(i({},Po),d),t)}}),jsxRuntime.jsxs(react.ThemeProvider,{theme:D,children:[o&&jsxRuntime.jsx(vr,{}),e]}),a.preloadImages!==!1&&jsxRuntime.jsx(Rr,{})]})}function Se(e,t){let{frigade:o,variables:n}=Fo.useContext(V),[,r]=Fo.useState(!1),a=Fo.useCallback(s=>{o==null||o.getFlow(e).then(()=>{s();});let d=u=>{u.id===e&&setTimeout(()=>{r(m=>!m),s();},0);};return o==null||o.onStateChange(d),()=>{o==null||o.removeStateChangeHandler(d);}},[e,o]),p=Fo.useSyncExternalStore(a,()=>o==null?void 0:o.getFlowSync(e),()=>o==null?void 0:o.getFlowSync(e));return p==null||p.applyVariables(i(i({},n),t==null?void 0:t.variables)),{flow:p,isLoading:o!=null&&o.hasFailedToLoad()?!1:!p}}function Go(e,{onComplete:t,onDismiss:o}={}){let n=Fo.useRef(null);return Fo.useEffect(()=>{if(e==null)return;function r(){return M(this,null,function*(){e.isCompleted&&n.current===!1&&(yield t==null?void 0:t(e));})}return r(),n.current=e==null?void 0:e.isCompleted,()=>{r();}},[e==null?void 0:e.isCompleted]),{handleDismiss:Fo.useCallback(r=>M(this,null,function*(){if((yield o==null?void 0:o(e,r))===!1)return r.preventDefault(),!1;e.skip();}),[e])}}var de=new Set;function Ko(e,t=!0){let o=Fo.useCallback(()=>{de.has(e==null?void 0:e.id)&&de.delete(e==null?void 0:e.id);},[de,t]),n=Fo.useCallback(()=>{t&&(e!=null&&e.isVisible)&&!de.has(e.id)&&de.add(e.id);},[de,t]);Fo.useEffect(()=>()=>{o();},[]),Fo.useEffect(()=>{n();let a=()=>{o();};return window.addEventListener("popstate",a),window.addEventListener("beforeunload",a),()=>{o(),window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",a);}},[n,o]),e!=null&&e.isVisible?n():o();let r=de.size>0?de.values().next().value:null;return {isCurrentModal:t?r===(e==null?void 0:e.id)||de.size==0:!0}}function z(u){var m=u,{as:e,children:t,flowId:o,onComplete:n,onDismiss:r,onPrimary:a,onSecondary:p,variables:s}=m,d=f(m,["as","children","flowId","onComplete","onDismiss","onPrimary","onSecondary","variables"]);var E,A;let{flow:g}=Se(o,{variables:s}),I=i(i({},d),(E=g==null?void 0:g.props)!=null?E:{}),{dismissible:b=!1,forceMount:x=!1}=I,T=f(I,["dismissible","forceMount"]),v=g==null?void 0:g.getCurrentStep(),{handleDismiss:B}=Go(g,{onComplete:n,onDismiss:r}),{handlePrimary:w,handleSecondary:P}=le(v,{onPrimary:a,onSecondary:p}),C=(T==null?void 0:T.modal)||typeof e=="function"&&(e==null?void 0:e.displayName)==="Dialog"||[js.FlowType.ANNOUNCEMENT,js.FlowType.TOUR].includes((A=g==null?void 0:g.rawData)==null?void 0:A.flowType),{isCurrentModal:R}=Ko(g,C),k=x&&((g==null?void 0:g.isCompleted)||(g==null?void 0:g.isSkipped));if(!g||!g.isVisible&&!k||!k&&!R)return null;(k||!g.isCompleted&&!g.isSkipped)&&v.start();let $=e===null?Fo.Fragment:e!=null?e:y,L=l(i({},T),{"data-flow-id":g.id});return jsxRuntime.jsx($,l(i({},e===null?{}:L),{children:t({flow:g,handleDismiss:B,handlePrimary:w,handleSecondary:P,parentProps:{dismissible:b,flowId:o,variables:s,containerProps:L},step:v})}))}function Ar(o){var n=o,{part:e}=n,t=f(n,["part"]);return jsxRuntime.jsx(z,l(i({as:h,gap:5,borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",part:["card",e]},t),{children:({handleDismiss:r,handlePrimary:a,handleSecondary:p,parentProps:{dismissible:s},step:d})=>{var g,b,x,T;let u=(b=(g=d.primaryButton)==null?void 0:g.title)!=null?b:d.primaryButtonTitle,m=(T=(x=d.secondaryButton)==null?void 0:x.title)!=null?T:d.secondaryButtonTitle;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(h.Header,{dismissible:s,handleDismiss:r,subtitle:d.subtitle,title:d.title}),jsxRuntime.jsx(h.Media,{src:d.imageUri,css:{objectFit:"contain",width:"100%"}}),jsxRuntime.jsxs(S.Row,{gap:3,justifyContent:"flex-end",part:"card-footer",children:[jsxRuntime.jsx(h.Secondary,{title:m,onClick:p}),jsxRuntime.jsx(h.Primary,{title:u,onClick:a})]})]})}}))}function mo(n){var r=n,{part:e,src:t}=r,o=f(r,["part","src"]);return jsxRuntime.jsx(y,i({as:"img",maxWidth:"unset",part:["image",e],src:t},o))}function Wa(e){var t,o,n,r,a;return e.includes("youtube")?`https://www.youtube.com/embed/${(t=e.split("v=")[1])==null?void 0:t.split("&")[0]}`:e.includes("youtu.be")?`https://www.youtube.com/embed/${(o=e.split("youtu.be/")[1])==null?void 0:o.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 fo(n){var r=n,{part:e,src:t}=r,o=f(r,["part","src"]);let a=Wa(t);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},o)):t!=null&&t.endsWith(".mp4")?jsxRuntime.jsx(y,i({as:"video",controls:!0,part:["video",e],src:t},o)):(console.error(`Could not map videoUri ${t} to a known provider (Youtube, Vimeo, Wistia, Loom) or valid mp4 file.`),null)}function ye(n){var r=n,{src:e,type:t}=r,o=f(r,["src","type"]);return jsxRuntime.jsx(t==="video"?fo:mo,i({src:e},o))}var h=Fo__namespace.forwardRef((a,r)=>{var p=a,{children:e,flowId:t,part:o}=p,n=f(p,["children","flowId","part"]);var d;if(t!=null)return jsxRuntime.jsx(Ar,i({flowId:t},n));let s=(d=n.as)!=null?d:S.Column;return jsxRuntime.jsx(s,l(i({backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderRadius:"md",borderWidth:"0",gap:5,p:5,part:["card",o]},n),{ref:r,children:e}))});h.Dismiss=e=>jsxRuntime.jsx(O.Plain,l(i({"aria-label":"Dismiss",part:"dismiss",padding:0},e),{children:jsxRuntime.jsx(Fe,{height:"20",fill:"currentColor"})}));h.Footer=n=>{var r=n,{children:e,part:t}=r,o=f(r,["children","part"]);return jsxRuntime.jsx(S.Row,l(i({alignItems:"center",gap:3,justifyContent:"flex-end",part:["card-footer",t]},o),{children:e}))};h.Header=p=>{var s=p,{dismissible:e,handleDismiss:t,part:o,subtitle:n,title:r}=s,a=f(s,["dismissible","handleDismiss","part","subtitle","title"]);return jsxRuntime.jsxs(S.Row,l(i({alignItems:"flex-start",flexWrap:"wrap",gap:1,part:["card-header",o]},a),{children:[jsxRuntime.jsx(h.Title,{maxWidth:"calc(100% - 32px)",children:r}),e&&jsxRuntime.jsx(h.Dismiss,{onClick:t,marginLeft:"auto"}),jsxRuntime.jsx(h.Subtitle,{color:"neutral.400",flexBasis:"100%",children:n})]}))};h.Media=o=>{var n=o,{src:e}=n,t=f(n,["src"]);return e==null||(e==null?void 0:e.length)===0?null:jsxRuntime.jsx(ye,i({borderRadius:"md",src:e},t))};h.Primary=n=>{var r=n,{onClick:e,title:t}=r,o=f(r,["onClick","title"]);return t==null||(t==null?void 0:t.length)===0?null:jsxRuntime.jsx(O.Primary,i({title:t,onClick:e},o))};h.Secondary=n=>{var r=n,{onClick:e,title:t}=r,o=f(r,["onClick","title"]);return t==null||(t==null?void 0:t.length)===0?null:jsxRuntime.jsx(O.Secondary,i({title:t,onClick:e},o))};h.Subtitle=n=>{var r=n,{children:e,part:t}=r,o=f(r,["children","part"]);return e==null?null:jsxRuntime.jsx(F.Body2,l(i({display:"block",color:"neutral.400",part:["subtitle",t]},o),{children:e}))};h.Title=n=>{var r=n,{children:e,part:t}=r,o=f(r,["children","part"]);return e==null?null:jsxRuntime.jsx(F.H4,l(i({display:"block",part:["title",t]},o),{children:e}))};var go={content:["onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onInteractOutside"],root:["defaultOpen","modal","onOpenChange","open"]};function Vr(e){let t=Object.fromEntries(go.content.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),o=Object.fromEntries(go.root.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),n={};for(let r of Object.keys(e))!go.content.some(a=>a===r)&&!go.root.some(a=>a===r)&&(n[r]=e[r]);return {contentProps:t,otherProps:n,rootProps:o}}var _a=react.keyframes`
89
+ `;function uo(v){var B=v,{align:e,alignOffset:t,defaultOpen:o,dismissible:n,flow:r,handleDismiss:a,modal:p,onPrimary:l,onSecondary:d,part:u,side:f,sideOffset:g,spotlight:b,step:x}=B,T=m(B,["align","alignOffset","defaultOpen","dismissible","flow","handleDismiss","modal","onPrimary","onSecondary","part","side","sideOffset","spotlight","step"]);var $,L,E,I,A;let{handlePrimary:F,handleSecondary:P}=le(x,{onPrimary:l,onSecondary:d}),C=(L=($=x.primaryButton)==null?void 0:$.title)!=null?L:x.primaryButtonTitle,R=(I=(E=x.secondaryButton)==null?void 0:E.title)!=null?I:x.secondaryButtonTitle,k=!!x.$state.blocked;return jsxRuntime.jsx(zo,s(i({align:e,alignOffset:t,anchor:x.selector,"data-step-id":x.id,defaultOpen:o,modal:p,part:u,side:f,sideOffset:g,spotlight:b},T),{children:jsxRuntime.jsxs(h,{animation:`${pa} 300ms ease-out`,boxShadow:"md",maxWidth:"min(360px, calc(100vw - 25px))",children:[jsxRuntime.jsx(h.Media,{aspectRatio:"2",borderRadius:"md md 0 0",borderWidth:"0",margin:"-5 -5 0",objectFit:"cover",overflowClipMargin:"unset",src:(A=x.videoUri)!=null?A:x.imageUri,transform:"translate3d(0, 0, 1px)",type:x.videoUri?"video":"image"}),jsxRuntime.jsx(h.Header,{css:{".fr-dismiss":{position:"absolute",right:"12px",top:"12px"}},dismissible:n,handleDismiss:a,subtitle:x.subtitle,title:x.title}),jsxRuntime.jsxs(h.Footer,{children:[r.getNumberOfAvailableSteps()>1&&jsxRuntime.jsx(Be,{current:r.getCurrentStepOrder()+1,marginRight:"auto",total:r.getNumberOfAvailableSteps()}),jsxRuntime.jsx(h.Secondary,{disabled:k,onClick:P,title:R}),jsxRuntime.jsx(h.Primary,{disabled:k,onClick:F,title:C})]})]})}))}function Rr(e,t,o){let[n,r]=To.useState(!1),a=To.useRef();return To.useEffect(()=>{a.current=typeof t=="string"?document.querySelector(t):t,r(!0);},[]),n?reactDom.createPortal(e,a.current,o):null}function mo(T){var v=T,{align:e="after",alignOffset:t=0,as:o,defaultOpen:n,dismissible:r=!1,flowId:a,modal:p,part:l,sequential:d=!0,side:u="bottom",sideOffset:f=0,spotlight:g,zIndex:b=9999}=v,x=m(v,["align","alignOffset","as","defaultOpen","dismissible","flowId","modal","part","sequential","side","sideOffset","spotlight","zIndex"]);let{onDismiss:B,onPrimary:F,onSecondary:P}=x;return Rr(jsxRuntime.jsx(z,s(i({as:o,flowId:a,part:"tour"},x),{children:({flow:C,handleDismiss:R,parentProps:{containerProps:k},step:$})=>{var E,I,A,he;let L=i({align:e,alignOffset:t,dismissible:r,flow:C,handleDismiss:R,modal:p,onPrimary:F,onSecondary:P,part:l,side:u,sideOffset:f,spotlight:g,step:$,zIndex:(A=(I=(E=$.props)==null?void 0:E.zIndex)!=null?I:k==null?void 0:k.zIndex)!=null?A:b},(he=$.props)!=null?he:{});return d?jsxRuntime.jsx(uo,i({defaultOpen:n!=null?n:!0},L),$.id):Array.from(C.steps.values()).filter(Q=>{let{blocked:Ae,completed:ue,skipped:ee,visible:Fe}=Q.$state;return !Ae&&!ue&&!ee&&Fe}).map(Q=>{var je,K,oe,ne,te;function Ae(me){return M(this,null,function*(){return (yield B==null?void 0:B(C,me))===!1?(me.preventDefault(),!1):(Q.skip(),!0)})}let ue=g&&Q.id===$.id,ee=(oe=(K=(je=Q.props)==null?void 0:je.zIndex)!=null?K:k==null?void 0:k.zIndex)!=null?oe:b,Fe=i({align:e,alignOffset:t,dismissible:r,flow:C,handleDismiss:Ae,onPrimary:F,onSecondary:P,part:l,side:u,sideOffset:f,spotlight:g,zIndex:ee},(ne=Q.props)!=null?ne:{});return jsxRuntime.jsx(uo,i({css:{"&:has([aria-expanded=true])":{zIndex:Number(ee)+2},".fr-overlay":{zIndex:Number(ee)+1},".fr-progress-fraction":{display:"none"}},defaultOpen:(te=n||ue)!=null?te:!1,step:Q},Fe),`${Q.id}-${ue}`)})}})),"body")}function fo(){let{frigade:e}=To.useContext(V),[,t]=To.useState(!1),o,n=To.useCallback(p=>{e==null||e.getCollections().then(()=>{p();});let l=()=>{clearTimeout(o),o=setTimeout(()=>{t(d=>!d),p();},0);};return e==null||e.onStateChange(l),()=>{e==null||e.removeStateChangeHandler(l);}},[]),r=()=>{let p;try{p=e==null?void 0:e.getCollectionsSync();}catch(l){}return p};return {collections:To.useSyncExternalStore(n,r,r)}}function go(e){var l,d,u,f;let{frigade:t}=To.useContext(V),{collections:o}=fo(),n=o==null?void 0:o.get(e),a=(f=((u=(d=(l=o==null?void 0:o.get(e))==null?void 0:l.flows)==null?void 0:d.filter(g=>g.visible).map(g=>s(i({},g),{flow:t==null?void 0:t.getFlowSync(g.flowId)})))!=null?u:[]).find(({flow:g})=>g.isVisible))==null?void 0:f.flowId,{flow:p}=we(a);return To.useEffect(()=>{t==null||t.registerCollection(e);},[e]),{collection:n,currentFlow:p}}function Go(r){var a=r,{collectionId:e,part:t,variables:o={}}=a,n=m(a,["collectionId","part","variables"]);var u,f,g;let p={ANNOUNCEMENT:Ko,BANNER:ko,CARD:h,CHECKLIST:to,EMBEDDED_TIP:h,FORM:He,NPS_SURVEY:ze,SURVEY:ze,TOUR:mo},{currentFlow:l}=go(e),d=(f=p[(u=l==null?void 0:l.rawData)==null?void 0:u.flowType])!=null?f:null;return l==null||d==null?null:((g=l==null?void 0:l.rawData)==null?void 0:g.flowType)===js.FlowType.FORM?jsxRuntime.jsx(y,s(i({part:["collection",t],"data-collection-id":e},n),{children:jsxRuntime.jsx(He,{flowId:l.id,as:H,variables:o},l.id)})):jsxRuntime.jsx(y,s(i({part:["collection",t],"data-collection-id":e},n),{children:jsxRuntime.jsx(d,{flowId:l.id,variables:o},l.id)}))}function Br(){var o,n;let{collections:e}=fo(),t=(n=Array.from((o=e==null?void 0:e.entries())!=null?o:[]).find(r=>r[1].collectionType==="DEFAULT"))==null?void 0:n[0];return go(t),t==null?null:jsxRuntime.jsx(Go,{as:null,collectionId:t})}var V=To.createContext({apiKey:"",navigate:()=>{},hasInitialized:!1,registerComponent:()=>{},unregisterComponent:()=>{},variables:{}});function jo(){let{frigade:e}=To.useContext(V);return {frigade:e,isLoading:!(e!=null&&e.isReady())}}function Tr(){let{frigade:e}=jo();return To.useEffect(()=>{M(this,null,function*(){(yield e.getFlows()).forEach(o=>{o.steps.forEach(n=>{if(n.imageUri){let r=new Image;r.src=n.imageUri;}});});});},[]),null}var kr="2.5.12";function Ir(p){var l=p,{children:e,css:t={},defaultCollection:o=!0,navigate:n,theme:r}=l,a=m(l,["children","css","defaultCollection","navigate","theme"]);let d=r?wo(r):{},u=To.useRef(new Map),f=To.useRef(),[g,b]=To.useState(!1),x=To.useMemo(()=>(b(!1),f.current=void 0,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,__platformVersion:kr,__platformName:"React"})),[a.userId,a.groupId,a.apiKey]);To.useEffect(()=>{if(a.__flowStateOverrides){let P=x.getConfig();P.__flowStateOverrides=a.__flowStateOverrides,x.reload(P);}},[a.__flowStateOverrides]);function T(){let P=[...u.current.entries()].map(([C,R])=>[C,R.callback]);x.batchRegister(P),b(!0);}function v(P,C){if(f.current&&clearTimeout(f.current),g){u.current.has(P)?x.getFlow(P).then(R=>C(R.isVisible)):(x.getFlow(P).then(R=>R.register(C)),u.current.set(P,{callback:C}));return}u.current.has(P)||u.current.set(P,{callback:C}),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>T(),0);}function B(P){u.current.has(P)&&x.getFlow(P).then(C=>{u.current.delete(P),C==null||C.unregister();});}let F=n!=null?n:(P,C="_self")=>{window.open(P,C);};return To.useEffect(()=>()=>{x.destroy();},[]),jsxRuntime.jsxs(V.Provider,{value:s(i({navigate:F},a),{frigade:x,registerComponent:v,unregisterComponent:B,hasInitialized:g,variables:a.variables||{}}),children:[jsxRuntime.jsx(react.Global,{styles:{":root":i(i(i({},Fo),d),t)}}),jsxRuntime.jsxs(react.ThemeProvider,{theme:D,children:[o&&jsxRuntime.jsx(Br,{}),e]}),a.preloadImages!==!1&&jsxRuntime.jsx(Tr,{})]})}function we(e,t){let{frigade:o,variables:n}=To.useContext(V),[,r]=To.useState(!1),a=To.useCallback(l=>{o==null||o.getFlow(e).then(()=>{l();});let d=u=>{u.id===e&&setTimeout(()=>{r(f=>!f),l();},0);};return o==null||o.onStateChange(d),()=>{o==null||o.removeStateChangeHandler(d);}},[e,o]),p=To.useSyncExternalStore(a,()=>o==null?void 0:o.getFlowSync(e),()=>o==null?void 0:o.getFlowSync(e));return p==null||p.applyVariables(i(i({},n),t==null?void 0:t.variables)),{flow:p,isLoading:o!=null&&o.hasFailedToLoad()?!1:!p}}function Jo(e,{onComplete:t,onDismiss:o}={}){let n=To.useRef(null);return To.useEffect(()=>{if(e==null)return;function r(){return M(this,null,function*(){e.isCompleted&&n.current===!1&&(yield t==null?void 0:t(e));})}return r(),n.current=e==null?void 0:e.isCompleted,()=>{r();}},[e==null?void 0:e.isCompleted]),{handleDismiss:To.useCallback(r=>M(this,null,function*(){if((yield o==null?void 0:o(e,r))===!1)return r.preventDefault(),!1;e.skip();}),[e])}}var de=new Set;function qo(e,t=!0){let o=To.useCallback(()=>{de.has(e==null?void 0:e.id)&&de.delete(e==null?void 0:e.id);},[de,t]),n=To.useCallback(()=>{t&&(e!=null&&e.isVisible)&&!de.has(e.id)&&de.add(e.id);},[de,t]);To.useEffect(()=>()=>{o();},[]),To.useEffect(()=>{n();let a=()=>{o();};return window.addEventListener("popstate",a),window.addEventListener("beforeunload",a),()=>{o(),window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",a);}},[n,o]),e!=null&&e.isVisible?n():o();let r=de.size>0?de.values().next().value:null;return {isCurrentModal:t?r===(e==null?void 0:e.id)||de.size==0:!0}}function z(u){var f=u,{as:e,children:t,flowId:o,onComplete:n,onDismiss:r,onPrimary:a,onSecondary:p,variables:l}=f,d=m(f,["as","children","flowId","onComplete","onDismiss","onPrimary","onSecondary","variables"]);var E,A;let{flow:g}=we(o,{variables:l}),I=i(i({},d),(E=g==null?void 0:g.props)!=null?E:{}),{dismissible:b=!1,forceMount:x=!1}=I,T=m(I,["dismissible","forceMount"]),v=g==null?void 0:g.getCurrentStep(),{handleDismiss:B}=Jo(g,{onComplete:n,onDismiss:r}),{handlePrimary:F,handleSecondary:P}=le(v,{onPrimary:a,onSecondary:p}),C=(T==null?void 0:T.modal)||typeof e=="function"&&(e==null?void 0:e.displayName)==="Dialog"||[js.FlowType.ANNOUNCEMENT,js.FlowType.TOUR].includes((A=g==null?void 0:g.rawData)==null?void 0:A.flowType),{isCurrentModal:R}=qo(g,C),k=x&&((g==null?void 0:g.isCompleted)||(g==null?void 0:g.isSkipped));if(!g||!g.isVisible&&!k||!k&&!R)return null;(k||!g.isCompleted&&!g.isSkipped)&&(v==null||v.start());let $=e===null?To.Fragment:e!=null?e:y,L=s(i({},T),{"data-flow-id":g.id});return jsxRuntime.jsx($,s(i({},e===null?{}:L),{children:t({flow:g,handleDismiss:B,handlePrimary:F,handleSecondary:P,parentProps:{dismissible:b,flowId:o,variables:l,containerProps:L},step:v})}))}function Wr(o){var n=o,{part:e}=n,t=m(n,["part"]);return jsxRuntime.jsx(z,s(i({as:h,gap:5,borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",part:["card",e]},t),{children:({handleDismiss:r,handlePrimary:a,handleSecondary:p,parentProps:{dismissible:l},step:d})=>{var g,b,x,T;let u=(b=(g=d.primaryButton)==null?void 0:g.title)!=null?b:d.primaryButtonTitle,f=(T=(x=d.secondaryButton)==null?void 0:x.title)!=null?T:d.secondaryButtonTitle;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(h.Header,{dismissible:l,handleDismiss:r,subtitle:d.subtitle,title:d.title}),jsxRuntime.jsx(h.Media,{src:d.imageUri,css:{objectFit:"contain",width:"100%"}}),jsxRuntime.jsxs(S.Row,{gap:3,justifyContent:"flex-end",part:"card-footer",children:[jsxRuntime.jsx(h.Secondary,{title:f,onClick:p}),jsxRuntime.jsx(h.Primary,{title:u,onClick:a})]})]})}}))}function xo(n){var r=n,{part:e,src:t}=r,o=m(r,["part","src"]);return jsxRuntime.jsx(y,i({as:"img",maxWidth:"unset",part:["image",e],src:t},o))}function Na(e){var t,o,n,r,a;return e.includes("youtube")?`https://www.youtube.com/embed/${(t=e.split("v=")[1])==null?void 0:t.split("&")[0]}`:e.includes("youtu.be")?`https://www.youtube.com/embed/${(o=e.split("youtu.be/")[1])==null?void 0:o.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 ho(n){var r=n,{part:e,src:t}=r,o=m(r,["part","src"]);let a=Na(t);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},o)):t!=null&&t.endsWith(".mp4")?jsxRuntime.jsx(y,i({as:"video",controls:!0,part:["video",e],src:t},o)):(console.error(`Could not map videoUri ${t} to a known provider (Youtube, Vimeo, Wistia, Loom) or valid mp4 file.`),null)}function ye(n){var r=n,{src:e,type:t}=r,o=m(r,["src","type"]);return jsxRuntime.jsx(t==="video"?ho:xo,i({src:e},o))}var h=To__namespace.forwardRef((a,r)=>{var p=a,{children:e,flowId:t,part:o}=p,n=m(p,["children","flowId","part"]);var d;if(t!=null)return jsxRuntime.jsx(Wr,i({flowId:t},n));let l=(d=n.as)!=null?d:S.Column;return jsxRuntime.jsx(l,s(i({backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderRadius:"md",borderWidth:"0",gap:5,p:5,part:["card",o]},n),{ref:r,children:e}))});h.Dismiss=e=>jsxRuntime.jsx(O.Plain,s(i({"aria-label":"Dismiss",part:"dismiss",padding:0},e),{children:jsxRuntime.jsx(ve,{height:"20",fill:"currentColor"})}));h.Footer=n=>{var r=n,{children:e,part:t}=r,o=m(r,["children","part"]);return jsxRuntime.jsx(S.Row,s(i({alignItems:"center",gap:3,justifyContent:"flex-end",part:["card-footer",t]},o),{children:e}))};h.Header=p=>{var l=p,{dismissible:e,handleDismiss:t,part:o,subtitle:n,title:r}=l,a=m(l,["dismissible","handleDismiss","part","subtitle","title"]);return jsxRuntime.jsxs(S.Row,s(i({alignItems:"flex-start",flexWrap:"wrap",gap:1,part:["card-header",o]},a),{children:[jsxRuntime.jsx(h.Title,{maxWidth:"calc(100% - 32px)",children:r}),e&&jsxRuntime.jsx(h.Dismiss,{onClick:t,marginLeft:"auto"}),jsxRuntime.jsx(h.Subtitle,{color:"neutral.400",flexBasis:"100%",children:n})]}))};h.Media=o=>{var n=o,{src:e}=n,t=m(n,["src"]);return e==null||(e==null?void 0:e.length)===0?null:jsxRuntime.jsx(ye,i({borderRadius:"md",src:e},t))};h.Primary=n=>{var r=n,{onClick:e,title:t}=r,o=m(r,["onClick","title"]);return t==null||(t==null?void 0:t.length)===0?null:jsxRuntime.jsx(O.Primary,i({title:t,onClick:e},o))};h.Secondary=n=>{var r=n,{onClick:e,title:t}=r,o=m(r,["onClick","title"]);return t==null||(t==null?void 0:t.length)===0?null:jsxRuntime.jsx(O.Secondary,i({title:t,onClick:e},o))};h.Subtitle=n=>{var r=n,{children:e,part:t}=r,o=m(r,["children","part"]);return e==null?null:jsxRuntime.jsx(w.Body2,s(i({display:"block",color:"neutral.400",part:["subtitle",t]},o),{children:e}))};h.Title=n=>{var r=n,{children:e,part:t}=r,o=m(r,["children","part"]);return e==null?null:jsxRuntime.jsx(w.H4,s(i({display:"block",part:["title",t]},o),{children:e}))};var bo={content:["onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onInteractOutside"],root:["defaultOpen","modal","onOpenChange","open"]};function Nr(e){let t=Object.fromEntries(bo.content.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),o=Object.fromEntries(bo.root.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),n={};for(let r of Object.keys(e))!bo.content.some(a=>a===r)&&!bo.root.some(a=>a===r)&&(n[r]=e[r]);return {contentProps:t,otherProps:n,rootProps:o}}var Ga=react.keyframes`
90
90
  from {
91
91
  opacity: 0;
92
92
  }
@@ -96,7 +96,7 @@ var Zo=Object.defineProperty,Jr=Object.defineProperties;var qr=Object.getOwnProp
96
96
  to {
97
97
  opacity: 1;
98
98
  }
99
- `;function H(r){var a=r,{children:e,className:t,modal:o=!0}=a,n=f(a,["children","className","modal"]);let{rootProps:p,contentProps:s,otherProps:m}=Vr(n),g=m,{zIndex:d}=g,u=f(g,["zIndex"]);return jsxRuntime.jsx(j__namespace.Root,l(i({defaultOpen:!0,modal:o},p),{children:jsxRuntime.jsx(j__namespace.Portal,{children:jsxRuntime.jsxs(y,{animation:`${_a} 300ms ease-out`,className:t,display:"grid",inset:"0",padding:"6",part:"dialog-wrapper",pointerEvents:"none",position:"fixed",zIndex:d!=null?d:10,children:[o&&jsxRuntime.jsx(j__namespace.Overlay,{asChild:!0,children:jsxRuntime.jsx(y,{background:"rgb(0 0 0 / 0.5)",inset:"0",part:"dialog-overlay",position:"absolute"})}),jsxRuntime.jsx(j__namespace.Content,l(i({asChild:!0,onOpenAutoFocus:b=>b.preventDefault(),onPointerDownOutside:b=>b.preventDefault(),onInteractOutside:b=>b.preventDefault()},s),{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}))}))]})})}))}H.Dismiss=e=>jsxRuntime.jsx(j__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(O.Plain,l(i({part:"close",position:"absolute",right:"2px",top:"2px"},e),{children:jsxRuntime.jsx(Fe,{height:"20",fill:"currentColor"})}))});H.Subtitle=o=>{var n=o,{children:e}=n,t=f(n,["children"]);return jsxRuntime.jsx(j__namespace.Description,{asChild:!0,children:jsxRuntime.jsx(F.Body2,l(i({part:"subtitle"},t),{children:e}))})};H.Media=o=>{var n=o,{src:e}=n,t=f(n,["src"]);return e==null?null:jsxRuntime.jsx(ye,i({borderRadius:"md",src:e},t))};H.Primary=n=>{var r=n,{onClick:e,title:t}=r,o=f(r,["onClick","title"]);return t==null?null:jsxRuntime.jsx(O.Primary,i({title:t,onClick:e},o))};H.ProgressDots=({current:e,total:t})=>{if(t==1)return null;let o=[...Array(t)].map((n,r)=>jsxRuntime.jsx(y,{as:"circle",r:4,cx:4+16*r,cy:"4px",fill:e===r?D.colors.primary.surface:D.colors.neutral[700],part:e===r?"progress-dot-selected":"progress-dot"},r));return jsxRuntime.jsx(y,{as:"svg",height:"8px",marginInline:"auto",part:"progress",viewBox:`0 0 ${16*t-8} 8`,width:16*t-8,children:o})};H.Secondary=n=>{var r=n,{onClick:e,title:t}=r,o=f(r,["onClick","title"]);return t==null?null:jsxRuntime.jsx(O.Secondary,i({title:t,onClick:e},o))};H.Title=o=>{var n=o,{children:e}=n,t=f(n,["children"]);return jsxRuntime.jsx(j__namespace.Title,{asChild:!0,children:jsxRuntime.jsx(F.H4,l(i({part:"title"},t),{children:e}))})};H.displayName="Dialog";var Lr=["dismissible","flowId","forceMount","onComplete","onDismiss","onPrimary","onSecondary","variables"];function _o(n){var r=n,{flowId:e,part:t}=r,o=f(r,["flowId","part"]);let a=Object.fromEntries(Object.entries(o).filter(([s])=>Lr.some(d=>s===d))),p=Object.fromEntries(Object.entries(o).filter(([s])=>Lr.indexOf(s)===-1));return jsxRuntime.jsx(z,l(i({as:null,flowId:e},a),{children:({flow:s,handleDismiss:d,handlePrimary:u,handleSecondary:m,parentProps:{containerProps:g,dismissible:b},step:x})=>{var P,C,R,k,$,L;let T=(P=x.props)!=null?P:{},v=(R=(C=x.primaryButton)==null?void 0:C.title)!=null?R:x.primaryButtonTitle,B=($=(k=x.secondaryButton)==null?void 0:k.title)!=null?$:x.secondaryButtonTitle,w=x.$state.blocked;return jsxRuntime.jsx(H,l(i(i({part:["announcement",t],textAlign:"center"},g),p),{onEscapeKeyDown:E=>{if(o.dismissible===!1){E.preventDefault();return}typeof o.onEscapeKeyDown=="function"&&o.onEscapeKeyDown(E),E.defaultPrevented||d(E);},children:jsxRuntime.jsxs(S.Column,l(i({gap:5,part:"announcement-step"},T),{children:[b&&jsxRuntime.jsx(H.Dismiss,{onClick:d}),jsxRuntime.jsxs(S.Column,{gap:1,part:"announcement-header",children:[jsxRuntime.jsx(H.Title,{children:x.title}),jsxRuntime.jsx(H.Subtitle,{children:x.subtitle})]}),jsxRuntime.jsx(H.Media,{aspectRatio:"1.5",objectFit:"cover",overflowClipMargin:"unset",src:(L=x.videoUri)!=null?L:x.imageUri,transform:"translate3d(0, 0, 1px)",type:x.videoUri?"video":"image",width:"100%"}),jsxRuntime.jsx(H.ProgressDots,{current:s.getCurrentStepIndex(),total:s.getNumberOfAvailableSteps()}),jsxRuntime.jsxs(S.Row,{css:{"& > button":{flexBasis:"50%",flexGrow:1}},gap:3,part:"announcement-footer",children:[B&&jsxRuntime.jsx(H.Secondary,{disabled:w,onClick:m,title:B}),v&&jsxRuntime.jsx(H.Primary,{disabled:w,onClick:u,title:v})]})]}))}))}}))}function yo(){let e="DOMRect"in globalThis?new DOMRect:{height:0,width:0,x:0,y:0,bottom:0,top:0,right:0,left:0,toJSON:()=>{}},[t,o]=Fo.useState(e),[n,r]=Fo.useState(null),a=Fo.useCallback(p=>{r(p);},[]);return Fo.useLayoutEffect(()=>{if(!n)return;let p=()=>{let s=n.getBoundingClientRect();o(s);};return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[n]),{node:n,rect:t,ref:a}}var ja=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function zr(n){var r=n,{style:e={},part:t=""}=r,o=f(r,["style","part"]);return jsxRuntime.jsxs(y,l(i({part:`dot-wrapper ${t}`,style:i({height:"48px",position:"absolute",width:"48px"},e)},o),{children:[jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"dot-pulse",css:{animation:`2s ease-out infinite ${ja}`,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 Ur({props:e,alignAttr:t,sideAttr:o}){let n=o!=null?o:"bottom",r={},a=()=>{var u;if(["after","before"].includes(e.align)){if(t=="start")return "before";if(t=="end")return "after"}return (u=e.align)!=null?u:"after"},p="-24px",s={top:"bottom",right:"left",bottom:"top",left:"right"};r[s[n]]=p;let d=a();return ["before","end"].includes(d)?["top","bottom"].includes(n)?r.right=p:r.bottom=p:["after","start"].includes(d)?["top","bottom"].includes(n)?r.left=p:r.top=p:["top","bottom"].includes(n)?r.left=`calc(50% + ${p})`:r.top=`calc(50% + ${p})`,r}var xo={content:["align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","forceMount","hideWhenDetached","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenAutoFocus","onPointerDownOutside","side","sideOffset","sticky"],root:["modal","onOpenChange"]};function Gr(e,t){var a,p,s,d,u;let o=Object.fromEntries(xo.content.map(m=>[m,e[m]]).filter(m=>m[1]!==void 0)),n=Object.fromEntries(xo.root.map(m=>[m,e[m]]).filter(m=>m[1]!==void 0)),r={};for(let m of Object.keys(e))!xo.content.includes(m)&&!xo.root.includes(m)&&(r[m]=e[m]);if(o.align=(a=o.align)!=null?a:"after",o.side=(p=o.side)!=null?p:"bottom",["before","after"].includes(o.align)){let m={after:"end",before:"start"},g=(w,P)=>["top","bottom"].includes(P)?w=="after"?"marginLeft":"marginRight":w=="after"?"marginTop":"marginBottom",b=(s=o.alignOffset)!=null?s:0,x=(d=o.style)!=null?d:{},T=(u=o.side)!=null?u:"bottom",v=o.align;o.style=l(i({},x),{[g(v,T)]:b});let B=["top","bottom"].includes(T)?t.width:t.height;o.alignOffset=(B+b)*-1,o.align=m[v];}return {contentProps:o,otherProps:r,rootProps:n}}var Kr=react.keyframes`
99
+ `;function H(r){var a=r,{children:e,className:t,modal:o=!0}=a,n=m(a,["children","className","modal"]);let{rootProps:p,contentProps:l,otherProps:f}=Nr(n),g=f,{zIndex:d}=g,u=m(g,["zIndex"]);return jsxRuntime.jsx(j__namespace.Root,s(i({defaultOpen:!0,modal:o},p),{children:jsxRuntime.jsx(j__namespace.Portal,{children:jsxRuntime.jsxs(y,{animation:`${Ga} 300ms ease-out`,className:t,display:"grid",inset:"0",padding:"6",part:"dialog-wrapper",pointerEvents:"none",position:"fixed",zIndex:d!=null?d:10,children:[o&&jsxRuntime.jsx(j__namespace.Overlay,{asChild:!0,children:jsxRuntime.jsx(y,{background:"rgb(0 0 0 / 0.5)",inset:"0",part:"dialog-overlay",position:"absolute"})}),jsxRuntime.jsx(j__namespace.Content,s(i({asChild:!0,onOpenAutoFocus:b=>b.preventDefault(),onPointerDownOutside:b=>b.preventDefault(),onInteractOutside:b=>b.preventDefault()},l),{children:jsxRuntime.jsx(h,s(i({alignSelf:"center",boxShadow:"md",justifySelf:"center",maxHeight:"100%",maxWidth:"430px",overflowY:"auto",padding:8,part:"dialog",pointerEvents:"auto",position:"relative"},u),{children:e}))}))]})})}))}H.Dismiss=e=>jsxRuntime.jsx(j__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(O.Plain,s(i({part:"close",position:"absolute",right:"2px",top:"2px"},e),{children:jsxRuntime.jsx(ve,{height:"20",fill:"currentColor"})}))});H.Subtitle=o=>{var n=o,{children:e}=n,t=m(n,["children"]);return jsxRuntime.jsx(j__namespace.Description,{asChild:!0,children:jsxRuntime.jsx(w.Body2,s(i({part:"subtitle"},t),{children:e}))})};H.Media=o=>{var n=o,{src:e}=n,t=m(n,["src"]);return e==null?null:jsxRuntime.jsx(ye,i({borderRadius:"md",src:e},t))};H.Primary=n=>{var r=n,{onClick:e,title:t}=r,o=m(r,["onClick","title"]);return t==null?null:jsxRuntime.jsx(O.Primary,i({title:t,onClick:e},o))};H.ProgressDots=({current:e,total:t})=>{if(t==1)return null;let o=[...Array(t)].map((n,r)=>jsxRuntime.jsx(y,{as:"circle",r:4,cx:4+16*r,cy:"4px",fill:e===r?D.colors.primary.surface:D.colors.neutral[700],part:e===r?"progress-dot-selected":"progress-dot"},r));return jsxRuntime.jsx(y,{as:"svg",height:"8px",marginInline:"auto",part:"progress",viewBox:`0 0 ${16*t-8} 8`,width:16*t-8,children:o})};H.Secondary=n=>{var r=n,{onClick:e,title:t}=r,o=m(r,["onClick","title"]);return t==null?null:jsxRuntime.jsx(O.Secondary,i({title:t,onClick:e},o))};H.Title=o=>{var n=o,{children:e}=n,t=m(n,["children"]);return jsxRuntime.jsx(j__namespace.Title,{asChild:!0,children:jsxRuntime.jsx(w.H4,s(i({part:"title"},t),{children:e}))})};H.displayName="Dialog";var _r=["dismissible","flowId","forceMount","onComplete","onDismiss","onPrimary","onSecondary","variables"];function Ko(n){var r=n,{flowId:e,part:t}=r,o=m(r,["flowId","part"]);let a=Object.fromEntries(Object.entries(o).filter(([l])=>_r.some(d=>l===d))),p=Object.fromEntries(Object.entries(o).filter(([l])=>_r.indexOf(l)===-1));return jsxRuntime.jsx(z,s(i({as:null,flowId:e},a),{children:({flow:l,handleDismiss:d,handlePrimary:u,handleSecondary:f,parentProps:{containerProps:g,dismissible:b},step:x})=>{var P,C,R,k,$,L;let T=(P=x.props)!=null?P:{},v=(R=(C=x.primaryButton)==null?void 0:C.title)!=null?R:x.primaryButtonTitle,B=($=(k=x.secondaryButton)==null?void 0:k.title)!=null?$:x.secondaryButtonTitle,F=x.$state.blocked;return jsxRuntime.jsx(H,s(i(i({part:["announcement",t],textAlign:"center"},g),p),{onEscapeKeyDown:E=>{if(o.dismissible===!1){E.preventDefault();return}typeof o.onEscapeKeyDown=="function"&&o.onEscapeKeyDown(E),E.defaultPrevented||d(E);},children:jsxRuntime.jsxs(S.Column,s(i({gap:5,part:"announcement-step"},T),{children:[b&&jsxRuntime.jsx(H.Dismiss,{onClick:d}),jsxRuntime.jsxs(S.Column,{gap:1,part:"announcement-header",children:[jsxRuntime.jsx(H.Title,{children:x.title}),jsxRuntime.jsx(H.Subtitle,{children:x.subtitle})]}),jsxRuntime.jsx(H.Media,{aspectRatio:"1.5",objectFit:"cover",overflowClipMargin:"unset",src:(L=x.videoUri)!=null?L:x.imageUri,transform:"translate3d(0, 0, 1px)",type:x.videoUri?"video":"image",width:"100%"}),jsxRuntime.jsx(H.ProgressDots,{current:l.getCurrentStepIndex(),total:l.getNumberOfAvailableSteps()}),jsxRuntime.jsxs(S.Row,{css:{"& > button":{flexBasis:"50%",flexGrow:1}},gap:3,part:"announcement-footer",children:[B&&jsxRuntime.jsx(H.Secondary,{disabled:F,onClick:f,title:B}),v&&jsxRuntime.jsx(H.Primary,{disabled:F,onClick:u,title:v})]})]}))}))}}))}function ja(...e){for(let t of e)if(t!=null&&t.length>0)return t;return null}function Xa(o){var n=o,{title:e}=n,t=m(n,["title"]);return jsxRuntime.jsx(z,s(i({as:null},t),{children:({flow:r,parentProps:{containerProps:a},step:p})=>{let l=ja(e,r.title,p.title),d=r.getCurrentStepOrder()+1,u=r.getNumberOfAvailableSteps();return jsxRuntime.jsxs(h,s(i({borderWidth:"md",cursor:a.onClick!=null?"pointer":"auto",gap:"",p:"3 2",part:"progress-badge"},a),{children:[jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:"2",part:"progress-badge-header",children:[jsxRuntime.jsx(h.Title,{as:w.Caption,children:l}),jsxRuntime.jsx(y,{as:io,height:"20px",marginLeft:"auto",transform:"rotate(-90deg)",width:"20px"})]}),jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:"2",part:"progress-badge-footer",children:[jsxRuntime.jsx(Be,{current:d,fontWeight:"medium",total:u}),jsxRuntime.jsx(eo,{current:d,flexGrow:"1",total:u})]})]}))}}))}function Po(){let e="DOMRect"in globalThis?new DOMRect:{height:0,width:0,x:0,y:0,bottom:0,top:0,right:0,left:0,toJSON:()=>{}},[t,o]=To.useState(e),[n,r]=To.useState(null),a=To.useCallback(p=>{r(p);},[]);return To.useLayoutEffect(()=>{if(!n)return;let p=()=>{let l=n.getBoundingClientRect();o(l);};return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[n]),{node:n,rect:t,ref:a}}var Ya=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function Gr(n){var r=n,{style:e={},part:t=""}=r,o=m(r,["style","part"]);return jsxRuntime.jsxs(y,s(i({part:`dot-wrapper ${t}`,style:i({height:"48px",position:"absolute",width:"48px"},e)},o),{children:[jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"dot-pulse",css:{animation:`2s ease-out infinite ${Ya}`,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 Kr({props:e,alignAttr:t,sideAttr:o}){let n=o!=null?o:"bottom",r={},a=()=>{var u;if(["after","before"].includes(e.align)){if(t=="start")return "before";if(t=="end")return "after"}return (u=e.align)!=null?u:"after"},p="-24px",l={top:"bottom",right:"left",bottom:"top",left:"right"};r[l[n]]=p;let d=a();return ["before","end"].includes(d)?["top","bottom"].includes(n)?r.right=p:r.bottom=p:["after","start"].includes(d)?["top","bottom"].includes(n)?r.left=p:r.top=p:["top","bottom"].includes(n)?r.left=`calc(50% + ${p})`:r.top=`calc(50% + ${p})`,r}var Co={content:["align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","forceMount","hideWhenDetached","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenAutoFocus","onPointerDownOutside","side","sideOffset","sticky"],root:["modal","onOpenChange"]};function jr(e,t){var a,p,l,d,u;let o=Object.fromEntries(Co.content.map(f=>[f,e[f]]).filter(f=>f[1]!==void 0)),n=Object.fromEntries(Co.root.map(f=>[f,e[f]]).filter(f=>f[1]!==void 0)),r={};for(let f of Object.keys(e))!Co.content.includes(f)&&!Co.root.includes(f)&&(r[f]=e[f]);if(o.align=(a=o.align)!=null?a:"after",o.side=(p=o.side)!=null?p:"bottom",["before","after"].includes(o.align)){let f={after:"end",before:"start"},g=(F,P)=>["top","bottom"].includes(P)?F=="after"?"marginLeft":"marginRight":F=="after"?"marginTop":"marginBottom",b=(l=o.alignOffset)!=null?l:0,x=(d=o.style)!=null?d:{},T=(u=o.side)!=null?u:"bottom",v=o.align;o.style=s(i({},x),{[g(v,T)]:b});let B=["top","bottom"].includes(T)?t.width:t.height;o.alignOffset=(B+b)*-1,o.align=f[v];}return {contentProps:o,otherProps:r,rootProps:n}}var Xr=react.keyframes`
100
100
  from {
101
101
  opacity: 0;
102
102
  }
@@ -106,46 +106,47 @@ var Zo=Object.defineProperty,Jr=Object.defineProperties;var qr=Object.getOwnProp
106
106
  to {
107
107
  opacity: 1;
108
108
  }
109
- `;function jr(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function xe(u){var m=u,{anchor:e,children:t,className:o,defaultOpen:n=!0,open:r,part:a,spotlight:p=!1,style:s={}}=m,d=f(m,["anchor","children","className","defaultOpen","open","part","spotlight","style"]);let{node:g,rect:b,ref:x}=yo(),{node:T,rect:v,ref:B}=yo(),{contentProps:w,otherProps:P,rootProps:C}=Gr(d,b),[R,k]=Fo.useState(n),[$,L]=Fo.useState(w.align),[E,I]=Fo.useState(w.side),[A,he]=Fo.useState(0),[Q,$e]=Fo.useState(0);function ue(){return r!=null?(console.log("OVERRIDE: ",r),r):(console.log("INTERNAL: ",R),R)}if(g!==null){let K=g.getAttribute("data-align"),oe=g.getAttribute("data-side");$!==K&&L(K),E!==oe&&I(oe);}let ee=Fo.useRef(null);if(Fo.useEffect(()=>{let K=document.querySelector(e);K!=null?(B(K),ee.current=K):console.debug(`[frigade] Tooltip: No anchor found for query: ${e}`);},[e]),Fo.useEffect(()=>{function K(ne){if(ne.matches(e))return jr(ne)?ne:null;let te=ne.querySelectorAll(e);return te.length>0&&jr(te[0])?te[0]:null}let oe=new MutationObserver(ne=>{for(let te of ne)if(te.type==="childList"){for(let me of te.addedNodes){if(me.nodeType!==Node.ELEMENT_NODE)continue;let fe=K(me);if(fe!=null){B(fe),ee.current=fe,console.debug("[frigade] Tooltip: MutationObserver added anchor: ",fe);break}}for(let me of te.removedNodes){if(me.nodeType!==Node.ELEMENT_NODE)continue;let fe=K(me);if(fe!=null){B(null),ee.current=null,console.debug("[frigade] Tooltip: MutationObserver removed anchor: ",fe);break}}}});return oe.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>oe.disconnect()},[]),Fo.useEffect(()=>{let{scrollX:K,scrollY:oe}=window;he(v.left+K),$e(v.top+oe);},[v.left,v.top]),T==null)return null;let we="0";typeof window!="undefined"&&(we=window.getComputedStyle(T).borderRadius);let Ge=Ur({props:d,alignAttr:$,sideAttr:E});return jsxRuntime.jsxs(re__namespace.Root,l(i({defaultOpen:!0},C),{children:[jsxRuntime.jsx(re__namespace.Anchor,{virtualRef:ee}),jsxRuntime.jsx(re__namespace.Portal,{children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[p&&jsxRuntime.jsx(y,i({animation:`${Kr} 300ms ease-out`,boxShadow:"0 0 0 20000px rgb(0 0 0 / 0.5)",part:"tooltip-spotlight",pointerEvents:"none",position:"absolute",style:{borderRadius:we,height:v.height,left:A,top:Q,width:v.width}},d.zIndex!=null?{zIndex:d.zIndex}:{})),jsxRuntime.jsx(re__namespace.Content,l(i({},w),{ref:x,children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[ue()&&jsxRuntime.jsx(h,l(i({animation:`${Kr} 300ms ease-out`,boxShadow:"md",position:"relative",className:o,maxWidth:"min(360px, calc(100vw - 25px))",part:["tooltip",a],style:s},P),{children:t})),jsxRuntime.jsx(zr,{onClick:()=>{k(()=>(typeof C.onOpenChange=="function"&&C.onOpenChange(!ue()),!ue()));},style:Ge})]})}),R)]})})]}))}xe.Close=e=>jsxRuntime.jsx(re__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(O.Plain,l(i({css:{top:"0px",right:"-6px"},part:"close",position:"absolute"},e),{children:jsxRuntime.jsx(Fe,{height:"20",fill:"currentColor"})}))});xe.Media=o=>{var n=o,{src:e}=n,t=f(n,["src"]);return e==null?null:jsxRuntime.jsx(ye,i({aspectRatio:"2",borderRadius:"md md 0 0",borderWidth:"0",margin:"-5 -5 0",objectFit:"cover",overflowClipMargin:"unset",src:e,transform:"translate3d(0, 0, 1px)"},t))};xe.Primary=n=>{var r=n,{onClick:e,title:t}=r,o=f(r,["onClick","title"]);return t==null?null:jsxRuntime.jsx(O.Primary,i({title:t,onClick:e},o))};xe.Progress=o=>{var n=o,{children:e}=n,t=f(n,["children"]);return e==null?null:jsxRuntime.jsx(F.Body2,l(i({part:"progress"},t),{children:e}))};xe.Secondary=n=>{var r=n,{onClick:e,title:t}=r,o=f(r,["onClick","title"]);return t==null?null:jsxRuntime.jsx(O.Secondary,i({title:t,onClick:e},o))};xe.Subtitle=o=>{var n=o,{children:e}=n,t=f(n,["children"]);return e==null?null:jsxRuntime.jsx(F.Body2,l(i({part:"subtitle"},t),{children:e}))};xe.Title=o=>{var n=o,{children:e}=n,t=f(n,["children"]);return e==null?null:jsxRuntime.jsx(F.H4,l(i({part:"title"},t),{children:e}))};function Ya(){let{userId:e,frigade:t}=Fo.useContext(V);function o(r){return M(this,null,function*(){yield t.identify(e,r);})}function n(r,a){return M(this,null,function*(){yield t.track(r,a);})}return {userId:e,addProperties:o,track:n}}function es(){var r;let{frigade:e}=Fo.useContext(V);function t(a){return M(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 o(a,p){return M(this,null,function*(){yield e.track(a,p);})}function n(a,p){return M(this,null,function*(){yield e.group(a,p);})}return {groupId:(r=e==null?void 0:e.config)==null?void 0:r.groupId,setGroupId:n,addProperties:t,track:o}}
109
+ `;function Jr(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function xe(u){var f=u,{anchor:e,children:t,className:o,defaultOpen:n=!0,open:r,part:a,spotlight:p=!1,style:l={}}=f,d=m(f,["anchor","children","className","defaultOpen","open","part","spotlight","style"]);let{node:g,rect:b,ref:x}=Po(),{node:T,rect:v,ref:B}=Po(),{contentProps:F,otherProps:P,rootProps:C}=jr(d,b),[R,k]=To.useState(n),[$,L]=To.useState(F.align),[E,I]=To.useState(F.side),[A,he]=To.useState(0),[Q,Ae]=To.useState(0);function ue(){return r!=null?(console.log("OVERRIDE: ",r),r):(console.log("INTERNAL: ",R),R)}if(g!==null){let K=g.getAttribute("data-align"),oe=g.getAttribute("data-side");$!==K&&L(K),E!==oe&&I(oe);}let ee=To.useRef(null);if(To.useEffect(()=>{let K=document.querySelector(e);K!=null?(B(K),ee.current=K):console.debug(`[frigade] Tooltip: No anchor found for query: ${e}`);},[e]),To.useEffect(()=>{function K(ne){if(ne.matches(e))return Jr(ne)?ne:null;let te=ne.querySelectorAll(e);return te.length>0&&Jr(te[0])?te[0]:null}let oe=new MutationObserver(ne=>{for(let te of ne)if(te.type==="childList"){for(let me of te.addedNodes){if(me.nodeType!==Node.ELEMENT_NODE)continue;let fe=K(me);if(fe!=null){B(fe),ee.current=fe,console.debug("[frigade] Tooltip: MutationObserver added anchor: ",fe);break}}for(let me of te.removedNodes){if(me.nodeType!==Node.ELEMENT_NODE)continue;let fe=K(me);if(fe!=null){B(null),ee.current=null,console.debug("[frigade] Tooltip: MutationObserver removed anchor: ",fe);break}}}});return oe.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>oe.disconnect()},[]),To.useEffect(()=>{let{scrollX:K,scrollY:oe}=window;he(v.left+K),Ae(v.top+oe);},[v.left,v.top]),T==null)return null;let Fe="0";typeof window!="undefined"&&(Fe=window.getComputedStyle(T).borderRadius);let je=Kr({props:d,alignAttr:$,sideAttr:E});return jsxRuntime.jsxs(re__namespace.Root,s(i({defaultOpen:!0},C),{children:[jsxRuntime.jsx(re__namespace.Anchor,{virtualRef:ee}),jsxRuntime.jsx(re__namespace.Portal,{children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[p&&jsxRuntime.jsx(y,i({animation:`${Xr} 300ms ease-out`,boxShadow:"0 0 0 20000px rgb(0 0 0 / 0.5)",part:"tooltip-spotlight",pointerEvents:"none",position:"absolute",style:{borderRadius:Fe,height:v.height,left:A,top:Q,width:v.width}},d.zIndex!=null?{zIndex:d.zIndex}:{})),jsxRuntime.jsx(re__namespace.Content,s(i({},F),{ref:x,children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[ue()&&jsxRuntime.jsx(h,s(i({animation:`${Xr} 300ms ease-out`,boxShadow:"md",position:"relative",className:o,maxWidth:"min(360px, calc(100vw - 25px))",part:["tooltip",a],style:l},P),{children:t})),jsxRuntime.jsx(Gr,{onClick:()=>{k(()=>(typeof C.onOpenChange=="function"&&C.onOpenChange(!ue()),!ue()));},style:je})]})}),R)]})})]}))}xe.Close=e=>jsxRuntime.jsx(re__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(O.Plain,s(i({css:{top:"0px",right:"-6px"},part:"close",position:"absolute"},e),{children:jsxRuntime.jsx(ve,{height:"20",fill:"currentColor"})}))});xe.Media=o=>{var n=o,{src:e}=n,t=m(n,["src"]);return e==null?null:jsxRuntime.jsx(ye,i({aspectRatio:"2",borderRadius:"md md 0 0",borderWidth:"0",margin:"-5 -5 0",objectFit:"cover",overflowClipMargin:"unset",src:e,transform:"translate3d(0, 0, 1px)"},t))};xe.Primary=n=>{var r=n,{onClick:e,title:t}=r,o=m(r,["onClick","title"]);return t==null?null:jsxRuntime.jsx(O.Primary,i({title:t,onClick:e},o))};xe.Progress=o=>{var n=o,{children:e}=n,t=m(n,["children"]);return e==null?null:jsxRuntime.jsx(w.Body2,s(i({part:"progress"},t),{children:e}))};xe.Secondary=n=>{var r=n,{onClick:e,title:t}=r,o=m(r,["onClick","title"]);return t==null?null:jsxRuntime.jsx(O.Secondary,i({title:t,onClick:e},o))};xe.Subtitle=o=>{var n=o,{children:e}=n,t=m(n,["children"]);return e==null?null:jsxRuntime.jsx(w.Body2,s(i({part:"subtitle"},t),{children:e}))};xe.Title=o=>{var n=o,{children:e}=n,t=m(n,["children"]);return e==null?null:jsxRuntime.jsx(w.H4,s(i({part:"title"},t),{children:e}))};function rs(){let{userId:e,frigade:t}=To.useContext(V);function o(r){return M(this,null,function*(){yield t.identify(e,r);})}function n(r,a){return M(this,null,function*(){yield t.track(r,a);})}return {userId:e,addProperties:o,track:n}}function is(){var r;let{frigade:e}=To.useContext(V);function t(a){return M(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 o(a,p){return M(this,null,function*(){yield e.track(a,p);})}function n(a,p){return M(this,null,function*(){yield e.group(a,p);})}return {groupId:(r=e==null?void 0:e.config)==null?void 0:r.groupId,setGroupId:n,addProperties:t,track:o}}
110
110
 
111
111
  exports.FrigadeJS = js__namespace;
112
- exports.Announcement = _o;
113
- exports.Banner = vo;
112
+ exports.Announcement = Ko;
113
+ exports.Banner = ko;
114
114
  exports.BaseField = Y;
115
115
  exports.Box = y;
116
116
  exports.Button = O;
117
117
  exports.Card = h;
118
- exports.Checklist = oo;
119
- exports.Collection = No;
118
+ exports.Checklist = ro;
119
+ exports.Collection = Go;
120
120
  exports.Dialog = H;
121
121
  exports.Flex = S;
122
122
  exports.Flow = z;
123
- exports.Form = Ie;
124
- exports.Hint = Vo;
125
- exports.Image = mo;
126
- exports.Label = Do;
123
+ exports.Form = He;
124
+ exports.Hint = zo;
125
+ exports.Image = xo;
126
+ exports.Label = $o;
127
127
  exports.Media = ye;
128
- exports.Progress = Re;
129
- exports.Provider = Dr;
130
- exports.RadioField = Io;
131
- exports.SelectField = Ho;
132
- exports.Spotlight = Mo;
133
- exports.Survey = ao;
134
- exports.Text = F;
135
- exports.TextField = $o;
136
- exports.TextareaField = Ao;
128
+ exports.Progress = Pe;
129
+ exports.ProgressBadge = Xa;
130
+ exports.Provider = Ir;
131
+ exports.RadioField = Mo;
132
+ exports.SelectField = Wo;
133
+ exports.Spotlight = No;
134
+ exports.Survey = po;
135
+ exports.Text = w;
136
+ exports.TextField = Vo;
137
+ exports.TextareaField = Lo;
137
138
  exports.Tooltip = xe;
138
- exports.Tour = po;
139
- exports.Video = fo;
140
- exports.themeVariables = Po;
141
- exports.tokens = Xe;
142
- exports.useBoundingClientRect = yo;
143
- exports.useFlow = Se;
144
- exports.useFlowHandlers = Go;
145
- exports.useFrigade = zo;
146
- exports.useGroup = es;
147
- exports.useModal = Ko;
139
+ exports.Tour = mo;
140
+ exports.Video = ho;
141
+ exports.themeVariables = Fo;
142
+ exports.tokens = qe;
143
+ exports.useBoundingClientRect = Po;
144
+ exports.useFlow = we;
145
+ exports.useFlowHandlers = Jo;
146
+ exports.useFrigade = jo;
147
+ exports.useGroup = is;
148
+ exports.useModal = qo;
148
149
  exports.useStepHandlers = le;
149
- exports.useUser = Ya;
150
+ exports.useUser = rs;
150
151
  //# sourceMappingURL=out.js.map
151
152
  //# sourceMappingURL=index.cjs.map