Build 586984stable
Module 823092
735 characters · in 0d5f366b62495a64.jsDependencies
Source Raw
function(e,t,i){i.d(t,{L_:()=>d,ms:()=>u});var n=i(477900),l=i(582128),s=i(625494),r=i(115063);i(46121);var a=i(652215);let o=l.createContext(void 0);function u(e){let{children:t}=e,i=l.useRef(1.4),[u,d]=l.useState(!1),c=l.useCallback(e=>{d(e?.some(e=>e.showNotice()&&!e.canCloseEarly?.())??!1),i.current=1.4},[]),g=l.useCallback(e=>{if(u){(0,r.fO)({duration:300,intensity:i.current}),i.current=Math.min(i.current+2,15),s._.dispatch(a.jej.EMPHASIZE_NOTICE);return}e()},[u]),m=l.useMemo(()=>({navigateWithValidation:g,showNotice:u,handleStoreUpdate:c}),[g,u,c]);return(0,n.jsx)(o.Provider,{value:m,children:t})}function d(){let e=l.useContext(o);if(null==e)throw Error("useNoticeContext must be used within a NoticeProvider");return e}}