@kenyaemr/esm-patient-registration-app 4.4.1 → 4.4.2
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/dist/144.js +2 -0
- package/dist/144.js.map +1 -0
- package/dist/207.js +1 -1
- package/dist/330.js +1 -0
- package/dist/330.js.map +1 -0
- package/dist/574.js +1 -1
- package/dist/59.js +1 -0
- package/dist/59.js.map +1 -0
- package/dist/68.js +1 -1
- package/dist/68.js.map +1 -1
- package/dist/735.js +1 -1
- package/dist/{909.js → 821.js} +1 -1
- package/dist/{909.js.map → 821.js.map} +1 -1
- package/dist/{698.js → 822.js} +1 -1
- package/dist/822.js.map +1 -0
- package/dist/887.js +1 -1
- package/dist/kenyaemr-esm-patient-registration-app.js +1 -1
- package/dist/kenyaemr-esm-patient-registration-app.js.buildmanifest.json +122 -74
- package/dist/kenyaemr-esm-patient-registration-app.old +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
- package/src/constants.ts +1 -1
- package/src/index.ts +18 -0
- package/src/offline.resources.ts +1 -8
- package/src/patient-registration/field/address/address-field.component.tsx +1 -0
- package/src/patient-registration/patient-registration-hooks.ts +77 -6
- package/src/patient-registration/patient-registration-types.tsx +7 -1
- package/src/patient-registration/patient-registration.component.tsx +26 -3
- package/src/patient-verification/assets/counties.json +236 -0
- package/src/patient-verification/assets/verification-assets.ts +11 -0
- package/src/patient-verification/patient-verification-hook.tsx +156 -0
- package/src/patient-verification/patient-verification-utils.ts +173 -0
- package/src/patient-verification/patient-verification.component.tsx +110 -0
- package/src/patient-verification/patient-verification.scss +30 -0
- package/src/patient-verification/verification-modal/confirm-prompt.component.tsx +69 -0
- package/src/patient-verification/verification-modal/empty-prompt.component.tsx +35 -0
- package/src/patient-verification/verification-types.ts +50 -0
- package/translations/en.json +17 -1
- package/dist/417.js +0 -2
- package/dist/417.js.map +0 -1
- package/dist/698.js.map +0 -1
- /package/dist/{417.js.LICENSE.txt → 144.js.LICENSE.txt} +0 -0
package/dist/main.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see main.js.LICENSE.txt */
|
|
2
|
-
(()=>{var t,e,n={225:(t,e,n)=>{"use strict";n.d(e,{X8:()=>u,bs:()=>a});var r=n(906);function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var a=[{id:"demographics",name:"Basic Info",fields:["name","gender","dob","id"]},{id:"contact",name:"Contact Details",fields:["address","phone"]},{id:"death",name:"Death Info",fields:[]},{id:"relationships",name:"Relationships",fields:[]}],u=["name","gender","dob","address","id","phone & email"];function s(t){return"'".concat(t.map((function(t){return t.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(t){return t.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(t){return t.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.Boolean,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.Boolean,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.Boolean,r.Type.Number,r.Type.Number,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(t){return!t.fieldDefinitions.some((function(t){return"obs"==t.type}))||null!=t.registrationObs.encounterTypeUuid}),"If fieldDefinitions contains any fields of type 'obs', `registrationObs.encounterTypeUuid` must be specified."),(0,r.validator)((function(t){return t.sections.every((function(e){return i(a).concat(i(t.sectionDefinitions)).map((function(t){return t.id})).includes(e)}))}),(function(t){var e=i(a).concat(i(t.sectionDefinitions)).map((function(t){return t.id})),n=t.sections.find((function(t){return!e.includes(t)}));return"'".concat(n,"' is not a valid section ID. Valid section IDs include the built-in sections ").concat(s(a))+(t.sectionDefinitions.length?"; and the defined sections ".concat(s(t.sectionDefinitions),"."):".")})),(0,r.validator)((function(t){return t.sectionDefinitions.every((function(e){return e.fields.every((function(e){return i(u).concat(i(t.fieldDefinitions.map((function(t){return t.id})))).includes(e)}))}))}),(function(t){var e=i(u).concat(i(t.fieldDefinitions.map((function(t){return t.id})))),n=t.sectionDefinitions.find((function(t){return t.fields.some((function(t){return!e.includes(t)}))})),r=n.fields.find((function(t){return!e.includes(t)}));return"The section definition '".concat(n.id,"' contains an invalid field '").concat(r,"'. 'fields' can only contain the built-in fields '").concat(u.join("', '"),"'")+(t.fieldDefinitions.length?"; or the defined fields ".concat(s(t.fieldDefinitions),"."):".")}))},8179:(t,e,n)=>{"use strict";n.d(e,{Kt:()=>s,QT:()=>c,UO:()=>u});var r,o,i,a=n(906),u="custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))",s="patient-registration",c=(r={},i="network-first",(o=a.omrsOfflineCachingStrategyHttpHeaderName)in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,r)},7068:(t,e,n)=>{"use strict";n(906),n(3076),n(225),n(8179),n(6279),n(3979)},6279:(t,e,n)=>{"use strict";n.d(e,{Cg:()=>_,St:()=>E,Te:()=>T,mt:()=>O});var r=n(268),o=n.n(r),a=n(286),u=n(2777),s=n(8407),c=n(906),l=n(8179);function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function d(t){if(Array.isArray(t))return t}function p(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function h(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){p(i,r,o,a,u,"next",t)}function u(t){p(i,r,o,a,u,"throw",t)}a(void 0)}))}}function v(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function y(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(t,e){return d(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||w(t,e)||y()}function g(t){return d(t)||v(t)||w(t,i)||y()}function m(t){return function(t){if(Array.isArray(t))return f(t)}(t)||v(t)||w(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t,e){if(t){if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}var Z=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},_=o().createContext(null);function T(){return j.apply(this,arguments)}function j(){return(j=h((function(){return Z(this,(function(t){switch(t.label){case 0:return[4,I("/ws/rest/v1/systemsetting?q=layout.address.format&v=custom:(value)")];case 1:return[2,t.sent().data]}}))}))).apply(this,arguments)}function O(){return S.apply(this,arguments)}function S(){return(S=h((function(){return Z(this,(function(t){switch(t.label){case 0:return[4,I("/ws/rest/v1/relationshiptype?v=default")];case 1:return[2,t.sent().data]}}))}))).apply(this,arguments)}function E(){return A.apply(this,arguments)}function A(){return(A=h((function(){var t,e,n,r,o,i;return Z(this,(function(u){switch(u.label){case 0:return[4,x()];case 1:return t=u.sent(),e=t.filter(Boolean),[4,Promise.all([C()].concat(m(e.map((function(t){return D(t.uuid)})))))];case 2:for(n=g.apply(void 0,[u.sent()]),r=n[0],o=n.slice(1),i=0;i<(null==e?void 0:e.length);i++)e[i].identifierSources=o[i].data.results.map((function(t){var e=(0,a.Z)(r.data.results,{source:{uuid:t.uuid}});return t.autoGenerationOption=e,t}));return[2,e]}}))}))).apply(this,arguments)}function x(){return P.apply(this,arguments)}function P(){return(P=h((function(){var t,e,n,r,o,i,a,u,s,c;return Z(this,(function(l){switch(l.label){case 0:return[4,Promise.all([I("/ws/rest/v1/patientidentifiertype?v=custom:(display,uuid,name,format,required,uniquenessBehavior)"),I("/ws/rest/v1/metadatamapping/termmapping?v=full&code=emr.primaryIdentifierType")])];case 1:return t=b.apply(void 0,[l.sent(),2]),e=t[0],n=t[1],e.ok?(u=null==e||null===(r=e.data)||void 0===r?void 0:r.results,s=null==n||null===(o=n.data)||void 0===o||null===(i=o.results)||void 0===i||null===(a=i[0])||void 0===a?void 0:a.metadataUuid,c=(null==n?void 0:n.ok)?[L(null==u?void 0:u.find((function(t){return t.uuid===s})),!0)]:[],u.forEach((function(t){t.uuid!==s&&c.push(L(t,!1))})),[2,c]):[2,[]]}}))}))).apply(this,arguments)}function D(t){return k.apply(this,arguments)}function k(){return(k=h((function(t){return Z(this,(function(e){switch(e.label){case 0:return[4,I("/ws/rest/v1/idgen/identifiersource?v=default&identifierType=".concat(t))];case 1:return[2,e.sent()]}}))}))).apply(this,arguments)}function C(t){return U.apply(this,arguments)}function U(){return(U=h((function(t){return Z(this,(function(t){switch(t.label){case 0:return[4,I("/ws/rest/v1/idgen/autogenerationoption?v=full")];case 1:return[2,t.sent()]}}))}))).apply(this,arguments)}function I(t){return N.apply(this,arguments)}function N(){return(N=h((function(t){var e;return Z(this,(function(n){switch(n.label){case 0:return e=new AbortController,[4,(0,c.messageOmrsServiceWorker)({type:"registerDynamicRoute",pattern:(0,s.Z)(t)})];case 1:return n.sent(),[4,(0,c.openmrsFetch)(t,{headers:l.QT,signal:null==e?void 0:e.signal})];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}function L(t,e){return{name:t.display,fieldName:(0,u.Z)(t.name),required:t.required,uuid:t.uuid,format:t.format,isPrimary:e,uniquenessBehavior:t.uniquenessBehavior}}},3076:(t,e,n)=>{"use strict";n.d(e,{I:()=>y});var r=n(906),o=n(8179),i=n(7117);function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){u(i,r,o,a,s,"next",t)}function s(t){u(i,r,o,a,s,"throw",t)}a(void 0)}))}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){l(t,e,n[e])}))}return t}function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t,e)||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(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},v=function(){function t(){c(this,t)}return t.saveRelationships=function(t,e){return s((function(){return h(this,(function(n){return[2,Promise.all(t.filter((function(t){return t.relationshipType})).filter((function(t){return!!t.action})).map((function(t){var n=t.relatedPersonUuid,r=t.relationshipType,o=t.uuid,a=t.action,u=d(r.split("/"),2),s=u[0],c=u[1],l=e.data.uuid,f="aIsToB"===c,p={personA:f?n:l,personB:f?l:n,relationshipType:s};switch(a){case"ADD":return(0,i.bL)(p);case"UPDATE":return(0,i.r6)(o,p);case"DELETE":return(0,i.kE)(o)}})))]}))}))()},t.saveObservations=function(t,e,n,r,o){return s((function(){var a;return h(this,(function(u){if(t&&Object.keys(t).length>0){if(o.registrationObs.encounterTypeUuid)return a={encounterDatetime:new Date,patient:e.data.uuid,encounterType:o.registrationObs.encounterTypeUuid,location:n,encounterProviders:[{provider:r.currentProvider.uuid,encounterRole:o.registrationObs.encounterProviderRoleUuid}],form:o.registrationObs.registrationFormUuid,obs:Object.keys(t).map((function(e){return{concept:e,value:t[e]}}))},[2,(0,i.M1)(a)];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]}))}))()},t.savePatientIdentifiers=function(t,e,n,r,o){return s((function(){var a;return h(this,(function(u){var c;return a=Object.values(n).filter((function(t){var e=t.identifierValue,n=t.autoGeneration,r=t.selectedSource;return e||n&&r})).map((c=s((function(n){var r,a,u,s,c,l,f,d,p,v;return h(this,(function(h){switch(h.label){case 0:return r=n.identifierTypeUuid,a=n.identifierValue,u=n.identifierUuid,s=n.selectedSource,c=n.preferred,l=n.autoGeneration,f=n.initialValue,l?[3,1]:(p=a,[3,4]);case 1:return[4,(0,i.fX)(s.uuid)];case 2:return[4,h.sent().data.identifier];case 3:p=h.sent(),h.label=4;case 4:return v={uuid:u,identifier:d=p,identifierType:r,location:o,preferred:c},t?[3,8]:f?[3,6]:[4,(0,i.eb)(e,v)];case 5:return h.sent(),[3,8];case 6:return f===d?[3,8]:[4,(0,i.nI)(e,u,v.identifier)];case 7:h.sent(),h.label=8;case 8:return[2,v]}}))})),function(t){return c.apply(this,arguments)})),e&&Object.keys(r).filter((function(t){return!n[t]})).forEach(function(){var t=s((function(t){return h(this,(function(n){switch(n.label){case 0:return[4,(0,i.ZB)(e,r[t].identifierUuid)];case 1:return n.sent(),[2]}}))}));return function(e){return t.apply(this,arguments)}}()),[2,Promise.all(a)]}))}))()},t.getDeletedNames=function(t,e){return(null==e?void 0:e.additionalNameUuid)?[{nameUuid:e.additionalNameUuid,personUuid:t}]:[]},t.getPatientToCreate=function(e,n,r,o,i){var a,u,s;return u=n.birthdate,a=(null!=(s=Date)&&"undefined"!=typeof Symbol&&s[Symbol.hasInstance]?s[Symbol.hasInstance](u):u instanceof s)?[n.birthdate.getFullYear(),n.birthdate.getMonth()+1,n.birthdate.getDate()].join("-"):n.birthdate,{uuid:n.patientUuid,person:f({uuid:n.patientUuid,names:t.getNames(n,r),gender:n.gender.charAt(0),birthdate:a,birthdateEstimated:n.birthdateEstimated,attributes:t.getPatientAttributes(e,n,r),addresses:[n.address]},t.getPatientDeathInfo(n)),identifiers:i}},t.getNames=function(t,e){var n=[{uuid:e.preferredNameUuid,preferred:!0,givenName:t.givenName,middleName:t.middleName,familyName:t.familyName}];return t.addNameInLocalLanguage&&n.push({uuid:e.additionalNameUuid,preferred:!1,givenName:t.additionalGivenName,middleName:t.additionalMiddleName,familyName:t.additionalFamilyName}),n},t.getPatientAttributes=function(t,e,n){var o,i=[];return e.attributes&&(Object.entries(e.attributes).filter((function(t){return!!d(t,2)[1]})).forEach((function(t){var e=d(t,2),n=e[0],r=e[1];i.push({attributeType:n,value:r})})),!t&&e.patientUuid&&Object.entries(e.attributes).filter((function(t){return!d(t,2)[1]})).forEach((o=s((function(t){var o,i,a;return h(this,(function(u){switch(u.label){case 0:return o=d(t,1),i=o[0],a=n["attribute.".concat(i)],[4,(0,r.openmrsFetch)("/ws/rest/v1/person/".concat(e.patientUuid,"/attribute/").concat(a),{method:"DELETE"}).catch((function(t){console.error(t)}))];case 1:return u.sent(),[2]}}))})),function(t){return o.apply(this,arguments)}))),e.unidentifiedPatient&&i.push({attributeType:"8b56eac7-5c76-4b9c-8c6f-1deab8d3fc47",value:"true"}),i},t.getPatientDeathInfo=function(t){var e=t.isDead,n=t.deathDate,r=t.deathCause;return{dead:e,deathDate:e?n:void 0,causeOfDeath:e?r:void 0}},t.mapPatientToFhirPatient=function(t){var e,n,r,o,i,a;return{id:t.uuid,gender:{M:"male",F:"female",O:"other",U:"unknown"}[null===(e=t.person)||void 0===e?void 0:e.gender],birthDate:null===(n=t.person)||void 0===n?void 0:n.birthdate,deceasedBoolean:t.person.dead,deceasedDateTime:t.person.deathDate,name:null===(r=t.person)||void 0===r||null===(o=r.names)||void 0===o?void 0:o.map((function(t){return{given:[t.givenName,t.middleName].filter(Boolean),family:t.familyName}})),address:null===(i=t.person)||void 0===i?void 0:i.addresses.map((function(t){return{city:t.cityVillage,country:t.country,postalCode:t.postalCode,state:t.stateProvince,use:"home"}})),telecom:null===(a=t.person.attributes)||void 0===a?void 0:a.filter((function(t){return"Telephone Number"===t.attributeType}))}},t}();v.savePatientFormOffline=(p=s((function(t,e,n,i,a,u,s,c,l){var f;return h(this,(function(d){switch(d.label){case 0:return f={fhirPatient:v.mapPatientToFhirPatient(v.getPatientToCreate(t,e,n,i,[])),_patientRegistrationData:{isNewPatient:t,formValues:e,patientUuidMap:n,initialAddressFieldValues:i,capturePhotoProps:a,currentLocation:u,initialIdentifierValues:s,currentUser:c,config:l,savePatientTransactionManager:new y}},[4,(0,r.queueSynchronizationItem)(o.Kt,f,{id:e.patientUuid,displayName:"Patient registration",patientUuid:f.fhirPatient.id,dependencies:[]})];case 1:return d.sent(),[2,null]}}))})),function(t,e,n,r,o,i,a,u,s){return p.apply(this,arguments)}),v.savePatientFormOnline=function(){var t=s((function(t,e,n,r,o,a,u,c,l,f,d){var p,y,b;return h(this,(function(d){switch(d.label){case 0:return[4,v.savePatientIdentifiers(t,e.patientUuid,e.identifiers,u,a)];case 1:return p=d.sent(),y=v.getPatientToCreate(t,e,n,r,p),v.getDeletedNames(e.patientUuid,n).forEach(function(){var t=s((function(t){return h(this,(function(e){switch(e.label){case 0:return[4,(0,i.uO)(t.nameUuid,t.personUuid)];case 1:return e.sent(),[2]}}))}));return function(e){return t.apply(this,arguments)}}()),[4,(0,i.co)(y,t&&!f.patientSaved?void 0:e.patientUuid)];case 2:return(b=d.sent()).ok?(f.patientSaved=!0,[4,v.saveRelationships(e.relationships,b)]):[3,6];case 3:return d.sent(),[4,v.saveObservations(e.obs,b,a,c,l)];case 4:return d.sent(),l.concepts.patientPhotoUuid&&(null==o?void 0:o.imageData)?[4,(0,i.oV)(b.data.uuid,o.imageData,"/ws/rest/v1/obs",o.dateTime||(new Date).toISOString(),l.concepts.patientPhotoUuid)]:[3,6];case 5:d.sent(),d.label=6;case 6:return[2,b.data.uuid]}}))}));return function(e,n,r,o,i,a,u,s,c,l,f){return t.apply(this,arguments)}}();var y=function t(){c(this,t),this.patientSaved=!1}},7117:(t,e,n)=>{"use strict";n.d(e,{M1:()=>d,M8:()=>Z,Uu:()=>w,ZB:()=>E,bL:()=>v,co:()=>f,eb:()=>T,f$:()=>x,fX:()=>p,kE:()=>b,nI:()=>O,oV:()=>g,r6:()=>y,uO:()=>h});var r=n(268),o=n(3255),i=n(2303),a=n(906);function u(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){u(i,r,o,a,s,"next",t)}function s(t){u(i,r,o,a,s,"throw",t)}a(void 0)}))}}var c=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};function l(t){for(var e=atob(t.split(",")[1]),n=t.split(",")[0].split(":")[1].split(";")[0],r=new Uint8Array(e.length),o=0;o<e.length;o++)r[o]=e.charCodeAt(o);var i=new Blob([r],{type:n});return new File([i],"patient-photo.png")}function f(t,e){var n=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(e||""),{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:n.signal})}function d(t){var e=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/encounter",{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function p(t){var e=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/idgen/identifiersource/".concat(t,"/identifier"),{headers:{"Content-Type":"application/json"},method:"POST",body:{},signal:e.signal})}function h(t,e){var n=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/person/".concat(e,"/name/").concat(t),{method:"DELETE",signal:n.signal})}function v(t){var e=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/relationship",{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function y(t,e){var n=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/relationship/".concat(t),{headers:{"Content-Type":"application/json"},method:"POST",body:{relationshipType:e.relationshipType},signal:n.signal})}function b(t){var e=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/relationship/".concat(t),{headers:{"Content-Type":"application/json"},method:"DELETE",signal:e.signal})}function g(t,e,n,r,o){return m.apply(this,arguments)}function m(){return(m=s((function(t,e,n,r,o){var i,u;return c(this,(function(s){return i=new AbortController,(u=new FormData).append("patient",t),u.append("file",l(e)),u.append("json",JSON.stringify({person:t,concept:o,groupMembers:[],obsDatetime:r})),[2,(0,a.openmrsFetch)(n,{method:"POST",signal:i.signal,body:u})]}))}))).apply(this,arguments)}function w(t){var e,n,r,i=(0,a.useConfig)().concepts.patientPhotoUuid,u="/ws/rest/v1/obs?patient=".concat(t,"&concept=").concat(i,"&v=full"),s=(0,o.ZP)(t?u:null,a.openmrsFetch),c=s.data,l=s.error,f=s.isLoading,d=null==c||null===(e=c.data)||void 0===e?void 0:e.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:l,isLoading:f}}function Z(t){return _.apply(this,arguments)}function _(){return(_=s((function(t){var e;return c(this,(function(n){return e=new AbortController,[2,(0,a.openmrsFetch)("/ws/rest/v1/person?q=".concat(t),{signal:e.signal})]}))}))).apply(this,arguments)}function T(t,e){return j.apply(this,arguments)}function j(){return(j=s((function(t,e){var n;return c(this,(function(r){return n=new AbortController,[2,(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(t,"/identifier/"),{method:"POST",headers:{"Content-Type":"application/json"},signal:n.signal,body:e})]}))}))).apply(this,arguments)}function O(t,e,n){return S.apply(this,arguments)}function S(){return(S=s((function(t,e,n){var r;return c(this,(function(o){return r=new AbortController,[2,(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(t,"/identifier/").concat(e),{method:"POST",headers:{"Content-Type":"application/json"},signal:r.signal,body:{identifier:n}})]}))}))).apply(this,arguments)}function E(t,e){return A.apply(this,arguments)}function A(){return(A=s((function(t,e){var n;return c(this,(function(r){return n=new AbortController,[2,(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(t,"/identifier/").concat(e,"?purge"),{method:"DELETE",headers:{"Content-Type":"application/json"},signal:n.signal})]}))}))).apply(this,arguments)}function x(t,e){var n,o=(0,i.Z)(t?"/module/addresshierarchy/ajax/getPossibleFullAddresses.form?separator=".concat(e,"&searchString=").concat(t):null,a.openmrsFetch),u=o.data,s=o.error,c=o.isLoading,l=(0,r.useMemo)((function(){var t;return{addresses:null!==(n=null==u||null===(t=u.data)||void 0===t?void 0:t.map((function(t){return t.address})))&&void 0!==n?n:[],error:s,isLoading:c}}),[null==u?void 0:u.data,s,c]);return l}},452:(t,e,n)=>{"use strict";var r=n(268),o="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},i=r.useState,a=r.useEffect,u=r.useLayoutEffect,s=r.useDebugValue;function c(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!o(t,n)}catch(t){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var n=e(),r=i({inst:{value:n,getSnapshot:e}}),o=r[0].inst,l=r[1];return u((function(){o.value=n,o.getSnapshot=e,c(o)&&l({inst:o})}),[t,n,e]),a((function(){return c(o)&&l({inst:o}),t((function(){c(o)&&l({inst:o})}))}),[t]),s(n),n};e.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},3100:(t,e,n)=>{"use strict";t.exports=n(452)},3979:(t,e,n)=>{var r={"./en.json":[3574,574],"./fr.json":[2757,757],"./km.json":[7807,807]};function o(t){if(!n.o(r,t))return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=r[t],o=e[0];return n.e(e[1]).then((()=>n(o)))}o.keys=()=>Object.keys(r),o.id=3979,t.exports=o},6300:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(8804);const o=function(t,e){for(var n=t.length;n--;)if((0,r.Z)(t[n][0],e))return n;return-1};var i=Array.prototype.splice;function a(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(t){var e=this.__data__,n=o(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))},a.prototype.get=function(t){var e=this.__data__,n=o(e,t);return n<0?void 0:e[n][1]},a.prototype.has=function(t){return o(this.__data__,t)>-1},a.prototype.set=function(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};const u=a},8896:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(2411),o=n(3221);const i=(0,r.Z)(o.Z,"Map")},3549:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});const r=(0,n(2411).Z)(Object,"create");var o=Object.prototype.hasOwnProperty;var i=Object.prototype.hasOwnProperty;function a(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=r?r(null):{},this.size=0},a.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},a.prototype.get=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0},a.prototype.has=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)},a.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this};const u=a;var s=n(6300),c=n(8896);const l=function(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map};function f(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}f.prototype.clear=function(){this.size=0,this.__data__={hash:new u,map:new(c.Z||s.Z),string:new u}},f.prototype.delete=function(t){var e=l(this,t).delete(t);return this.size-=e?1:0,e},f.prototype.get=function(t){return l(this,t).get(t)},f.prototype.has=function(t){return l(this,t).has(t)},f.prototype.set=function(t,e){var n=l(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};const d=f},3761:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(6300);var o=n(8896),i=n(3549);function a(t){var e=this.__data__=new r.Z(t);this.size=e.size}a.prototype.clear=function(){this.__data__=new r.Z,this.size=0},a.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},a.prototype.get=function(t){return this.__data__.get(t)},a.prototype.has=function(t){return this.__data__.has(t)},a.prototype.set=function(t,e){var n=this.__data__;if(n instanceof r.Z){var a=n.__data__;if(!o.Z||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i.Z(a)}return n.set(t,e),this.size=n.size,this};const u=a},187:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=n(3221).Z.Symbol},8282:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=n(3221).Z.Uint8Array},7178:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(4405),o=n(7885),i=n(2143),a=n(6401),u=n(8532),s=Object.prototype.hasOwnProperty;const c=function(t,e){var n=(0,o.Z)(t),c=!n&&(0,r.Z)(t),l=!n&&!c&&(0,i.Z)(t),f=!n&&!c&&!l&&(0,u.Z)(t),d=n||c||l||f,p=d?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],h=p.length;for(var v in t)!e&&!s.call(t,v)||d&&("length"==v||l&&("offset"==v||"parent"==v)||f&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||(0,a.Z)(v,h))||p.push(v);return p}},5598:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},5810:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}},2938:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(5810),o=n(7885);const i=function(t,e,n){var i=e(t);return(0,o.Z)(t)?i:(0,r.Z)(i,n(t))}},8147:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var r=n(187),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r.Z?r.Z.toStringTag:void 0;var s=Object.prototype.toString;var c=r.Z?r.Z.toStringTag:void 0;const l=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":c&&c in Object(t)?function(t){var e=i.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[u]=n:delete t[u]),o}(t):function(t){return s.call(t)}(t)}},5745:(t,e,n)=>{"use strict";n.d(e,{Z:()=>B});var r=n(3761),o=n(3549);function i(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new o.Z;++e<n;)this.add(t[e])}i.prototype.add=i.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},i.prototype.has=function(t){return this.__data__.has(t)};const a=i,u=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},s=function(t,e,n,r,o,i){var s=1&n,c=t.length,l=e.length;if(c!=l&&!(s&&l>c))return!1;var f=i.get(t),d=i.get(e);if(f&&d)return f==e&&d==t;var p=-1,h=!0,v=2&n?new a:void 0;for(i.set(t,e),i.set(e,t);++p<c;){var y=t[p],b=e[p];if(r)var g=s?r(b,y,p,e,t,i):r(y,b,p,t,e,i);if(void 0!==g){if(g)continue;h=!1;break}if(v){if(!u(e,(function(t,e){if(a=e,!v.has(a)&&(y===t||o(y,t,n,r,i)))return v.push(e);var a}))){h=!1;break}}else if(y!==b&&!o(y,b,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h};var c=n(187),l=n(8282),f=n(8804),d=n(5500),p=n(3249),h=c.Z?c.Z.prototype:void 0,v=h?h.valueOf:void 0;var y=n(7245),b=Object.prototype.hasOwnProperty;var g=n(4558),m=n(7885),w=n(2143),Z=n(8532),_="[object Arguments]",T="[object Array]",j="[object Object]",O=Object.prototype.hasOwnProperty;const S=function(t,e,n,o,i,a){var u=(0,m.Z)(t),c=(0,m.Z)(e),h=u?T:(0,g.Z)(t),S=c?T:(0,g.Z)(e),E=(h=h==_?j:h)==j,A=(S=S==_?j:S)==j,x=h==S;if(x&&(0,w.Z)(t)){if(!(0,w.Z)(e))return!1;u=!0,E=!1}if(x&&!E)return a||(a=new r.Z),u||(0,Z.Z)(t)?s(t,e,n,o,i,a):function(t,e,n,r,o,i,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new l.Z(t),new l.Z(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,f.Z)(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var u=d.Z;case"[object Set]":var c=1&r;if(u||(u=p.Z),t.size!=e.size&&!c)return!1;var h=a.get(t);if(h)return h==e;r|=2,a.set(t,e);var y=s(u(t),u(e),r,o,i,a);return a.delete(t),y;case"[object Symbol]":if(v)return v.call(t)==v.call(e)}return!1}(t,e,h,n,o,i,a);if(!(1&n)){var P=E&&O.call(t,"__wrapped__"),D=A&&O.call(e,"__wrapped__");if(P||D){var k=P?t.value():t,C=D?e.value():e;return a||(a=new r.Z),i(k,C,n,o,a)}}return!!x&&(a||(a=new r.Z),function(t,e,n,r,o,i){var a=1&n,u=(0,y.Z)(t),s=u.length;if(s!=(0,y.Z)(e).length&&!a)return!1;for(var c=s;c--;){var l=u[c];if(!(a?l in e:b.call(e,l)))return!1}var f=i.get(t),d=i.get(e);if(f&&d)return f==e&&d==t;var p=!0;i.set(t,e),i.set(e,t);for(var h=a;++c<s;){var v=t[l=u[c]],g=e[l];if(r)var m=a?r(g,v,l,e,t,i):r(v,g,l,t,e,i);if(!(void 0===m?v===g||o(v,g,n,r,i):m)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var w=t.constructor,Z=e.constructor;w==Z||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&w instanceof w&&"function"==typeof Z&&Z instanceof Z||(p=!1)}return i.delete(t),i.delete(e),p}(t,e,n,o,i,a))};var E=n(3391);const A=function t(e,n,r,o,i){return e===n||(null==e||null==n||!(0,E.Z)(e)&&!(0,E.Z)(n)?e!=e&&n!=n:S(e,n,r,o,t,i))};var x=n(3122);const P=function(t){return t==t&&!(0,x.Z)(t)};var D=n(6623);const k=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}},C=function(t){var e=function(t){for(var e=(0,D.Z)(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,P(o)]}return e}(t);return 1==e.length&&e[0][2]?k(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,o){var i=n.length,a=i,u=!o;if(null==t)return!a;for(t=Object(t);i--;){var s=n[i];if(u&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){var c=(s=n[i])[0],l=t[c],f=s[1];if(u&&s[2]){if(void 0===l&&!(c in t))return!1}else{var d=new r.Z;if(o)var p=o(l,f,c,t,e,d);if(!(void 0===p?A(f,l,3,o,d):p))return!1}}return!0}(n,t,e)}};var U=n(2082),I=n(7969);const N=function(t,e){for(var n=0,r=(e=(0,U.Z)(e,t)).length;null!=t&&n<r;)t=t[(0,I.Z)(e[n++])];return n&&n==r?t:void 0},L=function(t,e){return null!=t&&e in Object(t)};var F=n(8693);var R=n(3502);const M=function(t,e){return(0,R.Z)(t)&&P(e)?k((0,I.Z)(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:N(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?function(t,e){return null!=t&&(0,F.Z)(t,e,L)}(n,t):A(e,r,3)}},V=function(t){return t},z=function(t){return(0,R.Z)(t)?(e=(0,I.Z)(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return N(e,t)}}(t);var e},B=function(t){return"function"==typeof t?t:null==t?V:"object"==typeof t?(0,m.Z)(t)?M(t[0],t[1]):C(t):z(t)}},3225:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){return function(e){return t(e)}}},2082:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(7885),o=n(3502),i=n(1354),a=n(63);const u=function(t,e){return(0,r.Z)(t)?t:(0,o.Z)(t,e)?[t]:(0,i.Z)((0,a.Z)(t))}},6994:(t,e,n)=>{"use strict";n.d(e,{Z:()=>D});const r=(o={À:"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(t){return null==o?void 0:o[t]});var o,i=n(63),a=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,u=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var s=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var c=/[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+"]",h="\\d+",v="["+l+"]",y="[^\\ud800-\\udfff"+d+h+"\\u2700-\\u27bf"+l+f+"]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",m="["+f+"]",w="(?:"+v+"|"+y+")",Z="(?:"+m+"|"+y+")",_="(?:['’](?:d|ll|m|re|s|t|ve))?",T="(?:['’](?:D|LL|M|RE|S|T|VE))?",j="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",O="[\\ufe0e\\ufe0f]?",S=O+j+"(?:\\u200d(?:"+["[^\\ud800-\\udfff]",b,g].join("|")+")"+O+j+")*",E="(?:"+["[\\u2700-\\u27bf]",b,g].join("|")+")"+S,A=RegExp([m+"?"+v+"+"+_+"(?="+[p,m,"$"].join("|")+")",Z+"+"+T+"(?="+[p,m+w,"$"].join("|")+")",m+"?"+w+"+"+_,m+"+"+T,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",h,E].join("|"),"g");const x=function(t,e,n){return t=(0,i.Z)(t),void 0===(e=n?void 0:e)?function(t){return c.test(t)}(t)?function(t){return t.match(A)||[]}(t):function(t){return t.match(s)||[]}(t):t.match(e)||[]};var P=RegExp("['’]","g");const D=function(t){return function(e){return function(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}(x(function(t){return(t=(0,i.Z)(t))&&t.replace(a,r).replace(u,"")}(e).replace(P,"")),t,"")}}},2168:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r="object"==typeof global&&global&&global.Object===Object&&global},7245:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(2938),o=n(9582),i=n(6623);const a=function(t){return(0,r.Z)(t,i.Z,o.Z)}},2411:(t,e,n)=>{"use strict";n.d(e,{Z:()=>y});var r=n(8936);const o=n(3221).Z["__core-js_shared__"];var i,a=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";var u=n(3122),s=n(6682),c=/^\[object .+?Constructor\]$/,l=Function.prototype,f=Object.prototype,d=l.toString,p=f.hasOwnProperty,h=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const v=function(t){return!(!(0,u.Z)(t)||(e=t,a&&a in e))&&((0,r.Z)(t)?h:c).test((0,s.Z)(t));var e},y=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return v(n)?n:void 0}},9582:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(813),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols;const a=i?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i}(i(t),(function(e){return o.call(t,e)})))}:r.Z},4558:(t,e,n)=>{"use strict";n.d(e,{Z:()=>T});var r=n(2411),o=n(3221);const i=(0,r.Z)(o.Z,"DataView");var a=n(8896);const u=(0,r.Z)(o.Z,"Promise"),s=(0,r.Z)(o.Z,"Set"),c=(0,r.Z)(o.Z,"WeakMap");var l=n(8147),f=n(6682),d="[object Map]",p="[object Promise]",h="[object Set]",v="[object WeakMap]",y="[object DataView]",b=(0,f.Z)(i),g=(0,f.Z)(a.Z),m=(0,f.Z)(u),w=(0,f.Z)(s),Z=(0,f.Z)(c),_=l.Z;(i&&_(new i(new ArrayBuffer(1)))!=y||a.Z&&_(new a.Z)!=d||u&&_(u.resolve())!=p||s&&_(new s)!=h||c&&_(new c)!=v)&&(_=function(t){var e=(0,l.Z)(t),n="[object Object]"==e?t.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 h;case Z:return v}return e});const T=_},8693:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(2082),o=n(4405),i=n(7885),a=n(6401),u=n(1164),s=n(7969);const c=function(t,e,n){for(var c=-1,l=(e=(0,r.Z)(e,t)).length,f=!1;++c<l;){var d=(0,s.Z)(e[c]);if(!(f=null!=t&&n(t,d)))break;t=t[d]}return f||++c!=l?f:!!(l=null==t?0:t.length)&&(0,u.Z)(l)&&(0,a.Z)(d,l)&&((0,i.Z)(t)||(0,o.Z)(t))}},2690:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const o=function(t){return r.test(t)}},6401:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=/^(?:0|[1-9]\d*)$/;const o=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&t<e}},3502:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(7885),o=n(2758),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;const u=function(t,e){if((0,r.Z)(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!(0,o.Z)(t))||a.test(t)||!i.test(t)||null!=e&&t in Object(e)}},5441:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=Object.prototype;const o=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},5500:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},7755:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(2168),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o&&r.Z.process;const u=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}()},6048:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t,e){return function(n){return t(e(n))}}},3221:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(2168),o="object"==typeof self&&self&&self.Object===Object&&self;const i=r.Z||o||Function("return this")()},3249:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},6202:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var r=n(2690),o="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",a="[^\\ud800-\\udfff]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+o+"|"+i+")?",l="[\\ufe0e\\ufe0f]?",f=l+c+"(?:\\u200d(?:"+[a,u,s].join("|")+")"+l+c+")*",d="(?:"+[a+o+"?",o,u,s,"[\\ud800-\\udfff]"].join("|")+")",p=RegExp(i+"(?="+i+")|"+d+f,"g");const h=function(t){return(0,r.Z)(t)?function(t){return t.match(p)||[]}(t):function(t){return t.split("")}(t)}},1354:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(3549);function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r.Z),n}o.Cache=r.Z;var i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g;const u=(s=o((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,o){e.push(r?o.replace(a,"$1"):n||t)})),e}),(function(t){return 500===c.size&&c.clear(),t})),c=s.cache,s);var s,c},7969:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(2758);const o=function(t){if("string"==typeof t||(0,r.Z)(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},6682:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=Function.prototype.toString;const o=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},2777:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(1140);const o=(0,n(6994).Z)((function(t,e,n){return e=e.toLowerCase(),t+(n?(0,r.Z)(e):e)}))},1140:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(63);const o=function(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:function(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(o);++r<o;)i[r]=t[r+e];return i}(t,e,n)};var i=n(2690),a=n(6202);const u=function(t){t=(0,r.Z)(t);var e=(0,i.Z)(t)?(0,a.Z)(t):void 0,n=e?e[0]:t.charAt(0),u=e?o(e,1).join(""):t.slice(1);return n.toUpperCase()+u},s=function(t){return u((0,r.Z)(t).toLowerCase())}},8804:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t,e){return t===e||t!=t&&e!=e}},8407:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(63),o=/[\\^$.*+?()[\]{}|]/g,i=RegExp(o.source);const a=function(t){return(t=(0,r.Z)(t))&&i.test(t)?t.replace(o,"\\$&"):t}},286:(t,e,n)=>{"use strict";n.d(e,{Z:()=>b});var r=n(5745),o=n(3282),i=n(6623);var a=/\s/;var u=/^\s+/;const s=function(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&a.test(t.charAt(e)););return e}(t)+1).replace(u,""):t};var c=n(3122),l=n(2758),f=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,p=/^0o[0-7]+$/i,h=parseInt;const v=function(t){return t?Infinity===(t=function(t){if("number"==typeof t)return t;if((0,l.Z)(t))return NaN;if((0,c.Z)(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=(0,c.Z)(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=s(t);var n=d.test(t);return n||p.test(t)?h(t.slice(2),n?2:8):f.test(t)?NaN:+t}(t))||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0};var y=Math.max;const b=(g=function(t,e,n){var o=null==t?0:t.length;if(!o)return-1;var i,a,u=null==n?0:(i=v(n),a=i%1,i==i?a?i-a:i:0);return u<0&&(u=y(o+u,0)),function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}(t,(0,r.Z)(e,3),u)},function(t,e,n){var a=Object(t);if(!(0,o.Z)(t)){var u=(0,r.Z)(e,3);t=(0,i.Z)(t),e=function(t){return u(a[t],t,a)}}var s=g(t,e,n);return s>-1?a[u?t[s]:s]:void 0});var g},4405:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(8147),o=n(3391);const i=function(t){return(0,o.Z)(t)&&"[object Arguments]"==(0,r.Z)(t)};var a=Object.prototype,u=a.hasOwnProperty,s=a.propertyIsEnumerable;const c=i(function(){return arguments}())?i:function(t){return(0,o.Z)(t)&&u.call(t,"callee")&&!s.call(t,"callee")}},7885:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=Array.isArray},3282:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(8936),o=n(1164);const i=function(t){return null!=t&&(0,o.Z)(t.length)&&!(0,r.Z)(t)}},2143:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(3221);var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o?r.Z.Buffer:void 0;const u=(a?a.isBuffer:void 0)||function(){return!1}},8936:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(8147),o=n(3122);const i=function(t){if(!(0,o.Z)(t))return!1;var e=(0,r.Z)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1164:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3122:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},3391:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){return null!=t&&"object"==typeof t}},2758:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(8147),o=n(3391);const i=function(t){return"symbol"==typeof t||(0,o.Z)(t)&&"[object Symbol]"==(0,r.Z)(t)}},8532:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var r=n(8147),o=n(1164),i=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),s=n(7755),c=s.Z&&s.Z.isTypedArray;const l=c?(0,u.Z)(c):function(t){return(0,i.Z)(t)&&(0,o.Z)(t.length)&&!!a[(0,r.Z)(t)]}},6623:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(7178),o=n(5441);const i=(0,n(6048).Z)(Object.keys,Object);var a=Object.prototype.hasOwnProperty;var u=n(3282);const s=function(t){return(0,u.Z)(t)?(0,r.Z)(t):function(t){if(!(0,o.Z)(t))return i(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}},813:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(){return[]}},63:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var r=n(187),o=n(5598),i=n(7885),a=n(2758),u=r.Z?r.Z.prototype:void 0,s=u?u.toString:void 0;const c=function t(e){if("string"==typeof e)return e;if((0,i.Z)(e))return(0,o.Z)(e,t)+"";if((0,a.Z)(e))return s?s.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n},l=function(t){return null==t?"":c(t)}},4729:(t,e,n)=>{"use strict";n.d(e,{$l:()=>s,BN:()=>U,DY:()=>o,J$:()=>z,JN:()=>v,LI:()=>E,PM:()=>f,W6:()=>O,i_:()=>u,ko:()=>J,kw:()=>S,mf:()=>l,o8:()=>c,qC:()=>P,s6:()=>G,sj:()=>C,u3:()=>k,u_:()=>R,w6:()=>j,xD:()=>H});var r=n(268);const o=new WeakMap,i={},a=()=>{},u=a(),s=Object,c=t=>t===u,l=t=>"function"==typeof t,f=(t,e)=>({...t,...e}),d="undefined",p=typeof window!=d,h=typeof document!=d,v=(t,e)=>{const n=o.get(t);return[()=>t.get(e)||i,r=>{const o=t.get(e);n[5](e,f(o,r),o||i)},n[6]]},y=new WeakMap;let b=0;const g=t=>{const e=typeof t,n=t&&t.constructor,r=n==Date;let o,i;if(s(t)!==t||r||n==RegExp)o=r?t.toJSON():"symbol"==e?t.toString():"string"==e?JSON.stringify(t):""+t;else{if(o=y.get(t),o)return o;if(o=++b+"~",y.set(t,o),n==Array){for(o="@",i=0;i<t.length;i++)o+=g(t[i])+",";y.set(t,o)}if(n==s){o="#";const e=s.keys(t).sort();for(;!c(i=e.pop());)c(t[i])||(o+=i+":"+g(t[i])+",");y.set(t,o)}}return o};let m=!0;const[w,Z]=p&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[a,a],_={isOnline:()=>m,isVisible:()=>{const t=h&&document.visibilityState;return c(t)||"hidden"!==t}},T={initFocus:t=>(h&&document.addEventListener("visibilitychange",t),w("focus",t),()=>{h&&document.removeEventListener("visibilitychange",t),Z("focus",t)}),initReconnect:t=>{const e=()=>{m=!0,t()},n=()=>{m=!1};return w("online",e),w("offline",n),()=>{Z("online",e),Z("offline",n)}}},j=!r.useId,O=!p||"Deno"in window,S=t=>p&&typeof window.requestAnimationFrame!=d?window.requestAnimationFrame(t):setTimeout(t,1),E=O?r.useEffect:r.useLayoutEffect,A="undefined"!=typeof navigator&&navigator.connection,x=!O&&A&&(["slow-2g","2g"].includes(A.effectiveType)||A.saveData),P=t=>{if(l(t))try{t=t()}catch(e){t=""}const e=t;return[t="string"==typeof t?t:(Array.isArray(t)?t.length:t)?g(t):"",e]};let D=0;const k=()=>++D;var C={__proto__:null,FOCUS_EVENT:0,RECONNECT_EVENT:1,MUTATE_EVENT:2};async function U(...t){const[e,n,r,i]=t,a=f({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{});let s=a.populateCache;const d=a.rollbackOnError;let p=a.optimisticData;const h=!1!==a.revalidate,y=a.throwOnError;if(l(n)){const t=n,r=[],o=e.keys();for(let n=o.next();!n.done;n=o.next()){const o=n.value;!o.startsWith("$inf$")&&t(e.get(o)._k)&&r.push(o)}return Promise.all(r.map(b))}return b(n);async function b(n){const[i]=P(n);if(!i)return;const[a,f]=v(e,i),[b,g,m]=o.get(e),w=b[i],Z=()=>h&&(delete m[i],w&&w[0])?w[0](2).then((()=>a().data)):a().data;if(t.length<3)return Z();let _,T=r;const j=k();g[i]=[j,0];const O=!c(p),S=a(),E=S.data,A=S._c,x=c(A)?E:A;if(O&&(p=l(p)?p(x):p,f({data:p,_c:x})),l(T))try{T=T(x)}catch(t){_=t}if(T&&l(T.then)){if(T=await T.catch((t=>{_=t})),j!==g[i][0]){if(_)throw _;return T}_&&O&&(t=>"function"==typeof d?d(t):!1!==d)(_)&&(s=!0,T=x,f({data:T,_c:u}))}s&&(_||(l(s)&&(T=s(T,x)),f({data:T,_c:u}))),g[i][1]=k();const D=await Z();if(f({_c:u}),!_)return s?D:T;if(y)throw _}}const I=(t,e)=>{for(const n in t)t[n][0]&&t[n][0](e)},N=(t,e)=>{if(!o.has(t)){const n=f(T,e),r={},i=U.bind(u,t);let s=a;const c={},l=(t,e)=>{const n=c[t]||[];return c[t]=n,n.push(e),()=>n.splice(n.indexOf(e),1)},d=(e,n,r)=>{t.set(e,n);const o=c[e];if(o)for(let t=o.length;t--;)o[t](r,n)},p=()=>{if(!o.has(t)&&(o.set(t,[r,{},{},{},i,d,l]),!O)){const e=n.initFocus(setTimeout.bind(u,I.bind(u,r,0))),i=n.initReconnect(setTimeout.bind(u,I.bind(u,r,1)));s=()=>{e&&e(),i&&i(),o.delete(t)}}};return p(),[t,i,p,s]}return[t,o.get(t)[4]]},[L,F]=N(new Map),R=f({onLoadingSlow:a,onSuccess:a,onError:a,onErrorRetry:(t,e,n,r,o)=>{const i=n.errorRetryCount,a=o.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!c(i)&&a>i||setTimeout(r,u,o)},onDiscarded:a,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:x?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:x?5e3:3e3,compare:(t,e)=>g(t)==g(e),isPaused:()=>!1,cache:L,mutate:F,fallback:{}},_),M=(t,e)=>{const n=f(t,e);if(e){const{use:r,fallback:o}=t,{use:i,fallback:a}=e;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=f(o,a))}return n},V=(0,r.createContext)({}),z=t=>{const{value:e}=t,n=(0,r.useContext)(V),o=l(e),i=(0,r.useMemo)((()=>o?e(n):e),[o,n,e]),a=(0,r.useMemo)((()=>o?i:M(n,i)),[o,n,i]),s=i&&i.provider,[c]=(0,r.useState)((()=>s?N(s(a.cache||L),i):u));return c&&(a.cache=c[0],a.mutate=c[1]),E((()=>{if(c)return c[2]&&c[2](),c[3]}),[]),(0,r.createElement)(V.Provider,f(t,{value:a}))},B=p&&window.__SWR_DEVTOOLS_USE__,$=B?window.__SWR_DEVTOOLS_USE__:[],q=t=>l(t[1])?[t[0],t[1],t[2]||{}]:[t[0],null,(null===t[1]?t[2]:t[1])||{}],W=$.concat((t=>(e,n,r)=>t(e,n&&((...t)=>{const r=P(e)[0],[,,,i]=o.get(L),a=i[r];return a?(delete i[r],a):n(...t)}),r))),G=t=>function(...e){const n=f(R,(0,r.useContext)(V)),[o,i,a]=q(e),u=M(n,a);let s=t;const{use:c}=u,l=(c||[]).concat(W);for(let t=l.length;t--;)s=l[t](s);return s(o,i||u.fetcher||null,u)},J=(t,e,n)=>{const r=e[t]||(e[t]=[]);return r.push(n),()=>{const t=r.indexOf(n);t>=0&&(r[t]=r[r.length-1],r.pop())}},H=(t,e)=>(...n)=>{const[r,o,i]=q(n),a=(i.use||[]).concat(e);return t(r,o,{...i,use:a})};B&&(window.__SWR_DEVTOOLS_REACT__=r)},3255:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>u});var r=n(268),o=n(3100),i=n(4729);const a={dedupe:!0};i.$l.defineProperty(i.J$,"defaultValue",{value:i.u_});var u=(0,i.s6)(((t,e,n)=>{const{cache:u,compare:s,suspense:c,fallbackData:l,revalidateOnMount:f,refreshInterval:d,refreshWhenHidden:p,refreshWhenOffline:h,keepPreviousData:v}=n,[y,b,g]=i.DY.get(u),[m,w]=(0,i.qC)(t),Z=(0,r.useRef)(!1),_=(0,r.useRef)(!1),T=(0,r.useRef)(m),j=(0,r.useRef)(e),O=(0,r.useRef)(n),S=()=>O.current,E=()=>S().isVisible()&&S().isOnline(),[A,x,P]=(0,i.JN)(u,m),D=(0,r.useRef)({}).current,k=(0,i.o8)(l)?n.fallback[m]:l,C=(t,e)=>{let n=!0;for(const r in D){const o=r;s(e[o],t[o])||"data"===o&&(0,i.o8)(t[o])&&s(e[o],V)||(n=!1)}return n},U=(0,r.useMemo)((()=>{const t=!!m&&!!e&&((0,i.o8)(f)?!S().isPaused()&&!c:f),n=()=>{const e=A(),n=(0,i.PM)(e);return delete n._k,t?{isValidating:!0,isLoading:!0,...n}:n};let r=n();return()=>{const t=n();return C(t,r)?r:r=t}}),[u,m]),I=(0,o.useSyncExternalStore)((0,r.useCallback)((t=>P(m,((e,n)=>{C(e,n)||t()}))),[u,m]),U,U),N=!Z.current,L=I.data,F=(0,i.o8)(L)?k:L,R=I.error,M=(0,r.useRef)(F),V=v?(0,i.o8)(L)?M.current:L:F,z=N&&!(0,i.o8)(f)?f:!S().isPaused()&&(c?!(0,i.o8)(F)&&n.revalidateIfStale:(0,i.o8)(F)||n.revalidateIfStale),B=!!(m&&e&&N&&z),$=(0,i.o8)(I.isValidating)?B:I.isValidating,q=(0,i.o8)(I.isLoading)?B:I.isLoading,W=(0,r.useCallback)((async t=>{const e=j.current;if(!m||!e||_.current||S().isPaused())return!1;let r,o,a=!0;const u=t||{},c=!g[m]||!u.dedupe,l=()=>i.w6?!_.current&&m===T.current&&Z.current:m===T.current,f={isValidating:!1,isLoading:!1},d=()=>{x(f)},p=()=>{const t=g[m];t&&t[1]===o&&delete g[m]},h={isValidating:!0};(0,i.o8)(A().data)&&(h.isLoading=!0);try{if(c&&(x(h),n.loadingTimeout&&(0,i.o8)(A().data)&&setTimeout((()=>{a&&l()&&S().onLoadingSlow(m,n)}),n.loadingTimeout),g[m]=[e(w),(0,i.u3)()]),[r,o]=g[m],r=await r,c&&setTimeout(p,n.dedupingInterval),!g[m]||g[m][1]!==o)return c&&l()&&S().onDiscarded(m),!1;f.error=i.i_;const t=b[m];if(!(0,i.o8)(t)&&(o<=t[0]||o<=t[1]||0===t[1]))return d(),c&&l()&&S().onDiscarded(m),!1;const u=A().data;f.data=s(u,r)?u:r,c&&l()&&S().onSuccess(r,m,n)}catch(t){p();const e=S(),{shouldRetryOnError:n}=e;e.isPaused()||(f.error=t,c&&l()&&(e.onError(t,m,e),(!0===n||(0,i.mf)(n)&&n(t))&&E()&&e.onErrorRetry(t,m,e,W,{retryCount:(u.retryCount||0)+1,dedupe:!0})))}return a=!1,d(),!0}),[m,u]),G=(0,r.useCallback)(((...t)=>(0,i.BN)(u,T.current,...t)),[]);if((0,i.LI)((()=>{j.current=e,O.current=n,(0,i.o8)(L)||(M.current=L)})),(0,i.LI)((()=>{if(!m)return;const t=W.bind(i.i_,a);let e=0;const n=(0,i.ko)(m,y,(n=>{if(n==i.sj.FOCUS_EVENT){const n=Date.now();S().revalidateOnFocus&&n>e&&E()&&(e=n+S().focusThrottleInterval,t())}else if(n==i.sj.RECONNECT_EVENT)S().revalidateOnReconnect&&E()&&t();else if(n==i.sj.MUTATE_EVENT)return W()}));return _.current=!1,T.current=m,Z.current=!0,x({_k:w}),z&&((0,i.o8)(F)||i.W6?t():(0,i.kw)(t)),()=>{_.current=!0,n()}}),[m]),(0,i.LI)((()=>{let t;function e(){const e=(0,i.mf)(d)?d(F):d;e&&-1!==t&&(t=setTimeout(n,e))}function n(){A().error||!p&&!S().isVisible()||!h&&!S().isOnline()?e():W(a).then(e)}return e(),()=>{t&&(clearTimeout(t),t=-1)}}),[d,p,h,m]),(0,r.useDebugValue)(V),c&&(0,i.o8)(F)&&m){if(!i.w6&&i.W6)throw new Error("Fallback data is required when using suspense in SSR.");throw j.current=e,O.current=n,_.current=!1,(0,i.o8)(R)?W(a):R}return{mutate:G,get data(){return D.data=!0,V},get error(){return D.error=!0,R},get isValidating(){return D.isValidating=!0,$},get isLoading(){return D.isLoading=!0,q}}}))},2303:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(3255),o=(0,n(4729).xD)(r.ZP,(t=>(e,n,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,t(e,n,r))))}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={id:t,loaded:!1,exports:{}};return n[t](i,i.exports,o),i.loaded=!0,i.exports}o.m=n,o.c=r,o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce(((e,n)=>(o.f[n](t,e),e)),[])),o.u=t=>t+".js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="@kenyaemr/esm-patient-registration-app:",o.l=(n,r,i,a)=>{if(t[n])t[n].push(r);else{var u,s;if(void 0!==i)for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++){var f=c[l];if(f.getAttribute("src")==n||f.getAttribute("data-webpack")==e+i){u=f;break}}u||(s=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,o.nc&&u.setAttribute("nonce",o.nc),u.setAttribute("data-webpack",e+i),u.src=n),t[n]=[r];var d=(e,r)=>{u.onerror=u.onload=null,clearTimeout(p);var o=t[n];if(delete t[n],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach((t=>t(r))),e)return e(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),s&&document.head.appendChild(u)}},o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{o.S={};var t={},e={};o.I=(n,r)=>{r||(r=[]);var i=e[n];if(i||(i=e[n]={}),!(r.indexOf(i)>=0)){if(r.push(i),t[n])return t[n];o.o(o.S,n)||(o.S[n]={});var a=o.S[n],u="@kenyaemr/esm-patient-registration-app",s=(t,e,n,r)=>{var o=a[t]=a[t]||{},i=o[e];(!i||!i.loaded&&(!r!=!i.eager?r:u>i.from))&&(o[e]={get:n,from:u,eager:!!r})},c=[];return"default"===n&&(s("@openmrs/esm-framework","4.2.1-pre.619",(()=>Promise.all([o.e(858),o.e(268)]).then((()=>()=>o(6858))))),s("react-i18next","11.18.6",(()=>Promise.all([o.e(62),o.e(268)]).then((()=>()=>o(7884))))),s("react-router-dom","6.4.3",(()=>Promise.all([o.e(591),o.e(268)]).then((()=>()=>o(6591))))),s("react","18.2.0",(()=>o.e(784).then((()=>()=>o(6292)))))),t[n]=c.length?Promise.all(c).then((()=>t[n]=1)):1}}})(),(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),(()=>{var t=t=>{var e=t=>t.split(".").map((t=>+t==t?+t:t)),n=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(t),r=n[1]?e(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,e(n[2]))),n[3]&&(r.push([]),r.push.apply(r,e(n[3]))),r},e=t=>{var n=t[0],r="";if(1===t.length)return"*";if(n+.5){r+=0==n?">=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var o=1,i=1;i<t.length;i++)o--,r+="u"==(typeof(u=t[i]))[0]?"-":(o>0?".":"")+(o=2,u);return r}var a=[];for(i=1;i<t.length;i++){var u=t[i];a.push(0===u?"not("+s()+")":1===u?"("+s()+" || "+s()+")":2===u?a.pop()+" "+a.pop():e(u))}return s();function s(){return a.pop().replace(/^\((.+)\)$/,"$1")}},n=(e,r)=>{if(0 in e){r=t(r);var o=e[0],i=o<0;i&&(o=-o-1);for(var a=0,u=1,s=!0;;u++,a++){var c,l,f=u<e.length?(typeof e[u])[0]:"";if(a>=r.length||"o"==(l=(typeof(c=r[a]))[0]))return!s||("u"==f?u>o&&!i:""==f!=i);if("u"==l){if(!s||"u"!=f)return!1}else if(s)if(f==l)if(u<=o){if(c!=e[u])return!1}else{if(i?c>e[u]:c<e[u])return!1;c!=e[u]&&(s=!1)}else if("s"!=f&&"n"!=f){if(i||u<=o)return!1;s=!1,u--}else{if(u<=o||l<f!=i)return!1;s=!1}else"s"!=f&&"n"!=f&&(s=!1,u--)}}var d=[],p=d.pop.bind(d);for(a=1;a<e.length;a++){var h=e[a];d.push(1==h?p()|p():2==h?p()&p():h?n(h,r):!p())}return!!p()},r=(e,n)=>{var r=e[n];return Object.keys(r).reduce(((e,n)=>!e||!r[e].loaded&&((e,n)=>{e=t(e),n=t(n);for(var r=0;;){if(r>=e.length)return r<n.length&&"u"!=(typeof n[r])[0];var o=e[r],i=(typeof o)[0];if(r>=n.length)return"u"==i;var a=n[r],u=(typeof a)[0];if(i!=u)return"o"==i&&"n"==u||"s"==u||"u"==i;if("o"!=i&&"u"!=i&&o!=a)return o<a;r++}})(e,n)?n:e),0)},i=(t,o,i,u)=>{var s=r(t,i);return n(u,s)||"undefined"!=typeof console&&console.warn&&console.warn(((t,n,r,o)=>"Unsatisfied version "+r+" from "+(r&&t[n][r].from)+" of shared singleton module "+n+" (required "+e(o)+")")(t,i,s,u)),a(t[i][s])},a=t=>(t.loaded=1,t.get()),u=(t=>function(e,n,r,i){var a=o.I(e);return a&&a.then?a.then(t.bind(t,e,o.S[e],n,r,i)):t(e,o.S[e],n,r,i)})(((t,e,n,r,a)=>e&&o.o(e,n)?i(e,0,n,r):a())),s={},c={4924:()=>u("default","react-i18next",[1,11],(()=>o.e(62).then((()=>()=>o(7884))))),8744:()=>u("default","react-router-dom",[1,6],(()=>o.e(591).then((()=>()=>o(6591))))),268:()=>u("default","react",[1,18],(()=>o.e(784).then((()=>()=>o(6292))))),906:()=>u("default","@openmrs/esm-framework",[1,4],(()=>o.e(858).then((()=>()=>o(6858)))))};[906,268].forEach((t=>{o.m[t]=e=>{s[t]=0,delete o.c[t];var n=c[t]();if("function"!=typeof n)throw new Error("Shared module is not available for eager consumption: "+t);e.exports=n()}}));var l={268:[268],698:[8744],924:[4924]};o.f.consumes=(t,e)=>{o.o(l,t)&&l[t].forEach((t=>{if(o.o(s,t))return e.push(s[t]);var n=e=>{s[t]=0,o.m[t]=n=>{delete o.c[t],n.exports=e()}},r=e=>{delete s[t],o.m[t]=n=>{throw delete o.c[t],e}};try{var i=c[t]();i.then?e.push(s[t]=i.then(n).catch(r)):n(i)}catch(t){r(t)}}))}})(),(()=>{var t={179:0,268:0,68:0,9:0};o.f.j=(e,n)=>{var r=o.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(268|924)$/.test(e))t[e]=0;else{var i=new Promise(((n,o)=>r=t[e]=[n,o]));n.push(r[2]=i);var a=o.p+o.u(e),u=new Error;o.l(a,(n=>{if(o.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;u.message="Loading chunk "+e+" failed.\n("+i+": "+a+")",u.name="ChunkLoadError",u.type=i,u.request=a,r[1](u)}}),"chunk-"+e,e)}};var e=(e,n)=>{var r,i,[a,u,s]=n,c=0;if(a.some((e=>0!==t[e]))){for(r in u)o.o(u,r)&&(o.m[r]=u[r]);s&&s(o)}for(e&&e(n);c<a.length;c++)i=a[c],o.o(t,i)&&t[i]&&t[i][0](),t[i]=0},n=globalThis.webpackChunk_kenyaemr_esm_patient_registration_app=globalThis.webpackChunk_kenyaemr_esm_patient_registration_app||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),o.nc=void 0,o(7068)})();
|
|
2
|
+
(()=>{var t,e,n={225:(t,e,n)=>{"use strict";n.d(e,{X8:()=>u,bs:()=>a});var r=n(906);function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var a=[{id:"demographics",name:"Basic Info",fields:["name","gender","dob","id"]},{id:"contact",name:"Contact Details",fields:["address","phone"]},{id:"death",name:"Death Info",fields:[]},{id:"relationships",name:"Relationships",fields:[]}],u=["name","gender","dob","address","id","phone & email"];function s(t){return"'".concat(t.map((function(t){return t.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(t){return t.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(t){return t.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.Boolean,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.Boolean,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.Boolean,r.Type.Number,r.Type.Number,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(t){return!t.fieldDefinitions.some((function(t){return"obs"==t.type}))||null!=t.registrationObs.encounterTypeUuid}),"If fieldDefinitions contains any fields of type 'obs', `registrationObs.encounterTypeUuid` must be specified."),(0,r.validator)((function(t){return t.sections.every((function(e){return i(a).concat(i(t.sectionDefinitions)).map((function(t){return t.id})).includes(e)}))}),(function(t){var e=i(a).concat(i(t.sectionDefinitions)).map((function(t){return t.id})),n=t.sections.find((function(t){return!e.includes(t)}));return"'".concat(n,"' is not a valid section ID. Valid section IDs include the built-in sections ").concat(s(a))+(t.sectionDefinitions.length?"; and the defined sections ".concat(s(t.sectionDefinitions),"."):".")})),(0,r.validator)((function(t){return t.sectionDefinitions.every((function(e){return e.fields.every((function(e){return i(u).concat(i(t.fieldDefinitions.map((function(t){return t.id})))).includes(e)}))}))}),(function(t){var e=i(u).concat(i(t.fieldDefinitions.map((function(t){return t.id})))),n=t.sectionDefinitions.find((function(t){return t.fields.some((function(t){return!e.includes(t)}))})),r=n.fields.find((function(t){return!e.includes(t)}));return"The section definition '".concat(n.id,"' contains an invalid field '").concat(r,"'. 'fields' can only contain the built-in fields '").concat(u.join("', '"),"'")+(t.fieldDefinitions.length?"; or the defined fields ".concat(s(t.fieldDefinitions),"."):".")}))},8179:(t,e,n)=>{"use strict";n.d(e,{Kt:()=>s,QT:()=>c,UO:()=>u});var r,o,i,a=n(906),u="custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))",s="patient-registration",c=(r={},i="network-first",(o=a.omrsOfflineCachingStrategyHttpHeaderName)in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,r)},7068:(t,e,n)=>{"use strict";n(906),n(3076),n(225),n(8179),n(6279),n(3979)},6279:(t,e,n)=>{"use strict";n.d(e,{Cg:()=>_,St:()=>E,Te:()=>T,mt:()=>O});var r=n(268),o=n.n(r),a=n(286),u=n(2777),s=n(8407),c=n(906),l=n(8179);function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function d(t){if(Array.isArray(t))return t}function p(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function h(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){p(i,r,o,a,u,"next",t)}function u(t){p(i,r,o,a,u,"throw",t)}a(void 0)}))}}function v(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function y(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(t,e){return d(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||w(t,e)||y()}function g(t){return d(t)||v(t)||w(t,i)||y()}function m(t){return function(t){if(Array.isArray(t))return f(t)}(t)||v(t)||w(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t,e){if(t){if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}var Z=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},_=o().createContext(null);function T(){return j.apply(this,arguments)}function j(){return(j=h((function(){return Z(this,(function(t){switch(t.label){case 0:return[4,I("/ws/rest/v1/systemsetting?q=layout.address.format&v=custom:(value)")];case 1:return[2,t.sent().data]}}))}))).apply(this,arguments)}function O(){return S.apply(this,arguments)}function S(){return(S=h((function(){return Z(this,(function(t){switch(t.label){case 0:return[4,I("/ws/rest/v1/relationshiptype?v=default")];case 1:return[2,t.sent().data]}}))}))).apply(this,arguments)}function E(){return A.apply(this,arguments)}function A(){return(A=h((function(){var t,e,n,r,o,i;return Z(this,(function(u){switch(u.label){case 0:return[4,x()];case 1:return t=u.sent(),e=t.filter(Boolean),[4,Promise.all([C()].concat(m(e.map((function(t){return D(t.uuid)})))))];case 2:for(n=g.apply(void 0,[u.sent()]),r=n[0],o=n.slice(1),i=0;i<(null==e?void 0:e.length);i++)e[i].identifierSources=o[i].data.results.map((function(t){var e=(0,a.Z)(r.data.results,{source:{uuid:t.uuid}});return t.autoGenerationOption=e,t}));return[2,e]}}))}))).apply(this,arguments)}function x(){return P.apply(this,arguments)}function P(){return(P=h((function(){var t,e,n,r,o,i,a,u,s,c;return Z(this,(function(l){switch(l.label){case 0:return[4,Promise.all([I("/ws/rest/v1/patientidentifiertype?v=custom:(display,uuid,name,format,required,uniquenessBehavior)"),I("/ws/rest/v1/metadatamapping/termmapping?v=full&code=emr.primaryIdentifierType")])];case 1:return t=b.apply(void 0,[l.sent(),2]),e=t[0],n=t[1],e.ok?(u=null==e||null===(r=e.data)||void 0===r?void 0:r.results,s=null==n||null===(o=n.data)||void 0===o||null===(i=o.results)||void 0===i||null===(a=i[0])||void 0===a?void 0:a.metadataUuid,c=[],u.forEach((function(t){t.uuid!==s&&c.push(L(t,!1))})),[2,c]):[2,[]]}}))}))).apply(this,arguments)}function D(t){return k.apply(this,arguments)}function k(){return(k=h((function(t){return Z(this,(function(e){switch(e.label){case 0:return[4,I("/ws/rest/v1/idgen/identifiersource?v=default&identifierType=".concat(t))];case 1:return[2,e.sent()]}}))}))).apply(this,arguments)}function C(t){return U.apply(this,arguments)}function U(){return(U=h((function(t){return Z(this,(function(t){switch(t.label){case 0:return[4,I("/ws/rest/v1/idgen/autogenerationoption?v=full")];case 1:return[2,t.sent()]}}))}))).apply(this,arguments)}function I(t){return N.apply(this,arguments)}function N(){return(N=h((function(t){var e;return Z(this,(function(n){switch(n.label){case 0:return e=new AbortController,[4,(0,c.messageOmrsServiceWorker)({type:"registerDynamicRoute",pattern:(0,s.Z)(t)})];case 1:return n.sent(),[4,(0,c.openmrsFetch)(t,{headers:l.QT,signal:null==e?void 0:e.signal})];case 2:return[2,n.sent()]}}))}))).apply(this,arguments)}function L(t,e){return{name:t.display,fieldName:(0,u.Z)(t.name),required:t.required,uuid:t.uuid,format:t.format,isPrimary:e,uniquenessBehavior:t.uniquenessBehavior}}},3076:(t,e,n)=>{"use strict";n.d(e,{I:()=>y});var r=n(906),o=n(8179),i=n(7117);function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){u(i,r,o,a,s,"next",t)}function s(t){u(i,r,o,a,s,"throw",t)}a(void 0)}))}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){l(t,e,n[e])}))}return t}function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t,e)||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(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},v=function(){function t(){c(this,t)}return t.saveRelationships=function(t,e){return s((function(){return h(this,(function(n){return[2,Promise.all(t.filter((function(t){return t.relationshipType})).filter((function(t){return!!t.action})).map((function(t){var n=t.relatedPersonUuid,r=t.relationshipType,o=t.uuid,a=t.action,u=d(r.split("/"),2),s=u[0],c=u[1],l=e.data.uuid,f="aIsToB"===c,p={personA:f?n:l,personB:f?l:n,relationshipType:s};switch(a){case"ADD":return(0,i.bL)(p);case"UPDATE":return(0,i.r6)(o,p);case"DELETE":return(0,i.kE)(o)}})))]}))}))()},t.saveObservations=function(t,e,n,r,o){return s((function(){var a;return h(this,(function(u){if(t&&Object.keys(t).length>0){if(o.registrationObs.encounterTypeUuid)return a={encounterDatetime:new Date,patient:e.data.uuid,encounterType:o.registrationObs.encounterTypeUuid,location:n,encounterProviders:[{provider:r.currentProvider.uuid,encounterRole:o.registrationObs.encounterProviderRoleUuid}],form:o.registrationObs.registrationFormUuid,obs:Object.keys(t).map((function(e){return{concept:e,value:t[e]}}))},[2,(0,i.M1)(a)];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]}))}))()},t.savePatientIdentifiers=function(t,e,n,r,o){return s((function(){var a;return h(this,(function(u){var c;return a=Object.values(n).filter((function(t){var e=t.identifierValue,n=t.autoGeneration,r=t.selectedSource;return e||n&&r})).map((c=s((function(n){var r,a,u,s,c,l,f,d,p,v;return h(this,(function(h){switch(h.label){case 0:return r=n.identifierTypeUuid,a=n.identifierValue,u=n.identifierUuid,s=n.selectedSource,c=n.preferred,l=n.autoGeneration,f=n.initialValue,l?[3,1]:(p=a,[3,4]);case 1:return[4,(0,i.fX)(s.uuid)];case 2:return[4,h.sent().data.identifier];case 3:p=h.sent(),h.label=4;case 4:return v={uuid:u,identifier:d=p,identifierType:r,location:o,preferred:c},t?[3,8]:f?[3,6]:[4,(0,i.eb)(e,v)];case 5:return h.sent(),[3,8];case 6:return f===d?[3,8]:[4,(0,i.nI)(e,u,v.identifier)];case 7:h.sent(),h.label=8;case 8:return[2,v]}}))})),function(t){return c.apply(this,arguments)})),e&&Object.keys(r).filter((function(t){return!n[t]})).forEach(function(){var t=s((function(t){return h(this,(function(n){switch(n.label){case 0:return[4,(0,i.ZB)(e,r[t].identifierUuid)];case 1:return n.sent(),[2]}}))}));return function(e){return t.apply(this,arguments)}}()),[2,Promise.all(a)]}))}))()},t.getDeletedNames=function(t,e){return(null==e?void 0:e.additionalNameUuid)?[{nameUuid:e.additionalNameUuid,personUuid:t}]:[]},t.getPatientToCreate=function(e,n,r,o,i){var a,u,s;return u=n.birthdate,a=(null!=(s=Date)&&"undefined"!=typeof Symbol&&s[Symbol.hasInstance]?s[Symbol.hasInstance](u):u instanceof s)?[n.birthdate.getFullYear(),n.birthdate.getMonth()+1,n.birthdate.getDate()].join("-"):n.birthdate,{uuid:n.patientUuid,person:f({uuid:n.patientUuid,names:t.getNames(n,r),gender:n.gender.charAt(0),birthdate:a,birthdateEstimated:n.birthdateEstimated,attributes:t.getPatientAttributes(e,n,r),addresses:[n.address]},t.getPatientDeathInfo(n)),identifiers:i}},t.getNames=function(t,e){var n=[{uuid:e.preferredNameUuid,preferred:!0,givenName:t.givenName,middleName:t.middleName,familyName:t.familyName}];return t.addNameInLocalLanguage&&n.push({uuid:e.additionalNameUuid,preferred:!1,givenName:t.additionalGivenName,middleName:t.additionalMiddleName,familyName:t.additionalFamilyName}),n},t.getPatientAttributes=function(t,e,n){var o,i=[];return e.attributes&&(Object.entries(e.attributes).filter((function(t){return!!d(t,2)[1]})).forEach((function(t){var e=d(t,2),n=e[0],r=e[1];i.push({attributeType:n,value:r})})),!t&&e.patientUuid&&Object.entries(e.attributes).filter((function(t){return!d(t,2)[1]})).forEach((o=s((function(t){var o,i,a;return h(this,(function(u){switch(u.label){case 0:return o=d(t,1),i=o[0],a=n["attribute.".concat(i)],[4,(0,r.openmrsFetch)("/ws/rest/v1/person/".concat(e.patientUuid,"/attribute/").concat(a),{method:"DELETE"}).catch((function(t){console.error(t)}))];case 1:return u.sent(),[2]}}))})),function(t){return o.apply(this,arguments)}))),e.unidentifiedPatient&&i.push({attributeType:"8b56eac7-5c76-4b9c-8c6f-1deab8d3fc47",value:"true"}),i},t.getPatientDeathInfo=function(t){var e=t.isDead,n=t.deathDate,r=t.deathCause;return{dead:e,deathDate:e?n:void 0,causeOfDeath:e?r:void 0}},t.mapPatientToFhirPatient=function(t){var e,n,r,o,i,a;return{id:t.uuid,gender:{M:"male",F:"female",O:"other",U:"unknown"}[null===(e=t.person)||void 0===e?void 0:e.gender],birthDate:null===(n=t.person)||void 0===n?void 0:n.birthdate,deceasedBoolean:t.person.dead,deceasedDateTime:t.person.deathDate,name:null===(r=t.person)||void 0===r||null===(o=r.names)||void 0===o?void 0:o.map((function(t){return{given:[t.givenName,t.middleName].filter(Boolean),family:t.familyName}})),address:null===(i=t.person)||void 0===i?void 0:i.addresses.map((function(t){return{city:t.cityVillage,country:t.country,postalCode:t.postalCode,state:t.stateProvince,use:"home"}})),telecom:null===(a=t.person.attributes)||void 0===a?void 0:a.filter((function(t){return"Telephone Number"===t.attributeType}))}},t}();v.savePatientFormOffline=(p=s((function(t,e,n,i,a,u,s,c,l){var f;return h(this,(function(d){switch(d.label){case 0:return f={fhirPatient:v.mapPatientToFhirPatient(v.getPatientToCreate(t,e,n,i,[])),_patientRegistrationData:{isNewPatient:t,formValues:e,patientUuidMap:n,initialAddressFieldValues:i,capturePhotoProps:a,currentLocation:u,initialIdentifierValues:s,currentUser:c,config:l,savePatientTransactionManager:new y}},[4,(0,r.queueSynchronizationItem)(o.Kt,f,{id:e.patientUuid,displayName:"Patient registration",patientUuid:f.fhirPatient.id,dependencies:[]})];case 1:return d.sent(),[2,null]}}))})),function(t,e,n,r,o,i,a,u,s){return p.apply(this,arguments)}),v.savePatientFormOnline=function(){var t=s((function(t,e,n,r,o,a,u,c,l,f,d){var p,y,b;return h(this,(function(d){switch(d.label){case 0:return[4,v.savePatientIdentifiers(t,e.patientUuid,e.identifiers,u,a)];case 1:return p=d.sent(),y=v.getPatientToCreate(t,e,n,r,p),v.getDeletedNames(e.patientUuid,n).forEach(function(){var t=s((function(t){return h(this,(function(e){switch(e.label){case 0:return[4,(0,i.uO)(t.nameUuid,t.personUuid)];case 1:return e.sent(),[2]}}))}));return function(e){return t.apply(this,arguments)}}()),[4,(0,i.co)(y,t&&!f.patientSaved?void 0:e.patientUuid)];case 2:return(b=d.sent()).ok?(f.patientSaved=!0,[4,v.saveRelationships(e.relationships,b)]):[3,6];case 3:return d.sent(),[4,v.saveObservations(e.obs,b,a,c,l)];case 4:return d.sent(),l.concepts.patientPhotoUuid&&(null==o?void 0:o.imageData)?[4,(0,i.oV)(b.data.uuid,o.imageData,"/ws/rest/v1/obs",o.dateTime||(new Date).toISOString(),l.concepts.patientPhotoUuid)]:[3,6];case 5:d.sent(),d.label=6;case 6:return[2,b.data.uuid]}}))}));return function(e,n,r,o,i,a,u,s,c,l,f){return t.apply(this,arguments)}}();var y=function t(){c(this,t),this.patientSaved=!1}},7117:(t,e,n)=>{"use strict";n.d(e,{M1:()=>d,M8:()=>Z,Uu:()=>w,ZB:()=>E,bL:()=>v,co:()=>f,eb:()=>T,f$:()=>x,fX:()=>p,kE:()=>b,nI:()=>O,oV:()=>g,r6:()=>y,uO:()=>h});var r=n(268),o=n(3255),i=n(2303),a=n(906);function u(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){u(i,r,o,a,s,"next",t)}function s(t){u(i,r,o,a,s,"throw",t)}a(void 0)}))}}var c=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};function l(t){for(var e=atob(t.split(",")[1]),n=t.split(",")[0].split(":")[1].split(";")[0],r=new Uint8Array(e.length),o=0;o<e.length;o++)r[o]=e.charCodeAt(o);var i=new Blob([r],{type:n});return new File([i],"patient-photo.png")}function f(t,e){var n=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(e||""),{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:n.signal})}function d(t){var e=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/encounter",{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function p(t){var e=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/idgen/identifiersource/".concat(t,"/identifier"),{headers:{"Content-Type":"application/json"},method:"POST",body:{},signal:e.signal})}function h(t,e){var n=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/person/".concat(e,"/name/").concat(t),{method:"DELETE",signal:n.signal})}function v(t){var e=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/relationship",{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function y(t,e){var n=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/relationship/".concat(t),{headers:{"Content-Type":"application/json"},method:"POST",body:{relationshipType:e.relationshipType},signal:n.signal})}function b(t){var e=new AbortController;return(0,a.openmrsFetch)("/ws/rest/v1/relationship/".concat(t),{headers:{"Content-Type":"application/json"},method:"DELETE",signal:e.signal})}function g(t,e,n,r,o){return m.apply(this,arguments)}function m(){return(m=s((function(t,e,n,r,o){var i,u;return c(this,(function(s){return i=new AbortController,(u=new FormData).append("patient",t),u.append("file",l(e)),u.append("json",JSON.stringify({person:t,concept:o,groupMembers:[],obsDatetime:r})),[2,(0,a.openmrsFetch)(n,{method:"POST",signal:i.signal,body:u})]}))}))).apply(this,arguments)}function w(t){var e,n,r,i=(0,a.useConfig)().concepts.patientPhotoUuid,u="/ws/rest/v1/obs?patient=".concat(t,"&concept=").concat(i,"&v=full"),s=(0,o.ZP)(t?u:null,a.openmrsFetch),c=s.data,l=s.error,f=s.isLoading,d=null==c||null===(e=c.data)||void 0===e?void 0:e.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:l,isLoading:f}}function Z(t){return _.apply(this,arguments)}function _(){return(_=s((function(t){var e;return c(this,(function(n){return e=new AbortController,[2,(0,a.openmrsFetch)("/ws/rest/v1/person?q=".concat(t),{signal:e.signal})]}))}))).apply(this,arguments)}function T(t,e){return j.apply(this,arguments)}function j(){return(j=s((function(t,e){var n;return c(this,(function(r){return n=new AbortController,[2,(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(t,"/identifier/"),{method:"POST",headers:{"Content-Type":"application/json"},signal:n.signal,body:e})]}))}))).apply(this,arguments)}function O(t,e,n){return S.apply(this,arguments)}function S(){return(S=s((function(t,e,n){var r;return c(this,(function(o){return r=new AbortController,[2,(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(t,"/identifier/").concat(e),{method:"POST",headers:{"Content-Type":"application/json"},signal:r.signal,body:{identifier:n}})]}))}))).apply(this,arguments)}function E(t,e){return A.apply(this,arguments)}function A(){return(A=s((function(t,e){var n;return c(this,(function(r){return n=new AbortController,[2,(0,a.openmrsFetch)("/ws/rest/v1/patient/".concat(t,"/identifier/").concat(e,"?purge"),{method:"DELETE",headers:{"Content-Type":"application/json"},signal:n.signal})]}))}))).apply(this,arguments)}function x(t,e){var n,o=(0,i.Z)(t?"/module/addresshierarchy/ajax/getPossibleFullAddresses.form?separator=".concat(e,"&searchString=").concat(t):null,a.openmrsFetch),u=o.data,s=o.error,c=o.isLoading,l=(0,r.useMemo)((function(){var t;return{addresses:null!==(n=null==u||null===(t=u.data)||void 0===t?void 0:t.map((function(t){return t.address})))&&void 0!==n?n:[],error:s,isLoading:c}}),[null==u?void 0:u.data,s,c]);return l}},452:(t,e,n)=>{"use strict";var r=n(268),o="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},i=r.useState,a=r.useEffect,u=r.useLayoutEffect,s=r.useDebugValue;function c(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!o(t,n)}catch(t){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var n=e(),r=i({inst:{value:n,getSnapshot:e}}),o=r[0].inst,l=r[1];return u((function(){o.value=n,o.getSnapshot=e,c(o)&&l({inst:o})}),[t,n,e]),a((function(){return c(o)&&l({inst:o}),t((function(){c(o)&&l({inst:o})}))}),[t]),s(n),n};e.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},3100:(t,e,n)=>{"use strict";t.exports=n(452)},3979:(t,e,n)=>{var r={"./en.json":[3574,574],"./fr.json":[2757,757],"./km.json":[7807,807]};function o(t){if(!n.o(r,t))return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=r[t],o=e[0];return n.e(e[1]).then((()=>n(o)))}o.keys=()=>Object.keys(r),o.id=3979,t.exports=o},6300:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(8804);const o=function(t,e){for(var n=t.length;n--;)if((0,r.Z)(t[n][0],e))return n;return-1};var i=Array.prototype.splice;function a(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(t){var e=this.__data__,n=o(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))},a.prototype.get=function(t){var e=this.__data__,n=o(e,t);return n<0?void 0:e[n][1]},a.prototype.has=function(t){return o(this.__data__,t)>-1},a.prototype.set=function(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};const u=a},8896:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(2411),o=n(3221);const i=(0,r.Z)(o.Z,"Map")},3549:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});const r=(0,n(2411).Z)(Object,"create");var o=Object.prototype.hasOwnProperty;var i=Object.prototype.hasOwnProperty;function a(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=r?r(null):{},this.size=0},a.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},a.prototype.get=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0},a.prototype.has=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)},a.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this};const u=a;var s=n(6300),c=n(8896);const l=function(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map};function f(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}f.prototype.clear=function(){this.size=0,this.__data__={hash:new u,map:new(c.Z||s.Z),string:new u}},f.prototype.delete=function(t){var e=l(this,t).delete(t);return this.size-=e?1:0,e},f.prototype.get=function(t){return l(this,t).get(t)},f.prototype.has=function(t){return l(this,t).has(t)},f.prototype.set=function(t,e){var n=l(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};const d=f},3761:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(6300);var o=n(8896),i=n(3549);function a(t){var e=this.__data__=new r.Z(t);this.size=e.size}a.prototype.clear=function(){this.__data__=new r.Z,this.size=0},a.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},a.prototype.get=function(t){return this.__data__.get(t)},a.prototype.has=function(t){return this.__data__.has(t)},a.prototype.set=function(t,e){var n=this.__data__;if(n instanceof r.Z){var a=n.__data__;if(!o.Z||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i.Z(a)}return n.set(t,e),this.size=n.size,this};const u=a},187:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=n(3221).Z.Symbol},8282:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=n(3221).Z.Uint8Array},7178:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(4405),o=n(7885),i=n(2143),a=n(6401),u=n(8532),s=Object.prototype.hasOwnProperty;const c=function(t,e){var n=(0,o.Z)(t),c=!n&&(0,r.Z)(t),l=!n&&!c&&(0,i.Z)(t),f=!n&&!c&&!l&&(0,u.Z)(t),d=n||c||l||f,p=d?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],h=p.length;for(var v in t)!e&&!s.call(t,v)||d&&("length"==v||l&&("offset"==v||"parent"==v)||f&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||(0,a.Z)(v,h))||p.push(v);return p}},5598:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},5810:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}},2938:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(5810),o=n(7885);const i=function(t,e,n){var i=e(t);return(0,o.Z)(t)?i:(0,r.Z)(i,n(t))}},8147:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var r=n(187),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r.Z?r.Z.toStringTag:void 0;var s=Object.prototype.toString;var c=r.Z?r.Z.toStringTag:void 0;const l=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":c&&c in Object(t)?function(t){var e=i.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[u]=n:delete t[u]),o}(t):function(t){return s.call(t)}(t)}},5745:(t,e,n)=>{"use strict";n.d(e,{Z:()=>B});var r=n(3761),o=n(3549);function i(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new o.Z;++e<n;)this.add(t[e])}i.prototype.add=i.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},i.prototype.has=function(t){return this.__data__.has(t)};const a=i,u=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},s=function(t,e,n,r,o,i){var s=1&n,c=t.length,l=e.length;if(c!=l&&!(s&&l>c))return!1;var f=i.get(t),d=i.get(e);if(f&&d)return f==e&&d==t;var p=-1,h=!0,v=2&n?new a:void 0;for(i.set(t,e),i.set(e,t);++p<c;){var y=t[p],b=e[p];if(r)var g=s?r(b,y,p,e,t,i):r(y,b,p,t,e,i);if(void 0!==g){if(g)continue;h=!1;break}if(v){if(!u(e,(function(t,e){if(a=e,!v.has(a)&&(y===t||o(y,t,n,r,i)))return v.push(e);var a}))){h=!1;break}}else if(y!==b&&!o(y,b,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h};var c=n(187),l=n(8282),f=n(8804),d=n(5500),p=n(3249),h=c.Z?c.Z.prototype:void 0,v=h?h.valueOf:void 0;var y=n(7245),b=Object.prototype.hasOwnProperty;var g=n(4558),m=n(7885),w=n(2143),Z=n(8532),_="[object Arguments]",T="[object Array]",j="[object Object]",O=Object.prototype.hasOwnProperty;const S=function(t,e,n,o,i,a){var u=(0,m.Z)(t),c=(0,m.Z)(e),h=u?T:(0,g.Z)(t),S=c?T:(0,g.Z)(e),E=(h=h==_?j:h)==j,A=(S=S==_?j:S)==j,x=h==S;if(x&&(0,w.Z)(t)){if(!(0,w.Z)(e))return!1;u=!0,E=!1}if(x&&!E)return a||(a=new r.Z),u||(0,Z.Z)(t)?s(t,e,n,o,i,a):function(t,e,n,r,o,i,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new l.Z(t),new l.Z(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,f.Z)(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var u=d.Z;case"[object Set]":var c=1&r;if(u||(u=p.Z),t.size!=e.size&&!c)return!1;var h=a.get(t);if(h)return h==e;r|=2,a.set(t,e);var y=s(u(t),u(e),r,o,i,a);return a.delete(t),y;case"[object Symbol]":if(v)return v.call(t)==v.call(e)}return!1}(t,e,h,n,o,i,a);if(!(1&n)){var P=E&&O.call(t,"__wrapped__"),D=A&&O.call(e,"__wrapped__");if(P||D){var k=P?t.value():t,C=D?e.value():e;return a||(a=new r.Z),i(k,C,n,o,a)}}return!!x&&(a||(a=new r.Z),function(t,e,n,r,o,i){var a=1&n,u=(0,y.Z)(t),s=u.length;if(s!=(0,y.Z)(e).length&&!a)return!1;for(var c=s;c--;){var l=u[c];if(!(a?l in e:b.call(e,l)))return!1}var f=i.get(t),d=i.get(e);if(f&&d)return f==e&&d==t;var p=!0;i.set(t,e),i.set(e,t);for(var h=a;++c<s;){var v=t[l=u[c]],g=e[l];if(r)var m=a?r(g,v,l,e,t,i):r(v,g,l,t,e,i);if(!(void 0===m?v===g||o(v,g,n,r,i):m)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var w=t.constructor,Z=e.constructor;w==Z||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&w instanceof w&&"function"==typeof Z&&Z instanceof Z||(p=!1)}return i.delete(t),i.delete(e),p}(t,e,n,o,i,a))};var E=n(3391);const A=function t(e,n,r,o,i){return e===n||(null==e||null==n||!(0,E.Z)(e)&&!(0,E.Z)(n)?e!=e&&n!=n:S(e,n,r,o,t,i))};var x=n(3122);const P=function(t){return t==t&&!(0,x.Z)(t)};var D=n(6623);const k=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}},C=function(t){var e=function(t){for(var e=(0,D.Z)(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,P(o)]}return e}(t);return 1==e.length&&e[0][2]?k(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,o){var i=n.length,a=i,u=!o;if(null==t)return!a;for(t=Object(t);i--;){var s=n[i];if(u&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){var c=(s=n[i])[0],l=t[c],f=s[1];if(u&&s[2]){if(void 0===l&&!(c in t))return!1}else{var d=new r.Z;if(o)var p=o(l,f,c,t,e,d);if(!(void 0===p?A(f,l,3,o,d):p))return!1}}return!0}(n,t,e)}};var U=n(2082),I=n(7969);const N=function(t,e){for(var n=0,r=(e=(0,U.Z)(e,t)).length;null!=t&&n<r;)t=t[(0,I.Z)(e[n++])];return n&&n==r?t:void 0},L=function(t,e){return null!=t&&e in Object(t)};var F=n(8693);var R=n(3502);const M=function(t,e){return(0,R.Z)(t)&&P(e)?k((0,I.Z)(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:N(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?function(t,e){return null!=t&&(0,F.Z)(t,e,L)}(n,t):A(e,r,3)}},V=function(t){return t},z=function(t){return(0,R.Z)(t)?(e=(0,I.Z)(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return N(e,t)}}(t);var e},B=function(t){return"function"==typeof t?t:null==t?V:"object"==typeof t?(0,m.Z)(t)?M(t[0],t[1]):C(t):z(t)}},3225:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){return function(e){return t(e)}}},2082:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(7885),o=n(3502),i=n(1354),a=n(63);const u=function(t,e){return(0,r.Z)(t)?t:(0,o.Z)(t,e)?[t]:(0,i.Z)((0,a.Z)(t))}},6994:(t,e,n)=>{"use strict";n.d(e,{Z:()=>D});const r=(o={À:"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(t){return null==o?void 0:o[t]});var o,i=n(63),a=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,u=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var s=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var c=/[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+"]",h="\\d+",v="["+l+"]",y="[^\\ud800-\\udfff"+d+h+"\\u2700-\\u27bf"+l+f+"]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",m="["+f+"]",w="(?:"+v+"|"+y+")",Z="(?:"+m+"|"+y+")",_="(?:['’](?:d|ll|m|re|s|t|ve))?",T="(?:['’](?:D|LL|M|RE|S|T|VE))?",j="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",O="[\\ufe0e\\ufe0f]?",S=O+j+"(?:\\u200d(?:"+["[^\\ud800-\\udfff]",b,g].join("|")+")"+O+j+")*",E="(?:"+["[\\u2700-\\u27bf]",b,g].join("|")+")"+S,A=RegExp([m+"?"+v+"+"+_+"(?="+[p,m,"$"].join("|")+")",Z+"+"+T+"(?="+[p,m+w,"$"].join("|")+")",m+"?"+w+"+"+_,m+"+"+T,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",h,E].join("|"),"g");const x=function(t,e,n){return t=(0,i.Z)(t),void 0===(e=n?void 0:e)?function(t){return c.test(t)}(t)?function(t){return t.match(A)||[]}(t):function(t){return t.match(s)||[]}(t):t.match(e)||[]};var P=RegExp("['’]","g");const D=function(t){return function(e){return function(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}(x(function(t){return(t=(0,i.Z)(t))&&t.replace(a,r).replace(u,"")}(e).replace(P,"")),t,"")}}},2168:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r="object"==typeof global&&global&&global.Object===Object&&global},7245:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(2938),o=n(9582),i=n(6623);const a=function(t){return(0,r.Z)(t,i.Z,o.Z)}},2411:(t,e,n)=>{"use strict";n.d(e,{Z:()=>y});var r=n(8936);const o=n(3221).Z["__core-js_shared__"];var i,a=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";var u=n(3122),s=n(6682),c=/^\[object .+?Constructor\]$/,l=Function.prototype,f=Object.prototype,d=l.toString,p=f.hasOwnProperty,h=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const v=function(t){return!(!(0,u.Z)(t)||(e=t,a&&a in e))&&((0,r.Z)(t)?h:c).test((0,s.Z)(t));var e},y=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return v(n)?n:void 0}},9582:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(813),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols;const a=i?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i}(i(t),(function(e){return o.call(t,e)})))}:r.Z},4558:(t,e,n)=>{"use strict";n.d(e,{Z:()=>T});var r=n(2411),o=n(3221);const i=(0,r.Z)(o.Z,"DataView");var a=n(8896);const u=(0,r.Z)(o.Z,"Promise"),s=(0,r.Z)(o.Z,"Set"),c=(0,r.Z)(o.Z,"WeakMap");var l=n(8147),f=n(6682),d="[object Map]",p="[object Promise]",h="[object Set]",v="[object WeakMap]",y="[object DataView]",b=(0,f.Z)(i),g=(0,f.Z)(a.Z),m=(0,f.Z)(u),w=(0,f.Z)(s),Z=(0,f.Z)(c),_=l.Z;(i&&_(new i(new ArrayBuffer(1)))!=y||a.Z&&_(new a.Z)!=d||u&&_(u.resolve())!=p||s&&_(new s)!=h||c&&_(new c)!=v)&&(_=function(t){var e=(0,l.Z)(t),n="[object Object]"==e?t.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 h;case Z:return v}return e});const T=_},8693:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(2082),o=n(4405),i=n(7885),a=n(6401),u=n(1164),s=n(7969);const c=function(t,e,n){for(var c=-1,l=(e=(0,r.Z)(e,t)).length,f=!1;++c<l;){var d=(0,s.Z)(e[c]);if(!(f=null!=t&&n(t,d)))break;t=t[d]}return f||++c!=l?f:!!(l=null==t?0:t.length)&&(0,u.Z)(l)&&(0,a.Z)(d,l)&&((0,i.Z)(t)||(0,o.Z)(t))}},2690:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const o=function(t){return r.test(t)}},6401:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=/^(?:0|[1-9]\d*)$/;const o=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&t<e}},3502:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(7885),o=n(2758),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;const u=function(t,e){if((0,r.Z)(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!(0,o.Z)(t))||a.test(t)||!i.test(t)||null!=e&&t in Object(e)}},5441:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=Object.prototype;const o=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},5500:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},7755:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(2168),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o&&r.Z.process;const u=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}()},6048:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t,e){return function(n){return t(e(n))}}},3221:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(2168),o="object"==typeof self&&self&&self.Object===Object&&self;const i=r.Z||o||Function("return this")()},3249:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},6202:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var r=n(2690),o="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",a="[^\\ud800-\\udfff]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+o+"|"+i+")?",l="[\\ufe0e\\ufe0f]?",f=l+c+"(?:\\u200d(?:"+[a,u,s].join("|")+")"+l+c+")*",d="(?:"+[a+o+"?",o,u,s,"[\\ud800-\\udfff]"].join("|")+")",p=RegExp(i+"(?="+i+")|"+d+f,"g");const h=function(t){return(0,r.Z)(t)?function(t){return t.match(p)||[]}(t):function(t){return t.split("")}(t)}},1354:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(3549);function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r.Z),n}o.Cache=r.Z;var i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g;const u=(s=o((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,o){e.push(r?o.replace(a,"$1"):n||t)})),e}),(function(t){return 500===c.size&&c.clear(),t})),c=s.cache,s);var s,c},7969:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(2758);const o=function(t){if("string"==typeof t||(0,r.Z)(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},6682:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=Function.prototype.toString;const o=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},2777:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(1140);const o=(0,n(6994).Z)((function(t,e,n){return e=e.toLowerCase(),t+(n?(0,r.Z)(e):e)}))},1140:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(63);const o=function(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:function(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(o);++r<o;)i[r]=t[r+e];return i}(t,e,n)};var i=n(2690),a=n(6202);const u=function(t){t=(0,r.Z)(t);var e=(0,i.Z)(t)?(0,a.Z)(t):void 0,n=e?e[0]:t.charAt(0),u=e?o(e,1).join(""):t.slice(1);return n.toUpperCase()+u},s=function(t){return u((0,r.Z)(t).toLowerCase())}},8804:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t,e){return t===e||t!=t&&e!=e}},8407:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(63),o=/[\\^$.*+?()[\]{}|]/g,i=RegExp(o.source);const a=function(t){return(t=(0,r.Z)(t))&&i.test(t)?t.replace(o,"\\$&"):t}},286:(t,e,n)=>{"use strict";n.d(e,{Z:()=>b});var r=n(5745),o=n(3282),i=n(6623);var a=/\s/;var u=/^\s+/;const s=function(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&a.test(t.charAt(e)););return e}(t)+1).replace(u,""):t};var c=n(3122),l=n(2758),f=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,p=/^0o[0-7]+$/i,h=parseInt;const v=function(t){return t?Infinity===(t=function(t){if("number"==typeof t)return t;if((0,l.Z)(t))return NaN;if((0,c.Z)(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=(0,c.Z)(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=s(t);var n=d.test(t);return n||p.test(t)?h(t.slice(2),n?2:8):f.test(t)?NaN:+t}(t))||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0};var y=Math.max;const b=(g=function(t,e,n){var o=null==t?0:t.length;if(!o)return-1;var i,a,u=null==n?0:(i=v(n),a=i%1,i==i?a?i-a:i:0);return u<0&&(u=y(o+u,0)),function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}(t,(0,r.Z)(e,3),u)},function(t,e,n){var a=Object(t);if(!(0,o.Z)(t)){var u=(0,r.Z)(e,3);t=(0,i.Z)(t),e=function(t){return u(a[t],t,a)}}var s=g(t,e,n);return s>-1?a[u?t[s]:s]:void 0});var g},4405:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(8147),o=n(3391);const i=function(t){return(0,o.Z)(t)&&"[object Arguments]"==(0,r.Z)(t)};var a=Object.prototype,u=a.hasOwnProperty,s=a.propertyIsEnumerable;const c=i(function(){return arguments}())?i:function(t){return(0,o.Z)(t)&&u.call(t,"callee")&&!s.call(t,"callee")}},7885:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=Array.isArray},3282:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(8936),o=n(1164);const i=function(t){return null!=t&&(0,o.Z)(t.length)&&!(0,r.Z)(t)}},2143:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(3221);var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o?r.Z.Buffer:void 0;const u=(a?a.isBuffer:void 0)||function(){return!1}},8936:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(8147),o=n(3122);const i=function(t){if(!(0,o.Z)(t))return!1;var e=(0,r.Z)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1164:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3122:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},3391:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){return null!=t&&"object"==typeof t}},2758:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(8147),o=n(3391);const i=function(t){return"symbol"==typeof t||(0,o.Z)(t)&&"[object Symbol]"==(0,r.Z)(t)}},8532:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var r=n(8147),o=n(1164),i=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),s=n(7755),c=s.Z&&s.Z.isTypedArray;const l=c?(0,u.Z)(c):function(t){return(0,i.Z)(t)&&(0,o.Z)(t.length)&&!!a[(0,r.Z)(t)]}},6623:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(7178),o=n(5441);const i=(0,n(6048).Z)(Object.keys,Object);var a=Object.prototype.hasOwnProperty;var u=n(3282);const s=function(t){return(0,u.Z)(t)?(0,r.Z)(t):function(t){if(!(0,o.Z)(t))return i(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}},813:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(){return[]}},63:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var r=n(187),o=n(5598),i=n(7885),a=n(2758),u=r.Z?r.Z.prototype:void 0,s=u?u.toString:void 0;const c=function t(e){if("string"==typeof e)return e;if((0,i.Z)(e))return(0,o.Z)(e,t)+"";if((0,a.Z)(e))return s?s.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n},l=function(t){return null==t?"":c(t)}},4729:(t,e,n)=>{"use strict";n.d(e,{$l:()=>s,BN:()=>U,DY:()=>o,J$:()=>z,JN:()=>v,LI:()=>E,PM:()=>f,W6:()=>O,i_:()=>u,ko:()=>J,kw:()=>S,mf:()=>l,o8:()=>c,qC:()=>P,s6:()=>G,sj:()=>C,u3:()=>k,u_:()=>R,w6:()=>j,xD:()=>H});var r=n(268);const o=new WeakMap,i={},a=()=>{},u=a(),s=Object,c=t=>t===u,l=t=>"function"==typeof t,f=(t,e)=>({...t,...e}),d="undefined",p=typeof window!=d,h=typeof document!=d,v=(t,e)=>{const n=o.get(t);return[()=>t.get(e)||i,r=>{const o=t.get(e);n[5](e,f(o,r),o||i)},n[6]]},y=new WeakMap;let b=0;const g=t=>{const e=typeof t,n=t&&t.constructor,r=n==Date;let o,i;if(s(t)!==t||r||n==RegExp)o=r?t.toJSON():"symbol"==e?t.toString():"string"==e?JSON.stringify(t):""+t;else{if(o=y.get(t),o)return o;if(o=++b+"~",y.set(t,o),n==Array){for(o="@",i=0;i<t.length;i++)o+=g(t[i])+",";y.set(t,o)}if(n==s){o="#";const e=s.keys(t).sort();for(;!c(i=e.pop());)c(t[i])||(o+=i+":"+g(t[i])+",");y.set(t,o)}}return o};let m=!0;const[w,Z]=p&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[a,a],_={isOnline:()=>m,isVisible:()=>{const t=h&&document.visibilityState;return c(t)||"hidden"!==t}},T={initFocus:t=>(h&&document.addEventListener("visibilitychange",t),w("focus",t),()=>{h&&document.removeEventListener("visibilitychange",t),Z("focus",t)}),initReconnect:t=>{const e=()=>{m=!0,t()},n=()=>{m=!1};return w("online",e),w("offline",n),()=>{Z("online",e),Z("offline",n)}}},j=!r.useId,O=!p||"Deno"in window,S=t=>p&&typeof window.requestAnimationFrame!=d?window.requestAnimationFrame(t):setTimeout(t,1),E=O?r.useEffect:r.useLayoutEffect,A="undefined"!=typeof navigator&&navigator.connection,x=!O&&A&&(["slow-2g","2g"].includes(A.effectiveType)||A.saveData),P=t=>{if(l(t))try{t=t()}catch(e){t=""}const e=t;return[t="string"==typeof t?t:(Array.isArray(t)?t.length:t)?g(t):"",e]};let D=0;const k=()=>++D;var C={__proto__:null,FOCUS_EVENT:0,RECONNECT_EVENT:1,MUTATE_EVENT:2};async function U(...t){const[e,n,r,i]=t,a=f({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{});let s=a.populateCache;const d=a.rollbackOnError;let p=a.optimisticData;const h=!1!==a.revalidate,y=a.throwOnError;if(l(n)){const t=n,r=[],o=e.keys();for(let n=o.next();!n.done;n=o.next()){const o=n.value;!o.startsWith("$inf$")&&t(e.get(o)._k)&&r.push(o)}return Promise.all(r.map(b))}return b(n);async function b(n){const[i]=P(n);if(!i)return;const[a,f]=v(e,i),[b,g,m]=o.get(e),w=b[i],Z=()=>h&&(delete m[i],w&&w[0])?w[0](2).then((()=>a().data)):a().data;if(t.length<3)return Z();let _,T=r;const j=k();g[i]=[j,0];const O=!c(p),S=a(),E=S.data,A=S._c,x=c(A)?E:A;if(O&&(p=l(p)?p(x):p,f({data:p,_c:x})),l(T))try{T=T(x)}catch(t){_=t}if(T&&l(T.then)){if(T=await T.catch((t=>{_=t})),j!==g[i][0]){if(_)throw _;return T}_&&O&&(t=>"function"==typeof d?d(t):!1!==d)(_)&&(s=!0,T=x,f({data:T,_c:u}))}s&&(_||(l(s)&&(T=s(T,x)),f({data:T,_c:u}))),g[i][1]=k();const D=await Z();if(f({_c:u}),!_)return s?D:T;if(y)throw _}}const I=(t,e)=>{for(const n in t)t[n][0]&&t[n][0](e)},N=(t,e)=>{if(!o.has(t)){const n=f(T,e),r={},i=U.bind(u,t);let s=a;const c={},l=(t,e)=>{const n=c[t]||[];return c[t]=n,n.push(e),()=>n.splice(n.indexOf(e),1)},d=(e,n,r)=>{t.set(e,n);const o=c[e];if(o)for(let t=o.length;t--;)o[t](r,n)},p=()=>{if(!o.has(t)&&(o.set(t,[r,{},{},{},i,d,l]),!O)){const e=n.initFocus(setTimeout.bind(u,I.bind(u,r,0))),i=n.initReconnect(setTimeout.bind(u,I.bind(u,r,1)));s=()=>{e&&e(),i&&i(),o.delete(t)}}};return p(),[t,i,p,s]}return[t,o.get(t)[4]]},[L,F]=N(new Map),R=f({onLoadingSlow:a,onSuccess:a,onError:a,onErrorRetry:(t,e,n,r,o)=>{const i=n.errorRetryCount,a=o.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!c(i)&&a>i||setTimeout(r,u,o)},onDiscarded:a,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:x?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:x?5e3:3e3,compare:(t,e)=>g(t)==g(e),isPaused:()=>!1,cache:L,mutate:F,fallback:{}},_),M=(t,e)=>{const n=f(t,e);if(e){const{use:r,fallback:o}=t,{use:i,fallback:a}=e;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=f(o,a))}return n},V=(0,r.createContext)({}),z=t=>{const{value:e}=t,n=(0,r.useContext)(V),o=l(e),i=(0,r.useMemo)((()=>o?e(n):e),[o,n,e]),a=(0,r.useMemo)((()=>o?i:M(n,i)),[o,n,i]),s=i&&i.provider,[c]=(0,r.useState)((()=>s?N(s(a.cache||L),i):u));return c&&(a.cache=c[0],a.mutate=c[1]),E((()=>{if(c)return c[2]&&c[2](),c[3]}),[]),(0,r.createElement)(V.Provider,f(t,{value:a}))},B=p&&window.__SWR_DEVTOOLS_USE__,$=B?window.__SWR_DEVTOOLS_USE__:[],q=t=>l(t[1])?[t[0],t[1],t[2]||{}]:[t[0],null,(null===t[1]?t[2]:t[1])||{}],W=$.concat((t=>(e,n,r)=>t(e,n&&((...t)=>{const r=P(e)[0],[,,,i]=o.get(L),a=i[r];return a?(delete i[r],a):n(...t)}),r))),G=t=>function(...e){const n=f(R,(0,r.useContext)(V)),[o,i,a]=q(e),u=M(n,a);let s=t;const{use:c}=u,l=(c||[]).concat(W);for(let t=l.length;t--;)s=l[t](s);return s(o,i||u.fetcher||null,u)},J=(t,e,n)=>{const r=e[t]||(e[t]=[]);return r.push(n),()=>{const t=r.indexOf(n);t>=0&&(r[t]=r[r.length-1],r.pop())}},H=(t,e)=>(...n)=>{const[r,o,i]=q(n),a=(i.use||[]).concat(e);return t(r,o,{...i,use:a})};B&&(window.__SWR_DEVTOOLS_REACT__=r)},3255:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>u});var r=n(268),o=n(3100),i=n(4729);const a={dedupe:!0};i.$l.defineProperty(i.J$,"defaultValue",{value:i.u_});var u=(0,i.s6)(((t,e,n)=>{const{cache:u,compare:s,suspense:c,fallbackData:l,revalidateOnMount:f,refreshInterval:d,refreshWhenHidden:p,refreshWhenOffline:h,keepPreviousData:v}=n,[y,b,g]=i.DY.get(u),[m,w]=(0,i.qC)(t),Z=(0,r.useRef)(!1),_=(0,r.useRef)(!1),T=(0,r.useRef)(m),j=(0,r.useRef)(e),O=(0,r.useRef)(n),S=()=>O.current,E=()=>S().isVisible()&&S().isOnline(),[A,x,P]=(0,i.JN)(u,m),D=(0,r.useRef)({}).current,k=(0,i.o8)(l)?n.fallback[m]:l,C=(t,e)=>{let n=!0;for(const r in D){const o=r;s(e[o],t[o])||"data"===o&&(0,i.o8)(t[o])&&s(e[o],V)||(n=!1)}return n},U=(0,r.useMemo)((()=>{const t=!!m&&!!e&&((0,i.o8)(f)?!S().isPaused()&&!c:f),n=()=>{const e=A(),n=(0,i.PM)(e);return delete n._k,t?{isValidating:!0,isLoading:!0,...n}:n};let r=n();return()=>{const t=n();return C(t,r)?r:r=t}}),[u,m]),I=(0,o.useSyncExternalStore)((0,r.useCallback)((t=>P(m,((e,n)=>{C(e,n)||t()}))),[u,m]),U,U),N=!Z.current,L=I.data,F=(0,i.o8)(L)?k:L,R=I.error,M=(0,r.useRef)(F),V=v?(0,i.o8)(L)?M.current:L:F,z=N&&!(0,i.o8)(f)?f:!S().isPaused()&&(c?!(0,i.o8)(F)&&n.revalidateIfStale:(0,i.o8)(F)||n.revalidateIfStale),B=!!(m&&e&&N&&z),$=(0,i.o8)(I.isValidating)?B:I.isValidating,q=(0,i.o8)(I.isLoading)?B:I.isLoading,W=(0,r.useCallback)((async t=>{const e=j.current;if(!m||!e||_.current||S().isPaused())return!1;let r,o,a=!0;const u=t||{},c=!g[m]||!u.dedupe,l=()=>i.w6?!_.current&&m===T.current&&Z.current:m===T.current,f={isValidating:!1,isLoading:!1},d=()=>{x(f)},p=()=>{const t=g[m];t&&t[1]===o&&delete g[m]},h={isValidating:!0};(0,i.o8)(A().data)&&(h.isLoading=!0);try{if(c&&(x(h),n.loadingTimeout&&(0,i.o8)(A().data)&&setTimeout((()=>{a&&l()&&S().onLoadingSlow(m,n)}),n.loadingTimeout),g[m]=[e(w),(0,i.u3)()]),[r,o]=g[m],r=await r,c&&setTimeout(p,n.dedupingInterval),!g[m]||g[m][1]!==o)return c&&l()&&S().onDiscarded(m),!1;f.error=i.i_;const t=b[m];if(!(0,i.o8)(t)&&(o<=t[0]||o<=t[1]||0===t[1]))return d(),c&&l()&&S().onDiscarded(m),!1;const u=A().data;f.data=s(u,r)?u:r,c&&l()&&S().onSuccess(r,m,n)}catch(t){p();const e=S(),{shouldRetryOnError:n}=e;e.isPaused()||(f.error=t,c&&l()&&(e.onError(t,m,e),(!0===n||(0,i.mf)(n)&&n(t))&&E()&&e.onErrorRetry(t,m,e,W,{retryCount:(u.retryCount||0)+1,dedupe:!0})))}return a=!1,d(),!0}),[m,u]),G=(0,r.useCallback)(((...t)=>(0,i.BN)(u,T.current,...t)),[]);if((0,i.LI)((()=>{j.current=e,O.current=n,(0,i.o8)(L)||(M.current=L)})),(0,i.LI)((()=>{if(!m)return;const t=W.bind(i.i_,a);let e=0;const n=(0,i.ko)(m,y,(n=>{if(n==i.sj.FOCUS_EVENT){const n=Date.now();S().revalidateOnFocus&&n>e&&E()&&(e=n+S().focusThrottleInterval,t())}else if(n==i.sj.RECONNECT_EVENT)S().revalidateOnReconnect&&E()&&t();else if(n==i.sj.MUTATE_EVENT)return W()}));return _.current=!1,T.current=m,Z.current=!0,x({_k:w}),z&&((0,i.o8)(F)||i.W6?t():(0,i.kw)(t)),()=>{_.current=!0,n()}}),[m]),(0,i.LI)((()=>{let t;function e(){const e=(0,i.mf)(d)?d(F):d;e&&-1!==t&&(t=setTimeout(n,e))}function n(){A().error||!p&&!S().isVisible()||!h&&!S().isOnline()?e():W(a).then(e)}return e(),()=>{t&&(clearTimeout(t),t=-1)}}),[d,p,h,m]),(0,r.useDebugValue)(V),c&&(0,i.o8)(F)&&m){if(!i.w6&&i.W6)throw new Error("Fallback data is required when using suspense in SSR.");throw j.current=e,O.current=n,_.current=!1,(0,i.o8)(R)?W(a):R}return{mutate:G,get data(){return D.data=!0,V},get error(){return D.error=!0,R},get isValidating(){return D.isValidating=!0,$},get isLoading(){return D.isLoading=!0,q}}}))},2303:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(3255),o=(0,n(4729).xD)(r.ZP,(t=>(e,n,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,t(e,n,r))))}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={id:t,loaded:!1,exports:{}};return n[t](i,i.exports,o),i.loaded=!0,i.exports}o.m=n,o.c=r,o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce(((e,n)=>(o.f[n](t,e),e)),[])),o.u=t=>t+".js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="@kenyaemr/esm-patient-registration-app:",o.l=(n,r,i,a)=>{if(t[n])t[n].push(r);else{var u,s;if(void 0!==i)for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++){var f=c[l];if(f.getAttribute("src")==n||f.getAttribute("data-webpack")==e+i){u=f;break}}u||(s=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,o.nc&&u.setAttribute("nonce",o.nc),u.setAttribute("data-webpack",e+i),u.src=n),t[n]=[r];var d=(e,r)=>{u.onerror=u.onload=null,clearTimeout(p);var o=t[n];if(delete t[n],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach((t=>t(r))),e)return e(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),s&&document.head.appendChild(u)}},o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{o.S={};var t={},e={};o.I=(n,r)=>{r||(r=[]);var i=e[n];if(i||(i=e[n]={}),!(r.indexOf(i)>=0)){if(r.push(i),t[n])return t[n];o.o(o.S,n)||(o.S[n]={});var a=o.S[n],u="@kenyaemr/esm-patient-registration-app",s=(t,e,n,r)=>{var o=a[t]=a[t]||{},i=o[e];(!i||!i.loaded&&(!r!=!i.eager?r:u>i.from))&&(o[e]={get:n,from:u,eager:!!r})},c=[];return"default"===n&&(s("@openmrs/esm-framework","4.2.1-pre.619",(()=>Promise.all([o.e(858),o.e(268)]).then((()=>()=>o(6858))))),s("react-i18next","11.18.6",(()=>Promise.all([o.e(62),o.e(268)]).then((()=>()=>o(7884))))),s("react-router-dom","6.4.3",(()=>Promise.all([o.e(591),o.e(268)]).then((()=>()=>o(6591))))),s("react","18.2.0",(()=>o.e(784).then((()=>()=>o(6292)))))),t[n]=c.length?Promise.all(c).then((()=>t[n]=1)):1}}})(),(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),(()=>{var t=t=>{var e=t=>t.split(".").map((t=>+t==t?+t:t)),n=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(t),r=n[1]?e(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,e(n[2]))),n[3]&&(r.push([]),r.push.apply(r,e(n[3]))),r},e=t=>{var n=t[0],r="";if(1===t.length)return"*";if(n+.5){r+=0==n?">=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var o=1,i=1;i<t.length;i++)o--,r+="u"==(typeof(u=t[i]))[0]?"-":(o>0?".":"")+(o=2,u);return r}var a=[];for(i=1;i<t.length;i++){var u=t[i];a.push(0===u?"not("+s()+")":1===u?"("+s()+" || "+s()+")":2===u?a.pop()+" "+a.pop():e(u))}return s();function s(){return a.pop().replace(/^\((.+)\)$/,"$1")}},n=(e,r)=>{if(0 in e){r=t(r);var o=e[0],i=o<0;i&&(o=-o-1);for(var a=0,u=1,s=!0;;u++,a++){var c,l,f=u<e.length?(typeof e[u])[0]:"";if(a>=r.length||"o"==(l=(typeof(c=r[a]))[0]))return!s||("u"==f?u>o&&!i:""==f!=i);if("u"==l){if(!s||"u"!=f)return!1}else if(s)if(f==l)if(u<=o){if(c!=e[u])return!1}else{if(i?c>e[u]:c<e[u])return!1;c!=e[u]&&(s=!1)}else if("s"!=f&&"n"!=f){if(i||u<=o)return!1;s=!1,u--}else{if(u<=o||l<f!=i)return!1;s=!1}else"s"!=f&&"n"!=f&&(s=!1,u--)}}var d=[],p=d.pop.bind(d);for(a=1;a<e.length;a++){var h=e[a];d.push(1==h?p()|p():2==h?p()&p():h?n(h,r):!p())}return!!p()},r=(e,n)=>{var r=e[n];return Object.keys(r).reduce(((e,n)=>!e||!r[e].loaded&&((e,n)=>{e=t(e),n=t(n);for(var r=0;;){if(r>=e.length)return r<n.length&&"u"!=(typeof n[r])[0];var o=e[r],i=(typeof o)[0];if(r>=n.length)return"u"==i;var a=n[r],u=(typeof a)[0];if(i!=u)return"o"==i&&"n"==u||"s"==u||"u"==i;if("o"!=i&&"u"!=i&&o!=a)return o<a;r++}})(e,n)?n:e),0)},i=(t,o,i,u)=>{var s=r(t,i);return n(u,s)||"undefined"!=typeof console&&console.warn&&console.warn(((t,n,r,o)=>"Unsatisfied version "+r+" from "+(r&&t[n][r].from)+" of shared singleton module "+n+" (required "+e(o)+")")(t,i,s,u)),a(t[i][s])},a=t=>(t.loaded=1,t.get()),u=(t=>function(e,n,r,i){var a=o.I(e);return a&&a.then?a.then(t.bind(t,e,o.S[e],n,r,i)):t(e,o.S[e],n,r,i)})(((t,e,n,r,a)=>e&&o.o(e,n)?i(e,0,n,r):a())),s={},c={4924:()=>u("default","react-i18next",[1,11],(()=>o.e(62).then((()=>()=>o(7884))))),8744:()=>u("default","react-router-dom",[1,6],(()=>o.e(591).then((()=>()=>o(6591))))),268:()=>u("default","react",[1,18],(()=>o.e(784).then((()=>()=>o(6292))))),906:()=>u("default","@openmrs/esm-framework",[1,4],(()=>o.e(858).then((()=>()=>o(6858)))))};[906,268].forEach((t=>{o.m[t]=e=>{s[t]=0,delete o.c[t];var n=c[t]();if("function"!=typeof n)throw new Error("Shared module is not available for eager consumption: "+t);e.exports=n()}}));var l={268:[268],822:[8744],924:[4924]};o.f.consumes=(t,e)=>{o.o(l,t)&&l[t].forEach((t=>{if(o.o(s,t))return e.push(s[t]);var n=e=>{s[t]=0,o.m[t]=n=>{delete o.c[t],n.exports=e()}},r=e=>{delete s[t],o.m[t]=n=>{throw delete o.c[t],e}};try{var i=c[t]();i.then?e.push(s[t]=i.then(n).catch(r)):n(i)}catch(t){r(t)}}))}})(),(()=>{var t={179:0,268:0,68:0,9:0};o.f.j=(e,n)=>{var r=o.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(268|924)$/.test(e))t[e]=0;else{var i=new Promise(((n,o)=>r=t[e]=[n,o]));n.push(r[2]=i);var a=o.p+o.u(e),u=new Error;o.l(a,(n=>{if(o.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;u.message="Loading chunk "+e+" failed.\n("+i+": "+a+")",u.name="ChunkLoadError",u.type=i,u.request=a,r[1](u)}}),"chunk-"+e,e)}};var e=(e,n)=>{var r,i,[a,u,s]=n,c=0;if(a.some((e=>0!==t[e]))){for(r in u)o.o(u,r)&&(o.m[r]=u[r]);s&&s(o)}for(e&&e(n);c<a.length;c++)i=a[c],o.o(t,i)&&t[i]&&t[i][0](),t[i]=0},n=globalThis.webpackChunk_kenyaemr_esm_patient_registration_app=globalThis.webpackChunk_kenyaemr_esm_patient_registration_app||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),o.nc=void 0,o(7068)})();
|