@verifiedinc-public/shared-ui-elements 3.5.2 → 3.6.0

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.
@@ -0,0 +1,14 @@
1
+ import { ReactElement } from 'react';
2
+ import { SxProps } from '@mui/material';
3
+ interface BigNumberProps {
4
+ label: string;
5
+ initialValue: number;
6
+ value: number;
7
+ map?: (value: number) => string;
8
+ sx?: SxProps;
9
+ }
10
+ /**
11
+ * Component that animates a number from one value to another.
12
+ */
13
+ export declare function BigNumber(props: BigNumberProps): ReactElement;
14
+ export {};
@@ -1,3 +1,4 @@
1
1
  export * from './SeriesChart';
2
2
  export * from './SeriesChartLegend';
3
3
  export * from './SeriesPercentageChart';
4
+ export * from './BigNumber';
@@ -1 +1 @@
1
- "use strict";import{j as c}from"../../shared/jsx-runtime-jmtevAuS.mjs";import*as C from"react";import{useCallback as Z,useMemo as X,createElement as _e}from"react";import{Box as Y,Stack as H,Typography as J,useTheme as se}from"@mui/material";import{ResponsiveContainer as le,LineChart as Ne,CartesianGrid as ce,XAxis as ue,YAxis as pe,Label as Te,Tooltip as de,Legend as Ee,Line as Ge,AreaChart as Ae,Area as Ce}from"recharts";import{b as me,c as fe}from"../../shared/date-Cq0LS2Mr.mjs";import I,{Decimal as Q}from"decimal.js";import{AnimatePresence as Le}from"framer-motion";import{u as De}from"../../shared/useCopyToClipboard-BALOSYVW.mjs";import"qrcode";import{u as ye}from"../../shared/usePrevious-A8he0cAZ.mjs";import{a as Me,C as he}from"../../shared/motions-CpxgbzKX.mjs";import{i as Re,_ as q,s as Fe,a as d,c as be,d as We,e as Ve,f as Ke,h as Ie,j as qe,k as ze,l as Pe,m as Ue,n as Be,o as Ze,p as Xe,u as Ye}from"../../shared/index-CDq4CkLc.mjs";const He=["ownerState"],Je=["variants"],Qe=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function en(e){return Object.keys(e).length===0}function nn(e){return typeof e=="string"&&e.charCodeAt(0)>96}function ee(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const tn=be(),on=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function z({defaultTheme:e,theme:n,themeId:t}){return en(n)?e:n[t]||n}function rn(e){return e?(n,t)=>t[e]:null}function P(e,n){let{ownerState:t}=n,o=q(n,He);const r=typeof e=="function"?e(d({ownerState:t},o)):e;if(Array.isArray(r))return r.flatMap(a=>P(a,d({ownerState:t},o)));if(r&&typeof r=="object"&&Array.isArray(r.variants)){const{variants:a=[]}=r;let i=q(r,Je);return a.forEach(l=>{let s=!0;typeof l.props=="function"?s=l.props(d({ownerState:t},o,t)):Object.keys(l.props).forEach(u=>{t?.[u]!==l.props[u]&&o[u]!==l.props[u]&&(s=!1)}),s&&(Array.isArray(i)||(i=[i]),i.push(typeof l.style=="function"?l.style(d({ownerState:t},o,t)):l.style))}),i}return r}function an(e={}){const{themeId:n,defaultTheme:t=tn,rootShouldForwardProp:o=ee,slotShouldForwardProp:r=ee}=e,a=i=>We(d({},i,{theme:z(d({},i,{defaultTheme:t,themeId:n}))}));return a.__mui_systemSx=!0,(i,l={})=>{Re(i,p=>p.filter(w=>!(w!=null&&w.__mui_systemSx)));const{name:s,slot:u,skipVariantsResolver:m,skipSx:f,overridesResolver:h=rn(on(u))}=l,y=q(l,Qe),x=m!==void 0?m:u&&u!=="Root"&&u!=="root"||!1,b=f||!1;let S,j=ee;u==="Root"||u==="root"?j=o:u?j=r:nn(i)&&(j=void 0);const _=Fe(i,d({shouldForwardProp:j,label:S},y)),F=p=>typeof p=="function"&&p.__emotion_real!==p||Ve(p)?w=>P(p,d({},w,{theme:z({theme:w.theme,defaultTheme:t,themeId:n})})):p,E=(p,...w)=>{let D=F(p);const N=w?w.map(F):[];s&&h&&N.push(v=>{const g=z(d({},v,{defaultTheme:t,themeId:n}));if(!g.components||!g.components[s]||!g.components[s].styleOverrides)return null;const k=g.components[s].styleOverrides,G={};return Object.entries(k).forEach(([U,K])=>{G[U]=P(K,d({},v,{theme:g}))}),h(v,G)}),s&&!x&&N.push(v=>{var g;const k=z(d({},v,{defaultTheme:t,themeId:n})),G=k==null||(g=k.components)==null||(g=g[s])==null?void 0:g.variants;return P({variants:G},d({},v,{theme:k}))}),b||N.push(a);const W=N.length-w.length;if(Array.isArray(p)&&W>0){const v=new Array(W).fill("");D=[...p,...v],D.raw=[...p.raw,...v]}const V=_(D,...N);return i.muiName&&(V.muiName=i.muiName),V};return _.withConfig&&(E.withConfig=_.withConfig),E}}const sn=an(),ln=(e,n)=>e.filter(t=>n.includes(t)),L=(e,n,t)=>{const o=e.keys[0];Array.isArray(n)?n.forEach((r,a)=>{t((i,l)=>{a<=e.keys.length-1&&(a===0?Object.assign(i,l):i[e.up(e.keys[a])]=l)},r)}):n&&typeof n=="object"?(Object.keys(n).length>e.keys.length?e.keys:ln(e.keys,Object.keys(n))).forEach(r=>{if(e.keys.indexOf(r)!==-1){const a=n[r];a!==void 0&&t((i,l)=>{o===r?Object.assign(i,l):i[e.up(r)]=l},a)}}):(typeof n=="number"||typeof n=="string")&&t((r,a)=>{Object.assign(r,a)},n)};function $(e){return e?`Level${e}`:""}function R(e){return e.unstable_level>0&&e.container}function ve(e){return function(n){return`var(--Grid-${n}Spacing${$(e.unstable_level)})`}}function ne(e){return function(n){return e.unstable_level===0?`var(--Grid-${n}Spacing)`:`var(--Grid-${n}Spacing${$(e.unstable_level-1)})`}}function te(e){return e.unstable_level===0?"var(--Grid-columns)":`var(--Grid-columns${$(e.unstable_level-1)})`}const cn=({theme:e,ownerState:n})=>{const t=ve(n),o={};return L(e.breakpoints,n.gridSize,(r,a)=>{let i={};a===!0&&(i={flexBasis:0,flexGrow:1,maxWidth:"100%"}),a==="auto"&&(i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof a=="number"&&(i={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${a} / ${te(n)}${R(n)?` + ${t("column")}`:""})`}),r(o,i)}),o},un=({theme:e,ownerState:n})=>{const t={};return L(e.breakpoints,n.gridOffset,(o,r)=>{let a={};r==="auto"&&(a={marginLeft:"auto"}),typeof r=="number"&&(a={marginLeft:r===0?"0px":`calc(100% * ${r} / ${te(n)})`}),o(t,a)}),t},pn=({theme:e,ownerState:n})=>{if(!n.container)return{};const t=R(n)?{[`--Grid-columns${$(n.unstable_level)}`]:te(n)}:{"--Grid-columns":12};return L(e.breakpoints,n.columns,(o,r)=>{o(t,{[`--Grid-columns${$(n.unstable_level)}`]:r})}),t},dn=({theme:e,ownerState:n})=>{if(!n.container)return{};const t=ne(n),o=R(n)?{[`--Grid-rowSpacing${$(n.unstable_level)}`]:t("row")}:{};return L(e.breakpoints,n.rowSpacing,(r,a)=>{var i;r(o,{[`--Grid-rowSpacing${$(n.unstable_level)}`]:typeof a=="string"?a:(i=e.spacing)==null?void 0:i.call(e,a)})}),o},mn=({theme:e,ownerState:n})=>{if(!n.container)return{};const t=ne(n),o=R(n)?{[`--Grid-columnSpacing${$(n.unstable_level)}`]:t("column")}:{};return L(e.breakpoints,n.columnSpacing,(r,a)=>{var i;r(o,{[`--Grid-columnSpacing${$(n.unstable_level)}`]:typeof a=="string"?a:(i=e.spacing)==null?void 0:i.call(e,a)})}),o},fn=({theme:e,ownerState:n})=>{if(!n.container)return{};const t={};return L(e.breakpoints,n.direction,(o,r)=>{o(t,{flexDirection:r})}),t},yn=({ownerState:e})=>{const n=ve(e),t=ne(e);return d({minWidth:0,boxSizing:"border-box"},e.container&&d({display:"flex",flexWrap:"wrap"},e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},{margin:`calc(${n("row")} / -2) calc(${n("column")} / -2)`},e.disableEqualOverflow&&{margin:`calc(${n("row")} * -1) 0px 0px calc(${n("column")} * -1)`}),(!e.container||R(e))&&d({padding:`calc(${t("row")} / 2) calc(${t("column")} / 2)`},(e.disableEqualOverflow||e.parentDisableEqualOverflow)&&{padding:`${t("row")} 0px 0px ${t("column")}`}))},hn=e=>{const n=[];return Object.entries(e).forEach(([t,o])=>{o!==!1&&o!==void 0&&n.push(`grid-${t}-${String(o)}`)}),n},bn=(e,n="xs")=>{function t(o){return o===void 0?!1:typeof o=="string"&&!Number.isNaN(Number(o))||typeof o=="number"&&o>0}if(t(e))return[`spacing-${n}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const o=[];return Object.entries(e).forEach(([r,a])=>{t(a)&&o.push(`spacing-${r}-${String(a)}`)}),o}return[]},vn=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([n,t])=>`direction-${n}-${t}`):[`direction-xs-${String(e)}`],gn=["className","children","columns","container","component","direction","wrap","spacing","rowSpacing","columnSpacing","disableEqualOverflow","unstable_level"],xn=be(),wn=sn("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,n)=>n.root});function On(e){return Pe({props:e,name:"MuiGrid",defaultTheme:xn})}function Sn(e={}){const{createStyledComponent:n=wn,useThemeProps:t=On,componentName:o="MuiGrid"}=e,r=C.createContext(void 0),a=(s,u)=>{const{container:m,direction:f,spacing:h,wrap:y,gridSize:x}=s,b={root:["root",m&&"container",y!=="wrap"&&`wrap-xs-${String(y)}`,...vn(f),...hn(x),...m?bn(h,u.breakpoints.keys[0]):[]]};return Ue(b,S=>Be(o,S),{})},i=n(pn,mn,dn,cn,fn,yn,un),l=C.forwardRef(function(s,u){var m,f,h,y,x,b,S,j;const _=Ke(),F=t(s),E=Ie(F),p=C.useContext(r),{className:w,children:D,columns:N=12,container:W=!1,component:V="div",direction:v="row",wrap:g="wrap",spacing:k=0,rowSpacing:G=k,columnSpacing:U=k,disableEqualOverflow:K,unstable_level:T=0}=E,we=q(E,gn);let M=K;T&&K!==void 0&&(M=s.disableEqualOverflow);const oe={},re={},ae={};Object.entries(we).forEach(([O,A])=>{_.breakpoints.values[O]!==void 0?oe[O]=A:_.breakpoints.values[O.replace("Offset","")]!==void 0?re[O.replace("Offset","")]=A:ae[O]=A});const Oe=(m=s.columns)!=null?m:T?void 0:N,Se=(f=s.spacing)!=null?f:T?void 0:k,je=(h=(y=s.rowSpacing)!=null?y:s.spacing)!=null?h:T?void 0:G,ke=(x=(b=s.columnSpacing)!=null?b:s.spacing)!=null?x:T?void 0:U,ie=d({},E,{level:T,columns:Oe,container:W,direction:v,wrap:g,spacing:Se,rowSpacing:je,columnSpacing:ke,gridSize:oe,gridOffset:re,disableEqualOverflow:(S=(j=M)!=null?j:p)!=null?S:!1,parentDisableEqualOverflow:p}),$e=a(ie,_);let B=c.jsx(i,d({ref:u,as:V,ownerState:ie,className:qe($e.root,w)},ae,{children:C.Children.map(D,O=>{if(C.isValidElement(O)&&ze(O,["Grid"])){var A;return C.cloneElement(O,{unstable_level:(A=O.props.unstable_level)!=null?A:T+1})}return O})}));return M!==void 0&&M!==(p??!1)&&(B=c.jsx(r.Provider,{value:M,children:B})),B});return l.muiName="Grid",l}const ge=Sn({createStyledComponent:Ze("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,n)=>n.root}),componentName:"MuiGrid2",useThemeProps:e=>Xe({props:e,name:"MuiGrid2"})});function jn({entry:e,payload:n}){const t=Z(f=>{var h,y,x;return(x=(y=(h=f.payload)==null?void 0:h.data)==null?void 0:y.reduce)==null?void 0:x.call(y,(b,S)=>b+S.value,0)},[]),o=Z(f=>{const h=new Q(t(f)||0),y=n?.reduce((S,j)=>S+t(j),0)||0,x=new Q(y),b=Number(h.div(x).times(100).toFixed(2,Q.ROUND_DOWN));return isNaN(b)||!isFinite(b)?0:b},[t,n]),r=X(()=>t(e),[e,t]),a=ye(r),i=X(()=>Number(o(e)),[e,o]),l=ye(i),s=Z(f=>Math.floor(f).toLocaleString(),[]),u=De({type:"text/plain"}),m=Ye();return c.jsxs(Me,{component:"li",direction:"row",spacing:1,sx:{color:e.color},layout:"position",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:[c.jsx(Y,{sx:{width:"3px",height:"100%",backgroundColor:e.color,borderRadius:3}}),c.jsxs(H,{children:[c.jsxs(J,{component:"p",variant:"caption",children:[c.jsx(H,{component:"span",display:"inline-flex",mr:.5,children:c.jsx(he,{from:a??0,to:r,map:s,children:"0"})}),c.jsxs(H,{component:"span",direction:"row",display:"inline-flex",children:["(",c.jsx(he,{from:l??0,to:i,map:s,children:"0"}),"%)"]})]}),c.jsx(J,{variant:"body1",children:e.value}),e.payload.uuid&&c.jsxs(J,{variant:"body2",sx:{cursor:"pointer","&:hover":{textDecoration:"underline"}},onClick:()=>{u.copy(e.payload.uuid).catch(()=>{}),m.enqueueSnackbar("UUID copied to clipboard","success")},children:[e.payload.uuid.slice(0,5),"..."]})]})]})}function xe(e){const{payload:n}=e;return c.jsx(ge,{container:!0,direction:"row",component:"ul",gap:2,sx:{mt:2,justifyContent:"flex-start",alignItem:"center",flexWrap:"wrap"},children:c.jsx(Le,{children:n?.map(t=>c.jsx(ge,{children:c.jsx(jn,{entry:t,payload:n})},`item-${t.value}`))})})}function kn(e){const n=se();return c.jsx(Y,{sx:{width:"100%",height:"100%",...e.sx},children:c.jsx(le,{children:c.jsxs(Ne,{width:500,height:300,margin:{top:5,right:60,left:20,bottom:5},children:[c.jsx(ce,{vertical:!1}),c.jsx(ue,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:t=>me(t,{timeZone:e.filter.timezone,hour12:!1,hour:"numeric"}),allowDuplicatedCategory:!1,tickLine:!1,fontSize:12,tickMargin:12}),c.jsx(pe,{textAnchor:"end",dataKey:"value",tickLine:!1,tickFormatter:t=>Number(t).toLocaleString(),allowDecimals:!1,domain:[1,"dataMax"],children:e.label&&c.jsx(Te,{value:e.label,angle:-90,position:"insideLeft",style:{textAnchor:"middle"}})}),c.jsx(de,{cursor:{stroke:n.palette.neutral.main,strokeWidth:1},formatter:t=>Number(t).toLocaleString(),labelFormatter:t=>fe(t,{timeZone:e.filter.timezone,hour12:!1})}),c.jsx(Ee,{content:c.jsx(xe,{})}),e.data.map(t=>_e(Ge,{uuid:t.uuid,key:t.uuid,name:t.name,dataKey:"value",data:t.chartData,type:"monotone",stroke:t.color,strokeWidth:2}))]})})})}const $n=(e,n)=>{const t=new Map;return e.forEach(o=>{o.chartData.forEach(r=>{const a=new Date(r.date).getTime().toString();if(!t.has(a)){const i={date:a,total:0,diff:0,totalKey:"",originalTotal:0};n.forEach(({key:l})=>{i[l]=0,i[`${l}_absolute`]=0}),t.set(a,i)}n.forEach(({key:i})=>{const l=t.get(a),s=r[i],u=typeof s=="string"?s.trim()===""?0:parseInt(s,10):typeof s=="number"?s:0;l[`${i}_absolute`]=u,l[i]=0})})}),Array.from(t.values()).map(o=>{var r;const a=(r=n.find(s=>s.isTotal))==null?void 0:r.key,i=n.filter(s=>!s.isTotal).map(s=>s.key);if(!a||i.length===0)return o;const l=o[`${a}_absolute`];return o.originalTotal=l,o.total=l,o[a]=100,i.forEach(s=>{const u=o[`${s}_absolute`],m=l>0?new I(u.toString()).div(l).mul(100).toFixed(2,I.ROUND_DOWN):"0.00";o[s]=parseFloat(m)}),{...o,totalKey:a}}).sort((o,r)=>parseInt(o.date)-parseInt(r.date))};function _n(e){const n=se(),t=X(()=>e.data?$n(e.data,e.keyValues):[],[e.data,e.keyValues]);return c.jsx(Y,{sx:{width:"100%",height:"100%",...e.sx},children:c.jsx(le,{width:"100%",height:"100%",children:c.jsxs(Ae,{data:t,width:500,height:300,margin:{top:5,right:60,left:20,bottom:5},children:[c.jsx(ce,{strokeDasharray:"3 3"}),c.jsx(ue,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:o=>me(o,{timeZone:e.filter.timezone,hour12:!1,hour:"numeric"}),allowDuplicatedCategory:!1,tickLine:!1,fontSize:12,tickMargin:12}),c.jsx(pe,{textAnchor:"end",tickLine:!1,tickFormatter:o=>`${o.toFixed(2)}%`}),c.jsx(de,{cursor:{stroke:n.palette.neutral.main,strokeWidth:1},labelFormatter:o=>fe(o,{timeZone:e.filter.timezone,hour12:!1}),formatter:(o,r,a)=>{const i=a.payload.totalKey,l=a.dataKey,s=l===i,u=a.payload[`${l}_absolute`],m=a.payload.originalTotal,f=s?null:m===0?"0.00":new I(u.toString()).div(m).mul(100).toFixed(2,I.ROUND_DOWN);return[f?`${u.toLocaleString()} (${f}%)`:`${u.toLocaleString()} (TOTAL)`,r]}}),e.keyValues.sort((o,r)=>o.isTotal?-1:r.isTotal?1:0).map(o=>c.jsx(Ce,{type:"monotone",dataKey:o.key,name:o.name,stroke:o.color,fill:o.color,strokeWidth:2,fillOpacity:.6},o.key))]})})})}export{kn as SeriesChart,xe as SeriesChartLegend,_n as SeriesPercentageChart};
1
+ "use strict";import{j as l}from"../../shared/jsx-runtime-jmtevAuS.mjs";import*as A from"react";import{useCallback as Y,useMemo as H,createElement as Ne}from"react";import{Box as J,Stack as z,Typography as R,useTheme as le,Paper as _e}from"@mui/material";import{ResponsiveContainer as ce,LineChart as Te,CartesianGrid as ue,XAxis as pe,YAxis as de,Label as Ee,Tooltip as me,Legend as Ce,Line as Ge,AreaChart as Ae,Area as Le}from"recharts";import{b as fe,c as he}from"../../shared/date-Cq0LS2Mr.mjs";import K,{Decimal as Q}from"decimal.js";import{AnimatePresence as De}from"framer-motion";import{u as Me}from"../../shared/useCopyToClipboard-BALOSYVW.mjs";import"qrcode";import{u as ee}from"../../shared/usePrevious-DyvR1iCQ.mjs";import{a as Re,C as ye}from"../../shared/motions-CpxgbzKX.mjs";import{i as Fe,_ as P,s as We,a as d,c as be,d as Ie,e as Ve,f as qe,h as ze,j as Ke,k as Pe,l as Be,m as Ue,n as Ze,o as Xe,p as Ye,u as He}from"../../shared/index-CDq4CkLc.mjs";import{u as Je}from"../../shared/useCounter-BV32zXDQ.mjs";const Qe=["ownerState"],en=["variants"],nn=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function tn(e){return Object.keys(e).length===0}function on(e){return typeof e=="string"&&e.charCodeAt(0)>96}function ne(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const rn=be(),an=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function B({defaultTheme:e,theme:n,themeId:t}){return tn(n)?e:n[t]||n}function sn(e){return e?(n,t)=>t[e]:null}function U(e,n){let{ownerState:t}=n,o=P(n,Qe);const r=typeof e=="function"?e(d({ownerState:t},o)):e;if(Array.isArray(r))return r.flatMap(a=>U(a,d({ownerState:t},o)));if(r&&typeof r=="object"&&Array.isArray(r.variants)){const{variants:a=[]}=r;let i=P(r,en);return a.forEach(c=>{let s=!0;typeof c.props=="function"?s=c.props(d({ownerState:t},o,t)):Object.keys(c.props).forEach(u=>{t?.[u]!==c.props[u]&&o[u]!==c.props[u]&&(s=!1)}),s&&(Array.isArray(i)||(i=[i]),i.push(typeof c.style=="function"?c.style(d({ownerState:t},o,t)):c.style))}),i}return r}function ln(e={}){const{themeId:n,defaultTheme:t=rn,rootShouldForwardProp:o=ne,slotShouldForwardProp:r=ne}=e,a=i=>Ie(d({},i,{theme:B(d({},i,{defaultTheme:t,themeId:n}))}));return a.__mui_systemSx=!0,(i,c={})=>{Fe(i,p=>p.filter(w=>!(w!=null&&w.__mui_systemSx)));const{name:s,slot:u,skipVariantsResolver:m,skipSx:f,overridesResolver:y=sn(an(u))}=c,h=P(c,nn),x=m!==void 0?m:u&&u!=="Root"&&u!=="root"||!1,b=f||!1;let S,j=ne;u==="Root"||u==="root"?j=o:u?j=r:on(i)&&(j=void 0);const N=We(i,d({shouldForwardProp:j,label:S},h)),W=p=>typeof p=="function"&&p.__emotion_real!==p||Ve(p)?w=>U(p,d({},w,{theme:B({theme:w.theme,defaultTheme:t,themeId:n})})):p,E=(p,...w)=>{let D=W(p);const _=w?w.map(W):[];s&&y&&_.push(g=>{const v=B(d({},g,{defaultTheme:t,themeId:n}));if(!v.components||!v.components[s]||!v.components[s].styleOverrides)return null;const k=v.components[s].styleOverrides,C={};return Object.entries(k).forEach(([Z,q])=>{C[Z]=U(q,d({},g,{theme:v}))}),y(g,C)}),s&&!x&&_.push(g=>{var v;const k=B(d({},g,{defaultTheme:t,themeId:n})),C=k==null||(v=k.components)==null||(v=v[s])==null?void 0:v.variants;return U({variants:C},d({},g,{theme:k}))}),b||_.push(a);const I=_.length-w.length;if(Array.isArray(p)&&I>0){const g=new Array(I).fill("");D=[...p,...g],D.raw=[...p.raw,...g]}const V=N(D,..._);return i.muiName&&(V.muiName=i.muiName),V};return N.withConfig&&(E.withConfig=N.withConfig),E}}const cn=ln(),un=(e,n)=>e.filter(t=>n.includes(t)),L=(e,n,t)=>{const o=e.keys[0];Array.isArray(n)?n.forEach((r,a)=>{t((i,c)=>{a<=e.keys.length-1&&(a===0?Object.assign(i,c):i[e.up(e.keys[a])]=c)},r)}):n&&typeof n=="object"?(Object.keys(n).length>e.keys.length?e.keys:un(e.keys,Object.keys(n))).forEach(r=>{if(e.keys.indexOf(r)!==-1){const a=n[r];a!==void 0&&t((i,c)=>{o===r?Object.assign(i,c):i[e.up(r)]=c},a)}}):(typeof n=="number"||typeof n=="string")&&t((r,a)=>{Object.assign(r,a)},n)};function $(e){return e?`Level${e}`:""}function F(e){return e.unstable_level>0&&e.container}function ge(e){return function(n){return`var(--Grid-${n}Spacing${$(e.unstable_level)})`}}function te(e){return function(n){return e.unstable_level===0?`var(--Grid-${n}Spacing)`:`var(--Grid-${n}Spacing${$(e.unstable_level-1)})`}}function oe(e){return e.unstable_level===0?"var(--Grid-columns)":`var(--Grid-columns${$(e.unstable_level-1)})`}const pn=({theme:e,ownerState:n})=>{const t=ge(n),o={};return L(e.breakpoints,n.gridSize,(r,a)=>{let i={};a===!0&&(i={flexBasis:0,flexGrow:1,maxWidth:"100%"}),a==="auto"&&(i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof a=="number"&&(i={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${a} / ${oe(n)}${F(n)?` + ${t("column")}`:""})`}),r(o,i)}),o},dn=({theme:e,ownerState:n})=>{const t={};return L(e.breakpoints,n.gridOffset,(o,r)=>{let a={};r==="auto"&&(a={marginLeft:"auto"}),typeof r=="number"&&(a={marginLeft:r===0?"0px":`calc(100% * ${r} / ${oe(n)})`}),o(t,a)}),t},mn=({theme:e,ownerState:n})=>{if(!n.container)return{};const t=F(n)?{[`--Grid-columns${$(n.unstable_level)}`]:oe(n)}:{"--Grid-columns":12};return L(e.breakpoints,n.columns,(o,r)=>{o(t,{[`--Grid-columns${$(n.unstable_level)}`]:r})}),t},fn=({theme:e,ownerState:n})=>{if(!n.container)return{};const t=te(n),o=F(n)?{[`--Grid-rowSpacing${$(n.unstable_level)}`]:t("row")}:{};return L(e.breakpoints,n.rowSpacing,(r,a)=>{var i;r(o,{[`--Grid-rowSpacing${$(n.unstable_level)}`]:typeof a=="string"?a:(i=e.spacing)==null?void 0:i.call(e,a)})}),o},hn=({theme:e,ownerState:n})=>{if(!n.container)return{};const t=te(n),o=F(n)?{[`--Grid-columnSpacing${$(n.unstable_level)}`]:t("column")}:{};return L(e.breakpoints,n.columnSpacing,(r,a)=>{var i;r(o,{[`--Grid-columnSpacing${$(n.unstable_level)}`]:typeof a=="string"?a:(i=e.spacing)==null?void 0:i.call(e,a)})}),o},yn=({theme:e,ownerState:n})=>{if(!n.container)return{};const t={};return L(e.breakpoints,n.direction,(o,r)=>{o(t,{flexDirection:r})}),t},bn=({ownerState:e})=>{const n=ge(e),t=te(e);return d({minWidth:0,boxSizing:"border-box"},e.container&&d({display:"flex",flexWrap:"wrap"},e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},{margin:`calc(${n("row")} / -2) calc(${n("column")} / -2)`},e.disableEqualOverflow&&{margin:`calc(${n("row")} * -1) 0px 0px calc(${n("column")} * -1)`}),(!e.container||F(e))&&d({padding:`calc(${t("row")} / 2) calc(${t("column")} / 2)`},(e.disableEqualOverflow||e.parentDisableEqualOverflow)&&{padding:`${t("row")} 0px 0px ${t("column")}`}))},gn=e=>{const n=[];return Object.entries(e).forEach(([t,o])=>{o!==!1&&o!==void 0&&n.push(`grid-${t}-${String(o)}`)}),n},vn=(e,n="xs")=>{function t(o){return o===void 0?!1:typeof o=="string"&&!Number.isNaN(Number(o))||typeof o=="number"&&o>0}if(t(e))return[`spacing-${n}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const o=[];return Object.entries(e).forEach(([r,a])=>{t(a)&&o.push(`spacing-${r}-${String(a)}`)}),o}return[]},xn=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([n,t])=>`direction-${n}-${t}`):[`direction-xs-${String(e)}`],wn=["className","children","columns","container","component","direction","wrap","spacing","rowSpacing","columnSpacing","disableEqualOverflow","unstable_level"],On=be(),Sn=cn("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,n)=>n.root});function jn(e){return Be({props:e,name:"MuiGrid",defaultTheme:On})}function kn(e={}){const{createStyledComponent:n=Sn,useThemeProps:t=jn,componentName:o="MuiGrid"}=e,r=A.createContext(void 0),a=(s,u)=>{const{container:m,direction:f,spacing:y,wrap:h,gridSize:x}=s,b={root:["root",m&&"container",h!=="wrap"&&`wrap-xs-${String(h)}`,...xn(f),...gn(x),...m?vn(y,u.breakpoints.keys[0]):[]]};return Ue(b,S=>Ze(o,S),{})},i=n(mn,hn,fn,pn,yn,bn,dn),c=A.forwardRef(function(s,u){var m,f,y,h,x,b,S,j;const N=qe(),W=t(s),E=ze(W),p=A.useContext(r),{className:w,children:D,columns:_=12,container:I=!1,component:V="div",direction:g="row",wrap:v="wrap",spacing:k=0,rowSpacing:C=k,columnSpacing:Z=k,disableEqualOverflow:q,unstable_level:T=0}=E,we=P(E,wn);let M=q;T&&q!==void 0&&(M=s.disableEqualOverflow);const re={},ae={},ie={};Object.entries(we).forEach(([O,G])=>{N.breakpoints.values[O]!==void 0?re[O]=G:N.breakpoints.values[O.replace("Offset","")]!==void 0?ae[O.replace("Offset","")]=G:ie[O]=G});const Oe=(m=s.columns)!=null?m:T?void 0:_,Se=(f=s.spacing)!=null?f:T?void 0:k,je=(y=(h=s.rowSpacing)!=null?h:s.spacing)!=null?y:T?void 0:C,ke=(x=(b=s.columnSpacing)!=null?b:s.spacing)!=null?x:T?void 0:Z,se=d({},E,{level:T,columns:Oe,container:I,direction:g,wrap:v,spacing:Se,rowSpacing:je,columnSpacing:ke,gridSize:re,gridOffset:ae,disableEqualOverflow:(S=(j=M)!=null?j:p)!=null?S:!1,parentDisableEqualOverflow:p}),$e=a(se,N);let X=l.jsx(i,d({ref:u,as:V,ownerState:se,className:Ke($e.root,w)},ie,{children:A.Children.map(D,O=>{if(A.isValidElement(O)&&Pe(O,["Grid"])){var G;return A.cloneElement(O,{unstable_level:(G=O.props.unstable_level)!=null?G:T+1})}return O})}));return M!==void 0&&M!==(p??!1)&&(X=l.jsx(r.Provider,{value:M,children:X})),X});return c.muiName="Grid",c}const ve=kn({createStyledComponent:Xe("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,n)=>n.root}),componentName:"MuiGrid2",useThemeProps:e=>Ye({props:e,name:"MuiGrid2"})});function $n({entry:e,payload:n}){const t=Y(f=>{var y,h,x;return(x=(h=(y=f.payload)==null?void 0:y.data)==null?void 0:h.reduce)==null?void 0:x.call(h,(b,S)=>b+S.value,0)},[]),o=Y(f=>{const y=new Q(t(f)||0),h=n?.reduce((S,j)=>S+t(j),0)||0,x=new Q(h),b=Number(y.div(x).times(100).toFixed(2,Q.ROUND_DOWN));return isNaN(b)||!isFinite(b)?0:b},[t,n]),r=H(()=>t(e),[e,t]),a=ee(r),i=H(()=>Number(o(e)),[e,o]),c=ee(i),s=Y(f=>Math.floor(f).toLocaleString(),[]),u=Me({type:"text/plain"}),m=He();return l.jsxs(Re,{component:"li",direction:"row",spacing:1,sx:{color:e.color},layout:"position",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:[l.jsx(J,{sx:{width:"3px",height:"100%",backgroundColor:e.color,borderRadius:3}}),l.jsxs(z,{children:[l.jsxs(R,{component:"p",variant:"caption",children:[l.jsx(z,{component:"span",display:"inline-flex",mr:.5,children:l.jsx(ye,{from:a??0,to:r,map:s,children:"0"})}),l.jsxs(z,{component:"span",direction:"row",display:"inline-flex",children:["(",l.jsx(ye,{from:c??0,to:i,map:s,children:"0"}),"%)"]})]}),l.jsx(R,{variant:"body1",children:e.value}),e.payload.uuid&&l.jsxs(R,{variant:"body2",sx:{cursor:"pointer","&:hover":{textDecoration:"underline"}},onClick:()=>{u.copy(e.payload.uuid).catch(()=>{}),m.enqueueSnackbar("UUID copied to clipboard","success")},children:[e.payload.uuid.slice(0,5),"..."]})]})]})}function xe(e){const{payload:n}=e;return l.jsx(ve,{container:!0,direction:"row",component:"ul",gap:2,sx:{mt:2,justifyContent:"flex-start",alignItem:"center",flexWrap:"wrap"},children:l.jsx(De,{children:n?.map(t=>l.jsx(ve,{children:l.jsx($n,{entry:t,payload:n})},`item-${t.value}`))})})}function Nn(e){const n=le();return l.jsx(J,{sx:{width:"100%",height:"100%",...e.sx},children:l.jsx(ce,{children:l.jsxs(Te,{width:500,height:300,margin:{top:5,right:60,left:20,bottom:5},children:[l.jsx(ue,{vertical:!1}),l.jsx(pe,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:t=>fe(t,{timeZone:e.filter.timezone,hour12:!1,hour:"numeric"}),allowDuplicatedCategory:!1,tickLine:!1,fontSize:12,tickMargin:12}),l.jsx(de,{textAnchor:"end",dataKey:"value",tickLine:!1,tickFormatter:t=>Number(t).toLocaleString(),allowDecimals:!1,domain:[1,"dataMax"],children:e.label&&l.jsx(Ee,{value:e.label,angle:-90,position:"insideLeft",style:{textAnchor:"middle"}})}),l.jsx(me,{cursor:{stroke:n.palette.neutral.main,strokeWidth:1},formatter:t=>Number(t).toLocaleString(),labelFormatter:t=>he(t,{timeZone:e.filter.timezone,hour12:!1})}),l.jsx(Ce,{content:l.jsx(xe,{})}),e.data.map(t=>Ne(Ge,{uuid:t.uuid,key:t.uuid,name:t.name,dataKey:"value",data:t.chartData,type:"monotone",stroke:t.color,strokeWidth:2}))]})})})}const _n=(e,n)=>{const t=new Map;return e.forEach(o=>{o.chartData.forEach(r=>{const a=new Date(r.date).getTime().toString();if(!t.has(a)){const i={date:a,total:0,diff:0,totalKey:"",originalTotal:0};n.forEach(({key:c})=>{i[c]=0,i[`${c}_absolute`]=0}),t.set(a,i)}n.forEach(({key:i})=>{const c=t.get(a),s=r[i],u=typeof s=="string"?s.trim()===""?0:parseInt(s,10):typeof s=="number"?s:0;c[`${i}_absolute`]=u,c[i]=0})})}),Array.from(t.values()).map(o=>{var r;const a=(r=n.find(s=>s.isTotal))==null?void 0:r.key,i=n.filter(s=>!s.isTotal).map(s=>s.key);if(!a||i.length===0)return o;const c=o[`${a}_absolute`];return o.originalTotal=c,o.total=c,o[a]=100,i.forEach(s=>{const u=o[`${s}_absolute`],m=c>0?new K(u.toString()).div(c).mul(100).toFixed(2,K.ROUND_DOWN):"0.00";o[s]=parseFloat(m)}),{...o,totalKey:a}}).sort((o,r)=>parseInt(o.date)-parseInt(r.date))};function Tn(e){const n=le(),t=H(()=>e.data?_n(e.data,e.keyValues):[],[e.data,e.keyValues]);return l.jsx(J,{sx:{width:"100%",height:"100%",...e.sx},children:l.jsx(ce,{width:"100%",height:"100%",children:l.jsxs(Ae,{data:t,width:500,height:300,margin:{top:5,right:60,left:20,bottom:5},children:[l.jsx(ue,{strokeDasharray:"3 3"}),l.jsx(pe,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:o=>fe(o,{timeZone:e.filter.timezone,hour12:!1,hour:"numeric"}),allowDuplicatedCategory:!1,tickLine:!1,fontSize:12,tickMargin:12}),l.jsx(de,{textAnchor:"end",tickLine:!1,tickFormatter:o=>`${o.toFixed(2)}%`}),l.jsx(me,{cursor:{stroke:n.palette.neutral.main,strokeWidth:1},labelFormatter:o=>he(o,{timeZone:e.filter.timezone,hour12:!1}),formatter:(o,r,a)=>{const i=a.payload.totalKey,c=a.dataKey,s=c===i,u=a.payload[`${c}_absolute`],m=a.payload.originalTotal,f=s?null:m===0?"0.00":new K(u.toString()).div(m).mul(100).toFixed(2,K.ROUND_DOWN);return[f?`${u.toLocaleString()} (${f}%)`:`${u.toLocaleString()} (TOTAL)`,r]}}),e.keyValues.sort((o,r)=>o.isTotal?-1:r.isTotal?1:0).map(o=>l.jsx(Le,{type:"monotone",dataKey:o.key,name:o.name,stroke:o.color,fill:o.color,strokeWidth:2,fillOpacity:.6},o.key))]})})})}function En(e){const n=ee(e.value),{ref:t}=Je({from:n??0,to:e.value,duration:1,map:e.map});return l.jsx(_e,{sx:{p:3,flex:1,...e.sx},children:l.jsxs(z,{spacing:1,alignItems:"center",children:[l.jsx(R,{ref:t,variant:"h4",fontWeight:"bold",children:e.initialValue}),l.jsx(R,{color:"text.secondary",children:e.label})]})})}export{En as BigNumber,Nn as SeriesChart,xe as SeriesChartLegend,Tn as SeriesPercentageChart};
@@ -1 +1 @@
1
- "use strict";import{A as a,c as s,k as e,B as t,l as r,C as n,D as o,f as i,E as p,i as u,F as c,I as m,b as d,L as P,O as l,e as I,P as g,Q as B,R as S,S as h,d as f,j as k,T,g as b,a as y,V as C,h as A}from"../shared/index-DRHYD1Bv.mjs";import{a as L,b as D,P as E,S as N}from"../shared/PageSectionHeader-DClJcZmV.mjs";import{C as R,W as v,u as x}from"../shared/index-CDq4CkLc.mjs";import{SnackbarProvider as H}from"notistack";export{a as AcceptTermsNotice,s as Alert,e as Backdrop,t as Banner,r as Button,n as CredentialRequestsEditor,R as CustomAlertComponent,o as DateInput,i as DateRangeInput,p as EmailInput,u as ExactBirthdayBanner,c as FullWidthAlert,m as Image,d as LegalLink,P as LinkButton,l as OTPInput,L as PageHeader,D as PageSectionHeader,E as Paragraph,I as PhoneInput,g as PrivacyPolicyNotice,B as QRCodeDisplay,S as ResendPhoneBanner,h as SSNInput,N as SectionHeader,f as SelectInput,H as SnackbarProvider,k as TestPhoneNumbersBanner,T as TextButton,b as TimezoneInput,y as Typography,C as VerifiedImage,A as VerifiedIncLogo,v as When,x as useSnackbar};
1
+ "use strict";import{A as a,c as s,k as e,B as t,l as r,C as n,D as o,f as i,E as p,i as u,F as c,I as m,b as d,L as P,O as l,e as I,P as g,Q as B,R as S,S as h,d as f,j as k,T,g as b,a as y,V as C,h as A}from"../shared/index-Bbzs5AIe.mjs";import{a as L,b as D,P as E,S as N}from"../shared/PageSectionHeader-DClJcZmV.mjs";import{C as R,W as v,u as x}from"../shared/index-CDq4CkLc.mjs";import{SnackbarProvider as H}from"notistack";export{a as AcceptTermsNotice,s as Alert,e as Backdrop,t as Banner,r as Button,n as CredentialRequestsEditor,R as CustomAlertComponent,o as DateInput,i as DateRangeInput,p as EmailInput,u as ExactBirthdayBanner,c as FullWidthAlert,m as Image,d as LegalLink,P as LinkButton,l as OTPInput,L as PageHeader,D as PageSectionHeader,E as Paragraph,I as PhoneInput,g as PrivacyPolicyNotice,B as QRCodeDisplay,S as ResendPhoneBanner,h as SSNInput,N as SectionHeader,f as SelectInput,H as SnackbarProvider,k as TestPhoneNumbersBanner,T as TextButton,b as TimezoneInput,y as Typography,C as VerifiedImage,A as VerifiedIncLogo,v as When,x as useSnackbar};
@@ -1 +1 @@
1
- "use strict";import{b as s,d as a,a as e,j as o,u,e as r,c as i,f as t,g as l,h as m,i as c}from"../shared/useIntersectionObserver-CbpWuEs0.mjs";import{u as p}from"../shared/useCopyToClipboard-BALOSYVW.mjs";import{a as f,u as n}from"../shared/useOnClickOutside-P5GTcgh8.mjs";import{u as b}from"../shared/useCounter-BV32zXDQ.mjs";import{u as d}from"../shared/usePrevious-A8he0cAZ.mjs";export{s as useCallbackRef,p as useCopyToClipboard,b as useCounter,a as useDebounceValue,e as useDisclosure,o as useIntersectionObserver,u as useLocalStorage,f as useOnClickOutside,d as usePrevious,n as useQRCode,r as useScript,i as useSearchParams,t as useThrottle,l as useToggle,m as useWindowScroll,c as useWindowSize};
1
+ "use strict";import{b as s,d as a,a as e,j as o,u,e as r,c as i,f as t,g as l,h as m,i as c}from"../shared/useIntersectionObserver-CbpWuEs0.mjs";import{u as p}from"../shared/useCopyToClipboard-BALOSYVW.mjs";import{a as f,u as n}from"../shared/useOnClickOutside-P5GTcgh8.mjs";import{u as b}from"../shared/useCounter-BV32zXDQ.mjs";import{u as d}from"../shared/usePrevious-DyvR1iCQ.mjs";export{s as useCallbackRef,p as useCopyToClipboard,b as useCounter,a as useDebounceValue,e as useDisclosure,o as useIntersectionObserver,u as useLocalStorage,f as useOnClickOutside,d as usePrevious,n as useQRCode,r as useScript,i as useSearchParams,t as useThrottle,l as useToggle,m as useWindowScroll,c as useWindowSize};
@@ -1,5 +1,6 @@
1
1
  /**
2
- * Custom React hook for tracking previous values.
2
+ * Track the previous value of a variable with usePrevious.
3
3
  * @param value
4
+ * @returns The previous value of the variable.
4
5
  */
5
- export declare function usePrevious<T>(value: T): T | undefined;
6
+ export declare function usePrevious<T>(value: T): T | null;
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- "use strict";import{A as e,c as t,k as r,B as o,l as n,C as i,D as m,f as u,E as l,i as c,F as d,I as p,b as h,L as g,O as S,e as f,P,Q as k,R as y,S as C,d as D,j as b,T as B,g as I,a as T,V as w,h as N,m as R,n as v,o as Y,q as x,p as A,s as G,v as L}from"./shared/index-DRHYD1Bv.mjs";import{a as M,b as W,P as E,S as O}from"./shared/PageSectionHeader-DClJcZmV.mjs";import{C as F,W as U,u as V}from"./shared/index-CDq4CkLc.mjs";import{b as q,d as H,a as Q,j,u as z,e as X,c as Z,f as _,g as $,h as J,i as K}from"./shared/useIntersectionObserver-CbpWuEs0.mjs";import{u as aa}from"./shared/useCopyToClipboard-BALOSYVW.mjs";import{a as sa,u as ea}from"./shared/useOnClickOutside-P5GTcgh8.mjs";import{u as ta}from"./shared/useCounter-BV32zXDQ.mjs";import{u as ra}from"./shared/usePrevious-A8he0cAZ.mjs";import{b as oa,a as na,v as ia,e as ma,d as ua,p as la,u as ca,h as da,j as pa,g as ha,o as ga,s as Sa,m as fa,c as Pa,l as ka,n as ya,q as Ca,f as Da,i as ba,r as Ba,z as Ia,t as Ta,x as wa,k as Na,w as Ra,y as va}from"./shared/shadows-Dhd7FrwF.mjs";import{f as Ya,b as xa,a as Aa,c as Ga}from"./shared/date-Cq0LS2Mr.mjs";import{masks as La}from"./utils/masks/index.mjs";import{M as Ma,S as Wa,U as Ea,d as Oa,e as Fa,f as Ua,g as Va,a as qa,s as Ha}from"./shared/unix.schema-CMYTtXco.mjs";import{p as Qa}from"./shared/phone.schema-XBbyizhq.mjs";import{SnackbarProvider as ja}from"notistack";async function za(a){try{return[await a,null]}catch(s){return[null,s]}}const Xa=a=>a.replace(/(\d{3})-?(\d{2})-?(\d{4})/,"\u2022\u2022\u2022-\u2022\u2022-$3");export{e as AcceptTermsNotice,t as Alert,r as Backdrop,o as Banner,n as Button,i as CredentialRequestsEditor,F as CustomAlertComponent,m as DateInput,u as DateRangeInput,l as EmailInput,c as ExactBirthdayBanner,d as FullWidthAlert,p as Image,h as LegalLink,g as LinkButton,Ma as MaskedAndUnmaskedSSNSchema,S as OTPInput,M as PageHeader,W as PageSectionHeader,E as Paragraph,f as PhoneInput,P as PrivacyPolicyNotice,k as QRCodeDisplay,y as ResendPhoneBanner,C as SSNInput,Wa as SSNSchema,O as SectionHeader,D as SelectInput,ja as SnackbarProvider,b as TestPhoneNumbersBanner,B as TextButton,I as TimezoneInput,T as Typography,Ea as USDateSchema,w as VerifiedImage,N as VerifiedIncLogo,U as When,oa as black,na as blue,ia as colors,R as countries,ma as darkBlue,ua as darkGreen,la as darkGrey,ca as darkGreyContrast,da as darkRed,pa as darkYellow,Oa as descriptionSchema,Fa as emailSchema,Ua as fieldSchema,Ya as formatDateMMDDYYYY,xa as formatDateMMYY,Aa as formatDateToTimestamp,Ga as formatExtendedDate,Va as getDateSchemaWithPastValidation,v as getPhoneData,Y as getPhoneDataByFieldName,qa as getUnixSchema,ha as green,ga as grey,Sa as greyContrast,fa as infoContrast,Pa as lightBlue,ka as lightGreen,ya as lightGrey,Ca as lightGreyContrast,Da as lightRed,ba as lightYellow,La as masks,x as omitProperties,A as parseToPhoneNational,Qa as phoneSchema,Ba as red,Ia as shadows,G as sortByCountryName,Xa as ssnFormatter,Ha as stateSchema,Ta as textDisabled,wa as theme,q as useCallbackRef,aa as useCopyToClipboard,ta as useCounter,H as useDebounceValue,Q as useDisclosure,j as useIntersectionObserver,z as useLocalStorage,sa as useOnClickOutside,ra as usePrevious,ea as useQRCode,X as useScript,Z as useSearchParams,V as useSnackbar,_ as useThrottle,$ as useToggle,J as useWindowScroll,K as useWindowSize,L as validatePhone,Na as warningContrast,Ra as white,za as wrapPromise,va as yellow};
1
+ "use strict";import{A as e,c as t,k as r,B as o,l as n,C as i,D as m,f as u,E as l,i as c,F as d,I as p,b as h,L as g,O as S,e as f,P,Q as k,R as y,S as C,d as D,j as b,T as B,g as I,a as T,V as w,h as N,m as R,n as v,o as Y,q as x,p as A,s as G,v as L}from"./shared/index-Bbzs5AIe.mjs";import{a as M,b as W,P as E,S as O}from"./shared/PageSectionHeader-DClJcZmV.mjs";import{C as F,W as U,u as V}from"./shared/index-CDq4CkLc.mjs";import{b as q,d as H,a as Q,j,u as z,e as X,c as Z,f as _,g as $,h as J,i as K}from"./shared/useIntersectionObserver-CbpWuEs0.mjs";import{u as aa}from"./shared/useCopyToClipboard-BALOSYVW.mjs";import{a as sa,u as ea}from"./shared/useOnClickOutside-P5GTcgh8.mjs";import{u as ta}from"./shared/useCounter-BV32zXDQ.mjs";import{u as ra}from"./shared/usePrevious-DyvR1iCQ.mjs";import{b as oa,a as na,v as ia,e as ma,d as ua,p as la,u as ca,h as da,j as pa,g as ha,o as ga,s as Sa,m as fa,c as Pa,l as ka,n as ya,q as Ca,f as Da,i as ba,r as Ba,z as Ia,t as Ta,x as wa,k as Na,w as Ra,y as va}from"./shared/shadows-Dhd7FrwF.mjs";import{f as Ya,b as xa,a as Aa,c as Ga}from"./shared/date-Cq0LS2Mr.mjs";import{masks as La}from"./utils/masks/index.mjs";import{M as Ma,S as Wa,U as Ea,d as Oa,e as Fa,f as Ua,g as Va,a as qa,s as Ha}from"./shared/unix.schema-CMYTtXco.mjs";import{p as Qa}from"./shared/phone.schema-XBbyizhq.mjs";import{SnackbarProvider as ja}from"notistack";async function za(a){try{return[await a,null]}catch(s){return[null,s]}}const Xa=a=>a.replace(/(\d{3})-?(\d{2})-?(\d{4})/,"\u2022\u2022\u2022-\u2022\u2022-$3");export{e as AcceptTermsNotice,t as Alert,r as Backdrop,o as Banner,n as Button,i as CredentialRequestsEditor,F as CustomAlertComponent,m as DateInput,u as DateRangeInput,l as EmailInput,c as ExactBirthdayBanner,d as FullWidthAlert,p as Image,h as LegalLink,g as LinkButton,Ma as MaskedAndUnmaskedSSNSchema,S as OTPInput,M as PageHeader,W as PageSectionHeader,E as Paragraph,f as PhoneInput,P as PrivacyPolicyNotice,k as QRCodeDisplay,y as ResendPhoneBanner,C as SSNInput,Wa as SSNSchema,O as SectionHeader,D as SelectInput,ja as SnackbarProvider,b as TestPhoneNumbersBanner,B as TextButton,I as TimezoneInput,T as Typography,Ea as USDateSchema,w as VerifiedImage,N as VerifiedIncLogo,U as When,oa as black,na as blue,ia as colors,R as countries,ma as darkBlue,ua as darkGreen,la as darkGrey,ca as darkGreyContrast,da as darkRed,pa as darkYellow,Oa as descriptionSchema,Fa as emailSchema,Ua as fieldSchema,Ya as formatDateMMDDYYYY,xa as formatDateMMYY,Aa as formatDateToTimestamp,Ga as formatExtendedDate,Va as getDateSchemaWithPastValidation,v as getPhoneData,Y as getPhoneDataByFieldName,qa as getUnixSchema,ha as green,ga as grey,Sa as greyContrast,fa as infoContrast,Pa as lightBlue,ka as lightGreen,ya as lightGrey,Ca as lightGreyContrast,Da as lightRed,ba as lightYellow,La as masks,x as omitProperties,A as parseToPhoneNational,Qa as phoneSchema,Ba as red,Ia as shadows,G as sortByCountryName,Xa as ssnFormatter,Ha as stateSchema,Ta as textDisabled,wa as theme,q as useCallbackRef,aa as useCopyToClipboard,ta as useCounter,H as useDebounceValue,Q as useDisclosure,j as useIntersectionObserver,z as useLocalStorage,sa as useOnClickOutside,ra as usePrevious,ea as useQRCode,X as useScript,Z as useSearchParams,V as useSnackbar,_ as useThrottle,$ as useToggle,J as useWindowScroll,K as useWindowSize,L as validatePhone,Na as warningContrast,Ra as white,za as wrapPromise,va as yellow};
@@ -1,4 +1,4 @@
1
- "use strict";var Ly=Object.defineProperty,By=(e,r,t)=>r in e?Ly(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,ae=(e,r,t)=>By(e,typeof r!="symbol"?r+"":r,t);import{j as g}from"./jsx-runtime-jmtevAuS.mjs";import*as S from"react";import L,{Children as Wy,isValidElement as Ni,cloneElement as Co,forwardRef as Lr,createContext as a0,useEffect as Br,useContext as i0,useMemo as To,useState as rn,useRef as jn,useCallback as Wr,useLayoutEffect as l0,useImperativeHandle as Yy,createElement as Hy,Component as Mt,createRef as _r}from"react";import{Typography as Cn,Box as Ct,Tooltip as qy,IconButton as ji,Stack as Tt,Autocomplete as ec,TextField as rr,Radio as $y,Chip as Vy,RadioGroup as tc,Dialog as Ky,DialogTitle as Uy,DialogContent as Zy,DialogActions as Qy,useTheme as So,Paper as Xy,Accordion as Jy,AccordionSummary as e5,AccordionDetails as t5,Link as n5,Alert as r5,InputAdornment as s0,Button as o5,Menu as a5,MenuItem as i5,FormControl as c0,InputBase as l5,Popper as s5,AlertTitle as c5,Backdrop as u5,CircularProgress as d5}from"@mui/material";import{useForm as p5,FormProvider as f5,useController as Ao,useFormContext as u0,useFieldArray as h5}from"react-hook-form";import{P as Eo,_ as _e,a as j,f as d0,G as m5,n as rt,j as ce,o as fe,p as it,m as lt,r as zn,b as ke,q as xr,t as v5,h as g5,v as or,w as zi,x as p0,T as f0,y as h0,z as m0,A as v0,B as nc,k as rc,E as b5}from"./index-CDq4CkLc.mjs";import{Code as y5,Delete as w5,ChevronLeft as _5,Menu as x5,CheckCircle as k5,Close as g0,Add as M5,KeyboardArrowDown as C5}from"@mui/icons-material";import{useDrag as T5,useDrop as S5,DndProvider as A5}from"react-dnd";import{HTML5Backend as E5}from"react-dnd-html5-backend";import{masks as b0}from"../utils/masks/index.mjs";import D5 from"@mona-health/react-input-mask";import{u as O5}from"./usePrevious-A8he0cAZ.mjs";import{p as P5}from"./phone.schema-XBbyizhq.mjs";import{IMaskInput as N5}from"react-imask";import*as y0 from"react-dom";import ya from"react-dom";import"qrcode";import"framer-motion";import{a as j5,u as z5}from"./useOnClickOutside-P5GTcgh8.mjs";import{keyframes as oc}from"@emotion/react";import ac,{isValidPhoneNumber as R5}from"libphonenumber-js";const Yz=Eo.oneOfType([Eo.func,Eo.object]);function ic(e,r){return()=>null}function I5(e){const{prototype:r={}}=e;return!!r.isReactComponent}function F5(e,r,t,n,a){const l=e[r],c=a||r;if(l==null||typeof window>"u")return null;let u;return typeof l=="function"&&!I5(l)&&(u="Did you accidentally provide a plain function component instead?"),u!==void 0?new Error(`Invalid ${n} \`${c}\` supplied to \`${t}\`. Expected an element type that can hold a ref. ${u} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Hz=ic(Eo.elementType,F5);function lc(e,r){typeof e=="function"?e(r):e&&(e.current=r)}function Ft(...e){return S.useMemo(()=>e.every(r=>r==null)?null:r=>{e.forEach(t=>{lc(t,r)})},e)}const Yr=typeof window<"u"?S.useLayoutEffect:S.useEffect;function Do(e){const r=S.useRef(e);return Yr(()=>{r.current=e}),S.useRef((...t)=>(0,r.current)(...t)).current}const w0={};function G5(e,r){const t=S.useRef(w0);return t.current===w0&&(t.current=e(r)),t}const L5=[];function B5(e){S.useEffect(e,L5)}class Bl{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Bl}start(r,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},r)}}function _0(){const e=G5(Bl.create).current;return B5(e.disposeEffect),e}let Ri=!0,sc=!1;const W5=new Bl,Y5={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function H5(e){const{type:r,tagName:t}=e;return!!(t==="INPUT"&&Y5[r]&&!e.readOnly||t==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function q5(e){e.metaKey||e.altKey||e.ctrlKey||(Ri=!0)}function cc(){Ri=!1}function $5(){this.visibilityState==="hidden"&&sc&&(Ri=!0)}function V5(e){e.addEventListener("keydown",q5,!0),e.addEventListener("mousedown",cc,!0),e.addEventListener("pointerdown",cc,!0),e.addEventListener("touchstart",cc,!0),e.addEventListener("visibilitychange",$5,!0)}function K5(e){const{target:r}=e;try{return r.matches(":focus-visible")}catch{}return Ri||H5(r)}function U5(){const e=S.useCallback(a=>{a!=null&&V5(a.ownerDocument)},[]),r=S.useRef(!1);function t(){return r.current?(sc=!0,W5.start(100,()=>{sc=!1}),r.current=!1,!0):!1}function n(a){return K5(a)?(r.current=!0,!0):!1}return{isFocusVisibleRef:r,onFocus:n,onBlur:t,ref:e}}function uc(e,r){return uc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},uc(e,r)}function x0(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,uc(e,r)}const k0={disabled:!1};var qz=null;const Ii=L.createContext(null);var Z5=function(e){return e.scrollTop},wa="unmounted",Hr="exited",qr="entering",Oo="entered",dc="exiting",Rn=function(e){x0(r,e);function r(n,a){var l;l=e.call(this,n,a)||this;var c=a,u=c&&!c.isMounting?n.enter:n.appear,d;return l.appearStatus=null,n.in?u?(d=Hr,l.appearStatus=qr):d=Oo:n.unmountOnExit||n.mountOnEnter?d=wa:d=Hr,l.state={status:d},l.nextCallback=null,l}r.getDerivedStateFromProps=function(n,a){var l=n.in;return l&&a.status===wa?{status:Hr}:null};var t=r.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(n){var a=null;if(n!==this.props){var l=this.state.status;this.props.in?l!==qr&&l!==Oo&&(a=qr):(l===qr||l===Oo)&&(a=dc)}this.updateStatus(!1,a)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var n=this.props.timeout,a,l,c;return a=l=c=n,n!=null&&typeof n!="number"&&(a=n.exit,l=n.enter,c=n.appear!==void 0?n.appear:l),{exit:a,enter:l,appear:c}},t.updateStatus=function(n,a){if(n===void 0&&(n=!1),a!==null)if(this.cancelNextCallback(),a===qr){if(this.props.unmountOnExit||this.props.mountOnEnter){var l=this.props.nodeRef?this.props.nodeRef.current:ya.findDOMNode(this);l&&Z5(l)}this.performEnter(n)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Hr&&this.setState({status:wa})},t.performEnter=function(n){var a=this,l=this.props.enter,c=this.context?this.context.isMounting:n,u=this.props.nodeRef?[c]:[ya.findDOMNode(this),c],d=u[0],f=u[1],h=this.getTimeouts(),v=c?h.appear:h.enter;if(!n&&!l||k0.disabled){this.safeSetState({status:Oo},function(){a.props.onEntered(d)});return}this.props.onEnter(d,f),this.safeSetState({status:qr},function(){a.props.onEntering(d,f),a.onTransitionEnd(v,function(){a.safeSetState({status:Oo},function(){a.props.onEntered(d,f)})})})},t.performExit=function(){var n=this,a=this.props.exit,l=this.getTimeouts(),c=this.props.nodeRef?void 0:ya.findDOMNode(this);if(!a||k0.disabled){this.safeSetState({status:Hr},function(){n.props.onExited(c)});return}this.props.onExit(c),this.safeSetState({status:dc},function(){n.props.onExiting(c),n.onTransitionEnd(l.exit,function(){n.safeSetState({status:Hr},function(){n.props.onExited(c)})})})},t.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(n,a){a=this.setNextCallback(a),this.setState(n,a)},t.setNextCallback=function(n){var a=this,l=!0;return this.nextCallback=function(c){l&&(l=!1,a.nextCallback=null,n(c))},this.nextCallback.cancel=function(){l=!1},this.nextCallback},t.onTransitionEnd=function(n,a){this.setNextCallback(a);var l=this.props.nodeRef?this.props.nodeRef.current:ya.findDOMNode(this),c=n==null&&!this.props.addEndListener;if(!l||c){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[l,this.nextCallback],d=u[0],f=u[1];this.props.addEndListener(d,f)}n!=null&&setTimeout(this.nextCallback,n)},t.render=function(){var n=this.state.status;if(n===wa)return null;var a=this.props,l=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var c=_e(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return L.createElement(Ii.Provider,{value:null},typeof l=="function"?l(n,c):L.cloneElement(L.Children.only(l),c))},r}(L.Component);Rn.contextType=Ii,Rn.propTypes={};function Po(){}Rn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Po,onEntering:Po,onEntered:Po,onExit:Po,onExiting:Po,onExited:Po},Rn.UNMOUNTED=wa,Rn.EXITED=Hr,Rn.ENTERING=qr,Rn.ENTERED=Oo,Rn.EXITING=dc;function Q5(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pc(e,r){var t=function(a){return r&&Ni(a)?r(a):a},n=Object.create(null);return e&&Wy.map(e,function(a){return a}).forEach(function(a){n[a.key]=t(a)}),n}function X5(e,r){e=e||{},r=r||{};function t(h){return h in r?r[h]:e[h]}var n=Object.create(null),a=[];for(var l in e)l in r?a.length&&(n[l]=a,a=[]):a.push(l);var c,u={};for(var d in r){if(n[d])for(c=0;c<n[d].length;c++){var f=n[d][c];u[n[d][c]]=t(f)}u[d]=t(d)}for(c=0;c<a.length;c++)u[a[c]]=t(a[c]);return u}function $r(e,r,t){return t[r]!=null?t[r]:e.props[r]}function J5(e,r){return pc(e.children,function(t){return Co(t,{onExited:r.bind(null,t),in:!0,appear:$r(t,"appear",e),enter:$r(t,"enter",e),exit:$r(t,"exit",e)})})}function e8(e,r,t){var n=pc(e.children),a=X5(r,n);return Object.keys(a).forEach(function(l){var c=a[l];if(Ni(c)){var u=l in r,d=l in n,f=r[l],h=Ni(f)&&!f.props.in;d&&(!u||h)?a[l]=Co(c,{onExited:t.bind(null,c),in:!0,exit:$r(c,"exit",e),enter:$r(c,"enter",e)}):!d&&u&&!h?a[l]=Co(c,{in:!1}):d&&u&&Ni(f)&&(a[l]=Co(c,{onExited:t.bind(null,c),in:f.props.in,exit:$r(c,"exit",e),enter:$r(c,"enter",e)}))}}),a}var t8=Object.values||function(e){return Object.keys(e).map(function(r){return e[r]})},n8={component:"div",childFactory:function(e){return e}},fc=function(e){x0(r,e);function r(n,a){var l;l=e.call(this,n,a)||this;var c=l.handleExited.bind(Q5(l));return l.state={contextValue:{isMounting:!0},handleExited:c,firstRender:!0},l}var t=r.prototype;return t.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},t.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(n,a){var l=a.children,c=a.handleExited,u=a.firstRender;return{children:u?J5(n,c):e8(n,l,c),firstRender:!1}},t.handleExited=function(n,a){var l=pc(this.props.children);n.key in l||(n.props.onExited&&n.props.onExited(a),this.mounted&&this.setState(function(c){var u=j({},c.children);return delete u[n.key],{children:u}}))},t.render=function(){var n=this.props,a=n.component,l=n.childFactory,c=_e(n,["component","childFactory"]),u=this.state.contextValue,d=t8(this.state.children).map(l);return delete c.appear,delete c.enter,delete c.exit,a===null?L.createElement(Ii.Provider,{value:u},d):L.createElement(Ii.Provider,{value:u},L.createElement(a,c,d))},r}(L.Component);fc.propTypes={},fc.defaultProps=n8;function r8({styles:e,themeId:r,defaultTheme:t={}}){const n=d0(t),a=typeof e=="function"?e(r&&n[r]||n):e;return g.jsx(m5,{styles:a})}function ot(e,r,t="Mui"){const n={};return r.forEach(a=>{n[a]=rt(e,a,t)}),n}function o8(e){const{prototype:r={}}=e;return!!r.isReactComponent}function M0(e,r,t,n,a){const l=e[r],c=a||r;if(l==null||typeof window>"u")return null;let u;const d=l.type;return typeof d=="function"&&!o8(d)&&(u="Did you accidentally use a plain function component for an element instead?"),u!==void 0?new Error(`Invalid ${n} \`${c}\` supplied to \`${t}\`. Expected an element that can hold a ref. ${u} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const a8=ic(Eo.element,M0);a8.isRequired=ic(Eo.element.isRequired,M0);const $z="exact-prop: \u200B";function Vz(e){return e}function Kz(e,r,t,n,a){return null}function C0(...e){return e.reduce((r,t)=>t==null?r:function(...n){r.apply(this,n),t.apply(this,n)},()=>{})}function T0(e,r=166){let t;function n(...a){const l=()=>{e.apply(this,a)};clearTimeout(t),t=setTimeout(l,r)}return n.clear=()=>{clearTimeout(t)},n}function on(e){return e&&e.ownerDocument||document}function Vr(e){return on(e).defaultView||window}let S0=0;function i8(e){const[r,t]=S.useState(e),n=e||r;return S.useEffect(()=>{r==null&&(S0+=1,t(`mui-${S0}`))},[r]),n}const A0=S.useId;function E0(e){if(A0!==void 0){const r=A0();return e??r}return i8(e)}function D0({controlled:e,default:r,name:t,state:n="value"}){const{current:a}=S.useRef(e!==void 0),[l,c]=S.useState(r),u=a?e:l,d=S.useCallback(f=>{a||c(f)},[]);return[u,d]}function O0(e){const r=e.documentElement.clientWidth;return Math.abs(window.innerWidth-r)}function l8(e){const r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return e===null?"null":e.constructor.name;default:return r}}function s8(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}const c8=Number.isInteger||s8;function P0(e,r,t,n){const a=e[r];if(a==null||!c8(a)){const l=l8(a);return new RangeError(`Invalid ${n} \`${r}\` of type \`${l}\` supplied to \`${t}\`, expected \`integer\`.`)}return null}function u8(e,r,...t){return e[r]===void 0?null:P0(e,r,...t)}function hc(){return null}u8.isRequired=P0,hc.isRequired=hc;const Uz=hc,d8=S.createContext(),p8=()=>S.useContext(d8)??!1;function f8(e){const{className:r,classes:t,pulsate:n=!1,rippleX:a,rippleY:l,rippleSize:c,in:u,onExited:d,timeout:f}=e,[h,v]=S.useState(!1),b=ce(r,t.ripple,t.rippleVisible,n&&t.ripplePulsate),_={width:c,height:c,top:-(c/2)+l,left:-(c/2)+a},x=ce(t.child,h&&t.childLeaving,n&&t.childPulsate);return!u&&!h&&v(!0),S.useEffect(()=>{if(!u&&d!=null){const k=setTimeout(d,f);return()=>{clearTimeout(k)}}},[d,u,f]),g.jsx("span",{className:b,style:_,children:g.jsx("span",{className:x})})}const gn=ot("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),h8=["center","classes","className"];let Fi=e=>e,N0,j0,z0,R0;const mc=550,m8=80,v8=oc(N0||(N0=Fi`
1
+ "use strict";var Ly=Object.defineProperty,By=(e,r,t)=>r in e?Ly(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,ae=(e,r,t)=>By(e,typeof r!="symbol"?r+"":r,t);import{j as g}from"./jsx-runtime-jmtevAuS.mjs";import*as S from"react";import L,{Children as Wy,isValidElement as Ni,cloneElement as Co,forwardRef as Lr,createContext as a0,useEffect as Br,useContext as i0,useMemo as To,useState as rn,useRef as jn,useCallback as Wr,useLayoutEffect as l0,useImperativeHandle as Yy,createElement as Hy,Component as Mt,createRef as _r}from"react";import{Typography as Cn,Box as Ct,Tooltip as qy,IconButton as ji,Stack as Tt,Autocomplete as ec,TextField as rr,Radio as $y,Chip as Vy,RadioGroup as tc,Dialog as Ky,DialogTitle as Uy,DialogContent as Zy,DialogActions as Qy,useTheme as So,Paper as Xy,Accordion as Jy,AccordionSummary as e5,AccordionDetails as t5,Link as n5,Alert as r5,InputAdornment as s0,Button as o5,Menu as a5,MenuItem as i5,FormControl as c0,InputBase as l5,Popper as s5,AlertTitle as c5,Backdrop as u5,CircularProgress as d5}from"@mui/material";import{useForm as p5,FormProvider as f5,useController as Ao,useFormContext as u0,useFieldArray as h5}from"react-hook-form";import{P as Eo,_ as _e,a as j,f as d0,G as m5,n as rt,j as ce,o as fe,p as it,m as lt,r as zn,b as ke,q as xr,t as v5,h as g5,v as or,w as zi,x as p0,T as f0,y as h0,z as m0,A as v0,B as nc,k as rc,E as b5}from"./index-CDq4CkLc.mjs";import{Code as y5,Delete as w5,ChevronLeft as _5,Menu as x5,CheckCircle as k5,Close as g0,Add as M5,KeyboardArrowDown as C5}from"@mui/icons-material";import{useDrag as T5,useDrop as S5,DndProvider as A5}from"react-dnd";import{HTML5Backend as E5}from"react-dnd-html5-backend";import{masks as b0}from"../utils/masks/index.mjs";import D5 from"@mona-health/react-input-mask";import{u as O5}from"./usePrevious-DyvR1iCQ.mjs";import{p as P5}from"./phone.schema-XBbyizhq.mjs";import{IMaskInput as N5}from"react-imask";import*as y0 from"react-dom";import ya from"react-dom";import"qrcode";import"framer-motion";import{a as j5,u as z5}from"./useOnClickOutside-P5GTcgh8.mjs";import{keyframes as oc}from"@emotion/react";import ac,{isValidPhoneNumber as R5}from"libphonenumber-js";const Yz=Eo.oneOfType([Eo.func,Eo.object]);function ic(e,r){return()=>null}function I5(e){const{prototype:r={}}=e;return!!r.isReactComponent}function F5(e,r,t,n,a){const l=e[r],c=a||r;if(l==null||typeof window>"u")return null;let u;return typeof l=="function"&&!I5(l)&&(u="Did you accidentally provide a plain function component instead?"),u!==void 0?new Error(`Invalid ${n} \`${c}\` supplied to \`${t}\`. Expected an element type that can hold a ref. ${u} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Hz=ic(Eo.elementType,F5);function lc(e,r){typeof e=="function"?e(r):e&&(e.current=r)}function Ft(...e){return S.useMemo(()=>e.every(r=>r==null)?null:r=>{e.forEach(t=>{lc(t,r)})},e)}const Yr=typeof window<"u"?S.useLayoutEffect:S.useEffect;function Do(e){const r=S.useRef(e);return Yr(()=>{r.current=e}),S.useRef((...t)=>(0,r.current)(...t)).current}const w0={};function G5(e,r){const t=S.useRef(w0);return t.current===w0&&(t.current=e(r)),t}const L5=[];function B5(e){S.useEffect(e,L5)}class Bl{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Bl}start(r,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},r)}}function _0(){const e=G5(Bl.create).current;return B5(e.disposeEffect),e}let Ri=!0,sc=!1;const W5=new Bl,Y5={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function H5(e){const{type:r,tagName:t}=e;return!!(t==="INPUT"&&Y5[r]&&!e.readOnly||t==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function q5(e){e.metaKey||e.altKey||e.ctrlKey||(Ri=!0)}function cc(){Ri=!1}function $5(){this.visibilityState==="hidden"&&sc&&(Ri=!0)}function V5(e){e.addEventListener("keydown",q5,!0),e.addEventListener("mousedown",cc,!0),e.addEventListener("pointerdown",cc,!0),e.addEventListener("touchstart",cc,!0),e.addEventListener("visibilitychange",$5,!0)}function K5(e){const{target:r}=e;try{return r.matches(":focus-visible")}catch{}return Ri||H5(r)}function U5(){const e=S.useCallback(a=>{a!=null&&V5(a.ownerDocument)},[]),r=S.useRef(!1);function t(){return r.current?(sc=!0,W5.start(100,()=>{sc=!1}),r.current=!1,!0):!1}function n(a){return K5(a)?(r.current=!0,!0):!1}return{isFocusVisibleRef:r,onFocus:n,onBlur:t,ref:e}}function uc(e,r){return uc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},uc(e,r)}function x0(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,uc(e,r)}const k0={disabled:!1};var qz=null;const Ii=L.createContext(null);var Z5=function(e){return e.scrollTop},wa="unmounted",Hr="exited",qr="entering",Oo="entered",dc="exiting",Rn=function(e){x0(r,e);function r(n,a){var l;l=e.call(this,n,a)||this;var c=a,u=c&&!c.isMounting?n.enter:n.appear,d;return l.appearStatus=null,n.in?u?(d=Hr,l.appearStatus=qr):d=Oo:n.unmountOnExit||n.mountOnEnter?d=wa:d=Hr,l.state={status:d},l.nextCallback=null,l}r.getDerivedStateFromProps=function(n,a){var l=n.in;return l&&a.status===wa?{status:Hr}:null};var t=r.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(n){var a=null;if(n!==this.props){var l=this.state.status;this.props.in?l!==qr&&l!==Oo&&(a=qr):(l===qr||l===Oo)&&(a=dc)}this.updateStatus(!1,a)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var n=this.props.timeout,a,l,c;return a=l=c=n,n!=null&&typeof n!="number"&&(a=n.exit,l=n.enter,c=n.appear!==void 0?n.appear:l),{exit:a,enter:l,appear:c}},t.updateStatus=function(n,a){if(n===void 0&&(n=!1),a!==null)if(this.cancelNextCallback(),a===qr){if(this.props.unmountOnExit||this.props.mountOnEnter){var l=this.props.nodeRef?this.props.nodeRef.current:ya.findDOMNode(this);l&&Z5(l)}this.performEnter(n)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Hr&&this.setState({status:wa})},t.performEnter=function(n){var a=this,l=this.props.enter,c=this.context?this.context.isMounting:n,u=this.props.nodeRef?[c]:[ya.findDOMNode(this),c],d=u[0],f=u[1],h=this.getTimeouts(),v=c?h.appear:h.enter;if(!n&&!l||k0.disabled){this.safeSetState({status:Oo},function(){a.props.onEntered(d)});return}this.props.onEnter(d,f),this.safeSetState({status:qr},function(){a.props.onEntering(d,f),a.onTransitionEnd(v,function(){a.safeSetState({status:Oo},function(){a.props.onEntered(d,f)})})})},t.performExit=function(){var n=this,a=this.props.exit,l=this.getTimeouts(),c=this.props.nodeRef?void 0:ya.findDOMNode(this);if(!a||k0.disabled){this.safeSetState({status:Hr},function(){n.props.onExited(c)});return}this.props.onExit(c),this.safeSetState({status:dc},function(){n.props.onExiting(c),n.onTransitionEnd(l.exit,function(){n.safeSetState({status:Hr},function(){n.props.onExited(c)})})})},t.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(n,a){a=this.setNextCallback(a),this.setState(n,a)},t.setNextCallback=function(n){var a=this,l=!0;return this.nextCallback=function(c){l&&(l=!1,a.nextCallback=null,n(c))},this.nextCallback.cancel=function(){l=!1},this.nextCallback},t.onTransitionEnd=function(n,a){this.setNextCallback(a);var l=this.props.nodeRef?this.props.nodeRef.current:ya.findDOMNode(this),c=n==null&&!this.props.addEndListener;if(!l||c){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[l,this.nextCallback],d=u[0],f=u[1];this.props.addEndListener(d,f)}n!=null&&setTimeout(this.nextCallback,n)},t.render=function(){var n=this.state.status;if(n===wa)return null;var a=this.props,l=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var c=_e(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return L.createElement(Ii.Provider,{value:null},typeof l=="function"?l(n,c):L.cloneElement(L.Children.only(l),c))},r}(L.Component);Rn.contextType=Ii,Rn.propTypes={};function Po(){}Rn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Po,onEntering:Po,onEntered:Po,onExit:Po,onExiting:Po,onExited:Po},Rn.UNMOUNTED=wa,Rn.EXITED=Hr,Rn.ENTERING=qr,Rn.ENTERED=Oo,Rn.EXITING=dc;function Q5(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pc(e,r){var t=function(a){return r&&Ni(a)?r(a):a},n=Object.create(null);return e&&Wy.map(e,function(a){return a}).forEach(function(a){n[a.key]=t(a)}),n}function X5(e,r){e=e||{},r=r||{};function t(h){return h in r?r[h]:e[h]}var n=Object.create(null),a=[];for(var l in e)l in r?a.length&&(n[l]=a,a=[]):a.push(l);var c,u={};for(var d in r){if(n[d])for(c=0;c<n[d].length;c++){var f=n[d][c];u[n[d][c]]=t(f)}u[d]=t(d)}for(c=0;c<a.length;c++)u[a[c]]=t(a[c]);return u}function $r(e,r,t){return t[r]!=null?t[r]:e.props[r]}function J5(e,r){return pc(e.children,function(t){return Co(t,{onExited:r.bind(null,t),in:!0,appear:$r(t,"appear",e),enter:$r(t,"enter",e),exit:$r(t,"exit",e)})})}function e8(e,r,t){var n=pc(e.children),a=X5(r,n);return Object.keys(a).forEach(function(l){var c=a[l];if(Ni(c)){var u=l in r,d=l in n,f=r[l],h=Ni(f)&&!f.props.in;d&&(!u||h)?a[l]=Co(c,{onExited:t.bind(null,c),in:!0,exit:$r(c,"exit",e),enter:$r(c,"enter",e)}):!d&&u&&!h?a[l]=Co(c,{in:!1}):d&&u&&Ni(f)&&(a[l]=Co(c,{onExited:t.bind(null,c),in:f.props.in,exit:$r(c,"exit",e),enter:$r(c,"enter",e)}))}}),a}var t8=Object.values||function(e){return Object.keys(e).map(function(r){return e[r]})},n8={component:"div",childFactory:function(e){return e}},fc=function(e){x0(r,e);function r(n,a){var l;l=e.call(this,n,a)||this;var c=l.handleExited.bind(Q5(l));return l.state={contextValue:{isMounting:!0},handleExited:c,firstRender:!0},l}var t=r.prototype;return t.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},t.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(n,a){var l=a.children,c=a.handleExited,u=a.firstRender;return{children:u?J5(n,c):e8(n,l,c),firstRender:!1}},t.handleExited=function(n,a){var l=pc(this.props.children);n.key in l||(n.props.onExited&&n.props.onExited(a),this.mounted&&this.setState(function(c){var u=j({},c.children);return delete u[n.key],{children:u}}))},t.render=function(){var n=this.props,a=n.component,l=n.childFactory,c=_e(n,["component","childFactory"]),u=this.state.contextValue,d=t8(this.state.children).map(l);return delete c.appear,delete c.enter,delete c.exit,a===null?L.createElement(Ii.Provider,{value:u},d):L.createElement(Ii.Provider,{value:u},L.createElement(a,c,d))},r}(L.Component);fc.propTypes={},fc.defaultProps=n8;function r8({styles:e,themeId:r,defaultTheme:t={}}){const n=d0(t),a=typeof e=="function"?e(r&&n[r]||n):e;return g.jsx(m5,{styles:a})}function ot(e,r,t="Mui"){const n={};return r.forEach(a=>{n[a]=rt(e,a,t)}),n}function o8(e){const{prototype:r={}}=e;return!!r.isReactComponent}function M0(e,r,t,n,a){const l=e[r],c=a||r;if(l==null||typeof window>"u")return null;let u;const d=l.type;return typeof d=="function"&&!o8(d)&&(u="Did you accidentally use a plain function component for an element instead?"),u!==void 0?new Error(`Invalid ${n} \`${c}\` supplied to \`${t}\`. Expected an element that can hold a ref. ${u} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const a8=ic(Eo.element,M0);a8.isRequired=ic(Eo.element.isRequired,M0);const $z="exact-prop: \u200B";function Vz(e){return e}function Kz(e,r,t,n,a){return null}function C0(...e){return e.reduce((r,t)=>t==null?r:function(...n){r.apply(this,n),t.apply(this,n)},()=>{})}function T0(e,r=166){let t;function n(...a){const l=()=>{e.apply(this,a)};clearTimeout(t),t=setTimeout(l,r)}return n.clear=()=>{clearTimeout(t)},n}function on(e){return e&&e.ownerDocument||document}function Vr(e){return on(e).defaultView||window}let S0=0;function i8(e){const[r,t]=S.useState(e),n=e||r;return S.useEffect(()=>{r==null&&(S0+=1,t(`mui-${S0}`))},[r]),n}const A0=S.useId;function E0(e){if(A0!==void 0){const r=A0();return e??r}return i8(e)}function D0({controlled:e,default:r,name:t,state:n="value"}){const{current:a}=S.useRef(e!==void 0),[l,c]=S.useState(r),u=a?e:l,d=S.useCallback(f=>{a||c(f)},[]);return[u,d]}function O0(e){const r=e.documentElement.clientWidth;return Math.abs(window.innerWidth-r)}function l8(e){const r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return e===null?"null":e.constructor.name;default:return r}}function s8(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}const c8=Number.isInteger||s8;function P0(e,r,t,n){const a=e[r];if(a==null||!c8(a)){const l=l8(a);return new RangeError(`Invalid ${n} \`${r}\` of type \`${l}\` supplied to \`${t}\`, expected \`integer\`.`)}return null}function u8(e,r,...t){return e[r]===void 0?null:P0(e,r,...t)}function hc(){return null}u8.isRequired=P0,hc.isRequired=hc;const Uz=hc,d8=S.createContext(),p8=()=>S.useContext(d8)??!1;function f8(e){const{className:r,classes:t,pulsate:n=!1,rippleX:a,rippleY:l,rippleSize:c,in:u,onExited:d,timeout:f}=e,[h,v]=S.useState(!1),b=ce(r,t.ripple,t.rippleVisible,n&&t.ripplePulsate),_={width:c,height:c,top:-(c/2)+l,left:-(c/2)+a},x=ce(t.child,h&&t.childLeaving,n&&t.childPulsate);return!u&&!h&&v(!0),S.useEffect(()=>{if(!u&&d!=null){const k=setTimeout(d,f);return()=>{clearTimeout(k)}}},[d,u,f]),g.jsx("span",{className:b,style:_,children:g.jsx("span",{className:x})})}const gn=ot("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),h8=["center","classes","className"];let Fi=e=>e,N0,j0,z0,R0;const mc=550,m8=80,v8=oc(N0||(N0=Fi`
2
2
  0% {
3
3
  transform: scale(0);
4
4
  opacity: 0.1;
@@ -0,0 +1 @@
1
+ "use strict";import{useState as u,useEffect as t}from"react";function a(e){const[s,n]=u(e),[o,r]=u(null);return t(()=>{e!==s&&(r(s),n(e))},[s,e]),o}export{a as u};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verifiedinc-public/shared-ui-elements",
3
- "version": "3.5.2",
3
+ "version": "3.6.0",
4
4
  "description": "A set of UI components, utilities that is shareable with the core apps.",
5
5
  "private": false,
6
6
  "keywords": [],
@@ -1 +0,0 @@
1
- "use strict";import o from"react";function n(e){const[t,r]=o.useState(e),[u,s]=o.useState();return e!==t&&(s(t),r(e)),u}export{n as u};