@frigade/react 1.32.15 → 1.32.17
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/lib/index.js +250 -250
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +247 -247
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import{ThemeProvider as ra}from"styled-components";import nt,{useContext as ea,useEffect as so,useState as Mo}from"react";import{useCallback as tt,useContext as Is,useEffect as Es}from"react";import bo,{useMemo as Cs}from"react";var Xo="1.32.15 ";var fe="https://api.frigade.com/v1/public/",ye="NOT_STARTED_STEP",Q="COMPLETED_FLOW",Kt="ABORTED_FLOW",et="STARTED_FLOW",Ee="NOT_STARTED_FLOW",Fe="COMPLETED_STEP",Yt="STARTED_STEP";function Ae(){let{publicApiKey:e,userId:t}=bo.useContext(V);return{config:Cs(()=>({headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json","X-Frigade-SDK-Version":Xo,"X-Frigade-SDK-Platform":"React"}}),[e,t])}}function ut(){let{shouldGracefullyDegrade:e}=bo.useContext(V);return async(t,o)=>{if(e)return console.log(`Skipping ${t} call to Frigade due to error`),qt();let i;try{i=await fetch(t,o)}catch(r){return qt(r)}return i?i.ok?i:qt(i.statusText):qt()}}function qt(e){return e&&console.log("Call to Frigade failed",e),{json:()=>({})}}function ft(){let{publicApiKey:e,shouldGracefullyDegrade:t}=bo.useContext(V);function o(){if(t){console.error("Frigade hooks cannot be used when Frigade SDK has failed to initialize");return}e||console.error("Frigade hooks cannot be used outside the scope of FrigadeProvider")}return{verifySDKInitiated:o}}import{useContext as ks,useState as Jo}from"react";import{useContext as ys,useEffect as bs,useState as Ts}from"react";import ws from"swr";import{useContext as Ss}from"react";function ke(){let{openFlowStates:e,setOpenFlowStates:t,hasActiveFullPageFlow:o}=Ss(V);function i(p,d=!1){return e[p]??d}function r(p,d){t(l=>({...l,[p]:d}))}function n(p){t(d=>{let{[p]:l,...h}=d;return{...h}})}function s(){return Object.values(e).some(p=>p)||o}return{getOpenFlowState:i,setOpenFlowState:r,resetOpenFlowState:n,hasOpenModals:s}}var Fs="unknown";function be(){let{config:e}=Ae(),{publicApiKey:t,userId:o,flows:i,setShouldGracefullyDegrade:r}=ys(V),{resetOpenFlowState:n}=ke(),[s,p]=Ts(!1),d={data:i.map(P=>({flowId:P.id,flowState:Q,lastStepId:null,userId:o,foreignUserId:o,stepStates:{},shouldTrigger:!1}))},l=P=>fetch(P,e).then(c=>{if(c.ok)return c.json();throw new Error("Failed to fetch user flow states")}).catch(c=>(console.log(`Error fetching ${P}: ${c}. Will gracefully degrade and hide Frigade`),r(!0),d)),{data:h,isLoading:m,mutate:u,error:w}=ws(t&&i&&o?`${fe}userFlowStates?foreignUserId=${encodeURIComponent(o)}`:null,l,{keepPreviousData:!0,errorRetryInterval:1e4,errorRetryCount:3,onError:()=>d,onLoadingSlow:()=>d}),x=h==null?void 0:h.data;bs(()=>{!s&&!m&&x&&p(!0)},[x,s,m]);async function S(P){if(x){let c=x.find(f=>f.flowId===P);c&&c.flowState!==Q&&(c.flowState=Q),await u(Promise.resolve({...h,data:x}),{optimisticData:{...h,data:x},revalidate:!1,rollbackOnError:!1})}}async function y(P,c,f){if(x){let T=x.find(v=>v.flowId===P);T&&(T.stepStates[c]=f,T.flowState=et),await u(Promise.resolve({...h,data:x}),{optimisticData:{...h,data:x},revalidate:!1,rollbackOnError:!1})}}async function I(P,c,f){if(x){let T=x.find(v=>v.flowId===P);T&&(T.lastStepId=c,T.stepStates[c]=f,T.flowState=et),await u({...h,data:x},{optimisticData:{...h,data:x},revalidate:!1,rollbackOnError:!1})}}async function k(P){if(x){let c=x.find(f=>f.flowId===P);c&&c.flowState!==Ee&&(c.flowState=Ee,c.lastStepId=Fs,Object.keys(c.stepStates).forEach(f=>{c.stepStates[f].actionType=ye,c.stepStates[f].createdAt=new Date().toISOString()}),await u({...h,data:x},{optimisticData:{...h,data:x},revalidate:!1,rollbackOnError:!1}),n(P))}}async function E(P,c){if(x){let f=x.find(T=>T.flowId===P);f&&f.stepStates[c]!==ye&&(f.stepStates[c]=ye),await u({...h,data:x},{optimisticData:{...h,data:x},revalidate:!1,rollbackOnError:!1})}}return{userFlowStatesData:x,isLoadingUserFlowStateData:!s,mutateUserFlowState:u,optimisticallyMarkFlowCompleted:S,optimisticallyMarkFlowNotStarted:k,optimisticallyMarkStepCompleted:y,optimisticallyMarkStepNotStarted:E,optimisticallyMarkStepStarted:I,error:w}}function At(){let{config:e}=Ae(),{userFlowStatesData:t,mutateUserFlowState:o}=be(),{failedFlowResponses:i,setFailedFlowResponses:r,flowResponses:n,setFlowResponses:s}=ks(V),[p,d]=Jo(new Set),[l,h]=Jo(new Set),m=ut();function u(S){let y=JSON.stringify(S);if(p.has(y))return null;p.add(y),d(p),l.add(S),h(l);let I=n==null?void 0:n.find(k=>k.flowSlug===S.flowSlug&&k.stepId===S.stepId&&k.actionType===S.actionType&&k.createdAt===S.createdAt);return m(`${fe}flowResponses`,{...e,method:"POST",body:y}).then(k=>{k.status!==200&&k.status!==201?(console.log("Failed to send flow response for step "+S.stepId+". Will retry again later."),r([...i,S])):I||s(E=>[...E??[],S])})}async function w(S){S.foreignUserId&&(S.actionType===et||S.actionType===Ee?await u(S):S.actionType===Q?await u(S):S.actionType===Yt?await u(S):S.actionType===Fe?await u(S):S.actionType===Kt?await u(S):S.actionType===ye&&await u(S))}function x(){let S=[];return t==null||t.forEach(y=>{if(y&&y.stepStates&&Object.keys(y.stepStates).length!==0)for(let I in y.stepStates){let k=y.stepStates[I];S.push({foreignUserId:y.foreignUserId,flowSlug:y.flowId,stepId:k.stepId,actionType:k.actionType,data:{},createdAt:new Date(k.createdAt),blocked:k.blocked,hidden:k.hidden})}}),[...S,...n]}return{addResponse:w,setFlowResponses:s,getFlowResponses:x}}import As from"swr";var Ps=/user.flow\(([^\)]+)\) == '?COMPLETED_FLOW'?/gm,Qo=e=>{let t=Ps.exec(e);if(t===null)return null;let o=null;return t.forEach((i,r)=>{let n=vs(i,"'","");n.startsWith("flow_")&&(o=n)}),o},vs=function(e,t,o){return e.replace(new RegExp(t,"g"),o)};function K(){let{config:e}=Ae(),{flows:t,setFlows:o,userId:i,publicApiKey:r,customVariables:n,setCustomVariables:s,hasActiveFullPageFlow:p,setHasActiveFullPageFlow:d,setFlowResponses:l,setShouldGracefullyDegrade:h}=Is(V),m={data:[]},{verifySDKInitiated:u}=ft(),{addResponse:w,getFlowResponses:x}=At(),S=g=>fetch(g,e).then(b=>b.ok?b.json():(console.log(`Error fetching ${g} (${b.status}): ${b.statusText}. .Will gracefully degrade and hide Frigade`),h(!0),m)).catch(b=>(console.log(`Error fetching ${g}: ${b}. Will gracefully degrade and hide Frigade`),h(!0),m)),{userFlowStatesData:y,isLoadingUserFlowStateData:I,optimisticallyMarkFlowCompleted:k,optimisticallyMarkFlowNotStarted:E,optimisticallyMarkStepCompleted:P,optimisticallyMarkStepNotStarted:c,optimisticallyMarkStepStarted:f}=be(),{data:T,error:v,isLoading:$}=As(r?`${fe}flows`:null,S,{keepPreviousData:!0});Es(()=>{if(v){console.error(v);return}T&&T.data&&(T.data=o(T.data))},[T,v]);function U(g){let b=t.find(C=>C.slug===g);return!b&&t.length>0&&!I&&!$?(console.log(`Flow with slug ${g} not found`),null):b.active===!1?null:b}function _(g){var N;if(!U(g))return[];let b=U(g).data;return b?(b=A(b),(((N=JSON.parse(b))==null?void 0:N.data)??[]).map(Z=>{let Et=$e(Z);return{handleSecondaryButtonClick:()=>{Z.skippable===!0&&M(g,Z.id,{skipped:!0})},...Z,complete:B(g,Z.id)===Fe||Et>=1,blocked:re(g,Z.id),hidden:Me(g,Z.id),handlePrimaryButtonClick:()=>{(!Z.completionCriteria&&(Z.autoMarkCompleted||Z.autoMarkCompleted===void 0)||Z.completionCriteria&&Z.autoMarkCompleted===!0)&&M(g,Z.id)},progress:Et}}).filter(Z=>Z.hidden!==!0)):[]}function A(g){return g.replace(/\${(.*?)}/g,(b,C)=>n[C]!==void 0?String(n[C]):"")}function W(g){if(!U(g))return[];let b=U(g).data;return b?(b=A(b),JSON.parse(b)??{}):[]}function O(g,b){s(C=>({...C,[g]:b}))}function q(g){!I&&!$&&g&&JSON.stringify(n)!=JSON.stringify({...n,...g})&&Object.keys(g).forEach(b=>{O(b,g[b])})}let z=tt(async(g,b,C)=>{u();let N={foreignUserId:i,flowSlug:g,stepId:b,actionType:Yt,data:C??{},createdAt:new Date,blocked:!1,hidden:!1};pe(N)&&(await f(g,b,N),w(N))},[i,y]),G=tt(async(g,b,C)=>{u();let N={foreignUserId:i,flowSlug:g,stepId:b,actionType:ye,data:C??{},createdAt:new Date,blocked:!1,hidden:!1};pe(N)&&(await c(g,b),w(N))},[i,y]),M=tt(async(g,b,C)=>{u();let N={foreignUserId:i,flowSlug:g,stepId:b,actionType:Fe,data:C??{},createdAt:new Date,blocked:!1,hidden:!1};pe(N)&&(await P(g,b,N),w(N))},[i,y]),J=tt(async(g,b)=>{u();let C={foreignUserId:i,flowSlug:g,stepId:"unknown",actionType:Ee,data:b??{},createdAt:new Date,blocked:!1,hidden:!1};await E(g),pe(C)&&w(C)},[i,y]),j=tt(async(g,b)=>{u();let C={foreignUserId:i,flowSlug:g,stepId:"unknown",actionType:et,data:b??{},createdAt:new Date,blocked:!1,hidden:!1};pe(C)&&w(C)},[i,y]),Y=tt(async(g,b)=>{u();let C={foreignUserId:i,flowSlug:g,stepId:"unknown",actionType:Q,data:b??{},createdAt:new Date,blocked:!1,hidden:!1};pe(C)&&(await k(g),w(C))},[i,y]),Ve=tt(async(g,b)=>{u();let C={foreignUserId:i,flowSlug:g,stepId:"unknown",actionType:Kt,data:b??{},createdAt:new Date,blocked:!1,hidden:!1};pe(C)&&(await k(g),w(C))},[i,y]);function pe(g){var b;if(!y&&g.actionType===ye)return!1;if(y){let C=y.find(N=>N.flowId===g.flowSlug);if(g.actionType===ye&&(!(C!=null&&C.stepStates[g.stepId])||C.stepStates[g.stepId].actionType===ye)||C&&((b=C.stepStates[g.stepId])==null?void 0:b.actionType)===g.actionType)return!1}return!0}function B(g,b){let C=ie(g,b);return I?null:C?C.actionType:ye}function re(g,b){let C=ie(g,b);return C?C.blocked:!1}function Me(g,b){let C=ie(g,b);return C?C.hidden:!1}function ie(g,b){if(I)return null;let C=y==null?void 0:y.find(N=>N.flowId===g);return!C||!C.stepStates[b]?null:C.stepStates[b]??null}function me(g){var C;if(I||!y)return null;if(Re(g)===Ee)return _(g)[0]??null;let b=(C=y.find(N=>N.flowId===g))==null?void 0:C.lastStepId;return b?_(g).find(N=>N.id===b):null}function qe(g){let b=me(g);if(!b)return 0;let C=_(g).findIndex(N=>N.id===b.id)??0;return B(g,b.id)===Fe&&C<_(g).length-1?C+1:C}function $e(g){if(!g.completionCriteria)return;let b=Qo(g.completionCriteria);if(b===null)return;let C=we(b),N=H(b);return N===0?void 0:C/N}function Re(g){let b=y==null?void 0:y.find(C=>C.flowId===g);return b?b.flowState:null}function we(g){let b=_(g);return b.length===0?0:b.filter(N=>B(g,N.id)===Fe).length}function H(g){return _(g).length}function Se(g){return JSON.parse(t.find(b=>b.slug===g).data)}function mt(g){if(I)return!0;if(g!=null&&g.targetingLogic&&y){let b=y.find(C=>C.flowId===g.slug);if(b)return b.shouldTrigger===!1}return!!(g!=null&&g.targetingLogic&&i&&i.startsWith("guest_"))}function yo(g){return!mt(U(g))}return{getFlow:U,getFlowData:Se,isLoading:I||$,getStepStatus:B,getFlowSteps:_,getCurrentStepIndex:qe,markStepStarted:z,markStepCompleted:M,markFlowNotStarted:J,markFlowStarted:j,markFlowCompleted:Y,markFlowAborted:Ve,markStepNotStarted:G,getFlowStatus:Re,getNumberOfStepsCompleted:we,getNumberOfSteps:H,targetingLogicShouldHideFlow:mt,setCustomVariable:O,updateCustomVariables:q,customVariables:n,getStepOptionalProgress:$e,getFlowMetadata:W,isStepBlocked:re,isStepHidden:Me,hasActiveFullPageFlow:p,setHasActiveFullPageFlow:d,isFlowAvailableToUser:yo}}import{useCallback as Zo,useContext as Bs,useEffect as Ls}from"react";var gt="guest_";function To(){let{userId:e,organizationId:t,setUserId:o,setUserProperties:i,shouldGracefullyDegrade:r}=Bs(V),{config:n}=Ae(),{mutateUserFlowState:s}=be(),p=ut(),{verifySDKInitiated:d}=ft();Ls(()=>{if(e&&!t){if(e.startsWith(gt))return;let m=`frigade-user-registered-${e}`;localStorage.getItem(m)||(p(`${fe}users`,{...n,method:"POST",body:JSON.stringify({foreignId:e})}),localStorage.setItem(m,"true"))}},[e,r,t]);let l=Zo(async m=>{d();let u={foreignId:e,properties:m};await p(`${fe}users`,{...n,method:"POST",body:JSON.stringify(u)}),i(w=>({...w,...m})),s()},[e,n,r,s]),h=Zo(async(m,u)=>{d();let x={foreignId:e,events:[{event:m,properties:u}]};await p(`${fe}users`,{...n,method:"POST",body:JSON.stringify(x)}),s()},[e,n,s]);return{userId:e,setUserId:o,addPropertiesToUser:l,trackEventForUser:h}}import{v4 as ta}from"uuid";import Be,{useEffect as Jl,useState as Ql}from"react";import Ue,{useEffect as Us}from"react";import Jt from"styled-components";import Os from"react";import Ns from"styled-components";var Ro="fr-",Bt="cfr-";function a(e,t){let o=`${Ro}${e}`;if(!t)return o;if(t.styleOverrides&&t.styleOverrides[e]){if(typeof t.styleOverrides[e]=="string")return o+" "+t.styleOverrides[e];if(typeof t.styleOverrides[e]=="object")return o+" "+Bt+e}return o}function F(e){if(!e.className||e.className.indexOf(Bt)!==-1)return"";let o=e.className.replace(/\s+/g," ").split(" ");return o.length==1&&o[0].startsWith(Ro)?"":`:not(${o.map(i=>`.${i}`).join(", ")})`}function wo(e){return e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase()}function ot(e){return e!=null&&e.styleOverrides?Object.keys(e.styleOverrides).map(t=>`${wo(t)}: ${e.styleOverrides[t]};`).join(" "):""}function xe(...e){return e.filter(Boolean).join(" ")}function er(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Ds=Ns.div`
|
|
2
|
+
import at,{createContext as ia,useEffect as $o,useState as Pe}from"react";import{ThemeProvider as na}from"styled-components";import lt,{useContext as oa,useEffect as so,useState as Mo}from"react";import{useCallback as rt,useContext as As,useEffect as Bs}from"react";import bo,{useMemo as ys}from"react";var Jo="1.32.17 ";var ue="https://api.frigade.com/v1/public/",ye="NOT_STARTED_STEP",Z="COMPLETED_FLOW",Kt="ABORTED_FLOW",ot="STARTED_FLOW",Ae="NOT_STARTED_FLOW",we="COMPLETED_STEP",Yt="STARTED_STEP";function Be(){let{publicApiKey:e,userId:t}=bo.useContext(V);return{config:ys(()=>({headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json","X-Frigade-SDK-Version":Jo,"X-Frigade-SDK-Platform":"React"}}),[e,t])}}function ft(){let{shouldGracefullyDegrade:e}=bo.useContext(V);return async(t,o)=>{if(e)return console.log(`Skipping ${t} call to Frigade due to error`),qt();let i;try{i=await fetch(t,o)}catch(r){return qt(r)}return i?i.ok?i:qt(i.statusText):qt()}}function qt(e){return e&&console.log("Call to Frigade failed",e),{json:()=>({})}}function gt(){let{publicApiKey:e,shouldGracefullyDegrade:t}=bo.useContext(V);function o(){if(t){console.error("Frigade hooks cannot be used when Frigade SDK has failed to initialize");return}e||console.error("Frigade hooks cannot be used outside the scope of FrigadeProvider")}return{verifySDKInitiated:o}}import{useContext as vs,useState as Qo}from"react";import{useContext as Ts,useEffect as ws,useState as Fs}from"react";import ks from"swr";import{useContext as bs}from"react";function Fe(){let{openFlowStates:e,setOpenFlowStates:t,hasActiveFullPageFlow:o}=bs(V);function i(p,d=!1){return e[p]??d}function r(p,d){t(l=>({...l,[p]:d}))}function n(p){t(d=>{let{[p]:l,...h}=d;return{...h}})}function s(){return Object.values(e).some(p=>p)||o}return{getOpenFlowState:i,setOpenFlowState:r,resetOpenFlowState:n,hasOpenModals:s}}var Ps="unknown";function be(){let{config:e}=Be(),{publicApiKey:t,userId:o,flows:i,setShouldGracefullyDegrade:r}=Ts(V),{resetOpenFlowState:n}=Fe(),[s,p]=Fs(!1),d={data:i.map(P=>({flowId:P.id,flowState:Z,lastStepId:null,userId:o,foreignUserId:o,stepStates:{},shouldTrigger:!1}))},l=P=>fetch(P,e).then(c=>{if(c.ok)return c.json();throw new Error("Failed to fetch user flow states")}).catch(c=>(console.log(`Error fetching ${P}: ${c}. Will gracefully degrade and hide Frigade`),r(!0),d)),{data:h,isLoading:m,mutate:u,error:T}=ks(t&&i&&o?`${ue}userFlowStates?foreignUserId=${encodeURIComponent(o)}`:null,l,{keepPreviousData:!0,errorRetryInterval:1e4,errorRetryCount:3,onError:()=>d,onLoadingSlow:()=>d}),x=h==null?void 0:h.data;ws(()=>{!s&&!m&&x&&p(!0)},[x,s,m]);async function C(P){if(x){let c=x.find(f=>f.flowId===P);c&&c.flowState!==Z&&(c.flowState=Z),await u(Promise.resolve({...h,data:x}),{optimisticData:{...h,data:x},revalidate:!1,rollbackOnError:!1})}}async function S(P,c,f){if(x){let b=x.find(E=>E.flowId===P);b&&(b.stepStates[c]=f,b.flowState=ot),await u(Promise.resolve({...h,data:x}),{optimisticData:{...h,data:x},revalidate:!1,rollbackOnError:!1})}}async function I(P,c,f){if(x){let b=x.find(E=>E.flowId===P);b&&(b.lastStepId=c,b.stepStates[c]=f,b.flowState=ot),await u({...h,data:x},{optimisticData:{...h,data:x},revalidate:!1,rollbackOnError:!1})}}async function F(P){if(x){let c=x.find(f=>f.flowId===P);c&&c.flowState!==Ae&&(c.flowState=Ae,c.lastStepId=Ps,Object.keys(c.stepStates).forEach(f=>{c.stepStates[f].actionType=ye,c.stepStates[f].createdAt=new Date().toISOString()}),await u({...h,data:x},{optimisticData:{...h,data:x},revalidate:!1,rollbackOnError:!1}),n(P))}}async function A(P,c){if(x){let f=x.find(b=>b.flowId===P);f&&f.stepStates[c]!==ye&&(f.stepStates[c]=ye),await u({...h,data:x},{optimisticData:{...h,data:x},revalidate:!1,rollbackOnError:!1})}}return{userFlowStatesData:x,isLoadingUserFlowStateData:!s,mutateUserFlowState:u,optimisticallyMarkFlowCompleted:C,optimisticallyMarkFlowNotStarted:F,optimisticallyMarkStepCompleted:S,optimisticallyMarkStepNotStarted:A,optimisticallyMarkStepStarted:I,error:T}}function At(){let{config:e}=Be(),{userFlowStatesData:t,mutateUserFlowState:o}=be(),{failedFlowResponses:i,setFailedFlowResponses:r,flowResponses:n,setFlowResponses:s}=vs(V),[p,d]=Qo(new Set),[l,h]=Qo(new Set),m=ft();function u(C){let S=JSON.stringify(C);if(p.has(S))return null;p.add(S),d(p),l.add(C),h(l);let I=n==null?void 0:n.find(F=>F.flowSlug===C.flowSlug&&F.stepId===C.stepId&&F.actionType===C.actionType&&F.createdAt===C.createdAt);return m(`${ue}flowResponses`,{...e,method:"POST",body:S}).then(F=>{F.status!==200&&F.status!==201?(console.log("Failed to send flow response for step "+C.stepId+". Will retry again later."),r([...i,C])):I||s(A=>[...A??[],C])})}async function T(C){C.foreignUserId&&(C.actionType===ot||C.actionType===Ae?await u(C):C.actionType===Z?await u(C):C.actionType===Yt?await u(C):C.actionType===we?await u(C):C.actionType===Kt?await u(C):C.actionType===ye&&await u(C))}function x(){let C=[];return t==null||t.forEach(S=>{if(S&&S.stepStates&&Object.keys(S.stepStates).length!==0)for(let I in S.stepStates){let F=S.stepStates[I];C.push({foreignUserId:S.foreignUserId,flowSlug:S.flowId,stepId:F.stepId,actionType:F.actionType,data:{},createdAt:new Date(F.createdAt),blocked:F.blocked,hidden:F.hidden})}}),[...C,...n]}return{addResponse:T,setFlowResponses:s,getFlowResponses:x}}import Os from"swr";var Es=/user.flow\(([^\)]+)\) == '?COMPLETED_FLOW'?/gm,Zo=e=>{let t=Es.exec(e);if(t===null)return null;let o=null;return t.forEach((i,r)=>{let n=Is(i,"'","");n.startsWith("flow_")&&(o=n)}),o},Is=function(e,t,o){return e.replace(new RegExp(t,"g"),o)};function Y(){let{config:e}=Be(),{flows:t,setFlows:o,userId:i,publicApiKey:r,customVariables:n,setCustomVariables:s,hasActiveFullPageFlow:p,setHasActiveFullPageFlow:d,setFlowResponses:l,setShouldGracefullyDegrade:h}=As(V),m={data:[]},{verifySDKInitiated:u}=gt(),{addResponse:T,getFlowResponses:x}=At(),C=g=>fetch(g,e).then(y=>y.ok?y.json():(console.log(`Error fetching ${g} (${y.status}): ${y.statusText}. .Will gracefully degrade and hide Frigade`),h(!0),m)).catch(y=>(console.log(`Error fetching ${g}: ${y}. Will gracefully degrade and hide Frigade`),h(!0),m)),{userFlowStatesData:S,isLoadingUserFlowStateData:I,optimisticallyMarkFlowCompleted:F,optimisticallyMarkFlowNotStarted:A,optimisticallyMarkStepCompleted:P,optimisticallyMarkStepNotStarted:c,optimisticallyMarkStepStarted:f}=be(),{data:b,error:E,isLoading:$}=Os(r?`${ue}flows`:null,C,{keepPreviousData:!0});Bs(()=>{if(E){console.error(E);return}b&&b.data&&(b.data=o(b.data))},[b,E]);function U(g){let y=t.find(k=>k.slug===g);return!y&&t.length>0&&!I&&!$?(console.log(`Flow with slug ${g} not found`),null):y.active===!1?null:y}function W(g){var v;if(!U(g))return[];let y=U(g).data;return y?(y=B(y),(((v=JSON.parse(y))==null?void 0:v.data)??[]).map(K=>{let tt=Ue(K);return{handleSecondaryButtonClick:()=>{K.skippable===!0&&M(g,K.id,{skipped:!0})},...K,complete:O(g,K.id)===we||tt>=1,blocked:re(g,K.id),hidden:$e(g,K.id),handlePrimaryButtonClick:()=>{(!K.completionCriteria&&(K.autoMarkCompleted||K.autoMarkCompleted===void 0)||K.completionCriteria&&K.autoMarkCompleted===!0)&&M(g,K.id)},progress:tt}}).filter(K=>K.hidden!==!0)):[]}function B(g){return g.replace(/\${(.*?)}/g,(y,k)=>n[k]!==void 0?String(n[k]):"")}function H(g){if(!U(g))return[];let y=U(g).data;return y?(y=B(y),JSON.parse(y)??{}):[]}function N(g,y){s(k=>({...k,[g]:y}))}function q(g){!I&&!$&&g&&JSON.stringify(n)!=JSON.stringify({...n,...g})&&Object.keys(g).forEach(y=>{N(y,g[y])})}let z=rt(async(g,y,k)=>{u();let v={foreignUserId:i,flowSlug:g,stepId:y,actionType:Yt,data:k??{},createdAt:new Date,blocked:!1,hidden:!1};ae(v)&&(await f(g,y,v),T(v))},[i,S]),G=rt(async(g,y,k)=>{u();let v={foreignUserId:i,flowSlug:g,stepId:y,actionType:ye,data:k??{},createdAt:new Date,blocked:!1,hidden:!1};ae(v)&&(await c(g,y),T(v))},[i,S]),M=rt(async(g,y,k)=>{u();let v={foreignUserId:i,flowSlug:g,stepId:y,actionType:we,data:k??{},createdAt:new Date,blocked:!1,hidden:!1};ae(v)&&(await P(g,y,v),T(v))},[i,S]),Q=rt(async(g,y)=>{u();let k={foreignUserId:i,flowSlug:g,stepId:"unknown",actionType:Ae,data:y??{},createdAt:new Date,blocked:!1,hidden:!1};await A(g),ae(k)&&T(k)},[i,S]),j=rt(async(g,y)=>{u();let k={foreignUserId:i,flowSlug:g,stepId:"unknown",actionType:ot,data:y??{},createdAt:new Date,blocked:!1,hidden:!1};ae(k)&&T(k)},[i,S]),X=rt(async(g,y)=>{u();let k={foreignUserId:i,flowSlug:g,stepId:"unknown",actionType:Z,data:y??{},createdAt:new Date,blocked:!1,hidden:!1};ae(k)&&(await F(g),T(k))},[i,S]),Ke=rt(async(g,y)=>{u();let k={foreignUserId:i,flowSlug:g,stepId:"unknown",actionType:Kt,data:y??{},createdAt:new Date,blocked:!1,hidden:!1};ae(k)&&(await F(g),T(k))},[i,S]);function ae(g){var y;if(!S&&g.actionType===ye)return!1;if(S){let k=S.find(v=>v.flowId===g.flowSlug);if(g.actionType===ye&&(!(k!=null&&k.stepStates[g.stepId])||k.stepStates[g.stepId].actionType===ye)||k&&((y=k.stepStates[g.stepId])==null?void 0:y.actionType)===g.actionType)return!1}return!0}function O(g,y){let k=he(g,y);return I?null:k?k.actionType:ye}function re(g,y){let k=he(g,y);return k?k.blocked:!1}function $e(g,y){let k=he(g,y);return k?k.hidden:!1}function he(g,y){if(I)return null;let k=S==null?void 0:S.find(v=>v.flowId===g);return!k||!k.stepStates[y]?null:k.stepStates[y]??null}function Se(g){var k;if(I||!S)return null;if(_e(g)===Ae)return W(g)[0]??null;let y=(k=S.find(v=>v.flowId===g))==null?void 0:k.lastStepId;return y?W(g).find(v=>v.id===y):null}function ce(g){let y=Se(g);if(!y)return 0;let k=W(g).findIndex(v=>v.id===y.id)??0;return O(g,y.id)===we&&k<W(g).length-1?k+1:k}function Ue(g){if(!g.completionCriteria)return;let y=Zo(g.completionCriteria);if(y===null)return;let k=et(y),v=_(y);return v===0?void 0:k/v}function _e(g){let y=S==null?void 0:S.find(k=>k.flowId===g);return y?y.flowState:null}function et(g){let y=W(g);return y.length===0?0:y.filter(v=>O(g,v.id)===we).length}function _(g){return W(g).length}function Ee(g){return JSON.parse(t.find(y=>y.slug===g).data)}function Ie(g){if(I)return!0;if(g!=null&&g.targetingLogic&&S){let y=S.find(k=>k.flowId===g.slug);if(y)return y.shouldTrigger===!1}return!!(g!=null&&g.targetingLogic&&i&&i.startsWith("guest_"))}function yo(g){return!Ie(U(g))}return{getFlow:U,getFlowData:Ee,isLoading:I||$,getStepStatus:O,getFlowSteps:W,getCurrentStepIndex:ce,markStepStarted:z,markStepCompleted:M,markFlowNotStarted:Q,markFlowStarted:j,markFlowCompleted:X,markFlowAborted:Ke,markStepNotStarted:G,getFlowStatus:_e,getNumberOfStepsCompleted:et,getNumberOfSteps:_,targetingLogicShouldHideFlow:Ie,setCustomVariable:N,updateCustomVariables:q,customVariables:n,getStepOptionalProgress:Ue,getFlowMetadata:H,isStepBlocked:re,isStepHidden:$e,hasActiveFullPageFlow:p,setHasActiveFullPageFlow:d,isFlowAvailableToUser:yo}}import{useCallback as Ro,useContext as Ls,useEffect as Ns}from"react";var ht="guest_";function To(){let{userId:e,organizationId:t,setUserId:o,setUserProperties:i,shouldGracefullyDegrade:r}=Ls(V),{config:n}=Be(),{mutateUserFlowState:s}=be(),p=ft(),{verifySDKInitiated:d}=gt();Ns(()=>{if(e&&!t){if(e.startsWith(ht))return;let m=`frigade-user-registered-${e}`;localStorage.getItem(m)||(p(`${ue}users`,{...n,method:"POST",body:JSON.stringify({foreignId:e})}),localStorage.setItem(m,"true"))}},[e,r,t]);let l=Ro(async m=>{d();let u={foreignId:e,properties:m};await p(`${ue}users`,{...n,method:"POST",body:JSON.stringify(u)}),i(T=>({...T,...m})),s()},[e,n,r,s]),h=Ro(async(m,u)=>{d();let x={foreignId:e,events:[{event:m,properties:u}]};await p(`${ue}users`,{...n,method:"POST",body:JSON.stringify(x)}),s()},[e,n,s]);return{userId:e,setUserId:o,addPropertiesToUser:l,trackEventForUser:h}}import{v4 as ra}from"uuid";import Oe,{useEffect as Zl,useState as Rl}from"react";import We,{useEffect as Ws}from"react";import Jt from"styled-components";import Ds from"react";import Ms from"styled-components";var er="fr-",Bt="cfr-";function a(e,t){let o=`${er}${e}`;if(!t)return o;if(t.styleOverrides&&t.styleOverrides[e]){if(typeof t.styleOverrides[e]=="string")return o+" "+t.styleOverrides[e];if(typeof t.styleOverrides[e]=="object")return o+" "+Bt+e}return o}function w(e){if(!e.className||e.className.indexOf(Bt)!==-1)return"";let o=e.className.replace(/\s+/g," ").split(" ");return o.length==1&&o[0].startsWith(er)?"":`:not(${o.map(i=>`.${i}`).join(", ")})`}function wo(e){return e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase()}function it(e){return e!=null&&e.styleOverrides?Object.keys(e.styleOverrides).map(t=>`${wo(t)}: ${e.styleOverrides[t]};`).join(" "):""}function xe(...e){return e.filter(Boolean).join(" ")}function tr(e){return e.charAt(0).toUpperCase()+e.slice(1)}var $s=Ms.div`
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: center;
|
|
5
5
|
position: fixed;
|
|
@@ -7,7 +7,7 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
7
7
|
left: 0;
|
|
8
8
|
bottom: 0;
|
|
9
9
|
right: 0;
|
|
10
|
-
${e=>
|
|
10
|
+
${e=>w(e)} {
|
|
11
11
|
background-color: rgba(0, 0, 0, 0.6);
|
|
12
12
|
z-index: 1400;
|
|
13
13
|
}
|
|
@@ -23,12 +23,12 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
23
23
|
opacity: 1;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
`,
|
|
26
|
+
`,or=({onClose:e,appearance:t})=>Ds.createElement($s,{className:a("modalBackground",t),onClick:()=>e()});import Xt from"react";import Us from"styled-components";var _s=Us.div`
|
|
27
27
|
:hover {
|
|
28
28
|
opacity: 0.8;
|
|
29
29
|
}
|
|
30
|
-
`,
|
|
31
|
-
${e=>
|
|
30
|
+
`,ke=()=>Xt.createElement(_s,null,Xt.createElement("svg",{width:"12",height:"12",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Xt.createElement("rect",{y:"1.39844",width:"1.97669",height:"17.8213",rx:"0.988346",transform:"rotate(-45 0 1.39844)",fill:"currentColor"}),Xt.createElement("rect",{x:"12.6023",width:"1.97669",height:"17.8213",rx:"0.988346",transform:"rotate(45 12.6023 0)",fill:"currentColor"})));import{Portal as Hs}from"react-portal";var zs=Jt.div`
|
|
31
|
+
${e=>w(e)} {
|
|
32
32
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
33
33
|
background-color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBackground}};
|
|
34
34
|
/* Mobile */
|
|
@@ -45,7 +45,7 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
45
45
|
|
|
46
46
|
border-radius: ${e=>{var t,o;return((o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.borderRadius)??8}}px;
|
|
47
47
|
|
|
48
|
-
${e=>
|
|
48
|
+
${e=>it(e)}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
padding: 32px;
|
|
@@ -71,28 +71,28 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
71
71
|
opacity: 1;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
`,
|
|
74
|
+
`,Gs=Jt.div`
|
|
75
75
|
position: relative;
|
|
76
76
|
flex: 0 1 auto;
|
|
77
|
-
`,
|
|
77
|
+
`,js=Jt.div`
|
|
78
78
|
position: absolute;
|
|
79
79
|
top: 24px;
|
|
80
80
|
right: 24px;
|
|
81
81
|
cursor: pointer;
|
|
82
82
|
z-index: 1501;
|
|
83
|
-
${e=>
|
|
83
|
+
${e=>w(e)} {
|
|
84
84
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
85
85
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
|
|
86
86
|
}
|
|
87
|
-
`,
|
|
87
|
+
`,Vs=Jt.div`
|
|
88
88
|
overflow: scroll;
|
|
89
89
|
flex: 1 1;
|
|
90
90
|
display: flex;
|
|
91
91
|
::-webkit-scrollbar {
|
|
92
92
|
display: none;
|
|
93
93
|
}
|
|
94
|
-
`,
|
|
95
|
-
${e=>
|
|
94
|
+
`,Ye=({onClose:e,visible:t,headerContent:o=null,style:i=null,children:r,appearance:n,dismissible:s=!0})=>(Ws(()=>{let p=d=>{d.key==="Escape"&&e()};return document.addEventListener("keydown",p),t?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset",document.removeEventListener("keydown",p)}},[e,t]),t?We.createElement(Hs,null,We.createElement(or,{appearance:n,onClose:()=>{s&&e()}}),We.createElement(zs,{appearance:n,className:a("modalContainer",n),styleOverrides:i},s&&We.createElement(js,{className:a("modalClose",n),onClick:()=>e(),appearance:n},We.createElement(ke,null)),o&&We.createElement(Gs,null,o),We.createElement(Vs,null,r))):We.createElement(We.Fragment,null));import Xe,{useEffect as qs}from"react";import Qt from"styled-components";import{Portal as Ks}from"react-portal";var Ys=Qt.div`
|
|
95
|
+
${e=>w(e)} {
|
|
96
96
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
97
97
|
background: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBackground}};
|
|
98
98
|
position: fixed;
|
|
@@ -109,34 +109,34 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
109
109
|
bottom: 0;
|
|
110
110
|
margin-right: 28px;
|
|
111
111
|
margin-bottom: 28px;
|
|
112
|
-
`,
|
|
112
|
+
`,Xs=Qt.div`
|
|
113
113
|
position: relative;
|
|
114
114
|
flex: 1;
|
|
115
|
-
`,
|
|
115
|
+
`,Js=Qt.div`
|
|
116
116
|
position: absolute;
|
|
117
117
|
top: 24px;
|
|
118
118
|
right: 24px;
|
|
119
119
|
cursor: pointer;
|
|
120
120
|
z-index: 1501;
|
|
121
|
-
${e=>
|
|
121
|
+
${e=>w(e)} {
|
|
122
122
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
123
123
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
|
|
124
124
|
}
|
|
125
|
-
`,
|
|
125
|
+
`,Qs=Qt.div`
|
|
126
126
|
overflow: scroll;
|
|
127
127
|
flex: 5;
|
|
128
128
|
::-webkit-scrollbar {
|
|
129
129
|
display: none;
|
|
130
130
|
}
|
|
131
|
-
`,
|
|
132
|
-
${e=>
|
|
131
|
+
`,rr=({onClose:e,visible:t,headerContent:o=null,children:i,appearance:r})=>(qs(()=>{let n=s=>{s.key==="Escape"&&e()};return document.addEventListener("keydown",n),t?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset",document.removeEventListener("keydown",n)}},[e,t]),t?Xe.createElement(Ks,null,Xe.createElement(Ys,{appearance:r,className:a("cornerModalContainer",r)},Xe.createElement(Js,{className:a("cornerModalClose",r),onClick:()=>e()},Xe.createElement(ke,null)),o&&Xe.createElement(Xs,null,o),Xe.createElement(Qs,null,i))):Xe.createElement(Xe.Fragment,null));import{useContext as Zs}from"react";function J(){let{defaultAppearance:e}=Zs(V);function t(o){let i=JSON.parse(JSON.stringify(e));return o?{styleOverrides:Object.assign(i.styleOverrides??{},o.styleOverrides??{}),theme:Object.assign(i.theme,o.theme??{})}:i}return{mergeAppearanceWithDefault:t}}import eo,{useEffect as pl,useState as Cr}from"react";import yr from"styled-components";import Po,{useEffect as Rs,useState as lr}from"react";import vo from"styled-components";import Fo from"styled-components";var ir=Fo.label`
|
|
132
|
+
${e=>w(e)} {
|
|
133
133
|
font-size: 14px;
|
|
134
134
|
line-height: 20px;
|
|
135
135
|
margin-bottom: 5px;
|
|
136
136
|
margin-top: 10px;
|
|
137
137
|
}
|
|
138
138
|
display: flex;
|
|
139
|
-
`,
|
|
139
|
+
`,nr=Fo.span`
|
|
140
140
|
font-weight: 400;
|
|
141
141
|
font-size: 14px;
|
|
142
142
|
line-height: 22px;
|
|
@@ -144,17 +144,17 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
144
144
|
display: flex;
|
|
145
145
|
margin-right: 5px;
|
|
146
146
|
margin-top: 10px;
|
|
147
|
-
`,
|
|
147
|
+
`,sr=Fo.div`
|
|
148
148
|
display: flex;
|
|
149
149
|
align-items: flex-start;
|
|
150
150
|
justify-content: left;
|
|
151
151
|
margin-bottom: 10px;
|
|
152
|
-
`;import ko from"react";function
|
|
152
|
+
`;import ko from"react";function nt({title:e,required:t,appearance:o}){return ko.createElement(sr,null,t?ko.createElement(nr,null,"*"):null,ko.createElement(ir,{className:a("formLabel",o)},e))}var el=vo.div`
|
|
153
153
|
display: flex;
|
|
154
154
|
flex-direction: column;
|
|
155
155
|
width: 100%;
|
|
156
|
-
`,
|
|
157
|
-
${e=>
|
|
156
|
+
`,Eo=vo.input`
|
|
157
|
+
${e=>w(e)} {
|
|
158
158
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
159
159
|
border: 1px solid ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
|
|
160
160
|
font-size: 14px;
|
|
@@ -169,8 +169,8 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
169
169
|
box-sizing: border-box;
|
|
170
170
|
padding: 0 10px;
|
|
171
171
|
margin-bottom: 10px;
|
|
172
|
-
`,
|
|
173
|
-
${e=>
|
|
172
|
+
`,tl=vo.textarea`
|
|
173
|
+
${e=>w(e)} {
|
|
174
174
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
175
175
|
border: 1px solid ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
|
|
176
176
|
font-size: 14px;
|
|
@@ -185,14 +185,14 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
185
185
|
min-height: 70px;
|
|
186
186
|
box-sizing: border-box;
|
|
187
187
|
margin-bottom: 10px;
|
|
188
|
-
`;function
|
|
188
|
+
`;function ar({formInput:e,customFormTypeProps:t,onSaveInputData:o,setFormValidationErrors:i}){let r=e,[n,s]=lr(""),[p,d]=lr(!1),l=Eo;Rs(()=>{n===""&&!p&&(d(!0),h(""))},[]);function h(m){if(s(m),r.required===!0&&m.trim()===""){i([{id:r.id,message:`${r.title} is required`}]);return}i([]),o({text:m})}return r.multiline&&(l=tl),Po.createElement(el,null,Po.createElement(nt,{title:r.title,required:r.required,appearance:t.appearance}),Po.createElement(l,{className:a("inputComponent",t.appearance),value:n,onChange:m=>{h(m.target.value)},appearance:t.appearance,placeholder:r.placeholder}))}import He,{useEffect as pr,useState as dr}from"react";import cr from"styled-components";var ol=cr.div`
|
|
189
189
|
display: flex;
|
|
190
190
|
flex-direction: column;
|
|
191
191
|
width: 100%;
|
|
192
192
|
-webkit-appearance: none;
|
|
193
193
|
appearance: none;
|
|
194
|
-
`,
|
|
195
|
-
${e=>
|
|
194
|
+
`,rl=cr.select`
|
|
195
|
+
${e=>w(e)} {
|
|
196
196
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
197
197
|
border: 1px solid ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
|
|
198
198
|
font-size: 14px;
|
|
@@ -215,14 +215,14 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
215
215
|
background-repeat: no-repeat;
|
|
216
216
|
background-size: 1.5em 1.5em;
|
|
217
217
|
-webkit-print-color-adjust: exact;
|
|
218
|
-
`,Zt="null";function
|
|
218
|
+
`,Zt="null";function mr({formInput:e,customFormTypeProps:t,onSaveInputData:o,setFormValidationErrors:i}){var l,h,m,u,T;let r=e,[n,s]=dr(""),[p,d]=dr(!1);return pr(()=>{var x,C,S,I;if(n===""&&!p){if(d(!0),r.requireSelection){s(Zt);return}if(r.defaultValue&&((x=r.props.options)!=null&&x.find(F=>F.id===r.defaultValue))){let F=(C=r.props.options)==null?void 0:C.find(A=>A.id===r.defaultValue);s(F.id),o({choice:[F.id]})}else s(((S=r.props.options)==null?void 0:S[0].id)||""),o({choice:[((I=r.props.options)==null?void 0:I[0].id)||""]})}},[]),pr(()=>{r.requireSelection&&n===Zt?i([{message:"Please select an option",id:r.id}]):i([])},[n]),He.createElement(ol,null,He.createElement(nt,{title:r.title,required:!1,appearance:t.appearance}),He.createElement(rl,{value:n,onChange:x=>{s(x.target.value),o({choice:[x.target.value]})},placeholder:r.placeholder,appearance:t.appearance,className:a("multipleChoiceSelect",t.appearance)},r.requireSelection&&He.createElement("option",{key:Zt,value:Zt},"Select an option"),(l=r.props.options)==null?void 0:l.map(x=>He.createElement("option",{key:x.id,value:x.id},x.title))),((m=(h=r.props.options)==null?void 0:h.find(x=>x.id===n))==null?void 0:m.isOpenEnded)&&He.createElement(He.Fragment,null,He.createElement(nt,{title:((T=(u=r.props.options)==null?void 0:u.find(x=>x.id===n))==null?void 0:T.openEndedLabel)??"Please specify",required:!1,appearance:t.appearance}),He.createElement(Eo,{type:"text",placeholder:"Enter your answer here",onChange:x=>{o({choice:[x.target.value]})},appearance:t.appearance})))}import Io,{useEffect as ur,useState as fr}from"react";import gr from"styled-components";var il=gr.div`
|
|
219
219
|
display: flex;
|
|
220
220
|
flex-direction: column;
|
|
221
221
|
width: 100%;
|
|
222
222
|
-webkit-appearance: none;
|
|
223
223
|
appearance: none;
|
|
224
|
-
`,
|
|
225
|
-
${e=>
|
|
224
|
+
`,nl=gr.button`
|
|
225
|
+
${e=>w(e)} {
|
|
226
226
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
227
227
|
border: 1px solid ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
|
|
228
228
|
font-size: 14px;
|
|
@@ -243,8 +243,8 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
243
243
|
height: 60px;
|
|
244
244
|
padding: 0 18px;
|
|
245
245
|
margin-bottom: 10px;
|
|
246
|
-
`;function
|
|
247
|
-
${e=>
|
|
246
|
+
`;function hr({formInput:e,customFormTypeProps:t,onSaveInputData:o}){var d;let i=e,[r,n]=fr([]),[s,p]=fr(!1);return ur(()=>{r.length==0&&!s&&(p(!0),o({choice:[]}))},[]),ur(()=>{o({choice:r})},[r]),Io.createElement(il,null,Io.createElement(nt,{title:i.title,required:i.required,appearance:t.appearance}),(d=i.props.options)==null?void 0:d.map(l=>Io.createElement(nl,{appearance:t.appearance,key:l.id,value:l.id,"data-selected":r.includes(l.id),onClick:()=>{if(r.includes(l.id)){n(r.filter(h=>h!==l.id));return}r.length<i.props.maxChoices?n([...r,l.id]):r.length==1&&i.props.maxChoices==1&&n([l.id])}},l.title)))}import Rt from"react";import xr from"styled-components";import sl from"dompurify";function ie(e){return{__html:sl.sanitize(e,{ALLOWED_TAGS:["b","i","a","span","div","p","pre","u","br","img"],ALLOWED_ATTR:["style","class","target","id","href","alt","src"]})}}var ll=xr.h1`
|
|
247
|
+
${e=>w(e)} {
|
|
248
248
|
font-style: normal;
|
|
249
249
|
font-weight: 600;
|
|
250
250
|
font-size: ${e=>e.size=="small"?"15px":"18px"};
|
|
@@ -254,32 +254,32 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
254
254
|
margin-bottom: 4px;
|
|
255
255
|
color: ${e=>e.appearance.theme.colorText};
|
|
256
256
|
}
|
|
257
|
-
`,
|
|
258
|
-
${e=>
|
|
257
|
+
`,al=xr.h2`
|
|
258
|
+
${e=>w(e)} {
|
|
259
259
|
font-style: normal;
|
|
260
260
|
font-weight: 400;
|
|
261
261
|
font-size: 15px;
|
|
262
262
|
line-height: 20px;
|
|
263
263
|
color: ${e=>e.appearance.theme.colorTextSecondary};
|
|
264
264
|
}
|
|
265
|
-
`;function Te({appearance:e,title:t,subtitle:o,size:i="medium"}){return Rt.createElement(Rt.Fragment,null,Rt.createElement(
|
|
265
|
+
`;function Te({appearance:e,title:t,subtitle:o,size:i="medium"}){return Rt.createElement(Rt.Fragment,null,Rt.createElement(ll,{appearance:e,className:a(`${i}Title`,e),dangerouslySetInnerHTML:ie(t),size:i}),Rt.createElement(al,{appearance:e,className:a(`${i}Subtitle`,e),dangerouslySetInnerHTML:ie(o),size:i}))}var dl=yr.div`
|
|
266
266
|
display: flex;
|
|
267
267
|
flex-direction: column;
|
|
268
268
|
justify-content: flex-end;
|
|
269
269
|
padding-bottom: 14px;
|
|
270
270
|
overflow: visible;
|
|
271
|
-
`,
|
|
271
|
+
`,cl=yr.div`
|
|
272
272
|
padding-left: 1px;
|
|
273
273
|
padding-right: 1px;
|
|
274
|
-
`,
|
|
274
|
+
`,Sr={text:ar,multipleChoice:mr,multipleChoiceList:hr};function br({stepData:e,canContinue:t,setCanContinue:o,onSaveData:i,appearance:r}){var m;let n=e.props,[s,p]=Cr({}),[d,l]=Cr([]);pl(()=>{o(d.length===0)},[d,o]);function h(u,T){let x={...s,[u.id]:T};p(x),i(x)}return eo.createElement(cl,{className:a("multiInput",r)},eo.createElement(Te,{appearance:r,title:e.title,subtitle:e.subtitle}),eo.createElement(dl,{className:a("multiInputContainer",r)},(m=n.data)==null?void 0:m.map(u=>Sr[u.type]?eo.createElement("span",{key:u.id},Sr[u.type]({formInput:u,customFormTypeProps:{stepData:e,canContinue:t,setCanContinue:o,onSaveData:i,appearance:r},onSaveInputData:T=>{h(u,T)},setFormValidationErrors:T=>{l(x=>T.length===0?x.filter(C=>C.id!==u.id):[...x,...T])}})):null)))}import Ot from"styled-components";var Tr=Ot.div`
|
|
275
275
|
align-content: flex-end;
|
|
276
276
|
text-align: right;
|
|
277
277
|
padding-top: 14px;
|
|
278
|
-
`,
|
|
278
|
+
`,wr=Ot.div`
|
|
279
279
|
display: flex;
|
|
280
280
|
flex-direction: row;
|
|
281
281
|
flex: 1 1;
|
|
282
|
-
`,
|
|
282
|
+
`,Fr=Ot.div`
|
|
283
283
|
display: flex;
|
|
284
284
|
// If type is set to large-modal, use padding 60px horizontal, 80px vertical
|
|
285
285
|
// Otherwise, use 4px padding
|
|
@@ -287,11 +287,11 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
287
287
|
flex-grow: 1;
|
|
288
288
|
flex-basis: 0;
|
|
289
289
|
position: relative;
|
|
290
|
-
`,
|
|
290
|
+
`,kr=Ot.div`
|
|
291
291
|
padding: ${e=>e.type==="large-modal"?"50px":"0px"};
|
|
292
292
|
position: relative;
|
|
293
293
|
overflow-y: auto;
|
|
294
|
-
`,
|
|
294
|
+
`,Pr=Ot.div`
|
|
295
295
|
display: flex;
|
|
296
296
|
align-self: stretch;
|
|
297
297
|
flex-grow: 1;
|
|
@@ -303,10 +303,10 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
303
303
|
background-position: center;
|
|
304
304
|
border-top-right-radius: ${e=>e.appearance.theme.borderRadius}px;
|
|
305
305
|
border-bottom-right-radius: ${e=>e.appearance.theme.borderRadius}px;
|
|
306
|
-
`;import Ao from"react";import
|
|
306
|
+
`;import Ao from"react";import ml from"react";import vr from"styled-components";var ul=vr.button`
|
|
307
307
|
justify-content: center;
|
|
308
308
|
align-content: center;
|
|
309
|
-
${e=>
|
|
309
|
+
${e=>w(e)} {
|
|
310
310
|
display: flex;
|
|
311
311
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
312
312
|
width: ${e=>e.type==="full-width"?"100%":"auto"};
|
|
@@ -333,8 +333,8 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
333
333
|
opacity: 0.3;
|
|
334
334
|
cursor: not-allowed;
|
|
335
335
|
}
|
|
336
|
-
`,to=
|
|
337
|
-
${e=>
|
|
336
|
+
`,to=vr.div`
|
|
337
|
+
${e=>w(e)} {
|
|
338
338
|
display: flex;
|
|
339
339
|
flex-direction: row;
|
|
340
340
|
justify-content: flex-start;
|
|
@@ -343,14 +343,14 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
343
343
|
margin-right: 8px;
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
|
-
`,R=({onClick:e,title:t,style:o,disabled:i,type:r="inline",size:n="medium",secondary:s=!1,appearance:p,withMargin:d=!0,classPrefix:l=""})=>{function h(){let m=s?"buttonSecondary":"button";return l===""?m:`${l}${
|
|
346
|
+
`,R=({onClick:e,title:t,style:o,disabled:i,type:r="inline",size:n="medium",secondary:s=!1,appearance:p,withMargin:d=!0,classPrefix:l=""})=>{function h(){let m=s?"buttonSecondary":"button";return l===""?m:`${l}${tr(m)}`}return ml.createElement(ul,{secondary:s,appearance:p,disabled:i,onClick:e,style:o,type:r,withMargin:d,size:n,className:a(h(),p)},t)};var Er=({step:e,canContinue:t,appearance:o,onPrimaryClick:i,onSecondaryClick:r,formType:n})=>{let s=n==="inline"?"inline":"full-width";return Ao.createElement(Tr,{className:a("formCTAContainer",o)},e.secondaryButtonTitle?Ao.createElement(R,{title:e.secondaryButtonTitle,onClick:r,secondary:!0,withMargin:!1,type:s,appearance:o}):null," ",e.primaryButtonTitle?Ao.createElement(R,{disabled:!t,withMargin:!1,title:e.primaryButtonTitle,onClick:i,type:s,appearance:o}):null)};import Bo from"react";import fl from"styled-components";var gl=fl.div`
|
|
347
347
|
text-align: center;
|
|
348
|
-
`,Ir=({stepCount:e=0,currentStep:t=0,className:o,appearance:i})=>{let{theme:r}=
|
|
348
|
+
`,Ir=({stepCount:e=0,currentStep:t=0,className:o,appearance:i})=>{let{theme:r}=J().mergeAppearanceWithDefault(i);return Bo.createElement(gl,{className:o},Bo.createElement("svg",{width:16*e-8,height:8,viewBox:`0 0 ${16*e-8} 8`,fill:"none"},Array(e).fill(null).map((n,s)=>Bo.createElement("rect",{key:s,x:16*s,y:0,width:8,height:8,rx:4,fill:t===s?r.colorPrimary:"#E6E6E6"}))))};import st from"react";import xt from"styled-components";import{useContext as hl}from"react";function ne(){let e=hl(V);function t(r){i(r.primaryButtonUri,r.primaryButtonUriTarget)}function o(r){i(r.secondaryButtonUri,r.secondaryButtonUriTarget)}function i(r,n){if(!r)return;let s=r.startsWith("http")?"_blank":"_self";n&&n!=="_blank"&&(s="_self"),e.navigate(r,s)}return{primaryCTAClickSideEffects:t,secondaryCTAClickSideEffects:o,handleUrl:i}}var xl=xt.div`
|
|
349
349
|
display: flex;
|
|
350
350
|
flex-wrap: wrap;
|
|
351
351
|
align-content: center;
|
|
352
352
|
justify-content: center;
|
|
353
|
-
`,
|
|
353
|
+
`,Cl=xt.div`
|
|
354
354
|
align-content: center;
|
|
355
355
|
align-items: center;
|
|
356
356
|
display: flex;
|
|
@@ -364,10 +364,10 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
364
364
|
flex-basis: 255px;
|
|
365
365
|
flex-grow: 0;
|
|
366
366
|
flex-shrink: 0;
|
|
367
|
-
`,
|
|
367
|
+
`,Sl=xt.img`
|
|
368
368
|
width: 78px;
|
|
369
369
|
height: auto;
|
|
370
|
-
`,
|
|
370
|
+
`,yl=xt.button`
|
|
371
371
|
font-style: normal;
|
|
372
372
|
font-weight: 600;
|
|
373
373
|
font-size: 13px;
|
|
@@ -380,11 +380,11 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
380
380
|
border-radius: 100px;
|
|
381
381
|
padding: 8px 12px;
|
|
382
382
|
margin-top: 16px;
|
|
383
|
-
`,
|
|
383
|
+
`,bl=xt.h1`
|
|
384
384
|
font-weight: 700;
|
|
385
385
|
font-size: 28px;
|
|
386
386
|
line-height: 34px;
|
|
387
|
-
`,
|
|
387
|
+
`,Tl=xt.h2`
|
|
388
388
|
font-style: normal;
|
|
389
389
|
font-weight: 400;
|
|
390
390
|
font-size: 16px;
|
|
@@ -393,7 +393,7 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
393
393
|
margin-top: 12px;
|
|
394
394
|
margin-bottom: 16px;
|
|
395
395
|
max-width: 70%;
|
|
396
|
-
`;function
|
|
396
|
+
`;function Ar({stepData:e,appearance:t}){var i,r;let{handleUrl:o}=ne();return st.createElement("div",null,st.createElement(bl,null,e.title),st.createElement(Tl,null,e.subtitle),st.createElement(xl,null,(r=(i=e.props)==null?void 0:i.links)==null?void 0:r.map(n=>st.createElement(Cl,{key:n.title},st.createElement(Sl,{src:n.imageUri}),st.createElement(yl,{style:{borderColor:t.theme.colorPrimary,color:t.theme.colorPrimary},onClick:()=>{n.uri&&o(n.uri,n.uriTarget??"_blank")}},n.title)))))}import St,{useEffect as Il}from"react";import io from"styled-components";import Oo from"react";var oo=({style:e,className:t})=>Oo.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,style:e},Oo.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),Oo.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.91 11.672a.375.375 0 010 .656l-5.603 3.113a.375.375 0 01-.557-.328V8.887c0-.286.307-.466.557-.327l5.603 3.112z"}));import Lt,{useRef as wl,useState as Fl}from"react";import ro from"styled-components";var kl=ro.div`
|
|
397
397
|
display: flex;
|
|
398
398
|
align-items: center;
|
|
399
399
|
justify-content: flex-start;
|
|
@@ -401,7 +401,7 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
401
401
|
width: 100%;
|
|
402
402
|
height: 100%;
|
|
403
403
|
position: relative;
|
|
404
|
-
`,
|
|
404
|
+
`,Pl=ro.div`
|
|
405
405
|
position: absolute;
|
|
406
406
|
display: flex;
|
|
407
407
|
align-items: center;
|
|
@@ -420,59 +420,59 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
420
420
|
box-shadow: 0px 6px 25px rgba(0, 0, 0, 0.06);
|
|
421
421
|
border-radius: 50%;
|
|
422
422
|
}
|
|
423
|
-
`,
|
|
423
|
+
`,vl=ro.video`
|
|
424
424
|
width: 100%;
|
|
425
425
|
height: 100%;
|
|
426
426
|
min-height: 200px;
|
|
427
427
|
border-radius: ${e=>e.appearance.theme.borderRadius}px;
|
|
428
|
-
`,
|
|
428
|
+
`,El=ro.iframe`
|
|
429
429
|
width: 100%;
|
|
430
430
|
height: 100%;
|
|
431
431
|
min-height: 200px;
|
|
432
432
|
border-radius: ${e=>e.appearance.theme.borderRadius}px;
|
|
433
|
-
`;function
|
|
434
|
-
${e=>
|
|
433
|
+
`;function Ct({appearance:e,videoUri:t}){let o=wl(),[i,r]=Fl(!1);if(t.includes("youtube")){let n=t.split("v=")[1],s=n.indexOf("&");return s!==-1&&(n=n.substring(0,s)),Lt.createElement(El,{width:"100%",height:"100%",src:`https://www.youtube.com/embed/${n}`,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,appearance:e})}return Lt.createElement(kl,{appearance:e},!i&&Lt.createElement(Pl,{onClick:()=>{r(!0),o.current.play()},appearance:e},Lt.createElement(oo,null)),Lt.createElement(vl,{appearance:e,controls:i,ref:o,play:i,src:t}))}var Al=io.div`
|
|
434
|
+
${e=>w(e)} {
|
|
435
435
|
display: flex;
|
|
436
436
|
flex-direction: column;
|
|
437
437
|
justify-content: center;
|
|
438
438
|
}
|
|
439
|
-
`,
|
|
440
|
-
${e=>
|
|
439
|
+
`,Bl=io.img`
|
|
440
|
+
${e=>w(e)} {
|
|
441
441
|
width: 100%;
|
|
442
442
|
height: auto;
|
|
443
443
|
max-height: 250px;
|
|
444
444
|
margin-bottom: 24px;
|
|
445
445
|
}
|
|
446
|
-
`,
|
|
447
|
-
${e=>
|
|
446
|
+
`,Ol=io.div`
|
|
447
|
+
${e=>w(e)} {
|
|
448
448
|
margin-bottom: 24px;
|
|
449
449
|
}
|
|
450
|
-
`,
|
|
451
|
-
${e=>
|
|
450
|
+
`,Ll=io.div`
|
|
451
|
+
${e=>w(e)} {
|
|
452
452
|
width: 100%;
|
|
453
453
|
height: auto;
|
|
454
454
|
max-height: 250px;
|
|
455
455
|
margin-bottom: 24px;
|
|
456
456
|
}
|
|
457
|
-
`;function
|
|
458
|
-
${e=>
|
|
459
|
-
`,
|
|
457
|
+
`;function Br({stepData:e,appearance:t,setCanContinue:o}){return Il(()=>{o(!0)},[]),St.createElement(Al,{className:a("callToActionContainer",t)},St.createElement(Ol,{className:a("callToActionTextContainer",t)},St.createElement(Te,{appearance:t,title:e.title,subtitle:e.subtitle})),e.imageUri&&St.createElement(Bl,{className:a("callToActionImage",t),src:e.imageUri}),!e.imageUri&&e.videoUri&&St.createElement(Ll,{appearance:t,className:a("callToActionVideo",t)},St.createElement(Ct,{appearance:t,videoUri:e.videoUri})))}import ze,{useEffect as Lo,useState as No}from"react";import Mt from"react";import Nt from"react";import{motion as Nl}from"framer-motion";var Or=({color:e,percentage:t,size:o})=>{let i=o*.5-2,r=2*Math.PI*i,n=(1-t)*r,s={duration:.3,delay:0,ease:"easeIn"},p={hidden:{strokeDashoffset:r,transition:s},show:{strokeDashoffset:n,transition:s}};return Nt.createElement(Nl.circle,{r:i,cx:o*.5,cy:o*.5,fill:"transparent",stroke:n!==r?e:"",strokeWidth:"3px",strokeDasharray:r,strokeDashoffset:t?n:0,variants:p,transition:s,initial:"hidden",animate:"show"})},Dl=({fillColor:e,size:t,percentage:o,children:i,bgColor:r="#D9D9D9"})=>Nt.createElement("svg",{width:t,height:t,overflow:"visible"},Nt.createElement("g",{transform:`rotate(-90 ${`${t*.5} ${t*.5}`})`},Nt.createElement(Or,{color:r,size:t}),Nt.createElement(Or,{color:e,percentage:o,size:t})),i),Dt=Dl;import Ml from"styled-components";var $l=({color:e="#FFFFFF"})=>Mt.createElement("svg",{width:10,height:8,viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Mt.createElement("path",{d:"M1 4.34815L3.4618 7L3.4459 6.98287L9 1",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),Ul={width:"22px",height:"22px",borderRadius:"8px",display:"flex",justifyContent:"center",alignItems:"center"},_l={width:"22px",height:"22px",borderRadius:"40px",display:"flex",justifyContent:"center",alignItems:"center"},Wl={border:"1px solid #000000",color:"#FFFFFF"},Hl={border:"1px solid #E6E6E6"},zl={color:"#FFFFFF"},Gl={border:"3px solid #D9D9D9"},jl=e=>e==="square"?Ul:_l,Vl=(e,t)=>e==="square"?t?Wl:Hl:t?zl:Gl,ql=Ml.div`
|
|
458
|
+
${e=>it(e)}
|
|
459
|
+
`,yt=({value:e,type:t="square",primaryColor:o="#000000",progress:i,appearance:r})=>{let n=jl(t),s=Vl(t,e);return e===!0?n={...n,...s,backgroundColor:o,borderColor:t==="square"?o:"none"}:n={...n,...s},e!==!0&&t==="round"&&i!==void 0&&i!==1?Mt.createElement(Dt,{fillColor:o,percentage:i,size:22}):Mt.createElement(ql,{styleOverrides:n,role:"checkbox",className:xe(a("checkIconContainer",r),e?"checkIconContainerChecked":"checkIconContainerUnchecked")},e&&Mt.createElement($l,{color:"#FFFFFF"}))};import Je from"styled-components";var Lr=Je.div`
|
|
460
460
|
width: auto;
|
|
461
461
|
display: flex;
|
|
462
462
|
flex-direction: column;
|
|
463
463
|
justify-content: center;
|
|
464
464
|
align-items: center;
|
|
465
465
|
padding: 4px;
|
|
466
|
-
`,
|
|
466
|
+
`,Nr=Je.div`
|
|
467
467
|
width: 100%;
|
|
468
468
|
text-align: left;
|
|
469
|
-
`,
|
|
469
|
+
`,Dr=Je.h1`
|
|
470
470
|
font-style: normal;
|
|
471
471
|
font-weight: 700;
|
|
472
472
|
font-size: 32px;
|
|
473
473
|
line-height: 38px;
|
|
474
474
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
|
|
475
|
-
`,
|
|
475
|
+
`,Mr=Je.h1`
|
|
476
476
|
font-style: normal;
|
|
477
477
|
font-weight: 400;
|
|
478
478
|
font-size: 16px;
|
|
@@ -480,7 +480,7 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
480
480
|
margin-top: 16px;
|
|
481
481
|
margin-bottom: 16px;
|
|
482
482
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
|
|
483
|
-
|
|
483
|
+
`,$r=Je.div`
|
|
484
484
|
padding-top: 12px;
|
|
485
485
|
padding-bottom: 12px;
|
|
486
486
|
flex-direction: row;
|
|
@@ -491,17 +491,17 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
491
491
|
cursor: pointer;
|
|
492
492
|
border-bottom: ${e=>e.hideBottomBorder?"none":"1px solid #D8D8D8"};
|
|
493
493
|
width: 100%;
|
|
494
|
-
|
|
494
|
+
`,Ur=Je.div`
|
|
495
495
|
padding-top: 10px;
|
|
496
496
|
padding-bottom: 10px;
|
|
497
497
|
flex-direction: row;
|
|
498
498
|
display: flex;
|
|
499
499
|
justify-content: flex-start;
|
|
500
|
-
`,
|
|
500
|
+
`,_r=Je.img`
|
|
501
501
|
width: 42px;
|
|
502
502
|
height: 42px;
|
|
503
503
|
margin-right: 12px;
|
|
504
|
-
`,
|
|
504
|
+
`,Wr=Je.p`
|
|
505
505
|
font-style: normal;
|
|
506
506
|
font-weight: 500;
|
|
507
507
|
font-size: 17px;
|
|
@@ -509,8 +509,8 @@ import st,{createContext as oa,useEffect as $o,useState as ve}from"react";import
|
|
|
509
509
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
|
|
510
510
|
display: flex;
|
|
511
511
|
align-self: center;
|
|
512
|
-
`;var
|
|
513
|
-
${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map(([s,p])=>`${wo(s)}: ${p};`).join(" ")} }`).join(" ")}`;return $t.createElement(o,{inlineStyles:t})}var
|
|
512
|
+
`;var Hr=({stepData:e,setCanContinue:t,onSaveData:o,appearance:i})=>{let r=e.props,[n,s]=No([]),[p,d]=No(!1),[l,h]=No(e.id);return Lo(()=>{n.length==0&&!p&&(d(!0),o({choice:[]}))},[p]),Lo(()=>{l!==e.id&&(h(e.id),s([]))},[e]),Lo(()=>{o({choice:n}),n.length>=r.minChoices?t(!0):t(!1)},[n]),ze.createElement(Lr,{className:a("selectListContainer",i)},ze.createElement(Nr,null,ze.createElement(Dr,{className:a("selectListTitle",i)},e.title),ze.createElement(Mr,{appearance:i,className:a("selectListSubtitle",i)},e.subtitle)),r.options.map((m,u)=>{let T=n.includes(m.id);return ze.createElement($r,{key:`select-item-${u}`,onClick:()=>{if(n.includes(m.id)){s(n.filter(x=>x!==m.id));return}n.length<r.maxChoices?s([...n,m.id]):n.length==1&&r.maxChoices==1&&s([m.id])},hideBottomBorder:u===r.options.length-1,className:a("selectListSelectItem",i)},ze.createElement(Ur,{className:a("selectListItemImage",i)},m.imageUri&&ze.createElement(_r,{src:m.imageUri,alt:`select-icon-${u}`}),ze.createElement(Wr,{appearance:i,className:a("selectListSelectItemText",i)},m.title)),ze.createElement(yt,{appearance:i,value:T,primaryColor:i.theme.colorPrimary}))}))};import fe,{useEffect as Kl,useState as zr}from"react";import{AnimatePresence as Yl,motion as Xl}from"framer-motion";var Jl=({children:e,id:t,shouldWrap:o=!1})=>fe.createElement(fe.Fragment,null,o?fe.createElement(Yl,{initial:!1},fe.createElement(Xl.div,{key:t,initial:{opacity:1,y:"100%"},animate:{opacity:1,y:0},exit:{opacity:0,y:"-100%"},transition:{duration:.5,ease:"easeInOut"},style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:1,overflowY:"auto"}},e)):e),no=({appearance:e,steps:t,selectedStep:o,customStepTypes:i,customVariables:r,onButtonClick:n,onStepCompletion:s,flowId:p,type:d,hideOnFlowCompletion:l,onComplete:h,setVisible:m,setShowModal:u,onDismiss:T,showPagination:x=!1})=>{let S={...{linkCollection:Ar,multiInput:br,callToAction:Br,selectList:Hr},...i},{primaryCTAClickSideEffects:I,secondaryCTAClickSideEffects:F}=ne(),[A,P]=zr(!1),[c,f]=zr({}),{markStepCompleted:b,markStepStarted:E,isLoading:$,updateCustomVariables:U,markFlowCompleted:W}=Y();Kl(()=>{U(r)},[r,$]);function B(){return{data:c[t[o].id]??{},stepId:t[o].id,customVariables:r}}function H(M,Q,j){let X=o+1<t.length?t[o+1]:null;n&&n(M,o,Q,X),s&&s(M,j,X,c,B())}function N(M,Q){f(j=>{let X={};return X[M.id]=Q,{...j,...X}})}function q(M){return M.selectedStep.imageUri?fe.createElement(Pr,{image:M.selectedStep.imageUri,appearance:e,className:a("formContainerSidebarImage",e)}):null}let z=fe.createElement(Er,{step:t[o],canContinue:A,formType:d,selectedStep:o,appearance:e,onPrimaryClick:async()=>{o+1<t.length&&await E(p,t[o+1].id),await b(p,t[o].id,B()),H(t[o],"primary",o),o+1>=t.length&&(h&&h(),T&&T(),l&&(m&&m(!1),u(!1)),W(p)),I(t[o])},onSecondaryClick:()=>{H(t[o],"secondary",o),F(t[o])},onBack:()=>{},steps:t}),G=t[o]??null;return fe.createElement(fe.Fragment,null,fe.createElement(wr,{className:a("formContainer",e)},fe.createElement(Fr,null,fe.createElement(Jl,{id:o,shouldWrap:d==="large-modal"},fe.createElement(kr,{key:G.id,type:d,className:a("formContent",e)},S[G.type]({stepData:G,canContinue:A,setCanContinue:P,onSaveData:M=>{N(G,M)},appearance:e}),x&&fe.createElement(Ir,{className:a("formPagination",e),appearance:e,stepCount:t.length,currentStep:o}),z))),d=="large-modal"&&fe.createElement(q,{selectedStep:t[o]})))};import $t from"react";import{createGlobalStyle as Ql}from"styled-components";function le({appearance:e}){if(!e||!e.styleOverrides)return $t.createElement($t.Fragment,null);let t=Object.entries(e.styleOverrides).filter(([i,r])=>typeof r=="object");if(t.length===0)return $t.createElement($t.Fragment,null);let o=Ql`
|
|
513
|
+
${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map(([s,p])=>`${wo(s)}: ${p};`).join(" ")} }`).join(" ")}`;return $t.createElement(o,{inlineStyles:t})}var Gr=({flowId:e,customStepTypes:t={},type:o="inline",visible:i,setVisible:r,customVariables:n,onComplete:s,appearance:p,hideOnFlowCompletion:d=!0,onStepCompletion:l,onButtonClick:h,dismissible:m=!0,endFlowOnDismiss:u=!1,modalPosition:T="center",repeatable:x=!1,onDismiss:C,showPagination:S=!1})=>{let{getFlow:I,getFlowSteps:F,isLoading:A,targetingLogicShouldHideFlow:P,getFlowStatus:c,getCurrentStepIndex:f,markFlowCompleted:b,markFlowNotStarted:E}=Y(),$=f(e),{mergeAppearanceWithDefault:U}=J(),[W,B]=Rl(!1),{setOpenFlowState:H,getOpenFlowState:N}=Fe();p=U(p);let[q,z]=i!==void 0&&r!==void 0?[i,r]:[N(e,!0),j=>H(e,j)];if(Zl(()=>{!W&&!A&&(B(!0),c(e)===Z&&x&&E(e),B(!0))},[W,B,A]),A)return null;let G=I(e);if(!G||P(G))return null;let M=F(e);if(!M||i!==void 0&&i===!1||c(e)===Z&&d)return null;let Q=()=>{z(!1),C&&C(),u===!0&&b(e)};if(T=="center"&&o==="modal"||o==="large-modal"){let j={padding:"24px"};return o==="large-modal"?(j.width="85%",j.height="90%",j.maxHeight="800px",j.minHeight="500px",j.padding="0"):j.width="400px",Oe.createElement(Ye,{appearance:p,onClose:Q,visible:q,style:j,dismissible:m},Oe.createElement(le,{appearance:p}),Oe.createElement(no,{appearance:p,steps:M,selectedStep:$,customStepTypes:t,customVariables:n,onButtonClick:h,onStepCompletion:l,flowId:e,type:o,hideOnFlowCompletion:d,onComplete:s,setVisible:r,setShowModal:z,onDismiss:C,showPagination:S}))}return o==="modal"&&T!=="center"?Oe.createElement(rr,{appearance:p,onClose:Q,visible:q},Oe.createElement(le,{appearance:p}),Oe.createElement(no,{appearance:p,steps:M,selectedStep:$,customStepTypes:t,customVariables:n,onButtonClick:h,onStepCompletion:l,flowId:e,type:o,hideOnFlowCompletion:d,onComplete:s,setVisible:r,setShowModal:z,onDismiss:C,showPagination:S})):Oe.createElement(Oe.Fragment,null,Oe.createElement(le,{appearance:p}),Oe.createElement(no,{appearance:p,steps:M,selectedStep:$,customStepTypes:t,customVariables:n,onButtonClick:h,onStepCompletion:l,flowId:e,type:o,hideOnFlowCompletion:d,onComplete:s,setVisible:r,setShowModal:z,onDismiss:C,showPagination:S})," ")},jr=Gr;import{useCallback as Vr,useContext as ea,useEffect as ta}from"react";function Do(){let{organizationId:e,userId:t,setOrganizationId:o}=ea(V),{mutateUserFlowState:i}=be(),{config:r}=Be(),n=ft(),{verifySDKInitiated:s}=gt();ta(()=>{if(t&&e){if(t.startsWith(ht))return;let l=`frigade-user-group-registered-${t}-${e}`;localStorage.getItem(l)||(n(`${ue}userGroups`,{...r,method:"POST",body:JSON.stringify({foreignUserId:t,foreignUserGroupId:e})}),localStorage.setItem(l,"true"))}},[t,e]);let p=Vr(async l=>{if(s(),!e||!t){console.error("Cannot add properties to organization: Organization ID and User ID must both be set.",{organizationId:e,userId:t});return}let h={foreignUserId:t,foreignUserGroupId:e,properties:l};await n(`${ue}userGroups`,{...r,method:"POST",body:JSON.stringify(h)}),i()},[e,t,r,i]),d=Vr(async(l,h)=>{if(s(),!e||!t){console.error("Cannot track event for organization: Organization ID and User ID must both be set.",{organizationId:e,userId:t});return}let u={foreignUserId:t,foreignUserGroupId:e,events:[{event:l,properties:h}]};await n(`${ue}userGroups`,{...r,method:"POST",body:JSON.stringify(u)}),i()},[e,t,r,i]);return{organizationId:e,setOrganizationId:o,addPropertiesToOrganization:p,trackEventForOrganization:d}}var qr="xFrigade_guestUserId",Kr="xFrigade_userId",Yr=({})=>{let{setFlowResponses:e}=At(),{userFlowStatesData:t,isLoadingUserFlowStateData:o,mutateUserFlowState:i}=be(),{userId:r,setUserId:n}=To(),[s,p]=Mo(null),{getFlowStatus:d}=Y(),{flows:l,userProperties:h,setIsNewGuestUser:m,flowResponses:u}=oa(V),[T,x]=Mo([]),[C,S]=Mo([]),{organizationId:I}=Do();so(()=>{if(!o&&t)for(let c=0;c<t.length;c++){let f=t[c],b=l.find(E=>E.slug===(f==null?void 0:f.flowId));if(b&&f&&f.shouldTrigger===!0&&b.type=="FORM"&&b.triggerType==="AUTOMATIC"&&!C.includes(b.slug)){setTimeout(()=>{F(f.flowId)},500);break}}},[o,t]),so(()=>{u.length>0&&i()},[u]);function F(c){let f=l.find(b=>b.slug===c);f&&f.triggerType==="AUTOMATIC"&&!C.includes(f.slug)&&(S([...C,f.slug]),x([f]))}function A(){if(!r){let c=localStorage.getItem(Kr);if(c){n(c);return}let f=localStorage.getItem(qr);if(f){n(f);return}m(!0);let b=ht+ra();try{localStorage.setItem(qr,b)}catch(E){console.log("Failed to save guest user id locally: Local storage unavailable",E)}n(E=>E||b)}}so(()=>{try{if(l){let c=[];l.forEach(f=>{if(f.data){let b=f.data.match(/"imageUri":"(.*?)"/g);b&&b.forEach(E=>{let $=E.replace('"imageUri":"',"").replace('"',"");if(c.includes($))return;let U=new Image;U.src=$,c.push($)})}})}}catch{}},[l]),so(()=>{if(r!==s&&e([]),p(r),r&&!r.startsWith(ht))try{localStorage.setItem(Kr,r)}catch(c){console.log("Failed to save user id locally: Local storage available",c)}r===null&&setTimeout(()=>{r===null&&A()},50)},[r,l,h]);function P(){return lt.createElement(lt.Fragment,null,T.map(c=>d(c.slug)!==Ae?null:lt.createElement("span",{key:c.slug},lt.createElement(jr,{flowId:c.slug,type:"modal",modalPosition:"center",endFlowOnDismiss:!0}))))}return lt.createElement(lt.Fragment,null,lt.createElement(P,null))};var lo={theme:{colorPrimary:"#000000",colorText:"#000000",colorBackground:"#ffffff",colorBackgroundSecondary:"#d2d2d2",colorTextOnPrimaryBackground:"#ffffff",colorTextSecondary:"#505050",colorTextDisabled:"#999999",colorBorder:"#E5E5E5",borderRadius:20}};import{ErrorBoundary as sa}from"react-error-boundary";var V=ia({publicApiKey:"",setUserId:()=>{},flows:[],setFlows:()=>{},failedFlowResponses:[],setFailedFlowResponses:()=>{},flowResponses:[],setFlowResponses:()=>{},userProperties:{},setUserProperties:()=>{},openFlowStates:{},setOpenFlowStates:()=>{},customVariables:{},setCustomVariables:()=>{},isNewGuestUser:!1,setIsNewGuestUser:()=>{},hasActiveFullPageFlow:!1,setHasActiveFullPageFlow:()=>{},organizationId:"",setOrganizationId:()=>{},navigate:()=>{},defaultAppearance:lo,shouldGracefullyDegrade:!1,setShouldGracefullyDegrade:()=>{}}),la=({publicApiKey:e,userId:t,organizationId:o,config:i,children:r})=>{var N,q;let[n,s]=Pe(t||null),[p,d]=Pe(o||null),[l,h]=Pe([]),[m,u]=Pe([]),[T,x]=Pe([]),[C,S]=Pe({}),[I,F]=Pe({}),[A,P]=Pe({}),[c,f]=Pe(!1),[b,E]=Pe(!1),[$,U]=Pe(!H(e)),W=(z,G)=>{if(G==="_blank"){window.open(z,"_blank");return}setTimeout(()=>{window.location.href=z},50)},B={theme:{...lo.theme,...((N=i==null?void 0:i.defaultAppearance)==null?void 0:N.theme)??{}},styleOverrides:{...lo.styleOverrides,...((q=i==null?void 0:i.defaultAppearance)==null?void 0:q.styleOverrides)??{}}};function H(z){return!!(z&&z.length>10&&z.substring(0,10)==="api_public")}return $o(()=>{t&&s(t)},[t]),$o(()=>{o&&d(o)},[o]),$o(()=>{if(H(e))U(!1);else{console.error("Frigade SDK failed to initialize. API key provided is either missing or valid."),U(!0);return}},[e,U]),$?at.createElement(V.Provider,{value:{publicApiKey:e,userId:n,setUserId:s,setFlows:h,flows:l,failedFlowResponses:m,setFailedFlowResponses:u,flowResponses:T,setFlowResponses:x,userProperties:C,setUserProperties:S,openFlowStates:I,setOpenFlowStates:F,customVariables:A,setCustomVariables:P,isNewGuestUser:c,setIsNewGuestUser:f,hasActiveFullPageFlow:b,setHasActiveFullPageFlow:E,organizationId:p,setOrganizationId:d,navigate:i&&i.navigate?i.navigate:W,defaultAppearance:B,shouldGracefullyDegrade:$,setShouldGracefullyDegrade:U}},r):at.createElement(sa,{fallback:at.createElement(at.Fragment,null,r)},at.createElement(V.Provider,{value:{publicApiKey:e,userId:n,setUserId:s,setFlows:h,flows:l,failedFlowResponses:m,setFailedFlowResponses:u,flowResponses:T,setFlowResponses:x,userProperties:C,setUserProperties:S,openFlowStates:I,setOpenFlowStates:F,customVariables:A,setCustomVariables:P,isNewGuestUser:c,setIsNewGuestUser:f,hasActiveFullPageFlow:b,setHasActiveFullPageFlow:E,organizationId:p,setOrganizationId:d,navigate:i&&i.navigate?i.navigate:W,defaultAppearance:B,shouldGracefullyDegrade:$,setShouldGracefullyDegrade:U}},at.createElement(na,{theme:B.theme},r,at.createElement(Yr,null))))};import ip from"react";import oe,{useEffect as kn,useState as Pn}from"react";import ve,{useState as Ia}from"react";import dt from"styled-components";import mo from"react";import ao from"react";import Jr from"styled-components";var Xr=Jr.span`
|
|
514
514
|
font-weight: 400;
|
|
515
515
|
font-size: 15px;
|
|
516
516
|
line-height: 20px;
|
|
@@ -519,7 +519,7 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
519
519
|
vertical-align: middle;
|
|
520
520
|
margin-left: 12px;
|
|
521
521
|
padding-right: 12px;
|
|
522
|
-
`,
|
|
522
|
+
`,aa=Jr.div`
|
|
523
523
|
flex-direction: row;
|
|
524
524
|
justify-content: space-between;
|
|
525
525
|
display: flex;
|
|
@@ -527,17 +527,17 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
527
527
|
padding-bottom: 20px;
|
|
528
528
|
border-top: 1px solid ${e=>e.theme.colorBorder};
|
|
529
529
|
width: 100%;
|
|
530
|
-
`,po=({label:e,value:t,labelStyle:o={},labelPosition:i="right",style:r,primaryColor:n="#000000",checkBoxType:s="square",appearance:p})=>ao.createElement(
|
|
530
|
+
`,po=({label:e,value:t,labelStyle:o={},labelPosition:i="right",style:r,primaryColor:n="#000000",checkBoxType:s="square",appearance:p})=>ao.createElement(aa,{className:a("checklistStepsContainer",p),appearance:p,style:{...r}},i==="left"&&e&&ao.createElement(Xr,{className:a("checklistStepLabel",p),style:o},e),ao.createElement(yt,{appearance:p,value:t,type:s,primaryColor:n}),i==="right"&&e&&ao.createElement(Xr,{className:a("checklistStepLabel",p),style:o},e));import{motion as pa}from"framer-motion";import Ut from"styled-components";var Qr=Ut.div`
|
|
531
531
|
font-weight: 700;
|
|
532
532
|
font-size: 18px;
|
|
533
533
|
line-height: 22px;
|
|
534
|
-
`,
|
|
534
|
+
`,Zr=Ut.p`
|
|
535
535
|
font-weight: 700;
|
|
536
536
|
font-size: 18px;
|
|
537
537
|
line-height: 22px;
|
|
538
538
|
margin: 20px 0px 0px 0px;
|
|
539
539
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
|
|
540
|
-
`,
|
|
540
|
+
`,Rr=Ut.p`
|
|
541
541
|
font-weight: 400;
|
|
542
542
|
font-size: 15px;
|
|
543
543
|
line-height: 28px;
|
|
@@ -552,35 +552,35 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
552
552
|
height: 80%;
|
|
553
553
|
border-top-right-radius: 8px;
|
|
554
554
|
border-bottom-right-radius: 8px;
|
|
555
|
-
`,
|
|
555
|
+
`,ei=Ut.div`
|
|
556
556
|
flex-direction: row;
|
|
557
557
|
justify-content: flex-start;
|
|
558
|
-
`;var
|
|
558
|
+
`;var ti=({data:e,index:t,isSelected:o,primaryColor:i,style:r,onClick:n,appearance:s})=>{var p,d;return mo.createElement("div",{style:{position:"relative",paddingLeft:"20px"},onClick:()=>{n()}},o&&mo.createElement(co,{className:a("checklistStepItemSelectedIndicator",s),as:pa.div,layoutId:"checklis-step-selected",style:{backgroundColor:((p=s==null?void 0:s.theme)==null?void 0:p.colorPrimary)??i}}),mo.createElement(ei,{className:a("checklistStepItem",s),key:`hero-checklist-step-${t}`,role:"listitem"},mo.createElement(po,{value:e.complete,labelPosition:"left",label:e.stepName,style:r,primaryColor:((d=s==null?void 0:s.theme)==null?void 0:d.colorPrimary)??i,appearance:s})))};import pt from"react";import{motion as da}from"framer-motion";import Uo from"styled-components";var ca={backgroundColor:"#E6E6E6"},ma=Uo.div`
|
|
559
559
|
display: flex;
|
|
560
560
|
flex-direction: ${e=>e.textLocation=="top"?"column":"row"};
|
|
561
561
|
justify-content: flex-start;
|
|
562
562
|
align-items: ${e=>e.textLocation=="top"?"flex-end":"center"};
|
|
563
563
|
|
|
564
|
-
${e=>
|
|
565
|
-
`,
|
|
564
|
+
${e=>it(e)}
|
|
565
|
+
`,ua=Uo.div`
|
|
566
566
|
flex-grow: 1;
|
|
567
567
|
position: relative;
|
|
568
568
|
${e=>e.textLocation=="top"?"width: 100%;":""}
|
|
569
|
-
`,
|
|
569
|
+
`,fa=Uo.span`
|
|
570
570
|
font-weight: 500;
|
|
571
571
|
font-size: 15px;
|
|
572
572
|
line-height: 18px;
|
|
573
573
|
padding-right: ${e=>e.padding};
|
|
574
574
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
|
|
575
575
|
margin-bottom: ${e=>e.textLocation=="top"?"8px":"0px"};
|
|
576
|
-
${e=>
|
|
577
|
-
`,
|
|
576
|
+
${e=>it(e)}
|
|
577
|
+
`,ga={position:"relative",left:0,top:0,width:"100%",minWidth:"40px",height:"10px",borderRadius:"20px"},ha={position:"absolute",left:0,top:0,height:"10px",borderRadius:"20px"},Le=({count:e,total:t,fillColor:o,bgColor:i=ca.backgroundColor,display:r="count",textLocation:n="left",style:s={},textStyle:p={},appearance:d})=>{var x,C;if(t===0)return pt.createElement(pt.Fragment,null);let l=e===0?"10px":`${e/t*100}%`,h=r==="compact"?"5px":"10px",m=Math.round(e/t*100),u=r==="compact"?"5px":"20px",T;return r==="count"?T=`${e} of ${t}`:r==="compact"?T=`${m}%`:r==="percent"&&(T=`${m}% complete`),n==="top"&&(u="0px"),pt.createElement(ma,{className:a("progressBarContainer",d),textLocation:n,styleOverrides:s},pt.createElement(fa,{className:a("progressBarStepText",d),style:{...p,fontSize:r==="compact"?12:15,fontWeight:r==="compact"?400:500},appearance:d,padding:u,textLocation:n},T),pt.createElement(ua,{textLocation:n,className:a("progressBar",d)},pt.createElement(da.div,{style:{...ha,width:l,height:h,backgroundColor:((x=d==null?void 0:d.theme)==null?void 0:x.colorPrimary)??o,zIndex:r=="compact"?1:5},className:a("progressBarFill",d)}),pt.createElement("div",{className:a("progressBarBackground",d),style:{...ga,height:h,backgroundColor:((C=d==null?void 0:d.theme)==null?void 0:C.colorSecondary)??i}})))};import Wt from"react";import xa from"styled-components";import fo from"react";import uo from"react";var bt=({stepData:e,appearance:t})=>uo.createElement(uo.Fragment,null,uo.createElement(Zr,{appearance:t,className:a("checklistStepTitle",t),dangerouslySetInnerHTML:ie(e.title)}),uo.createElement(Rr,{appearance:t,className:a("checklistStepSubtitle",t),dangerouslySetInnerHTML:ie(e.subtitle)}));import _t from"react";var Tt=({stepData:e,appearance:t})=>{let o=()=>{e.handlePrimaryButtonClick&&e.handlePrimaryButtonClick()},i=()=>{e.handleSecondaryButtonClick&&e.handleSecondaryButtonClick()};return _t.createElement(_t.Fragment,null,_t.createElement(to,null,e.secondaryButtonTitle&&_t.createElement(R,{appearance:t,secondary:!0,title:e.secondaryButtonTitle,onClick:i,style:{width:"auto",marginRight:"12px"}}),_t.createElement(R,{appearance:t,title:e.primaryButtonTitle,onClick:o})))};var wt=({stepData:e,appearance:t})=>fo.createElement(fo.Fragment,null,fo.createElement(bt,{stepData:e,appearance:t}),fo.createElement(Tt,{stepData:e,appearance:t}));import oi from"react";function ri(e){if(e.videoUri.includes("youtube")){let t=e.videoUri.split("v=")[1],o=t.indexOf("&");return o!==-1&&(t=t.substring(0,o)),oi.createElement("iframe",{width:"480",height:"260",src:`https://www.youtube.com/embed/${t}`,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:a("checklistStepVideo",e.appearance)})}else return oi.createElement("video",{width:"480",height:"260",controls:!0,src:e.videoUri})}var _o="default",Ca=xa.img`
|
|
578
578
|
border-radius: 4px;
|
|
579
579
|
max-height: 260px;
|
|
580
580
|
min-height: 200px;
|
|
581
|
-
`,
|
|
581
|
+
`,ii=({stepData:e,appearance:t})=>{if(e!=null&&e.StepContent){let o=e.StepContent;return Wt.createElement("div",null,o)}return Wt.createElement(Qr,{className:a("checklistStepContent",t)},e.imageUri?Wt.createElement(Ca,{className:a("checklistStepImage",t),src:e.imageUri,style:e.imageStyle}):null,e.videoUri?Wt.createElement(ri,{videoUri:e.videoUri,appearance:t}):null,Wt.createElement(wt,{stepData:e,appearance:t}))};import Ce,{useRef as Sa,useState as ya}from"react";import Ft from"styled-components";var ni=Ft.div`
|
|
582
582
|
display: block;
|
|
583
|
-
`,
|
|
583
|
+
`,ba=Ft.div`
|
|
584
584
|
display: flex;
|
|
585
585
|
flex-direction: row;
|
|
586
586
|
flex-wrap: wrap;
|
|
@@ -590,20 +590,20 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
590
590
|
align-content: center;
|
|
591
591
|
margin-top: 24px;
|
|
592
592
|
margin-bottom: 24px;
|
|
593
|
-
`,
|
|
593
|
+
`,Ta=Ft.div`
|
|
594
594
|
display: flex;
|
|
595
595
|
align-items: center;
|
|
596
596
|
justify-content: flex-start;
|
|
597
597
|
flex-direction: column;
|
|
598
598
|
margin-right: 16px;
|
|
599
|
-
`,
|
|
599
|
+
`,wa=Ft.video`
|
|
600
600
|
width: 200px;
|
|
601
601
|
height: 120px;
|
|
602
|
-
`,
|
|
602
|
+
`,Fa=Ft.div`
|
|
603
603
|
font-size: 14px;
|
|
604
604
|
line-height: 20px;
|
|
605
605
|
text-align: center;
|
|
606
|
-
`,
|
|
606
|
+
`,ka=Ft.div`
|
|
607
607
|
position: absolute;
|
|
608
608
|
width: 200px;
|
|
609
609
|
height: 120px;
|
|
@@ -623,9 +623,9 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
623
623
|
box-shadow: 0px 6px 25px rgba(0, 0, 0, 0.06);
|
|
624
624
|
border-radius: 50%;
|
|
625
625
|
}
|
|
626
|
-
`,
|
|
626
|
+
`,si="videoCarousel",li=({stepData:e,appearance:t})=>{var r;if(!((r=e.props)!=null&&r.videos))return Ce.createElement(ni,null,Ce.createElement(wt,{stepData:e,appearance:t}));function o({video:n}){let s=Sa(),[p,d]=ya(!1);return Ce.createElement(Ta,null,!p&&Ce.createElement(ka,{onClick:()=>{d(!0),s.current.play()},appearance:t},Ce.createElement(oo,null)),Ce.createElement(wa,{controls:p,ref:s,play:p,src:n.uri}),Ce.createElement(Fa,null,n.title))}let i=e.props;return i.videos?Ce.createElement(ni,null,Ce.createElement(bt,{stepData:e,appearance:t}),Ce.createElement(ba,null,i.videos.map((n,s)=>Ce.createElement("span",{key:`${n.uri}-${s}`},Ce.createElement(o,{video:n})))),Ce.createElement(Tt,{stepData:e,appearance:t})):null};import Ge from"react";import go from"styled-components";var ai=go.div`
|
|
627
627
|
display: block;
|
|
628
|
-
`,
|
|
628
|
+
`,Pa=go.pre`
|
|
629
629
|
display: block;
|
|
630
630
|
background-color: #2a2a2a;
|
|
631
631
|
color: #f8f8f8;
|
|
@@ -641,69 +641,69 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
641
641
|
white-space: -o-pre-wrap; /* Opera 7 */
|
|
642
642
|
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
|
643
643
|
margin-bottom: 24px;
|
|
644
|
-
`,
|
|
644
|
+
`,va=go.div`
|
|
645
645
|
font-size: 15px;
|
|
646
646
|
line-height: 20px;
|
|
647
647
|
margin-bottom: 12px;
|
|
648
648
|
margin-top: 12px;
|
|
649
|
-
`,
|
|
649
|
+
`,Ea=go.div`
|
|
650
650
|
margin-top: 24px;
|
|
651
|
-
`,
|
|
651
|
+
`,pi="codeSnippet",di=({stepData:e,appearance:t})=>{var i;if(!((i=e.props)!=null&&i.codeSnippets))return Ge.createElement(ai,null,Ge.createElement(wt,{stepData:e,appearance:t}));let o=e.props;return o.codeSnippets?Ge.createElement(ai,null,Ge.createElement(bt,{stepData:e,appearance:t}),Ge.createElement(Ea,null,o.codeSnippets.map((r,n)=>Ge.createElement("div",{key:n},r.title?Ge.createElement(va,null,r.title):null,r.code?Ge.createElement(Pa,null,r.code):null))),Ge.createElement(Tt,{stepData:e,appearance:t})):null};var Aa=dt.div`
|
|
652
652
|
display: flex;
|
|
653
653
|
flex-direction: row;
|
|
654
654
|
min-width: ${e=>e.type!="modal"?"1000px":"100%"};
|
|
655
655
|
background: ${e=>{var t;return(t=e.appearance)==null?void 0:t.theme.colorBackground}};
|
|
656
656
|
box-shadow: ${e=>e.type!="modal"?"0px 6px 25px rgba(0, 0, 0, 0.06)":"none"};
|
|
657
657
|
border-radius: 8px;
|
|
658
|
-
`,
|
|
658
|
+
`,Ba=dt.h1`
|
|
659
659
|
font-size: 24px;
|
|
660
660
|
font-weight: 600;
|
|
661
661
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
|
|
662
|
-
`,
|
|
662
|
+
`,Oa=dt.h2`
|
|
663
663
|
font-size: 15px;
|
|
664
664
|
line-height: 20px;
|
|
665
665
|
color: ${e=>{var t,o;return((o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary)??"#4d4d4d"}};
|
|
666
666
|
margin: 10px 0px 0px 0px;
|
|
667
|
-
`,
|
|
667
|
+
`,ci=dt.div`
|
|
668
668
|
padding-bottom: 16px;
|
|
669
|
-
`,
|
|
669
|
+
`,La=dt.div`
|
|
670
670
|
list-style: none;
|
|
671
671
|
padding: 0;
|
|
672
672
|
margin: 0;
|
|
673
673
|
cursor: pointer;
|
|
674
674
|
width: 300px;
|
|
675
|
-
`,
|
|
675
|
+
`,Na=dt.div`
|
|
676
676
|
width: 1px;
|
|
677
677
|
margin: 40px;
|
|
678
678
|
background: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
|
|
679
|
-
`,
|
|
679
|
+
`,Da=dt.div`
|
|
680
680
|
flex: 2;
|
|
681
681
|
padding: 2rem;
|
|
682
|
-
`,
|
|
682
|
+
`,Ma=({title:e,subtitle:t,steps:o=[],style:i={},selectedStep:r,setSelectedStep:n,className:s="",customStepTypes:p=new Map,appearance:d,type:l})=>{let{mergeAppearanceWithDefault:h}=J();d=h(d);let u={...{[_o]:ii,[si]:li,[pi]:di},...p},[T,x]=Ia(0),C=r??T,S=n??x,I=o.filter(A=>A.complete===!0).length,F=()=>{var A;return!((A=o[C])!=null&&A.type)||!u[o[C].type]?u[_o]({stepData:o[C],appearance:d}):u[o[C].type]({stepData:o[C],appearance:d})};return ve.createElement(Aa,{type:l,style:i,className:s,appearance:d},ve.createElement(ci,{style:{flex:1}},ve.createElement(ci,{style:{padding:"30px 0px 30px 30px",borderBottom:"none"}},ve.createElement(Ba,{className:a("checklistTitle",d),appearance:d},e),ve.createElement(Oa,{className:a("checklistSubtitle",d),appearance:d},t),ve.createElement(Le,{total:o.length,count:I,fillColor:d.theme.colorPrimary,style:{marginTop:"24px"},appearance:d})),ve.createElement(La,{className:a("checklistStepsContainer",d)},o.map((A,P)=>ve.createElement(ti,{data:A,index:P,key:P,listLength:o.length,isSelected:P===C,primaryColor:d.theme.colorPrimary,style:{justifyContent:"space-between"},onClick:()=>{S(P)}})))),ve.createElement(Na,{appearance:d,className:a("checklistDivider",d)}),ve.createElement(Da,null,ve.createElement(F,null)))},Wo=Ma;import L,{useState as za}from"react";import mi from"react";import $a from"styled-components";var Ua=$a.svg`
|
|
683
683
|
transition: 'transform 0.35s ease-in-out';
|
|
684
|
-
`,
|
|
684
|
+
`,kt=({color:e="#323232",style:t,className:o})=>mi.createElement(Ua,{width:"7",height:"10",viewBox:"0 0 9 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t,className:o},mi.createElement("path",{d:"M1 13L7.5 7L0.999999 1",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}));import{motion as Ga}from"framer-motion";import se from"styled-components";var Ho={boxShadow:"0px 6px 25px rgba(0, 0, 0, 0.06)",padding:"32px",maxHeight:"700px",msOverflowStyle:"none",scrollbarWidth:"none",paddingBottom:"12px",minHeight:"610px"},ui=se.div`
|
|
685
685
|
max-height: 350px;
|
|
686
686
|
padding-bottom: 40px;
|
|
687
|
-
`,
|
|
687
|
+
`,fi=se.div`
|
|
688
688
|
display: flex;
|
|
689
689
|
flex-direction: column;
|
|
690
690
|
margin-top: 20px;
|
|
691
|
-
`,
|
|
691
|
+
`,gi=se.h1`
|
|
692
692
|
font-style: normal;
|
|
693
693
|
font-weight: 600;
|
|
694
694
|
font-size: 30px;
|
|
695
695
|
line-height: 36px;
|
|
696
696
|
margin-bottom: 16px;
|
|
697
697
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
|
|
698
|
-
`,
|
|
698
|
+
`,hi=se.h2`
|
|
699
699
|
font-weight: 400;
|
|
700
700
|
font-size: 16px;
|
|
701
701
|
line-height: 20px;
|
|
702
702
|
margin-bottom: 16px;
|
|
703
703
|
padding-left: 1px;
|
|
704
704
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
|
|
705
|
-
`,
|
|
706
|
-
${e=>
|
|
705
|
+
`,xi=se.div`
|
|
706
|
+
${e=>w(e)} {
|
|
707
707
|
border: 1px solid #fafafa;
|
|
708
708
|
}
|
|
709
709
|
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
|
|
@@ -712,12 +712,12 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
712
712
|
flex-direction: column;
|
|
713
713
|
min-height: 240px;
|
|
714
714
|
overflow: hidden;
|
|
715
|
-
`,
|
|
715
|
+
`,Ci=se.div`
|
|
716
716
|
display: flex;
|
|
717
717
|
flex-direction: row;
|
|
718
718
|
justify-content: space-between;
|
|
719
|
-
`,
|
|
720
|
-
${e=>
|
|
719
|
+
`,Si=se.p`
|
|
720
|
+
${e=>w(e)} {
|
|
721
721
|
font-weight: 400;
|
|
722
722
|
font-size: 10px;
|
|
723
723
|
line-height: 12px;
|
|
@@ -725,13 +725,13 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
725
725
|
color: #8c8c8c;
|
|
726
726
|
margin: 20px;
|
|
727
727
|
}
|
|
728
|
-
`,
|
|
728
|
+
`,yi=se.div`
|
|
729
729
|
display: flex;
|
|
730
730
|
flex-direction: row;
|
|
731
|
-
`,
|
|
731
|
+
`,bi=se.div`
|
|
732
732
|
flex: 1;
|
|
733
|
-
`,
|
|
734
|
-
${e=>
|
|
733
|
+
`,Ti=se.div`
|
|
734
|
+
${e=>w(e)} {
|
|
735
735
|
display: flex;
|
|
736
736
|
justify-content: center;
|
|
737
737
|
align-content: center;
|
|
@@ -740,8 +740,8 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
740
740
|
padding-left: 8px;
|
|
741
741
|
padding-right: 8px;
|
|
742
742
|
}
|
|
743
|
-
`,
|
|
744
|
-
${e=>
|
|
743
|
+
`,wi=se.p`
|
|
744
|
+
${e=>w(e)} {
|
|
745
745
|
font-style: normal;
|
|
746
746
|
font-weight: 600;
|
|
747
747
|
font-size: 22px;
|
|
@@ -752,8 +752,8 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
752
752
|
margin-top: 20px;
|
|
753
753
|
margin-bottom: 16px;
|
|
754
754
|
}
|
|
755
|
-
`,
|
|
756
|
-
${e=>
|
|
755
|
+
`,Fi=se.p`
|
|
756
|
+
${e=>w(e)} {
|
|
757
757
|
font-weight: 400;
|
|
758
758
|
font-size: 14px;
|
|
759
759
|
line-height: 18px;
|
|
@@ -761,15 +761,15 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
761
761
|
color: ${e=>e.appearance.theme.colorTextSecondary};
|
|
762
762
|
margin-bottom: 8px;
|
|
763
763
|
}
|
|
764
|
-
`,
|
|
765
|
-
${e=>
|
|
764
|
+
`,ki=se.div`
|
|
765
|
+
${e=>w(e)} {
|
|
766
766
|
display: flex;
|
|
767
767
|
flex-direction: row;
|
|
768
768
|
justify-content: center;
|
|
769
769
|
gap: 8px;
|
|
770
770
|
}
|
|
771
|
-
`,
|
|
772
|
-
${e=>
|
|
771
|
+
`,Pi=se.div`
|
|
772
|
+
${e=>w(e)} {
|
|
773
773
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
774
774
|
background-color: ${e=>e.selected?"#FAFAFA":"#FFFFFF"};
|
|
775
775
|
:hover {
|
|
@@ -788,8 +788,8 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
788
788
|
justify-content: space-between;
|
|
789
789
|
position: relative;
|
|
790
790
|
cursor: pointer;
|
|
791
|
-
`,
|
|
792
|
-
${e=>
|
|
791
|
+
`,vi=se.p`
|
|
792
|
+
${e=>w(e)} {
|
|
793
793
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
794
794
|
color: ${e=>e.selected?"#434343":"#BFBFBF"};
|
|
795
795
|
}
|
|
@@ -797,12 +797,12 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
797
797
|
font-size: 14px;
|
|
798
798
|
line-height: 22px;
|
|
799
799
|
margin: 0;
|
|
800
|
-
`,
|
|
800
|
+
`,Ei=se.div`
|
|
801
801
|
display: flex;
|
|
802
802
|
flex-direction: row;
|
|
803
803
|
justify-content: flex-end;
|
|
804
804
|
align-content: center;
|
|
805
|
-
`,Ii=
|
|
805
|
+
`,Ii=se.div`
|
|
806
806
|
display: flex;
|
|
807
807
|
flex: 1;
|
|
808
808
|
flex-direction: row;
|
|
@@ -810,14 +810,14 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
810
810
|
align-content: center;
|
|
811
811
|
align-items: center;
|
|
812
812
|
margin-right: 20px;
|
|
813
|
-
`,
|
|
813
|
+
`,Ai=se.div`
|
|
814
814
|
display: block;
|
|
815
815
|
width: 100%;
|
|
816
|
-
`;import
|
|
816
|
+
`;import _a from"styled-components";var Bi=_a.div`
|
|
817
817
|
flex-direction: column;
|
|
818
818
|
justify-content: center;
|
|
819
819
|
display: flex;
|
|
820
|
-
`;import
|
|
820
|
+
`;import Ve from"react";import{motion as Wa}from"framer-motion";import je from"styled-components";var Oi=je.div`
|
|
821
821
|
border: 1px solid #fafafa;
|
|
822
822
|
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
|
|
823
823
|
border-radius: 14px;
|
|
@@ -825,14 +825,14 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
825
825
|
display: flex;
|
|
826
826
|
flex-direction: column;
|
|
827
827
|
overflow: hidden;
|
|
828
|
-
`,Li=
|
|
828
|
+
`,Li=je.div`
|
|
829
829
|
display: flex;
|
|
830
830
|
flex-wrap: wrap;
|
|
831
831
|
justify-content: space-between;
|
|
832
832
|
overflow: hidden;
|
|
833
833
|
row-gap: 10px;
|
|
834
|
-
`,
|
|
835
|
-
${e=>
|
|
834
|
+
`,Ni=je.div`
|
|
835
|
+
${e=>w(e)} {
|
|
836
836
|
color: #595959;
|
|
837
837
|
}
|
|
838
838
|
text-transform: uppercase;
|
|
@@ -841,8 +841,8 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
841
841
|
line-height: 12px;
|
|
842
842
|
letter-spacing: 0.09em;
|
|
843
843
|
margin-bottom: 12px;
|
|
844
|
-
`,
|
|
845
|
-
${e=>
|
|
844
|
+
`,Di=je.div`
|
|
845
|
+
${e=>w(e)} {
|
|
846
846
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
847
847
|
background: #ffffff;
|
|
848
848
|
border: 1px solid #fafafa;
|
|
@@ -854,8 +854,8 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
854
854
|
|
|
855
855
|
max-width: 150px;
|
|
856
856
|
min-width: 200px;
|
|
857
|
-
`,
|
|
858
|
-
${e=>
|
|
857
|
+
`,Mi=je.div`
|
|
858
|
+
${e=>w(e)} {
|
|
859
859
|
background: radial-gradient(50% 50% at 50% 50%, #ffffff 0%, #f7f7f7 100%);
|
|
860
860
|
}
|
|
861
861
|
width: 40px;
|
|
@@ -866,14 +866,14 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
866
866
|
justify-content: center;
|
|
867
867
|
align-content: center;
|
|
868
868
|
align-items: center;
|
|
869
|
-
|
|
869
|
+
`,$i=je.div`
|
|
870
870
|
font-weight: 600;
|
|
871
871
|
font-size: 20px;
|
|
872
872
|
line-height: 24px;
|
|
873
873
|
width: 20px;
|
|
874
874
|
height: 20px;
|
|
875
|
-
|
|
876
|
-
${e=>
|
|
875
|
+
`,Ui=je.div`
|
|
876
|
+
${e=>w(e)} {
|
|
877
877
|
color: #434343;
|
|
878
878
|
}
|
|
879
879
|
font-weight: 600;
|
|
@@ -881,20 +881,20 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
881
881
|
line-height: 17px;
|
|
882
882
|
margin-top: 12px;
|
|
883
883
|
margin-bottom: 8px;
|
|
884
|
-
`,
|
|
885
|
-
${e=>
|
|
884
|
+
`,_i=je.div`
|
|
885
|
+
${e=>w(e)} {
|
|
886
886
|
color: #8c8c8c;
|
|
887
887
|
}
|
|
888
888
|
font-weight: 400;
|
|
889
889
|
font-size: 12px;
|
|
890
890
|
line-height: 14px;
|
|
891
|
-
`,
|
|
891
|
+
`,Wi=je.a`
|
|
892
892
|
color: ${e=>e.color};
|
|
893
893
|
font-size: 12px;
|
|
894
894
|
line-height: 14px;
|
|
895
895
|
font-weight: 400;
|
|
896
896
|
cursor: pointer;
|
|
897
|
-
`;var
|
|
897
|
+
`;var Ha=({steps:e,style:t,title:o,primaryColor:i,appearance:r,onButtonClick:n})=>{let{primaryCTAClickSideEffects:s}=ne();return Ve.createElement(Oi,{style:t,className:a("guideContainer",r)},Ve.createElement(Ni,{className:a("guideTitle",r)},o),Ve.createElement(Li,{className:a("guideItemContainer",r)},e.map((p,d)=>Ve.createElement(Di,{key:`guide-${p.id??d}`,as:Wa.div,whileHover:{boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.05)",transition:{duration:.25}},className:a("guideItem",r)},p.icon&&Ve.createElement(Mi,{className:a("guideIcon",r)},Ve.createElement($i,null,p.icon)),Ve.createElement(Ui,{className:a("guideItemTitle",r),dangerouslySetInnerHTML:ie(p.title)}),Ve.createElement(_i,{className:a("guideItemSubtitle",r),dangerouslySetInnerHTML:ie(p.subtitle)}),Ve.createElement(Wi,{className:a("guideItemLink",r),color:i,onClick:()=>{p.primaryButtonUri&&s(p),n&&n(p)}},p.primaryButtonTitle)))))},Ht=Ha;var ja=({steps:e,title:t,subtitle:o,stepsTitle:i,visible:r,onClose:n,selectedStep:s,setSelectedStep:p,customStepTypes:d,appearance:l,guideData:h,guideTitle:m,onGuideButtonClick:u})=>{let T=({stepData:f,handleSecondaryCTAClick:b,handleCTAClick:E})=>f?L.createElement(Ti,{className:a("checklistStepContainer",l),"data-testid":"checklistStepContainer"},L.createElement(wi,{appearance:l,className:a("checklistStepTitle",l),dangerouslySetInnerHTML:ie(f.title)}),L.createElement(Fi,{appearance:l,className:a("checklistStepSubtitle",l),dangerouslySetInnerHTML:ie(f.subtitle)}),L.createElement(ki,{className:a("checklistCTAContainer",l)},f.secondaryButtonTitle&&L.createElement(R,{title:f.secondaryButtonTitle,onClick:b,appearance:l,secondary:!0}),L.createElement(R,{title:f.primaryButtonTitle,onClick:E,appearance:l}))):L.createElement(L.Fragment,null),C={...{default:f=>{var U;if((U=e[F])!=null&&U.StepContent){let W=e[F].StepContent;return L.createElement("div",null,W)}let b=e[F];return L.createElement(T,{stepData:f,handleCTAClick:()=>{b.handlePrimaryButtonClick&&b.handlePrimaryButtonClick()},handleSecondaryCTAClick:()=>{b.handleSecondaryButtonClick&&b.handleSecondaryButtonClick()}})}},...d},[S,I]=za(0),F=s??S,A=p??I,P=()=>{var f;return e?!((f=e[F])!=null&&f.type)||!C[e[F].type]?C.default(e[F]):C[e[F].type]({stepData:e[F],primaryColor:l.theme.colorPrimary}):L.createElement(L.Fragment,null)},c=e.filter(f=>f.complete).length;return r?(l.theme.modalContainer||(l.theme.borderRadius&&(Ho.borderRadius=l.theme.borderRadius+"px"),l.theme.modalContainer=Ho),L.createElement(Ye,{onClose:n,visible:r,appearance:l},L.createElement(Ai,null,L.createElement(fi,null,L.createElement(gi,{appearance:l,className:a("checklistTitle",l)},t),L.createElement(hi,{appearance:l,className:a("checklistSubtitle",l)},o)),L.createElement(ui,null,e&&e.length>0&&L.createElement(xi,{className:a("stepsContainer",l)},L.createElement(Ci,null,L.createElement("div",{style:{flex:3}},L.createElement(Si,{className:a("stepsTitle",l)},i)),L.createElement(Ii,null,L.createElement(Le,{fillColor:l.theme.colorPrimary,style:{width:"100%"},count:c,total:e.length,appearance:l}))),L.createElement(yi,null,L.createElement(bi,{className:a("checklistStepListContainer",l),appearance:l},e.map((f,b)=>{let E=F===b;return L.createElement(Pi,{selected:E,className:a(`checklistStepListItem${E?"Selected":""}`,l),key:`checklist-guide-step-${f.id??b}`,disabled:f.blocked,onClick:()=>{f.blocked||A(b)},title:f.blocked?"Finish remaining steps to continue":void 0},E&&L.createElement(co,{className:a("checklistStepItemSelectedIndicator",l),as:Ga.div,layoutId:"checklist-step-selected",style:{backgroundColor:l.theme.colorPrimary,borderRadius:0,height:"100%",top:"0%",width:"2px"}}),L.createElement(vi,{selected:E,className:a(`checklistStepListStepName${E?"Selected":""}`,l)},f.stepName),L.createElement(Ei,null,L.createElement(yt,{value:f.complete,type:"round",primaryColor:l.theme.colorPrimary,progress:f.progress,appearance:l}),L.createElement(Bi,null,L.createElement(kt,{style:{marginLeft:"10px"},color:l.theme.colorBackgroundSecondary}))))})),L.createElement(P,null))),h&&h.length>0&&L.createElement(Ht,{steps:h,title:m,primaryColor:l.theme.colorPrimary,style:{border:"none",boxShadow:"none"},appearance:l,onButtonClick:f=>(u&&u(f),!0)}))))):L.createElement(L.Fragment,null)},zo=ja;import{useEffect as Va,useState as qa}from"react";var Hi=()=>{let e={isSmall:"(max-width: 480px)",isMedium:"(min-width: 481px) AND (max-width: 1023px)",isLarge:"(min-width: 1025px)"},t=Object.fromEntries(Object.entries(e).map(([p])=>[p,!1])),[o,i]=qa(t),r=null,n=()=>{r!==null?clearTimeout(r):s(),r=setTimeout(()=>{s()},16)},s=()=>{let p=Object.fromEntries(Object.entries(e).map(([d,l])=>{if(!window)return[d,!1];let h=window.matchMedia(l);return h.addEventListener("change",n),[d,h.matches]}));i(p)};return Va(()=>{s()},[]),o};import ge,{useEffect as on,useState as Xa}from"react";import pe from"react";import{AnimatePresence as Ka,motion as Ya}from"framer-motion";import qe from"styled-components";var zi=qe.div`
|
|
898
898
|
background-color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBackground}};
|
|
899
899
|
border: 1px solid;
|
|
900
900
|
border-color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBorder}};
|
|
@@ -906,42 +906,42 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
906
906
|
display: flex;
|
|
907
907
|
flex-direction: column;
|
|
908
908
|
transition: max-height 0.25s;
|
|
909
|
-
`,
|
|
909
|
+
`,Gi=qe.div`
|
|
910
910
|
display: flex;
|
|
911
911
|
margin-bottom: 20px;
|
|
912
|
-
`,
|
|
912
|
+
`,ji=qe.img`
|
|
913
913
|
border-radius: 4px;
|
|
914
914
|
max-height: 260px;
|
|
915
915
|
min-height: 200px;
|
|
916
|
-
`,
|
|
916
|
+
`,Vi=qe.div`
|
|
917
917
|
display: flex;
|
|
918
918
|
flex-direction: row;
|
|
919
919
|
justify-content: space-between;
|
|
920
920
|
align-items: center;
|
|
921
|
-
`,
|
|
921
|
+
`,qi=qe.p`
|
|
922
922
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
|
|
923
923
|
font-style: normal;
|
|
924
924
|
font-weight: 500;
|
|
925
925
|
font-size: 16px;
|
|
926
926
|
line-height: 18px;
|
|
927
927
|
margin-left: 8px;
|
|
928
|
-
`,
|
|
928
|
+
`,Ki=qe.div`
|
|
929
929
|
padding: 20px;
|
|
930
930
|
cursor: pointer;
|
|
931
931
|
:hover {
|
|
932
932
|
opacity: 0.8;
|
|
933
933
|
}
|
|
934
|
-
`,
|
|
934
|
+
`,eh=qe.div``,Yi=qe.p`
|
|
935
935
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
|
|
936
936
|
font-weight: 400;
|
|
937
937
|
font-size: 14px;
|
|
938
938
|
line-height: 22px;
|
|
939
|
-
`,
|
|
939
|
+
`,Xi=qe.div`
|
|
940
940
|
display: flex;
|
|
941
941
|
flex-direction: row;
|
|
942
942
|
justify-content: flex-start;
|
|
943
943
|
align-items: center;
|
|
944
|
-
`;var
|
|
944
|
+
`;var Ji=({stepData:e,collapsed:t,onClick:o,onPrimaryButtonClick:i,onSecondaryButtonClick:r,appearance:n})=>{var p,d;let s=t?{}:{transform:"rotate(90deg)"};return pe.createElement(zi,{onClick:()=>t?o():null,"data-testid":`step-${e.id}`,className:a("checklistStepContainer",n),appearance:n},pe.createElement(Vi,{className:a("stepHeader",n)},pe.createElement(Xi,null,pe.createElement(po,{value:e.complete,style:{width:"auto",borderTop:0},primaryColor:(p=n==null?void 0:n.theme)==null?void 0:p.colorPrimary,appearance:n}),pe.createElement(qi,{appearance:n,className:a("stepTitle",n),dangerouslySetInnerHTML:ie(e.title)})),pe.createElement(Ki,{className:a("stepChevronContainer",n),onClick:()=>o()},pe.createElement(kt,{style:{...s,transition:"transform 0.1s ease-in-out"},color:(d=n==null?void 0:n.theme)==null?void 0:d.colorTextSecondary}))),pe.createElement(Ka,null,!t&&pe.createElement(Ya.div,{initial:{opacity:1,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:1,height:0},key:e.id,style:{overflow:"hidden"}},e.imageUri||e.videoUri&&pe.createElement(Gi,{className:a("stepMediaContainer",n)},e.imageUri?pe.createElement(ji,{className:a("stepImage",n),src:e.imageUri,style:e.imageStyle}):null,e.videoUri?pe.createElement(Ct,{appearance:n,videoUri:e.videoUri}):null),pe.createElement(Yi,{className:a("stepSubtitle",n),appearance:n,dangerouslySetInnerHTML:ie(e.subtitle)}),pe.createElement(to,{className:a("checklistCTAContainer",n)},e.secondaryButtonTitle?pe.createElement(R,{secondary:!0,title:e.secondaryButtonTitle,onClick:()=>r(),appearance:n}):null,pe.createElement(R,{title:e.primaryButtonTitle??"Continue",onClick:()=>i(),appearance:n})))))};import Pt from"styled-components";var fh=Pt.div`
|
|
945
945
|
background: #ffffff;
|
|
946
946
|
box-shadow: 0px 6px 25px rgba(0, 0, 0, 0.06);
|
|
947
947
|
border-radius: 6px;
|
|
@@ -955,49 +955,49 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
955
955
|
|
|
956
956
|
max-width: 800px;
|
|
957
957
|
min-width: 350px;
|
|
958
|
-
`,
|
|
958
|
+
`,Qi=Pt.div`
|
|
959
959
|
display: flex;
|
|
960
960
|
flex-direction: column;
|
|
961
|
-
`,
|
|
961
|
+
`,Zi=Pt.h1`
|
|
962
962
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorText}};
|
|
963
963
|
font-style: normal;
|
|
964
964
|
font-weight: 700;
|
|
965
965
|
font-size: 20px;
|
|
966
966
|
line-height: 24px;
|
|
967
967
|
margin-bottom: 8px;
|
|
968
|
-
`,
|
|
968
|
+
`,Ri=Pt.h2`
|
|
969
969
|
color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorTextSecondary}};
|
|
970
970
|
font-weight: 400;
|
|
971
971
|
font-size: 14px;
|
|
972
972
|
line-height: 23px;
|
|
973
973
|
margin: 2px 0 0 0;
|
|
974
|
-
`,
|
|
974
|
+
`,en=Pt.div`
|
|
975
975
|
display: block;
|
|
976
976
|
width: 100%;
|
|
977
|
-
`,
|
|
977
|
+
`,tn=Pt.div`
|
|
978
978
|
display: flex;
|
|
979
979
|
width: 100%;
|
|
980
980
|
flex-direction: column;
|
|
981
981
|
justify-content: space-between;
|
|
982
982
|
background-color: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.colorBackground}};
|
|
983
983
|
border-radius: ${e=>{var t,o;return(o=(t=e.appearance)==null?void 0:t.theme)==null?void 0:o.borderRadius}}px;
|
|
984
|
-
`;var
|
|
984
|
+
`;var Ja=({title:e,subtitle:t,steps:o,onClose:i,visible:r,onCompleteStep:n,autoExpandFirstIncompleteStep:s=!0,autoCollapse:p=!0,autoExpandNextStep:d=!0,primaryColor:l="#000000",selectedStep:h,setSelectedStep:m,appearance:u,type:T,className:x})=>{let C=o.filter(c=>c.complete).length,[S,I]=Xa(Array(o.length).fill(!0));on(()=>{let c=[...S];if(s){for(let f=0;f<o.length;f++)if(!o[f].complete){c[f]=!1;break}I(c)}},[]),on(()=>{F(h)},[h]);let F=c=>{let f=[...S];if(p)for(let b=0;b<S.length;++b)b!==c&&(f[b]=!0);f[c]=!f[c],I(f)};if(!r&&T=="modal")return ge.createElement(ge.Fragment,null);let A=ge.createElement(ge.Fragment,null,ge.createElement(Qi,null,ge.createElement(Zi,{appearance:u,className:a("checklistTitle",u),dangerouslySetInnerHTML:ie(e)}),ge.createElement(Ri,{appearance:u,className:a("checklistSubtitle",u),dangerouslySetInnerHTML:ie(t)})),ge.createElement(Le,{display:"percent",count:C,total:o.length,fillColor:l,style:{margin:"14px 0px 8px 0px"},appearance:u})),P=ge.createElement(en,{className:xe(a("checklistContainer",u),x)},o.map((c,f)=>{let b=S[f];return ge.createElement(Ji,{appearance:u,stepData:c,collapsed:b,key:`modal-checklist-${c.id??f}`,onClick:()=>{if(h===f){F(f);return}m(f)},onPrimaryButtonClick:()=>{n&&n(f,c),c.handlePrimaryButtonClick&&c.handlePrimaryButtonClick(),d&&!c.completionCriteria&&f<S.length-1&&S[f+1]&&m(f+1)},onSecondaryButtonClick:()=>{c.handleSecondaryButtonClick&&c.handleSecondaryButtonClick()}})}));return T==="inline"?ge.createElement(tn,{appearance:u,className:xe(a("checklistInlineContainer",u),x)},A,P):ge.createElement(ge.Fragment,null,ge.createElement(Ye,{onClose:i,visible:r,appearance:u,style:{maxWidth:"600px"},headerContent:A},P))},Go=Ja;import te,{useEffect as jo,useRef as op,useState as mt}from"react";import ct from"react";import ee,{css as rn,keyframes as nn}from"styled-components";var sn=rn`
|
|
985
985
|
border: 1px solid ${({theme:e})=>e.colorBorder};
|
|
986
|
-
`,
|
|
986
|
+
`,Qa=rn`
|
|
987
987
|
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.06);
|
|
988
|
-
`,
|
|
988
|
+
`,Za=nn`
|
|
989
989
|
from {
|
|
990
990
|
opacity: 0;
|
|
991
991
|
} to {
|
|
992
992
|
opacity: 1;
|
|
993
993
|
}
|
|
994
|
-
`,
|
|
994
|
+
`,Ra=nn`
|
|
995
995
|
from {
|
|
996
996
|
opacity: 1;
|
|
997
997
|
} to {
|
|
998
998
|
opacity: 0;
|
|
999
999
|
}
|
|
1000
|
-
`,
|
|
1000
|
+
`,ln=ee.div`
|
|
1001
1001
|
margin: 0 -20px;
|
|
1002
1002
|
overflow-x: auto;
|
|
1003
1003
|
padding-left: 20px;
|
|
@@ -1014,14 +1014,14 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1014
1014
|
::-webkit-scrollbar {
|
|
1015
1015
|
display: none;
|
|
1016
1016
|
}
|
|
1017
|
-
`,
|
|
1017
|
+
`,an=ee.div`
|
|
1018
1018
|
display: flex;
|
|
1019
1019
|
flex-flow: row nowrap;
|
|
1020
1020
|
gap: 0 16px;
|
|
1021
1021
|
scroll-snap-align: center;
|
|
1022
1022
|
scroll-snap-stop: always;
|
|
1023
|
-
`,
|
|
1024
|
-
animation: ${e=>e.reversed?
|
|
1023
|
+
`,pn=ee.div`
|
|
1024
|
+
animation: ${e=>e.reversed?Ra:Za} 0.25s ease-out;
|
|
1025
1025
|
background: linear-gradient(
|
|
1026
1026
|
to right,
|
|
1027
1027
|
${({theme:e})=>e.colorBackground}00,
|
|
@@ -1029,8 +1029,8 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1029
1029
|
);
|
|
1030
1030
|
position: absolute;
|
|
1031
1031
|
width: 64px;
|
|
1032
|
-
`,
|
|
1033
|
-
${
|
|
1032
|
+
`,dn=ee.button`
|
|
1033
|
+
${sn}
|
|
1034
1034
|
box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.1);
|
|
1035
1035
|
align-items: center;
|
|
1036
1036
|
border-radius: 50%;
|
|
@@ -1041,11 +1041,11 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1041
1041
|
justify-content: center;
|
|
1042
1042
|
position: absolute;
|
|
1043
1043
|
width: 48px;
|
|
1044
|
-
`,
|
|
1044
|
+
`,cn=ee.div`
|
|
1045
1045
|
border-radius: ${({theme:e})=>e.borderRadius}px;
|
|
1046
1046
|
padding: 20px;
|
|
1047
|
-
`,
|
|
1048
|
-
${
|
|
1047
|
+
`,mn=ee(cn)`
|
|
1048
|
+
${sn}
|
|
1049
1049
|
background: ${({theme:e})=>e.colorBackground};
|
|
1050
1050
|
|
|
1051
1051
|
&:active {
|
|
@@ -1056,94 +1056,94 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1056
1056
|
${e=>e.blocked?"":`border: 1px solid ${e.theme.colorPrimary};`}
|
|
1057
1057
|
${e=>e.blocked?"cursor: default":"cursor: pointer"}
|
|
1058
1058
|
}
|
|
1059
|
-
`,
|
|
1059
|
+
`,un=ee.img`
|
|
1060
1060
|
border-radius: 50%;
|
|
1061
1061
|
height: 40px;
|
|
1062
1062
|
margin-bottom: 12px;
|
|
1063
1063
|
width: 40px;
|
|
1064
|
-
`,
|
|
1065
|
-
${e=>
|
|
1066
|
-
${
|
|
1064
|
+
`,fn=ee(cn)`
|
|
1065
|
+
${e=>w(e)} {
|
|
1066
|
+
${Qa}
|
|
1067
1067
|
|
|
1068
1068
|
background: ${({theme:e})=>e.colorBackground};
|
|
1069
1069
|
}
|
|
1070
|
-
`,
|
|
1070
|
+
`,gn=ee.div`
|
|
1071
1071
|
color: ${({theme:e})=>e.colorPrimary};
|
|
1072
1072
|
display: flex;
|
|
1073
1073
|
flex-flow: row nowrap;
|
|
1074
1074
|
align-items: center;
|
|
1075
1075
|
margin-left: 20px;
|
|
1076
|
-
`,
|
|
1076
|
+
`,hn=ee.div`
|
|
1077
1077
|
white-space: nowrap;
|
|
1078
|
-
`,
|
|
1078
|
+
`,xn=ee.div`
|
|
1079
1079
|
background: #d8fed8;
|
|
1080
1080
|
border-radius: 6px;
|
|
1081
1081
|
margin-bottom: 12px;
|
|
1082
1082
|
padding: 4px 10px;
|
|
1083
|
-
`,
|
|
1083
|
+
`,ep=ee.p`
|
|
1084
1084
|
font-weight: bold;
|
|
1085
1085
|
font-size: 18px;
|
|
1086
1086
|
line-height: 22px;
|
|
1087
1087
|
letter-spacing: calc(18px * -0.01);
|
|
1088
1088
|
margin: 0;
|
|
1089
|
-
`,
|
|
1089
|
+
`,Cn=ee(ep)`
|
|
1090
1090
|
margin-bottom: 4px;
|
|
1091
|
-
`,
|
|
1091
|
+
`,tp=ee.p`
|
|
1092
1092
|
font-weight: bold;
|
|
1093
1093
|
font-size: 16px;
|
|
1094
1094
|
line-height: 20px;
|
|
1095
1095
|
letter-spacing: calc(16px * -0.01);
|
|
1096
1096
|
margin: 0;
|
|
1097
|
-
`,
|
|
1097
|
+
`,Sn=ee(tp)`
|
|
1098
1098
|
margin-bottom: 4px;
|
|
1099
1099
|
${e=>e.blocked||e.complete?"opacity: 0.4;":`
|
|
1100
1100
|
`}
|
|
1101
|
-
`,
|
|
1101
|
+
`,Ne=ee.p`
|
|
1102
1102
|
color: ${({theme:e})=>e.colorText};
|
|
1103
1103
|
font-weight: normal;
|
|
1104
1104
|
font-size: 14px;
|
|
1105
1105
|
line-height: 22px;
|
|
1106
1106
|
margin: 0;
|
|
1107
|
-
`,
|
|
1107
|
+
`,yn=ee.p`
|
|
1108
1108
|
color: ${({theme:e})=>e.colorText};
|
|
1109
1109
|
font-weight: 600;
|
|
1110
1110
|
font-size: 12px;
|
|
1111
1111
|
line-height: 16px;
|
|
1112
1112
|
margin: 0;
|
|
1113
|
-
`;
|
|
1113
|
+
`;Ne.Loud=ee(Ne)`
|
|
1114
1114
|
font-weight: 600;
|
|
1115
|
-
`;
|
|
1115
|
+
`;Ne.Quiet=ee(Ne)`
|
|
1116
1116
|
color: ${({theme:e})=>e.colorTextSecondary};
|
|
1117
1117
|
${e=>e.blocked||e.complete?"opacity: 0.4;":`
|
|
1118
1118
|
`}
|
|
1119
|
-
`;var
|
|
1119
|
+
`;var bn=({stepData:e,style:t={},appearance:o})=>{let{mergeAppearanceWithDefault:i}=J(),{primaryCTAClickSideEffects:r}=ne(),{theme:n,styleOverrides:s}=i(o),{imageUri:p=null,subtitle:d=null,title:l=null,complete:h=!1,blocked:m=!1}=e,u=()=>{r(e)};return ct.createElement(mn,{className:a("carouselCard",o),onClick:m?null:u,style:t,blocked:m,complete:h},ct.createElement("div",{style:{alignItems:"flex-start",display:"flex",justifyContent:"space-between"}},p&&ct.createElement(un,{className:a("carouselCardImage",o),src:p,alt:l,style:{opacity:h||m?.4:1}}),h&&ct.createElement(xn,{className:a("carouselCompletedPill",o)},ct.createElement(yn,{style:{color:"#108E0B"}},"Complete"))),l&&ct.createElement(Sn,{blocked:m,complete:h,className:a("carouselCardTitle",o)},l),d&&ct.createElement(Ne.Quiet,{blocked:m,complete:h,className:a("carouselCardSubtitle",o)},d))};import zt from"react";var Tn=({numberOfStepsCompleted:e,numberOfSteps:t,appearance:o})=>{let i=t>0?e/t:0,r=200,n=Math.min(r,Math.max(10,Math.round(r*i)));return zt.createElement(gn,{className:a("carouselProgressBar",o)},zt.createElement(hn,{as:Ne.Loud,style:{marginRight:8}},e," of ",t),zt.createElement("svg",{height:10,width:r},zt.createElement("rect",{x:0,y:0,rx:5,width:r,height:10,fill:"#E6E6E6"}),zt.createElement("rect",{x:0,y:0,rx:5,width:n,height:10,fill:"currentColor"})))};var rp=()=>te.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},te.createElement("path",{d:"M14 6L20 12",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"}),te.createElement("path",{d:"M14 18L20 12",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"}),te.createElement("path",{d:"M4 12H20",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})),wn=({side:e="left",show:t=!1,onClick:o=()=>{}})=>{let[i,r]=mt(!1),[n,s]=mt(!1);jo(()=>{t===!0&&i===!1?r(!0):t===!1&&i===!0&&s(!0)},[t]);let p=()=>{r(!1),s(!1)},d=e=="left"?{top:0,bottom:0,left:-20,transform:"rotate(180deg)"}:{top:0,bottom:0,right:-20};return i?te.createElement(pn,{style:d,reversed:n,onAnimationEnd:n?p:null},te.createElement(dn,{onClick:()=>o(),style:{right:16,top:"calc(50% - 24px)"}},te.createElement(rp,null))):null},Fn=({flowId:e,appearance:t,customVariables:o,className:i})=>{let r=op(null),[n,s]=mt(!1),[p,d]=mt(!1),[l,h]=mt(null),[m,u]=mt([]),[T,x]=mt(0),{getFlowMetadata:C,getFlowSteps:S,getNumberOfStepsCompleted:I,updateCustomVariables:F,getFlowStatus:A,isLoading:P,targetingLogicShouldHideFlow:c,getFlow:f}=Y();jo(()=>{F(o)},[o,P]),jo(()=>{if(P)return;let B=C(e),H=I(e),N=S(e);h(B),B.data!==null&&(u(N.sort((q,z)=>Number(q.complete)-Number(z.complete))),d(N.length>3),x(H))},[P]);let b=[];for(let B=0;B<m.length;B+=3)b.push(m.slice(B,B+3));let E=B=>{let H=B.target,N=H.scrollWidth-H.clientWidth,q=Math.ceil(H.scrollLeft);q>0&&n===!1&&s(!0),q===0&&n===!0&&s(!1),q<N&&p===!1&&d(!0),q===N&&p===!0&&d(!1)},$=(B=!0)=>{let H=B?1:-1;r.current!==null&&r.current.scrollBy({left:r.current.clientWidth*H,behavior:"smooth"})},U=null,W=B=>{U!==null?clearTimeout(U):E(B),U=setTimeout(()=>{E(B)},16)};return P?null:te.createElement(fn,{className:xe(a("carouselContainer",t),i)},te.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:20}},te.createElement("div",null,te.createElement(Cn,{className:a("carouselTitle",t)},l==null?void 0:l.title),te.createElement(Ne.Quiet,{className:a("carouselSubtitle",t)},l==null?void 0:l.subtitle)),te.createElement(Tn,{numberOfStepsCompleted:T,numberOfSteps:m.length})),te.createElement("div",{style:{position:"relative"}},te.createElement(wn,{show:n,onClick:()=>$(!1)}),te.createElement(wn,{side:"right",show:p,onClick:$}),te.createElement(ln,{ref:r,onScroll:W},b.map((B,H)=>te.createElement(an,{key:H,style:{flex:`0 0 calc(100% - ${m.length>3?36:0}px)`}},B.map((N,q)=>te.createElement(bn,{key:q,stepData:N,style:{flex:m.length>3?"0 1 calc(33% - 16px * 2 / 3)":1},appearance:t})))))))};var Vo=({flowId:e,title:t,subtitle:o,style:i,initialSelectedStep:r,className:n,type:s="inline",onDismiss:p,visible:d,customVariables:l,onStepCompletion:h,onButtonClick:m,appearance:u,hideOnFlowCompletion:T,setVisible:x,customStepTypes:C,checklistStyle:S="default",...I})=>{let{getFlow:F,getFlowSteps:A,markStepCompleted:P,getStepStatus:c,getNumberOfStepsCompleted:f,isLoading:b,targetingLogicShouldHideFlow:E,updateCustomVariables:$,getFlowMetadata:U,isStepBlocked:W,getFlowStatus:B,hasActiveFullPageFlow:H,setHasActiveFullPageFlow:N}=Y(),{primaryCTAClickSideEffects:q,secondaryCTAClickSideEffects:z}=ne(),{getOpenFlowState:G,setOpenFlowState:M}=Fe(),[Q,j]=Pn(r||0),[X,Ke]=Pn(!1),ae=d===void 0?G(e):d,O=s==="modal",{mergeAppearanceWithDefault:re}=J(),{isLarge:$e}=Hi();if(u=re(u),kn(()=>{$(l)},[l,b]),kn(()=>{d!==void 0&&(O&&d===!0?N(!0):O&&d===!1&&N(!1))},[d,x,H]),b)return null;let he=F(e);if(!he||E(he))return null;let Se=A(e);if(!Se||T===!0&&B(e)===Z)return null;let ce=U(e);if(ce!=null&&ce.title&&(t=ce.title),ce!=null&&ce.subtitle&&(o=ce.subtitle),!X&&r===void 0&&f(e)>0){let v=Math.min(f(e),Se.length-1);j(v),Ke(!0)}function Ue(){if(Q+1>=Se.length){O&&M(e,!1);return}W(e,Se[Q+1].id)||j(Q+1)}function _e(v,K,tt){let Xo=Q+1<Se.length?Se[Q+1]:null;m&&m(v,Q,K,Xo)===!0&&O&&Ie(),h&&h(v,tt,Xo),!h&&!m&&(v.primaryButtonUri||v.secondaryButtonUri)&&O&&Ie()}function et(){return Se.map((v,K)=>({...v,handleSecondaryButtonClick:()=>{Ue(),z(v),v.skippable===!0&&P(e,v.id,{skipped:!0}),_e(v,"secondary",K)},handlePrimaryButtonClick:()=>{(!v.completionCriteria&&(v.autoMarkCompleted||v.autoMarkCompleted===void 0)||v.completionCriteria&&v.autoMarkCompleted===!0)&&(P(e,v.id),Ue()),_e(v,"primary",K),q(v),c(e,v.id)===we&&Ue()}}))}function _(){return oe.createElement(le,{appearance:u})}let Ee={steps:et(),title:t,subtitle:o,primaryColor:u.theme.colorPrimary,appearance:u,customStepTypes:C,type:s,className:n};function Ie(){M(e,!1),p&&p(),x&&x(!1)}function yo(){return oe.createElement(oe.Fragment,null,oe.createElement(_,null),oe.createElement(Fn,{flowId:e,appearance:u,customVariables:l,className:n}))}function g(){return oe.createElement(oe.Fragment,null,oe.createElement(_,null),oe.createElement(Go,{visible:ae,onClose:()=>{Ie()},selectedStep:Q,setSelectedStep:j,autoExpandNextStep:!0,appearance:u,...Ee}))}function y(){if(!$e)return g();let v=I.guideFlowId,K;return v&&F(v)&&(K=A(v)),oe.createElement(oe.Fragment,null,oe.createElement(_,null),oe.createElement(zo,{visible:ae,stepsTitle:ce.stepsTitle?ce.stepsTitle:"Your quick start guide",onClose:()=>{Ie()},selectedStep:Q,setSelectedStep:j,guideData:K,guideTitle:I.guideTitle??"Guide",appearance:u,title:t,subtitle:o,onGuideButtonClick:tt=>{_e(tt,"link",0)},...Ee}))}function k(){if(!$e)return g();let v=oe.createElement(Wo,{flowId:e,style:i,selectedStep:Q,setSelectedStep:j,appearance:u,type:s,...Ee});return O?oe.createElement(Ye,{onClose:()=>{Ie()},visible:ae,appearance:u,style:{paddingTop:"0px",padding:"12px",paddingLeft:0}},oe.createElement(_,null),v):oe.createElement(oe.Fragment,null,oe.createElement(_,null),v)}switch(S){case"condensed":return g();case"with-guide":return y();case"default":return k();case"carousel":return yo();default:return k()}};var np=e=>ip.createElement(Vo,{type:"inline",...e});import Ze,{useEffect as lp}from"react";import De from"react";import ho from"styled-components";var vn=ho.div`
|
|
1120
1120
|
border: 1px solid ${e=>e.appearance.theme.colorBorder};
|
|
1121
1121
|
border-radius: 8px;
|
|
1122
1122
|
padding: 6px 10px 6px 10px;
|
|
1123
1123
|
min-width: 160px;
|
|
1124
1124
|
cursor: pointer;
|
|
1125
1125
|
background-color: ${e=>e.appearance.theme.colorBackground}};
|
|
1126
|
-
`,
|
|
1126
|
+
`,En=ho.div`
|
|
1127
1127
|
display: flex;
|
|
1128
1128
|
flex-direction: row;
|
|
1129
1129
|
justify-content: space-between;
|
|
1130
1130
|
align-items: center;
|
|
1131
1131
|
margin-bottom: 2px;
|
|
1132
1132
|
flex-grow: 2;
|
|
1133
|
-
`,
|
|
1133
|
+
`,In=ho.div`
|
|
1134
1134
|
text-overflow: ellipsis;
|
|
1135
1135
|
font-weight: 600;
|
|
1136
1136
|
font-size: 12px;
|
|
1137
1137
|
line-height: 15px;
|
|
1138
1138
|
text-align: ${e=>e.type==="condensed"?"left":"right"};
|
|
1139
1139
|
color: ${e=>e.appearance.theme.colorPrimary};
|
|
1140
|
-
`,
|
|
1140
|
+
`,An=ho.div`
|
|
1141
1141
|
width: 20px;
|
|
1142
1142
|
margin-right: 8px;
|
|
1143
1143
|
display: flex;
|
|
1144
1144
|
height: 100%;
|
|
1145
1145
|
align-items: center;
|
|
1146
|
-
`;import{motion as
|
|
1146
|
+
`;import{motion as sp}from"framer-motion";var Bn=({title:e,count:t,total:o,onClick:i,style:r={},className:n,appearance:s,type:p="default"})=>De.createElement(De.Fragment,null,De.createElement(le,{appearance:s}),De.createElement(vn,{as:sp.div,whileHover:{opacity:.9},whileTap:{scale:.98},onClick:()=>i!==void 0&&i(),style:{...p=="condensed"?{display:"flex",justifyContent:"space-between"}:{},...r},className:xe(n??"",a("progressRingContainer",s)),appearance:s},p=="condensed"&&o&&o!==0&&De.createElement(An,{className:a("progressRingContainer",s)},De.createElement(Dt,{size:19,percentage:t/o,fillColor:s.theme.colorPrimary,bgColor:s.theme.colorBackgroundSecondary})),De.createElement(En,{type:p,className:a("badgeTitleContainer",s)},De.createElement(In,{type:p,appearance:s,className:a("badgeTitle",s)},e),i!==void 0&&De.createElement(kt,{className:a("badgeChevron",s),color:s.theme.colorPrimary})),p=="default"&&o&&o!==0&&De.createElement(Le,{display:"compact",count:t,total:o,fillColor:s.theme.colorPrimary,bgColor:s.theme.colorBackgroundSecondary,style:{width:"100%"},appearance:s})));import Qe from"react";import Gt from"styled-components";var On=Gt.div`
|
|
1147
1147
|
display: flex;
|
|
1148
1148
|
flex-direction: row;
|
|
1149
1149
|
width: 100%;
|
|
@@ -1154,25 +1154,25 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1154
1154
|
border-width: 1px;
|
|
1155
1155
|
border-color: ${e=>e.appearance.theme.colorPrimary};
|
|
1156
1156
|
border-radius: 12px;
|
|
1157
|
-
`,
|
|
1158
|
-
${e=>
|
|
1157
|
+
`,Ln=Gt.div`
|
|
1158
|
+
${e=>w(e)} {
|
|
1159
1159
|
display: flex;
|
|
1160
1160
|
justify-content: center;
|
|
1161
1161
|
align-items: center;
|
|
1162
1162
|
margin-right: 16px;
|
|
1163
1163
|
}
|
|
1164
|
-
`,
|
|
1164
|
+
`,Nn=Gt.div`
|
|
1165
1165
|
display: flex;
|
|
1166
1166
|
flex-direction: column;
|
|
1167
1167
|
flex: 1;
|
|
1168
1168
|
margin-top: 0;
|
|
1169
|
-
`,
|
|
1169
|
+
`,Dn=Gt.div`
|
|
1170
1170
|
display: flex;
|
|
1171
1171
|
flex-direction: column;
|
|
1172
1172
|
justify-content: center;
|
|
1173
1173
|
margin-left: 16px;
|
|
1174
1174
|
min-width: 200px;
|
|
1175
|
-
`,
|
|
1175
|
+
`,Ax=Gt.div`
|
|
1176
1176
|
display: flex;
|
|
1177
1177
|
justify-content: center;
|
|
1178
1178
|
align-items: flex-end;
|
|
@@ -1181,8 +1181,8 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1181
1181
|
:hover {
|
|
1182
1182
|
opacity: 0.8;
|
|
1183
1183
|
}
|
|
1184
|
-
`;var
|
|
1185
|
-
${e=>
|
|
1184
|
+
`;var Mn=({title:e,subtitle:t,icon:o,appearance:i,count:r,total:n,className:s,style:p})=>Qe.createElement(Qe.Fragment,null,Qe.createElement(On,{appearance:i,className:xe(a("fullWidthProgressBadgeContainer",i),s??""),style:p},o&&Qe.createElement(Ln,{className:a("fullWidthProgressBadgeIcon",i)},o),Qe.createElement(Nn,null,Qe.createElement(Te,{size:"small",appearance:i,title:e,subtitle:t})),Qe.createElement(Dn,{className:a("fullWidthProgressBadgeProgressContainer",i)},Qe.createElement(Le,{count:r,total:n,display:"percent",textLocation:"top",fillColor:i.theme.colorPrimary}))));var ap=({flowId:e,title:t,subtitle:o,icon:i,style:r,onClick:n,className:s,customVariables:p,hideOnFlowCompletion:d,appearance:l,type:h="default"})=>{let{getFlow:m,getFlowSteps:u,getFlowStatus:T,getNumberOfStepsCompleted:x,isLoading:C,targetingLogicShouldHideFlow:S,updateCustomVariables:I}=Y(),{mergeAppearanceWithDefault:F}=J();l=F(l);let{setOpenFlowState:A,getOpenFlowState:P}=Fe();if(lp(()=>{I(p)},[p,C]),C)return null;let c=m(e);if(!c||S(c)||d===!0&&T(e)===Z)return null;let f=u(e),b=x(e);return h==="full-width"?Ze.createElement(Ze.Fragment,null,Ze.createElement(le,{appearance:l}),Ze.createElement(Mn,{title:t,subtitle:o,count:b,total:f.length,style:r,className:s,appearance:l,icon:i,onClick:()=>{}})):Ze.createElement(Ze.Fragment,null,Ze.createElement(le,{appearance:l}),Ze.createElement(Bn,{count:b,total:f.length,title:t,style:r,onClick:()=>{A(e,!0),n&&n()},type:h,className:s,appearance:l}))};import pp from"react";var dp=({flowId:e,style:t,appearance:o,...i})=>{let{getFlow:r,targetingLogicShouldHideFlow:n,getFlowSteps:s}=Y(),{mergeAppearanceWithDefault:p}=J();o=p(o);let d=r(e);if(!d||n(d))return null;let l=s(e);return pp.createElement(Ht,{steps:l,style:t,appearance:o,...i})};import Et,{useContext as Tp,useEffect as wp}from"react";import D,{useEffect as xo,useLayoutEffect as Kn,useRef as gp,useState as jt}from"react";import Vt from"styled-components";import{useCallback as cp,useEffect as mp,useState as up}from"react";var qo=(e,t,o,i={x:20,y:20},r)=>{let n=r=="fixed"?0:window.scrollY,s=r=="fixed"?0:window.scrollX;return!e||!e.left||!e.top?{x:0,y:0}:t==="left"?{x:e.left-o+i.x+s,y:e.top-i.y+n}:t==="right"?{x:e.left+e.width+i.x+s,y:e.top-i.y+n}:{x:0,y:0}},$n={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0};function fp(e){let t=$n;return e&&(t=e.getBoundingClientRect()),t}function Un(e,t){let[o,i]=up($n),r=cp(()=>{e&&i(fp(e))},[e]);return mp(()=>(r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)),[e,t]),o}import Re from"styled-components";var _n=Re.div`
|
|
1185
|
+
${e=>w(e)} {
|
|
1186
1186
|
background: ${e=>e.appearance.theme.colorBackground};
|
|
1187
1187
|
}
|
|
1188
1188
|
|
|
@@ -1192,14 +1192,14 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1192
1192
|
min-width: 300px;
|
|
1193
1193
|
padding: 22px 22px 12px;
|
|
1194
1194
|
z-index: ${e=>e.zIndex};
|
|
1195
|
-
`,
|
|
1195
|
+
`,Wn=Re.div`
|
|
1196
1196
|
display: block;
|
|
1197
1197
|
cursor: pointer;
|
|
1198
1198
|
position: absolute;
|
|
1199
1199
|
top: 25px;
|
|
1200
1200
|
right: 22px;
|
|
1201
|
-
`,
|
|
1202
|
-
${e=>
|
|
1201
|
+
`,Hn=Re.img`
|
|
1202
|
+
${e=>w(e)} {
|
|
1203
1203
|
display: block;
|
|
1204
1204
|
width: 100%;
|
|
1205
1205
|
height: auto;
|
|
@@ -1207,8 +1207,8 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1207
1207
|
margin-top: ${e=>e.dismissible?"24px":"0px"};
|
|
1208
1208
|
margin-bottom: 16px;
|
|
1209
1209
|
}
|
|
1210
|
-
`,
|
|
1211
|
-
${e=>
|
|
1210
|
+
`,zn=Re.div`
|
|
1211
|
+
${e=>w(e)} {
|
|
1212
1212
|
display: block;
|
|
1213
1213
|
width: 100%;
|
|
1214
1214
|
height: auto;
|
|
@@ -1216,30 +1216,30 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1216
1216
|
margin-top: ${e=>e.dismissible?"24px":"0px"};
|
|
1217
1217
|
margin-bottom: 16px;
|
|
1218
1218
|
}
|
|
1219
|
-
`,
|
|
1219
|
+
`,Gn=Re.div`
|
|
1220
1220
|
display: flex;
|
|
1221
1221
|
flex-direction: row;
|
|
1222
1222
|
justify-content: space-between;
|
|
1223
1223
|
align-content: center;
|
|
1224
|
-
`,
|
|
1224
|
+
`,jn=Re.div`
|
|
1225
1225
|
display: flex;
|
|
1226
1226
|
flex: 1;
|
|
1227
1227
|
flex-direction: column;
|
|
1228
1228
|
justify-content: center;
|
|
1229
|
-
`,
|
|
1229
|
+
`,Vn=Re.div`
|
|
1230
1230
|
display: flex;
|
|
1231
1231
|
flex: 2;
|
|
1232
1232
|
flex-shrink: 1;
|
|
1233
1233
|
gap: 8px;
|
|
1234
1234
|
height: 64px;
|
|
1235
|
-
${e=>
|
|
1235
|
+
${e=>w(e)} {
|
|
1236
1236
|
flex-direction: row;
|
|
1237
1237
|
justify-content: ${e=>e.showStepCount?"flex-end":"flex-start"};
|
|
1238
1238
|
align-content: center;
|
|
1239
1239
|
align-items: center;
|
|
1240
1240
|
}
|
|
1241
|
-
`,
|
|
1242
|
-
${e=>
|
|
1241
|
+
`,qn=Re.p`
|
|
1242
|
+
${e=>w(e)} {
|
|
1243
1243
|
font-style: normal;
|
|
1244
1244
|
font-weight: 600;
|
|
1245
1245
|
font-size: 15px;
|
|
@@ -1247,7 +1247,7 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1247
1247
|
color: #808080;
|
|
1248
1248
|
}
|
|
1249
1249
|
margin: 0;
|
|
1250
|
-
`;var
|
|
1250
|
+
`;var Yn=300,Xn=100,hp=500,vt=12,xp=Vt.div`
|
|
1251
1251
|
width: 100%;
|
|
1252
1252
|
height: 100%;
|
|
1253
1253
|
border-radius: 9999px;
|
|
@@ -1270,26 +1270,26 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1270
1270
|
opacity: 0;
|
|
1271
1271
|
}
|
|
1272
1272
|
}
|
|
1273
|
-
`,
|
|
1274
|
-
width: ${
|
|
1275
|
-
height: ${
|
|
1273
|
+
`,Cp=Vt.div`
|
|
1274
|
+
width: ${vt}px;
|
|
1275
|
+
height: ${vt}px;
|
|
1276
1276
|
border-radius: 100px;
|
|
1277
1277
|
background-color: ${e=>e.primaryColor};
|
|
1278
1278
|
z-index: 20;
|
|
1279
1279
|
opacity: 1;
|
|
1280
|
-
`,
|
|
1280
|
+
`,Sp=Vt.div`
|
|
1281
1281
|
pointer-events: all;
|
|
1282
|
-
`,
|
|
1282
|
+
`,Jn=Vt.div`
|
|
1283
1283
|
display: flex;
|
|
1284
1284
|
align-content: center;
|
|
1285
1285
|
justify-content: center;
|
|
1286
1286
|
align-items: center;
|
|
1287
1287
|
z-index: ${e=>e.zIndex?e.zIndex:90};
|
|
1288
|
-
`,
|
|
1289
|
-
width: ${
|
|
1290
|
-
height: ${
|
|
1291
|
-
`,
|
|
1292
|
-
${e=>
|
|
1288
|
+
`,yp=Vt(Jn)`
|
|
1289
|
+
width: ${vt+12}px;
|
|
1290
|
+
height: ${vt+12}px;
|
|
1291
|
+
`,bp=({steps:e=[],onDismiss:t,onComplete:o=()=>{},tooltipPosition:i="auto",showHighlight:r=!0,primaryColor:n="#000000",offset:s={x:0,y:0},visible:p=!0,containerStyle:d={},selectedStep:l=0,customStepTypes:h,appearance:m,dismissible:u=!1,showHighlightOnly:T,showStepCount:x=!0,completedStepsCount:C=0})=>{var ce,Ue,_e,et;let[S,I]=jt(),[F,A]=jt(new Date),P=gp(null),[c,f]=jt(document.querySelector(e[l].selector)),b=Un(c,F),[E,$]=jt(),[U,W]=jt(!T),B=(Ue=(ce=e[l])==null?void 0:ce.props)!=null&&Ue.position?e[l].props.position:"absolute",H=((et=(_e=e[l])==null?void 0:_e.props)==null?void 0:et.zIndex)??90,N=(S==null?void 0:S.width)??Yn,q=(S==null?void 0:S.height)??Xn;Kn(()=>{P.current&&I({width:P.current.clientWidth,height:P.current.clientHeight})},[l,F,B]),xo(()=>{T||W(!0)},[l]);let z=i==="auto"?"right":i,G=qo(b,z,N,s,B),M=b.right+N>(window.innerWidth||document.documentElement.clientWidth),Q=b.bottom+Xn>(window.innerHeight||document.documentElement.clientHeight);M&&i==="auto"&&(G=qo(b,"left",N,s,B),z="left");let j=window.location.pathname.split("/").pop(),X=()=>{let _=document.querySelector(e[l].selector);E&&E===JSON.stringify(_==null?void 0:_.getBoundingClientRect())||(f(_),A(new Date),_&&$(JSON.stringify(_.getBoundingClientRect())))};if(xo(()=>{let _=new MutationObserver(X);return _.observe(document.body,{subtree:!0,childList:!0}),()=>_.disconnect()},[X]),xo(()=>{let _=new MutationObserver(X);return _.observe(document.body,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["style","class"]}),()=>_.disconnect()},[X]),xo(()=>{let _=setInterval(()=>{X()},10);return()=>clearInterval(_)},[X]),Kn(()=>{setTimeout(()=>{X()},hp),X()},[l,j]),c===null)return D.createElement(D.Fragment,null);if(G.x==0&&G.y==0)return D.createElement(D.Fragment,null);if(!p)return D.createElement(D.Fragment,null);let Ke=()=>{let _=()=>{if(e[l].handlePrimaryButtonClick&&(e[l].handlePrimaryButtonClick(),W(!1),setTimeout(()=>{X()},30)),C===e.length-1)return o()},Ee=()=>{e[l].handleSecondaryButtonClick&&(e[l].handleSecondaryButtonClick(),T&&W(!1))};return D.createElement(D.Fragment,null,x&&D.createElement(jn,null,D.createElement(qn,{className:a("tooltipStepCounter",m)},l+1," of ",e.length)),D.createElement(Vn,{showStepCount:x,className:a("tooltipCTAContainer",m)},e[l].secondaryButtonTitle&&D.createElement(R,{title:e[l].secondaryButtonTitle,appearance:m,onClick:Ee,size:"small",withMargin:!1,secondary:!0}),e[l].primaryButtonTitle&&D.createElement(R,{title:e[l].primaryButtonTitle,appearance:m,onClick:_,withMargin:!1,size:"small"})))},ae=()=>D.createElement(D.Fragment,null,u&&D.createElement(Wn,{"data-testid":"tooltip-dismiss",onClick:()=>{t&&t()},className:a("tooltipClose",m)},D.createElement(ke,null)),e[l].imageUri&&D.createElement(Hn,{dismissible:u,appearance:m,src:e[l].imageUri,className:a("tooltipImageContainer",m)}),e[l].videoUri&&!e[l].imageUri&&D.createElement(zn,{dismissible:u,appearance:m,className:a("tooltipVideoContainer",m)},D.createElement(Ct,{appearance:m,videoUri:e[l].videoUri})),D.createElement(Te,{appearance:m,title:e[l].title,subtitle:e[l].subtitle,size:"small"}),D.createElement(Gn,{className:a("tooltipFooter",m)},D.createElement(Ke,null))),re={...{default:_=>{var Ee;if((Ee=e[l])!=null&&Ee.StepContent){let Ie=e[l].StepContent;return D.createElement("div",null,Ie)}return D.createElement(ae,null)}},...h},$e=()=>{var _;return e?!((_=e[l])!=null&&_.type)||!re[e[l].type]?re.default(e[l]):re[e[l].type]({stepData:e[l],primaryColor:n}):D.createElement(D.Fragment,null)};if(T&&e[l].complete===!0)return null;let he={top:(G==null?void 0:G.y)-vt,left:(z=="left"?b.x+s.x:(G==null?void 0:G.x)-vt)??0,cursor:T?"pointer":"default",position:B},Se=()=>{T&&(A(new Date),W(!U))};return D.createElement(Sp,null,D.createElement(yp,{style:he,zIndex:H,className:a("tourHighlightContainer",m)},r&&e[l].showHighlight!==!1&&D.createElement(D.Fragment,null,D.createElement(Cp,{style:{position:B},onClick:Se,primaryColor:m.theme.colorPrimary}),D.createElement(xp,{style:{position:"absolute"},onClick:Se,primaryColor:m.theme.colorPrimary}))),D.createElement(Jn,{style:{...he,left:he.left+(z=="left"?-N:24)},zIndex:H+1,className:a("tooltipContainerWrapper",m)},U&&D.createElement(_n,{ref:P,layoutId:"tooltip-container",style:{position:"relative",width:"max-content",right:0,top:12,...d},appearance:m,className:a("tooltipContainer",m),maxWidth:Yn,zIndex:H+10},D.createElement($e,null))))},Co=bp;import{Portal as Fp}from"react-portal";var kp=({flowId:e,customVariables:t,appearance:o,onStepCompletion:i,onButtonClick:r,showTooltipsSimultaneously:n=!1,onDismiss:s,dismissible:p,tooltipPosition:d="auto",showHighlightOnly:l=!1,dismissBehavior:h="complete-flow",onComplete:m,...u})=>{let{getFlow:T,getFlowSteps:x,isLoading:C,targetingLogicShouldHideFlow:S,markStepCompleted:I,markStepStarted:F,markFlowCompleted:A,updateCustomVariables:P,getCurrentStepIndex:c,getStepStatus:f,isStepBlocked:b,getFlowStatus:E,getNumberOfStepsCompleted:$}=Y(),{isLoadingUserFlowStateData:U}=be(),{primaryCTAClickSideEffects:W,secondaryCTAClickSideEffects:B}=ne(),{hasOpenModals:H}=Fe(),N=c(e),{openFlowStates:q}=Tp(V),{mergeAppearanceWithDefault:z}=J();if(o=z(o),wp(()=>{P(t)},[t,C]),U)return null;let G=T(e);if(!G||S(G)||E(e)==Z||H())return null;let M=x(e);if(Object.keys(q).length>0){let O=Object.keys(q).find(re=>q[re]===!0);if(O!==void 0&&O!==e)return Et.createElement(Et.Fragment,null)}async function Q(O){if(await I(e,O.id),M.map(re=>f(e,re.id)).every(re=>re===we)){await A(e);return}if(!l&&N+1<M.length){if(b(e,M[N+1].id))return;await F(e,M[N+1].id)}}function j(O,re,$e){let he=N+1<M.length?M[N+1]:null;r&&r(O,N,re,he),i&&i(O,$e,he)}function X(){return M.map(O=>({...O,handleSecondaryButtonClick:async()=>{B(O),O.skippable===!0&&await I(e,O.id,{skipped:!0}),j(O,"secondary",N)},handlePrimaryButtonClick:async()=>{(!O.completionCriteria&&(O.autoMarkCompleted||O.autoMarkCompleted===void 0)||O.completionCriteria&&O.autoMarkCompleted===!0)&&await Q(O),j(O,"primary",N),W(O)}}))}async function Ke(O){s&&s(),h==="complete-flow"?await A(e):await I(e,O.id)}function ae(){m&&m()}return Et.createElement(Fp,null,Et.createElement(le,{appearance:o}),n?M.map((O,re)=>Et.createElement(Co,{key:O.id,appearance:o,steps:X(),selectedStep:re,showTooltipsSimultaneously:n,dismissible:p,onDismiss:()=>Ke(O),tooltipPosition:d,showHighlightOnly:l,completedStepsCount:$(e),onComplete:ae,...u})):Et.createElement(Co,{appearance:o,steps:X(),selectedStep:N,showTooltipsSimultaneously:n,dismissible:p,onDismiss:()=>Ke(M[N]),tooltipPosition:d,completedStepsCount:$(e),showHighlightOnly:l,onComplete:ae,...u}))};import me,{useEffect as Pp,useRef as vp,useState as Ep}from"react";import{Portal as Ip}from"react-portal";import ut from"styled-components";var Qn=ut.button`
|
|
1292
|
+
${e=>w(e)} {
|
|
1293
1293
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
1294
1294
|
|
|
1295
1295
|
display: flex;
|
|
@@ -1306,17 +1306,17 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1306
1306
|
opacity: 0.8;
|
|
1307
1307
|
}
|
|
1308
1308
|
}
|
|
1309
|
-
`,
|
|
1310
|
-
${e=>
|
|
1309
|
+
`,Zn=ut.span`
|
|
1310
|
+
${e=>w(e)} {
|
|
1311
1311
|
font-size: 12px;
|
|
1312
1312
|
display: inline-block;
|
|
1313
1313
|
}
|
|
1314
|
-
`,
|
|
1315
|
-
${e=>
|
|
1314
|
+
`,Rn=ut.span`
|
|
1315
|
+
${e=>w(e)} {
|
|
1316
1316
|
font-size: 12px;
|
|
1317
1317
|
display: inline-block;
|
|
1318
1318
|
}
|
|
1319
|
-
`,
|
|
1319
|
+
`,es=ut.div`
|
|
1320
1320
|
position: fixed;
|
|
1321
1321
|
right: 0;
|
|
1322
1322
|
bottom: 0;
|
|
@@ -1326,8 +1326,8 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1326
1326
|
flex-direction: column;
|
|
1327
1327
|
align-items: flex-end;
|
|
1328
1328
|
z-index: 50;
|
|
1329
|
-
`,
|
|
1330
|
-
${e=>
|
|
1329
|
+
`,ts=ut.button`
|
|
1330
|
+
${e=>w(e)} {
|
|
1331
1331
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
1332
1332
|
background-color: #ffffff;
|
|
1333
1333
|
border: 1px solid #f5f5f5;
|
|
@@ -1342,8 +1342,8 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1342
1342
|
0px 3px 6px -4px rgba(0, 0, 0, 0.12);
|
|
1343
1343
|
border-radius: 45px;
|
|
1344
1344
|
cursor: pointer;
|
|
1345
|
-
`,
|
|
1346
|
-
${e=>
|
|
1345
|
+
`,os=ut.div`
|
|
1346
|
+
${e=>w(e)} {
|
|
1347
1347
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
1348
1348
|
background: #ffffff;
|
|
1349
1349
|
}
|
|
@@ -1359,8 +1359,8 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1359
1359
|
position: ${e=>e.type=="inline"?"absolute":"relative"};
|
|
1360
1360
|
top: ${e=>e.type=="inline"?"68px":0};
|
|
1361
1361
|
margin-left: ${e=>e.type=="inline"?"-127px":0};
|
|
1362
|
-
`,
|
|
1363
|
-
${e=>
|
|
1362
|
+
`,rs=ut.button`
|
|
1363
|
+
${e=>w(e)} {
|
|
1364
1364
|
// Anything inside this block will be ignored if the user provides a custom class
|
|
1365
1365
|
color: #434343;
|
|
1366
1366
|
:hover {
|
|
@@ -1376,8 +1376,8 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1376
1376
|
font-size: 14px;
|
|
1377
1377
|
|
|
1378
1378
|
padding: 8px 12px;
|
|
1379
|
-
`;import{AnimatePresence as
|
|
1380
|
-
${e=>
|
|
1379
|
+
`;import{AnimatePresence as as,motion as ps}from"framer-motion";import is from"react";var ns=({style:e,className:t})=>is.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 18 18",style:e,className:t},is.createElement("path",{fill:"currentColor",d:"M13.43 4.938a4.494 4.494 0 00-1.043-1.435A4.955 4.955 0 009 2.197c-1.276 0-2.48.464-3.387 1.305A4.502 4.502 0 004.57 4.938a4.242 4.242 0 00-.386 1.773v.475c0 .109.087.197.196.197h.95a.197.197 0 00.197-.197V6.71c0-1.749 1.557-3.17 3.473-3.17s3.473 1.421 3.473 3.17c0 .718-.254 1.393-.738 1.955a3.537 3.537 0 01-1.9 1.125 1.928 1.928 0 00-1.085.682c-.271.343-.42.768-.42 1.206v.552c0 .109.088.197.197.197h.95a.197.197 0 00.196-.197v-.552c0-.276.192-.519.457-.578a4.904 4.904 0 002.625-1.56c.335-.392.597-.828.778-1.3a4.256 4.256 0 00-.103-3.303zM9 13.834a.985.985 0 10.001 1.97.985.985 0 00-.001-1.97z"}));import ss from"react";var ls=({style:e,className:t})=>ss.createElement("svg",{style:e,className:t,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor"},ss.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"}));var Ap=({flowId:e,style:t,onStepCompletion:o,visible:i=!0,type:r="inline",title:n="Help",appearance:s})=>{let{getFlow:p,getFlowSteps:d,markStepCompleted:l,getStepStatus:h,getNumberOfStepsCompleted:m,isLoading:u,targetingLogicShouldHideFlow:T}=Y(),{primaryCTAClickSideEffects:x}=ne(),C=vp(null),[S,I]=Ep(!1),{mergeAppearanceWithDefault:F}=J();s=F(s),Pp(()=>(document.addEventListener("click",A,!1),()=>{document.removeEventListener("click",A,!1)}),[]);let A=E=>{C.current&&!C.current.contains(E.target)&&I(!1)};if(u)return null;let P=p(e);if(!P||T(P))return null;let c=d(e);if(!c||!i)return null;function f(E,$){!E.completionCriteria&&(E.autoMarkCompleted||E.autoMarkCompleted===void 0)&&l(e,E.id),x(E),o&&o(E,$),I(!1)}function b(){return S&&me.createElement(os,{className:a("floatingWidgetMenu",s),as:ps.div,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.1},type:r},c.map((E,$)=>me.createElement(rs,{className:a("floatingWidgetMenuItem",s),key:$,onClick:()=>f(E,$)},E.title)))}return r=="inline"?me.createElement("span",{ref:C},me.createElement(Qn,{style:t,onClick:()=>{I(!S)},className:a("supportButton",s)},me.createElement(Rn,{className:a("supportIconContainer",s)},me.createElement(ls,{className:a("supportIcon",s),style:{width:"18px",height:"18px"}})),me.createElement(Zn,{className:a("supportButtonTitle",s)},n)),me.createElement(as,null,me.createElement(b,null))):me.createElement(Ip,null,me.createElement(es,{style:t,ref:C},me.createElement(as,null,me.createElement(b,null)),me.createElement(ts,{onClick:()=>{I(!S)},as:ps.button,whileHover:{scale:1.1},className:a("floatingWidgetButton",s)},me.createElement(ns,{className:a("floatingWidgetButtonIcon",s),style:{display:"flex",width:"20px",height:"20px"}}))))};import Me,{useEffect as Bp}from"react";import So from"styled-components";var ds=So.div`
|
|
1380
|
+
${e=>w(e)} {
|
|
1381
1381
|
display: flex;
|
|
1382
1382
|
flex-direction: column;
|
|
1383
1383
|
width: 100%;
|
|
@@ -1391,18 +1391,18 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1391
1391
|
border-radius: 12px;
|
|
1392
1392
|
position: relative;
|
|
1393
1393
|
}
|
|
1394
|
-
`,
|
|
1394
|
+
`,cs=So.div`
|
|
1395
1395
|
display: flex;
|
|
1396
1396
|
flex-direction: column;
|
|
1397
1397
|
flex: 1;
|
|
1398
|
-
`,
|
|
1398
|
+
`,ms=So.div`
|
|
1399
1399
|
display: flex;
|
|
1400
1400
|
flex-direction: column;
|
|
1401
1401
|
justify-content: center;
|
|
1402
1402
|
align-items: flex-start;
|
|
1403
1403
|
margin-top: 16px;
|
|
1404
|
-
`,
|
|
1405
|
-
${e=>
|
|
1404
|
+
`,us=So.div`
|
|
1405
|
+
${e=>w(e)} {
|
|
1406
1406
|
position: absolute;
|
|
1407
1407
|
top: 16px;
|
|
1408
1408
|
right: 16px;
|
|
@@ -1412,9 +1412,9 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1412
1412
|
opacity: 0.8;
|
|
1413
1413
|
}
|
|
1414
1414
|
}
|
|
1415
|
-
`;var
|
|
1415
|
+
`;var Op=({flowId:e,onDismiss:t,customVariables:o,onButtonClick:i,appearance:r,className:n,style:s,dismissible:p})=>{let{getFlow:d,markFlowCompleted:l,markStepCompleted:h,isLoading:m,targetingLogicShouldHideFlow:u,updateCustomVariables:T,getFlowSteps:x,getFlowStatus:C,getCurrentStepIndex:S}=Y(),{primaryCTAClickSideEffects:I}=ne(),{mergeAppearanceWithDefault:F}=J();if(r=F(r),Bp(()=>{T(o)},[o,m]),m)return null;let A=d(e);if(!A||u(A)||C(e)===Z)return null;let c=x(e)[S(e)];return Me.createElement(Me.Fragment,null,Me.createElement(le,{appearance:r}),Me.createElement(ds,{appearance:r,className:xe(a("embeddedTipContainer",r),n),style:s},(p===!0||c.dismissible)&&Me.createElement(us,{onClick:async()=>{await l(e),t&&t()},className:a("embeddedTipDismissButton",r)},Me.createElement(ke,null)),Me.createElement(cs,null,Me.createElement(Te,{size:"small",appearance:r,title:c.title,subtitle:c.subtitle})),c.primaryButtonTitle&&Me.createElement(ms,{className:a("embeddedTipCallToActionContainer",r)},Me.createElement(R,{classPrefix:"embeddedTip",title:c.primaryButtonTitle,appearance:r,withMargin:!1,size:"small",type:"inline",onClick:async()=>{c.handlePrimaryButtonClick(),I(c),!(i&&i(c,S(e),"primary")===!1)&&(await h(e,c.id),await l(e))}}))))};import de,{useEffect as Lp}from"react";import It from"styled-components";var fs=It.div`
|
|
1416
1416
|
// use the :not annotation
|
|
1417
|
-
${e=>
|
|
1417
|
+
${e=>w(e)} {
|
|
1418
1418
|
display: flex;
|
|
1419
1419
|
flex-direction: ${e=>e.type==="square"?"column":"row"};
|
|
1420
1420
|
width: 100%;
|
|
@@ -1426,19 +1426,19 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1426
1426
|
border-color: ${e=>e.appearance.theme.colorPrimary};
|
|
1427
1427
|
border-radius: 12px;
|
|
1428
1428
|
}
|
|
1429
|
-
`,
|
|
1430
|
-
${e=>
|
|
1429
|
+
`,gs=It.div`
|
|
1430
|
+
${e=>w(e)} {
|
|
1431
1431
|
display: flex;
|
|
1432
1432
|
width: 36px;
|
|
1433
1433
|
height: 36px;
|
|
1434
1434
|
}
|
|
1435
|
-
`,
|
|
1435
|
+
`,hs=It.div`
|
|
1436
1436
|
display: flex;
|
|
1437
1437
|
flex-direction: column;
|
|
1438
1438
|
flex: 1;
|
|
1439
1439
|
margin-left: ${e=>e.type==="square"?"0px":"16px"};
|
|
1440
1440
|
margin-top: ${e=>e.type==="square"?"12px":"0"};
|
|
1441
|
-
`,
|
|
1441
|
+
`,xs=It.div`
|
|
1442
1442
|
display: flex;
|
|
1443
1443
|
flex-direction: column;
|
|
1444
1444
|
justify-content: center;
|
|
@@ -1457,5 +1457,5 @@ ${i=>i.inlineStyles.map(([r,n])=>`.${Bt}${r}.${Bt}${r} { ${Object.entries(n).map
|
|
|
1457
1457
|
justify-content: ${e=>e.type==="square"?"flex-end":"center"};
|
|
1458
1458
|
align-items: flex-end;
|
|
1459
1459
|
margin-left: ${e=>e.type==="square"?"0px":"16px"};
|
|
1460
|
-
`;import
|
|
1460
|
+
`;import Cs from"react";var Ss=({style:e,className:t})=>Cs.createElement("svg",{style:e,className:t,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor"},Cs.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"}));var Np=({flowId:e,title:t,subtitle:o,onDismiss:i,customVariables:r,onButtonClick:n,appearance:s,type:p="full-width"})=>{let{getFlow:d,markFlowCompleted:l,isLoading:h,targetingLogicShouldHideFlow:m,updateCustomVariables:u,getFlowMetadata:T,getFlowStatus:x,getFlowSteps:C,getCurrentStepIndex:S}=Y(),{primaryCTAClickSideEffects:I}=ne(),{mergeAppearanceWithDefault:F}=J();if(s=F(s),Lp(()=>{u(r)},[r,h]),h)return null;let A=d(e);if(!A||m(A)||x(e)===Z)return null;let P=C(e),c=P.length>0?P[S(e)]:T(e);return c!=null&&c.title&&(t=c.title),c!=null&&c.subtitle&&(o=c.subtitle),de.createElement(de.Fragment,null,de.createElement(le,{appearance:s}),de.createElement(fs,{type:p,appearance:s,className:a("bannerContainer",s)},p!="square"&&de.createElement(gs,null,de.createElement(Ss,null)),p==="square"&&c.dismissible&&de.createElement(Yo,{type:p,className:a("bannerDismissButtonContainer",s)},de.createElement(Ko,{type:p,onClick:async()=>{await l(e),i&&i()},className:a("bannerDismissButton",s)},de.createElement(ke,null))),de.createElement(hs,{type:p},de.createElement(Te,{appearance:s,title:t,subtitle:o})),de.createElement(xs,{type:p,className:a("bannerCallToActionContainer",s)},de.createElement(R,{title:(c==null?void 0:c.primaryButtonTitle)??"Get started",appearance:s,onClick:()=>{I(c),n&&n(c,0,"primary")}})),p!=="square"&&c.dismissible&&de.createElement(Yo,{type:p,className:a("bannerDismissButtonContainer",s)},de.createElement(Ko,{type:p,onClick:async()=>{await l(e),i&&i()},className:a("bannerDismissButton",s)},de.createElement(ke,null)))))};export{Np as FrigadeBanner,Vo as FrigadeChecklist,Op as FrigadeEmbeddedTip,Gr as FrigadeForm,dp as FrigadeGuide,np as FrigadeHeroChecklist,ap as FrigadeProgressBadge,la as FrigadeProvider,Ap as FrigadeSupportWidget,kp as FrigadeTour,Fe as useFlowOpens,At as useFlowResponses,Y as useFlows,Do as useOrganization,To as useUser};
|
|
1461
1461
|
//# sourceMappingURL=index.mjs.map
|