@intellisoftkenya/esm-billing-app 1.5.5-pre.1 → 6.0.4-pre.421

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.
@@ -1,4 +1,4 @@
1
- WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244.141 KiB). This can impact web performance.
1
+ WARNING in ⚠ asset size limit: The following asset(s) exceed the recommended size limit (244.141 KiB). This can impact web performance.
2
2
  │ Assets:
3
3
  │ 390.js (1.313 MiB)
4
4
  │ main.js (3.595 MiB)
@@ -6,32 +6,12 @@ WARNING in ⚠ asset size limit: The following asset(s) exceed the recommended s
6
6
  │ 969.js (1.730 MiB)
7
7
  │ 84.js (632.821 KiB)
8
8
  │ 234.js (1.642 MiB)
9
+ 
9
10
 
10
- WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244.141 KiB). This can impact web performance.
11
+ WARNING in ⚠ entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244.141 KiB). This can impact web performance.
11
12
  │ Entrypoints:
12
13
  │ main (3.595 MiB)
13
14
  │ main.js
15
+ 
14
16
 
15
- WARNING in ./src/billing-form/billing-form.component.tsx 203:23-45
16
- ⚠ ESModulesLinkingWarning: export 'getPatientUuidFromStore' (imported as 'getPatientUuidFromStore') was not found in '@openmrs/esm-patient-common-lib' (possible exports: CardHeader, EmptyDataIllustration, EmptyState, ErrorState, PatientChartPagination, ReferenceRangeDisplay, assessValue, careSettingUuid, compare, convertTime12to24, createDashboardLink, createOfflineVisitForPatient, drugCustomRepresentation, exist, formatReferenceRange, getDrugOrderByUuid, getOfflineVisitForPatient, getPatientSummaryOrder, invalidateCurrentVisit, invalidatePatientEncounters, invalidateVisitAndEncounterData, invalidateVisitByUuid, invalidateVisitHistory, launchPatientChartWithWorkspaceOpen, launchStartVisitPrompt, orderCustomRepresentation, postEncounter, postOrder, postOrders, postOrdersOnNewEncounter, priorityOptions, showOrderSuccessToast, time12HourFormatRegex, useActivePatientEnrollment, useAllowedFileExtensions, useAutoCreatedOfflineVisit, useDrugOrderByUuid, useLaunchWorkspaceRequiringVisit, useMutatePatientOrders, useOfflineVisit, useOptimisticVisitMutations, useOrderBasket, useOrderType, useOrderTypes, useOrderableConceptSets, usePaginationInfo, usePatientChartStore, usePatientOrders, useReferenceRanges, useStartVisitIfNeeded, useSystemVisitSetting, visitSyncType)
17
- ╭─[203:22]
18
- 201 │ var closeWorkspace = param.closeWorkspace;
19
- 202 │ var t = useTranslation().t;
20
- 203 │ var patientUuid = getPatientUuidFromStore();
21
- · ───────────────────────
22
- 204 │ var _useBillableServices = useBillableServices(), billableServices = _useBillableServices.billableServices, error = _useBillableServices.error, isLoading = _useBillableServices.isLoading;
23
- 205 │ var _useState = _sliced_to_array(useState(''), 2), searchVal = _useState[0], setsearchVal = _useState[1];
24
- ╰────
25
-
26
- WARNING in ./src/modal/require-payment-modal.component.tsx 61:23-45
27
- ⚠ ESModulesLinkingWarning: export 'getPatientUuidFromStore' (imported as 'getPatientUuidFromStore') was not found in '@openmrs/esm-patient-common-lib' (possible exports: CardHeader, EmptyDataIllustration, EmptyState, ErrorState, PatientChartPagination, ReferenceRangeDisplay, assessValue, careSettingUuid, compare, convertTime12to24, createDashboardLink, createOfflineVisitForPatient, drugCustomRepresentation, exist, formatReferenceRange, getDrugOrderByUuid, getOfflineVisitForPatient, getPatientSummaryOrder, invalidateCurrentVisit, invalidatePatientEncounters, invalidateVisitAndEncounterData, invalidateVisitByUuid, invalidateVisitHistory, launchPatientChartWithWorkspaceOpen, launchStartVisitPrompt, orderCustomRepresentation, postEncounter, postOrder, postOrders, postOrdersOnNewEncounter, priorityOptions, showOrderSuccessToast, time12HourFormatRegex, useActivePatientEnrollment, useAllowedFileExtensions, useAutoCreatedOfflineVisit, useDrugOrderByUuid, useLaunchWorkspaceRequiringVisit, useMutatePatientOrders, useOfflineVisit, useOptimisticVisitMutations, useOrderBasket, useOrderType, useOrderTypes, useOrderableConceptSets, usePaginationInfo, usePatientChartStore, usePatientOrders, useReferenceRanges, useStartVisitIfNeeded, useSystemVisitSetting, visitSyncType)
28
- ╭─[61:22]
29
- 59 │ var t = useTranslation().t;
30
- 60 │ var defaultCurrency = useConfig().defaultCurrency;
31
- 61 │ var patientUuid = getPatientUuidFromStore();
32
- · ───────────────────────
33
- 62 │ var startDate = useMemo(function() {
34
- 63 │ return dayjs().subtract(1, 'year').toDate();
35
- ╰────
36
-
37
- Rspack compiled with 4 warnings in 14.11 s
17
+ Rspack compiled with 2 warnings in 11.69 s
package/dist/117.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"117.js","sources":["webpack://@intellisoftkenya/esm-billing-app/json|/Volumes/Telefyna2/Developer/intellisoft/eHospital3.x-Apps/packages/esm-billing-app/translations/en.json"],"names":["JSON"],"mappings":"6JAAA,EAAO,OAAO,CAAGA,KAAK,KAAK,CAAC,iuJ"}
1
+ {"version":3,"file":"117.js","sources":["webpack://@intellisoftkenya/esm-billing-app/json|/home/runner/work/eHospital3.x-Apps/eHospital3.x-Apps/packages/esm-billing-app/translations/en.json"],"names":["JSON"],"mappings":"6JAAA,EAAO,OAAO,CAAGA,KAAK,KAAK,CAAC,iuJ"}
package/dist/152.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_intellisoftkenya_esm_billing_app=globalThis.webpackChunk_intellisoftkenya_esm_billing_app||[]).push([["152"],{52470(e,t,r){r.r(t),r.d(t,{default:()=>m,infinite:()=>h,unstable_serialize:()=>d});var l=r(91435),a=r(85216),i=r(76103),n=r(42372),u=r(58139);let s=()=>{},o=s(),f=Object,c=e=>e===o,p=new WeakMap,g=(e,t)=>e===`[object ${t}]`,y=0,_=e=>{let t,r,l=typeof e,a=f.prototype.toString.call(e),i=g(a,"Date"),n=g(a,"RegExp"),u=g(a,"Object");if(f(e)!==e||i||n)t=i?e.toJSON():"symbol"==l?e.toString():"string"==l?JSON.stringify(e):""+e;else{if(t=p.get(e))return t;if(t=++y+"~",p.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=_(e[r])+",";p.set(e,t)}if(u){t="#";let l=f.keys(e).sort();for(;!c(r=l.pop());)c(e[r])||(t+=r+":"+_(e[r])+",");p.set(e,t)}}return t},b=e=>(e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?_(e):"",t]})(e?e(0,null):null)[0],d=e=>"$inf$"+b(e),k=Promise.resolve(),h=e=>(t,r,a)=>{let n,s=(0,l.useRef)(!1),{cache:o,initialSize:f=1,revalidateAll:c=!1,persistSize:p=!1,revalidateFirstPage:g=!0,revalidateOnMount:y=!1,parallel:_=!1}=a,[,,,d]=i.b.get(i.c);try{(n=b(t))&&(n="$inf$"+n)}catch(e){}let[h,m,w]=(0,i.z)(o,n),z=(0,l.useCallback)(()=>(0,i.e)(h()._l)?f:h()._l,[o,n,f]);(0,u.useSyncExternalStore)((0,l.useCallback)(e=>n?w(n,()=>{e()}):()=>{},[o,n]),z,z);let v=(0,l.useCallback)(()=>{let e=h()._l;return(0,i.e)(e)?f:e},[n,f]),C=(0,l.useRef)(v());(0,i.u)(()=>{if(!s.current){s.current=!0;return}n&&m({_l:p?C.current:v()})},[n,o]);let S=y&&!s.current,A=e(n,async e=>{let l=h()._i,n=h()._r;m({_r:i.U});let u=[],s=v(),[f]=(0,i.z)(o,e),p=f().data,y=[],b=null;for(let e=0;e<s;++e){let[s,f]=(0,i.s)(t(e,_?null:b));if(!s)break;let[k,h]=(0,i.z)(o,s),m=k().data,w=c||l||(0,i.e)(m)||g&&!e&&!(0,i.e)(p)||S||p&&!(0,i.e)(p[e])&&!a.compare(p[e],m);if(r&&("function"==typeof n?n(m,f):w)){let t=async()=>{if(s in d){let e=d[s];delete d[s],m=await e}else m=await r(f);h({data:m,_k:f}),u[e]=m};_?y.push(t):await t()}else u[e]=m;_||(b=m)}return _&&await Promise.all(y.map(e=>e())),m({_i:i.U}),u},a),$=(0,l.useCallback)(function(e,t){let r="boolean"==typeof t?{revalidate:t}:t||{},l=!1!==r.revalidate;return n?(l&&((0,i.e)(e)?m({_i:!0,_r:r.revalidate}):m({_i:!1,_r:r.revalidate})),arguments.length?A.mutate(e,{...r,revalidate:l}):A.mutate()):k},[n,o]),O=(0,l.useCallback)(e=>{let r;if(!n)return k;let[,l]=(0,i.z)(o,n);if((0,i.a)(e)?r=e(v()):"number"==typeof e&&(r=e),"number"!=typeof r)return k;l({_l:r}),C.current=r;let a=[],[u]=(0,i.z)(o,n),s=null;for(let e=0;e<r;++e){let[r]=(0,i.s)(t(e,s)),[l]=(0,i.z)(o,r),n=r?l().data:i.U;if((0,i.e)(n))return $(u().data);a.push(n),s=n}return $(a)},[n,o,$,v]);return{size:v(),setSize:O,mutate:$,get data(){return A.data},get error(){return A.error},get isValidating(){return A.isValidating},get isLoading(){return A.isLoading}}},m=(0,n.withMiddleware)(a.Ay,h)}}]);
1
+ "use strict";(globalThis.webpackChunk_intellisoftkenya_esm_billing_app=globalThis.webpackChunk_intellisoftkenya_esm_billing_app||[]).push([["152"],{52470(e,t,r){r.r(t),r.d(t,{default:()=>m,infinite:()=>h,unstable_serialize:()=>d});var l=r(40666),a=r(85216),i=r(76103),n=r(42372),u=r(58139);let s=()=>{},o=s(),f=Object,c=e=>e===o,p=new WeakMap,g=(e,t)=>e===`[object ${t}]`,y=0,_=e=>{let t,r,l=typeof e,a=f.prototype.toString.call(e),i=g(a,"Date"),n=g(a,"RegExp"),u=g(a,"Object");if(f(e)!==e||i||n)t=i?e.toJSON():"symbol"==l?e.toString():"string"==l?JSON.stringify(e):""+e;else{if(t=p.get(e))return t;if(t=++y+"~",p.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=_(e[r])+",";p.set(e,t)}if(u){t="#";let l=f.keys(e).sort();for(;!c(r=l.pop());)c(e[r])||(t+=r+":"+_(e[r])+",");p.set(e,t)}}return t},b=e=>(e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?_(e):"",t]})(e?e(0,null):null)[0],d=e=>"$inf$"+b(e),k=Promise.resolve(),h=e=>(t,r,a)=>{let n,s=(0,l.useRef)(!1),{cache:o,initialSize:f=1,revalidateAll:c=!1,persistSize:p=!1,revalidateFirstPage:g=!0,revalidateOnMount:y=!1,parallel:_=!1}=a,[,,,d]=i.b.get(i.c);try{(n=b(t))&&(n="$inf$"+n)}catch(e){}let[h,m,w]=(0,i.z)(o,n),z=(0,l.useCallback)(()=>(0,i.e)(h()._l)?f:h()._l,[o,n,f]);(0,u.useSyncExternalStore)((0,l.useCallback)(e=>n?w(n,()=>{e()}):()=>{},[o,n]),z,z);let v=(0,l.useCallback)(()=>{let e=h()._l;return(0,i.e)(e)?f:e},[n,f]),C=(0,l.useRef)(v());(0,i.u)(()=>{if(!s.current){s.current=!0;return}n&&m({_l:p?C.current:v()})},[n,o]);let S=y&&!s.current,A=e(n,async e=>{let l=h()._i,n=h()._r;m({_r:i.U});let u=[],s=v(),[f]=(0,i.z)(o,e),p=f().data,y=[],b=null;for(let e=0;e<s;++e){let[s,f]=(0,i.s)(t(e,_?null:b));if(!s)break;let[k,h]=(0,i.z)(o,s),m=k().data,w=c||l||(0,i.e)(m)||g&&!e&&!(0,i.e)(p)||S||p&&!(0,i.e)(p[e])&&!a.compare(p[e],m);if(r&&("function"==typeof n?n(m,f):w)){let t=async()=>{if(s in d){let e=d[s];delete d[s],m=await e}else m=await r(f);h({data:m,_k:f}),u[e]=m};_?y.push(t):await t()}else u[e]=m;_||(b=m)}return _&&await Promise.all(y.map(e=>e())),m({_i:i.U}),u},a),$=(0,l.useCallback)(function(e,t){let r="boolean"==typeof t?{revalidate:t}:t||{},l=!1!==r.revalidate;return n?(l&&((0,i.e)(e)?m({_i:!0,_r:r.revalidate}):m({_i:!1,_r:r.revalidate})),arguments.length?A.mutate(e,{...r,revalidate:l}):A.mutate()):k},[n,o]),O=(0,l.useCallback)(e=>{let r;if(!n)return k;let[,l]=(0,i.z)(o,n);if((0,i.a)(e)?r=e(v()):"number"==typeof e&&(r=e),"number"!=typeof r)return k;l({_l:r}),C.current=r;let a=[],[u]=(0,i.z)(o,n),s=null;for(let e=0;e<r;++e){let[r]=(0,i.s)(t(e,s)),[l]=(0,i.z)(o,r),n=r?l().data:i.U;if((0,i.e)(n))return $(u().data);a.push(n),s=n}return $(a)},[n,o,$,v]);return{size:v(),setSize:O,mutate:$,get data(){return A.data},get error(){return A.error},get isValidating(){return A.isValidating},get isLoading(){return A.isLoading}}},m=(0,n.withMiddleware)(a.Ay,h)}}]);
package/dist/209.js CHANGED
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunk_intellisoftkenya_esm_billing_app=globalThis.webpackChunk_intellisoftkenya_esm_billing_app||[]).push([["209"],{93296(e,r,t){var n=t(91435),u="function"==typeof Object.is?Object.is:function(e,r){return e===r&&(0!==e||1/e==1/r)||e!=e&&r!=r},a=n.useState,i=n.useEffect,s=n.useLayoutEffect,l=n.useDebugValue;function c(e){var r=e.getSnapshot;e=e.value;try{var t=r();return!u(e,t)}catch(e){return!0}}var o="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,r){return r()}:function(e,r){var t=r(),n=a({inst:{value:t,getSnapshot:r}}),u=n[0].inst,o=n[1];return s(function(){u.value=t,u.getSnapshot=r,c(u)&&o({inst:u})},[e,t,r]),i(function(){return c(u)&&o({inst:u}),e(function(){c(u)&&o({inst:u})})},[e]),l(t),t};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:o},58139(e,r,t){e.exports=t(93296)},85216(e,r,t){t.d(r,{Ay:()=>h,BE:()=>v});var n=t(91435),u=t.n(n),a=t(58139),i=t(76103),s=t(52923),l=t(42372);let c=()=>{},o=c(),d=(new WeakMap,u().use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(r=>{e.status="fulfilled",e.value=r},r=>{e.status="rejected",e.reason=r}),e}})),f={dedupe:!0},g=Promise.resolve(i.U),E=()=>i.A,v=i.O.defineProperty(i.g,"defaultValue",{value:i.d}),h=(0,l.withArgs)((e,r,t)=>{let{cache:u,compare:c,suspense:o,fallbackData:v,revalidateOnMount:h,revalidateIfStale:b,refreshInterval:p,refreshWhenHidden:w,refreshWhenOffline:R,keepPreviousData:S,strictServerPrefetchWarning:V}=t,[T,y,k,_]=i.b.get(u),[m,O]=(0,i.s)(e),L=(0,n.useRef)(!1),C=(0,n.useRef)(!1),D=(0,n.useRef)(m),A=(0,n.useRef)(r),I=(0,n.useRef)(t),N=()=>I.current.isVisible()&&I.current.isOnline(),[P,x,U,F]=(0,i.z)(u,m),j=(0,n.useRef)({}).current,M=(0,i.e)(v)?(0,i.e)(t.fallback)?i.U:t.fallback[m]:v,W=(e,r)=>{for(let t in j)if("data"===t){if(!c(e[t],r[t])&&(!(0,i.e)(e[t])||!c(K,r[t])))return!1}else if(r[t]!==e[t])return!1;return!0},z=!L.current,B=(0,n.useMemo)(()=>{let e=P(),t=F(),n=e=>{let t=(0,i.m)(e);return(delete t._k,(()=>{if(!m||!r||I.current.isPaused())return!1;if(z&&!(0,i.e)(h))return h;let e=(0,i.e)(M)?t.data:M;return(0,i.e)(e)||b})())?{isValidating:!0,isLoading:!0,...t}:t},u=n(e),a=e===t?u:n(t),s=u;return[()=>{let e=n(P());return W(e,s)?(s.data=e.data,s.isLoading=e.isLoading,s.isValidating=e.isValidating,s.error=e.error,s):(s=e,e)},()=>a]},[u,m]),q=(0,a.useSyncExternalStore)((0,n.useCallback)(e=>U(m,(r,t)=>{W(t,r)||e()}),[u,m]),B[0],B[1]),Y=T[m]&&T[m].length>0,$=q.data,G=(0,i.e)($)?M&&(0,i.B)(M)?d(M):M:$,H=q.error,J=(0,n.useRef)(G),K=S?(0,i.e)($)?(0,i.e)(J.current)?G:J.current:$:G,Q=m&&(0,i.e)(G),X=(0,n.useRef)(null);i.I||(0,a.useSyncExternalStore)(E,()=>(X.current=!1,X),()=>(X.current=!0,X));let Z=X.current;V&&Z&&!o&&Q&&console.warn(`Missing pre-initiated data for serialized key "${m}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let ee=!(!m||!r||I.current.isPaused())&&(!Y||!!(0,i.e)(H))&&(z&&!(0,i.e)(h)?h:o?!(0,i.e)(G)&&b:(0,i.e)(G)||b),er=z&&ee,et=(0,i.e)(q.isValidating)?er:q.isValidating,en=(0,i.e)(q.isLoading)?er:q.isLoading,eu=(0,n.useCallback)(async e=>{let r,n,u=A.current;if(!m||!u||C.current||I.current.isPaused())return!1;let a=!0,l=e||{},o=!k[m]||!l.dedupe,d=()=>i.r?!C.current&&m===D.current&&L.current:m===D.current,f={isValidating:!1,isLoading:!1},g=()=>{x(f)},E=()=>{let e=k[m];e&&e[1]===n&&delete k[m]},v={isValidating:!0};(0,i.e)(P().data)&&(v.isLoading=!0);try{if(o&&(x(v),t.loadingTimeout&&(0,i.e)(P().data)&&setTimeout(()=>{a&&d()&&I.current.onLoadingSlow(m,t)},t.loadingTimeout),k[m]=[u(O),(0,i.o)()]),[r,n]=k[m],r=await r,o&&setTimeout(E,t.dedupingInterval),!k[m]||k[m][1]!==n)return o&&d()&&I.current.onDiscarded(m),!1;f.error=i.U;let e=y[m];if(!(0,i.e)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return g(),o&&d()&&I.current.onDiscarded(m),!1;let s=P().data;f.data=c(s,r)?s:r,o&&d()&&I.current.onSuccess(r,m,t)}catch(t){E();let e=I.current,{shouldRetryOnError:r}=e;!e.isPaused()&&(f.error=t,o&&d()&&(e.onError(t,m,e),(!0===r||(0,i.a)(r)&&r(t))&&(!I.current.revalidateOnFocus||!I.current.revalidateOnReconnect||N())&&e.onErrorRetry(t,m,e,e=>{let r=T[m];r&&r[0]&&r[0](s.ERROR_REVALIDATE_EVENT,e)},{retryCount:(l.retryCount||0)+1,dedupe:!0})))}return a=!1,g(),!0},[m,u]),ea=(0,n.useCallback)((...e)=>(0,i.n)(u,D.current,...e),[]);if((0,i.u)(()=>{A.current=r,I.current=t,(0,i.e)($)||(J.current=$)}),(0,i.u)(()=>{if(!m)return;let e=eu.bind(i.U,f),r=0;I.current.revalidateOnFocus&&(r=Date.now()+I.current.focusThrottleInterval);let t=(0,l.subscribeCallback)(m,T,(t,n={})=>{if(t==s.FOCUS_EVENT){let t=Date.now();I.current.revalidateOnFocus&&t>r&&N()&&(r=t+I.current.focusThrottleInterval,e())}else if(t==s.RECONNECT_EVENT)I.current.revalidateOnReconnect&&N()&&e();else if(t==s.MUTATE_EVENT)return eu();else if(t==s.ERROR_REVALIDATE_EVENT)return eu(n)});return C.current=!1,D.current=m,L.current=!0,x({_k:O}),ee&&!k[m]&&((0,i.e)(G)||i.I?e():(0,i.t)(e)),()=>{C.current=!0,t()}},[m]),(0,i.u)(()=>{let e;function r(){let r=(0,i.a)(p)?p(P().data):p;r&&-1!==e&&(e=setTimeout(t,r))}function t(){!P().error&&(w||I.current.isVisible())&&(R||I.current.isOnline())?eu(f).then(r):r()}return r(),()=>{e&&(clearTimeout(e),e=-1)}},[p,w,R,m]),(0,n.useDebugValue)(K),o){if(!i.r&&i.I&&Q)throw Error("Fallback data is required when using Suspense in SSR.");Q&&(A.current=r,I.current=t,C.current=!1);let e=_[m];if(d(!(0,i.e)(e)&&Q?ea(e):g),!(0,i.e)(H)&&Q)throw H;let n=Q?eu(f):g;!(0,i.e)(K)&&Q&&(n.status="fulfilled",n.value=!0),d(n)}return{mutate:ea,get data(){return j.data=!0,K},get error(){return j.error=!0,H},get isValidating(){return j.isValidating=!0,et},get isLoading(){return j.isLoading=!0,en}}})}}]);
1
+ "use strict";(globalThis.webpackChunk_intellisoftkenya_esm_billing_app=globalThis.webpackChunk_intellisoftkenya_esm_billing_app||[]).push([["209"],{93296(e,r,t){var n=t(40666),u="function"==typeof Object.is?Object.is:function(e,r){return e===r&&(0!==e||1/e==1/r)||e!=e&&r!=r},a=n.useState,i=n.useEffect,s=n.useLayoutEffect,l=n.useDebugValue;function c(e){var r=e.getSnapshot;e=e.value;try{var t=r();return!u(e,t)}catch(e){return!0}}var o="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,r){return r()}:function(e,r){var t=r(),n=a({inst:{value:t,getSnapshot:r}}),u=n[0].inst,o=n[1];return s(function(){u.value=t,u.getSnapshot=r,c(u)&&o({inst:u})},[e,t,r]),i(function(){return c(u)&&o({inst:u}),e(function(){c(u)&&o({inst:u})})},[e]),l(t),t};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:o},58139(e,r,t){e.exports=t(93296)},85216(e,r,t){t.d(r,{Ay:()=>h,BE:()=>v});var n=t(40666),u=t.n(n),a=t(58139),i=t(76103),s=t(52923),l=t(42372);let c=()=>{},o=c(),d=(new WeakMap,u().use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(r=>{e.status="fulfilled",e.value=r},r=>{e.status="rejected",e.reason=r}),e}})),f={dedupe:!0},g=Promise.resolve(i.U),E=()=>i.A,v=i.O.defineProperty(i.g,"defaultValue",{value:i.d}),h=(0,l.withArgs)((e,r,t)=>{let{cache:u,compare:c,suspense:o,fallbackData:v,revalidateOnMount:h,revalidateIfStale:b,refreshInterval:p,refreshWhenHidden:w,refreshWhenOffline:R,keepPreviousData:S,strictServerPrefetchWarning:V}=t,[T,y,k,_]=i.b.get(u),[m,O]=(0,i.s)(e),L=(0,n.useRef)(!1),C=(0,n.useRef)(!1),D=(0,n.useRef)(m),A=(0,n.useRef)(r),I=(0,n.useRef)(t),N=()=>I.current.isVisible()&&I.current.isOnline(),[P,x,U,F]=(0,i.z)(u,m),j=(0,n.useRef)({}).current,M=(0,i.e)(v)?(0,i.e)(t.fallback)?i.U:t.fallback[m]:v,W=(e,r)=>{for(let t in j)if("data"===t){if(!c(e[t],r[t])&&(!(0,i.e)(e[t])||!c(K,r[t])))return!1}else if(r[t]!==e[t])return!1;return!0},z=!L.current,B=(0,n.useMemo)(()=>{let e=P(),t=F(),n=e=>{let t=(0,i.m)(e);return(delete t._k,(()=>{if(!m||!r||I.current.isPaused())return!1;if(z&&!(0,i.e)(h))return h;let e=(0,i.e)(M)?t.data:M;return(0,i.e)(e)||b})())?{isValidating:!0,isLoading:!0,...t}:t},u=n(e),a=e===t?u:n(t),s=u;return[()=>{let e=n(P());return W(e,s)?(s.data=e.data,s.isLoading=e.isLoading,s.isValidating=e.isValidating,s.error=e.error,s):(s=e,e)},()=>a]},[u,m]),q=(0,a.useSyncExternalStore)((0,n.useCallback)(e=>U(m,(r,t)=>{W(t,r)||e()}),[u,m]),B[0],B[1]),Y=T[m]&&T[m].length>0,$=q.data,G=(0,i.e)($)?M&&(0,i.B)(M)?d(M):M:$,H=q.error,J=(0,n.useRef)(G),K=S?(0,i.e)($)?(0,i.e)(J.current)?G:J.current:$:G,Q=m&&(0,i.e)(G),X=(0,n.useRef)(null);i.I||(0,a.useSyncExternalStore)(E,()=>(X.current=!1,X),()=>(X.current=!0,X));let Z=X.current;V&&Z&&!o&&Q&&console.warn(`Missing pre-initiated data for serialized key "${m}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let ee=!(!m||!r||I.current.isPaused())&&(!Y||!!(0,i.e)(H))&&(z&&!(0,i.e)(h)?h:o?!(0,i.e)(G)&&b:(0,i.e)(G)||b),er=z&&ee,et=(0,i.e)(q.isValidating)?er:q.isValidating,en=(0,i.e)(q.isLoading)?er:q.isLoading,eu=(0,n.useCallback)(async e=>{let r,n,u=A.current;if(!m||!u||C.current||I.current.isPaused())return!1;let a=!0,l=e||{},o=!k[m]||!l.dedupe,d=()=>i.r?!C.current&&m===D.current&&L.current:m===D.current,f={isValidating:!1,isLoading:!1},g=()=>{x(f)},E=()=>{let e=k[m];e&&e[1]===n&&delete k[m]},v={isValidating:!0};(0,i.e)(P().data)&&(v.isLoading=!0);try{if(o&&(x(v),t.loadingTimeout&&(0,i.e)(P().data)&&setTimeout(()=>{a&&d()&&I.current.onLoadingSlow(m,t)},t.loadingTimeout),k[m]=[u(O),(0,i.o)()]),[r,n]=k[m],r=await r,o&&setTimeout(E,t.dedupingInterval),!k[m]||k[m][1]!==n)return o&&d()&&I.current.onDiscarded(m),!1;f.error=i.U;let e=y[m];if(!(0,i.e)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return g(),o&&d()&&I.current.onDiscarded(m),!1;let s=P().data;f.data=c(s,r)?s:r,o&&d()&&I.current.onSuccess(r,m,t)}catch(t){E();let e=I.current,{shouldRetryOnError:r}=e;!e.isPaused()&&(f.error=t,o&&d()&&(e.onError(t,m,e),(!0===r||(0,i.a)(r)&&r(t))&&(!I.current.revalidateOnFocus||!I.current.revalidateOnReconnect||N())&&e.onErrorRetry(t,m,e,e=>{let r=T[m];r&&r[0]&&r[0](s.ERROR_REVALIDATE_EVENT,e)},{retryCount:(l.retryCount||0)+1,dedupe:!0})))}return a=!1,g(),!0},[m,u]),ea=(0,n.useCallback)((...e)=>(0,i.n)(u,D.current,...e),[]);if((0,i.u)(()=>{A.current=r,I.current=t,(0,i.e)($)||(J.current=$)}),(0,i.u)(()=>{if(!m)return;let e=eu.bind(i.U,f),r=0;I.current.revalidateOnFocus&&(r=Date.now()+I.current.focusThrottleInterval);let t=(0,l.subscribeCallback)(m,T,(t,n={})=>{if(t==s.FOCUS_EVENT){let t=Date.now();I.current.revalidateOnFocus&&t>r&&N()&&(r=t+I.current.focusThrottleInterval,e())}else if(t==s.RECONNECT_EVENT)I.current.revalidateOnReconnect&&N()&&e();else if(t==s.MUTATE_EVENT)return eu();else if(t==s.ERROR_REVALIDATE_EVENT)return eu(n)});return C.current=!1,D.current=m,L.current=!0,x({_k:O}),ee&&!k[m]&&((0,i.e)(G)||i.I?e():(0,i.t)(e)),()=>{C.current=!0,t()}},[m]),(0,i.u)(()=>{let e;function r(){let r=(0,i.a)(p)?p(P().data):p;r&&-1!==e&&(e=setTimeout(t,r))}function t(){!P().error&&(w||I.current.isVisible())&&(R||I.current.isOnline())?eu(f).then(r):r()}return r(),()=>{e&&(clearTimeout(e),e=-1)}},[p,w,R,m]),(0,n.useDebugValue)(K),o){if(!i.r&&i.I&&Q)throw Error("Fallback data is required when using Suspense in SSR.");Q&&(A.current=r,I.current=t,C.current=!1);let e=_[m];if(d(!(0,i.e)(e)&&Q?ea(e):g),!(0,i.e)(H)&&Q)throw H;let n=Q?eu(f):g;!(0,i.e)(K)&&Q&&(n.status="fulfilled",n.value=!0),d(n)}return{mutate:ea,get data(){return j.data=!0,K},get error(){return j.error=!0,H},get isValidating(){return j.isValidating=!0,et},get isLoading(){return j.isLoading=!0,en}}})}}]);