@openmrs/esm-patient-registration-app 4.0.2-pre.705 → 4.0.2-pre.707
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
CHANGED
|
@@ -8,14 +8,14 @@ assets by chunk 919 KiB (id hint: vendors)
|
|
|
8
8
|
asset [1m[32m470.js[39m[22m 32.5 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors) 1 related asset
|
|
9
9
|
asset [1m[32m100.js[39m[22m 19.7 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors)
|
|
10
10
|
asset [1m[32m375.js[39m[22m 3.93 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors)
|
|
11
|
-
+
|
|
11
|
+
+ 13 assets
|
|
12
12
|
orphan modules 3.86 MiB [1m[33m[orphan][39m[22m 620 modules
|
|
13
13
|
runtime modules 38 KiB 28 modules
|
|
14
|
-
built modules 3.
|
|
14
|
+
built modules 3.57 MiB (javascript) 168 bytes (share-init) 168 bytes (consume-shared) [1m[33m[built][39m[22m
|
|
15
15
|
modules by path [1m../../node_modules/[39m[22m 3.22 MiB 406 modules
|
|
16
|
-
modules by path [1m./[39m[22m
|
|
16
|
+
modules by path [1m./[39m[22m 360 KiB
|
|
17
17
|
modules by path [1m./src/[39m[22m 353 KiB 24 modules
|
|
18
|
-
modules by path [1m./translations/[39m[22m
|
|
18
|
+
modules by path [1m./translations/[39m[22m 6.58 KiB 3 modules
|
|
19
19
|
provide-module modules 168 bytes
|
|
20
20
|
[1mprovide shared module (default) @openmrs/esm-framework@4.0.2 = ../../node_modules/@openmrs/esm-framework/src/internal.ts[39m[22m 42 bytes [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
21
21
|
+ 3 modules
|
|
@@ -31,4 +31,4 @@ Assets:
|
|
|
31
31
|
858.js (407 KiB)
|
|
32
32
|
430.js (244 KiB)[39m[22m
|
|
33
33
|
|
|
34
|
-
webpack 5.74.0 compiled with [1m[33m1 warning[39m[22m in
|
|
34
|
+
webpack 5.74.0 compiled with [1m[33m1 warning[39m[22m in 59666 ms
|
package/dist/686.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_openmrs_esm_patient_registration_app=self.webpackChunk_openmrs_esm_patient_registration_app||[]).push([[686],{225:(e,t,n)=>{"use strict";n.d(t,{X8:()=>s,bT:()=>u,bs:()=>o});var i=n(906);function r(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 a(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(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)?r(e,t):void 0}}(e)||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 o=[{id:"demographics",name:"Basic Info",fields:["name","gender","dob","id"]},{id:"contact",name:"Contact Details",fields:["address","phone & email"]},{id:"death",name:"Death Info",fields:[]},{id:"relationships",name:"Relationships",fields:[]}],s=["name","gender","dob","address","id","phone & email"],u={sections:{_type:i.Type.Array,_default:["demographics","contact","relationships"],_description:"An array of strings which are the keys from 'sectionDefinitions' or any of the following built-in sections: '".concat(o.map((function(e){return e.id})).join("', '"),"'."),_elements:{_type:i.Type.String}},sectionDefinitions:{_type:i.Type.Array,_elements:{id:{_type:i.Type.String,_description:"How this section will be referred to in the `sections` configuration. To override a built-in section, use that section's id. The built in section ids are '".concat(o.map((function(e){return e.id})).join("', '"),"'.")},name:{_type:i.Type.String,_description:"The title to display at the top of the section."},fields:{_type:i.Type.Array,_default:[],_description:"The parts to include in the section. Can be any of the following built-in fields: ".concat(s.join(", "),". Can also be an id from an object in the `fieldDefinitions` array, which you can use to define custom fields."),_elements:{_type:i.Type.String}}},_default:[]},fieldDefinitions:{_type:i.Type.Array,_elements:{id:{_type:i.Type.String,_description:"How this field will be referred to in the `fields` element of the `sectionDefinitions` configuration."},type:{_type:i.Type.String,_description:"How this field's data will be stored—a person attribute or an obs."},uuid:{_type:i.Type.UUID,_description:"Person attribute type UUID that this field's data should be saved to."},label:{_type:i.Type.String,_default:null,_description:"The label of the input. By default, uses the metadata `display` attribute."},placeholder:{_type:i.Type.String,_default:"",_description:"Placeholder that will appear in the input."},validation:{required:{_type:i.Type.Boolean,_default:!1},matches:{_type:i.Type.String,_default:null,_description:"Optional RegEx for testing the validity of the input."}},answerConceptSetUuid:{_type:i.Type.ConceptUuid,_default:null,_description:"For coded questions only. A concept which has the possible responses either as answers or as set members."},customConceptAnswers:{_type:i.Type.Array,_elements:{uuid:{_type:i.Type.UUID,_description:"Answer concept UUID"},label:{_type:i.Type.String,_default:null,_description:"The custom label for the answer concept."}},_default:[],_description:"For coded questions only. Provide ability to add custom concept answers."}},_default:[],_description:"Definitions for custom fields that can be used in sectionDefinitions. Can also be used to override built-in fields."},fieldConfigurations:{name:{displayMiddleName:{_type:i.Type.Boolean,_default:!0},unidentifiedPatient:{_type:i.Type.Boolean,_default:!0,_description:"Whether to allow patients to be registered without names."},defaultUnknownGivenName:{_type:i.Type.String,_default:"UNKNOWN",_description:"The given/first name to record for unidentified patients."},defaultUnknownFamilyName:{_type:i.Type.String,_default:"UNKNOWN",_description:"The family/last name to record for unidentified patients."}},gender:{_type:i.Type.Array,_elements:{value:{_type:i.Type.String,_description:"The value for sex option"},label:{_type:i.Type.String,_default:null,_description:"The label displayed for sex option."},id:{_type:i.Type.String,_default:null,_description:"The id for sex option."}},_default:[{id:"male",value:"Male",label:"Male"},{id:"female",value:"Female",label:"Female"},{id:"other",value:"Other",label:"Other"},{id:"unknown",value:"Unknown",label:"Unknown"}],_description:"Provide ability to configure sex options."},address:{useAddressHierarchy:{enabled:{_type:i.Type.Boolean,_description:"Whether to use the Address hierarchy in the registration form or not",_default:!0},useQuickSearch:{_type:i.Type.Boolean,_description:"Whether to use the quick searching through the address saved in the database pre-fill the form.",_default:!0},searchAddressByLevel:{_type:i.Type.Boolean,_description:"Whether to fill the addresses by levels, i.e. County => subCounty, the current field is dependent on it's previous field.",_default:!0},useAddressHierarchyLabel:{_type:i.Type.Object,_description:"Whether to use custom labels for address hierarchy",_default:{}}}}},links:{submitButton:{_type:i.Type.String,_default:"${openmrsSpaBase}/patient/${patientUuid}/chart",_validators:[i.validators.isUrlWithTemplateParameters(["patientUuid"])]}},concepts:{patientPhotoUuid:{_type:i.Type.ConceptUuid,_default:"736e8771-e501-4615-bfa7-570c03f4bef5"}},defaultPatientIdentifierTypes:{_type:i.Type.Array,_elements:{_type:i.Type.PatientIdentifierTypeUuid},_default:[]},registrationObs:{encounterTypeUuid:{_type:i.Type.UUID,_default:null,_description:"Obs created during registration will be associated with an encounter of this type. This must be set in order to use fields of type `obs`."},encounterProviderRoleUuid:{_type:i.Type.UUID,_default:"a0b03050-c99b-11e0-9572-0800200c9a66",_description:"The provider role to use for the registration encounter. Default is 'Unkown'."},registrationFormUuid:{_type:i.Type.UUID,_default:null,_description:"The form UUID to associate with the registration encounter. By default no form will be associated."}},_validators:[(0,i.validator)((function(e){return!e.fieldDefinitions.some((function(e){return"obs"==e.type}))||null!=e.registrationObs.encounterTypeUuid}),"If fieldDefinitions contains any fields of type 'obs', `registrationObs.encounterTypeUuid` must be specified."),(0,i.validator)((function(e){return e.sections.every((function(t){return a(o).concat(a(e.sectionDefinitions)).map((function(e){return e.id})).includes(t)}))}),(function(e){var t=a(o).concat(a(e.sectionDefinitions)).map((function(e){return e.id})),n=e.sections.find((function(e){return!t.includes(e)}));return"'".concat(n,"' is not a valid section ID. Valid section IDs include the built-in sections ").concat(l(o))+(e.sectionDefinitions.length?"; and the defined sections ".concat(l(e.sectionDefinitions),"."):".")})),(0,i.validator)((function(e){return e.sectionDefinitions.every((function(t){return t.fields.every((function(t){return a(s).concat(a(e.fieldDefinitions.map((function(e){return e.id})))).includes(t)}))}))}),(function(e){var t=a(s).concat(a(e.fieldDefinitions.map((function(e){return e.id})))),n=e.sectionDefinitions.find((function(e){return e.fields.some((function(e){return!t.includes(e)}))})),i=n.fields.find((function(e){return!t.includes(e)}));return"The section definition '".concat(n.id,"' contains an invalid field '").concat(i,"'. 'fields' can only contain the built-in fields '").concat(s.join("', '"),"'")+(e.fieldDefinitions.length?"; or the defined fields ".concat(l(e.fieldDefinitions),"."):".")}))]};function l(e){return"'".concat(e.map((function(e){return e.id})).join("', '"),"'")}},8179:(e,t,n)=>{"use strict";n.d(t,{Kt:()=>l,QT:()=>c,UO:()=>s,e1:()=>u});var i,r,a,o=n(906),s="custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))",u="@openmrs/esm-patient-registration-app",l="patient-registration",c=(i={},a="network-first",(r=o.omrsOfflineCachingStrategyHttpHeaderName)in i?Object.defineProperty(i,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[r]=a,i)},1686:(e,t,n)=>{"use strict";n.r(t),n.d(t,{backendDependencies:()=>v,importTranslation:()=>b,setupOpenMRS:()=>g,version:()=>m});var i=n(906),r=n(3076),a=n(225),o=n(8179),s=n(6279);function u(e,t,n,i,r,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(i,r)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var a=e.apply(t,n);function o(e){u(a,i,r,o,s,"next",e)}function s(e){u(a,i,r,o,s,"throw",e)}o(void 0)}))}}var c=function(e,t){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}};function d(e){return["/ws/fhir2/R4/Patient/".concat(e),"/ws/rest/v1/relationship?v=".concat(o.UO,"&person=").concat(e),"/ws/rest/v1/person/".concat(e,"/attribute"),"/ws/rest/v1/patient/".concat(e,"/identifier?v=custom:(uuid,identifier,identifierType:(uuid,required,name),preferred)")].map((function(e){return window.origin+(0,i.makeUrl)(e)}))}function f(){return p.apply(this,arguments)}function p(){return(p=l((function(){return c(this,(function(e){switch(e.label){case 0:return[4,Promise.all([(0,s.X1)(),(0,s.Te)(),(0,s.mt)(),(0,s.St)()])];case 1:return e.sent(),[2]}}))}))).apply(this,arguments)}function h(e,t){return y.apply(this,arguments)}function y(){return(y=l((function(e,t){return c(this,(function(n){switch(n.label){case 0:return[4,r.y.savePatientFormOnline(e._patientRegistrationData.isNewPatient,e._patientRegistrationData.formValues,e._patientRegistrationData.patientUuidMap,e._patientRegistrationData.initialAddressFieldValues,e._patientRegistrationData.capturePhotoProps,e._patientRegistrationData.currentLocation,e._patientRegistrationData.initialIdentifierValues,e._patientRegistrationData.currentUser,e._patientRegistrationData.config,e._patientRegistrationData.savePatientTransactionManager,t.abort)];case 1:return n.sent(),[2]}}))}))).apply(this,arguments)}var m="4.0.2-pre.705",b=n(3979),v={"webservices.rest":"^2.24.0"};function g(){var e={featureName:"Patient Registration",moduleName:o.e1};return(0,i.defineConfigSchema)(o.e1,a.bT),(0,i.registerBreadcrumbs)([{path:"".concat(window.spaBase,"/").concat(o.Kt),title:"Patient Registration",parent:"".concat(window.spaBase,"/home")}]),(0,i.setupOfflineSync)(o.Kt,[],h,{onBeginEditSyncItem:function(e){(0,i.navigate)({to:"${openmrsSpaBase}/patient/".concat(e.content.fhirPatient.id,"/edit")})}}),(0,i.subscribePrecacheStaticDependencies)(f),(0,i.setupDynamicOfflineDataHandler)({id:"esm-patient-registration-app:patient",type:"patient",displayName:"Patient registration",isSynced:function(e){return l((function(){var t,n;return c(this,(function(i){switch(i.label){case 0:return t=d(e),[4,caches.open("omrs-spa-cache-v1")];case 1:return[4,i.sent().keys()];case 2:return n=i.sent().map((function(e){return e.url})),[2,t.every((function(e){return n.includes(e)}))]}}))}))()},sync:function(e){return l((function(){var t;return c(this,(function(n){switch(n.label){case 0:return t=d(e),[4,Promise.allSettled(t.map((r=l((function(e){return c(this,(function(t){switch(t.label){case 0:return[4,(0,i.messageOmrsServiceWorker)({type:"registerDynamicRoute",url:e})];case 1:return t.sent(),[4,fetch(e)];case 2:return t.sent(),[2]}}))})),function(e){return r.apply(this,arguments)})))];case 1:return n.sent(),[2]}var r}))}))()}}),{pages:[{load:(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(430),n.e(375),n.e(504),n.e(924),n.e(658)]).then(n.bind(n,7658))}),e),route:"patient-registration",online:{savePatientForm:r.y.savePatientFormOnline,isOffline:!1},offline:{savePatientForm:r.y.savePatientFormOffline,isOffline:!0}}],extensions:[{id:"add-patient-action",slot:"top-nav-actions-slot",load:(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(430),n.e(375),n.e(206)]).then(n.bind(n,8206))}),e),online:!0,offline:!0},{id:"cancel-patient-edit-modal",load:(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(430),n.e(924),n.e(735)]).then(n.bind(n,5735))}),e),online:!0,offline:!0},{id:"patient-photo-widget",slot:"patient-photo-slot",load:(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(854),n.e(975)]).then(n.bind(n,9975))}),e),online:!0,offline:!0},{id:"edit-patient-details-button",slot:"patient-search-actions-slot",load:(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(924),n.e(635)]).then(n.bind(n,2635))}),e),online:!0,offline:!0},{id:"delete-identifier-confirmation-modal",load:(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(430),n.e(924),n.e(242)]).then(n.bind(n,5242))}),e),online:!0,offline:!0}]}}},6279:(e,t,n)=>{"use strict";n.d(t,{Cg:()=>g,St:()=>D,Te:()=>_,X1:()=>w,mt:()=>O});var i=n(268),r=n.n(i),a=n(3662),o=n(2777),s=n(8407),u=n(906),l=n(8179);function c(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 d(e,t,n,i,r,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(i,r)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var a=e.apply(t,n);function o(e){d(a,i,r,o,s,"next",e)}function s(e){d(a,i,r,o,s,"throw",e)}o(void 0)}))}}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(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){p(e,t,n[t])}))}return e}function y(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 i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function m(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,s=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(a.push(i.value),!t||a.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(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)?c(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.")}()}var b=function(e,t){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},v=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},g=r().createContext(null);function w(e){return T.apply(this,arguments)}function T(){return(T=f((function(e){return b(this,(function(t){switch(t.label){case 0:return[4,F("/ws/rest/v1/session",e)];case 1:return[2,t.sent().data]}}))}))).apply(this,arguments)}function _(e){return P.apply(this,arguments)}function P(){return(P=f((function(e){return b(this,(function(t){switch(t.label){case 0:return[4,F("/ws/rest/v1/systemsetting?q=layout.address.format&v=custom:(value)",e)];case 1:return[2,t.sent().data]}}))}))).apply(this,arguments)}function O(e){return S.apply(this,arguments)}function S(){return(S=f((function(e){return b(this,(function(t){switch(t.label){case 0:return[4,F("/ws/rest/v1/relationshiptype?v=default",e)];case 1:return[2,t.sent().data]}}))}))).apply(this,arguments)}function D(e){return U.apply(this,arguments)}function U(){return(U=f((function(e){var t,n,i,r,o,s,u,l,c;return b(this,(function(d){switch(d.label){case 0:return[4,j(e)];case 1:t=d.sent(),n=t.filter(Boolean),i=!0,r=!1,o=void 0,d.label=2;case 2:d.trys.push([2,7,8,9]),s=function(){var t,n,i,r;return b(this,(function(o){switch(o.label){case 0:return t=l.value,[4,Promise.all([k(t.uuid,e),I(e)])];case 1:return n=m.apply(void 0,[o.sent(),2]),i=n[0],r=n[1],t.identifierSources=i.data.results.map((function(e){var t=(0,a.Z)(r.data.results,{source:{uuid:e.uuid}});return e.autoGenerationOption=t,e})),[2]}}))},u=n[Symbol.iterator](),d.label=3;case 3:return(i=(l=u.next()).done)?[3,6]:[5,v(s())];case 4:d.sent(),d.label=5;case 5:return i=!0,[3,3];case 6:return[3,9];case 7:return c=d.sent(),r=!0,o=c,[3,9];case 8:try{i||null==u.return||u.return()}finally{if(r)throw o}return[7];case 9:return[2,n]}}))}))).apply(this,arguments)}function j(e){return A.apply(this,arguments)}function A(){return(A=f((function(e){var t,n,i,r,a,s,u,l,c;return b(this,(function(d){switch(d.label){case 0:return[4,F("/ws/rest/v1/patientidentifiertype?v=full",e)];case 1:return t=d.sent(),[4,F("/ws/rest/v1/metadatamapping/termmapping?v=full&code=emr.primaryIdentifierType",e)];case 2:return n=d.sent(),t.ok?(u=null==t||null===(i=t.data)||void 0===i?void 0:i.results,l=null==n||null===(r=n.data)||void 0===r||null===(a=r.results)||void 0===a||null===(s=a[0])||void 0===s?void 0:s.metadataUuid,c=(null==n?void 0:n.ok)?[x(null==u?void 0:u.find((function(e){return e.uuid===l})),!0)]:[],u.forEach((function(e){e.uuid!==l&&c.push(x(e,!1))})),[2,c.map((function(e){return y(h({},e),{fieldName:(0,o.Z)(e.name)})}))]):[2,[]]}}))}))).apply(this,arguments)}function k(e,t){return N.apply(this,arguments)}function N(){return(N=f((function(e,t){return b(this,(function(n){switch(n.label){case 0:return[4,F("/ws/rest/v1/idgen/identifiersource?v=default&identifierType=".concat(e),t)];case 1:return[2,n.sent()]}}))}))).apply(this,arguments)}function I(e){return C.apply(this,arguments)}function C(){return(C=f((function(e){return b(this,(function(t){switch(t.label){case 0:return[4,F("/ws/rest/v1/idgen/autogenerationoption?v=full",e)];case 1:return[2,t.sent()]}}))}))).apply(this,arguments)}function F(e,t){return E.apply(this,arguments)}function E(){return(E=f((function(e,t){return b(this,(function(n){switch(n.label){case 0:return[4,(0,u.messageOmrsServiceWorker)({type:"registerDynamicRoute",pattern:(0,s.Z)(e)})];case 1:return n.sent(),[4,(0,u.openmrsFetch)(e,{headers:l.QT,signal:null==t?void 0:t.signal})];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}function x(e,t){return{name:e.display,fieldName:(0,o.Z)(e.display),required:e.required,uuid:e.uuid,format:e.format,isPrimary:t,uniquenessBehavior:e.uniquenessBehavior}}},3076:(e,t,n)=>{"use strict";n.d(t,{I:()=>m,y:()=>y});var i=n(906),r=n(8179),a=n(7117);function o(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 s(e,t,n,i,r,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(i,r)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var a=e.apply(t,n);function o(e){s(a,i,r,o,u,"next",e)}function u(e){s(a,i,r,o,u,"throw",e)}o(void 0)}))}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(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){c(e,t,n[t])}))}return e}function f(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,s=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(a.push(i.value),!t||a.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(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)?o(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.")}()}var p,h=function(e,t){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},y=function(){function e(){l(this,e)}return e.saveRelationships=function(e,t,n){return u((function(){return h(this,(function(i){return[2,Promise.all(e.filter((function(e){return e.relationshipType})).filter((function(e){return!!e.action})).map((function(e){var i=e.relatedPersonUuid,r=e.relationshipType,o=e.uuid,s=e.action,u=f(r.split("/"),2),l=u[0],c=u[1],d=t.data.uuid,p="aIsToB"===c,h={personA:p?i:d,personB:p?d:i,relationshipType:l};switch(s){case"ADD":return(0,a.bL)(n,h);case"UPDATE":return(0,a.r6)(n,o,h);case"DELETE":return(0,a.kE)(n,o)}})))]}))}))()},e.saveObservations=function(e,t,n,i,r,o){return u((function(){var s;return h(this,(function(u){if(e&&Object.keys(e).length>0){if(r.registrationObs.encounterTypeUuid)return s={encounterDatetime:new Date,patient:t.data.uuid,encounterType:r.registrationObs.encounterTypeUuid,location:n,encounterProviders:[{provider:i.currentProvider.uuid,encounterRole:r.registrationObs.encounterProviderRoleUuid}],form:r.registrationObs.registrationFormUuid,obs:Object.keys(e).map((function(t){return{concept:t,value:e[t]}}))},[2,(0,a.M1)(o,s)];console.error("The registration form has been configured to have obs fields, but no registration encounter type has been configured. Obs field values will not be saved.")}return[2]}))}))()},e.savePatientIdentifiers=function(e,t,n,i,r,o){return u((function(){var s;return h(this,(function(l){var c;return s=Object.values(n).map((c=u((function(n){var i,s,u,l,c,d,f,p,y,m;return h(this,(function(h){switch(h.label){case 0:return i=n.identifierTypeUuid,s=n.identifierValue,u=n.identifierUuid,l=n.selectedSource,c=n.preferred,d=n.autoGeneration,f=n.initialValue,s||d&&l?d?[3,1]:(y=s,[3,4]):[3,9];case 1:return[4,(0,a.fX)(n.selectedSource.uuid,o)];case 2:return[4,h.sent().data.identifier];case 3:y=h.sent(),h.label=4;case 4:return m={uuid:u,identifier:p=y,identifierType:i,location:r,preferred:c},e?[3,8]:f?[3,6]:[4,(0,a.eb)(t,m,o)];case 5:return h.sent(),[3,8];case 6:return f===p?[3,8]:[4,(0,a.nI)(t,u,m.identifier,o)];case 7:h.sent(),h.label=8;case 8:return[2,m];case 9:return[2]}}))})),function(e){return c.apply(this,arguments)})),t&&Object.keys(i).filter((function(e){return!n[e]})).forEach(function(){var e=u((function(e){return h(this,(function(n){switch(n.label){case 0:return[4,(0,a.ZB)(t,i[e].identifierUuid,o)];case 1:return n.sent(),[2]}}))}));return function(t){return e.apply(this,arguments)}}()),[2,Promise.all(s)]}))}))()},e.getDeletedNames=function(e,t){return(null==t?void 0:t.additionalNameUuid)?[{nameUuid:t.additionalNameUuid,personUuid:e}]:[]},e.getPatientToCreate=function(t,n,i,r){var a,o,s;return o=t.birthdate,a=(null!=(s=Date)&&"undefined"!=typeof Symbol&&s[Symbol.hasInstance]?s[Symbol.hasInstance](o):o instanceof s)?[t.birthdate.getFullYear(),t.birthdate.getMonth()+1,t.birthdate.getDate()].join("-"):t.birthdate,{uuid:t.patientUuid,person:d({uuid:t.patientUuid,names:e.getNames(t,n),gender:t.gender.charAt(0),birthdate:a,birthdateEstimated:t.birthdateEstimated,attributes:e.getPatientAttributes(t),addresses:[t.address]},e.getPatientDeathInfo(t)),identifiers:r}},e.getNames=function(e,t){var n=[{uuid:t.preferredNameUuid,preferred:!0,givenName:e.givenName,middleName:e.middleName,familyName:e.familyName}];return e.addNameInLocalLanguage&&n.push({uuid:t.additionalNameUuid,preferred:!1,givenName:e.additionalGivenName,middleName:e.additionalMiddleName,familyName:e.additionalFamilyName}),n},e.getPatientAttributes=function(e){var t=[];if(e.attributes){var n=!0,i=!1,r=void 0;try{for(var a,o=Object.entries(e.attributes)[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=f(a.value,2),u=s[0],l=s[1];t.push({attributeType:u,value:l})}}catch(e){i=!0,r=e}finally{try{n||null==o.return||o.return()}finally{if(i)throw r}}}return e.unidentifiedPatient&&t.push({attributeType:"8b56eac7-5c76-4b9c-8c6f-1deab8d3fc47",value:"true"}),t},e.getPatientDeathInfo=function(e){var t=e.isDead,n=e.deathDate,i=e.deathCause;return{dead:t,deathDate:t?n:void 0,causeOfDeath:t?i:void 0}},e.mapPatientToFhirPatient=function(e){var t,n,i,r,a,o;return{id:e.uuid,gender:{M:"male",F:"female",O:"other",U:"unknown"}[null===(t=e.person)||void 0===t?void 0:t.gender],birthDate:null===(n=e.person)||void 0===n?void 0:n.birthdate,deceasedBoolean:e.person.dead,deceasedDateTime:e.person.deathDate,name:null===(i=e.person)||void 0===i||null===(r=i.names)||void 0===r?void 0:r.map((function(e){return{given:[e.givenName,e.middleName].filter(Boolean),family:e.familyName}})),address:null===(a=e.person)||void 0===a?void 0:a.addresses.map((function(e){return{city:e.cityVillage,country:e.country,postalCode:e.postalCode,state:e.stateProvince,use:"home"}})),telecom:null===(o=e.person.attributes)||void 0===o?void 0:o.filter((function(e){return"Telephone Number"===e.attributeType}))}},e}();y.savePatientFormOffline=(p=u((function(e,t,n,a,o,s,u,l,c){var d;return h(this,(function(f){switch(f.label){case 0:return d={fhirPatient:y.mapPatientToFhirPatient(y.getPatientToCreate(t,n,a,[])),_patientRegistrationData:{isNewPatient:e,formValues:t,patientUuidMap:n,initialAddressFieldValues:a,capturePhotoProps:o,currentLocation:s,initialIdentifierValues:u,currentUser:l,config:c,savePatientTransactionManager:new m}},[4,(0,i.queueSynchronizationItem)(r.Kt,d,{id:t.patientUuid,displayName:"Patient registration",patientUuid:d.fhirPatient.id,dependencies:[]})];case 1:return f.sent(),[2,null]}}))})),function(e,t,n,i,r,a,o,s,u){return p.apply(this,arguments)}),y.savePatientFormOnline=function(){var e=u((function(e,t,n,i,r,o,s,l,c,d,f){var p,m,b;return h(this,(function(v){switch(v.label){case 0:return[4,y.savePatientIdentifiers(e,t.patientUuid,t.identifiers,s,o,f)];case 1:return p=v.sent(),m=y.getPatientToCreate(t,n,i,p),y.getDeletedNames(t.patientUuid,n).forEach(function(){var e=u((function(e){return h(this,(function(t){switch(t.label){case 0:return[4,(0,a.uO)(e.nameUuid,e.personUuid,f)];case 1:return t.sent(),[2]}}))}));return function(t){return e.apply(this,arguments)}}()),[4,(0,a.co)(f,m,e&&!d.patientSaved?void 0:t.patientUuid)];case 2:return(b=v.sent()).ok?(d.patientSaved=!0,[4,y.saveRelationships(t.relationships,b,f)]):[3,6];case 3:return v.sent(),[4,y.saveObservations(t.obs,b,o,l,c,f)];case 4:return v.sent(),c.concepts.patientPhotoUuid&&(null==r?void 0:r.imageData)?[4,(0,a.oV)(b.data.uuid,r.imageData,"/ws/rest/v1/obs",r.dateTime||(new Date).toISOString(),c.concepts.patientPhotoUuid,f)]:[3,6];case 5:v.sent(),v.label=6;case 6:return[2,b.data.uuid]}}))}));return function(t,n,i,r,a,o,s,u,l,c,d){return e.apply(this,arguments)}}();var m=function e(){l(this,e),this.patientSaved=!1}},7117:(e,t,n)=>{"use strict";n.d(t,{M1:()=>f,M8:()=>T,Uu:()=>w,ZB:()=>U,bL:()=>y,co:()=>d,eb:()=>P,f$:()=>A,fX:()=>p,kE:()=>b,nI:()=>S,oV:()=>v,r6:()=>m,uO:()=>h});var i=n(9857),r=n(2303),a=n(906),o=n(268);function s(e,t,n,i,r,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(i,r)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var a=e.apply(t,n);function o(e){s(a,i,r,o,u,"next",e)}function u(e){s(a,i,r,o,u,"throw",e)}o(void 0)}))}}var l=function(e,t){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}};function c(e){for(var t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],i=new Uint8Array(t.length),r=0;r<t.length;r++)i[r]=t.charCodeAt(r);var a=new Blob([i],{type:n});return new File([a],"patient-photo.png")}function d(e,t,n){return(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(n||""),{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function f(e,t){return(0,a.openmrsFetch)("/ws/rest/v1/encounter",{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function p(e,t){return(0,a.openmrsFetch)("/ws/rest/v1/idgen/identifiersource/".concat(e,"/identifier"),{headers:{"Content-Type":"application/json"},method:"POST",body:{},signal:t.signal})}function h(e,t,n){return(0,a.openmrsFetch)("/ws/rest/v1/person/".concat(t,"/name/").concat(e),{method:"DELETE",signal:n.signal})}function y(e,t){return(0,a.openmrsFetch)("/ws/rest/v1/relationship",{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function m(e,t,n){return(0,a.openmrsFetch)("/ws/rest/v1/relationship/".concat(t),{headers:{"Content-Type":"application/json"},method:"POST",body:{relationshipType:n.relationshipType},signal:e.signal})}function b(e,t){return(0,a.openmrsFetch)("/ws/rest/v1/relationship/".concat(t),{headers:{"Content-Type":"application/json"},method:"DELETE",signal:e.signal})}function v(e,t,n,i,r,a){return g.apply(this,arguments)}function g(){return(g=u((function(e,t,n,i,r,o){var s;return l(this,(function(u){return(s=new FormData).append("patient",e),s.append("file",c(t)),s.append("json",JSON.stringify({person:e,concept:r,groupMembers:[],obsDatetime:i})),[2,(0,a.openmrsFetch)(n,{method:"POST",signal:o.signal,body:s})]}))}))).apply(this,arguments)}function w(e){var t,n,r,o=(0,a.useConfig)().concepts.patientPhotoUuid,s="/ws/rest/v1/obs?patient=".concat(e,"&concept=").concat(o,"&v=full"),u=(0,i.ZP)(e?s:null,a.openmrsFetch),l=u.data,c=u.error,d=null==l||null===(t=l.data)||void 0===t?void 0:t.results[0];return{data:d?{dateTime:null==d?void 0:d.obsDatetime,imageSrc:null==d||null===(n=d.value)||void 0===n||null===(r=n.links)||void 0===r?void 0:r.uri}:null,isError:c,isLoading:!l&&!c}}function T(e,t){return _.apply(this,arguments)}function _(){return(_=u((function(e,t){return l(this,(function(n){return[2,(0,a.openmrsFetch)("/ws/rest/v1/person?q=".concat(e),{signal:t.signal})]}))}))).apply(this,arguments)}function P(e,t,n){return O.apply(this,arguments)}function O(){return(O=u((function(e,t,n){return l(this,(function(i){return[2,(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(e,"/identifier/"),{method:"POST",headers:{"Content-Type":"application/json"},signal:n.signal,body:t})]}))}))).apply(this,arguments)}function S(e,t,n,i){return D.apply(this,arguments)}function D(){return(D=u((function(e,t,n,i){return l(this,(function(r){return[2,(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(e,"/identifier/").concat(t),{method:"POST",headers:{"Content-Type":"application/json"},signal:i.signal,body:{identifier:n}})]}))}))).apply(this,arguments)}function U(e,t,n){return j.apply(this,arguments)}function j(){return(j=u((function(e,t,n){return l(this,(function(i){return[2,(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(e,"/identifier/").concat(t,"?purge"),{method:"DELETE",headers:{"Content-Type":"application/json"},signal:n.signal})]}))}))).apply(this,arguments)}function A(e){var t,n=(0,r.Z)(e?"/module/addresshierarchy/ajax/getPossibleFullAddresses.form?separator=%2C%20&searchString=".concat(e):null,a.openmrsFetch),i=n.data,s=n.error,u=(0,o.useMemo)((function(){var e;return{addresses:null!==(t=null==i||null===(e=i.data)||void 0===e?void 0:e.map((function(e){return e.address})))&&void 0!==t?t:[],error:s,isLoading:!i&&!s}}),[i,s]);return u}},3979:(e,t,n)=>{var i={"./en.json":[3574,574]};function r(e){if(!n.o(i,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=i[e],r=t[0];return n.e(t[1]).then((()=>n(r)))}r.keys=()=>Object.keys(i),r.id=3979,e.exports=r}}]);
|
|
1
|
+
(self.webpackChunk_openmrs_esm_patient_registration_app=self.webpackChunk_openmrs_esm_patient_registration_app||[]).push([[686],{225:(e,t,n)=>{"use strict";n.d(t,{X8:()=>s,bT:()=>u,bs:()=>o});var i=n(906);function r(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 a(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(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)?r(e,t):void 0}}(e)||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 o=[{id:"demographics",name:"Basic Info",fields:["name","gender","dob","id"]},{id:"contact",name:"Contact Details",fields:["address","phone & email"]},{id:"death",name:"Death Info",fields:[]},{id:"relationships",name:"Relationships",fields:[]}],s=["name","gender","dob","address","id","phone & email"],u={sections:{_type:i.Type.Array,_default:["demographics","contact","relationships"],_description:"An array of strings which are the keys from 'sectionDefinitions' or any of the following built-in sections: '".concat(o.map((function(e){return e.id})).join("', '"),"'."),_elements:{_type:i.Type.String}},sectionDefinitions:{_type:i.Type.Array,_elements:{id:{_type:i.Type.String,_description:"How this section will be referred to in the `sections` configuration. To override a built-in section, use that section's id. The built in section ids are '".concat(o.map((function(e){return e.id})).join("', '"),"'.")},name:{_type:i.Type.String,_description:"The title to display at the top of the section."},fields:{_type:i.Type.Array,_default:[],_description:"The parts to include in the section. Can be any of the following built-in fields: ".concat(s.join(", "),". Can also be an id from an object in the `fieldDefinitions` array, which you can use to define custom fields."),_elements:{_type:i.Type.String}}},_default:[]},fieldDefinitions:{_type:i.Type.Array,_elements:{id:{_type:i.Type.String,_description:"How this field will be referred to in the `fields` element of the `sectionDefinitions` configuration."},type:{_type:i.Type.String,_description:"How this field's data will be stored—a person attribute or an obs."},uuid:{_type:i.Type.UUID,_description:"Person attribute type UUID that this field's data should be saved to."},label:{_type:i.Type.String,_default:null,_description:"The label of the input. By default, uses the metadata `display` attribute."},placeholder:{_type:i.Type.String,_default:"",_description:"Placeholder that will appear in the input."},validation:{required:{_type:i.Type.Boolean,_default:!1},matches:{_type:i.Type.String,_default:null,_description:"Optional RegEx for testing the validity of the input."}},answerConceptSetUuid:{_type:i.Type.ConceptUuid,_default:null,_description:"For coded questions only. A concept which has the possible responses either as answers or as set members."},customConceptAnswers:{_type:i.Type.Array,_elements:{uuid:{_type:i.Type.UUID,_description:"Answer concept UUID"},label:{_type:i.Type.String,_default:null,_description:"The custom label for the answer concept."}},_default:[],_description:"For coded questions only. Provide ability to add custom concept answers."}},_default:[],_description:"Definitions for custom fields that can be used in sectionDefinitions. Can also be used to override built-in fields."},fieldConfigurations:{name:{displayMiddleName:{_type:i.Type.Boolean,_default:!0},unidentifiedPatient:{_type:i.Type.Boolean,_default:!0,_description:"Whether to allow patients to be registered without names."},defaultUnknownGivenName:{_type:i.Type.String,_default:"UNKNOWN",_description:"The given/first name to record for unidentified patients."},defaultUnknownFamilyName:{_type:i.Type.String,_default:"UNKNOWN",_description:"The family/last name to record for unidentified patients."}},gender:{_type:i.Type.Array,_elements:{value:{_type:i.Type.String,_description:"The value for sex option"},label:{_type:i.Type.String,_default:null,_description:"The label displayed for sex option."},id:{_type:i.Type.String,_default:null,_description:"The id for sex option."}},_default:[{id:"male",value:"Male",label:"Male"},{id:"female",value:"Female",label:"Female"},{id:"other",value:"Other",label:"Other"},{id:"unknown",value:"Unknown",label:"Unknown"}],_description:"Provide ability to configure sex options."},address:{useAddressHierarchy:{enabled:{_type:i.Type.Boolean,_description:"Whether to use the Address hierarchy in the registration form or not",_default:!0},useQuickSearch:{_type:i.Type.Boolean,_description:"Whether to use the quick searching through the address saved in the database pre-fill the form.",_default:!0},searchAddressByLevel:{_type:i.Type.Boolean,_description:"Whether to fill the addresses by levels, i.e. County => subCounty, the current field is dependent on it's previous field.",_default:!0},useAddressHierarchyLabel:{_type:i.Type.Object,_description:"Whether to use custom labels for address hierarchy",_default:{}}}}},links:{submitButton:{_type:i.Type.String,_default:"${openmrsSpaBase}/patient/${patientUuid}/chart",_validators:[i.validators.isUrlWithTemplateParameters(["patientUuid"])]}},concepts:{patientPhotoUuid:{_type:i.Type.ConceptUuid,_default:"736e8771-e501-4615-bfa7-570c03f4bef5"}},defaultPatientIdentifierTypes:{_type:i.Type.Array,_elements:{_type:i.Type.PatientIdentifierTypeUuid},_default:[]},registrationObs:{encounterTypeUuid:{_type:i.Type.UUID,_default:null,_description:"Obs created during registration will be associated with an encounter of this type. This must be set in order to use fields of type `obs`."},encounterProviderRoleUuid:{_type:i.Type.UUID,_default:"a0b03050-c99b-11e0-9572-0800200c9a66",_description:"The provider role to use for the registration encounter. Default is 'Unkown'."},registrationFormUuid:{_type:i.Type.UUID,_default:null,_description:"The form UUID to associate with the registration encounter. By default no form will be associated."}},_validators:[(0,i.validator)((function(e){return!e.fieldDefinitions.some((function(e){return"obs"==e.type}))||null!=e.registrationObs.encounterTypeUuid}),"If fieldDefinitions contains any fields of type 'obs', `registrationObs.encounterTypeUuid` must be specified."),(0,i.validator)((function(e){return e.sections.every((function(t){return a(o).concat(a(e.sectionDefinitions)).map((function(e){return e.id})).includes(t)}))}),(function(e){var t=a(o).concat(a(e.sectionDefinitions)).map((function(e){return e.id})),n=e.sections.find((function(e){return!t.includes(e)}));return"'".concat(n,"' is not a valid section ID. Valid section IDs include the built-in sections ").concat(l(o))+(e.sectionDefinitions.length?"; and the defined sections ".concat(l(e.sectionDefinitions),"."):".")})),(0,i.validator)((function(e){return e.sectionDefinitions.every((function(t){return t.fields.every((function(t){return a(s).concat(a(e.fieldDefinitions.map((function(e){return e.id})))).includes(t)}))}))}),(function(e){var t=a(s).concat(a(e.fieldDefinitions.map((function(e){return e.id})))),n=e.sectionDefinitions.find((function(e){return e.fields.some((function(e){return!t.includes(e)}))})),i=n.fields.find((function(e){return!t.includes(e)}));return"The section definition '".concat(n.id,"' contains an invalid field '").concat(i,"'. 'fields' can only contain the built-in fields '").concat(s.join("', '"),"'")+(e.fieldDefinitions.length?"; or the defined fields ".concat(l(e.fieldDefinitions),"."):".")}))]};function l(e){return"'".concat(e.map((function(e){return e.id})).join("', '"),"'")}},8179:(e,t,n)=>{"use strict";n.d(t,{Kt:()=>l,QT:()=>c,UO:()=>s,e1:()=>u});var i,r,a,o=n(906),s="custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))",u="@openmrs/esm-patient-registration-app",l="patient-registration",c=(i={},a="network-first",(r=o.omrsOfflineCachingStrategyHttpHeaderName)in i?Object.defineProperty(i,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[r]=a,i)},1686:(e,t,n)=>{"use strict";n.r(t),n.d(t,{backendDependencies:()=>v,importTranslation:()=>b,setupOpenMRS:()=>g,version:()=>m});var i=n(906),r=n(3076),a=n(225),o=n(8179),s=n(6279);function u(e,t,n,i,r,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(i,r)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var a=e.apply(t,n);function o(e){u(a,i,r,o,s,"next",e)}function s(e){u(a,i,r,o,s,"throw",e)}o(void 0)}))}}var c=function(e,t){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}};function d(e){return["/ws/fhir2/R4/Patient/".concat(e),"/ws/rest/v1/relationship?v=".concat(o.UO,"&person=").concat(e),"/ws/rest/v1/person/".concat(e,"/attribute"),"/ws/rest/v1/patient/".concat(e,"/identifier?v=custom:(uuid,identifier,identifierType:(uuid,required,name),preferred)")].map((function(e){return window.origin+(0,i.makeUrl)(e)}))}function f(){return p.apply(this,arguments)}function p(){return(p=l((function(){return c(this,(function(e){switch(e.label){case 0:return[4,Promise.all([(0,s.X1)(),(0,s.Te)(),(0,s.mt)(),(0,s.St)()])];case 1:return e.sent(),[2]}}))}))).apply(this,arguments)}function h(e,t){return y.apply(this,arguments)}function y(){return(y=l((function(e,t){return c(this,(function(n){switch(n.label){case 0:return[4,r.y.savePatientFormOnline(e._patientRegistrationData.isNewPatient,e._patientRegistrationData.formValues,e._patientRegistrationData.patientUuidMap,e._patientRegistrationData.initialAddressFieldValues,e._patientRegistrationData.capturePhotoProps,e._patientRegistrationData.currentLocation,e._patientRegistrationData.initialIdentifierValues,e._patientRegistrationData.currentUser,e._patientRegistrationData.config,e._patientRegistrationData.savePatientTransactionManager,t.abort)];case 1:return n.sent(),[2]}}))}))).apply(this,arguments)}var m="4.0.2-pre.707",b=n(3979),v={"webservices.rest":"^2.24.0"};function g(){var e={featureName:"Patient Registration",moduleName:o.e1};return(0,i.defineConfigSchema)(o.e1,a.bT),(0,i.registerBreadcrumbs)([{path:"".concat(window.spaBase,"/").concat(o.Kt),title:"Patient Registration",parent:"".concat(window.spaBase,"/home")}]),(0,i.setupOfflineSync)(o.Kt,[],h,{onBeginEditSyncItem:function(e){(0,i.navigate)({to:"${openmrsSpaBase}/patient/".concat(e.content.fhirPatient.id,"/edit")})}}),(0,i.subscribePrecacheStaticDependencies)(f),(0,i.setupDynamicOfflineDataHandler)({id:"esm-patient-registration-app:patient",type:"patient",displayName:"Patient registration",isSynced:function(e){return l((function(){var t,n;return c(this,(function(i){switch(i.label){case 0:return t=d(e),[4,caches.open("omrs-spa-cache-v1")];case 1:return[4,i.sent().keys()];case 2:return n=i.sent().map((function(e){return e.url})),[2,t.every((function(e){return n.includes(e)}))]}}))}))()},sync:function(e){return l((function(){var t;return c(this,(function(n){switch(n.label){case 0:return t=d(e),[4,Promise.allSettled(t.map((r=l((function(e){return c(this,(function(t){switch(t.label){case 0:return[4,(0,i.messageOmrsServiceWorker)({type:"registerDynamicRoute",url:e})];case 1:return t.sent(),[4,fetch(e)];case 2:return t.sent(),[2]}}))})),function(e){return r.apply(this,arguments)})))];case 1:return n.sent(),[2]}var r}))}))()}}),{pages:[{load:(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(430),n.e(375),n.e(504),n.e(924),n.e(658)]).then(n.bind(n,7658))}),e),route:"patient-registration",online:{savePatientForm:r.y.savePatientFormOnline,isOffline:!1},offline:{savePatientForm:r.y.savePatientFormOffline,isOffline:!0}}],extensions:[{id:"add-patient-action",slot:"top-nav-actions-slot",load:(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(430),n.e(375),n.e(206)]).then(n.bind(n,8206))}),e),online:!0,offline:!0},{id:"cancel-patient-edit-modal",load:(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(430),n.e(924),n.e(735)]).then(n.bind(n,5735))}),e),online:!0,offline:!0},{id:"patient-photo-widget",slot:"patient-photo-slot",load:(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(854),n.e(975)]).then(n.bind(n,9975))}),e),online:!0,offline:!0},{id:"edit-patient-details-button",slot:"patient-search-actions-slot",load:(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(924),n.e(635)]).then(n.bind(n,2635))}),e),online:!0,offline:!0},{id:"delete-identifier-confirmation-modal",load:(0,i.getAsyncLifecycle)((function(){return Promise.all([n.e(430),n.e(924),n.e(242)]).then(n.bind(n,5242))}),e),online:!0,offline:!0}]}}},6279:(e,t,n)=>{"use strict";n.d(t,{Cg:()=>g,St:()=>D,Te:()=>_,X1:()=>w,mt:()=>O});var i=n(268),r=n.n(i),a=n(3662),o=n(2777),s=n(8407),u=n(906),l=n(8179);function c(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 d(e,t,n,i,r,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(i,r)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var a=e.apply(t,n);function o(e){d(a,i,r,o,s,"next",e)}function s(e){d(a,i,r,o,s,"throw",e)}o(void 0)}))}}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(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){p(e,t,n[t])}))}return e}function y(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 i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function m(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,s=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(a.push(i.value),!t||a.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(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)?c(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.")}()}var b=function(e,t){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},v=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},g=r().createContext(null);function w(e){return T.apply(this,arguments)}function T(){return(T=f((function(e){return b(this,(function(t){switch(t.label){case 0:return[4,F("/ws/rest/v1/session",e)];case 1:return[2,t.sent().data]}}))}))).apply(this,arguments)}function _(e){return P.apply(this,arguments)}function P(){return(P=f((function(e){return b(this,(function(t){switch(t.label){case 0:return[4,F("/ws/rest/v1/systemsetting?q=layout.address.format&v=custom:(value)",e)];case 1:return[2,t.sent().data]}}))}))).apply(this,arguments)}function O(e){return S.apply(this,arguments)}function S(){return(S=f((function(e){return b(this,(function(t){switch(t.label){case 0:return[4,F("/ws/rest/v1/relationshiptype?v=default",e)];case 1:return[2,t.sent().data]}}))}))).apply(this,arguments)}function D(e){return U.apply(this,arguments)}function U(){return(U=f((function(e){var t,n,i,r,o,s,u,l,c;return b(this,(function(d){switch(d.label){case 0:return[4,j(e)];case 1:t=d.sent(),n=t.filter(Boolean),i=!0,r=!1,o=void 0,d.label=2;case 2:d.trys.push([2,7,8,9]),s=function(){var t,n,i,r;return b(this,(function(o){switch(o.label){case 0:return t=l.value,[4,Promise.all([k(t.uuid,e),I(e)])];case 1:return n=m.apply(void 0,[o.sent(),2]),i=n[0],r=n[1],t.identifierSources=i.data.results.map((function(e){var t=(0,a.Z)(r.data.results,{source:{uuid:e.uuid}});return e.autoGenerationOption=t,e})),[2]}}))},u=n[Symbol.iterator](),d.label=3;case 3:return(i=(l=u.next()).done)?[3,6]:[5,v(s())];case 4:d.sent(),d.label=5;case 5:return i=!0,[3,3];case 6:return[3,9];case 7:return c=d.sent(),r=!0,o=c,[3,9];case 8:try{i||null==u.return||u.return()}finally{if(r)throw o}return[7];case 9:return[2,n]}}))}))).apply(this,arguments)}function j(e){return A.apply(this,arguments)}function A(){return(A=f((function(e){var t,n,i,r,a,s,u,l,c;return b(this,(function(d){switch(d.label){case 0:return[4,F("/ws/rest/v1/patientidentifiertype?v=full",e)];case 1:return t=d.sent(),[4,F("/ws/rest/v1/metadatamapping/termmapping?v=full&code=emr.primaryIdentifierType",e)];case 2:return n=d.sent(),t.ok?(u=null==t||null===(i=t.data)||void 0===i?void 0:i.results,l=null==n||null===(r=n.data)||void 0===r||null===(a=r.results)||void 0===a||null===(s=a[0])||void 0===s?void 0:s.metadataUuid,c=(null==n?void 0:n.ok)?[x(null==u?void 0:u.find((function(e){return e.uuid===l})),!0)]:[],u.forEach((function(e){e.uuid!==l&&c.push(x(e,!1))})),[2,c.map((function(e){return y(h({},e),{fieldName:(0,o.Z)(e.name)})}))]):[2,[]]}}))}))).apply(this,arguments)}function k(e,t){return N.apply(this,arguments)}function N(){return(N=f((function(e,t){return b(this,(function(n){switch(n.label){case 0:return[4,F("/ws/rest/v1/idgen/identifiersource?v=default&identifierType=".concat(e),t)];case 1:return[2,n.sent()]}}))}))).apply(this,arguments)}function I(e){return C.apply(this,arguments)}function C(){return(C=f((function(e){return b(this,(function(t){switch(t.label){case 0:return[4,F("/ws/rest/v1/idgen/autogenerationoption?v=full",e)];case 1:return[2,t.sent()]}}))}))).apply(this,arguments)}function F(e,t){return E.apply(this,arguments)}function E(){return(E=f((function(e,t){return b(this,(function(n){switch(n.label){case 0:return[4,(0,u.messageOmrsServiceWorker)({type:"registerDynamicRoute",pattern:(0,s.Z)(e)})];case 1:return n.sent(),[4,(0,u.openmrsFetch)(e,{headers:l.QT,signal:null==t?void 0:t.signal})];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}function x(e,t){return{name:e.display,fieldName:(0,o.Z)(e.display),required:e.required,uuid:e.uuid,format:e.format,isPrimary:t,uniquenessBehavior:e.uniquenessBehavior}}},3076:(e,t,n)=>{"use strict";n.d(t,{I:()=>m,y:()=>y});var i=n(906),r=n(8179),a=n(7117);function o(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 s(e,t,n,i,r,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(i,r)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var a=e.apply(t,n);function o(e){s(a,i,r,o,u,"next",e)}function u(e){s(a,i,r,o,u,"throw",e)}o(void 0)}))}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(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){c(e,t,n[t])}))}return e}function f(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,s=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(a.push(i.value),!t||a.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(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)?o(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.")}()}var p,h=function(e,t){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},y=function(){function e(){l(this,e)}return e.saveRelationships=function(e,t,n){return u((function(){return h(this,(function(i){return[2,Promise.all(e.filter((function(e){return e.relationshipType})).filter((function(e){return!!e.action})).map((function(e){var i=e.relatedPersonUuid,r=e.relationshipType,o=e.uuid,s=e.action,u=f(r.split("/"),2),l=u[0],c=u[1],d=t.data.uuid,p="aIsToB"===c,h={personA:p?i:d,personB:p?d:i,relationshipType:l};switch(s){case"ADD":return(0,a.bL)(n,h);case"UPDATE":return(0,a.r6)(n,o,h);case"DELETE":return(0,a.kE)(n,o)}})))]}))}))()},e.saveObservations=function(e,t,n,i,r,o){return u((function(){var s;return h(this,(function(u){if(e&&Object.keys(e).length>0){if(r.registrationObs.encounterTypeUuid)return s={encounterDatetime:new Date,patient:t.data.uuid,encounterType:r.registrationObs.encounterTypeUuid,location:n,encounterProviders:[{provider:i.currentProvider.uuid,encounterRole:r.registrationObs.encounterProviderRoleUuid}],form:r.registrationObs.registrationFormUuid,obs:Object.keys(e).map((function(t){return{concept:t,value:e[t]}}))},[2,(0,a.M1)(o,s)];console.error("The registration form has been configured to have obs fields, but no registration encounter type has been configured. Obs field values will not be saved.")}return[2]}))}))()},e.savePatientIdentifiers=function(e,t,n,i,r,o){return u((function(){var s;return h(this,(function(l){var c;return s=Object.values(n).map((c=u((function(n){var i,s,u,l,c,d,f,p,y,m;return h(this,(function(h){switch(h.label){case 0:return i=n.identifierTypeUuid,s=n.identifierValue,u=n.identifierUuid,l=n.selectedSource,c=n.preferred,d=n.autoGeneration,f=n.initialValue,s||d&&l?d?[3,1]:(y=s,[3,4]):[3,9];case 1:return[4,(0,a.fX)(n.selectedSource.uuid,o)];case 2:return[4,h.sent().data.identifier];case 3:y=h.sent(),h.label=4;case 4:return m={uuid:u,identifier:p=y,identifierType:i,location:r,preferred:c},e?[3,8]:f?[3,6]:[4,(0,a.eb)(t,m,o)];case 5:return h.sent(),[3,8];case 6:return f===p?[3,8]:[4,(0,a.nI)(t,u,m.identifier,o)];case 7:h.sent(),h.label=8;case 8:return[2,m];case 9:return[2]}}))})),function(e){return c.apply(this,arguments)})),t&&Object.keys(i).filter((function(e){return!n[e]})).forEach(function(){var e=u((function(e){return h(this,(function(n){switch(n.label){case 0:return[4,(0,a.ZB)(t,i[e].identifierUuid,o)];case 1:return n.sent(),[2]}}))}));return function(t){return e.apply(this,arguments)}}()),[2,Promise.all(s)]}))}))()},e.getDeletedNames=function(e,t){return(null==t?void 0:t.additionalNameUuid)?[{nameUuid:t.additionalNameUuid,personUuid:e}]:[]},e.getPatientToCreate=function(t,n,i,r){var a,o,s;return o=t.birthdate,a=(null!=(s=Date)&&"undefined"!=typeof Symbol&&s[Symbol.hasInstance]?s[Symbol.hasInstance](o):o instanceof s)?[t.birthdate.getFullYear(),t.birthdate.getMonth()+1,t.birthdate.getDate()].join("-"):t.birthdate,{uuid:t.patientUuid,person:d({uuid:t.patientUuid,names:e.getNames(t,n),gender:t.gender.charAt(0),birthdate:a,birthdateEstimated:t.birthdateEstimated,attributes:e.getPatientAttributes(t),addresses:[t.address]},e.getPatientDeathInfo(t)),identifiers:r}},e.getNames=function(e,t){var n=[{uuid:t.preferredNameUuid,preferred:!0,givenName:e.givenName,middleName:e.middleName,familyName:e.familyName}];return e.addNameInLocalLanguage&&n.push({uuid:t.additionalNameUuid,preferred:!1,givenName:e.additionalGivenName,middleName:e.additionalMiddleName,familyName:e.additionalFamilyName}),n},e.getPatientAttributes=function(e){var t=[];if(e.attributes){var n=!0,i=!1,r=void 0;try{for(var a,o=Object.entries(e.attributes)[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=f(a.value,2),u=s[0],l=s[1];t.push({attributeType:u,value:l})}}catch(e){i=!0,r=e}finally{try{n||null==o.return||o.return()}finally{if(i)throw r}}}return e.unidentifiedPatient&&t.push({attributeType:"8b56eac7-5c76-4b9c-8c6f-1deab8d3fc47",value:"true"}),t},e.getPatientDeathInfo=function(e){var t=e.isDead,n=e.deathDate,i=e.deathCause;return{dead:t,deathDate:t?n:void 0,causeOfDeath:t?i:void 0}},e.mapPatientToFhirPatient=function(e){var t,n,i,r,a,o;return{id:e.uuid,gender:{M:"male",F:"female",O:"other",U:"unknown"}[null===(t=e.person)||void 0===t?void 0:t.gender],birthDate:null===(n=e.person)||void 0===n?void 0:n.birthdate,deceasedBoolean:e.person.dead,deceasedDateTime:e.person.deathDate,name:null===(i=e.person)||void 0===i||null===(r=i.names)||void 0===r?void 0:r.map((function(e){return{given:[e.givenName,e.middleName].filter(Boolean),family:e.familyName}})),address:null===(a=e.person)||void 0===a?void 0:a.addresses.map((function(e){return{city:e.cityVillage,country:e.country,postalCode:e.postalCode,state:e.stateProvince,use:"home"}})),telecom:null===(o=e.person.attributes)||void 0===o?void 0:o.filter((function(e){return"Telephone Number"===e.attributeType}))}},e}();y.savePatientFormOffline=(p=u((function(e,t,n,a,o,s,u,l,c){var d;return h(this,(function(f){switch(f.label){case 0:return d={fhirPatient:y.mapPatientToFhirPatient(y.getPatientToCreate(t,n,a,[])),_patientRegistrationData:{isNewPatient:e,formValues:t,patientUuidMap:n,initialAddressFieldValues:a,capturePhotoProps:o,currentLocation:s,initialIdentifierValues:u,currentUser:l,config:c,savePatientTransactionManager:new m}},[4,(0,i.queueSynchronizationItem)(r.Kt,d,{id:t.patientUuid,displayName:"Patient registration",patientUuid:d.fhirPatient.id,dependencies:[]})];case 1:return f.sent(),[2,null]}}))})),function(e,t,n,i,r,a,o,s,u){return p.apply(this,arguments)}),y.savePatientFormOnline=function(){var e=u((function(e,t,n,i,r,o,s,l,c,d,f){var p,m,b;return h(this,(function(v){switch(v.label){case 0:return[4,y.savePatientIdentifiers(e,t.patientUuid,t.identifiers,s,o,f)];case 1:return p=v.sent(),m=y.getPatientToCreate(t,n,i,p),y.getDeletedNames(t.patientUuid,n).forEach(function(){var e=u((function(e){return h(this,(function(t){switch(t.label){case 0:return[4,(0,a.uO)(e.nameUuid,e.personUuid,f)];case 1:return t.sent(),[2]}}))}));return function(t){return e.apply(this,arguments)}}()),[4,(0,a.co)(f,m,e&&!d.patientSaved?void 0:t.patientUuid)];case 2:return(b=v.sent()).ok?(d.patientSaved=!0,[4,y.saveRelationships(t.relationships,b,f)]):[3,6];case 3:return v.sent(),[4,y.saveObservations(t.obs,b,o,l,c,f)];case 4:return v.sent(),c.concepts.patientPhotoUuid&&(null==r?void 0:r.imageData)?[4,(0,a.oV)(b.data.uuid,r.imageData,"/ws/rest/v1/obs",r.dateTime||(new Date).toISOString(),c.concepts.patientPhotoUuid,f)]:[3,6];case 5:v.sent(),v.label=6;case 6:return[2,b.data.uuid]}}))}));return function(t,n,i,r,a,o,s,u,l,c,d){return e.apply(this,arguments)}}();var m=function e(){l(this,e),this.patientSaved=!1}},7117:(e,t,n)=>{"use strict";n.d(t,{M1:()=>f,M8:()=>T,Uu:()=>w,ZB:()=>U,bL:()=>y,co:()=>d,eb:()=>P,f$:()=>A,fX:()=>p,kE:()=>b,nI:()=>S,oV:()=>v,r6:()=>m,uO:()=>h});var i=n(9857),r=n(2303),a=n(906),o=n(268);function s(e,t,n,i,r,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(i,r)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var a=e.apply(t,n);function o(e){s(a,i,r,o,u,"next",e)}function u(e){s(a,i,r,o,u,"throw",e)}o(void 0)}))}}var l=function(e,t){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}};function c(e){for(var t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],i=new Uint8Array(t.length),r=0;r<t.length;r++)i[r]=t.charCodeAt(r);var a=new Blob([i],{type:n});return new File([a],"patient-photo.png")}function d(e,t,n){return(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(n||""),{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function f(e,t){return(0,a.openmrsFetch)("/ws/rest/v1/encounter",{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function p(e,t){return(0,a.openmrsFetch)("/ws/rest/v1/idgen/identifiersource/".concat(e,"/identifier"),{headers:{"Content-Type":"application/json"},method:"POST",body:{},signal:t.signal})}function h(e,t,n){return(0,a.openmrsFetch)("/ws/rest/v1/person/".concat(t,"/name/").concat(e),{method:"DELETE",signal:n.signal})}function y(e,t){return(0,a.openmrsFetch)("/ws/rest/v1/relationship",{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function m(e,t,n){return(0,a.openmrsFetch)("/ws/rest/v1/relationship/".concat(t),{headers:{"Content-Type":"application/json"},method:"POST",body:{relationshipType:n.relationshipType},signal:e.signal})}function b(e,t){return(0,a.openmrsFetch)("/ws/rest/v1/relationship/".concat(t),{headers:{"Content-Type":"application/json"},method:"DELETE",signal:e.signal})}function v(e,t,n,i,r,a){return g.apply(this,arguments)}function g(){return(g=u((function(e,t,n,i,r,o){var s;return l(this,(function(u){return(s=new FormData).append("patient",e),s.append("file",c(t)),s.append("json",JSON.stringify({person:e,concept:r,groupMembers:[],obsDatetime:i})),[2,(0,a.openmrsFetch)(n,{method:"POST",signal:o.signal,body:s})]}))}))).apply(this,arguments)}function w(e){var t,n,r,o=(0,a.useConfig)().concepts.patientPhotoUuid,s="/ws/rest/v1/obs?patient=".concat(e,"&concept=").concat(o,"&v=full"),u=(0,i.ZP)(e?s:null,a.openmrsFetch),l=u.data,c=u.error,d=null==l||null===(t=l.data)||void 0===t?void 0:t.results[0];return{data:d?{dateTime:null==d?void 0:d.obsDatetime,imageSrc:null==d||null===(n=d.value)||void 0===n||null===(r=n.links)||void 0===r?void 0:r.uri}:null,isError:c,isLoading:!l&&!c}}function T(e,t){return _.apply(this,arguments)}function _(){return(_=u((function(e,t){return l(this,(function(n){return[2,(0,a.openmrsFetch)("/ws/rest/v1/person?q=".concat(e),{signal:t.signal})]}))}))).apply(this,arguments)}function P(e,t,n){return O.apply(this,arguments)}function O(){return(O=u((function(e,t,n){return l(this,(function(i){return[2,(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(e,"/identifier/"),{method:"POST",headers:{"Content-Type":"application/json"},signal:n.signal,body:t})]}))}))).apply(this,arguments)}function S(e,t,n,i){return D.apply(this,arguments)}function D(){return(D=u((function(e,t,n,i){return l(this,(function(r){return[2,(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(e,"/identifier/").concat(t),{method:"POST",headers:{"Content-Type":"application/json"},signal:i.signal,body:{identifier:n}})]}))}))).apply(this,arguments)}function U(e,t,n){return j.apply(this,arguments)}function j(){return(j=u((function(e,t,n){return l(this,(function(i){return[2,(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(e,"/identifier/").concat(t,"?purge"),{method:"DELETE",headers:{"Content-Type":"application/json"},signal:n.signal})]}))}))).apply(this,arguments)}function A(e){var t,n=(0,r.Z)(e?"/module/addresshierarchy/ajax/getPossibleFullAddresses.form?separator=%2C%20&searchString=".concat(e):null,a.openmrsFetch),i=n.data,s=n.error,u=(0,o.useMemo)((function(){var e;return{addresses:null!==(t=null==i||null===(e=i.data)||void 0===e?void 0:e.map((function(e){return e.address})))&&void 0!==t?t:[],error:s,isLoading:!i&&!s}}),[i,s]);return u}},3979:(e,t,n)=>{var i={"./en.json":[3574,574],"./km.json":[7807,807]};function r(e){if(!n.o(i,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=i[e],r=t[0];return n.e(t[1]).then((()=>n(r)))}r.keys=()=>Object.keys(i),r.id=3979,e.exports=r}}]);
|
package/dist/807.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_openmrs_esm_patient_registration_app=self.webpackChunk_openmrs_esm_patient_registration_app||[]).push([[807],{7807:e=>{e.exports=JSON.parse('{"addRelationshipButtonText":"បន្ថែមទំនាក់ទំនង","address1":"","addressHeader":"អាសយដ្ឋាន","allFieldsRequiredText":"តម្រូវឱ្យបំពេញគ្រប់កន្លែងចំហរទាំងអស់ លុះត្រាតែមានសម្គាល់ថាជាជម្រើស","autoGeneratedPlaceholderText":"ទាញចេញទិន្នន័យដោយស្វ័យប្រវត្តិ","birthdayNotInTheFuture":"ថ្ងៃខែឆ្នាំកំណើតមិនអាចមាននាពេលអនាគតទេ","birthdayRequired":"តម្រូវឱ្យបំពេញថ្ងៃខែឆ្នាំកំណើត","birthFieldLabelText":"ថ្ងៃខែឆ្នាំកំណើត","cancel":"បោះបង់ចោល","causeOfDeathInputLabel":"មូលហេតុនៃការស្លាប់","cityVillage":"","configure":"កំណត់រចនាសម្ព័ន្ធ","country":"","createNew":"បង្កើតថ្មី","dateOfBirthLabelText":"ថ្ងៃខែឆ្នាំកំណើត","deathDateInputLabel":"កាលបរិច្ឆេទនៃការស្លាប់","deathdayNotInTheFuture":"ថ្ងៃស្លាប់មិនអាចមាននាពេលអនាគតទេ។","deleteIdentifierTooltip":"លុប","deleteRelationshipTooltipText":"លុប","discard":"បោះបង់","discardModalBody":"The changes you made to this patient\'s details have not been saved. Discard changes?","discardModalHeader":"បញ្ជាក់ការលុបចោលការផ្លាស់ប្តូរ","dobToggleLabelText":"ស្គាល់ថ្ងៃខែឆ្នាំកំណើត?","edit":"កែសម្រួល","editIdentifierTooltip":"កែសម្រួល","editPatientDetails":"កែសម្រួលព័ត៌មានលម្អិតអ្នកជំងឺ","emailLabelText":"អ៊ីមែល","estimatedMonthsLabelText":"ខែប៉ាន់ស្មាន","estimatedYearsLabelText":"ឆ្នាំប៉ាន់ស្មាន","familyNameLabelText":"នាមត្រកូល","familyNameRequired":"តម្រូវឱ្យបំពេញនាមត្រកូល","femaleLabelText":"ស្រី","fieldErrorTitleMessage":"ផ្នែកខាងក្រោមមានកំហុស៖","fullNameLabelText":"ឈ្មោះពេញ","genderLabelText":"ភេទ","genderRequired":"តម្រូវឱ្យបំពេញភេទ","genderUnspecified":"តម្រូវឱ្យបំពេញភេទ","givenNameLabelText":"នាមខ្លួន","givenNameRequired":"តម្រូវឱ្យបំពេញឈ្មោះ","identifierValueRequired":"តម្រូវឱ្យមានកំណត់អត្តសញ្ញាណ","idFieldLabelText":"អ្នកកំណត់អត្តសញ្ញាណ","incompleteForm":"ទម្រង់មិនពេញលេញ","invalidEmail":"ត្រូវតែផ្តល់ឱ្យអ៊ីមែលដែលមានសុពលភាព","invalidInput":"ការបញ្ចូលមិនត្រឹមត្រូវ","isDeadInputLabel":"គឺស្លាប់","jumpTo":"រំលងទៅ","maleLabelText":"ប្រុស","middleNameLabelText":"ឈ្មោះកណ្តាល","months":"ខែ","negativeMonths":"ខែអវិជ្ជមាន","negativeYears":"ឆ្នាំអវិជ្ជមាន","no":"ទេ","numberInNameDubious":"លេខគឺជាឈ្មោះគួរឱ្យសង្ស័យ","optional":"ជាជម្រើស","otherLabelText":"ផ្សេងទៀត","patient":"អ្នកជំងឺ","patientNameKnown":"ស្គាល់ឈ្មោះអ្នកជំងឺ?","phoneEmailLabelText":"ទូរស័ព្ទ អ៊ីមែល។ល។","phoneNumberInputLabelText":"លេខទូរស័ព្ទ","postalCode":"","registerPatient":"ចុះឈ្មោះអ្នកជំងឺ","registrationSuccessToastDescription":"ឥឡូវនេះអ្នកជំងឺអាចត្រូវបានរកឃើញដោយស្វែងរកពួកគេដោយប្រើឈ្មោះឬអត្តលេខរបស់ពួកគេ","registrationSuccessToastTitle":"បង្កើតការចុះឈ្មោះអ្នកជំងឺថ្មី","relationship":"ទំនាក់ទំនង","relationshipPlaceholder":"ទំនាក់ទំនង","relationshipRemovedText":"ដកទំនាក់ទំនងចេញ","relationshipToPatient":"ទំនាក់ទំនងជាមួយអ្នកជំងឺ","relativeFullNameLabelText":"ឈ្មោះពេញ","relativeNamePlaceholder":"នាមត្រកូលនាមខ្លួន","resetIdentifierTooltip":"កំណត់ឡើងវិញ","restoreRelationshipActionButton":"មិនធ្វើវិញ","sexFieldLabelText":"ភេទ","stateProvince":"","stroke":"ធ្លាប់មានគ្រោះថ្នាក់សរសៃឈាមខួរក្បាល","unidentifiedPatient":"អ្នកជំងឺមិនស្គាល់អត្តលេខ","unknown":"មិនដឹង","unknownLabelText":"មិនដឹង","updatePatient":"ធ្វើបច្ចុប្បន្នភាពអ្នកជំងឺ","updationSuccessToastDescription":"ព័ត៌មានរបស់អ្នកជំងឺត្រូវបានធ្វើបច្ចុប្បន្នភាពដោយជោគជ័យ","updationSuccessToastTitle":"ព័ត៌មានលម្អិតអំពីអ្នកជំងឺត្រូវបានធ្វើបច្ចុប្បន្នភាព","years":"ឆ្នាំ","yearsEstimateRequired":"តម្រូវឱ្យមានការប៉ាន់ស្មានឆ្នាំ","yes":"បាទ/ចា"}')}}]);
|
package/dist/main.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see main.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e,t,n={225:(e,t,n)=>{"use strict";n.d(t,{X8:()=>u,bs:()=>a});var r=n(906);function i(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 o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(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)?i(e,t):void 0}}(e)||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 a=[{id:"demographics",name:"Basic Info",fields:["name","gender","dob","id"]},{id:"contact",name:"Contact Details",fields:["address","phone & email"]},{id:"death",name:"Death Info",fields:[]},{id:"relationships",name:"Relationships",fields:[]}],u=["name","gender","dob","address","id","phone & email"];function c(e){return"'".concat(e.map((function(e){return e.id})).join("', '"),"'")}r.Type.Array,"An array of strings which are the keys from 'sectionDefinitions' or any of the following built-in sections: '".concat(a.map((function(e){return e.id})).join("', '"),"'."),r.Type.String,r.Type.Array,r.Type.String,"How this section will be referred to in the `sections` configuration. To override a built-in section, use that section's id. The built in section ids are '".concat(a.map((function(e){return e.id})).join("', '"),"'."),r.Type.String,r.Type.Array,"The parts to include in the section. Can be any of the following built-in fields: ".concat(u.join(", "),". Can also be an id from an object in the `fieldDefinitions` array, which you can use to define custom fields."),r.Type.String,r.Type.Array,r.Type.String,r.Type.String,r.Type.UUID,r.Type.String,r.Type.String,r.Type.Boolean,r.Type.String,r.Type.ConceptUuid,r.Type.Array,r.Type.UUID,r.Type.String,r.Type.Boolean,r.Type.Boolean,r.Type.String,r.Type.String,r.Type.Array,r.Type.String,r.Type.String,r.Type.String,r.Type.Boolean,r.Type.Boolean,r.Type.Boolean,r.Type.Object,r.Type.String,r.validators.isUrlWithTemplateParameters(["patientUuid"]),r.Type.ConceptUuid,r.Type.Array,r.Type.PatientIdentifierTypeUuid,r.Type.UUID,r.Type.UUID,r.Type.UUID,(0,r.validator)((function(e){return!e.fieldDefinitions.some((function(e){return"obs"==e.type}))||null!=e.registrationObs.encounterTypeUuid}),"If fieldDefinitions contains any fields of type 'obs', `registrationObs.encounterTypeUuid` must be specified."),(0,r.validator)((function(e){return e.sections.every((function(t){return o(a).concat(o(e.sectionDefinitions)).map((function(e){return e.id})).includes(t)}))}),(function(e){var t=o(a).concat(o(e.sectionDefinitions)).map((function(e){return e.id})),n=e.sections.find((function(e){return!t.includes(e)}));return"'".concat(n,"' is not a valid section ID. Valid section IDs include the built-in sections ").concat(c(a))+(e.sectionDefinitions.length?"; and the defined sections ".concat(c(e.sectionDefinitions),"."):".")})),(0,r.validator)((function(e){return e.sectionDefinitions.every((function(t){return t.fields.every((function(t){return o(u).concat(o(e.fieldDefinitions.map((function(e){return e.id})))).includes(t)}))}))}),(function(e){var t=o(u).concat(o(e.fieldDefinitions.map((function(e){return e.id})))),n=e.sectionDefinitions.find((function(e){return e.fields.some((function(e){return!t.includes(e)}))})),r=n.fields.find((function(e){return!t.includes(e)}));return"The section definition '".concat(n.id,"' contains an invalid field '").concat(r,"'. 'fields' can only contain the built-in fields '").concat(u.join("', '"),"'")+(e.fieldDefinitions.length?"; or the defined fields ".concat(c(e.fieldDefinitions),"."):".")}))},8179:(e,t,n)=>{"use strict";n.d(t,{Kt:()=>c,QT:()=>s,UO:()=>u});var r,i,o,a=n(906),u="custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))",c="patient-registration",s=(r={},o="network-first",(i=a.omrsOfflineCachingStrategyHttpHeaderName)in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o,r)},1686:(e,t,n)=>{"use strict";n(906),n(3076),n(225),n(8179),n(6279),n(3979)},6279:(e,t,n)=>{"use strict";n.d(t,{Cg:()=>m,St:()=>T,Te:()=>w,mt:()=>j});var r=n(268),i=n.n(r),o=n(3662),a=n(2777),u=n(8407),c=n(906),s=n(8179);function l(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 f(e,t,n,r,i,o,a){try{var u=e[o](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,i)}function d(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){f(o,r,i,a,u,"next",e)}function u(e){f(o,r,i,a,u,"throw",e)}a(void 0)}))}}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(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){p(e,t,n[t])}))}return e}function h(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}function y(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,i,o=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){u=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(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)?l(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.")}()}var b=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},g=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.")},m=i().createContext(null);function w(e){return Z.apply(this,arguments)}function Z(){return(Z=d((function(e){return b(this,(function(t){switch(t.label){case 0:return[4,k("/ws/rest/v1/systemsetting?q=layout.address.format&v=custom:(value)",e)];case 1:return[2,t.sent().data]}}))}))).apply(this,arguments)}function j(e){return O.apply(this,arguments)}function O(){return(O=d((function(e){return b(this,(function(t){switch(t.label){case 0:return[4,k("/ws/rest/v1/relationshiptype?v=default",e)];case 1:return[2,t.sent().data]}}))}))).apply(this,arguments)}function T(e){return _.apply(this,arguments)}function _(){return(_=d((function(e){var t,n,r,i,a,u,c,s,l;return b(this,(function(f){switch(f.label){case 0:return[4,S(e)];case 1:t=f.sent(),n=t.filter(Boolean),r=!0,i=!1,a=void 0,f.label=2;case 2:f.trys.push([2,7,8,9]),u=function(){var t,n,r,i;return b(this,(function(a){switch(a.label){case 0:return t=s.value,[4,Promise.all([x(t.uuid,e),E(e)])];case 1:return n=y.apply(void 0,[a.sent(),2]),r=n[0],i=n[1],t.identifierSources=r.data.results.map((function(e){var t=(0,o.Z)(i.data.results,{source:{uuid:e.uuid}});return e.autoGenerationOption=t,e})),[2]}}))},c=n[Symbol.iterator](),f.label=3;case 3:return(r=(s=c.next()).done)?[3,6]:[5,g(u())];case 4:f.sent(),f.label=5;case 5:return r=!0,[3,3];case 6:return[3,9];case 7:return l=f.sent(),i=!0,a=l,[3,9];case 8:try{r||null==c.return||c.return()}finally{if(i)throw a}return[7];case 9:return[2,n]}}))}))).apply(this,arguments)}function S(e){return P.apply(this,arguments)}function P(){return(P=d((function(e){var t,n,r,i,o,u,c,s,l;return b(this,(function(f){switch(f.label){case 0:return[4,k("/ws/rest/v1/patientidentifiertype?v=full",e)];case 1:return t=f.sent(),[4,k("/ws/rest/v1/metadatamapping/termmapping?v=full&code=emr.primaryIdentifierType",e)];case 2:return n=f.sent(),t.ok?(c=null==t||null===(r=t.data)||void 0===r?void 0:r.results,s=null==n||null===(i=n.data)||void 0===i||null===(o=i.results)||void 0===o||null===(u=o[0])||void 0===u?void 0:u.metadataUuid,l=(null==n?void 0:n.ok)?[I(null==c?void 0:c.find((function(e){return e.uuid===s})),!0)]:[],c.forEach((function(e){e.uuid!==s&&l.push(I(e,!1))})),[2,l.map((function(e){return h(v({},e),{fieldName:(0,a.Z)(e.name)})}))]):[2,[]]}}))}))).apply(this,arguments)}function x(e,t){return A.apply(this,arguments)}function A(){return(A=d((function(e,t){return b(this,(function(n){switch(n.label){case 0:return[4,k("/ws/rest/v1/idgen/identifiersource?v=default&identifierType=".concat(e),t)];case 1:return[2,n.sent()]}}))}))).apply(this,arguments)}function E(e){return D.apply(this,arguments)}function D(){return(D=d((function(e){return b(this,(function(t){switch(t.label){case 0:return[4,k("/ws/rest/v1/idgen/autogenerationoption?v=full",e)];case 1:return[2,t.sent()]}}))}))).apply(this,arguments)}function k(e,t){return U.apply(this,arguments)}function U(){return(U=d((function(e,t){return b(this,(function(n){switch(n.label){case 0:return[4,(0,c.messageOmrsServiceWorker)({type:"registerDynamicRoute",pattern:(0,u.Z)(e)})];case 1:return n.sent(),[4,(0,c.openmrsFetch)(e,{headers:s.QT,signal:null==t?void 0:t.signal})];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}function I(e,t){return{name:e.display,fieldName:(0,a.Z)(e.display),required:e.required,uuid:e.uuid,format:e.format,isPrimary:t,uniquenessBehavior:e.uniquenessBehavior}}},3076:(e,t,n)=>{"use strict";n.d(t,{I:()=>y});var r=n(906),i=n(8179),o=n(7117);function a(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 u(e,t,n,r,i,o,a){try{var u=e[o](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,i)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){u(o,r,i,a,c,"next",e)}function c(e){u(o,r,i,a,c,"throw",e)}a(void 0)}))}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(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){l(e,t,n[t])}))}return e}function d(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,i,o=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){u=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(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)?a(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.")}()}var p,v=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},h=function(){function e(){s(this,e)}return e.saveRelationships=function(e,t,n){return c((function(){return v(this,(function(r){return[2,Promise.all(e.filter((function(e){return e.relationshipType})).filter((function(e){return!!e.action})).map((function(e){var r=e.relatedPersonUuid,i=e.relationshipType,a=e.uuid,u=e.action,c=d(i.split("/"),2),s=c[0],l=c[1],f=t.data.uuid,p="aIsToB"===l,v={personA:p?r:f,personB:p?f:r,relationshipType:s};switch(u){case"ADD":return(0,o.bL)(n,v);case"UPDATE":return(0,o.r6)(n,a,v);case"DELETE":return(0,o.kE)(n,a)}})))]}))}))()},e.saveObservations=function(e,t,n,r,i,a){return c((function(){var u;return v(this,(function(c){if(e&&Object.keys(e).length>0){if(i.registrationObs.encounterTypeUuid)return u={encounterDatetime:new Date,patient:t.data.uuid,encounterType:i.registrationObs.encounterTypeUuid,location:n,encounterProviders:[{provider:r.currentProvider.uuid,encounterRole:i.registrationObs.encounterProviderRoleUuid}],form:i.registrationObs.registrationFormUuid,obs:Object.keys(e).map((function(t){return{concept:t,value:e[t]}}))},[2,(0,o.M1)(a,u)];console.error("The registration form has been configured to have obs fields, but no registration encounter type has been configured. Obs field values will not be saved.")}return[2]}))}))()},e.savePatientIdentifiers=function(e,t,n,r,i,a){return c((function(){var u;return v(this,(function(s){var l;return u=Object.values(n).map((l=c((function(n){var r,u,c,s,l,f,d,p,h,y;return v(this,(function(v){switch(v.label){case 0:return r=n.identifierTypeUuid,u=n.identifierValue,c=n.identifierUuid,s=n.selectedSource,l=n.preferred,f=n.autoGeneration,d=n.initialValue,u||f&&s?f?[3,1]:(h=u,[3,4]):[3,9];case 1:return[4,(0,o.fX)(n.selectedSource.uuid,a)];case 2:return[4,v.sent().data.identifier];case 3:h=v.sent(),v.label=4;case 4:return y={uuid:c,identifier:p=h,identifierType:r,location:i,preferred:l},e?[3,8]:d?[3,6]:[4,(0,o.eb)(t,y,a)];case 5:return v.sent(),[3,8];case 6:return d===p?[3,8]:[4,(0,o.nI)(t,c,y.identifier,a)];case 7:v.sent(),v.label=8;case 8:return[2,y];case 9:return[2]}}))})),function(e){return l.apply(this,arguments)})),t&&Object.keys(r).filter((function(e){return!n[e]})).forEach(function(){var e=c((function(e){return v(this,(function(n){switch(n.label){case 0:return[4,(0,o.ZB)(t,r[e].identifierUuid,a)];case 1:return n.sent(),[2]}}))}));return function(t){return e.apply(this,arguments)}}()),[2,Promise.all(u)]}))}))()},e.getDeletedNames=function(e,t){return(null==t?void 0:t.additionalNameUuid)?[{nameUuid:t.additionalNameUuid,personUuid:e}]:[]},e.getPatientToCreate=function(t,n,r,i){var o,a,u;return a=t.birthdate,o=(null!=(u=Date)&&"undefined"!=typeof Symbol&&u[Symbol.hasInstance]?u[Symbol.hasInstance](a):a instanceof u)?[t.birthdate.getFullYear(),t.birthdate.getMonth()+1,t.birthdate.getDate()].join("-"):t.birthdate,{uuid:t.patientUuid,person:f({uuid:t.patientUuid,names:e.getNames(t,n),gender:t.gender.charAt(0),birthdate:o,birthdateEstimated:t.birthdateEstimated,attributes:e.getPatientAttributes(t),addresses:[t.address]},e.getPatientDeathInfo(t)),identifiers:i}},e.getNames=function(e,t){var n=[{uuid:t.preferredNameUuid,preferred:!0,givenName:e.givenName,middleName:e.middleName,familyName:e.familyName}];return e.addNameInLocalLanguage&&n.push({uuid:t.additionalNameUuid,preferred:!1,givenName:e.additionalGivenName,middleName:e.additionalMiddleName,familyName:e.additionalFamilyName}),n},e.getPatientAttributes=function(e){var t=[];if(e.attributes){var n=!0,r=!1,i=void 0;try{for(var o,a=Object.entries(e.attributes)[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var u=d(o.value,2),c=u[0],s=u[1];t.push({attributeType:c,value:s})}}catch(e){r=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}return e.unidentifiedPatient&&t.push({attributeType:"8b56eac7-5c76-4b9c-8c6f-1deab8d3fc47",value:"true"}),t},e.getPatientDeathInfo=function(e){var t=e.isDead,n=e.deathDate,r=e.deathCause;return{dead:t,deathDate:t?n:void 0,causeOfDeath:t?r:void 0}},e.mapPatientToFhirPatient=function(e){var t,n,r,i,o,a;return{id:e.uuid,gender:{M:"male",F:"female",O:"other",U:"unknown"}[null===(t=e.person)||void 0===t?void 0:t.gender],birthDate:null===(n=e.person)||void 0===n?void 0:n.birthdate,deceasedBoolean:e.person.dead,deceasedDateTime:e.person.deathDate,name:null===(r=e.person)||void 0===r||null===(i=r.names)||void 0===i?void 0:i.map((function(e){return{given:[e.givenName,e.middleName].filter(Boolean),family:e.familyName}})),address:null===(o=e.person)||void 0===o?void 0:o.addresses.map((function(e){return{city:e.cityVillage,country:e.country,postalCode:e.postalCode,state:e.stateProvince,use:"home"}})),telecom:null===(a=e.person.attributes)||void 0===a?void 0:a.filter((function(e){return"Telephone Number"===e.attributeType}))}},e}();h.savePatientFormOffline=(p=c((function(e,t,n,o,a,u,c,s,l){var f;return v(this,(function(d){switch(d.label){case 0:return f={fhirPatient:h.mapPatientToFhirPatient(h.getPatientToCreate(t,n,o,[])),_patientRegistrationData:{isNewPatient:e,formValues:t,patientUuidMap:n,initialAddressFieldValues:o,capturePhotoProps:a,currentLocation:u,initialIdentifierValues:c,currentUser:s,config:l,savePatientTransactionManager:new y}},[4,(0,r.queueSynchronizationItem)(i.Kt,f,{id:t.patientUuid,displayName:"Patient registration",patientUuid:f.fhirPatient.id,dependencies:[]})];case 1:return d.sent(),[2,null]}}))})),function(e,t,n,r,i,o,a,u,c){return p.apply(this,arguments)}),h.savePatientFormOnline=function(){var e=c((function(e,t,n,r,i,a,u,s,l,f,d){var p,y,b;return v(this,(function(g){switch(g.label){case 0:return[4,h.savePatientIdentifiers(e,t.patientUuid,t.identifiers,u,a,d)];case 1:return p=g.sent(),y=h.getPatientToCreate(t,n,r,p),h.getDeletedNames(t.patientUuid,n).forEach(function(){var e=c((function(e){return v(this,(function(t){switch(t.label){case 0:return[4,(0,o.uO)(e.nameUuid,e.personUuid,d)];case 1:return t.sent(),[2]}}))}));return function(t){return e.apply(this,arguments)}}()),[4,(0,o.co)(d,y,e&&!f.patientSaved?void 0:t.patientUuid)];case 2:return(b=g.sent()).ok?(f.patientSaved=!0,[4,h.saveRelationships(t.relationships,b,d)]):[3,6];case 3:return g.sent(),[4,h.saveObservations(t.obs,b,a,s,l,d)];case 4:return g.sent(),l.concepts.patientPhotoUuid&&(null==i?void 0:i.imageData)?[4,(0,o.oV)(b.data.uuid,i.imageData,"/ws/rest/v1/obs",i.dateTime||(new Date).toISOString(),l.concepts.patientPhotoUuid,d)]:[3,6];case 5:g.sent(),g.label=6;case 6:return[2,b.data.uuid]}}))}));return function(t,n,r,i,o,a,u,c,s,l,f){return e.apply(this,arguments)}}();var y=function e(){s(this,e),this.patientSaved=!1}},7117:(e,t,n)=>{"use strict";n.d(t,{M1:()=>d,M8:()=>Z,Uu:()=>w,ZB:()=>P,bL:()=>h,co:()=>f,eb:()=>O,f$:()=>A,fX:()=>p,kE:()=>b,nI:()=>_,oV:()=>g,r6:()=>y,uO:()=>v});var r=n(9857),i=n(2303),o=n(906),a=n(268);function u(e,t,n,r,i,o,a){try{var u=e[o](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,i)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){u(o,r,i,a,c,"next",e)}function c(e){u(o,r,i,a,c,"throw",e)}a(void 0)}))}}var s=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};function l(e){for(var t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],r=new Uint8Array(t.length),i=0;i<t.length;i++)r[i]=t.charCodeAt(i);var o=new Blob([r],{type:n});return new File([o],"patient-photo.png")}function f(e,t,n){return(0,o.openmrsFetch)("/ws/rest/v1/patient/".concat(n||""),{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function d(e,t){return(0,o.openmrsFetch)("/ws/rest/v1/encounter",{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function p(e,t){return(0,o.openmrsFetch)("/ws/rest/v1/idgen/identifiersource/".concat(e,"/identifier"),{headers:{"Content-Type":"application/json"},method:"POST",body:{},signal:t.signal})}function v(e,t,n){return(0,o.openmrsFetch)("/ws/rest/v1/person/".concat(t,"/name/").concat(e),{method:"DELETE",signal:n.signal})}function h(e,t){return(0,o.openmrsFetch)("/ws/rest/v1/relationship",{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function y(e,t,n){return(0,o.openmrsFetch)("/ws/rest/v1/relationship/".concat(t),{headers:{"Content-Type":"application/json"},method:"POST",body:{relationshipType:n.relationshipType},signal:e.signal})}function b(e,t){return(0,o.openmrsFetch)("/ws/rest/v1/relationship/".concat(t),{headers:{"Content-Type":"application/json"},method:"DELETE",signal:e.signal})}function g(e,t,n,r,i,o){return m.apply(this,arguments)}function m(){return(m=c((function(e,t,n,r,i,a){var u;return s(this,(function(c){return(u=new FormData).append("patient",e),u.append("file",l(t)),u.append("json",JSON.stringify({person:e,concept:i,groupMembers:[],obsDatetime:r})),[2,(0,o.openmrsFetch)(n,{method:"POST",signal:a.signal,body:u})]}))}))).apply(this,arguments)}function w(e){var t,n,i,a=(0,o.useConfig)().concepts.patientPhotoUuid,u="/ws/rest/v1/obs?patient=".concat(e,"&concept=").concat(a,"&v=full"),c=(0,r.ZP)(e?u:null,o.openmrsFetch),s=c.data,l=c.error,f=null==s||null===(t=s.data)||void 0===t?void 0:t.results[0];return{data:f?{dateTime:null==f?void 0:f.obsDatetime,imageSrc:null==f||null===(n=f.value)||void 0===n||null===(i=n.links)||void 0===i?void 0:i.uri}:null,isError:l,isLoading:!s&&!l}}function Z(e,t){return j.apply(this,arguments)}function j(){return(j=c((function(e,t){return s(this,(function(n){return[2,(0,o.openmrsFetch)("/ws/rest/v1/person?q=".concat(e),{signal:t.signal})]}))}))).apply(this,arguments)}function O(e,t,n){return T.apply(this,arguments)}function T(){return(T=c((function(e,t,n){return s(this,(function(r){return[2,(0,o.openmrsFetch)("/ws/rest/v1/patient/".concat(e,"/identifier/"),{method:"POST",headers:{"Content-Type":"application/json"},signal:n.signal,body:t})]}))}))).apply(this,arguments)}function _(e,t,n,r){return S.apply(this,arguments)}function S(){return(S=c((function(e,t,n,r){return s(this,(function(i){return[2,(0,o.openmrsFetch)("/ws/rest/v1/patient/".concat(e,"/identifier/").concat(t),{method:"POST",headers:{"Content-Type":"application/json"},signal:r.signal,body:{identifier:n}})]}))}))).apply(this,arguments)}function P(e,t,n){return x.apply(this,arguments)}function x(){return(x=c((function(e,t,n){return s(this,(function(r){return[2,(0,o.openmrsFetch)("/ws/rest/v1/patient/".concat(e,"/identifier/").concat(t,"?purge"),{method:"DELETE",headers:{"Content-Type":"application/json"},signal:n.signal})]}))}))).apply(this,arguments)}function A(e){var t,n=(0,i.Z)(e?"/module/addresshierarchy/ajax/getPossibleFullAddresses.form?separator=%2C%20&searchString=".concat(e):null,o.openmrsFetch),r=n.data,u=n.error,c=(0,a.useMemo)((function(){var e;return{addresses:null!==(t=null==r||null===(e=r.data)||void 0===e?void 0:e.map((function(e){return e.address})))&&void 0!==t?t:[],error:u,isLoading:!r&&!u}}),[r,u]);return c}},3979:(e,t,n)=>{var r={"./en.json":[3574,574]};function i(e){if(!n.o(r,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return n.e(t[1]).then((()=>n(i)))}i.keys=()=>Object.keys(r),i.id=3979,e.exports=i},4649:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(8804);const i=function(e,t){for(var n=e.length;n--;)if((0,r.Z)(e[n][0],t))return n;return-1};var o=Array.prototype.splice;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=i(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))},a.prototype.get=function(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]},a.prototype.has=function(e){return i(this.__data__,e)>-1},a.prototype.set=function(e,t){var n=this.__data__,r=i(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const u=a},8896:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(5546),i=n(3221);const o=(0,r.Z)(i.Z,"Map")},3703:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});const r=(0,n(5546).Z)(Object,"create");var i=Object.prototype.hasOwnProperty;var o=Object.prototype.hasOwnProperty;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=r?r(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},a.prototype.get=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)},a.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this};const u=a;var c=n(4649),s=n(8896);const l=function(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};function f(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}f.prototype.clear=function(){this.size=0,this.__data__={hash:new u,map:new(s.Z||c.Z),string:new u}},f.prototype.delete=function(e){var t=l(this,e).delete(e);return this.size-=t?1:0,t},f.prototype.get=function(e){return l(this,e).get(e)},f.prototype.has=function(e){return l(this,e).has(e)},f.prototype.set=function(e,t){var n=l(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const d=f},6218:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(4649);var i=n(8896),o=n(3703);function a(e){var t=this.__data__=new r.Z(e);this.size=t.size}a.prototype.clear=function(){this.__data__=new r.Z,this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},a.prototype.get=function(e){return this.__data__.get(e)},a.prototype.has=function(e){return this.__data__.has(e)},a.prototype.set=function(e,t){var n=this.__data__;if(n instanceof r.Z){var a=n.__data__;if(!i.Z||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o.Z(a)}return n.set(e,t),this.size=n.size,this};const u=a},187:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(3221).Z.Symbol},8282:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(3221).Z.Uint8Array},848:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(4248),i=n(7885),o=n(4975),a=n(6401),u=n(8127),c=Object.prototype.hasOwnProperty;const s=function(e,t){var n=(0,i.Z)(e),s=!n&&(0,r.Z)(e),l=!n&&!s&&(0,o.Z)(e),f=!n&&!s&&!l&&(0,u.Z)(e),d=n||s||l||f,p=d?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],v=p.length;for(var h in e)!t&&!c.call(e,h)||d&&("length"==h||l&&("offset"==h||"parent"==h)||f&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||(0,a.Z)(h,v))||p.push(h);return p}},5598:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},5810:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},2938:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(5810),i=n(7885);const o=function(e,t,n){var o=t(e);return(0,i.Z)(e)?o:(0,r.Z)(o,n(e))}},9001:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(187),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,u=r.Z?r.Z.toStringTag:void 0;var c=Object.prototype.toString;var s=r.Z?r.Z.toStringTag:void 0;const l=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?function(e){var t=o.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[u]=n:delete e[u]),i}(e):function(e){return c.call(e)}(e)}},2342:(e,t,n)=>{"use strict";n.d(t,{Z:()=>V});var r=n(6218),i=n(3703);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i.Z;++t<n;)this.add(e[t])}o.prototype.add=o.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},o.prototype.has=function(e){return this.__data__.has(e)};const a=o,u=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},c=function(e,t,n,r,i,o){var c=1&n,s=e.length,l=t.length;if(s!=l&&!(c&&l>s))return!1;var f=o.get(e),d=o.get(t);if(f&&d)return f==t&&d==e;var p=-1,v=!0,h=2&n?new a:void 0;for(o.set(e,t),o.set(t,e);++p<s;){var y=e[p],b=t[p];if(r)var g=c?r(b,y,p,t,e,o):r(y,b,p,e,t,o);if(void 0!==g){if(g)continue;v=!1;break}if(h){if(!u(t,(function(e,t){if(a=t,!h.has(a)&&(y===e||i(y,e,n,r,o)))return h.push(t);var a}))){v=!1;break}}else if(y!==b&&!i(y,b,n,r,o)){v=!1;break}}return o.delete(e),o.delete(t),v};var s=n(187),l=n(8282),f=n(8804),d=n(5500),p=n(3249),v=s.Z?s.Z.prototype:void 0,h=v?v.valueOf:void 0;var y=n(7245),b=Object.prototype.hasOwnProperty;var g=n(8649),m=n(7885),w=n(4975),Z=n(8127),j="[object Arguments]",O="[object Array]",T="[object Object]",_=Object.prototype.hasOwnProperty;const S=function(e,t,n,i,o,a){var u=(0,m.Z)(e),s=(0,m.Z)(t),v=u?O:(0,g.Z)(e),S=s?O:(0,g.Z)(t),P=(v=v==j?T:v)==T,x=(S=S==j?T:S)==T,A=v==S;if(A&&(0,w.Z)(e)){if(!(0,w.Z)(t))return!1;u=!0,P=!1}if(A&&!P)return a||(a=new r.Z),u||(0,Z.Z)(e)?c(e,t,n,i,o,a):function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new l.Z(e),new l.Z(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,f.Z)(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=d.Z;case"[object Set]":var s=1&r;if(u||(u=p.Z),e.size!=t.size&&!s)return!1;var v=a.get(e);if(v)return v==t;r|=2,a.set(e,t);var y=c(u(e),u(t),r,i,o,a);return a.delete(e),y;case"[object Symbol]":if(h)return h.call(e)==h.call(t)}return!1}(e,t,v,n,i,o,a);if(!(1&n)){var E=P&&_.call(e,"__wrapped__"),D=x&&_.call(t,"__wrapped__");if(E||D){var k=E?e.value():e,U=D?t.value():t;return a||(a=new r.Z),o(k,U,n,i,a)}}return!!A&&(a||(a=new r.Z),function(e,t,n,r,i,o){var a=1&n,u=(0,y.Z)(e),c=u.length;if(c!=(0,y.Z)(t).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in t:b.call(t,l)))return!1}var f=o.get(e),d=o.get(t);if(f&&d)return f==t&&d==e;var p=!0;o.set(e,t),o.set(t,e);for(var v=a;++s<c;){var h=e[l=u[s]],g=t[l];if(r)var m=a?r(g,h,l,t,e,o):r(h,g,l,e,t,o);if(!(void 0===m?h===g||i(h,g,n,r,o):m)){p=!1;break}v||(v="constructor"==l)}if(p&&!v){var w=e.constructor,Z=t.constructor;w==Z||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof Z&&Z instanceof Z||(p=!1)}return o.delete(e),o.delete(t),p}(e,t,n,i,o,a))};var P=n(3391);const x=function e(t,n,r,i,o){return t===n||(null==t||null==n||!(0,P.Z)(t)&&!(0,P.Z)(n)?t!=t&&n!=n:S(t,n,r,i,e,o))};var A=n(3122);const E=function(e){return e==e&&!(0,A.Z)(e)};var D=n(649);const k=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},U=function(e){var t=function(e){for(var t=(0,D.Z)(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,E(i)]}return t}(e);return 1==t.length&&t[0][2]?k(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,i){var o=n.length,a=o,u=!i;if(null==e)return!a;for(e=Object(e);o--;){var c=n[o];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++o<a;){var s=(c=n[o])[0],l=e[s],f=c[1];if(u&&c[2]){if(void 0===l&&!(s in e))return!1}else{var d=new r.Z;if(i)var p=i(l,f,s,e,t,d);if(!(void 0===p?x(f,l,3,i,d):p))return!1}}return!0}(n,e,t)}};var I=n(2082),C=n(7969);const N=function(e,t){for(var n=0,r=(t=(0,I.Z)(t,e)).length;null!=e&&n<r;)e=e[(0,C.Z)(t[n++])];return n&&n==r?e:void 0},F=function(e,t){return null!=e&&t in Object(e)};var R=n(8693);var L=n(3502);const z=function(e,t){return(0,L.Z)(e)&&E(t)?k((0,C.Z)(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:N(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&(0,R.Z)(e,t,F)}(n,e):x(t,r,3)}},M=function(e){return e},$=function(e){return(0,L.Z)(e)?(t=(0,C.Z)(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return N(t,e)}}(e);var t},V=function(e){return"function"==typeof e?e:null==e?M:"object"==typeof e?(0,m.Z)(e)?z(e[0],e[1]):U(e):$(e)}},3917:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5441);const i=(0,n(6048).Z)(Object.keys,Object);var o=Object.prototype.hasOwnProperty;const a=function(e){if(!(0,r.Z)(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},3225:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return function(t){return e(t)}}},2082:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(7885),i=n(3502),o=n(2540),a=n(3523);const u=function(e,t){return(0,r.Z)(e)?e:(0,i.Z)(e,t)?[e]:(0,o.Z)((0,a.Z)(e))}},4724:(e,t,n)=>{"use strict";n.d(t,{Z:()=>D});const r=(i={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},function(e){return null==i?void 0:i[e]});var i,o=n(3523),a=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,u=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var c=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var s=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var l="a-z\\xdf-\\xf6\\xf8-\\xff",f="A-Z\\xc0-\\xd6\\xd8-\\xde",d="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",p="["+d+"]",v="\\d+",h="["+l+"]",y="[^\\ud800-\\udfff"+d+v+"\\u2700-\\u27bf"+l+f+"]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",m="["+f+"]",w="(?:"+h+"|"+y+")",Z="(?:"+m+"|"+y+")",j="(?:['’](?:d|ll|m|re|s|t|ve))?",O="(?:['’](?:D|LL|M|RE|S|T|VE))?",T="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",_="[\\ufe0e\\ufe0f]?",S=_+T+"(?:\\u200d(?:"+["[^\\ud800-\\udfff]",b,g].join("|")+")"+_+T+")*",P="(?:"+["[\\u2700-\\u27bf]",b,g].join("|")+")"+S,x=RegExp([m+"?"+h+"+"+j+"(?="+[p,m,"$"].join("|")+")",Z+"+"+O+"(?="+[p,m+w,"$"].join("|")+")",m+"?"+w+"+"+j,m+"+"+O,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",v,P].join("|"),"g");const A=function(e,t,n){return e=(0,o.Z)(e),void 0===(t=n?void 0:t)?function(e){return s.test(e)}(e)?function(e){return e.match(x)||[]}(e):function(e){return e.match(c)||[]}(e):e.match(t)||[]};var E=RegExp("['’]","g");const D=function(e){return function(t){return function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}(A(function(e){return(e=(0,o.Z)(e))&&e.replace(a,r).replace(u,"")}(t).replace(E,"")),e,"")}}},2168:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="object"==typeof global&&global&&global.Object===Object&&global},7245:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(2938),i=n(6808),o=n(649);const a=function(e){return(0,r.Z)(e,o.Z,i.Z)}},5546:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(8936);const i=n(3221).Z["__core-js_shared__"];var o,a=(o=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";var u=n(3122),c=n(6682),s=/^\[object .+?Constructor\]$/,l=Function.prototype,f=Object.prototype,d=l.toString,p=f.hasOwnProperty,v=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const h=function(e){return!(!(0,u.Z)(e)||(t=e,a&&a in t))&&((0,r.Z)(e)?v:s).test((0,c.Z)(e));var t},y=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return h(n)?n:void 0}},6808:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(813),i=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols;const a=o?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(o(e),(function(t){return i.call(e,t)})))}:r.Z},8649:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var r=n(5546),i=n(3221);const o=(0,r.Z)(i.Z,"DataView");var a=n(8896);const u=(0,r.Z)(i.Z,"Promise"),c=(0,r.Z)(i.Z,"Set"),s=(0,r.Z)(i.Z,"WeakMap");var l=n(9001),f=n(6682),d="[object Map]",p="[object Promise]",v="[object Set]",h="[object WeakMap]",y="[object DataView]",b=(0,f.Z)(o),g=(0,f.Z)(a.Z),m=(0,f.Z)(u),w=(0,f.Z)(c),Z=(0,f.Z)(s),j=l.Z;(o&&j(new o(new ArrayBuffer(1)))!=y||a.Z&&j(new a.Z)!=d||u&&j(u.resolve())!=p||c&&j(new c)!=v||s&&j(new s)!=h)&&(j=function(e){var t=(0,l.Z)(e),n="[object Object]"==t?e.constructor:void 0,r=n?(0,f.Z)(n):"";if(r)switch(r){case b:return y;case g:return d;case m:return p;case w:return v;case Z:return h}return t});const O=j},8693:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(2082),i=n(4248),o=n(7885),a=n(6401),u=n(1164),c=n(7969);const s=function(e,t,n){for(var s=-1,l=(t=(0,r.Z)(t,e)).length,f=!1;++s<l;){var d=(0,c.Z)(t[s]);if(!(f=null!=e&&n(e,d)))break;e=e[d]}return f||++s!=l?f:!!(l=null==e?0:e.length)&&(0,u.Z)(l)&&(0,a.Z)(d,l)&&((0,o.Z)(e)||(0,i.Z)(e))}},2690:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const i=function(e){return r.test(e)}},6401:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=/^(?:0|[1-9]\d*)$/;const i=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e<t}},3502:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(7885),i=n(2758),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;const u=function(e,t){if((0,r.Z)(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!(0,i.Z)(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}},5441:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=Object.prototype;const i=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},5500:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},7755:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(2168),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===i&&r.Z.process;const u=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}()},6048:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return function(n){return e(t(n))}}},3221:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2168),i="object"==typeof self&&self&&self.Object===Object&&self;const o=r.Z||i||Function("return this")()},3249:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},222:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(2690),i="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",a="[^\\ud800-\\udfff]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+i+"|"+o+")?",l="[\\ufe0e\\ufe0f]?",f=l+s+"(?:\\u200d(?:"+[a,u,c].join("|")+")"+l+s+")*",d="(?:"+[a+i+"?",i,u,c,"[\\ud800-\\udfff]"].join("|")+")",p=RegExp(o+"(?="+o+")|"+d+f,"g");const v=function(e){return(0,r.Z)(e)?function(e){return e.match(p)||[]}(e):function(e){return e.split("")}(e)}},2540:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(3703);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r.Z),n}i.Cache=r.Z;var o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g;const u=(c=i((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,i){t.push(r?i.replace(a,"$1"):n||e)})),t}),(function(e){return 500===s.size&&s.clear(),e})),s=c.cache,c);var c,s},7969:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(2758);const i=function(e){if("string"==typeof e||(0,r.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},6682:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=Function.prototype.toString;const i=function(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},2777:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(1525);const i=(0,n(4724).Z)((function(e,t,n){return t=t.toLowerCase(),e+(n?(0,r.Z)(t):t)}))},1525:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(3523);const i=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}(e,t,n)};var o=n(2690),a=n(222);const u=function(e){e=(0,r.Z)(e);var t=(0,o.Z)(e)?(0,a.Z)(e):void 0,n=t?t[0]:e.charAt(0),u=t?i(t,1).join(""):e.slice(1);return n.toUpperCase()+u},c=function(e){return u((0,r.Z)(e).toLowerCase())}},8804:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return e===t||e!=e&&t!=t}},8407:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(3523),i=/[\\^$.*+?()[\]{}|]/g,o=RegExp(i.source);const a=function(e){return(e=(0,r.Z)(e))&&o.test(e)?e.replace(i,"\\$&"):e}},3662:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(2342),i=n(3282),o=n(649);var a=/\s/;var u=/^\s+/;const c=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&a.test(e.charAt(t)););return t}(e)+1).replace(u,""):e};var s=n(3122),l=n(2758),f=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,p=/^0o[0-7]+$/i,v=parseInt;const h=function(e){return e?Infinity===(e=function(e){if("number"==typeof e)return e;if((0,l.Z)(e))return NaN;if((0,s.Z)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,s.Z)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=c(e);var n=d.test(e);return n||p.test(e)?v(e.slice(2),n?2:8):f.test(e)?NaN:+e}(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var y=Math.max;const b=(g=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o,a,u=null==n?0:(o=h(n),a=o%1,o==o?a?o-a:o:0);return u<0&&(u=y(i+u,0)),function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}(e,(0,r.Z)(t,3),u)},function(e,t,n){var a=Object(e);if(!(0,i.Z)(e)){var u=(0,r.Z)(t,3);e=(0,o.Z)(e),t=function(e){return u(a[e],e,a)}}var c=g(e,t,n);return c>-1?a[u?e[c]:c]:void 0});var g},4248:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(9001),i=n(3391);const o=function(e){return(0,i.Z)(e)&&"[object Arguments]"==(0,r.Z)(e)};var a=Object.prototype,u=a.hasOwnProperty,c=a.propertyIsEnumerable;const s=o(function(){return arguments}())?o:function(e){return(0,i.Z)(e)&&u.call(e,"callee")&&!c.call(e,"callee")}},7885:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=Array.isArray},3282:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(8936),i=n(1164);const o=function(e){return null!=e&&(0,i.Z)(e.length)&&!(0,r.Z)(e)}},4975:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(3221);var i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===i?r.Z.Buffer:void 0;const u=(a?a.isBuffer:void 0)||function(){return!1}},8936:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9001),i=n(3122);const o=function(e){if(!(0,i.Z)(e))return!1;var t=(0,r.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1164:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3122:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3391:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return null!=e&&"object"==typeof e}},2758:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9001),i=n(3391);const o=function(e){return"symbol"==typeof e||(0,i.Z)(e)&&"[object Symbol]"==(0,r.Z)(e)}},8127:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9001),i=n(1164),o=n(3391),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var u=n(3225),c=n(7755),s=c.Z&&c.Z.isTypedArray;const l=s?(0,u.Z)(s):function(e){return(0,o.Z)(e)&&(0,i.Z)(e.length)&&!!a[(0,r.Z)(e)]}},649:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(848),i=n(3917),o=n(3282);const a=function(e){return(0,o.Z)(e)?(0,r.Z)(e):(0,i.Z)(e)}},813:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(){return[]}},3523:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(187),i=n(5598),o=n(7885),a=n(2758),u=r.Z?r.Z.prototype:void 0,c=u?u.toString:void 0;const s=function e(t){if("string"==typeof t)return t;if((0,o.Z)(t))return(0,i.Z)(t,e)+"";if((0,a.Z)(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},l=function(e){return null==e?"":s(e)}},9857:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>J});var r=n(268);function i(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))}function o(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}var a,u=function(){},c=u(),s=Object,l=function(e){return e===c},f=function(e){return"function"==typeof e},d=function(e,t){return s.assign({},e,t)},p="undefined",v=function(){return typeof window!=p},h=new WeakMap,y=0,b=function(e){var t,n,r=typeof e,i=e&&e.constructor,o=i==Date;if(s(e)!==e||o||i==RegExp)t=o?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=h.get(e))return t;if(t=++y+"~",h.set(e,t),i==Array){for(t="@",n=0;n<e.length;n++)t+=b(e[n])+",";h.set(e,t)}if(i==s){t="#";for(var a=s.keys(e).sort();!l(n=a.pop());)l(e[n])||(t+=n+":"+b(e[n])+",");h.set(e,t)}}return t},g=!0,m=v(),w=typeof document!=p,Z=m&&window.addEventListener?window.addEventListener.bind(window):u,j=w?document.addEventListener.bind(document):u,O=m&&window.removeEventListener?window.removeEventListener.bind(window):u,T=w?document.removeEventListener.bind(document):u,_={isOnline:function(){return g},isVisible:function(){var e=w&&document.visibilityState;return l(e)||"hidden"!==e}},S={initFocus:function(e){return j("visibilitychange",e),Z("focus",e),function(){T("visibilitychange",e),O("focus",e)}},initReconnect:function(e){var t=function(){g=!0,e()},n=function(){g=!1};return Z("online",t),Z("offline",n),function(){O("online",t),O("offline",n)}}},P=!v()||"Deno"in window,x=P?r.useEffect:r.useLayoutEffect,A="undefined"!=typeof navigator&&navigator.connection,E=!P&&A&&(["slow-2g","2g"].includes(A.effectiveType)||A.saveData),D=function(e){if(f(e))try{e=e()}catch(t){e=""}var t=[].concat(e);return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?b(e):"",t,e?"$swr$"+e:""]},k=new WeakMap,U=function(e,t,n,r,i,o,a){void 0===a&&(a=!0);var u=k.get(e),c=u[0],s=u[1],l=u[3],f=c[t],d=s[t];if(a&&d)for(var p=0;p<d.length;++p)d[p](n,r,i);return o&&(delete l[t],f&&f[0])?f[0](2).then((function(){return e.get(t)})):e.get(t)},I=0,C=function(){return++I},N=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i(void 0,void 0,void 0,(function(){var t,n,r,i,a,u,s,p,v,h,y,b,g,m,w,Z,j,O,T,_,S;return o(this,(function(o){switch(o.label){case 0:if(t=e[0],n=e[1],r=e[2],i=e[3],u=!!l((a="boolean"==typeof i?{revalidate:i}:i||{}).populateCache)||a.populateCache,s=!1!==a.revalidate,p=!1!==a.rollbackOnError,v=a.optimisticData,h=D(n),y=h[0],b=h[2],!y)return[2];if(g=k.get(t),m=g[2],e.length<3)return[2,U(t,y,t.get(y),c,c,s,!0)];if(w=r,j=C(),m[y]=[j,0],O=!l(v),T=t.get(y),O&&(_=f(v)?v(T):v,t.set(y,_),U(t,y,_)),f(w))try{w=w(t.get(y))}catch(e){Z=e}return w&&f(w.then)?[4,w.catch((function(e){Z=e}))]:[3,2];case 1:if(w=o.sent(),j!==m[y][0]){if(Z)throw Z;return[2,w]}Z&&O&&p&&(u=!0,w=T,t.set(y,T)),o.label=2;case 2:return u&&(Z||(f(u)&&(w=u(w,T)),t.set(y,w)),t.set(b,d(t.get(b),{error:Z}))),m[y][1]=C(),[4,U(t,y,w,Z,c,s,!!u)];case 3:if(S=o.sent(),Z)throw Z;return[2,u?S:w]}}))}))},F=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},R=function(e,t){if(!k.has(e)){var n=d(S,t),r={},i=N.bind(c,e),o=u;if(k.set(e,[r,{},{},{},i]),!P){var a=n.initFocus(setTimeout.bind(c,F.bind(c,r,0))),s=n.initReconnect(setTimeout.bind(c,F.bind(c,r,1)));o=function(){a&&a(),s&&s(),k.delete(e)}}return[e,i,o]}return[e,k.get(e)[4]]},L=R(new Map),z=L[0],M=L[1],$=d({onLoadingSlow:u,onSuccess:u,onError:u,onErrorRetry:function(e,t,n,r,i){var o=n.errorRetryCount,a=i.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!l(o)&&a>o||setTimeout(r,u,i)},onDiscarded:u,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:E?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:E?5e3:3e3,compare:function(e,t){return b(e)==b(t)},isPaused:function(){return!1},cache:z,mutate:M,fallback:{}},_),V=function(e,t){var n=d(e,t);if(t){var r=e.use,i=e.fallback,o=t.use,a=t.fallback;r&&o&&(n.use=r.concat(o)),i&&a&&(n.fallback=d(i,a))}return n},B=(0,r.createContext)({}),q=function(e){return f(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},G=function(){return d($,(0,r.useContext)(B))},W=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},H={dedupe:!0},J=(s.defineProperty((function(e){var t=e.value,n=V((0,r.useContext)(B),t),i=t&&t.provider,o=(0,r.useState)((function(){return i?R(i(n.cache||z),t):c}))[0];return o&&(n.cache=o[0],n.mutate=o[1]),x((function(){return o?o[2]:c}),[]),(0,r.createElement)(B.Provider,d(e,{value:n}))}),"default",{value:$}),a=function(e,t,n){var a=n.cache,u=n.compare,s=n.fallbackData,h=n.suspense,y=n.revalidateOnMount,b=n.refreshInterval,g=n.refreshWhenHidden,m=n.refreshWhenOffline,w=k.get(a),Z=w[0],j=w[1],O=w[2],T=w[3],_=D(e),S=_[0],A=_[1],E=_[2],I=(0,r.useRef)(!1),F=(0,r.useRef)(!1),R=(0,r.useRef)(S),L=(0,r.useRef)(t),z=(0,r.useRef)(n),M=function(){return z.current},$=function(){return M().isVisible()&&M().isOnline()},V=function(e){return a.set(E,d(a.get(E),e))},B=a.get(S),q=l(s)?n.fallback[S]:s,G=l(B)?q:B,J=a.get(E)||{},Y=J.error,K=!I.current,X=function(){return K&&!l(y)?y:!M().isPaused()&&(h?!l(G)&&n.revalidateIfStale:l(G)||n.revalidateIfStale)},Q=!(!S||!t)&&(!!J.isValidating||K&&X()),ee=function(e,t){var n=(0,r.useState)({})[1],i=(0,r.useRef)(e),o=(0,r.useRef)({data:!1,error:!1,isValidating:!1}),a=(0,r.useCallback)((function(e){var r=!1,a=i.current;for(var u in e){var c=u;a[c]!==e[c]&&(a[c]=e[c],o.current[c]&&(r=!0))}r&&!t.current&&n({})}),[]);return x((function(){i.current=e})),[i,o.current,a]}({data:G,error:Y,isValidating:Q},F),te=ee[0],ne=ee[1],re=ee[2],ie=(0,r.useCallback)((function(e){return i(void 0,void 0,void 0,(function(){var t,r,i,s,d,p,v,h,y,b,g,m,w;return o(this,(function(o){switch(o.label){case 0:if(t=L.current,!S||!t||F.current||M().isPaused())return[2,!1];s=!0,d=e||{},p=!T[S]||!d.dedupe,v=function(){return!F.current&&S===R.current&&I.current},h=function(){var e=T[S];e&&e[1]===i&&delete T[S]},y={isValidating:!1},b=function(){V({isValidating:!1}),v()&&re(y)},V({isValidating:!0}),re({isValidating:!0}),o.label=1;case 1:return o.trys.push([1,3,,4]),p&&(U(a,S,te.current.data,te.current.error,!0),n.loadingTimeout&&!a.get(S)&&setTimeout((function(){s&&v()&&M().onLoadingSlow(S,n)}),n.loadingTimeout),T[S]=[t.apply(void 0,A),C()]),w=T[S],r=w[0],i=w[1],[4,r];case 2:return r=o.sent(),p&&setTimeout(h,n.dedupingInterval),T[S]&&T[S][1]===i?(V({error:c}),y.error=c,g=O[S],!l(g)&&(i<=g[0]||i<=g[1]||0===g[1])?(b(),p&&v()&&M().onDiscarded(S),[2,!1]):(u(te.current.data,r)?y.data=te.current.data:y.data=r,u(a.get(S),r)||a.set(S,r),p&&v()&&M().onSuccess(r,S,n),[3,4])):(p&&v()&&M().onDiscarded(S),[2,!1]);case 3:return m=o.sent(),h(),M().isPaused()||(V({error:m}),y.error=m,p&&v()&&(M().onError(m,S,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||f(n.shouldRetryOnError)&&n.shouldRetryOnError(m))&&$()&&M().onErrorRetry(m,S,n,ie,{retryCount:(d.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return s=!1,b(),v()&&p&&U(a,S,y.data,y.error,!1),[2,!0]}}))}))}),[S]),oe=(0,r.useCallback)(N.bind(c,a,(function(){return R.current})),[]);if(x((function(){L.current=t,z.current=n})),x((function(){if(S){var e=S!==R.current,t=ie.bind(c,H),n=0,r=W(S,j,(function(e,t,n){re(d({error:t,isValidating:n},u(te.current.data,e)?c:{data:e}))})),i=W(S,Z,(function(e){if(0==e){var r=Date.now();M().revalidateOnFocus&&r>n&&$()&&(n=r+M().focusThrottleInterval,t())}else if(1==e)M().revalidateOnReconnect&&$()&&t();else if(2==e)return ie()}));return F.current=!1,R.current=S,I.current=!0,e&&re({data:G,error:Y,isValidating:Q}),X()&&(l(G)||P?t():(o=t,v()&&typeof window.requestAnimationFrame!=p?window.requestAnimationFrame(o):setTimeout(o,1))),function(){F.current=!0,r(),i()}}var o}),[S,ie]),x((function(){var e;function t(){var t=f(b)?b(G):b;t&&-1!==e&&(e=setTimeout(n,t))}function n(){te.current.error||!g&&!M().isVisible()||!m&&!M().isOnline()?t():ie(H).then(t)}return t(),function(){e&&(clearTimeout(e),e=-1)}}),[b,g,m,ie]),(0,r.useDebugValue)(G),h&&l(G)&&S)throw L.current=t,z.current=n,F.current=!1,l(Y)?ie(H):Y;return{mutate:oe,get data(){return ne.data=!0,G},get error(){return ne.error=!0,Y},get isValidating(){return ne.isValidating=!0,Q}}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=G(),r=q(e),i=r[0],o=r[1],u=r[2],c=V(n,u),s=a,l=c.use;if(l)for(var f=l.length;f-- >0;)s=l[f](s);return s(i,o||c.fetcher,c)})},2303:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r,i,o=n(9857),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)},u=function(e){return"function"==typeof e[1]?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},c=(r=o.ZP,i=function(e){return function(t,n,r){return r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=u(e),o=n[0],c=n[1],s=n[2],l=(s.use||[]).concat(i);return r(o,c,a(a({},s),{use:l}))})}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return n[e](o,o.exports,i),o.loaded=!0,o.exports}i.m=n,i.c=r,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>e+".js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="@openmrs/esm-patient-registration-app:",i.l=(n,r,o,a)=>{if(e[n])e[n].push(r);else{var u,c;if(void 0!==o)for(var s=document.getElementsByTagName("script"),l=0;l<s.length;l++){var f=s[l];if(f.getAttribute("src")==n||f.getAttribute("data-webpack")==t+o){u=f;break}}u||(c=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,i.nc&&u.setAttribute("nonce",i.nc),u.setAttribute("data-webpack",t+o),u.src=n),e[n]=[r];var d=(t,r)=>{u.onerror=u.onload=null,clearTimeout(p);var i=e[n];if(delete e[n],u.parentNode&&u.parentNode.removeChild(u),i&&i.forEach((e=>e(r))),t)return t(r)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=d.bind(null,u.onerror),u.onload=d.bind(null,u.onload),c&&document.head.appendChild(u)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{i.S={};var e={},t={};i.I=(n,r)=>{r||(r=[]);var o=t[n];if(o||(o=t[n]={}),!(r.indexOf(o)>=0)){if(r.push(o),e[n])return e[n];i.o(i.S,n)||(i.S[n]={});var a=i.S[n],u="@openmrs/esm-patient-registration-app",c=(e,t,n,r)=>{var i=a[e]=a[e]||{},o=i[t];(!o||!o.loaded&&(!r!=!o.eager?r:u>o.from))&&(i[t]={get:n,from:u,eager:!!r})},s=[];return"default"===n&&(c("@openmrs/esm-framework","4.0.2",(()=>Promise.all([i.e(858),i.e(268)]).then((()=>()=>i(6858))))),c("react-i18next","11.18.6",(()=>Promise.all([i.e(100),i.e(268)]).then((()=>()=>i(8100))))),c("react-router-dom","6.4.2",(()=>Promise.all([i.e(34),i.e(268)]).then((()=>()=>i(6034))))),c("react","18.2.0",(()=>i.e(784).then((()=>()=>i(6292)))))),e[n]=s.length?Promise.all(s).then((()=>e[n]=1)):1}}})(),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e=e=>{var t=e=>e.split(".").map((e=>+e==e?+e:e)),n=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),r=n[1]?t(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,t(n[2]))),n[3]&&(r.push([]),r.push.apply(r,t(n[3]))),r},t=e=>{var n=e[0],r="";if(1===e.length)return"*";if(n+.5){r+=0==n?">=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var i=1,o=1;o<e.length;o++)i--,r+="u"==(typeof(u=e[o]))[0]?"-":(i>0?".":"")+(i=2,u);return r}var a=[];for(o=1;o<e.length;o++){var u=e[o];a.push(0===u?"not("+c()+")":1===u?"("+c()+" || "+c()+")":2===u?a.pop()+" "+a.pop():t(u))}return c();function c(){return a.pop().replace(/^\((.+)\)$/,"$1")}},n=(t,r)=>{if(0 in t){r=e(r);var i=t[0],o=i<0;o&&(i=-i-1);for(var a=0,u=1,c=!0;;u++,a++){var s,l,f=u<t.length?(typeof t[u])[0]:"";if(a>=r.length||"o"==(l=(typeof(s=r[a]))[0]))return!c||("u"==f?u>i&&!o:""==f!=o);if("u"==l){if(!c||"u"!=f)return!1}else if(c)if(f==l)if(u<=i){if(s!=t[u])return!1}else{if(o?s>t[u]:s<t[u])return!1;s!=t[u]&&(c=!1)}else if("s"!=f&&"n"!=f){if(o||u<=i)return!1;c=!1,u--}else{if(u<=i||l<f!=o)return!1;c=!1}else"s"!=f&&"n"!=f&&(c=!1,u--)}}var d=[],p=d.pop.bind(d);for(a=1;a<t.length;a++){var v=t[a];d.push(1==v?p()|p():2==v?p()&p():v?n(v,r):!p())}return!!p()},r=(t,n)=>{var r=t[n];return Object.keys(r).reduce(((t,n)=>!t||!r[t].loaded&&((t,n)=>{t=e(t),n=e(n);for(var r=0;;){if(r>=t.length)return r<n.length&&"u"!=(typeof n[r])[0];var i=t[r],o=(typeof i)[0];if(r>=n.length)return"u"==o;var a=n[r],u=(typeof a)[0];if(o!=u)return"o"==o&&"n"==u||"s"==u||"u"==o;if("o"!=o&&"u"!=o&&i!=a)return i<a;r++}})(t,n)?n:t),0)},o=(e,i,o,u)=>{var c=r(e,o);return n(u,c)||"undefined"!=typeof console&&console.warn&&console.warn(((e,n,r,i)=>"Unsatisfied version "+r+" from "+(r&&e[n][r].from)+" of shared singleton module "+n+" (required "+t(i)+")")(e,o,c,u)),a(e[o][c])},a=e=>(e.loaded=1,e.get()),u=(e=>function(t,n,r,o){var a=i.I(t);return a&&a.then?a.then(e.bind(e,t,i.S[t],n,r,o)):e(t,i.S[t],n,r,o)})(((e,t,n,r,a)=>t&&i.o(t,n)?o(t,0,n,r):a())),c={},s={4924:()=>u("default","react-i18next",[1,11],(()=>i.e(100).then((()=>()=>i(8100))))),8744:()=>u("default","react-router-dom",[1,6],(()=>i.e(34).then((()=>()=>i(6034))))),268:()=>u("default","react",[1,18],(()=>i.e(784).then((()=>()=>i(6292))))),906:()=>u("default","@openmrs/esm-framework",[1,4],(()=>i.e(858).then((()=>()=>i(6858)))))};[906,268].forEach((e=>{i.m[e]=t=>{c[e]=0,delete i.c[e];var n=s[e]();if("function"!=typeof n)throw new Error("Shared module is not available for eager consumption: "+e);t.exports=n()}}));var l={268:[268],658:[8744],924:[4924]};i.f.consumes=(e,t)=>{i.o(l,e)&&l[e].forEach((e=>{if(i.o(c,e))return t.push(c[e]);var n=t=>{c[e]=0,i.m[e]=n=>{delete i.c[e],n.exports=t()}},r=t=>{delete c[e],i.m[e]=n=>{throw delete i.c[e],t}};try{var o=s[e]();o.then?t.push(c[e]=o.then(n).catch(r)):n(o)}catch(e){r(e)}}))}})(),(()=>{var e={179:0,268:0,686:0,470:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(268|924)$/.test(t))e[t]=0;else{var o=new Promise(((n,i)=>r=e[t]=[n,i]));n.push(r[2]=o);var a=i.p+i.u(t),u=new Error;i.l(a,(n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;u.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",u.name="ChunkLoadError",u.type=o,u.request=a,r[1](u)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[a,u,c]=n,s=0;if(a.some((t=>0!==e[t]))){for(r in u)i.o(u,r)&&(i.m[r]=u[r]);c&&c(i)}for(t&&t(n);s<a.length;s++)o=a[s],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=self.webpackChunk_openmrs_esm_patient_registration_app=self.webpackChunk_openmrs_esm_patient_registration_app||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),i.nc=void 0,i(1686)})();
|
|
2
|
+
(()=>{var e,t,n={225:(e,t,n)=>{"use strict";n.d(t,{X8:()=>u,bs:()=>a});var r=n(906);function i(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 o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(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)?i(e,t):void 0}}(e)||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 a=[{id:"demographics",name:"Basic Info",fields:["name","gender","dob","id"]},{id:"contact",name:"Contact Details",fields:["address","phone & email"]},{id:"death",name:"Death Info",fields:[]},{id:"relationships",name:"Relationships",fields:[]}],u=["name","gender","dob","address","id","phone & email"];function c(e){return"'".concat(e.map((function(e){return e.id})).join("', '"),"'")}r.Type.Array,"An array of strings which are the keys from 'sectionDefinitions' or any of the following built-in sections: '".concat(a.map((function(e){return e.id})).join("', '"),"'."),r.Type.String,r.Type.Array,r.Type.String,"How this section will be referred to in the `sections` configuration. To override a built-in section, use that section's id. The built in section ids are '".concat(a.map((function(e){return e.id})).join("', '"),"'."),r.Type.String,r.Type.Array,"The parts to include in the section. Can be any of the following built-in fields: ".concat(u.join(", "),". Can also be an id from an object in the `fieldDefinitions` array, which you can use to define custom fields."),r.Type.String,r.Type.Array,r.Type.String,r.Type.String,r.Type.UUID,r.Type.String,r.Type.String,r.Type.Boolean,r.Type.String,r.Type.ConceptUuid,r.Type.Array,r.Type.UUID,r.Type.String,r.Type.Boolean,r.Type.Boolean,r.Type.String,r.Type.String,r.Type.Array,r.Type.String,r.Type.String,r.Type.String,r.Type.Boolean,r.Type.Boolean,r.Type.Boolean,r.Type.Object,r.Type.String,r.validators.isUrlWithTemplateParameters(["patientUuid"]),r.Type.ConceptUuid,r.Type.Array,r.Type.PatientIdentifierTypeUuid,r.Type.UUID,r.Type.UUID,r.Type.UUID,(0,r.validator)((function(e){return!e.fieldDefinitions.some((function(e){return"obs"==e.type}))||null!=e.registrationObs.encounterTypeUuid}),"If fieldDefinitions contains any fields of type 'obs', `registrationObs.encounterTypeUuid` must be specified."),(0,r.validator)((function(e){return e.sections.every((function(t){return o(a).concat(o(e.sectionDefinitions)).map((function(e){return e.id})).includes(t)}))}),(function(e){var t=o(a).concat(o(e.sectionDefinitions)).map((function(e){return e.id})),n=e.sections.find((function(e){return!t.includes(e)}));return"'".concat(n,"' is not a valid section ID. Valid section IDs include the built-in sections ").concat(c(a))+(e.sectionDefinitions.length?"; and the defined sections ".concat(c(e.sectionDefinitions),"."):".")})),(0,r.validator)((function(e){return e.sectionDefinitions.every((function(t){return t.fields.every((function(t){return o(u).concat(o(e.fieldDefinitions.map((function(e){return e.id})))).includes(t)}))}))}),(function(e){var t=o(u).concat(o(e.fieldDefinitions.map((function(e){return e.id})))),n=e.sectionDefinitions.find((function(e){return e.fields.some((function(e){return!t.includes(e)}))})),r=n.fields.find((function(e){return!t.includes(e)}));return"The section definition '".concat(n.id,"' contains an invalid field '").concat(r,"'. 'fields' can only contain the built-in fields '").concat(u.join("', '"),"'")+(e.fieldDefinitions.length?"; or the defined fields ".concat(c(e.fieldDefinitions),"."):".")}))},8179:(e,t,n)=>{"use strict";n.d(t,{Kt:()=>c,QT:()=>s,UO:()=>u});var r,i,o,a=n(906),u="custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))",c="patient-registration",s=(r={},o="network-first",(i=a.omrsOfflineCachingStrategyHttpHeaderName)in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o,r)},1686:(e,t,n)=>{"use strict";n(906),n(3076),n(225),n(8179),n(6279),n(3979)},6279:(e,t,n)=>{"use strict";n.d(t,{Cg:()=>m,St:()=>T,Te:()=>w,mt:()=>j});var r=n(268),i=n.n(r),o=n(3662),a=n(2777),u=n(8407),c=n(906),s=n(8179);function l(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 f(e,t,n,r,i,o,a){try{var u=e[o](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,i)}function d(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){f(o,r,i,a,u,"next",e)}function u(e){f(o,r,i,a,u,"throw",e)}a(void 0)}))}}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(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){p(e,t,n[t])}))}return e}function h(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}function y(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,i,o=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){u=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(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)?l(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.")}()}var b=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},g=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.")},m=i().createContext(null);function w(e){return Z.apply(this,arguments)}function Z(){return(Z=d((function(e){return b(this,(function(t){switch(t.label){case 0:return[4,k("/ws/rest/v1/systemsetting?q=layout.address.format&v=custom:(value)",e)];case 1:return[2,t.sent().data]}}))}))).apply(this,arguments)}function j(e){return O.apply(this,arguments)}function O(){return(O=d((function(e){return b(this,(function(t){switch(t.label){case 0:return[4,k("/ws/rest/v1/relationshiptype?v=default",e)];case 1:return[2,t.sent().data]}}))}))).apply(this,arguments)}function T(e){return _.apply(this,arguments)}function _(){return(_=d((function(e){var t,n,r,i,a,u,c,s,l;return b(this,(function(f){switch(f.label){case 0:return[4,S(e)];case 1:t=f.sent(),n=t.filter(Boolean),r=!0,i=!1,a=void 0,f.label=2;case 2:f.trys.push([2,7,8,9]),u=function(){var t,n,r,i;return b(this,(function(a){switch(a.label){case 0:return t=s.value,[4,Promise.all([x(t.uuid,e),E(e)])];case 1:return n=y.apply(void 0,[a.sent(),2]),r=n[0],i=n[1],t.identifierSources=r.data.results.map((function(e){var t=(0,o.Z)(i.data.results,{source:{uuid:e.uuid}});return e.autoGenerationOption=t,e})),[2]}}))},c=n[Symbol.iterator](),f.label=3;case 3:return(r=(s=c.next()).done)?[3,6]:[5,g(u())];case 4:f.sent(),f.label=5;case 5:return r=!0,[3,3];case 6:return[3,9];case 7:return l=f.sent(),i=!0,a=l,[3,9];case 8:try{r||null==c.return||c.return()}finally{if(i)throw a}return[7];case 9:return[2,n]}}))}))).apply(this,arguments)}function S(e){return P.apply(this,arguments)}function P(){return(P=d((function(e){var t,n,r,i,o,u,c,s,l;return b(this,(function(f){switch(f.label){case 0:return[4,k("/ws/rest/v1/patientidentifiertype?v=full",e)];case 1:return t=f.sent(),[4,k("/ws/rest/v1/metadatamapping/termmapping?v=full&code=emr.primaryIdentifierType",e)];case 2:return n=f.sent(),t.ok?(c=null==t||null===(r=t.data)||void 0===r?void 0:r.results,s=null==n||null===(i=n.data)||void 0===i||null===(o=i.results)||void 0===o||null===(u=o[0])||void 0===u?void 0:u.metadataUuid,l=(null==n?void 0:n.ok)?[I(null==c?void 0:c.find((function(e){return e.uuid===s})),!0)]:[],c.forEach((function(e){e.uuid!==s&&l.push(I(e,!1))})),[2,l.map((function(e){return h(v({},e),{fieldName:(0,a.Z)(e.name)})}))]):[2,[]]}}))}))).apply(this,arguments)}function x(e,t){return A.apply(this,arguments)}function A(){return(A=d((function(e,t){return b(this,(function(n){switch(n.label){case 0:return[4,k("/ws/rest/v1/idgen/identifiersource?v=default&identifierType=".concat(e),t)];case 1:return[2,n.sent()]}}))}))).apply(this,arguments)}function E(e){return D.apply(this,arguments)}function D(){return(D=d((function(e){return b(this,(function(t){switch(t.label){case 0:return[4,k("/ws/rest/v1/idgen/autogenerationoption?v=full",e)];case 1:return[2,t.sent()]}}))}))).apply(this,arguments)}function k(e,t){return U.apply(this,arguments)}function U(){return(U=d((function(e,t){return b(this,(function(n){switch(n.label){case 0:return[4,(0,c.messageOmrsServiceWorker)({type:"registerDynamicRoute",pattern:(0,u.Z)(e)})];case 1:return n.sent(),[4,(0,c.openmrsFetch)(e,{headers:s.QT,signal:null==t?void 0:t.signal})];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}function I(e,t){return{name:e.display,fieldName:(0,a.Z)(e.display),required:e.required,uuid:e.uuid,format:e.format,isPrimary:t,uniquenessBehavior:e.uniquenessBehavior}}},3076:(e,t,n)=>{"use strict";n.d(t,{I:()=>y});var r=n(906),i=n(8179),o=n(7117);function a(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 u(e,t,n,r,i,o,a){try{var u=e[o](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,i)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){u(o,r,i,a,c,"next",e)}function c(e){u(o,r,i,a,c,"throw",e)}a(void 0)}))}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(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){l(e,t,n[t])}))}return e}function d(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,i,o=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){u=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(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)?a(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.")}()}var p,v=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},h=function(){function e(){s(this,e)}return e.saveRelationships=function(e,t,n){return c((function(){return v(this,(function(r){return[2,Promise.all(e.filter((function(e){return e.relationshipType})).filter((function(e){return!!e.action})).map((function(e){var r=e.relatedPersonUuid,i=e.relationshipType,a=e.uuid,u=e.action,c=d(i.split("/"),2),s=c[0],l=c[1],f=t.data.uuid,p="aIsToB"===l,v={personA:p?r:f,personB:p?f:r,relationshipType:s};switch(u){case"ADD":return(0,o.bL)(n,v);case"UPDATE":return(0,o.r6)(n,a,v);case"DELETE":return(0,o.kE)(n,a)}})))]}))}))()},e.saveObservations=function(e,t,n,r,i,a){return c((function(){var u;return v(this,(function(c){if(e&&Object.keys(e).length>0){if(i.registrationObs.encounterTypeUuid)return u={encounterDatetime:new Date,patient:t.data.uuid,encounterType:i.registrationObs.encounterTypeUuid,location:n,encounterProviders:[{provider:r.currentProvider.uuid,encounterRole:i.registrationObs.encounterProviderRoleUuid}],form:i.registrationObs.registrationFormUuid,obs:Object.keys(e).map((function(t){return{concept:t,value:e[t]}}))},[2,(0,o.M1)(a,u)];console.error("The registration form has been configured to have obs fields, but no registration encounter type has been configured. Obs field values will not be saved.")}return[2]}))}))()},e.savePatientIdentifiers=function(e,t,n,r,i,a){return c((function(){var u;return v(this,(function(s){var l;return u=Object.values(n).map((l=c((function(n){var r,u,c,s,l,f,d,p,h,y;return v(this,(function(v){switch(v.label){case 0:return r=n.identifierTypeUuid,u=n.identifierValue,c=n.identifierUuid,s=n.selectedSource,l=n.preferred,f=n.autoGeneration,d=n.initialValue,u||f&&s?f?[3,1]:(h=u,[3,4]):[3,9];case 1:return[4,(0,o.fX)(n.selectedSource.uuid,a)];case 2:return[4,v.sent().data.identifier];case 3:h=v.sent(),v.label=4;case 4:return y={uuid:c,identifier:p=h,identifierType:r,location:i,preferred:l},e?[3,8]:d?[3,6]:[4,(0,o.eb)(t,y,a)];case 5:return v.sent(),[3,8];case 6:return d===p?[3,8]:[4,(0,o.nI)(t,c,y.identifier,a)];case 7:v.sent(),v.label=8;case 8:return[2,y];case 9:return[2]}}))})),function(e){return l.apply(this,arguments)})),t&&Object.keys(r).filter((function(e){return!n[e]})).forEach(function(){var e=c((function(e){return v(this,(function(n){switch(n.label){case 0:return[4,(0,o.ZB)(t,r[e].identifierUuid,a)];case 1:return n.sent(),[2]}}))}));return function(t){return e.apply(this,arguments)}}()),[2,Promise.all(u)]}))}))()},e.getDeletedNames=function(e,t){return(null==t?void 0:t.additionalNameUuid)?[{nameUuid:t.additionalNameUuid,personUuid:e}]:[]},e.getPatientToCreate=function(t,n,r,i){var o,a,u;return a=t.birthdate,o=(null!=(u=Date)&&"undefined"!=typeof Symbol&&u[Symbol.hasInstance]?u[Symbol.hasInstance](a):a instanceof u)?[t.birthdate.getFullYear(),t.birthdate.getMonth()+1,t.birthdate.getDate()].join("-"):t.birthdate,{uuid:t.patientUuid,person:f({uuid:t.patientUuid,names:e.getNames(t,n),gender:t.gender.charAt(0),birthdate:o,birthdateEstimated:t.birthdateEstimated,attributes:e.getPatientAttributes(t),addresses:[t.address]},e.getPatientDeathInfo(t)),identifiers:i}},e.getNames=function(e,t){var n=[{uuid:t.preferredNameUuid,preferred:!0,givenName:e.givenName,middleName:e.middleName,familyName:e.familyName}];return e.addNameInLocalLanguage&&n.push({uuid:t.additionalNameUuid,preferred:!1,givenName:e.additionalGivenName,middleName:e.additionalMiddleName,familyName:e.additionalFamilyName}),n},e.getPatientAttributes=function(e){var t=[];if(e.attributes){var n=!0,r=!1,i=void 0;try{for(var o,a=Object.entries(e.attributes)[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var u=d(o.value,2),c=u[0],s=u[1];t.push({attributeType:c,value:s})}}catch(e){r=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}return e.unidentifiedPatient&&t.push({attributeType:"8b56eac7-5c76-4b9c-8c6f-1deab8d3fc47",value:"true"}),t},e.getPatientDeathInfo=function(e){var t=e.isDead,n=e.deathDate,r=e.deathCause;return{dead:t,deathDate:t?n:void 0,causeOfDeath:t?r:void 0}},e.mapPatientToFhirPatient=function(e){var t,n,r,i,o,a;return{id:e.uuid,gender:{M:"male",F:"female",O:"other",U:"unknown"}[null===(t=e.person)||void 0===t?void 0:t.gender],birthDate:null===(n=e.person)||void 0===n?void 0:n.birthdate,deceasedBoolean:e.person.dead,deceasedDateTime:e.person.deathDate,name:null===(r=e.person)||void 0===r||null===(i=r.names)||void 0===i?void 0:i.map((function(e){return{given:[e.givenName,e.middleName].filter(Boolean),family:e.familyName}})),address:null===(o=e.person)||void 0===o?void 0:o.addresses.map((function(e){return{city:e.cityVillage,country:e.country,postalCode:e.postalCode,state:e.stateProvince,use:"home"}})),telecom:null===(a=e.person.attributes)||void 0===a?void 0:a.filter((function(e){return"Telephone Number"===e.attributeType}))}},e}();h.savePatientFormOffline=(p=c((function(e,t,n,o,a,u,c,s,l){var f;return v(this,(function(d){switch(d.label){case 0:return f={fhirPatient:h.mapPatientToFhirPatient(h.getPatientToCreate(t,n,o,[])),_patientRegistrationData:{isNewPatient:e,formValues:t,patientUuidMap:n,initialAddressFieldValues:o,capturePhotoProps:a,currentLocation:u,initialIdentifierValues:c,currentUser:s,config:l,savePatientTransactionManager:new y}},[4,(0,r.queueSynchronizationItem)(i.Kt,f,{id:t.patientUuid,displayName:"Patient registration",patientUuid:f.fhirPatient.id,dependencies:[]})];case 1:return d.sent(),[2,null]}}))})),function(e,t,n,r,i,o,a,u,c){return p.apply(this,arguments)}),h.savePatientFormOnline=function(){var e=c((function(e,t,n,r,i,a,u,s,l,f,d){var p,y,b;return v(this,(function(g){switch(g.label){case 0:return[4,h.savePatientIdentifiers(e,t.patientUuid,t.identifiers,u,a,d)];case 1:return p=g.sent(),y=h.getPatientToCreate(t,n,r,p),h.getDeletedNames(t.patientUuid,n).forEach(function(){var e=c((function(e){return v(this,(function(t){switch(t.label){case 0:return[4,(0,o.uO)(e.nameUuid,e.personUuid,d)];case 1:return t.sent(),[2]}}))}));return function(t){return e.apply(this,arguments)}}()),[4,(0,o.co)(d,y,e&&!f.patientSaved?void 0:t.patientUuid)];case 2:return(b=g.sent()).ok?(f.patientSaved=!0,[4,h.saveRelationships(t.relationships,b,d)]):[3,6];case 3:return g.sent(),[4,h.saveObservations(t.obs,b,a,s,l,d)];case 4:return g.sent(),l.concepts.patientPhotoUuid&&(null==i?void 0:i.imageData)?[4,(0,o.oV)(b.data.uuid,i.imageData,"/ws/rest/v1/obs",i.dateTime||(new Date).toISOString(),l.concepts.patientPhotoUuid,d)]:[3,6];case 5:g.sent(),g.label=6;case 6:return[2,b.data.uuid]}}))}));return function(t,n,r,i,o,a,u,c,s,l,f){return e.apply(this,arguments)}}();var y=function e(){s(this,e),this.patientSaved=!1}},7117:(e,t,n)=>{"use strict";n.d(t,{M1:()=>d,M8:()=>Z,Uu:()=>w,ZB:()=>P,bL:()=>h,co:()=>f,eb:()=>O,f$:()=>A,fX:()=>p,kE:()=>b,nI:()=>_,oV:()=>g,r6:()=>y,uO:()=>v});var r=n(9857),i=n(2303),o=n(906),a=n(268);function u(e,t,n,r,i,o,a){try{var u=e[o](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,i)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){u(o,r,i,a,c,"next",e)}function c(e){u(o,r,i,a,c,"throw",e)}a(void 0)}))}}var s=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};function l(e){for(var t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],r=new Uint8Array(t.length),i=0;i<t.length;i++)r[i]=t.charCodeAt(i);var o=new Blob([r],{type:n});return new File([o],"patient-photo.png")}function f(e,t,n){return(0,o.openmrsFetch)("/ws/rest/v1/patient/".concat(n||""),{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function d(e,t){return(0,o.openmrsFetch)("/ws/rest/v1/encounter",{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function p(e,t){return(0,o.openmrsFetch)("/ws/rest/v1/idgen/identifiersource/".concat(e,"/identifier"),{headers:{"Content-Type":"application/json"},method:"POST",body:{},signal:t.signal})}function v(e,t,n){return(0,o.openmrsFetch)("/ws/rest/v1/person/".concat(t,"/name/").concat(e),{method:"DELETE",signal:n.signal})}function h(e,t){return(0,o.openmrsFetch)("/ws/rest/v1/relationship",{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function y(e,t,n){return(0,o.openmrsFetch)("/ws/rest/v1/relationship/".concat(t),{headers:{"Content-Type":"application/json"},method:"POST",body:{relationshipType:n.relationshipType},signal:e.signal})}function b(e,t){return(0,o.openmrsFetch)("/ws/rest/v1/relationship/".concat(t),{headers:{"Content-Type":"application/json"},method:"DELETE",signal:e.signal})}function g(e,t,n,r,i,o){return m.apply(this,arguments)}function m(){return(m=c((function(e,t,n,r,i,a){var u;return s(this,(function(c){return(u=new FormData).append("patient",e),u.append("file",l(t)),u.append("json",JSON.stringify({person:e,concept:i,groupMembers:[],obsDatetime:r})),[2,(0,o.openmrsFetch)(n,{method:"POST",signal:a.signal,body:u})]}))}))).apply(this,arguments)}function w(e){var t,n,i,a=(0,o.useConfig)().concepts.patientPhotoUuid,u="/ws/rest/v1/obs?patient=".concat(e,"&concept=").concat(a,"&v=full"),c=(0,r.ZP)(e?u:null,o.openmrsFetch),s=c.data,l=c.error,f=null==s||null===(t=s.data)||void 0===t?void 0:t.results[0];return{data:f?{dateTime:null==f?void 0:f.obsDatetime,imageSrc:null==f||null===(n=f.value)||void 0===n||null===(i=n.links)||void 0===i?void 0:i.uri}:null,isError:l,isLoading:!s&&!l}}function Z(e,t){return j.apply(this,arguments)}function j(){return(j=c((function(e,t){return s(this,(function(n){return[2,(0,o.openmrsFetch)("/ws/rest/v1/person?q=".concat(e),{signal:t.signal})]}))}))).apply(this,arguments)}function O(e,t,n){return T.apply(this,arguments)}function T(){return(T=c((function(e,t,n){return s(this,(function(r){return[2,(0,o.openmrsFetch)("/ws/rest/v1/patient/".concat(e,"/identifier/"),{method:"POST",headers:{"Content-Type":"application/json"},signal:n.signal,body:t})]}))}))).apply(this,arguments)}function _(e,t,n,r){return S.apply(this,arguments)}function S(){return(S=c((function(e,t,n,r){return s(this,(function(i){return[2,(0,o.openmrsFetch)("/ws/rest/v1/patient/".concat(e,"/identifier/").concat(t),{method:"POST",headers:{"Content-Type":"application/json"},signal:r.signal,body:{identifier:n}})]}))}))).apply(this,arguments)}function P(e,t,n){return x.apply(this,arguments)}function x(){return(x=c((function(e,t,n){return s(this,(function(r){return[2,(0,o.openmrsFetch)("/ws/rest/v1/patient/".concat(e,"/identifier/").concat(t,"?purge"),{method:"DELETE",headers:{"Content-Type":"application/json"},signal:n.signal})]}))}))).apply(this,arguments)}function A(e){var t,n=(0,i.Z)(e?"/module/addresshierarchy/ajax/getPossibleFullAddresses.form?separator=%2C%20&searchString=".concat(e):null,o.openmrsFetch),r=n.data,u=n.error,c=(0,a.useMemo)((function(){var e;return{addresses:null!==(t=null==r||null===(e=r.data)||void 0===e?void 0:e.map((function(e){return e.address})))&&void 0!==t?t:[],error:u,isLoading:!r&&!u}}),[r,u]);return c}},3979:(e,t,n)=>{var r={"./en.json":[3574,574],"./km.json":[7807,807]};function i(e){if(!n.o(r,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return n.e(t[1]).then((()=>n(i)))}i.keys=()=>Object.keys(r),i.id=3979,e.exports=i},4649:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(8804);const i=function(e,t){for(var n=e.length;n--;)if((0,r.Z)(e[n][0],t))return n;return-1};var o=Array.prototype.splice;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=i(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))},a.prototype.get=function(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]},a.prototype.has=function(e){return i(this.__data__,e)>-1},a.prototype.set=function(e,t){var n=this.__data__,r=i(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const u=a},8896:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(5546),i=n(3221);const o=(0,r.Z)(i.Z,"Map")},3703:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});const r=(0,n(5546).Z)(Object,"create");var i=Object.prototype.hasOwnProperty;var o=Object.prototype.hasOwnProperty;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=r?r(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},a.prototype.get=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)},a.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this};const u=a;var c=n(4649),s=n(8896);const l=function(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};function f(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}f.prototype.clear=function(){this.size=0,this.__data__={hash:new u,map:new(s.Z||c.Z),string:new u}},f.prototype.delete=function(e){var t=l(this,e).delete(e);return this.size-=t?1:0,t},f.prototype.get=function(e){return l(this,e).get(e)},f.prototype.has=function(e){return l(this,e).has(e)},f.prototype.set=function(e,t){var n=l(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const d=f},6218:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(4649);var i=n(8896),o=n(3703);function a(e){var t=this.__data__=new r.Z(e);this.size=t.size}a.prototype.clear=function(){this.__data__=new r.Z,this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},a.prototype.get=function(e){return this.__data__.get(e)},a.prototype.has=function(e){return this.__data__.has(e)},a.prototype.set=function(e,t){var n=this.__data__;if(n instanceof r.Z){var a=n.__data__;if(!i.Z||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o.Z(a)}return n.set(e,t),this.size=n.size,this};const u=a},187:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(3221).Z.Symbol},8282:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(3221).Z.Uint8Array},848:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(4248),i=n(7885),o=n(4975),a=n(6401),u=n(8127),c=Object.prototype.hasOwnProperty;const s=function(e,t){var n=(0,i.Z)(e),s=!n&&(0,r.Z)(e),l=!n&&!s&&(0,o.Z)(e),f=!n&&!s&&!l&&(0,u.Z)(e),d=n||s||l||f,p=d?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],v=p.length;for(var h in e)!t&&!c.call(e,h)||d&&("length"==h||l&&("offset"==h||"parent"==h)||f&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||(0,a.Z)(h,v))||p.push(h);return p}},5598:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},5810:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},2938:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(5810),i=n(7885);const o=function(e,t,n){var o=t(e);return(0,i.Z)(e)?o:(0,r.Z)(o,n(e))}},9001:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(187),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,u=r.Z?r.Z.toStringTag:void 0;var c=Object.prototype.toString;var s=r.Z?r.Z.toStringTag:void 0;const l=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?function(e){var t=o.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[u]=n:delete e[u]),i}(e):function(e){return c.call(e)}(e)}},2342:(e,t,n)=>{"use strict";n.d(t,{Z:()=>V});var r=n(6218),i=n(3703);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i.Z;++t<n;)this.add(e[t])}o.prototype.add=o.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},o.prototype.has=function(e){return this.__data__.has(e)};const a=o,u=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},c=function(e,t,n,r,i,o){var c=1&n,s=e.length,l=t.length;if(s!=l&&!(c&&l>s))return!1;var f=o.get(e),d=o.get(t);if(f&&d)return f==t&&d==e;var p=-1,v=!0,h=2&n?new a:void 0;for(o.set(e,t),o.set(t,e);++p<s;){var y=e[p],b=t[p];if(r)var g=c?r(b,y,p,t,e,o):r(y,b,p,e,t,o);if(void 0!==g){if(g)continue;v=!1;break}if(h){if(!u(t,(function(e,t){if(a=t,!h.has(a)&&(y===e||i(y,e,n,r,o)))return h.push(t);var a}))){v=!1;break}}else if(y!==b&&!i(y,b,n,r,o)){v=!1;break}}return o.delete(e),o.delete(t),v};var s=n(187),l=n(8282),f=n(8804),d=n(5500),p=n(3249),v=s.Z?s.Z.prototype:void 0,h=v?v.valueOf:void 0;var y=n(7245),b=Object.prototype.hasOwnProperty;var g=n(8649),m=n(7885),w=n(4975),Z=n(8127),j="[object Arguments]",O="[object Array]",T="[object Object]",_=Object.prototype.hasOwnProperty;const S=function(e,t,n,i,o,a){var u=(0,m.Z)(e),s=(0,m.Z)(t),v=u?O:(0,g.Z)(e),S=s?O:(0,g.Z)(t),P=(v=v==j?T:v)==T,x=(S=S==j?T:S)==T,A=v==S;if(A&&(0,w.Z)(e)){if(!(0,w.Z)(t))return!1;u=!0,P=!1}if(A&&!P)return a||(a=new r.Z),u||(0,Z.Z)(e)?c(e,t,n,i,o,a):function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new l.Z(e),new l.Z(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,f.Z)(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=d.Z;case"[object Set]":var s=1&r;if(u||(u=p.Z),e.size!=t.size&&!s)return!1;var v=a.get(e);if(v)return v==t;r|=2,a.set(e,t);var y=c(u(e),u(t),r,i,o,a);return a.delete(e),y;case"[object Symbol]":if(h)return h.call(e)==h.call(t)}return!1}(e,t,v,n,i,o,a);if(!(1&n)){var E=P&&_.call(e,"__wrapped__"),D=x&&_.call(t,"__wrapped__");if(E||D){var k=E?e.value():e,U=D?t.value():t;return a||(a=new r.Z),o(k,U,n,i,a)}}return!!A&&(a||(a=new r.Z),function(e,t,n,r,i,o){var a=1&n,u=(0,y.Z)(e),c=u.length;if(c!=(0,y.Z)(t).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in t:b.call(t,l)))return!1}var f=o.get(e),d=o.get(t);if(f&&d)return f==t&&d==e;var p=!0;o.set(e,t),o.set(t,e);for(var v=a;++s<c;){var h=e[l=u[s]],g=t[l];if(r)var m=a?r(g,h,l,t,e,o):r(h,g,l,e,t,o);if(!(void 0===m?h===g||i(h,g,n,r,o):m)){p=!1;break}v||(v="constructor"==l)}if(p&&!v){var w=e.constructor,Z=t.constructor;w==Z||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof Z&&Z instanceof Z||(p=!1)}return o.delete(e),o.delete(t),p}(e,t,n,i,o,a))};var P=n(3391);const x=function e(t,n,r,i,o){return t===n||(null==t||null==n||!(0,P.Z)(t)&&!(0,P.Z)(n)?t!=t&&n!=n:S(t,n,r,i,e,o))};var A=n(3122);const E=function(e){return e==e&&!(0,A.Z)(e)};var D=n(649);const k=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},U=function(e){var t=function(e){for(var t=(0,D.Z)(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,E(i)]}return t}(e);return 1==t.length&&t[0][2]?k(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,i){var o=n.length,a=o,u=!i;if(null==e)return!a;for(e=Object(e);o--;){var c=n[o];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++o<a;){var s=(c=n[o])[0],l=e[s],f=c[1];if(u&&c[2]){if(void 0===l&&!(s in e))return!1}else{var d=new r.Z;if(i)var p=i(l,f,s,e,t,d);if(!(void 0===p?x(f,l,3,i,d):p))return!1}}return!0}(n,e,t)}};var I=n(2082),C=n(7969);const N=function(e,t){for(var n=0,r=(t=(0,I.Z)(t,e)).length;null!=e&&n<r;)e=e[(0,C.Z)(t[n++])];return n&&n==r?e:void 0},F=function(e,t){return null!=e&&t in Object(e)};var R=n(8693);var L=n(3502);const z=function(e,t){return(0,L.Z)(e)&&E(t)?k((0,C.Z)(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:N(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&(0,R.Z)(e,t,F)}(n,e):x(t,r,3)}},M=function(e){return e},$=function(e){return(0,L.Z)(e)?(t=(0,C.Z)(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return N(t,e)}}(e);var t},V=function(e){return"function"==typeof e?e:null==e?M:"object"==typeof e?(0,m.Z)(e)?z(e[0],e[1]):U(e):$(e)}},3917:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(5441);const i=(0,n(6048).Z)(Object.keys,Object);var o=Object.prototype.hasOwnProperty;const a=function(e){if(!(0,r.Z)(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},3225:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return function(t){return e(t)}}},2082:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(7885),i=n(3502),o=n(2540),a=n(3523);const u=function(e,t){return(0,r.Z)(e)?e:(0,i.Z)(e,t)?[e]:(0,o.Z)((0,a.Z)(e))}},4724:(e,t,n)=>{"use strict";n.d(t,{Z:()=>D});const r=(i={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},function(e){return null==i?void 0:i[e]});var i,o=n(3523),a=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,u=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var c=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var s=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var l="a-z\\xdf-\\xf6\\xf8-\\xff",f="A-Z\\xc0-\\xd6\\xd8-\\xde",d="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",p="["+d+"]",v="\\d+",h="["+l+"]",y="[^\\ud800-\\udfff"+d+v+"\\u2700-\\u27bf"+l+f+"]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",m="["+f+"]",w="(?:"+h+"|"+y+")",Z="(?:"+m+"|"+y+")",j="(?:['’](?:d|ll|m|re|s|t|ve))?",O="(?:['’](?:D|LL|M|RE|S|T|VE))?",T="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",_="[\\ufe0e\\ufe0f]?",S=_+T+"(?:\\u200d(?:"+["[^\\ud800-\\udfff]",b,g].join("|")+")"+_+T+")*",P="(?:"+["[\\u2700-\\u27bf]",b,g].join("|")+")"+S,x=RegExp([m+"?"+h+"+"+j+"(?="+[p,m,"$"].join("|")+")",Z+"+"+O+"(?="+[p,m+w,"$"].join("|")+")",m+"?"+w+"+"+j,m+"+"+O,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",v,P].join("|"),"g");const A=function(e,t,n){return e=(0,o.Z)(e),void 0===(t=n?void 0:t)?function(e){return s.test(e)}(e)?function(e){return e.match(x)||[]}(e):function(e){return e.match(c)||[]}(e):e.match(t)||[]};var E=RegExp("['’]","g");const D=function(e){return function(t){return function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}(A(function(e){return(e=(0,o.Z)(e))&&e.replace(a,r).replace(u,"")}(t).replace(E,"")),e,"")}}},2168:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="object"==typeof global&&global&&global.Object===Object&&global},7245:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(2938),i=n(6808),o=n(649);const a=function(e){return(0,r.Z)(e,o.Z,i.Z)}},5546:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(8936);const i=n(3221).Z["__core-js_shared__"];var o,a=(o=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";var u=n(3122),c=n(6682),s=/^\[object .+?Constructor\]$/,l=Function.prototype,f=Object.prototype,d=l.toString,p=f.hasOwnProperty,v=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const h=function(e){return!(!(0,u.Z)(e)||(t=e,a&&a in t))&&((0,r.Z)(e)?v:s).test((0,c.Z)(e));var t},y=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return h(n)?n:void 0}},6808:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(813),i=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols;const a=o?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(o(e),(function(t){return i.call(e,t)})))}:r.Z},8649:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var r=n(5546),i=n(3221);const o=(0,r.Z)(i.Z,"DataView");var a=n(8896);const u=(0,r.Z)(i.Z,"Promise"),c=(0,r.Z)(i.Z,"Set"),s=(0,r.Z)(i.Z,"WeakMap");var l=n(9001),f=n(6682),d="[object Map]",p="[object Promise]",v="[object Set]",h="[object WeakMap]",y="[object DataView]",b=(0,f.Z)(o),g=(0,f.Z)(a.Z),m=(0,f.Z)(u),w=(0,f.Z)(c),Z=(0,f.Z)(s),j=l.Z;(o&&j(new o(new ArrayBuffer(1)))!=y||a.Z&&j(new a.Z)!=d||u&&j(u.resolve())!=p||c&&j(new c)!=v||s&&j(new s)!=h)&&(j=function(e){var t=(0,l.Z)(e),n="[object Object]"==t?e.constructor:void 0,r=n?(0,f.Z)(n):"";if(r)switch(r){case b:return y;case g:return d;case m:return p;case w:return v;case Z:return h}return t});const O=j},8693:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(2082),i=n(4248),o=n(7885),a=n(6401),u=n(1164),c=n(7969);const s=function(e,t,n){for(var s=-1,l=(t=(0,r.Z)(t,e)).length,f=!1;++s<l;){var d=(0,c.Z)(t[s]);if(!(f=null!=e&&n(e,d)))break;e=e[d]}return f||++s!=l?f:!!(l=null==e?0:e.length)&&(0,u.Z)(l)&&(0,a.Z)(d,l)&&((0,o.Z)(e)||(0,i.Z)(e))}},2690:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const i=function(e){return r.test(e)}},6401:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=/^(?:0|[1-9]\d*)$/;const i=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e<t}},3502:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(7885),i=n(2758),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;const u=function(e,t){if((0,r.Z)(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!(0,i.Z)(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}},5441:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=Object.prototype;const i=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},5500:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},7755:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(2168),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===i&&r.Z.process;const u=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}()},6048:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return function(n){return e(t(n))}}},3221:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2168),i="object"==typeof self&&self&&self.Object===Object&&self;const o=r.Z||i||Function("return this")()},3249:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},222:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(2690),i="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",a="[^\\ud800-\\udfff]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+i+"|"+o+")?",l="[\\ufe0e\\ufe0f]?",f=l+s+"(?:\\u200d(?:"+[a,u,c].join("|")+")"+l+s+")*",d="(?:"+[a+i+"?",i,u,c,"[\\ud800-\\udfff]"].join("|")+")",p=RegExp(o+"(?="+o+")|"+d+f,"g");const v=function(e){return(0,r.Z)(e)?function(e){return e.match(p)||[]}(e):function(e){return e.split("")}(e)}},2540:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(3703);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r.Z),n}i.Cache=r.Z;var o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g;const u=(c=i((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,i){t.push(r?i.replace(a,"$1"):n||e)})),t}),(function(e){return 500===s.size&&s.clear(),e})),s=c.cache,c);var c,s},7969:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(2758);const i=function(e){if("string"==typeof e||(0,r.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},6682:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=Function.prototype.toString;const i=function(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},2777:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(1525);const i=(0,n(4724).Z)((function(e,t,n){return t=t.toLowerCase(),e+(n?(0,r.Z)(t):t)}))},1525:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(3523);const i=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}(e,t,n)};var o=n(2690),a=n(222);const u=function(e){e=(0,r.Z)(e);var t=(0,o.Z)(e)?(0,a.Z)(e):void 0,n=t?t[0]:e.charAt(0),u=t?i(t,1).join(""):e.slice(1);return n.toUpperCase()+u},c=function(e){return u((0,r.Z)(e).toLowerCase())}},8804:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return e===t||e!=e&&t!=t}},8407:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(3523),i=/[\\^$.*+?()[\]{}|]/g,o=RegExp(i.source);const a=function(e){return(e=(0,r.Z)(e))&&o.test(e)?e.replace(i,"\\$&"):e}},3662:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(2342),i=n(3282),o=n(649);var a=/\s/;var u=/^\s+/;const c=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&a.test(e.charAt(t)););return t}(e)+1).replace(u,""):e};var s=n(3122),l=n(2758),f=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,p=/^0o[0-7]+$/i,v=parseInt;const h=function(e){return e?Infinity===(e=function(e){if("number"==typeof e)return e;if((0,l.Z)(e))return NaN;if((0,s.Z)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,s.Z)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=c(e);var n=d.test(e);return n||p.test(e)?v(e.slice(2),n?2:8):f.test(e)?NaN:+e}(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var y=Math.max;const b=(g=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o,a,u=null==n?0:(o=h(n),a=o%1,o==o?a?o-a:o:0);return u<0&&(u=y(i+u,0)),function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}(e,(0,r.Z)(t,3),u)},function(e,t,n){var a=Object(e);if(!(0,i.Z)(e)){var u=(0,r.Z)(t,3);e=(0,o.Z)(e),t=function(e){return u(a[e],e,a)}}var c=g(e,t,n);return c>-1?a[u?e[c]:c]:void 0});var g},4248:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(9001),i=n(3391);const o=function(e){return(0,i.Z)(e)&&"[object Arguments]"==(0,r.Z)(e)};var a=Object.prototype,u=a.hasOwnProperty,c=a.propertyIsEnumerable;const s=o(function(){return arguments}())?o:function(e){return(0,i.Z)(e)&&u.call(e,"callee")&&!c.call(e,"callee")}},7885:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=Array.isArray},3282:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(8936),i=n(1164);const o=function(e){return null!=e&&(0,i.Z)(e.length)&&!(0,r.Z)(e)}},4975:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(3221);var i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===i?r.Z.Buffer:void 0;const u=(a?a.isBuffer:void 0)||function(){return!1}},8936:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9001),i=n(3122);const o=function(e){if(!(0,i.Z)(e))return!1;var t=(0,r.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1164:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3122:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3391:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return null!=e&&"object"==typeof e}},2758:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9001),i=n(3391);const o=function(e){return"symbol"==typeof e||(0,i.Z)(e)&&"[object Symbol]"==(0,r.Z)(e)}},8127:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9001),i=n(1164),o=n(3391),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var u=n(3225),c=n(7755),s=c.Z&&c.Z.isTypedArray;const l=s?(0,u.Z)(s):function(e){return(0,o.Z)(e)&&(0,i.Z)(e.length)&&!!a[(0,r.Z)(e)]}},649:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(848),i=n(3917),o=n(3282);const a=function(e){return(0,o.Z)(e)?(0,r.Z)(e):(0,i.Z)(e)}},813:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(){return[]}},3523:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(187),i=n(5598),o=n(7885),a=n(2758),u=r.Z?r.Z.prototype:void 0,c=u?u.toString:void 0;const s=function e(t){if("string"==typeof t)return t;if((0,o.Z)(t))return(0,i.Z)(t,e)+"";if((0,a.Z)(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},l=function(e){return null==e?"":s(e)}},9857:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>J});var r=n(268);function i(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}c((r=r.apply(e,t||[])).next())}))}function o(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}var a,u=function(){},c=u(),s=Object,l=function(e){return e===c},f=function(e){return"function"==typeof e},d=function(e,t){return s.assign({},e,t)},p="undefined",v=function(){return typeof window!=p},h=new WeakMap,y=0,b=function(e){var t,n,r=typeof e,i=e&&e.constructor,o=i==Date;if(s(e)!==e||o||i==RegExp)t=o?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=h.get(e))return t;if(t=++y+"~",h.set(e,t),i==Array){for(t="@",n=0;n<e.length;n++)t+=b(e[n])+",";h.set(e,t)}if(i==s){t="#";for(var a=s.keys(e).sort();!l(n=a.pop());)l(e[n])||(t+=n+":"+b(e[n])+",");h.set(e,t)}}return t},g=!0,m=v(),w=typeof document!=p,Z=m&&window.addEventListener?window.addEventListener.bind(window):u,j=w?document.addEventListener.bind(document):u,O=m&&window.removeEventListener?window.removeEventListener.bind(window):u,T=w?document.removeEventListener.bind(document):u,_={isOnline:function(){return g},isVisible:function(){var e=w&&document.visibilityState;return l(e)||"hidden"!==e}},S={initFocus:function(e){return j("visibilitychange",e),Z("focus",e),function(){T("visibilitychange",e),O("focus",e)}},initReconnect:function(e){var t=function(){g=!0,e()},n=function(){g=!1};return Z("online",t),Z("offline",n),function(){O("online",t),O("offline",n)}}},P=!v()||"Deno"in window,x=P?r.useEffect:r.useLayoutEffect,A="undefined"!=typeof navigator&&navigator.connection,E=!P&&A&&(["slow-2g","2g"].includes(A.effectiveType)||A.saveData),D=function(e){if(f(e))try{e=e()}catch(t){e=""}var t=[].concat(e);return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?b(e):"",t,e?"$swr$"+e:""]},k=new WeakMap,U=function(e,t,n,r,i,o,a){void 0===a&&(a=!0);var u=k.get(e),c=u[0],s=u[1],l=u[3],f=c[t],d=s[t];if(a&&d)for(var p=0;p<d.length;++p)d[p](n,r,i);return o&&(delete l[t],f&&f[0])?f[0](2).then((function(){return e.get(t)})):e.get(t)},I=0,C=function(){return++I},N=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i(void 0,void 0,void 0,(function(){var t,n,r,i,a,u,s,p,v,h,y,b,g,m,w,Z,j,O,T,_,S;return o(this,(function(o){switch(o.label){case 0:if(t=e[0],n=e[1],r=e[2],i=e[3],u=!!l((a="boolean"==typeof i?{revalidate:i}:i||{}).populateCache)||a.populateCache,s=!1!==a.revalidate,p=!1!==a.rollbackOnError,v=a.optimisticData,h=D(n),y=h[0],b=h[2],!y)return[2];if(g=k.get(t),m=g[2],e.length<3)return[2,U(t,y,t.get(y),c,c,s,!0)];if(w=r,j=C(),m[y]=[j,0],O=!l(v),T=t.get(y),O&&(_=f(v)?v(T):v,t.set(y,_),U(t,y,_)),f(w))try{w=w(t.get(y))}catch(e){Z=e}return w&&f(w.then)?[4,w.catch((function(e){Z=e}))]:[3,2];case 1:if(w=o.sent(),j!==m[y][0]){if(Z)throw Z;return[2,w]}Z&&O&&p&&(u=!0,w=T,t.set(y,T)),o.label=2;case 2:return u&&(Z||(f(u)&&(w=u(w,T)),t.set(y,w)),t.set(b,d(t.get(b),{error:Z}))),m[y][1]=C(),[4,U(t,y,w,Z,c,s,!!u)];case 3:if(S=o.sent(),Z)throw Z;return[2,u?S:w]}}))}))},F=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},R=function(e,t){if(!k.has(e)){var n=d(S,t),r={},i=N.bind(c,e),o=u;if(k.set(e,[r,{},{},{},i]),!P){var a=n.initFocus(setTimeout.bind(c,F.bind(c,r,0))),s=n.initReconnect(setTimeout.bind(c,F.bind(c,r,1)));o=function(){a&&a(),s&&s(),k.delete(e)}}return[e,i,o]}return[e,k.get(e)[4]]},L=R(new Map),z=L[0],M=L[1],$=d({onLoadingSlow:u,onSuccess:u,onError:u,onErrorRetry:function(e,t,n,r,i){var o=n.errorRetryCount,a=i.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!l(o)&&a>o||setTimeout(r,u,i)},onDiscarded:u,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:E?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:E?5e3:3e3,compare:function(e,t){return b(e)==b(t)},isPaused:function(){return!1},cache:z,mutate:M,fallback:{}},_),V=function(e,t){var n=d(e,t);if(t){var r=e.use,i=e.fallback,o=t.use,a=t.fallback;r&&o&&(n.use=r.concat(o)),i&&a&&(n.fallback=d(i,a))}return n},B=(0,r.createContext)({}),q=function(e){return f(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},G=function(){return d($,(0,r.useContext)(B))},W=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},H={dedupe:!0},J=(s.defineProperty((function(e){var t=e.value,n=V((0,r.useContext)(B),t),i=t&&t.provider,o=(0,r.useState)((function(){return i?R(i(n.cache||z),t):c}))[0];return o&&(n.cache=o[0],n.mutate=o[1]),x((function(){return o?o[2]:c}),[]),(0,r.createElement)(B.Provider,d(e,{value:n}))}),"default",{value:$}),a=function(e,t,n){var a=n.cache,u=n.compare,s=n.fallbackData,h=n.suspense,y=n.revalidateOnMount,b=n.refreshInterval,g=n.refreshWhenHidden,m=n.refreshWhenOffline,w=k.get(a),Z=w[0],j=w[1],O=w[2],T=w[3],_=D(e),S=_[0],A=_[1],E=_[2],I=(0,r.useRef)(!1),F=(0,r.useRef)(!1),R=(0,r.useRef)(S),L=(0,r.useRef)(t),z=(0,r.useRef)(n),M=function(){return z.current},$=function(){return M().isVisible()&&M().isOnline()},V=function(e){return a.set(E,d(a.get(E),e))},B=a.get(S),q=l(s)?n.fallback[S]:s,G=l(B)?q:B,J=a.get(E)||{},Y=J.error,K=!I.current,X=function(){return K&&!l(y)?y:!M().isPaused()&&(h?!l(G)&&n.revalidateIfStale:l(G)||n.revalidateIfStale)},Q=!(!S||!t)&&(!!J.isValidating||K&&X()),ee=function(e,t){var n=(0,r.useState)({})[1],i=(0,r.useRef)(e),o=(0,r.useRef)({data:!1,error:!1,isValidating:!1}),a=(0,r.useCallback)((function(e){var r=!1,a=i.current;for(var u in e){var c=u;a[c]!==e[c]&&(a[c]=e[c],o.current[c]&&(r=!0))}r&&!t.current&&n({})}),[]);return x((function(){i.current=e})),[i,o.current,a]}({data:G,error:Y,isValidating:Q},F),te=ee[0],ne=ee[1],re=ee[2],ie=(0,r.useCallback)((function(e){return i(void 0,void 0,void 0,(function(){var t,r,i,s,d,p,v,h,y,b,g,m,w;return o(this,(function(o){switch(o.label){case 0:if(t=L.current,!S||!t||F.current||M().isPaused())return[2,!1];s=!0,d=e||{},p=!T[S]||!d.dedupe,v=function(){return!F.current&&S===R.current&&I.current},h=function(){var e=T[S];e&&e[1]===i&&delete T[S]},y={isValidating:!1},b=function(){V({isValidating:!1}),v()&&re(y)},V({isValidating:!0}),re({isValidating:!0}),o.label=1;case 1:return o.trys.push([1,3,,4]),p&&(U(a,S,te.current.data,te.current.error,!0),n.loadingTimeout&&!a.get(S)&&setTimeout((function(){s&&v()&&M().onLoadingSlow(S,n)}),n.loadingTimeout),T[S]=[t.apply(void 0,A),C()]),w=T[S],r=w[0],i=w[1],[4,r];case 2:return r=o.sent(),p&&setTimeout(h,n.dedupingInterval),T[S]&&T[S][1]===i?(V({error:c}),y.error=c,g=O[S],!l(g)&&(i<=g[0]||i<=g[1]||0===g[1])?(b(),p&&v()&&M().onDiscarded(S),[2,!1]):(u(te.current.data,r)?y.data=te.current.data:y.data=r,u(a.get(S),r)||a.set(S,r),p&&v()&&M().onSuccess(r,S,n),[3,4])):(p&&v()&&M().onDiscarded(S),[2,!1]);case 3:return m=o.sent(),h(),M().isPaused()||(V({error:m}),y.error=m,p&&v()&&(M().onError(m,S,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||f(n.shouldRetryOnError)&&n.shouldRetryOnError(m))&&$()&&M().onErrorRetry(m,S,n,ie,{retryCount:(d.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return s=!1,b(),v()&&p&&U(a,S,y.data,y.error,!1),[2,!0]}}))}))}),[S]),oe=(0,r.useCallback)(N.bind(c,a,(function(){return R.current})),[]);if(x((function(){L.current=t,z.current=n})),x((function(){if(S){var e=S!==R.current,t=ie.bind(c,H),n=0,r=W(S,j,(function(e,t,n){re(d({error:t,isValidating:n},u(te.current.data,e)?c:{data:e}))})),i=W(S,Z,(function(e){if(0==e){var r=Date.now();M().revalidateOnFocus&&r>n&&$()&&(n=r+M().focusThrottleInterval,t())}else if(1==e)M().revalidateOnReconnect&&$()&&t();else if(2==e)return ie()}));return F.current=!1,R.current=S,I.current=!0,e&&re({data:G,error:Y,isValidating:Q}),X()&&(l(G)||P?t():(o=t,v()&&typeof window.requestAnimationFrame!=p?window.requestAnimationFrame(o):setTimeout(o,1))),function(){F.current=!0,r(),i()}}var o}),[S,ie]),x((function(){var e;function t(){var t=f(b)?b(G):b;t&&-1!==e&&(e=setTimeout(n,t))}function n(){te.current.error||!g&&!M().isVisible()||!m&&!M().isOnline()?t():ie(H).then(t)}return t(),function(){e&&(clearTimeout(e),e=-1)}}),[b,g,m,ie]),(0,r.useDebugValue)(G),h&&l(G)&&S)throw L.current=t,z.current=n,F.current=!1,l(Y)?ie(H):Y;return{mutate:oe,get data(){return ne.data=!0,G},get error(){return ne.error=!0,Y},get isValidating(){return ne.isValidating=!0,Q}}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=G(),r=q(e),i=r[0],o=r[1],u=r[2],c=V(n,u),s=a,l=c.use;if(l)for(var f=l.length;f-- >0;)s=l[f](s);return s(i,o||c.fetcher,c)})},2303:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r,i,o=n(9857),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)},u=function(e){return"function"==typeof e[1]?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},c=(r=o.ZP,i=function(e){return function(t,n,r){return r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=u(e),o=n[0],c=n[1],s=n[2],l=(s.use||[]).concat(i);return r(o,c,a(a({},s),{use:l}))})}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return n[e](o,o.exports,i),o.loaded=!0,o.exports}i.m=n,i.c=r,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>e+".js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="@openmrs/esm-patient-registration-app:",i.l=(n,r,o,a)=>{if(e[n])e[n].push(r);else{var u,c;if(void 0!==o)for(var s=document.getElementsByTagName("script"),l=0;l<s.length;l++){var f=s[l];if(f.getAttribute("src")==n||f.getAttribute("data-webpack")==t+o){u=f;break}}u||(c=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,i.nc&&u.setAttribute("nonce",i.nc),u.setAttribute("data-webpack",t+o),u.src=n),e[n]=[r];var d=(t,r)=>{u.onerror=u.onload=null,clearTimeout(p);var i=e[n];if(delete e[n],u.parentNode&&u.parentNode.removeChild(u),i&&i.forEach((e=>e(r))),t)return t(r)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=d.bind(null,u.onerror),u.onload=d.bind(null,u.onload),c&&document.head.appendChild(u)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{i.S={};var e={},t={};i.I=(n,r)=>{r||(r=[]);var o=t[n];if(o||(o=t[n]={}),!(r.indexOf(o)>=0)){if(r.push(o),e[n])return e[n];i.o(i.S,n)||(i.S[n]={});var a=i.S[n],u="@openmrs/esm-patient-registration-app",c=(e,t,n,r)=>{var i=a[e]=a[e]||{},o=i[t];(!o||!o.loaded&&(!r!=!o.eager?r:u>o.from))&&(i[t]={get:n,from:u,eager:!!r})},s=[];return"default"===n&&(c("@openmrs/esm-framework","4.0.2",(()=>Promise.all([i.e(858),i.e(268)]).then((()=>()=>i(6858))))),c("react-i18next","11.18.6",(()=>Promise.all([i.e(100),i.e(268)]).then((()=>()=>i(8100))))),c("react-router-dom","6.4.2",(()=>Promise.all([i.e(34),i.e(268)]).then((()=>()=>i(6034))))),c("react","18.2.0",(()=>i.e(784).then((()=>()=>i(6292)))))),e[n]=s.length?Promise.all(s).then((()=>e[n]=1)):1}}})(),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e=e=>{var t=e=>e.split(".").map((e=>+e==e?+e:e)),n=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),r=n[1]?t(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,t(n[2]))),n[3]&&(r.push([]),r.push.apply(r,t(n[3]))),r},t=e=>{var n=e[0],r="";if(1===e.length)return"*";if(n+.5){r+=0==n?">=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var i=1,o=1;o<e.length;o++)i--,r+="u"==(typeof(u=e[o]))[0]?"-":(i>0?".":"")+(i=2,u);return r}var a=[];for(o=1;o<e.length;o++){var u=e[o];a.push(0===u?"not("+c()+")":1===u?"("+c()+" || "+c()+")":2===u?a.pop()+" "+a.pop():t(u))}return c();function c(){return a.pop().replace(/^\((.+)\)$/,"$1")}},n=(t,r)=>{if(0 in t){r=e(r);var i=t[0],o=i<0;o&&(i=-i-1);for(var a=0,u=1,c=!0;;u++,a++){var s,l,f=u<t.length?(typeof t[u])[0]:"";if(a>=r.length||"o"==(l=(typeof(s=r[a]))[0]))return!c||("u"==f?u>i&&!o:""==f!=o);if("u"==l){if(!c||"u"!=f)return!1}else if(c)if(f==l)if(u<=i){if(s!=t[u])return!1}else{if(o?s>t[u]:s<t[u])return!1;s!=t[u]&&(c=!1)}else if("s"!=f&&"n"!=f){if(o||u<=i)return!1;c=!1,u--}else{if(u<=i||l<f!=o)return!1;c=!1}else"s"!=f&&"n"!=f&&(c=!1,u--)}}var d=[],p=d.pop.bind(d);for(a=1;a<t.length;a++){var v=t[a];d.push(1==v?p()|p():2==v?p()&p():v?n(v,r):!p())}return!!p()},r=(t,n)=>{var r=t[n];return Object.keys(r).reduce(((t,n)=>!t||!r[t].loaded&&((t,n)=>{t=e(t),n=e(n);for(var r=0;;){if(r>=t.length)return r<n.length&&"u"!=(typeof n[r])[0];var i=t[r],o=(typeof i)[0];if(r>=n.length)return"u"==o;var a=n[r],u=(typeof a)[0];if(o!=u)return"o"==o&&"n"==u||"s"==u||"u"==o;if("o"!=o&&"u"!=o&&i!=a)return i<a;r++}})(t,n)?n:t),0)},o=(e,i,o,u)=>{var c=r(e,o);return n(u,c)||"undefined"!=typeof console&&console.warn&&console.warn(((e,n,r,i)=>"Unsatisfied version "+r+" from "+(r&&e[n][r].from)+" of shared singleton module "+n+" (required "+t(i)+")")(e,o,c,u)),a(e[o][c])},a=e=>(e.loaded=1,e.get()),u=(e=>function(t,n,r,o){var a=i.I(t);return a&&a.then?a.then(e.bind(e,t,i.S[t],n,r,o)):e(t,i.S[t],n,r,o)})(((e,t,n,r,a)=>t&&i.o(t,n)?o(t,0,n,r):a())),c={},s={4924:()=>u("default","react-i18next",[1,11],(()=>i.e(100).then((()=>()=>i(8100))))),8744:()=>u("default","react-router-dom",[1,6],(()=>i.e(34).then((()=>()=>i(6034))))),268:()=>u("default","react",[1,18],(()=>i.e(784).then((()=>()=>i(6292))))),906:()=>u("default","@openmrs/esm-framework",[1,4],(()=>i.e(858).then((()=>()=>i(6858)))))};[906,268].forEach((e=>{i.m[e]=t=>{c[e]=0,delete i.c[e];var n=s[e]();if("function"!=typeof n)throw new Error("Shared module is not available for eager consumption: "+e);t.exports=n()}}));var l={268:[268],658:[8744],924:[4924]};i.f.consumes=(e,t)=>{i.o(l,e)&&l[e].forEach((e=>{if(i.o(c,e))return t.push(c[e]);var n=t=>{c[e]=0,i.m[e]=n=>{delete i.c[e],n.exports=t()}},r=t=>{delete c[e],i.m[e]=n=>{throw delete i.c[e],t}};try{var o=s[e]();o.then?t.push(c[e]=o.then(n).catch(r)):n(o)}catch(e){r(e)}}))}})(),(()=>{var e={179:0,268:0,686:0,470:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(268|924)$/.test(t))e[t]=0;else{var o=new Promise(((n,i)=>r=e[t]=[n,i]));n.push(r[2]=o);var a=i.p+i.u(t),u=new Error;i.l(a,(n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;u.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",u.name="ChunkLoadError",u.type=o,u.request=a,r[1](u)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[a,u,c]=n,s=0;if(a.some((t=>0!==e[t]))){for(r in u)i.o(u,r)&&(i.m[r]=u[r]);c&&c(i)}for(t&&t(n);s<a.length;s++)o=a[s],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=self.webpackChunk_openmrs_esm_patient_registration_app=self.webpackChunk_openmrs_esm_patient_registration_app||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),i.nc=void 0,i(1686)})();
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"main.js"
|
|
74
74
|
],
|
|
75
75
|
"auxiliaryFiles": [],
|
|
76
|
-
"hash": "
|
|
76
|
+
"hash": "80359d63d53e97c6f8a6",
|
|
77
77
|
"childrenByOrder": {}
|
|
78
78
|
},
|
|
79
79
|
{
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
"686.js"
|
|
352
352
|
],
|
|
353
353
|
"auxiliaryFiles": [],
|
|
354
|
-
"hash": "
|
|
354
|
+
"hash": "82b9a0bd984eeee273da",
|
|
355
355
|
"childrenByOrder": {}
|
|
356
356
|
},
|
|
357
357
|
{
|
|
@@ -398,6 +398,28 @@
|
|
|
398
398
|
"hash": "634dc468376f792372d1",
|
|
399
399
|
"childrenByOrder": {}
|
|
400
400
|
},
|
|
401
|
+
{
|
|
402
|
+
"rendered": true,
|
|
403
|
+
"initial": false,
|
|
404
|
+
"entry": false,
|
|
405
|
+
"recorded": false,
|
|
406
|
+
"size": 3338,
|
|
407
|
+
"sizes": {
|
|
408
|
+
"javascript": 3338
|
|
409
|
+
},
|
|
410
|
+
"names": [],
|
|
411
|
+
"idHints": [],
|
|
412
|
+
"runtime": [
|
|
413
|
+
"@openmrs/esm-patient-registration-app",
|
|
414
|
+
"main"
|
|
415
|
+
],
|
|
416
|
+
"files": [
|
|
417
|
+
"807.js"
|
|
418
|
+
],
|
|
419
|
+
"auxiliaryFiles": [],
|
|
420
|
+
"hash": "aef75d289fe26e386051",
|
|
421
|
+
"childrenByOrder": {}
|
|
422
|
+
},
|
|
401
423
|
{
|
|
402
424
|
"rendered": true,
|
|
403
425
|
"initial": false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-patient-registration-app",
|
|
3
|
-
"version": "4.0.2-pre.
|
|
3
|
+
"version": "4.0.2-pre.707",
|
|
4
4
|
"description": "Patient registration microfrontend for the OpenMRS SPA",
|
|
5
5
|
"browser": "dist/openmrs-esm-patient-registration-app.js",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"webpack": "^5.74.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "908b86a0b942f02e0a17d146fb38d840f5c0be13"
|
|
56
56
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"addRelationshipButtonText": "បន្ថែមទំនាក់ទំនង",
|
|
3
|
+
"address1": "",
|
|
4
|
+
"addressHeader": "អាសយដ្ឋាន",
|
|
5
|
+
"allFieldsRequiredText": "តម្រូវឱ្យបំពេញគ្រប់កន្លែងចំហរទាំងអស់ លុះត្រាតែមានសម្គាល់ថាជាជម្រើស",
|
|
6
|
+
"autoGeneratedPlaceholderText": "ទាញចេញទិន្នន័យដោយស្វ័យប្រវត្តិ",
|
|
7
|
+
"birthdayNotInTheFuture": "ថ្ងៃខែឆ្នាំកំណើតមិនអាចមាននាពេលអនាគតទេ",
|
|
8
|
+
"birthdayRequired": "តម្រូវឱ្យបំពេញថ្ងៃខែឆ្នាំកំណើត",
|
|
9
|
+
"birthFieldLabelText": "ថ្ងៃខែឆ្នាំកំណើត",
|
|
10
|
+
"cancel": "បោះបង់ចោល",
|
|
11
|
+
"causeOfDeathInputLabel": "មូលហេតុនៃការស្លាប់",
|
|
12
|
+
"cityVillage": "",
|
|
13
|
+
"configure": "កំណត់រចនាសម្ព័ន្ធ",
|
|
14
|
+
"country": "",
|
|
15
|
+
"createNew": "បង្កើតថ្មី",
|
|
16
|
+
"dateOfBirthLabelText": "ថ្ងៃខែឆ្នាំកំណើត",
|
|
17
|
+
"deathDateInputLabel": "កាលបរិច្ឆេទនៃការស្លាប់",
|
|
18
|
+
"deathdayNotInTheFuture": "ថ្ងៃស្លាប់មិនអាចមាននាពេលអនាគតទេ។",
|
|
19
|
+
"deleteIdentifierTooltip": "លុប",
|
|
20
|
+
"deleteRelationshipTooltipText": "លុប",
|
|
21
|
+
"discard": "បោះបង់",
|
|
22
|
+
"discardModalBody": "The changes you made to this patient's details have not been saved. Discard changes?",
|
|
23
|
+
"discardModalHeader": "បញ្ជាក់ការលុបចោលការផ្លាស់ប្តូរ",
|
|
24
|
+
"dobToggleLabelText": "ស្គាល់ថ្ងៃខែឆ្នាំកំណើត?",
|
|
25
|
+
"edit": "កែសម្រួល",
|
|
26
|
+
"editIdentifierTooltip": "កែសម្រួល",
|
|
27
|
+
"editPatientDetails": "កែសម្រួលព័ត៌មានលម្អិតអ្នកជំងឺ",
|
|
28
|
+
"emailLabelText": "អ៊ីមែល",
|
|
29
|
+
"estimatedMonthsLabelText": "ខែប៉ាន់ស្មាន",
|
|
30
|
+
"estimatedYearsLabelText": "ឆ្នាំប៉ាន់ស្មាន",
|
|
31
|
+
"familyNameLabelText": "នាមត្រកូល",
|
|
32
|
+
"familyNameRequired": "តម្រូវឱ្យបំពេញនាមត្រកូល",
|
|
33
|
+
"femaleLabelText": "ស្រី",
|
|
34
|
+
"fieldErrorTitleMessage": "ផ្នែកខាងក្រោមមានកំហុស៖",
|
|
35
|
+
"fullNameLabelText": "ឈ្មោះពេញ",
|
|
36
|
+
"genderLabelText": "ភេទ",
|
|
37
|
+
"genderRequired": "តម្រូវឱ្យបំពេញភេទ",
|
|
38
|
+
"genderUnspecified": "តម្រូវឱ្យបំពេញភេទ",
|
|
39
|
+
"givenNameLabelText": "នាមខ្លួន",
|
|
40
|
+
"givenNameRequired": "តម្រូវឱ្យបំពេញឈ្មោះ",
|
|
41
|
+
"identifierValueRequired": "តម្រូវឱ្យមានកំណត់អត្តសញ្ញាណ",
|
|
42
|
+
"idFieldLabelText": "អ្នកកំណត់អត្តសញ្ញាណ",
|
|
43
|
+
"incompleteForm": "ទម្រង់មិនពេញលេញ",
|
|
44
|
+
"invalidEmail": "ត្រូវតែផ្តល់ឱ្យអ៊ីមែលដែលមានសុពលភាព",
|
|
45
|
+
"invalidInput": "ការបញ្ចូលមិនត្រឹមត្រូវ",
|
|
46
|
+
"isDeadInputLabel": "គឺស្លាប់",
|
|
47
|
+
"jumpTo": "រំលងទៅ",
|
|
48
|
+
"maleLabelText": "ប្រុស",
|
|
49
|
+
"middleNameLabelText": "ឈ្មោះកណ្តាល",
|
|
50
|
+
"months": "ខែ",
|
|
51
|
+
"negativeMonths": "ខែអវិជ្ជមាន",
|
|
52
|
+
"negativeYears": "ឆ្នាំអវិជ្ជមាន",
|
|
53
|
+
"no": "ទេ",
|
|
54
|
+
"numberInNameDubious": "លេខគឺជាឈ្មោះគួរឱ្យសង្ស័យ",
|
|
55
|
+
"optional": "ជាជម្រើស",
|
|
56
|
+
"otherLabelText": "ផ្សេងទៀត",
|
|
57
|
+
"patient": "អ្នកជំងឺ",
|
|
58
|
+
"patientNameKnown": "ស្គាល់ឈ្មោះអ្នកជំងឺ?",
|
|
59
|
+
"phoneEmailLabelText": "ទូរស័ព្ទ អ៊ីមែល។ល។",
|
|
60
|
+
"phoneNumberInputLabelText": "លេខទូរស័ព្ទ",
|
|
61
|
+
"postalCode": "",
|
|
62
|
+
"registerPatient": "ចុះឈ្មោះអ្នកជំងឺ",
|
|
63
|
+
"registrationSuccessToastDescription": "ឥឡូវនេះអ្នកជំងឺអាចត្រូវបានរកឃើញដោយស្វែងរកពួកគេដោយប្រើឈ្មោះឬអត្តលេខរបស់ពួកគេ",
|
|
64
|
+
"registrationSuccessToastTitle": "បង្កើតការចុះឈ្មោះអ្នកជំងឺថ្មី",
|
|
65
|
+
"relationship": "ទំនាក់ទំនង",
|
|
66
|
+
"relationshipPlaceholder": "ទំនាក់ទំនង",
|
|
67
|
+
"relationshipRemovedText": "ដកទំនាក់ទំនងចេញ",
|
|
68
|
+
"relationshipToPatient": "ទំនាក់ទំនងជាមួយអ្នកជំងឺ",
|
|
69
|
+
"relativeFullNameLabelText": "ឈ្មោះពេញ",
|
|
70
|
+
"relativeNamePlaceholder": "នាមត្រកូលនាមខ្លួន",
|
|
71
|
+
"resetIdentifierTooltip": "កំណត់ឡើងវិញ",
|
|
72
|
+
"restoreRelationshipActionButton": "មិនធ្វើវិញ",
|
|
73
|
+
"sexFieldLabelText": "ភេទ",
|
|
74
|
+
"stateProvince": "",
|
|
75
|
+
"stroke": "ធ្លាប់មានគ្រោះថ្នាក់សរសៃឈាមខួរក្បាល",
|
|
76
|
+
"unidentifiedPatient": "អ្នកជំងឺមិនស្គាល់អត្តលេខ",
|
|
77
|
+
"unknown": "មិនដឹង",
|
|
78
|
+
"unknownLabelText": "មិនដឹង",
|
|
79
|
+
"updatePatient": "ធ្វើបច្ចុប្បន្នភាពអ្នកជំងឺ",
|
|
80
|
+
"updationSuccessToastDescription": "ព័ត៌មានរបស់អ្នកជំងឺត្រូវបានធ្វើបច្ចុប្បន្នភាពដោយជោគជ័យ",
|
|
81
|
+
"updationSuccessToastTitle": "ព័ត៌មានលម្អិតអំពីអ្នកជំងឺត្រូវបានធ្វើបច្ចុប្បន្នភាព",
|
|
82
|
+
"years": "ឆ្នាំ",
|
|
83
|
+
"yearsEstimateRequired": "តម្រូវឱ្យមានការប៉ាន់ស្មានឆ្នាំ",
|
|
84
|
+
"yes": "បាទ/ចា"
|
|
85
|
+
}
|