PageSourceSearch

https://shukatsu-box.com/assets/ToastContext-C-kIOcG0.js

js shukatsu-box.com collected 2026-10-05 22:52:21 UTC 1,802 bytes, 4 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3654d859-0565-558f-a803-876cc3608d49")}catch(e){}}();
3import{B as e,G as t}from"./utils-DtUSunbF.js";import{t as n}from"./react-dom-DBKL0VQ6.js";import{t as r}from"./jsx-runtime-ow3ebyRf.js";import{t as i}from"./dist-BCGmVljJ.js";import{t as a}from"./cn-gWmEISZ6.js";var o=t(e(),1),s=t(n(),1),c=r(),l=i({base:`toast rounded-sm p-sm text-center`,variants:{type:{warning:`border border-primary-purple bg-purple-90 text-primary-purple`,success:`border border-green-30 bg-green-90 text-green-30`,info:`border border-light-blue bg-blue-90 text-light-blue`,error:`border border-primary-red bg-red-90 text-primary-red`}},defaultVariants:{type:`info`}}),u=({text:e,type:t,className:n})=>(0,c.jsx)(`div`,{className:a(l({type:t}),n),children:(0,c.jsx)(`p`,{className:`text-xs`,children:e})}),d=(0,o.createContext)(void 0),f=({children:e})=>{let[t,n]=(0,o.useState)(null),r=(0,o.useMemo)(()=>({setError:e=>{n({message:e,type:`error`}),setTimeout(()=>n(null),2e3)},setToast:({message:e,type:t})=>{n({message:e,type:t}),setTimeout(()=>n(null),2e3)}}),[]);return(0,c.jsxs)(d.Provider,{value:r,children:[e,t&&(0,s.createPortal)((0,c.jsx)(`div`,{className:`-translate-x-1/2 fixed top-md left-1/2 z-100 inline-block w-full max-w-pc-min px-md`,children:(0,c.jsx)(u,{text:t.message,type:t.type})}),document.body)]})},p=()=>{let e=(0,o.useContext)(d);if(e===void 0)throw Error(`useToast must be used within a ToastProvider`);return e},m=()=>{let{setError:e}=p();return{setError:e}};export{u as i,m as n,p as r,f as t};
4//# debugId=3654d859-0565-558f-a803-876cc3608d49

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.