@openmrs/esm-appointments-app 6.1.1-pre.3264 → 6.1.1-pre.3274
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.
- package/.turbo/turbo-build.log +17 -17
- package/dist/255.js +1 -1
- package/dist/255.js.map +1 -1
- package/dist/309.js +1 -1
- package/dist/4.js +1 -1
- package/dist/45.js +2 -0
- package/dist/45.js.map +1 -0
- package/dist/459.js +1 -1
- package/dist/459.js.map +1 -1
- package/dist/574.js +1 -1
- package/dist/96.js +2 -0
- package/dist/96.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-appointments-app.js +1 -1
- package/dist/openmrs-esm-appointments-app.js.buildmanifest.json +72 -72
- package/dist/openmrs-esm-appointments-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/patient-appointments/patient-upcoming-appointments-card.component.tsx +45 -47
- package/translations/en.json +1 -1
- package/dist/390.js +0 -2
- package/dist/390.js.map +0 -1
- package/dist/57.js +0 -2
- package/dist/57.js.map +0 -1
- /package/dist/{390.js.LICENSE.txt → 45.js.LICENSE.txt} +0 -0
- /package/dist/{57.js.LICENSE.txt → 96.js.LICENSE.txt} +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
assets by path [1m[32m*.js[39m[22m 3.
|
|
2
|
-
assets by chunk 1.
|
|
1
|
+
assets by path [1m[32m*.js[39m[22m 3.06 MiB
|
|
2
|
+
assets by chunk 1.76 MiB (id hint: vendors)
|
|
3
3
|
assets by status [1m[33m1.57 MiB[39m[22m [1m[33m[big][39m[22m
|
|
4
|
-
asset [1m[
|
|
4
|
+
asset [1m[33m96.js[39m[22m [1m[33m811 KiB[39m[22m [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m [1m[33m[big][39m[22m (id hint: vendors) 2 related assets
|
|
5
5
|
asset [1m[33m130.js[39m[22m [1m[33m796 KiB[39m[22m [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m [1m[33m[big][39m[22m (id hint: vendors) 2 related assets
|
|
6
|
-
asset [1m[
|
|
6
|
+
asset [1m[32m45.js[39m[22m 83.4 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors) 2 related assets
|
|
7
7
|
asset [1m[32m591.js[39m[22m 50.8 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors) 2 related assets
|
|
8
8
|
asset [1m[32m592.js[39m[22m 27.6 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors) 1 related asset
|
|
9
9
|
asset [1m[32m588.js[39m[22m 19 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors) 1 related asset
|
|
10
10
|
asset [1m[32m729.js[39m[22m 6.16 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors) 1 related asset
|
|
11
|
-
asset [1m[32m255.js[39m[22m 4.
|
|
11
|
+
asset [1m[32m255.js[39m[22m 4.83 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors) 2 related assets
|
|
12
12
|
+ 17 assets
|
|
13
13
|
assets by path [1m[32m*.json[39m[22m 16.3 KiB
|
|
14
14
|
asset [1m[32mopenmrs-esm-appointments-app.js.buildmanifest.json[39m[22m 13.9 KiB [1m[32m[emitted][39m[22m
|
|
15
15
|
asset [1m[32mroutes.json[39m[22m 2.44 KiB [1m[32m[emitted][39m[22m [from: src/routes.json] [1m[32m[copied][39m[22m
|
|
16
|
-
orphan modules 6.
|
|
17
|
-
runtime modules
|
|
18
|
-
built modules 7.
|
|
19
|
-
modules by path [1m../../node_modules/[39m[22m 7.
|
|
20
|
-
modules by path [1m./[39m[22m
|
|
21
|
-
modules by path [1m./src/[39m[22m
|
|
16
|
+
orphan modules 6.8 MiB [1m[33m[orphan][39m[22m 954 modules
|
|
17
|
+
runtime modules 40.7 KiB 28 modules
|
|
18
|
+
built modules 7.78 MiB (javascript) 294 bytes (share-init) 294 bytes (consume-shared) [1m[33m[built][39m[22m
|
|
19
|
+
modules by path [1m../../node_modules/[39m[22m 7.34 MiB 114 modules
|
|
20
|
+
modules by path [1m./[39m[22m 457 KiB
|
|
21
|
+
modules by path [1m./src/[39m[22m 415 KiB 36 modules
|
|
22
22
|
modules by path [1m./translations/[39m[22m 42 KiB 10 modules
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
modules by path [
|
|
26
|
-
modules by path [
|
|
23
|
+
provide-module modules 294 bytes 7 modules
|
|
24
|
+
consume-shared-module modules 294 bytes
|
|
25
|
+
modules by path [1mconsume shared module (default) @openmrs/[39m[22m 84 bytes 2 modules
|
|
26
|
+
modules by path [1mconsume shared module (default) swr/[39m[22m 84 bytes 2 modules
|
|
27
27
|
+ 3 modules
|
|
28
28
|
[1mcontainer entry[39m[22m 42 bytes [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
29
29
|
|
|
@@ -32,7 +32,7 @@ This can impact web performance.
|
|
|
32
32
|
Assets:
|
|
33
33
|
main.js (1.03 MiB)
|
|
34
34
|
130.js (796 KiB)
|
|
35
|
-
|
|
35
|
+
96.js (811 KiB)[39m[22m
|
|
36
36
|
|
|
37
37
|
[1m[33mWARNING[39m[22m in [1mentrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
|
|
38
38
|
Entrypoints:
|
|
@@ -40,4 +40,4 @@ Entrypoints:
|
|
|
40
40
|
main.js
|
|
41
41
|
[39m[22m
|
|
42
42
|
|
|
43
|
-
webpack 5.86.0 compiled with [1m[33m2 warnings[39m[22m in
|
|
43
|
+
webpack 5.86.0 compiled with [1m[33m2 warnings[39m[22m in 131419 ms
|
package/dist/255.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 255.js.LICENSE.txt */
|
|
2
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[]).push([[255],{452:(e,n,t)=>{var r=t(268),i="function"==typeof Object.is?Object.is:function(e,n){return e===n&&(0!==e||1/e==1/n)||e!=e&&n!=n},s=r.useState,a=r.useEffect,u=r.useLayoutEffect,o=r.useDebugValue;function d(e){var n=e.getSnapshot;e=e.value;try{var t=n();return!i(e,t)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,n){return n()}:function(e,n){var t=n(),r=s({inst:{value:t,getSnapshot:n}}),i=r[0].inst,c=r[1];return u((function(){i.value=t,i.getSnapshot=n,d(i)&&c({inst:i})}),[e,t,n]),a((function(){return d(i)&&c({inst:i}),e((function(){d(i)&&c({inst:i})}))}),[e]),o(t),t};n.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},3100:(e,n,t)=>{e.exports=t(452)},3255:(e,n,t)=>{t.d(n,{
|
|
2
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[]).push([[255],{452:(e,n,t)=>{var r=t(268),i="function"==typeof Object.is?Object.is:function(e,n){return e===n&&(0!==e||1/e==1/n)||e!=e&&n!=n},s=r.useState,a=r.useEffect,u=r.useLayoutEffect,o=r.useDebugValue;function d(e){var n=e.getSnapshot;e=e.value;try{var t=n();return!i(e,t)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,n){return n()}:function(e,n){var t=n(),r=s({inst:{value:t,getSnapshot:n}}),i=r[0].inst,c=r[1];return u((function(){i.value=t,i.getSnapshot=n,d(i)&&c({inst:i})}),[e,t,n]),a((function(){return d(i)&&c({inst:i}),e((function(){d(i)&&c({inst:i})}))}),[e]),o(t),t};n.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},3100:(e,n,t)=>{e.exports=t(452)},3255:(e,n,t)=>{t.d(n,{ZP:()=>u,kY:()=>s.useSWRConfig});var r=t(268),i=t(3100),s=t(3325);const a={dedupe:!0};s.OBJECT.defineProperty(s.SWRConfig,"defaultValue",{value:s.defaultConfig});var u=(0,s.withArgs)(((e,n,t)=>{const{cache:u,compare:o,suspense:d,fallbackData:c,revalidateOnMount:l,refreshInterval:f,refreshWhenHidden:E,refreshWhenOffline:g,keepPreviousData:p}=t,[v,S,h]=s.SWRGlobalState.get(u),[m,b]=(0,s.serialize)(e),R=(0,r.useRef)(!1),U=(0,r.useRef)(!1),C=(0,r.useRef)(m),T=(0,r.useRef)(n),_=(0,r.useRef)(t),y=()=>_.current,V=()=>y().isVisible()&&y().isOnline(),[w,k,I]=(0,s.createCacheHelper)(u,m),L=(0,r.useRef)({}).current,O=(0,s.isUndefined)(c)?t.fallback[m]:c,D=(e,n)=>{let t=!0;for(const r in L){const i=r;o(n[i],e[i])||"data"===i&&(0,s.isUndefined)(e[i])&&o(n[i],j)||(t=!1)}return t},N=(0,r.useMemo)((()=>{const e=!!m&&!!n&&((0,s.isUndefined)(l)?!y().isPaused()&&!d:l),t=()=>{const n=w(),t=(0,s.mergeObjects)(n);return delete t._k,e?{isValidating:!0,isLoading:!0,...t}:t};let r=t();return()=>{const e=t();return D(e,r)?r:r=e}}),[u,m]),F=(0,i.useSyncExternalStore)((0,r.useCallback)((e=>I(m,((n,t)=>{D(n,t)||e()}))),[u,m]),N,N),A=!R.current,P=F.data,x=(0,s.isUndefined)(P)?O:P,W=F.error,M=(0,r.useRef)(x),j=p?(0,s.isUndefined)(P)?M.current:P:x,G=A&&!(0,s.isUndefined)(l)?l:!y().isPaused()&&(d?!(0,s.isUndefined)(x)&&t.revalidateIfStale:(0,s.isUndefined)(x)||t.revalidateIfStale),Y=!!(m&&n&&A&&G),H=(0,s.isUndefined)(F.isValidating)?Y:F.isValidating,q=(0,s.isUndefined)(F.isLoading)?Y:F.isLoading,z=(0,r.useCallback)((async e=>{const n=T.current;if(!m||!n||U.current||y().isPaused())return!1;let r,i,a=!0;const u=e||{},d=!h[m]||!u.dedupe,c=()=>s.IS_REACT_LEGACY?!U.current&&m===C.current&&R.current:m===C.current,l={isValidating:!1,isLoading:!1},f=()=>{k(l)},E=()=>{const e=h[m];e&&e[1]===i&&delete h[m]},g={isValidating:!0};(0,s.isUndefined)(w().data)&&(g.isLoading=!0);try{if(d&&(k(g),t.loadingTimeout&&(0,s.isUndefined)(w().data)&&setTimeout((()=>{a&&c()&&y().onLoadingSlow(m,t)}),t.loadingTimeout),h[m]=[n(b),(0,s.getTimestamp)()]),[r,i]=h[m],r=await r,d&&setTimeout(E,t.dedupingInterval),!h[m]||h[m][1]!==i)return d&&c()&&y().onDiscarded(m),!1;l.error=s.UNDEFINED;const e=S[m];if(!(0,s.isUndefined)(e)&&(i<=e[0]||i<=e[1]||0===e[1]))return f(),d&&c()&&y().onDiscarded(m),!1;const u=w().data;l.data=o(u,r)?u:r,d&&c()&&y().onSuccess(r,m,t)}catch(e){E();const n=y(),{shouldRetryOnError:t}=n;n.isPaused()||(l.error=e,d&&c()&&(n.onError(e,m,n),(!0===t||(0,s.isFunction)(t)&&t(e))&&V()&&n.onErrorRetry(e,m,n,z,{retryCount:(u.retryCount||0)+1,dedupe:!0})))}return a=!1,f(),!0}),[m,u]),B=(0,r.useCallback)(((...e)=>(0,s.internalMutate)(u,C.current,...e)),[]);if((0,s.useIsomorphicLayoutEffect)((()=>{T.current=n,_.current=t,(0,s.isUndefined)(P)||(M.current=P)})),(0,s.useIsomorphicLayoutEffect)((()=>{if(!m)return;const e=z.bind(s.UNDEFINED,a);let n=0;const t=(0,s.subscribeCallback)(m,v,(t=>{if(t==s.revalidateEvents.FOCUS_EVENT){const t=Date.now();y().revalidateOnFocus&&t>n&&V()&&(n=t+y().focusThrottleInterval,e())}else if(t==s.revalidateEvents.RECONNECT_EVENT)y().revalidateOnReconnect&&V()&&e();else if(t==s.revalidateEvents.MUTATE_EVENT)return z()}));return U.current=!1,C.current=m,R.current=!0,k({_k:b}),G&&((0,s.isUndefined)(x)||s.IS_SERVER?e():(0,s.rAF)(e)),()=>{U.current=!0,t()}}),[m]),(0,s.useIsomorphicLayoutEffect)((()=>{let e;function n(){const n=(0,s.isFunction)(f)?f(x):f;n&&-1!==e&&(e=setTimeout(t,n))}function t(){w().error||!E&&!y().isVisible()||!g&&!y().isOnline()?n():z(a).then(n)}return n(),()=>{e&&(clearTimeout(e),e=-1)}}),[f,E,g,m]),(0,r.useDebugValue)(j),d&&(0,s.isUndefined)(x)&&m){if(!s.IS_REACT_LEGACY&&s.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");throw T.current=n,_.current=t,U.current=!1,(0,s.isUndefined)(W)?z(a):W}return{mutate:B,get data(){return L.data=!0,j},get error(){return L.error=!0,W},get isValidating(){return L.isValidating=!0,H},get isLoading(){return L.isLoading=!0,q}}}))}}]);
|
package/dist/255.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"255.js","mappings":";wJASa,IAAIA,EAAE,EAAQ,KAA4EC,EAAE,mBAAoBC,OAAOC,GAAGD,OAAOC,GAA1G,SAAWC,EAAEC,GAAG,OAAOD,IAAIC,IAAI,IAAID,GAAG,EAAEA,GAAI,EAAEC,IAAID,GAAIA,GAAGC,GAAIA,CAAC,EAAiDC,EAAEN,EAAEO,SAASC,EAAER,EAAES,UAAUC,EAAEV,EAAEW,gBAAgBC,EAAEZ,EAAEa,cACtM,SAASC,EAAEV,GAAG,IAAIC,EAAED,EAAEW,YAAYX,EAAEA,EAAEY,MAAM,IAAI,IAAIC,EAAEZ,IAAI,OAAOJ,EAAEG,EAAEa,EAAE,CAAC,MAAMC,GAAG,OAAM,CAAE,CAAC,CAA4B,IAAIC,EAAE,oBAAqBC,aAAQ,IAAqBA,OAAOC,eAAU,IAAqBD,OAAOC,SAASC,cAAzI,SAAWlB,EAAEC,GAAG,OAAOA,GAAG,EAD+F,SAAWD,EAAEC,GAAG,IAAIY,EAAEZ,IAAIa,EAAEZ,EAAE,CAACiB,KAAK,CAACP,MAAMC,EAAEF,YAAYV,KAAKmB,EAAEN,EAAE,GAAGK,KAAKE,EAAEP,EAAE,GAAwJ,OAArJR,GAAE,WAAWc,EAAER,MAAMC,EAAEO,EAAET,YAAYV,EAAES,EAAEU,IAAIC,EAAE,CAACF,KAAKC,GAAG,GAAE,CAACpB,EAAEa,EAAEZ,IAAIG,GAAE,WAA6B,OAAlBM,EAAEU,IAAIC,EAAE,CAACF,KAAKC,IAAWpB,GAAE,WAAWU,EAAEU,IAAIC,EAAE,CAACF,KAAKC,GAAG,GAAE,GAAE,CAACpB,IAAIQ,EAAEK,GAAUA,CAAC,EAC5MS,EAAQC,0BAAqB,IAAS3B,EAAE2B,qBAAqB3B,EAAE2B,qBAAqBR,kBCPxUS,EAAOF,QAAU,EAAjB,
|
|
1
|
+
{"version":3,"file":"255.js","mappings":"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","sources":["webpack://@openmrs/esm-appointments-app/../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js","webpack://@openmrs/esm-appointments-app/../../node_modules/use-sync-external-store/shim/index.js","webpack://@openmrs/esm-appointments-app/../../node_modules/swr/core/dist/index.mjs"],"names":["e","k","Object","is","a","b","l","useState","m","useEffect","n","useLayoutEffect","p","useDebugValue","r","getSnapshot","value","d","f","u","window","document","createElement","inst","c","g","exports","useSyncExternalStore","module","WITH_DEDUPE","dedupe","OBJECT","defineProperty","SWRConfig","defaultConfig","useSWR","withArgs","_key","fetcher","config","cache","compare","suspense","fallbackData","revalidateOnMount","refreshInterval","refreshWhenHidden","refreshWhenOffline","keepPreviousData","EVENT_REVALIDATORS","MUTATION","FETCH","SWRGlobalState","get","key","fnArg","serialize","initialMountedRef","useRef","unmountedRef","keyRef","fetcherRef","configRef","getConfig","current","isActive","isVisible","isOnline","getCache","setCache","subscribeCache","createCacheHelper","stateDependencies","fallback","isUndefined","isEqual","prev","equal","_","t","returnedData","useMemo","shouldStartRequest","isPaused","getSelectedCache","state","snapshot","mergeObjects","_k","isValidating","isLoading","memorizedSnapshot","cached","useCallback","callback","isInitialMount","cachedData","data","error","laggyDataRef","shouldDoInitialRevalidation","revalidateIfStale","defaultValidatingState","revalidate","async","revalidateOpts","currentFetcher","newData","startAt","loading","opts","shouldStartNewRequest","callbackSafeguard","IS_REACT_LEGACY","finalState","finishRequestAndUpdateState","cleanupState","requestInfo","initialState","loadingTimeout","setTimeout","onLoadingSlow","getTimestamp","dedupingInterval","onDiscarded","UNDEFINED","mutationInfo","cacheData","onSuccess","err","currentConfig","shouldRetryOnError","onError","isFunction","onErrorRetry","retryCount","boundMutate","args","internalMutate","useIsomorphicLayoutEffect","softRevalidate","bind","nextFocusRevalidatedAt","unsubEvents","subscribeCallback","type","revalidateEvents","FOCUS_EVENT","now","Date","revalidateOnFocus","focusThrottleInterval","RECONNECT_EVENT","revalidateOnReconnect","MUTATE_EVENT","IS_SERVER","rAF","timer","next","interval","execute","then","clearTimeout","Error","mutate"],"sourceRoot":""}
|
package/dist/309.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[]).push([[309],{5309:(t,e,n)=>{n.r(e),n.d(e,{default:()=>r});var i=n(268),o=n.n(i),s=n(4924),a=n(2870),l=n(
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[]).push([[309],{5309:(t,e,n)=>{n.r(e),n.d(e,{default:()=>r});var i=n(268),o=n.n(i),s=n(4924),a=n(2870),l=n(5368),p=n(8527),c=n(3291);const r=function(t){var e=t.patientUuid,n=t.appointmentUuid,i=t.closeModal,r=(0,a.useVisit)(e),u=r.activeVisit,d=r.mutate,m=(0,s.useTranslation)().t,h=(0,c.EJ)().mutateAppointments;return o().createElement("div",null,o().createElement(l.xBx,{closeModal:i,title:m("endAppointmentConfirmation","Are you sure you want to check the patient out for this appointment?")}),o().createElement(l.fef,null,o().createElement("p",null,u?m("endAppointmentAndVisitConfirmationMessage","Checking the patient out will mark the appointment as complete, and close out the active visit for this patient."):m("endAppointmentConfirmationMessage","Checking the patient out will mark the appointment as complete."))),o().createElement(l.mzw,null,o().createElement(l.zxk,{kind:"secondary",onClick:i},m("cancel","Cancel")),o().createElement(l.zxk,{kind:"danger",onClick:function(){return(0,p.q)("Completed",n).then((function(){if(h(),u){var t=new AbortController,e={location:u.location.uuid,startDatetime:(0,a.parseDate)(u.startDatetime),visitType:u.visitType.uuid,stopDatetime:new Date};(0,a.updateVisit)(u.uuid,e,t).toPromise().then((function(){d(),(0,a.showSnackbar)({title:m("appointmentEnded","Appointment ended"),subtitle:m("appointmentEndedAndVisitClosedSuccessfully","Appointment successfully ended and visit successfully closed."),isLowContrast:!0,kind:"success"}),i()})).catch((function(t){i(),(0,a.showSnackbar)({title:m("appointmentEndedButVisitNotClosedError","Appointment ended, but error closing visit"),subtitle:null==t?void 0:t.message,kind:"error",isLowContrast:!0})}))}else i(),(0,a.showSnackbar)({title:m("appointmentEnded","Appointment ended"),subtitle:m("appointmentEndedSuccessfully","Appointment successfully ended."),isLowContrast:!0,kind:"success"})})).catch((function(t){i(),(0,a.showSnackbar)({title:m("appointmentEndError","Error ending appointment"),subtitle:null==t?void 0:t.message,kind:"error",isLowContrast:!0})}))}},m("checkOut","Check Out"))))}}}]);
|
package/dist/4.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[]).push([[4],{4:(e,t,n)=>{n.r(t),n.d(t,{default:()=>p});var r=n(268),o=n.n(r),a=n(4924),l=n(
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[]).push([[4],{4:(e,t,n)=>{n.r(t),n.d(t,{default:()=>p});var r=n(268),o=n.n(r),a=n(4924),l=n(5368),i=n(2870),c=n(8527);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}const p=function(e){var t,n,p,f,m=e.closeCancelModal,d=e.appointmentUuid,h=e.patientUuid,y=(0,a.useTranslation)().t,b=(0,c.W)(h,(new Date).toUTCString(),new AbortController).mutate,v=(p=(0,r.useState)(!1),f=2,function(e){if(Array.isArray(e))return e}(p)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],l=!0,i=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);l=!0);}catch(e){i=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(i)throw o}}return a}}(p,f)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(p,f)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),w=v[0],k=v[1],C=(t=function(){return function(e,t){var n,r,o,a,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;l;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return l.label++,{value:a[1],done:!1};case 5:l.label++,r=a[1],a=[0];continue;case 7:a=l.ops.pop(),l.trys.pop();continue;default:if(!((o=(o=l.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){l=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){l.label=a[1];break}if(6===a[0]&&l.label<o[1]){l.label=o[1],o=a;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(a);break}o[2]&&l.ops.pop(),l.trys.pop();continue}a=t.call(e,l)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}}(this,(function(e){return k(!0),(0,c.q)("Cancelled",d).then((function(e){200===e.status&&(b(),m(),(0,i.showSnackbar)({isLowContrast:!0,kind:"success",subtitle:y("appointmentCancelledSuccessfully","Appointment cancelled successfully"),title:y("appointmentCancelled","Appointment cancelled")}))})).catch((function(e){(0,i.showSnackbar)({title:y("appointmentCancelError","Error cancelling appointment"),kind:"error",isLowContrast:!0,subtitle:null==e?void 0:e.message})})),[2]}))},n=function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function l(e){s(a,r,o,l,i,"next",e)}function i(e){s(a,r,o,l,i,"throw",e)}l(void 0)}))},function(){return n.apply(this,arguments)});return o().createElement("div",null,o().createElement(l.xBx,{closeModal:m,title:y("cancelAppointment","Cancel appointment")}),o().createElement(l.fef,null,o().createElement("p",null,y("cancelAppointmentModalConfirmationText","Are you sure you want to cancel this appointment?"))),o().createElement(l.mzw,null,o().createElement(l.zxk,{kind:"secondary",onClick:m},y("discard","Discard")),o().createElement(l.zxk,{kind:"danger",onClick:C,disabled:w},y("cancelAppointment","Cancel appointment"))))}}}]);
|
package/dist/45.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 45.js.LICENSE.txt */
|
|
2
|
+
(globalThis.webpackChunk_openmrs_esm_appointments_app=globalThis.webpackChunk_openmrs_esm_appointments_app||[]).push([[45],{3810:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(272),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-appointments__card-header__desktopHeader___GveXk,.-esm-appointments__card-header__tabletHeader___iKL3m{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0 .75rem 1rem;background-color:#fff}.-esm-appointments__card-header__desktopHeader___GveXk h4:after,.-esm-appointments__card-header__tabletHeader___iKL3m h4:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-appointments__card-header__desktopHeader___GveXk{height:3rem}.-esm-appointments__card-header__desktopHeader___GveXk h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-appointments__card-header__tabletHeader___iKL3m{height:4.5rem}.-esm-appointments__card-header__tabletHeader___iKL3m h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}html[dir=rtl] .-esm-appointments__card-header__desktopHeader___GveXk,html[dir=rtl] .-esm-appointments__card-header__tabletHeader___iKL3m{text-align:right;padding:.75rem 1rem .75rem 0}',"",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./../../node_modules/@openmrs/esm-patient-common-lib/src/cards/card-header.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,yEAAA,CACA,2GAAA,CCvDF,6GACE,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,4BAAA,CACA,qBDFc,CCId,+HACE,UAAA,CACA,aAAA,CACA,UAAA,CACA,mBAAA,CACA,2CAAA,CAIJ,uDACE,WAAA,CACA,0DC40BE,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD10BA,aDnBM,CCuBV,sDACE,aAAA,CACA,yDCo0BE,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDl0BA,aD3BM,CCiCR,yIACE,gBAAA,CACA,4BAAA",sourceRoot:""}]),i.locals={desktopHeader:"-esm-appointments__card-header__desktopHeader___GveXk",tabletHeader:"-esm-appointments__card-header__tabletHeader___iKL3m"};const l=i},964:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(272),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-appointments__empty-state__action___LOm6z{margin-bottom:.5rem}.-esm-appointments__empty-state__content___dTpXO{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px);color:#525252;margin-top:1rem;margin-bottom:.5rem}.-esm-appointments__empty-state__desktopHeading___iA5_A h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-appointments__empty-state__tabletHeading___VhDQa h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}.-esm-appointments__empty-state__desktopHeading___iA5_A,.-esm-appointments__empty-state__tabletHeading___VhDQa{text-align:left;text-transform:capitalize;margin-bottom:1rem}.-esm-appointments__empty-state__desktopHeading___iA5_A h4:after,.-esm-appointments__empty-state__tabletHeading___VhDQa h4:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-appointments__empty-state__heading___X_yCc:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-appointments__empty-state__tile___jIU4a{text-align:center;border:1px solid #e0e0e0}',"",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./../../node_modules/@openmrs/esm-patient-common-lib/src/empty-state/empty-state.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,yEAAA,CACA,2GAAA,CCvDF,gDACE,mBCgBW,CDbb,iDE01BI,2DAAA,CAAA,0DAAA,CAAA,8DAAA,CAAA,mEAAA,CFx1BF,aDLQ,CCMR,eCoBW,CDnBX,mBCSW,CDLX,2DEk1BE,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CFh1BA,aDbM,CCkBR,0DE20BE,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CFz0BA,aDpBM,CCwBV,+GACE,eAAA,CACA,yBAAA,CACA,kBCDW,CDGX,iIACE,UAAA,CACA,aAAA,CACA,UAAA,CACA,mBAAA,CACA,2CAAA,CAIJ,uDACE,UAAA,CACA,aAAA,CACA,UAAA,CACA,mBAAA,CACA,2CAAA,CAGF,8CACE,iBAAA,CACA,wBAAA",sourceRoot:""}]),i.locals={action:"-esm-appointments__empty-state__action___LOm6z",content:"-esm-appointments__empty-state__content___dTpXO",desktopHeading:"-esm-appointments__empty-state__desktopHeading___iA5_A",tabletHeading:"-esm-appointments__empty-state__tabletHeading___VhDQa",heading:"-esm-appointments__empty-state__heading___X_yCc",tile:"-esm-appointments__empty-state__tile___jIU4a"};const l=i},6568:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(272),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-appointments__error-state__errorMessage___qND1G{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);margin-top:2.25rem;margin-bottom:.5rem}.-esm-appointments__error-state__errorCopy___EO3m2{margin-bottom:.5rem;font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px);color:#525252}.-esm-appointments__error-state__desktopHeading___QC3oF h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-appointments__error-state__tabletHeading___U5Hf5 h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}.-esm-appointments__error-state__desktopHeading___QC3oF,.-esm-appointments__error-state__tabletHeading___U5Hf5{text-align:left;text-transform:capitalize;margin-bottom:1rem}.-esm-appointments__error-state__desktopHeading___QC3oF h4:after,.-esm-appointments__error-state__tabletHeading___U5Hf5 h4:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-appointments__error-state__tile____mVKT{text-align:center;border:1px solid #e0e0e0}',"",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./../../node_modules/@openmrs/esm-patient-common-lib/src/error-state/error-state.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,yEAAA,CACA,2GAAA,CCvDF,sDC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD31BF,kBAAA,CACA,mBEaW,CFVb,mDACE,mBESW,CD60BT,gDAAA,CAAA,+CAAA,CAAA,mDAAA,CAAA,wDAAA,CDp1BF,aDTQ,CCaR,2DCg1BE,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD90BA,aDfM,CCoBR,0DCy0BE,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDv0BA,aDtBM,CC0BV,+GACE,eAAA,CACA,yBAAA,CACA,kBEHW,CFKX,iIACE,UAAA,CACA,aAAA,CACA,UAAA,CACA,mBAAA,CACA,2CAAA,CAIJ,8CACE,iBAAA,CACA,wBAAA",sourceRoot:""}]),i.locals={errorMessage:"-esm-appointments__error-state__errorMessage___qND1G",errorCopy:"-esm-appointments__error-state__errorCopy___EO3m2",desktopHeading:"-esm-appointments__error-state__desktopHeading___QC3oF",tabletHeading:"-esm-appointments__error-state__tabletHeading___U5Hf5",tile:"-esm-appointments__error-state__tile____mVKT"};const l=i},6525:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(272),a=n.n(r),o=n(2609),i=n.n(o)()(a());i.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-appointments__pagination__bodyShort01___ID5jB,.-esm-appointments__pagination__configurableLink___mTtvw{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px)}.-esm-appointments__pagination__desktop___XQVD2,.-esm-appointments__pagination__tablet___xanY5{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);display:flex;justify-content:space-between;color:#525252;background-color:#fff;padding-left:1rem;align-items:center}.-esm-appointments__pagination__desktop___XQVD2 .cds--pagination{min-height:0rem;height:2rem;width:auto;border:none}.-esm-appointments__pagination__desktop___XQVD2 .cds--pagination .cds--select-input,.-esm-appointments__pagination__desktop___XQVD2 .cds--pagination .cds--btn,.-esm-appointments__pagination__desktop___XQVD2 .cds--pagination .cds--pagination__right{min-height:0rem;height:2rem}.-esm-appointments__pagination__tablet___xanY5 .cds--pagination{min-height:0rem;height:3rem;width:auto;border:none}.-esm-appointments__pagination__tablet___xanY5 .cds--pagination .cds--select-input,.-esm-appointments__pagination__tablet___xanY5 .cds--pagination .cds--btn,.-esm-appointments__pagination__tablet___xanY5 .cds--pagination .cds--pagination__right{min-height:0rem;height:3rem}.-esm-appointments__pagination__configurableLink___mTtvw{text-decoration:none;padding:0 .5rem}.-esm-appointments__pagination__pagination___iyW8v{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);background-color:#fff;color:#525252;display:flex}div.-esm-appointments__pagination__pagination___iyW8v>.cds--pagination__left{display:none}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./../../node_modules/@openmrs/esm-patient-common-lib/src/pagination/pagination.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,yEAAA,CACA,2GAAA,CCvDF,6GC81BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD11BJ,+FC01BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CDx1BF,YAAA,CACA,6BAAA,CACA,aDPQ,CCQR,qBDZM,CCaN,iBAAA,CACA,kBAAA,CAGF,iEACE,eAAA,CACA,WAAA,CACA,UAAA,CACA,WAAA,CAEA,wPACE,eAAA,CACA,WAAA,CAIJ,gEACE,eAAA,CACA,WAAA,CACA,UAAA,CACA,WAAA,CAEA,qPACE,eAAA,CACA,WAAA,CAIJ,yDACE,oBAAA,CAEA,eAAA,CAGF,mDCkzBI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CDhzBF,qBDjDM,CCkDN,aD9CQ,CC+CR,YAAA,CAIA,6EACE,YAAA",sourceRoot:""}]),i.locals={bodyShort01:"-esm-appointments__pagination__bodyShort01___ID5jB",configurableLink:"-esm-appointments__pagination__configurableLink___mTtvw",desktop:"-esm-appointments__pagination__desktop___XQVD2",tablet:"-esm-appointments__pagination__tablet___xanY5",pagination:"-esm-appointments__pagination__pagination___iyW8v"};const l=i},3045:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CardHeader:()=>w,DashboardExtension:()=>k,DashboardGroupExtension:()=>Wt,EmptyDataIllustration:()=>Pt,EmptyState:()=>jt,ErrorState:()=>Ut,PatientChartPagination:()=>Kn,careSettingUuid:()=>Rn,convertTime12to24:()=>ar,createDashboardGroup:()=>qt,createDashboardLink:()=>$,createOfflineVisitForPatient:()=>bn,drugCustomRepresentation:()=>In,getDrugOrderByUuid:()=>Fn,getOfflineVisitForPatient:()=>gn,getPatientSummaryOrder:()=>Jn,getPatientUuidFromUrl:()=>Zt,launchFormEntry:()=>hr,launchFormEntryOrHtmlForms:()=>fr,launchPatientChartWithWorkspaceOpen:()=>dr,launchPatientWorkspace:()=>cr,launchStartVisitPrompt:()=>Gt,postOrders:()=>Bn,registerNavGroup:()=>Qt,time12HourFormatRegex:()=>rr,useActivePatientEnrollment:()=>tr,useAllowedFileExtensions:()=>gr,useAutoCreatedOfflineVisit:()=>hn,useLaunchWorkspaceRequiringVisit:()=>ur,useNavGroups:()=>Jt,useOfflineVisit:()=>fn,useOrderBasket:()=>Dn,useOrderTypes:()=>Hn,usePaginationInfo:()=>Un,usePatientOrders:()=>jn,useSystemVisitSetting:()=>lr,useVisitOrOfflineVisit:()=>mn,visitSyncType:()=>pn});var r=n(268),a=n.n(r),o=n(9035),i=n.n(o),l=n(2870),s=n(1354),c=n.n(s),d=n(1583),u=n.n(d),p=n(7378),m=n.n(p),f=n(5993),h=n.n(f),g=n(4154),A=n.n(g),b=n(8141),v=n.n(b),y=n(3810),_={};_.styleTagTransform=v(),_.setAttributes=h(),_.insert=m().bind(null,"head"),_.domAPI=u(),_.insertStyleElement=A(),c()(y.Z,_);const C=y.Z&&y.Z.locals?y.Z.locals:void 0;function w(e){var t=e.title,n=e.children,r="tablet"===(0,l.useLayoutType)();return a().createElement("div",{className:i()(r?C.tabletHeader:C.desktopHeader)},a().createElement("h4",null,t),n)}var E=n(8744);var x=n(4924),k=function(e){var t=e.path,n=e.title,o=e.basePath,s=e.moduleName,c=void 0===s?"@openmrs/esm-patient-chart-app":s,d=(0,x.useTranslation)(c).t,u=(0,E.useLocation)(),p=(0,r.useMemo)((function(){return decodeURIComponent((e=u.pathname.split("/"),(t=null==e?0:e.length)?e[t-1]:void 0));var e,t}),[u.pathname]);return a().createElement("div",{key:t},a().createElement(l.ConfigurableLink,{className:i()("cds--side-nav__link",{"active-left-nav-link":t===p}),to:"".concat(o,"/").concat(encodeURIComponent(t))},d(n)))},$=function(e){return function(t){var n=t.basePath;return a().createElement(E.BrowserRouter,null,a().createElement(k,{basePath:n,title:e.title,path:e.path,moduleName:e.moduleName}))}},D=n(145);function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O.apply(this,arguments)}D.TS({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0,"enable-experimental-tile-contrast":!1});const S=a().createContext("cds");function N(){return a().useContext(S)}var T=n(3980),B=n.n(T);const M=(0,r.createContext)({disabled:!1}),z=e=>{let{disabled:t,children:n}=e;return a().createElement(M.Provider,{value:{disabled:t}},n)};function P(e){let{align:t="end",children:n,className:r,disabled:o=!1,isFlush:l=!1,size:s,...c}=e;const d=N(),u=i()(`${d}--accordion`,r,{[`${d}--accordion--${t}`]:t,[`${d}--accordion--${s}`]:s,[`${d}--layout--size-${s}`]:s,[`${d}--accordion--flush`]:l&&"start"!==t});return a().createElement(z,{disabled:o},a().createElement("ul",O({className:u},c),n))}function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){I(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function I(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}P.propTypes={align:B().oneOf(["start","end"]),children:B().node,className:B().string,disabled:B().bool,isFlush:B().bool,size:B().oneOf(["sm","md","lg"])};var H=["width","height","viewBox"],F=["tabindex"],V={focusable:"false",preserveAspectRatio:"xMidYMid meet"};const U=a().forwardRef((function(e,t){let{className:n,children:r,tabIndex:o,xmlns:i="http://www.w3.org/2000/svg",preserveAspectRatio:l="xMidYMid meet",...s}=e;const{tabindex:c,...d}=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height,r=e.viewBox,a=void 0===r?"0 0 ".concat(t," ").concat(n):r,o=j(e,H),i=o.tabindex,l=j(o,F),s=R(R(R({},V),l),{},{width:t,height:n,viewBox:a});return s["aria-label"]||s["aria-labelledby"]||s.title?(s.role="img",null!=i&&(s.focusable="true",s.tabindex=i)):s["aria-hidden"]=!0,s}({...s,tabindex:o}),u=d;return n&&(u.className=n),null!=c&&(u.tabIndex="number"==typeof c?c:Number(o)),t&&(u.ref=t),i&&(u.xmlns=i),l&&(u.preserveAspectRatio=l),a().createElement("svg",u,r)}));var Z,G,W,q,K,X,Q,Y,J;U.displayName="Icon",U.propTypes={"aria-hidden":B().oneOfType([B().bool,B().oneOf(["true","false"])]),"aria-label":B().string,"aria-labelledby":B().string,children:B().node,className:B().string,height:B().oneOfType([B().number,B().string]),preserveAspectRatio:B().string,tabIndex:B().oneOfType([B().number,B().string]),viewBox:B().string,width:B().oneOfType([B().number,B().string]),xmlns:B().string};const ee=a().forwardRef((function(e,t){let{children:n,size:r=16,...o}=e;return a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Z||(Z=a().createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM6,26V6H26V26Z"})),n)})),te=a().forwardRef((function(e,t){let{children:n,size:r=16,...o}=e;return a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},G||(G=a().createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM14,21.5,9,16.5427,10.5908,15,14,18.3456,21.4087,11l1.5918,1.5772Z"})),W||(W=a().createElement("path",{fill:"none",d:"M14,21.5,9,16.5427,10.5908,15,14,18.3456,21.4087,11l1.5918,1.5772Z","data-icon-path":"inner-path"})),n)})),ne=a().forwardRef((function(e,t){let{children:n,size:r=16,...o}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 6",fill:"currentColor",...o},q||(q=a().createElement("path",{d:"M5 6L0 1 0.7 0.3 5 4.6 9.3 0.3 10 1z"})),n):16===r||"16"===r||"16px"===r?a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...o},K||(K=a().createElement("path",{d:"M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"})),n):a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},X||(X=a().createElement("path",{d:"M16 22L6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"})),n)})),re=a().forwardRef((function(e,t){let{children:n,size:r=16,...o}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...o},Q||(Q=a().createElement("path",{d:"M6 5L1 10 0.3 9.3 4.6 5 0.3 0.7 1 0z"})),n):16===r||"16"===r||"16px"===r?a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...o},Y||(Y=a().createElement("path",{d:"M11 8L6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"})),n):a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},J||(J=a().createElement("path",{d:"M22 16L12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"})),n)}));function ae(){let e=0;return function(){return++e}}const oe=!("undefined"==typeof window||!window.document||!window.document.createElement),ie=a().createContext(null),le=ae(),se=oe?r.useLayoutEffect:r.useEffect;let ce=!1;function de(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";const t=a().useContext(ie),[n,o]=(0,r.useState)((()=>ce?`${t?`${t}-`:""}${e}-${le()}`:null));if(se((()=>{null===n&&o(`${t?`${t}-`:""}${e}-${le()}`)}),[le]),(0,r.useEffect)((()=>{!1===ce&&(ce=!0)}),[]),"function"==typeof a().useId){const n=function(e,t){return`${e?`${e}-`:""}${t}-${a().useId()}`}(t,e);return n}return n}const ue={};function pe(e,t){return function(t,n,r){if(void 0!==t[n]){ue[r]&&ue[r][n]||(ue[r]={...ue[r],[n]:!0});for(var a=arguments.length,o=new Array(a>3?a-3:0),i=3;i<a;i++)o[i-3]=arguments[i];return e(t,n,r,...o)}}}const me=(0,r.createContext)(null);function fe(e){let{as:t,children:n,dir:o="auto",...i}=e;const l=(0,r.useContext)(me),s={},c=t??"span",d={...l};if(l){const{direction:e,getTextDirection:t}=l;if(t&&t.current){const r=function(e){if("string"==typeof e)return e;const t=a().Children.map(e,(e=>"string"==typeof e?e:null))?.filter((e=>null!==e));return 1===t?.length?t[0]:t}(n),o=t.current(r);e!==o?(s.dir=o,d.direction=o):"auto"===e&&(s.dir=o)}else e!==o?(s.dir=o,d.direction=o):"auto"===e&&(s.dir=o)}else s.dir=o,d.direction=o;return a().createElement(me.Provider,{value:d},a().createElement(c,O({},i,s),n))}function he(e,t){for(let n=0;n<t.length;n++)if(ge(e,t[n]))return!0;return!1}function ge(e){let{key:t,which:n,keyCode:r,code:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e?e===t:"number"==typeof e?e===n||e===r:e.key&&Array.isArray(t)?-1!==t.indexOf(e.key):e.key===t||e.which===n||e.keyCode===r||e.code===a}fe.propTypes={as:B().oneOfType([B().func,B().string,B().elementType]),children:B().node.isRequired,dir:B().oneOf(["ltr","rtl","auto"])};const Ae={key:"Enter",which:13,keyCode:13,code:"Enter"},be={key:["Escape","Esc"],which:27,keyCode:27,code:"Esc"},ve={key:" ",which:32,keyCode:32,code:"Space"},ye=e=>a().createElement("button",O({type:"button"},e));function _e(e){let{children:t,className:n="",open:o=!1,onHeadingClick:l,renderExpando:s=ye,renderToggle:c,title:d="title",disabled:u,handleAnimationEnd:p,...m}=e;const[f,h]=(0,r.useState)(o),[g,A]=(0,r.useState)(o),b=(0,r.useContext)(M),v="boolean"==typeof u?u:b.disabled,y=de("accordion-item"),_=N(),C=i()({[`${_}--accordion__item`]:!0,[`${_}--accordion__item--active`]:f,[`${_}--accordion__item--disabled`]:v,[n]:!!n}),w=c||s,E=(0,r.useRef)(null);return o!==g&&(h(o),A(o)),a().createElement("li",O({className:C},m),a().createElement(w,{disabled:v,"aria-controls":y,"aria-expanded":f,className:`${_}--accordion__heading`,onClick:function(e){if(!E.current)return;E.current.style.maxBlockSize=f?"":E.current.scrollHeight+32+"px";const t=!f;h(t),l&&l({isOpen:t,event:e})},onKeyDown:function(e){f&&ge(e,be)&&h(!1)},type:"button"},a().createElement(re,{className:`${_}--accordion__arrow`}),a().createElement(fe,{as:"div",className:`${_}--accordion__title`},d)),a().createElement("div",{ref:E,className:`${_}--accordion__wrapper`,onTransitionEnd:function(e){p&&p(e)}},a().createElement("div",{id:y,className:`${_}--accordion__content`},t)))}_e.propTypes={children:B().node,className:B().string,disabled:B().bool,onClick:B().func,onHeadingClick:B().func,open:B().bool,renderExpando:pe(B().func),renderToggle:B().func,title:B().node};var Ce="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;const we=e=>(0,r.useCallback)((t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}),e);function Ee(e,t){const n=(0,r.useRef)(null);(0,r.useEffect)((()=>{n.current=t}),[t]),(0,r.useEffect)((()=>{function t(e){n.current&&n.current(e)}return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}}),[e])}const xe=a().createContext({floating:{current:null}}),ke=a().forwardRef((function(e,t){let{isTabTip:n,align:o=(n?"bottom-left":"bottom"),as:l="span",autoAlign:s=!1,caret:c=!n,className:d,children:u,dropShadow:p=!0,highContrast:m=!1,onRequestClose:f,open:h,...g}=e;const A=N(),b=(0,r.useRef)(null),v=(0,r.useRef)(null);Ee("blur",(()=>{h&&f?.()})),Ee("click",(e=>{h&&!v?.current?.contains(e.target)&&f?.()}));const y=(0,r.useMemo)((()=>({floating:b})),[]);n&&(["bottom-left","bottom-right"].includes(o)||(o="bottom-left"));const _=we([t,v]),[C,w]=(0,r.useState)(!1),[E,x]=(0,r.useState)(o),k=i()({[`${A}--popover-container`]:!0,[`${A}--popover--caret`]:c,[`${A}--popover--drop-shadow`]:p,[`${A}--popover--high-contrast`]:m,[`${A}--popover--open`]:h,[`${A}--popover--${E}`]:C&&!n,[`${A}--popover--${o}`]:!C,[`${A}--popover--tab-tip`]:n},d);Ce((()=>{if(!h)return;if(!s||n)return void w(!1);if(!b.current)return;if(!0===C)return;const e=b.current.getBoundingClientRect(),t=e.x<-16,r=e.y<-16,a=e.x+(e.width-16)>document.documentElement.clientWidth,i=e.y+(e.height-16)>document.documentElement.clientHeight;if(!(t||r||a||i))return void w(!1);const l=["top","top-left","right-bottom","right","right-top","bottom-left","bottom","bottom-right","left-top","left","left-bottom","top-right"],c=[o];let d=l[(l.indexOf(o)+1)%l.length];for(;d&&!c.includes(d);)c.push(d),d=l[(l.indexOf(d)+1)%l.length];function u(e){if(!v.current||!b.current)return!1;v.current.classList.add(`${A}--popover--${e}`);const t=b.current.getBoundingClientRect();return t.x<-16||t.y<-16||t.x+(t.width-16)>document.documentElement.clientWidth||t.y+(t.height-16)>document.documentElement.clientHeight?(v.current.classList.remove(`${A}--popover--${e}`),!1):(v.current.classList.remove(`${A}--popover--${e}`),!0)}let p=null;for(let e=0;e<c.length;e++){const t=c[e];if(u(t)){p=t;break}}p&&(w(!0),x(p))}),[C,o,s,A,h,n]);const $=a().Children.map(u,(e=>{const t=e;if("button"===t?.type){const{className:e}=t.props,n=i()(`${A}--popover--tab-tip__button`,e);return a().cloneElement(t,{className:n})}return t})),D=l;return a().createElement(xe.Provider,{value:y},a().createElement(D,O({},g,{className:k,ref:_}),n?$:u))}));function $e(e,t){let{className:n,children:r,...o}=e;const l=N(),{floating:s}=a().useContext(xe),c=we([s,t]);return a().createElement("span",O({},o,{className:`${l}--popover`}),a().createElement("span",{className:i()(`${l}--popover-content`,n),ref:c},r),a().createElement("span",{className:`${l}--popover-caret`}))}ke.propTypes={align:B().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top"]),as:B().oneOfType([B().string,B().elementType]),autoAlign:B().bool,caret:B().bool,children:B().node,className:B().string,dropShadow:B().bool,highContrast:B().bool,isTabTip:B().bool,onRequestClose:B().func,open:B().bool.isRequired};const De=a().forwardRef($e);function Oe(e){if(!e||!e.childNodes)return null;if(function(e){if(void 0===e.tabIndex||e.tabIndex<0)return!1;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!==e.rel;case"INPUT":return"hidden"!==e.type;default:return!0}}(e))return e;for(const t of e.childNodes){const e=Oe(t);if(e)return e}return null}function Se(e){if(!e||!e.childNodes)return null;if(e?.getAttribute?.("role")&&""!==e.getAttribute("role"))return e;for(const t of e.childNodes){const e=Se(t);if(e)return e}return null}De.propTypes={children:B().node,className:B().string};const Ne=new Set(["mouseup","touchend","touchcancel"]);function Te(e){let{align:t="top",className:n,children:o,label:l,description:s,enterDelayMs:c=100,leaveDelayMs:d=300,defaultOpen:u=!1,closeOnActivation:p=!1,...m}=e;const f=(0,r.useRef)(null),h=(0,r.useRef)(null),[g,A]=function(e){const[t,n]=(0,r.useState)(e),a=(0,r.useRef)(null),o=(0,r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;window.clearTimeout(a.current??void 0),a.current=null,0!==t?a.current=window.setTimeout((()=>{n(e),a.current=null}),t):n(e)}),[]);return(0,r.useEffect)((()=>()=>{window.clearTimeout(a.current??void 0)}),[]),[t,o]}(u),[b,v]=(0,r.useState)(!1),[y,_]=(0,r.useState)(!1),C=de("tooltip"),w=N(),E=a().Children.only(o),x={onFocus:()=>A(!0),onBlur:()=>A(!1),onClick:()=>p&&A(!1),onMouseEnter:function(){_(!0),A(!0,c)},onMouseLeave:k,onMouseDown:$,onMouseMove:function(e){1===e.buttons?v(!0):v(!1)},onTouchStart:$};function k(){_(!1),b||A(!1,d)}function $(){v(!0)}l?x["aria-labelledby"]=C:x["aria-describedby"]=C;const D=(0,r.useCallback)((()=>{v(!1),y||A(!1,d)}),[y,d,A]);return(0,r.useEffect)((()=>(b&&Ne.forEach((e=>{document.addEventListener(e,D)})),()=>{Ne.forEach((e=>{document.removeEventListener(e,D)}))})),[b,D]),a().createElement(ke,O({},m,{align:t,className:i()(`${w}--tooltip`,n),dropShadow:!1,highContrast:!0,onKeyDown:function(e){g&&ge(e,be)&&(e.stopPropagation(),A(!1)),g&&p&&(ge(e,Ae)||ge(e,ve))&&A(!1)},onMouseLeave:k,open:g,ref:f}),a().createElement("div",{className:`${w}--tooltip-trigger__wrapper`},void 0!==E?a().cloneElement(E,{...x,...function(e){const t=Object.keys(x).filter((e=>e.startsWith("on"))),n={};return t.forEach((t=>{n[t]=n=>{x[t](n),e?.[t]&&e?.[t](n)}})),n}(E.props)}):null),a().createElement(De,{"aria-hidden":g?"false":"true",className:`${w}--tooltip-content`,id:C,ref:h,role:"tooltip"},l||s))}Te.propTypes={align:B().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top"]),children:B().node,className:B().string,closeOnActivation:B().bool,defaultOpen:B().bool,description:B().node,enterDelayMs:B().number,label:B().node,leaveDelayMs:B().number};const Be=a().forwardRef((function(e,t){let{align:n,children:r,className:o,closeOnActivation:l=!0,defaultOpen:s=!1,disabled:c,enterDelayMs:d=100,kind:u,label:p,leaveDelayMs:m=100,wrapperClasses:f,size:h,isSelected:g,...A}=e;const b=N(),v=i()(f,`${b}--icon-tooltip`,{[`${b}--icon-tooltip--disabled`]:c});return a().createElement(Te,{align:n,closeOnActivation:l,className:v,defaultOpen:s,enterDelayMs:d,label:p,leaveDelayMs:m},a().createElement(ze,O({},A,{disabled:c,kind:u,ref:t,size:h,className:i()(`${b}--btn--icon-only`,{[`${b}--btn--selected`]:g},o)}),r))}));Be.propTypes={align:B().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right"]),children:B().node,className:B().string,closeOnActivation:B().bool,defaultOpen:B().bool,disabled:B().bool,enterDelayMs:B().number,isSelected:B().bool,kind:B().oneOf(["primary","secondary","ghost","tertiary"]),label:B().node.isRequired,leaveDelayMs:B().number,size:B().oneOf(["sm","md","lg"]),wrapperClasses:B().string};const Me=e=>function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];for(let n=0;n<e.length&&!t.defaultPrevented;n++){const a=e[n];"function"==typeof a&&a(t,...r)}},ze=a().forwardRef((function(e,t){let{as:n,children:o,className:l,dangerDescription:s="danger",disabled:c=!1,hasIconOnly:d=!1,href:u,iconDescription:p,isExpressive:m=!1,isSelected:f,kind:h="primary",onBlur:g,onClick:A,onFocus:b,onMouseEnter:v,onMouseLeave:y,renderIcon:_,size:C,tabIndex:w,tooltipAlignment:E="center",tooltipPosition:x="top",type:k="button",...$}=e;const D=(0,r.useRef)(null),S=N(),T=e=>{e.target===D.current&&e.preventDefault()},B={tabIndex:w,className:i()(l,{[`${S}--btn`]:!0,[`${S}--btn--sm`]:"sm"===C&&!m,[`${S}--btn--md`]:"md"===C&&!m,[`${S}--btn--xl`]:"xl"===C,[`${S}--btn--2xl`]:"2xl"===C,[`${S}--layout--size-${C}`]:C,[`${S}--btn--${h}`]:h,[`${S}--btn--disabled`]:c,[`${S}--btn--expressive`]:m,[`${S}--btn--icon-only`]:d,[`${S}--btn--selected`]:d&&f&&"ghost"===h}),ref:t},M=_?a().createElement(_,{"aria-label":p,className:`${S}--btn__icon`,"aria-hidden":"true"}):null,z=_?a().createElement(_,null):null,P=["danger","danger--tertiary","danger--ghost"];let L="button";const R=de("danger-description"),{"aria-pressed":I}=$;let j={disabled:c,type:k,"aria-describedby":P.includes(h)?R:void 0,"aria-pressed":I??(d&&"ghost"===h?f:void 0)};const H={href:u};let F=null;if(P.includes(h)&&(F=a().createElement("span",{id:R,className:`${S}--visually-hidden`},s)),n?(L=n,j={...j,...H}):u&&!c&&(L="a",j=H),function(e,t){return!0===e}(d)){let e;return"top"!==x&&"bottom"!==x||("center"===E&&(e=x),"end"===E&&(e=`${x}-right`),"start"===E&&(e=`${x}-left`)),"right"!==x&&"left"!==x||(e=x),a().createElement(Be,O({as:n,align:e,label:p,kind:h,size:C,onMouseEnter:v,onMouseLeave:y,onFocus:b,onBlur:g,onClick:Me([A,T])},$,B,j),z??o)}return a().createElement(L,{onMouseEnter:v,onMouseLeave:y,onFocus:b,onBlur:g,onClick:A,...$,...B,...j},F,o,M)}));var Pe,Le,Re,Ie;ze.displayName="Button",ze.propTypes={as:B().oneOfType([B().func,B().string,B().elementType]),children:B().node,className:B().string,dangerDescription:B().string,disabled:B().bool,hasIconOnly:B().bool,href:B().string,iconDescription:e=>!e.renderIcon||e.children||e.iconDescription?null:new Error("renderIcon property specified without also providing an iconDescription property."),isExpressive:B().bool,isSelected:B().bool,kind:B().oneOf(["primary","secondary","danger","ghost","danger--primary","danger--ghost","danger--tertiary","tertiary"]),onBlur:B().func,onClick:B().func,onFocus:B().func,onMouseEnter:B().func,onMouseLeave:B().func,renderIcon:B().oneOfType([B().func,B().object]),role:B().string,size:B().oneOf(["sm","md","lg","xl","2xl"]),tabIndex:B().number,tooltipAlignment:B().oneOf(["start","center","end"]),tooltipPosition:B().oneOf(["top","right","bottom","left"]),type:B().oneOf(["button","reset","submit"])};const je=a().forwardRef((function(e,t){let{children:n,size:r=16,...o}=e;return 16===r||"16"===r||"16px"===r?a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...o},Pe||(Pe=a().createElement("path",{d:"M9.3 3.7L13.1 7.5 1 7.5 1 8.5 13.1 8.5 9.3 12.3 10 13 15 8 10 3z"})),n):20===r||"20"===r||"20px"===r?a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...o},Le||(Le=a().createElement("path",{d:"M11.8 2.8L10.8 3.8 16.2 9.3 1 9.3 1 10.7 16.2 10.7 10.8 16.2 11.8 17.2 19 10z"})),n):24===r||"24"===r||"24px"===r?a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...o},Re||(Re=a().createElement("path",{d:"M14 4L12.9 5.1 18.9 11.2 2 11.2 2 12.8 18.9 12.8 12.9 18.9 14 20 22 12z"})),n):a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Ie||(Ie=a().createElement("path",{d:"M18 6L16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6z"})),n)}));var He;const Fe=a().forwardRef((function(e,t){let{children:n,size:r=16,...o}=e;return a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},He||(He=a().createElement("path",{d:"M2,16H2A14,14,0,1,0,16,2,14,14,0,0,0,2,16Zm23.15,7.75L8.25,6.85a12,12,0,0,1,16.9,16.9ZM8.24,25.16A12,12,0,0,1,6.84,8.27L23.73,25.16a12,12,0,0,1-15.49,0Z"})),n)})),Ve=a().forwardRef((function(e,t){let{as:n,children:r,className:o,href:l,disabled:s=!1,inline:c=!1,visited:d=!1,renderIcon:u,size:p,target:m,...f}=e;const h=N(),g=i()(`${h}--link`,o,{[`${h}--link--disabled`]:s,[`${h}--link--inline`]:c,[`${h}--link--visited`]:d,[`${h}--link--${p}`]:p}),A={className:n?void 0:g,rel:"_blank"===m?"noopener":void 0,target:m};s?(A.role="link",A["aria-disabled"]=!0):A.href=l;const b=n??"a";return a().createElement(b,O({ref:t},A,f),r,!c&&u&&a().createElement("div",{className:`${h}--link__icon`},a().createElement(u,null)))}));Ve.displayName="Link",Ve.propTypes={as:B().string,children:B().node,className:B().string,disabled:B().bool,href:B().string,inline:B().bool,renderIcon:B().oneOfType([B().func,B().object]),size:B().oneOf(["sm","md","lg"]),visited:B().bool};const Ue=(0,r.createContext)(D.TP);var Ze,Ge,We,qe,Ke,Xe;B().node,B().objectOf(B().bool);const Qe=a().forwardRef((function(e,t){let{children:n,className:r,light:o=!1,slug:l,hasRoundedCorners:s=!1,...c}=e;const d=N(),u=i()(`${d}--tile`,{[`${d}--tile--light`]:o,[`${d}--tile--slug`]:l,[`${d}--tile--slug-rounded`]:l&&s},r);return a().createElement("div",O({className:u,ref:t},c),n,l)}));Qe.displayName="Tile",Qe.propTypes={children:B().node,className:B().string,hasRoundedCorners:B().bool,light:pe(B().bool),slug:B().node};const Ye=a().forwardRef((function(e,t){let{children:n,className:o,clicked:l=!1,disabled:s,href:c,light:d,onClick:u=(()=>{}),onKeyDown:p=(()=>{}),renderIcon:m,hasRoundedCorners:f,slug:h,...g}=e;const A=N(),b=i()(`${A}--tile`,`${A}--tile--clickable`,{[`${A}--tile--is-clicked`]:l,[`${A}--tile--light`]:d,[`${A}--tile--slug`]:h,[`${A}--tile--slug-rounded`]:h&&f},o),[v,y]=(0,r.useState)(l),_=a().createElement("svg",{className:`${A}--tile--slug-icon`,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ze||(Ze=a().createElement("rect",{x:"0.5",y:"0.5",width:"23",height:"23"})),Ge||(Ge=a().createElement("path",{d:"M13.2436 16H11.5996L10.9276 13.864H7.95164L7.29164 16H5.68364L8.49164 7.624H10.4596L13.2436 16ZM10.5436 12.508L9.46364 9.064H9.40364L8.33564 12.508H10.5436ZM17.9341 16H14.1301V14.728H15.2341V8.896H14.1301V7.624H17.9341V8.896H16.8181V14.728H17.9341V16Z",fill:"#161616"}))),C=("enable-v12-tile-default-icons",(0,r.useContext)(Ue).enabled("enable-v12-tile-default-icons"));C&&(m||(m=je),s&&(m=Fe));const w=i()({[`${A}--tile--icon`]:!C||C&&!s,[`${A}--tile--disabled-icon`]:C&&s});return a().createElement(Ve,O({className:b,href:c,tabIndex:c||s?void 0:0,onClick:s?void 0:function(e){e?.persist?.(),y(!v),u(e)},onKeyDown:function(e){e?.persist?.(),he(e,[Ae,ve])&&y(!v),p(e)},ref:t,disabled:s},g),h?a().createElement("div",{className:`${A}--tile-content`},n):n,h&&_,m&&a().createElement(m,{className:w,"aria-hidden":"true"}))}));Ye.displayName="ClickableTile",Ye.propTypes={children:B().node,className:B().string,clicked:B().bool,disabled:B().bool,hasRoundedCorners:B().bool,href:B().string,light:pe(B().bool),onClick:B().func,onKeyDown:B().func,rel:B().string,renderIcon:B().oneOfType([B().func,B().object])},a().forwardRef((function(e,t){let{children:n,className:o,disabled:l,id:s,light:c,onClick:d=(()=>{}),onChange:u=(()=>{}),onKeyDown:p=(()=>{}),selected:m=!1,tabIndex:f=0,title:h="title",slug:g,hasRoundedCorners:A,...b}=e;const v=N(),y=d,_=p,[C,w]=(0,r.useState)(m),[E,x]=(0,r.useState)(m),k=i()(`${v}--tile`,`${v}--tile--selectable`,{[`${v}--tile--is-selected`]:C,[`${v}--tile--light`]:c,[`${v}--tile--disabled`]:l,[`${v}--tile--slug`]:g,[`${v}--tile--slug-rounded`]:g&&A},o);m!==E&&(w(m),x(m));const $=(0,r.useRef)(null);let D;return g&&"Slug"===g.type?.displayName&&(D=a().cloneElement(g,{size:"xs",ref:$})),a().createElement("div",O({className:k,onClick:l?void 0:function(e){e.preventDefault(),e?.persist?.(),g&&$.current&&$.current.contains(e.target)||(w(!C),y(e),u(e))},role:"checkbox","aria-checked":C,onKeyDown:l?void 0:function(e){e?.persist?.(),he(e,[Ae,ve])&&(e.preventDefault(),w(!C),u(e)),_(e)},tabIndex:l?void 0:f,ref:t,id:s,onChange:l?void 0:function(e){w(e.target.checked),u(e)},title:h},b),a().createElement("span",{className:`${v}--tile__checkmark ${v}--tile__checkmark--persistent`},C?We||(We=a().createElement(te,null)):qe||(qe=a().createElement(ee,null))),a().createElement(fe,{as:"label",htmlFor:s,className:`${v}--tile-content`},n),D)})).propTypes={children:B().node,className:B().string,disabled:B().bool,hasRoundedCorners:B().bool,id:B().string,light:pe(B().bool),name:B().string,onChange:B().func,onClick:B().func,onKeyDown:B().func,selected:B().bool,slug:B().node,tabIndex:B().number,title:B().string,value:B().oneOfType([B().string,B().number]).isRequired};const Je=a().forwardRef((function(e,t){let{tabIndex:n=0,className:o,children:l,expanded:s=!1,tileMaxHeight:c=0,tilePadding:d=0,onClick:u,onKeyUp:p,tileCollapsedIconText:m="Interact to expand Tile",tileExpandedIconText:f="Interact to collapse Tile",tileCollapsedLabel:h,tileExpandedLabel:g,light:A,slug:b,hasRoundedCorners:v,...y}=e;const[_,C]=(0,r.useState)(c),[w,E]=(0,r.useState)(d),[x,k]=(0,r.useState)(s),[$,D]=(0,r.useState)(c),[S,T]=(0,r.useState)(d),[B,M]=(0,r.useState)(s),[z,P]=(0,r.useState)(!0),L=(0,r.useRef)(null),R=(0,r.useRef)(null),I=(0,r.useRef)(null),j=(0,r.useRef)(null),H=we([t,j]),F=N();function V(){B&&I.current&&C(I.current.getBoundingClientRect()?.height),L.current&&C(L.current.getBoundingClientRect().height)}function U(e){e?.persist?.(),M(!B),V()}function Z(e){e.target!==j.current&&he(e,[Ae,ve])&&e.preventDefault()}s!==x&&(M(s),k(s),V()),c!==$&&(C(c),D(c)),d!==S&&(E(d),T(d));const G=i()(`${F}--tile`,`${F}--tile--expandable`,{[`${F}--tile--is-expanded`]:B,[`${F}--tile--light`]:A},o),W=i()(`${F}--tile`,`${F}--tile--expandable`,`${F}--tile--expandable--interactive`,{[`${F}--tile--is-expanded`]:B,[`${F}--tile--light`]:A,[`${F}--tile--slug`]:b,[`${F}--tile--slug-rounded`]:b&&v},o),q=i()(`${F}--tile__chevron`,`${F}--tile__chevron--interactive`),K=a().Children.toArray(l);Ce((()=>{if(!j.current||!L.current)return;const e=window.getComputedStyle(j.current,null),{current:t}=L,{height:n}=t.getBoundingClientRect(),r=parseInt(e.getPropertyValue("padding-top"),10),a=parseInt(e.getPropertyValue("padding-bottom"),10);C(n),E(r+a)}),[_]),Ce((()=>{L.current&&R.current&&(Oe(R.current)||Se(R.current)||Oe(L.current)||Se(L.current)||b||P(!1))}),[b]),Ce((()=>{j.current&&(j.current.style.maxHeight=B?"":_+w+"px")}),[B,_,w]),(0,r.useEffect)((()=>{if(!L.current)return;const e=new ResizeObserver((e=>{const[t]=e;C(t.contentRect.height)}));return e.observe(L.current),()=>e.disconnect()}),[]);const X=de("expandable-tile-interactive");let Q;return b&&"Slug"===b.type?.displayName&&(Q=a().cloneElement(b,{size:"xs"})),z?a().createElement("div",O({ref:H,className:W},y),a().createElement("div",{ref:I},Q,a().createElement("div",{ref:L,className:`${F}--tile-content`},K[0]),a().createElement("button",{type:"button","aria-expanded":B,"aria-controls":X,onKeyUp:Me([p,Z]),onClick:Me([u,U]),"aria-label":B?f:m,className:q},Ke||(Ke=a().createElement(ne,null))),a().createElement("div",{ref:R,className:`${F}--tile-content`,id:X},K[1]))):a().createElement("button",O({type:"button",ref:H,className:G,"aria-expanded":B,title:B?f:m},y,{onKeyUp:Me([p,Z]),onClick:Me([u,U]),tabIndex:n}),a().createElement("div",{ref:I},a().createElement("div",{ref:L,className:`${F}--tile-content`},K[0]),a().createElement("div",{className:`${F}--tile__chevron`},a().createElement("span",null,B?g:h),Xe||(Xe=a().createElement(ne,null))),a().createElement("div",{ref:R,className:`${F}--tile-content`},K[1])))}));Je.propTypes={children:B().node,className:B().string,expanded:B().bool,hasRoundedCorners:B().bool,id:B().string,light:pe(B().bool),onClick:B().func,onKeyUp:B().func,slug:B().node,tabIndex:B().number,tileCollapsedIconText:B().string,tileCollapsedLabel:B().string,tileExpandedIconText:B().string,tileExpandedLabel:B().string},Je.displayName="ExpandableTile";const et=a().forwardRef((function(e,t){let{children:n}=e;const r=N();return a().createElement("span",{ref:t,className:`${r}--tile-content__above-the-fold`},n)}));et.propTypes={children:B().node},et.displayName="TileAboveTheFoldContent";const tt=a().forwardRef((function(e,t){let{children:n}=e;const r=N();return a().createElement("span",{ref:t,className:`${r}--tile-content__below-the-fold`},n)}));tt.propTypes={children:B().node},tt.displayName="TileBelowTheFoldContent";const nt=a().createContext(1),rt=["one","two","three"],at=rt.length-1,ot=a().forwardRef((function(e,t){let{as:n="div",className:r,children:o,level:l,...s}=e;const c=a().useContext(nt),d=l??c,u=N(),p=i()(`${u}--layer-${rt[d]}`,r),m=Math.max(0,Math.min(d+1,at)),f=n;return a().createElement(nt.Provider,{value:m},a().createElement(f,O({ref:t},s,{className:p}),o))}));ot.displayName="Layer",ot.propTypes={as:B().oneOfType([B().func,B().string,B().elementType]),children:B().node,className:B().string,level:B().oneOf([0,1,2])};const it=ot;var lt,st,ct,dt;const ut=a().forwardRef((function(e,t){let{children:n,size:r=16,...o}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 5 8",fill:"currentColor",...o},lt||(lt=a().createElement("path",{d:"M5 8L0 4 5 0z"})),n):a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},st||(st=a().createElement("path",{d:"M20 24L10 16 20 8z"})),n)})),pt=a().forwardRef((function(e,t){let{children:n,size:r=16,...o}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 5 8",fill:"currentColor",...o},ct||(ct=a().createElement("path",{d:"M0 0L5 4 0 8z"})),n):a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},dt||(dt=a().createElement("path",{d:"M12 8L22 16 12 24z"})),n)}));var mt,ft,ht,gt,At,bt,vt,yt,_t,Ct,wt;const Et=a().forwardRef((function(e,t){let{children:n,size:r=16,...o}=e;return a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},mt||(mt=a().createElement("path",{fill:"none",d:"M16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Zm-1.125-5h2.25V12h-2.25Z","data-icon-path":"inner-path"})),ft||(ft=a().createElement("path",{d:"M16.002,6.1714h-.004L4.6487,27.9966,4.6506,28H27.3494l.0019-.0034ZM14.875,12h2.25v9h-2.25ZM16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Z"})),ht||(ht=a().createElement("path",{d:"M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"})),n)})),xt=a().forwardRef((function(e,t){let{children:n,size:r=16,...o}=e;return 16===r||"16"===r||"16px"===r?a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...o},gt||(gt=a().createElement("path",{d:"M8,1C4.2,1,1,4.2,1,8s3.2,7,7,7s7-3.1,7-7S11.9,1,8,1z M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2 c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z"})),At||(At=a().createElement("path",{d:"M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8 c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z","data-icon-path":"inner-path",opacity:"0"})),n):20===r||"20"===r||"20px"===r?a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...o},bt||(bt=a().createElement("path",{d:"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1 s1,0.4,1,1S10.6,16,10,16z"})),vt||(vt=a().createElement("path",{d:"M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S10.6,16,10,16z","data-icon-path":"inner-path",opacity:"0"})),n):24===r||"24"===r||"24px"===r?a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...o},yt||(yt=a().createElement("path",{d:"M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11C23,5.9,18.1,1,12,1z M11.1,6h1.8v8h-1.8V6z M12,19.2 c-0.7,0-1.2-0.6-1.2-1.2s0.6-1.2,1.2-1.2s1.2,0.6,1.2,1.2S12.7,19.2,12,19.2z"})),_t||(_t=a().createElement("path",{fill:"none",d:"M13.2,18c0,0.7-0.6,1.2-1.2,1.2s-1.2-0.6-1.2-1.2s0.6-1.2,1.2-1.2S13.2,17.3,13.2,18z M12.9,6 h-1.8v8h1.8V6z","data-icon-path":"inner-path",opacity:"0"})),n):a().createElement(U,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Ct||(Ct=a().createElement("path",{d:"M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14C30,8.3,23.7,2,16,2z M14.9,8h2.2v11h-2.2V8z M16,25 c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22c0.8,0,1.5,0.7,1.5,1.5S16.8,25,16,25z"})),wt||(wt=a().createElement("path",{fill:"none",d:"M17.5,23.5c0,0.8-0.7,1.5-1.5,1.5c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22 C16.8,22,17.5,22.7,17.5,23.5z M17.1,8h-2.2v11h2.2V8z","data-icon-path":"inner-path",opacity:"0"})),n)})),kt=(0,r.createContext)({isFluid:!1}),$t=ae(),Dt=a().forwardRef((function(e,t){let{className:n,id:o,inline:l=!1,labelText:s="Select",disabled:c=!1,children:d,noLabel:u=!1,hideLabel:p=!1,invalid:m=!1,invalidText:f="",helperText:h="",light:g=!1,readOnly:A,size:b,warn:v=!1,warnText:y,onChange:_,slug:C,...w}=e;const E=N(),{isFluid:x}=(0,r.useContext)(kt),[k,$]=(0,r.useState)(!1),[D,S]=(0,r.useState)(""),{current:T}=(0,r.useRef)($t()),B=i()({[`${E}--select`]:!0,[`${E}--select--inline`]:l,[`${E}--select--light`]:g,[`${E}--select--invalid`]:m,[`${E}--select--disabled`]:c,[`${E}--select--readonly`]:A,[`${E}--select--warning`]:v,[`${E}--select--fluid--invalid`]:x&&m,[`${E}--select--fluid--focus`]:x&&k,[`${E}--select--slug`]:C}),M=i()(`${E}--label`,{[`${E}--visually-hidden`]:p,[`${E}--label--disabled`]:c}),z=i()({[`${E}--select-input`]:!0,[`${E}--select-input--${b}`]:b}),P=`${o}-error-msg`,L=m?f:v?y:void 0,R=m||v?a().createElement(fe,{as:"div",className:`${E}--form-requirement`,id:P},L):null,I=i()(`${E}--form__helper-text`,{[`${E}--form__helper-text--disabled`]:c}),j=h?`select-helper-text-${T}`:void 0,H=h?a().createElement(fe,{as:"div",id:j,className:I},h):null,F={};m?F["aria-describedby"]=P:l||x||(F["aria-describedby"]=H?j:void 0);const V=e=>{$("focus"===e.type)},U={onMouseDown:e=>{A&&(e.preventDefault(),e.target.focus())},onKeyDown:e=>{A&&["ArrowDown","ArrowUp"," "].includes(e.key)&&e.preventDefault()}};let Z;C&&"Slug"===C.type?.displayName&&(Z=a().cloneElement(C,{size:"mini"}));const G=a().createElement(a().Fragment,null,a().createElement("select",O({},w,F,{id:o,className:z,disabled:c||void 0,"aria-invalid":m||void 0,"aria-readonly":A||void 0,title:D,onChange:Me([_,e=>{S(e?.target?.value)}])},U,{ref:t}),d),a().createElement(ne,{className:`${E}--select__arrow`}),m&&a().createElement(xt,{className:`${E}--select__invalid-icon`}),!m&&v&&a().createElement(Et,{className:`${E}--select__invalid-icon ${E}--select__invalid-icon--warning`}));return a().createElement("div",{className:i()(`${E}--form-item`,n)},a().createElement("div",{className:B},!u&&a().createElement(fe,{as:"label",htmlFor:o,className:M},s),l&&a().createElement("div",{className:`${E}--select-input--inline__wrapper`},a().createElement("div",{className:`${E}--select-input__wrapper`,"data-invalid":m||null},G),R),!l&&a().createElement("div",{className:`${E}--select-input__wrapper`,"data-invalid":m||null,onFocus:V,onBlur:V},G,Z,x&&a().createElement("hr",{className:`${E}--select__divider`}),x&&R?R:null),l||x||!R?H:R))}));Dt.displayName="Select",Dt.propTypes={children:B().node,className:B().string,defaultValue:B().any,disabled:B().bool,helperText:B().node,hideLabel:B().bool,id:B().string.isRequired,inline:B().bool,invalid:B().bool,invalidText:B().node,labelText:B().node,light:pe(B().bool),noLabel:B().bool,onChange:B().func,readOnly:B().bool,size:B().oneOf(["sm","md","lg"]),slug:B().node,warn:B().bool,warnText:B().node};const Ot=e=>{let{className:t,value:n="",disabled:r=!1,hidden:o=!1,text:l="",...s}=e;const c=N(),d=i()({[`${c}--select-option`]:!0,...t&&{[t]:t}});return a().createElement("option",O({},s,{className:d,value:n,disabled:r,hidden:o}),l)};var St,Nt;function Tt(e){return"object"==typeof e[0]&&null!==e[0]?e:e.map((e=>({text:e,value:e})))}function Bt(e,t){return t&&e.find((e=>t===e.value))?t:e[0].value}Ot.propTypes={className:B().string,disabled:B().bool,hidden:B().bool,text:B().string.isRequired,value:B().any.isRequired};const Mt=a().forwardRef((function(e,t){let{backwardText:n="Previous page",className:o,disabled:l=!1,forwardText:s="Next page",id:c,isLastPage:d=!1,itemText:u=((e,t)=>`${e}–${t} items`),itemRangeText:p=((e,t,n)=>`${e}–${t} of ${n} items`),itemsPerPageText:m="Items per page:",onChange:f,pageNumberText:h="Page Number",pageRangeText:g=((e,t)=>`of ${t} ${1===t?"page":"pages"}`),page:A=1,pageInputDisabled:b,pageSize:v,pageSizeInputDisabled:y,pageSizes:_,pageText:C=((e,t)=>`page ${t?"":e}`),pagesUnknown:w=!1,size:E="md",totalItems:x,...k}=e;const $=N(),D=function(e){const t=de();return e??t}(c),S=(0,r.useRef)(null),T=(0,r.useRef)(null),[B,M]=(0,r.useState)((()=>Tt(_))),[z,P]=(0,r.useState)(_),[L,R]=(0,r.useState)(A),[I,j]=(0,r.useState)(A),[H,F]=(0,r.useState)((()=>Bt(B,v))),[V,U]=(0,r.useState)(v),Z=i()({[`${$}--pagination`]:!0,[`${$}--pagination--${E}`]:E,[o]:!!o}),G=Math.max(Math.ceil(x/H),1),W=l||1===L,q=i()({[`${$}--pagination__button`]:!0,[`${$}--pagination__button--backward`]:!0,[`${$}--pagination__button--no-index`]:W}),K=l||L===G,X=i()({[`${$}--pagination__button`]:!0,[`${$}--pagination__button--forward`]:!0,[`${$}--pagination__button--no-index`]:K}),Q=function(e){let t=1,n=[];for(;t<=e;)n.push(a().createElement(Ot,{key:t,value:t,text:String(t)})),t++;return n}(G);if(A!==I&&(R(A),j(A)),v!==V&&(F(Bt(B,v)),U(v)),!function(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;if(e===t)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(_,z)){const e=Tt(_),t=e.find((e=>e.value===H));t||R(1),M(e),P(_)}return a().createElement("div",O({className:Z,ref:t},k),a().createElement("div",{className:`${$}--pagination__left`},a().createElement("label",{id:`${$}-pagination-select-${D}-count-label`,className:`${$}--pagination__text`,htmlFor:`${$}-pagination-select-${D}`},m),a().createElement(Dt,{id:`${$}-pagination-select-${D}`,className:`${$}--select__item-count`,labelText:"",hideLabel:!0,noLabel:!0,inline:!0,onChange:function(e){const t={pageSize:Number(e.target.value),page:1};R(t.page),F(t.pageSize),f&&f(t)},disabled:y||l,value:H},B.map((e=>a().createElement(Ot,{key:e.value,value:e.value,text:String(e.text)})))),a().createElement("span",{className:`${$}--pagination__text ${$}--pagination__items-count`},w?u(H*(L-1)+1,L*H):p(Math.min(H*(L-1)+1,x),Math.min(L*H,x),x))),a().createElement("div",{className:`${$}--pagination__right`},w?a().createElement("span",{className:`${$}--pagination__text ${$}--pagination__page-text`},w?C(L,w):g(L,G)):null,a().createElement(Dt,{id:`${$}-pagination-select-${D}-right`,className:`${$}--select__page-number`,labelText:`Page number, of ${G} pages`,inline:!0,hideLabel:!0,onChange:function(e){const t=Number(e.target.value);t>0&&t<=Math.max(Math.ceil(x/H),1)&&(R(t),f&&f({page:t,pageSize:H}))},value:L,disabled:b||l},Q),w?null:a().createElement("span",{className:`${$}--pagination__text`},w?C(L,w):g(L,G)),a().createElement("div",{className:`${$}--pagination__control-buttons`},a().createElement(Be,{align:"top",disabled:W,kind:"ghost",className:q,label:n,onClick:function(){const e=L-1;R(e),1===e&&T.current.focus(),f&&f({page:e,pageSize:H,forwardBtnRef:T})},ref:S},St||(St=a().createElement(ut,null))),a().createElement(Be,{align:"top-right",disabled:K||d,kind:"ghost",className:X,label:s,onClick:function(){const e=L+1;R(e),e===G&&S.current.focus(),f&&f({page:e,pageSize:H,backBtnRef:S})},ref:T},Nt||(Nt=a().createElement(pt,null))))))}));Mt.propTypes={backwardText:B().string,className:B().string,disabled:B().bool,forwardText:B().string,id:B().oneOfType([B().string,B().number]),isLastPage:B().bool,itemRangeText:B().func,itemText:B().func,itemsPerPageText:B().string,onChange:B().func,page:B().number,pageInputDisabled:B().bool,pageNumberText:B().string,pageRangeText:B().func,pageSize:B().number,pageSizeInputDisabled:B().bool,pageSizes:B().oneOfType([B().arrayOf(B().number),B().arrayOf(B().shape({text:B().text,value:B().number}))]).isRequired,pageText:B().func,pagesUnknown:B().bool,size:B().oneOf(["sm","md","lg"]),totalItems:B().number};var zt=Mt,Pt=function(e){var t=e.width,n=void 0===t?"64":t,r=e.height,o=void 0===r?"64":r;return a().createElement("svg",{width:n,height:o,viewBox:"0 0 64 64"},a().createElement("title",null,"Empty data illustration"),a().createElement("g",{fill:"none",fillRule:"evenodd"},a().createElement("path",{d:"M38.133 13.186H21.947c-.768.001-1.39.623-1.39 1.391V50.55l-.186.057-3.97 1.216a.743.743 0 01-.927-.493L3.664 12.751a.742.742 0 01.492-.926l6.118-1.874 17.738-5.43 6.119-1.873a.741.741 0 01.926.492L38.076 13l.057.186z",fill:"#F4F4F4"}),a().createElement("path",{d:"M41.664 13L38.026 1.117A1.576 1.576 0 0036.056.07l-8.601 2.633-17.737 5.43-8.603 2.634a1.578 1.578 0 00-1.046 1.97l12.436 40.616a1.58 1.58 0 001.969 1.046l5.897-1.805.185-.057v-.194l-.185.057-5.952 1.822a1.393 1.393 0 01-1.737-.923L.247 12.682a1.39 1.39 0 01.923-1.738L9.772 8.31 27.51 2.881 36.112.247a1.393 1.393 0 011.737.923L41.47 13l.057.186h.193l-.057-.185z",fill:"#8D8D8D"}),a().createElement("path",{d:"M11.378 11.855a.836.836 0 01-.798-.59L9.385 7.361a.835.835 0 01.554-1.042l16.318-4.996a.836.836 0 011.042.554l1.195 3.902a.836.836 0 01-.554 1.043l-16.318 4.995a.831.831 0 01-.244.037z",fill:"#C6C6C6"}),a().createElement("circle",{fill:"#C6C6C6",cx:17.636,cy:2.314,r:1.855}),a().createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:17.636,cy:2.314,r:1.175}),a().createElement("path",{d:"M55.893 53.995H24.544a.79.79 0 01-.788-.789V15.644a.79.79 0 01.788-.788h31.349a.79.79 0 01.788.788v37.562a.79.79 0 01-.788.789z",fill:"#F4F4F4"}),a().createElement("path",{d:"M41.47 13H21.948a1.579 1.579 0 00-1.576 1.577V52.4l.185-.057V14.577c.001-.768.623-1.39 1.391-1.39h19.581L41.471 13zm17.02 0H21.947a1.579 1.579 0 00-1.576 1.577v42.478c0 .87.706 1.576 1.576 1.577H58.49a1.579 1.579 0 001.576-1.577V14.577a1.579 1.579 0 00-1.576-1.576zm1.39 44.055c0 .768-.622 1.39-1.39 1.392H21.947c-.768-.001-1.39-.624-1.39-1.392V14.577c0-.768.622-1.39 1.39-1.39H58.49c.768 0 1.39.622 1.39 1.39v42.478z",fill:"#8D8D8D"}),a().createElement("path",{d:"M48.751 17.082H31.686a.836.836 0 01-.835-.835v-4.081c0-.46.374-.834.835-.835H48.75c.461 0 .834.374.835.835v4.08c0 .462-.374.835-.835.836z",fill:"#C6C6C6"}),a().createElement("circle",{fill:"#C6C6C6",cx:40.218,cy:9.755,r:1.855}),a().createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:40.218,cy:9.755,r:1.13})))},Lt=n(964),Rt={};Rt.styleTagTransform=v(),Rt.setAttributes=h(),Rt.insert=m().bind(null,"head"),Rt.domAPI=u(),Rt.insertStyleElement=A(),c()(Lt.Z,Rt);const It=Lt.Z&&Lt.Z.locals?Lt.Z.locals:void 0;var jt=function(e){var t=(0,x.useTranslation)("@openmrs/esm-patient-chart-app").t,n="tablet"===(0,l.useLayoutType)();return a().createElement(it,null,a().createElement(Qe,{className:It.tile},a().createElement("div",{className:n?It.tabletHeading:It.desktopHeading},a().createElement("h4",null,e.headerTitle)),a().createElement(Pt,null),a().createElement("p",{className:It.content},t("emptyStateText","There are no {{displayText}} to display for this patient",{displayText:e.displayText.toLowerCase()})),a().createElement("p",{className:It.action},e.launchForm&&a().createElement(ze,{onClick:function(){return e.launchForm()},kind:"ghost",size:n?"lg":"sm"},t("record","Record")," ",e.displayText.toLowerCase()))))},Ht=n(6568),Ft={};Ft.styleTagTransform=v(),Ft.setAttributes=h(),Ft.insert=m().bind(null,"head"),Ft.domAPI=u(),Ft.insertStyleElement=A(),c()(Ht.Z,Ft);const Vt=Ht.Z&&Ht.Z.locals?Ht.Z.locals:void 0;var Ut=function(e){var t,n,r=e.error,o=e.headerTitle,i=(0,x.useTranslation)("@openmrs/esm-patient-chart-app").t,s="tablet"===(0,l.useLayoutType)();return a().createElement(it,null,a().createElement(Qe,{className:Vt.tile},a().createElement("div",{className:s?Vt.tabletHeading:Vt.desktopHeading},a().createElement("h4",null,o)),a().createElement("p",{className:Vt.errorMessage},i("error","Error")," ","".concat(null==r||null===(t=r.response)||void 0===t?void 0:t.status,": "),null==r||null===(n=r.response)||void 0===n?void 0:n.statusText),a().createElement("p",{className:Vt.errorCopy},i("errorCopy","Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above."))))};function Zt(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function Gt(){var e=(0,l.showModal)("start-visit-dialog",{closeModal:function(){return e()}})}var Wt=function(e){var t=e.title,n=e.slotName,o=e.basePath,i=e.isExpanded;return(0,r.useEffect)((function(){Qt(n)}),[n]),a().createElement(P,null,a().createElement(_e,{open:null==i||i,title:t,style:{border:"none"}},a().createElement(l.ExtensionSlot,{name:null!=n?n:t,state:{basePath:o}})))},qt=function(e){var t=e.title,n=e.slotName,r=e.isExpanded;return function(e){var o=e.basePath;return a().createElement(Wt,{title:t,slotName:n,basePath:o,isExpanded:r})}};function Kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Xt=(0,l.createGlobalStore)("nav-groups",{navGroups:[]});function Qt(e){var t,n=Xt.getState();Xt.setState({navGroups:[e].concat((t=n.navGroups,function(e){if(Array.isArray(e))return Kt(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return Kt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kt(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))})}var Yt,Jt=(0,l.createUseStore)(Xt),en=new Uint8Array(16);function tn(){if(!Yt&&!(Yt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yt(en)}const nn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var rn=[],an=0;an<256;++an)rn.push((an+256).toString(16).substr(1));const on=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(rn[e[t+0]]+rn[e[t+1]]+rn[e[t+2]]+rn[e[t+3]]+"-"+rn[e[t+4]]+rn[e[t+5]]+"-"+rn[e[t+6]]+rn[e[t+7]]+"-"+rn[e[t+8]]+rn[e[t+9]]+"-"+rn[e[t+10]]+rn[e[t+11]]+rn[e[t+12]]+rn[e[t+13]]+rn[e[t+14]]+rn[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&nn.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n},ln=function(e,t,n){var r=(e=e||{}).random||(e.rng||tn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var a=0;a<16;++a)t[n+a]=r[a];return t}return on(r)};function sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cn(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,a)}function dn(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){cn(o,r,a,i,l,"next",e)}function l(e){cn(o,r,a,i,l,"throw",e)}i(void 0)}))}}var un=function(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(a=2&o[0]?r.return:o[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;switch(r=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,r=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!((a=(a=i.trys).length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],r=0}finally{n=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}},pn="visit";function mn(e){var t=(0,l.useConnectivity)(),n=(0,l.useVisit)(e),r=fn(e);return t?n:r}function fn(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return sn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,r.useState)({data:null,error:null,isLoading:!0}),2),n=t[0],a=t[1];return(0,r.useEffect)((function(){gn(e).then((function(e){a({error:null,data:e?yn(e):null,isLoading:!1})})).catch((function(e){a({error:e,data:null,isLoading:!1})}))}),[e]),{activeVisit:n.data,currentVisit:n.data,isLoading:n.isLoading,isValidating:!1,currentVisitIsRetrospective:!1,error:n.error,mutate:function(){}}}function hn(e,t){var n,a,o=(0,l.useConnectivity)(),i=null===(n=(0,l.useSession)())||void 0===n||null===(a=n.sessionLocation)||void 0===a?void 0:a.uuid,s=fn(e),c=s.currentVisit,d=s.isValidating,u=s.error,p=s.mutate;(0,r.useEffect)((function(){o||d||c||u||bn(e,i,t,new Date).finally((function(){return p()}))}),[o,c,d,u,p,i,t,e])}function gn(e){return An.apply(this,arguments)}function An(){return(An=dn((function(e){return un(this,(function(t){switch(t.label){case 0:return[4,(0,l.getSynchronizationItems)(pn)];case 1:return[2,t.sent().find((function(t){return t.patient===e}))]}}))}))).apply(this,arguments)}function bn(e,t,n,r){return vn.apply(this,arguments)}function vn(){return(vn=dn((function(e,t,n,r){var a,o,i,s;return un(this,(function(c){switch(c.label){case 0:return[4,(0,l.getSynchronizationItems)("patient-registration")];case 1:return a=c.sent(),o=a.some((function(t){return t.fhirPatient.id===e})),i={uuid:ln(),patient:e,startDatetime:r,location:t,visitType:n},s={id:i.uuid,displayName:"Offline visit",patientUuid:e,dependencies:o?[{type:"patient-registration",id:e}]:[]},[4,(0,l.queueSynchronizationItem)(pn,i,s)];case 2:return c.sent(),[2,i]}}))}))).apply(this,arguments)}function yn(e){var t,n;return{uuid:e.uuid,startDatetime:null===(t=e.startDatetime)||void 0===t?void 0:t.toString(),stopDatetime:null===(n=e.stopDatetime)||void 0===n?void 0:n.toString(),encounters:[],visitType:{uuid:e.visitType,display:"Offline"},patient:{uuid:e.patient}}}var _n=(0,l.createGlobalStore)("order-basket",{items:{},postDataPrepFunctions:{}});function Cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function En(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){wn(e,t,n[t])}))}return e}function xn(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}var kn={setOrderBasketItems:function(e,t,n){var r,a=Zt();return Object.keys(e.postDataPrepFunctions).includes(t)||console.warn("Programming error: You must register a postDataPrepFunction for grouping ".concat(t," ")),{items:xn(En({},null==e?void 0:e.items),wn({},a,xn(En({},null==e||null===(r=e.items)||void 0===r?void 0:r[a]),wn({},t,"function"==typeof n?n():n))))}},setPostDataPrepFunctionForGrouping:function(e,t,n){return{postDataPrepFunctions:xn(En({},e.postDataPrepFunctions),wn({},t,n))}}};function $n(e){var t,n,r=null!==(t=null==e?void 0:e.exceptThoseMatching)&&void 0!==t?t:function(){return!1},a=Zt(),o=null!==(n=_n.getState().items[a])&&void 0!==n?n:{},i=Object.fromEntries(Object.entries(o).map((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Cn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2);return[t[0],t[1].filter(r)]})));_n.setState((function(e){return{items:xn(En({},e.items),wn({},a,i))}}))}function Dn(e,t){var n=(0,l.useStoreWithActions)(_n,kn),a=n.items,o=n.postDataPrepFunctions,i=n.setOrderBasketItems,s=n.setPostDataPrepFunctionForGrouping,c=function(e,t){var n,r,a=Zt(),o=null!==(n=null==e?void 0:e[a])&&void 0!==n?n:{};return t?null!==(r=o[t])&&void 0!==r?r:[]:Object.values(o).flat()}(a,e);return(0,r.useEffect)((function(){t&&!o[e]&&s(e,t)}),[t,e,o,s]),"string"==typeof e?{orders:c,clearOrders:$n,setOrders:function(t){return i(e,t)}}:{orders:c,clearOrders:$n,setOrders:function(e,t){i(e,t)}}}function On(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,a)}function Sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Nn=function(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(a=2&o[0]?r.return:o[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;switch(r=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,r=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!((a=(a=i.trys).length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],r=0}finally{n=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}},Tn=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function Bn(e,t){return Mn.apply(this,arguments)}function Mn(){var e;return e=function(e,t){var n,r,a,o,i,l,s,c,d,u,p;return Nn(this,(function(m){switch(m.label){case 0:for(d in n=function(n){var a,o,c;return Nn(this,(function(d){switch(d.label){case 0:a=function(a){var l;return Nn(this,(function(c){switch(c.label){case 0:return l=o[a],[4,zn(i[n](l,r,e),t).catch((function(e){var t,n;s.push((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Sn(e,t,n[t])}))}return e}({},l),n=null!=(n={orderError:e,extractedOrderError:Pn(e)})?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})),t))}))];case 1:return c.sent(),[2]}}))},o=l[n],c=0,d.label=1;case 1:return c<o.length?[5,Tn(a(c))]:[3,4];case 2:d.sent(),d.label=3;case 3:return c++,[3,1];case 4:return[2]}}))},r=Zt(),a=_n.getState(),o=a.items,i=a.postDataPrepFunctions,l=o[r],s=[],c=[],l)c.push(d);u=0,m.label=1;case 1:return u<c.length?(p=c[u],[5,Tn(n(p))]):[3,4];case 2:m.sent(),m.label=3;case 3:return u++,[3,1];case 4:return[2,s]}}))},Mn=function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){On(o,r,a,i,l,"next",e)}function l(e){On(o,r,a,i,l,"throw",e)}i(void 0)}))},Mn.apply(this,arguments)}function zn(e,t){return(0,l.openmrsFetch)("".concat(l.restBaseUrl,"/order"),{method:"POST",signal:null==t?void 0:t.signal,headers:{"Content-Type":"application/json"},body:e})}function Pn(e){var t,n,r,a,o,i,l={message:null===(t=e.responseBody)||void 0===t||null===(n=t.error)||void 0===n?void 0:n.message,fieldErrors:[],globalErrors:null===(r=e.responseBody)||void 0===r||null===(a=r.error)||void 0===a?void 0:a.globalErrors};if(null===(o=e.responseBody)||void 0===o||null===(i=o.error)||void 0===i?void 0:i.fieldErrors){var s,c,d=null===(s=e.responseBody)||void 0===s||null===(c=s.error)||void 0===c?void 0:c.fieldErrors;for(var u in d)d[u].forEach((function(e){l.fieldErrors.push(e.message)}))}return l}var Ln=n(3255),Rn="6f0c9a92-6f24-11e3-af88-005056821db0",In="custom:(uuid,dosingType,orderNumber,accessionNumber,patient:ref,action,careSetting:ref,previousOrder:ref,dateActivated,scheduledDate,dateStopped,autoExpireDate,orderType:ref,encounter:ref,orderer:(uuid,display,person:(display)),orderReason,orderReasonNonCoded,orderType,urgency,instructions,commentToFulfiller,drug:(uuid,display,strength,dosageForm:(display,uuid),concept),dose,doseUnits:ref,frequency:ref,asNeeded,asNeededCondition,quantity,quantityUnits:ref,numRefills,dosingInstructions,duration,durationUnits:ref,route:ref,brandName,dispenseAsWritten)";function jn(e,t,n){var a=(0,Ln.kY)().mutate,o="".concat(l.restBaseUrl,"/order?patient=").concat(e,"&careSetting=").concat(Rn,"&v=full&status=").concat(t),i=n?"".concat(o,"&orderType=").concat(n):o,s=(0,Ln.ZP)(e?i:null,l.openmrsFetch),c=s.data,d=s.error,u=s.isLoading,p=s.isValidating,m=(0,r.useCallback)((function(){return a((function(t){return"string"==typeof t&&t.startsWith("".concat(l.restBaseUrl,"/order?patient=").concat(e))}),c)}),[e,c,a]),f=(0,r.useMemo)((function(){var e,t;return(null==c||null===(e=c.data)||void 0===e?void 0:e.results)?null===(t=c.data.results)||void 0===t?void 0:t.sort((function(e,t){return t.dateActivated>e.dateActivated?1:-1})):null}),[c]);return{data:f,error:d,isLoading:u,isValidating:p,mutate:m}}function Hn(){var e,t="".concat(l.restBaseUrl,"/ordertype"),n=(0,Ln.ZP)(t,l.openmrsFetch),r=n.data,a=n.error,o=n.isLoading,i=n.isValidating;return{data:null==r||null===(e=r.data)||void 0===e?void 0:e.results,error:a,isLoading:o,isValidating:i}}function Fn(e){return(0,l.openmrsFetch)("".concat(l.restBaseUrl,"/order/").concat(e,"?v=").concat(In))}function Vn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Un(e,t,n,a){var o=(0,x.useTranslation)("@openmrs/esm-patient-chart-app").t;return{pageSizes:(0,r.useMemo)((function(){var n,r=Math.ceil(t/e);return isNaN(r)&&(r=0),(n=Array(r).keys(),function(e){if(Array.isArray(e))return Vn(e)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return Vn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vn(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(t){return(t+1)*e}))}),[e,t]),itemsDisplayed:(0,r.useMemo)((function(){return o("paginationItemsCount","{{pageItemsCount}} / {{count}} items",{count:t,pageItemsCount:e>t?t:e*n>t?e*(n-1)+a:e*n})}),[e,t,n,a,o])}}var Zn=n(6525),Gn={};Gn.styleTagTransform=v(),Gn.setAttributes=h(),Gn.insert=m().bind(null,"head"),Gn.domAPI=u(),Gn.insertStyleElement=A(),c()(Zn.Z,Gn);const Wn=Zn.Z&&Zn.Z.locals?Zn.Z.locals:void 0;var qn,Kn=function(e){var t=e.totalItems,n=e.pageSize,r=e.onPageNumberChange,o=e.pageNumber,i=e.dashboardLinkUrl,s=e.currentItems,c=e.dashboardLinkLabel,d=(0,x.useTranslation)("@openmrs/esm-patient-chart-app").t,u=Un(n,t,o,s),p=u.itemsDisplayed,m=u.pageSizes,f="tablet"===(0,l.useLayoutType)();return a().createElement(a().Fragment,null,t>0&&a().createElement("div",{className:f?Wn.tablet:Wn.desktop},a().createElement("div",null,p,i&&a().createElement(l.ConfigurableLink,{to:i,className:Wn.configurableLink},null!=c?c:d("seeAll","See all"))),a().createElement(zt,{className:Wn.pagination,page:o,pageSize:n,pageSizes:m,totalItems:t,onChange:r,pageRangeText:function(e,t){return d("paginationPageText","of {{count}} pages",{count:t})},size:f?"lg":"sm"})))};function Xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Qn,Yn={Vitals:1,Biometrics:2,Conditions:3,Medications:4},Jn=function(e){return null!==(Qn=Yn[e])&&void 0!==Qn?Qn:(qn=Math).max.apply(qn,function(e){if(Array.isArray(e))return Xn(e)}(t=Object.values(Yn))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return Xn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xn(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())+1;var t},er=n(3849),tr=function(e){var t,n=(0,Ln.ZP)("".concat(l.restBaseUrl,"/programenrollment?patient=").concat(e,"&v=").concat("custom:(uuid,display,program,dateEnrolled,dateCompleted,location:(uuid,display))"),l.openmrsFetch),a=n.data,o=n.error,i=n.isLoading,s=(0,r.useMemo)((function(){return null!==(t=null==a?void 0:a.data.results.sort((function(e,t){return t.dateEnrolled>e.dateEnrolled?1:-1})).filter((function(e){return null===e.dateCompleted})))&&void 0!==t?t:[]}),[null==a?void 0:a.data.results]);return{activePatientEnrollment:(0,er.Z)(s,(function(e){var t;return null==e||null===(t=e.program)||void 0===t?void 0:t.uuid})),error:o,isLoading:i}};function nr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var rr=new RegExp(/^(1[0-2]|0?[1-9]):[0-5][0-9]$/),ar=function(e,t){if(!e.match(rr))return[0,0];var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return nr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.split(":").map((function(e){return parseInt(e,10)})),2),r=n[0];return r%=12,"PM"===t&&(r+=12),[r,n[1]]},or=n(9198),ir=n.n(or);function lr(){var e,t=ir()("".concat(l.restBaseUrl,"/systemsetting/visits.enabled?v=custom:(value)"),l.openmrsFetch),n=t.data,a=t.isLoading,o=t.error,i=(0,r.useMemo)((function(){var t;return{systemVisitEnabled:"true"===(null!==(e=null==n||null===(t=n.data)||void 0===t?void 0:t.value)&&void 0!==e?e:"true").toLowerCase(),errorFetchingSystemVisitSetting:o,isLoadingSystemVisitSetting:a}}),[n,a,o]);return i}function sr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cr(e,t){var n=Zt();(0,l.launchWorkspace)(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){sr(e,t,n[t])}))}return e}({patientUuid:n},t))}function dr(e){var t=e.patientUuid,n=e.workspaceName,r=e.dashboardName,a=e.additionalProps;(0,l.navigateAndLaunchWorkspace)({targetUrl:"${openmrsSpaBase}/patient/"+"".concat(t,"/chart")+(r?"/".concat(r):""),workspaceName:n,contextKey:"patient/".concat(t),additionalProps:a})}function ur(e){var t=(0,l.usePatient)().patientUuid,n=lr().systemVisitEnabled,a=mn(t).currentVisit;return(0,r.useCallback)((function(t){!n||a?cr(e,t):Gt()}),[a,n,e])}var pr=n(7279),mr=n(5285);function fr(e,t,n,r,a,o,i,s,c,d){if(r){var u=e.find((function(e){return e.formUuid===n}));(0,pr.Z)(u)?hr(n,t,a,o,r,i,s,c,d):a?(0,l.navigate)({to:"${openmrsBase}/htmlformentryui/htmlform/".concat(u.formEditUiPage,".page?patientId=").concat(t,"&visitId=").concat(r,"&encounterId=").concat(a,"&definitionUiResource=").concat(u.formUiResource,"&returnUrl=").concat(window.location.href)}):(0,l.navigate)({to:"${openmrsBase}/htmlformentryui/htmlform/".concat(u.formUiPage,".page?patientId=").concat(t,"&visitId=").concat(r,"&definitionUiResource=").concat(u.formUiResource,"&returnUrl=").concat(window.location.href)})}else(0,mr.launchStartVisitPrompt)()}function hr(e,t,n,r,a,o,i,l,s){(0,mr.launchPatientWorkspace)("patient-form-entry-workspace",{workspaceTitle:r,mutateForm:s,formInfo:{encounterUuid:n,formUuid:e,patientUuid:t,visitTypeUuid:o,visitUuid:a,visitStartDatetime:i,visitStopDatetime:l}})}function gr(){var e,t,n,r,a="".concat(l.restBaseUrl,"/systemsetting?&v=").concat("custom:(value)","&q=").concat("attachments.allowedFileExtensions"),o=ir()(a,l.openmrsFetch),i=o.data,s=o.error,c=o.isLoading;return{allowedFileExtensions:(null==i||null===(e=i.data)||void 0===e||null===(t=e.results)||void 0===t?void 0:t.length)>0&&(null===(r=null==i||null===(n=i.data)||void 0===n?void 0:n.results[0].value)||void 0===r?void 0:r.toLowerCase().split(","))||void 0,error:s,isLoading:c}}},9035:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,o(n)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=i(t,n));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()}}]);
|