1import{Z as H,_ as e,$ as i,a0 as U,a1 as s,a2 as N,a3 as Z,a4 as V,a5 as w,a6 as $,a7 as B,a8 as S}from"./index-BNR4QABE.js";var J=H?e.useLayoutEffect:e.useEffect,C;function K(){}function X(){return C||(C=e.createContext(null)),e.useCallback(function(){var f=console.error;try{return console.error=K,e.useContext(C),!0}catch{return!1}finally{console.error=f}},[])}var Y=["refetch","reobserve","fetchMore","updateQuery","startPolling","stopPolling","subscribeToMore"],ee=["initialFetchPolicy","onCompleted","onError","defaultOptions","partialRefetch","canonizeResults"],re=["query","ssr","client","fetchPolicy","nextFetchPolicy","refetchWritePolicy","errorPolicy","pollInterval","notifyOnNetworkStatusChange","returnPartialData","skipPollAttempt"];function ue(f,t){var c;if(globalThis.__DEV__!==!1){var u=t||{};i(u,"canonizeResults","useLazyQuery"),i(u,"variables","useLazyQuery","Pass all `variables` to the returned `execute` function instead."),i(u,"context","useLazyQuery","Pass `context` to the returned `execute` function instead."),i(u,"onCompleted","useLazyQuery","If your `onCompleted` callback sets local state, switch to use derived state using `data` returned from the hook instead. Use `useEffect` to perform side-effects as a result of updates to `data`."),i(u,"onError","useLazyQuery","If your `onError` callback sets local state, switch to use derived state using `data`, `error` or `errors` returned from the hook instead. Use `useEffect` if you need to perform side-effects as a result of updates to `data`, `error` or `errors`."),i(u,"defaultOptions","useLazyQuery","Pass the options directly to the hook instead."),i(u,"initialFetchPolicy","useLazyQuery","Use the `fetchPolicy` option instead."),i(u,"partialRefetch","useLazyQuery")}var a=e.useRef(void 0),R=e.useRef(void 0),m=e.useRef(void 0),l=U(t,a.current||{}),y=(c=l==null?void 0:l.query)!==null&&c!==void 0?c:f;R.current=t,m.current=y;var p=s(s({},l),{skip:!a.current}),n=N(y,p),P=n.obsQueryFields,D=n.result,x=n.client,_=n.resultData,k=n.observable,F=n.onQueryExecuted,z=k.options.initialFetchPolicy||Z(p.defaultOptions,x.defaultOptions),M=e.useReducer(function(r){return r+1},0)[1],b=e.useMemo(function(){for(var r={},o=function(h){var Q=P[h];r[h]=function(){return globalThis.__DEV__!==!1&&h==="reobserve"&&globalThis.__DEV__!==!1&&V.warn(79),a.current||(a.current=Object.create(null),M()),Q.apply(this,arguments)}},d=0,v=Y;d<v.length;d++){var g=v[d];o(g)}return r},[M,P]),q=!!a.current,W=e.useMemo(function(){return s(s(s({},D),b),{called:q})},[D,b,q]),O=X(),E=e.useRef(new Set),T=e.useCallback(function(r){if(globalThis.__DEV__!==!1){O()&&globalThis.__DEV__!==!1&&V.warn(80);for(var o=0,d=ee;o<d.length;o++){var v=d[o];E.current.has(v)||(w(r||{},v,"useLazyQuery.execute"),E.current.add(v))}for(var g=0,h=re;g<h.length;g++){var Q=h[g];E.current.has(Q)||(w(r||{},Q,"useLazyQuery.execute","Please pass the option to the `useLazyQuery` hook instead."),E.current.add(Q))}}a.current=r?s(s({},r),{fetchPolicy:r.fetchPolicy||z}):{fetchPolicy:z};var A=U(R.current,s({query:m.current},a.current)),I=te(_,k,x,y,s(s({},A),{skip:!1}),F).then(function(G){return Object.assign(G,b)});return I.catch(function(){}),I},[O,x,y,b,z,k,_,F]),L=e.useRef(T);J(function(){L.current=T});var j=e.useCallback(function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return L.current.apply(L,r)},[]);return[j,W]}function te(f,t,c,u,a,R){var m=a.query||u,l=$(c,m,a,!1)(t),y=t.reobserveAsConcast(B(t,c,a,l));return R(l),new Promise(function(p){var n;y.subscribe({next:function(P){n=P},error:function(){p(S(t.getCurrentResult(),f.previousData,t,c))},complete:function(){p(S(t.maskResult(n),f.previousData,t,c))}})})}export{ue as u};
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.