@openmrs/esm-patient-immunizations-app 4.0.1-pre.327 → 4.0.1-pre.335
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 +32 -32
- package/dist/355.js +1 -1
- package/dist/555.js +1 -1
- package/dist/684.js +1 -1
- package/dist/709.js +1 -1
- package/dist/858.js +1 -1
- package/dist/885.js +1 -1
- package/dist/927.js +1 -1
- package/dist/965.js +1 -1
- package/dist/main.js +1 -1
- package/dist/openmrs-esm-patient-immunizations-app.js +1 -1
- package/dist/openmrs-esm-patient-immunizations-app.js.buildmanifest.json +31 -31
- package/dist/openmrs-esm-patient-immunizations-app.old +1 -1
- package/package.json +4 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
[
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
1
|
+
[32m@openmrs/esm-patient-immunizations-app:build[0m: cache hit, replaying output [2mcdc9b8ff2c5b8141[0m
|
|
2
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0massets by chunk 921 KiB (id hint: vendors)
|
|
3
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m assets by status [1m[33m853 KiB[39m[22m [1m[33m[big][39m[22m
|
|
4
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m asset [1m[33m965.js[39m[22m [1m[33m446 KiB[39m[22m [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m [1m[33m[big][39m[22m (id hint: vendors) 1 related asset
|
|
5
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m asset [1m[33m858.js[39m[22m [1m[33m407 KiB[39m[22m [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m [1m[33m[big][39m[22m (id hint: vendors) 1 related asset
|
|
6
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m asset [1m[32m206.js[39m[22m 45.4 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors) 1 related asset
|
|
7
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m asset [1m[32m709.js[39m[22m 19 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors)
|
|
8
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m asset [1m[32m245.js[39m[22m 4.15 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors)
|
|
9
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m+ 11 assets
|
|
10
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0morphan modules 3.99 MiB [1m[33m[orphan][39m[22m 652 modules
|
|
11
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0mruntime modules 39.6 KiB 28 modules
|
|
12
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0mbuilt modules 2.82 MiB (javascript) 252 bytes (consume-shared) 210 bytes (share-init) [1m[33m[built][39m[22m
|
|
13
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m modules by path [1m../../node_modules/[39m[22m 2.68 MiB 93 modules
|
|
14
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m modules by path [1m./[39m[22m 63.8 KiB 13 modules
|
|
15
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m modules by path [1m../esm-patient-common-lib/src/[39m[22m 86 KiB
|
|
16
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m [1m../esm-patient-common-lib/src/index.ts + 44 modules[39m[22m 74.9 KiB [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
17
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m + 5 modules
|
|
18
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m consume-shared-module modules 252 bytes
|
|
19
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m modules by path [1mconsume shared module (default) @openmrs/[39m[22m 126 bytes 3 modules
|
|
20
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m + 3 modules
|
|
21
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m provide-module modules 210 bytes
|
|
22
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m modules by path [1mprovide shared module (default) @openmrs/[39m[22m 84 bytes 2 modules
|
|
23
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m + 3 modules
|
|
24
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m [1mcontainer entry[39m[22m 42 bytes [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
25
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m
|
|
26
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m[1m[33mWARNING[39m[22m in [1masset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
|
|
27
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0mThis can impact web performance.
|
|
28
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0mAssets:
|
|
29
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m 858.js (407 KiB)
|
|
30
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m 965.js (446 KiB)[39m[22m
|
|
31
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0m
|
|
32
|
+
[32m@openmrs/esm-patient-immunizations-app:build: [0mwebpack 5.74.0 compiled with [1m[33m1 warning[39m[22m in 135785 ms
|
package/dist/355.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_openmrs_esm_patient_immunizations_app=self.webpackChunk_openmrs_esm_patient_immunizations_app||[]).push([[355],{2996:(e,t,n)=>{n.d(t,{Z:()=>u});var i=n(9601),r=n.n(i),a=n(2609),o=n.n(a)()(r());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__immunizations-form__immunizationSequenceSelect___MlJNX{margin:1rem 2rem 1rem}.-esm-patient-immunizations__immunizations-form__form___K6IzX{display:flex;flex-direction:column;justify-content:space-between;height:calc(100vh - 6rem)}.-esm-patient-immunizations__immunizations-form__button___L8zJi{height:4rem;display:flex;align-content:flex-start;align-items:baseline;min-width:50%}.-esm-patient-immunizations__immunizations-form__tablet___zycFW{padding:1.5rem 1rem;background-color:#fff}.-esm-patient-immunizations__immunizations-form__desktop___c6k1T{padding:0rem}",""]),o.locals={immunizationSequenceSelect:"-esm-patient-immunizations__immunizations-form__immunizationSequenceSelect___MlJNX",form:"-esm-patient-immunizations__immunizations-form__form___K6IzX",button:"-esm-patient-immunizations__immunizations-form__button___L8zJi",tablet:"-esm-patient-immunizations__immunizations-form__tablet___zycFW",desktop:"-esm-patient-immunizations__immunizations-form__desktop___c6k1T"};const u=o},1756:(e,t,n)=>{n.d(t,{V:()=>d,j:()=>v});var i=n(906),r=n(2449),a=n(772),o=n(468),u=n(4402),c=n(3012),l=n(3939),s=function(e){var t,n,r=null==e?void 0:e.resource,a=null==r?void 0:r.id,o=null==r||null===(t=r.manufacturer)||void 0===t?void 0:t.display,u=null==r?void 0:r.lotNumber,c=(null==r||null===(n=r.protocolApplied)||void 0===n?void 0:n.length)>0&&(null==r?void 0:r.protocolApplied[0]);return{immunizationObsUuid:a,manufacturer:o,lotNumber:u,sequenceLabel:null==c?void 0:c.series,sequenceNumber:null==c?void 0:c.doseNumberPositiveInt,occurrenceDateTime:(0,i.formatDate)(new Date(null==r?void 0:r.occurrenceDateTime)),expirationDate:(0,i.formatDate)(new Date(null==r?void 0:r.expirationDate))}},m=function(e){var t;return(0,r.Z)(null==e||null===(t=e.vaccineCode)||void 0===t?void 0:t.coding,(function(e){return(0,u.Z)(e.system)}))},d=function(e){var t=(0,o.Z)(e.entry,(function(e){var t;return null===(t=m(e.resource))||void 0===t?void 0:t.code}));return(0,c.Z)(t,(function(e){var t,n=(0,c.Z)(e,s),i=m(null===(t=e[0])||void 0===t?void 0:t.resource);return{vaccineName:null==i?void 0:i.display,vaccineUuid:null==i?void 0:i.code,existingDoses:(0,l.Z)(n,[function(e){return(0,a.Z)(e,"occurrenceDateTime")}],["desc"])}}))};function f(e,t){return{type:e,reference:"".concat(e,"/").concat(t)}}var v=function(e,t,n,r){return{resourceType:"Immunization",status:"completed",id:e.immunizationObsUuid,vaccineCode:{coding:[{code:e.vaccineUuid,display:e.vaccineName}]},patient:f("Patient",e.patientUuid),encounter:f("Encounter",t),occurrenceDateTime:(0,i.parseDate)(e.vaccinationDate),expirationDate:(0,i.parseDate)(e.expirationDate),location:f("Location",n),performer:[{actor:f("Practitioner",r)}],manufacturer:{display:e.manufacturer},lotNumber:e.lotNumber,protocolApplied:[{doseNumberPositiveInt:e.currentDose.sequenceNumber,series:e.currentDose.sequenceLabel}]}}},2458:(e,t,n)=>{n.d(t,{s:()=>i});var i=new(n(2444).BehaviorSubject)(null)},5355:(e,t,n)=>{n.r(t),n.d(t,{default:()=>j});var i=n(5529),r=n.n(i),a=n(4924),o=n(9694),u=n(906),c=n(8108),l=n(1756),s=n(2458),m=n(6062),d=n.n(m),f=n(4036),v=n.n(f),p=n(6793),b=n.n(p),y=n(7892),_=n.n(y),g=n(1173),h=n.n(g),S=n(2464),z=n.n(S),D=n(2996),N={};N.styleTagTransform=z(),N.setAttributes=_(),N.insert=b().bind(null,"head"),N.domAPI=v(),N.insertStyleElement=h(),d()(D.Z,N);const O=D.Z&&D.Z.locals?D.Z.locals:void 0;function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){x(e,t,n[t])}))}return e}function q(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 i,r,a=[],o=!0,u=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(a.push(i.value),!t||a.length!==t);o=!0);}catch(e){u=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(u)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return E(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)?E(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.")}()}const j=function(e){var t,n,m=e.patientUuid,d=e.closeWorkspace,f=q((0,i.useState)({vaccineName:"",vaccineUuid:"",immunizationObsUuid:"",vaccinationDate:null,sequences:[],currentDose:{},expirationDate:null,lotNumber:"",manufacturer:"",formChanged:!1}),2),v=f[0],p=f[1],b=function(e,t){return p((function(n){return i=w({},n),r=null!=(r=x({},e,t))?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(r)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n}(Object(r)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(r,e))})),i;var i,r}))},y=(0,a.useTranslation)().t,_=(0,u.useSession)(),g=(0,u.useVisit)(m).currentVisit,h="tablet"===(0,u.useLayoutType)(),S=!!v.immunizationObsUuid,z=!S&&!!v.vaccinationDate,D=S&&v.formChanged;(0,i.useEffect)((function(){var e=s.s.subscribe((function(e){return e&&p(e)}));return function(){return e.unsubscribe()}}),[]);var N,E=r().useCallback((function(e){var t,n;e.preventDefault();var i=null==g?void 0:g.uuid,r=null==_||null===(t=_.sessionLocation)||void 0===t?void 0:t.uuid,a=null==_||null===(n=_.currentProvider)||void 0===n?void 0:n.uuid,o=w({patientUuid:m},v),s=new AbortController;return(0,c.eu)((0,l.j)(o,i,r,a),m,v.immunizationObsUuid,s).then((function(e){201===e.status&&d(),(0,u.showToast)({kind:"success",description:y("vaccinationSaved","Vaccination saved successfully")})}),(function(e){(0,u.showNotification)({title:y("errorSaving","Error saving vaccination"),kind:"error",critical:!0,description:null==e?void 0:e.message})})),function(){return s.abort()}}),[null==_||null===(t=_.sessionLocation)||void 0===t?void 0:t.uuid,d,v,m,null==_||null===(n=_.currentProvider)||void 0===n?void 0:n.uuid,null==g?void 0:g.uuid,y]);return r().createElement(o.l09,{className:O.form,onSubmit:E,"data-testid":"immunization-form"},r().createElement("div",null,r().createElement("h4",{className:O.immunizationSequenceSelect},"".concat(y("vaccine","Vaccine")," : ").concat(null==v?void 0:v.vaccineName)," "),(N=v.sequences)&&(null==N?void 0:N.length)>0&&r().createElement("div",{className:O.immunizationSequenceSelect},r().createElement(o.PhF,{id:"sequence",name:"sequence",value:v.currentDose.sequenceNumber,onChange:function(e){var t=v.sequences.find((function(t){return n=e.target.value,!isNaN(n)&&t.sequenceNumber===parseInt(e.target.value);var n}))||{};b("currentDose",t)},className:"immunizationSequenceSelect",labelText:y("sequence","Sequence")},r().createElement(o.QlF,{text:y("pleaseSelect","Please select"),value:"DEFAULT"},y("pleaseSelect","Please select")),v.sequences.map((function(e){return r().createElement(o.QlF,{key:e.sequenceNumber,text:e.sequenceLabel,value:e.sequenceNumber},y(e.sequenceLabel,e.sequenceLabel))})))),r().createElement("div",{className:O.immunizationSequenceSelect},r().createElement(o.Mtg,{id:"vaccinationDate",className:"vaccinationDate",maxDate:(new Date).toISOString(),dateFormat:"d/m/Y",datePickerType:"single",value:v.vaccinationDate,onChange:function(e){var t=q(e,1)[0];return b("vaccinationDate",t.toISOString())}},r().createElement(o.aj6,{id:"date-picker-calendar-id",placeholder:"dd/mm/yyyy",labelText:y("vaccinationDate","Vaccination Date"),type:"text"}))),r().createElement("div",{className:O.immunizationSequenceSelect},r().createElement(o.Mtg,{id:"vaccinationExpiration",className:"vaccinationExpiration",minDate:(new Date).toISOString(),dateFormat:"d/m/Y",datePickerType:"single",value:v.expirationDate,onChange:function(e){var t=q(e,1)[0];return b("expirationDate",t.toISOString())}},r().createElement(o.aj6,{id:"date-picker-calendar-id",placeholder:"dd/mm/yyyy",labelText:y("expirationDate","Expiration Date"),type:"text"}))),r().createElement("div",{className:O.immunizationSequenceSelect},r().createElement(o.oil,{type:"text",id:"lotNumber",labelText:y("lotNumber","Lot Number"),value:v.lotNumber,onChange:function(e){return b("lotNumber",e.target.value)}})),r().createElement("div",{className:O.immunizationSequenceSelect},r().createElement(o.oil,{type:"text",id:"manufacturer",labelText:y("manufacturer","Manufacturer"),value:v.manufacturer,onChange:function(e){return b("manufacturer",e.target.value)}}))),r().createElement(o.uVA,{className:h?O.tablet:O.desktop},r().createElement(o.zxk,{className:O.button,kind:"secondary",onClick:function(){return d()}},y("cancel","Cancel")),r().createElement(o.zxk,{className:O.button,kind:"primary",disabled:S?!D:!z},y("save","Save"))))}},8108:(e,t,n)=>{n.d(t,{dv:()=>l,eu:()=>s,iX:()=>c}),n(5047);var i=n(9857),r=n(906),a=n(9867),o=n(1756);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function c(){var e,t,n,o=(0,r.useConfig)().immunizationsConfig,c=null==o?void 0:o.vaccinesConceptSet,l=(t=c.split(":"),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,a=[],o=!0,u=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(a.push(i.value),!t||a.length!==t);o=!0);}catch(e){u=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(u)throw r}}return a}}(t,n)||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}}(t,n)||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.")}()),s=l[0],m=l[1],d="/ws/rest/v1/concept?source=".concat(s,"&code=").concat(m,"&v=full"),f="/ws/rest/v1/concept/".concat(c,"?v=full"),v=(0,i.ZP)((e=c,(0,a.Z)(e,":")?d:f),r.openmrsFetch),p=v.data,b=v.error;return{data:p?p.data.results[0]:null,isError:b,isLoading:!p&&!b}}function l(e){var t="".concat(r.fhirBaseUrl,"/Immunization?patient=").concat(e),n=(0,i.ZP)(t,r.openmrsFetch),a=n.data,u=n.error,c=n.isValidating,l=a?(0,o.V)(a.data):null;return{data:a?l:null,isError:u,isLoading:!a&&!u,isValidating:c}}function s(e,t,n,i){var a="".concat(r.fhirBaseUrl,"/Immunization");return n&&(a="".concat(a,"/").concat(n)),(0,r.openmrsFetch)(a,{headers:{"Content-Type":"application/json"},method:"POST",body:e,signal:i.signal})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_openmrs_esm_patient_immunizations_app=self.webpackChunk_openmrs_esm_patient_immunizations_app||[]).push([[355],{2996:(e,t,n)=>{n.d(t,{Z:()=>u});var i=n(9601),r=n.n(i),a=n(2609),o=n.n(a)()(r());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__immunizations-form__immunizationSequenceSelect___MlJNX{margin:1rem 2rem 1rem}.-esm-patient-immunizations__immunizations-form__form___K6IzX{display:flex;flex-direction:column;justify-content:space-between;height:calc(100vh - 6rem)}.-esm-patient-immunizations__immunizations-form__button___L8zJi{height:4rem;display:flex;align-content:flex-start;align-items:baseline;min-width:50%}.-esm-patient-immunizations__immunizations-form__tablet___zycFW{padding:1.5rem 1rem;background-color:#fff}.-esm-patient-immunizations__immunizations-form__desktop___c6k1T{padding:0rem}",""]),o.locals={immunizationSequenceSelect:"-esm-patient-immunizations__immunizations-form__immunizationSequenceSelect___MlJNX",form:"-esm-patient-immunizations__immunizations-form__form___K6IzX",button:"-esm-patient-immunizations__immunizations-form__button___L8zJi",tablet:"-esm-patient-immunizations__immunizations-form__tablet___zycFW",desktop:"-esm-patient-immunizations__immunizations-form__desktop___c6k1T"};const u=o},1756:(e,t,n)=>{n.d(t,{V:()=>d,j:()=>v});var i=n(906),r=n(2449),a=n(772),o=n(468),u=n(4402),c=n(3012),l=n(3939),s=function(e){var t,n,r=null==e?void 0:e.resource,a=null==r?void 0:r.id,o=null==r||null===(t=r.manufacturer)||void 0===t?void 0:t.display,u=null==r?void 0:r.lotNumber,c=(null==r||null===(n=r.protocolApplied)||void 0===n?void 0:n.length)>0&&(null==r?void 0:r.protocolApplied[0]);return{immunizationObsUuid:a,manufacturer:o,lotNumber:u,sequenceLabel:null==c?void 0:c.series,sequenceNumber:null==c?void 0:c.doseNumberPositiveInt,occurrenceDateTime:(0,i.formatDate)(new Date(null==r?void 0:r.occurrenceDateTime)),expirationDate:(0,i.formatDate)(new Date(null==r?void 0:r.expirationDate))}},m=function(e){var t;return(0,r.Z)(null==e||null===(t=e.vaccineCode)||void 0===t?void 0:t.coding,(function(e){return(0,u.Z)(e.system)}))},d=function(e){var t=(0,o.Z)(e.entry,(function(e){var t;return null===(t=m(e.resource))||void 0===t?void 0:t.code}));return(0,c.Z)(t,(function(e){var t,n=(0,c.Z)(e,s),i=m(null===(t=e[0])||void 0===t?void 0:t.resource);return{vaccineName:null==i?void 0:i.display,vaccineUuid:null==i?void 0:i.code,existingDoses:(0,l.Z)(n,[function(e){return(0,a.Z)(e,"occurrenceDateTime")}],["desc"])}}))};function f(e,t){return{type:e,reference:"".concat(e,"/").concat(t)}}var v=function(e,t,n,r){return{resourceType:"Immunization",status:"completed",id:e.immunizationObsUuid,vaccineCode:{coding:[{code:e.vaccineUuid,display:e.vaccineName}]},patient:f("Patient",e.patientUuid),encounter:f("Encounter",t),occurrenceDateTime:(0,i.parseDate)(e.vaccinationDate),expirationDate:(0,i.parseDate)(e.expirationDate),location:f("Location",n),performer:[{actor:f("Practitioner",r)}],manufacturer:{display:e.manufacturer},lotNumber:e.lotNumber,protocolApplied:[{doseNumberPositiveInt:e.currentDose.sequenceNumber,series:e.currentDose.sequenceLabel}]}}},2458:(e,t,n)=>{n.d(t,{s:()=>i});var i=new(n(2444).BehaviorSubject)(null)},5355:(e,t,n)=>{n.r(t),n.d(t,{default:()=>j});var i=n(268),r=n.n(i),a=n(4924),o=n(9694),u=n(906),c=n(8108),l=n(1756),s=n(2458),m=n(6062),d=n.n(m),f=n(4036),v=n.n(f),p=n(6793),b=n.n(p),y=n(7892),_=n.n(y),g=n(1173),h=n.n(g),S=n(2464),z=n.n(S),D=n(2996),N={};N.styleTagTransform=z(),N.setAttributes=_(),N.insert=b().bind(null,"head"),N.domAPI=v(),N.insertStyleElement=h(),d()(D.Z,N);const O=D.Z&&D.Z.locals?D.Z.locals:void 0;function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){x(e,t,n[t])}))}return e}function q(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 i,r,a=[],o=!0,u=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(a.push(i.value),!t||a.length!==t);o=!0);}catch(e){u=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(u)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return E(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)?E(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.")}()}const j=function(e){var t,n,m=e.patientUuid,d=e.closeWorkspace,f=q((0,i.useState)({vaccineName:"",vaccineUuid:"",immunizationObsUuid:"",vaccinationDate:null,sequences:[],currentDose:{},expirationDate:null,lotNumber:"",manufacturer:"",formChanged:!1}),2),v=f[0],p=f[1],b=function(e,t){return p((function(n){return i=w({},n),r=null!=(r=x({},e,t))?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(r)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n}(Object(r)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(r,e))})),i;var i,r}))},y=(0,a.useTranslation)().t,_=(0,u.useSession)(),g=(0,u.useVisit)(m).currentVisit,h="tablet"===(0,u.useLayoutType)(),S=!!v.immunizationObsUuid,z=!S&&!!v.vaccinationDate,D=S&&v.formChanged;(0,i.useEffect)((function(){var e=s.s.subscribe((function(e){return e&&p(e)}));return function(){return e.unsubscribe()}}),[]);var N,E=r().useCallback((function(e){var t,n;e.preventDefault();var i=null==g?void 0:g.uuid,r=null==_||null===(t=_.sessionLocation)||void 0===t?void 0:t.uuid,a=null==_||null===(n=_.currentProvider)||void 0===n?void 0:n.uuid,o=w({patientUuid:m},v),s=new AbortController;return(0,c.eu)((0,l.j)(o,i,r,a),m,v.immunizationObsUuid,s).then((function(e){201===e.status&&d(),(0,u.showToast)({kind:"success",description:y("vaccinationSaved","Vaccination saved successfully")})}),(function(e){(0,u.showNotification)({title:y("errorSaving","Error saving vaccination"),kind:"error",critical:!0,description:null==e?void 0:e.message})})),function(){return s.abort()}}),[null==_||null===(t=_.sessionLocation)||void 0===t?void 0:t.uuid,d,v,m,null==_||null===(n=_.currentProvider)||void 0===n?void 0:n.uuid,null==g?void 0:g.uuid,y]);return r().createElement(o.l09,{className:O.form,onSubmit:E,"data-testid":"immunization-form"},r().createElement("div",null,r().createElement("h4",{className:O.immunizationSequenceSelect},"".concat(y("vaccine","Vaccine")," : ").concat(null==v?void 0:v.vaccineName)," "),(N=v.sequences)&&(null==N?void 0:N.length)>0&&r().createElement("div",{className:O.immunizationSequenceSelect},r().createElement(o.PhF,{id:"sequence",name:"sequence",value:v.currentDose.sequenceNumber,onChange:function(e){var t=v.sequences.find((function(t){return n=e.target.value,!isNaN(n)&&t.sequenceNumber===parseInt(e.target.value);var n}))||{};b("currentDose",t)},className:"immunizationSequenceSelect",labelText:y("sequence","Sequence")},r().createElement(o.QlF,{text:y("pleaseSelect","Please select"),value:"DEFAULT"},y("pleaseSelect","Please select")),v.sequences.map((function(e){return r().createElement(o.QlF,{key:e.sequenceNumber,text:e.sequenceLabel,value:e.sequenceNumber},y(e.sequenceLabel,e.sequenceLabel))})))),r().createElement("div",{className:O.immunizationSequenceSelect},r().createElement(o.Mtg,{id:"vaccinationDate",className:"vaccinationDate",maxDate:(new Date).toISOString(),dateFormat:"d/m/Y",datePickerType:"single",value:v.vaccinationDate,onChange:function(e){var t=q(e,1)[0];return b("vaccinationDate",t.toISOString())}},r().createElement(o.aj6,{id:"date-picker-calendar-id",placeholder:"dd/mm/yyyy",labelText:y("vaccinationDate","Vaccination Date"),type:"text"}))),r().createElement("div",{className:O.immunizationSequenceSelect},r().createElement(o.Mtg,{id:"vaccinationExpiration",className:"vaccinationExpiration",minDate:(new Date).toISOString(),dateFormat:"d/m/Y",datePickerType:"single",value:v.expirationDate,onChange:function(e){var t=q(e,1)[0];return b("expirationDate",t.toISOString())}},r().createElement(o.aj6,{id:"date-picker-calendar-id",placeholder:"dd/mm/yyyy",labelText:y("expirationDate","Expiration Date"),type:"text"}))),r().createElement("div",{className:O.immunizationSequenceSelect},r().createElement(o.oil,{type:"text",id:"lotNumber",labelText:y("lotNumber","Lot Number"),value:v.lotNumber,onChange:function(e){return b("lotNumber",e.target.value)}})),r().createElement("div",{className:O.immunizationSequenceSelect},r().createElement(o.oil,{type:"text",id:"manufacturer",labelText:y("manufacturer","Manufacturer"),value:v.manufacturer,onChange:function(e){return b("manufacturer",e.target.value)}}))),r().createElement(o.uVA,{className:h?O.tablet:O.desktop},r().createElement(o.zxk,{className:O.button,kind:"secondary",onClick:function(){return d()}},y("cancel","Cancel")),r().createElement(o.zxk,{className:O.button,kind:"primary",disabled:S?!D:!z},y("save","Save"))))}},8108:(e,t,n)=>{n.d(t,{dv:()=>l,eu:()=>s,iX:()=>c}),n(5047);var i=n(9857),r=n(906),a=n(9867),o=n(1756);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function c(){var e,t,n,o=(0,r.useConfig)().immunizationsConfig,c=null==o?void 0:o.vaccinesConceptSet,l=(t=c.split(":"),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,a=[],o=!0,u=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(a.push(i.value),!t||a.length!==t);o=!0);}catch(e){u=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(u)throw r}}return a}}(t,n)||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}}(t,n)||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.")}()),s=l[0],m=l[1],d="/ws/rest/v1/concept?source=".concat(s,"&code=").concat(m,"&v=full"),f="/ws/rest/v1/concept/".concat(c,"?v=full"),v=(0,i.ZP)((e=c,(0,a.Z)(e,":")?d:f),r.openmrsFetch),p=v.data,b=v.error;return{data:p?p.data.results[0]:null,isError:b,isLoading:!p&&!b}}function l(e){var t="".concat(r.fhirBaseUrl,"/Immunization?patient=").concat(e),n=(0,i.ZP)(t,r.openmrsFetch),a=n.data,u=n.error,c=n.isValidating,l=a?(0,o.V)(a.data):null;return{data:a?l:null,isError:u,isLoading:!a&&!u,isValidating:c}}function s(e,t,n,i){var a="".concat(r.fhirBaseUrl,"/Immunization");return n&&(a="".concat(a,"/").concat(n)),(0,r.openmrsFetch)(a,{headers:{"Content-Type":"application/json"},method:"POST",body:e,signal:i.signal})}}}]);
|
package/dist/555.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_openmrs_esm_patient_immunizations_app=self.webpackChunk_openmrs_esm_patient_immunizations_app||[]).push([[555],{237:(e,n,t)=>{t.d(n,{Z:()=>c});var i=t(9601),r=t.n(i),a=t(2609),o=t.n(a)()(r());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__immunizations-detailed-summary__widgetCard___THJK4{border:1px solid #e0e0e0}",""]),o.locals={widgetCard:"-esm-patient-immunizations__immunizations-detailed-summary__widgetCard___THJK4"};const c=o},1756:(e,n,t)=>{t.d(n,{V:()=>m,j:()=>p});var i=t(906),r=t(2449),a=t(772),o=t(468),c=t(4402),u=t(3012),s=t(3939),l=function(e){var n,t,r=null==e?void 0:e.resource,a=null==r?void 0:r.id,o=null==r||null===(n=r.manufacturer)||void 0===n?void 0:n.display,c=null==r?void 0:r.lotNumber,u=(null==r||null===(t=r.protocolApplied)||void 0===t?void 0:t.length)>0&&(null==r?void 0:r.protocolApplied[0]);return{immunizationObsUuid:a,manufacturer:o,lotNumber:c,sequenceLabel:null==u?void 0:u.series,sequenceNumber:null==u?void 0:u.doseNumberPositiveInt,occurrenceDateTime:(0,i.formatDate)(new Date(null==r?void 0:r.occurrenceDateTime)),expirationDate:(0,i.formatDate)(new Date(null==r?void 0:r.expirationDate))}},d=function(e){var n;return(0,r.Z)(null==e||null===(n=e.vaccineCode)||void 0===n?void 0:n.coding,(function(e){return(0,c.Z)(e.system)}))},m=function(e){var n=(0,o.Z)(e.entry,(function(e){var n;return null===(n=d(e.resource))||void 0===n?void 0:n.code}));return(0,u.Z)(n,(function(e){var n,t=(0,u.Z)(e,l),i=d(null===(n=e[0])||void 0===n?void 0:n.resource);return{vaccineName:null==i?void 0:i.display,vaccineUuid:null==i?void 0:i.code,existingDoses:(0,s.Z)(t,[function(e){return(0,a.Z)(e,"occurrenceDateTime")}],["desc"])}}))};function v(e,n){return{type:e,reference:"".concat(e,"/").concat(n)}}var p=function(e,n,t,r){return{resourceType:"Immunization",status:"completed",id:e.immunizationObsUuid,vaccineCode:{coding:[{code:e.vaccineUuid,display:e.vaccineName}]},patient:v("Patient",e.patientUuid),encounter:v("Encounter",n),occurrenceDateTime:(0,i.parseDate)(e.vaccinationDate),expirationDate:(0,i.parseDate)(e.expirationDate),location:v("Location",t),performer:[{actor:v("Practitioner",r)}],manufacturer:{display:e.manufacturer},lotNumber:e.lotNumber,protocolApplied:[{doseNumberPositiveInt:e.currentDose.sequenceNumber,series:e.currentDose.sequenceLabel}]}}},2458:(e,n,t)=>{t.d(n,{s:()=>i});var i=new(t(2444).BehaviorSubject)(null)},555:(e,n,t)=>{t.r(n),t.d(n,{default:()=>H});var i=t(
|
|
1
|
+
"use strict";(self.webpackChunk_openmrs_esm_patient_immunizations_app=self.webpackChunk_openmrs_esm_patient_immunizations_app||[]).push([[555],{237:(e,n,t)=>{t.d(n,{Z:()=>c});var i=t(9601),r=t.n(i),a=t(2609),o=t.n(a)()(r());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-immunizations__immunizations-detailed-summary__widgetCard___THJK4{border:1px solid #e0e0e0}",""]),o.locals={widgetCard:"-esm-patient-immunizations__immunizations-detailed-summary__widgetCard___THJK4"};const c=o},1756:(e,n,t)=>{t.d(n,{V:()=>m,j:()=>p});var i=t(906),r=t(2449),a=t(772),o=t(468),c=t(4402),u=t(3012),s=t(3939),l=function(e){var n,t,r=null==e?void 0:e.resource,a=null==r?void 0:r.id,o=null==r||null===(n=r.manufacturer)||void 0===n?void 0:n.display,c=null==r?void 0:r.lotNumber,u=(null==r||null===(t=r.protocolApplied)||void 0===t?void 0:t.length)>0&&(null==r?void 0:r.protocolApplied[0]);return{immunizationObsUuid:a,manufacturer:o,lotNumber:c,sequenceLabel:null==u?void 0:u.series,sequenceNumber:null==u?void 0:u.doseNumberPositiveInt,occurrenceDateTime:(0,i.formatDate)(new Date(null==r?void 0:r.occurrenceDateTime)),expirationDate:(0,i.formatDate)(new Date(null==r?void 0:r.expirationDate))}},d=function(e){var n;return(0,r.Z)(null==e||null===(n=e.vaccineCode)||void 0===n?void 0:n.coding,(function(e){return(0,c.Z)(e.system)}))},m=function(e){var n=(0,o.Z)(e.entry,(function(e){var n;return null===(n=d(e.resource))||void 0===n?void 0:n.code}));return(0,u.Z)(n,(function(e){var n,t=(0,u.Z)(e,l),i=d(null===(n=e[0])||void 0===n?void 0:n.resource);return{vaccineName:null==i?void 0:i.display,vaccineUuid:null==i?void 0:i.code,existingDoses:(0,s.Z)(t,[function(e){return(0,a.Z)(e,"occurrenceDateTime")}],["desc"])}}))};function v(e,n){return{type:e,reference:"".concat(e,"/").concat(n)}}var p=function(e,n,t,r){return{resourceType:"Immunization",status:"completed",id:e.immunizationObsUuid,vaccineCode:{coding:[{code:e.vaccineUuid,display:e.vaccineName}]},patient:v("Patient",e.patientUuid),encounter:v("Encounter",n),occurrenceDateTime:(0,i.parseDate)(e.vaccinationDate),expirationDate:(0,i.parseDate)(e.expirationDate),location:v("Location",t),performer:[{actor:v("Practitioner",r)}],manufacturer:{display:e.manufacturer},lotNumber:e.lotNumber,protocolApplied:[{doseNumberPositiveInt:e.currentDose.sequenceNumber,series:e.currentDose.sequenceLabel}]}}},2458:(e,n,t)=>{t.d(n,{s:()=>i});var i=new(t(2444).BehaviorSubject)(null)},555:(e,n,t)=>{t.r(n),t.d(n,{default:()=>H});var i=t(268),r=t.n(i),a=t(772);const o=function(e){return e&&e.length?e[0]:void 0};var c=t(739),u=t(7210),s=t(4248),l=t(7885),d=t(3282),m=t(4975),v=t(5441),p=t(130),f=Object.prototype.hasOwnProperty;const g=function(e){if(null==e)return!0;if((0,d.Z)(e)&&((0,l.Z)(e)||"string"==typeof e||"function"==typeof e.splice||(0,m.Z)(e)||(0,p.Z)(e)||(0,s.Z)(e)))return!e.length;var n=(0,u.Z)(e);if("[object Map]"==n||"[object Set]"==n)return!e.size;if((0,v.Z)(e))return!(0,c.Z)(e).length;for(var t in e)if(f.call(e,t))return!1;return!0};var b=t(3939),y=t(4924),D=t(9694),h=t(6759),Z=t(6217),w=t(906),T=t(8108),_=t(3012),z=t(2449),x=function(e,n){return new Date(n.occurrenceDateTime).getTime()-new Date(e.occurrenceDateTime).getTime()},C=t(2458),S=t(6062),N=t.n(S),U=t(4036),q=t.n(U),P=t(6793),k=t.n(P),A=t(7892),E=t.n(A),O=t(1173),j=t.n(O),I=t(2464),L=t.n(I),V=t(237),F={};F.styleTagTransform=L(),F.setAttributes=E(),F.insert=k().bind(null,"head"),F.domAPI=q(),F.insertStyleElement=j(),N()(V.Z,F);const M=V.Z&&V.Z.locals?V.Z.locals:void 0;function B(){return B=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},B.apply(this,arguments)}const H=function(e){var n,t,c,u,s,l=e.patientUuid,d=(e.basePath,(0,y.useTranslation)()),m=d.t,v=d.i18n,p=(0,w.useConfig)().immunizationsConfig,f=null==p?void 0:p.sequenceDefinitions,S=m("immunizations","immunizations"),N=m("immunizations","Immunizations"),U=v.language.replace("_","-"),q=(window.spaBase,m("goToSummary","Go to Summary"),(0,T.iX)().data),P=(0,T.dv)(l),k=P.data,A=P.isError,E=P.isLoading,O=P.isValidating,j=(n=f,c=null==(t=q)?void 0:t.setMembers,u=(0,_.Z)(c,(function(e){var t={vaccineName:e.display,vaccineUuid:e.uuid,existingDoses:[]},i=(0,z.Z)(n,(function(n){return n.vaccineConceptUuid===e.uuid}));return t.sequences=null==i?void 0:i.sequences,t})),s=k||[],(0,_.Z)(u,(function(e){var n=(0,z.Z)(s,(function(n){return n.vaccineUuid===e.vaccineUuid}));return n&&(e.existingDoses=n.existingDoses),e}))),I=(0,b.Z)(j,[function(e){return(0,a.Z)(e,"existingDoses.length",0)}],["desc"]),L=r().useCallback((function(){return(0,Z.launchPatientWorkspace)("immunization-form-workspace")}),[]),V=((0,i.useMemo)((function(){return[{key:"vaccine",header:m("vaccine","Vaccine")},{key:"recentVaccination",header:m("recentVaccination","Recent Vaccination")},{key:"add",header:""}]}),[m]),(0,i.useMemo)((function(){return null==I?void 0:I.map((function(e){var n,t,i,a=g(e.sequences)&&!g(e.existingDoses)?"".concat(m("singleDoseOn","Single Dose on")," ").concat(new Date(null===(n=o(e.existingDoses.sort(x)))||void 0===n?void 0:n.occurrenceDateTime).toLocaleDateString(U,{dateStyle:"medium"})):g(e.existingDoses)?"":"".concat(null===(t=o(null==e?void 0:e.sequences))||void 0===t?void 0:t.sequenceLabel," on ").concat(new Date(null===(i=o(e.existingDoses.sort(x)))||void 0===i?void 0:i.occurrenceDateTime).toLocaleDateString(U,{dateStyle:"medium"})," ");return{id:e.vaccineUuid,vaccine:e.vaccineName,recentVaccination:a,add:r().createElement(D.zxk,{kind:"ghost",renderIcon:function(e){return r().createElement(h.mm,B({size:16},e))},iconDescription:"Add",onClick:function(){C.s.next({vaccineName:e.vaccineName,vaccineUuid:e.vaccineUuid,sequences:null==e?void 0:e.sequences,existingDoses:null==e?void 0:e.existingDoses,immunizationObsUuid:null==e?void 0:e.immunizationObsUuid,manufacturer:e.manufacturer,lotNumber:e.lotNumber,expirationDate:e.expirationDate,currentDose:{sequenceLabel:e.sequenceLabel,sequenceNumber:e.sequenceNumber},vaccinationDate:e.occurrenceDateTime,formChanged:e.formChanged}),L()}})}}))}),[I,m,U,L])),F=(0,w.usePagination)(V,10),H=F.results;return F.currentPage,F.goTo,E||!I?r().createElement(D.gqd,{role:"progressbar"}):A?r().createElement(Z.ErrorState,{error:A,headerTitle:N}):((null==I?void 0:I.length)&&(M.widgetCard,Z.CardHeader,O&&D.lSo,D.zxk,m("add","Add"),D.wQF,Z.PatientChartPagination,null==V||V.length,null==H||H.length),r().createElement(Z.EmptyState,{displayText:S,headerTitle:N,launchForm:L}))}},8108:(e,n,t)=>{t.d(n,{dv:()=>s,eu:()=>l,iX:()=>u}),t(5047);var i=t(9857),r=t(906),a=t(9867),o=t(1756);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function u(){var e,n,t,o=(0,r.useConfig)().immunizationsConfig,u=null==o?void 0:o.vaccinesConceptSet,s=(n=u.split(":"),t=2,function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var i,r,a=[],o=!0,c=!1;try{for(t=t.call(e);!(o=(i=t.next()).done)&&(a.push(i.value),!n||a.length!==n);o=!0);}catch(e){c=!0,r=e}finally{try{o||null==t.return||t.return()}finally{if(c)throw r}}return a}}(n,t)||function(e,n){if(e){if("string"==typeof e)return c(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?c(e,n):void 0}}(n,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.")}()),l=s[0],d=s[1],m="/ws/rest/v1/concept?source=".concat(l,"&code=").concat(d,"&v=full"),v="/ws/rest/v1/concept/".concat(u,"?v=full"),p=(0,i.ZP)((e=u,(0,a.Z)(e,":")?m:v),r.openmrsFetch),f=p.data,g=p.error;return{data:f?f.data.results[0]:null,isError:g,isLoading:!f&&!g}}function s(e){var n="".concat(r.fhirBaseUrl,"/Immunization?patient=").concat(e),t=(0,i.ZP)(n,r.openmrsFetch),a=t.data,c=t.error,u=t.isValidating,s=a?(0,o.V)(a.data):null;return{data:a?s:null,isError:c,isLoading:!a&&!c,isValidating:u}}function l(e,n,t,i){var a="".concat(r.fhirBaseUrl,"/Immunization");return t&&(a="".concat(a,"/").concat(t)),(0,r.openmrsFetch)(a,{headers:{"Content-Type":"application/json"},method:"POST",body:e,signal:i.signal})}}}]);
|
package/dist/684.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_openmrs_esm_patient_immunizations_app=self.webpackChunk_openmrs_esm_patient_immunizations_app||[]).push([[684,660],{2684:(e,n,i)=>{"use strict";i.r(n),i.d(n,{backendDependencies:()=>u,importTranslation:()=>c,setupOpenMRS:()=>m,version:()=>r});var t=i(906),s=i(6217),a={immunizationsConfig:{vaccinesConceptSet:{_type:t.Type.String,_default:"CIEL:984",_description:"A uuid or concept mapping which will have all the possible vaccines as set-members."},sequenceDefinitions:{_type:t.Type.Array,_description:"Doses/Schedules definitions for each vaccine configured if applicable. If not provided the vaccine would be treated as a vaccine without schedules",_elements:{vaccineConceptUuid:{_type:t.Type.UUID,_description:"The UUID of the individual vaccine concept"},sequences:{_type:t.Type.Array,_elements:{sequenceLabel:{_type:t.Type.String,_description:"Name of the dose/booster/schedule.. This will be used as a translation key as well."},sequenceNumber:{_type:t.Type.Number,_description:"The dose number in the vaccines. Convention for doses is [1...9] and for boosters is [11...19]"}}}},_default:[{vaccineConceptUuid:"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",sequences:[{sequenceLabel:"Dose-1",sequenceNumber:1},{sequenceLabel:"Dose-2",sequenceNumber:2},{sequenceLabel:"Dose-3",sequenceNumber:3},{sequenceLabel:"Dose-4",sequenceNumber:4},{sequenceLabel:"Booster-1",sequenceNumber:11},{sequenceLabel:"Booster-2",sequenceNumber:12}]}]}}},o={slot:"patient-chart-immunizations-dashboard-slot",columns:1,title:"Immunizations"},r="4.0.
|
|
1
|
+
(self.webpackChunk_openmrs_esm_patient_immunizations_app=self.webpackChunk_openmrs_esm_patient_immunizations_app||[]).push([[684,660],{2684:(e,n,i)=>{"use strict";i.r(n),i.d(n,{backendDependencies:()=>u,importTranslation:()=>c,setupOpenMRS:()=>m,version:()=>r});var t=i(906),s=i(6217),a={immunizationsConfig:{vaccinesConceptSet:{_type:t.Type.String,_default:"CIEL:984",_description:"A uuid or concept mapping which will have all the possible vaccines as set-members."},sequenceDefinitions:{_type:t.Type.Array,_description:"Doses/Schedules definitions for each vaccine configured if applicable. If not provided the vaccine would be treated as a vaccine without schedules",_elements:{vaccineConceptUuid:{_type:t.Type.UUID,_description:"The UUID of the individual vaccine concept"},sequences:{_type:t.Type.Array,_elements:{sequenceLabel:{_type:t.Type.String,_description:"Name of the dose/booster/schedule.. This will be used as a translation key as well."},sequenceNumber:{_type:t.Type.Number,_description:"The dose number in the vaccines. Convention for doses is [1...9] and for boosters is [11...19]"}}}},_default:[{vaccineConceptUuid:"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",sequences:[{sequenceLabel:"Dose-1",sequenceNumber:1},{sequenceLabel:"Dose-2",sequenceNumber:2},{sequenceLabel:"Dose-3",sequenceNumber:3},{sequenceLabel:"Dose-4",sequenceNumber:4},{sequenceLabel:"Booster-1",sequenceNumber:11},{sequenceLabel:"Booster-2",sequenceNumber:12}]}]}}},o={slot:"patient-chart-immunizations-dashboard-slot",columns:1,title:"Immunizations"},r="4.0.1-pre.335",c=i(3979),u={"webservices.rest":"^2.2.0",fhir2:"^1.2.0"};function m(){var e="@openmrs/esm-patient-immunizations-app",n={featureName:"patient-immunizations",moduleName:e};return(0,t.defineConfigSchema)(e,a),{extensions:[{name:"immunization-overview-widget",slot:"patient-chart-summary-dashboard-slot",order:10,load:(0,t.getAsyncLifecycle)((function(){return Promise.all([i.e(965),i.e(245),i.e(268),i.e(924),i.e(885)]).then(i.bind(i,1885))}),n),meta:{columnSpan:4}},{name:"immunization-details-widget",slot:o.slot,load:(0,t.getAsyncLifecycle)((function(){return Promise.all([i.e(965),i.e(245),i.e(268),i.e(924),i.e(444),i.e(555)]).then(i.bind(i,555))}),n),meta:{columnSpan:1}},{name:"immunization-summary-dashboard",slot:"patient-chart-dashboard-slot",order:8,load:(0,t.getSyncLifecycle)((0,s.createDashboardLink)(o),n),meta:o},{name:"immunization-form-workspace",load:(0,t.getAsyncLifecycle)((function(){return Promise.all([i.e(965),i.e(245),i.e(268),i.e(924),i.e(444),i.e(355)]).then(i.bind(i,5355))}),n),meta:{title:"Immunization Form"}}]}}},3979:(e,n,i)=>{var t={"./en.json":[3574,574],"./fr.json":[2757,757]};function s(e){if(!i.o(t,e))return Promise.resolve().then((()=>{var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}));var n=t[e],s=n[0];return i.e(n[1]).then((()=>i(s)))}s.keys=()=>Object.keys(t),s.id=3979,e.exports=s}}]);
|
package/dist/709.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_openmrs_esm_patient_immunizations_app=self.webpackChunk_openmrs_esm_patient_immunizations_app||[]).push([[709],{709:(e,n,t)=>{"use strict";function r(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}t.r(n),t.d(n,{I18nContext:()=>x,I18nextProvider:()=>se,Trans:()=>J,Translation:()=>ce,composeInitialProps:()=>R,date:()=>de,getDefaults:()=>k,getI18n:()=>C,getInitialProps:()=>T,initReactI18next:()=>D,number:()=>ye,plural:()=>he,select:()=>me,selectOrdinal:()=>be,setDefaults:()=>S,setI18n:()=>I,time:()=>ge,useSSR:()=>ue,useTranslation:()=>ne,withSSR:()=>fe,withTranslation:()=>ie});var a=t(5529),c=t(4896),s=t.n(c),u=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function l(e){var n={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=e.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(n.name=t[1],(s()[t[1]]||"/"===e.charAt(e.length-2))&&(n.voidElement=!0),n.name.startsWith("!--"))){var r=e.indexOf("--\x3e");return{type:"comment",comment:-1!==r?e.slice(4,r):""}}for(var o=new RegExp(u),i=null;null!==(i=o.exec(e));)if(i[0].trim())if(i[1]){var a=i[1].trim(),c=[a,""];a.indexOf("=")>-1&&(c=a.split("=")),n.attrs[c[0]]=c[1],o.lastIndex--}else i[2]&&(n.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return n}var p=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,f=/^\s*$/,d=Object.create(null);function g(e,n){switch(n.type){case"text":return e+n.content;case"tag":return e+="<"+n.name+(n.attrs?function(e){var n=[];for(var t in e)n.push(t+'="'+e[t]+'"');return n.length?" "+n.join(" "):""}(n.attrs):"")+(n.voidElement?"/>":">"),n.voidElement?e:e+n.children.reduce(g,"")+"</"+n.name+">";case"comment":return e+"\x3c!--"+n.comment+"--\x3e"}}var y={parse:function(e,n){n||(n={}),n.components||(n.components=d);var t,r=[],o=[],i=-1,a=!1;if(0!==e.indexOf("<")){var c=e.indexOf("<");r.push({type:"text",content:-1===c?e:e.substring(0,c)})}return e.replace(p,(function(c,s){if(a){if(c!=="</"+t.name+">")return;a=!1}var u,p="/"!==c.charAt(1),d=c.startsWith("\x3c!--"),g=s+c.length,y=e.charAt(g);if(d){var m=l(c);return i<0?(r.push(m),r):((u=o[i]).children.push(m),r)}if(p&&(i++,"tag"===(t=l(c)).type&&n.components[t.name]&&(t.type="component",a=!0),t.voidElement||a||!y||"<"===y||t.children.push({type:"text",content:e.slice(g,e.indexOf("<",g))}),0===i&&r.push(t),(u=o[i-1])&&u.children.push(t),o[i]=t),(!p||t.voidElement)&&(i>-1&&(t.voidElement||t.name===c.slice(2,-1))&&(i--,t=-1===i?r:o[i]),!a&&"<"!==y&&y)){u=-1===i?r:o[i].children;var h=e.indexOf("<",g),b=e.slice(g,-1===h?void 0:h);f.test(b)&&(b=" "),(h>-1&&i+u.length>=0||" "!==b)&&u.push({type:"text",content:b})}})),r},stringify:function(e){return e.reduce((function(e,n){return e+g("",n)}),"")}};const m=y;function h(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var b=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230);/g,v={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…"},O=function(e){return v[e]};function j(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var P,E={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(b,O)}},x=(0,a.createContext)();function S(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};E=w(w({},E),e)}function k(){return E}var N=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.usedNamespaces={}}var n,t;return n=e,(t=[{key:"addUsedNamespaces",value:function(e){var n=this;e.forEach((function(e){n.usedNamespaces[e]||(n.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}])&&h(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),e}();function I(e){P=e}function C(){return P}var D={type:"3rdParty",init:function(e){S(e.options.react),I(e)}};function R(e){return function(n){return new Promise((function(t){var r=T();e.getInitialProps?e.getInitialProps(n).then((function(e){t(w(w({},e),r))})):t(r)}))}}function T(){var e=C(),n=e.reportNamespaces?e.reportNamespaces.getUsedNamespaces():[],t={},r={};return e.languages.forEach((function(t){r[t]={},n.forEach((function(n){r[t][n]=e.getResourceBundle(t,n)||{}}))})),t.initialI18nStore=r,t.initialLanguage=e.language,t}function A(){if(console&&console.warn){for(var e,n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];"string"==typeof t[0]&&(t[0]="react-i18next:: ".concat(t[0])),(e=console).warn.apply(e,t)}}var L={};function z(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];"string"==typeof n[0]&&L[n[0]]||("string"==typeof n[0]&&(L[n[0]]=new Date),A.apply(void 0,n))}function B(e,n,t){e.loadNamespaces(n,(function(){e.isInitialized?t():e.on("initialized",(function n(){setTimeout((function(){e.off("initialized",n)}),0),t()}))}))}function _(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.languages[0],o=!!n.options&&n.options.fallbackLng,i=n.languages[n.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,t){var r=n.services.backendConnector.state["".concat(e,"|").concat(t)];return-1===r||2===r};return!(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!a(n.isLanguageChangingTo,e)||!n.hasResourceBundle(r,e)&&n.services.backendConnector.backend&&(!n.options.resources||n.options.partialBundledLanguages)&&(!a(r,e)||o&&!a(i,e)))}function U(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.languages||!n.languages.length)return z("i18n.languages were undefined or empty",n.languages),!0;var r=void 0!==n.options.ignoreJSONStructure;return r?n.hasLoadedNamespace(e,{precheck:function(n,r){if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!r(n.isLanguageChangingTo,e))return!1}}):_(e,n,t)}function H(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}var K=["format"],V=["children","count","parent","i18nKey","context","tOptions","values","defaults","components","ns","i18n","t","shouldUnescape"];function F(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function W(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?F(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):F(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function M(e,n){if(!e)return!1;var t=e.props?e.props.children:e.children;return n?t.length>0:!!t}function $(e){return e?e&&e.children?e.children:e.props&&e.props.children:[]}function q(e){return Array.isArray(e)?e:[e]}function Y(e,n){if(!e)return"";var t="",i=q(e),c=n.transSupportBasicHtmlNodes&&n.transKeepBasicHtmlNodesFor?n.transKeepBasicHtmlNodesFor:[];return i.forEach((function(e,i){if("string"==typeof e)t+="".concat(e);else if((0,a.isValidElement)(e)){var s=Object.keys(e.props).length,u=c.indexOf(e.type)>-1,l=e.props.children;if(!l&&u&&0===s)t+="<".concat(e.type,"/>");else if(l||u&&0===s)if(e.props.i18nIsDynamicList)t+="<".concat(i,"></").concat(i,">");else if(u&&1===s&&"string"==typeof l)t+="<".concat(e.type,">").concat(l,"</").concat(e.type,">");else{var p=Y(l,n);t+="<".concat(i,">").concat(p,"</").concat(i,">")}else t+="<".concat(i,"></").concat(i,">")}else if(null===e)A("Trans: the passed in value is invalid - seems you passed in a null child.");else if("object"===o(e)){var f=e.format,d=r(e,K),g=Object.keys(d);if(1===g.length){var y=f?"".concat(g[0],", ").concat(f):g[0];t+="{{".concat(y,"}}")}else A("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",e)}else A("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",e)})),t}function J(e){var n=e.children,t=e.count,i=e.parent,c=e.i18nKey,s=e.context,u=e.tOptions,l=void 0===u?{}:u,p=e.values,f=e.defaults,d=e.components,g=e.ns,y=e.i18n,h=e.t,b=e.shouldUnescape,v=r(e,V),O=(0,a.useContext)(x)||{},j=O.i18n,w=O.defaultNS,P=y||j||C();if(!P)return z("You will need to pass in an i18next instance by using i18nextReactModule"),n;var E=h||P.t.bind(P)||function(e){return e};s&&(l.context=s);var S=W(W({},k()),P.options&&P.options.react),N=g||E.ns||w||P.options&&P.options.defaultNS;N="string"==typeof N?[N]:N||["translation"];var I=f||Y(n,S)||S.transEmptyNodeValue||c,D=S.hashTransKey,R=c||(D?D(I):I),T=p?l.interpolation:{interpolation:W(W({},l.interpolation),{},{prefix:"#$?",suffix:"?$#"})},A=W(W(W(W({},l),{},{count:t},p),T),{},{defaultValue:I,ns:N}),L=function(e,n,t,r,i,c){if(""===n)return[];var s=r.transKeepBasicHtmlNodesFor||[],u=n&&new RegExp(s.join("|")).test(n);if(!e&&!u)return[n];var l={};!function e(n){q(n).forEach((function(n){"string"!=typeof n&&(M(n)?e($(n)):"object"!==o(n)||(0,a.isValidElement)(n)||Object.assign(l,n))}))}(e);var p=m.parse("<0>".concat(n,"</0>")),f=W(W({},l),i);function d(e,n,t){var r=$(e),o=y(r,n.children,t);return function(e){return"[object Array]"===Object.prototype.toString.call(e)&&e.every((function(e){return(0,a.isValidElement)(e)}))}(r)&&0===o.length?r:o}function g(e,n,t,r,o){e.dummy&&(e.children=n),t.push((0,a.cloneElement)(e,W(W({},e.props),{},{key:r}),o?void 0:n))}function y(n,i,l){var p=q(n);return q(i).reduce((function(n,i,m){var h,b,v,O=i.children&&i.children[0]&&i.children[0].content&&t.services.interpolator.interpolate(i.children[0].content,f,t.language);if("tag"===i.type){var j=p[parseInt(i.name,10)];!j&&1===l.length&&l[0][i.name]&&(j=l[0][i.name]),j||(j={});var w=0!==Object.keys(i.attrs).length?(h={props:i.attrs},(v=W({},b=j)).props=Object.assign(h.props,b.props),v):j,P=(0,a.isValidElement)(w),E=P&&M(i,!0)&&!i.voidElement,x=u&&"object"===o(w)&&w.dummy&&!P,S="object"===o(e)&&null!==e&&Object.hasOwnProperty.call(e,i.name);if("string"==typeof w){var k=t.services.interpolator.interpolate(w,f,t.language);n.push(k)}else if(M(w)||E)g(w,d(w,i,l),n,m);else if(x){var N=y(p,i.children,l);n.push((0,a.cloneElement)(w,W(W({},w.props),{},{key:m}),N))}else if(Number.isNaN(parseFloat(i.name)))if(S)g(w,d(w,i,l),n,m,i.voidElement);else if(r.transSupportBasicHtmlNodes&&s.indexOf(i.name)>-1)if(i.voidElement)n.push((0,a.createElement)(i.name,{key:"".concat(i.name,"-").concat(m)}));else{var I=y(p,i.children,l);n.push((0,a.createElement)(i.name,{key:"".concat(i.name,"-").concat(m)},I))}else if(i.voidElement)n.push("<".concat(i.name," />"));else{var C=y(p,i.children,l);n.push("<".concat(i.name,">").concat(C,"</").concat(i.name,">"))}else if("object"!==o(w)||P)1===i.children.length&&O?n.push((0,a.cloneElement)(w,W(W({},w.props),{},{key:m}),O)):n.push((0,a.cloneElement)(w,W(W({},w.props),{},{key:m})));else{var D=i.children[0]?O:null;D&&n.push(D)}}else if("text"===i.type){var R=r.transWrapTextNodes,T=c?r.unescape(t.services.interpolator.interpolate(i.content,f,t.language)):t.services.interpolator.interpolate(i.content,f,t.language);R?n.push((0,a.createElement)(R,{key:"".concat(i.name,"-").concat(m)},T)):n.push(T)}return n}),[])}return $(y([{dummy:!0,children:e||[]}],p,q(e||[]))[0])}(d||n,R?E(R,A):I,P,S,A,b),B=void 0!==i?i:S.defaultTransParent;return B?(0,a.createElement)(B,v,L):L}function Z(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function G(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,c=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(c)throw o}}return i}}(e,n)||function(e,n){if(e){if("string"==typeof e)return Z(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Z(e,n):void 0}}(e,n)||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.")}()}function Q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function X(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Q(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ee=function(e,n){var t=(0,a.useRef)();return(0,a.useEffect)((function(){t.current=n?t.current:e}),[e,n]),t.current};function ne(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.i18n,r=(0,a.useContext)(x)||{},o=r.i18n,i=r.defaultNS,c=t||o||C();if(c&&!c.reportNamespaces&&(c.reportNamespaces=new N),!c){z("You will need to pass in an i18next instance by using initReactI18next");var s=function(e){return Array.isArray(e)?e[e.length-1]:e},u=[s,{},!1];return u.t=s,u.i18n={},u.ready=!1,u}c.options.react&&void 0!==c.options.react.wait&&z("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var l=X(X(X({},k()),c.options.react),n),p=l.useSuspense,f=l.keyPrefix,d=e||i||c.options&&c.options.defaultNS;d="string"==typeof d?[d]:d||["translation"],c.reportNamespaces.addUsedNamespaces&&c.reportNamespaces.addUsedNamespaces(d);var g=(c.isInitialized||c.initializedStoreOnce)&&d.every((function(e){return U(e,c,l)}));function y(){return c.getFixedT(null,"fallback"===l.nsMode?d:d[0],f)}var m=(0,a.useState)(y),h=G(m,2),b=h[0],v=h[1],O=d.join(),j=ee(O),w=(0,a.useRef)(!0);(0,a.useEffect)((function(){var e=l.bindI18n,n=l.bindI18nStore;function t(){w.current&&v(y)}return w.current=!0,g||p||B(c,d,(function(){w.current&&v(y)})),g&&j&&j!==O&&w.current&&v(y),e&&c&&c.on(e,t),n&&c&&c.store.on(n,t),function(){w.current=!1,e&&c&&e.split(" ").forEach((function(e){return c.off(e,t)})),n&&c&&n.split(" ").forEach((function(e){return c.store.off(e,t)}))}}),[c,O]);var P=(0,a.useRef)(!0);(0,a.useEffect)((function(){w.current&&!P.current&&v(y),P.current=!1}),[c]);var E=[b,c,g];if(E.t=b,E.i18n=c,E.ready=g,g)return E;if(!g&&!p)return E;throw new Promise((function(e){B(c,d,(function(){e()}))}))}var te=["forwardedRef"];function re(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function oe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?re(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):re(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function ie(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t){function o(o){var i=o.forwardedRef,c=r(o,te),s=G(ne(e,oe(oe({},c),{},{keyPrefix:n.keyPrefix})),3),u=s[0],l=s[1],p=s[2],f=oe(oe({},c),{},{t:u,i18n:l,tReady:p});return n.withRef&&i?f.ref=i:!n.withRef&&i&&(f.forwardedRef=i),(0,a.createElement)(t,f)}return o.displayName="withI18nextTranslation(".concat(H(t),")"),o.WrappedComponent=t,n.withRef?(0,a.forwardRef)((function(e,n){return(0,a.createElement)(o,Object.assign({},e,{forwardedRef:n}))})):o}}var ae=["ns","children"];function ce(e){var n=e.ns,t=e.children,o=G(ne(n,r(e,ae)),3),i=o[0],a=o[1],c=o[2];return t(i,{i18n:a,lng:a.language},c)}function se(e){var n=e.i18n,t=e.defaultNS,r=e.children,o=(0,a.useMemo)((function(){return{i18n:n,defaultNS:t}}),[n,t]);return(0,a.createElement)(x.Provider,{value:o},r)}function ue(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.i18n,o=(0,a.useContext)(x)||{},i=o.i18n,c=r||i||C();c.options&&c.options.isClone||(e&&!c.initializedStoreOnce&&(c.services.resourceStore.data=e,c.options.ns=Object.values(e).reduce((function(e,n){return Object.keys(n).forEach((function(n){e.indexOf(n)<0&&e.push(n)})),e}),c.options.ns),c.initializedStoreOnce=!0,c.isInitialized=!0),n&&!c.initializedLanguageOnce&&(c.changeLanguage(n),c.initializedLanguageOnce=!0))}var le=["initialI18nStore","initialLanguage"];function pe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function fe(){return function(e){function n(n){var t=n.initialI18nStore,o=n.initialLanguage,c=r(n,le);return ue(t,o),(0,a.createElement)(e,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?pe(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({},c))}return n.getInitialProps=R(e),n.displayName="withI18nextSSR(".concat(H(e),")"),n.WrappedComponent=e,n}}var de=function(){return""},ge=function(){return""},ye=function(){return""},me=function(){return""},he=function(){return""},be=function(){return""}},4896:e=>{e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}}}]);
|
|
1
|
+
(self.webpackChunk_openmrs_esm_patient_immunizations_app=self.webpackChunk_openmrs_esm_patient_immunizations_app||[]).push([[709],{709:(e,n,t)=>{"use strict";function r(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}t.r(n),t.d(n,{I18nContext:()=>E,I18nextProvider:()=>se,Trans:()=>J,Translation:()=>ce,composeInitialProps:()=>R,date:()=>de,getDefaults:()=>k,getI18n:()=>C,getInitialProps:()=>T,initReactI18next:()=>D,number:()=>ye,plural:()=>he,select:()=>me,selectOrdinal:()=>be,setDefaults:()=>S,setI18n:()=>I,time:()=>ge,useSSR:()=>ue,useTranslation:()=>ne,withSSR:()=>fe,withTranslation:()=>ie});var a=t(268),c=t(4896),s=t.n(c),u=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function l(e){var n={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=e.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(n.name=t[1],(s()[t[1]]||"/"===e.charAt(e.length-2))&&(n.voidElement=!0),n.name.startsWith("!--"))){var r=e.indexOf("--\x3e");return{type:"comment",comment:-1!==r?e.slice(4,r):""}}for(var o=new RegExp(u),i=null;null!==(i=o.exec(e));)if(i[0].trim())if(i[1]){var a=i[1].trim(),c=[a,""];a.indexOf("=")>-1&&(c=a.split("=")),n.attrs[c[0]]=c[1],o.lastIndex--}else i[2]&&(n.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return n}var p=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,f=/^\s*$/,d=Object.create(null);function g(e,n){switch(n.type){case"text":return e+n.content;case"tag":return e+="<"+n.name+(n.attrs?function(e){var n=[];for(var t in e)n.push(t+'="'+e[t]+'"');return n.length?" "+n.join(" "):""}(n.attrs):"")+(n.voidElement?"/>":">"),n.voidElement?e:e+n.children.reduce(g,"")+"</"+n.name+">";case"comment":return e+"\x3c!--"+n.comment+"--\x3e"}}var y={parse:function(e,n){n||(n={}),n.components||(n.components=d);var t,r=[],o=[],i=-1,a=!1;if(0!==e.indexOf("<")){var c=e.indexOf("<");r.push({type:"text",content:-1===c?e:e.substring(0,c)})}return e.replace(p,(function(c,s){if(a){if(c!=="</"+t.name+">")return;a=!1}var u,p="/"!==c.charAt(1),d=c.startsWith("\x3c!--"),g=s+c.length,y=e.charAt(g);if(d){var m=l(c);return i<0?(r.push(m),r):((u=o[i]).children.push(m),r)}if(p&&(i++,"tag"===(t=l(c)).type&&n.components[t.name]&&(t.type="component",a=!0),t.voidElement||a||!y||"<"===y||t.children.push({type:"text",content:e.slice(g,e.indexOf("<",g))}),0===i&&r.push(t),(u=o[i-1])&&u.children.push(t),o[i]=t),(!p||t.voidElement)&&(i>-1&&(t.voidElement||t.name===c.slice(2,-1))&&(i--,t=-1===i?r:o[i]),!a&&"<"!==y&&y)){u=-1===i?r:o[i].children;var h=e.indexOf("<",g),b=e.slice(g,-1===h?void 0:h);f.test(b)&&(b=" "),(h>-1&&i+u.length>=0||" "!==b)&&u.push({type:"text",content:b})}})),r},stringify:function(e){return e.reduce((function(e,n){return e+g("",n)}),"")}};const m=y;function h(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var b=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,v={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},O=function(e){return v[e]};function j(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var P,x={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(b,O)}},E=(0,a.createContext)();function S(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};x=w(w({},x),e)}function k(){return x}var N=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.usedNamespaces={}}var n,t;return n=e,(t=[{key:"addUsedNamespaces",value:function(e){var n=this;e.forEach((function(e){n.usedNamespaces[e]||(n.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}])&&h(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),e}();function I(e){P=e}function C(){return P}var D={type:"3rdParty",init:function(e){S(e.options.react),I(e)}};function R(e){return function(n){return new Promise((function(t){var r=T();e.getInitialProps?e.getInitialProps(n).then((function(e){t(w(w({},e),r))})):t(r)}))}}function T(){var e=C(),n=e.reportNamespaces?e.reportNamespaces.getUsedNamespaces():[],t={},r={};return e.languages.forEach((function(t){r[t]={},n.forEach((function(n){r[t][n]=e.getResourceBundle(t,n)||{}}))})),t.initialI18nStore=r,t.initialLanguage=e.language,t}function A(){if(console&&console.warn){for(var e,n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];"string"==typeof t[0]&&(t[0]="react-i18next:: ".concat(t[0])),(e=console).warn.apply(e,t)}}var L={};function z(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];"string"==typeof n[0]&&L[n[0]]||("string"==typeof n[0]&&(L[n[0]]=new Date),A.apply(void 0,n))}function B(e,n,t){e.loadNamespaces(n,(function(){e.isInitialized?t():e.on("initialized",(function n(){setTimeout((function(){e.off("initialized",n)}),0),t()}))}))}function _(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.languages[0],o=!!n.options&&n.options.fallbackLng,i=n.languages[n.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,t){var r=n.services.backendConnector.state["".concat(e,"|").concat(t)];return-1===r||2===r};return!(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!a(n.isLanguageChangingTo,e)||!n.hasResourceBundle(r,e)&&n.services.backendConnector.backend&&(!n.options.resources||n.options.partialBundledLanguages)&&(!a(r,e)||o&&!a(i,e)))}function U(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.languages||!n.languages.length)return z("i18n.languages were undefined or empty",n.languages),!0;var r=void 0!==n.options.ignoreJSONStructure;return r?n.hasLoadedNamespace(e,{precheck:function(n,r){if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!r(n.isLanguageChangingTo,e))return!1}}):_(e,n,t)}function F(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}var H=["format"],K=["children","count","parent","i18nKey","context","tOptions","values","defaults","components","ns","i18n","t","shouldUnescape"];function V(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function W(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?V(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):V(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function M(e,n){if(!e)return!1;var t=e.props?e.props.children:e.children;return n?t.length>0:!!t}function $(e){return e?e.props?e.props.children:e.children:[]}function q(e){return Array.isArray(e)?e:[e]}function Y(e,n){if(!e)return"";var t="",i=q(e),c=n.transSupportBasicHtmlNodes&&n.transKeepBasicHtmlNodesFor?n.transKeepBasicHtmlNodesFor:[];return i.forEach((function(e,i){if("string"==typeof e)t+="".concat(e);else if((0,a.isValidElement)(e)){var s=Object.keys(e.props).length,u=c.indexOf(e.type)>-1,l=e.props.children;if(!l&&u&&0===s)t+="<".concat(e.type,"/>");else if(l||u&&0===s)if(e.props.i18nIsDynamicList)t+="<".concat(i,"></").concat(i,">");else if(u&&1===s&&"string"==typeof l)t+="<".concat(e.type,">").concat(l,"</").concat(e.type,">");else{var p=Y(l,n);t+="<".concat(i,">").concat(p,"</").concat(i,">")}else t+="<".concat(i,"></").concat(i,">")}else if(null===e)A("Trans: the passed in value is invalid - seems you passed in a null child.");else if("object"===o(e)){var f=e.format,d=r(e,H),g=Object.keys(d);if(1===g.length){var y=f?"".concat(g[0],", ").concat(f):g[0];t+="{{".concat(y,"}}")}else A("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",e)}else A("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",e)})),t}function J(e){var n=e.children,t=e.count,i=e.parent,c=e.i18nKey,s=e.context,u=e.tOptions,l=void 0===u?{}:u,p=e.values,f=e.defaults,d=e.components,g=e.ns,y=e.i18n,h=e.t,b=e.shouldUnescape,v=r(e,K),O=(0,a.useContext)(E)||{},j=O.i18n,w=O.defaultNS,P=y||j||C();if(!P)return z("You will need to pass in an i18next instance by using i18nextReactModule"),n;var x=h||P.t.bind(P)||function(e){return e};s&&(l.context=s);var S=W(W({},k()),P.options&&P.options.react),N=g||x.ns||w||P.options&&P.options.defaultNS;N="string"==typeof N?[N]:N||["translation"];var I=f||Y(n,S)||S.transEmptyNodeValue||c,D=S.hashTransKey,R=c||(D?D(I):I),T=p?l.interpolation:{interpolation:W(W({},l.interpolation),{},{prefix:"#$?",suffix:"?$#"})},A=W(W(W(W({},l),{},{count:t},p),T),{},{defaultValue:I,ns:N}),L=function(e,n,t,r,i,c){if(""===n)return[];var s=r.transKeepBasicHtmlNodesFor||[],u=n&&new RegExp(s.join("|")).test(n);if(!e&&!u)return[n];var l={};!function e(n){q(n).forEach((function(n){"string"!=typeof n&&(M(n)?e($(n)):"object"!==o(n)||(0,a.isValidElement)(n)||Object.assign(l,n))}))}(e);var p=m.parse("<0>".concat(n,"</0>")),f=W(W({},l),i);function d(e,n,t){var r=$(e),o=y(r,n.children,t);return function(e){return"[object Array]"===Object.prototype.toString.call(e)&&e.every((function(e){return(0,a.isValidElement)(e)}))}(r)&&0===o.length?r:o}function g(e,n,t,r,o){e.dummy&&(e.children=n),t.push((0,a.cloneElement)(e,W(W({},e.props),{},{key:r}),o?void 0:n))}function y(n,i,l){var p=q(n);return q(i).reduce((function(n,i,m){var h,b,v,O=i.children&&i.children[0]&&i.children[0].content&&t.services.interpolator.interpolate(i.children[0].content,f,t.language);if("tag"===i.type){var j=p[parseInt(i.name,10)];!j&&1===l.length&&l[0][i.name]&&(j=l[0][i.name]),j||(j={});var w=0!==Object.keys(i.attrs).length?(h={props:i.attrs},(v=W({},b=j)).props=Object.assign(h.props,b.props),v):j,P=(0,a.isValidElement)(w),x=P&&M(i,!0)&&!i.voidElement,E=u&&"object"===o(w)&&w.dummy&&!P,S="object"===o(e)&&null!==e&&Object.hasOwnProperty.call(e,i.name);if("string"==typeof w){var k=t.services.interpolator.interpolate(w,f,t.language);n.push(k)}else if(M(w)||x)g(w,d(w,i,l),n,m);else if(E){var N=y(p,i.children,l);n.push((0,a.cloneElement)(w,W(W({},w.props),{},{key:m}),N))}else if(Number.isNaN(parseFloat(i.name)))if(S)g(w,d(w,i,l),n,m,i.voidElement);else if(r.transSupportBasicHtmlNodes&&s.indexOf(i.name)>-1)if(i.voidElement)n.push((0,a.createElement)(i.name,{key:"".concat(i.name,"-").concat(m)}));else{var I=y(p,i.children,l);n.push((0,a.createElement)(i.name,{key:"".concat(i.name,"-").concat(m)},I))}else if(i.voidElement)n.push("<".concat(i.name," />"));else{var C=y(p,i.children,l);n.push("<".concat(i.name,">").concat(C,"</").concat(i.name,">"))}else if("object"!==o(w)||P)1===i.children.length&&O?n.push((0,a.cloneElement)(w,W(W({},w.props),{},{key:m}),O)):n.push((0,a.cloneElement)(w,W(W({},w.props),{},{key:m})));else{var D=i.children[0]?O:null;D&&n.push(D)}}else if("text"===i.type){var R=r.transWrapTextNodes,T=c?r.unescape(t.services.interpolator.interpolate(i.content,f,t.language)):t.services.interpolator.interpolate(i.content,f,t.language);R?n.push((0,a.createElement)(R,{key:"".concat(i.name,"-").concat(m)},T)):n.push(T)}return n}),[])}return $(y([{dummy:!0,children:e||[]}],p,q(e||[]))[0])}(d||n,R?x(R,A):I,P,S,A,b),B=void 0!==i?i:S.defaultTransParent;return B?(0,a.createElement)(B,v,L):L}function Z(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function G(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,c=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(c)throw o}}return i}}(e,n)||function(e,n){if(e){if("string"==typeof e)return Z(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Z(e,n):void 0}}(e,n)||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.")}()}function Q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function X(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Q(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ee=function(e,n){var t=(0,a.useRef)();return(0,a.useEffect)((function(){t.current=n?t.current:e}),[e,n]),t.current};function ne(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.i18n,r=(0,a.useContext)(E)||{},o=r.i18n,i=r.defaultNS,c=t||o||C();if(c&&!c.reportNamespaces&&(c.reportNamespaces=new N),!c){z("You will need to pass in an i18next instance by using initReactI18next");var s=function(e){return Array.isArray(e)?e[e.length-1]:e},u=[s,{},!1];return u.t=s,u.i18n={},u.ready=!1,u}c.options.react&&void 0!==c.options.react.wait&&z("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var l=X(X(X({},k()),c.options.react),n),p=l.useSuspense,f=l.keyPrefix,d=e||i||c.options&&c.options.defaultNS;d="string"==typeof d?[d]:d||["translation"],c.reportNamespaces.addUsedNamespaces&&c.reportNamespaces.addUsedNamespaces(d);var g=(c.isInitialized||c.initializedStoreOnce)&&d.every((function(e){return U(e,c,l)}));function y(){return c.getFixedT(null,"fallback"===l.nsMode?d:d[0],f)}var m=(0,a.useState)(y),h=G(m,2),b=h[0],v=h[1],O=d.join(),j=ee(O),w=(0,a.useRef)(!0);(0,a.useEffect)((function(){var e=l.bindI18n,n=l.bindI18nStore;function t(){w.current&&v(y)}return w.current=!0,g||p||B(c,d,(function(){w.current&&v(y)})),g&&j&&j!==O&&w.current&&v(y),e&&c&&c.on(e,t),n&&c&&c.store.on(n,t),function(){w.current=!1,e&&c&&e.split(" ").forEach((function(e){return c.off(e,t)})),n&&c&&n.split(" ").forEach((function(e){return c.store.off(e,t)}))}}),[c,O]);var P=(0,a.useRef)(!0);(0,a.useEffect)((function(){w.current&&!P.current&&v(y),P.current=!1}),[c,f]);var x=[b,c,g];if(x.t=b,x.i18n=c,x.ready=g,g)return x;if(!g&&!p)return x;throw new Promise((function(e){B(c,d,(function(){e()}))}))}var te=["forwardedRef"];function re(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function oe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?re(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):re(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function ie(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t){function o(o){var i=o.forwardedRef,c=r(o,te),s=G(ne(e,oe(oe({},c),{},{keyPrefix:n.keyPrefix})),3),u=s[0],l=s[1],p=s[2],f=oe(oe({},c),{},{t:u,i18n:l,tReady:p});return n.withRef&&i?f.ref=i:!n.withRef&&i&&(f.forwardedRef=i),(0,a.createElement)(t,f)}return o.displayName="withI18nextTranslation(".concat(F(t),")"),o.WrappedComponent=t,n.withRef?(0,a.forwardRef)((function(e,n){return(0,a.createElement)(o,Object.assign({},e,{forwardedRef:n}))})):o}}var ae=["ns","children"];function ce(e){var n=e.ns,t=e.children,o=G(ne(n,r(e,ae)),3),i=o[0],a=o[1],c=o[2];return t(i,{i18n:a,lng:a.language},c)}function se(e){var n=e.i18n,t=e.defaultNS,r=e.children,o=(0,a.useMemo)((function(){return{i18n:n,defaultNS:t}}),[n,t]);return(0,a.createElement)(E.Provider,{value:o},r)}function ue(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.i18n,o=(0,a.useContext)(E)||{},i=o.i18n,c=r||i||C();c.options&&c.options.isClone||(e&&!c.initializedStoreOnce&&(c.services.resourceStore.data=e,c.options.ns=Object.values(e).reduce((function(e,n){return Object.keys(n).forEach((function(n){e.indexOf(n)<0&&e.push(n)})),e}),c.options.ns),c.initializedStoreOnce=!0,c.isInitialized=!0),n&&!c.initializedLanguageOnce&&(c.changeLanguage(n),c.initializedLanguageOnce=!0))}var le=["initialI18nStore","initialLanguage"];function pe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function fe(){return function(e){function n(n){var t=n.initialI18nStore,o=n.initialLanguage,c=r(n,le);return ue(t,o),(0,a.createElement)(e,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?pe(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({},c))}return n.getInitialProps=R(e),n.displayName="withI18nextSSR(".concat(F(e),")"),n.WrappedComponent=e,n}}var de=function(){return""},ge=function(){return""},ye=function(){return""},me=function(){return""},he=function(){return""},be=function(){return""}},4896:e=>{e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}}}]);
|