@frigade/react 2.2.4 → 2.2.5

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.js CHANGED
@@ -36,7 +36,7 @@ var So=Object.defineProperty,Kt=Object.defineProperties;var Ut=Object.getOwnProp
36
36
  height: 0;
37
37
  opacity: 0;
38
38
  }
39
- `,Gr=()=>jsx(x,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function Jr({checked:e=!1}){return jsx(x,{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&&jsx(x,{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:jsx(Gr,{})})})}function to({children:e}){return jsx(fe.Content,{asChild:!0,children:jsxs(S.Column,{css:{'&[data-state="open"]':{animation:`${Ur} 300ms ease-out`},'&[data-state="closed"]':{animation:`${jr} 300ms ease-out`},overflow:"hidden"},gap:5,children:[jsx(x,{}),e]})})}function ro(i){var s=i,{children:e,disabled:o=!1,onOpenChange:t=()=>{},open:r=!1}=s,n=m(s,["children","disabled","onOpenChange","open"]);return jsx(fe.Root,{asChild:!0,disabled:o,open:r,onOpenChange:t,children:jsx(P,p(a({borderWidth:"md",css:{'&[data-state="open"] .fr-collapsible-step-icon':{transform:"rotate(180deg)"}},gap:0},n),{children:e}))})}function no({isCompleted:e,title:o}){return jsx(fe.Trigger,{asChild:!0,children:jsxs(S.Row,{alignItems:"center",justifyContent:"space-between",margin:-5,padding:5,zIndex:1,children:[jsxs(S.Row,{alignItems:"center",gap:2,children:[jsx(Jr,{checked:e}),jsx(F.Body2,{fontWeight:"demibold",userSelect:"none",children:o})]}),jsx(x,{as:ChevronDownIcon,color:"neutral.100",css:{"& path":{vectorEffect:"non-scaling-stroke"}},display:"block",height:"16px",order:2,part:"collapsible-step-icon",width:"16px"})]})})}var Ae={};Q(Ae,{Bar:()=>We,Dots:()=>qo,Segments:()=>Qo});function We(r){var n=r,{current:e,total:o}=n,t=m(n,["current","total"]);let i=o>0?Math.min(e/o,1):0,s=i===0?"10px":`${100*i}%`;return jsx(x,p(a({part:"progress-bar",backgroundColor:"blue800",borderRadius:"md",height:"10px"},t),{children:jsx(x,{backgroundColor:"primary.surface",part:"progress-bar-fill",borderRadius:"md",height:"100%",style:{width:s},transition:"width 300ms ease-out"})}))}function qo(r){var n=r,{current:e,total:o}=n,t=m(n,["current","total"]);if(o==1)return null;let i=[...Array(o)].map((s,d)=>jsx(x,{as:"circle",r:4,cx:4+16*d,cy:"4px",fill:e-1===d?T.colors.blue500:T.colors.blue800},d));return jsx(x,p(a({as:"svg",height:"8px",part:"progress-dots",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8},t),{children:i}))}function Qo(r){var n=r,{current:e,total:o}=n,t=m(n,["current","total"]);let i=[...Array(o)].map((s,d)=>jsx(x,{backgroundColor:e-1===d?"primary.surface":"blue800",borderRadius:"md",flexGrow:1,height:"100%"},d));return jsx(S.Row,p(a({gap:1,height:"10px",part:"progress-segments"},t),{children:i}))}function se(e,{onPrimary:o,onSecondary:t}={}){let{navigate:r}=useContext(E),n={"flow.back":()=>e.flow.back(),"flow.complete":()=>e.flow.complete(),"flow.forward":()=>e.flow.forward(),"flow.restart":()=>e.flow.restart(),"flow.skip":()=>e.flow.skip(),"flow.start":()=>e.flow.start(),"step.complete":()=>e.complete(),"step.reset":()=>e.reset(),"step.start":()=>e.start()};return {handlePrimary:useCallback((i,s,d=!0)=>H(this,null,function*(){if((yield o==null?void 0:o(e,i,s))===!1)return i.preventDefault(),!1;if(e.primaryButton!=null){let u=e.primaryButton.action===!1?!1:n[e.primaryButton.action];typeof u=="function"?u():u!==!1&&(yield e.complete(s,d)),e.primaryButton.uri!=null&&r(e.primaryButton.uri,e.primaryButton.target);}else yield e.complete(s,d),e.primaryButtonUri!=null&&r(e.primaryButtonUri,e.primaryButtonUriTarget);return !0}),[e]),handleSecondary:useCallback((i,s)=>H(this,null,function*(){if((yield t==null?void 0:t(e,i,s))===!1)return i.preventDefault(),!1;if(e.secondaryButton!=null){let c=e.secondaryButton.action===!1?!1:n[e.secondaryButton.action];typeof c=="function"?c():c!==!1&&e.complete(s),e.secondaryButton.uri!=null&&r(e.secondaryButton.uri,e.secondaryButton.target);}else e.complete(s),e.secondaryButtonUri!=null&&r(e.secondaryButtonUri,e.secondaryButtonUriTarget);return !0}),[e])}}var et=createContext({onPrimary:()=>{},onSecondary:()=>{},openStepId:null,setOpenStepId:()=>{},stepTypes:{}});function ot({handlePrimary:e,handleSecondary:o,open:t,onOpenChange:r,step:n}){var b,C,g,v,D,B;let{$state:{blocked:i,completed:s},subtitle:d,title:c}=n,u=(C=(b=n.primaryButton)==null?void 0:b.title)!=null?C:n.primaryButtonTitle,f=(v=(g=n.secondaryButton)==null?void 0:g.title)!=null?v:n.secondaryButtonTitle,h=(D=n.props)!=null?D:{},y=!!(s||i);return jsxs(ro,p(a({open:t,onOpenChange:r},h),{children:[jsx(no,{isCompleted:s,title:c}),jsxs(to,{children:[jsx(P.Media,{aspectRatio:2.5,objectFit:"cover",src:(B=n.videoUri)!=null?B:n.imageUri,type:n.videoUri?"video":"image"}),jsx(P.Subtitle,{color:"neutral.400",children:d}),jsxs(S.Row,{gap:3,children:[jsx(P.Secondary,{disabled:y,title:f,onClick:o}),jsx(P.Primary,{disabled:y,title:u,onClick:e})]})]})]}))}var Zr={default:ot};function en(r){var n=r,{flow:e,step:o}=n,t=m(n,["flow","step"]);var g;let{onPrimary:i,onSecondary:s,openStepId:d,setOpenStepId:c,stepTypes:u}=useContext(et),{handlePrimary:f,handleSecondary:h}=se(o,{onPrimary:i,onSecondary:s}),y=(d!=null?d:e.getCurrentStep().id)===o.id,b=(g=u[o.type])!=null?g:ot;function C(v){return H(this,null,function*(){c(v?o.id:""),v&&!o.$state.completed&&(yield o.start(),c(null));})}return jsx(b,p(a({flow:e,onOpenChange:C,open:y,step:o},t),{handlePrimary:f,handleSecondary:h}),o.id)}function Le(d){var c=d,{dismissible:e,flowId:o,onPrimary:t,onSecondary:r,part:n,stepTypes:i={}}=c,s=m(c,["dismissible","flowId","onPrimary","onSecondary","part","stepTypes"]);let[u,f]=useState(null),h=a(a({},Zr),i);return jsx(et.Provider,{value:{openStepId:u,setOpenStepId:f,onPrimary:t,onSecondary:r,stepTypes:h},children:jsx(J,p(a({as:P,borderWidth:"md",flowId:o,part:["checklist",n]},s),{children:g=>{var v=g,{flow:y,handleDismiss:b}=v,C=m(v,["flow","handleDismiss"]);let B=Array.from(y.steps.entries()).filter(([,w])=>w.$state.visible===!0).map(([,w])=>jsx(en,p(a({flow:y,handleDismiss:b},C),{step:w}),w.id)),O=y.getNumberOfCompletedSteps(),A=y.getNumberOfAvailableSteps();return jsxs(Fragment,{children:[jsxs(S.Column,{gap:2,children:[jsx(P.Header,{dismissible:e,handleDismiss:b,part:"checklist-header",subtitle:y.subtitle,title:y.title}),jsxs(S.Row,{alignItems:"center",gap:2,children:[jsxs(F.Body2,{fontWeight:"demibold",children:[O,"/",A]}),jsx(We,{current:O,total:A,flexGrow:1})]})]}),B]})}}))})}var pn=new Set(["required","min","max","minLength","maxLength","pattern"]);function dn({fieldComponent:e,control:o,fieldData:t,submit:r}){let n=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 i=Object.fromEntries(Object.entries(t).filter(([d])=>pn.has(d))),s=useController({name:t.id,control:o,rules:i});return jsx(e,p(a({},s),{fieldData:t,formContext:n,submit:r}))}function rt({fieldTypes:e,handleDismiss:o,handlePrimary:t,handleSecondary:r,parentProps:{dismissible:n},step:i}){var B,O,A,w,R,k;let{__readOnly:s}=useContext(E),d=useForm({delayError:2e3,mode:"onChange"}),[c,u]=useState(!1),f=[],{control:h,handleSubmit:y}=d,b=(B=i.props)!=null?B:{};function C(V,xe){u(!0),t(xe,V,s===!0).then(()=>u(!1));}(O=i.fields)==null||O.forEach(V=>{e[V.type]!=null&&f.push(jsx(dn,{control:h,fieldComponent:e[V.type],fieldData:V,submit:y(C)},`${i.flow.id}-${V.id}`));});let g=(w=(A=i.primaryButton)==null?void 0:A.title)!=null?w:i.primaryButtonTitle,v=(k=(R=i.secondaryButton)==null?void 0:R.title)!=null?k:i.secondaryButtonTitle,D=!!(i.$state.blocked||!d.formState.isValid);return jsxs(S.Column,p(a({gap:5,part:"form-step"},b),{children:[jsx(P.Header,{dismissible:n,handleDismiss:o,part:"form-step-header",subtitle:i.subtitle,title:i.title}),jsx(FormProvider,p(a({},d),{children:f})),jsxs(S.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[v&&jsx(I.Secondary,{disabled:D,onClick:r,title:v}),jsx(I.Primary,{disabled:D||c,onClick:y(C),title:g!=null?g:"Submit",loading:c})]},"form-footer")]}))}function nt({error:e}){var o;return (o=e==null?void 0:e.message)!=null&&o.length?jsx(F.Caption,{color:"red500",display:"block",part:"field-error",mt:"1",textAlign:"end",children:e==null?void 0:e.message}):null}function io({children:e,id:o,required:t=!1}){return jsxs(F.Body2,{as:"label",htmlFor:o,part:"field-label",fontWeight:"medium",mb:"2",display:"block",children:[e,jsx(x,{part:"field-label-required",display:"inline",children:t&&"*"})]})}var Fe={px:"4",py:"2",backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md",display:"block",outline:"none",width:"100%"};function oe({children:e,field:o,fieldData:t,fieldState:r}){var u;let{id:n,label:i,placeholder:s}=t,{error:d}=r,c=p(a(a(a({id:n},o),s?{placeholder:s}:{}),Fe),{"aria-invalid":!!d,value:(u=o.value)!=null?u:""});return jsxs(x,{part:"field",children:[jsx(io,{id:n,required:!!t.required,children:i}),e(c),jsx(nt,{error:d})]})}var gn=()=>jsx(x,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),yn=Ze.forwardRef(({label:e,value:o},t)=>jsxs(x,{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:[jsx(F.Body2,{part:"field-radio-label",children:e}),jsx(ye.Item,{id:o,value:o,ref:t,asChild:!0,children:jsx(x,{as:"button",backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"field-radio-value",position:"relative",height:"24px",width:"24px",children:jsx(x,{as:ye.Indicator,alignItems:"center",bg:"primary.surface",borderWidth:"md",borderStyle:"solid",borderColor:"primary.border",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"field-radio-indicator",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsx(gn,{})})})})]}));function ao(e){let{field:{onChange:o,value:t},fieldData:{options:r=[]}}=e,n=r.map(({label:i,value:s})=>jsx(yn,{value:s,label:i},s));return jsx(oe,p(a({},e),{children:()=>jsx(ye.Root,{value:t,onValueChange:o,asChild:!0,children:jsx(S.Column,{gap:2,part:"field-radio-group",children:n})})}))}var hn=Ze.forwardRef(({label:e,value:o},t)=>jsx(N.Item,{value:o,ref:t,asChild:!0,children:jsx(x,{"backgroundColor:hover":"blue900",borderRadius:"md",outline:"none",part:"field-select-option",px:"3",py:"2",children:jsx(N.ItemText,{asChild:!0,children:jsx(F.Body2,{part:"field-select-option-label",children:e})})})}));function so(e){let{field:{onChange:o,value:t},fieldData:{options:r=[],placeholder:n}}=e,i=r.map(({label:s,value:d})=>jsx(hn,{value:d,label:s},d));return jsx(oe,p(a({},e),{children:()=>jsxs(N.Root,{value:t,onValueChange:o,children:[jsx(N.Trigger,{asChild:!0,children:jsxs(F.Body2,p(a({},Fe),{alignItems:"center",display:"flex",justifyContent:"space-between",part:"field-select",children:[jsx(N.Value,{placeholder:n!=null?n:"Select one"}),jsx(N.Icon,{children:jsx(x,{as:ChevronDownIcon,color:"neutral.100",display:"block",height:"24px",part:"field-select-icon",width:"24px"})})]}))}),jsx(N.Content,{position:"popper",sideOffset:4,asChild:!0,children:jsx(x,p(a({},Fe),{boxShadow:"md",maxHeight:"var(--radix-select-content-available-height)",p:"1",part:"field-select-options",width:"var(--radix-popper-anchor-width)",zIndex:"99999",children:jsx(N.Viewport,{children:i})}))})]})}))}function lo(e){return jsx(oe,p(a({},e),{children:o=>jsx(F.Body2,a({as:"input",part:"field-text",type:"text"},o))}))}function ut(e){return jsx(oe,p(a({},e),{children:o=>jsx(F.Body2,a({as:"textarea",part:"field-textarea"},o))}))}var Pn={radio:ao,select:so,text:lo,textarea:ut};function we(n){var i=n,{fieldTypes:e={},flowId:o,part:t}=i,r=m(i,["fieldTypes","flowId","part"]);let s=Object.assign({},Pn,e);return jsx(J,p(a({flowId:o,part:["form",t]},r),{children:d=>jsx(rt,a({fieldTypes:s},d))}))}var _e={};Q(_e,{NPS:()=>Ne});function gt({field:e,submit:o}){let t=[...Array(11)].map((r,n)=>{let i=e.value===n?I.Primary:I.Secondary;return jsx(i,{borderWidth:"1px",onClick:()=>{e.onChange(n),o();},title:`${n}`,css:{".fr-button-title":{fontSize:"15px"}}},n)});return jsxs(S.Column,{gap:2,children:[jsx(S.Row,{gap:2,part:"field-nps",css:{"@media (min-width: 660px)":{flexWrap:"nowrap",justifyContent:"space-between"},flexWrap:"wrap",justifyContent:"center"},children:t}),jsxs(S.Row,{justifyContent:"space-between",part:"field-nps-label",children:[jsx(F.Caption,{part:"field-nps-left-label",color:"neutral.400",children:"Not likely at all"}),jsx(F.Caption,{part:"field-nps-right-label",color:"neutral.400",children:"Extremely likely"})]})]})}function Ne(i){var s=i,{as:e=M,flowId:o,fieldTypes:t,part:r}=s,n=m(s,["as","flowId","fieldTypes","part"]);let{flow:d}=pe(o);return jsx(we,a({alignSelf:"end",as:e,flowId:o,fieldTypes:a({nps:gt},t),modal:!1,onEscapeKeyDown:c=>{typeof n.onEscapeKeyDown=="function"&&n.onEscapeKeyDown(c),c.defaultPrevented||d.skip();},part:["nps",r],css:p(a({},!d||d.getCurrentStepIndex()==0?{".fr-form-step-footer":{display:"none"}}:{}),{".fr-form":{padding:"20px","@media (min-width: 660px)":{minWidth:"600px"},minWidth:"100%"},".fr-form-step":{gap:"14px","@media (min-width: 660px)":{gap:"1"}}})},n))}function de(e,{onComplete:o,onDismiss:t}={}){let r=useRef(null);return useEffect(()=>{e!=null&&(e.isCompleted&&r.current===!1&&H(this,null,function*(){yield o==null?void 0:o(e);}),r.current=e==null?void 0:e.isCompleted);},[e==null?void 0:e.isCompleted]),{handleDismiss:useCallback(n=>H(this,null,function*(){if((yield t==null?void 0:t(e,n))===!1)return n.preventDefault(),!1;e.skip();}),[e])}}function ze(){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]=useState(e),[r,n]=useState(null),i=useCallback(s=>{n(s);},[]);return useLayoutEffect(()=>{if(!r)return;let s=()=>{let d=r.getBoundingClientRect();t(d);};return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[r]),{node:r,rect:o,ref:i}}var Rn=keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function bt(r){var n=r,{style:e={},part:o=""}=n,t=m(n,["style","part"]);return jsxs(x,p(a({part:`dot-wrapper ${o}`,style:a({height:"48px",position:"absolute",width:"48px"},e)},t),{children:[jsx(x,{backgroundColor:"primary.surface",part:"dot-pulse",css:{animation:`2s ease-out infinite ${Rn}`,borderRadius:"24px",height:"48px",left:0,position:"absolute",top:0,transformOrigin:"center center",width:"48px"}}),jsx(x,{backgroundColor:"primary.surface",part:"dot",style:{borderRadius:"12px",height:"24px",left:"12px",position:"absolute",top:"12px",width:"24px"}})]}))}function po(r){var n=r,{part:e,src:o}=n,t=m(n,["part","src"]);return jsx(x,a({as:"img",maxWidth:"unset",part:["image",e],src:o},t))}function En(e){var o,t,r,n;return e.includes("youtube")?`https://www.youtube.com/embed/${(o=e.split("v=")[1])==null?void 0:o.split("&")[0]}`:e.includes("vimeo")?`https://player.vimeo.com/video/${(t=e.split("vimeo.com/")[1])==null?void 0:t.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/${(n=e.split("loom.com/share/")[1])==null?void 0:n.split("&")[0]}?hideEmbedTopBar=true&hide_title=true&hide_share=true&hide_owner=true`:null}function co(r){var n=r,{part:e,src:o}=n,t=m(n,["part","src"]);let i=En(o);return i?jsx(x,a({allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,as:"iframe",backgroundColor:"neutral.100",borderWidth:"0",part:["video",e],src:i},t)):o!=null&&o.endsWith(".mp4")?jsx(x,a({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 ce(r){var n=r,{src:e,type:o}=n,t=m(n,["src","type"]);return jsx(o==="video"?co:po,a({src:e},t))}function Pt({props:e,alignAttr:o,sideAttr:t}){let r=t!=null?t:"bottom",n={},i=()=>{var u;if(["after","before"].includes(e.align)){if(o=="start")return "before";if(o=="end")return "after"}return (u=e.align)!=null?u:"after"},s="-24px",d={top:"bottom",right:"left",bottom:"top",left:"right"};n[d[r]]=s;let c=i();return ["before","end"].includes(c)?["top","bottom"].includes(r)?n.right=s:n.bottom=s:["after","start"].includes(c)?["top","bottom"].includes(r)?n.left=s:n.top=s:["top","bottom"].includes(r)?n.left=`calc(50% + ${s})`:n.top=`calc(50% + ${s})`,n}var Ke={content:["align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","forceMount","hideWhenDetached","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenAutoFocus","onPointerDownOutside","side","sideOffset","sticky"],root:["defaultOpen","modal","onOpenChange","open"]};function Ct(e,o){var i,s,d,c,u;let t=Object.fromEntries(Ke.content.map(f=>[f,e[f]]).filter(f=>f[1]!==void 0)),r=Object.fromEntries(Ke.root.map(f=>[f,e[f]]).filter(f=>f[1]!==void 0)),n={};for(let f of Object.keys(e))!Ke.content.includes(f)&&!Ke.root.includes(f)&&(n[f]=e[f]);if(t.align=(i=t.align)!=null?i:"after",t.side=(s=t.side)!=null?s:"bottom",["before","after"].includes(t.align)){let f={after:"end",before:"start"},h=(D,B)=>["top","bottom"].includes(B)?D=="after"?"marginLeft":"marginRight":D=="after"?"marginTop":"marginBottom",y=(d=t.alignOffset)!=null?d:0,b=(c=t.style)!=null?c:{},C=(u=t.side)!=null?u:"bottom",g=t.align;t.style=p(a({},b),{[h(g,C)]:y});let v=["top","bottom"].includes(C)?o.width:o.height;t.alignOffset=(v+y)*-1,t.align=f[g];}return {contentProps:t,otherProps:n,rootProps:r}}var St=keyframes`
39
+ `,Gr=()=>jsx(x,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function Jr({checked:e=!1}){return jsx(x,{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&&jsx(x,{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:jsx(Gr,{})})})}function to({children:e}){return jsx(fe.Content,{asChild:!0,children:jsxs(S.Column,{css:{'&[data-state="open"]':{animation:`${Ur} 300ms ease-out`},'&[data-state="closed"]':{animation:`${jr} 300ms ease-out`},overflow:"hidden"},gap:5,children:[jsx(x,{}),e]})})}function ro(i){var s=i,{children:e,disabled:o=!1,onOpenChange:t=()=>{},open:r=!1}=s,n=m(s,["children","disabled","onOpenChange","open"]);return jsx(fe.Root,{asChild:!0,disabled:o,open:r,onOpenChange:t,children:jsx(P,p(a({borderWidth:"md",css:{'&[data-state="open"] .fr-collapsible-step-icon':{transform:"rotate(180deg)"}},gap:0},n),{children:e}))})}function no({isCompleted:e,title:o}){return jsx(fe.Trigger,{asChild:!0,children:jsxs(S.Row,{alignItems:"center",justifyContent:"space-between",margin:-5,padding:5,zIndex:1,children:[jsxs(S.Row,{alignItems:"center",gap:2,children:[jsx(Jr,{checked:e}),jsx(F.Body2,{fontWeight:"demibold",userSelect:"none",children:o})]}),jsx(x,{as:ChevronDownIcon,color:"neutral.100",css:{"& path":{vectorEffect:"non-scaling-stroke"}},display:"block",height:"16px",order:2,part:"collapsible-step-icon",width:"16px"})]})})}var Ae={};Q(Ae,{Bar:()=>We,Dots:()=>qo,Segments:()=>Qo});function We(r){var n=r,{current:e,total:o}=n,t=m(n,["current","total"]);let i=o>0?Math.min(e/o,1):0,s=i===0?"10px":`${100*i}%`;return jsx(x,p(a({part:"progress-bar",backgroundColor:"blue800",borderRadius:"md",height:"10px"},t),{children:jsx(x,{backgroundColor:"primary.surface",part:"progress-bar-fill",borderRadius:"md",height:"100%",style:{width:s},transition:"width 300ms ease-out"})}))}function qo(r){var n=r,{current:e,total:o}=n,t=m(n,["current","total"]);if(o==1)return null;let i=[...Array(o)].map((s,d)=>jsx(x,{as:"circle",r:4,cx:4+16*d,cy:"4px",fill:e-1===d?T.colors.blue500:T.colors.blue800},d));return jsx(x,p(a({as:"svg",height:"8px",part:"progress-dots",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8},t),{children:i}))}function Qo(r){var n=r,{current:e,total:o}=n,t=m(n,["current","total"]);let i=[...Array(o)].map((s,d)=>jsx(x,{backgroundColor:e-1===d?"primary.surface":"blue800",borderRadius:"md",flexGrow:1,height:"100%"},d));return jsx(S.Row,p(a({gap:1,height:"10px",part:"progress-segments"},t),{children:i}))}function se(e,{onPrimary:o,onSecondary:t}={}){let{navigate:r}=useContext(E),n={"flow.back":()=>e.flow.back(),"flow.complete":()=>e.flow.complete(),"flow.forward":()=>e.flow.forward(),"flow.restart":()=>e.flow.restart(),"flow.skip":()=>e.flow.skip(),"flow.start":()=>e.flow.start(),"step.complete":()=>e.complete(),"step.reset":()=>e.reset(),"step.start":()=>e.start()};return {handlePrimary:useCallback((i,s,d=!0)=>H(this,null,function*(){if((yield o==null?void 0:o(e,i,s))===!1)return i.preventDefault(),!1;if(e.primaryButton!=null){let u=e.primaryButton.action===!1?!1:n[e.primaryButton.action];typeof u=="function"?u():u!==!1&&(yield e.complete(s,d)),e.primaryButton.uri!=null&&r(e.primaryButton.uri,e.primaryButton.target);}else yield e.complete(s,d),e.primaryButtonUri!=null&&r(e.primaryButtonUri,e.primaryButtonUriTarget);return !0}),[e]),handleSecondary:useCallback((i,s)=>H(this,null,function*(){if((yield t==null?void 0:t(e,i,s))===!1)return i.preventDefault(),!1;if(e.secondaryButton!=null){let c=e.secondaryButton.action===!1?!1:n[e.secondaryButton.action];typeof c=="function"?c():c!==!1&&e.complete(s),e.secondaryButton.uri!=null&&r(e.secondaryButton.uri,e.secondaryButton.target);}else e.complete(s),e.secondaryButtonUri!=null&&r(e.secondaryButtonUri,e.secondaryButtonUriTarget);return !0}),[e])}}var et=createContext({onPrimary:()=>{},onSecondary:()=>{},openStepId:null,setOpenStepId:()=>{},stepTypes:{}});function ot({handlePrimary:e,handleSecondary:o,open:t,onOpenChange:r,step:n}){var b,C,g,v,D,B;let{$state:{blocked:i,completed:s},subtitle:d,title:c}=n,u=(C=(b=n.primaryButton)==null?void 0:b.title)!=null?C:n.primaryButtonTitle,f=(v=(g=n.secondaryButton)==null?void 0:g.title)!=null?v:n.secondaryButtonTitle,h=(D=n.props)!=null?D:{},y=!!(s||i);return jsxs(ro,p(a({open:t,onOpenChange:r},h),{children:[jsx(no,{isCompleted:s,title:c}),jsxs(to,{children:[jsx(P.Media,{aspectRatio:2.5,objectFit:"cover",src:(B=n.videoUri)!=null?B:n.imageUri,type:n.videoUri?"video":"image"}),jsx(P.Subtitle,{color:"neutral.400",children:d}),jsxs(S.Row,{gap:3,children:[jsx(P.Secondary,{disabled:y,title:f,onClick:o}),jsx(P.Primary,{disabled:y,title:u,onClick:e})]})]})]}))}var Zr={default:ot};function en(r){var n=r,{flow:e,step:o}=n,t=m(n,["flow","step"]);var g;let{onPrimary:i,onSecondary:s,openStepId:d,setOpenStepId:c,stepTypes:u}=useContext(et),{handlePrimary:f,handleSecondary:h}=se(o,{onPrimary:i,onSecondary:s}),y=(d!=null?d:e.getCurrentStep().id)===o.id,b=(g=u[o.type])!=null?g:ot;function C(v){return H(this,null,function*(){c(v?o.id:""),v&&!o.$state.completed&&(yield o.start(),c(null));})}return jsx(b,p(a({flow:e,onOpenChange:C,open:y,step:o},t),{handlePrimary:f,handleSecondary:h}),o.id)}function Le(d){var c=d,{dismissible:e,flowId:o,onPrimary:t,onSecondary:r,part:n,stepTypes:i={}}=c,s=m(c,["dismissible","flowId","onPrimary","onSecondary","part","stepTypes"]);let[u,f]=useState(null),h=a(a({},Zr),i);return jsx(et.Provider,{value:{openStepId:u,setOpenStepId:f,onPrimary:t,onSecondary:r,stepTypes:h},children:jsx(J,p(a({as:P,borderWidth:"md",flowId:o,part:["checklist",n]},s),{children:g=>{var v=g,{flow:y,handleDismiss:b}=v,C=m(v,["flow","handleDismiss"]);let B=Array.from(y.steps.entries()).filter(([,w])=>w.$state.visible===!0).map(([,w])=>jsx(en,p(a({flow:y,handleDismiss:b},C),{step:w}),w.id)),O=y.getNumberOfCompletedSteps(),A=y.getNumberOfAvailableSteps();return jsxs(Fragment,{children:[jsxs(S.Column,{gap:2,children:[jsx(P.Header,{dismissible:e,handleDismiss:b,part:"checklist-header",subtitle:y.subtitle,title:y.title}),jsxs(S.Row,{alignItems:"center",gap:2,children:[jsxs(F.Body2,{fontWeight:"demibold",children:[O,"/",A]}),jsx(We,{current:O,total:A,flexGrow:1})]})]}),B]})}}))})}var pn=new Set(["required","min","max","minLength","maxLength","pattern"]);function dn({fieldComponent:e,control:o,fieldData:t,submit:r}){let n=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 i=Object.fromEntries(Object.entries(t).filter(([d])=>pn.has(d))),s=useController({name:t.id,control:o,rules:i});return jsx(e,p(a({},s),{fieldData:t,formContext:n,submit:r}))}function rt({fieldTypes:e,handleDismiss:o,handlePrimary:t,handleSecondary:r,parentProps:{dismissible:n},step:i}){var B,O,A,w,R,k;let{__readOnly:s}=useContext(E),d=useForm({delayError:2e3,mode:"onChange"}),[c,u]=useState(!1),f=[],{control:h,handleSubmit:y}=d,b=(B=i.props)!=null?B:{};function C($,xe){u(!0),t(xe,$,s===!0).then(()=>u(!1));}(O=i.fields)==null||O.forEach($=>{e[$.type]!=null&&f.push(jsx(dn,{control:h,fieldComponent:e[$.type],fieldData:$,submit:y(C)},`${i.flow.id}-${$.id}`));});let g=(w=(A=i.primaryButton)==null?void 0:A.title)!=null?w:i.primaryButtonTitle,v=(k=(R=i.secondaryButton)==null?void 0:R.title)!=null?k:i.secondaryButtonTitle,D=!!(i.$state.blocked||!d.formState.isValid);return jsxs(S.Column,p(a({gap:5,part:"form-step"},b),{children:[jsx(P.Header,{dismissible:n,handleDismiss:o,part:"form-step-header",subtitle:i.subtitle,title:i.title}),jsx(FormProvider,p(a({},d),{children:f})),jsxs(S.Row,{part:"form-step-footer",justifyContent:"flex-end",gap:3,children:[v&&jsx(I.Secondary,{disabled:D,onClick:r,title:v}),jsx(I.Primary,{disabled:D||c,onClick:y(C),title:g!=null?g:"Submit",loading:c})]},"form-footer")]}))}function nt({error:e}){var o;return (o=e==null?void 0:e.message)!=null&&o.length?jsx(F.Caption,{color:"red500",display:"block",part:"field-error",mt:"1",textAlign:"end",children:e==null?void 0:e.message}):null}function io({children:e,id:o,required:t=!1}){return jsxs(F.Body2,{as:"label",htmlFor:o,part:"field-label",fontWeight:"medium",mb:"2",display:"block",children:[e,jsx(x,{part:"field-label-required",display:"inline",children:t&&"*"})]})}var Fe={px:"4",py:"2",backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",borderRadius:"md",display:"block",outline:"none",width:"100%"};function oe({children:e,field:o,fieldData:t,fieldState:r}){var u;let{id:n,label:i,placeholder:s}=t,{error:d}=r,c=p(a(a(a({id:n},o),s?{placeholder:s}:{}),Fe),{"aria-invalid":!!d,value:(u=o.value)!=null?u:""});return jsxs(x,{part:"field",children:[jsx(io,{id:n,required:!!t.required,children:i}),e(c),jsx(nt,{error:d})]})}var gn=()=>jsx(x,{as:"svg",color:"primary.foreground",width:"10px",height:"8px",viewBox:"0 0 10 8",fill:"none",children:jsx("path",{d:"M1 4.34664L3.4618 6.99729L3.4459 6.98017L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),yn=Ze.forwardRef(({label:e,value:o},t)=>jsxs(x,{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:[jsx(F.Body2,{part:"field-radio-label",children:e}),jsx(ye.Item,{id:o,value:o,ref:t,asChild:!0,children:jsx(x,{as:"button",backgroundColor:"inherit",borderWidth:"md",borderStyle:"solid",borderColor:"neutral.border",borderRadius:"100%",padding:"0",part:"field-radio-value",position:"relative",height:"24px",width:"24px",children:jsx(x,{as:ye.Indicator,alignItems:"center",bg:"primary.surface",borderWidth:"md",borderStyle:"solid",borderColor:"primary.border",borderRadius:"100%",display:"flex",height:"calc(100% + 2px)",justifyContent:"center",left:"-1px",part:"field-radio-indicator",position:"absolute",top:"-1px",width:"calc(100% + 2px)",children:jsx(gn,{})})})})]}));function ao(e){let{field:{onChange:o,value:t},fieldData:{options:r=[]}}=e,n=r.map(({label:i,value:s})=>jsx(yn,{value:s,label:i},s));return jsx(oe,p(a({},e),{children:()=>jsx(ye.Root,{value:t,onValueChange:o,asChild:!0,children:jsx(S.Column,{gap:2,part:"field-radio-group",children:n})})}))}var hn=Ze.forwardRef(({label:e,value:o},t)=>jsx(N.Item,{value:o,ref:t,asChild:!0,children:jsx(x,{"backgroundColor:hover":"blue900",borderRadius:"md",outline:"none",part:"field-select-option",px:"3",py:"2",children:jsx(N.ItemText,{asChild:!0,children:jsx(F.Body2,{part:"field-select-option-label",children:e})})})}));function so(e){let{field:{onChange:o,value:t},fieldData:{options:r=[],placeholder:n}}=e,i=r.map(({label:s,value:d})=>jsx(hn,{value:d,label:s},d));return jsx(oe,p(a({},e),{children:()=>jsxs(N.Root,{value:t,onValueChange:o,children:[jsx(N.Trigger,{asChild:!0,children:jsxs(F.Body2,p(a({},Fe),{alignItems:"center",display:"flex",justifyContent:"space-between",part:"field-select",children:[jsx(N.Value,{placeholder:n!=null?n:"Select one"}),jsx(N.Icon,{children:jsx(x,{as:ChevronDownIcon,color:"neutral.100",display:"block",height:"24px",part:"field-select-icon",width:"24px"})})]}))}),jsx(N.Content,{position:"popper",sideOffset:4,asChild:!0,children:jsx(x,p(a({},Fe),{boxShadow:"md",maxHeight:"var(--radix-select-content-available-height)",p:"1",part:"field-select-options",width:"var(--radix-popper-anchor-width)",zIndex:"99999",children:jsx(N.Viewport,{children:i})}))})]})}))}function lo(e){return jsx(oe,p(a({},e),{children:o=>jsx(F.Body2,a({as:"input",part:"field-text",type:"text"},o))}))}function ut(e){return jsx(oe,p(a({},e),{children:o=>jsx(F.Body2,a({as:"textarea",part:"field-textarea"},o))}))}var Pn={radio:ao,select:so,text:lo,textarea:ut};function we(n){var i=n,{fieldTypes:e={},flowId:o,part:t}=i,r=m(i,["fieldTypes","flowId","part"]);let s=Object.assign({},Pn,e);return jsx(J,p(a({flowId:o,part:["form",t]},r),{children:d=>jsx(rt,a({fieldTypes:s},d))}))}var _e={};Q(_e,{NPS:()=>Ne});function gt({field:e,submit:o}){let t=[...Array(11)].map((r,n)=>{let i=e.value===n?I.Primary:I.Secondary;return jsx(i,{borderWidth:"1px",onClick:()=>{e.onChange(n),o();},title:`${n}`,css:{".fr-button-title":{fontSize:"15px"}}},n)});return jsxs(S.Column,{gap:2,children:[jsx(S.Row,{gap:2,part:"field-nps",css:{"@media (min-width: 660px)":{flexWrap:"nowrap",justifyContent:"space-between"},flexWrap:"wrap",justifyContent:"center"},children:t}),jsxs(S.Row,{justifyContent:"space-between",part:"field-nps-label",children:[jsx(F.Caption,{part:"field-nps-left-label",color:"neutral.400",children:"Not likely at all"}),jsx(F.Caption,{part:"field-nps-right-label",color:"neutral.400",children:"Extremely likely"})]})]})}function Ne(i){var s=i,{as:e=M,flowId:o,fieldTypes:t,part:r}=s,n=m(s,["as","flowId","fieldTypes","part"]);let{flow:d}=pe(o);return jsx(we,a({alignSelf:"end",as:e,flowId:o,fieldTypes:a({nps:gt},t),modal:!1,onEscapeKeyDown:c=>{typeof n.onEscapeKeyDown=="function"&&n.onEscapeKeyDown(c),c.defaultPrevented||d.skip();},part:["nps",r],css:p(a({},!d||d.getCurrentStepIndex()==0?{".fr-form-step-footer":{display:"none"}}:{}),{".fr-form":{padding:"20px","@media (min-width: 660px)":{minWidth:"600px"},minWidth:"100%"},".fr-form-step":{gap:"14px","@media (min-width: 660px)":{gap:"1"}}})},n))}function de(e,{onComplete:o,onDismiss:t}={}){let r=useRef(null);return useEffect(()=>{e!=null&&(e.isCompleted&&r.current===!1&&H(this,null,function*(){yield o==null?void 0:o(e);}),r.current=e==null?void 0:e.isCompleted);},[e==null?void 0:e.isCompleted]),{handleDismiss:useCallback(n=>H(this,null,function*(){if((yield t==null?void 0:t(e,n))===!1)return n.preventDefault(),!1;e.skip();}),[e])}}function ze(){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]=useState(e),[r,n]=useState(null),i=useCallback(s=>{n(s);},[]);return useLayoutEffect(()=>{if(!r)return;let s=()=>{let d=r.getBoundingClientRect();t(d);};return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[r]),{node:r,rect:o,ref:i}}var Rn=keyframes({"0%":{opacity:.5,transform:"scale(0.5)"},"50%":{opacity:0,transform:"scale(1)"},"100%":{opacity:0,transform:"scale(1)"}});function bt(r){var n=r,{style:e={},part:o=""}=n,t=m(n,["style","part"]);return jsxs(x,p(a({part:`dot-wrapper ${o}`,style:a({height:"48px",position:"absolute",width:"48px"},e)},t),{children:[jsx(x,{backgroundColor:"primary.surface",part:"dot-pulse",css:{animation:`2s ease-out infinite ${Rn}`,borderRadius:"24px",height:"48px",left:0,position:"absolute",top:0,transformOrigin:"center center",width:"48px"}}),jsx(x,{backgroundColor:"primary.surface",part:"dot",style:{borderRadius:"12px",height:"24px",left:"12px",position:"absolute",top:"12px",width:"24px"}})]}))}function po(r){var n=r,{part:e,src:o}=n,t=m(n,["part","src"]);return jsx(x,a({as:"img",maxWidth:"unset",part:["image",e],src:o},t))}function En(e){var o,t,r,n;return e.includes("youtube")?`https://www.youtube.com/embed/${(o=e.split("v=")[1])==null?void 0:o.split("&")[0]}`:e.includes("vimeo")?`https://player.vimeo.com/video/${(t=e.split("vimeo.com/")[1])==null?void 0:t.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/${(n=e.split("loom.com/share/")[1])==null?void 0:n.split("&")[0]}?hideEmbedTopBar=true&hide_title=true&hide_share=true&hide_owner=true`:null}function co(r){var n=r,{part:e,src:o}=n,t=m(n,["part","src"]);let i=En(o);return i?jsx(x,a({allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,as:"iframe",backgroundColor:"neutral.100",borderWidth:"0",part:["video",e],src:i},t)):o!=null&&o.endsWith(".mp4")?jsx(x,a({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 ce(r){var n=r,{src:e,type:o}=n,t=m(n,["src","type"]);return jsx(o==="video"?co:po,a({src:e},t))}function Pt({props:e,alignAttr:o,sideAttr:t}){let r=t!=null?t:"bottom",n={},i=()=>{var u;if(["after","before"].includes(e.align)){if(o=="start")return "before";if(o=="end")return "after"}return (u=e.align)!=null?u:"after"},s="-24px",d={top:"bottom",right:"left",bottom:"top",left:"right"};n[d[r]]=s;let c=i();return ["before","end"].includes(c)?["top","bottom"].includes(r)?n.right=s:n.bottom=s:["after","start"].includes(c)?["top","bottom"].includes(r)?n.left=s:n.top=s:["top","bottom"].includes(r)?n.left=`calc(50% + ${s})`:n.top=`calc(50% + ${s})`,n}var Ke={content:["align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","forceMount","hideWhenDetached","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenAutoFocus","onPointerDownOutside","side","sideOffset","sticky"],root:["defaultOpen","modal","onOpenChange","open"]};function Ct(e,o){var i,s,d,c,u;let t=Object.fromEntries(Ke.content.map(f=>[f,e[f]]).filter(f=>f[1]!==void 0)),r=Object.fromEntries(Ke.root.map(f=>[f,e[f]]).filter(f=>f[1]!==void 0)),n={};for(let f of Object.keys(e))!Ke.content.includes(f)&&!Ke.root.includes(f)&&(n[f]=e[f]);if(t.align=(i=t.align)!=null?i:"after",t.side=(s=t.side)!=null?s:"bottom",["before","after"].includes(t.align)){let f={after:"end",before:"start"},h=(D,B)=>["top","bottom"].includes(B)?D=="after"?"marginLeft":"marginRight":D=="after"?"marginTop":"marginBottom",y=(d=t.alignOffset)!=null?d:0,b=(c=t.style)!=null?c:{},C=(u=t.side)!=null?u:"bottom",g=t.align;t.style=p(a({},b),{[h(g,C)]:y});let v=["top","bottom"].includes(C)?o.width:o.height;t.alignOffset=(v+y)*-1,t.align=f[g];}return {contentProps:t,otherProps:n,rootProps:r}}var St=keyframes`
40
40
  from {
41
41
  opacity: 0;
42
42
  }
@@ -46,7 +46,7 @@ var So=Object.defineProperty,Kt=Object.defineProperties;var Ut=Object.getOwnProp
46
46
  to {
47
47
  opacity: 1;
48
48
  }
49
- `;function $(s){var d=s,{anchor:e,children:o,className:t,spotlight:r=!1,style:n}=d,i=m(d,["anchor","children","className","spotlight","style"]);let{node:c,rect:u,ref:f}=ze(),{node:h,rect:y,ref:b}=ze(),Ci=Ct(i,u),{contentProps:C,otherProps:zt}=Ci,Po=zt,{part:g}=Po,v=m(Po,["part"]),{rootProps:D}=Ci,[B,O]=useState(C.align),[A,w]=useState(C.side),[R,k]=useState(0),[V,xe]=useState(0);if(c!==null){let G=c.getAttribute("data-align"),ne=c.getAttribute("data-side");B!==G&&O(G),A!==ne&&w(ne);}let re=useRef(null);if(useEffect(()=>{let G=document.querySelector(e);G!=null?(b(G),re.current=G):console.debug(`[frigade] Tooltip: No anchor found for query: ${e}`);},[e]),useEffect(()=>{function G(be){if(be.matches(e))return be;let me=be.querySelectorAll(e);return me.length>0?me[0]:null}let ne=new MutationObserver(be=>{for(let me of be)if(me.type==="childList"){for(let he of me.addedNodes){if(he.nodeType!==Node.ELEMENT_NODE)continue;let ie=G(he);if(ie!=null){b(ie),re.current=ie,console.debug("[frigade] Tooltip: MutationObserver added anchor: ",ie);break}}for(let he of me.removedNodes){if(he.nodeType!==Node.ELEMENT_NODE)continue;let ie=G(he);if(ie!=null){b(null),re.current=null,console.debug("[frigade] Tooltip: MutationObserver removed anchor: ",ie);break}}}});return ne.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>ne.disconnect()},[]),useEffect(()=>{let{scrollX:G,scrollY:ne}=window;k(y.left+G),xe(y.top+ne);},[y.left,y.top]),h==null)return null;let Re="0";typeof window!="undefined"&&(Re=window.getComputedStyle(h).borderRadius);let ke=Pt({props:i,alignAttr:B,sideAttr:A});return jsxs(Y.Root,p(a({defaultOpen:!0},D),{children:[jsx(Y.Anchor,{virtualRef:re}),jsx(Y.Portal,{children:jsxs(Fragment,{children:[r&&jsx(x,a({animation:`${St} 300ms ease-out`,boxShadow:"0 0 0 20000px rgb(0 0 0 / 0.5)",part:"tooltip-spotlight",pointerEvents:"none",position:"absolute",style:{borderRadius:Re,height:y.height,left:R,top:V,width:y.width}},i.zIndex!=null?{zIndex:i.zIndex}:{})),jsx(Y.Content,p(a({asChild:!0},C),{ref:f,children:jsxs(P,p(a({animation:`${St} 300ms ease-out`,boxShadow:"md",position:"relative",className:t,css:{maxWidth:"360px",pointerEvents:"auto"},part:["tooltip",g],style:n},v),{children:[jsx(bt,{style:ke}),o]}))}))]})})]}))}$.Close=e=>jsx(Y.Close,{"aria-label":"Close",asChild:!0,children:jsx(I.Plain,p(a({css:{top:"0px",right:"-6px"},part:"close",position:"absolute"},e),{children:jsx(XMarkIcon,{height:"20",fill:"currentColor"})}))});$.Media=t=>{var r=t,{src:e}=r,o=m(r,["src"]);return e==null?null:jsx(ce,a({borderRadius:"md md 0 0",borderWidth:"0",css:{aspectRatio:"2",objectFit:"cover"},margin:"-5 -5 0",src:e},o))};$.Primary=r=>{var n=r,{onClick:e,title:o}=n,t=m(n,["onClick","title"]);return o==null?null:jsx(I.Primary,a({title:o,onClick:e},t))};$.Progress=t=>{var r=t,{children:e}=r,o=m(r,["children"]);return e==null?null:jsx(F.Body2,p(a({part:"progress"},o),{children:e}))};$.Secondary=r=>{var n=r,{onClick:e,title:o}=n,t=m(n,["onClick","title"]);return o==null?null:jsx(I.Secondary,a({title:o,onClick:e},t))};$.Subtitle=t=>{var r=t,{children:e}=r,o=m(r,["children"]);return e==null?null:jsx(F.Body2,p(a({part:"subtitle"},o),{children:e}))};$.Title=t=>{var r=t,{children:e}=r,o=m(r,["children"]);return e==null?null:jsx(F.H4,p(a({part:"title"},o),{children:e}))};function Ft(c){var u=c,{dismissible:e=!0,flow:o,onDismiss:t,onEscapeKeyDown:r,onPrimary:n,onSecondary:i,step:s}=u,d=m(u,["dismissible","flow","onDismiss","onEscapeKeyDown","onPrimary","onSecondary","step"]);var D,B,O,A,w,R;let{handleDismiss:f}=de(o,{onDismiss:t}),{handlePrimary:h,handleSecondary:y}=se(s,{onPrimary:n,onSecondary:i}),b=(D=s.props)!=null?D:{},C=(O=(B=s.primaryButton)==null?void 0:B.title)!=null?O:s.primaryButtonTitle,g=(w=(A=s.secondaryButton)==null?void 0:A.title)!=null?w:s.secondaryButtonTitle,v=!!s.$state.blocked;return jsxs($,p(a(a({anchor:s.selector,onOpenAutoFocus:k=>k.preventDefault(),onPointerDownOutside:k=>k.preventDefault(),onInteractOutside:k=>k.preventDefault()},d),b),{onEscapeKeyDown:k=>{typeof r=="function"&&r(k),k.defaultPrevented||f(k);},children:[e&&jsx($.Close,{onClick:f}),jsx($.Media,{src:(R=s.videoUri)!=null?R:s.imageUri,type:s.videoUri?"video":"image"}),jsxs(S.Column,{gap:1,part:"tooltip-header",children:[jsx($.Title,{children:s.title}),jsx($.Subtitle,{color:"neutral.400",children:s.subtitle})]}),jsxs(S.Row,{alignItems:"center",gap:3,justifyContent:"flex-end",part:"tooltip-footer",children:[o.getNumberOfAvailableSteps()>1&&jsx($.Progress,{marginRight:"auto",transform:"translateY(1px)",children:`${o.getCurrentStepIndex()+1}/${o.getNumberOfAvailableSteps()}`}),jsx($.Secondary,{disabled:v,onClick:y,title:g}),jsx($.Primary,{disabled:v,onClick:h,title:C})]})]}),s.id)}function Te(e,o=!0){let{currentModal:t,modals:r,setModals:n}=useContext(E),[i,s]=useState(!1);useEffect(()=>{o&&(e!=null&&e.isVisible)&&e&&!r.has(e.id)&&n(c=>new Set(c).add(e.id));},[e==null?void 0:e.id,e==null?void 0:e.isVisible]),useEffect(()=>{let c=t===(e==null?void 0:e.id);o&&(e==null?void 0:e.id)!=null&&c!==i&&s(c);},[e==null?void 0:e.id,t]);function d(){o&&r.has(e==null?void 0:e.id)&&n(c=>{let u=new Set(c);return u.delete(e==null?void 0:e.id),u});}return {isCurrentModal:i||!o,removeModal:d}}function go(i){var s=i,{flowId:e,onComplete:o,variables:t,part:r}=s,n=m(s,["flowId","onComplete","variables","part"]);let[d,c]=useState(!1),{flow:u}=pe(e,{variables:t}),{hasInitialized:f,registerComponent:h,unregisterComponent:y}=useContext(E);de(u,{onComplete:o});let{isCurrentModal:b,removeModal:C}=Te(u);if(useEffect(()=>{!(u!=null&&u.isVisible)&&b&&C();},[u==null?void 0:u.isVisible,b]),useEffect(()=>()=>{y(e);},[]),u==null||u.isVisible===!1||!b||(h(e,()=>{d||c(!0);}),!f||!d))return null;let g=u.getCurrentStep();return g==null||g.start(),jsx(Ft,a({"data-flow-id":u.id,flow:u,part:["tour",r],step:g},n))}function vt(e){let[o,t]=useState(),{frigade:r}=useContext(E);return useEffect(()=>{H(this,null,function*(){let n=yield r.getCollection(e);if(!n||r.hasFailedToLoad()){t(void 0);return}t(n);});},[e]),{collection:o}}function yo(r){var n=r,{collectionId:e,part:o}=n,t=m(n,["collectionId","part"]);var f,h;let i={ANNOUNCEMENT:xo,BANNER:eo,CARD:P,CHECKLIST:Le,EMBEDDED_TIP:P,FORM:we,NPS_SURVEY:Ne,TOUR:go},[s,d]=useState(),{collection:c}=vt(e);useEffect(()=>{var b;if(c==null)return;let y=(b=c.flows.find(({flow:C})=>C.isVisible))==null?void 0:b.flow;y!=null&&d(y);},[c]);let u=(h=i[(f=s==null?void 0:s.rawData)==null?void 0:f.flowType])!=null?h:()=>null;return s==null||u==null?null:jsx(x,p(a({part:["collection",o],"data-collection-id":e},t),{children:jsx(u,{flowId:s.id})}))}function ve(){let{frigade:e}=useContext(E);return {frigade:e,isLoading:!(e!=null&&e.isReady())}}function Rt(){let[e,o]=useState(),{frigade:t}=ve();return useEffect(()=>{t.getCollections().then(r=>{r.forEach((n,i)=>{n.collectionType==="DEFAULT"&&o(i);});});},[]),e==null?null:jsx(yo,{as:null,collectionId:e})}var E=createContext({apiKey:"",modals:new Set,setModals:()=>{},currentModal:null,navigate:()=>{},hasInitialized:!1,registerComponent:()=>{},unregisterComponent:()=>{}});function kt(){let{frigade:e}=ve();return useEffect(()=>{H(this,null,function*(){(yield e.getFlows()).forEach(t=>{t.steps.forEach(r=>{if(r.imageUri){let n=new Image;n.src=r.imageUri;}});});});},[]),null}function Ht(s){var d=s,{children:e,css:o={},defaultCollection:t=!0,navigate:r,theme:n}=d,i=m(d,["children","css","defaultCollection","navigate","theme"]);let c=n?Je(n):{},[u,f]=useState(new Set),h=useRef(new Map),y=useRef(),[b,C]=useState(!1),g=useMemo(()=>(C(!1),y.current=void 0,f(new Set),new Frigade(i.apiKey,{apiKey:i.apiKey,apiUrl:i.apiUrl,userId:i.userId,groupId:i.groupId,userProperties:i.userProperties,groupProperties:i.groupProperties,generateGuestId:i.generateGuestId,syncOnWindowUpdates:i.syncOnWindowUpdates,__readOnly:i.__readOnly,__flowStateOverrides:i.__flowStateOverrides})),[i.userId,i.groupId,i.apiKey]);useEffect(()=>{if(i.__flowStateOverrides){let w=g.getConfig();w.__flowStateOverrides=i.__flowStateOverrides,g.reload(w);}},[i.__flowStateOverrides]);function v(){let w=[...h.current.entries()].map(([R,k])=>[R,k.callback]);g.batchRegister(w),C(!0);}function D(w,R){if(y.current&&clearTimeout(y.current),b){h.current.has(w)?g.getFlow(w).then(k=>R(k.isVisible)):(g.getFlow(w).then(k=>k.register(R)),h.current.set(w,{callback:R}));return}h.current.has(w)||h.current.set(w,{callback:R}),y.current&&clearTimeout(y.current),y.current=setTimeout(()=>v(),0);}function B(w){h.current.has(w)&&g.getFlow(w).then(R=>{h.current.delete(w),R==null||R.unregister();});}let O=r!=null?r:(w,R="_self")=>{window.open(w,R);};useEffect(()=>()=>{g.destroy();},[]);let A=u.size>0?u.values().next().value:null;return jsxs(E.Provider,{value:p(a({modals:u,setModals:f,currentModal:A,navigate:O},i),{frigade:g,registerComponent:D,unregisterComponent:B,hasInitialized:b}),children:[jsx(Global,{styles:{":root":a(a(a({},Xe),c),o)}}),jsxs(ThemeProvider,{theme:T,children:[t&&jsx(Rt,{}),e]}),i.preloadImages!==!1&&jsx(kt,{})]})}function pe(e,o){let[t,r]=useState(),[,n]=useState(""),{frigade:i}=useContext(E),s=useCallback(d=>{d.id===e&&(o!=null&&o.variables&&d.applyVariables(o.variables),setTimeout(()=>{r(d),n(Math.random().toString());},0));},[o==null?void 0:o.variables,i]);return useEffect(()=>{if(i!=null&&i.isReady())return H(this,null,function*(){let d=yield i.getFlow(e);if(!d||i.hasFailedToLoad()){r(void 0);return}o!=null&&o.variables&&d.applyVariables(o.variables),r(d);}),i.onStateChange(s),()=>{i.removeStateChangeHandler(s);}},[s,i]),useEffect(()=>{!(o!=null&&o.variables)||!t||s(t);},[o==null?void 0:o.variables]),{flow:t}}function J(h){var y=h,{as:e,children:o,dismissible:t=!1,flowId:r,onComplete:n,onDismiss:i,onPrimary:s,onSecondary:d,variables:c,forceMount:u}=y,f=m(y,["as","children","dismissible","flowId","onComplete","onDismiss","onPrimary","onSecondary","variables","forceMount"]);let[b,C]=useState(!1),{flow:g}=pe(r,{variables:c}),{hasInitialized:v,registerComponent:D,unregisterComponent:B}=useContext(E),O=g==null?void 0:g.getCurrentStep(),{handleDismiss:A}=de(g,{onComplete:n,onDismiss:i}),{handlePrimary:w,handleSecondary:R}=se(O,{onPrimary:s,onSecondary:d}),k=e&&typeof e=="function"&&e.displayName==="Dialog",{isCurrentModal:V,removeModal:xe}=Te(g,k);useEffect(()=>{!(g!=null&&g.isVisible)&&V&&xe();},[g==null?void 0:g.isVisible,V]),useEffect(()=>()=>{B(r);},[]);let re=u&&((g==null?void 0:g.isCompleted)||(g==null?void 0:g.isSkipped));if(!g||!re&&!V||(D(r,()=>{b||C(!0);}),!g.isVisible&&!re)||!v||!b)return null;(re||!g.isCompleted&&!g.isSkipped)&&O.start();let Re=e===null?Fragment$1:e!=null?e:x,ke=p(a({},f),{"data-flow-id":g.id});return jsx(Re,p(a({},e===null?{}:ke),{children:o({flow:g,handleDismiss:A,handlePrimary:w,handleSecondary:R,parentProps:{dismissible:t,flowId:r,variables:c,containerProps:ke},step:O})}))}function $t(t){var r=t,{part:e}=r,o=m(r,["part"]);return jsx(J,p(a({as:P,gap:5,borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",part:["card",e]},o),{children:({handleDismiss:n,handlePrimary:i,handleSecondary:s,parentProps:{dismissible:d},step:c})=>{var h,y,b,C;let u=(y=(h=c.primaryButton)==null?void 0:h.title)!=null?y:c.primaryButtonTitle,f=(C=(b=c.secondaryButton)==null?void 0:b.title)!=null?C:c.secondaryButtonTitle;return jsxs(Fragment,{children:[jsx(P.Header,{dismissible:d,handleDismiss:n,subtitle:c.subtitle,title:c.title}),jsx(P.Media,{src:c.imageUri,css:{objectFit:"contain",width:"100%"}}),jsxs(S.Row,{gap:3,justifyContent:"flex-end",part:"card-footer",children:[jsx(P.Secondary,{title:f,onClick:s}),jsx(P.Primary,{title:u,onClick:i})]})]})}}))}var P=Ze.forwardRef((n,r)=>{var i=n,{children:e,flowId:o}=i,t=m(i,["children","flowId"]);var d;if(o!=null)return jsx($t,a({flowId:o},t));let s=(d=t.as)!=null?d:S.Column;return jsx(s,p(a({backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderRadius:"md",borderWidth:"0",gap:5,p:5},t),{ref:r,children:e}))});P.Dismiss=e=>jsx(I.Plain,p(a({part:"dismiss",padding:0},e),{children:jsx(XMarkIcon,{height:"20",fill:"currentColor"})}));P.Header=i=>{var s=i,{dismissible:e,handleDismiss:o,subtitle:t,title:r}=s,n=m(s,["dismissible","handleDismiss","subtitle","title"]);return jsxs(S.Row,p(a({alignItems:"flex-start",flexWrap:"wrap",gap:1,part:"card-header"},n),{children:[jsx(P.Title,{maxWidth:"calc(100% - 32px)",children:r}),e&&jsx(P.Dismiss,{onClick:o,marginLeft:"auto"}),jsx(P.Subtitle,{color:"neutral.400",flexBasis:"100%",children:t})]}))};P.Media=t=>{var r=t,{src:e}=r,o=m(r,["src"]);return e==null||(e==null?void 0:e.length)===0?null:jsx(ce,a({borderRadius:"md",src:e},o))};P.Primary=r=>{var n=r,{onClick:e,title:o}=n,t=m(n,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsx(I.Primary,a({title:o,onClick:e},t))};P.Secondary=r=>{var n=r,{onClick:e,title:o}=n,t=m(n,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsx(I.Secondary,a({title:o,onClick:e},t))};P.Subtitle=t=>{var r=t,{children:e}=r,o=m(r,["children"]);return e==null?null:jsx(F.Body2,p(a({display:"block",color:"neutral.400",part:"subtitle"},o),{children:e}))};P.Title=t=>{var r=t,{children:e}=r,o=m(r,["children"]);return e==null?null:jsx(F.H4,p(a({display:"block",part:"title"},o),{children:e}))};var je={content:["onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onInteractOutside"],root:["defaultOpen","modal","onOpenChange","open"]};function Nt(e){let o=Object.fromEntries(je.content.map(n=>[n,e[n]]).filter(n=>n[1]!==void 0)),t=Object.fromEntries(je.root.map(n=>[n,e[n]]).filter(n=>n[1]!==void 0)),r={};for(let n of Object.keys(e))!je.content.some(i=>i===n)&&!je.root.some(i=>i===n)&&(r[n]=e[n]);return {contentProps:o,otherProps:r,rootProps:t}}var fi=keyframes`
49
+ `;function V(s){var d=s,{anchor:e,children:o,className:t,spotlight:r=!1,style:n}=d,i=m(d,["anchor","children","className","spotlight","style"]);let{node:c,rect:u,ref:f}=ze(),{node:h,rect:y,ref:b}=ze(),Ci=Ct(i,u),{contentProps:C,otherProps:zt}=Ci,Po=zt,{part:g}=Po,v=m(Po,["part"]),{rootProps:D}=Ci,[B,O]=useState(C.align),[A,w]=useState(C.side),[R,k]=useState(0),[$,xe]=useState(0);if(c!==null){let G=c.getAttribute("data-align"),ne=c.getAttribute("data-side");B!==G&&O(G),A!==ne&&w(ne);}let re=useRef(null);if(useEffect(()=>{let G=document.querySelector(e);G!=null?(b(G),re.current=G):console.debug(`[frigade] Tooltip: No anchor found for query: ${e}`);},[e]),useEffect(()=>{function G(be){if(be.matches(e))return be;let me=be.querySelectorAll(e);return me.length>0?me[0]:null}let ne=new MutationObserver(be=>{for(let me of be)if(me.type==="childList"){for(let he of me.addedNodes){if(he.nodeType!==Node.ELEMENT_NODE)continue;let ie=G(he);if(ie!=null){b(ie),re.current=ie,console.debug("[frigade] Tooltip: MutationObserver added anchor: ",ie);break}}for(let he of me.removedNodes){if(he.nodeType!==Node.ELEMENT_NODE)continue;let ie=G(he);if(ie!=null){b(null),re.current=null,console.debug("[frigade] Tooltip: MutationObserver removed anchor: ",ie);break}}}});return ne.observe(document.querySelector("body"),{childList:!0,subtree:!0}),()=>ne.disconnect()},[]),useEffect(()=>{let{scrollX:G,scrollY:ne}=window;k(y.left+G),xe(y.top+ne);},[y.left,y.top]),h==null)return null;let Re="0";typeof window!="undefined"&&(Re=window.getComputedStyle(h).borderRadius);let ke=Pt({props:i,alignAttr:B,sideAttr:A});return jsxs(Y.Root,p(a({defaultOpen:!0},D),{children:[jsx(Y.Anchor,{virtualRef:re}),jsx(Y.Portal,{children:jsxs(Fragment,{children:[r&&jsx(x,a({animation:`${St} 300ms ease-out`,boxShadow:"0 0 0 20000px rgb(0 0 0 / 0.5)",part:"tooltip-spotlight",pointerEvents:"none",position:"absolute",style:{borderRadius:Re,height:y.height,left:R,top:$,width:y.width}},i.zIndex!=null?{zIndex:i.zIndex}:{})),jsx(Y.Content,p(a({asChild:!0},C),{ref:f,children:jsxs(P,p(a({animation:`${St} 300ms ease-out`,boxShadow:"md",position:"relative",className:t,css:{maxWidth:"360px",pointerEvents:"auto"},part:["tooltip",g],style:n},v),{children:[jsx(bt,{style:ke}),o]}))}))]})})]}))}V.Close=e=>jsx(Y.Close,{"aria-label":"Close",asChild:!0,children:jsx(I.Plain,p(a({css:{top:"0px",right:"-6px"},part:"close",position:"absolute"},e),{children:jsx(XMarkIcon,{height:"20",fill:"currentColor"})}))});V.Media=t=>{var r=t,{src:e}=r,o=m(r,["src"]);return e==null?null:jsx(ce,a({borderRadius:"md md 0 0",borderWidth:"0",css:{aspectRatio:"2",objectFit:"cover"},margin:"-5 -5 0",src:e},o))};V.Primary=r=>{var n=r,{onClick:e,title:o}=n,t=m(n,["onClick","title"]);return o==null?null:jsx(I.Primary,a({title:o,onClick:e},t))};V.Progress=t=>{var r=t,{children:e}=r,o=m(r,["children"]);return e==null?null:jsx(F.Body2,p(a({part:"progress"},o),{children:e}))};V.Secondary=r=>{var n=r,{onClick:e,title:o}=n,t=m(n,["onClick","title"]);return o==null?null:jsx(I.Secondary,a({title:o,onClick:e},t))};V.Subtitle=t=>{var r=t,{children:e}=r,o=m(r,["children"]);return e==null?null:jsx(F.Body2,p(a({part:"subtitle"},o),{children:e}))};V.Title=t=>{var r=t,{children:e}=r,o=m(r,["children"]);return e==null?null:jsx(F.H4,p(a({part:"title"},o),{children:e}))};function Ft(c){var u=c,{dismissible:e=!0,flow:o,onDismiss:t,onEscapeKeyDown:r,onPrimary:n,onSecondary:i,step:s}=u,d=m(u,["dismissible","flow","onDismiss","onEscapeKeyDown","onPrimary","onSecondary","step"]);var D,B,O,A,w,R;let{handleDismiss:f}=de(o,{onDismiss:t}),{handlePrimary:h,handleSecondary:y}=se(s,{onPrimary:n,onSecondary:i}),b=(D=s.props)!=null?D:{},C=(O=(B=s.primaryButton)==null?void 0:B.title)!=null?O:s.primaryButtonTitle,g=(w=(A=s.secondaryButton)==null?void 0:A.title)!=null?w:s.secondaryButtonTitle,v=!!s.$state.blocked;return jsxs(V,p(a(a({anchor:s.selector,onOpenAutoFocus:k=>k.preventDefault(),onPointerDownOutside:k=>k.preventDefault(),onInteractOutside:k=>k.preventDefault()},d),b),{onEscapeKeyDown:k=>{typeof r=="function"&&r(k),k.defaultPrevented||f(k);},children:[e&&jsx(V.Close,{onClick:f}),jsx(V.Media,{src:(R=s.videoUri)!=null?R:s.imageUri,type:s.videoUri?"video":"image"}),jsxs(S.Column,{gap:1,part:"tooltip-header",children:[jsx(V.Title,{children:s.title}),jsx(V.Subtitle,{color:"neutral.400",children:s.subtitle})]}),jsxs(S.Row,{alignItems:"center",gap:3,justifyContent:"flex-end",part:"tooltip-footer",children:[o.getNumberOfAvailableSteps()>1&&jsx(V.Progress,{marginRight:"auto",transform:"translateY(1px)",children:`${o.getCurrentStepIndex()+1}/${o.getNumberOfAvailableSteps()}`}),jsx(V.Secondary,{disabled:v,onClick:y,title:g}),jsx(V.Primary,{disabled:v,onClick:h,title:C})]})]}),s.id)}function Te(e,o=!0){let{currentModal:t,modals:r,setModals:n}=useContext(E),[i,s]=useState(!1);useEffect(()=>{o&&(e!=null&&e.isVisible)&&e&&!r.has(e.id)&&n(c=>new Set(c).add(e.id));},[e==null?void 0:e.id,e==null?void 0:e.isVisible]),useEffect(()=>{let c=t===(e==null?void 0:e.id);o&&(e==null?void 0:e.id)!=null&&c!==i&&s(c);},[e==null?void 0:e.id,t]);function d(){o&&r.has(e==null?void 0:e.id)&&n(c=>{let u=new Set(c);return u.delete(e==null?void 0:e.id),u});}return {isCurrentModal:i||!o,removeModal:d}}function go(i){var s=i,{flowId:e,onComplete:o,variables:t,part:r}=s,n=m(s,["flowId","onComplete","variables","part"]);let[d,c]=useState(!1),{flow:u}=pe(e,{variables:t}),{hasInitialized:f,registerComponent:h,unregisterComponent:y}=useContext(E);de(u,{onComplete:o});let{isCurrentModal:b,removeModal:C}=Te(u);if(useEffect(()=>{!(u!=null&&u.isVisible)&&b&&C();},[u==null?void 0:u.isVisible,b]),useEffect(()=>()=>{y(e);},[]),u==null||u.isVisible===!1||!b||(h(e,()=>{d||c(!0);}),!f||!d))return null;let g=u.getCurrentStep();return g==null||g.start(),jsx(Ft,a({"data-flow-id":u.id,flow:u,part:["tour",r],step:g},n))}function vt(e){let[o,t]=useState(),{frigade:r}=useContext(E);return useEffect(()=>{H(this,null,function*(){let n=yield r.getCollection(e);if(!n||r.hasFailedToLoad()){t(void 0);return}t(n);});},[e]),{collection:o}}function yo(r){var n=r,{collectionId:e,part:o}=n,t=m(n,["collectionId","part"]);var f,h;let i={ANNOUNCEMENT:xo,BANNER:eo,CARD:P,CHECKLIST:Le,EMBEDDED_TIP:P,FORM:we,NPS_SURVEY:Ne,TOUR:go},[s,d]=useState(),{collection:c}=vt(e);useEffect(()=>{var b;if(c==null)return;let y=(b=c.flows.find(({flow:C})=>C.isVisible))==null?void 0:b.flow;y!=null&&d(y);},[c]);let u=(h=i[(f=s==null?void 0:s.rawData)==null?void 0:f.flowType])!=null?h:()=>null;return s==null||u==null?null:jsx(x,p(a({part:["collection",o],"data-collection-id":e},t),{children:jsx(u,{flowId:s.id})}))}function ve(){let{frigade:e}=useContext(E);return {frigade:e,isLoading:!(e!=null&&e.isReady())}}function Rt(){let[e,o]=useState(),{frigade:t}=ve();return useEffect(()=>{t.getCollections().then(r=>{r.forEach((n,i)=>{n.collectionType==="DEFAULT"&&o(i);});});},[]),e==null?null:jsx(yo,{as:null,collectionId:e})}var E=createContext({apiKey:"",modals:new Set,setModals:()=>{},currentModal:null,navigate:()=>{},hasInitialized:!1,registerComponent:()=>{},unregisterComponent:()=>{}});function kt(){let{frigade:e}=ve();return useEffect(()=>{H(this,null,function*(){(yield e.getFlows()).forEach(t=>{t.steps.forEach(r=>{if(r.imageUri){let n=new Image;n.src=r.imageUri;}});});});},[]),null}function Ht(s){var d=s,{children:e,css:o={},defaultCollection:t=!0,navigate:r,theme:n}=d,i=m(d,["children","css","defaultCollection","navigate","theme"]);let c=n?Je(n):{},[u,f]=useState(new Set),h=useRef(new Map),y=useRef(),[b,C]=useState(!1),g=useMemo(()=>(C(!1),y.current=void 0,f(new Set),new Frigade(i.apiKey,{apiKey:i.apiKey,apiUrl:i.apiUrl,userId:i.userId,groupId:i.groupId,userProperties:i.userProperties,groupProperties:i.groupProperties,generateGuestId:i.generateGuestId,syncOnWindowUpdates:i.syncOnWindowUpdates,__readOnly:i.__readOnly,__flowStateOverrides:i.__flowStateOverrides})),[i.userId,i.groupId,i.apiKey]);useEffect(()=>{if(i.__flowStateOverrides){let w=g.getConfig();w.__flowStateOverrides=i.__flowStateOverrides,g.reload(w);}},[i.__flowStateOverrides]);function v(){let w=[...h.current.entries()].map(([R,k])=>[R,k.callback]);g.batchRegister(w),C(!0);}function D(w,R){if(y.current&&clearTimeout(y.current),b){h.current.has(w)?g.getFlow(w).then(k=>R(k.isVisible)):(g.getFlow(w).then(k=>k.register(R)),h.current.set(w,{callback:R}));return}h.current.has(w)||h.current.set(w,{callback:R}),y.current&&clearTimeout(y.current),y.current=setTimeout(()=>v(),0);}function B(w){h.current.has(w)&&g.getFlow(w).then(R=>{h.current.delete(w),R==null||R.unregister();});}let O=r!=null?r:(w,R="_self")=>{window.open(w,R);};useEffect(()=>()=>{g.destroy();},[]);let A=u.size>0?u.values().next().value:null;return jsxs(E.Provider,{value:p(a({modals:u,setModals:f,currentModal:A,navigate:O},i),{frigade:g,registerComponent:D,unregisterComponent:B,hasInitialized:b}),children:[jsx(Global,{styles:{":root":a(a(a({},Xe),c),o)}}),jsxs(ThemeProvider,{theme:T,children:[t&&jsx(Rt,{}),e]}),i.preloadImages!==!1&&jsx(kt,{})]})}function pe(e,o){let[t,r]=useState(),[,n]=useState(""),{frigade:i}=useContext(E),s=useCallback(d=>{d.id===e&&(o!=null&&o.variables&&d.applyVariables(o.variables),setTimeout(()=>{r(d),n(Math.random().toString());},0));},[o==null?void 0:o.variables,i]);return useEffect(()=>{if(i!=null&&i.isReady())return H(this,null,function*(){let d=yield i.getFlow(e);if(!d||i.hasFailedToLoad()){r(void 0);return}o!=null&&o.variables&&d.applyVariables(o.variables),r(d);}),i.onStateChange(s),()=>{i.removeStateChangeHandler(s);}},[s,i]),useEffect(()=>{!(o!=null&&o.variables)||!t||s(t);},[o==null?void 0:o.variables]),{flow:t}}function J(h){var y=h,{as:e,children:o,dismissible:t=!1,flowId:r,onComplete:n,onDismiss:i,onPrimary:s,onSecondary:d,variables:c,forceMount:u}=y,f=m(y,["as","children","dismissible","flowId","onComplete","onDismiss","onPrimary","onSecondary","variables","forceMount"]);let[b,C]=useState(!1),{flow:g}=pe(r,{variables:c}),{hasInitialized:v,registerComponent:D,unregisterComponent:B}=useContext(E),O=g==null?void 0:g.getCurrentStep(),{handleDismiss:A}=de(g,{onComplete:n,onDismiss:i}),{handlePrimary:w,handleSecondary:R}=se(O,{onPrimary:s,onSecondary:d}),k=e&&typeof e=="function"&&e.displayName==="Dialog",{isCurrentModal:$,removeModal:xe}=Te(g,k);useEffect(()=>{!(g!=null&&g.isVisible)&&$&&xe();},[g==null?void 0:g.isVisible,$]),useEffect(()=>()=>{B(r);},[]);let re=u&&((g==null?void 0:g.isCompleted)||(g==null?void 0:g.isSkipped));if(!g||!re&&!$||(D(r,()=>{b||C(!0);}),!g.isVisible&&!re)||!v||!b)return null;(re||!g.isCompleted&&!g.isSkipped)&&O.start();let Re=e===null?Fragment$1:e!=null?e:x,ke=p(a({},f),{"data-flow-id":g.id});return jsx(Re,p(a({},e===null?{}:ke),{children:o({flow:g,handleDismiss:A,handlePrimary:w,handleSecondary:R,parentProps:{dismissible:t,flowId:r,variables:c,containerProps:ke},step:O})}))}function $t(t){var r=t,{part:e}=r,o=m(r,["part"]);return jsx(J,p(a({as:P,gap:5,borderColor:"neutral.border",borderStyle:"solid",borderWidth:"md",part:["card",e]},o),{children:({handleDismiss:n,handlePrimary:i,handleSecondary:s,parentProps:{dismissible:d},step:c})=>{var h,y,b,C;let u=(y=(h=c.primaryButton)==null?void 0:h.title)!=null?y:c.primaryButtonTitle,f=(C=(b=c.secondaryButton)==null?void 0:b.title)!=null?C:c.secondaryButtonTitle;return jsxs(Fragment,{children:[jsx(P.Header,{dismissible:d,handleDismiss:n,subtitle:c.subtitle,title:c.title}),jsx(P.Media,{src:c.imageUri,css:{objectFit:"contain",width:"100%"}}),jsxs(S.Row,{gap:3,justifyContent:"flex-end",part:"card-footer",children:[jsx(P.Secondary,{title:f,onClick:s}),jsx(P.Primary,{title:u,onClick:i})]})]})}}))}var P=Ze.forwardRef((n,r)=>{var i=n,{children:e,flowId:o}=i,t=m(i,["children","flowId"]);var d;if(o!=null)return jsx($t,a({flowId:o},t));let s=(d=t.as)!=null?d:S.Column;return jsx(s,p(a({backgroundColor:"neutral.background",borderColor:"neutral.border",borderStyle:"solid",borderRadius:"md",borderWidth:"0",gap:5,p:5},t),{ref:r,children:e}))});P.Dismiss=e=>jsx(I.Plain,p(a({part:"dismiss",padding:0},e),{children:jsx(XMarkIcon,{height:"20",fill:"currentColor"})}));P.Header=i=>{var s=i,{dismissible:e,handleDismiss:o,subtitle:t,title:r}=s,n=m(s,["dismissible","handleDismiss","subtitle","title"]);return jsxs(S.Row,p(a({alignItems:"flex-start",flexWrap:"wrap",gap:1,part:"card-header"},n),{children:[jsx(P.Title,{maxWidth:"calc(100% - 32px)",children:r}),e&&jsx(P.Dismiss,{onClick:o,marginLeft:"auto"}),jsx(P.Subtitle,{color:"neutral.400",flexBasis:"100%",children:t})]}))};P.Media=t=>{var r=t,{src:e}=r,o=m(r,["src"]);return e==null||(e==null?void 0:e.length)===0?null:jsx(ce,a({borderRadius:"md",src:e},o))};P.Primary=r=>{var n=r,{onClick:e,title:o}=n,t=m(n,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsx(I.Primary,a({title:o,onClick:e},t))};P.Secondary=r=>{var n=r,{onClick:e,title:o}=n,t=m(n,["onClick","title"]);return o==null||(o==null?void 0:o.length)===0?null:jsx(I.Secondary,a({title:o,onClick:e},t))};P.Subtitle=t=>{var r=t,{children:e}=r,o=m(r,["children"]);return e==null?null:jsx(F.Body2,p(a({display:"block",color:"neutral.400",part:"subtitle"},o),{children:e}))};P.Title=t=>{var r=t,{children:e}=r,o=m(r,["children"]);return e==null?null:jsx(F.H4,p(a({display:"block",part:"title"},o),{children:e}))};var je={content:["onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onInteractOutside"],root:["defaultOpen","modal","onOpenChange","open"]};function Nt(e){let o=Object.fromEntries(je.content.map(n=>[n,e[n]]).filter(n=>n[1]!==void 0)),t=Object.fromEntries(je.root.map(n=>[n,e[n]]).filter(n=>n[1]!==void 0)),r={};for(let n of Object.keys(e))!je.content.some(i=>i===n)&&!je.root.some(i=>i===n)&&(r[n]=e[n]);return {contentProps:o,otherProps:r,rootProps:t}}var fi=keyframes`
50
50
  from {
51
51
  opacity: 0;
52
52
  }
@@ -56,8 +56,8 @@ var So=Object.defineProperty,Kt=Object.defineProperties;var Ut=Object.getOwnProp
56
56
  to {
57
57
  opacity: 1;
58
58
  }
59
- `;function M(n){var i=n,{children:e,className:o,modal:t=!0}=i,r=m(i,["children","className","modal"]);let{rootProps:s,contentProps:d,otherProps:f}=Nt(r),h=f,{zIndex:c}=h,u=m(h,["zIndex"]);return jsx(z.Root,p(a({defaultOpen:!0,modal:t},s),{children:jsx(z.Portal,{children:jsxs(x,{animation:`${fi} 300ms ease-out`,className:o,display:"grid",inset:"0",padding:"6",part:"dialog-wrapper",pointerEvents:"none",position:"fixed",zIndex:c,children:[jsx(z.Overlay,{asChild:!0,children:jsx(x,{background:"rgb(0 0 0 / 0.5)",inset:"0",part:"dialog-overlay",position:"absolute"})}),jsx(z.Content,p(a({asChild:!0,onOpenAutoFocus:y=>y.preventDefault(),onPointerDownOutside:y=>y.preventDefault(),onInteractOutside:y=>y.preventDefault()},d),{children:jsx(P,p(a({alignSelf:"center",boxShadow:"md",justifySelf:"center",maxWidth:"430px",p:8,part:"dialog",pointerEvents:"auto",position:"relative"},u),{children:e}))}))]})})}))}M.Dismiss=e=>jsx(z.Close,{"aria-label":"Close",asChild:!0,children:jsx(I.Plain,p(a({part:"close",position:"absolute",right:"2px",top:"2px"},e),{children:jsx(XMarkIcon,{height:"20",fill:"currentColor"})}))});M.Subtitle=t=>{var r=t,{children:e}=r,o=m(r,["children"]);return jsx(z.Description,{asChild:!0,children:jsx(F.Body2,p(a({part:"subtitle"},o),{children:e}))})};M.Media=t=>{var r=t,{src:e}=r,o=m(r,["src"]);return e==null?null:jsx(ce,a({borderRadius:"md",src:e},o))};M.Primary=r=>{var n=r,{onClick:e,title:o}=n,t=m(n,["onClick","title"]);return o==null?null:jsx(I.Primary,a({title:o,onClick:e},t))};M.ProgressDots=({current:e,total:o})=>{if(o==1)return null;let t=[...Array(o)].map((r,n)=>jsx(x,{as:"circle",r:4,cx:4+16*n,cy:"4px",fill:e===n?T.colors.blue500:T.colors.blue800,part:e===n?"progress-dot-selected":"progress-dot"},n));return jsx(x,{as:"svg",height:"8px",marginInline:"auto",part:"progress",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8,children:t})};M.Secondary=r=>{var n=r,{onClick:e,title:o}=n,t=m(n,["onClick","title"]);return o==null?null:jsx(I.Secondary,a({title:o,onClick:e},t))};M.Title=t=>{var r=t,{children:e}=r,o=m(r,["children"]);return jsx(z.Title,{asChild:!0,children:jsx(F.H4,p(a({part:"title"},o),{children:e}))})};M.displayName="Dialog";var _t=["dismissible","flowId","forceMount","onComplete","onDismiss","onPrimary","onSecondary","variables"];function xo(r){var n=r,{flowId:e,part:o}=n,t=m(n,["flowId","part"]);let i=Object.fromEntries(Object.entries(t).filter(([d])=>_t.some(c=>d===c))),s=Object.fromEntries(Object.entries(t).filter(([d])=>_t.indexOf(d)===-1));return jsx(J,p(a({as:null,flowId:e},i),{children:({flow:d,handleDismiss:c,handlePrimary:u,handleSecondary:f,parentProps:{containerProps:h,dismissible:y},step:b})=>{var B,O,A,w,R,k;let C=(B=b.props)!=null?B:{},g=(A=(O=b.primaryButton)==null?void 0:O.title)!=null?A:b.primaryButtonTitle,v=(R=(w=b.secondaryButton)==null?void 0:w.title)!=null?R:b.secondaryButtonTitle,D=!!b.$state.blocked;return jsx(M,p(a(a({part:["announcement",o],textAlign:"center"},h),s),{onEscapeKeyDown:V=>{typeof t.onEscapeKeyDown=="function"&&t.onEscapeKeyDown(V),V.defaultPrevented||c(V);},children:jsxs(S.Column,p(a({gap:5,part:"announcement-step"},C),{children:[y&&jsx(M.Dismiss,{onClick:c}),jsxs(S.Column,{gap:1,part:"announcement-header",children:[jsx(M.Title,{children:b.title}),jsx(M.Subtitle,{children:b.subtitle})]}),jsx(M.Media,{src:(k=b.videoUri)!=null?k:b.imageUri,type:b.videoUri?"video":"image",css:{aspectRatio:"1.5",objectFit:"cover",width:"100%"}}),jsx(M.ProgressDots,{current:d.getCurrentStepIndex(),total:d.getNumberOfAvailableSteps()}),jsxs(S.Row,{css:{"& > button":{flexBasis:"50%",flexGrow:1}},gap:3,part:"announcement-footer",children:[v&&jsx(M.Secondary,{disabled:D,onClick:f,title:v}),g&&jsx(M.Primary,{disabled:D,onClick:u,title:g})]})]}))}))}}))}function xi(){let{userId:e,frigade:o}=useContext(E);function t(n){return H(this,null,function*(){yield o.identify(e,n);})}function r(n,i){return H(this,null,function*(){yield o.track(n,i);})}return {userId:e,addProperties:t,track:r}}function hi(){var n;let{frigade:e}=useContext(E);function o(i){return H(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,i);})}function t(i,s){return H(this,null,function*(){yield e.track(i,s);})}function r(i,s){return H(this,null,function*(){yield e.group(i,s);})}return {groupId:(n=e==null?void 0:e.config)==null?void 0:n.groupId,setGroupId:r,addProperties:o,track:t}}
59
+ `;function M(n){var i=n,{children:e,className:o,modal:t=!0}=i,r=m(i,["children","className","modal"]);let{rootProps:s,contentProps:d,otherProps:f}=Nt(r),h=f,{zIndex:c}=h,u=m(h,["zIndex"]);return jsx(z.Root,p(a({defaultOpen:!0,modal:t},s),{children:jsx(z.Portal,{children:jsxs(x,{animation:`${fi} 300ms ease-out`,className:o,display:"grid",inset:"0",padding:"6",part:"dialog-wrapper",pointerEvents:"none",position:"fixed",zIndex:c,children:[jsx(z.Overlay,{asChild:!0,children:jsx(x,{background:"rgb(0 0 0 / 0.5)",inset:"0",part:"dialog-overlay",position:"absolute"})}),jsx(z.Content,p(a({asChild:!0,onOpenAutoFocus:y=>y.preventDefault(),onPointerDownOutside:y=>y.preventDefault(),onInteractOutside:y=>y.preventDefault()},d),{children:jsx(P,p(a({alignSelf:"center",boxShadow:"md",justifySelf:"center",maxWidth:"430px",p:8,part:"dialog",pointerEvents:"auto",position:"relative"},u),{children:e}))}))]})})}))}M.Dismiss=e=>jsx(z.Close,{"aria-label":"Close",asChild:!0,children:jsx(I.Plain,p(a({part:"close",position:"absolute",right:"2px",top:"2px"},e),{children:jsx(XMarkIcon,{height:"20",fill:"currentColor"})}))});M.Subtitle=t=>{var r=t,{children:e}=r,o=m(r,["children"]);return jsx(z.Description,{asChild:!0,children:jsx(F.Body2,p(a({part:"subtitle"},o),{children:e}))})};M.Media=t=>{var r=t,{src:e}=r,o=m(r,["src"]);return e==null?null:jsx(ce,a({borderRadius:"md",src:e},o))};M.Primary=r=>{var n=r,{onClick:e,title:o}=n,t=m(n,["onClick","title"]);return o==null?null:jsx(I.Primary,a({title:o,onClick:e},t))};M.ProgressDots=({current:e,total:o})=>{if(o==1)return null;let t=[...Array(o)].map((r,n)=>jsx(x,{as:"circle",r:4,cx:4+16*n,cy:"4px",fill:e===n?T.colors.blue500:T.colors.blue800,part:e===n?"progress-dot-selected":"progress-dot"},n));return jsx(x,{as:"svg",height:"8px",marginInline:"auto",part:"progress",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8,children:t})};M.Secondary=r=>{var n=r,{onClick:e,title:o}=n,t=m(n,["onClick","title"]);return o==null?null:jsx(I.Secondary,a({title:o,onClick:e},t))};M.Title=t=>{var r=t,{children:e}=r,o=m(r,["children"]);return jsx(z.Title,{asChild:!0,children:jsx(F.H4,p(a({part:"title"},o),{children:e}))})};M.displayName="Dialog";var _t=["dismissible","flowId","forceMount","onComplete","onDismiss","onPrimary","onSecondary","variables"];function xo(r){var n=r,{flowId:e,part:o}=n,t=m(n,["flowId","part"]);let i=Object.fromEntries(Object.entries(t).filter(([d])=>_t.some(c=>d===c))),s=Object.fromEntries(Object.entries(t).filter(([d])=>_t.indexOf(d)===-1));return jsx(J,p(a({as:null,flowId:e},i),{children:({flow:d,handleDismiss:c,handlePrimary:u,handleSecondary:f,parentProps:{containerProps:h,dismissible:y},step:b})=>{var B,O,A,w,R,k;let C=(B=b.props)!=null?B:{},g=(A=(O=b.primaryButton)==null?void 0:O.title)!=null?A:b.primaryButtonTitle,v=(R=(w=b.secondaryButton)==null?void 0:w.title)!=null?R:b.secondaryButtonTitle,D=!!b.$state.blocked;return jsx(M,p(a(a({part:["announcement",o],textAlign:"center"},h),s),{onEscapeKeyDown:$=>{if(t.dismissible===!1){$.preventDefault();return}typeof t.onEscapeKeyDown=="function"&&t.onEscapeKeyDown($),$.defaultPrevented||c($);},children:jsxs(S.Column,p(a({gap:5,part:"announcement-step"},C),{children:[y&&jsx(M.Dismiss,{onClick:c}),jsxs(S.Column,{gap:1,part:"announcement-header",children:[jsx(M.Title,{children:b.title}),jsx(M.Subtitle,{children:b.subtitle})]}),jsx(M.Media,{src:(k=b.videoUri)!=null?k:b.imageUri,type:b.videoUri?"video":"image",css:{aspectRatio:"1.5",objectFit:"cover",width:"100%"}}),jsx(M.ProgressDots,{current:d.getCurrentStepIndex(),total:d.getNumberOfAvailableSteps()}),jsxs(S.Row,{css:{"& > button":{flexBasis:"50%",flexGrow:1}},gap:3,part:"announcement-footer",children:[v&&jsx(M.Secondary,{disabled:D,onClick:f,title:v}),g&&jsx(M.Primary,{disabled:D,onClick:u,title:g})]})]}))}))}}))}function xi(){let{userId:e,frigade:o}=useContext(E);function t(n){return H(this,null,function*(){yield o.identify(e,n);})}function r(n,i){return H(this,null,function*(){yield o.track(n,i);})}return {userId:e,addProperties:t,track:r}}function hi(){var n;let{frigade:e}=useContext(E);function o(i){return H(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,i);})}function t(i,s){return H(this,null,function*(){yield e.track(i,s);})}function r(i,s){return H(this,null,function*(){yield e.group(i,s);})}return {groupId:(n=e==null?void 0:e.config)==null?void 0:n.groupId,setGroupId:r,addProperties:o,track:t}}
60
60
 
61
- export { xo as Announcement, eo as Banner, oe as BaseField, x as Box, I as Button, P as Card, $e as Checklist, yo as Collection, M as Dialog, S as Flex, J as Flow, we as Form, io as Label, Ae as Progress, Ht as Provider, ao as RadioField, so as SelectField, _e as Survey, F as Text, lo as TextField, $ as Tooltip, go as Tour, Xe as themeVariables, Oe as tokens, ze as useBoundingClientRect, pe as useFlow, de as useFlowHandlers, ve as useFrigade, hi as useGroup, Te as useModal, se as useStepHandlers, xi as useUser };
61
+ export { xo as Announcement, eo as Banner, oe as BaseField, x as Box, I as Button, P as Card, $e as Checklist, yo as Collection, M as Dialog, S as Flex, J as Flow, we as Form, io as Label, Ae as Progress, Ht as Provider, ao as RadioField, so as SelectField, _e as Survey, F as Text, lo as TextField, V as Tooltip, go as Tour, Xe as themeVariables, Oe as tokens, ze as useBoundingClientRect, pe as useFlow, de as useFlowHandlers, ve as useFrigade, hi as useGroup, Te as useModal, se as useStepHandlers, xi as useUser };
62
62
  //# sourceMappingURL=out.js.map
63
63
  //# sourceMappingURL=index.js.map