@frigade/react 2.5.14 → 2.5.15

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,21 +3,20 @@
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 Eo = require('react');
6
+ var ko = require('react');
7
7
  var clsx = require('clsx');
8
- var ln = require('known-css-properties');
9
- var xn = require('dompurify');
8
+ var sn = require('known-css-properties');
9
+ var yn = require('dompurify');
10
10
  var js = require('@frigade/js');
11
- var si = require('embla-carousel-react');
11
+ var ai = require('embla-carousel-react');
12
12
  var ke = require('@radix-ui/react-collapsible');
13
13
  var reactHookForm = require('react-hook-form');
14
14
  var De = require('@radix-ui/react-radio-group');
15
15
  var N = require('@radix-ui/react-select');
16
- var so = 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');
20
- var Ge = require('core-js-pure/actual/structured-clone');
21
20
  var re = require('@radix-ui/react-popover');
22
21
 
23
22
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -41,26 +40,25 @@ function _interopNamespace(e) {
41
40
  }
42
41
 
43
42
  var j__namespace = /*#__PURE__*/_interopNamespace(j);
44
- var Eo__namespace = /*#__PURE__*/_interopNamespace(Eo);
45
- var ln__default = /*#__PURE__*/_interopDefault(ln);
46
- var xn__default = /*#__PURE__*/_interopDefault(xn);
43
+ var ko__namespace = /*#__PURE__*/_interopNamespace(ko);
44
+ var sn__default = /*#__PURE__*/_interopDefault(sn);
45
+ var yn__default = /*#__PURE__*/_interopDefault(yn);
47
46
  var js__namespace = /*#__PURE__*/_interopNamespace(js);
48
- var si__default = /*#__PURE__*/_interopDefault(si);
47
+ var ai__default = /*#__PURE__*/_interopDefault(ai);
49
48
  var ke__namespace = /*#__PURE__*/_interopNamespace(ke);
50
49
  var De__namespace = /*#__PURE__*/_interopNamespace(De);
51
50
  var N__namespace = /*#__PURE__*/_interopNamespace(N);
52
- var so__namespace = /*#__PURE__*/_interopNamespace(so);
53
- var Ge__default = /*#__PURE__*/_interopDefault(Ge);
51
+ var ao__namespace = /*#__PURE__*/_interopNamespace(ao);
54
52
  var re__namespace = /*#__PURE__*/_interopNamespace(re);
55
53
 
56
- var it=Object.defineProperty,en=Object.defineProperties;var on=Object.getOwnPropertyDescriptors;var Je=Object.getOwnPropertySymbols;var at=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable;var nt=(e,o,t)=>o in e?it(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,i=(e,o)=>{for(var t in o||(o={}))at.call(o,t)&&nt(e,t,o[t]);if(Je)for(var t of Je(o))st.call(o,t)&&nt(e,t,o[t]);return e},l=(e,o)=>en(e,on(o));var tn=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(o,t)=>(typeof require!="undefined"?require:o)[t]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var f=(e,o)=>{var t={};for(var n in e)at.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&Je)for(var n of Je(e))o.indexOf(n)<0&&st.call(e,n)&&(t[n]=e[n]);return t};var ie=(e,o)=>{for(var t in o)it(e,t,{get:o[t],enumerable:!0});};var M=(e,o,t)=>new Promise((n,r)=>{var a=d=>{try{s(t.next(d));}catch(u){r(u);}},p=d=>{try{s(t.throw(d));}catch(u){r(u);}},s=d=>d.done?n(d.value):Promise.resolve(d.value).then(a,p);s((t=t.apply(e,o)).next());});function ve(e){return jsxRuntime.jsx("svg",l(i({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{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 pt={borderWidths:{md:"1px"}};var qe=[5,10,20,35,50,65,80,95,98],dt=[...qe],Fo=[...qe];dt[4]=40;Fo[4]=60;var rn={blue:{h:213,s:100,l:qe},gray:{h:220,s:10,l:qe},green:{h:141,s:90,l:dt},red:{h:9,s:90,l:Fo},yellow:{h:50,s:90,l:Fo}};var W={};for(let[e,{h:o,s:t,l:n}]of Object.entries(rn))W[e]=Object.fromEntries(n.map((r,a)=>[`${(a+1)*100}`,`hsl(${o} ${t}% ${r}%)`]));var ct=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 ut={md:"8px",lg:"20px",round:"50%"};var c=e=>`var(--fr-colors-${e})`,mt={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("neutral-900"),border:c("neutral-800"),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 ft={md:"0px 4px 20px rgba(0, 0, 0, 0.1)"};var nn="px",an=e=>typeof e=="number"?`${4*e}${nn}`:e,sn=[-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"],gt=Object.fromEntries(sn.map(e=>[e,an(e)]));var yt={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 Ze=l(i(l(i({},pt),{colors:i(i({},ct),mt)}),yt),{radii:ut,shadows:ft,space:gt});function Me(e,o="",t="."){return Object.keys(e).reduce((n,r)=>{let p=`${o.length?`${o}${t}`:""}${r}`,s=e[r];return typeof s=="object"&&s!==null&&!Array.isArray(s)?Object.assign(n,Me(s,p,t)):n[p]=s,n},{})}function vo(e){let o=Me(e,"--fr","-");for(let[t,n]of Object.entries(o))if(t.indexOf(".")>-1){let r=t.replace(/\./g,"-");o[r]=n,delete o[t];}return o}function xt(e,o="--fr"){let t={};return Object.keys(e).forEach(n=>{let r=e[n],a=n.replace(/\./g,"-");typeof r=="object"&&r!==null&&!Array.isArray(r)?t[n]=xt(r,`${o}-${n}`):t[n]=`var(${o}-${a})`;}),t}var Ro=vo(Ze),O=xt(Ze);var pn=new Set(["alt","size","src"]),dn=ln__default.default.all.filter(e=>e.indexOf("-")!=0&&!pn.has(e)).map(e=>[e.replace(/-([a-z])/g,(o,t)=>t.toUpperCase()),null]),cn=Object.fromEntries(dn),Ye=Me(O.colors),un={color:Ye,backgroundColor:Ye,borderColor:Ye,border:i(i({},O.borderWidths),Ye),borderRadius:O.radii,borderWidth:O.borderWidths,boxShadow:O.shadows,fontFamily:O.fontFamilies,fontSize:O.fontSizes,fontWeight:O.fontWeights,gap:O.space,lineHeight:O.lineHeights,margin:O.space,marginBottom:O.space,marginLeft:O.space,marginRight:O.space,marginTop:O.space,padding:O.space,paddingBottom:O.space,paddingLeft:O.space,paddingRight:O.space,paddingTop:O.space},ht=i(i({},cn),un),bt={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"]},Pt=new Set(["active","disabled","focus","focusVisible","focusWithin","hover"]);function mn(e){return Array.isArray(e)?new Map(e.map(o=>[o,o])):typeof e=="object"&&e!==null?new Map(Object.entries(e)):typeof e=="string"||typeof e=="number"?new Map([[e,e]]):new Map}var Ct=new Map(Object.entries(ht).map(([e,o])=>[e,mn(o)])),fn=new Map(Object.entries(bt).map(([e,o])=>[e,new Set(o)])),gn=new Set(["height","width"]),yn=new Set(["canvas","embed","iframe","img","input","object","video"]);function St(e){let[o,t]=e.split(":");return [o,Pt.has(t)?t:null]}function wt(e,o="div"){let t=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(t).forEach(([a,p])=>{let[s,d]=St(a),u=fn.get(s);u!=null&&(u.forEach(m=>{let g=`${m}${d?":"+d:""}`;t[g]=p;}),delete t[a]);}),Object.entries(t).forEach(([a,p])=>{let[s,d]=St(a),u=Ct.get(s);if(u!=null){if(p==null)delete t[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 o!="string"||!yn.has(o)||!gn.has(s))&&delete t[a];}}),Object.keys(t).forEach(a=>{let p=a.substring(1);a.indexOf("_")===0&&Ct.has(p)&&(t[p]=t[a],delete t[a]);}),{cssFromProps:n,unmatchedProps:t}}function hn(){if(typeof window=="undefined"){let{JSDOM:e}=tn("jsdom");return new e("<!DOCTYPE html>").window}return window}function Ft(e){return e?{__html:xn__default.default(hn()).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 Pn(e){return e&&`fr-${e}`}function Bt(e){return e&&(Array.isArray(e)?e.filter(o=>o!=null).map(o=>Bt(o)).join(" "):Pn(e))}function Cn(s,p){var d=s,{as:e,children:o,className:t,css:n={},part:r}=d,a=f(d,["as","children","className","css","part"]);let u=e!=null?e:"div",{cssFromProps:m,unmatchedProps:g}=wt(a,u),b=Bt(r),x=t||b?clsx.clsx(t,b):void 0,T=[{boxSizing:"border-box"},m,n];return typeof o=="string"?jsxRuntime.jsx(u,l(i({className:x,css:T},g),{ref:p,dangerouslySetInnerHTML:Ft(o)})):jsxRuntime.jsx(u,l(i({className:x,css:T},g),{ref:p,children:o}))}var y=Eo__namespace.forwardRef(Cn);var D={};ie(D,{Link:()=>qn,Plain:()=>Zn,Primary:()=>Xn,Secondary:()=>Jn});var F={};ie(F,{Body1:()=>Wn,Body2:()=>Vn,Caption:()=>Ln,Display1:()=>Dn,Display2:()=>In,H1:()=>Hn,H2:()=>$n,H3:()=>An,H4:()=>Mn});var Bo={};ie(Bo,{Body1:()=>Tn,Body2:()=>kn,Caption:()=>En,Display1:()=>Sn,Display2:()=>wn,H1:()=>Fn,H2:()=>vn,H3:()=>Rn,H4:()=>Bn});var ae={color:"neutral.foreground",fontFamily:"default",margin:"0"},Sn=l(i({},ae),{fontSize:"5xl",fontWeight:"bold",lineHeight:"4xl"}),wn=l(i({},ae),{fontSize:"4xl",fontWeight:"bold",lineHeight:"3xl"}),Fn=l(i({},ae),{fontSize:"3xl",fontWeight:"demibold",lineHeight:"2xl"}),vn=l(i({},ae),{fontSize:"2xl",fontWeight:"demibold",lineHeight:"xl"}),Rn=l(i({},ae),{fontSize:"xl",fontWeight:"demibold",lineHeight:"lg"}),Bn=l(i({},ae),{fontSize:"md",fontWeight:"demibold",lineHeight:"md"}),Tn=l(i({},ae),{fontSize:"md",fontWeight:"regular",lineHeight:"md"}),kn=l(i({},ae),{fontSize:"sm",fontWeight:"regular",lineHeight:"sm"}),En=l(i({},ae),{fontSize:"xs",fontWeight:"regular",lineHeight:"xs"});var On=["Display1","Display2","H1","H2","H3","H4","Body1","Body2","Caption"],se=Object.fromEntries(On.map(e=>{let o=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():"span",t=Eo__namespace.forwardRef((s,p)=>{var d=s,{as:n=o,children:r}=d,a=f(d,["as","children"]);return jsxRuntime.jsx(y,l(i(i({as:n},Bo[e]),a),{ref:p,children:r}))});return t.displayName=`Text.${e}`,[e,t]})),Dn=se.Display1,In=se.Display2,Hn=se.H1,$n=se.H2,An=se.H3,Mn=se.H4,Wn=se.Body1,Vn=se.Body2,Ln=se.Caption;var ko={};ie(ko,{Link:()=>Gn,Plain:()=>Kn,Primary:()=>zn,Secondary:()=>Un,loadingCSSStyle:()=>To});var Qe={borderWidth:"md",borderRadius:"md",borderStyle:"solid","cursor:disabled":"not-allowed",display:"flex",gap:"2",padding:"2 4",fontFamily:"inherit"},zn=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"}),Un=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"}),Gn=l(i({},Qe),{backgroundColor:"transparent",borderColor:"transparent",color:"primary.surface","color:hover":"primary.hover.surface"}),Kn=l(i({},Qe),{backgroundColor:"transparent",borderColor:"transparent",color:"neutral.foreground"}),jn=react.keyframes({from:{transform:"rotate(0turn)"},to:{transform:"rotate(1turn)"}}),To={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:jn+" 1s ease infinite"}};function eo(p){var s=p,{as:e,children:o,part:t,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}`,t]},ko[r]),{css:i(i({},(u=a.css)!=null?u:{}),a.loading?To:{})}),a),{loading:void 0,children:[o,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 Xn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(eo,l(i({},o),{variant:"Primary",children:e}))}function Jn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(eo,l(i({},o),{variant:"Secondary",children:e}))}function qn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(eo,l(i({},o),{variant:"Link",children:e}))}function Zn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(eo,l(i({},o),{variant:"Plain",children:e}))}var S={};ie(S,{Column:()=>ei,Row:()=>Qn});var Qn=Eo__namespace.forwardRef((e,o)=>jsxRuntime.jsx(y,l(i({display:"flex",flexDirection:"row"},e),{ref:o}))),ei=Eo__namespace.forwardRef((e,o)=>jsxRuntime.jsx(y,l(i({display:"flex",flexDirection:"column"},e),{ref:o})));function Oo(r){var a=r,{dismissible:e,flowId:o,part:t}=a,n=f(a,["dismissible","flowId","part"]);return jsxRuntime.jsx(z,l(i({as:null,flowId:o},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",t],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 no={};ie(no,{Carousel:()=>jt,Collapsible:()=>ro,CollapsibleStep:()=>Le});var Pe={};ie(Pe,{Bar:()=>Re,Dots:()=>It,Fraction:()=>Be,Segments:()=>oo});function Re(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);let a=o>0?Math.min(e/o,1):0,p=a===0?"10px":`${100*a}%`;return jsxRuntime.jsx(y,l(i({"aria-description":"Progress represented as a bar","aria-label":"Progress Bar","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,backgroundColor:"neutral.800",borderRadius:"md",height:"10px",part:"progress-bar",role:"meter"},t),{children:jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"progress-bar-fill",borderRadius:"md",height:"100%",style:{width:p},transition:"width 300ms ease-out"})}))}function It(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);if(o==1)return null;let a=[...Array(o)].map((p,s)=>jsxRuntime.jsx(y,{as:"circle",cx:4+16*s,cy:"4px",fill:e-1===s?O.colors.blue500:O.colors.blue800,part:["progress-dot",e-1===s?"progress-dot-filled":null],r:4},s));return jsxRuntime.jsx(y,l(i({"aria-description":"Progress represented as dots","aria-label":"Progress Dots","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,as:"svg",height:"8px",part:"progress-dots",role:"meter",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8},t),{children:a}))}function Be(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);return jsxRuntime.jsx(F.Body2,l(i({"aria-description":"Progress represented as a fraction of a total","aria-label":"Progress Fraction","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,part:"progress-fraction",role:"meter"},t),{children:`${e}/${o}`}))}function oo(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);let a=[...Array(o)].map((p,s)=>jsxRuntime.jsx(y,{backgroundColor:e-1>=s?"primary.surface":"blue800",borderRadius:"md",flexGrow:1,height:"100%",minWidth:"10px",part:["progress-segment",e-1===s?"progress-segment-filled":null]},s));return jsxRuntime.jsx(S.Row,l(i({"aria-description":"Progress represented as a segmented bar","aria-label":"Progress Segments","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,gap:1,height:"10px",part:"progress-segments",role:"meter"},t),{children:a}))}function At(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 ti(){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 Mt(t){var n=t,{checked:e=!1}=n,o=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"},o),{children:e&&jsxRuntime.jsx(y,{alignItems:"center",bg:"green500",borderWidth:"md",borderStyle:"solid",borderColor:"green500",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"check-indicator-checked",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsxRuntime.jsx(ti,{})})}))}function le(e,{onPrimary:o,onSecondary:t}={}){let{navigate:n}=Eo.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:Eo.useCallback((a,p,s=!0)=>M(this,null,function*(){if((yield o==null?void 0:o(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:Eo.useCallback((a,p)=>M(this,null,function*(){if((yield t==null?void 0:t(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 Vt({onPrimary:e,onSecondary:o,step:t}){var u,m;let{handlePrimary:n,handleSecondary:r}=le(t,{onPrimary:e,onSecondary:o}),{blocked:a,completed:p,skipped:s}=t.$state,d=p||s||!a?jsxRuntime.jsx(Mt,{checked:p||s,marginLeft:"auto"}):jsxRuntime.jsx(y,{as:At,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:[t.iconUri&&jsxRuntime.jsx(h.Media,{borderRadius:"0",height:"24px",src:t.iconUri,width:"24px"}),d]}),jsxRuntime.jsx(h.Title,{children:t.title}),jsxRuntime.jsx(h.Subtitle,{children:t.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=t.secondaryButton)==null?void 0:u.title}),jsxRuntime.jsx(h.Primary,{disabled:a,onClick:n,title:(m=t.primaryButton)==null?void 0:m.title})]})]})}function Nt(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 zt(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 Ut=react.keyframes`
54
+ var nt=Object.defineProperty,Qr=Object.defineProperties;var en=Object.getOwnPropertyDescriptors;var Xe=Object.getOwnPropertySymbols;var it=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable;var rt=(e,o,t)=>o in e?nt(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,i=(e,o)=>{for(var t in o||(o={}))it.call(o,t)&&rt(e,t,o[t]);if(Xe)for(var t of Xe(o))at.call(o,t)&&rt(e,t,o[t]);return e},l=(e,o)=>Qr(e,en(o));var on=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(o,t)=>(typeof require!="undefined"?require:o)[t]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var f=(e,o)=>{var t={};for(var n in e)it.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&Xe)for(var n of Xe(e))o.indexOf(n)<0&&at.call(e,n)&&(t[n]=e[n]);return t};var ie=(e,o)=>{for(var t in o)nt(e,t,{get:o[t],enumerable:!0});};var M=(e,o,t)=>new Promise((n,r)=>{var a=d=>{try{s(t.next(d));}catch(u){r(u);}},p=d=>{try{s(t.throw(d));}catch(u){r(u);}},s=d=>d.done?n(d.value):Promise.resolve(d.value).then(a,p);s((t=t.apply(e,o)).next());});function ve(e){return jsxRuntime.jsx("svg",l(i({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5"},e),{children:jsxRuntime.jsx("path",{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 lt={borderWidths:{md:"1px"}};var Je=[5,10,20,35,50,65,80,95,98],pt=[...Je],wo=[...Je];pt[4]=40;wo[4]=60;var tn={blue:{h:213,s:100,l:Je},gray:{h:220,s:10,l:Je},green:{h:141,s:90,l:pt},red:{h:9,s:90,l:wo},yellow:{h:50,s:90,l:wo}};var W={};for(let[e,{h:o,s:t,l:n}]of Object.entries(tn))W[e]=Object.fromEntries(n.map((r,a)=>[`${(a+1)*100}`,`hsl(${o} ${t}% ${r}%)`]));var dt=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 ct={md:"8px",lg:"20px",round:"50%"};var c=e=>`var(--fr-colors-${e})`,ut={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("neutral-900"),border:c("neutral-800"),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 mt={md:"0px 4px 20px rgba(0, 0, 0, 0.1)"};var rn="px",nn=e=>typeof e=="number"?`${4*e}${rn}`:e,an=[-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"],ft=Object.fromEntries(an.map(e=>[e,nn(e)]));var gt={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=l(i(l(i({},lt),{colors:i(i({},dt),ut)}),gt),{radii:ct,shadows:mt,space:ft});function Me(e,o="",t="."){return Object.keys(e).reduce((n,r)=>{let p=`${o.length?`${o}${t}`:""}${r}`,s=e[r];return typeof s=="object"&&s!==null&&!Array.isArray(s)?Object.assign(n,Me(s,p,t)):n[p]=s,n},{})}function Fo(e){let o=Me(e,"--fr","-");for(let[t,n]of Object.entries(o))if(t.indexOf(".")>-1){let r=t.replace(/\./g,"-");o[r]=n,delete o[t];}return o}function yt(e,o="--fr"){let t={};return Object.keys(e).forEach(n=>{let r=e[n],a=n.replace(/\./g,"-");typeof r=="object"&&r!==null&&!Array.isArray(r)?t[n]=yt(r,`${o}-${n}`):t[n]=`var(${o}-${a})`;}),t}var vo=Fo(qe),O=yt(qe);var ln=new Set(["alt","size","src"]),pn=sn__default.default.all.filter(e=>e.indexOf("-")!=0&&!ln.has(e)).map(e=>[e.replace(/-([a-z])/g,(o,t)=>t.toUpperCase()),null]),dn=Object.fromEntries(pn),Ze=Me(O.colors),cn={color:Ze,backgroundColor:Ze,borderColor:Ze,border:i(i({},O.borderWidths),Ze),borderRadius:O.radii,borderWidth:O.borderWidths,boxShadow:O.shadows,fontFamily:O.fontFamilies,fontSize:O.fontSizes,fontWeight:O.fontWeights,gap:O.space,lineHeight:O.lineHeights,margin:O.space,marginBottom:O.space,marginLeft:O.space,marginRight:O.space,marginTop:O.space,padding:O.space,paddingBottom:O.space,paddingLeft:O.space,paddingRight:O.space,paddingTop:O.space},xt=i(i({},dn),cn),ht={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"]},bt=new Set(["active","disabled","focus","focusVisible","focusWithin","hover"]);function un(e){return Array.isArray(e)?new Map(e.map(o=>[o,o])):typeof e=="object"&&e!==null?new Map(Object.entries(e)):typeof e=="string"||typeof e=="number"?new Map([[e,e]]):new Map}var Pt=new Map(Object.entries(xt).map(([e,o])=>[e,un(o)])),mn=new Map(Object.entries(ht).map(([e,o])=>[e,new Set(o)])),fn=new Set(["height","width"]),gn=new Set(["canvas","embed","iframe","img","input","object","video"]);function Ct(e){let[o,t]=e.split(":");return [o,bt.has(t)?t:null]}function St(e,o="div"){let t=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(t).forEach(([a,p])=>{let[s,d]=Ct(a),u=mn.get(s);u!=null&&(u.forEach(m=>{let g=`${m}${d?":"+d:""}`;t[g]=p;}),delete t[a]);}),Object.entries(t).forEach(([a,p])=>{let[s,d]=Ct(a),u=Pt.get(s);if(u!=null){if(p==null)delete t[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 o!="string"||!gn.has(o)||!fn.has(s))&&delete t[a];}}),Object.keys(t).forEach(a=>{let p=a.substring(1);a.indexOf("_")===0&&Pt.has(p)&&(t[p]=t[a],delete t[a]);}),{cssFromProps:n,unmatchedProps:t}}function xn(){if(typeof window=="undefined"){let{JSDOM:e}=on("jsdom");return new e("<!DOCTYPE html>").window}return window}function wt(e){return e?{__html:yn__default.default(xn()).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 bn(e){return e&&`fr-${e}`}function Rt(e){return e&&(Array.isArray(e)?e.filter(o=>o!=null).map(o=>Rt(o)).join(" "):bn(e))}function Pn(s,p){var d=s,{as:e,children:o,className:t,css:n={},part:r}=d,a=f(d,["as","children","className","css","part"]);let u=e!=null?e:"div",{cssFromProps:m,unmatchedProps:g}=St(a,u),b=Rt(r),x=t||b?clsx.clsx(t,b):void 0,T=[{boxSizing:"border-box"},m,n];return typeof o=="string"?jsxRuntime.jsx(u,l(i({className:x,css:T},g),{ref:p,dangerouslySetInnerHTML:wt(o)})):jsxRuntime.jsx(u,l(i({className:x,css:T},g),{ref:p,children:o}))}var y=ko__namespace.forwardRef(Pn);var D={};ie(D,{Link:()=>Jn,Plain:()=>qn,Primary:()=>jn,Secondary:()=>Xn});var F={};ie(F,{Body1:()=>Mn,Body2:()=>Wn,Caption:()=>Vn,Display1:()=>On,Display2:()=>Dn,H1:()=>In,H2:()=>Hn,H3:()=>$n,H4:()=>An});var Ro={};ie(Ro,{Body1:()=>Bn,Body2:()=>Tn,Caption:()=>kn,Display1:()=>Cn,Display2:()=>Sn,H1:()=>wn,H2:()=>Fn,H3:()=>vn,H4:()=>Rn});var ae={color:"neutral.foreground",fontFamily:"default",margin:"0"},Cn=l(i({},ae),{fontSize:"5xl",fontWeight:"bold",lineHeight:"4xl"}),Sn=l(i({},ae),{fontSize:"4xl",fontWeight:"bold",lineHeight:"3xl"}),wn=l(i({},ae),{fontSize:"3xl",fontWeight:"demibold",lineHeight:"2xl"}),Fn=l(i({},ae),{fontSize:"2xl",fontWeight:"demibold",lineHeight:"xl"}),vn=l(i({},ae),{fontSize:"xl",fontWeight:"demibold",lineHeight:"lg"}),Rn=l(i({},ae),{fontSize:"md",fontWeight:"demibold",lineHeight:"md"}),Bn=l(i({},ae),{fontSize:"md",fontWeight:"regular",lineHeight:"md"}),Tn=l(i({},ae),{fontSize:"sm",fontWeight:"regular",lineHeight:"sm"}),kn=l(i({},ae),{fontSize:"xs",fontWeight:"regular",lineHeight:"xs"});var En=["Display1","Display2","H1","H2","H3","H4","Body1","Body2","Caption"],se=Object.fromEntries(En.map(e=>{let o=["H1","H2","H3","H4"].includes(e)?e.toLowerCase():"span",t=ko__namespace.forwardRef((s,p)=>{var d=s,{as:n=o,children:r}=d,a=f(d,["as","children"]);return jsxRuntime.jsx(y,l(i(i({as:n},Ro[e]),a),{ref:p,children:r}))});return t.displayName=`Text.${e}`,[e,t]})),On=se.Display1,Dn=se.Display2,In=se.H1,Hn=se.H2,$n=se.H3,An=se.H4,Mn=se.Body1,Wn=se.Body2,Vn=se.Caption;var To={};ie(To,{Link:()=>Un,Plain:()=>Gn,Primary:()=>zn,Secondary:()=>_n,loadingCSSStyle:()=>Bo});var Ye={borderWidth:"md",borderRadius:"md",borderStyle:"solid","cursor:disabled":"not-allowed",display:"flex",gap:"2",padding:"2 4",fontFamily:"inherit"},zn=l(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"}),_n=l(i({},Ye),{backgroundColor:"secondary.background",borderColor:"secondary.border",color:"secondary.foreground","backgroundColor:hover":"secondary.hover.background","backgroundColor:disabled":"secondary.background","opacity:disabled":"0.6"}),Un=l(i({},Ye),{backgroundColor:"transparent",borderColor:"transparent",color:"primary.surface","color:hover":"primary.hover.surface"}),Gn=l(i({},Ye),{backgroundColor:"transparent",borderColor:"transparent",color:"neutral.foreground"}),Kn=react.keyframes({from:{transform:"rotate(0turn)"},to:{transform:"rotate(1turn)"}}),Bo={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:Kn+" 1s ease infinite"}};function Qe(p){var s=p,{as:e,children:o,part:t,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}`,t]},To[r]),{css:i(i({},(u=a.css)!=null?u:{}),a.loading?Bo:{})}),a),{loading:void 0,children:[o,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 jn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(Qe,l(i({},o),{variant:"Primary",children:e}))}function Xn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(Qe,l(i({},o),{variant:"Secondary",children:e}))}function Jn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(Qe,l(i({},o),{variant:"Link",children:e}))}function qn(t){var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(Qe,l(i({},o),{variant:"Plain",children:e}))}var S={};ie(S,{Column:()=>Qn,Row:()=>Yn});var Yn=ko__namespace.forwardRef((e,o)=>jsxRuntime.jsx(y,l(i({display:"flex",flexDirection:"row"},e),{ref:o}))),Qn=ko__namespace.forwardRef((e,o)=>jsxRuntime.jsx(y,l(i({display:"flex",flexDirection:"column"},e),{ref:o})));function Eo(r){var a=r,{dismissible:e,flowId:o,part:t}=a,n=f(a,["dismissible","flowId","part"]);return jsxRuntime.jsx(_,l(i({as:null,flowId:o},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",t],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 ro={};ie(ro,{Carousel:()=>Kt,Collapsible:()=>to,CollapsibleStep:()=>Le});var Pe={};ie(Pe,{Bar:()=>Re,Dots:()=>Dt,Fraction:()=>Be,Segments:()=>eo});function Re(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);let a=o>0?Math.min(e/o,1):0,p=a===0?"10px":`${100*a}%`;return jsxRuntime.jsx(y,l(i({"aria-description":"Progress represented as a bar","aria-label":"Progress Bar","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,backgroundColor:"neutral.800",borderRadius:"md",height:"10px",part:"progress-bar",role:"meter"},t),{children:jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"progress-bar-fill",borderRadius:"md",height:"100%",style:{width:p},transition:"width 300ms ease-out"})}))}function Dt(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);if(o==1)return null;let a=[...Array(o)].map((p,s)=>jsxRuntime.jsx(y,{as:"circle",cx:4+16*s,cy:"4px",fill:e-1===s?O.colors.blue500:O.colors.blue800,part:["progress-dot",e-1===s?"progress-dot-filled":null],r:4},s));return jsxRuntime.jsx(y,l(i({"aria-description":"Progress represented as dots","aria-label":"Progress Dots","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,as:"svg",height:"8px",part:"progress-dots",role:"meter",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8},t),{children:a}))}function Be(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);return jsxRuntime.jsx(F.Body2,l(i({"aria-description":"Progress represented as a fraction of a total","aria-label":"Progress Fraction","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,part:"progress-fraction",role:"meter"},t),{children:`${e}/${o}`}))}function eo(n){var r=n,{current:e,total:o}=r,t=f(r,["current","total"]);let a=[...Array(o)].map((p,s)=>jsxRuntime.jsx(y,{backgroundColor:e-1>=s?"primary.surface":"blue800",borderRadius:"md",flexGrow:1,height:"100%",minWidth:"10px",part:["progress-segment",e-1===s?"progress-segment-filled":null]},s));return jsxRuntime.jsx(S.Row,l(i({"aria-description":"Progress represented as a segmented bar","aria-label":"Progress Segments","aria-valuemin":"0","aria-valuemax":o,"aria-valuenow":e,gap:1,height:"10px",part:"progress-segments",role:"meter"},t),{children:a}))}function $t(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 oi(){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 At(t){var n=t,{checked:e=!1}=n,o=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"},o),{children:e&&jsxRuntime.jsx(y,{alignItems:"center",bg:"green500",borderWidth:"md",borderStyle:"solid",borderColor:"green500",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"check-indicator-checked",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsxRuntime.jsx(oi,{})})}))}function le(e,{onPrimary:o,onSecondary:t}={}){let{navigate:n}=ko.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:ko.useCallback((a,p,s=!0)=>M(this,null,function*(){if((yield o==null?void 0:o(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:ko.useCallback((a,p)=>M(this,null,function*(){if((yield t==null?void 0:t(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 Wt({onPrimary:e,onSecondary:o,step:t}){var u,m;let{handlePrimary:n,handleSecondary:r}=le(t,{onPrimary:e,onSecondary:o}),{blocked:a,completed:p,skipped:s}=t.$state,d=p||s||!a?jsxRuntime.jsx(At,{checked:p||s,marginLeft:"auto"}):jsxRuntime.jsx(y,{as:$t,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:[t.iconUri&&jsxRuntime.jsx(h.Media,{borderRadius:"0",height:"24px",src:t.iconUri,width:"24px"}),d]}),jsxRuntime.jsx(h.Title,{children:t.title}),jsxRuntime.jsx(h.Subtitle,{children:t.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=t.secondaryButton)==null?void 0:u.title}),jsxRuntime.jsx(h.Primary,{disabled:a,onClick:n,title:(m=t.primaryButton)==null?void 0:m.title})]})]})}function Lt(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 zt(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 _t=react.keyframes`
57
55
  from {
58
56
  opacity: 0;
59
57
  }
60
58
  to {
61
59
  opacity: 1;
62
60
  }
63
- `;function Gt({flow:e,sort:o,onPrimary:t,onSecondary:n}){var v,B;let[r,a]=Eo.useState(),[p]=Eo.useState({align:"start",container:".fr-carousel-content",skipSnaps:!0,slides:".fr-carousel-step",startIndex:o=="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]=si__default.default(p),[u,m]=Eo.useState(),[g,b]=Eo.useState();Eo.useLayoutEffect(()=>{d&&(u==null&&m(d.canScrollNext()),g==null&&b(d.canScrollPrev()),d.on("select",()=>{m(d.canScrollNext()),b(d.canScrollPrev());}));},[d]),Eo.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(o==="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:O.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(Re,{current:x,total:T,minWidth:"200px"})]})]}),jsxRuntime.jsxs(y,{margin:`0 ${O.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(Vt,{onPrimary:t,onSecondary:n,step:w},w.id))}),g&&jsxRuntime.jsx(S.Column,{animation:`${Ut} 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(D.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollPrev(),padding:"2",children:jsxRuntime.jsx(zt,{height:"24px",width:"24px"})})}),u&&jsxRuntime.jsx(S.Column,{animation:`${Ut} 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(D.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollNext(),padding:"2",children:jsxRuntime.jsx(Nt,{height:"24px",width:"24px"})})})]})]}):null}function jt(o){var e=f(o,[]);return jsxRuntime.jsx(z,l(i({as:h,borderWidth:1,containerType:"inline-size",p:"4",part:"carousel"},e),{children:t=>jsxRuntime.jsx(Gt,i(i({},e),t))}))}var Le={};ie(Le,{Content:()=>Ho,Root:()=>$o,Trigger:()=>Ao});function Jt(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 pi=react.keyframes`
61
+ `;function Ut({flow:e,sort:o,onPrimary:t,onSecondary:n}){var v,B;let[r,a]=ko.useState(),[p]=ko.useState({align:"start",container:".fr-carousel-content",skipSnaps:!0,slides:".fr-carousel-step",startIndex:o=="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]=ai__default.default(p),[u,m]=ko.useState(),[g,b]=ko.useState();ko.useLayoutEffect(()=>{d&&(u==null&&m(d.canScrollNext()),g==null&&b(d.canScrollPrev()),d.on("select",()=>{m(d.canScrollNext()),b(d.canScrollPrev());}));},[d]),ko.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(o==="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:O.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(Re,{current:x,total:T,minWidth:"200px"})]})]}),jsxRuntime.jsxs(y,{margin:`0 ${O.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(Wt,{onPrimary:t,onSecondary:n,step:w},w.id))}),g&&jsxRuntime.jsx(S.Column,{animation:`${_t} 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(D.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollPrev(),padding:"2",children:jsxRuntime.jsx(zt,{height:"24px",width:"24px"})})}),u&&jsxRuntime.jsx(S.Column,{animation:`${_t} 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(D.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>d.scrollNext(),padding:"2",children:jsxRuntime.jsx(Lt,{height:"24px",width:"24px"})})})]})]}):null}function Kt(o){var e=f(o,[]);return jsxRuntime.jsx(_,l(i({as:h,borderWidth:1,containerType:"inline-size",p:"4",part:"carousel"},e),{children:t=>jsxRuntime.jsx(Ut,i(i({},e),t))}))}var Le={};ie(Le,{Content:()=>Io,Root:()=>Ho,Trigger:()=>$o});function Xt(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 li=react.keyframes`
64
62
  from {
65
63
  height: 0;
66
64
  opacity: 0;
@@ -69,7 +67,7 @@ var it=Object.defineProperty,en=Object.defineProperties;var on=Object.getOwnProp
69
67
  height: var(--radix-collapsible-content-height);
70
68
  opacity: 1;
71
69
  }
72
- `,di=react.keyframes`
70
+ `,pi=react.keyframes`
73
71
  from {
74
72
  height: var(--radix-collapsible-content-height);
75
73
  opacity: 1;
@@ -78,7 +76,7 @@ var it=Object.defineProperty,en=Object.defineProperties;var on=Object.getOwnProp
78
76
  height: 0;
79
77
  opacity: 0;
80
78
  }
81
- `,ci=()=>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 ui({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(ci,{})})})}function Ho({children:e}){return jsxRuntime.jsx(ke__namespace.Content,{asChild:!0,children:jsxRuntime.jsxs(S.Column,{css:{'&[data-state="open"]':{animation:`${pi} 300ms ease-out`},'&[data-state="closed"]':{animation:`${di} 300ms ease-out`},overflow:"hidden"},gap:5,part:"collapsible-content",children:[jsxRuntime.jsx(y,{}),e]})})}function $o(a){var p=a,{children:e,disabled:o=!1,onOpenChange:t=()=>{},open:n=!1}=p,r=f(p,["children","disabled","onOpenChange","open"]);return jsxRuntime.jsx(ke__namespace.Root,{asChild:!0,disabled:o,open:n,onOpenChange:t,children:jsxRuntime.jsx(h,l(i({borderWidth:"md",css:{'&[data-state="open"] .fr-collapsible-step-icon':{transform:"rotate(180deg)"}},gap:0,part:"collapsible-step"},r),{children:e}))})}function Ao({isCompleted:e,isBlocked:o,title:t}){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:o?.4:1,disabled:o,pointerEvents:o?"none":"auto",cursor:o?"not-allowed":"pointer",part:"collapsible-header",children:[jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsx(ui,{checked:e}),jsxRuntime.jsx(F.Body2,{fontWeight:"demibold",userSelect:"none",part:"collapsible-title",children:t})]}),jsxRuntime.jsx(y,{as:Jt,color:"neutral.100",css:{"& path":{vectorEffect:"non-scaling-stroke"}},display:"block",height:"16px",order:2,part:"collapsible-step-icon",width:"16px"})]})})}var Zt=Eo.createContext({onPrimary:()=>{},onSecondary:()=>{},openStepId:null,setOpenStepId:()=>{},stepTypes:{}});function Yt({handlePrimary:e,handleSecondary:o,open:t,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($o,l(i({open:t,onOpenChange:n},b),{children:[jsxRuntime.jsx(Ao,{isBlocked:r.$state.blocked,isCompleted:p||s,title:u}),jsxRuntime.jsxs(Ho,{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:o}),jsxRuntime.jsx(h.Primary,{disabled:x,title:m,onClick:e})]})]})]}))}var yi={default:Yt};function xi(n){var r=n,{flow:e,step:o}=r,t=f(r,["flow","step"]);var v;let{onPrimary:a,onSecondary:p,openStepId:s,setOpenStepId:d,stepTypes:u}=Eo.useContext(Zt),{handlePrimary:m,handleSecondary:g}=le(o,{onPrimary:a,onSecondary:p}),b=(s!=null?s:e.getCurrentStep().id)===o.id,x=(v=u[o.type])!=null?v:Yt;function T(B){return M(this,null,function*(){d(B?o.id:""),B&&!o.$state.completed&&(yield o.start(),d(null));})}return jsxRuntime.jsx(x,l(i({flow:e,onOpenChange:T,open:b,step:o},t),{handlePrimary:m,handleSecondary:g}),o.id)}function ro(s){var d=s,{dismissible:e,flowId:o,onPrimary:t,onSecondary:n,part:r,stepTypes:a={}}=d,p=f(d,["dismissible","flowId","onPrimary","onSecondary","part","stepTypes"]);let[u,m]=Eo.useState(null),g=i(i({},yi),a);return jsxRuntime.jsx(Zt.Provider,{value:{openStepId:u,setOpenStepId:m,onPrimary:t,onSecondary:n,stepTypes:g},children:jsxRuntime.jsx(z,l(i({as:h,borderWidth:"md",flowId:o,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(xi,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(Re,{current:C,total:R,flexGrow:1})]})]}),P]})}}))})}var Ri=new Set(["required","min","max","minLength","maxLength","pattern"]);function Bi({fieldComponent:e,control:o,fieldData:t,submit:n}){let r=reactHookForm.useFormContext();t.pattern!=null&&(typeof t.pattern=="string"?t.pattern=new RegExp(t.pattern.replace(/^\/|\/$/g,"")):typeof t.pattern=="object"&&typeof t.pattern.value=="string"&&(t.pattern.value=new RegExp(t.pattern.value.replace(/^\/|\/$/g,""))));let a=Object.fromEntries(Object.entries(t).filter(([s])=>Ri.has(s))),p=reactHookForm.useController({name:t.id,control:o,rules:a});return jsxRuntime.jsx(e,l(i({},p),{fieldData:t,formContext:r,submit:n}))}function or({fieldTypes:e,handleDismiss:o,handlePrimary:t,handleSecondary:n,parentProps:{dismissible:r},step:a}){var C,R,k,$,L;let{__readOnly:p}=Eo.useContext(V),s=Eo.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},{})});Eo.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]=Eo.useState(!1),g=[],{control:b,handleSubmit:x}=d,T=(C=a.props)!=null?C:{};function v(E,I){m(!0),t(I,E,p===!0).then(()=>m(!1));}s.forEach(E=>{e[E.type]!=null&&g.push(jsxRuntime.jsx(Bi,{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 Eo.useEffect(()=>{d.clearErrors();},[a]),jsxRuntime.jsxs(S.Column,l(i({gap:5,part:"form-step"},T),{children:[jsxRuntime.jsx(h.Header,{dismissible:r,handleDismiss:o,part:"form-step-header",subtitle:a.subtitle,title:a.title}),jsxRuntime.jsx(reactHookForm.FormProvider,l(i({},d),{children:g})),jsxRuntime.jsxs(S.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[w&&jsxRuntime.jsx(D.Secondary,{onClick:n,title:w}),jsxRuntime.jsx(D.Primary,{disabled:P||u,onClick:x(v),title:B!=null?B:"Submit",loading:u})]},`form-footer-${a.id}`)]}))}function tr({error:e}){var o;return (o=e==null?void 0:e.message)!=null&&o.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 Mo({children:e,id:o,required:t=!1}){return jsxRuntime.jsxs(F.Body2,{as:"label",htmlFor:o,part:"field-label",fontWeight:"medium",mb:"2",display:"block",children:[e,jsxRuntime.jsx(y,{part:"field-label-required",display:"inline",children:t&&"*"})]})}var Wo={backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md"},Ne=l(i({},Wo),{px:"4",py:"2",display:"block",outline:"none",width:"100%"}),io={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:o,fieldData:t,fieldState:n}){var u;let{id:r,label:a,placeholder:p}=t,{error:s}=n,d=l(i(i(i({id:r},o),p?{placeholder:p}:{}),Ne),{"aria-invalid":!!s,value:(u=o.value)!=null?u:""});return jsxRuntime.jsxs(y,{part:"field",children:[jsxRuntime.jsx(Mo,{id:r,required:!!t.required,children:a}),e(d),jsxRuntime.jsx(tr,{error:s})]})}function Oe(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 Di=Eo__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsxs(y,{as:"label",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",htmlFor:o,justifyContent:"space-between",part:"field-radio",px:4,py:2,children:[jsxRuntime.jsx(F.Body2,{part:"field-radio-label",children:e}),jsxRuntime.jsx(De__namespace.Item,{id:o,value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(y,{as:"button",backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",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},io),{children:jsxRuntime.jsx(Oe,{height:"14",width:"14"})}))})})]}));function Vo(e){let{field:{onChange:o,value:t},fieldData:{options:n=[]}}=e,r=n.map(({label:a,value:p})=>jsxRuntime.jsx(Di,{value:p,label:a},p));return jsxRuntime.jsx(Y,l(i({},e),{children:()=>jsxRuntime.jsx(De__namespace.Root,{value:t,onValueChange:o,asChild:!0,children:jsxRuntime.jsx(S.Column,{gap:2,part:"field-radio-group",children:r})})}))}function ao(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 lr(e){let{field:{onChange:o,value:t},fieldData:{options:n=[]}}=e,[r,a]=Eo__namespace.useState([]);function p(s){let d=[];r.includes(s)?d=[...r.filter(u=>u!==s)]:d=[...r,s],a(d),o(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(so__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(so__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(y,l(i({},io),{children:jsxRuntime.jsx(Oe,{height:"14",width:"14"})}))})})]})},d))})}))}var $i=Eo__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsx(N__namespace.Item,{value:o,ref:t,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 Lo(e){let{field:{onChange:o,value:t},fieldData:{options:n=[],placeholder:r}}=e,a=n.map(({label:p,value:s})=>jsxRuntime.jsx($i,{value:s,label:p},s));return e.fieldData.multiple?jsxRuntime.jsx(lr,i({},e)):jsxRuntime.jsx(Y,l(i({},e),{children:()=>jsxRuntime.jsxs(N__namespace.Root,{value:t,onValueChange:o,children:[jsxRuntime.jsx(N__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(F.Body2,l(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:ao,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({},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 No(e){return jsxRuntime.jsx(Y,l(i({},e),{children:o=>jsxRuntime.jsx(F.Body2,i({as:"input",part:"field-text",type:"text"},o))}))}function _o(e){return jsxRuntime.jsx(Y,l(i({},e),{children:o=>jsxRuntime.jsx(F.Body2,i({as:"textarea",part:"field-textarea"},o))}))}function mr(e){let{field:{onChange:o,value:t},fieldData:{options:n,label:r,id:a=[]}}=e;return jsxRuntime.jsxs(y,{part:"field",display:"flex",gap:2,alignItems:"center",children:[jsxRuntime.jsx(so__namespace.Root,{defaultChecked:!0,onCheckedChange:o,value:t,checked:t===!0,asChild:!0,children:jsxRuntime.jsx(y,l(i({},Wo),{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(so__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(y,{width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center",children:jsxRuntime.jsx(Oe,{height:"14",fill:"currentColor"})})})}))}),jsxRuntime.jsx(F.Body2,{part:"field-checkbox-label",as:"label",htmlFor:a,children:r})]})}var Mi={checkbox:mr,radio:Vo,select:Lo,text:No,textarea:_o};function He(r){var a=r,{fieldTypes:e={},flowId:o,part:t}=a,n=f(a,["fieldTypes","flowId","part"]);let p=Object.assign({},Mi,e);return jsxRuntime.jsx(z,l(i({flowId:o,part:["form",t]},n),{children:s=>jsxRuntime.jsx(or,i({fieldTypes:p},s))}))}var co={};ie(co,{NPS:()=>ze});function yr({field:e,fieldData:o,submit:t}){var r,a;let n=[...Array(11)].map((p,s)=>{let d=e.value===s?D.Primary:D.Secondary;return jsxRuntime.jsx(d,{borderWidth:"1px",onClick:()=>{e.onChange(s),t();},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=o.negativeLabel)!=null?r:"Not likely at all"}),jsxRuntime.jsx(F.Caption,{part:"field-nps-right-label",color:"neutral.400",children:(a=o.positiveLabel)!=null?a:"Extremely likely"})]})]})}function ze(a){var p=a,{as:e=H,flowId:o,fieldTypes:t,part:n}=p,r=f(p,["as","flowId","fieldTypes","part"]);var d;let{flow:s}=we(o);return jsxRuntime.jsx(He,l(i({alignSelf:"end",as:e,flowId:o,fieldTypes:i({nps:yr},t),modal:!1,onEscapeKeyDown:u=>{typeof r.onEscapeKeyDown=="function"&&r.onEscapeKeyDown(u),u.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"}}}),(d=r.css)!=null?d:{}))}))}function Li(r,n){var a=r,{children:e,part:o}=a,t=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",o],position:"absolute"},t),{children:e}))})}var uo=Eo__namespace.forwardRef(Li);var _i=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function Pr(n){var r=n,{clickable:e=!1,part:o=""}=r,t=f(r,["clickable","part"]);return jsxRuntime.jsxs(y,l(i({borderRadius:"24px",height:"24px",part:`ping-wrapper ${o}`,position:"relative",width:"24px",cursor:e?"pointer":void 0},t),{children:[jsxRuntime.jsx(y,{backgroundColor:"primary.surface",animation:`2s ease-out infinite ${_i}`,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 Xi({maxX:e,maxY:o,radius:t,x1:n,x2:r,y1:a,y2:p}){return t>0?`path("${[`M${n+t},${a}`,`H${r-t}`,`A${t} ${t} 0,0,1 ${r} ${a+t}`,`V${p-t}`,`A${t} ${t} 0,0,1 ${r-t} ${p}`,`H${n+t}`,`A${t} ${t} 0,0,1 ${n} ${p-t}`,`V${o}`,`H${e}`,"V0","H0",`V${o}`,`H${n}`,`V${a+t}`,`A${t} ${t} 0,0,1 ${n+t} ${a}`,"Z"].join(" ")}")`:`path("M${n},${a} H${r} V${p} H${n} V${o} H${e} V0 H0 V${o} H${n} Z")`}function Ji(e){if(!window||!("nodeType"in e))return 0;let o=Number(window.getComputedStyle(e).borderRadius.replace(/\D/g,""));return Number.isNaN(o)?0:o}function zo(r){var a=r,{anchor:e,part:o,style:t={}}=a,n=f(a,["anchor","part","style"]);let[p,s]=Eo.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:Ji(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 Eo.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(uo,i({part:["spotlight",o],ref:d.setFloating,style:i({clipPath:Xi(p)},t)},n))}function Cr({align:e,side:o}){let t={},n="-12px",r={top:"bottom",right:"left",bottom:"top",left:"right"};return t[r[o]]=n,["before","end"].includes(e)?["top","bottom"].includes(o)?t.right=n:t.bottom=n:["after","start"].includes(e)?["top","bottom"].includes(o)?t.left=n:t.top=n:["top","bottom"].includes(o)?t.left=`calc(50% + ${n})`:t.top=`calc(50% + ${n})`,t}function wr(e,o){try{if(e.matches(o)&&Fr(e))return e;let t=e.querySelectorAll(o);if(t.length>0&&Fr(t[0]))return t[0]}catch(t){return null}}function Fr(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function vr(e){let[o,t]=Eo.useState(null);return Eo.useEffect(()=>{try{let n=document.querySelector(e);n!=null&&t(n);}catch(n){}},[e]),Eo.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=wr(p,e);if(s!=null){t(s);break}}for(let p of a.removedNodes){if(p.nodeType!==Node.ELEMENT_NODE)continue;if(wr(p,e)!=null){t(null);break}}}});return n.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>n.disconnect()},[e]),{anchorElement:o}}function la(e){switch(e){case"after":return "end";case"before":return "start";default:return e}}function Rr({align:e,alignOffset:o,anchor:t,onOpenChange:n=()=>{},open:r,side:a,sideOffset:p}){let s=`${a}-${la(e)}`;function d({rects:R}){let k={alignmentAxis:o,mainAxis:p};return ["after","before"].includes(e)&&(["bottom","top"].includes(a)?k.alignmentAxis=o-R.floating.width:k.alignmentAxis=o-R.floating.height),k}let{context:u,floatingStyles:m,placement:g,refs:b}=react$1.useFloating({middleware:[react$1.offset(d,[e,o,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}=vr(t);Eo.useEffect(()=>{P!=null?b.setReference(P):console.debug(`[frigade] Hint: No anchor found for selector: ${t}`);},[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 Go(T){var v=T,{align:e="center",alignOffset:o=0,anchor:t,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]=Eo.useState(r),P=s!=null?s:B,{getFloatingProps:C,getReferenceProps:R,floatingStyles:k,placement:$,refs:L}=Rr({align:e,alignOffset:o,anchor:t,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(zo,{anchor:t}),a&&!g&&P&&jsxRuntime.jsx(uo,{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(Pr,l(i({},A),{position:"absolute",style:Cr({align:I,side:E}),clickable:r===!1}))]}))]})}var ua=react.keyframes`
79
+ `,di=()=>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 ci({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(di,{})})})}function Io({children:e}){return jsxRuntime.jsx(ke__namespace.Content,{asChild:!0,children:jsxRuntime.jsxs(S.Column,{css:{'&[data-state="open"]':{animation:`${li} 300ms ease-out`},'&[data-state="closed"]':{animation:`${pi} 300ms ease-out`},overflow:"hidden"},gap:5,part:"collapsible-content",children:[jsxRuntime.jsx(y,{}),e]})})}function Ho(a){var p=a,{children:e,disabled:o=!1,onOpenChange:t=()=>{},open:n=!1}=p,r=f(p,["children","disabled","onOpenChange","open"]);return jsxRuntime.jsx(ke__namespace.Root,{asChild:!0,disabled:o,open:n,onOpenChange:t,children:jsxRuntime.jsx(h,l(i({borderWidth:"md",css:{'&[data-state="open"] .fr-collapsible-step-icon':{transform:"rotate(180deg)"}},gap:0,part:"collapsible-step"},r),{children:e}))})}function $o({isCompleted:e,isBlocked:o,title:t}){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:o?.4:1,disabled:o,pointerEvents:o?"none":"auto",cursor:o?"not-allowed":"pointer",part:"collapsible-header",children:[jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:2,children:[jsxRuntime.jsx(ci,{checked:e}),jsxRuntime.jsx(F.Body2,{fontWeight:"demibold",userSelect:"none",part:"collapsible-title",children:t})]}),jsxRuntime.jsx(y,{as:Xt,color:"neutral.100",css:{"& path":{vectorEffect:"non-scaling-stroke"}},display:"block",height:"16px",order:2,part:"collapsible-step-icon",width:"16px"})]})})}var qt=ko.createContext({onPrimary:()=>{},onSecondary:()=>{},openStepId:null,setOpenStepId:()=>{},stepTypes:{}});function Zt({handlePrimary:e,handleSecondary:o,open:t,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(Ho,l(i({open:t,onOpenChange:n},b),{children:[jsxRuntime.jsx($o,{isBlocked:r.$state.blocked,isCompleted:p||s,title:u}),jsxRuntime.jsxs(Io,{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:o}),jsxRuntime.jsx(h.Primary,{disabled:x,title:m,onClick:e})]})]})]}))}var gi={default:Zt};function yi(n){var r=n,{flow:e,step:o}=r,t=f(r,["flow","step"]);var v;let{onPrimary:a,onSecondary:p,openStepId:s,setOpenStepId:d,stepTypes:u}=ko.useContext(qt),{handlePrimary:m,handleSecondary:g}=le(o,{onPrimary:a,onSecondary:p}),b=(s!=null?s:e.getCurrentStep().id)===o.id,x=(v=u[o.type])!=null?v:Zt;function T(B){return M(this,null,function*(){d(B?o.id:""),B&&!o.$state.completed&&(yield o.start(),d(null));})}return jsxRuntime.jsx(x,l(i({flow:e,onOpenChange:T,open:b,step:o},t),{handlePrimary:m,handleSecondary:g}),o.id)}function to(s){var d=s,{dismissible:e,flowId:o,onPrimary:t,onSecondary:n,part:r,stepTypes:a={}}=d,p=f(d,["dismissible","flowId","onPrimary","onSecondary","part","stepTypes"]);let[u,m]=ko.useState(null),g=i(i({},gi),a);return jsxRuntime.jsx(qt.Provider,{value:{openStepId:u,setOpenStepId:m,onPrimary:t,onSecondary:n,stepTypes:g},children:jsxRuntime.jsx(_,l(i({as:h,borderWidth:"md",flowId:o,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(yi,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(Re,{current:C,total:R,flexGrow:1})]})]}),P]})}}))})}var vi=new Set(["required","min","max","minLength","maxLength","pattern"]);function Ri({fieldComponent:e,control:o,fieldData:t,submit:n}){let r=reactHookForm.useFormContext();t.pattern!=null&&(typeof t.pattern=="string"?t.pattern=new RegExp(t.pattern.replace(/^\/|\/$/g,"")):typeof t.pattern=="object"&&typeof t.pattern.value=="string"&&(t.pattern.value=new RegExp(t.pattern.value.replace(/^\/|\/$/g,""))));let a=Object.fromEntries(Object.entries(t).filter(([s])=>vi.has(s))),p=reactHookForm.useController({name:t.id,control:o,rules:a});return jsxRuntime.jsx(e,l(i({},p),{fieldData:t,formContext:r,submit:n}))}function er({fieldTypes:e,handleDismiss:o,handlePrimary:t,handleSecondary:n,parentProps:{dismissible:r},step:a}){var C,R,k,$,L;let{__readOnly:p}=ko.useContext(V),s=ko.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},{})});ko.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]=ko.useState(!1),g=[],{control:b,handleSubmit:x}=d,T=(C=a.props)!=null?C:{};function v(E,I){m(!0),t(I,E,p===!0).then(()=>m(!1));}s.forEach(E=>{e[E.type]!=null&&g.push(jsxRuntime.jsx(Ri,{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 ko.useEffect(()=>{d.clearErrors();},[a]),jsxRuntime.jsxs(S.Column,l(i({gap:5,part:"form-step"},T),{children:[jsxRuntime.jsx(h.Header,{dismissible:r,handleDismiss:o,part:"form-step-header",subtitle:a.subtitle,title:a.title}),jsxRuntime.jsx(reactHookForm.FormProvider,l(i({},d),{children:g})),jsxRuntime.jsxs(S.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[w&&jsxRuntime.jsx(D.Secondary,{onClick:n,title:w}),jsxRuntime.jsx(D.Primary,{disabled:P||u,onClick:x(v),title:B!=null?B:"Submit",loading:u})]},`form-footer-${a.id}`)]}))}function or({error:e}){var o;return (o=e==null?void 0:e.message)!=null&&o.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 Ao({children:e,id:o,required:t=!1}){return jsxRuntime.jsxs(F.Body2,{as:"label",htmlFor:o,part:"field-label",fontWeight:"medium",mb:"2",display:"block",children:[e,jsxRuntime.jsx(y,{part:"field-label-required",display:"inline",children:t&&"*"})]})}var Mo={backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md"},Ne=l(i({},Mo),{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:o,fieldData:t,fieldState:n}){var u;let{id:r,label:a,placeholder:p}=t,{error:s}=n,d=l(i(i(i({id:r},o),p?{placeholder:p}:{}),Ne),{"aria-invalid":!!s,value:(u=o.value)!=null?u:""});return jsxRuntime.jsxs(y,{part:"field",children:[jsxRuntime.jsx(Ao,{id:r,required:!!t.required,children:a}),e(d),jsxRuntime.jsx(or,{error:s})]})}function Oe(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 Oi=ko__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsxs(y,{as:"label",backgroundColor:"neutral.background",borderColor:"neutral.border",borderRadius:"md",borderStyle:"solid",borderWidth:"md",display:"flex",htmlFor:o,justifyContent:"space-between",part:"field-radio",px:4,py:2,children:[jsxRuntime.jsx(F.Body2,{part:"field-radio-label",children:e}),jsxRuntime.jsx(De__namespace.Item,{id:o,value:o,ref:t,asChild:!0,children:jsxRuntime.jsx(y,{as:"button",backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",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},no),{children:jsxRuntime.jsx(Oe,{height:"14",width:"14"})}))})})]}));function Wo(e){let{field:{onChange:o,value:t},fieldData:{options:n=[]}}=e,r=n.map(({label:a,value:p})=>jsxRuntime.jsx(Oi,{value:p,label:a},p));return jsxRuntime.jsx(Y,l(i({},e),{children:()=>jsxRuntime.jsx(De__namespace.Root,{value:t,onValueChange:o,asChild:!0,children:jsxRuntime.jsx(S.Column,{gap:2,part:"field-radio-group",children:r})})}))}function io(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 sr(e){let{field:{onChange:o,value:t},fieldData:{options:n=[]}}=e,[r,a]=ko__namespace.useState([]);function p(s){let d=[];r.includes(s)?d=[...r.filter(u=>u!==s)]:d=[...r,s],a(d),o(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(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(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(ao__namespace.Indicator,{asChild:!0,children:jsxRuntime.jsx(y,l(i({},no),{children:jsxRuntime.jsx(Oe,{height:"14",width:"14"})}))})})]})},d))})}))}var Hi=ko__namespace.forwardRef(({label:e,value:o},t)=>jsxRuntime.jsx(N__namespace.Item,{value:o,ref:t,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 Vo(e){let{field:{onChange:o,value:t},fieldData:{options:n=[],placeholder:r}}=e,a=n.map(({label:p,value:s})=>jsxRuntime.jsx(Hi,{value:s,label:p},s));return e.fieldData.multiple?jsxRuntime.jsx(sr,i({},e)):jsxRuntime.jsx(Y,l(i({},e),{children:()=>jsxRuntime.jsxs(N__namespace.Root,{value:t,onValueChange:o,children:[jsxRuntime.jsx(N__namespace.Trigger,{asChild:!0,children:jsxRuntime.jsxs(F.Body2,l(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,l(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 Lo(e){return jsxRuntime.jsx(Y,l(i({},e),{children:o=>jsxRuntime.jsx(F.Body2,i({as:"input",part:"field-text",type:"text"},o))}))}function No(e){return jsxRuntime.jsx(Y,l(i({},e),{children:o=>jsxRuntime.jsx(F.Body2,i({as:"textarea",part:"field-textarea"},o))}))}function ur(e){let{field:{onChange:o,value:t},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:o,value:t,checked:t===!0,asChild:!0,children:jsxRuntime.jsx(y,l(i({},Mo),{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(Oe,{height:"14",fill:"currentColor"})})})}))}),jsxRuntime.jsx(F.Body2,{part:"field-checkbox-label",as:"label",htmlFor:a,children:r})]})}var Ai={checkbox:ur,radio:Wo,select:Vo,text:Lo,textarea:No};function He(r){var a=r,{fieldTypes:e={},flowId:o,part:t}=a,n=f(a,["fieldTypes","flowId","part"]);let p=Object.assign({},Ai,e);return jsxRuntime.jsx(_,l(i({flowId:o,part:["form",t]},n),{children:s=>jsxRuntime.jsx(er,i({fieldTypes:p},s))}))}var po={};ie(po,{NPS:()=>_e});function gr({field:e,fieldData:o,submit:t}){var r,a;let n=[...Array(11)].map((p,s)=>{let d=e.value===s?D.Primary:D.Secondary;return jsxRuntime.jsx(d,{borderWidth:"1px",onClick:()=>{e.onChange(s),t();},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=o.negativeLabel)!=null?r:"Not likely at all"}),jsxRuntime.jsx(F.Caption,{part:"field-nps-right-label",color:"neutral.400",children:(a=o.positiveLabel)!=null?a:"Extremely likely"})]})]})}function _e(a){var p=a,{as:e=H,flowId:o,fieldTypes:t,part:n}=p,r=f(p,["as","flowId","fieldTypes","part"]);var d;let{flow:s}=we(o);return jsxRuntime.jsx(He,l(i({alignSelf:"end",as:e,flowId:o,fieldTypes:i({nps:gr},t),modal:!1,onEscapeKeyDown:u=>{typeof r.onEscapeKeyDown=="function"&&r.onEscapeKeyDown(u),u.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"}}}),(d=r.css)!=null?d:{}))}))}function Vi(r,n){var a=r,{children:e,part:o}=a,t=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",o],position:"absolute"},t),{children:e}))})}var co=ko__namespace.forwardRef(Vi);var Ni=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function br(n){var r=n,{clickable:e=!1,part:o=""}=r,t=f(r,["clickable","part"]);return jsxRuntime.jsxs(y,l(i({borderRadius:"24px",height:"24px",part:`ping-wrapper ${o}`,position:"relative",width:"24px",cursor:e?"pointer":void 0},t),{children:[jsxRuntime.jsx(y,{backgroundColor:"primary.surface",animation:`2s ease-out infinite ${Ni}`,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 ji({maxX:e,maxY:o,radius:t,x1:n,x2:r,y1:a,y2:p}){return t>0?`path("${[`M${n+t},${a}`,`H${r-t}`,`A${t} ${t} 0,0,1 ${r} ${a+t}`,`V${p-t}`,`A${t} ${t} 0,0,1 ${r-t} ${p}`,`H${n+t}`,`A${t} ${t} 0,0,1 ${n} ${p-t}`,`V${o}`,`H${e}`,"V0","H0",`V${o}`,`H${n}`,`V${a+t}`,`A${t} ${t} 0,0,1 ${n+t} ${a}`,"Z"].join(" ")}")`:`path("M${n},${a} H${r} V${p} H${n} V${o} H${e} V0 H0 V${o} H${n} Z")`}function Xi(e){if(!window||!("nodeType"in e))return 0;let o=Number(window.getComputedStyle(e).borderRadius.replace(/\D/g,""));return Number.isNaN(o)?0:o}function zo(r){var a=r,{anchor:e,part:o,style:t={}}=a,n=f(a,["anchor","part","style"]);let[p,s]=ko.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:Xi(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 ko.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",o],ref:d.setFloating,style:i({clipPath:ji(p)},t)},n))}function Pr({align:e,side:o}){let t={},n="-12px",r={top:"bottom",right:"left",bottom:"top",left:"right"};return t[r[o]]=n,["before","end"].includes(e)?["top","bottom"].includes(o)?t.right=n:t.bottom=n:["after","start"].includes(e)?["top","bottom"].includes(o)?t.left=n:t.top=n:["top","bottom"].includes(o)?t.left=`calc(50% + ${n})`:t.top=`calc(50% + ${n})`,t}function Sr(e,o){try{if(e.matches(o)&&wr(e))return e;let t=e.querySelectorAll(o);if(t.length>0&&wr(t[0]))return t[0]}catch(t){return null}}function wr(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function Fr(e){let[o,t]=ko.useState(null);return ko.useEffect(()=>{try{let n=document.querySelector(e);n!=null&&t(n);}catch(n){}},[e]),ko.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=Sr(p,e);if(s!=null){t(s);break}}for(let p of a.removedNodes){if(p.nodeType!==Node.ELEMENT_NODE)continue;if(Sr(p,e)!=null){t(null);break}}}});return n.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>n.disconnect()},[e]),{anchorElement:o}}function sa(e){switch(e){case"after":return "end";case"before":return "start";default:return e}}function vr({align:e,alignOffset:o,anchor:t,onOpenChange:n=()=>{},open:r,side:a,sideOffset:p}){let s=`${a}-${sa(e)}`;function d({rects:R}){let k={alignmentAxis:o,mainAxis:p};return ["after","before"].includes(e)&&(["bottom","top"].includes(a)?k.alignmentAxis=o-R.floating.width:k.alignmentAxis=o-R.floating.height),k}let{context:u,floatingStyles:m,placement:g,refs:b}=react$1.useFloating({middleware:[react$1.offset(d,[e,o,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}=Fr(t);ko.useEffect(()=>{P!=null?b.setReference(P):console.debug(`[frigade] Hint: No anchor found for selector: ${t}`);},[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 Uo(T){var v=T,{align:e="center",alignOffset:o=0,anchor:t,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]=ko.useState(r),P=s!=null?s:B,{getFloatingProps:C,getReferenceProps:R,floatingStyles:k,placement:$,refs:L}=vr({align:e,alignOffset:o,anchor:t,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(zo,{anchor:t}),a&&!g&&P&&jsxRuntime.jsx(co,{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(br,l(i({},A),{position:"absolute",style:Pr({align:I,side:E}),clickable:r===!1}))]}))]})}var ca=react.keyframes`
82
80
  from {
83
81
  opacity: 0;
84
82
  }
@@ -88,7 +86,7 @@ var it=Object.defineProperty,en=Object.defineProperties;var on=Object.getOwnProp
88
86
  to {
89
87
  opacity: 1;
90
88
  }
91
- `;function mo(v){var B=v,{align:e,alignOffset:o,defaultOpen:t,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(Go,l(i({align:e,alignOffset:o,anchor:x.selector,"data-step-id":x.id,defaultOpen:t,modal:p,part:u,side:m,sideOffset:g,spotlight:b},T),{children:jsxRuntime.jsxs(h,{animation:`${ua} 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:w,title:C})]})]})}))}function kr(e,o,t){let[n,r]=Eo.useState(!1),a=Eo.useRef();return Eo.useEffect(()=>{a.current=typeof o=="string"?document.querySelector(o):o,r(!0);},[]),n?reactDom.createPortal(e,a.current,t):null}function fo(T){var v=T,{align:e="after",alignOffset:o=0,as:t,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 kr(jsxRuntime.jsx(z,l(i({as:t,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:o,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(mo,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 Xe,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=(Xe=Q.props)==null?void 0:Xe.zIndex)!=null?K:k==null?void 0:k.zIndex)!=null?oe:b,Fe=i({align:e,alignOffset:o,dismissible:r,flow:C,handleDismiss:Ae,onPrimary:w,onSecondary:P,part:s,side:u,sideOffset:m,spotlight:g,zIndex:ee},(ne=Q.props)!=null?ne:{});return jsxRuntime.jsx(mo,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 go(){let{frigade:e}=Eo.useContext(V),[,o]=Eo.useState(!1),t,n=Eo.useCallback(p=>{e==null||e.getCollections().then(()=>{p();});let s=()=>{clearTimeout(t),t=setTimeout(()=>{o(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:Eo.useSyncExternalStore(n,r,r)}}function yo(e){var s,d,u,m;let{frigade:o}=Eo.useContext(V),{collections:t}=go(),n=t==null?void 0:t.get(e),a=(m=((u=(d=(s=t==null?void 0:t.get(e))==null?void 0:s.flows)==null?void 0:d.filter(g=>g.visible).map(g=>l(i({},g),{flow:o==null?void 0:o.getFlowSync(g.flowId)})))!=null?u:[]).find(({flow:g})=>g.isVisible))==null?void 0:m.flowId,{flow:p}=we(a);return Eo.useEffect(()=>{o==null||o.registerCollection(e);},[e]),{collection:n,currentFlow:p}}function jo(r){var a=r,{collectionId:e,part:o,variables:t={}}=a,n=f(a,["collectionId","part","variables"]);var u,m,g;let p={ANNOUNCEMENT:Xo,BANNER:Oo,CARD:h,CHECKLIST:ro,EMBEDDED_TIP:h,FORM:He,NPS_SURVEY:ze,SURVEY:ze,TOUR:fo},{currentFlow:s}=yo(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",o],"data-collection-id":e},n),{children:jsxRuntime.jsx(He,{flowId:s.id,as:H,variables:t},s.id)})):jsxRuntime.jsx(y,l(i({part:["collection",o],"data-collection-id":e},n),{children:jsxRuntime.jsx(d,{flowId:s.id,variables:t},s.id)}))}function Er(){var t,n;let{collections:e}=go(),o=(n=Array.from((t=e==null?void 0:e.entries())!=null?t:[]).find(r=>r[1].collectionType==="DEFAULT"))==null?void 0:n[0];return yo(o),o==null?null:jsxRuntime.jsx(jo,{as:null,collectionId:o})}var V=Eo.createContext({apiKey:"",navigate:()=>{},hasInitialized:!1,registerComponent:()=>{},unregisterComponent:()=>{},variables:{}});function Jo(){let{frigade:e}=Eo.useContext(V);return {frigade:e,isLoading:!(e!=null&&e.isReady())}}function Or(){let{frigade:e}=Jo();return Eo.useEffect(()=>{M(this,null,function*(){(yield e.getFlows()).forEach(t=>{t.steps.forEach(n=>{if(n.imageUri){let r=new Image;r.src=n.imageUri;}});});});},[]),null}var Dr="2.5.14";function Ar(p){var s=p,{children:e,css:o={},defaultCollection:t=!0,navigate:n,theme:r}=s,a=f(s,["children","css","defaultCollection","navigate","theme"]);let d=r?vo(r):{},u=Eo.useRef(new Map),m=Eo.useRef(),[g,b]=Eo.useState(!1),x=Eo.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:Dr,__platformName:"React"})),[a.userId,a.groupId,a.apiKey]);Eo.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 Eo.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({},Ro),d),o)}}),jsxRuntime.jsxs(react.ThemeProvider,{theme:O,children:[t&&jsxRuntime.jsx(Er,{}),e]}),a.preloadImages!==!1&&jsxRuntime.jsx(Or,{})]})}function we(e,o){let{frigade:t,variables:n}=Eo.useContext(V),[,r]=Eo.useState(!1),a=Eo.useCallback(s=>{t==null||t.getFlow(e).then(()=>{s();});let d=u=>{u.id===e&&setTimeout(()=>{r(m=>!m),s();},0);};return t==null||t.onStateChange(d),()=>{t==null||t.removeStateChangeHandler(d);}},[e,t]),p=Eo.useSyncExternalStore(a,()=>t==null?void 0:t.getFlowSync(e),()=>t==null?void 0:t.getFlowSync(e));return p==null||p.applyVariables(i(i({},n),o==null?void 0:o.variables)),{flow:p,isLoading:t!=null&&t.hasFailedToLoad()?!1:!p}}function Zo(e,{onComplete:o,onDismiss:t}={}){let n=Eo.useRef(null);return Eo.useEffect(()=>{if(e==null)return;function r(){return M(this,null,function*(){e.isCompleted&&n.current===!1&&(yield o==null?void 0:o(e));})}return r(),n.current=e==null?void 0:e.isCompleted,()=>{r();}},[e==null?void 0:e.isCompleted]),{handleDismiss:Eo.useCallback(r=>M(this,null,function*(){if((yield t==null?void 0:t(e,r))===!1)return r.preventDefault(),!1;e.skip();}),[e])}}var de=new Set;function Yo(e,o=!0){let t=Eo.useCallback(()=>{de.has(e==null?void 0:e.id)&&de.delete(e==null?void 0:e.id);},[de,o]),n=Eo.useCallback(()=>{o&&(e!=null&&e.isVisible)&&!de.has(e.id)&&de.add(e.id);},[de,o]);Eo.useEffect(()=>()=>{t();},[]),Eo.useEffect(()=>{n();let a=()=>{t();};return window.addEventListener("popstate",a),window.addEventListener("beforeunload",a),()=>{t(),window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",a);}},[n,t]),e!=null&&e.isVisible?n():t();let r=de.size>0?de.values().next().value:null;return {isCurrentModal:o?r===(e==null?void 0:e.id)||de.size==0:!0}}function z(u){var m=u,{as:e,children:o,flowId:t,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}=we(t,{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}=Zo(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}=Yo(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?Eo.Fragment:e!=null?e:y,L=l(i({},T),{"data-flow-id":g.id});return jsxRuntime.jsx($,l(i({},e===null?{}:L),{children:o({flow:g,handleDismiss:B,handlePrimary:w,handleSecondary:P,parentProps:{dismissible:b,flowId:t,variables:s,containerProps:L},step:v})}))}function Nr(t){var n=t,{part:e}=n,o=f(n,["part"]);return jsxRuntime.jsx(z,l(i({as:h,gap:5,borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",part:["card",e]},o),{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 ho(n){var r=n,{part:e,src:o}=r,t=f(r,["part","src"]);return jsxRuntime.jsx(y,i({as:"img",maxWidth:"unset",part:["image",e],src:o},t))}function Ua(e){var o,t,n,r,a;return e.includes("youtube")?`https://www.youtube.com/embed/${(o=e.split("v=")[1])==null?void 0:o.split("&")[0]}`:e.includes("youtu.be")?`https://www.youtube.com/embed/${(t=e.split("youtu.be/")[1])==null?void 0:t.split("&")[0]}`:e.includes("vimeo")?`https://player.vimeo.com/video/${(n=e.split("vimeo.com/")[1])==null?void 0:n.split("&")[0]}`:e.includes("wistia")?`https://fast.wistia.net/embed/iframe/${(r=e.split("wistia.com/medias/")[1])==null?void 0:r.split("&")[0]}`:e.includes("loom")?`https://loom.com/embed/${(a=e.split("loom.com/share/")[1])==null?void 0:a.split("&")[0]}?hideEmbedTopBar=true&hide_title=true&hide_share=true&hide_owner=true`:null}function bo(n){var r=n,{part:e,src:o}=r,t=f(r,["part","src"]);let a=Ua(o);return a?jsxRuntime.jsx(y,i({allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,as:"iframe",backgroundColor:"neutral.100",borderWidth:"0",part:["video",e],src:a},t)):o!=null&&o.endsWith(".mp4")?jsxRuntime.jsx(y,i({as:"video",controls:!0,part:["video",e],src:o},t)):(console.error(`Could not map videoUri ${o} to a known provider (Youtube, Vimeo, Wistia, Loom) or valid mp4 file.`),null)}function ye(n){var r=n,{src:e,type:o}=r,t=f(r,["src","type"]);return jsxRuntime.jsx(o==="video"?bo:ho,i({src:e},t))}var h=Eo__namespace.forwardRef((a,r)=>{var p=a,{children:e,flowId:o,part:t}=p,n=f(p,["children","flowId","part"]);var d;if(o!=null)return jsxRuntime.jsx(Nr,i({flowId:o},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",t]},n),{ref:r,children:e}))});h.Dismiss=e=>jsxRuntime.jsx(D.Plain,l(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:o}=r,t=f(r,["children","part"]);return jsxRuntime.jsx(S.Row,l(i({alignItems:"center",gap:3,justifyContent:"flex-end",part:["card-footer",o]},t),{children:e}))};h.Header=p=>{var s=p,{dismissible:e,handleDismiss:o,part:t,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",t]},a),{children:[jsxRuntime.jsx(h.Title,{maxWidth:"calc(100% - 32px)",children:r}),e&&jsxRuntime.jsx(h.Dismiss,{onClick:o,marginLeft:"auto"}),jsxRuntime.jsx(h.Subtitle,{color:"neutral.400",flexBasis:"100%",children:n})]}))};h.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null||(e==null?void 0:e.length)===0?null:jsxRuntime.jsx(ye,i({borderRadius:"md",src:e},o))};h.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsxRuntime.jsx(D.Primary,i({title:o,onClick:e},t))};h.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsxRuntime.jsx(D.Secondary,i({title:o,onClick:e},t))};h.Subtitle=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return e==null?null:jsxRuntime.jsx(F.Body2,l(i({display:"block",color:"neutral.400",part:["subtitle",o]},t),{children:e}))};h.Title=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return e==null?null:jsxRuntime.jsx(F.H4,l(i({display:"block",part:["title",o]},t),{children:e}))};var Po={content:["onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onInteractOutside"],root:["defaultOpen","modal","onOpenChange","open"]};function Ur(e){let o=Object.fromEntries(Po.content.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),t=Object.fromEntries(Po.root.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),n={};for(let r of Object.keys(e))!Po.content.some(a=>a===r)&&!Po.root.some(a=>a===r)&&(n[r]=e[r]);return {contentProps:o,otherProps:n,rootProps:t}}var Xa=react.keyframes`
89
+ `;function uo(v){var B=v,{align:e,alignOffset:o,defaultOpen:t,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(Uo,l(i({align:e,alignOffset:o,anchor:x.selector,"data-step-id":x.id,defaultOpen:t,modal:p,part:u,side:m,sideOffset:g,spotlight:b},T),{children:jsxRuntime.jsxs(h,{animation:`${ca} 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:w,title:C})]})]})}))}function Tr(e,o,t){let[n,r]=ko.useState(!1),a=ko.useRef();return ko.useEffect(()=>{a.current=typeof o=="string"?document.querySelector(o):o,r(!0);},[]),n?reactDom.createPortal(e,a.current,t):null}function mo(T){var v=T,{align:e="after",alignOffset:o=0,as:t,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 Tr(jsxRuntime.jsx(_,l(i({as:t,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:o,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(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:o,dismissible:r,flow:C,handleDismiss:Ae,onPrimary:w,onSecondary:P,part:s,side:u,sideOffset:m,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}=ko.useContext(V),[,o]=ko.useState(!1),t,n=ko.useCallback(p=>{e==null||e.getCollections().then(()=>{p();});let s=()=>{clearTimeout(t),t=setTimeout(()=>{o(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:ko.useSyncExternalStore(n,r,r)}}function go(e){var s,d,u,m;let{frigade:o}=ko.useContext(V),{collections:t}=fo(),n=t==null?void 0:t.get(e),a=(m=((u=(d=(s=t==null?void 0:t.get(e))==null?void 0:s.flows)==null?void 0:d.filter(g=>g.visible).map(g=>l(i({},g),{flow:o==null?void 0:o.getFlowSync(g.flowId)})))!=null?u:[]).find(({flow:g})=>g.isVisible))==null?void 0:m.flowId,{flow:p}=we(a);return ko.useEffect(()=>{o==null||o.registerCollection(e);},[e]),{collection:n,currentFlow:p}}function Ko(r){var a=r,{collectionId:e,part:o,variables:t={}}=a,n=f(a,["collectionId","part","variables"]);var u,m,g;let p={ANNOUNCEMENT:jo,BANNER:Eo,CARD:h,CHECKLIST:to,EMBEDDED_TIP:h,FORM:He,NPS_SURVEY:_e,SURVEY:_e,TOUR:mo},{currentFlow:s}=go(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",o],"data-collection-id":e},n),{children:jsxRuntime.jsx(He,{flowId:s.id,as:H,variables:t},s.id)})):jsxRuntime.jsx(y,l(i({part:["collection",o],"data-collection-id":e},n),{children:jsxRuntime.jsx(d,{flowId:s.id,variables:t},s.id)}))}function kr(){var t,n;let{collections:e}=fo(),o=(n=Array.from((t=e==null?void 0:e.entries())!=null?t:[]).find(r=>r[1].collectionType==="DEFAULT"))==null?void 0:n[0];return go(o),o==null?null:jsxRuntime.jsx(Ko,{as:null,collectionId:o})}var V=ko.createContext({apiKey:"",navigate:()=>{},hasInitialized:!1,registerComponent:()=>{},unregisterComponent:()=>{},variables:{}});function Xo(){let{frigade:e}=ko.useContext(V);return {frigade:e,isLoading:!(e!=null&&e.isReady())}}function Er(){let{frigade:e}=Xo();return ko.useEffect(()=>{M(this,null,function*(){(yield e.getFlows()).forEach(t=>{t.steps.forEach(n=>{if(n.imageUri){let r=new Image;r.src=n.imageUri;}});});});},[]),null}var Or="2.5.15";function $r(p){var s=p,{children:e,css:o={},defaultCollection:t=!0,navigate:n,theme:r}=s,a=f(s,["children","css","defaultCollection","navigate","theme"]);let d=r?Fo(r):{},u=ko.useRef(new Map),m=ko.useRef(),[g,b]=ko.useState(!1),x=ko.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:Or,__platformName:"React"})),[a.userId,a.groupId,a.apiKey]);ko.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 ko.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({},vo),d),o)}}),jsxRuntime.jsxs(react.ThemeProvider,{theme:O,children:[t&&jsxRuntime.jsx(kr,{}),e]}),a.preloadImages!==!1&&jsxRuntime.jsx(Er,{})]})}function we(e,o){let{frigade:t,variables:n}=ko.useContext(V),[,r]=ko.useState(!1),a=ko.useCallback(s=>{t==null||t.getFlow(e).then(()=>{s();});let d=u=>{u.id===e&&setTimeout(()=>{r(m=>!m),s();},0);};return t==null||t.onStateChange(d),()=>{t==null||t.removeStateChangeHandler(d);}},[e,t]),p=ko.useSyncExternalStore(a,()=>t==null?void 0:t.getFlowSync(e),()=>t==null?void 0:t.getFlowSync(e));return p==null||p.applyVariables(i(i({},n),o==null?void 0:o.variables)),{flow:p,isLoading:t!=null&&t.hasFailedToLoad()?!1:!p}}function qo(e,{onComplete:o,onDismiss:t}={}){let n=ko.useRef(null);return ko.useEffect(()=>{if(e==null)return;function r(){return M(this,null,function*(){e.isCompleted&&n.current===!1&&(yield o==null?void 0:o(e));})}return r(),n.current=e==null?void 0:e.isCompleted,()=>{r();}},[e==null?void 0:e.isCompleted]),{handleDismiss:ko.useCallback(r=>M(this,null,function*(){if((yield t==null?void 0:t(e,r))===!1)return r.preventDefault(),!1;e.skip();}),[e])}}var de=new Set;function Zo(e,o=!0){let t=ko.useCallback(()=>{de.has(e==null?void 0:e.id)&&de.delete(e==null?void 0:e.id);},[de,o]),n=ko.useCallback(()=>{o&&(e!=null&&e.isVisible)&&!de.has(e.id)&&de.add(e.id);},[de,o]);ko.useEffect(()=>()=>{t();},[]),ko.useEffect(()=>{n();let a=()=>{t();};return window.addEventListener("popstate",a),window.addEventListener("beforeunload",a),()=>{t(),window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",a);}},[n,t]),e!=null&&e.isVisible?n():t();let r=de.size>0?de.values().next().value:null;return {isCurrentModal:o?r===(e==null?void 0:e.id)||de.size==0:!0}}function _(u){var m=u,{as:e,children:o,flowId:t,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}=we(t,{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}=qo(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}=Zo(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?ko.Fragment:e!=null?e:y,L=l(i({},T),{"data-flow-id":g.id});return jsxRuntime.jsx($,l(i({},e===null?{}:L),{children:o({flow:g,handleDismiss:B,handlePrimary:w,handleSecondary:P,parentProps:{dismissible:b,flowId:t,variables:s,containerProps:L},step:v})}))}function Lr(t){var n=t,{part:e}=n,o=f(n,["part"]);return jsxRuntime.jsx(_,l(i({as:h,gap:5,borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",part:["card",e]},o),{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 xo(n){var r=n,{part:e,src:o}=r,t=f(r,["part","src"]);return jsxRuntime.jsx(y,i({as:"img",maxWidth:"unset",part:["image",e],src:o},t))}function _a(e){var o,t,n,r,a;return e.includes("youtube")?`https://www.youtube.com/embed/${(o=e.split("v=")[1])==null?void 0:o.split("&")[0]}`:e.includes("youtu.be")?`https://www.youtube.com/embed/${(t=e.split("youtu.be/")[1])==null?void 0:t.split("&")[0]}`:e.includes("vimeo")?`https://player.vimeo.com/video/${(n=e.split("vimeo.com/")[1])==null?void 0:n.split("&")[0]}`:e.includes("wistia")?`https://fast.wistia.net/embed/iframe/${(r=e.split("wistia.com/medias/")[1])==null?void 0:r.split("&")[0]}`:e.includes("loom")?`https://loom.com/embed/${(a=e.split("loom.com/share/")[1])==null?void 0:a.split("&")[0]}?hideEmbedTopBar=true&hide_title=true&hide_share=true&hide_owner=true`:null}function ho(n){var r=n,{part:e,src:o}=r,t=f(r,["part","src"]);let a=_a(o);return a?jsxRuntime.jsx(y,i({allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,as:"iframe",backgroundColor:"neutral.100",borderWidth:"0",part:["video",e],src:a},t)):o!=null&&o.endsWith(".mp4")?jsxRuntime.jsx(y,i({as:"video",controls:!0,part:["video",e],src:o},t)):(console.error(`Could not map videoUri ${o} to a known provider (Youtube, Vimeo, Wistia, Loom) or valid mp4 file.`),null)}function ye(n){var r=n,{src:e,type:o}=r,t=f(r,["src","type"]);return jsxRuntime.jsx(o==="video"?ho:xo,i({src:e},t))}var h=ko__namespace.forwardRef((a,r)=>{var p=a,{children:e,flowId:o,part:t}=p,n=f(p,["children","flowId","part"]);var d;if(o!=null)return jsxRuntime.jsx(Lr,i({flowId:o},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",t]},n),{ref:r,children:e}))});h.Dismiss=e=>jsxRuntime.jsx(D.Plain,l(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:o}=r,t=f(r,["children","part"]);return jsxRuntime.jsx(S.Row,l(i({alignItems:"center",gap:3,justifyContent:"flex-end",part:["card-footer",o]},t),{children:e}))};h.Header=p=>{var s=p,{dismissible:e,handleDismiss:o,part:t,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",t]},a),{children:[jsxRuntime.jsx(h.Title,{maxWidth:"calc(100% - 32px)",children:r}),e&&jsxRuntime.jsx(h.Dismiss,{onClick:o,marginLeft:"auto"}),jsxRuntime.jsx(h.Subtitle,{color:"neutral.400",flexBasis:"100%",children:n})]}))};h.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null||(e==null?void 0:e.length)===0?null:jsxRuntime.jsx(ye,i({borderRadius:"md",src:e},o))};h.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsxRuntime.jsx(D.Primary,i({title:o,onClick:e},t))};h.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsxRuntime.jsx(D.Secondary,i({title:o,onClick:e},t))};h.Subtitle=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return e==null?null:jsxRuntime.jsx(F.Body2,l(i({display:"block",color:"neutral.400",part:["subtitle",o]},t),{children:e}))};h.Title=n=>{var r=n,{children:e,part:o}=r,t=f(r,["children","part"]);return e==null?null:jsxRuntime.jsx(F.H4,l(i({display:"block",part:["title",o]},t),{children:e}))};var bo={content:["onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onInteractOutside"],root:["defaultOpen","modal","onOpenChange","open"]};function _r(e){let o=Object.fromEntries(bo.content.map(r=>[r,e[r]]).filter(r=>r[1]!==void 0)),t=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:o,otherProps:n,rootProps:t}}var ja=react.keyframes`
92
90
  from {
93
91
  opacity: 0;
94
92
  }
@@ -98,7 +96,7 @@ var it=Object.defineProperty,en=Object.defineProperties;var on=Object.getOwnProp
98
96
  to {
99
97
  opacity: 1;
100
98
  }
101
- `;function H(r){var a=r,{children:e,className:o,modal:t=!0}=a,n=f(a,["children","className","modal"]);let{rootProps:p,contentProps:s,otherProps:m}=Ur(n),g=m,{zIndex:d}=g,u=f(g,["zIndex"]);return jsxRuntime.jsx(j__namespace.Root,l(i({defaultOpen:!0,modal:t},p),{children:jsxRuntime.jsx(j__namespace.Portal,{children:jsxRuntime.jsxs(y,{animation:`${Xa} 300ms ease-out`,className:o,display:"grid",inset:"0",padding:"6",part:"dialog-wrapper",pointerEvents:"none",position:"fixed",zIndex:d!=null?d:10,children:[t&&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(D.Plain,l(i({part:"close",position:"absolute",right:"2px",top:"2px"},e),{children:jsxRuntime.jsx(ve,{height:"20",fill:"currentColor"})}))});H.Subtitle=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(j__namespace.Description,{asChild:!0,children:jsxRuntime.jsx(F.Body2,l(i({part:"subtitle"},o),{children:e}))})};H.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null?null:jsxRuntime.jsx(ye,i({borderRadius:"md",src:e},o))};H.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(D.Primary,i({title:o,onClick:e},t))};H.ProgressDots=({current:e,total:o})=>{if(o==1)return null;let t=[...Array(o)].map((n,r)=>jsxRuntime.jsx(y,{as:"circle",r:4,cx:4+16*r,cy:"4px",fill:e===r?O.colors.primary.surface:O.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*o-8} 8`,width:16*o-8,children:t})};H.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(D.Secondary,i({title:o,onClick:e},t))};H.Title=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(j__namespace.Title,{asChild:!0,children:jsxRuntime.jsx(F.H4,l(i({part:"title"},o),{children:e}))})};H.displayName="Dialog";var Gr=["dismissible","flowId","forceMount","onComplete","onDismiss","onPrimary","onSecondary","variables"];function Xo(n){var r=n,{flowId:e,part:o}=r,t=f(r,["flowId","part"]);let a=Object.fromEntries(Object.entries(t).filter(([s])=>Gr.some(d=>s===d))),p=Object.fromEntries(Object.entries(t).filter(([s])=>Gr.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",o],textAlign:"center"},g),p),{onEscapeKeyDown:E=>{if(t.dismissible===!1){E.preventDefault();return}typeof t.onEscapeKeyDown=="function"&&t.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 et(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Co(...e){let o=e.shift(),t=e.length===1?e[0]:Co(...e);if(!et(o)||!et(t))throw new Error("deepmerge can only merge Objects");let n=Ge__default.default(o);return Object.entries(t).forEach(([r,a])=>{et(a)?n[r]!==void 0?Object.assign(n,{[r]:Co(n[r],Ge__default.default(a))}):Object.assign(n,{[r]:Ge__default.default(a)}):Array.isArray(a)?n[r]!==void 0?Object.assign(n,{[r]:[...n[r],...Ge__default.default(a)]}):Object.assign(n,{[r]:Ge__default.default(a)}):Object.assign(n,{[r]:a});}),n}function qa(...e){for(let o of e)if(o!=null&&o.length>0)return o;return null}function Za(t){var n=t,{title:e}=n,o=f(n,["title"]);return jsxRuntime.jsx(z,l(i({as:null},o),{children:({flow:r,parentProps:{containerProps:a},step:p})=>{var g,b,x;let s=qa(e,r.title,p.title),d=(g=r==null?void 0:r.getNumberOfCompletedSteps())!=null?g:0,u=(b=r==null?void 0:r.getNumberOfAvailableSteps())!=null?b:1,m=a.onClick!=null;return m&&(a.css=Co({"&:hover":{backgroundColor:"var(--fr-colors-neutral-hover-background)"}},(x=a.css)!=null?x:{})),jsxRuntime.jsxs(h,l(i({"aria-label":"Progress Badge",borderWidth:"md",cursor:m?"pointer":"auto",gap:"",p:"3 2",part:"progress-badge",role:"complementary"},a),{children:[jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:"2",part:"progress-badge-header",children:[jsxRuntime.jsx(h.Title,{children:s}),jsxRuntime.jsx(y,{as:ao,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(oo,{current:d,flexGrow:"1",total:u})]})]}))}}))}function So(){let e="DOMRect"in globalThis?new DOMRect:{height:0,width:0,x:0,y:0,bottom:0,top:0,right:0,left:0,toJSON:()=>{}},[o,t]=Eo.useState(e),[n,r]=Eo.useState(null),a=Eo.useCallback(p=>{r(p);},[]);return Eo.useLayoutEffect(()=>{if(!n)return;let p=()=>{let s=n.getBoundingClientRect();t(s);};return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[n]),{node:n,rect:o,ref:a}}var os=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,{style:e={},part:o=""}=r,t=f(r,["style","part"]);return jsxRuntime.jsxs(y,l(i({part:`dot-wrapper ${o}`,style:i({height:"48px",position:"absolute",width:"48px"},e)},t),{children:[jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"dot-pulse",css:{animation:`2s ease-out infinite ${os}`,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 Jr({props:e,alignAttr:o,sideAttr:t}){let n=t!=null?t:"bottom",r={},a=()=>{var u;if(["after","before"].includes(e.align)){if(o=="start")return "before";if(o=="end")return "after"}return (u=e.align)!=null?u:"after"},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 wo={content:["align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","forceMount","hideWhenDetached","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenAutoFocus","onPointerDownOutside","side","sideOffset","sticky"],root:["modal","onOpenChange"]};function qr(e,o){var a,p,s,d,u;let t=Object.fromEntries(wo.content.map(m=>[m,e[m]]).filter(m=>m[1]!==void 0)),n=Object.fromEntries(wo.root.map(m=>[m,e[m]]).filter(m=>m[1]!==void 0)),r={};for(let m of Object.keys(e))!wo.content.includes(m)&&!wo.root.includes(m)&&(r[m]=e[m]);if(t.align=(a=t.align)!=null?a:"after",t.side=(p=t.side)!=null?p:"bottom",["before","after"].includes(t.align)){let m={after:"end",before:"start"},g=(w,P)=>["top","bottom"].includes(P)?w=="after"?"marginLeft":"marginRight":w=="after"?"marginTop":"marginBottom",b=(s=t.alignOffset)!=null?s:0,x=(d=t.style)!=null?d:{},T=(u=t.side)!=null?u:"bottom",v=t.align;t.style=l(i({},x),{[g(v,T)]:b});let B=["top","bottom"].includes(T)?o.width:o.height;t.alignOffset=(B+b)*-1,t.align=m[v];}return {contentProps:t,otherProps:r,rootProps:n}}var Zr=react.keyframes`
99
+ `;function H(r){var a=r,{children:e,className:o,modal:t=!0}=a,n=f(a,["children","className","modal"]);let{rootProps:p,contentProps:s,otherProps:m}=_r(n),g=m,{zIndex:d}=g,u=f(g,["zIndex"]);return jsxRuntime.jsx(j__namespace.Root,l(i({defaultOpen:!0,modal:t},p),{children:jsxRuntime.jsx(j__namespace.Portal,{children:jsxRuntime.jsxs(y,{animation:`${ja} 300ms ease-out`,className:o,display:"grid",inset:"0",padding:"6",part:"dialog-wrapper",pointerEvents:"none",position:"fixed",zIndex:d!=null?d:10,children:[t&&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(D.Plain,l(i({part:"close",position:"absolute",right:"2px",top:"2px"},e),{children:jsxRuntime.jsx(ve,{height:"20",fill:"currentColor"})}))});H.Subtitle=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(j__namespace.Description,{asChild:!0,children:jsxRuntime.jsx(F.Body2,l(i({part:"subtitle"},o),{children:e}))})};H.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null?null:jsxRuntime.jsx(ye,i({borderRadius:"md",src:e},o))};H.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(D.Primary,i({title:o,onClick:e},t))};H.ProgressDots=({current:e,total:o})=>{if(o==1)return null;let t=[...Array(o)].map((n,r)=>jsxRuntime.jsx(y,{as:"circle",r:4,cx:4+16*r,cy:"4px",fill:e===r?O.colors.primary.surface:O.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*o-8} 8`,width:16*o-8,children:t})};H.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(D.Secondary,i({title:o,onClick:e},t))};H.Title=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return jsxRuntime.jsx(j__namespace.Title,{asChild:!0,children:jsxRuntime.jsx(F.H4,l(i({part:"title"},o),{children:e}))})};H.displayName="Dialog";var Ur=["dismissible","flowId","forceMount","onComplete","onDismiss","onPrimary","onSecondary","variables"];function jo(n){var r=n,{flowId:e,part:o}=r,t=f(r,["flowId","part"]);let a=Object.fromEntries(Object.entries(t).filter(([s])=>Ur.some(d=>s===d))),p=Object.fromEntries(Object.entries(t).filter(([s])=>Ur.indexOf(s)===-1));return jsxRuntime.jsx(_,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",o],textAlign:"center"},g),p),{onEscapeKeyDown:E=>{if(t.dismissible===!1){E.preventDefault();return}typeof t.onEscapeKeyDown=="function"&&t.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 Qo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Po(...e){let o=e.shift(),t=e.length===1?e[0]:Po(...e);if(!Qo(o)||!Qo(t))throw new Error("deepmerge can only merge Objects");let n=structuredClone(o);return Object.entries(t).forEach(([r,a])=>{Qo(a)?n[r]!==void 0?Object.assign(n,{[r]:Po(n[r],structuredClone(a))}):Object.assign(n,{[r]:structuredClone(a)}):Array.isArray(a)?n[r]!==void 0?Object.assign(n,{[r]:[...n[r],...structuredClone(a)]}):Object.assign(n,{[r]:structuredClone(a)}):Object.assign(n,{[r]:a});}),n}function Ja(...e){for(let o of e)if(o!=null&&o.length>0)return o;return null}function qa(t){var n=t,{title:e}=n,o=f(n,["title"]);return jsxRuntime.jsx(_,l(i({as:null},o),{children:({flow:r,parentProps:{containerProps:a},step:p})=>{var g,b,x;let s=Ja(e,r.title,p.title),d=(g=r==null?void 0:r.getNumberOfCompletedSteps())!=null?g:0,u=(b=r==null?void 0:r.getNumberOfAvailableSteps())!=null?b:1,m=a.onClick!=null;return m&&(a.css=Po({"&:hover":{backgroundColor:"var(--fr-colors-neutral-hover-background)"}},(x=a.css)!=null?x:{})),jsxRuntime.jsxs(h,l(i({"aria-label":"Progress Badge",borderWidth:"md",cursor:m?"pointer":"auto",gap:"1",p:"3",part:"progress-badge",role:"complementary"},a),{children:[jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:"2",part:"progress-badge-header",children:[jsxRuntime.jsx(h.Title,{fontSize:"sm",lineHeight:"sm",children:s}),jsxRuntime.jsx(y,{as:io,height:"20px",marginLeft:"auto",marginRight:"-1",transform:"rotate(-90deg)",width:"20px"})]}),jsxRuntime.jsxs(S.Row,{alignItems:"center",gap:"2",part:"progress-badge-footer",children:[jsxRuntime.jsx(Be,{current:d,fontSize:"xs",fontWeight:"medium",lineHeight:"xs",total:u}),jsxRuntime.jsx(eo,{current:d,flexGrow:"1",total:u})]})]}))}}))}function Co(){let e="DOMRect"in globalThis?new DOMRect:{height:0,width:0,x:0,y:0,bottom:0,top:0,right:0,left:0,toJSON:()=>{}},[o,t]=ko.useState(e),[n,r]=ko.useState(null),a=ko.useCallback(p=>{r(p);},[]);return ko.useLayoutEffect(()=>{if(!n)return;let p=()=>{let s=n.getBoundingClientRect();t(s);};return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[n]),{node:n,rect:o,ref:a}}var es=react.keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function jr(n){var r=n,{style:e={},part:o=""}=r,t=f(r,["style","part"]);return jsxRuntime.jsxs(y,l(i({part:`dot-wrapper ${o}`,style:i({height:"48px",position:"absolute",width:"48px"},e)},t),{children:[jsxRuntime.jsx(y,{backgroundColor:"primary.surface",part:"dot-pulse",css:{animation:`2s ease-out infinite ${es}`,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 Xr({props:e,alignAttr:o,sideAttr:t}){let n=t!=null?t:"bottom",r={},a=()=>{var u;if(["after","before"].includes(e.align)){if(o=="start")return "before";if(o=="end")return "after"}return (u=e.align)!=null?u:"after"},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 So={content:["align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","forceMount","hideWhenDetached","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenAutoFocus","onPointerDownOutside","side","sideOffset","sticky"],root:["modal","onOpenChange"]};function Jr(e,o){var a,p,s,d,u;let t=Object.fromEntries(So.content.map(m=>[m,e[m]]).filter(m=>m[1]!==void 0)),n=Object.fromEntries(So.root.map(m=>[m,e[m]]).filter(m=>m[1]!==void 0)),r={};for(let m of Object.keys(e))!So.content.includes(m)&&!So.root.includes(m)&&(r[m]=e[m]);if(t.align=(a=t.align)!=null?a:"after",t.side=(p=t.side)!=null?p:"bottom",["before","after"].includes(t.align)){let m={after:"end",before:"start"},g=(w,P)=>["top","bottom"].includes(P)?w=="after"?"marginLeft":"marginRight":w=="after"?"marginTop":"marginBottom",b=(s=t.alignOffset)!=null?s:0,x=(d=t.style)!=null?d:{},T=(u=t.side)!=null?u:"bottom",v=t.align;t.style=l(i({},x),{[g(v,T)]:b});let B=["top","bottom"].includes(T)?o.width:o.height;t.alignOffset=(B+b)*-1,t.align=m[v];}return {contentProps:t,otherProps:r,rootProps:n}}var qr=react.keyframes`
102
100
  from {
103
101
  opacity: 0;
104
102
  }
@@ -108,47 +106,47 @@ var it=Object.defineProperty,en=Object.defineProperties;var on=Object.getOwnProp
108
106
  to {
109
107
  opacity: 1;
110
108
  }
111
- `;function Yr(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function xe(u){var m=u,{anchor:e,children:o,className:t,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}=So(),{node:T,rect:v,ref:B}=So(),{contentProps:w,otherProps:P,rootProps:C}=qr(d,b),[R,k]=Eo.useState(n),[$,L]=Eo.useState(w.align),[E,I]=Eo.useState(w.side),[A,he]=Eo.useState(0),[Q,Ae]=Eo.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=Eo.useRef(null);if(Eo.useEffect(()=>{let K=document.querySelector(e);K!=null?(B(K),ee.current=K):console.debug(`[frigade] Tooltip: No anchor found for query: ${e}`);},[e]),Eo.useEffect(()=>{function K(ne){if(ne.matches(e))return Yr(ne)?ne:null;let te=ne.querySelectorAll(e);return te.length>0&&Yr(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()},[]),Eo.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 Xe=Jr({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:`${Zr} 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,l(i({},w),{ref:x,children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[ue()&&jsxRuntime.jsx(h,l(i({animation:`${Zr} 300ms ease-out`,boxShadow:"md",position:"relative",className:t,maxWidth:"min(360px, calc(100vw - 25px))",part:["tooltip",a],style:s},P),{children:o})),jsxRuntime.jsx(Xr,{onClick:()=>{k(()=>(typeof C.onOpenChange=="function"&&C.onOpenChange(!ue()),!ue()));},style:Xe})]})}),R)]})})]}))}xe.Close=e=>jsxRuntime.jsx(re__namespace.Close,{"aria-label":"Close",asChild:!0,children:jsxRuntime.jsx(D.Plain,l(i({css:{top:"0px",right:"-6px"},part:"close",position:"absolute"},e),{children:jsxRuntime.jsx(ve,{height:"20",fill:"currentColor"})}))});xe.Media=t=>{var n=t,{src:e}=n,o=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)"},o))};xe.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(D.Primary,i({title:o,onClick:e},t))};xe.Progress=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(F.Body2,l(i({part:"progress"},o),{children:e}))};xe.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(D.Secondary,i({title:o,onClick:e},t))};xe.Subtitle=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(F.Body2,l(i({part:"subtitle"},o),{children:e}))};xe.Title=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(F.H4,l(i({part:"title"},o),{children:e}))};function as(){let{userId:e,frigade:o}=Eo.useContext(V);function t(r){return M(this,null,function*(){yield o.identify(e,r);})}function n(r,a){return M(this,null,function*(){yield o.track(r,a);})}return {userId:e,addProperties:t,track:n}}function ls(){var r;let{frigade:e}=Eo.useContext(V);function o(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 t(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:o,track:t}}
109
+ `;function Zr(e){return e instanceof HTMLElement?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!1}function xe(u){var m=u,{anchor:e,children:o,className:t,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}=Co(),{node:T,rect:v,ref:B}=Co(),{contentProps:w,otherProps:P,rootProps:C}=Jr(d,b),[R,k]=ko.useState(n),[$,L]=ko.useState(w.align),[E,I]=ko.useState(w.side),[A,he]=ko.useState(0),[Q,Ae]=ko.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=ko.useRef(null);if(ko.useEffect(()=>{let K=document.querySelector(e);K!=null?(B(K),ee.current=K):console.debug(`[frigade] Tooltip: No anchor found for query: ${e}`);},[e]),ko.useEffect(()=>{function K(ne){if(ne.matches(e))return Zr(ne)?ne:null;let te=ne.querySelectorAll(e);return te.length>0&&Zr(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()},[]),ko.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=Xr({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:`${qr} 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,l(i({},w),{ref:x,children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[ue()&&jsxRuntime.jsx(h,l(i({animation:`${qr} 300ms ease-out`,boxShadow:"md",position:"relative",className:t,maxWidth:"min(360px, calc(100vw - 25px))",part:["tooltip",a],style:s},P),{children:o})),jsxRuntime.jsx(jr,{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(D.Plain,l(i({css:{top:"0px",right:"-6px"},part:"close",position:"absolute"},e),{children:jsxRuntime.jsx(ve,{height:"20",fill:"currentColor"})}))});xe.Media=t=>{var n=t,{src:e}=n,o=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)"},o))};xe.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(D.Primary,i({title:o,onClick:e},t))};xe.Progress=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(F.Body2,l(i({part:"progress"},o),{children:e}))};xe.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsxRuntime.jsx(D.Secondary,i({title:o,onClick:e},t))};xe.Subtitle=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(F.Body2,l(i({part:"subtitle"},o),{children:e}))};xe.Title=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return e==null?null:jsxRuntime.jsx(F.H4,l(i({part:"title"},o),{children:e}))};function is(){let{userId:e,frigade:o}=ko.useContext(V);function t(r){return M(this,null,function*(){yield o.identify(e,r);})}function n(r,a){return M(this,null,function*(){yield o.track(r,a);})}return {userId:e,addProperties:t,track:n}}function ss(){var r;let{frigade:e}=ko.useContext(V);function o(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 t(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:o,track:t}}
112
110
 
113
111
  exports.FrigadeJS = js__namespace;
114
- exports.Announcement = Xo;
115
- exports.Banner = Oo;
112
+ exports.Announcement = jo;
113
+ exports.Banner = Eo;
116
114
  exports.BaseField = Y;
117
115
  exports.Box = y;
118
116
  exports.Button = D;
119
117
  exports.Card = h;
120
- exports.Checklist = no;
121
- exports.Collection = jo;
118
+ exports.Checklist = ro;
119
+ exports.Collection = Ko;
122
120
  exports.Dialog = H;
123
121
  exports.Flex = S;
124
- exports.Flow = z;
122
+ exports.Flow = _;
125
123
  exports.Form = He;
126
- exports.Hint = Go;
127
- exports.Image = ho;
128
- exports.Label = Mo;
124
+ exports.Hint = Uo;
125
+ exports.Image = xo;
126
+ exports.Label = Ao;
129
127
  exports.Media = ye;
130
128
  exports.Progress = Pe;
131
- exports.ProgressBadge = Za;
132
- exports.Provider = Ar;
133
- exports.RadioField = Vo;
134
- exports.SelectField = Lo;
129
+ exports.ProgressBadge = qa;
130
+ exports.Provider = $r;
131
+ exports.RadioField = Wo;
132
+ exports.SelectField = Vo;
135
133
  exports.Spotlight = zo;
136
- exports.Survey = co;
134
+ exports.Survey = po;
137
135
  exports.Text = F;
138
- exports.TextField = No;
139
- exports.TextareaField = _o;
136
+ exports.TextField = Lo;
137
+ exports.TextareaField = No;
140
138
  exports.Tooltip = xe;
141
- exports.Tour = fo;
142
- exports.Video = bo;
143
- exports.themeVariables = Ro;
144
- exports.tokens = Ze;
145
- exports.useBoundingClientRect = So;
139
+ exports.Tour = mo;
140
+ exports.Video = ho;
141
+ exports.themeVariables = vo;
142
+ exports.tokens = qe;
143
+ exports.useBoundingClientRect = Co;
146
144
  exports.useFlow = we;
147
- exports.useFlowHandlers = Zo;
148
- exports.useFrigade = Jo;
149
- exports.useGroup = ls;
150
- exports.useModal = Yo;
145
+ exports.useFlowHandlers = qo;
146
+ exports.useFrigade = Xo;
147
+ exports.useGroup = ss;
148
+ exports.useModal = Zo;
151
149
  exports.useStepHandlers = le;
152
- exports.useUser = as;
150
+ exports.useUser = is;
153
151
  //# sourceMappingURL=out.js.map
154
152
  //# sourceMappingURL=index.cjs.map