PageSourceSearch

https://opsduty.io/static/assets/useMutation-CJhfswzH.js

js opsduty.io collected 2026-09-24 11:06:08 UTC 2,149 bytes, 2 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`28fa3a63a6aec329aec5913f7fad466deaa6be9e`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`eb65ad37-187a-491b-9aca-c0e92a09f5e3`,e._sentryDebugIdIdentifier=`sentry-dbid-eb65ad37-187a-491b-9aca-c0e92a09f5e3`)}catch{}})();import{E as e,b as t}from"./emotion-react.browser.esm-BWLck2aV.js";import{ct as n,dt as r,ft as i,ut as a}from"./gql-rFSqWIQz.js";function o(e){return e.catch(()=>{}),e}var s=e(t(),1),c=a?s.useLayoutEffect:s.useEffect,l=function(e,t){let a=i(t?.client),[l,d]=s.useState(()=>u(a)),f=s.useRef({result:l,mutationId:0,isMounted:!0,client:a,mutation:e,options:t});c(()=>{Object.assign(f.current,{client:a,options:t,mutation:e})});let p=s.useCallback((e={})=>{let{options:t,mutation:i}=f.current,a={...t,mutation:i},s=e.client||f.current.client,c=typeof e.context==`function`?e.context(t?.context):e.context;!f.current.result.loading&&f.current.isMounted&&d(f.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:s});let l=++f.current.mutationId,u=n(a,{...e,context:c});return o(s.mutate(u).then(t=>{let{data:n,error:i}=t,a=e.onError||f.current.options?.onError;if(i&&a&&a(i,u),l===f.current.mutationId){let e={called:!0,loading:!1,data:n,error:i,client:s};f.current.isMounted&&!r(f.current.result,e)&&d(f.current.result=e)}let o=e.onCompleted||f.current.options?.onCompleted;return i||o?.(t.data,u),t},t=>{if(l===f.current.mutationId&&f.current.isMounted){let e={loading:!1,error:t,data:void 0,called:!0,client:s};r(f.current.result,e)||d(f.current.result=e)}let n=e.onError||f.current.options?.onError;throw n&&n(t,u),t}))},[]),m=s.useCallback(()=>{if(f.current.isMounted){let e=u(f.current.client);Object.assign(f.current,{mutationId:0,result:e}),d(e)}},[]);return s.useEffect(()=>{let e=f.current;return e.isMounted=!0,()=>{e.isMounted=!1}},[]),[p,{reset:m,...l}]};function u(e){return{data:void 0,error:void 0,called:!1,loading:!1,client:e}}export{c as n,o as r,l as t};
2//# sourceMappingURL=useMutation-CJhfswzH.js.map

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.