@openmrs/esm-devtools-app 3.4.1-pre.96 → 4.0.0-pre.1

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/889.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 889.js.LICENSE.txt */
2
- (self.webpackChunk_openmrs_esm_devtools_app=self.webpackChunk_openmrs_esm_devtools_app||[]).push([[889],{159:(t,e,n)=>{function r(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}var o=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};System.register(["@openmrs/esm-config","@openmrs/esm-error-handling"],(function(t,e){var i={},u={};return{setters:[function(t){i.Type=t.Type,i.defineConfigSchema=t.defineConfigSchema,i.getConfig=t.getConfig,i.navigate=t.navigate,i.validators=t.validators},function(t){u.reportError=t.reportError}],execute:function(){t(function(){var t={672:function(t,e){var n,r,o;r=e,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",((n=function(t){this.message=t}).prototype=new Error).name="InvalidCharacterError",r.btoa||(r.btoa=function(t){for(var e,r,i=String(t),u=0,a=o,c="";i.charAt(0|u)||(a="=",u%1);c+=a.charAt(63&e>>8-u%1*8)){if((r=i.charCodeAt(u+=3/4))>255)throw new n("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");e=e<<8|r}return c}),r.atob||(r.atob=function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,u=0,a=0,c="";i=e.charAt(a++);~i&&(r=u%4?64*r+i:i,u++%4)?c+=String.fromCharCode(255&r>>(-2*u&6)):0)i=o.indexOf(i);return c})},525:function(t){(function(){var e,n,r=function(t,r,o,i){n.defer(),e.search(t).then((function(t){u(t,r).then((function(){o()}),(function(t){i(t)}))}),(function(t){i(t)}))},o=function(t){var e=n.defer(),o=[];return r(t,(function(t){t.forEach((function(t){o.push(t)}))}),(function(){e.resolve(o)}),(function(t){e.reject(t)})),e.promise},i=function(t,r){var o=n.defer();return e.search(t).then((function(t){var n={},i=[function(){o.resolve(t,n)}];function u(){i.pop()()}var a=t.data;a.entry&&a.entry.forEach((function(t){var o=t.resource,c=o.resourceType;r&&r.forEach((function(t){var r,s,l,f=t.split("."),d=f[0],p=f[1],h=o[p];if(c===d&&h){var v=h.reference;n[v]||(r=a,s=o,l=h,i.push((function(){!function(t,r,o){var i=o.reference;e.resolve({bundle:t,resource:r,reference:o}).then((function(t){var e=t.data||t.content;n[i]=e,u()}))}(r,s,l)})))}}))})),u()}),(function(){o.reject("Could not fetch search results")})),o.promise};function u(t,r){var o,i=t.data.entry||[],a=[];for(o=0;o<i.length;o++)a.push(i[o].resource);r(a);var c=n.defer();return e.nextPage({bundle:t.data}).then((function(t){u(t,r).then((function(t){c.resolve()}))}),(function(t){c.resolve()})),c.promise}t.exports=function(t,u){return e=t,n=u,t.drain=r,t.fetchAll=o,t.fetchAllWithReferences=i,t}}).call(this)},256:function(t,e,n){(function(){n(454);var e=n(801),r=n(921),o=n(294),i=n(821),u=n(442),a=n(856),c=n(719),s=n(29),l=n(723),f=n(249),d=n(525);t.exports=function(t,n){var p=e.Middleware,h=e.$$Attr,v=function(t){return h("method",t)},y=function(t,e){return h("headers."+t,e)},g=p(u),m=p(a(t,n)).and(g).and(o.$Basic).and(o.$Bearer).and(o.$Credentials).and(i.$JsonData).and(y("Accept",t.headers&&t.headers.Accept?t.headers.Accept:"application/json")).and(y("Content-Type",t.headers&&t.headers["Content-Type"]?t.headers["Content-Type"]:"application/json")),b=m.and(v("GET")),w=m.and(v("POST")),_=m.and(v("PUT")),S=m.and(v("DELETE")),x=m.and(v("PATCH")),O=i.Http(t,n),j=f.Path,E=j(t.baseUrl),C=E.slash(":type || :resource.resourceType"),k=C.slash("_history"),A=C.slash(":id || :resource.id"),P=A.slash("_history"),I=A.slash(":versionId || :resource.meta.versionId"),T=E.slash(":target.resourceType || :target.type").slash(":target.id").slash(":target.versionId"),L=y("Prefer","return=representation"),R=p(r.$Paging);return d({conformance:b.and(E.slash("metadata")).end(O),document:w.and(E.slash("Document")).end(O),profile:b.and(E.slash("Profile").slash(":type")).end(O),transaction:w.and(E).end(O),history:b.and(E.slash("_history")).and(R).end(O),typeHistory:b.and(k).and(R).end(O),resourceHistory:b.and(P).and(R).end(O),read:b.and(s.$WithPatient).and(A).end(O),vread:b.and(I).end(O),delete:S.and(A).and(L).end(O),create:w.and(C).and(L).end(O),validate:w.and(C.slash("_validate")).end(O),meta:{add:w.and(T.slash("$meta-add")).end(O),delete:w.and(T.slash("$meta-delete")).end(O),read:b.and(T.slash("$meta")).end(O)},search:b.and(C).and(s.$WithPatient).and(r.$SearchParams).and(R).end(O),update:_.and(A).and(L).end(O),conditionalUpdate:_.and(C).and(r.$SearchParams).and(L).end(O),conditionalDelete:S.and(C).and(r.$SearchParams).and(L).end(O),nextPage:b.and(c.$$BundleLinkUrl("next")).end(O),prevPage:b.and(c.$$BundleLinkUrl("previous")).and(c.$$BundleLinkUrl("prev")).end(O),getBundleByUrl:b.and(j(":url")).end(O),resolve:b.and(l.resolve).end(O),patch:x.and(A).and(y("Content-Type","application/json-patch+json")).end(O)},n)}}).call(this)},294:function(t,e,n){(function(){var t,r=n(801),o=n(672).btoa;e.$Basic=r.$$Attr("headers.Authorization",(function(t){if(t.auth&&t.auth.user&&t.auth.pass)return"Basic "+o(t.auth.user+":"+t.auth.pass)})),e.$Bearer=r.$$Attr("headers.Authorization",(function(t){if(t.auth&&t.auth.bearer)return"Bearer "+t.auth.bearer})),e.$Credentials=r.Middleware(r.$$Attr("credentials",(function(e){return t=e.credentials,""}))).and(r.$$Attr("credentials",(function(e){if(["same-origin","include"].indexOf(t)>-1)return t})))}).call(this)},719:function(t,e){e.$$BundleLinkUrl=function(t){return function(e){return function(n){var r=n.bundle&&(n.bundle.link||[]).filter((function(e){return e.relation&&e.relation===t}))[0];return r&&r.url&&(n.url=r.url,n.data=null),e(n)}}}},856:function(t){(function(){var e=function(t,e,n){var r=t[n];return r&&!e[n]&&(e[n]=r),t};t.exports=function(t,n){return function(r){return function(o){return e(t,o,"baseUrl"),e(t,o,"cache"),e(t,o,"auth"),e(t,o,"patient"),e(t,o,"debug"),e(t,o,"credentials"),e(t,o,"headers"),e(t,o,"agentOptions"),e(n,o,"defer"),e(n,o,"http"),r(o)}}}}).call(this)},801:function(t,e,n){(function(){var t=n(454),r=function(t){return t.and=function(e){return r((n=t,o=e,function(t){return n(o(t))}));var n,o},t.end=function(e){return t(e)},t};e.$$Simple=function(t){return function(e){return function(n){return e(t(n))}}},e.$$Attr=function(e,n){return r((function(r){return function(o){var i;return i="function"==t.type(n)?n(o):n,r(null==i&&null==i?o:function(t,e,n){for(var r=e.split("."),o=t,i=0;i<r.length-1;i++){var u=r[i];(o=t[u])||(o={},t[u]=o)}return o[r[r.length-1]]=n,t}(o,e,i))}}))};var o=function(t,e){return r((function(n){return function(r){return r[t]=e(r),n(r)}}))};e.Middleware=r,e.Attribute=o,e.Method=function(t){return o("method",(e=t,function(){return e}));var e}}).call(this)},442:function(t){t.exports=function(t){return function(e){try{return t(e)}catch(t){if(e.debug&&(console.log("\nDEBUG: (ERROR in middleware)"),console.log(t.message),console.log(t.stack)),!e.defer)throw console.log("\nDEBUG: (ERROR in middleware)"),console.log(t.message),console.log(t.stack),new Error("I need adapter.defer");var n=e.defer();return n.reject(t),n.promise}}}},821:function(t,e,n){(function(){var t=n(454);e.Http=function(t,e){return function(n){n.debug&&console.log("\nDEBUG (request):",n.method,n.url,n);var r=(n.http||e.http||t.http)(n);return n.debug&&r&&r.then&&r.then((function(t){console.log("\nDEBUG: (responce)",t)})),r}},e.$JsonData=function(e){return function(n){var r,o=n.bundle||n.data||n.resource;return o&&(n.data=(r=o,"object"==t.type(r)||"array"==t.type(r)?JSON.stringify(r):r)),e(n)}}}).call(this)},29:function(t,e,n){(function(){var t=n(801),r=["Account","AllergyIntolerance","BodySite","CarePlan","Claim","ClinicalImpression","Communication","CommunicationRequest","Composition","Condition","Contract","DetectedIssue","Device","DeviceUseRequest","DeviceUseStatement","DiagnosticOrder","DiagnosticReport","DocumentManifest","DocumentReference","Encounter","EnrollmentRequest","EpisodeOfCare","FamilyMemberHistory","Flag","Goal","ImagingObjectSelection","ImagingStudy","Immunization","ImmunizationRecommendation","List","Media","MedicationAdministration","MedicationDispense","MedicationOrder","MedicationStatement","NutritionOrder","Observation","Order","Procedure","ProcedureRequest","QuestionnaireResponse","ReferralRequest","RelatedPerson","RiskAssessment","Specimen","SupplyDelivery","SupplyRequest","VisionPrescription"];e.$WithPatient=t.$$Simple((function(t){var e=t.type;return t.patient&&("Patient"===e?(t.query=t.query||{},t.query._id=t.patient,t.id=t.patient):r.indexOf(e)>=0&&(t.query=t.query||{},t.query.patient=t.patient)),t}))}).call(this)},723:function(t,e,n){(function(){var e=n(454),r=/^#(.*)/,o=function(t){var n,o,i,u,a=t.cache,c=t.reference,s=t.bundle,l=c;if(!l.reference)return null;if(l.reference.match(r))return n=l.reference,o=t.resource,i=n.match(r)[1],(u=(o.contained||[]).filter((function(t){return(t.id||t._id)==i}))[0])&&{content:u}||null;var f=e.absoluteUrl(t.baseUrl,l.reference);return(s&&s.entry||[]).filter((function(t){return t.id===f}))[0]||(null!=a?a[f]:void 0)||null};t.exports.sync=o,t.exports.resolve=function(t){return function(n){var i=o(n),u=n.reference,a=n.defer();if(i){if(!n.defer)throw new Error("I need promise constructor 'adapter.defer' in adapter");return a.resolve(i),a.promise}if(!u)throw new Error("No reference found");if(u&&u.reference.match(r))throw new Error("Contained resource not found");return n.url=e.absoluteUrl(n.baseUrl,u.reference),n.data=null,t(n)}}}).call(this)},921:function(t,e,n){(function(){var t=n(454),r=t.type,o=t.assertArray,i=(t.assertObject,t.reduceMap),u=t.identity,a={$gt:"gt",$lt:"lt",$lte:"lte",$gte:"gte",$ge:"ge",$le:"le"},c={$asc:":asc",$desc:":desc",$exact:":exact",$missing:":missing",$null:":missing",$text:":text"},s=function(t,e){if("$sort"===t)return function(t){var e,n,i,u;for(o(t),i=[],e=0,n=t.length;e<n;e++)switch(u=t[e],r(u)){case"array":i.push({param:"_sort",value:u[0],modifier:":"+u[1]});break;case"string":i.push({param:"_sort",value:u});break;default:i.push(void 0)}return i}(e);if("$has"===t)return i(e,(function(t,e){var n,o;return n=e[0],o=e[1],t.concat(function(){switch(r(o)){case"array":return o.map((function(t){return{param:"_has",value:n+"="+t}}));case"string":return[{param:"_has",value:n+"="+o}]}}())}));if("$include"===t||"$revInclude"===t)return n=t,i(e,(function(t,e){var o,i;return o=e[0],i=e[1],t.concat(function(){switch(r(i)){case"array":return i.map((function(t){return{param:"$include"===n?"_include":"_revinclude",value:o+":"+t}}));case"string":return[{param:"$include"===n?"_include":"_revinclude",value:o+":"+i}]}}())}));var n,u,l;switch(r(e)){case"object":return u=t,i(l=e,(function(t,e){var n,i,f,d;return n=e[0],d=e[1],t.concat("$and"===n?o(d).reduce((function(t,e){return t.concat(s(u,e))}),[]):"$type"===n?[]:0===n.indexOf("$")?(i={param:u},"$or"===n?i.value=d:(a[n]&&(i.operator=a[n]),c[n]&&(i.modifier=c[n]),"object"===r(d)&&d.$or?i.value=d.$or:i.value=[d]),[i]):(l.$type&&(f=":"+l.$type),s(""+u+(f||"")+"."+n,d)))}));case"string":case"number":return[{param:t,value:[e]}];case"array":return[{param:t,value:[e.join("|")]}];default:throw"could not linearizeParams "+r(e)}},l=function(t){return i(t,(function(t,e){var n,r;return n=e[0],r=e[1],t.concat(s(n,r))}))},f=function(t){var e,n,r=["_include","_revinclude","_has"];return function(){var o,i,a,c;for(c=[],o=0,i=(a=l(t)).length;o<i;o++)e=a[o],n=-1===r.indexOf(e.param)?encodeURIComponent(e.value):e.value,c.push([e.param,e.modifier,"_has"==e.param?":":"=",e.operator,n].filter(u).join(""));return c}().join("&")};e._query=l,e.query=f;var d=n(801);e.$SearchParams=d.$$Attr("url",(function(t){var e=t.url;return t.query?e+"?"+f(t.query):e})),e.$Paging=function(t){return function(e){var n=e.params||{};return e.since&&(n._since=e.since),e.count&&(n._count=e.count),e.params=n,t(e)}}}).call(this)},249:function(t,e,n){(function(){n(454);var t=n(801),r=function(e,n){var o=function(t){return n&&e.includes("target.versionId")&&!t.target.versionId?n(t):(n&&n(t)+"/"||"")+function(t,e){var n,r,o=(r=e,0==(n=t.trim()).indexOf(":")?function(t,e){for(var n,r=t.split("||").map((function(t){return t.trim().substring(1)})),o=0;o<r.length;o++){var i=(n=e,r[o].split(".").reduce((function(t,e){return"versionId"===e&&t[e]?"_history/"+t[e]:null==t||null==t?null:t[e]}),n));if(i)return i}return null}(n,r):n);if((null==o||void 0===o)&&0==t.includes("target.versionId"))throw new Error("Parameter "+t+" is required: "+JSON.stringify(e));return o}(e,t)},i=t.Attribute("url",o);return i.slash=function(t){return r(t,o)},i};e.Path=r}).call(this)},454:function(t,e,n){(function(){var t=n(651),r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;e.trim=function(t){return t?t.toString().replace(r,""):""};var o=function(t){return null==t&&void 0===t?String(t):{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"}[Object.prototype.toString.call(t)]};e.type=o,e.assertArray=function(t){if("array"!==o(t))throw"not array";return t};var i=function(t){if("object"!==o(t))throw"not object";return t};e.assertObject=i;var u=function(t,e,n){var r,o;return n||(n=[]),i(t),function(){var e;for(r in e=[],t)o=t[r],e.push([r,o]);return e}().reduce(e,n)};e.reduceMap=u,e.identity=function(t){return t};var a=function(){return Array.prototype.slice.call(arguments)};e.argsArray=a,e.mergeLists=function(){var e;return e=function(e,n){var r,o,i;for(r in o=t(!0,e),n)i=n[r],o[r]=(o[r]||[]).concat(i);return o},a.apply(null,arguments).reduce(e,{})},e.absoluteUrl=function(t,e){return e.match(/https?:\/\/./)?e:t+"/"+e},e.relativeUrl=function(t,e){return e.slice(e,t.length+1)===t+"/"?e.slice(t.length+1):e},e.resourceIdToUrl=function(t,e,n){return e=e.replace(/\/$/,""),(t=t.replace(/^\//,"")).indexOf("/")<0?e+"/"+n+"/"+t:0!==t.indexOf(e)?e+"/"+t:t};var c=function(t,e,n,r){var i;switch(o(n)){case"array":return e(n.map((function(e){return t(e,[n,r])})),r);case"object":return i=function(e,o){var i,u;return i=o[0],u=o[1],e[i]=t(u,[n].concat(r)),e},e(u(n,i,{}),r);default:return e(n,r)}};e.walk=c;var s=function(t,e,n){return e?c(s(t),t,e,n):function(e,n){return s(t,e,n)}};e.postwalk=s}).call(this)},651:function(t,e,n){!function(e){var n=function(t,e,n){var u=n[0],a=n.length;(t||"object"!==r(u))&&(u={});for(var c=0;c<a;++c){var s=n[c];if("object"===r(s))for(var l in s)if("__proto__"!==l){var f=t?o.clone(s[l]):s[l];u[l]=e?i(u[l],f):f}}return u},r=function(t){return{}.toString.call(t).slice(8,-1).toLowerCase()},o=function(t){return n(!0===t,!1,arguments)};function i(t,e){if("object"!==r(t))return e;for(var n in e)"object"===r(t[n])&&"object"===r(e[n])?t[n]=i(t[n],e[n]):t[n]=e[n];return t}o.recursive=function(t){return n(!0===t,!0,arguments)},o.clone=function(t){var e,n,i=t,u=r(t);if("array"===u)for(i=[],n=t.length,e=0;e<n;++e)i[e]=o.clone(t[e]);else if("object"===u)for(e in i={},t)i[e]=o.clone(t[e]);return i},e?t.exports=o:window.merge=o}((t=n.nmd(t))&&"object"==typeof t.exports&&t.exports)},602:function(t){var e=function(t){"use strict";var e,n=function(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]},o=function(t,e,n,o){var a,c,s,l,f=e&&r(e.prototype,u)?e:u,d=Object.create(f.prototype),h=new p(o||[]);return d._invoke=(a=t,c=n,s=h,l=S,function(t,e){if(l===O)throw new Error("Generator is already running");if(l===j){if("throw"===t)throw e;return v()}for(s.method=t,s.arg=e;;){var n=s.delegate;if(n){var r=I(n,s);if(r){if(r===E)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(l===S)throw l=j,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l=O;var o=i(a,c,s);if("normal"===o.type){if(l=s.done?j:x,o.arg===E)continue;return{value:o.arg,done:s.done}}"throw"===o.type&&(l=j,s.method="throw",s.arg=o.arg)}}),d},i=function(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}},u=function(){},a=function(){},c=function(){},s=function(t){["next","throw","return"].forEach((function(e){n(t,e,(function(t){return this._invoke(e,t)}))}))},l=function(t,e){function n(r,o,u,a){var c=i(t[r],t,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&g.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,u,a)}),(function(t){n("throw",t,u,a)})):e.resolve(l).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,a)}))}a(c.arg)}var r;this._invoke=function(t,o){function i(){return new e((function(e,r){n(t,o,e,r)}))}return r=r?r.then(i,i):i()}},f=function(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)},d=function(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e},p=function(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)},h=function(t){if(t){var n=t[b];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(g.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:e,done:!0}},y=Object.prototype,g=y.hasOwnProperty,m="function"==typeof Symbol?Symbol:{},b=m.iterator||"@@iterator",w=m.asyncIterator||"@@asyncIterator",_=m.toStringTag||"@@toStringTag";try{n({},"")}catch(t){n=function(t,e,n){return t[e]=n}}t.wrap=o;var S="suspendedStart",x="suspendedYield",O="executing",j="completed",E={},C={};n(C,b,(function(){return this}));var k=Object.getPrototypeOf,A=k&&k(k(h([])));A&&A!==y&&g.call(A,b)&&(C=A);var P=c.prototype=u.prototype=Object.create(C);function I(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method))return E;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return E}var o=i(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,E;var u=o.arg;return u?u.done?(n[t.resultName]=u.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,E):u:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,E)}return a.prototype=c,n(P,"constructor",c),n(c,"constructor",a),a.displayName=n(c,_,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===a||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,n(t,_,"GeneratorFunction")),t.prototype=Object.create(P),t},t.awrap=function(t){return{__await:t}},s(l.prototype),n(l.prototype,w,(function(){return this})),t.AsyncIterator=l,t.async=function(e,n,r,i,u){void 0===u&&(u=Promise);var a=new l(o(e,n,r,i),u);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},s(P),n(P,_,"Generator"),n(P,b,(function(){return this})),n(P,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=h,p.prototype={constructor:p,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(d),!t)for(var n in this)"t"===n.charAt(0)&&g.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){var n=function(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o};if(this.done)throw t;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),c=g.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,E):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),E},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),d(n),E}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;d(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:h(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),E}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},385:function(){System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.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(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=function(t){for(var e=[],n=0;n<o.length;n++)o[n]===t?t=null:e.push(o[n]);o=e},r=function(n,r,i){e=r?n:t(t({},e),n);for(var u=o,a=0;a<u.length;a++)u[a](e,i)},o=[];return e=e||{},{action:function(t){var n=function(e){r(e,!1,t)};return function(){for(var r=arguments,o=[e],i=0;i<arguments.length;i++)o.push(r[i]);var u=t.apply(this,o);if(null!=u)return u.then?u.then(n):n(u)}},setState:r,subscribe:function(t){return o.push(t),function(){n(t)}},unsubscribe:n,getState:function(){return e}}},n=function(t,n){var r=s[t];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=e(n);return s[t]={value:o,active:!0},o},i=function(t,n){var r=s[t];if(!r){var o=e(n);return s[t]={value:o,active:!1},o}return r.value},u=function(t){return n("app",t)},a=function(){return i("app",{})},c=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return u},createGlobalStore:function(){return n},getAppState:function(){return a},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},824:function(t){"use strict";t.exports=i},254:function(t){"use strict";t.exports=u}},a={};function c(e){var n=a[e];if(void 0!==n)return n.exports;var r=a[e]={id:e,loaded:!1,exports:{}};return t[e].call(r.exports,r,r.exports,c),r.loaded=!0,r.exports}c.y=e,c.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return c.d(e,{a:e}),e},c.d=function(t,e){for(var n in e)c.o(e,n)&&!c.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),c.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},c.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},c.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){var t;c.g.importScripts&&(t=c.g.location+"");var e=c.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(/\/[^\/]+$/,"/"),c.p=t}();var s={};return(0,c(968).s)(1),function(){"use strict";var t=function(t,e){function n(){this.constructor=t}Z(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},e=function(t){return"function"==typeof t},i=function(t){setTimeout((function(){throw t}),0)},u=function(t){return t.reduce((function(t,e){return t.concat(r(e,X)?e.errors:e)}),[])},a=function(t){return t},l=function(t){return 0===t.length?a:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}},f=function(t){if(t||(t=J.Promise||Promise),!t)throw new Error("no Promise impl found");return t},d=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},p=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){d(i,r,o,u,a,"next",t)}function a(t){d(i,r,o,u,a,"throw",t)}u(void 0)}))}},h=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}},v=function(t,e){return!e||"object"!==Et(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},y=function(t){return window.openmrsBase+t},g=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof t)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof e)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");var n=y(t);e.headers||(e.headers={}),_t(e.body)&&(e.body=JSON.stringify(e.body)),void 0===e.headers.Accept&&(e.headers.Accept="application/json"),null===e.headers.Accept&&delete e.headers.Accept;var r,o=Error();return window.fetch(n,e).then((r=p(W().mark((function t(e){var r,i;return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e).ok){t.next=10;break}if(204!==r.status){t.next=7;break}return r.data=null,t.abrupt("return",r);case 7:return t.abrupt("return",r.text().then((function(t){try{t&&(r.data=JSON.parse(t))}catch(t){}return r})));case 8:t.next=19;break;case 10:return t.next=12,(0,St.getConfig)("@openmrs/esm-api");case 12:if(i=t.sent.redirectAuthFailure,!(n===y(kt)&&403===r.status||i.enabled&&i.errors.includes(r.status))){t.next=18;break}return(0,St.navigate)({to:i.url}),t.abrupt("return",i.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return t.abrupt("return",r.text().then((function(t){var e=t;try{e=JSON.parse(t)}catch(t){}throw new At(n,r,e,o)}),(function(t){throw new At(n,r,null,o)})));case 19:case"end":return t.stop()}}),t)}))),function(t){return r.apply(this,arguments)}))},m=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof e)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return e.signal=n.signal,new it((function(r){var o=!1;return g(t,e).then((function(t){o=!0,r.next(t),r.complete()}),(function(t){o=!0,r.error(t)})),function(){o||n.abort()}}))},b=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},w=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){b(i,r,o,u,a,"next",t)}function a(t){b(i,r,o,u,a,"throw",t)}u(void 0)}))}},_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(Rt<Date.now()-6e4||!Lt.getState().loaded)&&x(),new it((function(e){var n=function(n){var r;n.loaded&&(t.includeAuthStatus?e.next(n.session):e.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(Lt.getState()),Lt.subscribe(n)}))},S=function(){return(Rt<Date.now()-6e4||!Lt.getState().loaded)&&x(),Lt},x=function(){return new Promise((function(t,e){Rt=Date.now(),g(kt).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return e(),Promise.reject();var r,o,i,u,a;(a=null!==(u=null==(r=n.data)||null===(o=r.user)||void 0===o||null===(i=o.userProperties)||void 0===i?void 0:i.defaultLocale)&&void 0!==u?u:r.locale)!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",a),t(n.data),Lt.setState({loaded:!0,session:n.data})})).catch((function(t){return(0,Tt.reportError)("Failed to fetch new session information: ".concat(t)),e(t),{sessionId:"",authenticated:!1}}))}))},O=function(){Lt.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},j=function(t,e){return n=t,e.privileges.find((function(t){return n===t.display}))||e.roles.find((function(t){return"System Developer"===t.display}));var n},E=function(){var t,e;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(t=r.session.user,n(r.session.user),e&&e())};o(Lt.getState()),t||(e=Lt.subscribe(o))}))},C=function(){return new Promise((function(t,e){var n=_().subscribe((function(e){t(e.sessionLocation),n.unsubscribe()}),e)}))},k=function(t,e){return Mt.apply(this,arguments)},A=function(){(0,St.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:St.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:St.Type.String,_default:"${openmrsSpaBase}/login",_validators:[St.validators.isUrl]},errors:{_type:St.Type.Array,_default:[401],_elements:{_type:St.Type.Number,_validators:[St.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:St.Type.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}}}),x()},P=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},I=function(t,e){return t?It.read(function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){P(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({type:"Patient",patient:t},e)):Promise.resolve(null)},T=function(t){return function(e){return 0===t?qt:e.lift(new Wt(t))}},L=function(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Gt(t,e))}},R=function(t,e,n){var r=null!=n?n:Yt;return m("/ws/rest/v1/visit?patient=".concat(t,"&v=").concat(r),{signal:e.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(T(1)).pipe(L((function(t){return t})))},M=function(t,e){return m("/ws/rest/v1/visit",{signal:e.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},D=function(t,e,n){return m("/ws/rest/v1/visit/".concat(t),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},B=function(t){return{uuid:t.uuid,display:t.display,name:t.name}},N=function(){return m("/ws/rest/v1/visittype").pipe(L((function(t){return t.data.results.map(B)}))).pipe(T(1))},U=function(t){return{uuid:t.uuid,display:t.display}},H=function(){return m("/ws/rest/v1/location").pipe(L((function(t){return t.data.results.map(U)}))).pipe(T(1))};c.r(s),c.d(s,{OpenmrsFetchError:function(){return At},VisitMode:function(){return Dt},VisitStatus:function(){return Bt},backendDependencies:function(){return Xt},clearCurrentUser:function(){return O},defaultVisitCustomRepresentation:function(){return Yt},fetchCurrentPatient:function(){return I},fhir:function(){return It},fhirBaseUrl:function(){return Pt},getCurrentUser:function(){return _},getLocations:function(){return H},getLoggedInUser:function(){return E},getSessionLocation:function(){return C},getSessionStore:function(){return S},getStartedVisit:function(){return Qt},getVisitTypes:function(){return N},getVisitsForPatient:function(){return R},makeUrl:function(){return y},openmrsFetch:function(){return g},openmrsObservableFetch:function(){return m},refetchCurrentUser:function(){return x},saveVisit:function(){return M},sessionEndpoint:function(){return kt},setSessionLocation:function(){return k},setupApiModule:function(){return A},toLocationObject:function(){return U},toVisitTypeObject:function(){return B},updateVisit:function(){return D},userHasAccess:function(){return j}});var F,V,$,z,K,q=c(602),W=c.n(q),Z=function(t,e){return(Z=Object.setPrototypeOf||r({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},G=!1,J={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack,G=t},get useDeprecatedSynchronousErrorHandling(){return G}},Y={closed:!0,next:function(t){},error:function(t){if(J.useDeprecatedSynchronousErrorHandling)throw t;i(t)},complete:function(){}},Q=Array.isArray||function(t){return t&&"number"==typeof t.length},X=(F=function(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this},F.prototype=Object.create(Error.prototype),F),tt=function(){var t,n=function(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)};return n.prototype.unsubscribe=function(){var t;if(!this.closed){var o,i=this,a=i._parentOrParents,c=i._ctorUnsubscribe,s=i._unsubscribe,l=i._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r(a,n))a.remove(this);else if(null!==a)for(var f=0;f<a.length;++f)a[f].remove(this);if(e(s)){c&&(this._unsubscribe=void 0);try{s.call(this)}catch(e){t=r(e,X)?u(e.errors):[e]}}if(Q(l)){f=-1;for(var d=l.length;++f<d;){var p=l[f];if(null!==(o=p)&&"object"==typeof o)try{p.unsubscribe()}catch(e){t=t||[],r(e,X)?t=t.concat(u(e.errors)):t.push(e)}}}if(t)throw new X(t)}},n.prototype.add=function(t){var e=t;if(!t)return n.EMPTY;switch(void 0===t?"undefined":o(t)){case"function":e=new n(t);case"object":if(e===this||e.closed||"function"!=typeof e.unsubscribe)return e;if(this.closed)return e.unsubscribe(),e;if(!r(e,n)){var i=e;(e=new n)._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var u=e._parentOrParents;if(null===u)e._parentOrParents=this;else if(r(u,n)){if(u===this)return e;e._parentOrParents=[u,this]}else{if(-1!==u.indexOf(this))return e;u.push(this)}var a=this._subscriptions;return null===a?this._subscriptions=[e]:a.push(e),e},n.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},n.EMPTY=((t=new n).closed=!0,t),n}(),et="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),nt=function(e){function n(t,o,i){var u=e.call(this)||this;switch(u.syncErrorValue=null,u.syncErrorThrown=!1,u.syncErrorThrowable=!1,u.isStopped=!1,arguments.length){case 0:u.destination=Y;break;case 1:if(!t){u.destination=Y;break}if("object"==typeof t){r(t,n)?(u.syncErrorThrowable=t.syncErrorThrowable,u.destination=t,t.add(u)):(u.syncErrorThrowable=!0,u.destination=new rt(u,t));break}default:u.syncErrorThrowable=!0,u.destination=new rt(u,t,o,i)}return u}return t(n,e),n.prototype[et]=function(){return this},n.create=function(t,e,r){var o=new n(t,e,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},n.prototype._next=function(t){this.destination.next(t)},n.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},n}(tt),rt=($=function(t,n,r,o){var i,u=V.call(this)||this;u._parentSubscriber=t;var a=u;return e(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==Y&&(e((a=Object.create(n)).unsubscribe)&&u.add(a.unsubscribe.bind(a)),a.unsubscribe=u.unsubscribe.bind(u))),u._context=a,u._next=i,u._error=r,u._complete=o,u},t($,V=nt),$.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;J.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},$.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=J.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):i(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;i(t)}}},$.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};J.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},$.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),J.useDeprecatedSynchronousErrorHandling)throw t;i(t)}},$.prototype.__tryOrSetError=function(t,e,n){if(!J.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return J.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(i(e),!0)}return!1},$.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},$),ot="function"==typeof Symbol&&Symbol.observable||"@@observable",it=function(){var t=function(t){this._isScalar=!1,t&&(this._subscribe=t)};return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var o=this.operator,i=function(t,e,n){if(t){if(r(t,nt))return t;if(t[et])return t[et]()}return t||e||n?new nt(t,e,n):new nt(Y)}(t,e,n);if(o?i.add(o.call(i,this.source)):i.add(this.source||J.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),J.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){J.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){var e=t,n=e.closed,o=e.destination,i=e.isStopped;if(n||i)return!1;t=o&&r(o,nt)?o:null}return!0}(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=f(e))((function(e,r){var o;o=n.subscribe((function(e){try{t(e)}catch(t){r(t),o&&o.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[ot]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:l(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=f(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}(),ut="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,at="object"==typeof self&&self&&self.Object===Object&&self,ct=(ut||at||Function("return this")()).Symbol,st=Object.prototype,lt=st.hasOwnProperty,ft=st.toString,dt=ct?ct.toStringTag:void 0,pt=Object.prototype.toString,ht=ct?ct.toStringTag:void 0,vt=(z=Object.getPrototypeOf,K=Object,function(t){return z(K(t))}),yt=Function.prototype,gt=Object.prototype,mt=yt.toString,bt=gt.hasOwnProperty,wt=mt.call(Object),_t=function(t){if(null==(e=t)||"object"!=typeof e||"[object Object]"!=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":ht&&ht in Object(t)?function(t){var e=lt.call(t,dt),n=t[dt];try{t[dt]=void 0;var r=!0}catch(t){}var o=ft.call(t);return r&&(e?t[dt]=n:delete t[dt]),o}(t):(e=t,pt.call(e));var e}(t))return!1;var e,n=vt(t);if(null===n)return!0;var o=bt.call(n,"constructor")&&n.constructor;return"function"==typeof o&&r(o,o)&&mt.call(o)==wt},St=c(824);function xt(t,e,n){return xt=h()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&jt(o,n.prototype),o},xt.apply(null,arguments)}function Ot(t){return(Ot=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function jt(t,e){return(jt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var Et=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":o(t)};function Ct(t){var e="function"==typeof Map?new Map:void 0;return Ct=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return xt(t,arguments,Ot(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),jt(r,t)},Ct(t)}var kt="/ws/rest/v1/session",At=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&jt(t,e)}(i,t);var e,n,o=(e=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=Ot(e);if(n){var o=Ot(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return v(this,t)});function i(t,e,n,u){var a;return function(t,e){if(!r(t,e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=o.call(this)).message="Server responded with ".concat(e.status," (").concat(e.statusText,") for url ").concat(t,". Check err.responseBody or network tab in dev tools for more info"),u.message=a.message,a.responseBody=n,a.response=e,a.stack="Stacktrace for outgoing request:\n".concat(u.stack,"\nStacktrace for incoming response:\n").concat(a.stack),a}return i}(Ct(Error)),Pt="/ws/fhir2/R4",It=c(256)({baseUrl:Pt},{http:function(t){return g(t.url,{method:t.method,headers:t.headers}).then((function(e){return{status:e.status,headers:e.headers,data:e.data,config:t}}),(function(e){return{status:e.response.status,headers:e.response.headers,data:e.responseBody,config:t}}))}}),Tt=c(254),Lt=(0,c(385).createGlobalStore)("session",{loaded:!1,session:null}),Rt=0;function Mt(){return(Mt=w(W().mark((function t(e,n){return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,g(kt,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:n.signal});case 2:x();case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Dt,Bt,Nt,Ut=function(){var t=function(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this};return t.prototype=Object.create(Error.prototype),t}(),Ht=function(e){var n=function(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r};return t(n,e),n.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},n}(tt),Ft=function(e){var n=function(t){var n=e.call(this,t)||this;return n.destination=t,n};return t(n,e),n}(nt),Vt=function(e){var n=function(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t};return t(n,e),n.prototype[et]=function(){return new Ft(this)},n.prototype.lift=function(t){var e=new $t(this,this);return e.operator=t,e},n.prototype.next=function(t){if(this.closed)throw new Ut;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].next(t)},n.prototype.error=function(t){if(this.closed)throw new Ut;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].error(t);this.observers.length=0},n.prototype.complete=function(){if(this.closed)throw new Ut;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},n.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},n.prototype._trySubscribe=function(t){if(this.closed)throw new Ut;return e.prototype._trySubscribe.call(this,t)},n.prototype._subscribe=function(t){if(this.closed)throw new Ut;return this.hasError?(t.error(this.thrownError),tt.EMPTY):this.isStopped?(t.complete(),tt.EMPTY):(this.observers.push(t),new Ht(this,t))},n.prototype.asObservable=function(){var t=new it;return t.source=this,t},n.create=function(t,e){return new $t(t,e)},n}(it),$t=function(e){var n=function(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r};return t(n,e),n.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},n.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},n.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},n.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):tt.EMPTY},n}(Vt),zt=function(e){var n=function(t){var n=e.call(this)||this;return n._value=t,n};return t(n,e),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),n.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},n.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Ut;return this._value},n.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},n}(Vt),Kt=function(){var t=function(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this};return t.prototype=Object.create(Error.prototype),t}(),qt=new it((function(t){return t.complete()})),Wt=function(){var t=function(t){if(this.total=t,this.total<0)throw new Kt};return t.prototype.call=function(t,e){return e.subscribe(new Zt(t,this.total))},t}(),Zt=function(e){var n=function(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r};return t(n,e),n.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},n}(nt),Gt=function(){var t=function(t,e){this.project=t,this.thisArg=e};return t.prototype.call=function(t,e){return e.subscribe(new Jt(t,this.project,this.thisArg))},t}(),Jt=function(e){var n=function(t,n,r){var o=e.call(this,t)||this;return o.project=n,o.count=0,o.thisArg=r||o,o};return t(n,e),n.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},n}(nt),Yt="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,value),location:(uuid,name,display),startDatetime,stopDatetime)",Qt=new zt(null);(Nt=Dt||(Dt={})).NEWVISIT="startVisit",Nt.EDITVISIT="editVisit",Nt.LOADING="loadingVisit",function(t){t.NOTSTARTED="notStarted",t.ONGOING="ongoing"}(Bt||(Bt={}));var Xt={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),s}())}}}))},810:()=>{function t(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}System.register(["@openmrs/esm-state"],(function(e,n){var r={};return{setters:[function(t){r.createGlobalStore=t.createGlobalStore}],execute:function(){e(function(){var e={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},685:function(t){"use strict";t.exports=r}},o={};function i(t){var n=o[t];if(void 0!==n)return n.exports;var r=o[t]={exports:{}};return e[t](r,r.exports,i),r.exports}i.y=n,i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;i.g.importScripts&&(t=i.g.location+"");var e=i.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(/\/[^\/]+$/,"/"),i.p=t}();var u={};return(0,i(968).s)(1),function(){"use strict";var e=function(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")},n=function(t){return t&&t.sensitive?"":"i"},r=function(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},o=function(t){return function(t){if(Array.isArray(t))return r(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 r(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)?r(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.")}()},a=function(e){return n=e.matcher,(null!=(r=RegExp)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):t(n,r))?e.matcher:"string"==typeof e.matcher?h(e.matcher):h(e.path);var n,r},c=function(t){return s([t])},s=function(t){var e=l(),n=t.map((function(t){return{matcher:a(t),settings:t}})),r=o(e).concat(o(n));v.setState(r,!0)},l=function(){return v.getState()},f=function(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},d=function(t,e){if(t.length>0){var n=y(t,e);if(n){for(var r=[n],o=y(t,n.settings.parent);void 0!==o;)r.push(o),o=y(t,o.settings.parent);return r.reverse()}}return[]},p=function(t){return d(l(),t)};function h(r,o,i){return t(r,RegExp)?function(t,e){if(!e)return t;var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return t}(r,o):Array.isArray(r)?(c=o,s=i,l=r.map((function(t){return h(t,c,s).source})),new RegExp("(?:"+l.join("|")+")",n(s))):(u=o,function(t,r,o){void 0===o&&(o={});for(var i=o.strict,u=void 0!==i&&i,a=o.start,c=void 0===a||a,s=o.end,l=void 0===s||s,f=o.encode,d=void 0===f?function(t){return t}:f,p="["+e(o.endsWith||"")+"]|$",h="["+e(o.delimiter||"/#?")+"]",v=c?"^":"",y=0,g=t;y<g.length;y++){var m=g[y];if("string"==typeof m)v+=e(d(m));else{var b=e(d(m.prefix)),w=e(d(m.suffix));if(m.pattern)if(r&&r.push(m),b||w)if("+"===m.modifier||"*"===m.modifier){var _="*"===m.modifier?"?":"";v+="(?:"+b+"((?:"+m.pattern+")(?:"+w+b+"(?:"+m.pattern+"))*)"+w+")"+_}else v+="(?:"+b+"("+m.pattern+")"+w+")"+m.modifier;else v+="("+m.pattern+")"+m.modifier;else v+="(?:"+b+w+")"+m.modifier}}if(l)u||(v+=h+"?"),v+=o.endsWith?"(?="+p+")":"$";else{var S=t[t.length-1],x="string"==typeof S?h.indexOf(S[S.length-1])>-1:void 0===S;u||(v+="(?:"+h+"(?="+p+"))?"),x||(v+="(?="+h+"|"+p+")")}return new RegExp(v,n(o))}(function(t,n){void 0===n&&(n={});for(var r=function(t){for(var e=[],n=0;n<t.length;){var r=t[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)e.push({type:"CHAR",index:n,value:t[n++]});else{var o=1,i="";if("?"===t[a=n+1])throw new TypeError('Pattern cannot start with "?" at '+a);for(;a<t.length;)if("\\"!==t[a]){if(")"===t[a]){if(0==--o){a++;break}}else if("("===t[a]&&(o++,"?"!==t[a+1]))throw new TypeError("Capturing groups are not allowed at "+a);i+=t[a++]}else i+=t[a++]+t[a++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);e.push({type:"PATTERN",index:n,value:i}),n=a}else{for(var u="",a=n+1;a<t.length;){var c=t.charCodeAt(a);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;u+=t[a++]}if(!u)throw new TypeError("Missing parameter name at "+n);e.push({type:"NAME",index:n,value:u}),n=a}else e.push({type:"CLOSE",index:n,value:t[n++]});else e.push({type:"OPEN",index:n,value:t[n++]});else e.push({type:"ESCAPED_CHAR",index:n++,value:t[n++]});else e.push({type:"MODIFIER",index:n,value:t[n++]})}return e.push({type:"END",index:n,value:""}),e}(t),o=n.prefixes,i=void 0===o?"./":o,u="[^"+e(n.delimiter||"/#?")+"]+?",a=[],c=0,s=0,l="",f=function(t){if(s<r.length&&r[s].type===t)return r[s++].value},d=function(t){var e=f(t);if(void 0!==e)return e;var n=r[s],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+t)},p=function(){for(var t,e="";t=f("CHAR")||f("ESCAPED_CHAR");)e+=t;return e};s<r.length;){var h=f("CHAR"),v=f("NAME"),y=f("PATTERN");if(v||y){var g=h||"";-1===i.indexOf(g)&&(l+=g,g=""),l&&(a.push(l),l=""),a.push({name:v||c++,prefix:g,suffix:"",pattern:y||u,modifier:f("MODIFIER")||""})}else{var m=h||f("ESCAPED_CHAR");if(m)l+=m;else if(l&&(a.push(l),l=""),f("OPEN")){g=p();var b=f("NAME")||"",w=f("PATTERN")||"",_=p();d("CLOSE"),a.push({name:b||(w?c++:""),pattern:b&&!w?u:w,prefix:g,suffix:_,modifier:f("MODIFIER")||""})}else d("END")}}return a}(r,a=i),u,a));var u,a,c,s,l}i.r(u),i.d(u,{filterBreadcrumbs:function(){return d},getBreadcrumbs:function(){return l},getBreadcrumbsFor:function(){return p},registerBreadcrumb:function(){return c},registerBreadcrumbs:function(){return s}});var v=(0,i(685).createGlobalStore)("breadcrumbs",[]);function y(t,e){if(e)return n=e,(r=t.filter((function(t){return t.matcher.test(n)})),function(t){if(Array.isArray(t))return t}(r)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),1!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(r)||function(t,e){if(t){if("string"==typeof t)return f(t,1);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,1):void 0}}(r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0]||function(t,e){for(var n=e.split("/");n.length>1;){n.pop();var r=y(t,n.join("/"));if(r)return r}}(t,e);var n,r}}(),u}())}}}))},347:()=>{var t=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};System.register(["@openmrs/esm-state","single-spa"],(function(e,n){var r={},o={};return{setters:[function(t){r.createGlobalStore=t.createGlobalStore,r.getGlobalStore=t.getGlobalStore},function(t){o.navigateToUrl=t.navigateToUrl}],execute:function(){e(function(){"use strict";var e={685:function(t){t.exports=r},645:function(t){t.exports=o}},n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var u={};return function(){var e=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},n=function(t){return function n(r){return 0===arguments.length||e(r)?n:t.apply(this,arguments)}},r=function(t){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return e(o)?r:n((function(e){return t(o,e)}));default:return e(o)&&e(i)?r:e(o)?n((function(e){return t(e,i)})):e(i)?n((function(e){return t(o,e)})):t(o,i)}}},o=function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n},a=function(t,e,n){for(var r=0,o=n.length;r<o;){if(t(e,n[r]))return!0;r+=1}return!1},c=function(t,e){return Object.prototype.hasOwnProperty.call(e,t)},s=function(t,e,n,r){var i=o(t);function u(t,e){return ct(t,e,n.slice(),r.slice())}return!a((function(t,e){return!a(u,e,t)}),o(e),i)},l=function(t){return function o(i,u,a){switch(arguments.length){case 0:return o;case 1:return e(i)?o:r((function(e,n){return t(i,e,n)}));case 2:return e(i)&&e(u)?o:e(i)?r((function(e,n){return t(e,u,n)})):e(u)?r((function(e,n){return t(i,e,n)})):n((function(e){return t(i,u,e)}));default:return e(i)&&e(u)&&e(a)?o:e(i)&&e(u)?r((function(e,n){return t(e,n,a)})):e(i)&&e(a)?r((function(e,n){return t(e,u,n)})):e(u)&&e(a)?r((function(e,n){return t(i,e,n)})):e(i)?n((function(e){return t(e,u,a)})):e(u)?n((function(e){return t(i,e,a)})):e(a)?n((function(e){return t(i,u,e)})):t(i,u,a)}}},f=function(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)},d=function(t,e,n,r){return t["@@transducer/result"](n[r](mt(t["@@transducer/step"],t),e))},p=function(t){return"[object Object]"===Object.prototype.toString.call(t)},h=function(t,e){return function(n){if(!t(n))return"function"==typeof e?e(n):e}},v=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(t){return!1}},y=function(t){return(0,Pt.getGlobalStore)("config-module-".concat(t),{config:null,loaded:!1})},g=function(){return(0,Pt.getGlobalStore)("config-extension-slots",{slots:{}})},m=function(t){return b(g().getState(),t)},b=function(t,e){var n=t.slots[e];return null!=n?n:{loaded:!1,config:{}}},w=function(){return(0,Pt.getGlobalStore)("config-extensions",{configs:{}})},_=function(t,e){return S(w().getState(),t,e)},S=function(t,e,n){var r,o=null===(r=t.configs[e])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},x=function(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},O=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},j=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){O(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},E=function(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=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||k(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.")}()},C=function(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||k(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.")}()},k=function(t,e){if(t){if("string"==typeof t)return x(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)?x(t,e):void 0}},A=function(t,e){var n=!0,r=!1,o=void 0;try{for(var i,u=Object.keys(t.schemas)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value,c=F(a,t,e);y(a).setState({loaded:!0,config:c})}}catch(t){r=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}},P=function(t,e){var n,r,o=(n=$(H(t,e)),function(t){var e=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(t)[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var u=E(o.value,2),a=u[0],c=u[1],s=!0,l=!1,f=void 0;try{for(var d,p=Object.entries(c)[Symbol.iterator]();!(s=(d=p.next()).done);s=!0){var h=E(d.value,2),v=h[0];U(h[1],a,v)}}catch(t){l=!0,f=t}finally{try{s||null==p.return||p.return()}finally{if(l)throw f}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(t,e){var r,o;return(null===(r=n[e])||void 0===r?void 0:r.extensionSlots)&&(t[e]=null===(o=n[e])||void 0===o?void 0:o.extensionSlots),t}),{})),Object.keys(r).reduce((function(t,e){return j({},t,r[e])}),{})),i=Object.fromEntries(Object.entries(o).map((function(t){var e=E(t,2);return[e[0],{loaded:!0,config:e[1]}]}))),u=g(),a=u.getState(),c={slots:j({},a.slots,i)};st(a,c)||u.setState(c)},I=function(t,e){var n=function(t,e){var n=Bt(pt(t.schemas)),r=C(t.providedConfigs.map((function(t){return[t.config,t.source]}))).concat([[e.config,"temporary config"]]),o=!0,i=!1,u=void 0;try{for(var a,c=r[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=E(a.value,2);n=$([n,Nt(s[0],s[1])])}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}return n}(t,e);Dt.setState({config:n})},T=function(t,e,n){var r={},o=!0,i=!1,u=void 0;try{for(var a,c=e.mountedExtensions[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=a.value,l=N(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,t,n);r[s.slotName]=j({},r[s.slotName],O({},s.extensionId,{config:l,loaded:!0}))}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}w().setState({configs:r})},L=function(t,e){Ut(t,e);var n=Tt.getState();Tt.setState({schemas:j({},n.schemas,O({},t,e))})},R=function(t,e){Ut(t,e);var n=Tt.getState();n.schemas[t]&&console.warn("Config schema for extension ".concat(t," already exists. If there are multiple extensions with this same name, one will probably crash.")),Tt.setState({schemas:j({},n.schemas,O({},t,e))})},M=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Tt.getState();Tt.setState({providedConfigs:C(n.providedConfigs).concat([{source:e,config:t}])})},D=function(t){return new Promise((function(e){var n=function(t){t.loaded&&t.config&&(e(t.config),o&&o())},r=y(t);n(r.getState());var o=r.subscribe(n)}))},B=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];z(t,e,n);var o=Vt(t,e,r);return Ft(t,o,n),o},N=function(t,e,n,r,o,i){var u,a,c,s,l=E(r.split("#"),1)[0],f=o.schemas[l],d=f?l:e,p=H(o,i),h=V(t,p),v=null!==(s=null==h||null===(u=h.extensionSlots)||void 0===u||null===(a=u[n])||void 0===a||null===(c=a.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=$([V(d,p),v]),g=null!=f?f:o.schemas[e];z(g,y,d);var m=Vt(g,y,o.devDefaultsAreOn);return Ft(g,m,d),delete m.extensionSlots,m},U=function(t,e,n){var r="Extension slot config '".concat(e,".extensionSlots.").concat(n),o=Object.keys(t).filter((function(t){return!["add","remove","order","configure"].includes(t)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),t.add&&(Array.isArray(t.add)&&t.add.every((function(t){return"string"==typeof t}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),t.remove&&(Array.isArray(t.remove)&&t.remove.every((function(t){return"string"==typeof t}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),t.order&&(Array.isArray(t.order)&&t.order.every((function(t){return"string"==typeof t}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),t.configure&&(Z(t.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},H=function(t,e){return C(t.providedConfigs.map((function(t){return t.config}))).concat([e.config])},F=function(t,e,n){if(!e.schemas.hasOwnProperty(t))throw Error("No config schema has been defined for "+t);var r=e.schemas[t],o=V(t,H(e,n));z(r,o,t);var i=Vt(r,o,e.devDefaultsAreOn);return Ft(r,i,t),delete i.extensionSlots,i},V=function(t,e){return $(e.map((function(e){return e[t]})).filter((function(t){return!!t})))},$=function(t){return wt(xt)({},t)},z=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t.hasOwnProperty(c)?Ht(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}},K=function(t,e,n){e&&q(t,[{Array:Ot,Boolean:jt,ConceptUuid:At,Number:Et,Object:kt,String:Ct,UUID:At,PersonAttributeTypeUuid:At,PatientIdentifierTypeUuid:At}[e]],n)},q=function(t,e,n){if(e)try{var r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=(0,u.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(t,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(t,": ").concat(c)))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}catch(e){console.error('Skipping invalid validator at "'.concat(t,'". Encountered error\n\t').concat(e))}},W=function(t){return!!t&&Object.keys(t).filter((function(t){return!["_default","_validators"].includes(t)})).length>0},Z=function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t},G=function(t){var e=window.getOpenmrsSpaBase().replace(/\/$/,"");return J(t,{openmrsBase:window.openmrsBase,openmrsSpaBase:e}).replace(/^\/\//,"/")},J=function(t,e){return Object.keys(e).reduce((function(t,n){return t.split("${"+n+"}").join(e[n])}),t)},Y=function(t){var e=t.to,n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=G(e);r.startsWith(n)?(0,$t.navigateToUrl)(r):window.location.assign(r)};i.r(u),i.d(u,{Type:function(){return ft},configExtensionStore:function(){return Mt},configInternalStore:function(){return Tt},defineConfigSchema:function(){return L},defineExtensionConfigSchema:function(){return R},getConfig:function(){return D},getConfigStore:function(){return y},getExtensionConfig:function(){return _},getExtensionConfigFromStore:function(){return S},getExtensionSlotConfig:function(){return m},getExtensionSlotConfigFromStore:function(){return b},getExtensionSlotsConfigStore:function(){return g},getExtensionsConfigStore:function(){return w},implementerToolsConfigStore:function(){return Dt},inRange:function(){return zt},interpolateString:function(){return J},interpolateUrl:function(){return G},isUrl:function(){return qt},isUrlWithTemplateParameters:function(){return Kt},navigate:function(){return Y},oneOf:function(){return Wt},processConfig:function(){return B},provide:function(){return M},temporaryConfigStore:function(){return Rt},validator:function(){return h},validators:function(){return Zt}});var Q="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e},X=Object.prototype.toString,tt=function(){return"[object Arguments]"===X.call(arguments)?function(t){return"[object Arguments]"===X.call(t)}:function(t){return c("callee",t)}}(),et=tt,nt=!{toString:null}.propertyIsEnumerable("toString"),rt=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ot=function(){return arguments.propertyIsEnumerable("length")}(),it=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1},ut="function"!=typeof Object.keys||ot?n((function(t){if(Object(t)!==t)return[];var e,n,r=[],o=ot&&et(t);for(e in t)!c(e,t)||o&&"length"===e||(r[r.length]=e);if(nt)for(n=rt.length-1;n>=0;)c(e=rt[n],t)&&!it(r,e)&&(r[r.length]=e),n-=1;return r})):n((function(t){return Object(t)!==t?[]:Object.keys(t)})),at=n((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));function ct(e,n,r,o){if(Q(e,n))return!0;var i,u,a=at(e);if(a!==at(n))return!1;if(null==e||null==n)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof n.equals)return"function"==typeof e.equals&&e.equals(n)&&"function"==typeof n.equals&&n.equals(e);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(i=e.constructor,null==(u=String(i).match(/^function (\w*)/))?"":u[1]))return e===n;break;case"Boolean":case"Number":case"String":if((void 0===e?"undefined":t(e))!=(void 0===n?"undefined":t(n))||!Q(e.valueOf(),n.valueOf()))return!1;break;case"Date":if(!Q(e.valueOf(),n.valueOf()))return!1;break;case"Error":return e.name===n.name&&e.message===n.message;case"RegExp":if(e.source!==n.source||e.global!==n.global||e.ignoreCase!==n.ignoreCase||e.multiline!==n.multiline||e.sticky!==n.sticky||e.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===e)return o[l]===n;l-=1}switch(a){case"Map":return e.size===n.size&&s(e.entries(),n.entries(),r.concat([e]),o.concat([n]));case"Set":return e.size===n.size&&s(e.values(),n.values(),r.concat([e]),o.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=ut(e);if(f.length!==ut(n).length)return!1;var d=r.concat([e]),p=o.concat([n]);for(l=f.length-1;l>=0;){var h=f[l];if(!c(h,n)||!ct(n[h],e[h],d,p))return!1;l-=1}return!0}var st=r((function(t,e){return ct(t,e,[],[])}));function lt(t,e,n,r){var o,i=function(o){for(var i=e.length,u=0;u<i;){if(t===e[u])return n[u];u+=1}for(var a in e[u+1]=t,n[u+1]=o,t)o[a]=r?lt(t[a],e,n,!0):t[a];return o};switch(at(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return o=t,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return t}}var ft,dt,pt=n((function(t){return null!=t&&"function"==typeof t.clone?t.clone():lt(t,[],[],!0)})),ht=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},vt=n((function(t){return!!ht(t)||!!t&&"object"==typeof t&&(e=t,!("[object String]"===Object.prototype.toString.call(e)))&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1));var e})),yt=function(){var t=function(t){this.f=t};return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}(),gt=r((function(t,e){return function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,o){return e.apply(this,arguments)};case 5:return function(t,n,r,o,i){return e.apply(this,arguments)};case 6:return function(t,n,r,o,i,u){return e.apply(this,arguments)};case 7:return function(t,n,r,o,i,u,a){return e.apply(this,arguments)};case 8:return function(t,n,r,o,i,u,a,c){return e.apply(this,arguments)};case 9:return function(t,n,r,o,i,u,a,c,s){return e.apply(this,arguments)};case 10:return function(t,n,r,o,i,u,a,c,s,l){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(t.length,(function(){return t.apply(e,arguments)}))})),mt=gt,bt="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",wt=l((function(t,e,n){if("function"==typeof t&&(t=new yt(t)),vt(n))return function(t,e,n){for(var r=0,o=n.length;r<o;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}(t,e,n);if("function"==typeof n["fantasy-land/reduce"])return d(t,e,n,"fantasy-land/reduce");if(null!=n[bt])return f(t,e,n[bt]());if("function"==typeof n.next)return f(t,e,n);if("function"==typeof n.reduce)return d(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),_t=l((function(t,e,n){var r,o={};for(r in e)c(r,e)&&(o[r]=c(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)c(r,n)&&!c(r,o)&&(o[r]=n[r]);return o})),St=l((function t(e,n,r){return _t((function(n,r,o){return p(r)&&p(o)?t(e,r,o):e(n,r,o)}),n,r)})),xt=r((function(t,e){return St((function(t,e,n){return n}),t,e)}));(dt=ft||(ft={})).Array="Array",dt.Boolean="Boolean",dt.ConceptUuid="ConceptUuid",dt.Number="Number",dt.Object="Object",dt.String="String",dt.UUID="UUID",dt.PersonAttributeTypeUuid="PersonAttributeTypeUuid",dt.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var Ot=h((function(t){return Array.isArray(t)}),"must be an array"),jt=h((function(t){return"boolean"==typeof t}),"must be a boolean"),Et=h((function(t){return"number"==typeof t}),"must be a number"),Ct=h((function(t){return"string"==typeof t}),"must be a string"),kt=h((function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}),"must be an object (not an array or null)"),At=h((function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)||/^[0-9a-f]{36}$/i.test(t)}),"must be a valid UUID or a 36-character hexadecimal string"),Pt=i(685),It={providedConfigs:[],schemas:{},devDefaultsAreOn:v()},Tt=(0,Pt.createGlobalStore)("config-internal",It),Lt=v();Tt.subscribe((function(t){var e;t.devDefaultsAreOn!=Lt&&(e=t.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(e)),Lt=t.devDefaultsAreOn)}));var Rt=(0,Pt.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(t){return{}}}()});Rt.subscribe((function(t){var e;e=t.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(e))}));var Mt=(0,Pt.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Dt=(0,Pt.createGlobalStore)("config-implementer-tools",{config:{}});function Bt(t){return t.hasOwnProperty("_default")?j({},t,{_value:t._default,_source:"default"}):Z(t)?Object.keys(t).reduce((function(e,n){return e[n]=Bt(t[n]),e}),{}):{}}function Nt(t,e){return Z(t)?Object.keys(t).reduce((function(n,r){return n[r]=Nt(t[r],e),n}),{}):{_value:t,_source:e}}function Ut(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,u=void 0;try{for(var a,c=function(o,i){var u=i.value,a=n+(n&&".")+u,c=e[u];if(!Z(c))return console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").concat(r)),"continue";c.hasOwnProperty("_default")||Ut(t,c,a);var s=c._elements;if(W(s)&&Ut(t,s,a+"._elements"),c._validators){var l=!0,f=!1,d=void 0;try{for(var p,h=c._validators[Symbol.iterator]();!(l=(p=h.next()).done);l=!0){var v=p.value;"function"!=typeof v&&console.error("".concat(t," has invalid validator for key '").concat(a,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(t){f=!0,d=t}finally{try{l||null==h.return||h.return()}finally{if(f)throw d}}}var y=c._type;y&&!Object.values(ft).includes(y)&&console.error("".concat(t," has invalid type for key '").concat(a,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(ft).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(c).every((function(t){return["_description","_validators","_elements","_type"].includes(t)}))&&!n.includes("._elements")&&console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(c))),s&&y&&![ft.Array,ft.Object].includes(y)&&console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},s=Object.keys(e).filter((function(t){return!t.startsWith("_")}))[Symbol.iterator]();!(o=(a=s.next()).done);o=!0)c(s,a)}catch(t){i=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw u}}}function Ht(t,e,n){K(n,t._type,e),Z(e)?t._type===ft.Object?function(t,e,n){if(t._elements){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c];z(t._elements,s,"".concat(n,".").concat(c))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}}(t,e,n):t.hasOwnProperty("_default")||z(t,e,n):t._type===ft.Array&&function(t,e,n){if(W(t._elements))for(var r=0;r<e.length;r++)Ht(t._elements,e[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<e.length;o++){var i;K("".concat(n,"[").concat(o,"]"),null===(i=t._elements)||void 0===i?void 0:i._type,e[o])}}(t,e,n)}function Ft(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(t)if(e!==t._default&&q(n,t._validators,e),Z(e)){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t._type===ft.Object&&t._elements?Ft(t._elements,s,l):Ft(f,s,l)}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}else if(Array.isArray(e)&&t._elements)for(var d=0;d<e.length;d++)Ft(t._elements,e[d],"".concat(n,"[").concat(d,"]"))}A(Tt.getState(),Rt.getState()),Tt.subscribe((function(t){return A(t,Rt.getState())})),Rt.subscribe((function(t){return A(Tt.getState(),t)})),I(Tt.getState(),Rt.getState()),Tt.subscribe((function(t){return I(t,Rt.getState())})),Rt.subscribe((function(t){return I(Tt.getState(),t)})),P(Tt.getState(),Rt.getState()),Tt.subscribe((function(t){return P(t,Rt.getState())})),Rt.subscribe((function(t){return P(Tt.getState(),t)})),T(Tt.getState(),Mt.getState(),Rt.getState()),Tt.subscribe((function(t){T(t,Mt.getState(),Rt.getState())})),Mt.subscribe((function(t){T(Tt.getState(),t,Rt.getState())})),Rt.subscribe((function(t){T(Tt.getState(),Mt.getState(),t)}));var Vt=function(t,e,n){var r=pt(e);if(!t)return r;var o=!0,i=!1,u=void 0;try{for(var a,c=function(e,o){var i=o.value,u=r[i],a=t[i];if(a&&a.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=a._devDefault||a._default;r[i]=n?c:a._default}var s=a._elements;if(u&&W(s))if(a._type===ft.Array&&Array.isArray(u)){var l=u.map((function(t){return Vt(s,t,n)}));r[i]=l}else if(a._type===ft.Object){var f=!0,d=!1,p=void 0;try{for(var h,v=Object.keys(u)[Symbol.iterator]();!(f=(h=v.next()).done);f=!0){var y=h.value;u[y]=Vt(s,u[y],n)}}catch(t){d=!0,p=t}finally{try{f||null==v.return||v.return()}finally{if(d)throw p}}}}else if(Z(a)){var g=r.hasOwnProperty(i)?u:{};Z(g)&&(r[i]=Vt(a,g,n))}},s=Object.keys(t)[Symbol.iterator]();!(o=(a=s.next()).done);o=!0)c(0,a)}catch(t){i=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw u}}return r},$t=i(645),zt=function(t,e){return h((function(n){return t<=n&&n<=e}),"must be between ".concat(t," and ").concat(e))},Kt=function(t){var e=t.concat(["openmrsBase","openmrsSpaBase"]);return h((function(t){if(!t||"string"!=typeof t)return!1;for(var n=/\${(.*?)}/g,r=n.exec(t);r;){if(!e.includes(r[1]))return!1;r=n.exec(t)}return!0}),"Should be a URL or path. The allowed template parameters are "+e.map((function(t){return"${"+t+"}"})).join(", "))},qt=Kt([]),Wt=function(t){return h((function(e){return t.includes(e)}),"Must be one of the following: '".concat(t.join("', '"),"'."))},Zt={inRange:zt,isUrl:qt,isUrlWithTemplateParameters:Kt,oneOf:Wt}}(),u}())}}}))},708:()=>{System.register(["@openmrs/esm-globals"],(function(t,e){var n={};return{setters:[function(t){n.dispatchNotificationShown=t.dispatchNotificationShown}],execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},728:function(t){"use strict";t.exports=n}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.y=e,o.d=function(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.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=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){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 i={};return(0,o(968).s)(1),function(){"use strict";var t=function(t){var e=n(t);setTimeout((function(){throw e}))},e=function(){var e=Error();return function(r){n(r).stack+="\nAsync stacktrace:\n".concat(e.stack),t(r)}},n=function(t){var e,n,r,o,i;if(n=t,null!=(r=Error)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):(o=n,null!=(i=r)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):o instanceof i))return t;if(null===t)return Error("'null' was thrown as an error");if("object"==typeof t){try{e="Object thrown as error: ".concat(JSON.stringify(t))}catch(n){e="Object thrown as error with the following properties: ".concat(Object.keys(t))}return Error(e)}return void 0===t?Error("'undefined' was thrown as an error"):Error(t.toString())};o.r(i),o.d(i,{createErrorHandler:function(){return e},reportError:function(){return t}});var r=o(728);window.onerror=function(){return(0,r.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."}),!1},window.onunhandledrejection=function(){(0,r.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."})}}(),i}())}}}))},547:(t,e,n)=>{function r(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}t=n.nmd(t);var o=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};System.register(["@openmrs/esm-config","@openmrs/esm-state","single-spa"],(function(i,u){var a={},c={},s={};return{setters:[function(t){a.configExtensionStore=t.configExtensionStore,a.getExtensionConfigFromStore=t.getExtensionConfigFromStore,a.getExtensionSlotConfig=t.getExtensionSlotConfig,a.getExtensionSlotConfigFromStore=t.getExtensionSlotConfigFromStore,a.getExtensionSlotsConfigStore=t.getExtensionSlotsConfigStore,a.getExtensionsConfigStore=t.getExtensionsConfigStore},function(t){c.createGlobalStore=t.createGlobalStore,c.getGlobalStore=t.getGlobalStore},function(t){s.mountRootParcel=t.mountRootParcel}],execute:function(){i(function(){var i={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},824:function(t){"use strict";t.exports=a},685:function(t){"use strict";t.exports=c},645:function(t){"use strict";t.exports=s}},l={};function f(t){var e=l[t];if(void 0!==e)return e.exports;var n=l[t]={exports:{}};return i[t](n,n.exports,f),n.exports}f.y=u,f.d=function(t,e){for(var n in e)f.o(e,n)&&!f.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),f.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},f.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;f.g.importScripts&&(t=f.g.location+"");var e=f.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(/\/[^\/]+$/,"/"),f.p=t}();var d={};return(0,f(968).s)(1),function(){"use strict";var i=function(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])}},u=function(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=function(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])}},c=function(t){var e=this.__data__=new K(t);this.size=e.size},s=function(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new St;++e<n;)this.add(t[e])},l=function(t){var e=Me.getState(),n=t(e);n!==e&&Me.setState(n)},p=function(t){var e=[],n=!0,r=!1,o=void 0;try{for(var i,u=Object.values(t.extensions)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value,c=!0,s=!1,l=void 0;try{for(var f,d=a.instances[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){var p=f.value;e.push({slotModuleName:p.slotModuleName,extensionModuleName:a.moduleName,slotName:p.slotName,extensionId:p.id})}}catch(t){s=!0,l=t}finally{try{c||null==d.return||d.return()}finally{if(s)throw l}}}}catch(t){r=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}Te(Le.configExtensionStore.getState().mountedExtensions,e)||Le.configExtensionStore.setState({mountedExtensions:e})},h=function(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},v=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},y=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){v(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},g=function(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=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||b(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.")}()},m=function(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||b(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.")}()},b=function(t,e){if(t){if("string"==typeof t)return h(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)?h(t,e):void 0}},w=function(t,e,n){var r={},o=!0,i=!1,u=void 0;try{for(var a,c=Object.entries(t.slots)[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=g(a.value,2),l=s[0],f=s[1],d=P(l,t,(0,Le.getExtensionSlotConfigFromStore)(e,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:d}}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}Te(Ue.getState().slots,r)||Ue.setState({slots:r})},_=function(t,e){return{moduleName:e,name:t,attachedIds:[],config:null}},S=function(t){return g(t.split("#"),1)[0]},x=function(t,e){var n=S(e);return t.extensions[n]},O=function(t){return x(Ne.getState(),t)},j=function(t,e){l((function(n){var r=n.slots[t];return y({},n,r?{slots:y({},n.slots,v({},t,y({},r,{attachedIds:m(r.attachedIds).concat([e])})))}:{slots:y({},n.slots,v({},t,y({},_(t),{attachedIds:[e]})))})}))},E=function(t,e){l((function(n){var r=n.slots[t];return r&&r.attachedIds.includes(e)?y({},n,{slots:y({},n.slots,v({},t,y({},r,{attachedIds:r.attachedIds.filter((function(t){return t!==e}))})))}):n}))},C=function(t){l((function(e){var n=e.slots[t];return n?y({},e,{slots:y({},e.slots,v({},t,y({},n,{attachedIds:[]})))}):e}))},k=function(t,e,n,r){var o=e.indexOf(t);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(t);return-1!==i?2e3+i:-1},A=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null!=e?e:navigator.onLine;return t.filter((function(t){return L(n,t.online,t.offline)}))},P=function(t,e,n,r){var o,i,u,a,c,s,l=(o=n,i=e.slots[t].attachedIds,u=o.add||[],a=o.remove||[],c=o.order||[],s=Ne.getState().extensions,m(i).concat(m(u)).filter((function(t){return!a.includes(t)})).sort((function(t,e){var n,r,o=k(t,c,null===(n=s[S(t)])||void 0===n?void 0:n.order,i),u=k(e,c,null===(r=s[S(e)])||void 0===r?void 0:r.order,i);return-1===u?-1:-1===o?1:o-u}))),f=[],d=!0,p=!1,h=void 0;try{for(var v,y=l[Symbol.iterator]();!(d=(v=y.next()).done);d=!0){var g=v.value,b=(0,Le.getExtensionConfigFromStore)(r,t,g).config,w=S(g),_=e.extensions[w];_&&f.push({id:g,name:w,moduleName:_.moduleName,config:b,meta:_.meta,online:_.online,offline:_.offline})}}catch(t){p=!0,h=t}finally{try{d||null==y.return||y.return()}finally{if(p)throw h}}return f},I=function(t){return P(t,Ne.getState(),(0,Le.getExtensionSlotConfig)(t).config,Fe.getState())},T=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=navigator.onLine;return L(n,t,e)},L=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(t?e:n)},R=function(t,e){var n=navigator.onLine?t:e;return"object"==typeof n?n:{}},M=function(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},D=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},B=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){D(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},N=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o},U=function(t){return function(t){if(Array.isArray(t))return M(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 M(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)?M(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.")}()},H=function(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(t){return t},i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},u=S(r),a=O(r),c=!0,s=null;if(t){if(!a)throw Error("Couldn't find extension '".concat(u,"' to attach to '").concat(e,"'"));var f=a.load,d=a.online,p=a.offline,h=a.meta,v=a.moduleName;T(d,p)&&(f().then((function(u){var a=u.default,l=N(u,["default"]);c&&(s=(0,Ke.mountRootParcel)(o(null!=a?a:l),B({},R(d,p),i,{_meta:h,_extensionContext:{extensionId:r,extensionSlotName:e,extensionSlotModuleName:n,extensionModuleName:v},domElement:t})))})),l((function(o){var i={domElement:t,id:r,slotName:e,slotModuleName:n};return B({},o,{extensions:B({},o.extensions,D({},u,B({},o.extensions[u],{instances:U(o.extensions[u].instances).concat([i])})))})})))}else console.warn("Tried to render ".concat(r," into ").concat(e," but no DOM element was available."));return function(){c=!1,s&&("MOUNTED"!==s.getStatus()?s.mountPromise.then((function(){s&&s.unmount()})):s.unmount())}};f.r(d),f.d(d,{attach:function(){return j},checkStatus:function(){return T},checkStatusFor:function(){return L},detach:function(){return E},detachAll:function(){return C},extensionStore:function(){return qe},getAssignedExtensions:function(){return I},getConnectedExtensions:function(){return A},getCustomProps:function(){return R},getExtensionInternalStore:function(){return De},getExtensionNameFromId:function(){return S},getExtensionRegistration:function(){return O},getExtensionRegistrationFrom:function(){return x},getExtensionStore:function(){return Be},registerExtension:function(){return Ve},registerExtensionSlot:function(){return $e},renderExtension:function(){return H},reset:function(){return ze},updateInternalExtensionStore:function(){return l}});var F=function(t,e){return t===e||t!=t&&e!=e},V=function(t,e){for(var n=t.length;n--;)if(F(t[n][0],e))return n;return-1},$=Array.prototype.splice;i.prototype.clear=function(){this.__data__=[],this.size=0},i.prototype.delete=function(t){var e=this.__data__,n=V(e,t);return!(n<0||(n==e.length-1?e.pop():$.call(e,n,1),--this.size,0))},i.prototype.get=function(t){var e=this.__data__,n=V(e,t);return n<0?void 0:e[n][1]},i.prototype.has=function(t){return V(this.__data__,t)>-1},i.prototype.set=function(t,e){var n=this.__data__,r=V(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var z,K=i,q="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,W="object"==typeof self&&self&&self.Object===Object&&self,Z=q||W||Function("return this")(),G=Z.Symbol,J=Object.prototype,Y=J.hasOwnProperty,Q=J.toString,X=G?G.toStringTag:void 0,tt=Object.prototype.toString,et=G?G.toStringTag:void 0,nt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":et&&et in Object(t)?function(t){var e=Y.call(t,X),n=t[X];try{t[X]=void 0;var r=!0}catch(t){}var o=Q.call(t);return r&&(e?t[X]=n:delete t[X]),o}(t):(e=t,tt.call(e));var e},rt=function(t){var e=void 0===t?"undefined":o(t);return null!=t&&("object"==e||"function"==e)},ot=function(t){if(!rt(t))return!1;var e=nt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},it=Z["__core-js_shared__"],ut=(z=/[^.]+$/.exec(it&&it.keys&&it.keys.IE_PROTO||""))?"Symbol(src)_1."+z:"",at=Function.prototype.toString,ct=function(t){if(null!=t){try{return at.call(t)}catch(t){}try{return t+""}catch(t){}}return""},st=/^\[object .+?Constructor\]$/,lt=Function.prototype,ft=Object.prototype,dt=lt.toString,pt=ft.hasOwnProperty,ht=RegExp("^"+dt.call(pt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vt=function(t,e){var n,r=null==(n=t)?void 0:n[e];return function(t){return!(!rt(t)||(e=t,ut&&ut in e))&&(ot(t)?ht:st).test(ct(t));var e}(r)?r:void 0},yt=vt(Z,"Map"),gt=vt(Object,"create"),mt=Object.prototype.hasOwnProperty,bt=Object.prototype.hasOwnProperty;u.prototype.clear=function(){this.__data__=gt?gt(null):{},this.size=0},u.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},u.prototype.get=function(t){var e=this.__data__;if(gt){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return mt.call(e,t)?e[t]:void 0},u.prototype.has=function(t){var e=this.__data__;return gt?void 0!==e[t]:bt.call(e,t)},u.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=gt&&void 0===e?"__lodash_hash_undefined__":e,this};var wt=u,_t=function(t,e){var n,r,i=t.__data__;return("string"==(r=o(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map};a.prototype.clear=function(){this.size=0,this.__data__={hash:new wt,map:new(yt||K),string:new wt}},a.prototype.delete=function(t){var e=_t(this,t).delete(t);return this.size-=e?1:0,e},a.prototype.get=function(t){return _t(this,t).get(t)},a.prototype.has=function(t){return _t(this,t).has(t)},a.prototype.set=function(t,e){var n=_t(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var St=a;c.prototype.clear=function(){this.__data__=new K,this.size=0},c.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},c.prototype.get=function(t){return this.__data__.get(t)},c.prototype.has=function(t){return this.__data__.has(t)},c.prototype.set=function(t,e){var n=this.__data__;if(r(n,K)){var o=n.__data__;if(!yt||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new St(o)}return n.set(t,e),this.size=n.size,this};var xt=c;s.prototype.add=s.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},s.prototype.has=function(t){return this.__data__.has(t)};var Ot=s,jt=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},Et=function(t,e,n,r,o,i){var u=1&n,a=t.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var s=i.get(t),l=i.get(e);if(s&&l)return s==e&&l==t;var f=-1,d=!0,p=2&n?new Ot:void 0;for(i.set(t,e),i.set(e,t);++f<a;){var h=t[f],v=e[f];if(r)var y=u?r(v,h,f,e,t,i):r(h,v,f,t,e,i);if(void 0!==y){if(y)continue;d=!1;break}if(p){if(!jt(e,(function(t,e){if(u=e,!p.has(u)&&(h===t||o(h,t,n,r,i)))return p.push(e);var u}))){d=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){d=!1;break}}return i.delete(t),i.delete(e),d},Ct=Z.Uint8Array,kt=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},At=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},Pt=G?G.prototype:void 0,It=Pt?Pt.valueOf:void 0,Tt=Array.isArray,Lt=Object.prototype.propertyIsEnumerable,Rt=Object.getOwnPropertySymbols,Mt=Rt?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 u=t[n];e(u)&&(i[o++]=u)}return i}(Rt(t),(function(e){return Lt.call(t,e)})))}:function(){return[]},Dt=function(t){return null!=t&&"object"==typeof t},Bt=function(t){return Dt(t)&&"[object Arguments]"==nt(t)},Nt=Object.prototype,Ut=Nt.hasOwnProperty,Ht=Nt.propertyIsEnumerable,Ft=Bt(function(){return arguments}())?Bt:function(t){return Dt(t)&&Ut.call(t,"callee")&&!Ht.call(t,"callee")},Vt=Ft,$t=e&&!e.nodeType&&e,zt=$t&&t&&!t.nodeType&&t,Kt=zt&&zt.exports===$t?Z.Buffer:void 0,qt=(Kt?Kt.isBuffer:void 0)||function(){return!1},Wt=/^(?:0|[1-9]\d*)$/,Zt=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Gt={};Gt["[object Float32Array]"]=Gt["[object Float64Array]"]=Gt["[object Int8Array]"]=Gt["[object Int16Array]"]=Gt["[object Int32Array]"]=Gt["[object Uint8Array]"]=Gt["[object Uint8ClampedArray]"]=Gt["[object Uint16Array]"]=Gt["[object Uint32Array]"]=!0,Gt["[object Arguments]"]=Gt["[object Array]"]=Gt["[object ArrayBuffer]"]=Gt["[object Boolean]"]=Gt["[object DataView]"]=Gt["[object Date]"]=Gt["[object Error]"]=Gt["[object Function]"]=Gt["[object Map]"]=Gt["[object Number]"]=Gt["[object Object]"]=Gt["[object RegExp]"]=Gt["[object Set]"]=Gt["[object String]"]=Gt["[object WeakMap]"]=!1;var Jt,Yt,Qt,Xt=e&&!e.nodeType&&e,te=Xt&&t&&!t.nodeType&&t,ee=te&&te.exports===Xt&&q.process,ne=function(){try{return te&&te.require&&te.require("util").types||ee&&ee.binding&&ee.binding("util")}catch(t){}}(),re=ne&&ne.isTypedArray,oe=re?(Jt=re,function(t){return Jt(t)}):function(t){return Dt(t)&&Zt(t.length)&&!!Gt[nt(t)]},ie=Object.prototype.hasOwnProperty,ue=Object.prototype,ae=(Yt=Object.keys,Qt=Object,function(t){return Yt(Qt(t))}),ce=Object.prototype.hasOwnProperty,se=function(t){return n=Mt,r=function(t){return null!=(e=t)&&Zt(e.length)&&!ot(e)?function(t,e){var n,r,i,u=Tt(t),a=!u&&Vt(t),c=!u&&!a&&qt(t),s=!u&&!a&&!c&&oe(t),l=u||a||c||s,f=l?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],d=f.length;for(var p in t)!ie.call(t,p)||l&&("length"==p||c&&("offset"==p||"parent"==p)||s&&("buffer"==p||"byteLength"==p||"byteOffset"==p)||(r=d,i=void 0===(n=p)?"undefined":o(n),(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&Wt.test(n))&&n>-1&&n%1==0&&n<r))||f.push(p);return f}(t):function(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||ue))return ae(t);var e,n,r=[];for(var o in Object(t))ce.call(t,o)&&"constructor"!=o&&r.push(o);return r}(t);var e}(e=t),Tt(e)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(e));var e,n,r},le=Object.prototype.hasOwnProperty,fe=vt(Z,"DataView"),de=vt(Z,"Promise"),pe=vt(Z,"Set"),he=vt(Z,"WeakMap"),ve="[object Map]",ye="[object Promise]",ge="[object Set]",me="[object WeakMap]",be="[object DataView]",we=ct(fe),_e=ct(yt),Se=ct(de),xe=ct(pe),Oe=ct(he),je=nt;(fe&&je(new fe(new ArrayBuffer(1)))!=be||yt&&je(new yt)!=ve||de&&je(de.resolve())!=ye||pe&&je(new pe)!=ge||he&&je(new he)!=me)&&(je=function(t){var e=nt(t),n="[object Object]"==e?t.constructor:void 0,r=n?ct(n):"";if(r)switch(r){case we:return be;case _e:return ve;case Se:return ye;case xe:return ge;case Oe:return me}return e});var Ee=je,Ce="[object Arguments]",ke="[object Array]",Ae="[object Object]",Pe=Object.prototype.hasOwnProperty,Ie=function t(e,n,o,i,u){return e===n||(null==e||null==n||!Dt(e)&&!Dt(n)?e!=e&&n!=n:function(t,e,n,o,i,u){var a=Tt(t),c=Tt(e),s=a?ke:Ee(t),l=c?ke:Ee(e),f=(s=s==Ce?Ae:s)==Ae,d=(l=l==Ce?Ae:l)==Ae,p=s==l;if(p&&qt(t)){if(!qt(e))return!1;a=!0,f=!1}if(p&&!f)return u||(u=new xt),a||oe(t)?Et(t,e,n,o,i,u):function(t,e,n,r,o,i,u){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 Ct(t),new Ct(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return F(+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 a=kt;case"[object Set]":var c=1&r;if(a||(a=At),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var l=Et(a(t),a(e),r,o,i,u);return u.delete(t),l;case"[object Symbol]":if(It)return It.call(t)==It.call(e)}return!1}(t,e,s,n,o,i,u);if(!(1&n)){var h=f&&Pe.call(t,"__wrapped__"),v=d&&Pe.call(e,"__wrapped__");if(h||v){var y=h?t.value():t,g=v?e.value():e;return u||(u=new xt),i(y,g,n,o,u)}}return!!p&&(u||(u=new xt),function(t,e,n,o,i,u){var a=1&n,c=se(t),s=c.length;if(s!=se(e).length&&!a)return!1;for(var l=s;l--;){var f=c[l];if(!(a?f in e:le.call(e,f)))return!1}var d=u.get(t),p=u.get(e);if(d&&p)return d==e&&p==t;var h=!0;u.set(t,e),u.set(e,t);for(var v=a;++l<s;){var y=t[f=c[l]],g=e[f];if(o)var m=a?o(g,y,f,e,t,u):o(y,g,f,t,e,u);if(!(void 0===m?y===g||i(y,g,n,o,u):m)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var b=t.constructor,w=e.constructor;b==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(h=!1)}return u.delete(t),u.delete(e),h}(t,e,n,o,i,u))}(e,n,o,i,t,u))},Te=function(t,e){return Ie(t,e)},Le=f(824),Re=f(685),Me=(0,Re.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),De=function(){return(0,Re.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})},Be=function(){return(0,Re.getGlobalStore)("extensions",{slots:{}})};p(Me.getState()),Me.subscribe(p);var Ne=De(),Ue=Be(),He=(0,Le.getExtensionSlotsConfigStore)(),Fe=(0,Le.getExtensionsConfigStore)();Ne.subscribe((function(t){w(t,He.getState(),Fe.getState())})),He.subscribe((function(t){w(Ne.getState(),t,Fe.getState())})),Fe.subscribe((function(t){w(Ne.getState(),He.getState(),t)}));var Ve=Ne.action((function(t,e){t.extensions[e.name]=y({},e,{instances:[]})})),$e=Ne.action((function(t,e,n){var r,o=null===(r=t.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=e)return console.warn("An extension slot with the name '".concat(n,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),t;if(o&&o==e)return t;if(t.slots[n])return y({},t,{slots:y({},t.slots,v({},n,y({},t.slots[n],{moduleName:e})))});var i=_(n,e);return y({},t,{slots:y({},t.slots,v({},n,i))})})),ze=Ue.action((function(){return{slots:{},extensions:{}}})),Ke=f(645),qe=De()}(),d}())}}}))},889:(t,e,n)=>{"use strict";n.r(e);var r=n(159),o={};for(const t in r)"default"!==t&&(o[t]=()=>r[t]);n.d(e,o);var i=n(810);o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);n.d(e,o);var u=n(347);o={};for(const t in u)"default"!==t&&(o[t]=()=>u[t]);n.d(e,o);var a=n(708);o={};for(const t in a)"default"!==t&&(o[t]=()=>a[t]);n.d(e,o);var c=n(547);o={};for(const t in c)"default"!==t&&(o[t]=()=>c[t]);n.d(e,o);var s=n(473);o={};for(const t in s)"default"!==t&&(o[t]=()=>s[t]);n.d(e,o);var l=n(630);o={};for(const t in l)"default"!==t&&(o[t]=()=>l[t]);n.d(e,o);var f=n(336);o={};for(const t in f)"default"!==t&&(o[t]=()=>f[t]);n.d(e,o);var d=n(493);o={};for(const t in d)"default"!==t&&(o[t]=()=>d[t]);n.d(e,o);var p=n(390);o={};for(const t in p)"default"!==t&&(o[t]=()=>p[t]);n.d(e,o)},473:()=>{System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.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(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t){window.dispatchEvent(new CustomEvent(d,{detail:{online:t}}))},e=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(d,e),function(){return window.removeEventListener(d,e)}},n=function(t){return t({online:navigator.onLine}),e(t)},i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(p,{detail:t}))},u=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(p,e),function(){return window.removeEventListener(p,e)}},a=function(t){window.dispatchEvent(new CustomEvent(h,{detail:t}))},c=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(h,e),function(){return window.removeEventListener(h,e)}},s=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(v,e),function(){return window.removeEventListener(v,e)}},l=function(t){window.openmrsBase=t.apiUrl,window.spaBase=t.spaPath,window.spaEnv=t.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=function(){return"".concat(window.spaBase,"/")}},f=function(){window.copyText=function(t){var e=window.getSelection();if(e){var n=document.createRange();n.selectNode(t),e.removeAllRanges(),e.addRange(n),document.execCommand("copy"),e.removeAllRanges()}}};r.r(o),r.d(o,{dispatchConnectivityChanged:function(){return t},dispatchNotificationShown:function(){return a},dispatchPrecacheStaticDependencies:function(){return i},setupPaths:function(){return l},setupUtils:function(){return f},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return e},subscribeNotificationShown:function(){return c},subscribePrecacheStaticDependencies:function(){return u},subscribeToastShown:function(){return s}});var d="openmrs:connectivity-changed",p="openmrs:precache-static-dependencies",h="openmrs:notification-shown",v="openmrs:toast-shown"}(),o}())}}}))},630:(t,e,n)=>{function r(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 o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function s(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){a(t,e,n[e])}))}return t}function l(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=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||p(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.")}()}function f(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||p(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 d=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function p(t,e){if(t){if("string"==typeof t)return r(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)?r(t,e):void 0}}System.register(["@openmrs/esm-api","@openmrs/esm-state"],(function(t,e){var r={},i={};return{setters:[function(t){r.getLoggedInUser=t.getLoggedInUser},function(t){i.createGlobalStore=t.createGlobalStore}],execute:function(){t(function(){var t={602:function(t){var e=function(t){"use strict";var e,n=function(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]},r=function(t,e,n,r){var u,a,s,l,f=e&&c(e.prototype,i)?e:i,d=Object.create(f.prototype),h=new p(r||[]);return d._invoke=(u=t,a=n,s=h,l=S,function(t,e){if(l===O)throw new Error("Generator is already running");if(l===j){if("throw"===t)throw e;return v()}for(s.method=t,s.arg=e;;){var n=s.delegate;if(n){var r=I(n,s);if(r){if(r===E)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(l===S)throw l=j,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l=O;var i=o(u,a,s);if("normal"===i.type){if(l=s.done?j:x,i.arg===E)continue;return{value:i.arg,done:s.done}}"throw"===i.type&&(l=j,s.method="throw",s.arg=i.arg)}}),d},o=function(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}},i=function(){},u=function(){},a=function(){},s=function(t){["next","throw","return"].forEach((function(e){n(t,e,(function(t){return this._invoke(e,t)}))}))},l=function(t,e){function n(r,i,u,a){var c=o(t[r],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&g.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,u,a)}),(function(t){n("throw",t,u,a)})):e.resolve(l).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,a)}))}a(c.arg)}var r;this._invoke=function(t,o){function i(){return new e((function(e,r){n(t,o,e,r)}))}return r=r?r.then(i,i):i()}},f=function(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)},d=function(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e},p=function(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)},h=function(t){if(t){var n=t[b];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(g.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:e,done:!0}},y=Object.prototype,g=y.hasOwnProperty,m="function"==typeof Symbol?Symbol:{},b=m.iterator||"@@iterator",w=m.asyncIterator||"@@asyncIterator",_=m.toStringTag||"@@toStringTag";try{n({},"")}catch(t){n=function(t,e,n){return t[e]=n}}t.wrap=r;var S="suspendedStart",x="suspendedYield",O="executing",j="completed",E={},C={};n(C,b,(function(){return this}));var k=Object.getPrototypeOf,A=k&&k(k(h([])));A&&A!==y&&g.call(A,b)&&(C=A);var P=a.prototype=i.prototype=Object.create(C);function I(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method))return E;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return E}var i=o(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,E;var u=i.arg;return u?u.done?(n[t.resultName]=u.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,E):u:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,E)}return u.prototype=a,n(P,"constructor",a),n(a,"constructor",u),u.displayName=n(a,_,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===u||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,n(t,_,"GeneratorFunction")),t.prototype=Object.create(P),t},t.awrap=function(t){return{__await:t}},s(l.prototype),n(l.prototype,w,(function(){return this})),t.AsyncIterator=l,t.async=function(e,n,o,i,u){void 0===u&&(u=Promise);var a=new l(r(e,n,o,i),u);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},s(P),n(P,_,"Generator"),n(P,b,(function(){return this})),n(P,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=h,p.prototype={constructor:p,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(d),!t)for(var n in this)"t"===n.charAt(0)&&g.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){var n=function(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o};if(this.done)throw t;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),c=g.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,E):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),E},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),d(n),E}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;d(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:h(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),E}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},766:function(t){"use strict";t.exports=r},685:function(t){"use strict";t.exports=i}},p={};function h(e){var n=p[e];if(void 0!==n)return n.exports;var r=p[e]={exports:{}};return t[e](r,r.exports,h),r.exports}h.y=e,h.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return h.d(e,{a:e}),e},h.d=function(t,e){for(var n in e)h.o(e,n)&&!h.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},h.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),h.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},h.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;h.g.importScripts&&(t=h.g.location+"");var e=h.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(/\/[^\/]+$/,"/"),h.p=t}();var v={};return(0,h(968).s)(1),function(){"use strict";var t=function(t,e){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(t){n(t.data)},t.postMessage(e,[r.port2])}))},e=function(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},r=function(t,n){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=t[Symbol.iterator]()).next.bind(r)},i=function(t,e){var n=location.href;return new URL(t,n).href===new URL(e,n).href},p=function(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)},y=function(){},g=function(t,e){if(!e)return t&&t.then?t.then(y):Promise.resolve()},m=function(t,e){if(void 0!==Tn)return console.warn("The application's Service Worker has already been registered. The new service worker at ".concat(t," will not be registered.")),Tn;if(!("serviceWorker"in navigator))throw new Error("Registering the Service Worker is not possible due to missing browser capabilities.");var n=new In(t,e);return Tn=n.register().then((function(){return n.controlling.then((function(){return n}))}))},b=function(){return null!=Tn?Tn:Promise.resolve(void 0)},w=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},S=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){w(i,r,o,u,a,"next",t)}function a(t){w(i,r,o,u,a,"throw",t)}u(void 0)}))}},x=function(t){return Nn.apply(this,arguments)},O=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},j=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){O(i,r,o,u,a,"next",t)}function a(t){O(i,r,o,u,a,"throw",t)}u(void 0)}))}},E=function(){return Un.apply(this,arguments)},C=function(){return Hn.apply(this,arguments)},k=function(){return Fn.apply(this,arguments)},A=function(){return Vn.apply(this,arguments)},P=function(){return{current:zn,notAvailable:"unavailable"===zn,active:"on"===zn}},I=function(t){"unavailable"!==zn&&"unavailable"!==t&&(localStorage.setItem($n,"on"===t?"active":"disabled"),zn=t)},T=function(){return Kn.apply(this,arguments)},L=function(t,e){return"object"!=typeof e||Wn(e).forEach((function(n){t[n]=e[n]})),t},R=function(t,e){return Jn.call(t,e)},M=function(t,e){"function"==typeof e&&(e=e(Gn(t))),("undefined"==typeof Reflect?Wn:Reflect.ownKeys)(e).forEach((function(n){D(t,n,e[n])}))},D=function(t,e,n,r){Yn(t,e,L(n&&R(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))},B=function(t){return{from:function(e){return t.prototype=Object.create(e.prototype),D(t.prototype,"constructor",t),{extend:M.bind(null,t.prototype)}}}},N=function(t,e,n){return tr.call(t,e,n)},U=function(t,e){return e(t)},H=function(t){if(!t)throw new Error("Assertion Failed")},F=function(t){qn.setImmediate?setImmediate(t):setTimeout(t,0)},V=function(t,e){return t.reduce((function(t,n,r){var o=e(n,r);return o&&(t[o[0]]=o[1]),t}),{})},$=function(t){var e={};for(var n in t)R(t,n)&&(e[n]=t[n]);return e},z=function(t){return rr.apply([],t)},K=function(t){ur="undefined"!=typeof WeakMap&&new WeakMap;var e=ar(t);return ur=null,e},q=function(t){return cr.call(t).slice(8,-1)},W=function(t){var e,n,r,o;if(1===arguments.length){if(Zn(t))return t.slice();if(this===fr&&"string"==typeof t)return[t];if(o=lr(t)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==t)return[t];if("number"==typeof(e=t.length)){for(n=new Array(e);e--;)n[e]=t[e];return n}return[t]}for(e=arguments.length,n=new Array(e);e--;)n[e]=arguments[e];return n},Z=function(t,e){pr=t,hr=e},G=function(t,e){var n=t.stack;return n?(e=e||0,0===n.indexOf(t.name)&&(e+=(t.name+t.message).split("\n").length),n.split("\n").slice(e).filter(hr).map((function(t){return"\n"+t})).join("")):""},J=function(t,e){this._e=yr(),this.name=t,this.message=e},Y=function(t,e){return t+". Errors: "+Object.keys(e).map((function(t){return e[t].toString()})).filter((function(t,e,n){return n.indexOf(t)===e})).join("\n")},Q=function(t,e,n,r){this._e=yr(),this.failures=e,this.failedKeys=r,this.successCount=n,this.message=Y(t,e)},X=function(t,e){this._e=yr(),this.name="BulkError",this.failures=Object.keys(e).map((function(t){return e[t]})),this.failuresByPos=e,this.message=Y(t,e)},tt=function(){},et=function(t){return t},nt=function(t,e){return null==t||t===et?e:function(n){return e(t(n))}},rt=function(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}},ot=function(t,e){return t===tt?e:function(){var n=t.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=e.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?rt(r,this.onsuccess):r),o&&(this.onerror=this.onerror?rt(o,this.onerror):o),void 0!==i?i:n}},it=function(t,e){return t===tt?e:function(){t.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,e.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?rt(n,this.onsuccess):n),r&&(this.onerror=this.onerror?rt(r,this.onerror):r)}},ut=function(t,e){return t===tt?e:function(n){var r=t.apply(this,arguments);L(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var u=e.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?rt(o,this.onsuccess):o),i&&(this.onerror=this.onerror?rt(i,this.onerror):i),void 0===r?void 0===u?void 0:u:L(r,u)}},at=function(t,e){return t===tt?e:function(){return!1!==e.apply(this,arguments)&&t.apply(this,arguments)}},ct=function(t,e){return t===tt?e:function(){var n=t.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return e.apply(r,i)}))}return e.apply(this,arguments)}},st=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=tt,this._lib=!1;var e=this._PSD=$r;if(pr&&(this._stackHolder=yr(),this._prev=null,this._numPrev=0),"function"!=typeof t){if(t!==jr)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&ft(this,this._value))}this._state=null,this._value=null,++e.ref,Zr(this,t)},lt=function(t,e,n,r,o){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r,this.psd=o},ft=function(t,e){if(Ur.push(e),null===t._state){var n=t._lib&&gt();e=Fr(e),t._state=!1,t._value=e,pr&&null!==e&&"object"==typeof e&&!e._promise&&function(n,r,o){try{(function(){var n=Xn(e,"stack");e._promise=t,D(e,"stack",{get:function(){return Lr?n&&(n.get?n.get.apply(e):n.value):t.stack}})}).apply(null,void 0)}catch(t){}}(),r=t,Nr.some((function(t){return t._value===r._value}))||Nr.push(r),dt(t),n&&mt()}var r},dt=function(t){var e=t._listeners;t._listeners=[];for(var n=0,r=e.length;n<r;++n)pt(t,e[n]);var o=t._PSD;--o.ref||o.finalize(),0===Kr&&(++Kr,Mr((function(){0==--Kr&&bt()}),[]))},pt=function(t,e){if(null!==t._state){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return(t._state?e.resolve:e.reject)(t._value);++e.psd.ref,++Kr,Mr(ht,[n,t,e])}else t._listeners.push(e)},ht=function(t,e,n){try{Hr=e;var r,o=e._value;e._state?r=t(o):(Ur.length&&(Ur=[]),r=t(o),-1===Ur.indexOf(o)&&function(t){for(var e=Nr.length;e;)if(Nr[--e]._value===t._value)return void Nr.splice(e,1)}(e)),n.resolve(r)}catch(t){n.reject(t)}finally{Hr=null,0==--Kr&&bt(),--n.psd.ref||n.psd.finalize()}},vt=function(t,e){var n=e?e._numPrev+1:0;n<100&&(t._prev=e,t._numPrev=n)},yt=function(){gt()&&mt()},gt=function(){var t=Dr;return Dr=!1,Br=!1,t},mt=function(){var t,e,n;do{for(;zr.length>0;)for(t=zr,zr=[],n=t.length,e=0;e<n;++e){var r=t[e];r[0].apply(null,r[1])}}while(zr.length>0);Dr=!0,Br=!0},bt=function(){var t=Nr;Nr=[],t.forEach((function(t){t._PSD.onunhandled.call(null,t._value,t)}));for(var e=qr.slice(0),n=e.length;n;)e[--n]()},wt=function(t){return new st(jr,!1,t)},_t=function(t,e){var n=$r;return function(){var r=gt(),o=$r;try{return kt(n,!0),t.apply(this,arguments)}catch(t){e&&e(t)}finally{kt(o,!1),r&&mt()}}},St=function(t,e,n,r){var o=$r,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++eo;var u=Vr.env;i.env=Tr?{Promise:st,PromiseProp:{value:st,configurable:!0,writable:!0},all:st.all,race:st.race,allSettled:st.allSettled,any:st.any,resolve:st.resolve,reject:st.reject,nthen:Lt(u.nthen,i),gthen:Lt(u.gthen,i)}:{},e&&L(i,e),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=Pt(i,t,n,r);return 0===i.ref&&i.finalize(),a},xt=function(){return Jr.id||(Jr.id=++Yr),++Jr.awaits,Jr.echoes+=100,Jr.id},Ot=function(){return!!Jr.awaits&&(0==--Jr.awaits&&(Jr.id=0),Jr.echoes=100*Jr.awaits,!0)},jt=function(t){return Jr.echoes&&t&&t.constructor===Ir?(xt(),t.then((function(t){return Ot(),t}),(function(t){return Ot(),no(t)}))):t},Et=function(t){++to,Jr.echoes&&0!=--Jr.echoes||(Jr.echoes=Jr.id=0),Qr.push($r),kt(t,!0)},Ct=function(){var t=Qr[Qr.length-1];Qr.pop(),kt(t,!1)},kt=function(t,e){var n=$r;if((e?!Jr.echoes||Xr++&&t===$r:!Xr||--Xr&&t===$r)||It(e?Et.bind(null,t):Ct),t!==$r&&($r=t,n===Vr&&(Vr.env=At()),Tr)){var r=Vr.env.Promise,o=t.env;kr.then=o.nthen,r.prototype.then=o.gthen,(n.global||t.global)&&(Object.defineProperty(qn,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}},At=function(){var t=qn.Promise;return Tr?{Promise:t,PromiseProp:Object.getOwnPropertyDescriptor(qn,"Promise"),all:t.all,race:t.race,allSettled:t.allSettled,any:t.any,resolve:t.resolve,reject:t.reject,nthen:kr.then,gthen:t.prototype.then}:{}},Pt=function(t,e,n,r,o){var i=$r;try{return kt(t,!0),e(n,r,o)}finally{kt(i,!1)}},It=function(t){Pr.call(Cr,t)},Tt=function(t,e,n,r){return"function"!=typeof t?t:function(){var o=$r;n&&xt(),kt(e,!0);try{return t.apply(this,arguments)}finally{kt(o,!1),r&&It(Ot)}}},Lt=function(t,e){return function(n,r){return t.call(this,Tt(n,e),Tt(r,e))}},Rt=function(t,e){var n;try{n=e.onuncatched(t)}catch(t){}if(!1!==n)try{var r,o={promise:e,reason:t};if(qn.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),L(r,o)):qn.CustomEvent&&L(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&qn.dispatchEvent&&(dispatchEvent(r),!qn.PromiseRejectionEvent&&qn.onunhandledrejection))try{qn.onunhandledrejection(r)}catch(t){}pr&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: ".concat(t.stack||t))}catch(t){}},Mt=function(t,e){return t?e?function(){return t.apply(this,arguments)&&e.apply(this,arguments)}:t:e},Dt=function(t){return"string"!=typeof t||/\./.test(t)?function(t){return t}:function(e){return void 0===e[t]&&t in e&&delete(e=K(e))[t],e}},Bt=function(t){var e={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return e[n].subscribe.apply(null,i),t}if("string"==typeof n)return e[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(t,r,o){if("object"==typeof t)return u(t);r||(r=at),o||(o=tt);var i={subscribers:[],fire:o,subscribe:function(t){-1===i.subscribers.indexOf(t)&&(i.subscribers.push(t),i.fire=r(i.fire,t))},unsubscribe:function(t){i.subscribers=i.subscribers.filter((function(e){return e!==t})),i.fire=i.subscribers.reduce(r,o)}};return e[t]=n[t]=i,i}function u(t){Wn(t).forEach((function(e){var n=t[e];if(Zn(n))i(e,t[e][0],t[e][1]);else{if("asap"!==n)throw new Sr.InvalidArgument("Invalid event config");var r=i(e,et,(function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];r.subscribers.forEach((function(t){F((function(){t.apply(null,e)}))}))}))}}))}},Nt=function(t,e){return B(e).from({prototype:t}),e},Ut=function(t,e){return!(t.filter||t.algorithm||t.or)&&(e?t.justLimit:!t.replayFilter)},Ht=function(t,e){t.filter=Mt(t.filter,e)},Ft=function(t,e,n){var r=t.replayFilter;t.replayFilter=r?function(){return Mt(r(),e())}:e,t.justLimit=n&&!r},Vt=function(t,e){if(t.isPrimKey)return e.primaryKey;var n=e.getIndexByKeyPath(t.index);if(!n)throw new Sr.Schema("KeyPath "+t.index+" on object store "+e.name+" is not indexed");return n},$t=function(t,e,n){var r=Vt(t,e.schema);return e.openCursor({trans:n,values:!t.keysOnly,reverse:"prev"===t.dir,unique:!!t.unique,query:{index:r,range:t.range}})},zt=function(t,e,n,r){var o=t.replayFilter?Mt(t.filter,t.replayFilter()):t.filter;if(t.or){var i={},u=function(t,n,r){if(!o||o(n,r,(function(t){return n.stop(t)}),(function(t){return n.fail(t)}))){var u=n.primaryKey,a=""+u;"[object ArrayBuffer]"===a&&(a=""+new Uint8Array(u)),R(i,a)||(i[a]=!0,e(t,n,r))}};return Promise.all([t.or._iterate(u,n),Kt($t(t,r,n),t.algorithm,u,!t.keysOnly&&t.valueMapper)])}return Kt($t(t,r,n),Mt(t.algorithm,o),e,!t.keysOnly&&t.valueMapper)},Kt=function(t,e,n,r){var o=_t(r?function(t,e,o){return n(r(t),e,o)}:n);return t.then((function(t){if(t)return t.start((function(){var n=function(){return t.continue()};e&&!e(t,(function(t){return n=t}),(function(e){t.stop(e),n=tt}),(function(e){t.fail(e),n=tt}))||o(t.value,t,(function(t){return n=t})),n()}))}))},qt=function(t){var e=void 0===t?"undefined":d(t);if("object"!==e)return e;if(ArrayBuffer.isView(t))return"binary";var n=q(t);return"ArrayBuffer"===n?"binary":n},Wt=function(t){return c(t,Uint8Array)?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t)},Zt=function(t,e){return t<e?-1:t===e?0:1},Gt=function(t,e){return t>e?-1:t===e?0:1},Jt=function(t,e,n){var r=c(t,go)?new t.Collection(t):t;return r._ctx.error=n?new n(e):new TypeError(e),r},Yt=function(t){return new t.Collection(t,(function(){return ee("")})).limit(0)},Qt=function(t,e,n,r,o,i){for(var u=Math.min(t.length,r.length),a=-1,c=0;c<u;++c){var s=e[c];if(s!==r[c])return o(t[c],n[c])<0?t.substr(0,c)+n[c]+n.substr(c+1):o(t[c],r[c])<0?t.substr(0,c)+r[c]+n.substr(c+1):a>=0?t.substr(0,a)+e[a]+n.substr(a+1):null;o(t[c],s)<0&&(a=c)}return u<r.length&&"next"===i?t+n.substr(t.length):u<t.length&&"prev"===i?t.substr(0,n.length):a<0?null:t.substr(0,a)+r[a]+n.substr(a+1)},Xt=function(t,e,n,r){var o,i,u,a,c,s,l,f=n.length;if(!n.every((function(t){return"string"==typeof t})))return Jt(t,"String expected.");function d(t){o="next"===t?function(t){return t.toUpperCase()}:function(t){return t.toLowerCase()},i="next"===t?function(t){return t.toLowerCase()}:function(t){return t.toUpperCase()},u="next"===t?Zt:Gt;var e=n.map((function(t){return{lower:i(t),upper:o(t)}})).sort((function(t,e){return u(t.lower,e.lower)}));a=e.map((function(t){return t.upper})),c=e.map((function(t){return t.lower})),s=t,l="next"===t?"":r}d("next");var p=new t.Collection(t,(function(){return te(a[0],c[f-1]+r)}));p._ondirectionchange=function(t){d(t)};var h=0;return p._addAlgorithm((function(t,n,r){var o=t.key;if("string"!=typeof o)return!1;var d=i(o);if(e(d,c,h))return!0;for(var p=null,v=h;v<f;++v){var y=Qt(o,d,a[v],c[v],u,s);null===y&&null===p?h=v+1:(null===p||u(p,y)>0)&&(p=y)}return n(null!==p?function(){t.continue(p+l)}:r),!1})),p},te=function(t,e,n,r){return{type:2,lower:t,upper:e,lowerOpen:n,upperOpen:r}},ee=function(t){return{type:1,lower:t,upper:t}},ne=function(t){return _t((function(e){return re(e),t(e.target.error),!1}))},re=function(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault()},oe=function(t,e,n,r,o,i,u){return{name:t,keyPath:e,unique:n,multi:r,auto:o,compound:i,src:(n&&!u?"&":"")+(r?"*":"")+(o?"++":"")+ie(e)}},ie=function(t){return"string"==typeof t?t:t?"["+[].join.call(t,"+")+"]":""},ue=function(t,e,n){return{name:t,primKey:e,indexes:n,mappedClass:null,idxByName:V(n,(function(t){return[t.name,t]}))}},ae=function(t){return null==t?function(){}:"string"==typeof t?1===(e=t).split(".").length?function(t){return t[e]}:function(t){return er(t,e)}:function(e){return er(e,t)};var e},ce=function(t){return[].slice.call(t)},se=function(t){return null==t?":id":"string"==typeof t?t:"[".concat(t.join("+"),"]")},le=function(t,e){var n,r,o,i,u,a,f=t._novip,d=e.db,p=(n=f._middlewares,r=d,i=e,a=(o=f._deps).IDBKeyRange,o.indexedDB,u=function(t,e,n){function r(t){if(3===t.type)return null;if(4===t.type)throw new Error("Cannot convert never type to IDBKeyRange");var n=t.lower,r=t.upper,o=t.lowerOpen,i=t.upperOpen;return void 0===n?void 0===r?null:e.upperBound(r,!!i):void 0===r?e.lowerBound(n,!!o):e.bound(n,r,!!o,!!i)}var o,i,u,a=(i=n,u=ce((o=t).objectStoreNames),{schema:{name:o.name,tables:u.map((function(t){return i.objectStore(t)})).map((function(t){var e=t.keyPath,n=t.autoIncrement,r=Zn(e),o=null==e,i={},u={name:t.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:e,autoIncrement:n,unique:!0,extractKey:ae(e)},indexes:ce(t.indexNames).map((function(e){return t.index(e)})).map((function(t){var e=t.name,n=t.unique,r=t.multiEntry,o=t.keyPath,u={name:e,compound:Zn(o),keyPath:o,unique:n,multiEntry:r,extractKey:ae(o)};return i[se(o)]=u,u})),getIndexByKeyPath:function(t){return i[se(t)]}};return i[":id"]=u.primaryKey,null!=e&&(i[se(e)]=u.primaryKey),u}))},hasGetAll:u.length>0&&"getAll"in i.objectStore(u[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),c=a.schema,s=a.hasGetAll,f=c.tables.map((function(t){return{name:o=(e=t).name,schema:e,mutate:function(t){var e=t.trans,n=t.type,i=t.keys,u=t.values,a=t.range;return new Promise((function(t,c){t=_t(t);var s=e.objectStore(o),f=null==s.keyPath,d="put"===n||"add"===n;if(!d&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);var p,h=(i||u||{length:1}).length;if(i&&u&&i.length!==u.length)throw new Error("Given keys array must have same length as given values array.");if(0===h)return t({numFailures:0,failures:{},results:[],lastResult:void 0});var v=[],y=[],g=0,m=function(t){++g,re(t)};if("deleteRange"===n){if(4===a.type)return t({numFailures:g,failures:y,results:[],lastResult:void 0});3===a.type?v.push(p=s.clear()):v.push(p=s.delete(r(a)))}else{var b=l(d?f?[u,i]:[u,null]:[i,null],2),w=b[0],_=b[1];if(d)for(var S=0;S<h;++S)v.push(p=_&&void 0!==_[S]?s[n](w[S],_[S]):s[n](w[S])),p.onerror=m;else for(var x=0;x<h;++x)v.push(p=s[n](w[x])),p.onerror=m}var O=function(e){var r=e.target.result;v.forEach((function(t,e){return null!=t.error&&(y[e]=t.error)})),t({numFailures:g,failures:y,results:"delete"===n?i:v.map((function(t){return t.result})),lastResult:r})};p.onerror=function(t){m(t),O(t)},p.onsuccess=O}))},getMany:function(t){var e=t.trans,n=t.keys;return new Promise((function(t,r){t=_t(t);for(var i,u=e.objectStore(o),a=n.length,c=new Array(a),s=0,l=0,f=function(e){var n=e.target;c[n._pos]=n.result,++l===s&&t(c)},d=ne(r),p=0;p<a;++p)null!=n[p]&&((i=u.get(n[p]))._pos=p,i.onsuccess=f,i.onerror=d,++s);0===s&&t(c)}))},get:function(t){var e=t.trans,n=t.key;return new Promise((function(t,r){t=_t(t);var i=e.objectStore(o).get(n);i.onsuccess=function(e){return t(e.target.result)},i.onerror=ne(r)}))},query:(n=s,function(t){return new Promise((function(e,i){e=_t(e);var u=t.trans,a=t.values,c=t.limit,s=t.query,l=c===1/0?void 0:c,f=s.index,d=s.range,p=u.objectStore(o),h=f.isPrimaryKey?p:p.index(f.name),v=r(d);if(0===c)return e({result:[]});if(n){var y=a?h.getAll(v,l):h.getAllKeys(v,l);y.onsuccess=function(t){return e({result:t.target.result})},y.onerror=ne(i)}else{var g=0,m=a||!("openKeyCursor"in h)?h.openCursor(v):h.openKeyCursor(v),b=[];m.onsuccess=function(t){var n=m.result;return n?(b.push(a?n.value:n.primaryKey),++g===c?e({result:b}):void n.continue()):e({result:b})},m.onerror=ne(i)}}))}),openCursor:function(t){var e=t.trans,n=t.values,i=t.query,u=t.reverse,a=t.unique;return new Promise((function(t,c){t=_t(t);var s=i.index,l=i.range,f=e.objectStore(o),d=s.isPrimaryKey?f:f.index(s.name),p=u?a?"prevunique":"prev":a?"nextunique":"next",h=n||!("openKeyCursor"in d)?d.openCursor(r(l),p):d.openKeyCursor(r(l),p);h.onerror=ne(c),h.onsuccess=_t((function(n){var r=h.result;if(r){r.___id=++_o,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var u=r.advance.bind(r),a=function(){throw new Error("Cursor not stopped")};r.trans=e,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=_t(c),r.next=function(){var t=this,e=1;return this.start((function(){return e--?t.continue():t.stop()})).then((function(){return t}))},r.start=function(t){var e=new Promise((function(t,e){t=_t(t),h.onerror=ne(e),r.fail=e,r.stop=function(e){r.stop=r.continue=r.continuePrimaryKey=r.advance=a,t(e)}})),n=function(){if(h.result)try{t()}catch(t){r.fail(t)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return h.onsuccess=_t((function(t){h.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=u,n(),e},t(r)}else t(null)}),c)}))},count:function(t){var e=t.query,n=t.trans,i=e.index,u=e.range;return new Promise((function(t,e){var a=n.objectStore(o),c=i.isPrimaryKey?a:a.index(i.name),s=r(u),l=s?c.count(s):c.count();l.onsuccess=_t((function(e){return t(e.target.result)})),l.onerror=ne(e)}))}};var e,n,o})),d={};return f.forEach((function(t){return d[t.name]=t})),{stack:"dbcore",transaction:t.transaction.bind(t),table:function(t){if(!d[t])throw new Error("Table '".concat(t,"' not found"));return d[t]},MIN_KEY:-1/0,MAX_KEY:wo(e),schema:c}}(r,a,i),{dbcore:n.dbcore.reduce((function(t,e){return s({},t,(0,e.create)(t))}),u)});f.core=p.dbcore,f.tables.forEach((function(t){var e=t.name;f.core.schema.tables.some((function(t){return t.name===e}))&&(t.core=f.core.table(e),c(f[e],f.Table)&&(f[e].core=t.core))}))},fe=function(t,e,n,r){var o=t._novip;n.forEach((function(t){var n=r[t];e.forEach((function(e){var r=Xn(e,t);(!r||"value"in r&&void 0===r.value)&&(e===o.Transaction.prototype||c(e,o.Transaction)?D(e,t,{get:function(){return this.table(t)},set:function(e){Yn(this,t,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):e[t]=new o.Table(t,n))}))}))},de=function(t,e){var n=t._novip;e.forEach((function(t){for(var e in t)c(t[e],n.Table)&&delete t[e]}))},pe=function(t,e){return t._cfg.version-e._cfg.version},he=function(t,e){var n,r={del:[],add:[],change:[]};for(n in t)e[n]||r.del.push(n);for(n in e){var o=t[n],i=e[n];if(o){var u={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!ao)u.recreate=!0,r.change.push(u);else{var a=o.idxByName,c=i.idxByName,s=void 0;for(s in a)c[s]||u.del.push(s);for(s in c){var l=a[s],f=c[s];l?l.src!==f.src&&u.change.push(f):u.add.push(f)}(u.del.length>0||u.add.length>0||u.change.length>0)&&r.change.push(u)}}else r.add.push([n,i])}return r},ve=function(t,e,n,r){var o=t.db.createObjectStore(e,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(t){return ye(o,t)})),o},ye=function(t,e){t.createIndex(e.name,e.keyPath,{unique:e.unique,multiEntry:e.multi})},ge=function(t,e,n){var r={};return N(e.objectStoreNames,0).forEach((function(t){for(var e=n.objectStore(t),o=e.keyPath,i=oe(ie(o),o||"",!1,!1,!!e.autoIncrement,o&&"string"!=typeof o,!0),u=[],a=0;a<e.indexNames.length;++a){var c=e.index(e.indexNames[a]);o=c.keyPath;var s=oe(c.name,o,!!c.unique,!!c.multiEntry,!1,o&&"string"!=typeof o,!1);u.push(s)}r[t]=ue(t,i,u)})),r},me=function(t,e,n){for(var r=t._novip,o=n.db.objectStoreNames,i=0;i<o.length;++i){var u=o[i],a=n.objectStore(u);r._hasGetAll="getAll"in a;for(var s=0;s<a.indexNames.length;++s){var l=a.indexNames[s],f=a.index(l).keyPath,d="string"==typeof f?f:"["+N(f).join("+")+"]";if(e[u]){var p=e[u].idxByName[d];p&&(p.name=l,delete e[u].idxByName[d],e[u].idxByName[l]=p)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&qn.WorkerGlobalScope&&c(qn,qn.WorkerGlobalScope)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)},be=function(t,e){var n=t._dbNamesDB;return n||(n=t._dbNamesDB=new To("__dbnames",{addons:[],indexedDB:t,IDBKeyRange:e})).version(1).stores({dbnames:"name"}),n.table("dbnames")},we=function(t){return t&&"function"==typeof t.databases},_e=function(t){return St((function(){return $r.letThrough=!0,t()}))},Se=function(){var t;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(e){var n=function(){return indexedDB.databases().finally(e)};t=setInterval(n,100),n()})).finally((function(){return clearInterval(t)})):Promise.resolve()},xe=function(t){var e=function(e){return t.next(e)},n=o(e),r=o((function(e){return t.throw(e)}));function o(t){return function(e){var o=t(e),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):Zn(i)?Promise.all(i).then(n,r):n(i)}}return o(e)()},Oe=function(t,e,n){var r=arguments.length;if(r<2)throw new Sr.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=z(o);return[t,i,n]},je=function(t,e,n){for(var r=Zn(t)?t.slice():[t],o=0;o<n;++o)r.push(e);return r},Ee=function(t,e,n){try{if(!e)return null;if(e.keys.length<t.length)return null;for(var r=[],o=0,i=0;o<e.keys.length&&i<t.length;++o)0===ho(e.keys[o],t[i])&&(r.push(n?K(e.values[o]):e.values[o]),++i);return r.length===t.length?r:null}catch(t){return null}},Ce=function(t){return!("from"in t)},ke=function(t,e){Ce(e)||function t(e,n){var r=n.from,o=n.to,i=n.l,u=n.r;Ao(e,r,o),i&&t(e,i),u&&t(e,u)}(t,e)},Ae=function(t){var e=Ce(t)?null:{s:0,n:t};return{next:function(t){for(var n=arguments.length>0;e;)switch(e.s){case 0:if(e.s=1,n)for(;e.n.l&&ho(t,e.n.from)<0;)e={up:e,n:e.n.l,s:1};else for(;e.n.l;)e={up:e,n:e.n.l,s:1};case 1:if(e.s=2,!n||ho(t,e.n.to)<=0)return{value:e.n,done:!1};case 2:if(e.n.r){e.s=3,e={up:e,n:e.n.r,s:0};continue}case 3:e=e.up}return{done:!0}}}},Pe=function(t){var e,n,r=((null===(e=t.r)||void 0===e?void 0:e.d)||0)-((null===(n=t.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){var i="r"===o?"l":"r",u=s({},t),a=t[o];t.from=a.from,t.to=a.to,t[o]=a[o],u[o]=a[i],t[i]=u,u.d=Ie(u)}t.d=Ie(t)},Ie=function(t){var e=t.r,n=t.l;return(e?n?Math.max(e.d,n.d):e.d:n?n.d:0)+1},Te=function(t,e){return Wn(e).forEach((function(n){ke(t[n]||(t[n]=new ko),e[n])})),t},Le=function(t){var e=Do;try{Do=!0,mo.storagemutated.fire(t)}finally{Do=e}},Re=function(t,e){return!e||"object"!==zo(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},Me=function(){return new Ko},De=function(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},Be=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},Ne=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){Be(i,r,o,u,a,"next",t)}function a(t){Be(i,r,o,u,a,"throw",t)}u(void 0)}))}},Ue=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},He=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){Ue(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},Fe=function(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=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return De(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)?De(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.")}()},Ve=function(){return Zo},$e=function(){return Go.apply(this,arguments)},ze=function(t,e,n,r){return Jo.apply(this,arguments)},Ke=function(){return Yo.apply(this,arguments)},qe=function(t,e,n,r){return Qo.apply(this,arguments)},We=function(t,e,n){return Xo.apply(this,arguments)},Ze=function(t,e){return ti.apply(this,arguments)},Ge=function(t,e){return ei.apply(this,arguments)},Je=function(t){return ni.apply(this,arguments)},Ye=function(t){return ri.apply(this,arguments)},Qe=function(t){return oi.apply(this,arguments)},Xe=function(t){var e;return!!(null===(e=Wo[t])||void 0===e?void 0:e.options.onBeginEditSyncItem)},tn=function(t){return ii.apply(this,arguments)},en=function(t){return ui.apply(this,arguments)},nn=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Wo[t]={type:t,dependsOn:e,process:n,options:r}},rn=function(){if(!$o&&!($o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $o(ai)},on=function(){return pi+di()},un=function(t){return t.startsWith(pi)},an=function(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},cn=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},sn=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){cn(i,r,o,u,a,"next",t)}function a(t){cn(i,r,o,u,a,"throw",t)}u(void 0)}))}},ln=function(t){return function(t){if(Array.isArray(t))return an(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 an(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)?an(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.")}()},fn=function(){return Object.values(hi)},dn=function(t){hi[t.id]&&console.warn('[setupDynamicOfflineDataHandler] Another second handler with the ID "'.concat(t.id,'" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.')),hi[t.id]=t},pn=function(t){return vi.apply(this,arguments)},hn=function(t,e){return yi.apply(this,arguments)},vn=function(t,e){return gi.apply(this,arguments)},yn=function(t,e,n){return mi.apply(this,arguments)},gn=function(t,e){return bi.apply(this,arguments)},mn=function(t,e,n){return wi.apply(this,arguments)},bn=function(t,e){return _i.apply(this,arguments)},wn=function(t,e,n){return Si.apply(this,arguments)},_n=function(){return xi.apply(this,arguments)},Sn=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},xn=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){Sn(i,r,o,u,a,"next",t)}function a(t){Sn(i,r,o,u,a,"throw",t)}u(void 0)}))}},On=function(){return Cn(),Oi},jn=function(t,e){Cn(),dn({type:"patient",displayName:e.displayName,id:t,isSynced:function(){return Promise.resolve(!0)},sync:function(t,n){return e.onOfflinePatientAdded({patientUuid:t,signal:null!=n?n:(new AbortController).signal})}})},En=function(t){return ji.apply(this,arguments)},Cn=function(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")};h.r(v),h.d(v,{activateOfflineCapability:function(){return T},beginEditSynchronizationItem:function(){return tn},canBeginEditSynchronizationItemsOfType:function(){return Xe},deleteSynchronizationItem:function(){return en},generateOfflineUuid:function(){return on},getCurrentOfflineMode:function(){return P},getDynamicOfflineDataEntries:function(){return pn},getDynamicOfflineDataEntriesFor:function(){return hn},getDynamicOfflineDataHandlers:function(){return fn},getFullSynchronizationItems:function(){return Ye},getFullSynchronizationItemsFor:function(){return Ge},getOfflineDb:function(){return Me},getOfflinePatientDataStore:function(){return On},getOfflineSynchronizationStore:function(){return Ve},getOmrsServiceWorker:function(){return b},getSynchronizationItem:function(){return Qe},getSynchronizationItems:function(){return Je},getSynchronizationItemsFor:function(){return Ze},isOfflineUuid:function(){return un},messageOmrsServiceWorker:function(){return x},offlineUuidPrefix:function(){return pi},omrsOfflineCachingStrategyHttpHeaderName:function(){return Mn},omrsOfflineResponseBodyHttpHeaderName:function(){return Ln},omrsOfflineResponseStatusHttpHeaderName:function(){return Rn},putDynamicOfflineData:function(){return vn},putDynamicOfflineDataFor:function(){return yn},queueSynchronizationItem:function(){return We},queueSynchronizationItemFor:function(){return qe},registerOfflinePatientHandler:function(){return jn},registerOmrsServiceWorker:function(){return m},removeDynamicOfflineData:function(){return gn},removeDynamicOfflineDataFor:function(){return mn},runSynchronization:function(){return $e},setCurrentOfflineMode:function(){return I},setupDynamicOfflineDataHandler:function(){return dn},setupOfflineSync:function(){return nn},syncAllDynamicOfflineData:function(){return bn},syncDynamicOfflineData:function(){return wn},syncOfflinePatientData:function(){return En}});try{self["workbox:window:6.5.1"]&&_()}catch(t){}try{self["workbox:core:6.5.1"]&&_()}catch(t){}var kn=function(){var t=this;this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},An=function(t,e){this.type=t,Object.assign(this,e)},Pn={type:"SKIP_WAITING"},In=function(e){var n,r,o=function(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new kn,r.en=new kn,r.on=new kn,r.un=0,r.an=new Set,r.cn=function(){var t=r.fn,e=t.installing;r.tn>0||!i(e.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=e,t.removeEventListener("updatefound",r.cn)):(r.hn=e,r.an.add(e),r.rn.resolve(e)),++r.tn,e.addEventListener("statechange",r.ln)},r.ln=function(t){var e=r.fn,n=t.target,o=n.state,i=n===r.vn,u={sw:n,isExternal:i,originalEvent:t};!i&&r.mn&&(u.isUpdate=!0),r.dispatchEvent(new An(o,u)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&e.waiting===n&&r.dispatchEvent(new An("waiting",u))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(t){var e=r.hn,n=e!==navigator.serviceWorker.controller;r.dispatchEvent(new An("controlling",{isExternal:n,originalEvent:t,sw:e,isUpdate:r.mn})),n||r.on.resolve(e)},r.gn=(o=function(t){var e=t.data,n=t.ports,o=t.source;return p(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new An("message",{data:e,originalEvent:t,ports:n,sw:o}))}))},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(o.apply(this,t))}catch(t){return Promise.reject(t)}}),r.sn=t,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r};r=e,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var u,a=o.prototype;return a.register=function(t){var e,n,r=(void 0===t?{}:t).immediate,o=void 0!==r&&r;try{var u=this;return e=function(){return u.mn=Boolean(navigator.serviceWorker.controller),u.yn=u.pn(),p(u.bn(),(function(t){u.fn=t,u.yn&&(u.hn=u.yn,u.en.resolve(u.yn),u.on.resolve(u.yn),u.yn.addEventListener("statechange",u.ln,{once:!0}));var e=u.fn.waiting;return e&&i(e.scriptURL,u.sn.toString())&&(u.hn=e,Promise.resolve().then((function(){u.dispatchEvent(new An("waiting",{sw:e,wasWaitingBeforeRegister:!0}))})).then((function(){}))),u.hn&&(u.rn.resolve(u.hn),u.an.add(u.hn)),u.fn.addEventListener("updatefound",u.cn),navigator.serviceWorker.addEventListener("controllerchange",u.dn),u.fn}))},(n=function(){if(!o&&"complete"!==document.readyState)return g(new Promise((function(t){return window.addEventListener("load",t)})))}())&&n.then?n.then(e):e()}catch(t){return Promise.reject(t)}},a.update=function(){try{return this.fn?g(this.fn.update()):void 0}catch(t){return Promise.reject(t)}},a.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},a.messageSW=function(e){try{return p(this.getSW(),(function(n){return t(n,e)}))}catch(t){return Promise.reject(t)}},a.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&t(this.fn.waiting,Pn)},a.pn=function(){var t=navigator.serviceWorker.controller;return t&&i(t.scriptURL,this.sn.toString())?t:void 0},a.bn=function(){try{var t=this;return function(e,n){try{var r=p(navigator.serviceWorker.register(t.sn,t.nn),(function(e){return t.un=performance.now(),e}))}catch(t){return n(t)}return r&&r.then?r.then(void 0,n):r}(0,(function(t){throw t}))}catch(t){return Promise.reject(t)}},(u=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(o.prototype,u),o}(function(){var t=function(){this.Pn=new Map},e=t.prototype;return e.addEventListener=function(t,e){this.Sn(t).add(e)},e.removeEventListener=function(t,e){this.Sn(t).delete(e)},e.dispatchEvent=function(t){t.target=this;for(var e,n=r(this.Sn(t.type));!(e=n()).done;)(0,e.value)(t)},e.Sn=function(t){return this.Pn.has(t)||this.Pn.set(t,new Set),this.Pn.get(t)},t}()),Tn=void 0,Ln="x-omrs-offline-response-body",Rn="x-omrs-offline-response-status",Mn="x-omrs-offline-caching-strategy",Dn=h(602),Bn=h.n(Dn);function Nn(){return(Nn=S(Bn().mark((function t(e){var n;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,b();case 2:if(!(n=t.sent)){t.next=9;break}return t.next=6,n.messageSW(e);case 6:t.t0=t.sent,t.next=10;break;case 9:t.t0={success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."};case 10:return t.abrupt("return",t.t0);case 11:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Un(){return(Un=j(Bn().mark((function t(){var e;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=window.sessionStorage,t.prev=1,e.setItem("someKeyHere","test"),e.removeItem("someKeyHere"),t.next=10;break;case 6:if(t.prev=6,t.t0=t.catch(1),t.t0.code!==DOMException.QUOTA_EXCEEDED_ERR||0!==e.length){t.next=10;break}return t.abrupt("return",!0);case 10:return t.abrupt("return",!1);case 11:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function Hn(){return(Hn=j(Bn().mark((function t(){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!window.indexedDB);case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Fn(){return Fn=j(Bn().mark((function t(){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){var e=indexedDB.open("test");e.onerror=function(){return t(!0)},e.onsuccess=function(){return t(!1)}})));case 1:case"end":return t.stop()}}),t)}))),Fn.apply(this,arguments)}function Vn(){return(Vn=j(Bn().mark((function t(){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,k();case 2:if(t.t1=t.sent,t.t1){t.next=7;break}return t.next=6,C();case 6:t.t1=t.sent;case 7:if(t.t0=t.t1,t.t0){t.next=12;break}return t.next=11,E();case 11:t.t0=t.sent;case 12:return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var $n="openmrs3:offline-mode",zn="unavailable";function Kn(){return(Kn=j(Bn().mark((function t(){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A();case 2:t.sent||(zn="active"===localStorage.getItem($n)?"on":"off"),navigator.onLine;case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var qn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,Wn=Object.keys,Zn=Array.isArray;"undefined"==typeof Promise||qn.Promise||(qn.Promise=Promise);var Gn=Object.getPrototypeOf,Jn={}.hasOwnProperty,Yn=Object.defineProperty,Qn=Object.getOwnPropertyDescriptor;function Xn(t,e){var n;return Qn(t,e)||(n=Gn(t))&&Xn(n,e)}var tr=[].slice;function er(t,e){if(R(t,e))return t[e];if(!e)return t;if("string"!=typeof e){for(var n=[],r=0,o=e.length;r<o;++r){var i=er(t,e[r]);n.push(i)}return n}var u=e.indexOf(".");if(-1!==u){var a=t[e.substr(0,u)];return void 0===a?void 0:er(a,e.substr(u+1))}}function nr(t,e,n){if(t&&void 0!==e&&(!("isFrozen"in Object)||!Object.isFrozen(t)))if("string"!=typeof e&&"length"in e){H("string"!=typeof n&&"length"in n);for(var r=0,o=e.length;r<o;++r)nr(t,e[r],n[r])}else{var i=e.indexOf(".");if(-1!==i){var u=e.substr(0,i),a=e.substr(i+1);if(""===a)void 0===n?Zn(t)&&!isNaN(parseInt(u))?t.splice(u,1):delete t[u]:t[u]=n;else{var c=t[u];c||(c=t[u]={}),nr(c,a,n)}}else void 0===n?Zn(t)&&!isNaN(parseInt(e))?t.splice(e,1):delete t[e]:t[e]=n}}var rr=[].concat,or="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(z([8,16,32,64].map((function(t){return["Int","Uint","Float"].map((function(e){return e+t+"Array"}))})))).filter((function(t){return qn[t]})),ir=or.map((function(t){return qn[t]}));V(or,(function(t){return[t,!0]}));var ur=null;function ar(t){if(!t||"object"!=typeof t)return t;var e=ur&&ur.get(t);if(e)return e;if(Zn(t)){e=[],ur&&ur.set(t,e);for(var n=0,r=t.length;n<r;++n)e.push(ar(t[n]))}else if(ir.indexOf(t.constructor)>=0)e=t;else{var o=Gn(t);for(var i in e=o===Object.prototype?{}:Object.create(o),ur&&ur.set(t,e),t)R(t,i)&&(e[i]=ar(t[i]))}return e}var cr={}.toString,sr="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",lr="symbol"==(void 0===sr?"undefined":d(sr))?function(t){var e;return null!=t&&(e=t[sr])&&e.apply(t)}:function(){return null},fr={},dr="undefined"!=typeof Symbol?function(t){return"AsyncFunction"===t[Symbol.toStringTag]}:function(){return!1},pr="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),hr=function(){return!0},vr=!new Error("").stack;function yr(){if(vr)try{throw yr.arguments,new Error}catch(t){return t}return new Error}var gr=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],mr=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(gr),br={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};B(J).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+G(this._e,2))}},toString:function(){return this.name+": "+this.message}}),B(Q).from(J),B(X).from(J);var wr=mr.reduce((function(t,e){return t[e]=e+"Error",t}),{}),_r=J,Sr=mr.reduce((function(t,e){var n=function(t,n){this._e=yr(),this.name=r,t?"string"==typeof t?(this.message="".concat(t).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof t&&(this.message="".concat(t.name," ").concat(t.message),this.inner=t):(this.message=br[e]||r,this.inner=null)},r=e+"Error";return B(n).from(_r),t[e]=n,t}),{});Sr.Syntax=SyntaxError,Sr.Type=TypeError,Sr.Range=RangeError;var xr=gr.reduce((function(t,e){return t[e+"Error"]=Sr[e],t}),{}),Or=mr.reduce((function(t,e){return-1===["Syntax","Type","Range"].indexOf(e)&&(t[e+"Error"]=Sr[e]),t}),{});Or.ModifyError=Q,Or.DexieError=J,Or.BulkError=X;var jr={},Er=l("undefined"==typeof Promise?[]:function(){var t=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[t,Gn(t),t];var e=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[e,Gn(e),t]}(),3),Cr=Er[0],kr=Er[1],Ar=Er[2],Pr=kr&&kr.then,Ir=Cr&&Cr.constructor,Tr=!!Ar,Lr=!1,Rr=Ar?function(){Ar.then(yt)}:qn.setImmediate?setImmediate.bind(null,yt):qn.MutationObserver?function(){var t=document.createElement("div");new MutationObserver((function(){yt(),t=null})).observe(t,{attributes:!0}),t.setAttribute("i","1")}:function(){setTimeout(yt,0)},Mr=function(t,e){zr.push([t,e]),Br&&(Rr(),Br=!1)},Dr=!0,Br=!0,Nr=[],Ur=[],Hr=null,Fr=et,Vr={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Rt,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(t){try{Rt(t[0],t[1])}catch(t){}}))}},$r=Vr,zr=[],Kr=0,qr=[],Wr={get:function(){var t=function(t,r){var o=this,i=!e.global&&(e!==$r||n!==to),u=i&&!Ot(),a=new st((function(n,a){pt(o,new lt(Tt(t,e,i,u),Tt(r,e,i,u),n,a,e))}));return pr&&vt(a,this),a},e=$r,n=to;return t.prototype=jr,t},set:function(t){D(this,"then",t&&t.prototype===jr?Wr:{get:function(){return t},set:Wr.set})}};function Zr(t,e){try{e((function(e){if(null===t._state){if(e===t)throw new TypeError("A promise cannot be resolved with itself.");var n=t._lib&&gt();e&&"function"==typeof e.then?Zr(t,(function(t,n){c(e,st)?e._then(t,n):e.then(t,n)})):(t._state=!0,t._value=e,dt(t)),n&&mt()}}),ft.bind(null,t))}catch(e){ft(t,e)}}function Gr(t,e,n){if(e.length===n)return e;var r="";if(!1===t._state){var o,i,u=t._value;null!=u?(o=u.name||"Error",i=u.message||u,r=G(u,0)):(o=u,i=""),e.push(o+(i?": "+i:"")+r)}return pr&&((r=G(t._stackHolder,2))&&-1===e.indexOf(r)&&e.push(r),t._prev&&Gr(t._prev,e,n)),e}M(st.prototype,{then:Wr,_then:function(t,e){pt(this,new lt(null,null,t,e,$r))},catch:function(t){if(1===arguments.length)return this.then(null,t);var e=arguments[0],n=arguments[1];return"function"==typeof e?this.then(null,(function(t){return c(t,e)?n(t):wt(t)})):this.then(null,(function(t){return t&&t.name===e?n(t):wt(t)}))},finally:function(t){return this.then((function(e){return t(),e}),(function(e){return t(),wt(e)}))},stack:{get:function(){if(this._stack)return this._stack;try{Lr=!0;var t=Gr(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=t),t}finally{Lr=!1}}},timeout:function(t,e){var n=this;return t<1/0?new st((function(r,o){var i=setTimeout((function(){return o(new Sr.Timeout(e))}),t);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&D(st.prototype,Symbol.toStringTag,"Dexie.Promise"),Vr.env=At(),M(st,{all:function(){var t=W.apply(null,arguments).map(jt);return new st((function(e,n){0===t.length&&e([]);var r=t.length;t.forEach((function(o,i){return st.resolve(o).then((function(n){t[i]=n,--r||e(t)}),n)}))}))},resolve:function(t){if(c(t,st))return t;if(t&&"function"==typeof t.then)return new st((function(e,n){t.then(e,n)}));var e=new st(jr,!0,t);return vt(e,Hr),e},reject:wt,race:function(){var t=W.apply(null,arguments).map(jt);return new st((function(e,n){t.map((function(t){return st.resolve(t).then(e,n)}))}))},PSD:{get:function(){return $r},set:function(t){return $r=t}},totalEchoes:{get:function(){return to}},newPSD:St,usePSD:Pt,scheduler:{get:function(){return Mr},set:function(t){Mr=t}},rejectionMapper:{get:function(){return Fr},set:function(t){Fr=t}},follow:function(t,e){return new st((function(n,r){return St((function(e,n){var r=$r;r.unhandleds=[],r.onunhandled=n,r.finalize=rt((function(){var t=this;qr.push((function r(){0===t.unhandleds.length?e():n(t.unhandleds[0]),qr.splice(qr.indexOf(r),1)})),++Kr,Mr((function(){0==--Kr&&bt()}),[])}),r.finalize),t()}),e,n,r)}))}}),Ir&&(Ir.allSettled&&D(st,"allSettled",(function(){var t=W.apply(null,arguments).map(jt);return new st((function(e){0===t.length&&e([]);var n=t.length,r=new Array(n);t.forEach((function(t,o){return st.resolve(t).then((function(t){return r[o]={status:"fulfilled",value:t}}),(function(t){return r[o]={status:"rejected",reason:t}})).then((function(){return--n||e(r)}))}))}))})),Ir.any&&"undefined"!=typeof AggregateError&&D(st,"any",(function(){var t=W.apply(null,arguments).map(jt);return new st((function(e,n){0===t.length&&n(new AggregateError([]));var r=t.length,o=new Array(r);t.forEach((function(t,i){return st.resolve(t).then((function(t){return e(t)}),(function(t){o[i]=t,--r||n(new AggregateError(o))}))}))}))})));var Jr={awaits:0,echoes:0,id:0},Yr=0,Qr=[],Xr=0,to=0,eo=0;-1===(""+Pr).indexOf("[native code]")&&(xt=Ot=tt);var no=st.reject;function ro(t,e,n,r){if(t.idbdb&&(t._state.openComplete||$r.letThrough||t._vip)){var o=t._createTransaction(e,n,t._dbSchema);try{o.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===wr.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((function(){return ro(t,e,n,r)}))):no(o)}return o._promise(e,(function(t,e){return St((function(){return $r.trans=o,r(t,e,o)}))})).then((function(t){return o._completion.then((function(){return t}))}))}if(t._state.openComplete)return no(new Sr.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return no(new Sr.DatabaseClosed);t.open().catch(tt)}return t._state.dbReadyPromise.then((function(){return ro(t,e,n,r)}))}var oo=String.fromCharCode(65535),io="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",uo=[],ao="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),co=ao,so=ao,lo=function(t){return!/(dexie\.js|dexie\.min\.js)/.test(t)},fo={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1},po=function(){function t(){o(this,t)}return u(t,[{key:"_trans",value:function(t,e,n){var r=function(t,n,r){if(!r.schema[i])throw new Sr.NotFound("Table "+i+" not part of transaction");return e(r.idbtrans,r)},o=this._tx||$r.trans,i=this.name,u=gt();try{return o&&o.db===this.db?o===$r.trans?o._promise(t,r,n):St((function(){return o._promise(t,r,n)}),{trans:o,transless:$r.transless||$r}):ro(this.db,t,[this.name],r)}finally{u&&mt()}}},{key:"get",value:function(t,e){var n=this;return t&&t.constructor===Object?this.where(t).first(e):this._trans("readonly",(function(e){return n.core.get({trans:e,key:t}).then((function(t){return n.hook.reading.fire(t)}))})).then(e)}},{key:"where",value:function(t){var e=function(t,e){try{return 0===i.cmp(t,e)}catch(t){return!1}};if("string"==typeof t)return new this.db.WhereClause(this,t);if(Zn(t))return new this.db.WhereClause(this,"[".concat(t.join("+"),"]"));var n=Wn(t);if(1===n.length)return this.where(n[0]).equals(t[n[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(t){return t.compound&&n.every((function(e){return t.keyPath.indexOf(e)>=0}))&&t.keyPath.every((function(t){return n.indexOf(t)>=0}))}))[0];if(r&&this.db._maxKey!==oo)return this.where(r.name).equals(r.keyPath.map((function(e){return t[e]})));!r&&pr&&console.warn("The query ".concat(JSON.stringify(t)," on ").concat(this.name," would benefit of a compound index [").concat(n.join("+"),"]"));var o=this.schema.idxByName,i=this.db._deps.indexedDB,u=l(n.reduce((function(n,r){var i=l(n,2),u=i[0],a=i[1],c=o[r],s=t[r];return[u||c,u||!c?Mt(a,c&&c.multi?function(t){var n=er(t,r);return Zn(n)&&n.some((function(t){return e(s,t)}))}:function(t){return e(s,er(t,r))}):a]}),[null,null]),2),a=u[0],c=u[1];return a?this.where(a.name).equals(t[a.keyPath]).filter(c):r?this.filter(c):this.where(n).equals("")}},{key:"filter",value:function(t){return this.toCollection().and(t)}},{key:"count",value:function(t){return this.toCollection().count(t)}},{key:"offset",value:function(t){return this.toCollection().offset(t)}},{key:"limit",value:function(t){return this.toCollection().limit(t)}},{key:"each",value:function(t){return this.toCollection().each(t)}},{key:"toArray",value:function(t){return this.toCollection().toArray(t)}},{key:"toCollection",value:function(){return new this.db.Collection(new this.db.WhereClause(this))}},{key:"orderBy",value:function(t){return new this.db.Collection(new this.db.WhereClause(this,Zn(t)?"[".concat(t.join("+"),"]"):t))}},{key:"reverse",value:function(){return this.toCollection().reverse()}},{key:"mapToClass",value:function(t){this.schema.mappedClass=t;var e=function(e){if(!e)return e;var n=Object.create(t.prototype);for(var r in e)if(R(e,r))try{n[r]=e[r]}catch(t){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=e,this.hook("reading",e),t}},{key:"defineClass",value:function(){return this.mapToClass((function(t){L(this,t)}))}},{key:"add",value:function(t,e){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,u=t;return i&&o&&(u=Dt(i)(t)),this._trans("readwrite",(function(t){return n.core.mutate({trans:t,type:"add",keys:null!=e?[e]:null,values:[u]})})).then((function(t){return t.numFailures?st.reject(t.failures[0]):t.lastResult})).then((function(e){if(i)try{nr(t,i,e)}catch(t){}return e}))}},{key:"update",value:function(t,e){if("object"!=typeof t||Zn(t))return this.where(":id").equals(t).modify(e);var n=er(t,this.schema.primKey.keyPath);if(void 0===n)return no(new Sr.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof e?Wn(e).forEach((function(n){nr(t,n,e[n])})):e(t,{value:t,primKey:n})}catch(t){}return this.where(":id").equals(n).modify(e)}},{key:"put",value:function(t,e){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,u=t;return i&&o&&(u=Dt(i)(t)),this._trans("readwrite",(function(t){return n.core.mutate({trans:t,type:"put",values:[u],keys:null!=e?[e]:null})})).then((function(t){return t.numFailures?st.reject(t.failures[0]):t.lastResult})).then((function(e){if(i)try{nr(t,i,e)}catch(t){}return e}))}},{key:"delete",value:function(t){var e=this;return this._trans("readwrite",(function(n){return e.core.mutate({trans:n,type:"delete",keys:[t]})})).then((function(t){return t.numFailures?st.reject(t.failures[0]):void 0}))}},{key:"clear",value:function(){var t=this;return this._trans("readwrite",(function(e){return t.core.mutate({trans:e,type:"deleteRange",range:fo})})).then((function(t){return t.numFailures?st.reject(t.failures[0]):void 0}))}},{key:"bulkGet",value:function(t){var e=this;return this._trans("readonly",(function(n){return e.core.getMany({keys:t,trans:n}).then((function(t){return t.map((function(t){return e.hook.reading.fire(t)}))}))}))}},{key:"bulkAdd",value:function(t,e,n){var r=this,o=Array.isArray(e)?e:void 0,i=(n=n||(o?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(function(e){var n=r,u=r.schema.primKey,a=u.auto,c=u.keyPath;if(c&&o)throw new Sr.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new Sr.InvalidArgument("Arguments objects and keys must have the same length");var s=t.length,l=c&&a?t.map(Dt(c)):t;return r.core.mutate({trans:e,type:"add",keys:o,values:l,wantResults:i}).then((function(t){var e=t.numFailures,r=t.results,o=t.lastResult,u=t.failures;if(0===e)return i?r:o;throw new X("".concat(n.name,".bulkAdd(): ").concat(e," of ").concat(s," operations failed"),u)}))}))}},{key:"bulkPut",value:function(t,e,n){var r=this,o=Array.isArray(e)?e:void 0,i=(n=n||(o?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(function(e){var n=r,u=r.schema.primKey,a=u.auto,c=u.keyPath;if(c&&o)throw new Sr.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new Sr.InvalidArgument("Arguments objects and keys must have the same length");var s=t.length,l=c&&a?t.map(Dt(c)):t;return r.core.mutate({trans:e,type:"put",keys:o,values:l,wantResults:i}).then((function(t){var e=t.numFailures,r=t.results,o=t.lastResult,u=t.failures;if(0===e)return i?r:o;throw new X("".concat(n.name,".bulkPut(): ").concat(e," of ").concat(s," operations failed"),u)}))}))}},{key:"bulkDelete",value:function(t){var e=this,n=t.length;return this._trans("readwrite",(function(n){return e.core.mutate({trans:n,type:"delete",keys:t})})).then((function(t){var r=t.numFailures,o=t.lastResult,i=t.failures;if(0===r)return o;throw new X("".concat(e.name,".bulkDelete(): ").concat(r," of ").concat(n," operations failed"),i)}))}}]),t}();function ho(t,e){try{var n=qt(t),r=qt(e);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return t>e?1:t<e?-1:0;case"binary":return function(t,e){for(var n=t.length,r=e.length,o=n<r?n:r,i=0;i<o;++i)if(t[i]!==e[i])return t[i]<e[i]?-1:1;return n===r?0:n<r?-1:1}(Wt(t),Wt(e));case"Array":return function(t,e){for(var n=t.length,r=e.length,o=n<r?n:r,i=0;i<o;++i){var u=ho(t[i],e[i]);if(0!==u)return u}return n===r?0:n<r?-1:1}(t,e)}}catch(t){}return NaN}var vo=function(){function t(){o(this,t)}return u(t,[{key:"_read",value:function(t,e){var n=this._ctx;return n.error?n.table._trans(null,no.bind(null,n.error)):n.table._trans("readonly",t).then(e)}},{key:"_write",value:function(t){var e=this._ctx;return e.error?e.table._trans(null,no.bind(null,e.error)):e.table._trans("readwrite",t,"locked")}},{key:"_addAlgorithm",value:function(t){var e=this._ctx;e.algorithm=Mt(e.algorithm,t)}},{key:"_iterate",value:function(t,e){return zt(this._ctx,t,e,this._ctx.table.core)}},{key:"clone",value:function(t){var e=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return t&&L(n,t),e._ctx=n,e}},{key:"raw",value:function(){return this._ctx.valueMapper=null,this}},{key:"each",value:function(t){var e=this._ctx;return this._read((function(n){return zt(e,t,n,e.table.core)}))}},{key:"count",value:function(t){var e=this;return this._read((function(t){var n=e._ctx,r=n.table.core;if(Ut(n,!0))return r.count({trans:t,query:{index:Vt(n,r.schema),range:n.range}}).then((function(t){return Math.min(t,n.limit)}));var o=0;return zt(n,(function(){return++o,!1}),t,r).then((function(){return o}))})).then(t)}},{key:"sortBy",value:function(t,e){var n=function(t,e){var n=u(t,i),r=u(e,i);return n<r?-a:n>r?a:0},r=t.split(".").reverse(),o=r[0],i=r.length-1;function u(t,e){return e?u(t[r[e]],e-1):t[o]}var a="next"===this._ctx.dir?1:-1;return this.toArray((function(t){return t.sort(n)})).then(e)}},{key:"toArray",value:function(t){var e=this;return this._read((function(t){var n=e._ctx;if("next"===n.dir&&Ut(n,!0)&&n.limit>0){var r=n.valueMapper,o=Vt(n,n.table.core.schema);return n.table.core.query({trans:t,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(t){var e=t.result;return r?e.map(r):e}))}var i=[];return zt(n,(function(t){return i.push(t)}),t,n.table.core).then((function(){return i}))}),t)}},{key:"offset",value:function(t){var e=this._ctx;return t<=0||(e.offset+=t,Ut(e)?Ft(e,(function(){var e=t;return function(t,n){return 0===e||(1===e?(--e,!1):(n((function(){t.advance(e),e=0})),!1))}})):Ft(e,(function(){var e=t;return function(){return--e<0}}))),this}},{key:"limit",value:function(t){return this._ctx.limit=Math.min(this._ctx.limit,t),Ft(this._ctx,(function(){var e=t;return function(t,n,r){return--e<=0&&n(r),e>=0}}),!0),this}},{key:"until",value:function(t,e){return Ht(this._ctx,(function(n,r,o){return!t(n.value)||(r(o),e)})),this}},{key:"first",value:function(t){return this.limit(1).toArray((function(t){return t[0]})).then(t)}},{key:"last",value:function(t){return this.reverse().first(t)}},{key:"filter",value:function(t){var e,n;return Ht(this._ctx,(function(e){return t(e.value)})),e=this._ctx,n=t,e.isMatch=Mt(e.isMatch,n),this}},{key:"and",value:function(t){return this.filter(t)}},{key:"or",value:function(t){return new this.db.WhereClause(this._ctx.table,t,this)}},{key:"reverse",value:function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}},{key:"desc",value:function(){return this.reverse()}},{key:"eachKey",value:function(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.key,n)}))}},{key:"eachUniqueKey",value:function(t){return this._ctx.unique="unique",this.eachKey(t)}},{key:"eachPrimaryKey",value:function(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.primaryKey,n)}))}},{key:"keys",value:function(t){var e=this._ctx;e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.key)})).then((function(){return n})).then(t)}},{key:"primaryKeys",value:function(t){var e=this._ctx;if("next"===e.dir&&Ut(e,!0)&&e.limit>0)return this._read((function(t){var n=Vt(e,e.table.core.schema);return e.table.core.query({trans:t,values:!1,limit:e.limit,query:{index:n,range:e.range}})})).then((function(t){return t.result})).then(t);e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.primaryKey)})).then((function(){return n})).then(t)}},{key:"uniqueKeys",value:function(t){return this._ctx.unique="unique",this.keys(t)}},{key:"firstKey",value:function(t){return this.limit(1).keys((function(t){return t[0]})).then(t)}},{key:"lastKey",value:function(t){return this.reverse().firstKey(t)}},{key:"distinct",value:function(){var t=this._ctx,e=t.index&&t.table.schema.idxByName[t.index];if(!e||!e.multi)return this;var n={};return Ht(this._ctx,(function(t){var e=t.primaryKey.toString(),r=R(n,e);return n[e]=!0,!r})),this}},{key:"modify",value:function(t){var e=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof t)o=t;else{var i=Wn(t),u=i.length;o=function(e){for(var n=!1,r=0;r<u;++r){var o=i[r],a=t[o];er(e,o)!==a&&(nr(e,o,a),n=!0)}return n}}var a=n.table.core,c=a.schema.primaryKey,s=c.outbound,l=c.extractKey,f=e.db._options.modifyChunkSize||200,d=[],p=0,h=[],v=function(t,e){var n=e.failures,r=e.numFailures;p+=t-r;var o=!0,i=!1,u=void 0;try{for(var a,c=Wn(n)[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=a.value;d.push(n[s])}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}};return e.clone().primaryKeys().then((function(e){var i=function(u){var c=Math.min(f,e.length-u);return a.getMany({trans:r,keys:e.slice(u,u+c),cache:"immutable"}).then((function(d){for(var p=[],h=[],y=s?[]:null,g=[],m=0;m<c;++m){var b=d[m],w={value:K(b),primKey:e[u+m]};!1!==o.call(w,w.value,w)&&(null==w.value?g.push(e[u+m]):s||0===ho(l(b),l(w.value))?(h.push(w.value),s&&y.push(e[u+m])):(g.push(e[u+m]),p.push(w.value)))}var _=Ut(n)&&n.limit===1/0&&("function"!=typeof t||t===yo)&&{index:n.index,range:n.range};return Promise.resolve(p.length>0&&a.mutate({trans:r,type:"add",values:p}).then((function(t){for(var e in t.failures)g.splice(parseInt(e),1);v(p.length,t)}))).then((function(){return(h.length>0||_&&"object"==typeof t)&&a.mutate({trans:r,type:"put",keys:y,values:h,criteria:_,changeSpec:"function"!=typeof t&&t}).then((function(t){return v(h.length,t)}))})).then((function(){return(g.length>0||_&&t===yo)&&a.mutate({trans:r,type:"delete",keys:g,criteria:_}).then((function(t){return v(g.length,t)}))})).then((function(){return e.length>u+c&&i(u+f)}))}))};return i(0).then((function(){if(d.length>0)throw new Q("Error modifying one or more objects",d,p,h);return e.length}))}))}))}},{key:"delete",value:function(){var t=this._ctx,e=t.range;return Ut(t)&&(t.isPrimKey&&!so||3===e.type)?this._write((function(n){var r=t.table.core.schema.primaryKey,o=e;return t.table.core.count({trans:n,query:{index:r,range:o}}).then((function(e){return t.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(t){var n=t.failures,r=(t.lastResult,t.results,t.numFailures);if(r)throw new Q("Could not delete some values",Object.keys(n).map((function(t){return n[t]})),e-r);return e-r}))}))})):this.modify(yo)}}]),t}(),yo=function(t,e){return e.value=null},go=function(){function t(){o(this,t)}return u(t,[{key:"Collection",get:function(){return this._ctx.table.db.Collection}},{key:"between",value:function(t,e,n,r){n=!1!==n,r=!0===r;try{return this._cmp(t,e)>0||0===this._cmp(t,e)&&(n||r)&&(!n||!r)?Yt(this):new this.Collection(this,(function(){return te(t,e,!n,!r)}))}catch(t){return Jt(this,io)}}},{key:"equals",value:function(t){return null==t?Jt(this,io):new this.Collection(this,(function(){return ee(t)}))}},{key:"above",value:function(t){return null==t?Jt(this,io):new this.Collection(this,(function(){return te(t,void 0,!0)}))}},{key:"aboveOrEqual",value:function(t){return null==t?Jt(this,io):new this.Collection(this,(function(){return te(t,void 0,!1)}))}},{key:"below",value:function(t){return null==t?Jt(this,io):new this.Collection(this,(function(){return te(void 0,t,!1,!0)}))}},{key:"belowOrEqual",value:function(t){return null==t?Jt(this,io):new this.Collection(this,(function(){return te(void 0,t)}))}},{key:"startsWith",value:function(t){return"string"!=typeof t?Jt(this,"String expected."):this.between(t,t+oo,!0,!0)}},{key:"startsWithIgnoreCase",value:function(t){return""===t?this.startsWith(t):Xt(this,(function(t,e){return 0===t.indexOf(e[0])}),[t],oo)}},{key:"equalsIgnoreCase",value:function(t){return Xt(this,(function(t,e){return t===e[0]}),[t],"")}},{key:"anyOfIgnoreCase",value:function(){var t=W.apply(fr,arguments);return 0===t.length?Yt(this):Xt(this,(function(t,e){return-1!==e.indexOf(t)}),t,"")}},{key:"startsWithAnyOfIgnoreCase",value:function(){var t=W.apply(fr,arguments);return 0===t.length?Yt(this):Xt(this,(function(t,e){return e.some((function(e){return 0===t.indexOf(e)}))}),t,oo)}},{key:"anyOf",value:function(){var t=this,e=W.apply(fr,arguments),n=this._cmp;try{e.sort(n)}catch(t){return Jt(this,io)}if(0===e.length)return Yt(this);var r=new this.Collection(this,(function(){return te(e[0],e[e.length-1])}));r._ondirectionchange=function(r){n="next"===r?t._ascending:t._descending,e.sort(n)};var o=0;return r._addAlgorithm((function(t,r,i){for(var u=t.key;n(u,e[o])>0;)if(++o===e.length)return r(i),!1;return 0===n(u,e[o])||(r((function(){t.continue(e[o])})),!1)})),r}},{key:"notEqual",value:function(t){return this.inAnyRange([[-1/0,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}},{key:"noneOf",value:function(){var t=W.apply(fr,arguments);if(0===t.length)return new this.Collection(this);try{t.sort(this._ascending)}catch(t){return Jt(this,io)}var e=t.reduce((function(t,e){return t?t.concat([[t[t.length-1][1],e]]):[[-1/0,e]]}),null);return e.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(e,{includeLowers:!1,includeUppers:!1})}},{key:"inAnyRange",value:function(t,e){var n=this,r=function(t,e){return d(t[0],e[0])},o=this._cmp,i=this._ascending,u=this._descending,a=this._min,c=this._max;if(0===t.length)return Yt(this);if(!t.every((function(t){return void 0!==t[0]&&void 0!==t[1]&&i(t[0],t[1])<=0})))return Jt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Sr.InvalidArgument);var s,l=!e||!1!==e.includeLowers,f=e&&!0===e.includeUppers,d=i;try{(s=t.reduce((function(t,e){for(var n=0,r=t.length;n<r;++n){var i=t[n];if(o(e[0],i[1])<0&&o(e[1],i[0])>0){i[0]=a(i[0],e[0]),i[1]=c(i[1],e[1]);break}}return n===r&&t.push(e),t}),[])).sort(r)}catch(t){return Jt(this,io)}var p=0,h=f?function(t){return i(t,s[p][1])>0}:function(t){return i(t,s[p][1])>=0},v=l?function(t){return u(t,s[p][0])>0}:function(t){return u(t,s[p][0])>=0},y=h,g=new this.Collection(this,(function(){return te(s[0][0],s[s.length-1][1],!l,!f)}));return g._ondirectionchange=function(t){"next"===t?(y=h,d=i):(y=v,d=u),s.sort(r)},g._addAlgorithm((function(t,e,r){for(var o=t.key;y(o);)if(++p===s.length)return e(r),!1;return!((h(u=o)||v(u))&&(0===n._cmp(o,s[p][1])||0===n._cmp(o,s[p][0])||e((function(){d===i?t.continue(s[p][0]):t.continue(s[p][1])})),1));var u})),g}},{key:"startsWithAnyOf",value:function(){var t=W.apply(fr,arguments);return t.every((function(t){return"string"==typeof t}))?0===t.length?Yt(this):this.inAnyRange(t.map((function(t){return[t,t+oo]}))):Jt(this,"startsWithAnyOf() only works with strings")}}]),t}(),mo=Bt(null,"storagemutated"),bo=function(){function t(){o(this,t)}return u(t,[{key:"_lock",value:function(){return H(!$r.global),++this._reculock,1!==this._reculock||$r.global||($r.lockOwnerFor=this),this}},{key:"_unlock",value:function(){if(H(!$r.global),0==--this._reculock)for($r.global||($r.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{Pt(t[1],t[0])}catch(t){}}return this}},{key:"_locked",value:function(){return this._reculock&&$r.lockOwnerFor!==this}},{key:"create",value:function(t){var e=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(H(!this.idbtrans),!t&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new Sr.DatabaseClosed(r);case"MissingAPIError":throw new Sr.MissingAPI(r.message,r);default:throw new Sr.OpenFailed(r)}if(!this.active)throw new Sr.TransactionInactive;return H(null===this._completion._state),(t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=_t((function(n){re(n),e._reject(t.error)})),t.onabort=_t((function(n){re(n),e.active&&e._reject(new Sr.Abort(t.error)),e.active=!1,e.on("abort").fire(n)})),t.oncomplete=_t((function(){e.active=!1,e._resolve(),"mutatedParts"in t&&mo.storagemutated.fire(t.mutatedParts)})),this}},{key:"_promise",value:function(t,e,n){var r=this;if("readwrite"===t&&"readwrite"!==this.mode)return no(new Sr.ReadOnly("Transaction is readonly"));if(!this.active)return no(new Sr.TransactionInactive);if(this._locked())return new st((function(o,i){var u=r;r._blockedFuncs.push([function(){u._promise(t,e,n).then(o,i)},$r])}));if(n)return St((function(){var t=r,n=new st((function(n,r){t._lock();var o=e(n,r,t);o&&o.then&&o.then(n,r)}));return n.finally((function(){return t._unlock()})),n._lib=!0,n}));var o=new st((function(t,n){var o=e(t,n,r);o&&o.then&&o.then(t,n)}));return o._lib=!0,o}},{key:"_root",value:function(){return this.parent?this.parent._root():this}},{key:"waitFor",value:function(t){var e=this._root(),n=st.resolve(t);if(e._waitingFor)e._waitingFor=e._waitingFor.then((function(){return n}));else{e._waitingFor=n,e._waitingQueue=[];var r=e.idbtrans.objectStore(e.storeNames[0]);!function t(){for(++e._spinCount;e._waitingQueue.length;)e._waitingQueue.shift()();e._waitingFor&&(r.get(-1/0).onsuccess=t)}()}var o=e._waitingFor;return new st((function(t,r){n.then((function(n){return e._waitingQueue.push(_t(t.bind(null,n)))}),(function(t){return e._waitingQueue.push(_t(r.bind(null,t)))})).finally((function(){e._waitingFor===o&&(e._waitingFor=null)}))}))}},{key:"abort",value:function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Sr.Abort))}},{key:"table",value:function(t){var e=this._memoizedTables||(this._memoizedTables={});if(R(e,t))return e[t];var n=this.schema[t];if(!n)throw new Sr.NotFound("Table "+t+" not part of transaction");var r=new this.db.Table(t,n,this);return r.core=this.db.core.table(t),e[t]=r,r}}]),t}(),wo=function(t){try{return t.only([[]]),wo=function(){return[[]]},[[]]}catch(t){return wo=function(){return oo},oo}},_o=0,So=function(){function t(){o(this,t)}return u(t,[{key:"_parseStoresSpec",value:function(t,e){Wn(t).forEach((function(n){if(null!==t[n]){var r=t[n].split(",").map((function(t,e){var n=(t=t.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return oe(n,r||null,/\&/.test(t),/\*/.test(t),/\+\+/.test(t),Zn(r),0===e)})),o=r.shift();if(o.multi)throw new Sr.Schema("Primary key cannot be multi-valued");r.forEach((function(t){if(t.auto)throw new Sr.Schema("Only primary key can be marked as autoIncrement (++)");if(!t.keyPath)throw new Sr.Schema("Index must have a name and cannot be an empty string")})),e[n]=ue(n,o,r)}}))}},{key:"stores",value:function(t){var e=this.db;this._cfg.storesSource=this._cfg.storesSource?L(this._cfg.storesSource,t):t;var n=e._versions,r={},o={};return n.forEach((function(t){L(r,t._cfg.storesSource),o=t._cfg.dbschema={},t._parseStoresSpec(r,o)})),e._dbSchema=o,de(e,[e._allTables,e,e.Transaction.prototype]),fe(e,[e._allTables,e,e.Transaction.prototype,this._cfg.tables],Wn(o),o),e._storeNames=Wn(o),this}},{key:"upgrade",value:function(t){return this._cfg.contentUpgrade=ct(this._cfg.contentUpgrade||tt,t),this}}]),t}();function xo(t,e,n,r,o){return st.resolve().then((function(){var i=$r.transless||$r,u=t._createTransaction(e,n,t._dbSchema,r),a={trans:u,transless:i};if(r)u.idbtrans=r.idbtrans;else try{u.create(),t._state.PR1398_maxLoop=3}catch(r){return r.name===wr.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((function(){return xo(t,e,n,null,o)}))):no(r)}var c,s=dr(o);s&&xt();var l=st.follow((function(){if(c=o.call(u,u))if(s){var t=Ot.bind(null,null);c.then(t,t)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=xe(c))}),a);return(c&&"function"==typeof c.then?st.resolve(c).then((function(t){return u.active?t:no(new Sr.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return c}))).then((function(t){return r&&u._resolve(),u._completion.then((function(){return t}))})).catch((function(t){return u._reject(t),no(t)}))}))}var Oo={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(t){return s({},t,{table:function(e){var n=function(e){var n,r,o=e.query.index;return o.isVirtual?s({},e,{query:{index:o,range:(n=e.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:je(n.lower,n.lowerOpen?t.MAX_KEY:t.MIN_KEY,r),lowerOpen:!0,upper:je(n.upper,n.upperOpen?t.MIN_KEY:t.MAX_KEY,r),upperOpen:!0})}}):e},r=t.table(e),o=r.schema,i={},u=[];function a(t,e,n){var r=se(t),o=i[r]=i[r]||[],c=null==t?0:"string"==typeof t?1:t.length,l=e>0,f=s({},n,{isVirtual:l,keyTail:e,keyLength:c,extractKey:ae(t),unique:!l&&n.unique});return o.push(f),f.isPrimaryKey||u.push(f),c>1&&a(2===c?t[0]:t.slice(0,c-1),e+1,n),o.sort((function(t,e){return t.keyTail-e.keyTail})),f}var c=a(o.primaryKey.keyPath,0,o.primaryKey);i[":id"]=[c];var l=!0,f=!1,d=void 0;try{for(var p,h=o.indexes[Symbol.iterator]();!(l=(p=h.next()).done);l=!0){var v=p.value;a(v.keyPath,0,v)}}catch(t){f=!0,d=t}finally{try{l||null==h.return||h.return()}finally{if(f)throw d}}var y=s({},r,{schema:s({},o,{primaryKey:c,indexes:u,getIndexByKeyPath:function(t){var e=i[se(t)];return e&&e[0]}}),count:function(t){return r.count(n(t))},query:function(t){return r.query(n(t))},openCursor:function(e){var o=e.query.index,i=o.keyTail,u=o.isVirtual,a=o.keyLength;return u?r.openCursor(n(e)).then((function(n){return n&&(r=n,o=Object.create(r,{continue:{value:function(n){null!=n?r.continue(je(n,e.reverse?t.MAX_KEY:t.MIN_KEY,i)):e.unique?r.continue(r.key.slice(0,a).concat(e.reverse?t.MIN_KEY:t.MAX_KEY,i)):r.continue()}},continuePrimaryKey:{value:function(e,n){r.continuePrimaryKey(je(e,t.MAX_KEY,i),n)}},primaryKey:{get:function(){return r.primaryKey}},key:{get:function(){var t=r.key;return 1===a?t[0]:t.slice(0,a)}},value:{get:function(){return r.value}}}),o);var r,o})):r.openCursor(e)}});return y}})}};function jo(t,e,n,r){return n=n||{},r=r||"",Wn(t).forEach((function(o){if(R(e,o)){var i=t[o],u=e[o];if("object"==typeof i&&"object"==typeof u&&i&&u){var a=q(i);a!==q(u)?n[r+o]=e[o]:"Object"===a?jo(i,u,n,r+o+"."):i!==u&&(n[r+o]=e[o])}else i!==u&&(n[r+o]=e[o])}else n[r+o]=void 0})),Wn(e).forEach((function(o){R(t,o)||(n[r+o]=e[o])})),n}var Eo={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(t){return s({},t,{table:function(e){var n=t.table(e),r=n.schema.primaryKey,o=s({},n,{mutate:function(t){var o=function(t){var e,o,i=$r.trans,u=t.keys||(e=r,"delete"===(o=t).type?o.keys:o.keys||o.values.map(e.extractKey));if(!u)throw new Error("Keys missing");return"delete"!==(t="add"===t.type||"put"===t.type?s({},t,{keys:u}):s({},t)).type&&(t.values=f(t.values)),t.keys&&(t.keys=f(t.keys)),function(t,e,n){return"add"===e.type?Promise.resolve([]):t.getMany({trans:e.trans,keys:n,cache:"immutable"})}(n,t,u).then((function(e){var o=u.map((function(n,o){var u=e[o],s={onerror:null,onsuccess:null};if("delete"===t.type)a.fire.call(s,n,u,i);else if("add"===t.type||void 0===u){var f=c.fire.call(s,n,t.values[o],i);null==n&&null!=f&&(n=f,t.keys[o]=n,r.outbound||nr(t.values[o],r.keyPath,n))}else{var d=jo(u,t.values[o]),p=l.fire.call(s,d,n,u,i);if(p){var h=t.values[o];Object.keys(p).forEach((function(t){R(h,t)?h[t]=p[t]:nr(h,t,p[t])}))}}return s}));return n.mutate(t).then((function(n){for(var r=n.failures,i=n.results,a=n.numFailures,c=n.lastResult,s=0;s<u.length;++s){var l=i?i[s]:u[s],f=o[s];null==l?f.onerror&&f.onerror(r[s]):f.onsuccess&&f.onsuccess("put"===t.type&&e[s]?t.values[s]:l)}return{failures:r,results:i,numFailures:a,lastResult:c}})).catch((function(t){return o.forEach((function(e){return e.onerror&&e.onerror(t)})),Promise.reject(t)}))}))},i=$r.trans,u=i.table(e).hook,a=u.deleting,c=u.creating,l=u.updating;switch(t.type){case"add":if(c.fire===tt)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"put":if(c.fire===tt&&l.fire===tt)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"delete":if(a.fire===tt)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"deleteRange":if(a.fire===tt)break;return i._promise("readwrite",(function(){return d((e=t).trans,e.range,1e4);var e}),!0)}return n.mutate(t);function d(t,e,i){return n.query({trans:t,values:!1,query:{index:r,range:e},limit:i}).then((function(n){var r=n.result;return o({type:"delete",keys:r,trans:t}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:d(t,s({},e,{lower:r[r.length-1],lowerOpen:!0}),i)}))}))}}});return o}})}},Co={stack:"dbcore",level:-1,create:function(t){return{table:function(e){var n=t.table(e);return s({},n,{getMany:function(t){if(!t.cache)return n.getMany(t);var e=Ee(t.keys,t.trans._cache,"clone"===t.cache);return e?st.resolve(e):n.getMany(t).then((function(e){return t.trans._cache={keys:t.keys,values:"clone"===t.cache?K(e):e},e}))},mutate:function(t){return"add"!==t.type&&(t.trans._cache=null),n.mutate(t)}})}}}},ko=function(t,e){if(!this){var n=new ko;return t&&"d"in t&&L(n,t),n}L(this,arguments.length?{d:1,from:t,to:arguments.length>1?e:t}:{d:0})};function Ao(t,e,n){var r=ho(e,n);if(!isNaN(r)){if(r>0)throw RangeError();if(Ce(t))return L(t,{from:e,to:n,d:1});var o=t.l,i=t.r;if(ho(n,t.from)<0)return o?Ao(o,e,n):t.l={from:e,to:n,d:1,l:null,r:null},Pe(t);if(ho(e,t.to)>0)return i?Ao(i,e,n):t.r={from:e,to:n,d:1,l:null,r:null},Pe(t);ho(e,t.from)<0&&(t.from=e,t.l=null,t.d=i?i.d+1:1),ho(n,t.to)>0&&(t.to=n,t.r=null,t.d=t.l?t.l.d+1:1);var u=!t.r;o&&!t.l&&ke(t,o),i&&u&&ke(t,i)}}M(ko.prototype,a({add:function(t){return ke(this,t),this},addKey:function(t){return Ao(this,t,t),this},addKeys:function(t){var e=this;return t.forEach((function(t){return Ao(e,t,t)})),this}},sr,(function(){return Ae(this)})));var Po,Io={stack:"dbcore",level:0,create:function(t){var e=t.schema.name,n=new ko(t.MIN_KEY,t.MAX_KEY);return s({},t,{table:function(r){var o=t.table(r),i=o.schema,u=i.primaryKey,a=u.extractKey,c=u.outbound,f=s({},o,{mutate:function(t){var u=t.trans,a=u.mutatedParts||(u.mutatedParts={}),c=function(t){var n="idb://".concat(e,"/").concat(r,"/").concat(t);return a[n]||(a[n]=new ko)},s=c(""),f=c(":dels"),d=t.type,p=l("deleteRange"===t.type?[t.range]:"delete"===t.type?[t.keys]:t.values.length<50?[[],t.values]:[],2),h=p[0],v=p[1],y=t.trans._cache;return o.mutate(t).then((function(t){if(Zn(h)){"delete"!==d&&(h=t.results),s.addKeys(h);var e=Ee(h,y);e||"add"===d||f.addKeys(h),(e||v)&&(o=c,u=e,a=v,i.indexes.forEach((function(t){var e=function(e){return null!=e?t.extractKey(e):null},n=o(t.name||""),r=function(e){return t.multiEntry&&Zn(e)?e.forEach((function(t){return n.addKey(t)})):n.addKey(e)};(u||a).forEach((function(t,n){var o=u&&e(u[n]),i=a&&e(a[n]);0!==ho(o,i)&&(null!=o&&r(o),null!=i&&r(i))}))})))}else if(h){var r={from:h.lower,to:h.upper};f.add(r),s.add(r)}else s.add(n),f.add(n),i.indexes.forEach((function(t){return c(t.name).add(n)}));var o,u,a;return t}))}}),d=function(e){var n,r,o=e.query,i=o.index,u=o.range;return[i,new ko(null!==(n=u.lower)&&void 0!==n?n:t.MIN_KEY,null!==(r=u.upper)&&void 0!==r?r:t.MAX_KEY)]},p={get:function(t){return[u,new ko(t.key)]},getMany:function(t){return[u,(new ko).addKeys(t.keys)]},count:d,query:d,openCursor:d};return Wn(p).forEach((function(t){f[t]=function(i){var u=$r.subscr;if(u){var f=function(t){var n="idb://".concat(e,"/").concat(r,"/").concat(t);return u[n]||(u[n]=new ko)},d=f(""),h=f(":dels"),v=l(p[t](i),2),y=v[0],g=v[1];if(f(y.name||"").add(g),!y.isPrimaryKey){if("count"!==t){var m="query"===t&&c&&i.values&&o.query(s({},i,{values:!1}));return o[t].apply(this,arguments).then((function(e){if("query"===t){if(c&&i.values)return m.then((function(t){var n=t.result;return d.addKeys(n),e}));var n=i.values?e.result.map(a):e.result;i.values?d.addKeys(n):h.addKeys(n)}else if("openCursor"===t){var r=e,o=i.values;return r&&Object.create(r,{key:{get:function(){return h.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var t=r.primaryKey;return h.addKey(t),t}},value:{get:function(){return o&&d.addKey(r.primaryKey),r.value}}})}return e}))}h.add(n)}}return o[t].apply(this,arguments)}})),f}})}},To=function(){function t(e,n){var r=this;o(this,t),this._middlewares={},this.verno=0;var i=t.dependencies;this._options=n=s({addons:t.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var u=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var a,c,l,f,d={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:tt,dbReadyPromise:null,cancelOpen:tt,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};d.dbReadyPromise=new st((function(t){d.dbReadyResolve=t})),d.openCanceller=new st((function(t,e){d.cancelOpen=e})),this._state=d,this.name=e,this.on=Bt(this,"populate","blocked","versionchange","close",{ready:[ct,tt]}),this.on.ready.subscribe=U(this.on.ready.subscribe,(function(e){return function(n,o){var i=r;t.vip((function(){var t=i._state;if(t.openComplete)t.dbOpenError||st.resolve().then(n),o&&e(n);else if(t.onReadyBeingFired)t.onReadyBeingFired.push(n),o&&e(n);else{e(n);var r=i;o||e((function t(){r.on.ready.unsubscribe(n),r.on.ready.unsubscribe(t)}))}}))}})),this.Collection=(a=this,Nt(vo.prototype,(function(t,e){this.db=a;var n=fo,r=null;if(e)try{n=e()}catch(t){r=t}var o=t._ctx,i=o.table,u=i.hook.reading.fire;this._ctx={table:i,index:o.index,isPrimKey:!o.index||i.schema.primKey.keyPath&&o.index===i.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:u!==et?u:null}}))),this.Table=(f=this,Nt(po.prototype,(function(t,e,n){this.db=f,this._tx=n,this.name=t,this.schema=e,this.hook=f._allTables[t]?f._allTables[t].hook:Bt(null,{creating:[ot,tt],reading:[nt,et],updating:[ut,tt],deleting:[it,tt]})}))),this.Transaction=(l=this,Nt(bo.prototype,(function(t,e,n,r,o){var i=this;this.db=l,this.mode=t,this.storeNames=e,this.schema=n,this.chromeTransactionDurability=r,this.idbtrans=null,this.on=Bt(this,"complete","error","abort"),this.parent=o||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new st((function(t,e){i._resolve=t,i._reject=e})),this._completion.then((function(){i.active=!1,i.on.complete.fire()}),(function(t){var e=i.active;return i.active=!1,i.on.error.fire(t),i.parent?i.parent._reject(t):e&&i.idbtrans&&i.idbtrans.abort(),no(t)}))}))),this.Version=function(t){return Nt(So.prototype,(function(e){this.db=t,this._cfg={version:e,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=(c=this,Nt(go.prototype,(function(t,e,n){this.db=c,this._ctx={table:t,index:":id"===e?null:e,or:n};var r=c._deps.indexedDB;if(!r)throw new Sr.MissingAPI;this._cmp=this._ascending=r.cmp.bind(r),this._descending=function(t,e){return r.cmp(e,t)},this._max=function(t,e){return r.cmp(t,e)>0?t:e},this._min=function(t,e){return r.cmp(t,e)<0?t:e},this._IDBKeyRange=c._deps.IDBKeyRange}))),this.on("versionchange",(function(t){t.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(r.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(r.name,"'. Closing db now to resume the delete request.")),r.close()})),this.on("blocked",(function(t){!t.newVersion||t.newVersion<t.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(t.oldVersion/10))})),this._maxKey=wo(n.IDBKeyRange),this._createTransaction=function(t,e,n,o){return new r.Transaction(t,e,n,r._options.chromeTransactionDurability,o)},this._fireOnBlocked=function(t){var e=r;r.on("blocked").fire(t),uo.filter((function(t){return t.name===e.name&&t!==e&&!t._state.vcFired})).map((function(e){return e.on("versionchange").fire(t)}))},this.use(Oo),this.use(Eo),this.use(Io),this.use(Co),this.vip=Object.create(this,{_vip:{value:!0}}),u.forEach((function(t){return t(r)}))}return u(t,[{key:"version",value:function(t){if(isNaN(t)||t<.1)throw new Sr.Type("Given version is not a positive number");if(t=Math.round(10*t)/10,this.idbdb||this._state.isBeingOpened)throw new Sr.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t);var e=this._versions,n=e.filter((function(e){return e._cfg.version===t}))[0];return n||(n=new this.Version(t),e.push(n),e.sort(pe),n.stores({}),this._state.autoSchema=!1,n)}},{key:"_whenReady",value:function(t){var e=this;return this.idbdb&&(this._state.openComplete||$r.letThrough||this._vip)?t():new st((function(t,n){if(e._state.openComplete)return n(new Sr.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return void n(new Sr.DatabaseClosed);e.open().catch(tt)}e._state.dbReadyPromise.then(t,n)})).then(t)}},{key:"use",value:function(t){var e=t.stack,n=t.create,r=t.level,o=t.name;o&&this.unuse({stack:e,name:o});var i=this._middlewares[e]||(this._middlewares[e]=[]);return i.push({stack:e,create:n,level:null==r?10:r,name:o}),i.sort((function(t,e){return t.level-e.level})),this}},{key:"unuse",value:function(t){var e=t.stack,n=t.name,r=t.create;return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((function(t){return r?t.create!==r:!!n&&t.name!==n}))),this}},{key:"open",value:function(){return function(t){var e=function(){if(n.openCanceller!==o)throw new Sr.DatabaseClosed("db.open() was cancelled")},n=t._state,r=t._deps.indexedDB;if(n.isBeingOpened||t.idbdb)return n.dbReadyPromise.then((function(){return n.dbOpenError?no(n.dbOpenError):t}));pr&&(n.openCanceller._stackHolder=yr()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;var o=n.openCanceller,i=n.dbReadyResolve,u=null,a=!1;return st.race([o,("undefined"==typeof navigator?st.resolve():Se()).then((function(){return new st((function(o,i){if(e(),!r)throw new Sr.MissingAPI;var c=t.name,s=n.autoSchema?r.open(c):r.open(c,Math.round(10*t.verno));if(!s)throw new Sr.MissingAPI;s.onerror=ne(i),s.onblocked=_t(t._fireOnBlocked),s.onupgradeneeded=_t((function(e){if(u=s.transaction,n.autoSchema&&!t._options.allowEmptyDB){s.onerror=re,u.abort(),s.result.close();var o=r.deleteDatabase(c);o.onsuccess=o.onerror=_t((function(){i(new Sr.NoSuchDatabase("Database ".concat(c," doesnt exist")))}))}else{u.onerror=ne(i);var l=e.oldVersion>Math.pow(2,62)?0:e.oldVersion;a=l<1,t._novip.idbdb=s.result,function(t,e,n,r){var o=t._dbSchema,i=t._createTransaction("readwrite",t._storeNames,o);i.create(n),i._completion.catch(r);var u=i._reject.bind(i),a=$r.transless||$r;St((function(){var r,c,s,l,f,d,p,h,v;$r.trans=i,$r.transless=a,0===e?(Wn(o).forEach((function(t){ve(n,t,o[t].primKey,o[t].indexes)})),le(t,n),st.follow((function(){return t.on.populate.fire(i)})).catch(u)):(r=t,c=e,s=i,l=n,f=r._novip,d=[],p=f._versions,h=f._dbSchema=ge(0,f.idbdb,l),v=!1,p.filter((function(t){return t._cfg.version>=c})).forEach((function(t){d.push((function(){var e=h,n=t._cfg.dbschema;me(f,e,l),me(f,n,l),h=f._dbSchema=n;var r=he(e,n);r.add.forEach((function(t){ve(l,t[0],t[1].primKey,t[1].indexes)})),r.change.forEach((function(t){if(t.recreate)throw new Sr.Upgrade("Not yet support for changing primary key");var e=l.objectStore(t.name);t.add.forEach((function(t){return ye(e,t)})),t.change.forEach((function(t){e.deleteIndex(t.name),ye(e,t)})),t.del.forEach((function(t){return e.deleteIndex(t)}))}));var o=t._cfg.contentUpgrade;if(o&&t._cfg.version>c){le(f,l),s._memoizedTables={},v=!0;var i=$(n);r.del.forEach((function(t){i[t]=e[t]})),de(f,[f.Transaction.prototype]),fe(f,[f.Transaction.prototype],Wn(i),i),s.schema=i;var u,a=dr(o);a&&xt();var d=st.follow((function(){if((u=o(s))&&a){var t=Ot.bind(null,null);u.then(t,t)}}));return u&&"function"==typeof u.then?st.resolve(u):d.then((function(){return u}))}})),d.push((function(e){var n,r;v&&co||(n=t._cfg.dbschema,r=e,[].slice.call(r.db.objectStoreNames).forEach((function(t){return null==n[t]&&r.db.deleteObjectStore(t)}))),de(f,[f.Transaction.prototype]),fe(f,[f.Transaction.prototype],f._storeNames,f._dbSchema),s.schema=f._dbSchema}))})),function t(){return d.length?st.resolve(d.shift()(s.idbtrans)).then(t):st.resolve()}().then((function(){var t,e;e=l,Wn(t=h).forEach((function(n){e.db.objectStoreNames.contains(n)||ve(e,n,t[n].primKey,t[n].indexes)}))}))).catch(u)}))}(t,l/10,u,i)}}),i),s.onsuccess=_t((function(){u=null;var e,r,i,l,f=t._novip.idbdb=s.result,d=N(f.objectStoreNames);if(d.length>0)try{var p=f.transaction(1===(l=d).length?l[0]:l,"readonly");n.autoSchema?function(t,e,n){var r=t._novip;r.verno=e.version/10;var o=r._dbSchema=ge(0,e,n);r._storeNames=N(e.objectStoreNames,0),fe(r,[r._allTables],Wn(o),o)}(t,f,p):(me(t,t._dbSchema,p),r=p,!((i=he(ge(0,(e=t).idbdb,r),e._dbSchema)).add.length||i.change.some((function(t){return t.add.length||t.change.length})))||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),le(t,p)}catch(t){}uo.push(t),f.onversionchange=_t((function(e){n.vcFired=!0,t.on("versionchange").fire(e)})),f.onclose=_t((function(e){t.on("close").fire(e)})),a&&function(t,e){var n=t.indexedDB,r=t.IDBKeyRange;!we(n)&&"__dbnames"!==e&&be(n,r).put({name:e}).catch(tt)}(t._deps,c),o()}),i)}))}))]).then((function(){return e(),n.onReadyBeingFired=[],st.resolve(_e((function(){return t.on.ready.fire(t.vip)}))).then((function e(){if(n.onReadyBeingFired.length>0){var r=n.onReadyBeingFired.reduce(ct,tt);return n.onReadyBeingFired=[],st.resolve(_e((function(){return r(t.vip)}))).then(e)}}))})).finally((function(){n.onReadyBeingFired=null,n.isBeingOpened=!1})).then((function(){return t})).catch((function(e){n.dbOpenError=e;try{u&&u.abort()}catch(t){}return o===n.openCanceller&&t._close(),no(e)})).finally((function(){n.openComplete=!0,i()}))}(this)}},{key:"_close",value:function(){var t=this._state,e=uo.indexOf(this);if(e>=0&&uo.splice(e,1),this.idbdb){try{this.idbdb.close()}catch(t){}this._novip.idbdb=null}t.dbReadyPromise=new st((function(e){t.dbReadyResolve=e})),t.openCanceller=new st((function(e,n){t.cancelOpen=n}))}},{key:"close",value:function(){this._close();var t=this._state;this._options.autoOpen=!1,t.dbOpenError=new Sr.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)}},{key:"delete",value:function(){var t=this,e=arguments.length>0,n=this._state;return new st((function(r,o){var i=t,u=function(){var t=i;i.close();var e=i._deps.indexedDB.deleteDatabase(i.name);e.onsuccess=_t((function(){!function(t,e){var n=t.indexedDB,r=t.IDBKeyRange;!we(n)&&"__dbnames"!==e&&be(n,r).delete(e).catch(tt)}(t._deps,t.name),r()})),e.onerror=ne(o),e.onblocked=i._fireOnBlocked};if(e)throw new Sr.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(u):u()}))}},{key:"backendDB",value:function(){return this.idbdb}},{key:"isOpen",value:function(){return null!==this.idbdb}},{key:"hasBeenClosed",value:function(){var t=this._state.dbOpenError;return t&&"DatabaseClosed"===t.name}},{key:"hasFailed",value:function(){return null!==this._state.dbOpenError}},{key:"dynamicallyOpened",value:function(){return this._state.autoSchema}},{key:"tables",get:function(){var t=this;return Wn(this._allTables).map((function(e){return t._allTables[e]}))}},{key:"transaction",value:function(){var t=Oe.apply(this,arguments);return this._transaction.apply(this,t)}},{key:"_transaction",value:function(t,e,n){var r=this,o=$r.trans;o&&o.db===this&&-1===t.indexOf("!")||(o=null);var i,u,a=-1!==t.indexOf("?");t=t.replace("!","").replace("?","");try{var s=this;if(u=e.map((function(t){var e=c(t,s.Table)?t.name:t;if("string"!=typeof e)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return e})),"r"==t||"readonly"===t)i="readonly";else{if("rw"!=t&&"readwrite"!=t)throw new Sr.InvalidArgument("Invalid transaction mode: "+t);i="readwrite"}if(o){if("readonly"===o.mode&&"readwrite"===i){if(!a)throw new Sr.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&u.forEach((function(t){if(o&&-1===o.storeNames.indexOf(t)){if(!a)throw new Sr.SubTransaction("Table "+t+" not included in parent transaction.");o=null}})),a&&o&&!o.active&&(o=null)}}catch(t){return o?o._promise(null,(function(e,n){n(t)})):no(t)}var l=xo.bind(null,this,i,u,o,n);return o?o._promise(i,l,"lock"):$r.trans?Pt($r.transless,(function(){return r._whenReady(l)})):this._whenReady(l)}},{key:"table",value:function(t){if(!R(this._allTables,t))throw new Sr.InvalidTable("Table ".concat(t," does not exist"));return this._allTables[t]}}]),t}(),Lo="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Ro=function(){function t(e){o(this,t),this._subscribe=e}return u(t,[{key:"subscribe",value:function(t,e,n){return this._subscribe(t&&"function"!=typeof t?t:{next:t,error:e,complete:n})}},{key:Lo,value:function(){return this}}]),t}();try{Po={indexedDB:qn.indexedDB||qn.mozIndexedDB||qn.webkitIndexedDB||qn.msIndexedDB,IDBKeyRange:qn.IDBKeyRange||qn.webkitIDBKeyRange}}catch(t){Po={indexedDB:null,IDBKeyRange:null}}var Mo=To;M(Mo,s({},Or,{delete:function(t){return new Mo(t,{addons:[]}).delete()},exists:function(t){return new Mo(t,{addons:[]}).open().then((function(t){return t.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(t){try{return function(t){var e=t.indexedDB,n=t.IDBKeyRange;return we(e)?Promise.resolve(e.databases()).then((function(t){return t.map((function(t){return t.name})).filter((function(t){return"__dbnames"!==t}))})):be(e,n).toCollection().primaryKeys()}(Mo.dependencies).then(t)}catch(t){return no(new Sr.MissingAPI)}},defineClass:function(){return function(t){L(this,t)}},ignoreTransaction:function(t){return $r.trans?Pt($r.transless,t):t()},vip:_e,async:function(t){return function(){try{var e=xe(t.apply(this,arguments));return e&&"function"==typeof e.then?e:st.resolve(e)}catch(t){return no(t)}}},spawn:function(t,e,n){try{var r=xe(t.apply(n,e||[]));return r&&"function"==typeof r.then?r:st.resolve(r)}catch(t){return no(t)}},currentTransaction:{get:function(){return $r.trans||null}},waitFor:function(t,e){var n=st.resolve("function"==typeof t?Mo.ignoreTransaction(t):t).timeout(e||6e4);return $r.trans?$r.trans.waitFor(n):n},Promise:st,debug:{get:function(){return pr},set:function(t){Z(t,"dexie"===t?function(){return!0}:lo)}},derive:B,extend:L,props:M,override:U,Events:Bt,on:mo,liveQuery:function(t){return new Ro((function(e){var n=function(){return Wn(u).some((function(t){return i[t]&&function(t,e){var n=Ae(e),r=n.next();if(r.done)return!1;for(var o=r.value,i=Ae(t),u=i.next(o.from),a=u.value;!r.done&&!u.done;){if(ho(a.from,o.to)<=0&&ho(a.to,o.from)>=0)return!0;ho(o.from,a.from)<0?o=(r=n.next(a.from)).value:a=(u=i.next(o.from)).value}return!1}(i[t],u[t])}))},r=dr(t),o=!1,i={},u={},a={get closed(){return o},unsubscribe:function(){o=!0,mo.storagemutated.unsubscribe(l)}};e.start&&e.start(a);var c=!1,s=!1,l=function(t){Te(i,t),n()&&f()},f=function(){if(!c&&!o){i={};var d={},p=function(e){r&&xt();var n=function(){return St(t,{subscr:e,trans:null})},o=$r.trans?Pt($r.transless,n):n();return r&&o.then(Ot,Ot),o}(d);s||(mo("storagemutated",l),s=!0),c=!0,Promise.resolve(p).then((function(t){c=!1,o||(n()?f():(i={},u=d,e.next&&e.next(t)))}),(function(t){c=!1,e.error&&e.error(t),a.unsubscribe()}))}};return f(),a}))},extendObservabilitySet:Te,getByKeyPath:er,setByKeyPath:nr,delByKeyPath:function(t,e){"string"==typeof e?nr(t,e,void 0):"length"in e&&[].map.call(e,(function(e){nr(t,e,void 0)}))},shallowClone:$,deepClone:K,getObjectDiff:jo,cmp:ho,asap:F,minKey:-1/0,addons:[],connections:uo,errnames:wr,dependencies:Po,semVer:"3.2.1",version:"3.2.1".split(".").map((function(t){return parseInt(t)})).reduce((function(t,e,n){return t+e/Math.pow(10,2*n)}))})),Mo.maxKey=wo(Mo.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(mo("storagemutated",(function(t){var e;Do||(ao?(e=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,t):e=new CustomEvent("x-storagemutated-1",{detail:t}),Do=!0,dispatchEvent(e),Do=!1)})),addEventListener("x-storagemutated-1",(function(t){var e=t.detail;Do||Le(e)})));var Do=!1;if("undefined"!=typeof BroadcastChannel){var Bo=new BroadcastChannel("x-storagemutated-1");mo("storagemutated",(function(t){Do||Bo.postMessage(t)})),Bo.onmessage=function(t){t.data&&Le(t.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){mo("storagemutated",(function(t){try{Do||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:t})),"object"==typeof self.clients&&f(self.clients.matchAll({includeUncontrolled:!0})).forEach((function(e){return e.postMessage({type:"x-storagemutated-1",changedParts:t})})))}catch(t){}})),addEventListener("storage",(function(t){if("x-storagemutated-1"===t.key){var e=JSON.parse(t.newValue);e&&Le(e.changedParts)}}));var No=self.document&&navigator.serviceWorker;No&&No.addEventListener("message",(function(t){var e=t.data;e&&"x-storagemutated-1"===e.type&&Le(e.changedParts)}))}st.rejectionMapper=function(t,e){if(!t||c(t,J)||c(t,TypeError)||c(t,SyntaxError)||!t.name||!xr[t.name])return t;var n=new xr[t.name](e||t.message,t);return"stack"in t&&D(n,"stack",{get:function(){return this.inner.stack}}),n},Z(pr,lo);var Uo=h(766),Ho=h(685);function Fo(t){return(Fo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Vo(t,e){return(Vo=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var $o,zo=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":d(t)},Ko=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Vo(t,e)}(o,t);var e,n,r=(e=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=Fo(e);if(n){var o=Fo(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Re(this,t)});function o(){var t;return function(t,e){if(!c(t,e))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this,"EsmOffline")).version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),t.syncQueue=t.table("syncQueue"),t.dynamicOfflineData=t.table("dynamicOfflineData"),t}return o}(To),qo=new Ko,Wo={},Zo=(0,Ho.createGlobalStore)("offline-synchronization",{});function Go(){return Go=Ne(Bn().mark((function t(){var e,n,r,o,i,u,a,c,s,l,f,d,p;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Zo.getState().synchronization){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,qo.syncQueue.count();case 4:e=t.sent,n={},r=Object.entries(Wo),o=r.length,i={},u=new AbortController,a=function(){var t=Zo.getState().synchronization;Zo.setState({synchronization:He({},t,{pendingCount:t.pendingCount-1})})},t.prev=11,Zo.setState({synchronization:{totalCount:e,pendingCount:e,abortController:u}}),c=0;case 14:if(!(c<o&&r.length>0)){t.next=30;break}s=r.length;case 16:if(!s--){t.next=27;break}if(l=Fe(r[s],2),f=l[0],d=l[1],!(p=d.dependsOn.map((function(t){return n[t]}))).every(Boolean)){t.next=25;break}return i[f]={},t.next=23,Promise.all(p);case 23:n[f]=ze(d,i,u,a),r.splice(s,1);case 25:t.next=16;break;case 27:c++,t.next=14;break;case 30:return t.next=32,Promise.allSettled(Object.values(n));case 32:return t.prev=32,Zo.setState({synchronization:void 0}),t.finish(32);case 35:case"end":return t.stop()}}),t,null,[[11,,32,35]])}))),Go.apply(this,arguments)}function Jo(){return Jo=Ne(Bn().mark((function t(e,n,r,o){var i,u,a,c,s,l,f,d,p,h,v,y,g,m,b,w;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.type,u=e.dependsOn,a=e.process,c=[],s=[],t.next=5,Ke();case 5:return l=t.sent,t.next=8,qo.syncQueue.where({type:i,userId:l}).each((function(t,e){c.push([e.primaryKey,t.content,t.descriptor]),s.push(t.content)}));case 8:f=0;case 9:if(!(f<c.length)){t.next=31;break}return d=Fe(c[f],3),p=d[0],h=d[1],v=d[2],y=v.id,g=v.dependencies,m=void 0===g?[]:g,t.prev=11,t.next=14,a(h,{abort:r,index:f,items:s,userId:l,dependencies:m.map((function(t){var e=t.id,r=t.type;return u.includes(r)?n[r][e]:void 0}))});case 14:return b=t.sent,void 0!==y&&(n[i][y]=b),t.next=18,qo.syncQueue.delete(p);case 18:t.next=25;break;case 20:return t.prev=20,t.t0=t.catch(11),t.next=25,qo.syncQueue.update(p,{lastError:{name:null===t.t0||void 0===t.t0?void 0:t.t0.name,message:null!==(w=null===t.t0||void 0===t.t0?void 0:t.t0.message)&&void 0!==w?w:null===t.t0||void 0===t.t0?void 0:t.t0.toString()}});case 25:return t.prev=25,o(),t.finish(25);case 28:f++,t.next=9;break;case 31:case"end":return t.stop()}}),t,null,[[11,20,25,28]])}))),Jo.apply(this,arguments)}function Yo(){return(Yo=Ne(Bn().mark((function t(){var e;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Uo.getLoggedInUser)();case 2:return e=t.sent,t.abrupt("return",(null==e?void 0:e.uuid)||"*");case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Qo(){return(Qo=Ne(Bn().mark((function t(e,n,r,o){var i,u;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===(i=o&&o.id)){t.next=4;break}return t.next=4,qo.syncQueue.where({type:n,userId:e}).filter((function(t){return(null==t?void 0:t.descriptor.id)===i})).delete().catch(To.errnames.DatabaseClosed);case 4:return t.next=6,qo.syncQueue.add({type:n,content:r,userId:e,descriptor:o||{},createdOn:new Date}).catch(To.errnames.DatabaseClosed,(function(){return-1}));case 6:return u=t.sent,t.abrupt("return",u);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Xo(){return(Xo=Ne(Bn().mark((function t(e,n,r){var o;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ke();case 2:return o=t.sent,t.next=5,qe(o,e,n,r);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ti(){return(ti=Ne(Bn().mark((function t(e,n){var r;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ge(e,n);case 2:return r=t.sent,t.abrupt("return",r.map((function(t){return t.content})));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ei(){return(ei=Ne(Bn().mark((function t(e,n){var r;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n?{type:n,userId:e}:{userId:e},t.next=3,qo.syncQueue.where(r).toArray().catch(To.errnames.DatabaseClosed,(function(){return[]}));case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ni(){return(ni=Ne(Bn().mark((function t(e){var n;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ke();case 2:return n=t.sent,t.next=5,Ze(n,e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ri(){return(ri=Ne(Bn().mark((function t(e){var n;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ke();case 2:return n=t.sent,t.next=5,Ge(n,e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function oi(){return(oi=Ne(Bn().mark((function t(e){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,qo.syncQueue.get(e).catch(To.errnames.DatabaseClosed,(function(){}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ii(){return(ii=Ne(Bn().mark((function t(e){var n,r,o;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,Qe(e);case 3:if(r=t.sent){t.next=6;break}throw new Error("No sync item with the ID ".concat(e," exists."));case 6:if(o=null===(n=Wo[r.type])||void 0===n?void 0:n.options.onBeginEditSyncItem){t.next=9;break}throw new Error("A sync item with the ID ".concat(e,' exists, but the associated handler (if one exists) doesn\'t support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "').concat(r.type,'" supports editing items.'));case 9:o(r);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ui(){return(ui=Ne(Bn().mark((function t(e){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,qo.syncQueue.delete(e).catch(To.errnames.DatabaseClosed);case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}for(var ai=new Uint8Array(16),ci=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,si=function(t){return"string"==typeof t&&ci.test(t)},li=[],fi=0;fi<256;++fi)li.push((fi+256).toString(16).substr(1));var di=function(t,e,n){var r=(t=t||{}).random||(t.rng||rn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var o=0;o<16;++o)e[n+o]=r[o];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(li[t[e+0]]+li[t[e+1]]+li[t[e+2]]+li[t[e+3]]+"-"+li[t[e+4]]+li[t[e+5]]+"-"+li[t[e+6]]+li[t[e+7]]+"-"+li[t[e+8]]+li[t[e+9]]+"-"+li[t[e+10]]+li[t[e+11]]+li[t[e+12]]+li[t[e+13]]+li[t[e+14]]+li[t[e+15]]).toLowerCase();if(!si(n))throw TypeError("Stringified UUID is invalid");return n}(r)},pi="OFFLINE+",hi={};function vi(){return(vi=sn(Bn().mark((function t(e){var n;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_n();case 2:return n=t.sent,t.next=5,hn(n,e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function yi(){return(yi=sn(Bn().mark((function t(e,n){var r,o;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n?{type:n,users:e}:{users:e},o=new Ko,t.next=4,o.dynamicOfflineData.where(r).toArray().catch(To.errnames.DatabaseClosed,(function(){return[]}));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function gi(){return(gi=sn(Bn().mark((function t(e,n){var r;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_n();case 2:return r=t.sent,t.next=5,yn(r,e,n);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function mi(){return(mi=sn(Bn().mark((function t(e,n,r){var o,i;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new Ko,t.next=3,o.dynamicOfflineData.get({type:n,identifier:r}).catch(To.errnames.DatabaseClosed,(function(){}));case 3:if(i=t.sent){t.next=9;break}return t.next=7,o.dynamicOfflineData.add({users:[e],type:n,identifier:r}).catch(To.errnames.DatabaseClosed);case 7:t.next=12;break;case 9:if(i.users.includes(e)){t.next=12;break}return t.next=12,o.dynamicOfflineData.update(i.id,{users:ln(i.users).concat([e])}).catch(To.errnames.DatabaseClosed);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function bi(){return(bi=sn(Bn().mark((function t(e,n){var r;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_n();case 2:return r=t.sent,t.next=5,mn(r,e,n);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function wi(){return(wi=sn(Bn().mark((function t(e,n,r){var o,i;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new Ko,t.next=3,o.dynamicOfflineData.get({type:n,identifier:r,users:e}).catch(To.errnames.DatabaseClosed,(function(){}));case 3:if(!(i=t.sent)){t.next=12;break}if(!(i.users.length>1)){t.next=10;break}return t.next=8,o.dynamicOfflineData.update(i.id,{users:i.users.filter((function(t){return t!==e}))}).catch(To.errnames.DatabaseClosed);case 8:t.next=12;break;case 10:return t.next=12,o.dynamicOfflineData.delete(i.id).catch(To.errnames.DatabaseClosed);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function _i(){return _i=sn(Bn().mark((function t(e,n){var r;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,pn(e);case 2:return r=t.sent,t.next=5,Promise.all(r.map(function(){var t=sn(Bn().mark((function t(e){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",wn(e.type,e.identifier,n));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 5:case"end":return t.stop()}}),t)}))),_i.apply(this,arguments)}function Si(){return Si=sn(Bn().mark((function t(e,n,r){var o,i,u,a,c,s,l,f,d;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,vn(e,n);case 2:return o=new Ko,t.next=5,_n();case 5:return i=t.sent,t.next=8,o.dynamicOfflineData.get({type:e,identifier:n}).catch(To.errnames.DatabaseClosed,(function(){}));case 8:if(u=t.sent,a=fn().filter((function(t){return t.type===e})),u){t.next=12;break}return t.abrupt("return");case 12:return t.next=14,Promise.all(a.map(function(){var t=sn(Bn().mark((function t(e){var o,i,u;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e.sync(n,r),t.abrupt("return",{id:e.id,error:void 0});case 5:return t.prev=5,t.t0=t.catch(0),u=null!==(i=null===(o=t.t0.message)||void 0===o?void 0:o.toString())&&void 0!==i?i:t.t0.toString(),t.abrupt("return",{id:e.id,error:u});case 11:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e){return t.apply(this,arguments)}}()));case 14:if(c=t.sent,s=c.filter((function(t){return!t.error})).map((function(t){return t.id})),l=c.filter((function(t){return t.error})).map((function(t){return t.id})),f=c.filter((function(t){return t.error})).map((function(t){return{handlerId:t.id,message:t.error}})),d={syncedOn:new Date,syncedBy:i,succeededHandlers:s,erroredHandlers:l,errors:f},!u.id){t.next=22;break}return t.next=22,o.dynamicOfflineData.update(u.id,{syncState:d}).catch(To.errnames.DatabaseClosed);case 22:case"end":return t.stop()}}),t)}))),Si.apply(this,arguments)}function xi(){return(xi=sn(Bn().mark((function t(){var e;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Uo.getLoggedInUser)();case 2:if(e=t.sent.uuid){t.next=5;break}throw new Error("Using the dynamic offline data API requires a logged in user.");case 5:return t.abrupt("return",e);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Oi=(0,Ho.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function ji(){return(ji=xn(Bn().mark((function t(e){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Cn(),t.next=3,wn("patient",e);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}}(),v}())}}}))},336:(t,e,n)=>{function r(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}t=n.nmd(t);var o=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};System.register(["react","@openmrs/esm-config","@openmrs/esm-extensions","@openmrs/esm-globals","react-dom","i18next","react-i18next","@openmrs/esm-api","dayjs"],(function(i,u){var a={},c={},s={},l={},f={},d={},p={},h={},v={};return{setters:[function(t){a.createContext=t.createContext,a.createElement=t.createElement,a.default=t.default,a.useCallback=t.useCallback,a.useContext=t.useContext,a.useDebugValue=t.useDebugValue,a.useEffect=t.useEffect,a.useLayoutEffect=t.useLayoutEffect,a.useMemo=t.useMemo,a.useReducer=t.useReducer,a.useRef=t.useRef,a.useState=t.useState},function(t){c.getConfigStore=t.getConfigStore,c.getExtensionConfigFromStore=t.getExtensionConfigFromStore,c.getExtensionsConfigStore=t.getExtensionsConfigStore,c.interpolateUrl=t.interpolateUrl,c.navigate=t.navigate},function(t){s.getConnectedExtensions=t.getConnectedExtensions,s.getExtensionInternalStore=t.getExtensionInternalStore,s.getExtensionStore=t.getExtensionStore,s.registerExtensionSlot=t.registerExtensionSlot,s.renderExtension=t.renderExtension},function(t){l.subscribeConnectivityChanged=t.subscribeConnectivityChanged},function(t){f.default=t.default},function(t){d.default=t.default},function(t){p.I18nextProvider=t.I18nextProvider},function(t){h.defaultVisitCustomRepresentation=t.defaultVisitCustomRepresentation,h.fetchCurrentPatient=t.fetchCurrentPatient,h.getCurrentUser=t.getCurrentUser,h.getLocations=t.getLocations,h.getSessionStore=t.getSessionStore,h.getVisitTypes=t.getVisitTypes,h.openmrsFetch=t.openmrsFetch,h.userHasAccess=t.userHasAccess},function(t){v.default=t.default}],execute:function(){i(function(){var i={332:function(t){t.exports=function(){"use strict";return function(t,e,n){e.prototype.isToday=function(){var t="YYYY-MM-DD",e=n();return this.format(t)===e.format(t)}}}()},891:function(t,e,n){var i;t=n.nmd(t),function(){var u,a=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},c=function(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var u=t[o];e(r,u,n(u),t)}return r},s=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t},l=function(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t},f=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0},d=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u,n,t)&&(i[o++]=u)}return i},p=function(t,e){return!(null==t||!t.length)&&S(t,e,0)>-1},h=function(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1},v=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},y=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t},g=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},m=function(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n},b=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},w=function(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r},_=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},S=function(t,e,n){return e==e?function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):_(t,O,n)},x=function(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1},O=function(t){return t!=t},j=function(t,e){var n=null==t?0:t.length;return n?A(t,e)/n:tt},E=function(t){return function(e){return null==e?u:e[t]}},C=function(t){return function(e){return null==t?u:t[e]}},k=function(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n},A=function(t,e){for(var n,r=-1,o=t.length;++r<o;){var i=e(t[r]);i!==u&&(n=n===u?i:n+i)}return n},P=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r},I=function(t){return t?t.slice(0,q(t)+1).replace(Kt,""):t},T=function(t){return function(e){return t(e)}},L=function(t,e){return v(e,(function(e){return t[e]}))},R=function(t,e){return t.has(e)},M=function(t,e){for(var n=-1,r=t.length;++n<r&&S(e,t[n],0)>-1;);return n},D=function(t,e){for(var n=t.length;n--&&S(e,t[n],0)>-1;);return n},B=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r},N=function(t){return"\\"+Ve[t]},U=function(t){return De.test(t)},H=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},F=function(t,e){return function(n){return t(e(n))}},V=function(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n];u!==e&&u!==G||(t[n]=G,i[o++]=n)}return i},$=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},z=function(t){return U(t)?function(t){for(var e=Re.lastIndex=0;Re.test(t);)++e;return e}(t):un(t)},K=function(t){return U(t)?t.match(Re)||[]:t.split("")},q=function(t){for(var e=t.length;e--&&qt.test(t.charAt(e)););return e},W="Expected a function",Z="__lodash_hash_undefined__",G="__lodash_placeholder__",J=32,Y=128,Q=1/0,X=9007199254740991,tt=NaN,et=4294967295,nt=[["ary",Y],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",J],["partialRight",64],["rearg",256]],rt="[object Arguments]",ot="[object Array]",it="[object Boolean]",ut="[object Date]",at="[object Error]",ct="[object Function]",st="[object GeneratorFunction]",lt="[object Map]",ft="[object Number]",dt="[object Object]",pt="[object Promise]",ht="[object RegExp]",vt="[object Set]",yt="[object String]",gt="[object Symbol]",mt="[object WeakMap]",bt="[object ArrayBuffer]",wt="[object DataView]",_t="[object Float32Array]",St="[object Float64Array]",xt="[object Int8Array]",Ot="[object Int16Array]",jt="[object Int32Array]",Et="[object Uint8Array]",Ct="[object Uint8ClampedArray]",kt="[object Uint16Array]",At="[object Uint32Array]",Pt=/\b__p \+= '';/g,It=/\b(__p \+=) '' \+/g,Tt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Lt=/&(?:amp|lt|gt|quot|#39);/g,Rt=/[&<>"']/g,Mt=RegExp(Lt.source),Dt=RegExp(Rt.source),Bt=/<%-([\s\S]+?)%>/g,Nt=/<%([\s\S]+?)%>/g,Ut=/<%=([\s\S]+?)%>/g,Ht=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ft=/^\w*$/,Vt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$t=/[\\^$.*+?()[\]{}|]/g,zt=RegExp($t.source),Kt=/^\s+/,qt=/\s/,Wt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Zt=/\{\n\/\* \[wrapped with (.+)\] \*/,Gt=/,? & /,Jt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Yt=/[()=,{}\[\]\/\s]/,Qt=/\\(\\)?/g,Xt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,te=/\w*$/,ee=/^[-+]0x[0-9a-f]+$/i,ne=/^0b[01]+$/i,re=/^\[object .+?Constructor\]$/,oe=/^0o[0-7]+$/i,ie=/^(?:0|[1-9]\d*)$/,ue=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ae=/($^)/,ce=/['\n\r\u2028\u2029\\]/g,se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",le="a-z\\xdf-\\xf6\\xf8-\\xff",fe="A-Z\\xc0-\\xd6\\xd8-\\xde",de="\\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",pe="["+de+"]",he="["+se+"]",ve="\\d+",ye="["+le+"]",ge="[^\ud800-\udfff"+de+ve+"\\u2700-\\u27bf"+le+fe+"]",me="\ud83c[\udffb-\udfff]",be="[^\ud800-\udfff]",we="(?:\ud83c[\udde6-\uddff]){2}",_e="[\ud800-\udbff][\udc00-\udfff]",Se="["+fe+"]",xe="(?:"+ye+"|"+ge+")",Oe="(?:"+Se+"|"+ge+")",je="(?:['’](?:d|ll|m|re|s|t|ve))?",Ee="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ce="(?:"+he+"|"+me+")?",ke="[\\ufe0e\\ufe0f]?",Ae=ke+Ce+"(?:\\u200d(?:"+[be,we,_e].join("|")+")"+ke+Ce+")*",Pe="(?:"+["[\\u2700-\\u27bf]",we,_e].join("|")+")"+Ae,Ie="(?:"+[be+he+"?",he,we,_e,"[\ud800-\udfff]"].join("|")+")",Te=RegExp("['’]","g"),Le=RegExp(he,"g"),Re=RegExp(me+"(?="+me+")|"+Ie+Ae,"g"),Me=RegExp([Se+"?"+ye+"+"+je+"(?="+[pe,Se,"$"].join("|")+")",Oe+"+"+Ee+"(?="+[pe,Se+xe,"$"].join("|")+")",Se+"?"+xe+"+"+je,Se+"+"+Ee,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ve,Pe].join("|"),"g"),De=RegExp("[\\u200d\ud800-\udfff"+se+"\\ufe0e\\ufe0f]"),Be=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ne=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ue=-1,He={};He[_t]=He[St]=He[xt]=He[Ot]=He[jt]=He[Et]=He[Ct]=He[kt]=He[At]=!0,He[rt]=He[ot]=He[bt]=He[it]=He[wt]=He[ut]=He[at]=He[ct]=He[lt]=He[ft]=He[dt]=He[ht]=He[vt]=He[yt]=He[mt]=!1;var Fe={};Fe[rt]=Fe[ot]=Fe[bt]=Fe[wt]=Fe[it]=Fe[ut]=Fe[_t]=Fe[St]=Fe[xt]=Fe[Ot]=Fe[jt]=Fe[lt]=Fe[ft]=Fe[dt]=Fe[ht]=Fe[vt]=Fe[yt]=Fe[gt]=Fe[Et]=Fe[Ct]=Fe[kt]=Fe[At]=!0,Fe[at]=Fe[ct]=Fe[mt]=!1;var Ve={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$e=parseFloat,ze=parseInt,Ke="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,qe="object"==typeof self&&self&&self.Object===Object&&self,We=Ke||qe||Function("return this")(),Ze=e&&!e.nodeType&&e,Ge=Ze&&t&&!t.nodeType&&t,Je=Ge&&Ge.exports===Ze,Ye=Je&&Ke.process,Qe=function(){try{return Ge&&Ge.require&&Ge.require("util").types||Ye&&Ye.binding&&Ye.binding("util")}catch(t){}}(),Xe=Qe&&Qe.isArrayBuffer,tn=Qe&&Qe.isDate,en=Qe&&Qe.isMap,nn=Qe&&Qe.isRegExp,rn=Qe&&Qe.isSet,on=Qe&&Qe.isTypedArray,un=E("length"),an=C({À:"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"}),cn=C({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),sn=C({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),ln=function t(e){var n,i,C=function(t){if(Po(t)&&!Pa(t)&&!r(t,le)){if(r(t,se))return t;if(bi.call(t,"__wrapped__"))return no(t)}return new se(t)},qt=function(){},se=function(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=u},le=function(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=et,this.__views__=[]},fe=function(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])}},de=function(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])}},pe=function(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])}},he=function(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new pe;++e<n;)this.add(t[e])},ve=function(t){var e=this.__data__=new de(t);this.size=e.size},ye=function(t,e){var n=Pa(t),r=!n&&Aa(t),o=!n&&!r&&Ta(t),i=!n&&!r&&!o&&Ba(t),u=n||r||o||i,a=u?P(t.length,di):[],c=a.length;for(var s in t)!e&&!bi.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Hr(s,c))||a.push(s);return a},ge=function(t){var e=t.length;return e?t[kn(0,e-1)]:u},me=function(t,e){return Xr(or(t),Ce(e,0,t.length))},be=function(t){return Xr(or(t))},we=function(t,e,n){(n!==u&&!So(t[e],n)||n===u&&!(e in t))&&je(t,e,n)},_e=function(t,e,n){var r=t[e];bi.call(t,e)&&So(r,n)&&(n!==u||e in t)||je(t,e,n)},Se=function(t,e){for(var n=t.length;n--;)if(So(t[n][0],e))return n;return-1},xe=function(t,e,n,r){return mu(t,(function(t,o,i){e(r,t,n(t),i)})),r},Oe=function(t,e){return t&&ir(e,zo(e),t)},je=function(t,e,n){"__proto__"==e&&Bi?Bi(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},Ee=function(t,e){for(var n=-1,r=e.length,o=ii(r),i=null==t;++n<r;)o[n]=i?u:Vo(t,e[n]);return o},Ce=function(t,e,n){return t==t&&(n!==u&&(t=t<=n?t:n),e!==u&&(t=t>=e?t:e)),t},ke=function(t,e,n){var r=n.length;if(null==t)return!r;for(t=li(t);r--;){var o=n[r],i=e[o],a=t[o];if(a===u&&!(o in t)||!i(a))return!1}return!0},Ae=function(t,e,n){if("function"!=typeof t)throw new pi(W);return Fu((function(){t.apply(u,n)}),e)},Pe=function(t,e,n,r){var o=-1,i=p,u=!0,a=t.length,c=[],s=e.length;if(!a)return c;n&&(e=v(e,T(n))),r?(i=h,u=!1):e.length>=200&&(i=R,u=!1,e=new he(e));t:for(;++o<a;){var l=t[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,u&&f==f){for(var d=s;d--;)if(e[d]===f)continue t;c.push(l)}else i(e,f,r)||c.push(l)}return c},Ie=function(t,e){var n=!0;return mu(t,(function(t,r,o){return n=!!e(t,r,o)})),n},Re=function(t,e,n){for(var r=-1,o=t.length;++r<o;){var i=t[r],a=e(i);if(null!=a&&(c===u?a==a&&!Ro(a):n(a,c)))var c=a,s=i}return s},De=function(t,e){var n=[];return mu(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n},Ve=function(t,e){return t&&_u(t,e,zo)},Ke=function(t,e){return t&&Su(t,e,zo)},qe=function(t,e){return d(e,(function(e){return Eo(t[e])}))},Ze=function(t,e){for(var n=0,r=(e=Jn(e,t)).length;null!=t&&n<r;)t=t[to(e[n++])];return n&&n==r?t:u},Ge=function(t,e,n){var r=e(t);return Pa(t)?r:y(r,n(t))},Ye=function(t){return null==t?t===u?"[object Undefined]":"[object Null]":Di&&Di in li(t)?function(t){var e=bi.call(t,Di),n=t[Di];try{t[Di]=u;var r=!0}catch(t){}var o=Si.call(t);return r&&(e?t[Di]=n:delete t[Di]),o}(t):(e=t,Si.call(e));var e},Qe=function(t,e){return t>e},un=function(t,e){return null!=t&&bi.call(t,e)},fn=function(t,e){return null!=t&&e in li(t)},dn=function(t,e,n){for(var r=n?h:p,o=t[0].length,i=t.length,a=i,c=ii(i),s=1/0,l=[];a--;){var f=t[a];a&&e&&(f=v(f,T(e))),s=Gi(f.length,s),c[a]=!n&&(e||o>=120&&f.length>=120)?new he(a&&f):u}f=t[0];var d=-1,y=c[0];t:for(;++d<o&&l.length<s;){var g=f[d],m=e?e(g):g;if(g=n||0!==g?g:0,!(y?R(y,m):r(l,m,n))){for(a=i;--a;){var b=c[a];if(!(b?R(b,m):r(t[a],m,n)))continue t}y&&y.push(m),l.push(g)}}return l},pn=function(t,e,n){var r=null==(t=Zr(t,e=Jn(e,t)))?t:t[to(ao(e))];return null==r?u:a(r,t,n)},hn=function(t){return Po(t)&&Ye(t)==rt},vn=function(t,e,n,r){var o=n.length,i=o,a=!r;if(null==t)return!i;for(t=li(t);o--;){var c=n[o];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<i;){var s=(c=n[o])[0],l=t[s],f=c[1];if(a&&c[2]){if(l===u&&!(s in t))return!1}else{var d=new ve;if(r)var p=r(l,f,s,t,e,d);if(!(p===u?xu(f,l,3,r,d):p))return!1}}return!0},yn=function(t){return!(!Ao(t)||(e=t,_i&&_i in e))&&(Eo(t)?ji:re).test(eo(t));var e},gn=function(t){return"function"==typeof t?t:null==t?Qo:"object"==typeof t?Pa(t)?Sn(t[0],t[1]):_n(t):ni(t)},mn=function(t){if(!zr(t))return Wi(t);var e=[];for(var n in li(t))bi.call(t,n)&&"constructor"!=n&&e.push(n);return e},bn=function(t,e){return t<e},wn=function(t,e){var n=-1,r=xo(t)?ii(t.length):[];return mu(t,(function(t,o,i){r[++n]=e(t,o,i)})),r},_n=function(t){var e=Mr(t);return 1==e.length&&e[0][2]?qr(e[0][0],e[0][1]):function(n){return n===t||vn(n,t,e)}},Sn=function(t,e){return Vr(t)&&Kr(e)?qr(to(t),e):function(n){var r=Vo(n,t);return r===u&&r===e?$o(n,t):xu(e,r,3)}},xn=function(t,e){var n=t.length;if(n)return Hr(e+=e<0?n:0,n)?t[e]:u},On=function(t,e,n){e=e.length?v(e,(function(t){return Pa(t)?function(e){return Ze(e,1===t.length?t[0]:t)}:t})):[Qo];var r=-1;return e=v(e,T(Lr())),function(t,e){var r=t.length;for(t.sort((function(t,e){return function(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,u=o.length,a=n.length;++r<u;){var c=er(o[r],i[r]);if(c)return r>=a?c:c*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(wn(t,(function(t,n,o){return{criteria:v(e,(function(e){return e(t)})),index:++r,value:t}})))},jn=function(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var u=e[r],a=Ze(t,u);n(a,u)&&Ln(i,Jn(u,t),a)}return i},En=function(t,e,n,r){var o=r?x:S,i=-1,u=e.length,a=t;for(t===e&&(e=or(e)),n&&(a=v(t,T(n)));++i<u;)for(var c=0,s=e[i],l=n?n(s):s;(c=o(a,l,c,r))>-1;)a!==t&&Li.call(a,c,1),Li.call(t,c,1);return t},Cn=function(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;Hr(o)?Li.call(t,o,1):Vn(t,o)}}return t},kn=function(t,e){return t+Vi(Qi()*(e-t+1))},An=function(t,e){var n="";if(!t||e<1||e>X)return n;do{e%2&&(n+=t),(e=Vi(e/2))&&(t+=t)}while(e);return n},Pn=function(t,e){return Vu(Wr(t,e,Qo),t+"")},In=function(t){return ge(Wo(t))},Tn=function(t,e){var n=Wo(t);return Xr(n,Ce(e,0,n.length))},Ln=function(t,e,n,r){if(!Ao(t))return t;for(var o=-1,i=(e=Jn(e,t)).length,a=i-1,c=t;null!=c&&++o<i;){var s=to(e[o]),l=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return t;if(o!=a){var f=c[s];(l=r?r(f,s,c):u)===u&&(l=Ao(f)?f:Hr(e[o+1])?[]:{})}_e(c,s,l),c=c[s]}return t},Rn=function(t){return Xr(Wo(t))},Mn=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=ii(o);++r<o;)i[r]=t[r+e];return i},Dn=function(t,e){var n;return mu(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n},Bn=function(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,u=t[i];null!==u&&!Ro(u)&&(n?u<=e:u<e)?r=i+1:o=i}return o}return Nn(t,e,Qo,n)},Nn=function(t,e,n,r){var o=0,i=null==t?0:t.length;if(0===i)return 0;for(var a=(e=n(e))!=e,c=null===e,s=Ro(e),l=e===u;o<i;){var f=Vi((o+i)/2),d=n(t[f]),p=d!==u,h=null===d,v=d==d,y=Ro(d);if(a)var g=r||v;else g=l?v&&(r||p):c?v&&p&&(r||!h):s?v&&p&&!h&&(r||!y):!h&&!y&&(r?d<=e:d<e);g?o=f+1:i=f}return Gi(i,4294967294)},Un=function(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n],a=e?e(u):u;if(!n||!So(a,c)){var c=a;i[o++]=0===u?0:u}}return i},Hn=function(t){return"number"==typeof t?t:Ro(t)?tt:+t},Fn=function(t,e,n){var r=-1,o=p,i=t.length,u=!0,a=[],c=a;if(n)u=!1,o=h;else if(i>=200){var s=e?null:Iu(t);if(s)return $(s);u=!1,o=R,c=new he}else c=e?[]:a;t:for(;++r<i;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,u&&f==f){for(var d=c.length;d--;)if(c[d]===f)continue t;e&&c.push(f),a.push(l)}else o(c,f,n)||(c!==a&&c.push(f),a.push(l))}return a},Vn=function(t,e){return null==(t=Zr(t,e=Jn(e,t)))||delete t[to(ao(e))]},$n=function(t,e,n,r){return Ln(t,e,n(Ze(t,e)),r)},zn=function(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?Mn(t,r?0:i,r?i+1:o):Mn(t,r?i+1:0,r?o:i)},Kn=function(t,e){var n=t;return r(n,le)&&(n=n.value()),g(e,(function(t,e){return e.func.apply(e.thisArg,y([t],e.args))}),n)},qn=function(t,e,n){var r=t.length;if(r<2)return r?Fn(t[0]):[];for(var o=-1,i=ii(r);++o<r;)for(var u=t[o],a=-1;++a<r;)a!=o&&(i[o]=Pe(i[o]||u,t[a],e,n));return Fn(wu(i,1),e,n)},Wn=function(t,e,n){for(var r=-1,o=t.length,i=e.length,a={};++r<o;){var c=r<i?e[r]:u;n(a,t[r],c)}return a},Zn=function(t){return Oo(t)?t:[]},Gn=function(t){return"function"==typeof t?t:Qo},Jn=function(t,e){return Pa(t)?t:Vr(t,e)?[t]:$u(Fo(t))},Yn=function(t,e,n){var r=t.length;return n=n===u?r:n,!e&&n>=r?t:Mn(t,e,n)},Qn=function(t,e){if(e)return t.slice();var n=t.length,r=Ai?Ai(n):new t.constructor(n);return t.copy(r),r},Xn=function(t){var e=new t.constructor(t.byteLength);return new ki(e).set(new ki(t)),e},tr=function(t,e){var n=e?Xn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)},er=function(t,e){if(t!==e){var n=t!==u,r=null===t,o=t==t,i=Ro(t),a=e!==u,c=null===e,s=e==e,l=Ro(e);if(!c&&!l&&!i&&t>e||i&&a&&s&&!c&&!l||r&&a&&s||!n&&s||!o)return 1;if(!r&&!i&&!l&&t<e||l&&n&&o&&!r&&!i||c&&n&&o||!a&&o||!s)return-1}return 0},nr=function(t,e,n,r){for(var o=-1,i=t.length,u=n.length,a=-1,c=e.length,s=Zi(i-u,0),l=ii(c+s),f=!r;++a<c;)l[a]=e[a];for(;++o<u;)(f||o<i)&&(l[n[o]]=t[o]);for(;s--;)l[a++]=t[o++];return l},rr=function(t,e,n,r){for(var o=-1,i=t.length,u=-1,a=n.length,c=-1,s=e.length,l=Zi(i-a,0),f=ii(l+s),d=!r;++o<l;)f[o]=t[o];for(var p=o;++c<s;)f[p+c]=e[c];for(;++u<a;)(d||o<i)&&(f[p+n[u]]=t[o++]);return f},or=function(t,e){var n=-1,r=t.length;for(e||(e=ii(r));++n<r;)e[n]=t[n];return e},ir=function(t,e,n,r){var o=!n;n||(n={});for(var i=-1,a=e.length;++i<a;){var c=e[i],s=r?r(n[c],t[c],c,n,t):u;s===u&&(s=t[c]),o?je(n,c,s):_e(n,c,s)}return n},ur=function(t,e){return function(n,r){var o=Pa(n)?c:xe,i=e?e():{};return o(n,t,Lr(r,2),i)}},ar=function(t){return Pn((function(e,n){var r=-1,o=n.length,i=o>1?n[o-1]:u,a=o>2?n[2]:u;for(i=t.length>3&&"function"==typeof i?(o--,i):u,a&&Fr(n[0],n[1],a)&&(i=o<3?u:i,o=1),e=li(e);++r<o;){var c=n[r];c&&t(e,c,r,i)}return e}))},cr=function(t,e){return function(n,r){if(null==n)return n;if(!xo(n))return t(n,r);for(var o=n.length,i=e?o:-1,u=li(n);(e?i--:++i<o)&&!1!==r(u[i],i,u););return n}},sr=function(t){return function(e,n,r){for(var o=-1,i=li(e),u=r(e),a=u.length;a--;){var c=u[t?a:++o];if(!1===n(i[c],c,i))break}return e}},lr=function(t){return function(e){var n=U(e=Fo(e))?K(e):u,r=n?n[0]:e.charAt(0),o=n?Yn(n,1).join(""):e.slice(1);return r[t]()+o}},fr=function(t){return function(e){return g(Jo(Go(e).replace(Te,"")),t,"")}},dr=function(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=yu(t.prototype),r=t.apply(n,e);return Ao(r)?r:n}},pr=function(t){return function(e,n,r){var o=li(e);if(!xo(e)){var i=Lr(n,3);e=zo(e),n=function(t){return i(o[t],t,o)}}var a=t(e,n,r);return a>-1?o[i?e[a]:a]:u}},hr=function(t){return kr((function(e){var n=e.length,r=n,o=se.prototype.thru;for(t&&e.reverse();r--;){var i=e[r];if("function"!=typeof i)throw new pi(W);if(o&&!a&&"wrapper"==Ir(i))var a=new se([],!0)}for(r=a?r:n;++r<n;){var c=Ir(i=e[r]),s="wrapper"==c?Lu(i):u;a=s&&$r(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?a[Ir(s[0])].apply(a,s[3]):1==i.length&&$r(i)?a[c]():a.thru(i)}return function(){var t=arguments,r=t[0];if(a&&1==t.length&&Pa(r))return a.plant(r).value();for(var o=0,i=n?e[o].apply(this,t):r;++o<n;)i=e[o].call(this,i);return i}}))},vr=function(t,e){return function(n,r){return o=n,i=t,u=e(r),a={},Ve(o,(function(t,e,n){i(a,u(t),e,n)})),a;var o,i,u,a}},yr=function(t,e){return function(n,r){var o;if(n===u&&r===u)return e;if(n!==u&&(o=n),r!==u){if(o===u)return r;"string"==typeof n||"string"==typeof r?(n=Cu(n),r=Cu(r)):(n=Hn(n),r=Hn(r)),o=t(n,r)}return o}},gr=function(t){return kr((function(e){return e=v(e,T(Lr())),Pn((function(n){var r=this;return t(e,(function(t){return a(t,r,n)}))}))}))},mr=function(t,e){var n=(e=e===u?" ":Cu(e)).length;if(n<2)return n?An(e,t):e;var r=An(e,Fi(t/z(e)));return U(e)?Yn(K(r),0,t).join(""):r.slice(0,t)},br=function(t){return function(e,n,r){return r&&"number"!=typeof r&&Fr(e,n,r)&&(n=r=u),e=Do(e),n===u?(n=e,e=0):n=Do(n),function(t,e,n,r){for(var o=-1,i=Zi(Fi((e-t)/(n||1)),0),u=ii(i);i--;)u[r?i:++o]=t,t+=n;return u}(e,n,r=r===u?e<n?1:-1:Do(r),t)}},wr=function(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Uo(e),n=Uo(n)),t(e,n)}},_r=function(t,e,n,r,o,i,a,c,s,l){var f=8&e;e|=f?J:64,4&(e&=~(f?64:J))||(e&=-4);var d=[t,e,o,f?i:u,f?a:u,f?u:i,f?u:a,c,s,l],p=n.apply(u,d);return $r(t)&&Hu(p,d),p.placeholder=r,Yr(p,t,e)},Sr=function(t){var e=si[t];return function(t,n){if(t=Uo(t),(n=null==n?0:Gi(Bo(n),292))&&Ki(t)){var r=(Fo(t)+"e").split("e");return+((r=(Fo(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}},xr=function(t){return function(e){var n,r,o=Du(e);return o==lt?H(e):o==vt?function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}(e):(n=e,r=t(e),v(r,(function(t){return[t,n[t]]})))}},Or=function(t,e,n,o,i,c,s,l){var f=2&e;if(!f&&"function"!=typeof t)throw new pi(W);var d=o?o.length:0;if(d||(e&=-97,o=i=u),s=s===u?s:Zi(Bo(s),0),l=l===u?l:Bo(l),d-=i?i.length:0,64&e){var p=o,h=i;o=i=u}var v,y,g,m,b=f?u:Lu(t),w=[t,e,n,o,i,p,h,c,s,l];if(b&&function(t,e){var n=t[1],r=e[1],o=n|r,i=o<131,u=r==Y&&8==n||r==Y&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!u)return t;1&r&&(t[2]=e[2],o|=1&n?0:4);var a=e[3];if(a){var c=t[3];t[3]=c?nr(c,a,e[4]):a,t[4]=c?V(t[3],G):e[4]}(a=e[5])&&(c=t[5],t[5]=c?rr(c,a,e[6]):a,t[6]=c?V(t[5],G):e[6]),(a=e[7])&&(t[7]=a),r&Y&&(t[8]=null==t[8]?e[8]:Gi(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=o}(w,b),t=w[0],e=w[1],n=w[2],o=w[3],i=w[4],!(l=w[9]=w[9]===u?f?0:t.length:Zi(w[9]-d,0))&&24&e&&(e&=-25),e&&1!=e)_=8==e||16==e?(y=e,g=l,m=dr(v=t),function t(){for(var e=arguments.length,n=ii(e),o=e,i=Tr(t);o--;)n[o]=arguments[o];var c=e<3&&n[0]!==i&&n[e-1]!==i?[]:V(n,i);return(e-=c.length)<g?_r(v,y,Pu,t.placeholder,u,n,c,u,u,g-e):a(this&&this!==We&&r(this,t)?m:v,this,n)}):e!=J&&33!=e||i.length?Pu.apply(u,w):function(t,e,n,o){var i=1&e,u=dr(t);return function e(){for(var c=-1,s=arguments.length,l=-1,f=o.length,d=ii(f+s),p=this&&this!==We&&r(this,e)?u:t;++l<f;)d[l]=o[l];for(;s--;)d[l++]=arguments[++c];return a(p,i?n:this,d)}}(t,e,n,o);else var _=function(t,e,n){var o=1&e,i=dr(t);return function e(){return(this&&this!==We&&r(this,e)?i:t).apply(o?n:this,arguments)}}(t,e,n);return Yr((b?ju:Hu)(_,w),t,e)},jr=function(t,e,n,r){return t===u||So(t,yi[n])&&!bi.call(r,n)?e:t},Er=function(t){return To(t)?u:t},Cr=function(t,e,n,r,o,i){var a=1&n,c=t.length,s=e.length;if(c!=s&&!(a&&s>c))return!1;var l=i.get(t),f=i.get(e);if(l&&f)return l==e&&f==t;var d=-1,p=!0,h=2&n?new he:u;for(i.set(t,e),i.set(e,t);++d<c;){var v=t[d],y=e[d];if(r)var g=a?r(y,v,d,e,t,i):r(v,y,d,t,e,i);if(g!==u){if(g)continue;p=!1;break}if(h){if(!b(e,(function(t,e){if(!R(h,e)&&(v===t||o(v,t,n,r,i)))return h.push(e)}))){p=!1;break}}else if(v!==y&&!o(v,y,n,r,i)){p=!1;break}}return i.delete(t),i.delete(e),p},kr=function(t){return Vu(Wr(t,u,io),t+"")},Ar=function(t){return Ge(t,zo,Ru)},Pr=function(t){return Ge(t,Ko,Mu)},Ir=function(t){for(var e=t.name+"",n=au[e],r=bi.call(au,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e},Tr=function(t){return(bi.call(C,"placeholder")?C:t).placeholder},Lr=function(){var t=C.iteratee||Xo;return t=t===Xo?gn:t,arguments.length?t(arguments[0],arguments[1]):t},Rr=function(t,e){var n,r,i=t.__data__;return("string"==(r=o(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map},Mr=function(t){for(var e=zo(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Kr(o)]}return e},Dr=function(t,e){var n,r=null==(n=t)?u:n[e];return yn(r)?r:u},Br=function(t,e,n){for(var r=-1,o=(e=Jn(e,t)).length,i=!1;++r<o;){var u=to(e[r]);if(!(i=null!=t&&n(t,u)))break;t=t[u]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&ko(o)&&Hr(u,o)&&(Pa(t)||Aa(t))},Nr=function(t){return"function"!=typeof t.constructor||zr(t)?{}:yu(Pi(t))},Ur=function(t){return Pa(t)||Aa(t)||!!(Ri&&t&&t[Ri])},Hr=function(t,e){var n=void 0===t?"undefined":o(t);return!!(e=null==e?X:e)&&("number"==n||"symbol"!=n&&ie.test(t))&&t>-1&&t%1==0&&t<e},Fr=function(t,e,n){if(!Ao(n))return!1;var r=void 0===e?"undefined":o(e);return!!("number"==r?xo(n)&&Hr(e,n.length):"string"==r&&e in n)&&So(n[e],t)},Vr=function(t,e){if(Pa(t))return!1;var n=void 0===t?"undefined":o(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ro(t))||Ft.test(t)||!Ht.test(t)||null!=e&&t in li(e)},$r=function(t){var e=Ir(t),n=C[e];if("function"!=typeof n||!(e in le.prototype))return!1;if(t===n)return!0;var r=Lu(n);return!!r&&t===r[0]},zr=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||yi)},Kr=function(t){return t==t&&!Ao(t)},qr=function(t,e){return function(n){return null!=n&&n[t]===e&&(e!==u||t in li(n))}},Wr=function(t,e,n){return e=Zi(e===u?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=Zi(r.length-e,0),u=ii(i);++o<i;)u[o]=r[e+o];o=-1;for(var c=ii(e+1);++o<e;)c[o]=r[o];return c[e]=n(u),a(t,this,c)}},Zr=function(t,e){return e.length<2?t:Ze(t,Mn(e,0,-1))},Gr=function(t,e){for(var n=t.length,r=Gi(e.length,n),o=or(t);r--;){var i=e[r];t[r]=Hr(i,n)?o[i]:u}return t},Jr=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},Yr=function(t,e,n){var r,o,i,u=e+"";return Vu(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Wt,"{\n/* [wrapped with "+e+"] */\n")}(u,(o=(r=u.match(Zt))?r[1].split(Gt):[],i=n,s(nt,(function(t){var e="_."+t[0];i&t[1]&&!p(o,e)&&o.push(e)})),o.sort())))},Qr=function(t){var e=0,n=0;return function(){var r=Ji(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(u,arguments)}},Xr=function(t,e){var n=-1,r=t.length,o=r-1;for(e=e===u?r:e;++n<e;){var i=kn(n,o),a=t[i];t[i]=t[n],t[n]=a}return t.length=e,t},to=function(t){if("string"==typeof t||Ro(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e},eo=function(t){if(null!=t){try{return mi.call(t)}catch(t){}try{return t+""}catch(t){}}return""},no=function(t){if(r(t,le))return t.clone();var e=new se(t.__wrapped__,t.__chain__);return e.__actions__=or(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e},ro=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:Bo(n);return o<0&&(o=Zi(r+o,0)),_(t,Lr(e,3),o)},oo=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r-1;return n!==u&&(o=Bo(n),o=n<0?Zi(r+o,0):Gi(o,r-1)),_(t,Lr(e,3),o,!0)},io=function(t){return null!=t&&t.length?wu(t,1):[]},uo=function(t){return t&&t.length?t[0]:u},ao=function(t){var e=null==t?0:t.length;return e?t[e-1]:u},co=function(t,e){return t&&t.length&&e&&e.length?En(t,e):t},so=function(t){return null==t?t:Xi.call(t)},lo=function(t){if(!t||!t.length)return[];var e=0;return t=d(t,(function(t){if(Oo(t))return e=Zi(t.length,e),!0})),P(e,(function(e){return v(t,E(e))}))},fo=function(t,e){if(!t||!t.length)return[];var n=lo(t);return null==e?n:v(n,(function(t){return a(e,u,t)}))},po=function(t){var e=C(t);return e.__chain__=!0,e},ho=function(t,e){return e(t)},vo=function(t,e){return(Pa(t)?s:mu)(t,Lr(e,3))},yo=function(t,e){return(Pa(t)?l:bu)(t,Lr(e,3))},go=function(t,e){return(Pa(t)?v:wn)(t,Lr(e,3))},mo=function(t,e,n){return e=n?u:e,e=t&&null==e?t.length:e,Or(t,Y,u,u,u,u,e)},bo=function(t,e){var n;if("function"!=typeof e)throw new pi(W);return t=Bo(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=u),n}},wo=function(t,e,n){var r,o,i,a,c,s,l=0,f=!1,d=!1,p=!0;if("function"!=typeof t)throw new pi(W);function h(e){var n=r,i=o;return r=o=u,l=e,a=t.apply(i,n)}function v(t){return l=t,c=Fu(g,e),f?h(t):a}function y(t){var n=t-s;return s===u||n>=e||n<0||d&&t-l>=i}function g(){var t,n,r=ya();if(y(r))return m(r);c=Fu(g,(n=e-((t=r)-s),d?Gi(n,i-(t-l)):n))}function m(t){return c=u,p&&r?h(t):(r=o=u,a)}function b(){var t=ya(),n=y(t);if(r=arguments,o=this,s=t,n){if(c===u)return v(s);if(d)return Au(c),c=Fu(g,e),h(s)}return c===u&&(c=Fu(g,e)),a}return e=Uo(e)||0,Ao(n)&&(f=!!n.leading,i=(d="maxWait"in n)?Zi(Uo(n.maxWait)||0,e):i,p="trailing"in n?!!n.trailing:p),b.cancel=function(){c!==u&&Au(c),l=0,r=s=o=c=u},b.flush=function(){return c===u?a:m(ya())},b},_o=function(t){if("function"!=typeof t)throw new pi(W);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}},So=function(t,e){return t===e||t!=t&&e!=e},xo=function(t){return null!=t&&ko(t.length)&&!Eo(t)},Oo=function(t){return Po(t)&&xo(t)},jo=function(t){if(!Po(t))return!1;var e=Ye(t);return e==at||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!To(t)},Eo=function(t){if(!Ao(t))return!1;var e=Ye(t);return e==ct||e==st||"[object AsyncFunction]"==e||"[object Proxy]"==e},Co=function(t){return"number"==typeof t&&t==Bo(t)},ko=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=X},Ao=function(t){var e=void 0===t?"undefined":o(t);return null!=t&&("object"==e||"function"==e)},Po=function(t){return null!=t&&"object"==typeof t},Io=function(t){return"number"==typeof t||Po(t)&&Ye(t)==ft},To=function(t){if(!Po(t)||Ye(t)!=dt)return!1;var e=Pi(t);if(null===e)return!0;var n=bi.call(e,"constructor")&&e.constructor;return"function"==typeof n&&r(n,n)&&mi.call(n)==xi},Lo=function(t){return"string"==typeof t||!Pa(t)&&Po(t)&&Ye(t)==yt},Ro=function(t){return"symbol"==(void 0===t?"undefined":o(t))||Po(t)&&Ye(t)==gt},Mo=function(t){if(!t)return[];if(xo(t))return Lo(t)?K(t):or(t);if(Mi&&t[Mi])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Mi]());var e=Du(t);return(e==lt?H:e==vt?$:Wo)(t)},Do=function(t){return t?(t=Uo(t))===Q||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0},Bo=function(t){var e=Do(t),n=e%1;return e==e?n?e-n:e:0},No=function(t){return t?Ce(Bo(t),0,et):0},Uo=function(t){if("number"==typeof t)return t;if(Ro(t))return tt;if(Ao(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Ao(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=I(t);var n=ne.test(t);return n||oe.test(t)?ze(t.slice(2),n?2:8):ee.test(t)?tt:+t},Ho=function(t){return ir(t,Ko(t))},Fo=function(t){return null==t?"":Cu(t)},Vo=function(t,e,n){var r=null==t?u:Ze(t,e);return r===u?n:r},$o=function(t,e){return null!=t&&Br(t,e,fn)},zo=function(t){return xo(t)?ye(t):mn(t)},Ko=function(t){return xo(t)?ye(t,!0):function(t){if(!Ao(t))return function(t){var e=[];if(null!=t)for(var n in li(t))e.push(n);return e}(t);var e=zr(t),n=[];for(var r in t)("constructor"!=r||!e&&bi.call(t,r))&&n.push(r);return n}(t)},qo=function(t,e){if(null==t)return{};var n=v(Pr(t),(function(t){return[t]}));return e=Lr(e),jn(t,n,(function(t,n){return e(t,n[0])}))},Wo=function(t){return null==t?[]:L(t,zo(t))},Zo=function(t){return sc(Fo(t).toLowerCase())},Go=function(t){return(t=Fo(t))&&t.replace(ue,an).replace(Le,"")},Jo=function(t,e,n){return t=Fo(t),(e=n?u:e)===u?(r=t,Be.test(r)?function(t){return t.match(Me)||[]}(t):function(t){return t.match(Jt)||[]}(t)):t.match(e)||[];var r},Yo=function(t){return function(){return t}},Qo=function(t){return t},Xo=function(t){return gn("function"==typeof t?t:gu(t,1))},ti=function(t,e,n){var r=zo(e),o=qe(e,r);null!=n||Ao(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=qe(e,zo(e)));var i=!(Ao(n)&&"chain"in n&&!n.chain),u=Eo(t);return s(o,(function(n){var r=e[n];t[n]=r,u&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),o=n.__actions__=or(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,y([this.value()],arguments))})})),t},ei=function(){},ni=function(t){return Vr(t)?E(to(t)):(e=t,function(t){return Ze(t,e)});var e},ri=function(){return[]},oi=function(){return!1},ii=(e=null==e?We:ln.defaults(We.Object(),e,ln.pick(We,Ne))).Array,ui=e.Date,ai=e.Error,ci=e.Function,si=e.Math,li=e.Object,fi=e.RegExp,di=e.String,pi=e.TypeError,hi=ii.prototype,vi=ci.prototype,yi=li.prototype,gi=e["__core-js_shared__"],mi=vi.toString,bi=yi.hasOwnProperty,wi=0,_i=(n=/[^.]+$/.exec(gi&&gi.keys&&gi.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Si=yi.toString,xi=mi.call(li),Oi=We._,ji=fi("^"+mi.call(bi).replace($t,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ei=Je?e.Buffer:u,Ci=e.Symbol,ki=e.Uint8Array,Ai=Ei?Ei.allocUnsafe:u,Pi=F(li.getPrototypeOf,li),Ii=li.create,Ti=yi.propertyIsEnumerable,Li=hi.splice,Ri=Ci?Ci.isConcatSpreadable:u,Mi=Ci?Ci.iterator:u,Di=Ci?Ci.toStringTag:u,Bi=function(){try{var t=Dr(li,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ni=e.clearTimeout!==We.clearTimeout&&e.clearTimeout,Ui=ui&&ui.now!==We.Date.now&&ui.now,Hi=e.setTimeout!==We.setTimeout&&e.setTimeout,Fi=si.ceil,Vi=si.floor,$i=li.getOwnPropertySymbols,zi=Ei?Ei.isBuffer:u,Ki=e.isFinite,qi=hi.join,Wi=F(li.keys,li),Zi=si.max,Gi=si.min,Ji=ui.now,Yi=e.parseInt,Qi=si.random,Xi=hi.reverse,tu=Dr(e,"DataView"),eu=Dr(e,"Map"),nu=Dr(e,"Promise"),ru=Dr(e,"Set"),ou=Dr(e,"WeakMap"),iu=Dr(li,"create"),uu=ou&&new ou,au={},cu=eo(tu),su=eo(eu),lu=eo(nu),fu=eo(ru),du=eo(ou),pu=Ci?Ci.prototype:u,hu=pu?pu.valueOf:u,vu=pu?pu.toString:u,yu=(i=function(){},function(t){if(!Ao(t))return{};if(Ii)return Ii(t);i.prototype=t;var e=new i;return i.prototype=u,e});function gu(t,e,n,r,o,i){var a,c=1&e,l=2&e,f=4&e;if(n&&(a=o?n(t,r,o,i):n(t)),a!==u)return a;if(!Ao(t))return t;var d,p,h,v=Pa(t);if(v){if(p=(d=t).length,h=new d.constructor(p),p&&"string"==typeof d[0]&&bi.call(d,"index")&&(h.index=d.index,h.input=d.input),a=h,!c)return or(t,a)}else{var y=Du(t),g=y==ct||y==st;if(Ta(t))return Qn(t,c);if(y==dt||y==rt||g&&!o){if(a=l||g?{}:Nr(t),!c)return l?function(t,e){return ir(t,Mu(t),e)}(t,function(t,e){return t&&ir(e,Ko(e),t)}(a,t)):function(t,e){return ir(t,Ru(t),e)}(t,Oe(a,t))}else{if(!Fe[y])return o?t:{};a=function(t,e,n){var r,o=t.constructor;switch(e){case bt:return Xn(t);case it:case ut:return new o(+t);case wt:return function(t,e){var n=e?Xn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case _t:case St:case xt:case Ot:case jt:case Et:case Ct:case kt:case At:return tr(t,n);case lt:return new o;case ft:case yt:return new o(t);case ht:return function(t){var e=new t.constructor(t.source,te.exec(t));return e.lastIndex=t.lastIndex,e}(t);case vt:return new o;case gt:return r=t,hu?li(hu.call(r)):{}}}(t,y,c)}}i||(i=new ve);var m=i.get(t);if(m)return m;i.set(t,a),Da(t)?t.forEach((function(r){a.add(gu(r,e,n,r,t,i))})):Ra(t)&&t.forEach((function(r,o){a.set(o,gu(r,e,n,o,t,i))}));var b=v?u:(f?l?Pr:Ar:l?Ko:zo)(t);return s(b||t,(function(r,o){b&&(r=t[o=r]),_e(a,o,gu(r,e,n,o,t,i))})),a}C.templateSettings={escape:Bt,evaluate:Nt,interpolate:Ut,variable:"",imports:{_:C}},(C.prototype=qt.prototype).constructor=C,se.prototype=yu(qt.prototype),se.prototype.constructor=se,le.prototype=yu(qt.prototype),le.prototype.constructor=le,fe.prototype.clear=function(){this.__data__=iu?iu(null):{},this.size=0},fe.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},fe.prototype.get=function(t){var e=this.__data__;if(iu){var n=e[t];return n===Z?u:n}return bi.call(e,t)?e[t]:u},fe.prototype.has=function(t){var e=this.__data__;return iu?e[t]!==u:bi.call(e,t)},fe.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=iu&&e===u?Z:e,this},de.prototype.clear=function(){this.__data__=[],this.size=0},de.prototype.delete=function(t){var e=this.__data__,n=Se(e,t);return!(n<0||(n==e.length-1?e.pop():Li.call(e,n,1),--this.size,0))},de.prototype.get=function(t){var e=this.__data__,n=Se(e,t);return n<0?u:e[n][1]},de.prototype.has=function(t){return Se(this.__data__,t)>-1},de.prototype.set=function(t,e){var n=this.__data__,r=Se(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},pe.prototype.clear=function(){this.size=0,this.__data__={hash:new fe,map:new(eu||de),string:new fe}},pe.prototype.delete=function(t){var e=Rr(this,t).delete(t);return this.size-=e?1:0,e},pe.prototype.get=function(t){return Rr(this,t).get(t)},pe.prototype.has=function(t){return Rr(this,t).has(t)},pe.prototype.set=function(t,e){var n=Rr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},he.prototype.add=he.prototype.push=function(t){return this.__data__.set(t,Z),this},he.prototype.has=function(t){return this.__data__.has(t)},ve.prototype.clear=function(){this.__data__=new de,this.size=0},ve.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},ve.prototype.get=function(t){return this.__data__.get(t)},ve.prototype.has=function(t){return this.__data__.has(t)},ve.prototype.set=function(t,e){var n=this.__data__;if(r(n,de)){var o=n.__data__;if(!eu||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new pe(o)}return n.set(t,e),this.size=n.size,this};var mu=cr(Ve),bu=cr(Ke,!0);function wu(t,e,n,r,o){var i=-1,u=t.length;for(n||(n=Ur),o||(o=[]);++i<u;){var a=t[i];e>0&&n(a)?e>1?wu(a,e-1,n,r,o):y(o,a):r||(o[o.length]=a)}return o}var _u=sr(),Su=sr(!0);function xu(t,e,n,o,i){return t===e||(null==t||null==e||!Po(t)&&!Po(e)?t!=t&&e!=e:function(t,e,n,o,i,a){var c=Pa(t),s=Pa(e),l=c?ot:Du(t),f=s?ot:Du(e),d=(l=l==rt?dt:l)==dt,p=(f=f==rt?dt:f)==dt,h=l==f;if(h&&Ta(t)){if(!Ta(e))return!1;c=!0,d=!1}if(h&&!d)return a||(a=new ve),c||Ba(t)?Cr(t,e,n,o,i,a):function(t,e,n,r,o,i,u){switch(n){case wt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case bt:return!(t.byteLength!=e.byteLength||!i(new ki(t),new ki(e)));case it:case ut:case ft:return So(+t,+e);case at:return t.name==e.name&&t.message==e.message;case ht:case yt:return t==e+"";case lt:var a=H;case vt:var c=1&r;if(a||(a=$),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var l=Cr(a(t),a(e),r,o,i,u);return u.delete(t),l;case gt:if(hu)return hu.call(t)==hu.call(e)}return!1}(t,e,l,n,o,i,a);if(!(1&n)){var v=d&&bi.call(t,"__wrapped__"),y=p&&bi.call(e,"__wrapped__");if(v||y){var g=v?t.value():t,m=y?e.value():e;return a||(a=new ve),i(g,m,n,o,a)}}return!!h&&(a||(a=new ve),function(t,e,n,o,i,a){var c=1&n,s=Ar(t),l=s.length;if(l!=Ar(e).length&&!c)return!1;for(var f=l;f--;){var d=s[f];if(!(c?d in e:bi.call(e,d)))return!1}var p=a.get(t),h=a.get(e);if(p&&h)return p==e&&h==t;var v=!0;a.set(t,e),a.set(e,t);for(var y=c;++f<l;){var g=t[d=s[f]],m=e[d];if(o)var b=c?o(m,g,d,e,t,a):o(g,m,d,t,e,a);if(!(b===u?g===m||i(g,m,n,o,a):b)){v=!1;break}y||(y="constructor"==d)}if(v&&!y){var w=t.constructor,_=e.constructor;w==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&r(w,w)&&"function"==typeof _&&r(_,_)||(v=!1)}return a.delete(t),a.delete(e),v}(t,e,n,o,i,a))}(t,e,n,o,xu,i))}function Ou(t,e,n,r,o){t!==e&&_u(e,(function(i,a){if(o||(o=new ve),Ao(i))!function(t,e,n,r,o,i,a){var c=Jr(t,n),s=Jr(e,n),l=a.get(s);if(l)we(t,n,l);else{var f=i?i(c,s,n+"",t,e,a):u,d=f===u;if(d){var p=Pa(s),h=!p&&Ta(s),v=!p&&!h&&Ba(s);f=s,p||h||v?Pa(c)?f=c:Oo(c)?f=or(c):h?(d=!1,f=Qn(s,!0)):v?(d=!1,f=tr(s,!0)):f=[]:To(s)||Aa(s)?(f=c,Aa(c)?f=Ho(c):Ao(c)&&!Eo(c)||(f=Nr(s))):d=!1}d&&(a.set(s,f),o(f,s,r,i,a),a.delete(s)),we(t,n,f)}}(t,e,a,n,Ou,r,o);else{var c=r?r(Jr(t,a),i,a+"",t,e,o):u;c===u&&(c=i),we(t,a,c)}}),Ko)}var ju=uu?function(t,e){return uu.set(t,e),t}:Qo,Eu=Bi?function(t,e){return Bi(t,"toString",{configurable:!0,enumerable:!1,value:Yo(e),writable:!0})}:Qo;function Cu(t){if("string"==typeof t)return t;if(Pa(t))return v(t,Cu)+"";if(Ro(t))return vu?vu.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}var ku=Pn,Au=Ni||function(t){return We.clearTimeout(t)};function Pu(t,e,n,o,i,a,c,s,l,f){var d=e&Y,p=1&e,h=2&e,v=24&e,y=512&e,g=h?u:dr(t);return function u(){for(var m=arguments.length,b=ii(m),w=m;w--;)b[w]=arguments[w];if(v)var _=Tr(u),S=B(b,_);if(o&&(b=nr(b,o,i,v)),a&&(b=rr(b,a,c,v)),m-=S,v&&m<f){var x=V(b,_);return _r(t,e,Pu,u.placeholder,n,b,x,s,l,f-m)}var O=p?n:this,j=h?O[t]:t;return m=b.length,s?b=Gr(b,s):y&&m>1&&b.reverse(),d&&l<m&&(b.length=l),this&&this!==We&&r(this,u)&&(j=g||dr(j)),j.apply(O,b)}}var Iu=ru&&1/$(new ru([,-0]))[1]==Q?function(t){return new ru(t)}:ei;function Tu(t,e,n,r,o,i){return Ao(t)&&Ao(e)&&(i.set(e,t),Ou(t,e,u,Tu,i),i.delete(e)),t}var Lu=uu?function(t){return uu.get(t)}:ei,Ru=$i?function(t){return null==t?[]:(t=li(t),d($i(t),(function(e){return Ti.call(t,e)})))}:ri,Mu=$i?function(t){for(var e=[];t;)y(e,Ru(t)),t=Pi(t);return e}:ri,Du=Ye;(tu&&Du(new tu(new ArrayBuffer(1)))!=wt||eu&&Du(new eu)!=lt||nu&&Du(nu.resolve())!=pt||ru&&Du(new ru)!=vt||ou&&Du(new ou)!=mt)&&(Du=function(t){var e=Ye(t),n=e==dt?t.constructor:u,r=n?eo(n):"";if(r)switch(r){case cu:return wt;case su:return lt;case lu:return pt;case fu:return vt;case du:return mt}return e});var Bu,Nu,Uu=gi?Eo:oi,Hu=Qr(ju),Fu=Hi||function(t,e){return We.setTimeout(t,e)},Vu=Qr(Eu),$u=(Bu=_a((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Vt,(function(t,n,r,o){e.push(r?o.replace(Qt,"$1"):n||t)})),e}),(function(t){return 500===Nu.size&&Nu.clear(),t})),Nu=Bu.cache,Bu),zu=Pn((function(t,e){return Oo(t)?Pe(t,wu(e,1,Oo,!0)):[]})),Ku=Pn((function(t,e){var n=ao(e);return Oo(n)&&(n=u),Oo(t)?Pe(t,wu(e,1,Oo,!0),Lr(n,2)):[]})),qu=Pn((function(t,e){var n=ao(e);return Oo(n)&&(n=u),Oo(t)?Pe(t,wu(e,1,Oo,!0),u,n):[]})),Wu=Pn((function(t){var e=v(t,Zn);return e.length&&e[0]===t[0]?dn(e):[]})),Zu=Pn((function(t){var e=ao(t),n=v(t,Zn);return e===ao(n)?e=u:n.pop(),n.length&&n[0]===t[0]?dn(n,Lr(e,2)):[]})),Gu=Pn((function(t){var e=ao(t),n=v(t,Zn);return(e="function"==typeof e?e:u)&&n.pop(),n.length&&n[0]===t[0]?dn(n,u,e):[]})),Ju=Pn(co),Yu=kr((function(t,e){var n=null==t?0:t.length,r=Ee(t,e);return Cn(t,v(e,(function(t){return Hr(t,n)?+t:t})).sort(er)),r})),Qu=Pn((function(t){return Fn(wu(t,1,Oo,!0))})),Xu=Pn((function(t){var e=ao(t);return Oo(e)&&(e=u),Fn(wu(t,1,Oo,!0),Lr(e,2))})),ta=Pn((function(t){var e=ao(t);return e="function"==typeof e?e:u,Fn(wu(t,1,Oo,!0),u,e)})),ea=Pn((function(t,e){return Oo(t)?Pe(t,e):[]})),na=Pn((function(t){return qn(d(t,Oo))})),ra=Pn((function(t){var e=ao(t);return Oo(e)&&(e=u),qn(d(t,Oo),Lr(e,2))})),oa=Pn((function(t){var e=ao(t);return e="function"==typeof e?e:u,qn(d(t,Oo),u,e)})),ia=Pn(lo),ua=Pn((function(t){var e=t.length,n=e>1?t[e-1]:u;return n="function"==typeof n?(t.pop(),n):u,fo(t,n)})),aa=kr((function(t){var e=t.length,n=e?t[0]:0,o=this.__wrapped__,i=function(e){return Ee(e,t)};return e>1||this.__actions__.length||!r(o,le)||!Hr(n)?this.thru(i):((o=o.slice(n,+n+(e?1:0))).__actions__.push({func:ho,args:[i],thisArg:u}),new se(o,this.__chain__).thru((function(t){return e&&!t.length&&t.push(u),t})))})),ca=ur((function(t,e,n){bi.call(t,n)?++t[n]:je(t,n,1)})),sa=pr(ro),la=pr(oo),fa=ur((function(t,e,n){bi.call(t,n)?t[n].push(e):je(t,n,[e])})),da=Pn((function(t,e,n){var r=-1,o="function"==typeof e,i=xo(t)?ii(t.length):[];return mu(t,(function(t){i[++r]=o?a(e,t,n):pn(t,e,n)})),i})),pa=ur((function(t,e,n){je(t,n,e)})),ha=ur((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),va=Pn((function(t,e){if(null==t)return[];var n=e.length;return n>1&&Fr(t,e[0],e[1])?e=[]:n>2&&Fr(e[0],e[1],e[2])&&(e=[e[0]]),On(t,wu(e,1),[])})),ya=Ui||function(){return We.Date.now()},ga=Pn((function(t,e,n){var r=1;if(n.length){var o=V(n,Tr(ga));r|=J}return Or(t,r,e,n,o)})),ma=Pn((function(t,e,n){var r=3;if(n.length){var o=V(n,Tr(ma));r|=J}return Or(e,r,t,n,o)})),ba=Pn((function(t,e){return Ae(t,1,e)})),wa=Pn((function(t,e,n){return Ae(t,Uo(e)||0,n)}));function _a(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new pi(W);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 u=t.apply(this,r);return n.cache=i.set(o,u)||i,u};return n.cache=new(_a.Cache||pe),n}_a.Cache=pe;var Sa,xa=ku((function(t,e){var n=(e=1==e.length&&Pa(e[0])?v(e[0],T(Lr())):v(wu(e,1),T(Lr()))).length;return Pn((function(r){for(var o=-1,i=Gi(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return a(t,this,r)}))})),Oa=Pn((function(t,e){var n=V(e,Tr(Oa));return Or(t,J,u,e,n)})),ja=Pn((function(t,e){var n=V(e,Tr(ja));return Or(t,64,u,e,n)})),Ea=kr((function(t,e){return Or(t,256,u,u,u,e)})),Ca=wr(Qe),ka=wr((function(t,e){return t>=e})),Aa=hn(function(){return arguments}())?hn:function(t){return Po(t)&&bi.call(t,"callee")&&!Ti.call(t,"callee")},Pa=ii.isArray,Ia=Xe?T(Xe):function(t){return Po(t)&&Ye(t)==bt},Ta=zi||oi,La=tn?T(tn):function(t){return Po(t)&&Ye(t)==ut},Ra=en?T(en):function(t){return Po(t)&&Du(t)==lt},Ma=nn?T(nn):function(t){return Po(t)&&Ye(t)==ht},Da=rn?T(rn):function(t){return Po(t)&&Du(t)==vt},Ba=on?T(on):function(t){return Po(t)&&ko(t.length)&&!!He[Ye(t)]},Na=wr(bn),Ua=wr((function(t,e){return t<=e})),Ha=ar((function(t,e){if(zr(e)||xo(e))ir(e,zo(e),t);else for(var n in e)bi.call(e,n)&&_e(t,n,e[n])})),Fa=ar((function(t,e){ir(e,Ko(e),t)})),Va=ar((function(t,e,n,r){ir(e,Ko(e),t,r)})),$a=ar((function(t,e,n,r){ir(e,zo(e),t,r)})),za=kr(Ee),Ka=Pn((function(t,e){t=li(t);var n=-1,r=e.length,o=r>2?e[2]:u;for(o&&Fr(e[0],e[1],o)&&(r=1);++n<r;)for(var i=e[n],a=Ko(i),c=-1,s=a.length;++c<s;){var l=a[c],f=t[l];(f===u||So(f,yi[l])&&!bi.call(t,l))&&(t[l]=i[l])}return t})),qa=Pn((function(t){return t.push(u,Tu),a(Ya,u,t)})),Wa=vr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Si.call(e)),t[e]=n}),Yo(Qo)),Za=vr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Si.call(e)),bi.call(t,e)?t[e].push(n):t[e]=[n]}),Lr),Ga=Pn(pn),Ja=ar((function(t,e,n){Ou(t,e,n)})),Ya=ar((function(t,e,n,r){Ou(t,e,n,r)})),Qa=kr((function(t,e){var n={};if(null==t)return n;var r=!1;e=v(e,(function(e){return e=Jn(e,t),r||(r=e.length>1),e})),ir(t,Pr(t),n),r&&(n=gu(n,7,Er));for(var o=e.length;o--;)Vn(n,e[o]);return n})),Xa=kr((function(t,e){return null==t?{}:jn(n=t,e,(function(t,e){return $o(n,e)}));var n})),tc=xr(zo),ec=xr(Ko),nc=fr((function(t,e,n){return e=e.toLowerCase(),t+(n?Zo(e):e)})),rc=fr((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),oc=fr((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),ic=lr("toLowerCase"),uc=fr((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),ac=fr((function(t,e,n){return t+(n?" ":"")+sc(e)})),cc=fr((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),sc=lr("toUpperCase"),lc=Pn((function(t,e){try{return a(t,u,e)}catch(t){return jo(t)?t:new ai(t)}})),fc=kr((function(t,e){return s(e,(function(e){e=to(e),je(t,e,ga(t[e],t))})),t})),dc=hr(),pc=hr(!0),hc=Pn((function(t,e){return function(n){return pn(n,t,e)}})),vc=Pn((function(t,e){return function(n){return pn(t,n,e)}})),yc=gr(v),gc=gr(f),mc=gr(b),bc=br(),wc=br(!0),_c=yr((function(t,e){return t+e}),0),Sc=Sr("ceil"),xc=yr((function(t,e){return t/e}),1),Oc=Sr("floor"),jc=yr((function(t,e){return t*e}),1),Ec=Sr("round"),Cc=yr((function(t,e){return t-e}),0);return C.after=function(t,e){if("function"!=typeof e)throw new pi(W);return t=Bo(t),function(){if(--t<1)return e.apply(this,arguments)}},C.ary=mo,C.assign=Ha,C.assignIn=Fa,C.assignInWith=Va,C.assignWith=$a,C.at=za,C.before=bo,C.bind=ga,C.bindAll=fc,C.bindKey=ma,C.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Pa(t)?t:[t]},C.chain=po,C.chunk=function(t,e,n){e=(n?Fr(t,e,n):e===u)?1:Zi(Bo(e),0);var r=null==t?0:t.length;if(!r||e<1)return[];for(var o=0,i=0,a=ii(Fi(r/e));o<r;)a[i++]=Mn(t,o,o+=e);return a},C.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},C.concat=function(){var t=arguments.length;if(!t)return[];for(var e=ii(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return y(Pa(n)?or(n):[n],wu(e,1))},C.cond=function(t){var e=null==t?0:t.length,n=Lr();return t=e?v(t,(function(t){if("function"!=typeof t[1])throw new pi(W);return[n(t[0]),t[1]]})):[],Pn((function(n){for(var r=-1;++r<e;){var o=t[r];if(a(o[0],this,n))return a(o[1],this,n)}}))},C.conforms=function(t){return e=gu(t,1),n=zo(e),function(t){return ke(t,e,n)};var e,n},C.constant=Yo,C.countBy=ca,C.create=function(t,e){var n=yu(t);return null==e?n:Oe(n,e)},C.curry=function t(e,n,r){var o=Or(e,8,u,u,u,u,u,n=r?u:n);return o.placeholder=t.placeholder,o},C.curryRight=function t(e,n,r){var o=Or(e,16,u,u,u,u,u,n=r?u:n);return o.placeholder=t.placeholder,o},C.debounce=wo,C.defaults=Ka,C.defaultsDeep=qa,C.defer=ba,C.delay=wa,C.difference=zu,C.differenceBy=Ku,C.differenceWith=qu,C.drop=function(t,e,n){var r=null==t?0:t.length;return r?Mn(t,(e=n||e===u?1:Bo(e))<0?0:e,r):[]},C.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Mn(t,0,(e=r-(e=n||e===u?1:Bo(e)))<0?0:e):[]},C.dropRightWhile=function(t,e){return t&&t.length?zn(t,Lr(e,3),!0,!0):[]},C.dropWhile=function(t,e){return t&&t.length?zn(t,Lr(e,3),!0):[]},C.fill=function(t,e,n,r){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&Fr(t,e,n)&&(n=0,r=o),function(t,e,n,r){var o=t.length;for((n=Bo(n))<0&&(n=-n>o?0:o+n),(r=r===u||r>o?o:Bo(r))<0&&(r+=o),r=n>r?0:No(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},C.filter=function(t,e){return(Pa(t)?d:De)(t,Lr(e,3))},C.flatMap=function(t,e){return wu(go(t,e),1)},C.flatMapDeep=function(t,e){return wu(go(t,e),Q)},C.flatMapDepth=function(t,e,n){return n=n===u?1:Bo(n),wu(go(t,e),n)},C.flatten=io,C.flattenDeep=function(t){return null!=t&&t.length?wu(t,Q):[]},C.flattenDepth=function(t,e){return null!=t&&t.length?wu(t,e=e===u?1:Bo(e)):[]},C.flip=function(t){return Or(t,512)},C.flow=dc,C.flowRight=pc,C.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},C.functions=function(t){return null==t?[]:qe(t,zo(t))},C.functionsIn=function(t){return null==t?[]:qe(t,Ko(t))},C.groupBy=fa,C.initial=function(t){return null!=t&&t.length?Mn(t,0,-1):[]},C.intersection=Wu,C.intersectionBy=Zu,C.intersectionWith=Gu,C.invert=Wa,C.invertBy=Za,C.invokeMap=da,C.iteratee=Xo,C.keyBy=pa,C.keys=zo,C.keysIn=Ko,C.map=go,C.mapKeys=function(t,e){var n={};return e=Lr(e,3),Ve(t,(function(t,r,o){je(n,e(t,r,o),t)})),n},C.mapValues=function(t,e){var n={};return e=Lr(e,3),Ve(t,(function(t,r,o){je(n,r,e(t,r,o))})),n},C.matches=function(t){return _n(gu(t,1))},C.matchesProperty=function(t,e){return Sn(t,gu(e,1))},C.memoize=_a,C.merge=Ja,C.mergeWith=Ya,C.method=hc,C.methodOf=vc,C.mixin=ti,C.negate=_o,C.nthArg=function(t){return t=Bo(t),Pn((function(e){return xn(e,t)}))},C.omit=Qa,C.omitBy=function(t,e){return qo(t,_o(Lr(e)))},C.once=function(t){return bo(2,t)},C.orderBy=function(t,e,n,r){return null==t?[]:(Pa(e)||(e=null==e?[]:[e]),Pa(n=r?u:n)||(n=null==n?[]:[n]),On(t,e,n))},C.over=yc,C.overArgs=xa,C.overEvery=gc,C.overSome=mc,C.partial=Oa,C.partialRight=ja,C.partition=ha,C.pick=Xa,C.pickBy=qo,C.property=ni,C.propertyOf=function(t){return function(e){return null==t?u:Ze(t,e)}},C.pull=Ju,C.pullAll=co,C.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?En(t,e,Lr(n,2)):t},C.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?En(t,e,u,n):t},C.pullAt=Yu,C.range=bc,C.rangeRight=wc,C.rearg=Ea,C.reject=function(t,e){return(Pa(t)?d:De)(t,_o(Lr(e,3)))},C.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=Lr(e,3);++r<i;){var u=t[r];e(u,r,t)&&(n.push(u),o.push(r))}return Cn(t,o),n},C.rest=function(t,e){if("function"!=typeof t)throw new pi(W);return Pn(t,e=e===u?e:Bo(e))},C.reverse=so,C.sampleSize=function(t,e,n){return e=(n?Fr(t,e,n):e===u)?1:Bo(e),(Pa(t)?me:Tn)(t,e)},C.set=function(t,e,n){return null==t?t:Ln(t,e,n)},C.setWith=function(t,e,n,r){return r="function"==typeof r?r:u,null==t?t:Ln(t,e,n,r)},C.shuffle=function(t){return(Pa(t)?be:Rn)(t)},C.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Fr(t,e,n)?(e=0,n=r):(e=null==e?0:Bo(e),n=n===u?r:Bo(n)),Mn(t,e,n)):[]},C.sortBy=va,C.sortedUniq=function(t){return t&&t.length?Un(t):[]},C.sortedUniqBy=function(t,e){return t&&t.length?Un(t,Lr(e,2)):[]},C.split=function(t,e,n){return n&&"number"!=typeof n&&Fr(t,e,n)&&(e=n=u),(n=n===u?et:n>>>0)?(t=Fo(t))&&("string"==typeof e||null!=e&&!Ma(e))&&!(e=Cu(e))&&U(t)?Yn(K(t),0,n):t.split(e,n):[]},C.spread=function(t,e){if("function"!=typeof t)throw new pi(W);return e=null==e?0:Zi(Bo(e),0),Pn((function(n){var r=n[e],o=Yn(n,0,e);return r&&y(o,r),a(t,this,o)}))},C.tail=function(t){var e=null==t?0:t.length;return e?Mn(t,1,e):[]},C.take=function(t,e,n){return t&&t.length?Mn(t,0,(e=n||e===u?1:Bo(e))<0?0:e):[]},C.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Mn(t,(e=r-(e=n||e===u?1:Bo(e)))<0?0:e,r):[]},C.takeRightWhile=function(t,e){return t&&t.length?zn(t,Lr(e,3),!1,!0):[]},C.takeWhile=function(t,e){return t&&t.length?zn(t,Lr(e,3)):[]},C.tap=function(t,e){return e(t),t},C.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new pi(W);return Ao(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),wo(t,e,{leading:r,maxWait:e,trailing:o})},C.thru=ho,C.toArray=Mo,C.toPairs=tc,C.toPairsIn=ec,C.toPath=function(t){return Pa(t)?v(t,to):Ro(t)?[t]:or($u(Fo(t)))},C.toPlainObject=Ho,C.transform=function(t,e,n){var r=Pa(t),o=r||Ta(t)||Ba(t);if(e=Lr(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:Ao(t)&&Eo(i)?yu(Pi(t)):{}}return(o?s:Ve)(t,(function(t,r,o){return e(n,t,r,o)})),n},C.unary=function(t){return mo(t,1)},C.union=Qu,C.unionBy=Xu,C.unionWith=ta,C.uniq=function(t){return t&&t.length?Fn(t):[]},C.uniqBy=function(t,e){return t&&t.length?Fn(t,Lr(e,2)):[]},C.uniqWith=function(t,e){return e="function"==typeof e?e:u,t&&t.length?Fn(t,u,e):[]},C.unset=function(t,e){return null==t||Vn(t,e)},C.unzip=lo,C.unzipWith=fo,C.update=function(t,e,n){return null==t?t:$n(t,e,Gn(n))},C.updateWith=function(t,e,n,r){return r="function"==typeof r?r:u,null==t?t:$n(t,e,Gn(n),r)},C.values=Wo,C.valuesIn=function(t){return null==t?[]:L(t,Ko(t))},C.without=ea,C.words=Jo,C.wrap=function(t,e){return Oa(Gn(e),t)},C.xor=na,C.xorBy=ra,C.xorWith=oa,C.zip=ia,C.zipObject=function(t,e){return Wn(t||[],e||[],_e)},C.zipObjectDeep=function(t,e){return Wn(t||[],e||[],Ln)},C.zipWith=ua,C.entries=tc,C.entriesIn=ec,C.extend=Fa,C.extendWith=Va,ti(C,C),C.add=_c,C.attempt=lc,C.camelCase=nc,C.capitalize=Zo,C.ceil=Sc,C.clamp=function(t,e,n){return n===u&&(n=e,e=u),n!==u&&(n=(n=Uo(n))==n?n:0),e!==u&&(e=(e=Uo(e))==e?e:0),Ce(Uo(t),e,n)},C.clone=function(t){return gu(t,4)},C.cloneDeep=function(t){return gu(t,5)},C.cloneDeepWith=function(t,e){return gu(t,5,e="function"==typeof e?e:u)},C.cloneWith=function(t,e){return gu(t,4,e="function"==typeof e?e:u)},C.conformsTo=function(t,e){return null==e||ke(t,e,zo(e))},C.deburr=Go,C.defaultTo=function(t,e){return null==t||t!=t?e:t},C.divide=xc,C.endsWith=function(t,e,n){t=Fo(t),e=Cu(e);var r=t.length,o=n=n===u?r:Ce(Bo(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},C.eq=So,C.escape=function(t){return(t=Fo(t))&&Dt.test(t)?t.replace(Rt,cn):t},C.escapeRegExp=function(t){return(t=Fo(t))&&zt.test(t)?t.replace($t,"\\$&"):t},C.every=function(t,e,n){var r=Pa(t)?f:Ie;return n&&Fr(t,e,n)&&(e=u),r(t,Lr(e,3))},C.find=sa,C.findIndex=ro,C.findKey=function(t,e){return w(t,Lr(e,3),Ve)},C.findLast=la,C.findLastIndex=oo,C.findLastKey=function(t,e){return w(t,Lr(e,3),Ke)},C.floor=Oc,C.forEach=vo,C.forEachRight=yo,C.forIn=function(t,e){return null==t?t:_u(t,Lr(e,3),Ko)},C.forInRight=function(t,e){return null==t?t:Su(t,Lr(e,3),Ko)},C.forOwn=function(t,e){return t&&Ve(t,Lr(e,3))},C.forOwnRight=function(t,e){return t&&Ke(t,Lr(e,3))},C.get=Vo,C.gt=Ca,C.gte=ka,C.has=function(t,e){return null!=t&&Br(t,e,un)},C.hasIn=$o,C.head=uo,C.identity=Qo,C.includes=function(t,e,n,r){t=xo(t)?t:Wo(t),n=n&&!r?Bo(n):0;var o=t.length;return n<0&&(n=Zi(o+n,0)),Lo(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&S(t,e,n)>-1},C.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:Bo(n);return o<0&&(o=Zi(r+o,0)),S(t,e,o)},C.inRange=function(t,e,n){return e=Do(e),n===u?(n=e,e=0):n=Do(n),(r=t=Uo(t))>=Gi(o=e,i=n)&&r<Zi(o,i);var r,o,i},C.invoke=Ga,C.isArguments=Aa,C.isArray=Pa,C.isArrayBuffer=Ia,C.isArrayLike=xo,C.isArrayLikeObject=Oo,C.isBoolean=function(t){return!0===t||!1===t||Po(t)&&Ye(t)==it},C.isBuffer=Ta,C.isDate=La,C.isElement=function(t){return Po(t)&&1===t.nodeType&&!To(t)},C.isEmpty=function(t){if(null==t)return!0;if(xo(t)&&(Pa(t)||"string"==typeof t||"function"==typeof t.splice||Ta(t)||Ba(t)||Aa(t)))return!t.length;var e=Du(t);if(e==lt||e==vt)return!t.size;if(zr(t))return!mn(t).length;for(var n in t)if(bi.call(t,n))return!1;return!0},C.isEqual=function(t,e){return xu(t,e)},C.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:u)?n(t,e):u;return r===u?xu(t,e,u,n):!!r},C.isError=jo,C.isFinite=function(t){return"number"==typeof t&&Ki(t)},C.isFunction=Eo,C.isInteger=Co,C.isLength=ko,C.isMap=Ra,C.isMatch=function(t,e){return t===e||vn(t,e,Mr(e))},C.isMatchWith=function(t,e,n){return n="function"==typeof n?n:u,vn(t,e,Mr(e),n)},C.isNaN=function(t){return Io(t)&&t!=+t},C.isNative=function(t){if(Uu(t))throw new ai("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return yn(t)},C.isNil=function(t){return null==t},C.isNull=function(t){return null===t},C.isNumber=Io,C.isObject=Ao,C.isObjectLike=Po,C.isPlainObject=To,C.isRegExp=Ma,C.isSafeInteger=function(t){return Co(t)&&t>=-9007199254740991&&t<=X},C.isSet=Da,C.isString=Lo,C.isSymbol=Ro,C.isTypedArray=Ba,C.isUndefined=function(t){return t===u},C.isWeakMap=function(t){return Po(t)&&Du(t)==mt},C.isWeakSet=function(t){return Po(t)&&"[object WeakSet]"==Ye(t)},C.join=function(t,e){return null==t?"":qi.call(t,e)},C.kebabCase=rc,C.last=ao,C.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==u&&(o=(o=Bo(n))<0?Zi(r+o,0):Gi(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):_(t,O,o,!0)},C.lowerCase=oc,C.lowerFirst=ic,C.lt=Na,C.lte=Ua,C.max=function(t){return t&&t.length?Re(t,Qo,Qe):u},C.maxBy=function(t,e){return t&&t.length?Re(t,Lr(e,2),Qe):u},C.mean=function(t){return j(t,Qo)},C.meanBy=function(t,e){return j(t,Lr(e,2))},C.min=function(t){return t&&t.length?Re(t,Qo,bn):u},C.minBy=function(t,e){return t&&t.length?Re(t,Lr(e,2),bn):u},C.stubArray=ri,C.stubFalse=oi,C.stubObject=function(){return{}},C.stubString=function(){return""},C.stubTrue=function(){return!0},C.multiply=jc,C.nth=function(t,e){return t&&t.length?xn(t,Bo(e)):u},C.noConflict=function(){return We._===this&&(We._=Oi),this},C.noop=ei,C.now=ya,C.pad=function(t,e,n){t=Fo(t);var r=(e=Bo(e))?z(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return mr(Vi(o),n)+t+mr(Fi(o),n)},C.padEnd=function(t,e,n){t=Fo(t);var r=(e=Bo(e))?z(t):0;return e&&r<e?t+mr(e-r,n):t},C.padStart=function(t,e,n){t=Fo(t);var r=(e=Bo(e))?z(t):0;return e&&r<e?mr(e-r,n)+t:t},C.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Yi(Fo(t).replace(Kt,""),e||0)},C.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Fr(t,e,n)&&(e=n=u),n===u&&("boolean"==typeof e?(n=e,e=u):"boolean"==typeof t&&(n=t,t=u)),t===u&&e===u?(t=0,e=1):(t=Do(t),e===u?(e=t,t=0):e=Do(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=Qi();return Gi(t+o*(e-t+$e("1e-"+((o+"").length-1))),e)}return kn(t,e)},C.reduce=function(t,e,n){var r=Pa(t)?g:k,o=arguments.length<3;return r(t,Lr(e,4),n,o,mu)},C.reduceRight=function(t,e,n){var r=Pa(t)?m:k,o=arguments.length<3;return r(t,Lr(e,4),n,o,bu)},C.repeat=function(t,e,n){return e=(n?Fr(t,e,n):e===u)?1:Bo(e),An(Fo(t),e)},C.replace=function(){var t=arguments,e=Fo(t[0]);return t.length<3?e:e.replace(t[1],t[2])},C.result=function(t,e,n){var r=-1,o=(e=Jn(e,t)).length;for(o||(o=1,t=u);++r<o;){var i=null==t?u:t[to(e[r])];i===u&&(r=o,i=n),t=Eo(i)?i.call(t):i}return t},C.round=Ec,C.runInContext=t,C.sample=function(t){return(Pa(t)?ge:In)(t)},C.size=function(t){if(null==t)return 0;if(xo(t))return Lo(t)?z(t):t.length;var e=Du(t);return e==lt||e==vt?t.size:mn(t).length},C.snakeCase=uc,C.some=function(t,e,n){var r=Pa(t)?b:Dn;return n&&Fr(t,e,n)&&(e=u),r(t,Lr(e,3))},C.sortedIndex=function(t,e){return Bn(t,e)},C.sortedIndexBy=function(t,e,n){return Nn(t,e,Lr(n,2))},C.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Bn(t,e);if(r<n&&So(t[r],e))return r}return-1},C.sortedLastIndex=function(t,e){return Bn(t,e,!0)},C.sortedLastIndexBy=function(t,e,n){return Nn(t,e,Lr(n,2),!0)},C.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Bn(t,e,!0)-1;if(So(t[n],e))return n}return-1},C.startCase=ac,C.startsWith=function(t,e,n){return t=Fo(t),n=null==n?0:Ce(Bo(n),0,t.length),e=Cu(e),t.slice(n,n+e.length)==e},C.subtract=Cc,C.sum=function(t){return t&&t.length?A(t,Qo):0},C.sumBy=function(t,e){return t&&t.length?A(t,Lr(e,2)):0},C.template=function(t,e,n){var r=C.templateSettings;n&&Fr(t,e,n)&&(e=u),t=Fo(t),e=Va({},e,r,jr);var o,i,a=Va({},e.imports,r.imports,jr),c=zo(a),s=L(a,c),l=0,f=e.interpolate||ae,d="__p += '",p=fi((e.escape||ae).source+"|"+f.source+"|"+(f===Ut?Xt:ae).source+"|"+(e.evaluate||ae).source+"|$","g"),h="//# sourceURL="+(bi.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ue+"]")+"\n";t.replace(p,(function(e,n,r,u,a,c){return r||(r=u),d+=t.slice(l,c).replace(ce,N),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),a&&(i=!0,d+="';\n"+a+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+e.length,e})),d+="';\n";var v=bi.call(e,"variable")&&e.variable;if(v){if(Yt.test(v))throw new ai("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(i?d.replace(Pt,""):d).replace(It,"$1").replace(Tt,"$1;"),d="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var y=lc((function(){return ci(c,h+"return "+d).apply(u,s)}));if(y.source=d,jo(y))throw y;return y},C.times=function(t,e){if((t=Bo(t))<1||t>X)return[];var n=et,r=Gi(t,et);e=Lr(e),t-=et;for(var o=P(r,e);++n<t;)e(n);return o},C.toFinite=Do,C.toInteger=Bo,C.toLength=No,C.toLower=function(t){return Fo(t).toLowerCase()},C.toNumber=Uo,C.toSafeInteger=function(t){return t?Ce(Bo(t),-9007199254740991,X):0===t?t:0},C.toString=Fo,C.toUpper=function(t){return Fo(t).toUpperCase()},C.trim=function(t,e,n){if((t=Fo(t))&&(n||e===u))return I(t);if(!t||!(e=Cu(e)))return t;var r=K(t),o=K(e);return Yn(r,M(r,o),D(r,o)+1).join("")},C.trimEnd=function(t,e,n){if((t=Fo(t))&&(n||e===u))return t.slice(0,q(t)+1);if(!t||!(e=Cu(e)))return t;var r=K(t);return Yn(r,0,D(r,K(e))+1).join("")},C.trimStart=function(t,e,n){if((t=Fo(t))&&(n||e===u))return t.replace(Kt,"");if(!t||!(e=Cu(e)))return t;var r=K(t);return Yn(r,M(r,K(e))).join("")},C.truncate=function(t,e){var n=30,r="...";if(Ao(e)){var o="separator"in e?e.separator:o;n="length"in e?Bo(e.length):n,r="omission"in e?Cu(e.omission):r}var i=(t=Fo(t)).length;if(U(t)){var a=K(t);i=a.length}if(n>=i)return t;var c=n-z(r);if(c<1)return r;var s=a?Yn(a,0,c).join(""):t.slice(0,c);if(o===u)return s+r;if(a&&(c+=s.length-c),Ma(o)){if(t.slice(c).search(o)){var l,f=s;for(o.global||(o=fi(o.source,Fo(te.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var d=l.index;s=s.slice(0,d===u?c:d)}}else if(t.indexOf(Cu(o),c)!=c){var p=s.lastIndexOf(o);p>-1&&(s=s.slice(0,p))}return s+r},C.unescape=function(t){return(t=Fo(t))&&Mt.test(t)?t.replace(Lt,sn):t},C.uniqueId=function(t){var e=++wi;return Fo(t)+e},C.upperCase=cc,C.upperFirst=sc,C.each=vo,C.eachRight=yo,C.first=uo,ti(C,(Sa={},Ve(C,(function(t,e){bi.call(C.prototype,e)||(Sa[e]=t)})),Sa),{chain:!1}),C.VERSION="4.17.21",s(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){C[t].placeholder=C})),s(["drop","take"],(function(t,e){le.prototype[t]=function(n){n=n===u?1:Zi(Bo(n),0);var r=this.__filtered__&&!e?new le(this):this.clone();return r.__filtered__?r.__takeCount__=Gi(n,r.__takeCount__):r.__views__.push({size:Gi(n,et),type:t+(r.__dir__<0?"Right":"")}),r},le.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),s(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;le.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Lr(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),s(["head","last"],(function(t,e){var n="take"+(e?"Right":"");le.prototype[t]=function(){return this[n](1).value()[0]}})),s(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");le.prototype[t]=function(){return this.__filtered__?new le(this):this[n](1)}})),le.prototype.compact=function(){return this.filter(Qo)},le.prototype.find=function(t){return this.filter(t).head()},le.prototype.findLast=function(t){return this.reverse().find(t)},le.prototype.invokeMap=Pn((function(t,e){return"function"==typeof t?new le(this):this.map((function(n){return pn(n,t,e)}))})),le.prototype.reject=function(t){return this.filter(_o(Lr(t)))},le.prototype.slice=function(t,e){t=Bo(t);var n=this;return n.__filtered__&&(t>0||e<0)?new le(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==u&&(n=(e=Bo(e))<0?n.dropRight(-e):n.take(e-t)),n)},le.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},le.prototype.toArray=function(){return this.take(et)},Ve(le.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),o=/^(?:head|last)$/.test(e),i=C[o?"take"+("last"==e?"Right":""):e],a=o||/^find/.test(e);i&&(C.prototype[e]=function(){var e=this.__wrapped__,c=o?[1]:arguments,s=r(e,le),l=c[0],f=s||Pa(e),d=function(t){var e=i.apply(C,y([t],c));return o&&p?e[0]:e};f&&n&&"function"==typeof l&&1!=l.length&&(s=f=!1);var p=this.__chain__,h=!!this.__actions__.length,v=a&&!p,g=s&&!h;if(!a&&f){e=g?e:new le(this);var m=t.apply(e,c);return m.__actions__.push({func:ho,args:[d],thisArg:u}),new se(m,p)}return v&&g?t.apply(this,c):(m=this.thru(d),v?o?m.value()[0]:m.value():m)})})),s(["pop","push","shift","sort","splice","unshift"],(function(t){var e=hi[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);C.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Pa(o)?o:[],t)}return this[n]((function(n){return e.apply(Pa(n)?n:[],t)}))}})),Ve(le.prototype,(function(t,e){var n=C[e];if(n){var r=n.name+"";bi.call(au,r)||(au[r]=[]),au[r].push({name:e,func:n})}})),au[Pu(u,2).name]=[{name:"wrapper",func:u}],le.prototype.clone=function(){var t=new le(this.__wrapped__);return t.__actions__=or(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=or(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=or(this.__views__),t},le.prototype.reverse=function(){if(this.__filtered__){var t=new le(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},le.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Pa(t),r=e<0,o=n?t.length:0,i=function(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],u=i.size;switch(i.type){case"drop":t+=u;break;case"dropRight":e-=u;break;case"take":e=Gi(e,t+u);break;case"takeRight":t=Zi(t,e-u)}}return{start:t,end:e}}(0,o,this.__views__),u=i.start,a=i.end,c=a-u,s=r?a:u-1,l=this.__iteratees__,f=l.length,d=0,p=Gi(c,this.__takeCount__);if(!n||!r&&o==c&&p==c)return Kn(t,this.__actions__);var h=[];t:for(;c--&&d<p;){for(var v=-1,y=t[s+=e];++v<f;){var g=l[v],m=g.iteratee,b=g.type,w=m(y);if(2==b)y=w;else if(!w){if(1==b)continue t;break t}}h[d++]=y}return h},C.prototype.at=aa,C.prototype.chain=function(){return po(this)},C.prototype.commit=function(){return new se(this.value(),this.__chain__)},C.prototype.next=function(){this.__values__===u&&(this.__values__=Mo(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?u:this.__values__[this.__index__++]}},C.prototype.plant=function(t){for(var e,n=this;r(n,qt);){var o=no(n);o.__index__=0,o.__values__=u,e?i.__wrapped__=o:e=o;var i=o;n=n.__wrapped__}return i.__wrapped__=t,e},C.prototype.reverse=function(){var t=this.__wrapped__;if(r(t,le)){var e=t;return this.__actions__.length&&(e=new le(this)),(e=e.reverse()).__actions__.push({func:ho,args:[so],thisArg:u}),new se(e,this.__chain__)}return this.thru(so)},C.prototype.toJSON=C.prototype.valueOf=C.prototype.value=function(){return Kn(this.__wrapped__,this.__actions__)},C.prototype.first=C.prototype.head,Mi&&(C.prototype[Mi]=function(){return this}),C}();We._=ln,(i=function(){return ln}.call(e,n,e,t))===u||(t.exports=i)}.call(this)},385:function(){System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.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(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=function(t){for(var e=[],n=0;n<o.length;n++)o[n]===t?t=null:e.push(o[n]);o=e},r=function(n,r,i){e=r?n:t(t({},e),n);for(var u=o,a=0;a<u.length;a++)u[a](e,i)},o=[];return e=e||{},{action:function(t){var n=function(e){r(e,!1,t)};return function(){for(var r=arguments,o=[e],i=0;i<arguments.length;i++)o.push(r[i]);var u=t.apply(this,o);if(null!=u)return u.then?u.then(n):n(u)}},setState:r,subscribe:function(t){return o.push(t),function(){n(t)}},unsubscribe:n,getState:function(){return e}}},n=function(t,n){var r=s[t];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=e(n);return s[t]={value:o,active:!0},o},i=function(t,n){var r=s[t];if(!r){var o=e(n);return s[t]={value:o,active:!1},o}return r.value},u=function(t){return n("app",t)},a=function(){return i("app",{})},c=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return u},createGlobalStore:function(){return n},getAppState:function(){return a},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},766:function(t){"use strict";t.exports=h},824:function(t){"use strict";t.exports=c},45:function(t){"use strict";t.exports=s},728:function(t){"use strict";t.exports=l},688:function(t){"use strict";t.exports=v},64:function(t){"use strict";t.exports=d},954:function(t){"use strict";t.exports=a},493:function(t){"use strict";t.exports=f},281:function(t){"use strict";t.exports=p}},y={};function g(t){var e=y[t];if(void 0!==e)return e.exports;var n=y[t]={id:t,loaded:!1,exports:{}};return i[t].call(n.exports,n,n.exports,g),n.loaded=!0,n.exports}g.y=u,g.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return g.d(e,{a:e}),e},g.d=function(t,e){for(var n in e)g.o(e,n)&&!g.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},g.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),g.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},g.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},g.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){var t;g.g.importScripts&&(t=g.g.location+"");var e=g.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(/\/[^\/]+$/,"/"),g.p=t}();var m={};return(0,g(968).s)(1),function(){"use strict";var i=function(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},u=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},a=function(t){return function(e){var n,r=function(t){if(Array.isArray(t))return t}(n=(0,Lt.useState)(t.getState()))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(n)||function(t,e){if(t){if("string"==typeof t)return i(t,2);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)?i(t,2):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=r[0],a=r[1];(0,Lt.useEffect)((function(){return t.subscribe((function(t){return a(t)}))}),[]);var c={};return e&&(c=(0,Lt.useMemo)((function(){return function(t,e){"function"==typeof e&&(e=e(t));var n={};for(var r in e)n[r]=t.action(e[r]);return n}(t,e)}),[t,e])),function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){u(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({},o,c)}},c=function(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},s=function(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},l=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Lt.useState)(window.navigator.onLine))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return s(t,2);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)?s(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=e[0],r=e[1];return(0,Lt.useEffect)((function(){return(0,Ht.subscribeConnectivityChanged)((function(t){var e=t.online;return r(e)}))}),[]),n},f=function(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},d=function(t){var e,n=function(t){if(Array.isArray(t))return t}(e=(0,Lt.useState)([]))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return f(t,2);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,2):void 0}}(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.")}(),r=n[0],o=n[1];return(0,Lt.useEffect)((function(){var e=function(e){var n,i,u=null!==(i=null===(n=e.slots[t])||void 0===n?void 0:n.assignedExtensions)&&void 0!==i?i:[];(0,Ft.isEqual)(u,r)||o(u)};return e((0,Nt.getExtensionStore)().getState()),(0,Nt.getExtensionStore)().subscribe(e)}),[t,r]),r},p=function(t){var e=l(),n=d(t);return(0,Lt.useMemo)((function(){return(0,Nt.getConnectedExtensions)(n,e)}),[n,e])},h=function(t){var e=(0,Lt.useContext)(Rt).moduleName;if(!e)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,Lt.useEffect)((function(){(0,Nt.registerExtensionSlot)(e,t)}),[]),{extensions:p(t),extensionSlotName:t,extensionSlotModuleName:e}},v=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},y=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){v(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},b=function(t){return t},w=function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n},_=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{};n%2?w(Object(r),!0).forEach((function(e){S(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))},r=1;r<arguments.length;r++)n(r);return t},S=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},x=function(t,e){var n;if("function"!=typeof(n=e.domElement?function(){return e.domElement}:e.domElementGetter?e.domElementGetter:t.domElementGetter?t.domElementGetter:function(t){var e=t.appName||t.name;if(!e)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(e.name,"'. Expected a function, received ").concat(qt(n)));return function(){var t=n(e);if(!r(t,HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(e.name,"'. Expected HTMLElement, received ").concat(qt(t)));return t}},O=function(t){if("object"!==Kt(t))throw new Error("single-spa-react requires a configuration object");var e=_(_({},Zt),t);if(!e.React)throw new Error("single-spa-react must be passed opts.React");if(!e.ReactDOM)throw new Error("single-spa-react must be passed opts.ReactDOM");if(!e.rootComponent&&!e.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(e.errorBoundary&&"function"!=typeof e.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!Wt&&e.React.createContext&&(Wt=e.React.createContext()),e.SingleSpaRoot=function(t){function e(t){e.displayName="SingleSpaRoot(".concat(t.name,")")}return e.prototype=Object.create(t.React.Component.prototype),e.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},e.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},e.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},e}(e);var n={bootstrap:j.bind(null,e),mount:E.bind(null,e),unmount:C.bind(null,e)};return e.parcelCanUpdate&&(n.update=k.bind(null,e)),n},j=function(t,e){return t.rootComponent?Promise.resolve():t.loadRootComponent(e).then((function(e){t.rootComponent=e}))},E=function(t,e){return new Promise((function(n,r){t.suppressComponentDidCatchWarning||!function(t){if(!(t&&"string"==typeof t.version&&t.version.indexOf(".")>=0))return!1;var e=t.version.slice(0,t.version.indexOf("."));try{return Number(e)>=16}catch(t){return!1}}(t.React)||t.errorBoundary||(t.rootComponent.prototype?t.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(e.name||e.appName||e.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(e.name||e.appName||e.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=A(t,e,(function(){n(this)})),i=x(t,e)(),u=function(t){var e=t.opts,n=t.elementToRender,r=t.domElement,o="function"==typeof e.renderType?e.renderType():e.renderType;if(["createRoot","unstable_createRoot","createBlockingRoot","unstable_createBlockingRoot"].indexOf(o)>=0){var i=e.ReactDOM[o](r);return i.render(n),i}return"hydrate"===o?e.ReactDOM.hydrate(n,r):e.ReactDOM.render(n,r),null}({elementToRender:o,domElement:i,opts:t});t.domElements[e.name]=i,t.renderResults[e.name]=u}))},C=function(t,e){return new Promise((function(n){t.unmountFinished=n;var r=t.renderResults[e.name];r&&r.unmount?r.unmount():t.ReactDOM.unmountComponentAtNode(t.domElements[e.name]),delete t.domElements[e.name],delete t.renderResults[e.name]}))},k=function(t,e){return new Promise((function(n){t.updateResolves[e.name]||(t.updateResolves[e.name]=[]),t.updateResolves[e.name].push(n);var r=A(t,e,null),o=t.renderResults[e.name];if(o&&o.render)o.render(r);else{var i=x(t,e)();t.ReactDOM.render(r,i)}}))},A=function(t,e,n){var r=t.React.createElement(t.rootComponent,e),o=Wt?t.React.createElement(Wt.Provider,{value:e},r):r;return(t.errorBoundary||e.errorBoundary||t.errorBoundaryClass||e.errorBoundaryClass)&&(t.errorBoundaryClass=t.errorBoundaryClass||e.errorBoundaryClass||function(t,e){function n(e){t.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(e.name,")")}return n.prototype=Object.create(t.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(t.errorBoundary||e.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(t,e){this.setState({caughtError:t,caughtErrorInfo:e})},n}(t,e),o=t.React.createElement(t.errorBoundaryClass,e,o)),t.React.createElement(t.SingleSpaRoot,_(_({},e),{},{mountFinished:n,updateFinished:function(){t.updateResolves[e.name]&&(t.updateResolves[e.name].forEach((function(t){return t()})),delete t.updateResolves[e.name])},unmountFinished:function(){setTimeout(t.unmountFinished)}}),o)},P=function(t,e){return!e||"object"!==te(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},I=function(t){if("object"!=typeof t||"string"!=typeof t.featureName||"string"!=typeof t.moduleName)throw new Error("Invalid options");var e=Object.assign({},ne,t);return function(t){var n;return(n=function(n){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Xt(t,e)}(a,n);var o,i,u=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Qt(o);if(i){var n=Qt(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return P(this,t)});function a(t){var n;return function(t,e){if(!r(t,e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=u.call(this,t)).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:e.moduleName,extension:t._extensionContext}},n}var c=a.prototype;return c.componentDidCatch=function(t,n){n&&n.componentStack&&(t.extra=Object.assign(t.extra||{},{componentStack:n.componentStack})),e.throwErrorsToConsole&&setTimeout((function(){throw t})),this.setState({caughtError:t,caughtErrorInfo:n})},c.render=function(){if(this.state.caughtError)return Lt.default.createElement("div",null,"An error has occurred. Please try reloading the page.");var n=this,r=Lt.default.createElement(Rt.Provider,{value:this.state.config},Lt.default.createElement(Lt.default.Suspense,{fallback:null},e.disableTranslations?Lt.default.createElement(t,Yt({},this.props)):Lt.default.createElement(re,{ns:e.moduleName,forceUpdate:function(){return n.forceUpdate()}},Lt.default.createElement(Jt.I18nextProvider,{i18n:ee,defaultNS:e.moduleName},Lt.default.createElement(t,Yt({},this.props))))));return e.strictMode||!Lt.default.StrictMode?r:Lt.default.createElement(Lt.default.StrictMode,null,r)},a}(Lt.default.Component)).displayName="OpenmrsReactComponent(".concat(e.featureName,")"),n}},T=function(t,e){return O({React:Lt.default,ReactDOM:zt.default,rootComponent:I(e)(t)})},L=function(t,e){return function(){return t().then((function(t){return T(t.default,e)}))}},R=function(t,e){return function(){return Promise.resolve(T(t,e))}},M=function(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},D=function(t){var e,n=function(t){if(Array.isArray(t))return t}(e=(0,Lt.useState)([]))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return M(t,2);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)?M(t,2):void 0}}(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.")}(),r=n[0],o=n[1];return(0,Lt.useEffect)((function(){return(0,Nt.getExtensionStore)().subscribe((function(e){var n,i,u=null!==(i=null===(n=e.slots[t])||void 0===n?void 0:n.assignedExtensions.map((function(t){return t.id})))&&void 0!==i?i:[];(0,Ft.isEqual)(u,r)||o(u)}))}),[]),r},B=function(t){(0,Lt.useEffect)((function(){if(t){var e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=e}}}),[t])},N=function(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])}},U=function(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])}},H=function(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=function(t){var e=this.__data__=new se(t);this.size=e.size},V=function(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new He;++e<n;)this.add(t[e])},$=function(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},z=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},K=function(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=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return $(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)?$(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.")}()},q=function(){var t=(0,Lt.useContext)(Rt),e=t.moduleName,n=t.extension;if(!e&&!n)throw Error('No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".');var r=function(t){var e,n,r,o,i,u,a=(0,Lt.useMemo)((function(){return(0,Mt.getConfigStore)(t)}),[t]),c=t,s=(e=a,o=(r=K((0,Lt.useState)((n=e,function(){var t=n.getState();return t.loaded&&t.config?t.config:null})),2))[0],i=r[1],(0,Lt.useEffect)((function(){return null==e?void 0:e.subscribe((function(t){t.loaded&&t.config&&i(t.config)}))}),[e]),o);if(!s)throw tr[c]||(tr[c]=(u=a,new Promise((function(t){var e=u.subscribe((function(n){n.loaded&&n.config&&(t(n.config),e())}))})))),tr[c];return s}(e),o=function(t){var e,n,r=(0,Lt.useMemo)(Mt.getExtensionsConfigStore,[]),o=function(t,e){var n,r,o=K((0,Lt.useState)((n=t,(r=e)?function(){var t=n.getState(),e=(0,Mt.getExtensionConfigFromStore)(t,r.extensionSlotName,r.extensionId);if(e.loaded&&e.config)return e.config}:null)),2),i=o[0],u=o[1];return(0,Lt.useEffect)((function(){if(e)return t.subscribe((function(t){var n=(0,Mt.getExtensionConfigFromStore)(t,e.extensionSlotName,e.extensionId);n.loaded&&n.config&&!Xn(n.config,i)&&u(n.config)}))}),[t,e,i]),i}(r,t);if(!o&&t){var i="".concat(t.extensionSlotName,"-").concat(t.extensionId);throw!tr[i]&&r&&(tr[i]=(e=r,n=t,new Promise((function(t){var r=e.subscribe((function(e){var o=(0,Mt.getExtensionConfigFromStore)(e,n.extensionSlotName,n.extensionId);o.loaded&&o.config&&(t(o.config),r())}))})))),tr[i]}return o||{}}(n),i=(0,Lt.useMemo)((function(){return function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){z(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({},r,o)}),[r,o]);return i},W=function(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},Z=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},G=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){Z(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},J=function(){var t=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return t&&t[1]},Y=function(t,e){switch(e.type){case qn.loadPatient:return G({},t,{patientUuid:e.patientUuid,patient:null,isPendingUuid:!1,isLoadingPatient:!0,err:null});case qn.newPatient:return G({},t,{patient:e.patient,isPendingUuid:!1,isLoadingPatient:!1,err:null});case qn.loadError:return G({},t,{patient:null,isPendingUuid:!1,isLoadingPatient:!1,err:e.err});default:return t}},Q=function(t){var e,n=function(t){if(Array.isArray(t))return t}(e=(0,Lt.useReducer)(Y,G({},rr,{patientUuid:null!=t?t:null,isPendingUuid:!t,isLoadingPatient:!!t})))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return W(t,2);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)?W(t,2):void 0}}(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.")}(),r=n[0],o=n[1];return(0,Lt.useEffect)((function(){if(r.isPendingUuid){var t=J();o(t?{type:qn.loadPatient,patientUuid:t}:{type:qn.newPatient,patient:null})}var e=!0;return r.isLoadingPatient&&r.patientUuid&&(0,er.fetchCurrentPatient)(r.patientUuid).then((function(t){return e&&o({patient:t.data,type:qn.newPatient})}),(function(t){return e&&o({err:t,type:qn.loadError})})),function(){e=!1}}),[r.isPendingUuid,r.isLoadingPatient,r.patientUuid]),(0,Lt.useEffect)((function(){var t=function(t){var e=J();e!=r.patientUuid&&o({type:qn.loadPatient,patientUuid:e})};return window.addEventListener("single-spa:routing-event",t),function(){return window.removeEventListener("single-spa:routing-event",t)}}),[r.patientUuid]),{isLoading:r.isPendingUuid||r.isLoadingPatient,patient:r.patient,patientUuid:null!=t?t:r.patientUuid,error:r.err}},X=function(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},tt=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},et=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){tt(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},nt=function(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=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return X(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)?X(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.")}()},rt=function(){var t=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return t&&t[1]},ot=function(t,e){switch(e.type){case nr.loadPatient:return et({},t,{patient:null,isLoadingPatient:!0,err:null});case nr.newPatient:return et({},t,{patient:e.patient,isLoadingPatient:!1,err:null});case nr.loadError:return et({},t,{patient:null,isLoadingPatient:!1,err:e.err});default:return t}},it=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rt(),e=nt((0,Lt.useReducer)(ot,ar),2),n=e[0],r=e[1];return(0,Lt.useEffect)((function(){var e=!0;return t?((0,er.fetchCurrentPatient)(t).then((function(t){return e&&r({patient:t.data,type:nr.newPatient})}),(function(t){return e&&r({err:t,type:nr.loadError})})),r({type:nr.loadPatient})):r({type:nr.newPatient,patient:null}),function(){e=!1}}),[t]),[n.isLoadingPatient,n.patient,t,n.err]},ut=function(t){var e=p(t);return(0,Lt.useMemo)((function(){return Object.fromEntries(e.map((function(t){return[t.name,t.meta]})))}),[e])},at=function(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},ct=function(){var t,e=(t=(0,Lt.useState)(0),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=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return at(t,2);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)?at(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1];return(0,Lt.useCallback)((function(){e((function(t){return t+1}))}),[])},st=function(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},lt=function(){var t="tablet";return document.body.classList.forEach((function(e){switch(e){case"omrs-breakpoint-lt-tablet":t="phone";break;case"omrs-breakpoint-gt-tablet":t="desktop"}})),t},ft=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Lt.useState)(lt))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return st(t,2);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)?st(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=e[0],r=e[1];return(0,Lt.useEffect)((function(){var t=function(){r(lt())};return window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}),[]),n},dt=function(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},pt=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Lt.useState)([]))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return dt(t,2);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)?dt(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=e[0],r=e[1];return(0,Lt.useEffect)((function(){var t=(0,er.getLocations)().subscribe((function(t){r(t)}),(function(t){console.error(t)}));return function(){return t.unsubscribe()}}),[]),n},ht=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,Lt.useRef)(null);return(0,Lt.useEffect)((function(){if(e){var r=function(e){var r;(null==n||null===(r=n.current)||void 0===r?void 0:r.contains(e.target))||t(e)};return window.addEventListener("click",r),function(){return window.removeEventListener("click",r)}}}),[t,e]),n},vt=function(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},yt=function(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},gt=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Lt.useState)(null))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return yt(t,2);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)?yt(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=e[0],r=e[1],o=null;if(!n){if(or){var i=(0,er.getSessionStore)().getState();i.loaded&&(o=i.session)}else or=new Promise((function(t){var e=function(e){var n=e.loaded,r=e.session;n&&(t(r),o=r,ir&&ir(),ir=void 0)};e((0,er.getSessionStore)().getState()),o||(ir=(0,er.getSessionStore)().subscribe(e))}));if(!o)throw or;r(o)}(0,Lt.useEffect)((function(){return ir||(ir=(0,er.getSessionStore)().subscribe((function(t){var e=t.loaded,n=t.session;e&&(o=n,r(n))}))),function(){ir&&ir(),ir=void 0}}),[]);var u=n||o;if(!u)throw or?(console.warn("useSession is in an unexpected state. Attempting to recover."),or):Error("useSession is in an invalid state.");return u},mt=function(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},bt=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},wt=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){bt(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},_t=function(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=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return mt(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)?mt(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.")}()},St=function(t,e){"function"==typeof e&&(e=e(t));var n={};for(var r in e)n[r]=t.action(e[r]);return n},xt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dr,n=arguments.length>2?arguments[2]:void 0,r=_t((0,Lt.useState)((function(){return e(t.getState())})),2),o=r[0],i=r[1];(0,Lt.useEffect)((function(){return(0,fr.subscribeTo)(t,e,i)}),[t,e]);var u={};return n&&(u=(0,Lt.useMemo)((function(){return St(t,n)}),[t,n])),wt({},o,u)},Ot=function(t,e){return xt(t,dr,e)},jt=function(t,e,n,o){return new(n||(n=Promise))((function(i,u){function a(t){try{s(o.next(t))}catch(t){u(t)}}function c(t){try{s(o.throw(t))}catch(t){u(t)}}function s(t){var e;t.done?i(t.value):(e=t.value,r(e,n)?e:new n((function(t){t(e)}))).then(a,c)}s((o=o.apply(t,e||[])).next())}))},Et=function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)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 u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}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,a])}}},Ct=function(t){var e,n=eo(t?"/ws/rest/v1/visit?patient=".concat(t,"&v=").concat(er.defaultVisitCustomRepresentation,"&includeInactive=false"):null,er.openmrsFetch),r=n.data,o=n.error;return{error:o,mutate:n.mutate,isValidating:n.isValidating,currentVisit:(0,Lt.useMemo)((function(){return null!==(e=null==r?void 0:r.data.results.find((function(t){return null===t.stopDatetime&&(0,no.default)(t.startDatetime).isToday()})))&&void 0!==e?e:null}),[null==r?void 0:r.data.results]),isLoading:!r&&!o}},kt=function(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},At=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Lt.useState)([]))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return kt(t,2);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)?kt(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=e[0],r=e[1];return(0,Lt.useEffect)((function(){var t=(0,er.getVisitTypes)().subscribe((function(t){r(t)}),(function(t){return console.error(t)}));return function(){return t.unsubscribe()}}),[]),n},Pt=function(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},It=function(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=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Pt(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)?Pt(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.")}()},Tt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=It((0,Lt.useState)(1),2),r=n[0],o=n[1],i=(0,Lt.useMemo)((function(){return Math.max(1,Math.ceil(t.length/e))}),[t.length,e]),u=(0,Lt.useMemo)((function(){var n=(r-1)*e,o=(r+0)*e;return t.slice(n,o)}),[t,r,e]);return{results:u,totalPages:i,currentPage:r,paginated:t.length>e,showNextButton:r<i,showPreviousButton:r>1,goTo:function(t){o(Math.max(1,Math.min(i,t)))},goToNext:function(){r<i&&o(r+1)},goToPrevious:function(){r>1&&o(r-1)}}};g.r(m),g.d(m,{ComponentContext:function(){return Rt},ConfigurableLink:function(){return Bt},Extension:function(){return Ut},ExtensionSlot:function(){return $t},UserHasAccess:function(){return lr},createUseStore:function(){return a},getAsyncExtensionLifecycle:function(){return oe},getAsyncLifecycle:function(){return L},getLifecycle:function(){return T},getSyncLifecycle:function(){return R},openmrsComponentDecorator:function(){return I},useAssignedExtensionIds:function(){return D},useAssignedExtensions:function(){return d},useBodyScrollLock:function(){return B},useConfig:function(){return q},useConnectedExtensions:function(){return p},useConnectivity:function(){return l},useCurrentPatient:function(){return it},useExtensionInternalStore:function(){return cr},useExtensionSlot:function(){return h},useExtensionSlotMeta:function(){return ut},useExtensionStore:function(){return sr},useForceUpdate:function(){return ct},useLayoutType:function(){return ft},useLocations:function(){return pt},useOnClickOutside:function(){return ht},usePagination:function(){return Tt},usePatient:function(){return Q},useSession:function(){return gt},useStore:function(){return xt},useStoreWithActions:function(){return Ot},useVisit:function(){return Ct},useVisitTypes:function(){return At}});var Lt=g(954),Rt=Lt.default.createContext({moduleName:""}),Mt=g(824);function Dt(){return Dt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Dt.apply(this,arguments)}var Bt=function(t){var e=t.to,n=t.children,r=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,["to","children"]);return Lt.default.createElement("a",Dt({onClick:function(t){return r=e,void((n=t).metaKey||n.ctrlKey||n.shiftKey||0!=n.button||(n.preventDefault(),(0,Mt.navigate)({to:r})));var n,r},href:(0,Mt.interpolateUrl)(e)},r),n)},Nt=g(45),Ut=function(t){var e,n=t.state,r=t.wrap,o=function(t){if(Array.isArray(t))return t}(e=(0,Lt.useState)())||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return c(t,2);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)?c(t,2):void 0}}(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.")}(),i=o[0],u=o[1],a=(0,Lt.useContext)(Rt).extension,s=(0,Lt.useCallback)((function(t){u(t)}),[]);(0,Lt.useEffect)((function(){if(null!=i&&a)return(0,Nt.renderExtension)(i,a.extensionSlotName,a.extensionSlotModuleName,a.extensionId,void 0,n)}),[null==a?void 0:a.extensionSlotName,null==a?void 0:a.extensionId,null==a?void 0:a.extensionSlotModuleName,n,i]);var l=Lt.default.createElement("div",{ref:s,"data-extension-id":null==a?void 0:a.extensionId,style:{position:"relative"}});return a&&r?r(l,a):l},Ht=g(728),Ft=g(891);function Vt(){return Vt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Vt.apply(this,arguments)}var $t=function(t){var e=t.extensionSlotName,n=t.select,r=void 0===n?b:n,o=t.children,i=t.state,u=t.style,a=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,["extensionSlotName","select","children","state","style"]),c=(0,Lt.useRef)(null),s=h(e),l=s.extensions,f=s.extensionSlotModuleName,d=(0,Lt.useRef)(i);(function(t,e){if(t===e)return!0;if(!t&&e)return!1;if(t&&!e)return!1;if("object"!=typeof t||"object"!=typeof e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(!(i in e)||e[i]!==t[i])return!1}return!0})(d.current,i)||(d.current=i);var p=(0,Lt.useMemo)((function(){return e&&r(l).map((function(t){return Lt.default.createElement(Rt.Provider,{key:t.id,value:{moduleName:f,extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:f}}},null!=o?o:Lt.default.createElement(Ut,{state:d.current}))}))}),[r,l,e,d.current]);return Lt.default.createElement("div",Vt({ref:c,"data-extension-slot-name":e,"data-extension-slot-module-name":f,style:y({},u,{position:"relative"})},a),p)},zt=g(493);function Kt(t){return(Kt="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)})(t)}function qt(t){return(qt="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)})(t)}var Wt=null;try{Wt=n(983).createContext()}catch(t){}var Zt={React:null,ReactDOM:null,rootComponent:null,loadRootComponent:null,renderType:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{}},Gt=g(64),Jt=g(281);function Yt(){return Yt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Yt.apply(this,arguments)}function Qt(t){return(Qt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Xt(t,e){return(Xt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var te=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":o(t)},ee=Gt.default.default||Gt.default,ne={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},re=function(t){(0,Lt.useEffect)((function(){return ee.on("languageChanged",t.forceUpdate),function(){return ee.off("languageChanged",t.forceUpdate)}}),[t.forceUpdate]);var e=(0,Lt.useRef)(null);if(e.current)throw e.current;if(!ee.hasLoadedNamespace(t.ns)){var n=setTimeout((function(){console.warn("openmrsComponentDecorator: the React suspense promise for i18next.loadNamespaces(['".concat(t.ns,"']) did not resolve nor reject after three seconds. This could mean you have multiple versions of i18next and haven't made i18next a webpack external in all projects."))}),3e3);throw ee.loadNamespaces([t.ns]).then((function(){return clearTimeout(n)})).catch((function(t){clearTimeout(n),e.current=t}))}return Lt.default.createElement(Lt.default.Fragment,null,t.children)},oe=L,ie=function(t,e){return t===e||t!=t&&e!=e},ue=function(t,e){for(var n=t.length;n--;)if(ie(t[n][0],e))return n;return-1},ae=Array.prototype.splice;N.prototype.clear=function(){this.__data__=[],this.size=0},N.prototype.delete=function(t){var e=this.__data__,n=ue(e,t);return!(n<0||(n==e.length-1?e.pop():ae.call(e,n,1),--this.size,0))},N.prototype.get=function(t){var e=this.__data__,n=ue(e,t);return n<0?void 0:e[n][1]},N.prototype.has=function(t){return ue(this.__data__,t)>-1},N.prototype.set=function(t,e){var n=this.__data__,r=ue(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var ce,se=N,le="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,fe="object"==typeof self&&self&&self.Object===Object&&self,de=le||fe||Function("return this")(),pe=de.Symbol,he=Object.prototype,ve=he.hasOwnProperty,ye=he.toString,ge=pe?pe.toStringTag:void 0,me=Object.prototype.toString,be=pe?pe.toStringTag:void 0,we=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":be&&be in Object(t)?function(t){var e=ve.call(t,ge),n=t[ge];try{t[ge]=void 0;var r=!0}catch(t){}var o=ye.call(t);return r&&(e?t[ge]=n:delete t[ge]),o}(t):(e=t,me.call(e));var e},_e=function(t){var e=void 0===t?"undefined":o(t);return null!=t&&("object"==e||"function"==e)},Se=function(t){if(!_e(t))return!1;var e=we(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},xe=de["__core-js_shared__"],Oe=(ce=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||""))?"Symbol(src)_1."+ce:"",je=Function.prototype.toString,Ee=function(t){if(null!=t){try{return je.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Ce=/^\[object .+?Constructor\]$/,ke=Function.prototype,Ae=Object.prototype,Pe=ke.toString,Ie=Ae.hasOwnProperty,Te=RegExp("^"+Pe.call(Ie).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Le=function(t,e){var n,r=null==(n=t)?void 0:n[e];return function(t){return!(!_e(t)||(e=t,Oe&&Oe in e))&&(Se(t)?Te:Ce).test(Ee(t));var e}(r)?r:void 0},Re=Le(de,"Map"),Me=Le(Object,"create"),De=Object.prototype.hasOwnProperty,Be=Object.prototype.hasOwnProperty;U.prototype.clear=function(){this.__data__=Me?Me(null):{},this.size=0},U.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},U.prototype.get=function(t){var e=this.__data__;if(Me){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return De.call(e,t)?e[t]:void 0},U.prototype.has=function(t){var e=this.__data__;return Me?void 0!==e[t]:Be.call(e,t)},U.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Me&&void 0===e?"__lodash_hash_undefined__":e,this};var Ne=U,Ue=function(t,e){var n,r,i=t.__data__;return("string"==(r=o(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map};H.prototype.clear=function(){this.size=0,this.__data__={hash:new Ne,map:new(Re||se),string:new Ne}},H.prototype.delete=function(t){var e=Ue(this,t).delete(t);return this.size-=e?1:0,e},H.prototype.get=function(t){return Ue(this,t).get(t)},H.prototype.has=function(t){return Ue(this,t).has(t)},H.prototype.set=function(t,e){var n=Ue(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var He=H;F.prototype.clear=function(){this.__data__=new se,this.size=0},F.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},F.prototype.get=function(t){return this.__data__.get(t)},F.prototype.has=function(t){return this.__data__.has(t)},F.prototype.set=function(t,e){var n=this.__data__;if(r(n,se)){var o=n.__data__;if(!Re||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new He(o)}return n.set(t,e),this.size=n.size,this};var Fe=F;V.prototype.add=V.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},V.prototype.has=function(t){return this.__data__.has(t)};var Ve=V,$e=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},ze=function(t,e){return t.has(e)},Ke=function(t,e,n,r,o,i){var u=1&n,a=t.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var s=i.get(t),l=i.get(e);if(s&&l)return s==e&&l==t;var f=-1,d=!0,p=2&n?new Ve:void 0;for(i.set(t,e),i.set(e,t);++f<a;){var h=t[f],v=e[f];if(r)var y=u?r(v,h,f,e,t,i):r(h,v,f,t,e,i);if(void 0!==y){if(y)continue;d=!1;break}if(p){if(!$e(e,(function(t,e){if(!ze(p,e)&&(h===t||o(h,t,n,r,i)))return p.push(e)}))){d=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){d=!1;break}}return i.delete(t),i.delete(e),d},qe=de.Uint8Array,We=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},Ze=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},Ge=pe?pe.prototype:void 0,Je=Ge?Ge.valueOf:void 0,Ye=Array.isArray,Qe=Object.prototype.propertyIsEnumerable,Xe=Object.getOwnPropertySymbols,tn=Xe?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 u=t[n];e(u)&&(i[o++]=u)}return i}(Xe(t),(function(e){return Qe.call(t,e)})))}:function(){return[]},en=function(t){return null!=t&&"object"==typeof t},nn=function(t){return en(t)&&"[object Arguments]"==we(t)},rn=Object.prototype,on=rn.hasOwnProperty,un=rn.propertyIsEnumerable,an=nn(function(){return arguments}())?nn:function(t){return en(t)&&on.call(t,"callee")&&!un.call(t,"callee")},cn=an,sn=e&&!e.nodeType&&e,ln=sn&&t&&!t.nodeType&&t,fn=ln&&ln.exports===sn?de.Buffer:void 0,dn=(fn?fn.isBuffer:void 0)||function(){return!1},pn=/^(?:0|[1-9]\d*)$/,hn=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},vn={};vn["[object Float32Array]"]=vn["[object Float64Array]"]=vn["[object Int8Array]"]=vn["[object Int16Array]"]=vn["[object Int32Array]"]=vn["[object Uint8Array]"]=vn["[object Uint8ClampedArray]"]=vn["[object Uint16Array]"]=vn["[object Uint32Array]"]=!0,vn["[object Arguments]"]=vn["[object Array]"]=vn["[object ArrayBuffer]"]=vn["[object Boolean]"]=vn["[object DataView]"]=vn["[object Date]"]=vn["[object Error]"]=vn["[object Function]"]=vn["[object Map]"]=vn["[object Number]"]=vn["[object Object]"]=vn["[object RegExp]"]=vn["[object Set]"]=vn["[object String]"]=vn["[object WeakMap]"]=!1;var yn,gn,mn,bn=e&&!e.nodeType&&e,wn=bn&&t&&!t.nodeType&&t,_n=wn&&wn.exports===bn&&le.process,Sn=function(){try{return wn&&wn.require&&wn.require("util").types||_n&&_n.binding&&_n.binding("util")}catch(t){}}(),xn=Sn&&Sn.isTypedArray,On=xn?(yn=xn,function(t){return yn(t)}):function(t){return en(t)&&hn(t.length)&&!!vn[we(t)]},jn=Object.prototype.hasOwnProperty,En=Object.prototype,Cn=(gn=Object.keys,mn=Object,function(t){return gn(mn(t))}),kn=Object.prototype.hasOwnProperty,An=function(t){return n=tn,r=function(t){return null!=(e=t)&&hn(e.length)&&!Se(e)?function(t,e){var n,r,i,u=Ye(t),a=!u&&cn(t),c=!u&&!a&&dn(t),s=!u&&!a&&!c&&On(t),l=u||a||c||s,f=l?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],d=f.length;for(var p in t)!jn.call(t,p)||l&&("length"==p||c&&("offset"==p||"parent"==p)||s&&("buffer"==p||"byteLength"==p||"byteOffset"==p)||(r=d,i=void 0===(n=p)?"undefined":o(n),(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&pn.test(n))&&n>-1&&n%1==0&&n<r))||f.push(p);return f}(t):function(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||En))return Cn(t);var e,n,r=[];for(var o in Object(t))kn.call(t,o)&&"constructor"!=o&&r.push(o);return r}(t);var e}(e=t),Ye(e)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(e));var e,n,r},Pn=Object.prototype.hasOwnProperty,In=Le(de,"DataView"),Tn=Le(de,"Promise"),Ln=Le(de,"Set"),Rn=Le(de,"WeakMap"),Mn="[object Map]",Dn="[object Promise]",Bn="[object Set]",Nn="[object WeakMap]",Un="[object DataView]",Hn=Ee(In),Fn=Ee(Re),Vn=Ee(Tn),$n=Ee(Ln),zn=Ee(Rn),Kn=we;(In&&Kn(new In(new ArrayBuffer(1)))!=Un||Re&&Kn(new Re)!=Mn||Tn&&Kn(Tn.resolve())!=Dn||Ln&&Kn(new Ln)!=Bn||Rn&&Kn(new Rn)!=Nn)&&(Kn=function(t){var e=we(t),n="[object Object]"==e?t.constructor:void 0,r=n?Ee(n):"";if(r)switch(r){case Hn:return Un;case Fn:return Mn;case Vn:return Dn;case $n:return Bn;case zn:return Nn}return e});var qn,Wn=Kn,Zn="[object Arguments]",Gn="[object Array]",Jn="[object Object]",Yn=Object.prototype.hasOwnProperty,Qn=function t(e,n,o,i,u){return e===n||(null==e||null==n||!en(e)&&!en(n)?e!=e&&n!=n:function(t,e,n,o,i,u){var a=Ye(t),c=Ye(e),s=a?Gn:Wn(t),l=c?Gn:Wn(e),f=(s=s==Zn?Jn:s)==Jn,d=(l=l==Zn?Jn:l)==Jn,p=s==l;if(p&&dn(t)){if(!dn(e))return!1;a=!0,f=!1}if(p&&!f)return u||(u=new Fe),a||On(t)?Ke(t,e,n,o,i,u):function(t,e,n,r,o,i,u){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 qe(t),new qe(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ie(+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 a=We;case"[object Set]":var c=1&r;if(a||(a=Ze),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var l=Ke(a(t),a(e),r,o,i,u);return u.delete(t),l;case"[object Symbol]":if(Je)return Je.call(t)==Je.call(e)}return!1}(t,e,s,n,o,i,u);if(!(1&n)){var h=f&&Yn.call(t,"__wrapped__"),v=d&&Yn.call(e,"__wrapped__");if(h||v){var y=h?t.value():t,g=v?e.value():e;return u||(u=new Fe),i(y,g,n,o,u)}}return!!p&&(u||(u=new Fe),function(t,e,n,o,i,u){var a=1&n,c=An(t),s=c.length;if(s!=An(e).length&&!a)return!1;for(var l=s;l--;){var f=c[l];if(!(a?f in e:Pn.call(e,f)))return!1}var d=u.get(t),p=u.get(e);if(d&&p)return d==e&&p==t;var h=!0;u.set(t,e),u.set(e,t);for(var v=a;++l<s;){var y=t[f=c[l]],g=e[f];if(o)var m=a?o(g,y,f,e,t,u):o(y,g,f,t,e,u);if(!(void 0===m?y===g||i(y,g,n,o,u):m)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var b=t.constructor,w=e.constructor;b==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(h=!1)}return u.delete(t),u.delete(e),h}(t,e,n,o,i,u))}(e,n,o,i,t,u))},Xn=function(t,e){return Qn(t,e)},tr={},er=g(766);!function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLoadError"}(qn||(qn={}));var nr,rr={patientUuid:null,patient:null,isPendingUuid:!0,isLoadingPatient:!1,err:null};!function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLloadErroroadError"}(nr||(nr={}));var or,ir,ur,ar={patient:null,isLoadingPatient:!0,err:null},cr=a((0,Nt.getExtensionInternalStore)()),sr=a((0,Nt.getExtensionStore)()),lr=function(t){var e,n=t.privilege,r=t.children,o=function(t){if(Array.isArray(t))return t}(e=(0,Lt.useState)(null))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return vt(t,2);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)?vt(t,2):void 0}}(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.")}(),i=o[0],u=o[1];return(0,Lt.useEffect)((function(){var t=(0,er.getCurrentUser)({includeAuthStatus:!1}).subscribe(u);return function(){return t.unsubscribe()}}),[]),i&&(0,er.userHasAccess)(n,i)?Lt.default.createElement(Lt.default.Fragment,null,r):null},fr=g(385),dr=function(t){return t},pr=function(){},hr=void 0,vr=Object,yr=function(t){return t===hr},gr=function(t){return"function"==typeof t},mr=function(t,e){return vr.assign({},t,e)},br="undefined",wr=function(){return("undefined"==typeof window?"undefined":o(window))!=br},_r=new WeakMap,Sr=0,xr=function(t){var e,n,r=void 0===t?"undefined":o(t),i=t&&t.constructor,u=i==Date;if(vr(t)!==t||u||i==RegExp)e=u?t.toJSON():"symbol"==r?t.toString():"string"==r?JSON.stringify(t):""+t;else{if(e=_r.get(t))return e;if(e=++Sr+"~",_r.set(t,e),i==Array){for(e="@",n=0;n<t.length;n++)e+=xr(t[n])+",";_r.set(t,e)}if(i==vr){e="#";for(var a=vr.keys(t).sort();!yr(n=a.pop());)yr(t[n])||(e+=n+":"+xr(t[n])+",");_r.set(t,e)}}return e},Or=!0,jr=wr(),Er=("undefined"==typeof document?"undefined":o(document))!=br,Cr=jr&&window.addEventListener?window.addEventListener.bind(window):pr,kr=Er?document.addEventListener.bind(document):pr,Ar=jr&&window.removeEventListener?window.removeEventListener.bind(window):pr,Pr=Er?document.removeEventListener.bind(document):pr,Ir={isOnline:function(){return Or},isVisible:function(){var t=Er&&document.visibilityState;return yr(t)||"hidden"!==t}},Tr={initFocus:function(t){return kr("visibilitychange",t),Cr("focus",t),function(){Pr("visibilitychange",t),Ar("focus",t)}},initReconnect:function(t){var e=function(){Or=!0,t()},n=function(){Or=!1};return Cr("online",e),Cr("offline",n),function(){Ar("online",e),Ar("offline",n)}}},Lr=!wr()||"Deno"in window,Rr=Lr?Lt.useEffect:Lt.useLayoutEffect,Mr="undefined"!=typeof navigator&&navigator.connection,Dr=!Lr&&Mr&&(["slow-2g","2g"].includes(Mr.effectiveType)||Mr.saveData),Br=function(t){if(gr(t))try{t=t()}catch(e){t=""}var e=[].concat(t);return[t="string"==typeof t?t:(Array.isArray(t)?t.length:t)?xr(t):"",e,t?"$swr$"+t:""]},Nr=new WeakMap,Ur=function(t,e,n,r,o,i,u){void 0===u&&(u=!0);var a=Nr.get(t),c=a[0],s=a[1],l=a[3],f=c[e],d=s[e];if(u&&d)for(var p=0;p<d.length;++p)d[p](n,r,o);return i&&(delete l[e],f&&f[0])?f[0](2).then((function(){return t.get(e)})):t.get(e)},Hr=0,Fr=function(){return++Hr},Vr=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return jt(void 0,void 0,void 0,(function(){var e,n,r,o,i,u,a,c,s,l,f,d,p,h,v,y,g,m,b,w;return Et(this,(function(_){switch(_.label){case 0:if(e=t[0],n=t[1],r=t[2],o=t[3],u=!!yr((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,a=!1!==i.revalidate,c=!1!==i.rollbackOnError,s=i.optimisticData,l=Br(n),f=l[0],d=l[2],!f)return[2];if(p=Nr.get(e),h=p[2],t.length<3)return[2,Ur(e,f,e.get(f),hr,hr,a,!0)];if(v=r,g=Fr(),h[f]=[g,0],m=!yr(s),b=e.get(f),m&&(e.set(f,s),Ur(e,f,s)),gr(v))try{v=v(e.get(f))}catch(t){y=t}return v&&gr(v.then)?[4,v.catch((function(t){y=t}))]:[3,2];case 1:if(v=_.sent(),g!==h[f][0]){if(y)throw y;return[2,v]}y&&m&&c&&(u=!0,v=b,e.set(f,b)),_.label=2;case 2:return u&&(y||(gr(u)&&(v=u(v,b)),e.set(f,v)),e.set(d,mr(e.get(d),{error:y}))),h[f][1]=Fr(),[4,Ur(e,f,v,y,hr,a,!!u)];case 3:if(w=_.sent(),y)throw y;return[2,u?w:v]}}))}))},$r=function(t,e){for(var n in t)t[n][0]&&t[n][0](e)},zr=function(t,e){if(!Nr.has(t)){var n=mr(Tr,e),r={},o=Vr.bind(hr,t),i=pr;if(Nr.set(t,[r,{},{},{},o]),!Lr){var u=n.initFocus(setTimeout.bind(hr,$r.bind(hr,r,0))),a=n.initReconnect(setTimeout.bind(hr,$r.bind(hr,r,1)));i=function(){u&&u(),a&&a(),Nr.delete(t)}}return[t,o,i]}return[t,Nr.get(t)[4]]},Kr=zr(new Map),qr=Kr[0],Wr=Kr[1],Zr=mr({onLoadingSlow:pr,onSuccess:pr,onError:pr,onErrorRetry:function(t,e,n,r,o){var i=n.errorRetryCount,u=o.retryCount,a=~~((Math.random()+.5)*(1<<(u<8?u:8)))*n.errorRetryInterval;!yr(i)&&u>i||setTimeout(r,a,o)},onDiscarded:pr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Dr?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Dr?5e3:3e3,compare:function(t,e){return xr(t)==xr(e)},isPaused:function(){return!1},cache:qr,mutate:Wr,fallback:{}},Ir),Gr=function(t,e){var n=mr(t,e);if(e){var r=t.use,o=t.fallback,i=e.use,u=e.fallback;r&&i&&(n.use=r.concat(i)),o&&u&&(n.fallback=mr(o,u))}return n},Jr=(0,Lt.createContext)({}),Yr=function(t){return gr(t[1])?[t[0],t[1],t[2]||{}]:[t[0],null,(null===t[1]?t[2]:t[1])||{}]},Qr=function(){return mr(Zr,(0,Lt.useContext)(Jr))},Xr=function(t,e,n){var r=e[t]||(e[t]=[]);return r.push(n),function(){var t=r.indexOf(n);t>=0&&(r[t]=r[r.length-1],r.pop())}},to={dedupe:!0},eo=(vr.defineProperty((function(t){var e=t.value,n=Gr((0,Lt.useContext)(Jr),e),r=e&&e.provider,o=(0,Lt.useState)((function(){return r?zr(r(n.cache||qr),e):hr}))[0];return o&&(n.cache=o[0],n.mutate=o[1]),Rr((function(){return o?o[2]:hr}),[]),(0,Lt.createElement)(Jr.Provider,mr(t,{value:n}))}),"default",{value:Zr}),ur=function(t,e,n){var r=n.cache,i=n.compare,u=n.fallbackData,a=n.suspense,c=n.revalidateOnMount,s=n.refreshInterval,l=n.refreshWhenHidden,f=n.refreshWhenOffline,d=Nr.get(r),p=d[0],h=d[1],v=d[2],y=d[3],g=Br(t),m=g[0],b=g[1],w=g[2],_=(0,Lt.useRef)(!1),S=(0,Lt.useRef)(!1),x=(0,Lt.useRef)(m),O=(0,Lt.useRef)(e),j=(0,Lt.useRef)(n),E=function(){return j.current},C=function(){return E().isVisible()&&E().isOnline()},k=function(t){return r.set(w,mr(r.get(w),t))},A=r.get(m),P=yr(u)?n.fallback[m]:u,I=yr(A)?P:A,T=r.get(w)||{},L=T.error,R=!_.current,M=function(){return R&&!yr(c)?c:!E().isPaused()&&(a?!yr(I):yr(I)||n.revalidateIfStale)},D=!(!m||!e)&&(!!T.isValidating||R&&M()),B=function(t,e){var n=(0,Lt.useState)({})[1],r=(0,Lt.useRef)(t),o=(0,Lt.useRef)({data:!1,error:!1,isValidating:!1}),i=(0,Lt.useCallback)((function(t){var i=!1,u=r.current;for(var a in t){var c=a;u[c]!==t[c]&&(u[c]=t[c],o.current[c]&&(i=!0))}i&&!e.current&&n({})}),[]);return Rr((function(){r.current=t})),[r,o.current,i]}({data:I,error:L,isValidating:D},S),N=B[0],U=B[1],H=B[2],F=(0,Lt.useCallback)((function(t){return jt(void 0,void 0,void 0,(function(){var e,o,u,a,c,s,l,f,d,p,h,g,w;return Et(this,(function(j){switch(j.label){case 0:if(e=O.current,!m||!e||S.current||E().isPaused())return[2,!1];a=!0,c=t||{},s=!y[m]||!c.dedupe,l=function(){return!S.current&&m===x.current&&_.current},f=function(){var t=y[m];t&&t[1]===u&&delete y[m]},d={isValidating:!1},p=function(){k({isValidating:!1}),l()&&H(d)},k({isValidating:!0}),H({isValidating:!0}),j.label=1;case 1:return j.trys.push([1,3,,4]),s&&(Ur(r,m,N.current.data,N.current.error,!0),n.loadingTimeout&&!r.get(m)&&setTimeout((function(){a&&l()&&E().onLoadingSlow(m,n)}),n.loadingTimeout),y[m]=[e.apply(void 0,b),Fr()]),w=y[m],o=w[0],u=w[1],[4,o];case 2:return o=j.sent(),s&&setTimeout(f,n.dedupingInterval),y[m]&&y[m][1]===u?(k({error:hr}),d.error=hr,h=v[m],!yr(h)&&(u<=h[0]||u<=h[1]||0===h[1])?(p(),s&&l()&&E().onDiscarded(m),[2,!1]):(i(N.current.data,o)?d.data=N.current.data:d.data=o,i(r.get(m),o)||r.set(m,o),s&&l()&&E().onSuccess(o,m,n),[3,4])):(s&&l()&&E().onDiscarded(m),[2,!1]);case 3:return g=j.sent(),f(),E().isPaused()||(k({error:g}),d.error=g,s&&l()&&(E().onError(g,m,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||gr(n.shouldRetryOnError)&&n.shouldRetryOnError(g))&&C()&&E().onErrorRetry(g,m,n,F,{retryCount:(c.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return a=!1,p(),l()&&s&&Ur(r,m,d.data,d.error,!1),[2,!0]}}))}))}),[m]),V=(0,Lt.useCallback)(Vr.bind(hr,r,(function(){return x.current})),[]);if(Rr((function(){O.current=e,j.current=n})),Rr((function(){if(m){var t=m!==x.current,e=F.bind(hr,to),n=0,r=Xr(m,h,(function(t,e,n){H(mr({error:e,isValidating:n},i(N.current.data,t)?hr:{data:t}))})),u=Xr(m,p,(function(t){if(0==t){var r=Date.now();E().revalidateOnFocus&&r>n&&C()&&(n=r+E().focusThrottleInterval,e())}else if(1==t)E().revalidateOnReconnect&&C()&&e();else if(2==t)return F()}));return S.current=!1,x.current=m,_.current=!0,t&&H({data:I,error:L,isValidating:D}),M()&&(yr(I)||Lr?e():(a=e,wr()&&o(window.requestAnimationFrame)!=br?window.requestAnimationFrame(a):setTimeout(a,1))),function(){S.current=!0,r(),u()}}var a}),[m,F]),Rr((function(){var t,e=function(){var e=gr(s)?s(I):s;e&&-1!==t&&(t=setTimeout(n,e))},n=function(){N.current.error||!l&&!E().isVisible()||!f&&!E().isOnline()?e():F(to).then(e)};return e(),function(){t&&(clearTimeout(t),t=-1)}}),[s,l,f,F]),(0,Lt.useDebugValue)(I),a&&yr(I)&&m)throw O.current=e,j.current=n,S.current=!1,yr(L)?F(to):L;return{mutate:V,get data(){return U.data=!0,I},get error(){return U.error=!0,L},get isValidating(){return U.isValidating=!0,D}}},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Qr(),r=Yr(t),o=r[0],i=r[1],u=r[2],a=Gr(n,u),c=ur,s=a.use;if(s)for(var l=s.length;l-- >0;)c=s[l](c);return c(o,i||a.fetcher,a)}),no=g(688),ro=g(332),oo=g.n(ro);no.default.extend(oo())}(),m}())}}}))},493:()=>{System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.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(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=[];function r(t){for(var e=[],r=0;r<n.length;r++)n[r]===t?t=null:e.push(n[r]);n=e}function o(r,o,i){e=o?r:t(t({},e),r);for(var u=n,a=0;a<u.length;a++)u[a](e,i)}return e=e||{},{action:function(t){function n(e){o(e,!1,t)}return function(){for(var r=arguments,o=[e],i=0;i<arguments.length;i++)o.push(r[i]);var u=t.apply(this,o);if(null!=u)return u.then?u.then(n):n(u)}},setState:o,subscribe:function(t){return n.push(t),function(){r(t)}},unsubscribe:r,getState:function(){return e}}},n=function(t,n){var r=s[t];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=e(n);return s[t]={value:o,active:!0},o},i=function(t,n){var r=s[t];if(!r){var o=e(n);return s[t]={value:o,active:!1},o}return r.value},u=function(t){return n("app",t)},a=function(){return i("app",{})},c=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return u},createGlobalStore:function(){return n},getAppState:function(){return a},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},390:()=>{System.register(["@openmrs/esm-extensions","@openmrs/esm-react-utils","@openmrs/esm-state","react","react-dom","rxjs"],(function(t,e){var n={},r={},o={},i={},u={},a={};return{setters:[function(){},function(){},function(t){o.createGlobalStore=t.createGlobalStore},function(){},function(){},function(t){a.Subject=t.Subject}],execute:function(){t(function(){var t={584:function(t,e,n){var r=n(518).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},518:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},78:function(){var t=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":(e=t)&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e;var e};System.register(["@openmrs/esm-state","single-spa"],(function(e,n){var r={},o={};return{setters:[function(t){r.createGlobalStore=t.createGlobalStore,r.getGlobalStore=t.getGlobalStore},function(t){o.navigateToUrl=t.navigateToUrl}],execute:function(){e(function(){"use strict";var e={685:function(t){t.exports=r},645:function(t){t.exports=o}},n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var u={};return function(){var e=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},n=function(t){return function n(r){return 0===arguments.length||e(r)?n:t.apply(this,arguments)}},r=function(t){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return e(o)?r:n((function(e){return t(o,e)}));default:return e(o)&&e(i)?r:e(o)?n((function(e){return t(e,i)})):e(i)?n((function(e){return t(o,e)})):t(o,i)}}},o=function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n},a=function(t,e,n){for(var r=0,o=n.length;r<o;){if(t(e,n[r]))return!0;r+=1}return!1},c=function(t,e){return Object.prototype.hasOwnProperty.call(e,t)},s=function(t,e,n,r){var i=function(t,e){return ct(t,e,n.slice(),r.slice())},u=o(t);return!a((function(t,e){return!a(i,e,t)}),o(e),u)},l=function(t){return function o(i,u,a){switch(arguments.length){case 0:return o;case 1:return e(i)?o:r((function(e,n){return t(i,e,n)}));case 2:return e(i)&&e(u)?o:e(i)?r((function(e,n){return t(e,u,n)})):e(u)?r((function(e,n){return t(i,e,n)})):n((function(e){return t(i,u,e)}));default:return e(i)&&e(u)&&e(a)?o:e(i)&&e(u)?r((function(e,n){return t(e,n,a)})):e(i)&&e(a)?r((function(e,n){return t(e,u,n)})):e(u)&&e(a)?r((function(e,n){return t(i,e,n)})):e(i)?n((function(e){return t(e,u,a)})):e(u)?n((function(e){return t(i,e,a)})):e(a)?n((function(e){return t(i,u,e)})):t(i,u,a)}}},f=function(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)},d=function(t,e,n,r){return t["@@transducer/result"](n[r](mt(t["@@transducer/step"],t),e))},p=function(t){return"[object Object]"===Object.prototype.toString.call(t)},h=function(t,e){return function(n){if(!t(n))return"function"==typeof e?e(n):e}},v=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(t){return!1}},y=function(t){return(0,Pt.getGlobalStore)("config-module-".concat(t),{config:null,loaded:!1})},g=function(){return(0,Pt.getGlobalStore)("config-extension-slots",{slots:{}})},m=function(t){return b(g().getState(),t)},b=function(t,e){var n=t.slots[e];return null!=n?n:{loaded:!1,config:{}}},w=function(){return(0,Pt.getGlobalStore)("config-extensions",{configs:{}})},_=function(t,e){return S(w().getState(),t,e)},S=function(t,e,n){var r,o=null===(r=t.configs[e])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},x=function(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},O=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},j=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){O(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},E=function(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=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||k(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.")}()},C=function(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||k(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.")}()},k=function(t,e){if(t){if("string"==typeof t)return x(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)?x(t,e):void 0}},A=function(t,e){var n=!0,r=!1,o=void 0;try{for(var i,u=Object.keys(t.schemas)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value,c=F(a,t,e);y(a).setState({loaded:!0,config:c})}}catch(t){r=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}},P=function(t,e){var n,r,o=(n=$(H(t,e)),function(t){var e=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(t)[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var u=E(o.value,2),a=u[0],c=u[1],s=!0,l=!1,f=void 0;try{for(var d,p=Object.entries(c)[Symbol.iterator]();!(s=(d=p.next()).done);s=!0){var h=E(d.value,2),v=h[0];U(h[1],a,v)}}catch(t){l=!0,f=t}finally{try{s||null==p.return||p.return()}finally{if(l)throw f}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(t,e){var r,o;return(null===(r=n[e])||void 0===r?void 0:r.extensionSlots)&&(t[e]=null===(o=n[e])||void 0===o?void 0:o.extensionSlots),t}),{})),Object.keys(r).reduce((function(t,e){return j({},t,r[e])}),{})),i=Object.fromEntries(Object.entries(o).map((function(t){var e=E(t,2);return[e[0],{loaded:!0,config:e[1]}]}))),u=g(),a=u.getState(),c={slots:j({},a.slots,i)};st(a,c)||u.setState(c)},I=function(t,e){var n=function(t,e){var n=Bt(pt(t.schemas)),r=C(t.providedConfigs.map((function(t){return[t.config,t.source]}))).concat([[e.config,"temporary config"]]),o=!0,i=!1,u=void 0;try{for(var a,c=r[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=E(a.value,2);n=$([n,Nt(s[0],s[1])])}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}return n}(t,e);Dt.setState({config:n})},T=function(t,e,n){var r={},o=!0,i=!1,u=void 0;try{for(var a,c=e.mountedExtensions[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=a.value,l=N(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,t,n);r[s.slotName]=j({},r[s.slotName],O({},s.extensionId,{config:l,loaded:!0}))}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}w().setState({configs:r})},L=function(t,e){Ut(t,e);var n=Tt.getState();Tt.setState({schemas:j({},n.schemas,O({},t,e))})},R=function(t,e){Ut(t,e);var n=Tt.getState();n.schemas[t]&&console.warn("Config schema for extension ".concat(t," already exists. If there are multiple extensions with this same name, one will probably crash.")),Tt.setState({schemas:j({},n.schemas,O({},t,e))})},M=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Tt.getState();Tt.setState({providedConfigs:C(n.providedConfigs).concat([{source:e,config:t}])})},D=function(t){return new Promise((function(e){var n=function(t){t.loaded&&t.config&&(e(t.config),o&&o())},r=y(t);n(r.getState());var o=r.subscribe(n)}))},B=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];z(t,e,n);var o=Vt(t,e,r);return Ft(t,o,n),o},N=function(t,e,n,r,o,i){var u,a,c,s,l=E(r.split("#"),1)[0],f=o.schemas[l],d=f?l:e,p=H(o,i),h=V(t,p),v=null!==(s=null==h||null===(u=h.extensionSlots)||void 0===u||null===(a=u[n])||void 0===a||null===(c=a.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=$([V(d,p),v]),g=null!=f?f:o.schemas[e];z(g,y,d);var m=Vt(g,y,o.devDefaultsAreOn);return Ft(g,m,d),delete m.extensionSlots,m},U=function(t,e,n){var r="Extension slot config '".concat(e,".extensionSlots.").concat(n),o=Object.keys(t).filter((function(t){return!["add","remove","order","configure"].includes(t)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),t.add&&(Array.isArray(t.add)&&t.add.every((function(t){return"string"==typeof t}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),t.remove&&(Array.isArray(t.remove)&&t.remove.every((function(t){return"string"==typeof t}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),t.order&&(Array.isArray(t.order)&&t.order.every((function(t){return"string"==typeof t}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),t.configure&&(Z(t.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},H=function(t,e){return C(t.providedConfigs.map((function(t){return t.config}))).concat([e.config])},F=function(t,e,n){if(!e.schemas.hasOwnProperty(t))throw Error("No config schema has been defined for "+t);var r=e.schemas[t],o=V(t,H(e,n));z(r,o,t);var i=Vt(r,o,e.devDefaultsAreOn);return Ft(r,i,t),delete i.extensionSlots,i},V=function(t,e){return $(e.map((function(e){return e[t]})).filter((function(t){return!!t})))},$=function(t){return wt(xt)({},t)},z=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t.hasOwnProperty(c)?Ht(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}},K=function(t,e,n){e&&q(t,[{Array:Ot,Boolean:jt,ConceptUuid:At,Number:Et,Object:kt,String:Ct,UUID:At,PersonAttributeTypeUuid:At,PatientIdentifierTypeUuid:At}[e]],n)},q=function(t,e,n){if(e)try{var r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=(0,u.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(t,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(t,": ").concat(c)))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}catch(e){console.error('Skipping invalid validator at "'.concat(t,'". Encountered error\n\t').concat(e))}},W=function(t){return!!t&&Object.keys(t).filter((function(t){return!["_default","_validators"].includes(t)})).length>0},Z=function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t},G=function(t){var e=window.getOpenmrsSpaBase().replace(/\/$/,"");return J(t,{openmrsBase:window.openmrsBase,openmrsSpaBase:e}).replace(/^\/\//,"/")},J=function(t,e){return Object.keys(e).reduce((function(t,n){return t.split("${"+n+"}").join(e[n])}),t)},Y=function(t){var e=t.to,n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=G(e);r.startsWith(n)?(0,$t.navigateToUrl)(r):window.location.assign(r)};i.r(u),i.d(u,{Type:function(){return ft},configExtensionStore:function(){return Mt},configInternalStore:function(){return Tt},defineConfigSchema:function(){return L},defineExtensionConfigSchema:function(){return R},getConfig:function(){return D},getConfigStore:function(){return y},getExtensionConfig:function(){return _},getExtensionConfigFromStore:function(){return S},getExtensionSlotConfig:function(){return m},getExtensionSlotConfigFromStore:function(){return b},getExtensionSlotsConfigStore:function(){return g},getExtensionsConfigStore:function(){return w},implementerToolsConfigStore:function(){return Dt},inRange:function(){return zt},interpolateString:function(){return J},interpolateUrl:function(){return G},isUrl:function(){return qt},isUrlWithTemplateParameters:function(){return Kt},navigate:function(){return Y},oneOf:function(){return Wt},processConfig:function(){return B},provide:function(){return M},temporaryConfigStore:function(){return Rt},validator:function(){return h},validators:function(){return Zt}});var Q="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e},X=Object.prototype.toString,tt=function(){return"[object Arguments]"===X.call(arguments)?function(t){return"[object Arguments]"===X.call(t)}:function(t){return c("callee",t)}}(),et=tt,nt=!{toString:null}.propertyIsEnumerable("toString"),rt=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ot=function(){return arguments.propertyIsEnumerable("length")}(),it=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1},ut="function"!=typeof Object.keys||ot?n((function(t){if(Object(t)!==t)return[];var e,n,r=[],o=ot&&et(t);for(e in t)!c(e,t)||o&&"length"===e||(r[r.length]=e);if(nt)for(n=rt.length-1;n>=0;)c(e=rt[n],t)&&!it(r,e)&&(r[r.length]=e),n-=1;return r})):n((function(t){return Object(t)!==t?[]:Object.keys(t)})),at=n((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));function ct(e,n,r,o){if(Q(e,n))return!0;var i,u,a=at(e);if(a!==at(n))return!1;if(null==e||null==n)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof n.equals)return"function"==typeof e.equals&&e.equals(n)&&"function"==typeof n.equals&&n.equals(e);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(i=e.constructor,null==(u=String(i).match(/^function (\w*)/))?"":u[1]))return e===n;break;case"Boolean":case"Number":case"String":if((void 0===e?"undefined":t(e))!=(void 0===n?"undefined":t(n))||!Q(e.valueOf(),n.valueOf()))return!1;break;case"Date":if(!Q(e.valueOf(),n.valueOf()))return!1;break;case"Error":return e.name===n.name&&e.message===n.message;case"RegExp":if(e.source!==n.source||e.global!==n.global||e.ignoreCase!==n.ignoreCase||e.multiline!==n.multiline||e.sticky!==n.sticky||e.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===e)return o[l]===n;l-=1}switch(a){case"Map":return e.size===n.size&&s(e.entries(),n.entries(),r.concat([e]),o.concat([n]));case"Set":return e.size===n.size&&s(e.values(),n.values(),r.concat([e]),o.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=ut(e);if(f.length!==ut(n).length)return!1;var d=r.concat([e]),p=o.concat([n]);for(l=f.length-1;l>=0;){var h=f[l];if(!c(h,n)||!ct(n[h],e[h],d,p))return!1;l-=1}return!0}var st=r((function(t,e){return ct(t,e,[],[])}));function lt(t,e,n,r){var o,i=function(o){for(var i=e.length,u=0;u<i;){if(t===e[u])return n[u];u+=1}for(var a in e[u+1]=t,n[u+1]=o,t)o[a]=r?lt(t[a],e,n,!0):t[a];return o};switch(at(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return o=t,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return t}}var ft,dt,pt=n((function(t){return null!=t&&"function"==typeof t.clone?t.clone():lt(t,[],[],!0)})),ht=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},vt=n((function(t){return!!ht(t)||!!t&&"object"==typeof t&&(e=t,!("[object String]"===Object.prototype.toString.call(e)))&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1));var e})),yt=function(){var t=function(t){this.f=t};return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}(),gt=r((function(t,e){return function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,o){return e.apply(this,arguments)};case 5:return function(t,n,r,o,i){return e.apply(this,arguments)};case 6:return function(t,n,r,o,i,u){return e.apply(this,arguments)};case 7:return function(t,n,r,o,i,u,a){return e.apply(this,arguments)};case 8:return function(t,n,r,o,i,u,a,c){return e.apply(this,arguments)};case 9:return function(t,n,r,o,i,u,a,c,s){return e.apply(this,arguments)};case 10:return function(t,n,r,o,i,u,a,c,s,l){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(t.length,(function(){return t.apply(e,arguments)}))})),mt=gt,bt="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",wt=l((function(t,e,n){if("function"==typeof t&&(t=new yt(t)),vt(n))return function(t,e,n){for(var r=0,o=n.length;r<o;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}(t,e,n);if("function"==typeof n["fantasy-land/reduce"])return d(t,e,n,"fantasy-land/reduce");if(null!=n[bt])return f(t,e,n[bt]());if("function"==typeof n.next)return f(t,e,n);if("function"==typeof n.reduce)return d(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),_t=l((function(t,e,n){var r,o={};for(r in e)c(r,e)&&(o[r]=c(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)c(r,n)&&!c(r,o)&&(o[r]=n[r]);return o})),St=l((function t(e,n,r){return _t((function(n,r,o){return p(r)&&p(o)?t(e,r,o):e(n,r,o)}),n,r)})),xt=r((function(t,e){return St((function(t,e,n){return n}),t,e)}));(dt=ft||(ft={})).Array="Array",dt.Boolean="Boolean",dt.ConceptUuid="ConceptUuid",dt.Number="Number",dt.Object="Object",dt.String="String",dt.UUID="UUID",dt.PersonAttributeTypeUuid="PersonAttributeTypeUuid",dt.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var Ot=h((function(t){return Array.isArray(t)}),"must be an array"),jt=h((function(t){return"boolean"==typeof t}),"must be a boolean"),Et=h((function(t){return"number"==typeof t}),"must be a number"),Ct=h((function(t){return"string"==typeof t}),"must be a string"),kt=h((function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}),"must be an object (not an array or null)"),At=h((function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)||/^[0-9a-f]{36}$/i.test(t)}),"must be a valid UUID or a 36-character hexadecimal string"),Pt=i(685),It={providedConfigs:[],schemas:{},devDefaultsAreOn:v()},Tt=(0,Pt.createGlobalStore)("config-internal",It),Lt=v();Tt.subscribe((function(t){var e;t.devDefaultsAreOn!=Lt&&(e=t.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(e)),Lt=t.devDefaultsAreOn)}));var Rt=(0,Pt.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(t){return{}}}()});Rt.subscribe((function(t){var e;e=t.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(e))}));var Mt=(0,Pt.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Dt=(0,Pt.createGlobalStore)("config-implementer-tools",{config:{}});function Bt(t){return t.hasOwnProperty("_default")?j({},t,{_value:t._default,_source:"default"}):Z(t)?Object.keys(t).reduce((function(e,n){return e[n]=Bt(t[n]),e}),{}):{}}function Nt(t,e){return Z(t)?Object.keys(t).reduce((function(n,r){return n[r]=Nt(t[r],e),n}),{}):{_value:t,_source:e}}function Ut(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,u=void 0;try{for(var a,c=function(o,i){var u=i.value,a=n+(n&&".")+u,c=e[u];if(!Z(c))return console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").concat(r)),"continue";c.hasOwnProperty("_default")||Ut(t,c,a);var s=c._elements;if(W(s)&&Ut(t,s,a+"._elements"),c._validators){var l=!0,f=!1,d=void 0;try{for(var p,h=c._validators[Symbol.iterator]();!(l=(p=h.next()).done);l=!0){var v=p.value;"function"!=typeof v&&console.error("".concat(t," has invalid validator for key '").concat(a,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(t){f=!0,d=t}finally{try{l||null==h.return||h.return()}finally{if(f)throw d}}}var y=c._type;y&&!Object.values(ft).includes(y)&&console.error("".concat(t," has invalid type for key '").concat(a,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(ft).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(c).every((function(t){return["_description","_validators","_elements","_type"].includes(t)}))&&!n.includes("._elements")&&console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(c))),s&&y&&![ft.Array,ft.Object].includes(y)&&console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},s=Object.keys(e).filter((function(t){return!t.startsWith("_")}))[Symbol.iterator]();!(o=(a=s.next()).done);o=!0)c(s,a)}catch(t){i=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw u}}}function Ht(t,e,n){K(n,t._type,e),Z(e)?t._type===ft.Object?function(t,e,n){if(t._elements){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c];z(t._elements,s,"".concat(n,".").concat(c))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}}(t,e,n):t.hasOwnProperty("_default")||z(t,e,n):t._type===ft.Array&&function(t,e,n){if(W(t._elements))for(var r=0;r<e.length;r++)Ht(t._elements,e[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<e.length;o++){var i;K("".concat(n,"[").concat(o,"]"),null===(i=t._elements)||void 0===i?void 0:i._type,e[o])}}(t,e,n)}function Ft(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(t)if(e!==t._default&&q(n,t._validators,e),Z(e)){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t._type===ft.Object&&t._elements?Ft(t._elements,s,l):Ft(f,s,l)}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}else if(Array.isArray(e)&&t._elements)for(var d=0;d<e.length;d++)Ft(t._elements,e[d],"".concat(n,"[").concat(d,"]"))}A(Tt.getState(),Rt.getState()),Tt.subscribe((function(t){return A(t,Rt.getState())})),Rt.subscribe((function(t){return A(Tt.getState(),t)})),I(Tt.getState(),Rt.getState()),Tt.subscribe((function(t){return I(t,Rt.getState())})),Rt.subscribe((function(t){return I(Tt.getState(),t)})),P(Tt.getState(),Rt.getState()),Tt.subscribe((function(t){return P(t,Rt.getState())})),Rt.subscribe((function(t){return P(Tt.getState(),t)})),T(Tt.getState(),Mt.getState(),Rt.getState()),Tt.subscribe((function(t){T(t,Mt.getState(),Rt.getState())})),Mt.subscribe((function(t){T(Tt.getState(),t,Rt.getState())})),Rt.subscribe((function(t){T(Tt.getState(),Mt.getState(),t)}));var Vt=function(t,e,n){var r=pt(e);if(!t)return r;var o=!0,i=!1,u=void 0;try{for(var a,c=function(e,o){var i=o.value,u=r[i],a=t[i];if(a&&a.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=a._devDefault||a._default;r[i]=n?c:a._default}var s=a._elements;if(u&&W(s))if(a._type===ft.Array&&Array.isArray(u)){var l=u.map((function(t){return Vt(s,t,n)}));r[i]=l}else if(a._type===ft.Object){var f=!0,d=!1,p=void 0;try{for(var h,v=Object.keys(u)[Symbol.iterator]();!(f=(h=v.next()).done);f=!0){var y=h.value;u[y]=Vt(s,u[y],n)}}catch(t){d=!0,p=t}finally{try{f||null==v.return||v.return()}finally{if(d)throw p}}}}else if(Z(a)){var g=r.hasOwnProperty(i)?u:{};Z(g)&&(r[i]=Vt(a,g,n))}},s=Object.keys(t)[Symbol.iterator]();!(o=(a=s.next()).done);o=!0)c(0,a)}catch(t){i=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw u}}return r},$t=i(645),zt=function(t,e){return h((function(n){return t<=n&&n<=e}),"must be between ".concat(t," and ").concat(e))},Kt=function(t){var e=t.concat(["openmrsBase","openmrsSpaBase"]);return h((function(t){if(!t||"string"!=typeof t)return!1;for(var n=/\${(.*?)}/g,r=n.exec(t);r;){if(!e.includes(r[1]))return!1;r=n.exec(t)}return!0}),"Should be a URL or path. The allowed template parameters are "+e.map((function(t){return"${"+t+"}"})).join(", "))},qt=Kt([]),Wt=function(t){return h((function(e){return t.includes(e)}),"Must be one of the following: '".concat(t.join("', '"),"'."))},Zt={inRange:zt,isUrl:qt,isUrlWithTemplateParameters:Kt,oneOf:Wt}}(),u}())}}}))},991:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/access_time24px">\n <path id="icon/callend/access_time24px" d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm-.22-13h-.06c-.4 0-.72.32-.72.72v4.72c0 .35.18.68.49.86l4.15 2.49c.34.2.78.1.98-.24.21-.34.1-.79-.25-.99l-3.87-2.3V7.72c0-.4-.32-.72-.72-.72z" />\n </g>\n <title>Access time rounded</title>\n</svg>'},662:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Add rounded</title>\n</svg>\n'},865:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_back_24px">\n <path id="icon/navigation/arrow_back_24px_2" d="M18.7912 11.005H7.62124L12.5012 6.12499C12.8912 5.73499 12.8912 5.09499 12.5012 4.70499C12.3144 4.51774 12.0608 4.41251 11.7962 4.41251C11.5317 4.41251 11.2781 4.51774 11.0912 4.70499L4.50124 11.295C4.11124 11.685 4.11124 12.315 4.50124 12.705L11.0912 19.295C11.4812 19.685 12.1112 19.685 12.5012 19.295C12.8912 18.905 12.8912 18.275 12.5012 17.885L7.62124 13.005H18.7912C19.3412 13.005 19.7912 12.555 19.7912 12.005C19.7912 11.455 19.3412 11.005 18.7912 11.005Z"/>\n </g>\n <title>Arrow back rounded</title>\n</svg>\n'},646:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_downward_24px">\n <path id="icon/navigation/arrow_downward_24px_2" d="M11.005 5.20874V16.3787L6.12498 11.4987C5.73498 11.1087 5.09498 11.1087 4.70498 11.4987C4.31498 11.8887 4.31498 12.5187 4.70498 12.9087L11.295 19.4987C11.685 19.8887 12.315 19.8887 12.705 19.4987L19.295 12.9087C19.685 12.5187 19.685 11.8887 19.295 11.4987C19.1081 11.3115 18.8545 11.2063 18.59 11.2063C18.3255 11.2063 18.0718 11.3115 17.885 11.4987L13.005 16.3787V5.20874C13.005 4.65874 12.555 4.20874 12.005 4.20874C11.455 4.20874 11.005 4.65874 11.005 5.20874Z"/>\n </g>\n <title>Arrow downward rounded</title>\n</svg>\n'},509:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"/>\n <title>Arrow forward rounded</title>\n</svg>'},250:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_upward_24px">\n <path id="icon/navigation/arrow_upward_24px_2" d="M13 18.7913V7.62126L17.88 12.5013C18.27 12.8913 18.91 12.8913 19.3 12.5013C19.69 12.1113 19.69 11.4813 19.3 11.0913L12.71 4.50126C12.5231 4.314 12.2695 4.20877 12.005 4.20877C11.7405 4.20877 11.4868 4.314 11.3 4.50126L4.69997 11.0813C4.30997 11.4713 4.30997 12.1013 4.69997 12.4913C5.08997 12.8813 5.71997 12.8813 6.10997 12.4913L11 7.62126V18.7913C11 19.3413 11.45 19.7913 12 19.7913C12.55 19.7913 13 19.3413 13 18.7913Z"/>\n </g>\n <title>Arrow upward rounded </title>\n</svg>\n'},142:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/calendar24px">\n <path d="M20 3h-1V2c0-.55-.45-1-1-1s-1 .45-1 1v1H7V2c0-.55-.45-1-1-1s-1 .45-1 1v1H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 18H5c-.55 0-1-.45-1-1V8h16v12c0 .55-.45 1-1 1z"/>\n </g>\n <title>Calendar rounded</title>\n</svg>'},451:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>\n <title>Check circle</title>\n</svg>\n'},61:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_down_24px">\n <path id="icon/navigation/chevron_down_24px" d="M8.12 9.29L12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7c-.39-.39-.39-1.02 0-1.41.39-.38 1.03-.39 1.42 0z"/>\n </g>\n <title>Chevron down</title>\n</svg>\n'},76:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_left_24px">\n <path id="icon/navigation/chevron_left_24px_2" d="M15 6.70499C14.8132 6.51774 14.5595 6.41251 14.295 6.41251C14.0305 6.41251 13.7769 6.51774 13.59 6.70499L9.00002 11.295C8.61002 11.685 8.61002 12.315 9.00002 12.705L13.59 17.295C13.98 17.685 14.61 17.685 15 17.295C15.39 16.905 15.39 16.275 15 15.885L11.12 11.995L15 8.11499C15.39 7.72499 15.38 7.08499 15 6.70499Z"/>\n </g>\n <title>Chevron left</title>\n</svg>\n'},600:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_right_24px">\n <path id="icon/navigation/chevron_right_24px_2" d="M9.00002 6.71063C8.61002 7.10063 8.61002 7.73063 9.00002 8.12063L12.88 12.0006L9.00002 15.8806C8.61002 16.2706 8.61002 16.9006 9.00002 17.2906C9.39002 17.6806 10.02 17.6806 10.41 17.2906L15 12.7006C15.39 12.3106 15.39 11.6806 15 11.2906L10.41 6.70063C10.03 6.32063 9.39002 6.32063 9.00002 6.71063Z"/>\n </g>\n <title>Chevron right</title>\n</svg>\n'},40:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_up_24px">\n <path d="M11.29 8.71L6.7 13.3c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 10.83l3.88 3.88c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L12.7 8.71c-.38-.39-1.02-.39-1.41 0z"/>\n </g>\n <title>Chevron up</title>\n</svg>\n'},714:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/>\n <title>Close icon</title>\n</svg>'},752:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z" />\n <title>Download icon</title>\n</svg>'},862:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n<g id="icon/navigation/home_24px">\n <path id="icon/navigation/home_24px" d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z"/>\n</g>\n<title>Home rounded</title>\n</svg>'},601:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/important_notification_24px_rounded">\n <path d="M12 23c1.1 0 1.99-.89 1.99-1.99h-3.98c0 1.1.89 1.99 1.99 1.99zm8.29-4.71L19 17v-6c0-3.35-2.36-6.15-5.5-6.83V3c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v1.17C7.36 4.85 5 7.65 5 11v6l-1.29 1.29c-.63.63-.19 1.71.7 1.71h15.17c.9 0 1.34-1.08.71-1.71zM13 16h-2v-2h2v2zm0-5c0 .55-.45 1-1 1s-1-.45-1-1V9c0-.55.45-1 1-1s1 .45 1 1v2z"/>\n </g>\n <title>Important notification</title>\n</svg>\n'},879:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24">\n <path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/>\n <path d="M0 0h24v24H0z" class="omrs-icon-location"/>\n <title>Location icon</title>\n</svg>'},739:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/menu_24px">\n <path id="icon/navigation/menu_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M4 8C3.44995 8 3 7.54999 3 7C3 6.45001 3.44995 6 4 6H20C20.55 6 21 6.45001 21 7C21 7.54999 20.55 8 20 8H4ZM4 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H4C3.44995 11 3 11.45 3 12C3 12.55 3.44995 13 4 13ZM4 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H4C3.44995 16 3 16.45 3 17C3 17.55 3.44995 18 4 18Z"/>\n </g>\n <title>Menu rounded</title>\n</svg>\n'},524:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Remove rounded</title>\n</svg>\n'},787:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/search_24px">\n <path id="icon/action/search_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M15.1865 14.4716H15.9765L20.2165 18.7316C20.6266 19.1416 20.6266 19.8116 20.2165 20.2216C19.8065 20.6316 19.1366 20.6316 18.7265 20.2216L14.4765 15.9716V15.1816L14.2065 14.9016C12.8065 16.1016 10.8966 16.7216 8.86655 16.3816C6.08652 15.9116 3.86655 13.5916 3.52658 10.7916C3.00656 6.56158 6.5665 3.00158 10.7966 3.52157C13.5965 3.86157 15.9166 6.08157 16.3866 8.86157C16.7265 10.8916 16.1065 12.8016 14.9066 14.2016L15.1865 14.4716ZM5.47653 9.97155C5.47653 12.4615 7.48654 14.4716 9.97653 14.4716C12.4665 14.4716 14.4765 12.4615 14.4765 9.97155C14.4765 7.48156 12.4665 5.47155 9.97653 5.47155C7.48654 5.47155 5.47653 7.48156 5.47653 9.97155Z"/>\n </g>\n <title>Search rounded</title>\n</svg>\n'},592:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/supervised_user_circle_24px">\n <path id="icon/action/supervised_user_circle_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.47998 2 2 6.48001 2 12C2 17.52 6.47998 22 12 22C17.52 22 22 17.52 22 12C22 6.48001 17.52 2 12 2ZM15.61 8.34C16.6801 8.34 17.54 9.19998 17.54 10.27C17.54 11.34 16.6801 12.2 15.61 12.2C14.54 12.2 13.6801 11.34 13.6801 10.27C13.67 9.19998 14.54 8.34 15.61 8.34ZM11.97 9.12C11.97 7.82001 10.91 6.76001 9.60999 6.76001C8.30005 6.76001 7.25 7.81 7.25 9.12C7.25 10.42 8.31006 11.48 9.60999 11.48C10.91 11.48 11.97 10.42 11.97 9.12ZM9.60999 15.89V19.64C7.20996 18.89 5.30994 17.04 4.46997 14.68C5.52002 13.56 8.14001 12.99 9.60999 12.99C10.14 12.99 10.8099 13.07 11.51 13.21C9.87 14.08 9.60999 15.23 9.60999 15.89ZM11.21 19.96C11.47 19.99 11.73 20 12 20C15.39 20 18.2799 17.88 19.45 14.91C18.5299 14.15 16.6799 13.76 15.61 13.76C14.1499 13.76 11.21 14.47 11.21 15.89V19.96Z"/>\n </g>\n <title>Supervised user circle rounded</title>\n</svg>\n'},141:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path id="icon/action/visibility_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 4.5C7 4.5 2.72998 7.60999 1 12C2.72998 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.60999 17 4.5 12 4.5ZM12 17C9.23999 17 7 14.76 7 12C7 9.23999 9.23999 7 12 7C14.76 7 17 9.23999 17 12C17 14.76 14.76 17 12 17ZM9 12C9 10.34 10.34 9 12 9C13.66 9 15 10.34 15 12C15 13.66 13.66 15 12 15C10.34 15 9 13.66 9 12Z"/>\n </g>\n <title>Visibility rounded</title>\n</svg>\n'},647:function(t){"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path d="M15.85 3.85L17.3 5.3l-2.18 2.16c-.39.39-.39 1.03 0 1.42.39.39 1.03.39 1.42 0L18.7 6.7l1.45 1.45c.31.31.85.09.85-.36V3.5c0-.28-.22-.5-.5-.5h-4.29c-.45 0-.67.54-.36.85zm-12 4.3L5.3 6.7l2.16 2.18c.39.39 1.03.39 1.42 0 .39-.39.39-1.03 0-1.42L6.7 5.3l1.45-1.45c.31-.31.09-.85-.36-.85H3.5c-.28 0-.5.22-.5.5v4.29c0 .45.54.67.85.36zm4.3 12L6.7 18.7l2.18-2.16c.39-.39.39-1.03 0-1.42-.39-.39-1.03-.39-1.42 0L5.3 17.3l-1.45-1.45c-.31-.31-.85-.09-.85.36v4.29c0 .28.22.5.5.5h4.29c.45 0 .67-.54.36-.85zm12-4.3L18.7 17.3l-2.16-2.18c-.39-.39-1.03-.39-1.42 0-.39.39-.39 1.03 0 1.42l2.18 2.16-1.45 1.45c-.31.31-.09.85.36.85h4.29c.28 0 .5-.22.5-.5v-4.29c0-.45-.54-.67-.85-.36z" />\n </g>\n <title>\n Zoom Out \n </title>\n</svg>'},885:function(t){"use strict";t.exports='<svg viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.29 40.3278C45.3275 35.2904 52.2878 32.1739 59.9776 32.1739C67.6466 32.1739 74.5911 35.2765 79.6245 40.29L79.6454 21.7502C73.7513 18.7143 67.0622 17 59.9776 17C52.8891 17 46.1652 18.9309 40.2692 21.9679L40.29 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6719 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6868 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.507L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M185.885 90.9982H187.309L190.043 97.3236H190.066L192.824 90.9982H194.215V99.0676H193.258V92.2971H193.234L190.34 99.0676H189.758L186.864 92.2971H186.842V99.0676H185.885V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M198.386 90.9982H203.457V91.8867H199.343V94.4168H203.184V95.3062H199.343V98.1782H203.663V99.0676H198.386V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M207.891 98.1782H209.713C211.561 98.1782 212.963 97.2431 212.963 95.0319C212.963 92.8218 211.561 91.8867 209.713 91.8867H207.891V98.1782ZM206.934 90.9982H210.034C211.617 90.9982 213.987 92.0586 213.987 95.0319C213.987 98.0083 211.617 99.0676 210.034 99.0676H206.934V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.007 99.0676H217.965V90.9982H217.007V99.0676Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.105 92.6628C226.627 92.0119 225.863 91.6819 225.088 91.6819C223.288 91.6819 222.011 93.266 222.011 95.0319C222.011 96.9012 223.277 98.3839 225.088 98.3839C226.068 98.3839 226.855 97.9844 227.425 97.255L228.143 97.8582C227.425 98.8281 226.377 99.2724 225.088 99.2724C222.774 99.2724 220.986 97.4826 220.986 95.0319C220.986 92.6628 222.695 90.7935 225.088 90.7935C226.183 90.7935 227.254 91.1701 227.937 92.0586L227.105 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M233.557 92.2295H233.533L231.858 96.1947H235.152L233.557 92.2295ZM233.123 90.9982H234.023L237.453 99.0676H236.336L235.516 97.0841H231.482L230.65 99.0676H229.568L233.123 90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M240.006 90.9982H240.964V98.1782H244.656V99.0676H240.006V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M252.793 94.5539H253.648C254.708 94.5539 256.087 94.5539 256.087 93.2203C256.087 92.0586 255.073 91.8867 254.139 91.8867H252.793V94.5539ZM251.836 90.9982H253.899C255.46 90.9982 257.113 91.2258 257.113 93.2203C257.113 94.3939 256.349 95.1582 255.095 95.3519L257.386 99.0676H256.213L254.023 95.4434H252.793V99.0676H251.836V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M260.51 90.9982H265.58V91.8867H261.468V94.4168H265.308V95.3062H261.468V98.1782H265.786V99.0676H260.51V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M274.402 92.6628C273.923 92.0119 273.16 91.6819 272.384 91.6819C270.584 91.6819 269.307 93.266 269.307 95.0319C269.307 96.9012 270.573 98.3839 272.384 98.3839C273.364 98.3839 274.151 97.9844 274.72 97.255L275.438 97.8582C274.72 98.8281 273.672 99.2724 272.384 99.2724C270.071 99.2724 268.282 97.4826 268.282 95.0319C268.282 92.6628 269.991 90.7935 272.384 90.7935C273.478 90.7935 274.55 91.1701 275.234 92.0586L274.402 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M284.739 95.0319C284.739 93.1746 283.439 91.6819 281.548 91.6819C279.656 91.6819 278.357 93.1746 278.357 95.0319C278.357 96.8903 279.656 98.3839 281.548 98.3839C283.439 98.3839 284.739 96.8903 284.739 95.0319ZM277.33 95.0319C277.33 92.5932 279.097 90.7935 281.548 90.7935C283.998 90.7935 285.765 92.5932 285.765 95.0319C285.765 97.4726 283.998 99.2724 281.548 99.2724C279.097 99.2724 277.33 97.4726 277.33 95.0319Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M289.514 94.5539H290.369C291.428 94.5539 292.807 94.5539 292.807 93.2203C292.807 92.0586 291.793 91.8867 290.859 91.8867H289.514V94.5539ZM288.556 90.9982H290.618C292.181 90.9982 293.833 91.2258 293.833 93.2203C293.833 94.3939 293.07 95.1582 291.817 95.3519L294.106 99.0676H292.933L290.744 95.4434H289.514V99.0676H288.556V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M297.81 98.1782H299.635C301.48 98.1782 302.881 97.2431 302.881 95.0319C302.881 92.8218 301.48 91.8867 299.635 91.8867H297.81V98.1782ZM296.853 90.9982H299.953C301.538 90.9982 303.909 92.0586 303.909 95.0319C303.909 98.0083 301.538 99.0676 299.953 99.0676H296.853V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M315.407 92.4223C315.089 91.9095 314.517 91.6819 313.937 91.6819C313.093 91.6819 312.216 92.0814 312.216 93.0384C312.216 93.7788 312.626 94.1097 313.914 94.5202C315.168 94.9187 316.331 95.3291 316.331 96.9132C316.331 98.5201 314.951 99.2724 313.493 99.2724C312.558 99.2724 311.555 98.9643 311.007 98.1554L311.828 97.4826C312.17 98.0759 312.854 98.3839 313.549 98.3839C314.37 98.3839 315.303 97.9049 315.303 96.9807C315.303 95.9899 314.633 95.818 313.196 95.341C312.057 94.9644 311.19 94.4625 311.19 93.1189C311.19 91.5677 312.523 90.7935 313.937 90.7935C314.837 90.7935 315.601 91.0439 316.193 91.7386L315.407 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M320.844 95.5914L317.835 90.9982H319.054L321.323 94.6454L323.658 90.9982H324.81L321.8 95.5914V99.0676H320.844V95.5914Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M330.565 92.4223C330.245 91.9095 329.675 91.6819 329.094 91.6819C328.251 91.6819 327.374 92.0814 327.374 93.0384C327.374 93.7788 327.784 94.1097 329.072 94.5202C330.326 94.9187 331.487 95.3291 331.487 96.9132C331.487 98.5201 330.109 99.2724 328.65 99.2724C327.716 99.2724 326.713 98.9643 326.165 98.1554L326.986 97.4826C327.328 98.0759 328.012 98.3839 328.707 98.3839C329.528 98.3839 330.461 97.9049 330.461 96.9807C330.461 95.9899 329.79 95.818 328.354 95.341C327.215 94.9644 326.348 94.4625 326.348 93.1189C326.348 91.5677 327.681 90.7935 329.094 90.7935C329.995 90.7935 330.759 91.0439 331.351 91.7386L330.565 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M339.283 91.8867H336.617V99.0676H335.659V91.8867H332.992V90.9982H339.283V91.8867Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M341.665 90.9982H346.736V91.8867H342.623V94.4168H346.463V95.3062H342.623V98.1782H346.942V99.0676H341.665V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M349.905 90.9982H351.329L354.064 97.3236H354.087L356.845 90.9982H358.236V99.0676H357.278V92.2971H357.255L354.361 99.0676H353.779L350.884 92.2971H350.863V99.0676H349.905V90.9982Z" fill="var(--logo-black)"/>\n</svg>\n'},575:function(t){"use strict";t.exports='<svg id="omrs-logo-icon" width="121" height="118" viewBox="0 0 121 118" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.436 39.474C45.505 34.405 52.509 31.269 60.247 31.269C67.964 31.269 74.952 34.391 80.017 39.436L80.038 20.78C74.107 17.725 67.376 16 60.247 16C53.114 16 46.348 17.943 40.415 20.999L40.436 39.474Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.038 79.064C74.969 84.134 67.968 87.269 60.23 87.269C52.513 87.269 45.525 84.148 40.456 79.102L40.436 97.759C46.37 100.813 53.098 102.539 60.23 102.539C67.363 102.539 74.093 100.813 80.024 97.758L80.038 79.064Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.474 79.089C35.405 74.02 32.269 67.019 32.269 59.281C32.269 51.564 35.39 44.577 40.436 39.508L21.779 39.488C18.725 45.421 17 52.148 17 59.281C17 66.414 18.725 73.144 21.782 79.076L40.474 79.089Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.027 39.435C85.096 44.503 88.232 51.508 88.232 59.246C88.232 66.963 85.111 73.951 80.064 79.015L98.722 79.036C101.776 73.105 103.501 66.375 103.501 59.246C103.501 52.112 101.776 45.381 98.72 39.448L80.027 39.435Z" fill="var(--logo-green)"/>\n</svg>\n'},93:function(t){"use strict";t.exports='<svg id="omrs-logo-partial" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n</svg>\n'},839:function(t){"use strict";t.exports='<svg id="omrs-logo-white" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-white)"/>\n</svg>\n'},45:function(t){"use strict";t.exports=n},740:function(t){"use strict";t.exports=r},685:function(t){"use strict";t.exports=o},954:function(t){"use strict";t.exports=i},493:function(t){"use strict";t.exports=u},792:function(t){"use strict";t.exports=a}},c={};function s(e){var n=c[e];if(void 0!==n)return n.exports;var r=c[e]={exports:{}};return t[e](r,r.exports,s),r.exports}s.y=e,s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;s.g.importScripts&&(t=s.g.location+"");var e=s.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(/\/[^\/]+$/,"/"),s.p=t}();var l={};return(0,s(584).s)(1),function(){"use strict";var t=function(t,e){var n=(new DOMParser).parseFromString(e,"text/html").querySelector("svg");n&&(n.id=t,i.appendChild(n))},e=s(885),n=s(93),r=s(575),o=s(839),i=document.createElement("div"),u=function(){document.body.appendChild(i)};i.id="omrs-svgs-container",i.style.display="none","complete"===document.readyState?u():window.addEventListener("load",u);var a=s(141),c=s(739),l=s(787),f=s(865),d=s(509),p=s(646),h=s(250),v=s(76),y=s(600),g=s(40),m=s(61),b=s(592),w=s(862),_=s(714),S=s(601),x=s(142),O=s(991),j=s(662),E=s(524),C=s(451),k=s(647),A=s(879),P=s(752),I=s(78);s(954),s(493);var T=s(792);new T.Subject,new T.Subject,s(45);var L,R=s(685);(0,R.createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]}),window.getComputedStyle(document.body).overflow,s(740),(0,R.createGlobalStore)("left-nav",{slotName:null,basePath:window.spaBase}),L=function(t,e){document.documentElement.style.setProperty(t,e)},(0,I.defineConfigSchema)("@openmrs/esm-styleguide",{"Brand color #1":{_default:"#005d5d",_type:I.Type.String},"Brand color #2":{_default:"#004144",_type:I.Type.String},"Brand color #3":{_default:"#007d79",_type:I.Type.String}}),(0,I.getConfigStore)("@openmrs/esm-styleguide").subscribe((function(t){t.loaded&&t.config&&(L("--brand-01",t.config["Brand color #1"]),L("--brand-02",t.config["Brand color #2"]),L("--brand-03",t.config["Brand color #3"]))})),t("omrs-logo-full-color",e),t("omrs-logo-full-mono",e),t("omrs-logo-full-grey",e),t("omrs-logo-partial-color",n),t("omrs-logo-partial-mono",n),t("omrs-logo-partial-grey",n),t("omrs-logo-icon-color",r),t("omrs-logo-icon-mono",r),t("omrs-logo-icon-grey",r),t("omrs-logo-white",o),t("omrs-icon-visibility",a),t("omrs-icon-menu",c),t("omrs-icon-search",l),t("omrs-icon-arrow-back",f),t("omrs-icon-arrow-forward",d),t("omrs-icon-arrow-downward",p),t("omrs-icon-arrow-upward",h),t("omrs-icon-chevron-left",v),t("omrs-icon-chevron-right",y),t("omrs-icon-chevron-up",g),t("omrs-icon-chevron-down",m),t("omrs-icon-supervised-user-circle",b),t("omrs-icon-home",w),t("omrs-icon-close",_),t("omrs-icon-important-notification",S),t("omrs-icon-calendar",x),t("omrs-icon-access-time",O),t("omrs-icon-add",j),t("omrs-icon-remove",E),t("omrs-icon-check-circle",C),t("omrs-icon-zoomoutmap",k),t("omrs-icon-location",A),t("omrs-icon-download",P)}(),function(){"use strict";s.r(l)}(),l}())}}}))}}]);
2
+ (self.webpackChunk_openmrs_esm_devtools_app=self.webpackChunk_openmrs_esm_devtools_app||[]).push([[889],{418:(e,t,n)=>{function r(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var o=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};System.register(["@openmrs/esm-config","@openmrs/esm-error-handling"],(function(e,t){var i={},a={};return{setters:[function(e){i.Type=e.Type,i.defineConfigSchema=e.defineConfigSchema,i.getConfig=e.getConfig,i.navigate=e.navigate,i.validators=e.validators},function(e){a.reportError=e.reportError}],execute:function(){e(function(){var e={672:function(e,t){var n,r,o;r=t,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",((n=function(e){this.message=e}).prototype=new Error).name="InvalidCharacterError",r.btoa||(r.btoa=function(e){for(var t,r,i=String(e),a=0,u=o,c="";i.charAt(0|a)||(u="=",a%1);c+=u.charAt(63&t>>8-a%1*8)){if((r=i.charCodeAt(a+=3/4))>255)throw new n("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|r}return c}),r.atob||(r.atob=function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,a=0,u=0,c="";i=t.charAt(u++);~i&&(r=a%4?64*r+i:i,a++%4)?c+=String.fromCharCode(255&r>>(-2*a&6)):0)i=o.indexOf(i);return c})},525:function(e){(function(){var t,n,r=function(e,r,o,i){n.defer(),t.search(e).then((function(e){a(e,r).then((function(){o()}),(function(e){i(e)}))}),(function(e){i(e)}))},o=function(e){var t=n.defer(),o=[];return r(e,(function(e){e.forEach((function(e){o.push(e)}))}),(function(){t.resolve(o)}),(function(e){t.reject(e)})),t.promise},i=function(e,r){var o=n.defer();return t.search(e).then((function(e){var n={},i=[function(){o.resolve(e,n)}];function a(){i.pop()()}var u=e.data;u.entry&&u.entry.forEach((function(e){var o=e.resource,c=o.resourceType;r&&r.forEach((function(e){var r,s,l,f=e.split("."),p=f[0],d=f[1],h=o[d];if(c===p&&h){var v=h.reference;n[v]||(r=u,s=o,l=h,i.push((function(){!function(e,r,o){var i=o.reference;t.resolve({bundle:e,resource:r,reference:o}).then((function(e){var t=e.data||e.content;n[i]=t,a()}))}(r,s,l)})))}}))})),a()}),(function(){o.reject("Could not fetch search results")})),o.promise};function a(e,r){var o,i=e.data.entry||[],u=[];for(o=0;o<i.length;o++)u.push(i[o].resource);r(u);var c=n.defer();return t.nextPage({bundle:e.data}).then((function(e){a(e,r).then((function(e){c.resolve()}))}),(function(e){c.resolve()})),c.promise}e.exports=function(e,a){return t=e,n=a,e.drain=r,e.fetchAll=o,e.fetchAllWithReferences=i,e}}).call(this)},256:function(e,t,n){(function(){n(454);var t=n(801),r=n(921),o=n(294),i=n(821),a=n(442),u=n(856),c=n(719),s=n(29),l=n(723),f=n(249),p=n(525);e.exports=function(e,n){var d=t.Middleware,h=t.$$Attr,v=function(e){return h("method",e)},y=function(e,t){return h("headers."+e,t)},m=d(a),g=d(u(e,n)).and(m).and(o.$Basic).and(o.$Bearer).and(o.$Credentials).and(i.$JsonData).and(y("Accept",e.headers&&e.headers.Accept?e.headers.Accept:"application/json")).and(y("Content-Type",e.headers&&e.headers["Content-Type"]?e.headers["Content-Type"]:"application/json")),b=g.and(v("GET")),w=g.and(v("POST")),_=g.and(v("PUT")),x=g.and(v("DELETE")),S=g.and(v("PATCH")),O=i.Http(e,n),E=f.Path,k=E(e.baseUrl),j=k.slash(":type || :resource.resourceType"),C=j.slash("_history"),$=j.slash(":id || :resource.id"),P=$.slash("_history"),A=$.slash(":versionId || :resource.meta.versionId"),T=k.slash(":target.resourceType || :target.type").slash(":target.id").slash(":target.versionId"),I=y("Prefer","return=representation"),R=d(r.$Paging);return p({conformance:b.and(k.slash("metadata")).end(O),document:w.and(k.slash("Document")).end(O),profile:b.and(k.slash("Profile").slash(":type")).end(O),transaction:w.and(k).end(O),history:b.and(k.slash("_history")).and(R).end(O),typeHistory:b.and(C).and(R).end(O),resourceHistory:b.and(P).and(R).end(O),read:b.and(s.$WithPatient).and($).end(O),vread:b.and(A).end(O),delete:x.and($).and(I).end(O),create:w.and(j).and(I).end(O),validate:w.and(j.slash("_validate")).end(O),meta:{add:w.and(T.slash("$meta-add")).end(O),delete:w.and(T.slash("$meta-delete")).end(O),read:b.and(T.slash("$meta")).end(O)},search:b.and(j).and(s.$WithPatient).and(r.$SearchParams).and(R).end(O),update:_.and($).and(I).end(O),conditionalUpdate:_.and(j).and(r.$SearchParams).and(I).end(O),conditionalDelete:x.and(j).and(r.$SearchParams).and(I).end(O),nextPage:b.and(c.$$BundleLinkUrl("next")).end(O),prevPage:b.and(c.$$BundleLinkUrl("previous")).and(c.$$BundleLinkUrl("prev")).end(O),getBundleByUrl:b.and(E(":url")).end(O),resolve:b.and(l.resolve).end(O),patch:S.and($).and(y("Content-Type","application/json-patch+json")).end(O)},n)}}).call(this)},294:function(e,t,n){(function(){var e,r=n(801),o=n(672).btoa;t.$Basic=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.user&&e.auth.pass)return"Basic "+o(e.auth.user+":"+e.auth.pass)})),t.$Bearer=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.bearer)return"Bearer "+e.auth.bearer})),t.$Credentials=r.Middleware(r.$$Attr("credentials",(function(t){return e=t.credentials,""}))).and(r.$$Attr("credentials",(function(t){if(["same-origin","include"].indexOf(e)>-1)return e})))}).call(this)},719:function(e,t){t.$$BundleLinkUrl=function(e){return function(t){return function(n){var r=n.bundle&&(n.bundle.link||[]).filter((function(t){return t.relation&&t.relation===e}))[0];return r&&r.url&&(n.url=r.url,n.data=null),t(n)}}}},856:function(e){(function(){var t=function(e,t,n){var r=e[n];return r&&!t[n]&&(t[n]=r),e};e.exports=function(e,n){return function(r){return function(o){return t(e,o,"baseUrl"),t(e,o,"cache"),t(e,o,"auth"),t(e,o,"patient"),t(e,o,"debug"),t(e,o,"credentials"),t(e,o,"headers"),t(e,o,"agentOptions"),t(n,o,"defer"),t(n,o,"http"),r(o)}}}}).call(this)},801:function(e,t,n){(function(){var e=n(454),r=function(e){return e.and=function(t){return r((n=e,o=t,function(e){return n(o(e))}));var n,o},e.end=function(t){return e(t)},e};t.$$Simple=function(e){return function(t){return function(n){return t(e(n))}}},t.$$Attr=function(t,n){return r((function(r){return function(o){var i;return i="function"==e.type(n)?n(o):n,r(null==i&&null==i?o:function(e,t,n){for(var r=t.split("."),o=e,i=0;i<r.length-1;i++){var a=r[i];(o=e[a])||(o={},e[a]=o)}return o[r[r.length-1]]=n,e}(o,t,i))}}))};var o=function(e,t){return r((function(n){return function(r){return r[e]=t(r),n(r)}}))};t.Middleware=r,t.Attribute=o,t.Method=function(e){return o("method",(t=e,function(){return t}));var t}}).call(this)},442:function(e){e.exports=function(e){return function(t){try{return e(t)}catch(e){if(t.debug&&(console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack)),!t.defer)throw console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack),new Error("I need adapter.defer");var n=t.defer();return n.reject(e),n.promise}}}},821:function(e,t,n){(function(){var e=n(454);t.Http=function(e,t){return function(n){n.debug&&console.log("\nDEBUG (request):",n.method,n.url,n);var r=(n.http||t.http||e.http)(n);return n.debug&&r&&r.then&&r.then((function(e){console.log("\nDEBUG: (responce)",e)})),r}},t.$JsonData=function(t){return function(n){var r,o=n.bundle||n.data||n.resource;return o&&(n.data=(r=o,"object"==e.type(r)||"array"==e.type(r)?JSON.stringify(r):r)),t(n)}}}).call(this)},29:function(e,t,n){(function(){var e=n(801),r=["Account","AllergyIntolerance","BodySite","CarePlan","Claim","ClinicalImpression","Communication","CommunicationRequest","Composition","Condition","Contract","DetectedIssue","Device","DeviceUseRequest","DeviceUseStatement","DiagnosticOrder","DiagnosticReport","DocumentManifest","DocumentReference","Encounter","EnrollmentRequest","EpisodeOfCare","FamilyMemberHistory","Flag","Goal","ImagingObjectSelection","ImagingStudy","Immunization","ImmunizationRecommendation","List","Media","MedicationAdministration","MedicationDispense","MedicationOrder","MedicationStatement","NutritionOrder","Observation","Order","Procedure","ProcedureRequest","QuestionnaireResponse","ReferralRequest","RelatedPerson","RiskAssessment","Specimen","SupplyDelivery","SupplyRequest","VisionPrescription"];t.$WithPatient=e.$$Simple((function(e){var t=e.type;return e.patient&&("Patient"===t?(e.query=e.query||{},e.query._id=e.patient,e.id=e.patient):r.indexOf(t)>=0&&(e.query=e.query||{},e.query.patient=e.patient)),e}))}).call(this)},723:function(e,t,n){(function(){var t=n(454),r=/^#(.*)/,o=function(e){var n,o,i,a,u=e.cache,c=e.reference,s=e.bundle,l=c;if(!l.reference)return null;if(l.reference.match(r))return n=l.reference,o=e.resource,i=n.match(r)[1],(a=(o.contained||[]).filter((function(e){return(e.id||e._id)==i}))[0])&&{content:a}||null;var f=t.absoluteUrl(e.baseUrl,l.reference);return(s&&s.entry||[]).filter((function(e){return e.id===f}))[0]||(null!=u?u[f]:void 0)||null};e.exports.sync=o,e.exports.resolve=function(e){return function(n){var i=o(n),a=n.reference,u=n.defer();if(i){if(!n.defer)throw new Error("I need promise constructor 'adapter.defer' in adapter");return u.resolve(i),u.promise}if(!a)throw new Error("No reference found");if(a&&a.reference.match(r))throw new Error("Contained resource not found");return n.url=t.absoluteUrl(n.baseUrl,a.reference),n.data=null,e(n)}}}).call(this)},921:function(e,t,n){(function(){var e=n(454),r=e.type,o=e.assertArray,i=(e.assertObject,e.reduceMap),a=e.identity,u={$gt:"gt",$lt:"lt",$lte:"lte",$gte:"gte",$ge:"ge",$le:"le"},c={$asc:":asc",$desc:":desc",$exact:":exact",$missing:":missing",$null:":missing",$text:":text"},s=function(e,t){if("$sort"===e)return function(e){var t,n,i,a;for(o(e),i=[],t=0,n=e.length;t<n;t++)switch(a=e[t],r(a)){case"array":i.push({param:"_sort",value:a[0],modifier:":"+a[1]});break;case"string":i.push({param:"_sort",value:a});break;default:i.push(void 0)}return i}(t);if("$has"===e)return i(t,(function(e,t){var n,o;return n=t[0],o=t[1],e.concat(function(){switch(r(o)){case"array":return o.map((function(e){return{param:"_has",value:n+"="+e}}));case"string":return[{param:"_has",value:n+"="+o}]}}())}));if("$include"===e||"$revInclude"===e)return n=e,i(t,(function(e,t){var o,i;return o=t[0],i=t[1],e.concat(function(){switch(r(i)){case"array":return i.map((function(e){return{param:"$include"===n?"_include":"_revinclude",value:o+":"+e}}));case"string":return[{param:"$include"===n?"_include":"_revinclude",value:o+":"+i}]}}())}));var n,a,l;switch(r(t)){case"object":return a=e,i(l=t,(function(e,t){var n,i,f,p;return n=t[0],p=t[1],e.concat("$and"===n?o(p).reduce((function(e,t){return e.concat(s(a,t))}),[]):"$type"===n?[]:0===n.indexOf("$")?(i={param:a},"$or"===n?i.value=p:(u[n]&&(i.operator=u[n]),c[n]&&(i.modifier=c[n]),"object"===r(p)&&p.$or?i.value=p.$or:i.value=[p]),[i]):(l.$type&&(f=":"+l.$type),s(""+a+(f||"")+"."+n,p)))}));case"string":case"number":return[{param:e,value:[t]}];case"array":return[{param:e,value:[t.join("|")]}];default:throw"could not linearizeParams "+r(t)}},l=function(e){return i(e,(function(e,t){var n,r;return n=t[0],r=t[1],e.concat(s(n,r))}))},f=function(e){var t,n,r=["_include","_revinclude","_has"];return function(){var o,i,u,c;for(c=[],o=0,i=(u=l(e)).length;o<i;o++)t=u[o],n=-1===r.indexOf(t.param)?encodeURIComponent(t.value):t.value,c.push([t.param,t.modifier,"_has"==t.param?":":"=",t.operator,n].filter(a).join(""));return c}().join("&")};t._query=l,t.query=f;var p=n(801);t.$SearchParams=p.$$Attr("url",(function(e){var t=e.url;return e.query?t+"?"+f(e.query):t})),t.$Paging=function(e){return function(t){var n=t.params||{};return t.since&&(n._since=t.since),t.count&&(n._count=t.count),t.params=n,e(t)}}}).call(this)},249:function(e,t,n){(function(){n(454);var e=n(801),r=function(t,n){var o=function(e){return n&&t.includes("target.versionId")&&!e.target.versionId?n(e):(n&&n(e)+"/"||"")+function(e,t){var n,r,o=(r=t,0==(n=e.trim()).indexOf(":")?function(e,t){for(var n,r=e.split("||").map((function(e){return e.trim().substring(1)})),o=0;o<r.length;o++){var i=(n=t,r[o].split(".").reduce((function(e,t){return"versionId"===t&&e[t]?"_history/"+e[t]:null==e||null==e?null:e[t]}),n));if(i)return i}return null}(n,r):n);if((null==o||void 0===o)&&0==e.includes("target.versionId"))throw new Error("Parameter "+e+" is required: "+JSON.stringify(t));return o}(t,e)},i=e.Attribute("url",o);return i.slash=function(e){return r(e,o)},i};t.Path=r}).call(this)},454:function(e,t,n){(function(){var e=n(651),r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;t.trim=function(e){return e?e.toString().replace(r,""):""};var o=function(e){return null==e&&void 0===e?String(e):{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"}[Object.prototype.toString.call(e)]};t.type=o,t.assertArray=function(e){if("array"!==o(e))throw"not array";return e};var i=function(e){if("object"!==o(e))throw"not object";return e};t.assertObject=i;var a=function(e,t,n){var r,o;return n||(n=[]),i(e),function(){var t;for(r in t=[],e)o=e[r],t.push([r,o]);return t}().reduce(t,n)};t.reduceMap=a,t.identity=function(e){return e};var u=function(){return Array.prototype.slice.call(arguments)};t.argsArray=u,t.mergeLists=function(){var t;return t=function(t,n){var r,o,i;for(r in o=e(!0,t),n)i=n[r],o[r]=(o[r]||[]).concat(i);return o},u.apply(null,arguments).reduce(t,{})},t.absoluteUrl=function(e,t){return t.match(/https?:\/\/./)?t:e+"/"+t},t.relativeUrl=function(e,t){return t.slice(t,e.length+1)===e+"/"?t.slice(e.length+1):t},t.resourceIdToUrl=function(e,t,n){return t=t.replace(/\/$/,""),(e=e.replace(/^\//,"")).indexOf("/")<0?t+"/"+n+"/"+e:0!==e.indexOf(t)?t+"/"+e:e};var c=function(e,t,n,r){var i;switch(o(n)){case"array":return t(n.map((function(t){return e(t,[n,r])})),r);case"object":return i=function(t,o){var i,a;return i=o[0],a=o[1],t[i]=e(a,[n].concat(r)),t},t(a(n,i,{}),r);default:return t(n,r)}};t.walk=c;var s=function(e,t,n){return t?c(s(e),e,t,n):function(t,n){return s(e,t,n)}};t.postwalk=s}).call(this)},651:function(e,t,n){!function(t){var n=function(e,t,n){var a=n[0],u=n.length;(e||"object"!==r(a))&&(a={});for(var c=0;c<u;++c){var s=n[c];if("object"===r(s))for(var l in s)if("__proto__"!==l){var f=e?o.clone(s[l]):s[l];a[l]=t?i(a[l],f):f}}return a},r=function(e){return{}.toString.call(e).slice(8,-1).toLowerCase()},o=function(e){return n(!0===e,!1,arguments)};function i(e,t){if("object"!==r(e))return t;for(var n in t)"object"===r(e[n])&&"object"===r(t[n])?e[n]=i(e[n],t[n]):e[n]=t[n];return e}o.recursive=function(e){return n(!0===e,!0,arguments)},o.clone=function(e){var t,n,i=e,a=r(e);if("array"===a)for(i=[],n=e.length,t=0;t<n;++t)i[t]=o.clone(e[t]);else if("object"===a)for(t in i={},e)i[t]=o.clone(e[t]);return i},t?e.exports=o:window.merge=o}((e=n.nmd(e))&&"object"==typeof e.exports&&e.exports)},602:function(e){var t=function(e){"use strict";var t,n=function(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]},o=function(e,t,n,o){var u,c,s,l,f=t&&r(t.prototype,a)?t:a,p=Object.create(f.prototype),h=new d(o||[]);return p._invoke=(u=e,c=n,s=h,l=x,function(e,t){if(l===O)throw new Error("Generator is already running");if(l===E){if("throw"===e)throw t;return v()}for(s.method=e,s.arg=t;;){var n=s.delegate;if(n){var r=A(n,s);if(r){if(r===k)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(l===x)throw l=E,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l=O;var o=i(u,c,s);if("normal"===o.type){if(l=s.done?E:S,o.arg===k)continue;return{value:o.arg,done:s.done}}"throw"===o.type&&(l=E,s.method="throw",s.arg=o.arg)}}),p},i=function(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}},a=function(){},u=function(){},c=function(){},s=function(e){["next","throw","return"].forEach((function(t){n(e,t,(function(e){return this._invoke(t,e)}))}))},l=function(e,t){function n(r,o,a,u){var c=i(e[r],e,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&m.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(l).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var r;this._invoke=function(e,o){function i(){return new t((function(t,r){n(e,o,t,r)}))}return r=r?r.then(i,i):i()}},f=function(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)},p=function(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t},d=function(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)},h=function(e){if(e){var n=e[b];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function n(){for(;++r<e.length;)if(m.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:t,done:!0}},y=Object.prototype,m=y.hasOwnProperty,g="function"==typeof Symbol?Symbol:{},b=g.iterator||"@@iterator",w=g.asyncIterator||"@@asyncIterator",_=g.toStringTag||"@@toStringTag";try{n({},"")}catch(e){n=function(e,t,n){return e[t]=n}}e.wrap=o;var x="suspendedStart",S="suspendedYield",O="executing",E="completed",k={},j={};n(j,b,(function(){return this}));var C=Object.getPrototypeOf,$=C&&C(C(h([])));$&&$!==y&&m.call($,b)&&(j=$);var P=c.prototype=a.prototype=Object.create(j);function A(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,A(e,n),"throw"===n.method))return k;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return k}var o=i(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,k;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,k):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,k)}return u.prototype=c,n(P,"constructor",c),n(c,"constructor",u),u.displayName=n(c,_,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===u||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,n(e,_,"GeneratorFunction")),e.prototype=Object.create(P),e},e.awrap=function(e){return{__await:e}},s(l.prototype),n(l.prototype,w,(function(){return this})),e.AsyncIterator=l,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var u=new l(o(t,n,r,i),a);return e.isGeneratorFunction(n)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},s(P),n(P,_,"Generator"),n(P,b,(function(){return this})),n(P,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=h,d.prototype={constructor:d,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(p),!e)for(var n in this)"t"===n.charAt(0)&&m.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){var n=function(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o};if(this.done)throw e;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=m.call(i,"catchLoc"),c=m.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&m.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,k):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),k},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),p(n),k}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;p(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:h(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),k}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},385:function(){System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e,t){for(var n in t)e[n]=t[n];return e},t=function(t){var n=function(e){for(var t=[],n=0;n<o.length;n++)o[n]===e?e=null:t.push(o[n]);o=t},r=function(n,r,i){t=r?n:e(e({},t),n);for(var a=o,u=0;u<a.length;u++)a[u](t,i)},o=[];return t=t||{},{action:function(e){var n=function(t){r(t,!1,e)};return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:r,subscribe:function(e){return o.push(e),function(){n(e)}},unsubscribe:n,getState:function(){return t}}},n=function(e,n){var r=s[e];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=t(n);return s[e]={value:o,active:!0},o},i=function(e,n){var r=s[e];if(!r){var o=t(n);return s[e]={value:o,active:!1},o}return r.value},a=function(e){return n("app",e)},u=function(){return i("app",{})},c=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:function(e){"use strict";e.exports=i},254:function(e){"use strict";e.exports=a}},u={};function c(t){var n=u[t];if(void 0!==n)return n.exports;var r=u[t]={id:t,loaded:!1,exports:{}};return e[t].call(r.exports,r,r.exports,c),r.loaded=!0,r.exports}c.y=t,c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},c.d=function(e,t){for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e;c.g.importScripts&&(e=c.g.location+"");var t=c.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=e}();var s={};return(0,c(968).s)(1),function(){"use strict";var e=function(e,t){function n(){this.constructor=e}Z(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},t=function(e){return"function"==typeof e},i=function(e){setTimeout((function(){throw e}),0)},a=function(e){return e.reduce((function(e,t){return e.concat(r(t,X)?t.errors:t)}),[])},u=function(e){return e},l=function(e){return 0===e.length?u:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}},f=function(e){if(e||(e=Q.Promise||Promise),!e)throw new Error("no Promise impl found");return e},p=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},d=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){p(i,r,o,a,u,"next",e)}function u(e){p(i,r,o,a,u,"throw",e)}a(void 0)}))}},h=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}},v=function(e,t){return!t||"object"!==ke(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t},y=function(e){return window.openmrsBase+e},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");var n=y(e);t.headers||(t.headers={}),_e(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept;var r,o=Error();return window.fetch(n,t).then((r=d(q().mark((function e(t){var r,i;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t).ok){e.next=10;break}if(204!==r.status){e.next=7;break}return r.data=null,e.abrupt("return",r);case 7:return e.abrupt("return",r.text().then((function(e){try{e&&(r.data=JSON.parse(e))}catch(e){}return r})));case 8:e.next=19;break;case 10:return e.next=12,(0,xe.getConfig)("@openmrs/esm-api");case 12:if(i=e.sent.redirectAuthFailure,!(n===y(Ce)&&403===r.status||i.enabled&&i.errors.includes(r.status))){e.next=18;break}return(0,xe.navigate)({to:i.url}),e.abrupt("return",i.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return e.abrupt("return",r.text().then((function(e){var t=e;try{t=JSON.parse(e)}catch(e){}throw new $e(n,r,t,o)}),(function(e){throw new $e(n,r,null,o)})));case 19:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)}))},g=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return t.signal=n.signal,new ie((function(r){var o=!1;return m(e,t).then((function(e){o=!0,r.next(e),r.complete()}),(function(e){o=!0,r.error(e)})),function(){o||n.abort()}}))},b=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},w=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){b(i,r,o,a,u,"next",e)}function u(e){b(i,r,o,a,u,"throw",e)}a(void 0)}))}},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(Re<Date.now()-6e4||!Ie.getState().loaded)&&S(),new ie((function(t){var n=function(n){var r;n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(Ie.getState()),Ie.subscribe(n)}))},x=function(){return(Re<Date.now()-6e4||!Ie.getState().loaded)&&S(),Ie},S=function(){return new Promise((function(e,t){Re=Date.now(),m(Ce).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return t(),Promise.reject();var r,o,i,a,u;(u=null!==(a=null==(r=n.data)||null===(o=r.user)||void 0===o||null===(i=o.userProperties)||void 0===i?void 0:i.defaultLocale)&&void 0!==a?a:r.locale)!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",u),e(n.data),Ie.setState({loaded:!0,session:n.data})})).catch((function(e){return(0,Te.reportError)("Failed to fetch new session information: ".concat(e)),t(e),{sessionId:"",authenticated:!1}}))}))},O=function(){Ie.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},E=function(e,t){return n=e,t.privileges.find((function(e){return n===e.display}))||t.roles.find((function(e){return"System Developer"===e.display}));var n},k=function(){var e,t;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};o(Ie.getState()),e||(t=Ie.subscribe(o))}))},j=function(){return new Promise((function(e,t){var n=_().subscribe((function(t){e(t.sessionLocation),n.unsubscribe()}),t)}))},C=function(e,t){return De.apply(this,arguments)},$=function(){(0,xe.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:xe.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:xe.Type.String,_default:"${openmrsSpaBase}/login",_validators:[xe.validators.isUrl]},errors:{_type:xe.Type.Array,_default:[401],_elements:{_type:xe.Type.Number,_validators:[xe.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:xe.Type.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}}}),S()},P=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},A=function(e,t){return e?Ae.read(function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){P(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({type:"Patient",patient:e},t)):Promise.resolve(null)},T=function(e){return function(t){return 0===e?Ke:t.lift(new qe(e))}},I=function(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Ge(e,t))}},R=function(e,t,n){var r=null!=n?n:Ye;return g("/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(r),{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(T(1)).pipe(I((function(e){return e})))},D=function(e,t){return g("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},L=function(e,t,n){return g("/ws/rest/v1/visit/".concat(e),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},M=function(e){return{uuid:e.uuid,display:e.display,name:e.name}},N=function(){return g("/ws/rest/v1/visittype").pipe(I((function(e){return e.data.results.map(M)}))).pipe(T(1))},U=function(e){return{uuid:e.uuid,display:e.display}},B=function(){return g("/ws/rest/v1/location").pipe(I((function(e){return e.data.results.map(U)}))).pipe(T(1))};c.r(s),c.d(s,{OpenmrsFetchError:function(){return $e},VisitMode:function(){return Le},VisitStatus:function(){return Me},backendDependencies:function(){return Xe},clearCurrentUser:function(){return O},defaultVisitCustomRepresentation:function(){return Ye},fetchCurrentPatient:function(){return A},fhir:function(){return Ae},fhirBaseUrl:function(){return Pe},getCurrentUser:function(){return _},getLocations:function(){return B},getLoggedInUser:function(){return k},getSessionLocation:function(){return j},getSessionStore:function(){return x},getStartedVisit:function(){return Je},getVisitTypes:function(){return N},getVisitsForPatient:function(){return R},makeUrl:function(){return y},openmrsFetch:function(){return m},openmrsObservableFetch:function(){return g},refetchCurrentUser:function(){return S},saveVisit:function(){return D},sessionEndpoint:function(){return Ce},setSessionLocation:function(){return C},setupApiModule:function(){return $},toLocationObject:function(){return U},toVisitTypeObject:function(){return M},updateVisit:function(){return L},userHasAccess:function(){return E}});var z,F,V,H,W,K=c(602),q=c.n(K),Z=function(e,t){return(Z=Object.setPrototypeOf||r({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},G=!1,Q={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,G=e},get useDeprecatedSynchronousErrorHandling(){return G}},Y={closed:!0,next:function(e){},error:function(e){if(Q.useDeprecatedSynchronousErrorHandling)throw e;i(e)},complete:function(){}},J=Array.isArray||function(e){return e&&"number"==typeof e.length},X=(z=function(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this},z.prototype=Object.create(Error.prototype),z),ee=function(){var e,n=function(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)};return n.prototype.unsubscribe=function(){var e;if(!this.closed){var o,i=this,u=i._parentOrParents,c=i._ctorUnsubscribe,s=i._unsubscribe,l=i._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r(u,n))u.remove(this);else if(null!==u)for(var f=0;f<u.length;++f)u[f].remove(this);if(t(s)){c&&(this._unsubscribe=void 0);try{s.call(this)}catch(t){e=r(t,X)?a(t.errors):[t]}}if(J(l)){f=-1;for(var p=l.length;++f<p;){var d=l[f];if(null!==(o=d)&&"object"==typeof o)try{d.unsubscribe()}catch(t){e=e||[],r(t,X)?e=e.concat(a(t.errors)):e.push(t)}}}if(e)throw new X(e)}},n.prototype.add=function(e){var t=e;if(!e)return n.EMPTY;switch(void 0===e?"undefined":o(e)){case"function":t=new n(e);case"object":if(t===this||t.closed||"function"!=typeof t.unsubscribe)return t;if(this.closed)return t.unsubscribe(),t;if(!r(t,n)){var i=t;(t=new n)._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var a=t._parentOrParents;if(null===a)t._parentOrParents=this;else if(r(a,n)){if(a===this)return t;t._parentOrParents=[a,this]}else{if(-1!==a.indexOf(this))return t;a.push(this)}var u=this._subscriptions;return null===u?this._subscriptions=[t]:u.push(t),t},n.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},n.EMPTY=((e=new n).closed=!0,e),n}(),te="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),ne=function(t){function n(e,o,i){var a=t.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=Y;break;case 1:if(!e){a.destination=Y;break}if("object"==typeof e){r(e,n)?(a.syncErrorThrowable=e.syncErrorThrowable,a.destination=e,e.add(a)):(a.syncErrorThrowable=!0,a.destination=new re(a,e));break}default:a.syncErrorThrowable=!0,a.destination=new re(a,e,o,i)}return a}return e(n,t),n.prototype[te]=function(){return this},n.create=function(e,t,r){var o=new n(e,t,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},n}(ee),re=(V=function(e,n,r,o){var i,a=F.call(this)||this;a._parentSubscriber=e;var u=a;return t(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==Y&&(t((u=Object.create(n)).unsubscribe)&&a.add(u.unsubscribe.bind(u)),u.unsubscribe=a.unsubscribe.bind(a))),a._context=u,a._next=i,a._error=r,a._complete=o,a},e(V,F=ne),V.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;Q.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},V.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=Q.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):i(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;i(e)}}},V.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};Q.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},V.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),Q.useDeprecatedSynchronousErrorHandling)throw e;i(e)}},V.prototype.__tryOrSetError=function(e,t,n){if(!Q.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return Q.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(i(t),!0)}return!1},V.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},V),oe="function"==typeof Symbol&&Symbol.observable||"@@observable",ie=function(){var e=function(e){this._isScalar=!1,e&&(this._subscribe=e)};return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var o=this.operator,i=function(e,t,n){if(e){if(r(e,ne))return e;if(e[te])return e[te]()}return e||t||n?new ne(e,t,n):new ne(Y)}(e,t,n);if(o?i.add(o.call(i,this.source)):i.add(this.source||Q.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),Q.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){Q.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,o=t.destination,i=t.isStopped;if(n||i)return!1;e=o&&r(o,ne)?o:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=f(t))((function(t,r){var o;o=n.subscribe((function(t){try{e(t)}catch(e){r(e),o&&o.unsubscribe()}}),r,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[oe]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:l(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=f(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}(),ae="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ue="object"==typeof self&&self&&self.Object===Object&&self,ce=(ae||ue||Function("return this")()).Symbol,se=Object.prototype,le=se.hasOwnProperty,fe=se.toString,pe=ce?ce.toStringTag:void 0,de=Object.prototype.toString,he=ce?ce.toStringTag:void 0,ve=(H=Object.getPrototypeOf,W=Object,function(e){return H(W(e))}),ye=Function.prototype,me=Object.prototype,ge=ye.toString,be=me.hasOwnProperty,we=ge.call(Object),_e=function(e){if(null==(t=e)||"object"!=typeof t||"[object Object]"!=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":he&&he in Object(e)?function(e){var t=le.call(e,pe),n=e[pe];try{e[pe]=void 0;var r=!0}catch(e){}var o=fe.call(e);return r&&(t?e[pe]=n:delete e[pe]),o}(e):(t=e,de.call(t));var t}(e))return!1;var t,n=ve(e);if(null===n)return!0;var o=be.call(n,"constructor")&&n.constructor;return"function"==typeof o&&r(o,o)&&ge.call(o)==we},xe=c(824);function Se(e,t,n){return Se=h()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Ee(o,n.prototype),o},Se.apply(null,arguments)}function Oe(e){return(Oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ee(e,t){return(Ee=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ke=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":o(e)};function je(e){var t="function"==typeof Map?new Map:void 0;return je=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Se(e,arguments,Oe(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ee(r,e)},je(e)}var Ce="/ws/rest/v1/session",$e=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ee(e,t)}(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Oe(t);if(n){var o=Oe(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return v(this,e)});function i(e,t,n,a){var u;return function(e,t){if(!r(e,t))throw new TypeError("Cannot call a class as a function")}(this,i),(u=o.call(this)).message="Server responded with ".concat(t.status," (").concat(t.statusText,") for url ").concat(e,". Check err.responseBody or network tab in dev tools for more info"),a.message=u.message,u.responseBody=n,u.response=t,u.stack="Stacktrace for outgoing request:\n".concat(a.stack,"\nStacktrace for incoming response:\n").concat(u.stack),u}return i}(je(Error)),Pe="/ws/fhir2/R4",Ae=c(256)({baseUrl:Pe},{http:function(e){return m(e.url,{method:e.method,headers:e.headers}).then((function(t){return{status:t.status,headers:t.headers,data:t.data,config:e}}),(function(t){return{status:t.response.status,headers:t.response.headers,data:t.responseBody,config:e}}))}}),Te=c(254),Ie=(0,c(385).createGlobalStore)("session",{loaded:!1,session:null}),Re=0;function De(){return(De=w(q().mark((function e(t,n){return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m(Ce,{method:"POST",body:{sessionLocation:t},headers:{"Content-Type":"application/json"},signal:n.signal});case 2:S();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Le,Me,Ne,Ue=function(){var e=function(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this};return e.prototype=Object.create(Error.prototype),e}(),Be=function(t){var n=function(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r};return e(n,t),n.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},n}(ee),ze=function(t){var n=function(e){var n=t.call(this,e)||this;return n.destination=e,n};return e(n,t),n}(ne),Fe=function(t){var n=function(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e};return e(n,t),n.prototype[te]=function(){return new ze(this)},n.prototype.lift=function(e){var t=new Ve(this,this);return t.operator=e,t},n.prototype.next=function(e){if(this.closed)throw new Ue;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},n.prototype.error=function(e){if(this.closed)throw new Ue;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].error(e);this.observers.length=0},n.prototype.complete=function(){if(this.closed)throw new Ue;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},n.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},n.prototype._trySubscribe=function(e){if(this.closed)throw new Ue;return t.prototype._trySubscribe.call(this,e)},n.prototype._subscribe=function(e){if(this.closed)throw new Ue;return this.hasError?(e.error(this.thrownError),ee.EMPTY):this.isStopped?(e.complete(),ee.EMPTY):(this.observers.push(e),new Be(this,e))},n.prototype.asObservable=function(){var e=new ie;return e.source=this,e},n.create=function(e,t){return new Ve(e,t)},n}(ie),Ve=function(t){var n=function(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r};return e(n,t),n.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},n.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},n.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},n.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):ee.EMPTY},n}(Fe),He=function(t){var n=function(e){var n=t.call(this)||this;return n._value=e,n};return e(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),n.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},n.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Ue;return this._value},n.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},n}(Fe),We=function(){var e=function(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this};return e.prototype=Object.create(Error.prototype),e}(),Ke=new ie((function(e){return e.complete()})),qe=function(){var e=function(e){if(this.total=e,this.total<0)throw new We};return e.prototype.call=function(e,t){return t.subscribe(new Ze(e,this.total))},e}(),Ze=function(t){var n=function(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r};return e(n,t),n.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},n}(ne),Ge=function(){var e=function(e,t){this.project=e,this.thisArg=t};return e.prototype.call=function(e,t){return t.subscribe(new Qe(e,this.project,this.thisArg))},e}(),Qe=function(t){var n=function(e,n,r){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=r||o,o};return e(n,t),n.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},n}(ne),Ye="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,value),location:(uuid,name,display),startDatetime,stopDatetime)",Je=new He(null);(Ne=Le||(Le={})).NEWVISIT="startVisit",Ne.EDITVISIT="editVisit",Ne.LOADING="loadingVisit",function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(Me||(Me={}));var Xe={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),s}())}}}))},810:()=>{function e(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}System.register(["@openmrs/esm-state"],(function(t,n){var r={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore}],execute:function(){t(function(){var t={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},685:function(e){"use strict";e.exports=r}},o={};function i(e){var n=o[e];if(void 0!==n)return n.exports;var r=o[e]={exports:{}};return t[e](r,r.exports,i),r.exports}i.y=n,i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e}();var a={};return(0,i(968).s)(1),function(){"use strict";var t=function(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")},n=function(e){return e&&e.sensitive?"":"i"},r=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},o=function(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},u=function(t){return n=t.matcher,(null!=(r=RegExp)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):e(n,r))?t.matcher:"string"==typeof t.matcher?h(t.matcher):h(t.path);var n,r},c=function(e){return s([e])},s=function(e){var t=l(),n=e.map((function(e){return{matcher:u(e),settings:e}})),r=o(t).concat(o(n));v.setState(r,!0)},l=function(){return v.getState()},f=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},p=function(e,t){if(e.length>0){var n=y(e,t);if(n){for(var r=[n],o=y(e,n.settings.parent);void 0!==o;)r.push(o),o=y(e,o.settings.parent);return r.reverse()}}return[]},d=function(e){return p(l(),e)};function h(r,o,i){return e(r,RegExp)?function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return e}(r,o):Array.isArray(r)?(c=o,s=i,l=r.map((function(e){return h(e,c,s).source})),new RegExp("(?:"+l.join("|")+")",n(s))):(a=o,function(e,r,o){void 0===o&&(o={});for(var i=o.strict,a=void 0!==i&&i,u=o.start,c=void 0===u||u,s=o.end,l=void 0===s||s,f=o.encode,p=void 0===f?function(e){return e}:f,d="["+t(o.endsWith||"")+"]|$",h="["+t(o.delimiter||"/#?")+"]",v=c?"^":"",y=0,m=e;y<m.length;y++){var g=m[y];if("string"==typeof g)v+=t(p(g));else{var b=t(p(g.prefix)),w=t(p(g.suffix));if(g.pattern)if(r&&r.push(g),b||w)if("+"===g.modifier||"*"===g.modifier){var _="*"===g.modifier?"?":"";v+="(?:"+b+"((?:"+g.pattern+")(?:"+w+b+"(?:"+g.pattern+"))*)"+w+")"+_}else v+="(?:"+b+"("+g.pattern+")"+w+")"+g.modifier;else v+="("+g.pattern+")"+g.modifier;else v+="(?:"+b+w+")"+g.modifier}}if(l)a||(v+=h+"?"),v+=o.endsWith?"(?="+d+")":"$";else{var x=e[e.length-1],S="string"==typeof x?h.indexOf(x[x.length-1])>-1:void 0===x;a||(v+="(?:"+h+"(?="+d+"))?"),S||(v+="(?="+h+"|"+d+")")}return new RegExp(v,n(o))}(function(e,n){void 0===n&&(n={});for(var r=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[u=n+1])throw new TypeError('Pattern cannot start with "?" at '+u);for(;u<e.length;)if("\\"!==e[u]){if(")"===e[u]){if(0==--o){u++;break}}else if("("===e[u]&&(o++,"?"!==e[u+1]))throw new TypeError("Capturing groups are not allowed at "+u);i+=e[u++]}else i+=e[u++]+e[u++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=u}else{for(var a="",u=n+1;u<e.length;){var c=e.charCodeAt(u);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;a+=e[u++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=u}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),o=n.prefixes,i=void 0===o?"./":o,a="[^"+t(n.delimiter||"/#?")+"]+?",u=[],c=0,s=0,l="",f=function(e){if(s<r.length&&r[s].type===e)return r[s++].value},p=function(e){var t=f(e);if(void 0!==t)return t;var n=r[s],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},d=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};s<r.length;){var h=f("CHAR"),v=f("NAME"),y=f("PATTERN");if(v||y){var m=h||"";-1===i.indexOf(m)&&(l+=m,m=""),l&&(u.push(l),l=""),u.push({name:v||c++,prefix:m,suffix:"",pattern:y||a,modifier:f("MODIFIER")||""})}else{var g=h||f("ESCAPED_CHAR");if(g)l+=g;else if(l&&(u.push(l),l=""),f("OPEN")){m=d();var b=f("NAME")||"",w=f("PATTERN")||"",_=d();p("CLOSE"),u.push({name:b||(w?c++:""),pattern:b&&!w?a:w,prefix:m,suffix:_,modifier:f("MODIFIER")||""})}else p("END")}}return u}(r,u=i),a,u));var a,u,c,s,l}i.r(a),i.d(a,{filterBreadcrumbs:function(){return p},getBreadcrumbs:function(){return l},getBreadcrumbsFor:function(){return d},registerBreadcrumb:function(){return c},registerBreadcrumbs:function(){return s}});var v=(0,i(685).createGlobalStore)("breadcrumbs",[]);function y(e,t){if(t)return n=t,(r=e.filter((function(e){return e.matcher.test(n)})),function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),1!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(r)||function(e,t){if(e){if("string"==typeof e)return f(e,1);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,1):void 0}}(r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0]||function(e,t){for(var n=t.split("/");n.length>1;){n.pop();var r=y(e,n.join("/"));if(r)return r}}(e,t);var n,r}}(),a}())}}}))},347:()=>{var e=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};System.register(["@openmrs/esm-state","single-spa"],(function(t,n){var r={},o={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore,r.getGlobalStore=e.getGlobalStore},function(e){o.navigateToUrl=e.navigateToUrl}],execute:function(){t(function(){"use strict";var t={685:function(e){e.exports=r},645:function(e){e.exports=o}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){var t=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},n=function(e){return function n(r){return 0===arguments.length||t(r)?n:e.apply(this,arguments)}},r=function(e){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return t(o)?r:n((function(t){return e(o,t)}));default:return t(o)&&t(i)?r:t(o)?n((function(t){return e(t,i)})):t(i)?n((function(t){return e(o,t)})):e(o,i)}}},o=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},u=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},c=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},s=function(e,t,n,r){var i=o(e);function a(e,t){return se(e,t,n.slice(),r.slice())}return!u((function(e,t){return!u(a,t,e)}),o(t),i)},l=function(e){return function o(i,a,u){switch(arguments.length){case 0:return o;case 1:return t(i)?o:r((function(t,n){return e(i,t,n)}));case 2:return t(i)&&t(a)?o:t(i)?r((function(t,n){return e(t,a,n)})):t(a)?r((function(t,n){return e(i,t,n)})):n((function(t){return e(i,a,t)}));default:return t(i)&&t(a)&&t(u)?o:t(i)&&t(a)?r((function(t,n){return e(t,n,u)})):t(i)&&t(u)?r((function(t,n){return e(t,a,n)})):t(a)&&t(u)?r((function(t,n){return e(i,t,n)})):t(i)?n((function(t){return e(t,a,u)})):t(a)?n((function(t){return e(i,t,u)})):t(u)?n((function(t){return e(i,a,t)})):e(i,a,u)}}},f=function(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)},p=function(e,t,n,r){return e["@@transducer/result"](n[r](be(e["@@transducer/step"],e),t))},d=function(e){return"[object Object]"===Object.prototype.toString.call(e)},h=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},v=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}},y=function(e){return(0,Ae.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1})},m=function(){return(0,Ae.getGlobalStore)("config-extension-slots",{slots:{}})},g=function(e){return b(m().getState(),e)},b=function(e,t){var n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}},w=function(){return(0,Ae.getGlobalStore)("config-extensions",{configs:{}})},_=function(e,t){return x(w().getState(),e,t)},x=function(e,t,n){var r,o=null===(r=e.configs[t])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},S=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},O=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},E=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){O(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},k=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||C(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},j=function(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||C(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},C=function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}},$=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,c=z(u,e,t);y(u).setState({loaded:!0,config:c})}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},P=function(e,t){var n,r,o=(n=V(B(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=k(o.value,2),u=a[0],c=a[1],s=!0,l=!1,f=void 0;try{for(var p,d=Object.entries(c)[Symbol.iterator]();!(s=(p=d.next()).done);s=!0){var h=k(p.value,2),v=h[0];U(h[1],u,v)}}catch(e){l=!0,f=e}finally{try{s||null==d.return||d.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return E({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=k(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=m(),u=a.getState(),c={slots:E({},u.slots,i)};le(u,c)||a.setState(c)},A=function(e,t){var n=function(e,t){var n=Ne(he(e.schemas)),r=j(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,c=r[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=k(u.value,2);n=V([n,Ue(s[0],s[1])])}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t);Me.setState({config:n})},T=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=t.mountedExtensions[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=u.value,l=N(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,e,n);r[s.slotName]=E({},r[s.slotName],O({},s.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}w().setState({configs:r})},I=function(e,t){Be(e,t);var n=Ie.getState();Ie.setState({schemas:E({},n.schemas,O({},e,t))})},R=function(e,t){Be(e,t);var n=Ie.getState();n.schemas[e]&&console.warn("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),Ie.setState({schemas:E({},n.schemas,O({},e,t))})},D=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Ie.getState();Ie.setState({providedConfigs:j(n.providedConfigs).concat([{source:t,config:e}])})},L=function(e){return new Promise((function(t){var n=function(e){e.loaded&&e.config&&(t(e.config),o&&o())},r=y(e);n(r.getState());var o=r.subscribe(n)}))},M=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];H(e,t,n);var o=Ve(e,t,r);return Fe(e,o,n),o},N=function(e,t,n,r,o,i){var a,u,c,s,l=k(r.split("#"),1)[0],f=o.schemas[l],p=f?l:t,d=B(o,i),h=F(e,d),v=null!==(s=null==h||null===(a=h.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(c=u.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=V([F(p,d),v]),m=null!=f?f:o.schemas[t];H(m,y,p);var g=Ve(m,y,o.devDefaultsAreOn);return Fe(m,g,p),delete g.extensionSlots,g},U=function(e,t,n){var r="Extension slot config '".concat(t,".extensionSlots.").concat(n),o=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Z(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},B=function(e,t){return j(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},z=function(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);var r=t.schemas[e],o=F(e,B(t,n));H(r,o,e);var i=Ve(r,o,t.devDefaultsAreOn);return Fe(r,i,e),delete i.extensionSlots,i},F=function(e,t){return V(t.map((function(t){return t[e]})).filter((function(e){return!!e})))},V=function(e){return _e(Oe)({},e)},H=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e.hasOwnProperty(c)?ze(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},W=function(e,t,n){t&&K(e,[{Array:Ee,Boolean:ke,ConceptUuid:Pe,Number:je,Object:$e,String:Ce,UUID:Pe,PersonAttributeTypeUuid:Pe,PatientIdentifierTypeUuid:Pe}[t]],n)},K=function(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=(0,a.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(e,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(e,": ").concat(c)))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}},q=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},Z=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},G=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Q=function(e,t){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return Y(e,function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){G(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},t)).replace(/^\/\//,"/")},Y=function(e,t){return Object.keys(t).reduce((function(e,n){return e.split("${"+n+"}").join(t[n])}),e)},J=function(e){var t=e.to,n=e.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=Q(t,n);o.startsWith(r)?(0,He.navigateToUrl)(o):window.location.assign(o)};i.r(a),i.d(a,{Type:function(){return pe},configExtensionStore:function(){return Le},configInternalStore:function(){return Ie},defineConfigSchema:function(){return I},defineExtensionConfigSchema:function(){return R},getConfig:function(){return L},getConfigStore:function(){return y},getExtensionConfig:function(){return _},getExtensionConfigFromStore:function(){return x},getExtensionSlotConfig:function(){return g},getExtensionSlotConfigFromStore:function(){return b},getExtensionSlotsConfigStore:function(){return m},getExtensionsConfigStore:function(){return w},implementerToolsConfigStore:function(){return Me},inRange:function(){return We},interpolateString:function(){return Y},interpolateUrl:function(){return Q},isUrl:function(){return qe},isUrlWithTemplateParameters:function(){return Ke},navigate:function(){return J},oneOf:function(){return Ze},processConfig:function(){return M},provide:function(){return D},temporaryConfigStore:function(){return De},validator:function(){return h},validators:function(){return Ge}});var X="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},ee=Object.prototype.toString,te=function(){return"[object Arguments]"===ee.call(arguments)?function(e){return"[object Arguments]"===ee.call(e)}:function(e){return c("callee",e)}}(),ne=te,re=!{toString:null}.propertyIsEnumerable("toString"),oe=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ie=function(){return arguments.propertyIsEnumerable("length")}(),ae=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},ue="function"!=typeof Object.keys||ie?n((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=ie&&ne(e);for(t in e)!c(t,e)||o&&"length"===t||(r[r.length]=t);if(re)for(n=oe.length-1;n>=0;)c(t=oe[n],e)&&!ae(r,t)&&(r[r.length]=t),n-=1;return r})):n((function(e){return Object(e)!==e?[]:Object.keys(e)})),ce=n((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function se(t,n,r,o){if(X(t,n))return!0;var i,a,u=ce(t);if(u!==ce(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(u){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===(i=t.constructor,null==(a=String(i).match(/^function (\w*)/))?"":a[1]))return t===n;break;case"Boolean":case"Number":case"String":if((void 0===t?"undefined":e(t))!=(void 0===n?"undefined":e(n))||!X(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!X(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===t)return o[l]===n;l-=1}switch(u){case"Map":return t.size===n.size&&s(t.entries(),n.entries(),r.concat([t]),o.concat([n]));case"Set":return t.size===n.size&&s(t.values(),n.values(),r.concat([t]),o.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=ue(t);if(f.length!==ue(n).length)return!1;var p=r.concat([t]),d=o.concat([n]);for(l=f.length-1;l>=0;){var h=f[l];if(!c(h,n)||!se(n[h],t[h],p,d))return!1;l-=1}return!0}var le=r((function(e,t){return se(e,t,[],[])}));function fe(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var u in t[a+1]=e,n[a+1]=o,e)o[u]=r?fe(e[u],t,n,!0):e[u];return o};switch(ce(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}var pe,de,he=n((function(e){return null!=e&&"function"==typeof e.clone?e.clone():fe(e,[],[],!0)})),ve=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},ye=n((function(e){return!!ve(e)||!!e&&"object"==typeof e&&(t=e,!("[object String]"===Object.prototype.toString.call(t)))&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1));var t})),me=function(){var e=function(e){this.f=e};return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),ge=r((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,c){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,c,s){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,c,s,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))})),be=ge,we="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",_e=l((function(e,t,n){if("function"==typeof e&&(e=new me(e)),ye(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return p(e,t,n,"fantasy-land/reduce");if(null!=n[we])return f(e,t,n[we]());if("function"==typeof n.next)return f(e,t,n);if("function"==typeof n.reduce)return p(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),xe=l((function(e,t,n){var r,o={};for(r in t)c(r,t)&&(o[r]=c(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)c(r,n)&&!c(r,o)&&(o[r]=n[r]);return o})),Se=l((function e(t,n,r){return xe((function(n,r,o){return d(r)&&d(o)?e(t,r,o):t(n,r,o)}),n,r)})),Oe=r((function(e,t){return Se((function(e,t,n){return n}),e,t)}));(de=pe||(pe={})).Array="Array",de.Boolean="Boolean",de.ConceptUuid="ConceptUuid",de.Number="Number",de.Object="Object",de.String="String",de.UUID="UUID",de.PersonAttributeTypeUuid="PersonAttributeTypeUuid",de.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var Ee=h((function(e){return Array.isArray(e)}),"must be an array"),ke=h((function(e){return"boolean"==typeof e}),"must be a boolean"),je=h((function(e){return"number"==typeof e}),"must be a number"),Ce=h((function(e){return"string"==typeof e}),"must be a string"),$e=h((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),Pe=h((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),Ae=i(685),Te={providedConfigs:[],schemas:{},devDefaultsAreOn:v()},Ie=(0,Ae.createGlobalStore)("config-internal",Te),Re=v();Ie.subscribe((function(e){var t;e.devDefaultsAreOn!=Re&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),Re=e.devDefaultsAreOn)}));var De=(0,Ae.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});De.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var Le=(0,Ae.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Me=(0,Ae.createGlobalStore)("config-implementer-tools",{config:{}});function Ne(e){return e.hasOwnProperty("_default")?E({},e,{_value:e._default,_source:"default"}):Z(e)?Object.keys(e).reduce((function(t,n){return t[n]=Ne(e[n]),t}),{}):{}}function Ue(e,t){return Z(e)?Object.keys(e).reduce((function(n,r){return n[r]=Ue(e[r],t),n}),{}):{_value:e,_source:t}}function Be(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var u,c=function(o,i){var a=i.value,u=n+(n&&".")+a,c=t[a];if(!Z(c))return console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r)),"continue";c.hasOwnProperty("_default")||Be(e,c,u);var s=c._elements;if(q(s)&&Be(e,s,u+"._elements"),c._validators){var l=!0,f=!1,p=void 0;try{for(var d,h=c._validators[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var v=d.value;"function"!=typeof v&&console.error("".concat(e," has invalid validator for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(e){f=!0,p=e}finally{try{l||null==h.return||h.return()}finally{if(f)throw p}}}var y=c._type;y&&!Object.values(pe).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(pe).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(c).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(c))),s&&y&&![pe.Array,pe.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},s=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(s,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}}function ze(e,t,n){W(n,e._type,t),Z(t)?e._type===pe.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c];H(e._elements,s,"".concat(n,".").concat(c))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||H(e,t,n):e._type===pe.Array&&function(e,t,n){if(q(e._elements))for(var r=0;r<t.length;r++)ze(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;W("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}(e,t,n)}function Fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&K(n,e._validators,t),Z(t)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e._type===pe.Object&&e._elements?Fe(e._elements,s,l):Fe(f,s,l)}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var p=0;p<t.length;p++)Fe(e._elements,t[p],"".concat(n,"[").concat(p,"]"))}$(Ie.getState(),De.getState()),Ie.subscribe((function(e){return $(e,De.getState())})),De.subscribe((function(e){return $(Ie.getState(),e)})),A(Ie.getState(),De.getState()),Ie.subscribe((function(e){return A(e,De.getState())})),De.subscribe((function(e){return A(Ie.getState(),e)})),P(Ie.getState(),De.getState()),Ie.subscribe((function(e){return P(e,De.getState())})),De.subscribe((function(e){return P(Ie.getState(),e)})),T(Ie.getState(),Le.getState(),De.getState()),Ie.subscribe((function(e){T(e,Le.getState(),De.getState())})),Le.subscribe((function(e){T(Ie.getState(),e,De.getState())})),De.subscribe((function(e){T(Ie.getState(),Le.getState(),e)}));var Ve=function(e,t,n){var r=he(t);if(!e)return r;var o=!0,i=!1,a=void 0;try{for(var u,c=function(t,o){var i=o.value,a=r[i],u=e[i];if(u&&u.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=u._devDefault||u._default;r[i]=n?c:u._default}var s=u._elements;if(a&&q(s))if(u._type===pe.Array&&Array.isArray(a)){var l=a.map((function(e){return Ve(s,e,n)}));r[i]=l}else if(u._type===pe.Object){var f=!0,p=!1,d=void 0;try{for(var h,v=Object.keys(a)[Symbol.iterator]();!(f=(h=v.next()).done);f=!0){var y=h.value;a[y]=Ve(s,a[y],n)}}catch(e){p=!0,d=e}finally{try{f||null==v.return||v.return()}finally{if(p)throw d}}}}else if(Z(u)){var m=r.hasOwnProperty(i)?a:{};Z(m)&&(r[i]=Ve(u,m,n))}},s=Object.keys(e)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(0,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return r},He=i(645),We=function(e,t){return h((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},Ke=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return h((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+t.map((function(e){return"${"+e+"}"})).join(", "))},qe=Ke([]),Ze=function(e){return h((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},Ge={inRange:We,isUrl:qe,isUrlWithTemplateParameters:Ke,oneOf:Ze}}(),a}())}}}))},708:()=>{System.register(["@openmrs/esm-globals"],(function(e,t){var n={};return{setters:[function(e){n.dispatchNotificationShown=e.dispatchNotificationShown}],execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},728:function(e){"use strict";e.exports=n}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.y=t,o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e}();var i={};return(0,o(968).s)(1),function(){"use strict";var e=function(e){var t=n(e);setTimeout((function(){throw t}))},t=function(){var t=Error();return function(r){n(r).stack+="\nAsync stacktrace:\n".concat(t.stack),e(r)}},n=function(e){var t,n,r,o,i;if(n=e,null!=(r=Error)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):(o=n,null!=(i=r)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):o instanceof i))return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t="Object thrown as error: ".concat(JSON.stringify(e))}catch(n){t="Object thrown as error with the following properties: ".concat(Object.keys(e))}return Error(t)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())};o.r(i),o.d(i,{createErrorHandler:function(){return t},reportError:function(){return e}});var r=o(728);window.onerror=function(){return(0,r.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."}),!1},window.onunhandledrejection=function(){(0,r.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."})}}(),i}())}}}))},547:(e,t,n)=>{function r(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}e=n.nmd(e);var o=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};System.register(["@openmrs/esm-config","@openmrs/esm-state","single-spa"],(function(i,a){var u={},c={},s={};return{setters:[function(e){u.configExtensionStore=e.configExtensionStore,u.getExtensionConfigFromStore=e.getExtensionConfigFromStore,u.getExtensionSlotConfig=e.getExtensionSlotConfig,u.getExtensionSlotConfigFromStore=e.getExtensionSlotConfigFromStore,u.getExtensionSlotsConfigStore=e.getExtensionSlotsConfigStore,u.getExtensionsConfigStore=e.getExtensionsConfigStore},function(e){c.createGlobalStore=e.createGlobalStore,c.getGlobalStore=e.getGlobalStore},function(e){s.mountRootParcel=e.mountRootParcel}],execute:function(){i(function(){var i={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:function(e){"use strict";e.exports=u},685:function(e){"use strict";e.exports=c},645:function(e){"use strict";e.exports=s}},l={};function f(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}};return i[e](n,n.exports,f),n.exports}f.y=a,f.d=function(e,t){for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;f.g.importScripts&&(e=f.g.location+"");var t=f.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),f.p=e}();var p={};return(0,f(968).s)(1),function(){"use strict";var i=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},a=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},u=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},c=function(e){var t=this.__data__=new W(e);this.size=t.size},s=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new xe;++t<n;)this.add(e[t])},l=function(e){var t=Dt.getState(),n=e(t);n!==t&&Dt.setState(n)},d=function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(e.extensions)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,c=!0,s=!1,l=void 0;try{for(var f,p=u.instances[Symbol.iterator]();!(c=(f=p.next()).done);c=!0){var d=f.value;t.push({slotModuleName:d.slotModuleName,extensionModuleName:u.moduleName,slotName:d.slotName,extensionId:d.id})}}catch(e){s=!0,l=e}finally{try{c||null==p.return||p.return()}finally{if(s)throw l}}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}Tt(It.configExtensionStore.getState().mountedExtensions,t)||It.configExtensionStore.setState({mountedExtensions:t})},h=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},v=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},y=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){v(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},m=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},g=function(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},b=function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}},w=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=Object.entries(e.slots)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=m(u.value,2),l=s[0],f=s[1],p=P(l,e,(0,It.getExtensionSlotConfigFromStore)(t,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:p}}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}Tt(Ut.getState().slots,r)||Ut.setState({slots:r})},_=function(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}},x=function(e){return m(e.split("#"),1)[0]},S=function(e,t){var n=x(t);return e.extensions[n]},O=function(e){return S(Nt.getState(),e)},E=function(e,t){l((function(n){var r=n.slots[e];return y({},n,r?{slots:y({},n.slots,v({},e,y({},r,{attachedIds:g(r.attachedIds).concat([t])})))}:{slots:y({},n.slots,v({},e,y({},_(e),{attachedIds:[t]})))})}))},k=function(e,t){l((function(n){var r=n.slots[e];return r&&r.attachedIds.includes(t)?y({},n,{slots:y({},n.slots,v({},e,y({},r,{attachedIds:r.attachedIds.filter((function(e){return e!==t}))})))}):n}))},j=function(e){l((function(t){var n=t.slots[e];return n?y({},t,{slots:y({},t.slots,v({},e,y({},n,{attachedIds:[]})))}):t}))},C=function(e,t,n,r){var o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(e);return-1!==i?2e3+i:-1},$=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null!=t?t:navigator.onLine;return e.filter((function(e){return I(n,e.online,e.offline)}))},P=function(e,t,n,r){var o,i,a,u,c,s,l=(o=n,i=t.slots[e].attachedIds,a=o.add||[],u=o.remove||[],c=o.order||[],s=Nt.getState().extensions,g(i).concat(g(a)).filter((function(e){return!u.includes(e)})).sort((function(e,t){var n,r,o=C(e,c,null===(n=s[x(e)])||void 0===n?void 0:n.order,i),a=C(t,c,null===(r=s[x(t)])||void 0===r?void 0:r.order,i);return-1===a?-1:-1===o?1:o-a}))),f=[],p=!0,d=!1,h=void 0;try{for(var v,y=l[Symbol.iterator]();!(p=(v=y.next()).done);p=!0){var m=v.value,b=(0,It.getExtensionConfigFromStore)(r,e,m).config,w=x(m),_=t.extensions[w];_&&f.push({id:m,name:w,moduleName:_.moduleName,config:b,meta:_.meta,online:_.online,offline:_.offline})}}catch(e){d=!0,h=e}finally{try{p||null==y.return||y.return()}finally{if(d)throw h}}return f},A=function(e){return P(e,Nt.getState(),(0,It.getExtensionSlotConfig)(e).config,zt.getState())},T=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=navigator.onLine;return I(n,e,t)},I=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(e?t:n)},R=function(e,t){var n=navigator.onLine?e:t;return"object"==typeof n?n:{}},D=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},L=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},M=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){L(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},N=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},U=function(e){return function(e){if(Array.isArray(e))return D(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},B=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(e){return e},i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=x(r),u=O(r),c=!0,s=null;if(e){if(!u)throw Error("Couldn't find extension '".concat(a,"' to attach to '").concat(t,"'"));var f=u.load,p=u.online,d=u.offline,h=u.meta,v=u.moduleName;T(p,d)&&(f().then((function(a){var u=a.default,l=N(a,["default"]);c&&(s=(0,Wt.mountRootParcel)(o(null!=u?u:l),M({},R(p,d),i,{_meta:h,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:v},domElement:e})))})),l((function(o){var i={domElement:e,id:r,slotName:t,slotModuleName:n};return M({},o,{extensions:M({},o.extensions,L({},a,M({},o.extensions[a],{instances:U(o.extensions[a].instances).concat([i])})))})})))}else console.warn("Tried to render ".concat(r," into ").concat(t," but no DOM element was available."));return function(){c=!1,s&&("MOUNTED"!==s.getStatus()?s.mountPromise.then((function(){s&&s.unmount()})):s.unmount())}};f.r(p),f.d(p,{attach:function(){return E},checkStatus:function(){return T},checkStatusFor:function(){return I},detach:function(){return k},detachAll:function(){return j},extensionStore:function(){return Kt},getAssignedExtensions:function(){return A},getConnectedExtensions:function(){return $},getCustomProps:function(){return R},getExtensionInternalStore:function(){return Lt},getExtensionNameFromId:function(){return x},getExtensionRegistration:function(){return O},getExtensionRegistrationFrom:function(){return S},getExtensionStore:function(){return Mt},registerExtension:function(){return Ft},registerExtensionSlot:function(){return Vt},renderExtension:function(){return B},reset:function(){return Ht},updateInternalExtensionStore:function(){return l}});var z=function(e,t){return e===t||e!=e&&t!=t},F=function(e,t){for(var n=e.length;n--;)if(z(e[n][0],t))return n;return-1},V=Array.prototype.splice;i.prototype.clear=function(){this.__data__=[],this.size=0},i.prototype.delete=function(e){var t=this.__data__,n=F(t,e);return!(n<0||(n==t.length-1?t.pop():V.call(t,n,1),--this.size,0))},i.prototype.get=function(e){var t=this.__data__,n=F(t,e);return n<0?void 0:t[n][1]},i.prototype.has=function(e){return F(this.__data__,e)>-1},i.prototype.set=function(e,t){var n=this.__data__,r=F(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var H,W=i,K="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,q="object"==typeof self&&self&&self.Object===Object&&self,Z=K||q||Function("return this")(),G=Z.Symbol,Q=Object.prototype,Y=Q.hasOwnProperty,J=Q.toString,X=G?G.toStringTag:void 0,ee=Object.prototype.toString,te=G?G.toStringTag:void 0,ne=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":te&&te in Object(e)?function(e){var t=Y.call(e,X),n=e[X];try{e[X]=void 0;var r=!0}catch(e){}var o=J.call(e);return r&&(t?e[X]=n:delete e[X]),o}(e):(t=e,ee.call(t));var t},re=function(e){var t=void 0===e?"undefined":o(e);return null!=e&&("object"==t||"function"==t)},oe=function(e){if(!re(e))return!1;var t=ne(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},ie=Z["__core-js_shared__"],ae=(H=/[^.]+$/.exec(ie&&ie.keys&&ie.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",ue=Function.prototype.toString,ce=function(e){if(null!=e){try{return ue.call(e)}catch(e){}try{return e+""}catch(e){}}return""},se=/^\[object .+?Constructor\]$/,le=Function.prototype,fe=Object.prototype,pe=le.toString,de=fe.hasOwnProperty,he=RegExp("^"+pe.call(de).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ve=function(e,t){var n,r=null==(n=e)?void 0:n[t];return function(e){return!(!re(e)||(t=e,ae&&ae in t))&&(oe(e)?he:se).test(ce(e));var t}(r)?r:void 0},ye=ve(Z,"Map"),me=ve(Object,"create"),ge=Object.prototype.hasOwnProperty,be=Object.prototype.hasOwnProperty;a.prototype.clear=function(){this.__data__=me?me(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},a.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ge.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:be.call(t,e)},a.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=me&&void 0===t?"__lodash_hash_undefined__":t,this};var we=a,_e=function(e,t){var n,r,i=e.__data__;return("string"==(r=o(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};u.prototype.clear=function(){this.size=0,this.__data__={hash:new we,map:new(ye||W),string:new we}},u.prototype.delete=function(e){var t=_e(this,e).delete(e);return this.size-=t?1:0,t},u.prototype.get=function(e){return _e(this,e).get(e)},u.prototype.has=function(e){return _e(this,e).has(e)},u.prototype.set=function(e,t){var n=_e(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var xe=u;c.prototype.clear=function(){this.__data__=new W,this.size=0},c.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},c.prototype.get=function(e){return this.__data__.get(e)},c.prototype.has=function(e){return this.__data__.has(e)},c.prototype.set=function(e,t){var n=this.__data__;if(r(n,W)){var o=n.__data__;if(!ye||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new xe(o)}return n.set(e,t),this.size=n.size,this};var Se=c;s.prototype.add=s.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},s.prototype.has=function(e){return this.__data__.has(e)};var Oe=s,Ee=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},ke=function(e,t,n,r,o,i){var a=1&n,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(e),l=i.get(t);if(s&&l)return s==t&&l==e;var f=-1,p=!0,d=2&n?new Oe:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var h=e[f],v=t[f];if(r)var y=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==y){if(y)continue;p=!1;break}if(d){if(!Ee(t,(function(e,t){if(a=t,!d.has(a)&&(h===e||o(h,e,n,r,i)))return d.push(t);var a}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p},je=Z.Uint8Array,Ce=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},$e=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Pe=G?G.prototype:void 0,Ae=Pe?Pe.valueOf:void 0,Te=Array.isArray,Ie=Object.prototype.propertyIsEnumerable,Re=Object.getOwnPropertySymbols,De=Re?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(Re(e),(function(t){return Ie.call(e,t)})))}:function(){return[]},Le=function(e){return null!=e&&"object"==typeof e},Me=function(e){return Le(e)&&"[object Arguments]"==ne(e)},Ne=Object.prototype,Ue=Ne.hasOwnProperty,Be=Ne.propertyIsEnumerable,ze=Me(function(){return arguments}())?Me:function(e){return Le(e)&&Ue.call(e,"callee")&&!Be.call(e,"callee")},Fe=ze,Ve=t&&!t.nodeType&&t,He=Ve&&e&&!e.nodeType&&e,We=He&&He.exports===Ve?Z.Buffer:void 0,Ke=(We?We.isBuffer:void 0)||function(){return!1},qe=/^(?:0|[1-9]\d*)$/,Ze=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Ge={};Ge["[object Float32Array]"]=Ge["[object Float64Array]"]=Ge["[object Int8Array]"]=Ge["[object Int16Array]"]=Ge["[object Int32Array]"]=Ge["[object Uint8Array]"]=Ge["[object Uint8ClampedArray]"]=Ge["[object Uint16Array]"]=Ge["[object Uint32Array]"]=!0,Ge["[object Arguments]"]=Ge["[object Array]"]=Ge["[object ArrayBuffer]"]=Ge["[object Boolean]"]=Ge["[object DataView]"]=Ge["[object Date]"]=Ge["[object Error]"]=Ge["[object Function]"]=Ge["[object Map]"]=Ge["[object Number]"]=Ge["[object Object]"]=Ge["[object RegExp]"]=Ge["[object Set]"]=Ge["[object String]"]=Ge["[object WeakMap]"]=!1;var Qe,Ye,Je,Xe=t&&!t.nodeType&&t,et=Xe&&e&&!e.nodeType&&e,tt=et&&et.exports===Xe&&K.process,nt=function(){try{return et&&et.require&&et.require("util").types||tt&&tt.binding&&tt.binding("util")}catch(e){}}(),rt=nt&&nt.isTypedArray,ot=rt?(Qe=rt,function(e){return Qe(e)}):function(e){return Le(e)&&Ze(e.length)&&!!Ge[ne(e)]},it=Object.prototype.hasOwnProperty,at=Object.prototype,ut=(Ye=Object.keys,Je=Object,function(e){return Ye(Je(e))}),ct=Object.prototype.hasOwnProperty,st=function(e){return n=De,r=function(e){return null!=(t=e)&&Ze(t.length)&&!oe(t)?function(e,t){var n,r,i,a=Te(e),u=!a&&Fe(e),c=!a&&!u&&Ke(e),s=!a&&!u&&!c&&ot(e),l=a||u||c||s,f=l?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],p=f.length;for(var d in e)!it.call(e,d)||l&&("length"==d||c&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||(r=p,i=void 0===(n=d)?"undefined":o(n),(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&qe.test(n))&&n>-1&&n%1==0&&n<r))||f.push(d);return f}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||at))return ut(e);var t,n,r=[];for(var o in Object(e))ct.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t}(t=e),Te(t)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(t));var t,n,r},lt=Object.prototype.hasOwnProperty,ft=ve(Z,"DataView"),pt=ve(Z,"Promise"),dt=ve(Z,"Set"),ht=ve(Z,"WeakMap"),vt="[object Map]",yt="[object Promise]",mt="[object Set]",gt="[object WeakMap]",bt="[object DataView]",wt=ce(ft),_t=ce(ye),xt=ce(pt),St=ce(dt),Ot=ce(ht),Et=ne;(ft&&Et(new ft(new ArrayBuffer(1)))!=bt||ye&&Et(new ye)!=vt||pt&&Et(pt.resolve())!=yt||dt&&Et(new dt)!=mt||ht&&Et(new ht)!=gt)&&(Et=function(e){var t=ne(e),n="[object Object]"==t?e.constructor:void 0,r=n?ce(n):"";if(r)switch(r){case wt:return bt;case _t:return vt;case xt:return yt;case St:return mt;case Ot:return gt}return t});var kt=Et,jt="[object Arguments]",Ct="[object Array]",$t="[object Object]",Pt=Object.prototype.hasOwnProperty,At=function e(t,n,o,i,a){return t===n||(null==t||null==n||!Le(t)&&!Le(n)?t!=t&&n!=n:function(e,t,n,o,i,a){var u=Te(e),c=Te(t),s=u?Ct:kt(e),l=c?Ct:kt(t),f=(s=s==jt?$t:s)==$t,p=(l=l==jt?$t:l)==$t,d=s==l;if(d&&Ke(e)){if(!Ke(t))return!1;u=!0,f=!1}if(d&&!f)return a||(a=new Se),u||ot(e)?ke(e,t,n,o,i,a):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new je(e),new je(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return z(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=Ce;case"[object Set]":var c=1&r;if(u||(u=$e),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var l=ke(u(e),u(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(Ae)return Ae.call(e)==Ae.call(t)}return!1}(e,t,s,n,o,i,a);if(!(1&n)){var h=f&&Pt.call(e,"__wrapped__"),v=p&&Pt.call(t,"__wrapped__");if(h||v){var y=h?e.value():e,m=v?t.value():t;return a||(a=new Se),i(y,m,n,o,a)}}return!!d&&(a||(a=new Se),function(e,t,n,o,i,a){var u=1&n,c=st(e),s=c.length;if(s!=st(t).length&&!u)return!1;for(var l=s;l--;){var f=c[l];if(!(u?f in t:lt.call(t,f)))return!1}var p=a.get(e),d=a.get(t);if(p&&d)return p==t&&d==e;var h=!0;a.set(e,t),a.set(t,e);for(var v=u;++l<s;){var y=e[f=c[l]],m=t[f];if(o)var g=u?o(m,y,f,t,e,a):o(y,m,f,e,t,a);if(!(void 0===g?y===m||i(y,m,n,o,a):g)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,o,i,a))}(t,n,o,i,e,a))},Tt=function(e,t){return At(e,t)},It=f(824),Rt=f(685),Dt=(0,Rt.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),Lt=function(){return(0,Rt.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})},Mt=function(){return(0,Rt.getGlobalStore)("extensions",{slots:{}})};d(Dt.getState()),Dt.subscribe(d);var Nt=Lt(),Ut=Mt(),Bt=(0,It.getExtensionSlotsConfigStore)(),zt=(0,It.getExtensionsConfigStore)();Nt.subscribe((function(e){w(e,Bt.getState(),zt.getState())})),Bt.subscribe((function(e){w(Nt.getState(),e,zt.getState())})),zt.subscribe((function(e){w(Nt.getState(),Bt.getState(),e)}));var Ft=Nt.action((function(e,t){e.extensions[t.name]=y({},t,{instances:[]})})),Vt=Nt.action((function(e,t,n){var r,o=null===(r=e.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=t)return console.warn("An extension slot with the name '".concat(n,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),e;if(o&&o==t)return e;if(e.slots[n])return y({},e,{slots:y({},e.slots,v({},n,y({},e.slots[n],{moduleName:t})))});var i=_(n,t);return y({},e,{slots:y({},e.slots,v({},n,i))})})),Ht=Ut.action((function(){return{slots:{},extensions:{}}})),Wt=f(645),Kt=Lt()}(),p}())}}}))},889:(e,t,n)=>{"use strict";n.r(t);var r=n(418),o={};for(const e in r)"default"!==e&&(o[e]=()=>r[e]);n.d(t,o);var i=n(810);o={};for(const e in i)"default"!==e&&(o[e]=()=>i[e]);n.d(t,o);var a=n(347);o={};for(const e in a)"default"!==e&&(o[e]=()=>a[e]);n.d(t,o);var u=n(708);o={};for(const e in u)"default"!==e&&(o[e]=()=>u[e]);n.d(t,o);var c=n(547);o={};for(const e in c)"default"!==e&&(o[e]=()=>c[e]);n.d(t,o);var s=n(473);o={};for(const e in s)"default"!==e&&(o[e]=()=>s[e]);n.d(t,o);var l=n(630);o={};for(const e in l)"default"!==e&&(o[e]=()=>l[e]);n.d(t,o);var f=n(336);o={};for(const e in f)"default"!==e&&(o[e]=()=>f[e]);n.d(t,o);var p=n(493);o={};for(const e in p)"default"!==e&&(o[e]=()=>p[e]);n.d(t,o);var d=n(390);o={};for(const e in d)"default"!==e&&(o[e]=()=>d[e]);n.d(t,o)},473:()=>{System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e){window.dispatchEvent(new CustomEvent(p,{detail:{online:e}}))},t=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(p,t),function(){return window.removeEventListener(p,t)}},n=function(e){return e({online:navigator.onLine}),t(e)},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(d,{detail:e}))},a=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(d,t),function(){return window.removeEventListener(d,t)}},u=function(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))},c=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(h,t),function(){return window.removeEventListener(h,t)}},s=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(v,t),function(){return window.removeEventListener(v,t)}},l=function(e){window.openmrsBase=e.apiUrl,window.spaBase=e.spaPath,window.spaEnv=e.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=function(){return"".concat(window.spaBase,"/")}},f=function(){window.copyText=function(e){var t=window.getSelection();if(t){var n=document.createRange();n.selectNode(e),t.removeAllRanges(),t.addRange(n),document.execCommand("copy"),t.removeAllRanges()}}};r.r(o),r.d(o,{dispatchConnectivityChanged:function(){return e},dispatchNotificationShown:function(){return u},dispatchPrecacheStaticDependencies:function(){return i},setupPaths:function(){return l},setupUtils:function(){return f},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return t},subscribeNotificationShown:function(){return c},subscribePrecacheStaticDependencies:function(){return a},subscribeToastShown:function(){return s}});var p="openmrs:connectivity-changed",d="openmrs:precache-static-dependencies",h="openmrs:notification-shown",v="openmrs:toast-shown"}(),o}())}}}))},630:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){u(e,t,n[t])}))}return e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var p=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function d(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}System.register(["@openmrs/esm-api","@openmrs/esm-state"],(function(e,t){var r={},i={};return{setters:[function(e){r.getLoggedInUser=e.getLoggedInUser},function(e){i.createGlobalStore=e.createGlobalStore}],execute:function(){e(function(){var e={602:function(e){var t=function(e){"use strict";var t,n=function(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]},r=function(e,t,n,r){var a,u,s,l,f=t&&c(t.prototype,i)?t:i,p=Object.create(f.prototype),h=new d(r||[]);return p._invoke=(a=e,u=n,s=h,l=x,function(e,t){if(l===O)throw new Error("Generator is already running");if(l===E){if("throw"===e)throw t;return v()}for(s.method=e,s.arg=t;;){var n=s.delegate;if(n){var r=A(n,s);if(r){if(r===k)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(l===x)throw l=E,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l=O;var i=o(a,u,s);if("normal"===i.type){if(l=s.done?E:S,i.arg===k)continue;return{value:i.arg,done:s.done}}"throw"===i.type&&(l=E,s.method="throw",s.arg=i.arg)}}),p},o=function(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}},i=function(){},a=function(){},u=function(){},s=function(e){["next","throw","return"].forEach((function(t){n(e,t,(function(e){return this._invoke(t,e)}))}))},l=function(e,t){function n(r,i,a,u){var c=o(e[r],e,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&m.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(l).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var r;this._invoke=function(e,o){function i(){return new t((function(t,r){n(e,o,t,r)}))}return r=r?r.then(i,i):i()}},f=function(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)},p=function(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t},d=function(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)},h=function(e){if(e){var n=e[b];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function n(){for(;++r<e.length;)if(m.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:t,done:!0}},y=Object.prototype,m=y.hasOwnProperty,g="function"==typeof Symbol?Symbol:{},b=g.iterator||"@@iterator",w=g.asyncIterator||"@@asyncIterator",_=g.toStringTag||"@@toStringTag";try{n({},"")}catch(e){n=function(e,t,n){return e[t]=n}}e.wrap=r;var x="suspendedStart",S="suspendedYield",O="executing",E="completed",k={},j={};n(j,b,(function(){return this}));var C=Object.getPrototypeOf,$=C&&C(C(h([])));$&&$!==y&&m.call($,b)&&(j=$);var P=u.prototype=i.prototype=Object.create(j);function A(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,A(e,n),"throw"===n.method))return k;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return k}var i=o(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,k;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,k):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,k)}return a.prototype=u,n(P,"constructor",u),n(u,"constructor",a),a.displayName=n(u,_,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,n(e,_,"GeneratorFunction")),e.prototype=Object.create(P),e},e.awrap=function(e){return{__await:e}},s(l.prototype),n(l.prototype,w,(function(){return this})),e.AsyncIterator=l,e.async=function(t,n,o,i,a){void 0===a&&(a=Promise);var u=new l(r(t,n,o,i),a);return e.isGeneratorFunction(n)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},s(P),n(P,_,"Generator"),n(P,b,(function(){return this})),n(P,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=h,d.prototype={constructor:d,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(p),!e)for(var n in this)"t"===n.charAt(0)&&m.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){var n=function(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o};if(this.done)throw e;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=m.call(i,"catchLoc"),c=m.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&m.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,k):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),k},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),p(n),k}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;p(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:h(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),k}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},766:function(e){"use strict";e.exports=r},685:function(e){"use strict";e.exports=i}},d={};function h(t){var n=d[t];if(void 0!==n)return n.exports;var r=d[t]={exports:{}};return e[t](r,r.exports,h),r.exports}h.y=t,h.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return h.d(t,{a:t}),t},h.d=function(e,t){for(var n in t)h.o(t,n)&&!h.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},h.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),h.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},h.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;h.g.importScripts&&(e=h.g.location+"");var t=h.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),h.p=e}();var v={};return(0,h(968).s)(1),function(){"use strict";var e=function(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))},t=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},r=function(e,n){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)},i=function(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href},d=function(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)},y=function(){},m=function(e,t){if(!t)return e&&e.then?e.then(y):Promise.resolve()},g=function(e,t){if(void 0!==Tn)return console.warn("The application's Service Worker has already been registered. The new service worker at ".concat(e," will not be registered.")),Tn;if(!("serviceWorker"in navigator))throw new Error("Registering the Service Worker is not possible due to missing browser capabilities.");var n=new An(e,t);return Tn=n.register().then((function(){return n.controlling.then((function(){return n}))}))},b=function(){return null!=Tn?Tn:Promise.resolve(void 0)},w=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},x=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){w(i,r,o,a,u,"next",e)}function u(e){w(i,r,o,a,u,"throw",e)}a(void 0)}))}},S=function(e){return Nn.apply(this,arguments)},O=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},E=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){O(i,r,o,a,u,"next",e)}function u(e){O(i,r,o,a,u,"throw",e)}a(void 0)}))}},k=function(){return Un.apply(this,arguments)},j=function(){return Bn.apply(this,arguments)},C=function(){return zn.apply(this,arguments)},$=function(){return Fn.apply(this,arguments)},P=function(){return{current:Hn,notAvailable:"unavailable"===Hn,active:"on"===Hn}},A=function(e){"unavailable"!==Hn&&"unavailable"!==e&&(localStorage.setItem(Vn,"on"===e?"active":"disabled"),Hn=e)},T=function(){return Wn.apply(this,arguments)},I=function(e,t){return"object"!=typeof t||qn(t).forEach((function(n){e[n]=t[n]})),e},R=function(e,t){return Qn.call(e,t)},D=function(e,t){"function"==typeof t&&(t=t(Gn(e))),("undefined"==typeof Reflect?qn:Reflect.ownKeys)(t).forEach((function(n){L(e,n,t[n])}))},L=function(e,t,n,r){Yn(e,t,I(n&&R(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))},M=function(e){return{from:function(t){return e.prototype=Object.create(t.prototype),L(e.prototype,"constructor",e),{extend:D.bind(null,e.prototype)}}}},N=function(e,t,n){return er.call(e,t,n)},U=function(e,t){return t(e)},B=function(e){if(!e)throw new Error("Assertion Failed")},z=function(e){Kn.setImmediate?setImmediate(e):setTimeout(e,0)},F=function(e,t){return e.reduce((function(e,n,r){var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})},V=function(e){var t={};for(var n in e)R(e,n)&&(t[n]=e[n]);return t},H=function(e){return rr.apply([],e)},W=function(e){ar="undefined"!=typeof WeakMap&&new WeakMap;var t=ur(e);return ar=null,t},K=function(e){return cr.call(e).slice(8,-1)},q=function(e){var t,n,r,o;if(1===arguments.length){if(Zn(e))return e.slice();if(this===fr&&"string"==typeof e)return[e];if(o=lr(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n},Z=function(e,t){dr=e,hr=t},G=function(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(hr).map((function(e){return"\n"+e})).join("")):""},Q=function(e,t){this._e=yr(),this.name=e,this.message=t},Y=function(e,t){return e+". Errors: "+Object.keys(t).map((function(e){return t[e].toString()})).filter((function(e,t,n){return n.indexOf(e)===t})).join("\n")},J=function(e,t,n,r){this._e=yr(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=Y(e,t)},X=function(e,t){this._e=yr(),this.name="BulkError",this.failures=Object.keys(t).map((function(e){return t[e]})),this.failuresByPos=t,this.message=Y(e,t)},ee=function(){},te=function(e){return e},ne=function(e,t){return null==e||e===te?t:function(n){return t(e(n))}},re=function(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}},oe=function(e,t){return e===ee?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?re(r,this.onsuccess):r),o&&(this.onerror=this.onerror?re(o,this.onerror):o),void 0!==i?i:n}},ie=function(e,t){return e===ee?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?re(n,this.onsuccess):n),r&&(this.onerror=this.onerror?re(r,this.onerror):r)}},ae=function(e,t){return e===ee?t:function(n){var r=e.apply(this,arguments);I(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?re(o,this.onsuccess):o),i&&(this.onerror=this.onerror?re(i,this.onerror):i),void 0===r?void 0===a?void 0:a:I(r,a)}},ue=function(e,t){return e===ee?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}},ce=function(e,t){return e===ee?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return t.apply(r,i)}))}return t.apply(this,arguments)}},se=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=ee,this._lib=!1;var t=this._PSD=Vr;if(dr&&(this._stackHolder=yr(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==Er)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&fe(this,this._value))}this._state=null,this._value=null,++t.ref,Zr(this,e)},le=function(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o},fe=function(e,t){if(Ur.push(t),null===e._state){var n=e._lib&&me();t=zr(t),e._state=!1,e._value=t,dr&&null!==t&&"object"==typeof t&&!t._promise&&function(n,r,o){try{(function(){var n=Xn(t,"stack");t._promise=e,L(t,"stack",{get:function(){return Ir?n&&(n.get?n.get.apply(t):n.value):e.stack}})}).apply(null,void 0)}catch(e){}}(),r=e,Nr.some((function(e){return e._value===r._value}))||Nr.push(r),pe(e),n&&ge()}var r},pe=function(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)de(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===Wr&&(++Wr,Dr((function(){0==--Wr&&be()}),[]))},de=function(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Wr,Dr(he,[n,e,t])}else e._listeners.push(t)},he=function(e,t,n){try{Br=t;var r,o=t._value;t._state?r=e(o):(Ur.length&&(Ur=[]),r=e(o),-1===Ur.indexOf(o)&&function(e){for(var t=Nr.length;t;)if(Nr[--t]._value===e._value)return void Nr.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Br=null,0==--Wr&&be(),--n.psd.ref||n.psd.finalize()}},ve=function(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)},ye=function(){me()&&ge()},me=function(){var e=Lr;return Lr=!1,Mr=!1,e},ge=function(){var e,t,n;do{for(;Hr.length>0;)for(e=Hr,Hr=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(Hr.length>0);Lr=!0,Mr=!0},be=function(){var e=Nr;Nr=[],e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));for(var t=Kr.slice(0),n=t.length;n;)t[--n]()},we=function(e){return new se(Er,!1,e)},_e=function(e,t){var n=Vr;return function(){var r=me(),o=Vr;try{return Ce(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{Ce(o,!1),r&&ge()}}},xe=function(e,t,n,r){var o=Vr,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++to;var a=Fr.env;i.env=Tr?{Promise:se,PromiseProp:{value:se,configurable:!0,writable:!0},all:se.all,race:se.race,allSettled:se.allSettled,any:se.any,resolve:se.resolve,reject:se.reject,nthen:Ie(a.nthen,i),gthen:Ie(a.gthen,i)}:{},t&&I(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=Pe(i,e,n,r);return 0===i.ref&&i.finalize(),u},Se=function(){return Qr.id||(Qr.id=++Yr),++Qr.awaits,Qr.echoes+=100,Qr.id},Oe=function(){return!!Qr.awaits&&(0==--Qr.awaits&&(Qr.id=0),Qr.echoes=100*Qr.awaits,!0)},Ee=function(e){return Qr.echoes&&e&&e.constructor===Ar?(Se(),e.then((function(e){return Oe(),e}),(function(e){return Oe(),no(e)}))):e},ke=function(e){++eo,Qr.echoes&&0!=--Qr.echoes||(Qr.echoes=Qr.id=0),Jr.push(Vr),Ce(e,!0)},je=function(){var e=Jr[Jr.length-1];Jr.pop(),Ce(e,!1)},Ce=function(e,t){var n=Vr;if((t?!Qr.echoes||Xr++&&e===Vr:!Xr||--Xr&&e===Vr)||Ae(t?ke.bind(null,e):je),e!==Vr&&(Vr=e,n===Fr&&(Fr.env=$e()),Tr)){var r=Fr.env.Promise,o=e.env;Cr.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(Kn,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}},$e=function(){var e=Kn.Promise;return Tr?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(Kn,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:Cr.then,gthen:e.prototype.then}:{}},Pe=function(e,t,n,r,o){var i=Vr;try{return Ce(e,!0),t(n,r,o)}finally{Ce(i,!1)}},Ae=function(e){Pr.call(jr,e)},Te=function(e,t,n,r){return"function"!=typeof e?e:function(){var o=Vr;n&&Se(),Ce(t,!0);try{return e.apply(this,arguments)}finally{Ce(o,!1),r&&Ae(Oe)}}},Ie=function(e,t){return function(n,r){return e.call(this,Te(n,t),Te(r,t))}},Re=function(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(Kn.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),I(r,o)):Kn.CustomEvent&&I(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&Kn.dispatchEvent&&(dispatchEvent(r),!Kn.PromiseRejectionEvent&&Kn.onunhandledrejection))try{Kn.onunhandledrejection(r)}catch(e){}dr&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: ".concat(e.stack||e))}catch(e){}},De=function(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t},Le=function(e){return"string"!=typeof e||/\./.test(e)?function(e){return e}:function(t){return void 0===t[e]&&e in t&&delete(t=W(t))[e],t}},Me=function(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return a(e);r||(r=ue),o||(o=ee);var i={subscribers:[],fire:o,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=r(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter((function(t){return t!==e})),i.fire=i.subscribers.reduce(r,o)}};return t[e]=n[e]=i,i}function a(e){qn(e).forEach((function(t){var n=e[t];if(Zn(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new xr.InvalidArgument("Invalid event config");var r=i(t,te,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){z((function(){e.apply(null,t)}))}))}))}}))}},Ne=function(e,t){return M(t).from({prototype:e}),t},Ue=function(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)},Be=function(e,t){e.filter=De(e.filter,t)},ze=function(e,t,n){var r=e.replayFilter;e.replayFilter=r?function(){return De(r(),t())}:t,e.justLimit=n&&!r},Fe=function(e,t){if(e.isPrimKey)return t.primaryKey;var n=t.getIndexByKeyPath(e.index);if(!n)throw new xr.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n},Ve=function(e,t,n){var r=Fe(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})},He=function(e,t,n,r){var o=e.replayFilter?De(e.filter,e.replayFilter()):e.filter;if(e.or){var i={},a=function(e,n,r){if(!o||o(n,r,(function(e){return n.stop(e)}),(function(e){return n.fail(e)}))){var a=n.primaryKey,u=""+a;"[object ArrayBuffer]"===u&&(u=""+new Uint8Array(a)),R(i,u)||(i[u]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),We(Ve(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return We(Ve(e,r,n),De(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)},We=function(e,t,n,r){var o=_e(r?function(e,t,o){return n(r(e),t,o)}:n);return e.then((function(e){if(e)return e.start((function(){var n=function(){return e.continue()};t&&!t(e,(function(e){return n=e}),(function(t){e.stop(t),n=ee}),(function(t){e.fail(t),n=ee}))||o(e.value,e,(function(e){return n=e})),n()}))}))},Ke=function(e){var t=void 0===e?"undefined":p(e);if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";var n=K(e);return"ArrayBuffer"===n?"binary":n},qe=function(e){return c(e,Uint8Array)?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)},Ze=function(e,t){return e<t?-1:e===t?0:1},Ge=function(e,t){return e>t?-1:e===t?0:1},Qe=function(e,t,n){var r=c(e,mo)?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r},Ye=function(e){return new e.Collection(e,(function(){return tt("")})).limit(0)},Je=function(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),u=-1,c=0;c<a;++c){var s=t[c];if(s!==r[c])return o(e[c],n[c])<0?e.substr(0,c)+n[c]+n.substr(c+1):o(e[c],r[c])<0?e.substr(0,c)+r[c]+n.substr(c+1):u>=0?e.substr(0,u)+t[u]+n.substr(u+1):null;o(e[c],s)<0&&(u=c)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):u<0?null:e.substr(0,u)+r[u]+n.substr(u+1)},Xe=function(e,t,n,r){var o,i,a,u,c,s,l,f=n.length;if(!n.every((function(e){return"string"==typeof e})))return Qe(e,"String expected.");function p(e){o="next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()},i="next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()},a="next"===e?Ze:Ge;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));u=t.map((function(e){return e.upper})),c=t.map((function(e){return e.lower})),s=e,l="next"===e?"":r}p("next");var d=new e.Collection(e,(function(){return et(u[0],c[f-1]+r)}));d._ondirectionchange=function(e){p(e)};var h=0;return d._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var p=i(o);if(t(p,c,h))return!0;for(var d=null,v=h;v<f;++v){var y=Je(o,p,u[v],c[v],a,s);null===y&&null===d?h=v+1:(null===d||a(d,y)>0)&&(d=y)}return n(null!==d?function(){e.continue(d+l)}:r),!1})),d},et=function(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}},tt=function(e){return{type:1,lower:e,upper:e}},nt=function(e){return _e((function(t){return rt(t),e(t.target.error),!1}))},rt=function(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()},ot=function(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+it(t)}},it=function(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""},at=function(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:F(n,(function(e){return[e.name,e]}))}},ut=function(e){return null==e?function(){}:"string"==typeof e?1===(t=e).split(".").length?function(e){return e[t]}:function(e){return tr(e,t)}:function(t){return tr(t,e)};var t},ct=function(e){return[].slice.call(e)},st=function(e){return null==e?":id":"string"==typeof e?e:"[".concat(e.join("+"),"]")},lt=function(e,t){var n,r,o,i,a,u,f=e._novip,p=t.db,d=(n=f._middlewares,r=p,i=t,u=(o=f._deps).IDBKeyRange,o.indexedDB,a=function(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");var n=e.lower,r=e.upper,o=e.lowerOpen,i=e.upperOpen;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}var o,i,a,u=(i=n,a=ct((o=e).objectStoreNames),{schema:{name:o.name,tables:a.map((function(e){return i.objectStore(e)})).map((function(e){var t=e.keyPath,n=e.autoIncrement,r=Zn(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:ut(t)},indexes:ct(e.indexNames).map((function(t){return e.index(t)})).map((function(e){var t=e.name,n=e.unique,r=e.multiEntry,o=e.keyPath,a={name:t,compound:Zn(o),keyPath:o,unique:n,multiEntry:r,extractKey:ut(o)};return i[st(o)]=a,a})),getIndexByKeyPath:function(e){return i[st(e)]}};return i[":id"]=a.primaryKey,null!=t&&(i[st(t)]=a.primaryKey),a}))},hasGetAll:a.length>0&&"getAll"in i.objectStore(a[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),c=u.schema,s=u.hasGetAll,f=c.tables.map((function(e){return{name:o=(t=e).name,schema:t,mutate:function(e){var t=e.trans,n=e.type,i=e.keys,a=e.values,u=e.range;return new Promise((function(e,c){e=_e(e);var s=t.objectStore(o),f=null==s.keyPath,p="put"===n||"add"===n;if(!p&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);var d,h=(i||a||{length:1}).length;if(i&&a&&i.length!==a.length)throw new Error("Given keys array must have same length as given values array.");if(0===h)return e({numFailures:0,failures:{},results:[],lastResult:void 0});var v=[],y=[],m=0,g=function(e){++m,rt(e)};if("deleteRange"===n){if(4===u.type)return e({numFailures:m,failures:y,results:[],lastResult:void 0});3===u.type?v.push(d=s.clear()):v.push(d=s.delete(r(u)))}else{var b=l(p?f?[a,i]:[a,null]:[i,null],2),w=b[0],_=b[1];if(p)for(var x=0;x<h;++x)v.push(d=_&&void 0!==_[x]?s[n](w[x],_[x]):s[n](w[x])),d.onerror=g;else for(var S=0;S<h;++S)v.push(d=s[n](w[S])),d.onerror=g}var O=function(t){var r=t.target.result;v.forEach((function(e,t){return null!=e.error&&(y[t]=e.error)})),e({numFailures:m,failures:y,results:"delete"===n?i:v.map((function(e){return e.result})),lastResult:r})};d.onerror=function(e){g(e),O(e)},d.onsuccess=O}))},getMany:function(e){var t=e.trans,n=e.keys;return new Promise((function(e,r){e=_e(e);for(var i,a=t.objectStore(o),u=n.length,c=new Array(u),s=0,l=0,f=function(t){var n=t.target;c[n._pos]=n.result,++l===s&&e(c)},p=nt(r),d=0;d<u;++d)null!=n[d]&&((i=a.get(n[d]))._pos=d,i.onsuccess=f,i.onerror=p,++s);0===s&&e(c)}))},get:function(e){var t=e.trans,n=e.key;return new Promise((function(e,r){e=_e(e);var i=t.objectStore(o).get(n);i.onsuccess=function(t){return e(t.target.result)},i.onerror=nt(r)}))},query:(n=s,function(e){return new Promise((function(t,i){t=_e(t);var a=e.trans,u=e.values,c=e.limit,s=e.query,l=c===1/0?void 0:c,f=s.index,p=s.range,d=a.objectStore(o),h=f.isPrimaryKey?d:d.index(f.name),v=r(p);if(0===c)return t({result:[]});if(n){var y=u?h.getAll(v,l):h.getAllKeys(v,l);y.onsuccess=function(e){return t({result:e.target.result})},y.onerror=nt(i)}else{var m=0,g=u||!("openKeyCursor"in h)?h.openCursor(v):h.openKeyCursor(v),b=[];g.onsuccess=function(e){var n=g.result;return n?(b.push(u?n.value:n.primaryKey),++m===c?t({result:b}):void n.continue()):t({result:b})},g.onerror=nt(i)}}))}),openCursor:function(e){var t=e.trans,n=e.values,i=e.query,a=e.reverse,u=e.unique;return new Promise((function(e,c){e=_e(e);var s=i.index,l=i.range,f=t.objectStore(o),p=s.isPrimaryKey?f:f.index(s.name),d=a?u?"prevunique":"prev":u?"nextunique":"next",h=n||!("openKeyCursor"in p)?p.openCursor(r(l),d):p.openKeyCursor(r(l),d);h.onerror=nt(c),h.onsuccess=_e((function(n){var r=h.result;if(r){r.___id=++_o,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var a=r.advance.bind(r),u=function(){throw new Error("Cursor not stopped")};r.trans=t,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=_e(c),r.next=function(){var e=this,t=1;return this.start((function(){return t--?e.continue():e.stop()})).then((function(){return e}))},r.start=function(e){var t=new Promise((function(e,t){e=_e(e),h.onerror=nt(t),r.fail=t,r.stop=function(t){r.stop=r.continue=r.continuePrimaryKey=r.advance=u,e(t)}})),n=function(){if(h.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return h.onsuccess=_e((function(e){h.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=a,n(),t},e(r)}else e(null)}),c)}))},count:function(e){var t=e.query,n=e.trans,i=t.index,a=t.range;return new Promise((function(e,t){var u=n.objectStore(o),c=i.isPrimaryKey?u:u.index(i.name),s=r(a),l=s?c.count(s):c.count();l.onsuccess=_e((function(t){return e(t.target.result)})),l.onerror=nt(t)}))}};var t,n,o})),p={};return f.forEach((function(e){return p[e.name]=e})),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(e){if(!p[e])throw new Error("Table '".concat(e,"' not found"));return p[e]},MIN_KEY:-1/0,MAX_KEY:wo(t),schema:c}}(r,u,i),{dbcore:n.dbcore.reduce((function(e,t){return s({},e,(0,t.create)(e))}),a)});f.core=d.dbcore,f.tables.forEach((function(e){var t=e.name;f.core.schema.tables.some((function(e){return e.name===t}))&&(e.core=f.core.table(t),c(f[t],f.Table)&&(f[t].core=e.core))}))},ft=function(e,t,n,r){var o=e._novip;n.forEach((function(e){var n=r[e];t.forEach((function(t){var r=Xn(t,e);(!r||"value"in r&&void 0===r.value)&&(t===o.Transaction.prototype||c(t,o.Transaction)?L(t,e,{get:function(){return this.table(e)},set:function(t){Yn(this,e,{value:t,writable:!0,configurable:!0,enumerable:!0})}}):t[e]=new o.Table(e,n))}))}))},pt=function(e,t){var n=e._novip;t.forEach((function(e){for(var t in e)c(e[t],n.Table)&&delete e[t]}))},dt=function(e,t){return e._cfg.version-t._cfg.version},ht=function(e,t){var n,r={del:[],add:[],change:[]};for(n in e)t[n]||r.del.push(n);for(n in t){var o=e[n],i=t[n];if(o){var a={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!uo)a.recreate=!0,r.change.push(a);else{var u=o.idxByName,c=i.idxByName,s=void 0;for(s in u)c[s]||a.del.push(s);for(s in c){var l=u[s],f=c[s];l?l.src!==f.src&&a.change.push(f):a.add.push(f)}(a.del.length>0||a.add.length>0||a.change.length>0)&&r.change.push(a)}}else r.add.push([n,i])}return r},vt=function(e,t,n,r){var o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(e){return yt(o,e)})),o},yt=function(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})},mt=function(e,t,n){var r={};return N(t.objectStoreNames,0).forEach((function(e){for(var t=n.objectStore(e),o=t.keyPath,i=ot(it(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[],u=0;u<t.indexNames.length;++u){var c=t.index(t.indexNames[u]);o=c.keyPath;var s=ot(c.name,o,!!c.unique,!!c.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=at(e,i,a)})),r},gt=function(e,t,n){for(var r=e._novip,o=n.db.objectStoreNames,i=0;i<o.length;++i){var a=o[i],u=n.objectStore(a);r._hasGetAll="getAll"in u;for(var s=0;s<u.indexNames.length;++s){var l=u.indexNames[s],f=u.index(l).keyPath,p="string"==typeof f?f:"["+N(f).join("+")+"]";if(t[a]){var d=t[a].idxByName[p];d&&(d.name=l,delete t[a].idxByName[p],t[a].idxByName[l]=d)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&Kn.WorkerGlobalScope&&c(Kn,Kn.WorkerGlobalScope)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)},bt=function(e,t){var n=e._dbNamesDB;return n||(n=e._dbNamesDB=new To("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")},wt=function(e){return e&&"function"==typeof e.databases},_t=function(e){return xe((function(){return Vr.letThrough=!0,e()}))},xt=function(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()},St=function(e){var t=function(t){return e.next(t)},n=o(t),r=o((function(t){return e.throw(t)}));function o(e){return function(t){var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):Zn(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()},Ot=function(e,t,n){var r=arguments.length;if(r<2)throw new xr.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=H(o);return[e,i,n]},Et=function(e,t,n){for(var r=Zn(e)?e.slice():[e],o=0;o<n;++o)r.push(t);return r},kt=function(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;for(var r=[],o=0,i=0;o<t.keys.length&&i<e.length;++o)0===ho(t.keys[o],e[i])&&(r.push(n?W(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}},jt=function(e){return!("from"in e)},Ct=function(e,t){jt(t)||function e(t,n){var r=n.from,o=n.to,i=n.l,a=n.r;$o(t,r,o),i&&e(t,i),a&&e(t,a)}(e,t)},$t=function(e){var t=jt(e)?null:{s:0,n:e};return{next:function(e){for(var n=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&ho(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||ho(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}},Pt=function(e){var t,n,r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){var i="r"===o?"l":"r",a=s({},e),u=e[o];e.from=u.from,e.to=u.to,e[o]=u[o],a[o]=u[i],e[i]=a,a.d=At(a)}e.d=At(e)},At=function(e){var t=e.r,n=e.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1},Tt=function(e,t){return qn(t).forEach((function(n){Ct(e[n]||(e[n]=new Co),t[n])})),e},It=function(e){var t=Lo;try{Lo=!0,go.storagemutated.fire(e)}finally{Lo=t}},Rt=function(e,t){return!t||"object"!==Ho(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t},Dt=function(){return new Wo},Lt=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Mt=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},Nt=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Mt(i,r,o,a,u,"next",e)}function u(e){Mt(i,r,o,a,u,"throw",e)}a(void 0)}))}},Ut=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Bt=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){Ut(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},zt=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Lt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Ft=function(){return Zo},Vt=function(){return Go.apply(this,arguments)},Ht=function(e,t,n,r){return Qo.apply(this,arguments)},Wt=function(){return Yo.apply(this,arguments)},Kt=function(e,t,n,r){return Jo.apply(this,arguments)},qt=function(e,t,n){return Xo.apply(this,arguments)},Zt=function(e,t){return ei.apply(this,arguments)},Gt=function(e,t){return ti.apply(this,arguments)},Qt=function(e){return ni.apply(this,arguments)},Yt=function(e){return ri.apply(this,arguments)},Jt=function(e){return oi.apply(this,arguments)},Xt=function(e){var t;return!!(null===(t=qo[e])||void 0===t?void 0:t.options.onBeginEditSyncItem)},en=function(e){return ii.apply(this,arguments)},tn=function(e){return ai.apply(this,arguments)},nn=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};qo[e]={type:e,dependsOn:t,process:n,options:r}},rn=function(){if(!Vo&&!(Vo="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Vo(ui)},on=function(){return di+pi()},an=function(e){return e.startsWith(di)},un=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},cn=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},sn=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){cn(i,r,o,a,u,"next",e)}function u(e){cn(i,r,o,a,u,"throw",e)}a(void 0)}))}},ln=function(e){return function(e){if(Array.isArray(e))return un(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return un(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?un(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},fn=function(){return Object.values(hi)},pn=function(e){hi[e.id]&&console.warn('[setupDynamicOfflineDataHandler] Another second handler with the ID "'.concat(e.id,'" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.')),hi[e.id]=e},dn=function(e){return vi.apply(this,arguments)},hn=function(e,t){return yi.apply(this,arguments)},vn=function(e,t){return mi.apply(this,arguments)},yn=function(e,t,n){return gi.apply(this,arguments)},mn=function(e,t){return bi.apply(this,arguments)},gn=function(e,t,n){return wi.apply(this,arguments)},bn=function(e,t){return _i.apply(this,arguments)},wn=function(e,t,n){return xi.apply(this,arguments)},_n=function(){return Si.apply(this,arguments)},xn=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},Sn=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){xn(i,r,o,a,u,"next",e)}function u(e){xn(i,r,o,a,u,"throw",e)}a(void 0)}))}},On=function(){return jn(),Oi},En=function(e,t){jn(),pn({type:"patient",displayName:t.displayName,id:e,isSynced:function(){return Promise.resolve(!0)},sync:function(e,n){return t.onOfflinePatientAdded({patientUuid:e,signal:null!=n?n:(new AbortController).signal})}})},kn=function(e){return Ei.apply(this,arguments)},jn=function(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")};h.r(v),h.d(v,{activateOfflineCapability:function(){return T},beginEditSynchronizationItem:function(){return en},canBeginEditSynchronizationItemsOfType:function(){return Xt},deleteSynchronizationItem:function(){return tn},generateOfflineUuid:function(){return on},getCurrentOfflineMode:function(){return P},getDynamicOfflineDataEntries:function(){return dn},getDynamicOfflineDataEntriesFor:function(){return hn},getDynamicOfflineDataHandlers:function(){return fn},getFullSynchronizationItems:function(){return Yt},getFullSynchronizationItemsFor:function(){return Gt},getOfflineDb:function(){return Dt},getOfflinePatientDataStore:function(){return On},getOfflineSynchronizationStore:function(){return Ft},getOmrsServiceWorker:function(){return b},getSynchronizationItem:function(){return Jt},getSynchronizationItems:function(){return Qt},getSynchronizationItemsFor:function(){return Zt},isOfflineUuid:function(){return an},messageOmrsServiceWorker:function(){return S},offlineUuidPrefix:function(){return di},omrsOfflineCachingStrategyHttpHeaderName:function(){return Dn},omrsOfflineResponseBodyHttpHeaderName:function(){return In},omrsOfflineResponseStatusHttpHeaderName:function(){return Rn},putDynamicOfflineData:function(){return vn},putDynamicOfflineDataFor:function(){return yn},queueSynchronizationItem:function(){return qt},queueSynchronizationItemFor:function(){return Kt},registerOfflinePatientHandler:function(){return En},registerOmrsServiceWorker:function(){return g},removeDynamicOfflineData:function(){return mn},removeDynamicOfflineDataFor:function(){return gn},runSynchronization:function(){return Vt},setCurrentOfflineMode:function(){return A},setupDynamicOfflineDataHandler:function(){return pn},setupOfflineSync:function(){return nn},syncAllDynamicOfflineData:function(){return bn},syncDynamicOfflineData:function(){return wn},syncOfflinePatientData:function(){return kn}});try{self["workbox:window:6.5.1"]&&_()}catch(e){}try{self["workbox:core:6.5.1"]&&_()}catch(e){}var Cn=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))},$n=function(e,t){this.type=e,Object.assign(this,t)},Pn={type:"SKIP_WAITING"},An=function(t){var n,r,o=function(e,n){var r,o;return void 0===n&&(n={}),(r=t.call(this)||this).nn={},r.tn=0,r.rn=new Cn,r.en=new Cn,r.on=new Cn,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!i(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener("updatefound",r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener("statechange",r.ln)},r.ln=function(e){var t=r.fn,n=e.target,o=n.state,i=n===r.vn,a={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new $n(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new $n("waiting",a))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(e){var t=r.hn,n=t!==navigator.serviceWorker.controller;r.dispatchEvent(new $n("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},r.gn=(o=function(e){var t=e.data,n=e.ports,o=e.source;return d(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new $n("message",{data:t,originalEvent:e,ports:n,sw:o}))}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=e,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r};r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var a,u=o.prototype;return u.register=function(e){var t,n,r=(void 0===e?{}:e).immediate,o=void 0!==r&&r;try{var a=this;return t=function(){return a.mn=Boolean(navigator.serviceWorker.controller),a.yn=a.pn(),d(a.bn(),(function(e){a.fn=e,a.yn&&(a.hn=a.yn,a.en.resolve(a.yn),a.on.resolve(a.yn),a.yn.addEventListener("statechange",a.ln,{once:!0}));var t=a.fn.waiting;return t&&i(t.scriptURL,a.sn.toString())&&(a.hn=t,Promise.resolve().then((function(){a.dispatchEvent(new $n("waiting",{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),a.hn&&(a.rn.resolve(a.hn),a.an.add(a.hn)),a.fn.addEventListener("updatefound",a.cn),navigator.serviceWorker.addEventListener("controllerchange",a.dn),a.fn}))},(n=function(){if(!o&&"complete"!==document.readyState)return m(new Promise((function(e){return window.addEventListener("load",e)})))}())&&n.then?n.then(t):t()}catch(e){return Promise.reject(e)}},u.update=function(){try{return this.fn?m(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},u.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},u.messageSW=function(t){try{return d(this.getSW(),(function(n){return e(n,t)}))}catch(e){return Promise.reject(e)}},u.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&e(this.fn.waiting,Pn)},u.pn=function(){var e=navigator.serviceWorker.controller;return e&&i(e.scriptURL,this.sn.toString())?e:void 0},u.bn=function(){try{var e=this;return function(t,n){try{var r=d(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}catch(e){return n(e)}return r&&r.then?r.then(void 0,n):r}(0,(function(e){throw e}))}catch(e){return Promise.reject(e)}},(a=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(o.prototype,a),o}(function(){var e=function(){this.Pn=new Map},t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=r(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}()),Tn=void 0,In="x-omrs-offline-response-body",Rn="x-omrs-offline-response-status",Dn="x-omrs-offline-caching-strategy",Ln=h(602),Mn=h.n(Ln);function Nn(){return(Nn=x(Mn().mark((function e(t){var n;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b();case 2:if(!(n=e.sent)){e.next=9;break}return e.next=6,n.messageSW(t);case 6:e.t0=e.sent,e.next=10;break;case 9:e.t0={success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."};case 10:return e.abrupt("return",e.t0);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Un(){return(Un=E(Mn().mark((function e(){var t;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=window.sessionStorage,e.prev=1,t.setItem("someKeyHere","test"),t.removeItem("someKeyHere"),e.next=10;break;case 6:if(e.prev=6,e.t0=e.catch(1),e.t0.code!==DOMException.QUOTA_EXCEEDED_ERR||0!==t.length){e.next=10;break}return e.abrupt("return",!0);case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[1,6]])})))).apply(this,arguments)}function Bn(){return(Bn=E(Mn().mark((function e(){return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!window.indexedDB);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zn(){return zn=E(Mn().mark((function e(){return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var t=indexedDB.open("test");t.onerror=function(){return e(!0)},t.onsuccess=function(){return e(!1)}})));case 1:case"end":return e.stop()}}),e)}))),zn.apply(this,arguments)}function Fn(){return(Fn=E(Mn().mark((function e(){return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:if(e.t1=e.sent,e.t1){e.next=7;break}return e.next=6,j();case 6:e.t1=e.sent;case 7:if(e.t0=e.t1,e.t0){e.next=12;break}return e.next=11,k();case 11:e.t0=e.sent;case 12:return e.abrupt("return",e.t0);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Vn="openmrs3:offline-mode",Hn="unavailable";function Wn(){return(Wn=E(Mn().mark((function e(){return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$();case 2:e.sent||(Hn="active"===localStorage.getItem(Vn)?"on":"off"),navigator.onLine;case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Kn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,qn=Object.keys,Zn=Array.isArray;"undefined"==typeof Promise||Kn.Promise||(Kn.Promise=Promise);var Gn=Object.getPrototypeOf,Qn={}.hasOwnProperty,Yn=Object.defineProperty,Jn=Object.getOwnPropertyDescriptor;function Xn(e,t){var n;return Jn(e,t)||(n=Gn(e))&&Xn(n,t)}var er=[].slice;function tr(e,t){if(R(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,o=t.length;r<o;++r){var i=tr(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var u=e[t.substr(0,a)];return void 0===u?void 0:tr(u,t.substr(a+1))}}function nr(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){B("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)nr(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),u=t.substr(i+1);if(""===u)void 0===n?Zn(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var c=e[a];c||(c=e[a]={}),nr(c,u,n)}}else void 0===n?Zn(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}var rr=[].concat,or="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(H([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return Kn[e]})),ir=or.map((function(e){return Kn[e]}));F(or,(function(e){return[e,!0]}));var ar=null;function ur(e){if(!e||"object"!=typeof e)return e;var t=ar&&ar.get(e);if(t)return t;if(Zn(e)){t=[],ar&&ar.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(ur(e[n]))}else if(ir.indexOf(e.constructor)>=0)t=e;else{var o=Gn(e);for(var i in t=o===Object.prototype?{}:Object.create(o),ar&&ar.set(e,t),e)R(e,i)&&(t[i]=ur(e[i]))}return t}var cr={}.toString,sr="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",lr="symbol"==(void 0===sr?"undefined":p(sr))?function(e){var t;return null!=e&&(t=e[sr])&&t.apply(e)}:function(){return null},fr={},pr="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},dr="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),hr=function(){return!0},vr=!new Error("").stack;function yr(){if(vr)try{throw yr.arguments,new Error}catch(e){return e}return new Error}var mr=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],gr=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(mr),br={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};M(Q).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+G(this._e,2))}},toString:function(){return this.name+": "+this.message}}),M(J).from(Q),M(X).from(Q);var wr=gr.reduce((function(e,t){return e[t]=t+"Error",e}),{}),_r=Q,xr=gr.reduce((function(e,t){var n=function(e,n){this._e=yr(),this.name=r,e?"string"==typeof e?(this.message="".concat(e).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof e&&(this.message="".concat(e.name," ").concat(e.message),this.inner=e):(this.message=br[t]||r,this.inner=null)},r=t+"Error";return M(n).from(_r),e[t]=n,e}),{});xr.Syntax=SyntaxError,xr.Type=TypeError,xr.Range=RangeError;var Sr=mr.reduce((function(e,t){return e[t+"Error"]=xr[t],e}),{}),Or=gr.reduce((function(e,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=xr[t]),e}),{});Or.ModifyError=J,Or.DexieError=Q,Or.BulkError=X;var Er={},kr=l("undefined"==typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,Gn(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,Gn(t),e]}(),3),jr=kr[0],Cr=kr[1],$r=kr[2],Pr=Cr&&Cr.then,Ar=jr&&jr.constructor,Tr=!!$r,Ir=!1,Rr=$r?function(){$r.then(ye)}:Kn.setImmediate?setImmediate.bind(null,ye):Kn.MutationObserver?function(){var e=document.createElement("div");new MutationObserver((function(){ye(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:function(){setTimeout(ye,0)},Dr=function(e,t){Hr.push([e,t]),Mr&&(Rr(),Mr=!1)},Lr=!0,Mr=!0,Nr=[],Ur=[],Br=null,zr=te,Fr={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Re,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(e){try{Re(e[0],e[1])}catch(e){}}))}},Vr=Fr,Hr=[],Wr=0,Kr=[],qr={get:function(){var e=function(e,r){var o=this,i=!t.global&&(t!==Vr||n!==eo),a=i&&!Oe(),u=new se((function(n,u){de(o,new le(Te(e,t,i,a),Te(r,t,i,a),n,u,t))}));return dr&&ve(u,this),u},t=Vr,n=eo;return e.prototype=Er,e},set:function(e){L(this,"then",e&&e.prototype===Er?qr:{get:function(){return e},set:qr.set})}};function Zr(e,t){try{t((function(t){if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&me();t&&"function"==typeof t.then?Zr(e,(function(e,n){c(t,se)?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,pe(e)),n&&ge()}}),fe.bind(null,e))}catch(t){fe(e,t)}}function Gr(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=G(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return dr&&((r=G(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&Gr(e._prev,t,n)),t}D(se.prototype,{then:qr,_then:function(e,t){de(this,new le(null,null,e,t,Vr))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(function(e){return c(e,t)?n(e):we(e)})):this.then(null,(function(e){return e&&e.name===t?n(e):we(e)}))},finally:function(e){return this.then((function(t){return e(),t}),(function(t){return e(),we(t)}))},stack:{get:function(){if(this._stack)return this._stack;try{Ir=!0;var e=Gr(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Ir=!1}}},timeout:function(e,t){var n=this;return e<1/0?new se((function(r,o){var i=setTimeout((function(){return o(new xr.Timeout(t))}),e);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&L(se.prototype,Symbol.toStringTag,"Dexie.Promise"),Fr.env=$e(),D(se,{all:function(){var e=q.apply(null,arguments).map(Ee);return new se((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach((function(o,i){return se.resolve(o).then((function(n){e[i]=n,--r||t(e)}),n)}))}))},resolve:function(e){if(c(e,se))return e;if(e&&"function"==typeof e.then)return new se((function(t,n){e.then(t,n)}));var t=new se(Er,!0,e);return ve(t,Br),t},reject:we,race:function(){var e=q.apply(null,arguments).map(Ee);return new se((function(t,n){e.map((function(e){return se.resolve(e).then(t,n)}))}))},PSD:{get:function(){return Vr},set:function(e){return Vr=e}},totalEchoes:{get:function(){return eo}},newPSD:xe,usePSD:Pe,scheduler:{get:function(){return Dr},set:function(e){Dr=e}},rejectionMapper:{get:function(){return zr},set:function(e){zr=e}},follow:function(e,t){return new se((function(n,r){return xe((function(t,n){var r=Vr;r.unhandleds=[],r.onunhandled=n,r.finalize=re((function(){var e=this;Kr.push((function r(){0===e.unhandleds.length?t():n(e.unhandleds[0]),Kr.splice(Kr.indexOf(r),1)})),++Wr,Dr((function(){0==--Wr&&be()}),[])}),r.finalize),e()}),t,n,r)}))}}),Ar&&(Ar.allSettled&&L(se,"allSettled",(function(){var e=q.apply(null,arguments).map(Ee);return new se((function(t){0===e.length&&t([]);var n=e.length,r=new Array(n);e.forEach((function(e,o){return se.resolve(e).then((function(e){return r[o]={status:"fulfilled",value:e}}),(function(e){return r[o]={status:"rejected",reason:e}})).then((function(){return--n||t(r)}))}))}))})),Ar.any&&"undefined"!=typeof AggregateError&&L(se,"any",(function(){var e=q.apply(null,arguments).map(Ee);return new se((function(t,n){0===e.length&&n(new AggregateError([]));var r=e.length,o=new Array(r);e.forEach((function(e,i){return se.resolve(e).then((function(e){return t(e)}),(function(e){o[i]=e,--r||n(new AggregateError(o))}))}))}))})));var Qr={awaits:0,echoes:0,id:0},Yr=0,Jr=[],Xr=0,eo=0,to=0;-1===(""+Pr).indexOf("[native code]")&&(Se=Oe=ee);var no=se.reject;function ro(e,t,n,r){if(e.idbdb&&(e._state.openComplete||Vr.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===wr.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return ro(e,t,n,r)}))):no(o)}return o._promise(t,(function(e,t){return xe((function(){return Vr.trans=o,r(e,t,o)}))})).then((function(e){return o._completion.then((function(){return e}))}))}if(e._state.openComplete)return no(new xr.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return no(new xr.DatabaseClosed);e.open().catch(ee)}return e._state.dbReadyPromise.then((function(){return ro(e,t,n,r)}))}var oo=String.fromCharCode(65535),io="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",ao=[],uo="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),co=uo,so=uo,lo=function(e){return!/(dexie\.js|dexie\.min\.js)/.test(e)},fo={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1},po=function(){function e(){o(this,e)}return a(e,[{key:"_trans",value:function(e,t,n){var r=function(e,n,r){if(!r.schema[i])throw new xr.NotFound("Table "+i+" not part of transaction");return t(r.idbtrans,r)},o=this._tx||Vr.trans,i=this.name,a=me();try{return o&&o.db===this.db?o===Vr.trans?o._promise(e,r,n):xe((function(){return o._promise(e,r,n)}),{trans:o,transless:Vr.transless||Vr}):ro(this.db,e,[this.name],r)}finally{a&&ge()}}},{key:"get",value:function(e,t){var n=this;return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(function(t){return n.core.get({trans:t,key:e}).then((function(e){return n.hook.reading.fire(e)}))})).then(t)}},{key:"where",value:function(e){var t=function(e,t){try{return 0===i.cmp(e,t)}catch(e){return!1}};if("string"==typeof e)return new this.db.WhereClause(this,e);if(Zn(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var n=qn(e);if(1===n.length)return this.where(n[0]).equals(e[n[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(e){return e.compound&&n.every((function(t){return e.keyPath.indexOf(t)>=0}))&&e.keyPath.every((function(e){return n.indexOf(e)>=0}))}))[0];if(r&&this.db._maxKey!==oo)return this.where(r.name).equals(r.keyPath.map((function(t){return e[t]})));!r&&dr&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit of a compound index [").concat(n.join("+"),"]"));var o=this.schema.idxByName,i=this.db._deps.indexedDB,a=l(n.reduce((function(n,r){var i=l(n,2),a=i[0],u=i[1],c=o[r],s=e[r];return[a||c,a||!c?De(u,c&&c.multi?function(e){var n=tr(e,r);return Zn(n)&&n.some((function(e){return t(s,e)}))}:function(e){return t(s,tr(e,r))}):u]}),[null,null]),2),u=a[0],c=a[1];return u?this.where(u.name).equals(e[u.keyPath]).filter(c):r?this.filter(c):this.where(n).equals("")}},{key:"filter",value:function(e){return this.toCollection().and(e)}},{key:"count",value:function(e){return this.toCollection().count(e)}},{key:"offset",value:function(e){return this.toCollection().offset(e)}},{key:"limit",value:function(e){return this.toCollection().limit(e)}},{key:"each",value:function(e){return this.toCollection().each(e)}},{key:"toArray",value:function(e){return this.toCollection().toArray(e)}},{key:"toCollection",value:function(){return new this.db.Collection(new this.db.WhereClause(this))}},{key:"orderBy",value:function(e){return new this.db.Collection(new this.db.WhereClause(this,Zn(e)?"[".concat(e.join("+"),"]"):e))}},{key:"reverse",value:function(){return this.toCollection().reverse()}},{key:"mapToClass",value:function(e){this.schema.mappedClass=e;var t=function(t){if(!t)return t;var n=Object.create(e.prototype);for(var r in t)if(R(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}},{key:"defineClass",value:function(){return this.mapToClass((function(e){I(this,e)}))}},{key:"add",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=Le(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]})})).then((function(e){return e.numFailures?se.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{nr(e,i,t)}catch(e){}return t}))}},{key:"update",value:function(e,t){if("object"!=typeof e||Zn(e))return this.where(":id").equals(e).modify(t);var n=tr(e,this.schema.primKey.keyPath);if(void 0===n)return no(new xr.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?qn(t).forEach((function(n){nr(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}},{key:"put",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=Le(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null})})).then((function(e){return e.numFailures?se.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{nr(e,i,t)}catch(e){}return t}))}},{key:"delete",value:function(e){var t=this;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:[e]})})).then((function(e){return e.numFailures?se.reject(e.failures[0]):void 0}))}},{key:"clear",value:function(){var e=this;return this._trans("readwrite",(function(t){return e.core.mutate({trans:t,type:"deleteRange",range:fo})})).then((function(e){return e.numFailures?se.reject(e.failures[0]):void 0}))}},{key:"bulkGet",value:function(e){var t=this;return this._trans("readonly",(function(n){return t.core.getMany({keys:e,trans:n}).then((function(e){return e.map((function(e){return t.hook.reading.fire(e)}))}))}))}},{key:"bulkAdd",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r,a=r.schema.primKey,u=a.auto,c=a.keyPath;if(c&&o)throw new xr.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new xr.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,l=c&&u?e.map(Le(c)):e;return r.core.mutate({trans:t,type:"add",keys:o,values:l,wantResults:i}).then((function(e){var t=e.numFailures,r=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?r:o;throw new X("".concat(n.name,".bulkAdd(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkPut",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r,a=r.schema.primKey,u=a.auto,c=a.keyPath;if(c&&o)throw new xr.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new xr.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,l=c&&u?e.map(Le(c)):e;return r.core.mutate({trans:t,type:"put",keys:o,values:l,wantResults:i}).then((function(e){var t=e.numFailures,r=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?r:o;throw new X("".concat(n.name,".bulkPut(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkDelete",value:function(e){var t=this,n=e.length;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:e})})).then((function(e){var r=e.numFailures,o=e.lastResult,i=e.failures;if(0===r)return o;throw new X("".concat(t.name,".bulkDelete(): ").concat(r," of ").concat(n," operations failed"),i)}))}}]),e}();function ho(e,t){try{var n=Ke(e),r=Ke(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i)if(e[i]!==t[i])return e[i]<t[i]?-1:1;return n===r?0:n<r?-1:1}(qe(e),qe(t));case"Array":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i){var a=ho(e[i],t[i]);if(0!==a)return a}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}var vo=function(){function e(){o(this,e)}return a(e,[{key:"_read",value:function(e,t){var n=this._ctx;return n.error?n.table._trans(null,no.bind(null,n.error)):n.table._trans("readonly",e).then(t)}},{key:"_write",value:function(e){var t=this._ctx;return t.error?t.table._trans(null,no.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}},{key:"_addAlgorithm",value:function(e){var t=this._ctx;t.algorithm=De(t.algorithm,e)}},{key:"_iterate",value:function(e,t){return He(this._ctx,e,t,this._ctx.table.core)}},{key:"clone",value:function(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&I(n,e),t._ctx=n,t}},{key:"raw",value:function(){return this._ctx.valueMapper=null,this}},{key:"each",value:function(e){var t=this._ctx;return this._read((function(n){return He(t,e,n,t.table.core)}))}},{key:"count",value:function(e){var t=this;return this._read((function(e){var n=t._ctx,r=n.table.core;if(Ue(n,!0))return r.count({trans:e,query:{index:Fe(n,r.schema),range:n.range}}).then((function(e){return Math.min(e,n.limit)}));var o=0;return He(n,(function(){return++o,!1}),e,r).then((function(){return o}))})).then(e)}},{key:"sortBy",value:function(e,t){var n=function(e,t){var n=a(e,i),r=a(t,i);return n<r?-u:n>r?u:0},r=e.split(".").reverse(),o=r[0],i=r.length-1;function a(e,t){return t?a(e[r[t]],t-1):e[o]}var u="next"===this._ctx.dir?1:-1;return this.toArray((function(e){return e.sort(n)})).then(t)}},{key:"toArray",value:function(e){var t=this;return this._read((function(e){var n=t._ctx;if("next"===n.dir&&Ue(n,!0)&&n.limit>0){var r=n.valueMapper,o=Fe(n,n.table.core.schema);return n.table.core.query({trans:e,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(e){var t=e.result;return r?t.map(r):t}))}var i=[];return He(n,(function(e){return i.push(e)}),e,n.table.core).then((function(){return i}))}),e)}},{key:"offset",value:function(e){var t=this._ctx;return e<=0||(t.offset+=e,Ue(t)?ze(t,(function(){var t=e;return function(e,n){return 0===t||(1===t?(--t,!1):(n((function(){e.advance(t),t=0})),!1))}})):ze(t,(function(){var t=e;return function(){return--t<0}}))),this}},{key:"limit",value:function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),ze(this._ctx,(function(){var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}},{key:"until",value:function(e,t){return Be(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}},{key:"first",value:function(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}},{key:"last",value:function(e){return this.reverse().first(e)}},{key:"filter",value:function(e){var t,n;return Be(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=De(t.isMatch,n),this}},{key:"and",value:function(e){return this.filter(e)}},{key:"or",value:function(e){return new this.db.WhereClause(this._ctx.table,e,this)}},{key:"reverse",value:function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}},{key:"desc",value:function(){return this.reverse()}},{key:"eachKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}},{key:"eachUniqueKey",value:function(e){return this._ctx.unique="unique",this.eachKey(e)}},{key:"eachPrimaryKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}},{key:"keys",value:function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}},{key:"primaryKeys",value:function(e){var t=this._ctx;if("next"===t.dir&&Ue(t,!0)&&t.limit>0)return this._read((function(e){var n=Fe(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((function(e){return e.result})).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}},{key:"uniqueKeys",value:function(e){return this._ctx.unique="unique",this.keys(e)}},{key:"firstKey",value:function(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}},{key:"lastKey",value:function(e){return this.reverse().firstKey(e)}},{key:"distinct",value:function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return Be(this._ctx,(function(e){var t=e.primaryKey.toString(),r=R(n,t);return n[t]=!0,!r})),this}},{key:"modify",value:function(e){var t=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof e)o=e;else{var i=qn(e),a=i.length;o=function(t){for(var n=!1,r=0;r<a;++r){var o=i[r],u=e[o];tr(t,o)!==u&&(nr(t,o,u),n=!0)}return n}}var u=n.table.core,c=u.schema.primaryKey,s=c.outbound,l=c.extractKey,f=t.db._options.modifyChunkSize||200,p=[],d=0,h=[],v=function(e,t){var n=t.failures,r=t.numFailures;d+=e-r;var o=!0,i=!1,a=void 0;try{for(var u,c=qn(n)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=u.value;p.push(n[s])}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}};return t.clone().primaryKeys().then((function(t){var i=function(a){var c=Math.min(f,t.length-a);return u.getMany({trans:r,keys:t.slice(a,a+c),cache:"immutable"}).then((function(p){for(var d=[],h=[],y=s?[]:null,m=[],g=0;g<c;++g){var b=p[g],w={value:W(b),primKey:t[a+g]};!1!==o.call(w,w.value,w)&&(null==w.value?m.push(t[a+g]):s||0===ho(l(b),l(w.value))?(h.push(w.value),s&&y.push(t[a+g])):(m.push(t[a+g]),d.push(w.value)))}var _=Ue(n)&&n.limit===1/0&&("function"!=typeof e||e===yo)&&{index:n.index,range:n.range};return Promise.resolve(d.length>0&&u.mutate({trans:r,type:"add",values:d}).then((function(e){for(var t in e.failures)m.splice(parseInt(t),1);v(d.length,e)}))).then((function(){return(h.length>0||_&&"object"==typeof e)&&u.mutate({trans:r,type:"put",keys:y,values:h,criteria:_,changeSpec:"function"!=typeof e&&e}).then((function(e){return v(h.length,e)}))})).then((function(){return(m.length>0||_&&e===yo)&&u.mutate({trans:r,type:"delete",keys:m,criteria:_}).then((function(e){return v(m.length,e)}))})).then((function(){return t.length>a+c&&i(a+f)}))}))};return i(0).then((function(){if(p.length>0)throw new J("Error modifying one or more objects",p,d,h);return t.length}))}))}))}},{key:"delete",value:function(){var e=this._ctx,t=e.range;return Ue(e)&&(e.isPrimKey&&!so||3===t.type)?this._write((function(n){var r=e.table.core.schema.primaryKey,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((function(t){return e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(e){var n=e.failures,r=(e.lastResult,e.results,e.numFailures);if(r)throw new J("Could not delete some values",Object.keys(n).map((function(e){return n[e]})),t-r);return t-r}))}))})):this.modify(yo)}}]),e}(),yo=function(e,t){return t.value=null},mo=function(){function e(){o(this,e)}return a(e,[{key:"Collection",get:function(){return this._ctx.table.db.Collection}},{key:"between",value:function(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?Ye(this):new this.Collection(this,(function(){return et(e,t,!n,!r)}))}catch(e){return Qe(this,io)}}},{key:"equals",value:function(e){return null==e?Qe(this,io):new this.Collection(this,(function(){return tt(e)}))}},{key:"above",value:function(e){return null==e?Qe(this,io):new this.Collection(this,(function(){return et(e,void 0,!0)}))}},{key:"aboveOrEqual",value:function(e){return null==e?Qe(this,io):new this.Collection(this,(function(){return et(e,void 0,!1)}))}},{key:"below",value:function(e){return null==e?Qe(this,io):new this.Collection(this,(function(){return et(void 0,e,!1,!0)}))}},{key:"belowOrEqual",value:function(e){return null==e?Qe(this,io):new this.Collection(this,(function(){return et(void 0,e)}))}},{key:"startsWith",value:function(e){return"string"!=typeof e?Qe(this,"String expected."):this.between(e,e+oo,!0,!0)}},{key:"startsWithIgnoreCase",value:function(e){return""===e?this.startsWith(e):Xe(this,(function(e,t){return 0===e.indexOf(t[0])}),[e],oo)}},{key:"equalsIgnoreCase",value:function(e){return Xe(this,(function(e,t){return e===t[0]}),[e],"")}},{key:"anyOfIgnoreCase",value:function(){var e=q.apply(fr,arguments);return 0===e.length?Ye(this):Xe(this,(function(e,t){return-1!==t.indexOf(e)}),e,"")}},{key:"startsWithAnyOfIgnoreCase",value:function(){var e=q.apply(fr,arguments);return 0===e.length?Ye(this):Xe(this,(function(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}),e,oo)}},{key:"anyOf",value:function(){var e=this,t=q.apply(fr,arguments),n=this._cmp;try{t.sort(n)}catch(e){return Qe(this,io)}if(0===t.length)return Ye(this);var r=new this.Collection(this,(function(){return et(t[0],t[t.length-1])}));r._ondirectionchange=function(r){n="next"===r?e._ascending:e._descending,t.sort(n)};var o=0;return r._addAlgorithm((function(e,r,i){for(var a=e.key;n(a,t[o])>0;)if(++o===t.length)return r(i),!1;return 0===n(a,t[o])||(r((function(){e.continue(t[o])})),!1)})),r}},{key:"notEqual",value:function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}},{key:"noneOf",value:function(){var e=q.apply(fr,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Qe(this,io)}var t=e.reduce((function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]}),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}},{key:"inAnyRange",value:function(e,t){var n=this,r=function(e,t){return p(e[0],t[0])},o=this._cmp,i=this._ascending,a=this._descending,u=this._min,c=this._max;if(0===e.length)return Ye(this);if(!e.every((function(e){return void 0!==e[0]&&void 0!==e[1]&&i(e[0],e[1])<=0})))return Qe(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",xr.InvalidArgument);var s,l=!t||!1!==t.includeLowers,f=t&&!0===t.includeUppers,p=i;try{(s=e.reduce((function(e,t){for(var n=0,r=e.length;n<r;++n){var i=e[n];if(o(t[0],i[1])<0&&o(t[1],i[0])>0){i[0]=u(i[0],t[0]),i[1]=c(i[1],t[1]);break}}return n===r&&e.push(t),e}),[])).sort(r)}catch(e){return Qe(this,io)}var d=0,h=f?function(e){return i(e,s[d][1])>0}:function(e){return i(e,s[d][1])>=0},v=l?function(e){return a(e,s[d][0])>0}:function(e){return a(e,s[d][0])>=0},y=h,m=new this.Collection(this,(function(){return et(s[0][0],s[s.length-1][1],!l,!f)}));return m._ondirectionchange=function(e){"next"===e?(y=h,p=i):(y=v,p=a),s.sort(r)},m._addAlgorithm((function(e,t,r){for(var o=e.key;y(o);)if(++d===s.length)return t(r),!1;return!((h(a=o)||v(a))&&(0===n._cmp(o,s[d][1])||0===n._cmp(o,s[d][0])||t((function(){p===i?e.continue(s[d][0]):e.continue(s[d][1])})),1));var a})),m}},{key:"startsWithAnyOf",value:function(){var e=q.apply(fr,arguments);return e.every((function(e){return"string"==typeof e}))?0===e.length?Ye(this):this.inAnyRange(e.map((function(e){return[e,e+oo]}))):Qe(this,"startsWithAnyOf() only works with strings")}}]),e}(),go=Me(null,"storagemutated"),bo=function(){function e(){o(this,e)}return a(e,[{key:"_lock",value:function(){return B(!Vr.global),++this._reculock,1!==this._reculock||Vr.global||(Vr.lockOwnerFor=this),this}},{key:"_unlock",value:function(){if(B(!Vr.global),0==--this._reculock)for(Vr.global||(Vr.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{Pe(e[1],e[0])}catch(e){}}return this}},{key:"_locked",value:function(){return this._reculock&&Vr.lockOwnerFor!==this}},{key:"create",value:function(e){var t=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(B(!this.idbtrans),!e&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new xr.DatabaseClosed(r);case"MissingAPIError":throw new xr.MissingAPI(r.message,r);default:throw new xr.OpenFailed(r)}if(!this.active)throw new xr.TransactionInactive;return B(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=_e((function(n){rt(n),t._reject(e.error)})),e.onabort=_e((function(n){rt(n),t.active&&t._reject(new xr.Abort(e.error)),t.active=!1,t.on("abort").fire(n)})),e.oncomplete=_e((function(){t.active=!1,t._resolve(),"mutatedParts"in e&&go.storagemutated.fire(e.mutatedParts)})),this}},{key:"_promise",value:function(e,t,n){var r=this;if("readwrite"===e&&"readwrite"!==this.mode)return no(new xr.ReadOnly("Transaction is readonly"));if(!this.active)return no(new xr.TransactionInactive);if(this._locked())return new se((function(o,i){var a=r;r._blockedFuncs.push([function(){a._promise(e,t,n).then(o,i)},Vr])}));if(n)return xe((function(){var e=r,n=new se((function(n,r){e._lock();var o=t(n,r,e);o&&o.then&&o.then(n,r)}));return n.finally((function(){return e._unlock()})),n._lib=!0,n}));var o=new se((function(e,n){var o=t(e,n,r);o&&o.then&&o.then(e,n)}));return o._lib=!0,o}},{key:"_root",value:function(){return this.parent?this.parent._root():this}},{key:"waitFor",value:function(e){var t=this._root(),n=se.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((function(){return n}));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new se((function(e,r){n.then((function(n){return t._waitingQueue.push(_e(e.bind(null,n)))}),(function(e){return t._waitingQueue.push(_e(r.bind(null,e)))})).finally((function(){t._waitingFor===o&&(t._waitingFor=null)}))}))}},{key:"abort",value:function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new xr.Abort))}},{key:"table",value:function(e){var t=this._memoizedTables||(this._memoizedTables={});if(R(t,e))return t[e];var n=this.schema[e];if(!n)throw new xr.NotFound("Table "+e+" not part of transaction");var r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}]),e}(),wo=function(e){try{return e.only([[]]),wo=function(){return[[]]},[[]]}catch(e){return wo=function(){return oo},oo}},_o=0,xo=function(){function e(){o(this,e)}return a(e,[{key:"_parseStoresSpec",value:function(e,t){qn(e).forEach((function(n){if(null!==e[n]){var r=e[n].split(",").map((function(e,t){var n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return ot(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),Zn(r),0===t)})),o=r.shift();if(o.multi)throw new xr.Schema("Primary key cannot be multi-valued");r.forEach((function(e){if(e.auto)throw new xr.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new xr.Schema("Index must have a name and cannot be an empty string")})),t[n]=at(n,o,r)}}))}},{key:"stores",value:function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?I(this._cfg.storesSource,e):e;var n=t._versions,r={},o={};return n.forEach((function(e){I(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,pt(t,[t._allTables,t,t.Transaction.prototype]),ft(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],qn(o),o),t._storeNames=qn(o),this}},{key:"upgrade",value:function(e){return this._cfg.contentUpgrade=ce(this._cfg.contentUpgrade||ee,e),this}}]),e}();function So(e,t,n,r,o){return se.resolve().then((function(){var i=Vr.transless||Vr,a=e._createTransaction(t,n,e._dbSchema,r),u={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===wr.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return So(e,t,n,null,o)}))):no(r)}var c,s=pr(o);s&&Se();var l=se.follow((function(){if(c=o.call(a,a))if(s){var e=Oe.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=St(c))}),u);return(c&&"function"==typeof c.then?se.resolve(c).then((function(e){return a.active?e:no(new xr.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return c}))).then((function(e){return r&&a._resolve(),a._completion.then((function(){return e}))})).catch((function(e){return a._reject(e),no(e)}))}))}var Oo={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return s({},e,{table:function(t){var n=function(t){var n,r,o=t.query.index;return o.isVirtual?s({},t,{query:{index:o,range:(n=t.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:Et(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,r),lowerOpen:!0,upper:Et(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,r),upperOpen:!0})}}):t},r=e.table(t),o=r.schema,i={},a=[];function u(e,t,n){var r=st(e),o=i[r]=i[r]||[],c=null==e?0:"string"==typeof e?1:e.length,l=t>0,f=s({},n,{isVirtual:l,keyTail:t,keyLength:c,extractKey:ut(e),unique:!l&&n.unique});return o.push(f),f.isPrimaryKey||a.push(f),c>1&&u(2===c?e[0]:e.slice(0,c-1),t+1,n),o.sort((function(e,t){return e.keyTail-t.keyTail})),f}var c=u(o.primaryKey.keyPath,0,o.primaryKey);i[":id"]=[c];var l=!0,f=!1,p=void 0;try{for(var d,h=o.indexes[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var v=d.value;u(v.keyPath,0,v)}}catch(e){f=!0,p=e}finally{try{l||null==h.return||h.return()}finally{if(f)throw p}}var y=s({},r,{schema:s({},o,{primaryKey:c,indexes:a,getIndexByKeyPath:function(e){var t=i[st(e)];return t&&t[0]}}),count:function(e){return r.count(n(e))},query:function(e){return r.query(n(e))},openCursor:function(t){var o=t.query.index,i=o.keyTail,a=o.isVirtual,u=o.keyLength;return a?r.openCursor(n(t)).then((function(n){return n&&(r=n,o=Object.create(r,{continue:{value:function(n){null!=n?r.continue(Et(n,t.reverse?e.MAX_KEY:e.MIN_KEY,i)):t.unique?r.continue(r.key.slice(0,u).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,i)):r.continue()}},continuePrimaryKey:{value:function(t,n){r.continuePrimaryKey(Et(t,e.MAX_KEY,i),n)}},primaryKey:{get:function(){return r.primaryKey}},key:{get:function(){var e=r.key;return 1===u?e[0]:e.slice(0,u)}},value:{get:function(){return r.value}}}),o);var r,o})):r.openCursor(t)}});return y}})}};function Eo(e,t,n,r){return n=n||{},r=r||"",qn(e).forEach((function(o){if(R(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){var u=K(i);u!==K(a)?n[r+o]=t[o]:"Object"===u?Eo(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0})),qn(t).forEach((function(o){R(e,o)||(n[r+o]=t[o])})),n}var ko={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return s({},e,{table:function(t){var n=e.table(t),r=n.schema.primaryKey,o=s({},n,{mutate:function(e){var o=function(e){var t,o,i=Vr.trans,a=e.keys||(t=r,"delete"===(o=e).type?o.keys:o.keys||o.values.map(t.extractKey));if(!a)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?s({},e,{keys:a}):s({},e)).type&&(e.values=f(e.values)),e.keys&&(e.keys=f(e.keys)),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,a).then((function(t){var o=a.map((function(n,o){var a=t[o],s={onerror:null,onsuccess:null};if("delete"===e.type)u.fire.call(s,n,a,i);else if("add"===e.type||void 0===a){var f=c.fire.call(s,n,e.values[o],i);null==n&&null!=f&&(n=f,e.keys[o]=n,r.outbound||nr(e.values[o],r.keyPath,n))}else{var p=Eo(a,e.values[o]),d=l.fire.call(s,p,n,a,i);if(d){var h=e.values[o];Object.keys(d).forEach((function(e){R(h,e)?h[e]=d[e]:nr(h,e,d[e])}))}}return s}));return n.mutate(e).then((function(n){for(var r=n.failures,i=n.results,u=n.numFailures,c=n.lastResult,s=0;s<a.length;++s){var l=i?i[s]:a[s],f=o[s];null==l?f.onerror&&f.onerror(r[s]):f.onsuccess&&f.onsuccess("put"===e.type&&t[s]?e.values[s]:l)}return{failures:r,results:i,numFailures:u,lastResult:c}})).catch((function(e){return o.forEach((function(t){return t.onerror&&t.onerror(e)})),Promise.reject(e)}))}))},i=Vr.trans,a=i.table(t).hook,u=a.deleting,c=a.creating,l=a.updating;switch(e.type){case"add":if(c.fire===ee)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"put":if(c.fire===ee&&l.fire===ee)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"delete":if(u.fire===ee)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"deleteRange":if(u.fire===ee)break;return i._promise("readwrite",(function(){return p((t=e).trans,t.range,1e4);var t}),!0)}return n.mutate(e);function p(e,t,i){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:i}).then((function(n){var r=n.result;return o({type:"delete",keys:r,trans:e}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:p(e,s({},t,{lower:r[r.length-1],lowerOpen:!0}),i)}))}))}}});return o}})}},jo={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var n=e.table(t);return s({},n,{getMany:function(e){if(!e.cache)return n.getMany(e);var t=kt(e.keys,e.trans._cache,"clone"===e.cache);return t?se.resolve(t):n.getMany(e).then((function(t){return e.trans._cache={keys:e.keys,values:"clone"===e.cache?W(t):t},t}))},mutate:function(e){return"add"!==e.type&&(e.trans._cache=null),n.mutate(e)}})}}}},Co=function(e,t){if(!this){var n=new Co;return e&&"d"in e&&I(n,e),n}I(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function $o(e,t,n){var r=ho(t,n);if(!isNaN(r)){if(r>0)throw RangeError();if(jt(e))return I(e,{from:t,to:n,d:1});var o=e.l,i=e.r;if(ho(n,e.from)<0)return o?$o(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Pt(e);if(ho(t,e.to)>0)return i?$o(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Pt(e);ho(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),ho(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);var a=!e.r;o&&!e.l&&Ct(e,o),i&&a&&Ct(e,i)}}D(Co.prototype,u({add:function(e){return Ct(this,e),this},addKey:function(e){return $o(this,e,e),this},addKeys:function(e){var t=this;return e.forEach((function(e){return $o(t,e,e)})),this}},sr,(function(){return $t(this)})));var Po,Ao={stack:"dbcore",level:0,create:function(e){var t=e.schema.name,n=new Co(e.MIN_KEY,e.MAX_KEY);return s({},e,{table:function(r){var o=e.table(r),i=o.schema,a=i.primaryKey,u=a.extractKey,c=a.outbound,f=s({},o,{mutate:function(e){var a=e.trans,u=a.mutatedParts||(a.mutatedParts={}),c=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return u[n]||(u[n]=new Co)},s=c(""),f=c(":dels"),p=e.type,d=l("deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],2),h=d[0],v=d[1],y=e.trans._cache;return o.mutate(e).then((function(e){if(Zn(h)){"delete"!==p&&(h=e.results),s.addKeys(h);var t=kt(h,y);t||"add"===p||f.addKeys(h),(t||v)&&(o=c,a=t,u=v,i.indexes.forEach((function(e){var t=function(t){return null!=t?e.extractKey(t):null},n=o(e.name||""),r=function(t){return e.multiEntry&&Zn(t)?t.forEach((function(e){return n.addKey(e)})):n.addKey(t)};(a||u).forEach((function(e,n){var o=a&&t(a[n]),i=u&&t(u[n]);0!==ho(o,i)&&(null!=o&&r(o),null!=i&&r(i))}))})))}else if(h){var r={from:h.lower,to:h.upper};f.add(r),s.add(r)}else s.add(n),f.add(n),i.indexes.forEach((function(e){return c(e.name).add(n)}));var o,a,u;return e}))}}),p=function(t){var n,r,o=t.query,i=o.index,a=o.range;return[i,new Co(null!==(n=a.lower)&&void 0!==n?n:e.MIN_KEY,null!==(r=a.upper)&&void 0!==r?r:e.MAX_KEY)]},d={get:function(e){return[a,new Co(e.key)]},getMany:function(e){return[a,(new Co).addKeys(e.keys)]},count:p,query:p,openCursor:p};return qn(d).forEach((function(e){f[e]=function(i){var a=Vr.subscr;if(a){var f=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return a[n]||(a[n]=new Co)},p=f(""),h=f(":dels"),v=l(d[e](i),2),y=v[0],m=v[1];if(f(y.name||"").add(m),!y.isPrimaryKey){if("count"!==e){var g="query"===e&&c&&i.values&&o.query(s({},i,{values:!1}));return o[e].apply(this,arguments).then((function(t){if("query"===e){if(c&&i.values)return g.then((function(e){var n=e.result;return p.addKeys(n),t}));var n=i.values?t.result.map(u):t.result;i.values?p.addKeys(n):h.addKeys(n)}else if("openCursor"===e){var r=t,o=i.values;return r&&Object.create(r,{key:{get:function(){return h.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var e=r.primaryKey;return h.addKey(e),e}},value:{get:function(){return o&&p.addKey(r.primaryKey),r.value}}})}return t}))}h.add(n)}}return o[e].apply(this,arguments)}})),f}})}},To=function(){function e(t,n){var r=this;o(this,e),this._middlewares={},this.verno=0;var i=e.dependencies;this._options=n=s({addons:e.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var a=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var u,c,l,f,p={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:ee,dbReadyPromise:null,cancelOpen:ee,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};p.dbReadyPromise=new se((function(e){p.dbReadyResolve=e})),p.openCanceller=new se((function(e,t){p.cancelOpen=t})),this._state=p,this.name=t,this.on=Me(this,"populate","blocked","versionchange","close",{ready:[ce,ee]}),this.on.ready.subscribe=U(this.on.ready.subscribe,(function(t){return function(n,o){var i=r;e.vip((function(){var e=i._state;if(e.openComplete)e.dbOpenError||se.resolve().then(n),o&&t(n);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(n),o&&t(n);else{t(n);var r=i;o||t((function e(){r.on.ready.unsubscribe(n),r.on.ready.unsubscribe(e)}))}}))}})),this.Collection=(u=this,Ne(vo.prototype,(function(e,t){this.db=u;var n=fo,r=null;if(t)try{n=t()}catch(e){r=e}var o=e._ctx,i=o.table,a=i.hook.reading.fire;this._ctx={table:i,index:o.index,isPrimKey:!o.index||i.schema.primKey.keyPath&&o.index===i.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:a!==te?a:null}}))),this.Table=(f=this,Ne(po.prototype,(function(e,t,n){this.db=f,this._tx=n,this.name=e,this.schema=t,this.hook=f._allTables[e]?f._allTables[e].hook:Me(null,{creating:[oe,ee],reading:[ne,te],updating:[ae,ee],deleting:[ie,ee]})}))),this.Transaction=(l=this,Ne(bo.prototype,(function(e,t,n,r,o){var i=this;this.db=l,this.mode=e,this.storeNames=t,this.schema=n,this.chromeTransactionDurability=r,this.idbtrans=null,this.on=Me(this,"complete","error","abort"),this.parent=o||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new se((function(e,t){i._resolve=e,i._reject=t})),this._completion.then((function(){i.active=!1,i.on.complete.fire()}),(function(e){var t=i.active;return i.active=!1,i.on.error.fire(e),i.parent?i.parent._reject(e):t&&i.idbtrans&&i.idbtrans.abort(),no(e)}))}))),this.Version=function(e){return Ne(xo.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=(c=this,Ne(mo.prototype,(function(e,t,n){this.db=c,this._ctx={table:e,index:":id"===t?null:t,or:n};var r=c._deps.indexedDB;if(!r)throw new xr.MissingAPI;this._cmp=this._ascending=r.cmp.bind(r),this._descending=function(e,t){return r.cmp(t,e)},this._max=function(e,t){return r.cmp(e,t)>0?e:t},this._min=function(e,t){return r.cmp(e,t)<0?e:t},this._IDBKeyRange=c._deps.IDBKeyRange}))),this.on("versionchange",(function(e){e.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(r.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(r.name,"'. Closing db now to resume the delete request.")),r.close()})),this.on("blocked",(function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(e.oldVersion/10))})),this._maxKey=wo(n.IDBKeyRange),this._createTransaction=function(e,t,n,o){return new r.Transaction(e,t,n,r._options.chromeTransactionDurability,o)},this._fireOnBlocked=function(e){var t=r;r.on("blocked").fire(e),ao.filter((function(e){return e.name===t.name&&e!==t&&!e._state.vcFired})).map((function(t){return t.on("versionchange").fire(e)}))},this.use(Oo),this.use(ko),this.use(Ao),this.use(jo),this.vip=Object.create(this,{_vip:{value:!0}}),a.forEach((function(e){return e(r)}))}return a(e,[{key:"version",value:function(e){if(isNaN(e)||e<.1)throw new xr.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new xr.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,n=t.filter((function(t){return t._cfg.version===e}))[0];return n||(n=new this.Version(e),t.push(n),t.sort(dt),n.stores({}),this._state.autoSchema=!1,n)}},{key:"_whenReady",value:function(e){var t=this;return this.idbdb&&(this._state.openComplete||Vr.letThrough||this._vip)?e():new se((function(e,n){if(t._state.openComplete)return n(new xr.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return void n(new xr.DatabaseClosed);t.open().catch(ee)}t._state.dbReadyPromise.then(e,n)})).then(e)}},{key:"use",value:function(e){var t=e.stack,n=e.create,r=e.level,o=e.name;o&&this.unuse({stack:t,name:o});var i=this._middlewares[t]||(this._middlewares[t]=[]);return i.push({stack:t,create:n,level:null==r?10:r,name:o}),i.sort((function(e,t){return e.level-t.level})),this}},{key:"unuse",value:function(e){var t=e.stack,n=e.name,r=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((function(e){return r?e.create!==r:!!n&&e.name!==n}))),this}},{key:"open",value:function(){return function(e){var t=function(){if(n.openCanceller!==o)throw new xr.DatabaseClosed("db.open() was cancelled")},n=e._state,r=e._deps.indexedDB;if(n.isBeingOpened||e.idbdb)return n.dbReadyPromise.then((function(){return n.dbOpenError?no(n.dbOpenError):e}));dr&&(n.openCanceller._stackHolder=yr()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;var o=n.openCanceller,i=n.dbReadyResolve,a=null,u=!1;return se.race([o,("undefined"==typeof navigator?se.resolve():xt()).then((function(){return new se((function(o,i){if(t(),!r)throw new xr.MissingAPI;var c=e.name,s=n.autoSchema?r.open(c):r.open(c,Math.round(10*e.verno));if(!s)throw new xr.MissingAPI;s.onerror=nt(i),s.onblocked=_e(e._fireOnBlocked),s.onupgradeneeded=_e((function(t){if(a=s.transaction,n.autoSchema&&!e._options.allowEmptyDB){s.onerror=rt,a.abort(),s.result.close();var o=r.deleteDatabase(c);o.onsuccess=o.onerror=_e((function(){i(new xr.NoSuchDatabase("Database ".concat(c," doesnt exist")))}))}else{a.onerror=nt(i);var l=t.oldVersion>Math.pow(2,62)?0:t.oldVersion;u=l<1,e._novip.idbdb=s.result,function(e,t,n,r){var o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);var a=i._reject.bind(i),u=Vr.transless||Vr;xe((function(){var r,c,s,l,f,p,d,h,v;Vr.trans=i,Vr.transless=u,0===t?(qn(o).forEach((function(e){vt(n,e,o[e].primKey,o[e].indexes)})),lt(e,n),se.follow((function(){return e.on.populate.fire(i)})).catch(a)):(r=e,c=t,s=i,l=n,f=r._novip,p=[],d=f._versions,h=f._dbSchema=mt(0,f.idbdb,l),v=!1,d.filter((function(e){return e._cfg.version>=c})).forEach((function(e){p.push((function(){var t=h,n=e._cfg.dbschema;gt(f,t,l),gt(f,n,l),h=f._dbSchema=n;var r=ht(t,n);r.add.forEach((function(e){vt(l,e[0],e[1].primKey,e[1].indexes)})),r.change.forEach((function(e){if(e.recreate)throw new xr.Upgrade("Not yet support for changing primary key");var t=l.objectStore(e.name);e.add.forEach((function(e){return yt(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),yt(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var o=e._cfg.contentUpgrade;if(o&&e._cfg.version>c){lt(f,l),s._memoizedTables={},v=!0;var i=V(n);r.del.forEach((function(e){i[e]=t[e]})),pt(f,[f.Transaction.prototype]),ft(f,[f.Transaction.prototype],qn(i),i),s.schema=i;var a,u=pr(o);u&&Se();var p=se.follow((function(){if((a=o(s))&&u){var e=Oe.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?se.resolve(a):p.then((function(){return a}))}})),p.push((function(t){var n,r;v&&co||(n=e._cfg.dbschema,r=t,[].slice.call(r.db.objectStoreNames).forEach((function(e){return null==n[e]&&r.db.deleteObjectStore(e)}))),pt(f,[f.Transaction.prototype]),ft(f,[f.Transaction.prototype],f._storeNames,f._dbSchema),s.schema=f._dbSchema}))})),function e(){return p.length?se.resolve(p.shift()(s.idbtrans)).then(e):se.resolve()}().then((function(){var e,t;t=l,qn(e=h).forEach((function(n){t.db.objectStoreNames.contains(n)||vt(t,n,e[n].primKey,e[n].indexes)}))}))).catch(a)}))}(e,l/10,a,i)}}),i),s.onsuccess=_e((function(){a=null;var t,r,i,l,f=e._novip.idbdb=s.result,p=N(f.objectStoreNames);if(p.length>0)try{var d=f.transaction(1===(l=p).length?l[0]:l,"readonly");n.autoSchema?function(e,t,n){var r=e._novip;r.verno=t.version/10;var o=r._dbSchema=mt(0,t,n);r._storeNames=N(t.objectStoreNames,0),ft(r,[r._allTables],qn(o),o)}(e,f,d):(gt(e,e._dbSchema,d),r=d,!((i=ht(mt(0,(t=e).idbdb,r),t._dbSchema)).add.length||i.change.some((function(e){return e.add.length||e.change.length})))||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),lt(e,d)}catch(e){}ao.push(e),f.onversionchange=_e((function(t){n.vcFired=!0,e.on("versionchange").fire(t)})),f.onclose=_e((function(t){e.on("close").fire(t)})),u&&function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!wt(n)&&"__dbnames"!==t&&bt(n,r).put({name:t}).catch(ee)}(e._deps,c),o()}),i)}))}))]).then((function(){return t(),n.onReadyBeingFired=[],se.resolve(_t((function(){return e.on.ready.fire(e.vip)}))).then((function t(){if(n.onReadyBeingFired.length>0){var r=n.onReadyBeingFired.reduce(ce,ee);return n.onReadyBeingFired=[],se.resolve(_t((function(){return r(e.vip)}))).then(t)}}))})).finally((function(){n.onReadyBeingFired=null,n.isBeingOpened=!1})).then((function(){return e})).catch((function(t){n.dbOpenError=t;try{a&&a.abort()}catch(e){}return o===n.openCanceller&&e._close(),no(t)})).finally((function(){n.openComplete=!0,i()}))}(this)}},{key:"_close",value:function(){var e=this._state,t=ao.indexOf(this);if(t>=0&&ao.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new se((function(t){e.dbReadyResolve=t})),e.openCanceller=new se((function(t,n){e.cancelOpen=n}))}},{key:"close",value:function(){this._close();var e=this._state;this._options.autoOpen=!1,e.dbOpenError=new xr.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}},{key:"delete",value:function(){var e=this,t=arguments.length>0,n=this._state;return new se((function(r,o){var i=e,a=function(){var e=i;i.close();var t=i._deps.indexedDB.deleteDatabase(i.name);t.onsuccess=_e((function(){!function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!wt(n)&&"__dbnames"!==t&&bt(n,r).delete(t).catch(ee)}(e._deps,e.name),r()})),t.onerror=nt(o),t.onblocked=i._fireOnBlocked};if(t)throw new xr.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(a):a()}))}},{key:"backendDB",value:function(){return this.idbdb}},{key:"isOpen",value:function(){return null!==this.idbdb}},{key:"hasBeenClosed",value:function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}},{key:"hasFailed",value:function(){return null!==this._state.dbOpenError}},{key:"dynamicallyOpened",value:function(){return this._state.autoSchema}},{key:"tables",get:function(){var e=this;return qn(this._allTables).map((function(t){return e._allTables[t]}))}},{key:"transaction",value:function(){var e=Ot.apply(this,arguments);return this._transaction.apply(this,e)}},{key:"_transaction",value:function(e,t,n){var r=this,o=Vr.trans;o&&o.db===this&&-1===e.indexOf("!")||(o=null);var i,a,u=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{var s=this;if(a=t.map((function(e){var t=c(e,s.Table)?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new xr.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(o){if("readonly"===o.mode&&"readwrite"===i){if(!u)throw new xr.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&a.forEach((function(e){if(o&&-1===o.storeNames.indexOf(e)){if(!u)throw new xr.SubTransaction("Table "+e+" not included in parent transaction.");o=null}})),u&&o&&!o.active&&(o=null)}}catch(e){return o?o._promise(null,(function(t,n){n(e)})):no(e)}var l=So.bind(null,this,i,a,o,n);return o?o._promise(i,l,"lock"):Vr.trans?Pe(Vr.transless,(function(){return r._whenReady(l)})):this._whenReady(l)}},{key:"table",value:function(e){if(!R(this._allTables,e))throw new xr.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]}}]),e}(),Io="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Ro=function(){function e(t){o(this,e),this._subscribe=t}return a(e,[{key:"subscribe",value:function(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}},{key:Io,value:function(){return this}}]),e}();try{Po={indexedDB:Kn.indexedDB||Kn.mozIndexedDB||Kn.webkitIndexedDB||Kn.msIndexedDB,IDBKeyRange:Kn.IDBKeyRange||Kn.webkitIDBKeyRange}}catch(e){Po={indexedDB:null,IDBKeyRange:null}}var Do=To;D(Do,s({},Or,{delete:function(e){return new Do(e,{addons:[]}).delete()},exists:function(e){return new Do(e,{addons:[]}).open().then((function(e){return e.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(e){try{return function(e){var t=e.indexedDB,n=e.IDBKeyRange;return wt(t)?Promise.resolve(t.databases()).then((function(e){return e.map((function(e){return e.name})).filter((function(e){return"__dbnames"!==e}))})):bt(t,n).toCollection().primaryKeys()}(Do.dependencies).then(e)}catch(e){return no(new xr.MissingAPI)}},defineClass:function(){return function(e){I(this,e)}},ignoreTransaction:function(e){return Vr.trans?Pe(Vr.transless,e):e()},vip:_t,async:function(e){return function(){try{var t=St(e.apply(this,arguments));return t&&"function"==typeof t.then?t:se.resolve(t)}catch(e){return no(e)}}},spawn:function(e,t,n){try{var r=St(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:se.resolve(r)}catch(e){return no(e)}},currentTransaction:{get:function(){return Vr.trans||null}},waitFor:function(e,t){var n=se.resolve("function"==typeof e?Do.ignoreTransaction(e):e).timeout(t||6e4);return Vr.trans?Vr.trans.waitFor(n):n},Promise:se,debug:{get:function(){return dr},set:function(e){Z(e,"dexie"===e?function(){return!0}:lo)}},derive:M,extend:I,props:D,override:U,Events:Me,on:go,liveQuery:function(e){return new Ro((function(t){var n=function(){return qn(a).some((function(e){return i[e]&&function(e,t){var n=$t(t),r=n.next();if(r.done)return!1;for(var o=r.value,i=$t(e),a=i.next(o.from),u=a.value;!r.done&&!a.done;){if(ho(u.from,o.to)<=0&&ho(u.to,o.from)>=0)return!0;ho(o.from,u.from)<0?o=(r=n.next(u.from)).value:u=(a=i.next(o.from)).value}return!1}(i[e],a[e])}))},r=pr(e),o=!1,i={},a={},u={get closed(){return o},unsubscribe:function(){o=!0,go.storagemutated.unsubscribe(l)}};t.start&&t.start(u);var c=!1,s=!1,l=function(e){Tt(i,e),n()&&f()},f=function(){if(!c&&!o){i={};var p={},d=function(t){r&&Se();var n=function(){return xe(e,{subscr:t,trans:null})},o=Vr.trans?Pe(Vr.transless,n):n();return r&&o.then(Oe,Oe),o}(p);s||(go("storagemutated",l),s=!0),c=!0,Promise.resolve(d).then((function(e){c=!1,o||(n()?f():(i={},a=p,t.next&&t.next(e)))}),(function(e){c=!1,t.error&&t.error(e),u.unsubscribe()}))}};return f(),u}))},extendObservabilitySet:Tt,getByKeyPath:tr,setByKeyPath:nr,delByKeyPath:function(e,t){"string"==typeof t?nr(e,t,void 0):"length"in t&&[].map.call(t,(function(t){nr(e,t,void 0)}))},shallowClone:V,deepClone:W,getObjectDiff:Eo,cmp:ho,asap:z,minKey:-1/0,addons:[],connections:ao,errnames:wr,dependencies:Po,semVer:"3.2.1",version:"3.2.1".split(".").map((function(e){return parseInt(e)})).reduce((function(e,t,n){return e+t/Math.pow(10,2*n)}))})),Do.maxKey=wo(Do.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(go("storagemutated",(function(e){var t;Lo||(uo?(t=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,e):t=new CustomEvent("x-storagemutated-1",{detail:e}),Lo=!0,dispatchEvent(t),Lo=!1)})),addEventListener("x-storagemutated-1",(function(e){var t=e.detail;Lo||It(t)})));var Lo=!1;if("undefined"!=typeof BroadcastChannel){var Mo=new BroadcastChannel("x-storagemutated-1");go("storagemutated",(function(e){Lo||Mo.postMessage(e)})),Mo.onmessage=function(e){e.data&&It(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){go("storagemutated",(function(e){try{Lo||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&f(self.clients.matchAll({includeUncontrolled:!0})).forEach((function(t){return t.postMessage({type:"x-storagemutated-1",changedParts:e})})))}catch(e){}})),addEventListener("storage",(function(e){if("x-storagemutated-1"===e.key){var t=JSON.parse(e.newValue);t&&It(t.changedParts)}}));var No=self.document&&navigator.serviceWorker;No&&No.addEventListener("message",(function(e){var t=e.data;t&&"x-storagemutated-1"===t.type&&It(t.changedParts)}))}se.rejectionMapper=function(e,t){if(!e||c(e,Q)||c(e,TypeError)||c(e,SyntaxError)||!e.name||!Sr[e.name])return e;var n=new Sr[e.name](t||e.message,e);return"stack"in e&&L(n,"stack",{get:function(){return this.inner.stack}}),n},Z(dr,lo);var Uo=h(766),Bo=h(685);function zo(e){return(zo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Fo(e,t){return(Fo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Vo,Ho=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":p(e)},Wo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fo(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=zo(t);if(n){var o=zo(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Rt(this,e)});function o(){var e;return function(e,t){if(!c(e,t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,"EsmOffline")).version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),e.syncQueue=e.table("syncQueue"),e.dynamicOfflineData=e.table("dynamicOfflineData"),e}return o}(To),Ko=new Wo,qo={},Zo=(0,Bo.createGlobalStore)("offline-synchronization",{});function Go(){return Go=Nt(Mn().mark((function e(){var t,n,r,o,i,a,u,c,s,l,f,p,d;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Zo.getState().synchronization){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,Ko.syncQueue.count();case 4:t=e.sent,n={},r=Object.entries(qo),o=r.length,i={},a=new AbortController,u=function(){var e=Zo.getState().synchronization;Zo.setState({synchronization:Bt({},e,{pendingCount:e.pendingCount-1})})},e.prev=11,Zo.setState({synchronization:{totalCount:t,pendingCount:t,abortController:a}}),c=0;case 14:if(!(c<o&&r.length>0)){e.next=30;break}s=r.length;case 16:if(!s--){e.next=27;break}if(l=zt(r[s],2),f=l[0],p=l[1],!(d=p.dependsOn.map((function(e){return n[e]}))).every(Boolean)){e.next=25;break}return i[f]={},e.next=23,Promise.all(d);case 23:n[f]=Ht(p,i,a,u),r.splice(s,1);case 25:e.next=16;break;case 27:c++,e.next=14;break;case 30:return e.next=32,Promise.allSettled(Object.values(n));case 32:return e.prev=32,Zo.setState({synchronization:void 0}),e.finish(32);case 35:case"end":return e.stop()}}),e,null,[[11,,32,35]])}))),Go.apply(this,arguments)}function Qo(){return Qo=Nt(Mn().mark((function e(t,n,r,o){var i,a,u,c,s,l,f,p,d,h,v,y,m,g,b,w;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.type,a=t.dependsOn,u=t.process,c=[],s=[],e.next=5,Wt();case 5:return l=e.sent,e.next=8,Ko.syncQueue.where({type:i,userId:l}).each((function(e,t){c.push([t.primaryKey,e.content,e.descriptor]),s.push(e.content)}));case 8:f=0;case 9:if(!(f<c.length)){e.next=31;break}return p=zt(c[f],3),d=p[0],h=p[1],v=p[2],y=v.id,m=v.dependencies,g=void 0===m?[]:m,e.prev=11,e.next=14,u(h,{abort:r,index:f,items:s,userId:l,dependencies:g.map((function(e){var t=e.id,r=e.type;return a.includes(r)?n[r][t]:void 0}))});case 14:return b=e.sent,void 0!==y&&(n[i][y]=b),e.next=18,Ko.syncQueue.delete(d);case 18:e.next=25;break;case 20:return e.prev=20,e.t0=e.catch(11),e.next=25,Ko.syncQueue.update(d,{lastError:{name:null===e.t0||void 0===e.t0?void 0:e.t0.name,message:null!==(w=null===e.t0||void 0===e.t0?void 0:e.t0.message)&&void 0!==w?w:null===e.t0||void 0===e.t0?void 0:e.t0.toString()}});case 25:return e.prev=25,o(),e.finish(25);case 28:f++,e.next=9;break;case 31:case"end":return e.stop()}}),e,null,[[11,20,25,28]])}))),Qo.apply(this,arguments)}function Yo(){return(Yo=Nt(Mn().mark((function e(){var t;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Uo.getLoggedInUser)();case 2:return t=e.sent,e.abrupt("return",(null==t?void 0:t.uuid)||"*");case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Jo(){return(Jo=Nt(Mn().mark((function e(t,n,r,o){var i,a;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===(i=o&&o.id)){e.next=4;break}return e.next=4,Ko.syncQueue.where({type:n,userId:t}).filter((function(e){return(null==e?void 0:e.descriptor.id)===i})).delete().catch(To.errnames.DatabaseClosed);case 4:return e.next=6,Ko.syncQueue.add({type:n,content:r,userId:t,descriptor:o||{},createdOn:new Date}).catch(To.errnames.DatabaseClosed,(function(){return-1}));case 6:return a=e.sent,e.abrupt("return",a);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Xo(){return(Xo=Nt(Mn().mark((function e(t,n,r){var o;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wt();case 2:return o=e.sent,e.next=5,Kt(o,t,n,r);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ei(){return(ei=Nt(Mn().mark((function e(t,n){var r;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Gt(t,n);case 2:return r=e.sent,e.abrupt("return",r.map((function(e){return e.content})));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ti(){return(ti=Nt(Mn().mark((function e(t,n){var r;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n?{type:n,userId:t}:{userId:t},e.next=3,Ko.syncQueue.where(r).toArray().catch(To.errnames.DatabaseClosed,(function(){return[]}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ni(){return(ni=Nt(Mn().mark((function e(t){var n;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wt();case 2:return n=e.sent,e.next=5,Zt(n,t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ri(){return(ri=Nt(Mn().mark((function e(t){var n;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wt();case 2:return n=e.sent,e.next=5,Gt(n,t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function oi(){return(oi=Nt(Mn().mark((function e(t){return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ko.syncQueue.get(t).catch(To.errnames.DatabaseClosed,(function(){}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ii(){return(ii=Nt(Mn().mark((function e(t){var n,r,o;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Jt(t);case 3:if(r=e.sent){e.next=6;break}throw new Error("No sync item with the ID ".concat(t," exists."));case 6:if(o=null===(n=qo[r.type])||void 0===n?void 0:n.options.onBeginEditSyncItem){e.next=9;break}throw new Error("A sync item with the ID ".concat(t,' exists, but the associated handler (if one exists) doesn\'t support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "').concat(r.type,'" supports editing items.'));case 9:o(r);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ai(){return(ai=Nt(Mn().mark((function e(t){return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ko.syncQueue.delete(t).catch(To.errnames.DatabaseClosed);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}for(var ui=new Uint8Array(16),ci=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,si=function(e){return"string"==typeof e&&ci.test(e)},li=[],fi=0;fi<256;++fi)li.push((fi+256).toString(16).substr(1));var pi=function(e,t,n){var r=(e=e||{}).random||(e.rng||rn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(li[e[t+0]]+li[e[t+1]]+li[e[t+2]]+li[e[t+3]]+"-"+li[e[t+4]]+li[e[t+5]]+"-"+li[e[t+6]]+li[e[t+7]]+"-"+li[e[t+8]]+li[e[t+9]]+"-"+li[e[t+10]]+li[e[t+11]]+li[e[t+12]]+li[e[t+13]]+li[e[t+14]]+li[e[t+15]]).toLowerCase();if(!si(n))throw TypeError("Stringified UUID is invalid");return n}(r)},di="OFFLINE+",hi={};function vi(){return(vi=sn(Mn().mark((function e(t){var n;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_n();case 2:return n=e.sent,e.next=5,hn(n,t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function yi(){return(yi=sn(Mn().mark((function e(t,n){var r,o;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n?{type:n,users:t}:{users:t},o=new Wo,e.next=4,o.dynamicOfflineData.where(r).toArray().catch(To.errnames.DatabaseClosed,(function(){return[]}));case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mi(){return(mi=sn(Mn().mark((function e(t,n){var r;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_n();case 2:return r=e.sent,e.next=5,yn(r,t,n);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function gi(){return(gi=sn(Mn().mark((function e(t,n,r){var o,i;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new Wo,e.next=3,o.dynamicOfflineData.get({type:n,identifier:r}).catch(To.errnames.DatabaseClosed,(function(){}));case 3:if(i=e.sent){e.next=9;break}return e.next=7,o.dynamicOfflineData.add({users:[t],type:n,identifier:r}).catch(To.errnames.DatabaseClosed);case 7:e.next=12;break;case 9:if(i.users.includes(t)){e.next=12;break}return e.next=12,o.dynamicOfflineData.update(i.id,{users:ln(i.users).concat([t])}).catch(To.errnames.DatabaseClosed);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bi(){return(bi=sn(Mn().mark((function e(t,n){var r;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_n();case 2:return r=e.sent,e.next=5,gn(r,t,n);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wi(){return(wi=sn(Mn().mark((function e(t,n,r){var o,i;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new Wo,e.next=3,o.dynamicOfflineData.get({type:n,identifier:r,users:t}).catch(To.errnames.DatabaseClosed,(function(){}));case 3:if(!(i=e.sent)){e.next=12;break}if(!(i.users.length>1)){e.next=10;break}return e.next=8,o.dynamicOfflineData.update(i.id,{users:i.users.filter((function(e){return e!==t}))}).catch(To.errnames.DatabaseClosed);case 8:e.next=12;break;case 10:return e.next=12,o.dynamicOfflineData.delete(i.id).catch(To.errnames.DatabaseClosed);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _i(){return _i=sn(Mn().mark((function e(t,n){var r;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dn(t);case 2:return r=e.sent,e.next=5,Promise.all(r.map(function(){var e=sn(Mn().mark((function e(t){return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",wn(t.type,t.identifier,n));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:case"end":return e.stop()}}),e)}))),_i.apply(this,arguments)}function xi(){return xi=sn(Mn().mark((function e(t,n,r){var o,i,a,u,c,s,l,f,p;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vn(t,n);case 2:return o=new Wo,e.next=5,_n();case 5:return i=e.sent,e.next=8,o.dynamicOfflineData.get({type:t,identifier:n}).catch(To.errnames.DatabaseClosed,(function(){}));case 8:if(a=e.sent,u=fn().filter((function(e){return e.type===t})),a){e.next=12;break}return e.abrupt("return");case 12:return e.next=14,Promise.all(u.map(function(){var e=sn(Mn().mark((function e(t){var o,i,a;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.sync(n,r),e.abrupt("return",{id:t.id,error:void 0});case 5:return e.prev=5,e.t0=e.catch(0),a=null!==(i=null===(o=e.t0.message)||void 0===o?void 0:o.toString())&&void 0!==i?i:e.t0.toString(),e.abrupt("return",{id:t.id,error:a});case 11:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}()));case 14:if(c=e.sent,s=c.filter((function(e){return!e.error})).map((function(e){return e.id})),l=c.filter((function(e){return e.error})).map((function(e){return e.id})),f=c.filter((function(e){return e.error})).map((function(e){return{handlerId:e.id,message:e.error}})),p={syncedOn:new Date,syncedBy:i,succeededHandlers:s,erroredHandlers:l,errors:f},!a.id){e.next=22;break}return e.next=22,o.dynamicOfflineData.update(a.id,{syncState:p}).catch(To.errnames.DatabaseClosed);case 22:case"end":return e.stop()}}),e)}))),xi.apply(this,arguments)}function Si(){return(Si=sn(Mn().mark((function e(){var t;return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Uo.getLoggedInUser)();case 2:if(t=e.sent.uuid){e.next=5;break}throw new Error("Using the dynamic offline data API requires a logged in user.");case 5:return e.abrupt("return",t);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Oi=(0,Bo.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function Ei(){return(Ei=Sn(Mn().mark((function e(t){return Mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return jn(),e.next=3,wn("patient",t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}}(),v}())}}}))},336:(e,t,n)=>{function r(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}e=n.nmd(e);var o=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};System.register(["react","@openmrs/esm-config","@openmrs/esm-extensions","@openmrs/esm-globals","react-dom","i18next","react-i18next","@openmrs/esm-api","dayjs"],(function(i,a){var u={},c={},s={},l={},f={},p={},d={},h={},v={};return{setters:[function(e){u.createContext=e.createContext,u.createElement=e.createElement,u.default=e.default,u.useCallback=e.useCallback,u.useContext=e.useContext,u.useDebugValue=e.useDebugValue,u.useEffect=e.useEffect,u.useLayoutEffect=e.useLayoutEffect,u.useMemo=e.useMemo,u.useReducer=e.useReducer,u.useRef=e.useRef,u.useState=e.useState},function(e){c.getConfigStore=e.getConfigStore,c.getExtensionConfigFromStore=e.getExtensionConfigFromStore,c.getExtensionsConfigStore=e.getExtensionsConfigStore,c.interpolateUrl=e.interpolateUrl,c.navigate=e.navigate},function(e){s.getConnectedExtensions=e.getConnectedExtensions,s.getExtensionInternalStore=e.getExtensionInternalStore,s.getExtensionStore=e.getExtensionStore,s.registerExtensionSlot=e.registerExtensionSlot,s.renderExtension=e.renderExtension},function(e){l.subscribeConnectivityChanged=e.subscribeConnectivityChanged},function(e){f.default=e.default},function(e){p.default=e.default},function(e){d.I18nextProvider=e.I18nextProvider},function(e){h.defaultVisitCustomRepresentation=e.defaultVisitCustomRepresentation,h.fetchCurrentPatient=e.fetchCurrentPatient,h.getCurrentUser=e.getCurrentUser,h.getLocations=e.getLocations,h.getSessionStore=e.getSessionStore,h.getVisitTypes=e.getVisitTypes,h.openmrsFetch=e.openmrsFetch,h.userHasAccess=e.userHasAccess},function(e){v.default=e.default}],execute:function(){i(function(){var i={332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},891:function(e,t,n){var i;e=n.nmd(e),function(){var a,u=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},c=function(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r},s=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},l=function(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e},f=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0},p=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i},d=function(e,t){return!(null==e||!e.length)&&x(e,t,0)>-1},h=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},v=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},y=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},m=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n},g=function(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n},b=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},w=function(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r},_=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1},x=function(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):_(e,O,n)},S=function(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1},O=function(e){return e!=e},E=function(e,t){var n=null==e?0:e.length;return n?$(e,t)/n:ee},k=function(e){return function(t){return null==t?a:t[e]}},j=function(e){return function(t){return null==e?a:e[t]}},C=function(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n},$=function(e,t){for(var n,r=-1,o=e.length;++r<o;){var i=t(e[r]);i!==a&&(n=n===a?i:n+i)}return n},P=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},A=function(e){return e?e.slice(0,K(e)+1).replace(We,""):e},T=function(e){return function(t){return e(t)}},I=function(e,t){return v(t,(function(t){return e[t]}))},R=function(e,t){return e.has(t)},D=function(e,t){for(var n=-1,r=e.length;++n<r&&x(t,e[n],0)>-1;);return n},L=function(e,t){for(var n=e.length;n--&&x(t,e[n],0)>-1;);return n},M=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r},N=function(e){return"\\"+Ft[e]},U=function(e){return Lt.test(e)},B=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},z=function(e,t){return function(n){return e(t(n))}},F=function(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==G||(e[n]=G,i[o++]=n)}return i},V=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},H=function(e){return U(e)?function(e){for(var t=Rt.lastIndex=0;Rt.test(e);)++t;return t}(e):an(e)},W=function(e){return U(e)?e.match(Rt)||[]:e.split("")},K=function(e){for(var t=e.length;t--&&Ke.test(e.charAt(t)););return t},q="Expected a function",Z="__lodash_hash_undefined__",G="__lodash_placeholder__",Q=32,Y=128,J=1/0,X=9007199254740991,ee=NaN,te=4294967295,ne=[["ary",Y],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",Q],["partialRight",64],["rearg",256]],re="[object Arguments]",oe="[object Array]",ie="[object Boolean]",ae="[object Date]",ue="[object Error]",ce="[object Function]",se="[object GeneratorFunction]",le="[object Map]",fe="[object Number]",pe="[object Object]",de="[object Promise]",he="[object RegExp]",ve="[object Set]",ye="[object String]",me="[object Symbol]",ge="[object WeakMap]",be="[object ArrayBuffer]",we="[object DataView]",_e="[object Float32Array]",xe="[object Float64Array]",Se="[object Int8Array]",Oe="[object Int16Array]",Ee="[object Int32Array]",ke="[object Uint8Array]",je="[object Uint8ClampedArray]",Ce="[object Uint16Array]",$e="[object Uint32Array]",Pe=/\b__p \+= '';/g,Ae=/\b(__p \+=) '' \+/g,Te=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ie=/&(?:amp|lt|gt|quot|#39);/g,Re=/[&<>"']/g,De=RegExp(Ie.source),Le=RegExp(Re.source),Me=/<%-([\s\S]+?)%>/g,Ne=/<%([\s\S]+?)%>/g,Ue=/<%=([\s\S]+?)%>/g,Be=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ze=/^\w*$/,Fe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ve=/[\\^$.*+?()[\]{}|]/g,He=RegExp(Ve.source),We=/^\s+/,Ke=/\s/,qe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ze=/\{\n\/\* \[wrapped with (.+)\] \*/,Ge=/,? & /,Qe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ye=/[()=,{}\[\]\/\s]/,Je=/\\(\\)?/g,Xe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,et=/\w*$/,tt=/^[-+]0x[0-9a-f]+$/i,nt=/^0b[01]+$/i,rt=/^\[object .+?Constructor\]$/,ot=/^0o[0-7]+$/i,it=/^(?:0|[1-9]\d*)$/,at=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ut=/($^)/,ct=/['\n\r\u2028\u2029\\]/g,st="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",lt="a-z\\xdf-\\xf6\\xf8-\\xff",ft="A-Z\\xc0-\\xd6\\xd8-\\xde",pt="\\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",dt="["+pt+"]",ht="["+st+"]",vt="\\d+",yt="["+lt+"]",mt="[^\ud800-\udfff"+pt+vt+"\\u2700-\\u27bf"+lt+ft+"]",gt="\ud83c[\udffb-\udfff]",bt="[^\ud800-\udfff]",wt="(?:\ud83c[\udde6-\uddff]){2}",_t="[\ud800-\udbff][\udc00-\udfff]",xt="["+ft+"]",St="(?:"+yt+"|"+mt+")",Ot="(?:"+xt+"|"+mt+")",Et="(?:['’](?:d|ll|m|re|s|t|ve))?",kt="(?:['’](?:D|LL|M|RE|S|T|VE))?",jt="(?:"+ht+"|"+gt+")?",Ct="[\\ufe0e\\ufe0f]?",$t=Ct+jt+"(?:\\u200d(?:"+[bt,wt,_t].join("|")+")"+Ct+jt+")*",Pt="(?:"+["[\\u2700-\\u27bf]",wt,_t].join("|")+")"+$t,At="(?:"+[bt+ht+"?",ht,wt,_t,"[\ud800-\udfff]"].join("|")+")",Tt=RegExp("['’]","g"),It=RegExp(ht,"g"),Rt=RegExp(gt+"(?="+gt+")|"+At+$t,"g"),Dt=RegExp([xt+"?"+yt+"+"+Et+"(?="+[dt,xt,"$"].join("|")+")",Ot+"+"+kt+"(?="+[dt,xt+St,"$"].join("|")+")",xt+"?"+St+"+"+Et,xt+"+"+kt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vt,Pt].join("|"),"g"),Lt=RegExp("[\\u200d\ud800-\udfff"+st+"\\ufe0e\\ufe0f]"),Mt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ut=-1,Bt={};Bt[_e]=Bt[xe]=Bt[Se]=Bt[Oe]=Bt[Ee]=Bt[ke]=Bt[je]=Bt[Ce]=Bt[$e]=!0,Bt[re]=Bt[oe]=Bt[be]=Bt[ie]=Bt[we]=Bt[ae]=Bt[ue]=Bt[ce]=Bt[le]=Bt[fe]=Bt[pe]=Bt[he]=Bt[ve]=Bt[ye]=Bt[ge]=!1;var zt={};zt[re]=zt[oe]=zt[be]=zt[we]=zt[ie]=zt[ae]=zt[_e]=zt[xe]=zt[Se]=zt[Oe]=zt[Ee]=zt[le]=zt[fe]=zt[pe]=zt[he]=zt[ve]=zt[ye]=zt[me]=zt[ke]=zt[je]=zt[Ce]=zt[$e]=!0,zt[ue]=zt[ce]=zt[ge]=!1;var Ft={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vt=parseFloat,Ht=parseInt,Wt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Kt="object"==typeof self&&self&&self.Object===Object&&self,qt=Wt||Kt||Function("return this")(),Zt=t&&!t.nodeType&&t,Gt=Zt&&e&&!e.nodeType&&e,Qt=Gt&&Gt.exports===Zt,Yt=Qt&&Wt.process,Jt=function(){try{return Gt&&Gt.require&&Gt.require("util").types||Yt&&Yt.binding&&Yt.binding("util")}catch(e){}}(),Xt=Jt&&Jt.isArrayBuffer,en=Jt&&Jt.isDate,tn=Jt&&Jt.isMap,nn=Jt&&Jt.isRegExp,rn=Jt&&Jt.isSet,on=Jt&&Jt.isTypedArray,an=k("length"),un=j({À:"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"}),cn=j({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),sn=j({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),ln=function e(t){var n,i,j=function(e){if(Po(e)&&!Pu(e)&&!r(e,lt)){if(r(e,st))return e;if(bi.call(e,"__wrapped__"))return no(e)}return new st(e)},Ke=function(){},st=function(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=a},lt=function(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]},ft=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},pt=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},dt=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},ht=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new dt;++t<n;)this.add(e[t])},vt=function(e){var t=this.__data__=new pt(e);this.size=t.size},yt=function(e,t){var n=Pu(e),r=!n&&$u(e),o=!n&&!r&&Tu(e),i=!n&&!r&&!o&&Mu(e),a=n||r||o||i,u=a?P(e.length,pi):[],c=u.length;for(var s in e)!t&&!bi.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Br(s,c))||u.push(s);return u},mt=function(e){var t=e.length;return t?e[Cn(0,t-1)]:a},gt=function(e,t){return Xr(or(e),jt(t,0,e.length))},bt=function(e){return Xr(or(e))},wt=function(e,t,n){(n!==a&&!xo(e[t],n)||n===a&&!(t in e))&&Et(e,t,n)},_t=function(e,t,n){var r=e[t];bi.call(e,t)&&xo(r,n)&&(n!==a||t in e)||Et(e,t,n)},xt=function(e,t){for(var n=e.length;n--;)if(xo(e[n][0],t))return n;return-1},St=function(e,t,n,r){return ga(e,(function(e,o,i){t(r,e,n(e),i)})),r},Ot=function(e,t){return e&&ir(t,Ho(t),e)},Et=function(e,t,n){"__proto__"==t&&Mi?Mi(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},kt=function(e,t){for(var n=-1,r=t.length,o=ii(r),i=null==e;++n<r;)o[n]=i?a:Fo(e,t[n]);return o},jt=function(e,t,n){return e==e&&(n!==a&&(e=e<=n?e:n),t!==a&&(e=e>=t?e:t)),e},Ct=function(e,t,n){var r=n.length;if(null==e)return!r;for(e=li(e);r--;){var o=n[r],i=t[o],u=e[o];if(u===a&&!(o in e)||!i(u))return!1}return!0},$t=function(e,t,n){if("function"!=typeof e)throw new di(q);return za((function(){e.apply(a,n)}),t)},Pt=function(e,t,n,r){var o=-1,i=d,a=!0,u=e.length,c=[],s=t.length;if(!u)return c;n&&(t=v(t,T(n))),r?(i=h,a=!1):t.length>=200&&(i=R,a=!1,t=new ht(t));e:for(;++o<u;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=s;p--;)if(t[p]===f)continue e;c.push(l)}else i(t,f,r)||c.push(l)}return c},At=function(e,t){var n=!0;return ga(e,(function(e,r,o){return n=!!t(e,r,o)})),n},Rt=function(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],u=t(i);if(null!=u&&(c===a?u==u&&!Ro(u):n(u,c)))var c=u,s=i}return s},Lt=function(e,t){var n=[];return ga(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n},Ft=function(e,t){return e&&_a(e,t,Ho)},Wt=function(e,t){return e&&xa(e,t,Ho)},Kt=function(e,t){return p(t,(function(t){return ko(e[t])}))},Zt=function(e,t){for(var n=0,r=(t=Qn(t,e)).length;null!=e&&n<r;)e=e[eo(t[n++])];return n&&n==r?e:a},Gt=function(e,t,n){var r=t(e);return Pu(e)?r:y(r,n(e))},Yt=function(e){return null==e?e===a?"[object Undefined]":"[object Null]":Li&&Li in li(e)?function(e){var t=bi.call(e,Li),n=e[Li];try{e[Li]=a;var r=!0}catch(e){}var o=xi.call(e);return r&&(t?e[Li]=n:delete e[Li]),o}(e):(t=e,xi.call(t));var t},Jt=function(e,t){return e>t},an=function(e,t){return null!=e&&bi.call(e,t)},fn=function(e,t){return null!=e&&t in li(e)},pn=function(e,t,n){for(var r=n?h:d,o=e[0].length,i=e.length,u=i,c=ii(i),s=1/0,l=[];u--;){var f=e[u];u&&t&&(f=v(f,T(t))),s=Gi(f.length,s),c[u]=!n&&(t||o>=120&&f.length>=120)?new ht(u&&f):a}f=e[0];var p=-1,y=c[0];e:for(;++p<o&&l.length<s;){var m=f[p],g=t?t(m):m;if(m=n||0!==m?m:0,!(y?R(y,g):r(l,g,n))){for(u=i;--u;){var b=c[u];if(!(b?R(b,g):r(e[u],g,n)))continue e}y&&y.push(g),l.push(m)}}return l},dn=function(e,t,n){var r=null==(e=Zr(e,t=Qn(t,e)))?e:e[eo(uo(t))];return null==r?a:u(r,e,n)},hn=function(e){return Po(e)&&Yt(e)==re},vn=function(e,t,n,r){var o=n.length,i=o,u=!r;if(null==e)return!i;for(e=li(e);o--;){var c=n[o];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++o<i;){var s=(c=n[o])[0],l=e[s],f=c[1];if(u&&c[2]){if(l===a&&!(s in e))return!1}else{var p=new vt;if(r)var d=r(l,f,s,e,t,p);if(!(d===a?Sa(f,l,3,r,p):d))return!1}}return!0},yn=function(e){return!(!$o(e)||(t=e,_i&&_i in t))&&(ko(e)?Ei:rt).test(to(e));var t},mn=function(e){return"function"==typeof e?e:null==e?Jo:"object"==typeof e?Pu(e)?xn(e[0],e[1]):_n(e):ni(e)},gn=function(e){if(!Hr(e))return qi(e);var t=[];for(var n in li(e))bi.call(e,n)&&"constructor"!=n&&t.push(n);return t},bn=function(e,t){return e<t},wn=function(e,t){var n=-1,r=So(e)?ii(e.length):[];return ga(e,(function(e,o,i){r[++n]=t(e,o,i)})),r},_n=function(e){var t=Dr(e);return 1==t.length&&t[0][2]?Kr(t[0][0],t[0][1]):function(n){return n===e||vn(n,e,t)}},xn=function(e,t){return Fr(e)&&Wr(t)?Kr(eo(e),t):function(n){var r=Fo(n,e);return r===a&&r===t?Vo(n,e):Sa(t,r,3)}},Sn=function(e,t){var n=e.length;if(n)return Br(t+=t<0?n:0,n)?e[t]:a},On=function(e,t,n){t=t.length?v(t,(function(e){return Pu(e)?function(t){return Zt(t,1===e.length?e[0]:e)}:e})):[Jo];var r=-1;return t=v(t,T(Ir())),function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,u=n.length;++r<a;){var c=tr(o[r],i[r]);if(c)return r>=u?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(wn(e,(function(e,n,o){return{criteria:v(t,(function(t){return t(e)})),index:++r,value:e}})))},En=function(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],u=Zt(e,a);n(u,a)&&In(i,Qn(a,e),u)}return i},kn=function(e,t,n,r){var o=r?S:x,i=-1,a=t.length,u=e;for(e===t&&(t=or(t)),n&&(u=v(e,T(n)));++i<a;)for(var c=0,s=t[i],l=n?n(s):s;(c=o(u,l,c,r))>-1;)u!==e&&Ii.call(u,c,1),Ii.call(e,c,1);return e},jn=function(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;Br(o)?Ii.call(e,o,1):Fn(e,o)}}return e},Cn=function(e,t){return e+Fi(Ji()*(t-e+1))},$n=function(e,t){var n="";if(!e||t<1||t>X)return n;do{t%2&&(n+=e),(t=Fi(t/2))&&(e+=e)}while(t);return n},Pn=function(e,t){return Fa(qr(e,t,Jo),e+"")},An=function(e){return mt(qo(e))},Tn=function(e,t){var n=qo(e);return Xr(n,jt(t,0,n.length))},In=function(e,t,n,r){if(!$o(e))return e;for(var o=-1,i=(t=Qn(t,e)).length,u=i-1,c=e;null!=c&&++o<i;){var s=eo(t[o]),l=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(o!=u){var f=c[s];(l=r?r(f,s,c):a)===a&&(l=$o(f)?f:Br(t[o+1])?[]:{})}_t(c,s,l),c=c[s]}return e},Rn=function(e){return Xr(qo(e))},Dn=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=ii(o);++r<o;)i[r]=e[r+t];return i},Ln=function(e,t){var n;return ga(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n},Mn=function(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!Ro(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return Nn(e,t,Jo,n)},Nn=function(e,t,n,r){var o=0,i=null==e?0:e.length;if(0===i)return 0;for(var u=(t=n(t))!=t,c=null===t,s=Ro(t),l=t===a;o<i;){var f=Fi((o+i)/2),p=n(e[f]),d=p!==a,h=null===p,v=p==p,y=Ro(p);if(u)var m=r||v;else m=l?v&&(r||d):c?v&&d&&(r||!h):s?v&&d&&!h&&(r||!y):!h&&!y&&(r?p<=t:p<t);m?o=f+1:i=f}return Gi(i,4294967294)},Un=function(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],u=t?t(a):a;if(!n||!xo(u,c)){var c=u;i[o++]=0===a?0:a}}return i},Bn=function(e){return"number"==typeof e?e:Ro(e)?ee:+e},zn=function(e,t,n){var r=-1,o=d,i=e.length,a=!0,u=[],c=u;if(n)a=!1,o=h;else if(i>=200){var s=t?null:Aa(e);if(s)return V(s);a=!1,o=R,c=new ht}else c=t?[]:u;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=c.length;p--;)if(c[p]===f)continue e;t&&c.push(f),u.push(l)}else o(c,f,n)||(c!==u&&c.push(f),u.push(l))}return u},Fn=function(e,t){return null==(e=Zr(e,t=Qn(t,e)))||delete e[eo(uo(t))]},Vn=function(e,t,n,r){return In(e,t,n(Zt(e,t)),r)},Hn=function(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?Dn(e,r?0:i,r?i+1:o):Dn(e,r?i+1:0,r?o:i)},Wn=function(e,t){var n=e;return r(n,lt)&&(n=n.value()),m(t,(function(e,t){return t.func.apply(t.thisArg,y([e],t.args))}),n)},Kn=function(e,t,n){var r=e.length;if(r<2)return r?zn(e[0]):[];for(var o=-1,i=ii(r);++o<r;)for(var a=e[o],u=-1;++u<r;)u!=o&&(i[o]=Pt(i[o]||a,e[u],t,n));return zn(wa(i,1),t,n)},qn=function(e,t,n){for(var r=-1,o=e.length,i=t.length,u={};++r<o;){var c=r<i?t[r]:a;n(u,e[r],c)}return u},Zn=function(e){return Oo(e)?e:[]},Gn=function(e){return"function"==typeof e?e:Jo},Qn=function(e,t){return Pu(e)?e:Fr(e,t)?[e]:Va(zo(e))},Yn=function(e,t,n){var r=e.length;return n=n===a?r:n,!t&&n>=r?e:Dn(e,t,n)},Jn=function(e,t){if(t)return e.slice();var n=e.length,r=$i?$i(n):new e.constructor(n);return e.copy(r),r},Xn=function(e){var t=new e.constructor(e.byteLength);return new Ci(t).set(new Ci(e)),t},er=function(e,t){var n=t?Xn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},tr=function(e,t){if(e!==t){var n=e!==a,r=null===e,o=e==e,i=Ro(e),u=t!==a,c=null===t,s=t==t,l=Ro(t);if(!c&&!l&&!i&&e>t||i&&u&&s&&!c&&!l||r&&u&&s||!n&&s||!o)return 1;if(!r&&!i&&!l&&e<t||l&&n&&o&&!r&&!i||c&&n&&o||!u&&o||!s)return-1}return 0},nr=function(e,t,n,r){for(var o=-1,i=e.length,a=n.length,u=-1,c=t.length,s=Zi(i-a,0),l=ii(c+s),f=!r;++u<c;)l[u]=t[u];for(;++o<a;)(f||o<i)&&(l[n[o]]=e[o]);for(;s--;)l[u++]=e[o++];return l},rr=function(e,t,n,r){for(var o=-1,i=e.length,a=-1,u=n.length,c=-1,s=t.length,l=Zi(i-u,0),f=ii(l+s),p=!r;++o<l;)f[o]=e[o];for(var d=o;++c<s;)f[d+c]=t[c];for(;++a<u;)(p||o<i)&&(f[d+n[a]]=e[o++]);return f},or=function(e,t){var n=-1,r=e.length;for(t||(t=ii(r));++n<r;)t[n]=e[n];return t},ir=function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,u=t.length;++i<u;){var c=t[i],s=r?r(n[c],e[c],c,n,e):a;s===a&&(s=e[c]),o?Et(n,c,s):_t(n,c,s)}return n},ar=function(e,t){return function(n,r){var o=Pu(n)?c:St,i=t?t():{};return o(n,e,Ir(r,2),i)}},ur=function(e){return Pn((function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:a,u=o>2?n[2]:a;for(i=e.length>3&&"function"==typeof i?(o--,i):a,u&&zr(n[0],n[1],u)&&(i=o<3?a:i,o=1),t=li(t);++r<o;){var c=n[r];c&&e(t,c,r,i)}return t}))},cr=function(e,t){return function(n,r){if(null==n)return n;if(!So(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=li(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}},sr=function(e){return function(t,n,r){for(var o=-1,i=li(t),a=r(t),u=a.length;u--;){var c=a[e?u:++o];if(!1===n(i[c],c,i))break}return t}},lr=function(e){return function(t){var n=U(t=zo(t))?W(t):a,r=n?n[0]:t.charAt(0),o=n?Yn(n,1).join(""):t.slice(1);return r[e]()+o}},fr=function(e){return function(t){return m(Qo(Go(t).replace(Tt,"")),e,"")}},pr=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=ya(e.prototype),r=e.apply(n,t);return $o(r)?r:n}},dr=function(e){return function(t,n,r){var o=li(t);if(!So(t)){var i=Ir(n,3);t=Ho(t),n=function(e){return i(o[e],e,o)}}var u=e(t,n,r);return u>-1?o[i?t[u]:u]:a}},hr=function(e){return Cr((function(t){var n=t.length,r=n,o=st.prototype.thru;for(e&&t.reverse();r--;){var i=t[r];if("function"!=typeof i)throw new di(q);if(o&&!u&&"wrapper"==Ar(i))var u=new st([],!0)}for(r=u?r:n;++r<n;){var c=Ar(i=t[r]),s="wrapper"==c?Ia(i):a;u=s&&Vr(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?u[Ar(s[0])].apply(u,s[3]):1==i.length&&Vr(i)?u[c]():u.thru(i)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Pu(r))return u.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))},vr=function(e,t){return function(n,r){return o=n,i=e,a=t(r),u={},Ft(o,(function(e,t,n){i(u,a(e),t,n)})),u;var o,i,a,u}},yr=function(e,t){return function(n,r){var o;if(n===a&&r===a)return t;if(n!==a&&(o=n),r!==a){if(o===a)return r;"string"==typeof n||"string"==typeof r?(n=ja(n),r=ja(r)):(n=Bn(n),r=Bn(r)),o=e(n,r)}return o}},mr=function(e){return Cr((function(t){return t=v(t,T(Ir())),Pn((function(n){var r=this;return e(t,(function(e){return u(e,r,n)}))}))}))},gr=function(e,t){var n=(t=t===a?" ":ja(t)).length;if(n<2)return n?$n(t,e):t;var r=$n(t,zi(e/H(t)));return U(t)?Yn(W(r),0,e).join(""):r.slice(0,e)},br=function(e){return function(t,n,r){return r&&"number"!=typeof r&&zr(t,n,r)&&(n=r=a),t=Lo(t),n===a?(n=t,t=0):n=Lo(n),function(e,t,n,r){for(var o=-1,i=Zi(zi((t-e)/(n||1)),0),a=ii(i);i--;)a[r?i:++o]=e,e+=n;return a}(t,n,r=r===a?t<n?1:-1:Lo(r),e)}},wr=function(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Uo(t),n=Uo(n)),e(t,n)}},_r=function(e,t,n,r,o,i,u,c,s,l){var f=8&t;t|=f?Q:64,4&(t&=~(f?64:Q))||(t&=-4);var p=[e,t,o,f?i:a,f?u:a,f?a:i,f?a:u,c,s,l],d=n.apply(a,p);return Vr(e)&&Ba(d,p),d.placeholder=r,Yr(d,e,t)},xr=function(e){var t=si[e];return function(e,n){if(e=Uo(e),(n=null==n?0:Gi(Mo(n),292))&&Wi(e)){var r=(zo(e)+"e").split("e");return+((r=(zo(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}},Sr=function(e){return function(t){var n,r,o=La(t);return o==le?B(t):o==ve?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):(n=t,r=e(t),v(r,(function(e){return[e,n[e]]})))}},Or=function(e,t,n,o,i,c,s,l){var f=2&t;if(!f&&"function"!=typeof e)throw new di(q);var p=o?o.length:0;if(p||(t&=-97,o=i=a),s=s===a?s:Zi(Mo(s),0),l=l===a?l:Mo(l),p-=i?i.length:0,64&t){var d=o,h=i;o=i=a}var v,y,m,g,b=f?a:Ia(e),w=[e,t,n,o,i,d,h,c,s,l];if(b&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==Y&&8==n||r==Y&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?nr(c,u,t[4]):u,e[4]=c?F(e[3],G):t[4]}(u=t[5])&&(c=e[5],e[5]=c?rr(c,u,t[6]):u,e[6]=c?F(e[5],G):t[6]),(u=t[7])&&(e[7]=u),r&Y&&(e[8]=null==e[8]?t[8]:Gi(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(w,b),e=w[0],t=w[1],n=w[2],o=w[3],i=w[4],!(l=w[9]=w[9]===a?f?0:e.length:Zi(w[9]-p,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?(y=t,m=l,g=pr(v=e),function e(){for(var t=arguments.length,n=ii(t),o=t,i=Tr(e);o--;)n[o]=arguments[o];var c=t<3&&n[0]!==i&&n[t-1]!==i?[]:F(n,i);return(t-=c.length)<m?_r(v,y,Pa,e.placeholder,a,n,c,a,a,m-t):u(this&&this!==qt&&r(this,e)?g:v,this,n)}):t!=Q&&33!=t||i.length?Pa.apply(a,w):function(e,t,n,o){var i=1&t,a=pr(e);return function t(){for(var c=-1,s=arguments.length,l=-1,f=o.length,p=ii(f+s),d=this&&this!==qt&&r(this,t)?a:e;++l<f;)p[l]=o[l];for(;s--;)p[l++]=arguments[++c];return u(d,i?n:this,p)}}(e,t,n,o);else var _=function(e,t,n){var o=1&t,i=pr(e);return function t(){return(this&&this!==qt&&r(this,t)?i:e).apply(o?n:this,arguments)}}(e,t,n);return Yr((b?Ea:Ba)(_,w),e,t)},Er=function(e,t,n,r){return e===a||xo(e,yi[n])&&!bi.call(r,n)?t:e},kr=function(e){return To(e)?a:e},jr=function(e,t,n,r,o,i){var u=1&n,c=e.length,s=t.length;if(c!=s&&!(u&&s>c))return!1;var l=i.get(e),f=i.get(t);if(l&&f)return l==t&&f==e;var p=-1,d=!0,h=2&n?new ht:a;for(i.set(e,t),i.set(t,e);++p<c;){var v=e[p],y=t[p];if(r)var m=u?r(y,v,p,t,e,i):r(v,y,p,e,t,i);if(m!==a){if(m)continue;d=!1;break}if(h){if(!b(t,(function(e,t){if(!R(h,t)&&(v===e||o(v,e,n,r,i)))return h.push(t)}))){d=!1;break}}else if(v!==y&&!o(v,y,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d},Cr=function(e){return Fa(qr(e,a,io),e+"")},$r=function(e){return Gt(e,Ho,Ra)},Pr=function(e){return Gt(e,Wo,Da)},Ar=function(e){for(var t=e.name+"",n=ua[t],r=bi.call(ua,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t},Tr=function(e){return(bi.call(j,"placeholder")?j:e).placeholder},Ir=function(){var e=j.iteratee||Xo;return e=e===Xo?mn:e,arguments.length?e(arguments[0],arguments[1]):e},Rr=function(e,t){var n,r,i=e.__data__;return("string"==(r=o(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map},Dr=function(e){for(var t=Ho(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Wr(o)]}return t},Lr=function(e,t){var n,r=null==(n=e)?a:n[t];return yn(r)?r:a},Mr=function(e,t,n){for(var r=-1,o=(t=Qn(t,e)).length,i=!1;++r<o;){var a=eo(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Co(o)&&Br(a,o)&&(Pu(e)||$u(e))},Nr=function(e){return"function"!=typeof e.constructor||Hr(e)?{}:ya(Pi(e))},Ur=function(e){return Pu(e)||$u(e)||!!(Ri&&e&&e[Ri])},Br=function(e,t){var n=void 0===e?"undefined":o(e);return!!(t=null==t?X:t)&&("number"==n||"symbol"!=n&&it.test(e))&&e>-1&&e%1==0&&e<t},zr=function(e,t,n){if(!$o(n))return!1;var r=void 0===t?"undefined":o(t);return!!("number"==r?So(n)&&Br(t,n.length):"string"==r&&t in n)&&xo(n[t],e)},Fr=function(e,t){if(Pu(e))return!1;var n=void 0===e?"undefined":o(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ro(e))||ze.test(e)||!Be.test(e)||null!=t&&e in li(t)},Vr=function(e){var t=Ar(e),n=j[t];if("function"!=typeof n||!(t in lt.prototype))return!1;if(e===n)return!0;var r=Ia(n);return!!r&&e===r[0]},Hr=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||yi)},Wr=function(e){return e==e&&!$o(e)},Kr=function(e,t){return function(n){return null!=n&&n[e]===t&&(t!==a||e in li(n))}},qr=function(e,t,n){return t=Zi(t===a?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=Zi(r.length-t,0),a=ii(i);++o<i;)a[o]=r[t+o];o=-1;for(var c=ii(t+1);++o<t;)c[o]=r[o];return c[t]=n(a),u(e,this,c)}},Zr=function(e,t){return t.length<2?e:Zt(e,Dn(t,0,-1))},Gr=function(e,t){for(var n=e.length,r=Gi(t.length,n),o=or(e);r--;){var i=t[r];e[r]=Br(i,n)?o[i]:a}return e},Qr=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},Yr=function(e,t,n){var r,o,i,a=t+"";return Fa(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(qe,"{\n/* [wrapped with "+t+"] */\n")}(a,(o=(r=a.match(Ze))?r[1].split(Ge):[],i=n,s(ne,(function(e){var t="_."+e[0];i&e[1]&&!d(o,t)&&o.push(t)})),o.sort())))},Jr=function(e){var t=0,n=0;return function(){var r=Qi(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(a,arguments)}},Xr=function(e,t){var n=-1,r=e.length,o=r-1;for(t=t===a?r:t;++n<t;){var i=Cn(n,o),u=e[i];e[i]=e[n],e[n]=u}return e.length=t,e},eo=function(e){if("string"==typeof e||Ro(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},to=function(e){if(null!=e){try{return gi.call(e)}catch(e){}try{return e+""}catch(e){}}return""},no=function(e){if(r(e,lt))return e.clone();var t=new st(e.__wrapped__,e.__chain__);return t.__actions__=or(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t},ro=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Mo(n);return o<0&&(o=Zi(r+o,0)),_(e,Ir(t,3),o)},oo=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==a&&(o=Mo(n),o=n<0?Zi(r+o,0):Gi(o,r-1)),_(e,Ir(t,3),o,!0)},io=function(e){return null!=e&&e.length?wa(e,1):[]},ao=function(e){return e&&e.length?e[0]:a},uo=function(e){var t=null==e?0:e.length;return t?e[t-1]:a},co=function(e,t){return e&&e.length&&t&&t.length?kn(e,t):e},so=function(e){return null==e?e:Xi.call(e)},lo=function(e){if(!e||!e.length)return[];var t=0;return e=p(e,(function(e){if(Oo(e))return t=Zi(e.length,t),!0})),P(t,(function(t){return v(e,k(t))}))},fo=function(e,t){if(!e||!e.length)return[];var n=lo(e);return null==t?n:v(n,(function(e){return u(t,a,e)}))},po=function(e){var t=j(e);return t.__chain__=!0,t},ho=function(e,t){return t(e)},vo=function(e,t){return(Pu(e)?s:ga)(e,Ir(t,3))},yo=function(e,t){return(Pu(e)?l:ba)(e,Ir(t,3))},mo=function(e,t){return(Pu(e)?v:wn)(e,Ir(t,3))},go=function(e,t,n){return t=n?a:t,t=e&&null==t?e.length:t,Or(e,Y,a,a,a,a,t)},bo=function(e,t){var n;if("function"!=typeof t)throw new di(q);return e=Mo(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=a),n}},wo=function(e,t,n){var r,o,i,u,c,s,l=0,f=!1,p=!1,d=!0;if("function"!=typeof e)throw new di(q);function h(t){var n=r,i=o;return r=o=a,l=t,u=e.apply(i,n)}function v(e){return l=e,c=za(m,t),f?h(e):u}function y(e){var n=e-s;return s===a||n>=t||n<0||p&&e-l>=i}function m(){var e,n,r=yu();if(y(r))return g(r);c=za(m,(n=t-((e=r)-s),p?Gi(n,i-(e-l)):n))}function g(e){return c=a,d&&r?h(e):(r=o=a,u)}function b(){var e=yu(),n=y(e);if(r=arguments,o=this,s=e,n){if(c===a)return v(s);if(p)return $a(c),c=za(m,t),h(s)}return c===a&&(c=za(m,t)),u}return t=Uo(t)||0,$o(n)&&(f=!!n.leading,i=(p="maxWait"in n)?Zi(Uo(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d),b.cancel=function(){c!==a&&$a(c),l=0,r=s=o=c=a},b.flush=function(){return c===a?u:g(yu())},b},_o=function(e){if("function"!=typeof e)throw new di(q);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}},xo=function(e,t){return e===t||e!=e&&t!=t},So=function(e){return null!=e&&Co(e.length)&&!ko(e)},Oo=function(e){return Po(e)&&So(e)},Eo=function(e){if(!Po(e))return!1;var t=Yt(e);return t==ue||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!To(e)},ko=function(e){if(!$o(e))return!1;var t=Yt(e);return t==ce||t==se||"[object AsyncFunction]"==t||"[object Proxy]"==t},jo=function(e){return"number"==typeof e&&e==Mo(e)},Co=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=X},$o=function(e){var t=void 0===e?"undefined":o(e);return null!=e&&("object"==t||"function"==t)},Po=function(e){return null!=e&&"object"==typeof e},Ao=function(e){return"number"==typeof e||Po(e)&&Yt(e)==fe},To=function(e){if(!Po(e)||Yt(e)!=pe)return!1;var t=Pi(e);if(null===t)return!0;var n=bi.call(t,"constructor")&&t.constructor;return"function"==typeof n&&r(n,n)&&gi.call(n)==Si},Io=function(e){return"string"==typeof e||!Pu(e)&&Po(e)&&Yt(e)==ye},Ro=function(e){return"symbol"==(void 0===e?"undefined":o(e))||Po(e)&&Yt(e)==me},Do=function(e){if(!e)return[];if(So(e))return Io(e)?W(e):or(e);if(Di&&e[Di])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Di]());var t=La(e);return(t==le?B:t==ve?V:qo)(e)},Lo=function(e){return e?(e=Uo(e))===J||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},Mo=function(e){var t=Lo(e),n=t%1;return t==t?n?t-n:t:0},No=function(e){return e?jt(Mo(e),0,te):0},Uo=function(e){if("number"==typeof e)return e;if(Ro(e))return ee;if($o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=$o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=A(e);var n=nt.test(e);return n||ot.test(e)?Ht(e.slice(2),n?2:8):tt.test(e)?ee:+e},Bo=function(e){return ir(e,Wo(e))},zo=function(e){return null==e?"":ja(e)},Fo=function(e,t,n){var r=null==e?a:Zt(e,t);return r===a?n:r},Vo=function(e,t){return null!=e&&Mr(e,t,fn)},Ho=function(e){return So(e)?yt(e):gn(e)},Wo=function(e){return So(e)?yt(e,!0):function(e){if(!$o(e))return function(e){var t=[];if(null!=e)for(var n in li(e))t.push(n);return t}(e);var t=Hr(e),n=[];for(var r in e)("constructor"!=r||!t&&bi.call(e,r))&&n.push(r);return n}(e)},Ko=function(e,t){if(null==e)return{};var n=v(Pr(e),(function(e){return[e]}));return t=Ir(t),En(e,n,(function(e,n){return t(e,n[0])}))},qo=function(e){return null==e?[]:I(e,Ho(e))},Zo=function(e){return sc(zo(e).toLowerCase())},Go=function(e){return(e=zo(e))&&e.replace(at,un).replace(It,"")},Qo=function(e,t,n){return e=zo(e),(t=n?a:t)===a?(r=e,Mt.test(r)?function(e){return e.match(Dt)||[]}(e):function(e){return e.match(Qe)||[]}(e)):e.match(t)||[];var r},Yo=function(e){return function(){return e}},Jo=function(e){return e},Xo=function(e){return mn("function"==typeof e?e:ma(e,1))},ei=function(e,t,n){var r=Ho(t),o=Kt(t,r);null!=n||$o(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=Kt(t,Ho(t)));var i=!($o(n)&&"chain"in n&&!n.chain),a=ko(e);return s(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=or(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,y([this.value()],arguments))})})),e},ti=function(){},ni=function(e){return Fr(e)?k(eo(e)):(t=e,function(e){return Zt(e,t)});var t},ri=function(){return[]},oi=function(){return!1},ii=(t=null==t?qt:ln.defaults(qt.Object(),t,ln.pick(qt,Nt))).Array,ai=t.Date,ui=t.Error,ci=t.Function,si=t.Math,li=t.Object,fi=t.RegExp,pi=t.String,di=t.TypeError,hi=ii.prototype,vi=ci.prototype,yi=li.prototype,mi=t["__core-js_shared__"],gi=vi.toString,bi=yi.hasOwnProperty,wi=0,_i=(n=/[^.]+$/.exec(mi&&mi.keys&&mi.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",xi=yi.toString,Si=gi.call(li),Oi=qt._,Ei=fi("^"+gi.call(bi).replace(Ve,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ki=Qt?t.Buffer:a,ji=t.Symbol,Ci=t.Uint8Array,$i=ki?ki.allocUnsafe:a,Pi=z(li.getPrototypeOf,li),Ai=li.create,Ti=yi.propertyIsEnumerable,Ii=hi.splice,Ri=ji?ji.isConcatSpreadable:a,Di=ji?ji.iterator:a,Li=ji?ji.toStringTag:a,Mi=function(){try{var e=Lr(li,"defineProperty");return e({},"",{}),e}catch(e){}}(),Ni=t.clearTimeout!==qt.clearTimeout&&t.clearTimeout,Ui=ai&&ai.now!==qt.Date.now&&ai.now,Bi=t.setTimeout!==qt.setTimeout&&t.setTimeout,zi=si.ceil,Fi=si.floor,Vi=li.getOwnPropertySymbols,Hi=ki?ki.isBuffer:a,Wi=t.isFinite,Ki=hi.join,qi=z(li.keys,li),Zi=si.max,Gi=si.min,Qi=ai.now,Yi=t.parseInt,Ji=si.random,Xi=hi.reverse,ea=Lr(t,"DataView"),ta=Lr(t,"Map"),na=Lr(t,"Promise"),ra=Lr(t,"Set"),oa=Lr(t,"WeakMap"),ia=Lr(li,"create"),aa=oa&&new oa,ua={},ca=to(ea),sa=to(ta),la=to(na),fa=to(ra),pa=to(oa),da=ji?ji.prototype:a,ha=da?da.valueOf:a,va=da?da.toString:a,ya=(i=function(){},function(e){if(!$o(e))return{};if(Ai)return Ai(e);i.prototype=e;var t=new i;return i.prototype=a,t});function ma(e,t,n,r,o,i){var u,c=1&t,l=2&t,f=4&t;if(n&&(u=o?n(e,r,o,i):n(e)),u!==a)return u;if(!$o(e))return e;var p,d,h,v=Pu(e);if(v){if(d=(p=e).length,h=new p.constructor(d),d&&"string"==typeof p[0]&&bi.call(p,"index")&&(h.index=p.index,h.input=p.input),u=h,!c)return or(e,u)}else{var y=La(e),m=y==ce||y==se;if(Tu(e))return Jn(e,c);if(y==pe||y==re||m&&!o){if(u=l||m?{}:Nr(e),!c)return l?function(e,t){return ir(e,Da(e),t)}(e,function(e,t){return e&&ir(t,Wo(t),e)}(u,e)):function(e,t){return ir(e,Ra(e),t)}(e,Ot(u,e))}else{if(!zt[y])return o?e:{};u=function(e,t,n){var r,o=e.constructor;switch(t){case be:return Xn(e);case ie:case ae:return new o(+e);case we:return function(e,t){var n=t?Xn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case _e:case xe:case Se:case Oe:case Ee:case ke:case je:case Ce:case $e:return er(e,n);case le:return new o;case fe:case ye:return new o(e);case he:return function(e){var t=new e.constructor(e.source,et.exec(e));return t.lastIndex=e.lastIndex,t}(e);case ve:return new o;case me:return r=e,ha?li(ha.call(r)):{}}}(e,y,c)}}i||(i=new vt);var g=i.get(e);if(g)return g;i.set(e,u),Lu(e)?e.forEach((function(r){u.add(ma(r,t,n,r,e,i))})):Ru(e)&&e.forEach((function(r,o){u.set(o,ma(r,t,n,o,e,i))}));var b=v?a:(f?l?Pr:$r:l?Wo:Ho)(e);return s(b||e,(function(r,o){b&&(r=e[o=r]),_t(u,o,ma(r,t,n,o,e,i))})),u}j.templateSettings={escape:Me,evaluate:Ne,interpolate:Ue,variable:"",imports:{_:j}},(j.prototype=Ke.prototype).constructor=j,st.prototype=ya(Ke.prototype),st.prototype.constructor=st,lt.prototype=ya(Ke.prototype),lt.prototype.constructor=lt,ft.prototype.clear=function(){this.__data__=ia?ia(null):{},this.size=0},ft.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ft.prototype.get=function(e){var t=this.__data__;if(ia){var n=t[e];return n===Z?a:n}return bi.call(t,e)?t[e]:a},ft.prototype.has=function(e){var t=this.__data__;return ia?t[e]!==a:bi.call(t,e)},ft.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ia&&t===a?Z:t,this},pt.prototype.clear=function(){this.__data__=[],this.size=0},pt.prototype.delete=function(e){var t=this.__data__,n=xt(t,e);return!(n<0||(n==t.length-1?t.pop():Ii.call(t,n,1),--this.size,0))},pt.prototype.get=function(e){var t=this.__data__,n=xt(t,e);return n<0?a:t[n][1]},pt.prototype.has=function(e){return xt(this.__data__,e)>-1},pt.prototype.set=function(e,t){var n=this.__data__,r=xt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},dt.prototype.clear=function(){this.size=0,this.__data__={hash:new ft,map:new(ta||pt),string:new ft}},dt.prototype.delete=function(e){var t=Rr(this,e).delete(e);return this.size-=t?1:0,t},dt.prototype.get=function(e){return Rr(this,e).get(e)},dt.prototype.has=function(e){return Rr(this,e).has(e)},dt.prototype.set=function(e,t){var n=Rr(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ht.prototype.add=ht.prototype.push=function(e){return this.__data__.set(e,Z),this},ht.prototype.has=function(e){return this.__data__.has(e)},vt.prototype.clear=function(){this.__data__=new pt,this.size=0},vt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},vt.prototype.get=function(e){return this.__data__.get(e)},vt.prototype.has=function(e){return this.__data__.has(e)},vt.prototype.set=function(e,t){var n=this.__data__;if(r(n,pt)){var o=n.__data__;if(!ta||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new dt(o)}return n.set(e,t),this.size=n.size,this};var ga=cr(Ft),ba=cr(Wt,!0);function wa(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=Ur),o||(o=[]);++i<a;){var u=e[i];t>0&&n(u)?t>1?wa(u,t-1,n,r,o):y(o,u):r||(o[o.length]=u)}return o}var _a=sr(),xa=sr(!0);function Sa(e,t,n,o,i){return e===t||(null==e||null==t||!Po(e)&&!Po(t)?e!=e&&t!=t:function(e,t,n,o,i,u){var c=Pu(e),s=Pu(t),l=c?oe:La(e),f=s?oe:La(t),p=(l=l==re?pe:l)==pe,d=(f=f==re?pe:f)==pe,h=l==f;if(h&&Tu(e)){if(!Tu(t))return!1;c=!0,p=!1}if(h&&!p)return u||(u=new vt),c||Mu(e)?jr(e,t,n,o,i,u):function(e,t,n,r,o,i,a){switch(n){case we:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case be:return!(e.byteLength!=t.byteLength||!i(new Ci(e),new Ci(t)));case ie:case ae:case fe:return xo(+e,+t);case ue:return e.name==t.name&&e.message==t.message;case he:case ye:return e==t+"";case le:var u=B;case ve:var c=1&r;if(u||(u=V),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var l=jr(u(e),u(t),r,o,i,a);return a.delete(e),l;case me:if(ha)return ha.call(e)==ha.call(t)}return!1}(e,t,l,n,o,i,u);if(!(1&n)){var v=p&&bi.call(e,"__wrapped__"),y=d&&bi.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,g=y?t.value():t;return u||(u=new vt),i(m,g,n,o,u)}}return!!h&&(u||(u=new vt),function(e,t,n,o,i,u){var c=1&n,s=$r(e),l=s.length;if(l!=$r(t).length&&!c)return!1;for(var f=l;f--;){var p=s[f];if(!(c?p in t:bi.call(t,p)))return!1}var d=u.get(e),h=u.get(t);if(d&&h)return d==t&&h==e;var v=!0;u.set(e,t),u.set(t,e);for(var y=c;++f<l;){var m=e[p=s[f]],g=t[p];if(o)var b=c?o(g,m,p,t,e,u):o(m,g,p,e,t,u);if(!(b===a?m===g||i(m,g,n,o,u):b)){v=!1;break}y||(y="constructor"==p)}if(v&&!y){var w=e.constructor,_=t.constructor;w==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&r(w,w)&&"function"==typeof _&&r(_,_)||(v=!1)}return u.delete(e),u.delete(t),v}(e,t,n,o,i,u))}(e,t,n,o,Sa,i))}function Oa(e,t,n,r,o){e!==t&&_a(t,(function(i,u){if(o||(o=new vt),$o(i))!function(e,t,n,r,o,i,u){var c=Qr(e,n),s=Qr(t,n),l=u.get(s);if(l)wt(e,n,l);else{var f=i?i(c,s,n+"",e,t,u):a,p=f===a;if(p){var d=Pu(s),h=!d&&Tu(s),v=!d&&!h&&Mu(s);f=s,d||h||v?Pu(c)?f=c:Oo(c)?f=or(c):h?(p=!1,f=Jn(s,!0)):v?(p=!1,f=er(s,!0)):f=[]:To(s)||$u(s)?(f=c,$u(c)?f=Bo(c):$o(c)&&!ko(c)||(f=Nr(s))):p=!1}p&&(u.set(s,f),o(f,s,r,i,u),u.delete(s)),wt(e,n,f)}}(e,t,u,n,Oa,r,o);else{var c=r?r(Qr(e,u),i,u+"",e,t,o):a;c===a&&(c=i),wt(e,u,c)}}),Wo)}var Ea=aa?function(e,t){return aa.set(e,t),e}:Jo,ka=Mi?function(e,t){return Mi(e,"toString",{configurable:!0,enumerable:!1,value:Yo(t),writable:!0})}:Jo;function ja(e){if("string"==typeof e)return e;if(Pu(e))return v(e,ja)+"";if(Ro(e))return va?va.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var Ca=Pn,$a=Ni||function(e){return qt.clearTimeout(e)};function Pa(e,t,n,o,i,u,c,s,l,f){var p=t&Y,d=1&t,h=2&t,v=24&t,y=512&t,m=h?a:pr(e);return function a(){for(var g=arguments.length,b=ii(g),w=g;w--;)b[w]=arguments[w];if(v)var _=Tr(a),x=M(b,_);if(o&&(b=nr(b,o,i,v)),u&&(b=rr(b,u,c,v)),g-=x,v&&g<f){var S=F(b,_);return _r(e,t,Pa,a.placeholder,n,b,S,s,l,f-g)}var O=d?n:this,E=h?O[e]:e;return g=b.length,s?b=Gr(b,s):y&&g>1&&b.reverse(),p&&l<g&&(b.length=l),this&&this!==qt&&r(this,a)&&(E=m||pr(E)),E.apply(O,b)}}var Aa=ra&&1/V(new ra([,-0]))[1]==J?function(e){return new ra(e)}:ti;function Ta(e,t,n,r,o,i){return $o(e)&&$o(t)&&(i.set(t,e),Oa(e,t,a,Ta,i),i.delete(t)),e}var Ia=aa?function(e){return aa.get(e)}:ti,Ra=Vi?function(e){return null==e?[]:(e=li(e),p(Vi(e),(function(t){return Ti.call(e,t)})))}:ri,Da=Vi?function(e){for(var t=[];e;)y(t,Ra(e)),e=Pi(e);return t}:ri,La=Yt;(ea&&La(new ea(new ArrayBuffer(1)))!=we||ta&&La(new ta)!=le||na&&La(na.resolve())!=de||ra&&La(new ra)!=ve||oa&&La(new oa)!=ge)&&(La=function(e){var t=Yt(e),n=t==pe?e.constructor:a,r=n?to(n):"";if(r)switch(r){case ca:return we;case sa:return le;case la:return de;case fa:return ve;case pa:return ge}return t});var Ma,Na,Ua=mi?ko:oi,Ba=Jr(Ea),za=Bi||function(e,t){return qt.setTimeout(e,t)},Fa=Jr(ka),Va=(Ma=_u((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Fe,(function(e,n,r,o){t.push(r?o.replace(Je,"$1"):n||e)})),t}),(function(e){return 500===Na.size&&Na.clear(),e})),Na=Ma.cache,Ma),Ha=Pn((function(e,t){return Oo(e)?Pt(e,wa(t,1,Oo,!0)):[]})),Wa=Pn((function(e,t){var n=uo(t);return Oo(n)&&(n=a),Oo(e)?Pt(e,wa(t,1,Oo,!0),Ir(n,2)):[]})),Ka=Pn((function(e,t){var n=uo(t);return Oo(n)&&(n=a),Oo(e)?Pt(e,wa(t,1,Oo,!0),a,n):[]})),qa=Pn((function(e){var t=v(e,Zn);return t.length&&t[0]===e[0]?pn(t):[]})),Za=Pn((function(e){var t=uo(e),n=v(e,Zn);return t===uo(n)?t=a:n.pop(),n.length&&n[0]===e[0]?pn(n,Ir(t,2)):[]})),Ga=Pn((function(e){var t=uo(e),n=v(e,Zn);return(t="function"==typeof t?t:a)&&n.pop(),n.length&&n[0]===e[0]?pn(n,a,t):[]})),Qa=Pn(co),Ya=Cr((function(e,t){var n=null==e?0:e.length,r=kt(e,t);return jn(e,v(t,(function(e){return Br(e,n)?+e:e})).sort(tr)),r})),Ja=Pn((function(e){return zn(wa(e,1,Oo,!0))})),Xa=Pn((function(e){var t=uo(e);return Oo(t)&&(t=a),zn(wa(e,1,Oo,!0),Ir(t,2))})),eu=Pn((function(e){var t=uo(e);return t="function"==typeof t?t:a,zn(wa(e,1,Oo,!0),a,t)})),tu=Pn((function(e,t){return Oo(e)?Pt(e,t):[]})),nu=Pn((function(e){return Kn(p(e,Oo))})),ru=Pn((function(e){var t=uo(e);return Oo(t)&&(t=a),Kn(p(e,Oo),Ir(t,2))})),ou=Pn((function(e){var t=uo(e);return t="function"==typeof t?t:a,Kn(p(e,Oo),a,t)})),iu=Pn(lo),au=Pn((function(e){var t=e.length,n=t>1?e[t-1]:a;return n="function"==typeof n?(e.pop(),n):a,fo(e,n)})),uu=Cr((function(e){var t=e.length,n=t?e[0]:0,o=this.__wrapped__,i=function(t){return kt(t,e)};return t>1||this.__actions__.length||!r(o,lt)||!Br(n)?this.thru(i):((o=o.slice(n,+n+(t?1:0))).__actions__.push({func:ho,args:[i],thisArg:a}),new st(o,this.__chain__).thru((function(e){return t&&!e.length&&e.push(a),e})))})),cu=ar((function(e,t,n){bi.call(e,n)?++e[n]:Et(e,n,1)})),su=dr(ro),lu=dr(oo),fu=ar((function(e,t,n){bi.call(e,n)?e[n].push(t):Et(e,n,[t])})),pu=Pn((function(e,t,n){var r=-1,o="function"==typeof t,i=So(e)?ii(e.length):[];return ga(e,(function(e){i[++r]=o?u(t,e,n):dn(e,t,n)})),i})),du=ar((function(e,t,n){Et(e,n,t)})),hu=ar((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),vu=Pn((function(e,t){if(null==e)return[];var n=t.length;return n>1&&zr(e,t[0],t[1])?t=[]:n>2&&zr(t[0],t[1],t[2])&&(t=[t[0]]),On(e,wa(t,1),[])})),yu=Ui||function(){return qt.Date.now()},mu=Pn((function(e,t,n){var r=1;if(n.length){var o=F(n,Tr(mu));r|=Q}return Or(e,r,t,n,o)})),gu=Pn((function(e,t,n){var r=3;if(n.length){var o=F(n,Tr(gu));r|=Q}return Or(t,r,e,n,o)})),bu=Pn((function(e,t){return $t(e,1,t)})),wu=Pn((function(e,t,n){return $t(e,Uo(t)||0,n)}));function _u(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new di(q);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(_u.Cache||dt),n}_u.Cache=dt;var xu,Su=Ca((function(e,t){var n=(t=1==t.length&&Pu(t[0])?v(t[0],T(Ir())):v(wa(t,1),T(Ir()))).length;return Pn((function(r){for(var o=-1,i=Gi(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return u(e,this,r)}))})),Ou=Pn((function(e,t){var n=F(t,Tr(Ou));return Or(e,Q,a,t,n)})),Eu=Pn((function(e,t){var n=F(t,Tr(Eu));return Or(e,64,a,t,n)})),ku=Cr((function(e,t){return Or(e,256,a,a,a,t)})),ju=wr(Jt),Cu=wr((function(e,t){return e>=t})),$u=hn(function(){return arguments}())?hn:function(e){return Po(e)&&bi.call(e,"callee")&&!Ti.call(e,"callee")},Pu=ii.isArray,Au=Xt?T(Xt):function(e){return Po(e)&&Yt(e)==be},Tu=Hi||oi,Iu=en?T(en):function(e){return Po(e)&&Yt(e)==ae},Ru=tn?T(tn):function(e){return Po(e)&&La(e)==le},Du=nn?T(nn):function(e){return Po(e)&&Yt(e)==he},Lu=rn?T(rn):function(e){return Po(e)&&La(e)==ve},Mu=on?T(on):function(e){return Po(e)&&Co(e.length)&&!!Bt[Yt(e)]},Nu=wr(bn),Uu=wr((function(e,t){return e<=t})),Bu=ur((function(e,t){if(Hr(t)||So(t))ir(t,Ho(t),e);else for(var n in t)bi.call(t,n)&&_t(e,n,t[n])})),zu=ur((function(e,t){ir(t,Wo(t),e)})),Fu=ur((function(e,t,n,r){ir(t,Wo(t),e,r)})),Vu=ur((function(e,t,n,r){ir(t,Ho(t),e,r)})),Hu=Cr(kt),Wu=Pn((function(e,t){e=li(e);var n=-1,r=t.length,o=r>2?t[2]:a;for(o&&zr(t[0],t[1],o)&&(r=1);++n<r;)for(var i=t[n],u=Wo(i),c=-1,s=u.length;++c<s;){var l=u[c],f=e[l];(f===a||xo(f,yi[l])&&!bi.call(e,l))&&(e[l]=i[l])}return e})),Ku=Pn((function(e){return e.push(a,Ta),u(Yu,a,e)})),qu=vr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=xi.call(t)),e[t]=n}),Yo(Jo)),Zu=vr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=xi.call(t)),bi.call(e,t)?e[t].push(n):e[t]=[n]}),Ir),Gu=Pn(dn),Qu=ur((function(e,t,n){Oa(e,t,n)})),Yu=ur((function(e,t,n,r){Oa(e,t,n,r)})),Ju=Cr((function(e,t){var n={};if(null==e)return n;var r=!1;t=v(t,(function(t){return t=Qn(t,e),r||(r=t.length>1),t})),ir(e,Pr(e),n),r&&(n=ma(n,7,kr));for(var o=t.length;o--;)Fn(n,t[o]);return n})),Xu=Cr((function(e,t){return null==e?{}:En(n=e,t,(function(e,t){return Vo(n,t)}));var n})),ec=Sr(Ho),tc=Sr(Wo),nc=fr((function(e,t,n){return t=t.toLowerCase(),e+(n?Zo(t):t)})),rc=fr((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),oc=fr((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),ic=lr("toLowerCase"),ac=fr((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),uc=fr((function(e,t,n){return e+(n?" ":"")+sc(t)})),cc=fr((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),sc=lr("toUpperCase"),lc=Pn((function(e,t){try{return u(e,a,t)}catch(e){return Eo(e)?e:new ui(e)}})),fc=Cr((function(e,t){return s(t,(function(t){t=eo(t),Et(e,t,mu(e[t],e))})),e})),pc=hr(),dc=hr(!0),hc=Pn((function(e,t){return function(n){return dn(n,e,t)}})),vc=Pn((function(e,t){return function(n){return dn(e,n,t)}})),yc=mr(v),mc=mr(f),gc=mr(b),bc=br(),wc=br(!0),_c=yr((function(e,t){return e+t}),0),xc=xr("ceil"),Sc=yr((function(e,t){return e/t}),1),Oc=xr("floor"),Ec=yr((function(e,t){return e*t}),1),kc=xr("round"),jc=yr((function(e,t){return e-t}),0);return j.after=function(e,t){if("function"!=typeof t)throw new di(q);return e=Mo(e),function(){if(--e<1)return t.apply(this,arguments)}},j.ary=go,j.assign=Bu,j.assignIn=zu,j.assignInWith=Fu,j.assignWith=Vu,j.at=Hu,j.before=bo,j.bind=mu,j.bindAll=fc,j.bindKey=gu,j.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Pu(e)?e:[e]},j.chain=po,j.chunk=function(e,t,n){t=(n?zr(e,t,n):t===a)?1:Zi(Mo(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var o=0,i=0,u=ii(zi(r/t));o<r;)u[i++]=Dn(e,o,o+=t);return u},j.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},j.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ii(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return y(Pu(n)?or(n):[n],wa(t,1))},j.cond=function(e){var t=null==e?0:e.length,n=Ir();return e=t?v(e,(function(e){if("function"!=typeof e[1])throw new di(q);return[n(e[0]),e[1]]})):[],Pn((function(n){for(var r=-1;++r<t;){var o=e[r];if(u(o[0],this,n))return u(o[1],this,n)}}))},j.conforms=function(e){return t=ma(e,1),n=Ho(t),function(e){return Ct(e,t,n)};var t,n},j.constant=Yo,j.countBy=cu,j.create=function(e,t){var n=ya(e);return null==t?n:Ot(n,t)},j.curry=function e(t,n,r){var o=Or(t,8,a,a,a,a,a,n=r?a:n);return o.placeholder=e.placeholder,o},j.curryRight=function e(t,n,r){var o=Or(t,16,a,a,a,a,a,n=r?a:n);return o.placeholder=e.placeholder,o},j.debounce=wo,j.defaults=Wu,j.defaultsDeep=Ku,j.defer=bu,j.delay=wu,j.difference=Ha,j.differenceBy=Wa,j.differenceWith=Ka,j.drop=function(e,t,n){var r=null==e?0:e.length;return r?Dn(e,(t=n||t===a?1:Mo(t))<0?0:t,r):[]},j.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Dn(e,0,(t=r-(t=n||t===a?1:Mo(t)))<0?0:t):[]},j.dropRightWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3),!0,!0):[]},j.dropWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3),!0):[]},j.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&zr(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=Mo(n))<0&&(n=-n>o?0:o+n),(r=r===a||r>o?o:Mo(r))<0&&(r+=o),r=n>r?0:No(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},j.filter=function(e,t){return(Pu(e)?p:Lt)(e,Ir(t,3))},j.flatMap=function(e,t){return wa(mo(e,t),1)},j.flatMapDeep=function(e,t){return wa(mo(e,t),J)},j.flatMapDepth=function(e,t,n){return n=n===a?1:Mo(n),wa(mo(e,t),n)},j.flatten=io,j.flattenDeep=function(e){return null!=e&&e.length?wa(e,J):[]},j.flattenDepth=function(e,t){return null!=e&&e.length?wa(e,t=t===a?1:Mo(t)):[]},j.flip=function(e){return Or(e,512)},j.flow=pc,j.flowRight=dc,j.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},j.functions=function(e){return null==e?[]:Kt(e,Ho(e))},j.functionsIn=function(e){return null==e?[]:Kt(e,Wo(e))},j.groupBy=fu,j.initial=function(e){return null!=e&&e.length?Dn(e,0,-1):[]},j.intersection=qa,j.intersectionBy=Za,j.intersectionWith=Ga,j.invert=qu,j.invertBy=Zu,j.invokeMap=pu,j.iteratee=Xo,j.keyBy=du,j.keys=Ho,j.keysIn=Wo,j.map=mo,j.mapKeys=function(e,t){var n={};return t=Ir(t,3),Ft(e,(function(e,r,o){Et(n,t(e,r,o),e)})),n},j.mapValues=function(e,t){var n={};return t=Ir(t,3),Ft(e,(function(e,r,o){Et(n,r,t(e,r,o))})),n},j.matches=function(e){return _n(ma(e,1))},j.matchesProperty=function(e,t){return xn(e,ma(t,1))},j.memoize=_u,j.merge=Qu,j.mergeWith=Yu,j.method=hc,j.methodOf=vc,j.mixin=ei,j.negate=_o,j.nthArg=function(e){return e=Mo(e),Pn((function(t){return Sn(t,e)}))},j.omit=Ju,j.omitBy=function(e,t){return Ko(e,_o(Ir(t)))},j.once=function(e){return bo(2,e)},j.orderBy=function(e,t,n,r){return null==e?[]:(Pu(t)||(t=null==t?[]:[t]),Pu(n=r?a:n)||(n=null==n?[]:[n]),On(e,t,n))},j.over=yc,j.overArgs=Su,j.overEvery=mc,j.overSome=gc,j.partial=Ou,j.partialRight=Eu,j.partition=hu,j.pick=Xu,j.pickBy=Ko,j.property=ni,j.propertyOf=function(e){return function(t){return null==e?a:Zt(e,t)}},j.pull=Qa,j.pullAll=co,j.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?kn(e,t,Ir(n,2)):e},j.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?kn(e,t,a,n):e},j.pullAt=Ya,j.range=bc,j.rangeRight=wc,j.rearg=ku,j.reject=function(e,t){return(Pu(e)?p:Lt)(e,_o(Ir(t,3)))},j.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=Ir(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return jn(e,o),n},j.rest=function(e,t){if("function"!=typeof e)throw new di(q);return Pn(e,t=t===a?t:Mo(t))},j.reverse=so,j.sampleSize=function(e,t,n){return t=(n?zr(e,t,n):t===a)?1:Mo(t),(Pu(e)?gt:Tn)(e,t)},j.set=function(e,t,n){return null==e?e:In(e,t,n)},j.setWith=function(e,t,n,r){return r="function"==typeof r?r:a,null==e?e:In(e,t,n,r)},j.shuffle=function(e){return(Pu(e)?bt:Rn)(e)},j.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&zr(e,t,n)?(t=0,n=r):(t=null==t?0:Mo(t),n=n===a?r:Mo(n)),Dn(e,t,n)):[]},j.sortBy=vu,j.sortedUniq=function(e){return e&&e.length?Un(e):[]},j.sortedUniqBy=function(e,t){return e&&e.length?Un(e,Ir(t,2)):[]},j.split=function(e,t,n){return n&&"number"!=typeof n&&zr(e,t,n)&&(t=n=a),(n=n===a?te:n>>>0)?(e=zo(e))&&("string"==typeof t||null!=t&&!Du(t))&&!(t=ja(t))&&U(e)?Yn(W(e),0,n):e.split(t,n):[]},j.spread=function(e,t){if("function"!=typeof e)throw new di(q);return t=null==t?0:Zi(Mo(t),0),Pn((function(n){var r=n[t],o=Yn(n,0,t);return r&&y(o,r),u(e,this,o)}))},j.tail=function(e){var t=null==e?0:e.length;return t?Dn(e,1,t):[]},j.take=function(e,t,n){return e&&e.length?Dn(e,0,(t=n||t===a?1:Mo(t))<0?0:t):[]},j.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Dn(e,(t=r-(t=n||t===a?1:Mo(t)))<0?0:t,r):[]},j.takeRightWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3),!1,!0):[]},j.takeWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3)):[]},j.tap=function(e,t){return t(e),e},j.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new di(q);return $o(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),wo(e,t,{leading:r,maxWait:t,trailing:o})},j.thru=ho,j.toArray=Do,j.toPairs=ec,j.toPairsIn=tc,j.toPath=function(e){return Pu(e)?v(e,eo):Ro(e)?[e]:or(Va(zo(e)))},j.toPlainObject=Bo,j.transform=function(e,t,n){var r=Pu(e),o=r||Tu(e)||Mu(e);if(t=Ir(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:$o(e)&&ko(i)?ya(Pi(e)):{}}return(o?s:Ft)(e,(function(e,r,o){return t(n,e,r,o)})),n},j.unary=function(e){return go(e,1)},j.union=Ja,j.unionBy=Xa,j.unionWith=eu,j.uniq=function(e){return e&&e.length?zn(e):[]},j.uniqBy=function(e,t){return e&&e.length?zn(e,Ir(t,2)):[]},j.uniqWith=function(e,t){return t="function"==typeof t?t:a,e&&e.length?zn(e,a,t):[]},j.unset=function(e,t){return null==e||Fn(e,t)},j.unzip=lo,j.unzipWith=fo,j.update=function(e,t,n){return null==e?e:Vn(e,t,Gn(n))},j.updateWith=function(e,t,n,r){return r="function"==typeof r?r:a,null==e?e:Vn(e,t,Gn(n),r)},j.values=qo,j.valuesIn=function(e){return null==e?[]:I(e,Wo(e))},j.without=tu,j.words=Qo,j.wrap=function(e,t){return Ou(Gn(t),e)},j.xor=nu,j.xorBy=ru,j.xorWith=ou,j.zip=iu,j.zipObject=function(e,t){return qn(e||[],t||[],_t)},j.zipObjectDeep=function(e,t){return qn(e||[],t||[],In)},j.zipWith=au,j.entries=ec,j.entriesIn=tc,j.extend=zu,j.extendWith=Fu,ei(j,j),j.add=_c,j.attempt=lc,j.camelCase=nc,j.capitalize=Zo,j.ceil=xc,j.clamp=function(e,t,n){return n===a&&(n=t,t=a),n!==a&&(n=(n=Uo(n))==n?n:0),t!==a&&(t=(t=Uo(t))==t?t:0),jt(Uo(e),t,n)},j.clone=function(e){return ma(e,4)},j.cloneDeep=function(e){return ma(e,5)},j.cloneDeepWith=function(e,t){return ma(e,5,t="function"==typeof t?t:a)},j.cloneWith=function(e,t){return ma(e,4,t="function"==typeof t?t:a)},j.conformsTo=function(e,t){return null==t||Ct(e,t,Ho(t))},j.deburr=Go,j.defaultTo=function(e,t){return null==e||e!=e?t:e},j.divide=Sc,j.endsWith=function(e,t,n){e=zo(e),t=ja(t);var r=e.length,o=n=n===a?r:jt(Mo(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},j.eq=xo,j.escape=function(e){return(e=zo(e))&&Le.test(e)?e.replace(Re,cn):e},j.escapeRegExp=function(e){return(e=zo(e))&&He.test(e)?e.replace(Ve,"\\$&"):e},j.every=function(e,t,n){var r=Pu(e)?f:At;return n&&zr(e,t,n)&&(t=a),r(e,Ir(t,3))},j.find=su,j.findIndex=ro,j.findKey=function(e,t){return w(e,Ir(t,3),Ft)},j.findLast=lu,j.findLastIndex=oo,j.findLastKey=function(e,t){return w(e,Ir(t,3),Wt)},j.floor=Oc,j.forEach=vo,j.forEachRight=yo,j.forIn=function(e,t){return null==e?e:_a(e,Ir(t,3),Wo)},j.forInRight=function(e,t){return null==e?e:xa(e,Ir(t,3),Wo)},j.forOwn=function(e,t){return e&&Ft(e,Ir(t,3))},j.forOwnRight=function(e,t){return e&&Wt(e,Ir(t,3))},j.get=Fo,j.gt=ju,j.gte=Cu,j.has=function(e,t){return null!=e&&Mr(e,t,an)},j.hasIn=Vo,j.head=ao,j.identity=Jo,j.includes=function(e,t,n,r){e=So(e)?e:qo(e),n=n&&!r?Mo(n):0;var o=e.length;return n<0&&(n=Zi(o+n,0)),Io(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&x(e,t,n)>-1},j.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Mo(n);return o<0&&(o=Zi(r+o,0)),x(e,t,o)},j.inRange=function(e,t,n){return t=Lo(t),n===a?(n=t,t=0):n=Lo(n),(r=e=Uo(e))>=Gi(o=t,i=n)&&r<Zi(o,i);var r,o,i},j.invoke=Gu,j.isArguments=$u,j.isArray=Pu,j.isArrayBuffer=Au,j.isArrayLike=So,j.isArrayLikeObject=Oo,j.isBoolean=function(e){return!0===e||!1===e||Po(e)&&Yt(e)==ie},j.isBuffer=Tu,j.isDate=Iu,j.isElement=function(e){return Po(e)&&1===e.nodeType&&!To(e)},j.isEmpty=function(e){if(null==e)return!0;if(So(e)&&(Pu(e)||"string"==typeof e||"function"==typeof e.splice||Tu(e)||Mu(e)||$u(e)))return!e.length;var t=La(e);if(t==le||t==ve)return!e.size;if(Hr(e))return!gn(e).length;for(var n in e)if(bi.call(e,n))return!1;return!0},j.isEqual=function(e,t){return Sa(e,t)},j.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:a)?n(e,t):a;return r===a?Sa(e,t,a,n):!!r},j.isError=Eo,j.isFinite=function(e){return"number"==typeof e&&Wi(e)},j.isFunction=ko,j.isInteger=jo,j.isLength=Co,j.isMap=Ru,j.isMatch=function(e,t){return e===t||vn(e,t,Dr(t))},j.isMatchWith=function(e,t,n){return n="function"==typeof n?n:a,vn(e,t,Dr(t),n)},j.isNaN=function(e){return Ao(e)&&e!=+e},j.isNative=function(e){if(Ua(e))throw new ui("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return yn(e)},j.isNil=function(e){return null==e},j.isNull=function(e){return null===e},j.isNumber=Ao,j.isObject=$o,j.isObjectLike=Po,j.isPlainObject=To,j.isRegExp=Du,j.isSafeInteger=function(e){return jo(e)&&e>=-9007199254740991&&e<=X},j.isSet=Lu,j.isString=Io,j.isSymbol=Ro,j.isTypedArray=Mu,j.isUndefined=function(e){return e===a},j.isWeakMap=function(e){return Po(e)&&La(e)==ge},j.isWeakSet=function(e){return Po(e)&&"[object WeakSet]"==Yt(e)},j.join=function(e,t){return null==e?"":Ki.call(e,t)},j.kebabCase=rc,j.last=uo,j.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==a&&(o=(o=Mo(n))<0?Zi(r+o,0):Gi(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):_(e,O,o,!0)},j.lowerCase=oc,j.lowerFirst=ic,j.lt=Nu,j.lte=Uu,j.max=function(e){return e&&e.length?Rt(e,Jo,Jt):a},j.maxBy=function(e,t){return e&&e.length?Rt(e,Ir(t,2),Jt):a},j.mean=function(e){return E(e,Jo)},j.meanBy=function(e,t){return E(e,Ir(t,2))},j.min=function(e){return e&&e.length?Rt(e,Jo,bn):a},j.minBy=function(e,t){return e&&e.length?Rt(e,Ir(t,2),bn):a},j.stubArray=ri,j.stubFalse=oi,j.stubObject=function(){return{}},j.stubString=function(){return""},j.stubTrue=function(){return!0},j.multiply=Ec,j.nth=function(e,t){return e&&e.length?Sn(e,Mo(t)):a},j.noConflict=function(){return qt._===this&&(qt._=Oi),this},j.noop=ti,j.now=yu,j.pad=function(e,t,n){e=zo(e);var r=(t=Mo(t))?H(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return gr(Fi(o),n)+e+gr(zi(o),n)},j.padEnd=function(e,t,n){e=zo(e);var r=(t=Mo(t))?H(e):0;return t&&r<t?e+gr(t-r,n):e},j.padStart=function(e,t,n){e=zo(e);var r=(t=Mo(t))?H(e):0;return t&&r<t?gr(t-r,n)+e:e},j.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),Yi(zo(e).replace(We,""),t||0)},j.random=function(e,t,n){if(n&&"boolean"!=typeof n&&zr(e,t,n)&&(t=n=a),n===a&&("boolean"==typeof t?(n=t,t=a):"boolean"==typeof e&&(n=e,e=a)),e===a&&t===a?(e=0,t=1):(e=Lo(e),t===a?(t=e,e=0):t=Lo(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=Ji();return Gi(e+o*(t-e+Vt("1e-"+((o+"").length-1))),t)}return Cn(e,t)},j.reduce=function(e,t,n){var r=Pu(e)?m:C,o=arguments.length<3;return r(e,Ir(t,4),n,o,ga)},j.reduceRight=function(e,t,n){var r=Pu(e)?g:C,o=arguments.length<3;return r(e,Ir(t,4),n,o,ba)},j.repeat=function(e,t,n){return t=(n?zr(e,t,n):t===a)?1:Mo(t),$n(zo(e),t)},j.replace=function(){var e=arguments,t=zo(e[0]);return e.length<3?t:t.replace(e[1],e[2])},j.result=function(e,t,n){var r=-1,o=(t=Qn(t,e)).length;for(o||(o=1,e=a);++r<o;){var i=null==e?a:e[eo(t[r])];i===a&&(r=o,i=n),e=ko(i)?i.call(e):i}return e},j.round=kc,j.runInContext=e,j.sample=function(e){return(Pu(e)?mt:An)(e)},j.size=function(e){if(null==e)return 0;if(So(e))return Io(e)?H(e):e.length;var t=La(e);return t==le||t==ve?e.size:gn(e).length},j.snakeCase=ac,j.some=function(e,t,n){var r=Pu(e)?b:Ln;return n&&zr(e,t,n)&&(t=a),r(e,Ir(t,3))},j.sortedIndex=function(e,t){return Mn(e,t)},j.sortedIndexBy=function(e,t,n){return Nn(e,t,Ir(n,2))},j.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Mn(e,t);if(r<n&&xo(e[r],t))return r}return-1},j.sortedLastIndex=function(e,t){return Mn(e,t,!0)},j.sortedLastIndexBy=function(e,t,n){return Nn(e,t,Ir(n,2),!0)},j.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=Mn(e,t,!0)-1;if(xo(e[n],t))return n}return-1},j.startCase=uc,j.startsWith=function(e,t,n){return e=zo(e),n=null==n?0:jt(Mo(n),0,e.length),t=ja(t),e.slice(n,n+t.length)==t},j.subtract=jc,j.sum=function(e){return e&&e.length?$(e,Jo):0},j.sumBy=function(e,t){return e&&e.length?$(e,Ir(t,2)):0},j.template=function(e,t,n){var r=j.templateSettings;n&&zr(e,t,n)&&(t=a),e=zo(e),t=Fu({},t,r,Er);var o,i,u=Fu({},t.imports,r.imports,Er),c=Ho(u),s=I(u,c),l=0,f=t.interpolate||ut,p="__p += '",d=fi((t.escape||ut).source+"|"+f.source+"|"+(f===Ue?Xe:ut).source+"|"+(t.evaluate||ut).source+"|$","g"),h="//# sourceURL="+(bi.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ut+"]")+"\n";e.replace(d,(function(t,n,r,a,u,c){return r||(r=a),p+=e.slice(l,c).replace(ct,N),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),u&&(i=!0,p+="';\n"+u+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+t.length,t})),p+="';\n";var v=bi.call(t,"variable")&&t.variable;if(v){if(Ye.test(v))throw new ui("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(i?p.replace(Pe,""):p).replace(Ae,"$1").replace(Te,"$1;"),p="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=lc((function(){return ci(c,h+"return "+p).apply(a,s)}));if(y.source=p,Eo(y))throw y;return y},j.times=function(e,t){if((e=Mo(e))<1||e>X)return[];var n=te,r=Gi(e,te);t=Ir(t),e-=te;for(var o=P(r,t);++n<e;)t(n);return o},j.toFinite=Lo,j.toInteger=Mo,j.toLength=No,j.toLower=function(e){return zo(e).toLowerCase()},j.toNumber=Uo,j.toSafeInteger=function(e){return e?jt(Mo(e),-9007199254740991,X):0===e?e:0},j.toString=zo,j.toUpper=function(e){return zo(e).toUpperCase()},j.trim=function(e,t,n){if((e=zo(e))&&(n||t===a))return A(e);if(!e||!(t=ja(t)))return e;var r=W(e),o=W(t);return Yn(r,D(r,o),L(r,o)+1).join("")},j.trimEnd=function(e,t,n){if((e=zo(e))&&(n||t===a))return e.slice(0,K(e)+1);if(!e||!(t=ja(t)))return e;var r=W(e);return Yn(r,0,L(r,W(t))+1).join("")},j.trimStart=function(e,t,n){if((e=zo(e))&&(n||t===a))return e.replace(We,"");if(!e||!(t=ja(t)))return e;var r=W(e);return Yn(r,D(r,W(t))).join("")},j.truncate=function(e,t){var n=30,r="...";if($o(t)){var o="separator"in t?t.separator:o;n="length"in t?Mo(t.length):n,r="omission"in t?ja(t.omission):r}var i=(e=zo(e)).length;if(U(e)){var u=W(e);i=u.length}if(n>=i)return e;var c=n-H(r);if(c<1)return r;var s=u?Yn(u,0,c).join(""):e.slice(0,c);if(o===a)return s+r;if(u&&(c+=s.length-c),Du(o)){if(e.slice(c).search(o)){var l,f=s;for(o.global||(o=fi(o.source,zo(et.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;s=s.slice(0,p===a?c:p)}}else if(e.indexOf(ja(o),c)!=c){var d=s.lastIndexOf(o);d>-1&&(s=s.slice(0,d))}return s+r},j.unescape=function(e){return(e=zo(e))&&De.test(e)?e.replace(Ie,sn):e},j.uniqueId=function(e){var t=++wi;return zo(e)+t},j.upperCase=cc,j.upperFirst=sc,j.each=vo,j.eachRight=yo,j.first=ao,ei(j,(xu={},Ft(j,(function(e,t){bi.call(j.prototype,t)||(xu[t]=e)})),xu),{chain:!1}),j.VERSION="4.17.21",s(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){j[e].placeholder=j})),s(["drop","take"],(function(e,t){lt.prototype[e]=function(n){n=n===a?1:Zi(Mo(n),0);var r=this.__filtered__&&!t?new lt(this):this.clone();return r.__filtered__?r.__takeCount__=Gi(n,r.__takeCount__):r.__views__.push({size:Gi(n,te),type:e+(r.__dir__<0?"Right":"")}),r},lt.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),s(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;lt.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ir(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),s(["head","last"],(function(e,t){var n="take"+(t?"Right":"");lt.prototype[e]=function(){return this[n](1).value()[0]}})),s(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");lt.prototype[e]=function(){return this.__filtered__?new lt(this):this[n](1)}})),lt.prototype.compact=function(){return this.filter(Jo)},lt.prototype.find=function(e){return this.filter(e).head()},lt.prototype.findLast=function(e){return this.reverse().find(e)},lt.prototype.invokeMap=Pn((function(e,t){return"function"==typeof e?new lt(this):this.map((function(n){return dn(n,e,t)}))})),lt.prototype.reject=function(e){return this.filter(_o(Ir(e)))},lt.prototype.slice=function(e,t){e=Mo(e);var n=this;return n.__filtered__&&(e>0||t<0)?new lt(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==a&&(n=(t=Mo(t))<0?n.dropRight(-t):n.take(t-e)),n)},lt.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},lt.prototype.toArray=function(){return this.take(te)},Ft(lt.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),i=j[o?"take"+("last"==t?"Right":""):t],u=o||/^find/.test(t);i&&(j.prototype[t]=function(){var t=this.__wrapped__,c=o?[1]:arguments,s=r(t,lt),l=c[0],f=s||Pu(t),p=function(e){var t=i.apply(j,y([e],c));return o&&d?t[0]:t};f&&n&&"function"==typeof l&&1!=l.length&&(s=f=!1);var d=this.__chain__,h=!!this.__actions__.length,v=u&&!d,m=s&&!h;if(!u&&f){t=m?t:new lt(this);var g=e.apply(t,c);return g.__actions__.push({func:ho,args:[p],thisArg:a}),new st(g,d)}return v&&m?e.apply(this,c):(g=this.thru(p),v?o?g.value()[0]:g.value():g)})})),s(["pop","push","shift","sort","splice","unshift"],(function(e){var t=hi[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);j.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Pu(o)?o:[],e)}return this[n]((function(n){return t.apply(Pu(n)?n:[],e)}))}})),Ft(lt.prototype,(function(e,t){var n=j[t];if(n){var r=n.name+"";bi.call(ua,r)||(ua[r]=[]),ua[r].push({name:t,func:n})}})),ua[Pa(a,2).name]=[{name:"wrapper",func:a}],lt.prototype.clone=function(){var e=new lt(this.__wrapped__);return e.__actions__=or(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=or(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=or(this.__views__),e},lt.prototype.reverse=function(){if(this.__filtered__){var e=new lt(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},lt.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Pu(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=Gi(t,e+a);break;case"takeRight":e=Zi(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,u=i.end,c=u-a,s=r?u:a-1,l=this.__iteratees__,f=l.length,p=0,d=Gi(c,this.__takeCount__);if(!n||!r&&o==c&&d==c)return Wn(e,this.__actions__);var h=[];e:for(;c--&&p<d;){for(var v=-1,y=e[s+=t];++v<f;){var m=l[v],g=m.iteratee,b=m.type,w=g(y);if(2==b)y=w;else if(!w){if(1==b)continue e;break e}}h[p++]=y}return h},j.prototype.at=uu,j.prototype.chain=function(){return po(this)},j.prototype.commit=function(){return new st(this.value(),this.__chain__)},j.prototype.next=function(){this.__values__===a&&(this.__values__=Do(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?a:this.__values__[this.__index__++]}},j.prototype.plant=function(e){for(var t,n=this;r(n,Ke);){var o=no(n);o.__index__=0,o.__values__=a,t?i.__wrapped__=o:t=o;var i=o;n=n.__wrapped__}return i.__wrapped__=e,t},j.prototype.reverse=function(){var e=this.__wrapped__;if(r(e,lt)){var t=e;return this.__actions__.length&&(t=new lt(this)),(t=t.reverse()).__actions__.push({func:ho,args:[so],thisArg:a}),new st(t,this.__chain__)}return this.thru(so)},j.prototype.toJSON=j.prototype.valueOf=j.prototype.value=function(){return Wn(this.__wrapped__,this.__actions__)},j.prototype.first=j.prototype.head,Di&&(j.prototype[Di]=function(){return this}),j}();qt._=ln,(i=function(){return ln}.call(t,n,t,e))===a||(e.exports=i)}.call(this)},385:function(){System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e,t){for(var n in t)e[n]=t[n];return e},t=function(t){var n=function(e){for(var t=[],n=0;n<o.length;n++)o[n]===e?e=null:t.push(o[n]);o=t},r=function(n,r,i){t=r?n:e(e({},t),n);for(var a=o,u=0;u<a.length;u++)a[u](t,i)},o=[];return t=t||{},{action:function(e){var n=function(t){r(t,!1,e)};return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:r,subscribe:function(e){return o.push(e),function(){n(e)}},unsubscribe:n,getState:function(){return t}}},n=function(e,n){var r=s[e];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=t(n);return s[e]={value:o,active:!0},o},i=function(e,n){var r=s[e];if(!r){var o=t(n);return s[e]={value:o,active:!1},o}return r.value},a=function(e){return n("app",e)},u=function(){return i("app",{})},c=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},766:function(e){"use strict";e.exports=h},824:function(e){"use strict";e.exports=c},45:function(e){"use strict";e.exports=s},728:function(e){"use strict";e.exports=l},688:function(e){"use strict";e.exports=v},64:function(e){"use strict";e.exports=p},954:function(e){"use strict";e.exports=u},493:function(e){"use strict";e.exports=f},281:function(e){"use strict";e.exports=d}},y={};function m(e){var t=y[e];if(void 0!==t)return t.exports;var n=y[e]={id:e,loaded:!1,exports:{}};return i[e].call(n.exports,n,n.exports,m),n.loaded=!0,n.exports}m.y=a,m.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return m.d(t,{a:t}),t},m.d=function(e,t){for(var n in t)m.o(t,n)&&!m.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},m.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),m.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},m.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},m.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e;m.g.importScripts&&(e=m.g.location+"");var t=m.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),m.p=e}();var g={};return(0,m(968).s)(1),function(){"use strict";var i=function(e){var t=e.to,n=e.templateParams,r=e.children,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["to","templateParams","children"]);return Re.default.createElement("a",Me({onClick:function(e){return o=t,i=n,void((r=e).metaKey||r.ctrlKey||r.shiftKey||0!=r.button||(r.preventDefault(),(0,Le.navigate)({to:o,templateParams:i})));var r,o,i},href:(0,Le.interpolateUrl)(t,n)},o),r)},a=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},u=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},c=function(e){return function(t){var n,r=function(e){if(Array.isArray(e))return e}(n=(0,Re.useState)(e.getState()))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n)||function(e,t){if(e){if("string"==typeof e)return a(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,2):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=r[0],i=r[1];(0,Re.useEffect)((function(){return e.subscribe((function(e){return i(e)}))}),[]);var c={};return t&&(c=(0,Re.useMemo)((function(){return function(e,t){"function"==typeof t&&(t=t(e));var n={};for(var r in t)n[r]=e.action(t[r]);return n}(e,t)}),[e,t])),function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){u(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({},o,c)}},s=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},l=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},f=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)(window.navigator.onLine))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return l(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Re.useEffect)((function(){return(0,Be.subscribeConnectivityChanged)((function(e){var t=e.online;return r(t)}))}),[]),n},p=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},d=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Re.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return p(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1];return(0,Re.useEffect)((function(){var t=function(t){var n,i,a=null!==(i=null===(n=t.slots[e])||void 0===n?void 0:n.assignedExtensions)&&void 0!==i?i:[];(0,ze.isEqual)(a,r)||o(a)};return t((0,Ne.getExtensionStore)().getState()),(0,Ne.getExtensionStore)().subscribe(t)}),[e,r]),r},h=function(e){var t=f(),n=d(e);return(0,Re.useMemo)((function(){return(0,Ne.getConnectedExtensions)(n,t)}),[n,t])},v=function(e){var t=(0,Re.useContext)(De).moduleName;if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,Re.useEffect)((function(){(0,Ne.registerExtensionSlot)(t,e)}),[]),{extensions:h(e),extensionSlotName:e,extensionSlotModuleName:t}},y=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},b=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){y(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},w=function(e){return e},_=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},x=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{};n%2?_(Object(r),!0).forEach((function(t){S(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))},r=1;r<arguments.length;r++)n(r);return e},S=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},O=function(e,t){var n;if("function"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(Ke(n)));return function(){var e=n(t);if(!r(e,HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(Ke(e)));return e}},E=function(e){if("object"!==We(e))throw new Error("single-spa-react requires a configuration object");var t=x(x({},Ze),e);if(!t.React)throw new Error("single-spa-react must be passed opts.React");if(!t.ReactDOM)throw new Error("single-spa-react must be passed opts.ReactDOM");if(!t.rootComponent&&!t.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(t.errorBoundary&&"function"!=typeof t.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!qe&&t.React.createContext&&(qe=t.React.createContext()),t.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(t);var n={bootstrap:k.bind(null,t),mount:j.bind(null,t),unmount:C.bind(null,t)};return t.parcelCanUpdate&&(n.update=$.bind(null,t)),n},k=function(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then((function(t){e.rootComponent=t}))},j=function(e,t){return new Promise((function(n,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=P(e,t,(function(){n(this)})),i=O(e,t)(),a=function(e){var t=e.opts,n=e.elementToRender,r=e.domElement,o="function"==typeof t.renderType?t.renderType():t.renderType;if(["createRoot","unstable_createRoot","createBlockingRoot","unstable_createBlockingRoot"].indexOf(o)>=0){var i=t.ReactDOM[o](r);return i.render(n),i}return"hydrate"===o?t.ReactDOM.hydrate(n,r):t.ReactDOM.render(n,r),null}({elementToRender:o,domElement:i,opts:e});e.domElements[t.name]=i,e.renderResults[t.name]=a}))},C=function(e,t){return new Promise((function(n){e.unmountFinished=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():e.ReactDOM.unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]}))},$=function(e,t){return new Promise((function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=P(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=O(e,t)();e.ReactDOM.render(r,i)}}))},P=function(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=qe?e.React.createElement(qe.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),e.React.createElement(e.SingleSpaRoot,x(x({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach((function(e){return e()})),delete e.updateResolves[t.name])},unmountFinished:function(){setTimeout(e.unmountFinished)}}),o)},A=function(e,t){return!t||"object"!==et(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t},T=function(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw new Error("Invalid options");var t=Object.assign({},nt,e);return function(e){var n;return(n=function(n){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xe(e,t)}(u,n);var o,i,a=(o=u,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Je(o);if(i){var n=Je(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return A(this,e)});function u(e){var n;return function(e,t){if(!r(e,t))throw new TypeError("Cannot call a class as a function")}(this,u),(n=a.call(this,e)).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,extension:e._extensionContext}},n}var c=u.prototype;return c.componentDidCatch=function(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout((function(){throw e})),this.setState({caughtError:e,caughtErrorInfo:n})},c.render=function(){if(this.state.caughtError)return Re.default.createElement("div",null,"An error has occurred. Please try reloading the page.");var n=this,r=Re.default.createElement(De.Provider,{value:this.state.config},Re.default.createElement(Re.default.Suspense,{fallback:null},t.disableTranslations?Re.default.createElement(e,Ye({},this.props)):Re.default.createElement(rt,{ns:t.moduleName,forceUpdate:function(){return n.forceUpdate()}},Re.default.createElement(Qe.I18nextProvider,{i18n:tt,defaultNS:t.moduleName},Re.default.createElement(e,Ye({},this.props))))));return t.strictMode||!Re.default.StrictMode?r:Re.default.createElement(Re.default.StrictMode,null,r)},u}(Re.default.Component)).displayName="OpenmrsReactComponent(".concat(t.featureName,")"),n}},I=function(e,t){return E({React:Re.default,ReactDOM:He.default,rootComponent:T(t)(e)})},R=function(e,t){return function(){return e().then((function(e){return I(e.default,t)}))}},D=function(e,t){return function(){return Promise.resolve(I(e,t))}},L=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},M=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Re.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return L(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1];return(0,Re.useEffect)((function(){return(0,Ne.getExtensionStore)().subscribe((function(t){var n,i,a=null!==(i=null===(n=t.slots[e])||void 0===n?void 0:n.assignedExtensions.map((function(e){return e.id})))&&void 0!==i?i:[];(0,ze.isEqual)(a,r)||o(a)}))}),[]),r},N=function(e){(0,Re.useEffect)((function(){if(e){var t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=t}}}),[e])},U=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},B=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},z=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},F=function(e){var t=this.__data__=new st(e);this.size=t.size},V=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Bt;++t<n;)this.add(e[t])},H=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},W=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},K=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return H(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},q=function(){var e=(0,Re.useContext)(De),t=e.moduleName,n=e.extension;if(!t&&!n)throw Error('No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".');var r=function(e){var t,n,r,o,i,a,u=(0,Re.useMemo)((function(){return(0,Le.getConfigStore)(e)}),[e]),c=e,s=(t=u,o=(r=K((0,Re.useState)((n=t,function(){var e=n.getState();return e.loaded&&e.config?e.config:null})),2))[0],i=r[1],(0,Re.useEffect)((function(){return null==t?void 0:t.subscribe((function(e){e.loaded&&e.config&&i(e.config)}))}),[t]),o);if(!s)throw er[c]||(er[c]=(a=u,new Promise((function(e){var t=a.subscribe((function(n){n.loaded&&n.config&&(e(n.config),t())}))})))),er[c];return s}(t),o=function(e){var t,n,r,o,i,a,u,c=(0,Re.useMemo)(Le.getExtensionsConfigStore,[]),s=(t=c,n=e,i=K((0,Re.useState)((r=t,(o=n)?function(){var e=r.getState(),t=(0,Le.getExtensionConfigFromStore)(e,o.extensionSlotName,o.extensionId);if(t.loaded&&t.config)return t.config}:null)),2),a=i[0],u=i[1],(0,Re.useEffect)((function(){if(n)return t.subscribe((function(e){var t=(0,Le.getExtensionConfigFromStore)(e,n.extensionSlotName,n.extensionId);t.loaded&&t.config&&!Xn(t.config,a)&&u(t.config)}))}),[t,n,a]),a);if(!s&&e){var l="".concat(e.extensionSlotName,"-").concat(e.extensionId);throw!er[l]&&c&&(er[l]=function(e,t){return new Promise((function(n){var r=e.subscribe((function(e){var o=(0,Le.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&(n(o.config),r())}))}))}(c,e)),er[l]}return s||{}}(n),i=(0,Re.useMemo)((function(){return function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){W(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({},r,o)}),[r,o]);return i},Z=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},G=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Q=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){G(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},Y=function(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]},J=function(e,t){switch(t.type){case Kn.loadPatient:return Q({},e,{patientUuid:t.patientUuid,patient:null,isPendingUuid:!1,isLoadingPatient:!0,err:null});case Kn.newPatient:return Q({},e,{patient:t.patient,isPendingUuid:!1,isLoadingPatient:!1,err:null});case Kn.loadError:return Q({},e,{patient:null,isPendingUuid:!1,isLoadingPatient:!1,err:t.err});default:return e}},X=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Re.useReducer)(J,Q({},rr,{patientUuid:null!=e?e:null,isPendingUuid:!e,isLoadingPatient:!!e})))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return Z(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1];return(0,Re.useEffect)((function(){if(r.isPendingUuid){var e=Y();o(e?{type:Kn.loadPatient,patientUuid:e}:{type:Kn.newPatient,patient:null})}var t=!0;return r.isLoadingPatient&&r.patientUuid&&(0,tr.fetchCurrentPatient)(r.patientUuid).then((function(e){return t&&o({patient:e.data,type:Kn.newPatient})}),(function(e){return t&&o({err:e,type:Kn.loadError})})),function(){t=!1}}),[r.isPendingUuid,r.isLoadingPatient,r.patientUuid]),(0,Re.useEffect)((function(){var e=function(e){var t=Y();t!=r.patientUuid&&o({type:Kn.loadPatient,patientUuid:t})};return window.addEventListener("single-spa:routing-event",e),function(){return window.removeEventListener("single-spa:routing-event",e)}}),[r.patientUuid]),{isLoading:r.isPendingUuid||r.isLoadingPatient,patient:r.patient,patientUuid:null!=e?e:r.patientUuid,error:r.err}},ee=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},te=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ne=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){te(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},re=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ee(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},oe=function(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]},ie=function(e,t){switch(t.type){case nr.loadPatient:return ne({},e,{patient:null,isLoadingPatient:!0,err:null});case nr.newPatient:return ne({},e,{patient:t.patient,isLoadingPatient:!1,err:null});case nr.loadError:return ne({},e,{patient:null,isLoadingPatient:!1,err:t.err});default:return e}},ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe(),t=re((0,Re.useReducer)(ie,ur),2),n=t[0],r=t[1];return(0,Re.useEffect)((function(){var t=!0;return e?((0,tr.fetchCurrentPatient)(e).then((function(e){return t&&r({patient:e.data,type:nr.newPatient})}),(function(e){return t&&r({err:e,type:nr.loadError})})),r({type:nr.loadPatient})):r({type:nr.newPatient,patient:null}),function(){t=!1}}),[e]),[n.isLoadingPatient,n.patient,e,n.err]},ue=function(e){var t=h(e);return(0,Re.useMemo)((function(){return Object.fromEntries(t.map((function(e){return[e.name,e.meta]})))}),[t])},ce=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},se=function(){var e,t=(e=(0,Re.useState)(0),function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return ce(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ce(e,2):void 0}}(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.")}())[1];return(0,Re.useCallback)((function(){t((function(e){return e+1}))}),[])},le=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},fe=function(){var e="tablet";return document.body.classList.forEach((function(t){switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-small-desktop":e="large-desktop";break;case"omrs-breakpoint-gt-tablet":e="small-desktop"}})),e},pe=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)(fe))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return le(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?le(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Re.useEffect)((function(){var e=function(){r(fe())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),n},de=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},he=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return de(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?de(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Re.useEffect)((function(){var e=(0,tr.getLocations)().subscribe((function(e){r(e)}),(function(e){console.error(e)}));return function(){return e.unsubscribe()}}),[]),n},ve=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,Re.useRef)(null);return(0,Re.useEffect)((function(){if(t){var r=function(t){var r;(null==n||null===(r=n.current)||void 0===r?void 0:r.contains(t.target))||e(t)};return window.addEventListener("click",r),function(){return window.removeEventListener("click",r)}}}),[e,t]),n},ye=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},me=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},ge=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)(null))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return me(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?me(e,2):void 0}}(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.")}(),n=t[0],r=t[1],o=null;if(!n){if(or){var i=(0,tr.getSessionStore)().getState();i.loaded&&(o=i.session)}else or=new Promise((function(e){var t=function(t){var n=t.loaded,r=t.session;n&&(e(r),o=r,ir&&ir(),ir=void 0)};t((0,tr.getSessionStore)().getState()),o||(ir=(0,tr.getSessionStore)().subscribe(t))}));if(!o)throw or;r(o)}(0,Re.useEffect)((function(){return ir||(ir=(0,tr.getSessionStore)().subscribe((function(e){var t=e.loaded,n=e.session;t&&(o=n,r(n))}))),function(){ir&&ir(),ir=void 0}}),[]);var a=n||o;if(!a)throw or?(console.warn("useSession is in an unexpected state. Attempting to recover."),or):Error("useSession is in an invalid state.");return a},be=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},we=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},_e=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){we(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},xe=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return be(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?be(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Se=function(e,t){"function"==typeof t&&(t=t(e));var n={};for(var r in t)n[r]=e.action(t[r]);return n},Oe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dr,n=arguments.length>2?arguments[2]:void 0,r=xe((0,Re.useState)((function(){return t(e.getState())})),2),o=r[0],i=r[1];(0,Re.useEffect)((function(){return(0,pr.subscribeTo)(e,t,i)}),[e,t]);var a={};return n&&(a=(0,Re.useMemo)((function(){return Se(e,n)}),[e,n])),_e({},o,a)},Ee=function(e,t){return Oe(e,dr,t)},ke=function(e,t,n,o){return new(n||(n=Promise))((function(i,a){function u(e){try{s(o.next(e))}catch(e){a(e)}}function c(e){try{s(o.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,r(t,n)?t:new n((function(e){e(t)}))).then(u,c)}s((o=o.apply(e,t||[])).next())}))},je=function(e,t){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=t.call(e,a)}catch(e){i=[6,e],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])}}},Ce=function(e){var t,n=no(e?"/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(tr.defaultVisitCustomRepresentation,"&includeInactive=false"):null,tr.openmrsFetch),r=n.data,o=n.error;return{error:o,mutate:n.mutate,isValidating:n.isValidating,currentVisit:(0,Re.useMemo)((function(){return null!==(t=null==r?void 0:r.data.results.find((function(e){return null===e.stopDatetime&&(0,ro.default)(e.startDatetime).isToday()})))&&void 0!==t?t:null}),[null==r?void 0:r.data.results]),isLoading:!r&&!o}},$e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Pe=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return $e(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$e(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Re.useEffect)((function(){var e=(0,tr.getVisitTypes)().subscribe((function(e){r(e)}),(function(e){return console.error(e)}));return function(){return e.unsubscribe()}}),[]),n},Ae=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Te=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ae(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ae(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=Te((0,Re.useState)(1),2),r=n[0],o=n[1],i=(0,Re.useMemo)((function(){return Math.max(1,Math.ceil(e.length/t))}),[e.length,t]),a=(0,Re.useMemo)((function(){var n=(r-1)*t,o=(r+0)*t;return e.slice(n,o)}),[e,r,t]);return{results:a,totalPages:i,currentPage:r,paginated:e.length>t,showNextButton:r<i,showPreviousButton:r>1,goTo:function(e){o(Math.max(1,Math.min(i,e)))},goToNext:function(){r<i&&o(r+1)},goToPrevious:function(){r>1&&o(r-1)}}};m.r(g),m.d(g,{ComponentContext:function(){return De},ConfigurableLink:function(){return i},Extension:function(){return Ue},ExtensionSlot:function(){return Ve},UserHasAccess:function(){return fr},createUseStore:function(){return c},getAsyncExtensionLifecycle:function(){return ot},getAsyncLifecycle:function(){return R},getLifecycle:function(){return I},getSyncLifecycle:function(){return D},isDesktop:function(){return lr},openmrsComponentDecorator:function(){return T},useAssignedExtensionIds:function(){return M},useAssignedExtensions:function(){return d},useBodyScrollLock:function(){return N},useConfig:function(){return q},useConnectedExtensions:function(){return h},useConnectivity:function(){return f},useCurrentPatient:function(){return ae},useExtensionInternalStore:function(){return cr},useExtensionSlot:function(){return v},useExtensionSlotMeta:function(){return ue},useExtensionStore:function(){return sr},useForceUpdate:function(){return se},useLayoutType:function(){return pe},useLocations:function(){return he},useOnClickOutside:function(){return ve},usePagination:function(){return Ie},usePatient:function(){return X},useSession:function(){return ge},useStore:function(){return Oe},useStoreWithActions:function(){return Ee},useVisit:function(){return Ce},useVisitTypes:function(){return Pe}});var Re=m(954),De=Re.default.createContext({moduleName:""}),Le=m(824);function Me(){return Me=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Me.apply(this,arguments)}var Ne=m(45),Ue=function(e){var t,n=e.state,r=e.wrap,o=function(e){if(Array.isArray(e))return e}(t=(0,Re.useState)())||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return s(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=o[0],a=o[1],u=(0,Re.useContext)(De).extension,c=(0,Re.useCallback)((function(e){a(e)}),[]);(0,Re.useEffect)((function(){if(null!=i&&u)return(0,Ne.renderExtension)(i,u.extensionSlotName,u.extensionSlotModuleName,u.extensionId,void 0,n)}),[null==u?void 0:u.extensionSlotName,null==u?void 0:u.extensionId,null==u?void 0:u.extensionSlotModuleName,n,i]);var l=Re.default.createElement("div",{ref:c,"data-extension-id":null==u?void 0:u.extensionId,style:{position:"relative"}});return u&&r?r(l,u):l},Be=m(728),ze=m(891);function Fe(){return Fe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fe.apply(this,arguments)}var Ve=function(e){var t=e.extensionSlotName,n=e.select,r=void 0===n?w:n,o=e.children,i=e.state,a=e.style,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["extensionSlotName","select","children","state","style"]),c=(0,Re.useRef)(null),s=v(t),l=s.extensions,f=s.extensionSlotModuleName,p=(0,Re.useRef)(i);(function(e,t){if(e===t)return!0;if(!e&&t)return!1;if(e&&!t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(!(i in t)||t[i]!==e[i])return!1}return!0})(p.current,i)||(p.current=i);var d=(0,Re.useMemo)((function(){return t&&r(l).map((function(e){return Re.default.createElement(De.Provider,{key:e.id,value:{moduleName:f,extension:{extensionId:e.id,extensionSlotName:t,extensionSlotModuleName:f}}},null!=o?o:Re.default.createElement(Ue,{state:p.current}))}))}),[r,l,t,p.current]);return Re.default.createElement("div",Fe({ref:c,"data-extension-slot-name":t,"data-extension-slot-module-name":f,style:b({},a,{position:"relative"})},u),d)},He=m(493);function We(e){return(We="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":o(e)})(e)}function Ke(e){return(Ke="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":o(e)})(e)}var qe=null;try{qe=n(776).createContext()}catch(e){}var Ze={React:null,ReactDOM:null,rootComponent:null,loadRootComponent:null,renderType:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{}},Ge=m(64),Qe=m(281);function Ye(){return Ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ye.apply(this,arguments)}function Je(e){return(Je=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xe(e,t){return(Xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var et=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":o(e)},tt=Ge.default.default||Ge.default,nt={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},rt=function(e){(0,Re.useEffect)((function(){return tt.on("languageChanged",e.forceUpdate),function(){return tt.off("languageChanged",e.forceUpdate)}}),[e.forceUpdate]);var t=(0,Re.useRef)(null);if(t.current)throw t.current;if(!tt.hasLoadedNamespace(e.ns)){var n=setTimeout((function(){console.warn("openmrsComponentDecorator: the React suspense promise for i18next.loadNamespaces(['".concat(e.ns,"']) did not resolve nor reject after three seconds. This could mean you have multiple versions of i18next and haven't made i18next a webpack external in all projects."))}),3e3);throw tt.loadNamespaces([e.ns]).then((function(){return clearTimeout(n)})).catch((function(e){clearTimeout(n),t.current=e}))}return Re.default.createElement(Re.default.Fragment,null,e.children)},ot=R,it=function(e,t){return e===t||e!=e&&t!=t},at=function(e,t){for(var n=e.length;n--;)if(it(e[n][0],t))return n;return-1},ut=Array.prototype.splice;U.prototype.clear=function(){this.__data__=[],this.size=0},U.prototype.delete=function(e){var t=this.__data__,n=at(t,e);return!(n<0||(n==t.length-1?t.pop():ut.call(t,n,1),--this.size,0))},U.prototype.get=function(e){var t=this.__data__,n=at(t,e);return n<0?void 0:t[n][1]},U.prototype.has=function(e){return at(this.__data__,e)>-1},U.prototype.set=function(e,t){var n=this.__data__,r=at(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var ct,st=U,lt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ft="object"==typeof self&&self&&self.Object===Object&&self,pt=lt||ft||Function("return this")(),dt=pt.Symbol,ht=Object.prototype,vt=ht.hasOwnProperty,yt=ht.toString,mt=dt?dt.toStringTag:void 0,gt=Object.prototype.toString,bt=dt?dt.toStringTag:void 0,wt=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":bt&&bt in Object(e)?function(e){var t=vt.call(e,mt),n=e[mt];try{e[mt]=void 0;var r=!0}catch(e){}var o=yt.call(e);return r&&(t?e[mt]=n:delete e[mt]),o}(e):(t=e,gt.call(t));var t},_t=function(e){var t=void 0===e?"undefined":o(e);return null!=e&&("object"==t||"function"==t)},xt=function(e){if(!_t(e))return!1;var t=wt(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},St=pt["__core-js_shared__"],Ot=(ct=/[^.]+$/.exec(St&&St.keys&&St.keys.IE_PROTO||""))?"Symbol(src)_1."+ct:"",Et=Function.prototype.toString,kt=function(e){if(null!=e){try{return Et.call(e)}catch(e){}try{return e+""}catch(e){}}return""},jt=/^\[object .+?Constructor\]$/,Ct=Function.prototype,$t=Object.prototype,Pt=Ct.toString,At=$t.hasOwnProperty,Tt=RegExp("^"+Pt.call(At).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),It=function(e,t){var n,r=null==(n=e)?void 0:n[t];return function(e){return!(!_t(e)||(t=e,Ot&&Ot in t))&&(xt(e)?Tt:jt).test(kt(e));var t}(r)?r:void 0},Rt=It(pt,"Map"),Dt=It(Object,"create"),Lt=Object.prototype.hasOwnProperty,Mt=Object.prototype.hasOwnProperty;B.prototype.clear=function(){this.__data__=Dt?Dt(null):{},this.size=0},B.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},B.prototype.get=function(e){var t=this.__data__;if(Dt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Lt.call(t,e)?t[e]:void 0},B.prototype.has=function(e){var t=this.__data__;return Dt?void 0!==t[e]:Mt.call(t,e)},B.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Dt&&void 0===t?"__lodash_hash_undefined__":t,this};var Nt=B,Ut=function(e,t){var n,r,i=e.__data__;return("string"==(r=o(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};z.prototype.clear=function(){this.size=0,this.__data__={hash:new Nt,map:new(Rt||st),string:new Nt}},z.prototype.delete=function(e){var t=Ut(this,e).delete(e);return this.size-=t?1:0,t},z.prototype.get=function(e){return Ut(this,e).get(e)},z.prototype.has=function(e){return Ut(this,e).has(e)},z.prototype.set=function(e,t){var n=Ut(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Bt=z;F.prototype.clear=function(){this.__data__=new st,this.size=0},F.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},F.prototype.get=function(e){return this.__data__.get(e)},F.prototype.has=function(e){return this.__data__.has(e)},F.prototype.set=function(e,t){var n=this.__data__;if(r(n,st)){var o=n.__data__;if(!Rt||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new Bt(o)}return n.set(e,t),this.size=n.size,this};var zt=F;V.prototype.add=V.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},V.prototype.has=function(e){return this.__data__.has(e)};var Ft=V,Vt=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Ht=function(e,t){return e.has(t)},Wt=function(e,t,n,r,o,i){var a=1&n,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(e),l=i.get(t);if(s&&l)return s==t&&l==e;var f=-1,p=!0,d=2&n?new Ft:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var h=e[f],v=t[f];if(r)var y=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==y){if(y)continue;p=!1;break}if(d){if(!Vt(t,(function(e,t){if(!Ht(d,t)&&(h===e||o(h,e,n,r,i)))return d.push(t)}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p},Kt=pt.Uint8Array,qt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Zt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Gt=dt?dt.prototype:void 0,Qt=Gt?Gt.valueOf:void 0,Yt=Array.isArray,Jt=Object.prototype.propertyIsEnumerable,Xt=Object.getOwnPropertySymbols,en=Xt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(Xt(e),(function(t){return Jt.call(e,t)})))}:function(){return[]},tn=function(e){return null!=e&&"object"==typeof e},nn=function(e){return tn(e)&&"[object Arguments]"==wt(e)},rn=Object.prototype,on=rn.hasOwnProperty,an=rn.propertyIsEnumerable,un=nn(function(){return arguments}())?nn:function(e){return tn(e)&&on.call(e,"callee")&&!an.call(e,"callee")},cn=un,sn=t&&!t.nodeType&&t,ln=sn&&e&&!e.nodeType&&e,fn=ln&&ln.exports===sn?pt.Buffer:void 0,pn=(fn?fn.isBuffer:void 0)||function(){return!1},dn=/^(?:0|[1-9]\d*)$/,hn=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},vn={};vn["[object Float32Array]"]=vn["[object Float64Array]"]=vn["[object Int8Array]"]=vn["[object Int16Array]"]=vn["[object Int32Array]"]=vn["[object Uint8Array]"]=vn["[object Uint8ClampedArray]"]=vn["[object Uint16Array]"]=vn["[object Uint32Array]"]=!0,vn["[object Arguments]"]=vn["[object Array]"]=vn["[object ArrayBuffer]"]=vn["[object Boolean]"]=vn["[object DataView]"]=vn["[object Date]"]=vn["[object Error]"]=vn["[object Function]"]=vn["[object Map]"]=vn["[object Number]"]=vn["[object Object]"]=vn["[object RegExp]"]=vn["[object Set]"]=vn["[object String]"]=vn["[object WeakMap]"]=!1;var yn,mn,gn,bn=t&&!t.nodeType&&t,wn=bn&&e&&!e.nodeType&&e,_n=wn&&wn.exports===bn&&lt.process,xn=function(){try{return wn&&wn.require&&wn.require("util").types||_n&&_n.binding&&_n.binding("util")}catch(e){}}(),Sn=xn&&xn.isTypedArray,On=Sn?(yn=Sn,function(e){return yn(e)}):function(e){return tn(e)&&hn(e.length)&&!!vn[wt(e)]},En=Object.prototype.hasOwnProperty,kn=Object.prototype,jn=(mn=Object.keys,gn=Object,function(e){return mn(gn(e))}),Cn=Object.prototype.hasOwnProperty,$n=function(e){return n=en,r=function(e){return null!=(t=e)&&hn(t.length)&&!xt(t)?function(e,t){var n,r,i,a=Yt(e),u=!a&&cn(e),c=!a&&!u&&pn(e),s=!a&&!u&&!c&&On(e),l=a||u||c||s,f=l?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],p=f.length;for(var d in e)!En.call(e,d)||l&&("length"==d||c&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||(r=p,i=void 0===(n=d)?"undefined":o(n),(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&dn.test(n))&&n>-1&&n%1==0&&n<r))||f.push(d);return f}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||kn))return jn(e);var t,n,r=[];for(var o in Object(e))Cn.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t}(t=e),Yt(t)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(t));var t,n,r},Pn=Object.prototype.hasOwnProperty,An=It(pt,"DataView"),Tn=It(pt,"Promise"),In=It(pt,"Set"),Rn=It(pt,"WeakMap"),Dn="[object Map]",Ln="[object Promise]",Mn="[object Set]",Nn="[object WeakMap]",Un="[object DataView]",Bn=kt(An),zn=kt(Rt),Fn=kt(Tn),Vn=kt(In),Hn=kt(Rn),Wn=wt;(An&&Wn(new An(new ArrayBuffer(1)))!=Un||Rt&&Wn(new Rt)!=Dn||Tn&&Wn(Tn.resolve())!=Ln||In&&Wn(new In)!=Mn||Rn&&Wn(new Rn)!=Nn)&&(Wn=function(e){var t=wt(e),n="[object Object]"==t?e.constructor:void 0,r=n?kt(n):"";if(r)switch(r){case Bn:return Un;case zn:return Dn;case Fn:return Ln;case Vn:return Mn;case Hn:return Nn}return t});var Kn,qn=Wn,Zn="[object Arguments]",Gn="[object Array]",Qn="[object Object]",Yn=Object.prototype.hasOwnProperty,Jn=function e(t,n,o,i,a){return t===n||(null==t||null==n||!tn(t)&&!tn(n)?t!=t&&n!=n:function(e,t,n,o,i,a){var u=Yt(e),c=Yt(t),s=u?Gn:qn(e),l=c?Gn:qn(t),f=(s=s==Zn?Qn:s)==Qn,p=(l=l==Zn?Qn:l)==Qn,d=s==l;if(d&&pn(e)){if(!pn(t))return!1;u=!0,f=!1}if(d&&!f)return a||(a=new zt),u||On(e)?Wt(e,t,n,o,i,a):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Kt(e),new Kt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return it(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=qt;case"[object Set]":var c=1&r;if(u||(u=Zt),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var l=Wt(u(e),u(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(Qt)return Qt.call(e)==Qt.call(t)}return!1}(e,t,s,n,o,i,a);if(!(1&n)){var h=f&&Yn.call(e,"__wrapped__"),v=p&&Yn.call(t,"__wrapped__");if(h||v){var y=h?e.value():e,m=v?t.value():t;return a||(a=new zt),i(y,m,n,o,a)}}return!!d&&(a||(a=new zt),function(e,t,n,o,i,a){var u=1&n,c=$n(e),s=c.length;if(s!=$n(t).length&&!u)return!1;for(var l=s;l--;){var f=c[l];if(!(u?f in t:Pn.call(t,f)))return!1}var p=a.get(e),d=a.get(t);if(p&&d)return p==t&&d==e;var h=!0;a.set(e,t),a.set(t,e);for(var v=u;++l<s;){var y=e[f=c[l]],m=t[f];if(o)var g=u?o(m,y,f,t,e,a):o(y,m,f,e,t,a);if(!(void 0===g?y===m||i(y,m,n,o,a):g)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,o,i,a))}(t,n,o,i,e,a))},Xn=function(e,t){return Jn(e,t)},er={},tr=m(766);!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLoadError"}(Kn||(Kn={}));var nr,rr={patientUuid:null,patient:null,isPendingUuid:!0,isLoadingPatient:!1,err:null};!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLloadErroroadError"}(nr||(nr={}));var or,ir,ar,ur={patient:null,isLoadingPatient:!0,err:null},cr=c((0,Ne.getExtensionInternalStore)()),sr=c((0,Ne.getExtensionStore)()),lr=function(e){return"small-desktop"===e||"large-desktop"===e},fr=function(e){var t,n=e.privilege,r=e.fallback,o=e.children,i=function(e){if(Array.isArray(e))return e}(t=(0,Re.useState)(null))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return ye(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ye(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],u=i[1];return(0,Re.useEffect)((function(){var e=(0,tr.getCurrentUser)({includeAuthStatus:!1}).subscribe(u);return function(){return e.unsubscribe()}}),[]),a&&(0,tr.userHasAccess)(n,a)?Re.default.createElement(Re.default.Fragment,null,o):r?Re.default.createElement(Re.default.Fragment,null,r):null},pr=m(385),dr=function(e){return e},hr=function(){},vr=void 0,yr=Object,mr=function(e){return e===vr},gr=function(e){return"function"==typeof e},br=function(e,t){return yr.assign({},e,t)},wr="undefined",_r=function(){return("undefined"==typeof window?"undefined":o(window))!=wr},xr=new WeakMap,Sr=0,Or=function(e){var t,n,r=void 0===e?"undefined":o(e),i=e&&e.constructor,a=i==Date;if(yr(e)!==e||a||i==RegExp)t=a?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=xr.get(e))return t;if(t=++Sr+"~",xr.set(e,t),i==Array){for(t="@",n=0;n<e.length;n++)t+=Or(e[n])+",";xr.set(e,t)}if(i==yr){t="#";for(var u=yr.keys(e).sort();!mr(n=u.pop());)mr(e[n])||(t+=n+":"+Or(e[n])+",");xr.set(e,t)}}return t},Er=!0,kr=_r(),jr=("undefined"==typeof document?"undefined":o(document))!=wr,Cr=kr&&window.addEventListener?window.addEventListener.bind(window):hr,$r=jr?document.addEventListener.bind(document):hr,Pr=kr&&window.removeEventListener?window.removeEventListener.bind(window):hr,Ar=jr?document.removeEventListener.bind(document):hr,Tr={isOnline:function(){return Er},isVisible:function(){var e=jr&&document.visibilityState;return mr(e)||"hidden"!==e}},Ir={initFocus:function(e){return $r("visibilitychange",e),Cr("focus",e),function(){Ar("visibilitychange",e),Pr("focus",e)}},initReconnect:function(e){var t=function(){Er=!0,e()},n=function(){Er=!1};return Cr("online",t),Cr("offline",n),function(){Pr("online",t),Pr("offline",n)}}},Rr=!_r()||"Deno"in window,Dr=Rr?Re.useEffect:Re.useLayoutEffect,Lr="undefined"!=typeof navigator&&navigator.connection,Mr=!Rr&&Lr&&(["slow-2g","2g"].includes(Lr.effectiveType)||Lr.saveData),Nr=function(e){if(gr(e))try{e=e()}catch(t){e=""}var t=[].concat(e);return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?Or(e):"",t,e?"$swr$"+e:""]},Ur=new WeakMap,Br=function(e,t,n,r,o,i,a){void 0===a&&(a=!0);var u=Ur.get(e),c=u[0],s=u[1],l=u[3],f=c[t],p=s[t];if(a&&p)for(var d=0;d<p.length;++d)p[d](n,r,o);return i&&(delete l[t],f&&f[0])?f[0](2).then((function(){return e.get(t)})):e.get(t)},zr=0,Fr=function(){return++zr},Vr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ke(void 0,void 0,void 0,(function(){var t,n,r,o,i,a,u,c,s,l,f,p,d,h,v,y,m,g,b,w;return je(this,(function(_){switch(_.label){case 0:if(t=e[0],n=e[1],r=e[2],o=e[3],a=!!mr((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,u=!1!==i.revalidate,c=!1!==i.rollbackOnError,s=i.optimisticData,l=Nr(n),f=l[0],p=l[2],!f)return[2];if(d=Ur.get(t),h=d[2],e.length<3)return[2,Br(t,f,t.get(f),vr,vr,u,!0)];if(v=r,m=Fr(),h[f]=[m,0],g=!mr(s),b=t.get(f),g&&(t.set(f,s),Br(t,f,s)),gr(v))try{v=v(t.get(f))}catch(e){y=e}return v&&gr(v.then)?[4,v.catch((function(e){y=e}))]:[3,2];case 1:if(v=_.sent(),m!==h[f][0]){if(y)throw y;return[2,v]}y&&g&&c&&(a=!0,v=b,t.set(f,b)),_.label=2;case 2:return a&&(y||(gr(a)&&(v=a(v,b)),t.set(f,v)),t.set(p,br(t.get(p),{error:y}))),h[f][1]=Fr(),[4,Br(t,f,v,y,vr,u,!!a)];case 3:if(w=_.sent(),y)throw y;return[2,a?w:v]}}))}))},Hr=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},Wr=function(e,t){if(!Ur.has(e)){var n=br(Ir,t),r={},o=Vr.bind(vr,e),i=hr;if(Ur.set(e,[r,{},{},{},o]),!Rr){var a=n.initFocus(setTimeout.bind(vr,Hr.bind(vr,r,0))),u=n.initReconnect(setTimeout.bind(vr,Hr.bind(vr,r,1)));i=function(){a&&a(),u&&u(),Ur.delete(e)}}return[e,o,i]}return[e,Ur.get(e)[4]]},Kr=Wr(new Map),qr=Kr[0],Zr=Kr[1],Gr=br({onLoadingSlow:hr,onSuccess:hr,onError:hr,onErrorRetry:function(e,t,n,r,o){var i=n.errorRetryCount,a=o.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!mr(i)&&a>i||setTimeout(r,u,o)},onDiscarded:hr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Mr?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Mr?5e3:3e3,compare:function(e,t){return Or(e)==Or(t)},isPaused:function(){return!1},cache:qr,mutate:Zr,fallback:{}},Tr),Qr=function(e,t){var n=br(e,t);if(t){var r=e.use,o=e.fallback,i=t.use,a=t.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=br(o,a))}return n},Yr=(0,Re.createContext)({}),Jr=function(e){return gr(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},Xr=function(){return br(Gr,(0,Re.useContext)(Yr))},eo=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},to={dedupe:!0},no=(yr.defineProperty((function(e){var t=e.value,n=Qr((0,Re.useContext)(Yr),t),r=t&&t.provider,o=(0,Re.useState)((function(){return r?Wr(r(n.cache||qr),t):vr}))[0];return o&&(n.cache=o[0],n.mutate=o[1]),Dr((function(){return o?o[2]:vr}),[]),(0,Re.createElement)(Yr.Provider,br(e,{value:n}))}),"default",{value:Gr}),ar=function(e,t,n){var r=n.cache,i=n.compare,a=n.fallbackData,u=n.suspense,c=n.revalidateOnMount,s=n.refreshInterval,l=n.refreshWhenHidden,f=n.refreshWhenOffline,p=Ur.get(r),d=p[0],h=p[1],v=p[2],y=p[3],m=Nr(e),g=m[0],b=m[1],w=m[2],_=(0,Re.useRef)(!1),x=(0,Re.useRef)(!1),S=(0,Re.useRef)(g),O=(0,Re.useRef)(t),E=(0,Re.useRef)(n),k=function(){return E.current},j=function(){return k().isVisible()&&k().isOnline()},C=function(e){return r.set(w,br(r.get(w),e))},$=r.get(g),P=mr(a)?n.fallback[g]:a,A=mr($)?P:$,T=r.get(w)||{},I=T.error,R=!_.current,D=function(){return R&&!mr(c)?c:!k().isPaused()&&(u?!mr(A):mr(A)||n.revalidateIfStale)},L=!(!g||!t)&&(!!T.isValidating||R&&D()),M=function(e,t){var n=(0,Re.useState)({})[1],r=(0,Re.useRef)(e),o=(0,Re.useRef)({data:!1,error:!1,isValidating:!1}),i=(0,Re.useCallback)((function(e){var i=!1,a=r.current;for(var u in e){var c=u;a[c]!==e[c]&&(a[c]=e[c],o.current[c]&&(i=!0))}i&&!t.current&&n({})}),[]);return Dr((function(){r.current=e})),[r,o.current,i]}({data:A,error:I,isValidating:L},x),N=M[0],U=M[1],B=M[2],z=(0,Re.useCallback)((function(e){return ke(void 0,void 0,void 0,(function(){var t,o,a,u,c,s,l,f,p,d,h,m,w;return je(this,(function(E){switch(E.label){case 0:if(t=O.current,!g||!t||x.current||k().isPaused())return[2,!1];u=!0,c=e||{},s=!y[g]||!c.dedupe,l=function(){return!x.current&&g===S.current&&_.current},f=function(){var e=y[g];e&&e[1]===a&&delete y[g]},p={isValidating:!1},d=function(){C({isValidating:!1}),l()&&B(p)},C({isValidating:!0}),B({isValidating:!0}),E.label=1;case 1:return E.trys.push([1,3,,4]),s&&(Br(r,g,N.current.data,N.current.error,!0),n.loadingTimeout&&!r.get(g)&&setTimeout((function(){u&&l()&&k().onLoadingSlow(g,n)}),n.loadingTimeout),y[g]=[t.apply(void 0,b),Fr()]),w=y[g],o=w[0],a=w[1],[4,o];case 2:return o=E.sent(),s&&setTimeout(f,n.dedupingInterval),y[g]&&y[g][1]===a?(C({error:vr}),p.error=vr,h=v[g],!mr(h)&&(a<=h[0]||a<=h[1]||0===h[1])?(d(),s&&l()&&k().onDiscarded(g),[2,!1]):(i(N.current.data,o)?p.data=N.current.data:p.data=o,i(r.get(g),o)||r.set(g,o),s&&l()&&k().onSuccess(o,g,n),[3,4])):(s&&l()&&k().onDiscarded(g),[2,!1]);case 3:return m=E.sent(),f(),k().isPaused()||(C({error:m}),p.error=m,s&&l()&&(k().onError(m,g,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||gr(n.shouldRetryOnError)&&n.shouldRetryOnError(m))&&j()&&k().onErrorRetry(m,g,n,z,{retryCount:(c.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return u=!1,d(),l()&&s&&Br(r,g,p.data,p.error,!1),[2,!0]}}))}))}),[g]),F=(0,Re.useCallback)(Vr.bind(vr,r,(function(){return S.current})),[]);if(Dr((function(){O.current=t,E.current=n})),Dr((function(){if(g){var e=g!==S.current,t=z.bind(vr,to),n=0,r=eo(g,h,(function(e,t,n){B(br({error:t,isValidating:n},i(N.current.data,e)?vr:{data:e}))})),a=eo(g,d,(function(e){if(0==e){var r=Date.now();k().revalidateOnFocus&&r>n&&j()&&(n=r+k().focusThrottleInterval,t())}else if(1==e)k().revalidateOnReconnect&&j()&&t();else if(2==e)return z()}));return x.current=!1,S.current=g,_.current=!0,e&&B({data:A,error:I,isValidating:L}),D()&&(mr(A)||Rr?t():(u=t,_r()&&o(window.requestAnimationFrame)!=wr?window.requestAnimationFrame(u):setTimeout(u,1))),function(){x.current=!0,r(),a()}}var u}),[g,z]),Dr((function(){var e,t=function(){var t=gr(s)?s(A):s;t&&-1!==e&&(e=setTimeout(n,t))},n=function(){N.current.error||!l&&!k().isVisible()||!f&&!k().isOnline()?t():z(to).then(t)};return t(),function(){e&&(clearTimeout(e),e=-1)}}),[s,l,f,z]),(0,Re.useDebugValue)(A),u&&mr(A)&&g)throw O.current=t,E.current=n,x.current=!1,mr(I)?z(to):I;return{mutate:F,get data(){return U.data=!0,A},get error(){return U.error=!0,I},get isValidating(){return U.isValidating=!0,L}}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Xr(),r=Jr(e),o=r[0],i=r[1],a=r[2],u=Qr(n,a),c=ar,s=u.use;if(s)for(var l=s.length;l-- >0;)c=s[l](c);return c(o,i||u.fetcher,u)}),ro=m(688),oo=m(332),io=m.n(oo);ro.default.extend(io())}(),g}())}}}))},493:()=>{System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e,t){for(var n in t)e[n]=t[n];return e},t=function(t){var n=[];function r(e){for(var t=[],r=0;r<n.length;r++)n[r]===e?e=null:t.push(n[r]);n=t}function o(r,o,i){t=o?r:e(e({},t),r);for(var a=n,u=0;u<a.length;u++)a[u](t,i)}return t=t||{},{action:function(e){function n(t){o(t,!1,e)}return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:o,subscribe:function(e){return n.push(e),function(){r(e)}},unsubscribe:r,getState:function(){return t}}},n=function(e,n){var r=s[e];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=t(n);return s[e]={value:o,active:!0},o},i=function(e,n){var r=s[e];if(!r){var o=t(n);return s[e]={value:o,active:!1},o}return r.value},a=function(e){return n("app",e)},u=function(){return i("app",{})},c=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},390:()=>{function e(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var t=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};System.register(["@openmrs/esm-extensions","@openmrs/esm-react-utils","@openmrs/esm-state","react","react-dom","rxjs"],(function(n,r){var o={},i={},a={},u={},c={},s={};return Object.defineProperty(c,"__esModule",{value:!0}),{setters:[function(){},function(){},function(e){a.createGlobalStore=e.createGlobalStore},function(e){u.createContext=e.createContext},function(e){Object.keys(e).forEach((function(t){c[t]=e[t]}))},function(e){s.Subject=e.Subject}],execute:function(){n(function(){var n={279:function(e,t,n){"use strict";var r=n(493);r.createRoot,r.hydrateRoot},584:function(e,t,n){var r=n(518).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},518:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},78:function(){var e=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":t(e)};System.register(["@openmrs/esm-state","single-spa"],(function(t,n){var r={},o={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore,r.getGlobalStore=e.getGlobalStore},function(e){o.navigateToUrl=e.navigateToUrl}],execute:function(){t(function(){"use strict";var t={685:function(e){e.exports=r},645:function(e){e.exports=o}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){var t=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},n=function(e){return function n(r){return 0===arguments.length||t(r)?n:e.apply(this,arguments)}},r=function(e){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return t(o)?r:n((function(t){return e(o,t)}));default:return t(o)&&t(i)?r:t(o)?n((function(t){return e(t,i)})):t(i)?n((function(t){return e(o,t)})):e(o,i)}}},o=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},u=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},c=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},s=function(e,t,n,r){var i=function(e,t){return se(e,t,n.slice(),r.slice())},a=o(e);return!u((function(e,t){return!u(i,t,e)}),o(t),a)},l=function(e){return function o(i,a,u){switch(arguments.length){case 0:return o;case 1:return t(i)?o:r((function(t,n){return e(i,t,n)}));case 2:return t(i)&&t(a)?o:t(i)?r((function(t,n){return e(t,a,n)})):t(a)?r((function(t,n){return e(i,t,n)})):n((function(t){return e(i,a,t)}));default:return t(i)&&t(a)&&t(u)?o:t(i)&&t(a)?r((function(t,n){return e(t,n,u)})):t(i)&&t(u)?r((function(t,n){return e(t,a,n)})):t(a)&&t(u)?r((function(t,n){return e(i,t,n)})):t(i)?n((function(t){return e(t,a,u)})):t(a)?n((function(t){return e(i,t,u)})):t(u)?n((function(t){return e(i,a,t)})):e(i,a,u)}}},f=function(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)},p=function(e,t,n,r){return e["@@transducer/result"](n[r](be(e["@@transducer/step"],e),t))},d=function(e){return"[object Object]"===Object.prototype.toString.call(e)},h=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},v=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}},y=function(e){return(0,Ae.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1})},m=function(){return(0,Ae.getGlobalStore)("config-extension-slots",{slots:{}})},g=function(e){return b(m().getState(),e)},b=function(e,t){var n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}},w=function(){return(0,Ae.getGlobalStore)("config-extensions",{configs:{}})},_=function(e,t){return x(w().getState(),e,t)},x=function(e,t,n){var r,o=null===(r=e.configs[t])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},S=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},O=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},E=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){O(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},k=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||C(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},j=function(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||C(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},C=function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}},$=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,c=z(u,e,t);y(u).setState({loaded:!0,config:c})}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},P=function(e,t){var n,r,o=(n=V(B(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=k(o.value,2),u=a[0],c=a[1],s=!0,l=!1,f=void 0;try{for(var p,d=Object.entries(c)[Symbol.iterator]();!(s=(p=d.next()).done);s=!0){var h=k(p.value,2),v=h[0];U(h[1],u,v)}}catch(e){l=!0,f=e}finally{try{s||null==d.return||d.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return E({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=k(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=m(),u=a.getState(),c={slots:E({},u.slots,i)};le(u,c)||a.setState(c)},A=function(e,t){var n=function(e,t){var n=Ne(he(e.schemas)),r=j(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,c=r[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=k(u.value,2);n=V([n,Ue(s[0],s[1])])}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t);Me.setState({config:n})},T=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=t.mountedExtensions[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=u.value,l=N(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,e,n);r[s.slotName]=E({},r[s.slotName],O({},s.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}w().setState({configs:r})},I=function(e,t){Be(e,t);var n=Ie.getState();Ie.setState({schemas:E({},n.schemas,O({},e,t))})},R=function(e,t){Be(e,t);var n=Ie.getState();n.schemas[e]&&console.warn("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),Ie.setState({schemas:E({},n.schemas,O({},e,t))})},D=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Ie.getState();Ie.setState({providedConfigs:j(n.providedConfigs).concat([{source:t,config:e}])})},L=function(e){return new Promise((function(t){var n=function(e){e.loaded&&e.config&&(t(e.config),o&&o())},r=y(e);n(r.getState());var o=r.subscribe(n)}))},M=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];H(e,t,n);var o=Ve(e,t,r);return Fe(e,o,n),o},N=function(e,t,n,r,o,i){var a,u,c,s,l=k(r.split("#"),1)[0],f=o.schemas[l],p=f?l:t,d=B(o,i),h=F(e,d),v=null!==(s=null==h||null===(a=h.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(c=u.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=V([F(p,d),v]),m=null!=f?f:o.schemas[t];H(m,y,p);var g=Ve(m,y,o.devDefaultsAreOn);return Fe(m,g,p),delete g.extensionSlots,g},U=function(e,t,n){var r="Extension slot config '".concat(t,".extensionSlots.").concat(n),o=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Z(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},B=function(e,t){return j(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},z=function(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);var r=t.schemas[e],o=F(e,B(t,n));H(r,o,e);var i=Ve(r,o,t.devDefaultsAreOn);return Fe(r,i,e),delete i.extensionSlots,i},F=function(e,t){return V(t.map((function(t){return t[e]})).filter((function(e){return!!e})))},V=function(e){return _e(Oe)({},e)},H=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e.hasOwnProperty(c)?ze(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},W=function(e,t,n){t&&K(e,[{Array:Ee,Boolean:ke,ConceptUuid:Pe,Number:je,Object:$e,String:Ce,UUID:Pe,PersonAttributeTypeUuid:Pe,PatientIdentifierTypeUuid:Pe}[t]],n)},K=function(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=(0,a.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(e,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(e,": ").concat(c)))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}},q=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},Z=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},G=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Q=function(e,t){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return Y(e,function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){G(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},t)).replace(/^\/\//,"/")},Y=function(e,t){return Object.keys(t).reduce((function(e,n){return e.split("${"+n+"}").join(t[n])}),e)},J=function(e){var t=e.to,n=e.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=Q(t,n);o.startsWith(r)?(0,He.navigateToUrl)(o):window.location.assign(o)};i.r(a),i.d(a,{Type:function(){return pe},configExtensionStore:function(){return Le},configInternalStore:function(){return Ie},defineConfigSchema:function(){return I},defineExtensionConfigSchema:function(){return R},getConfig:function(){return L},getConfigStore:function(){return y},getExtensionConfig:function(){return _},getExtensionConfigFromStore:function(){return x},getExtensionSlotConfig:function(){return g},getExtensionSlotConfigFromStore:function(){return b},getExtensionSlotsConfigStore:function(){return m},getExtensionsConfigStore:function(){return w},implementerToolsConfigStore:function(){return Me},inRange:function(){return We},interpolateString:function(){return Y},interpolateUrl:function(){return Q},isUrl:function(){return qe},isUrlWithTemplateParameters:function(){return Ke},navigate:function(){return J},oneOf:function(){return Ze},processConfig:function(){return M},provide:function(){return D},temporaryConfigStore:function(){return De},validator:function(){return h},validators:function(){return Ge}});var X="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},ee=Object.prototype.toString,te=function(){return"[object Arguments]"===ee.call(arguments)?function(e){return"[object Arguments]"===ee.call(e)}:function(e){return c("callee",e)}}(),ne=te,re=!{toString:null}.propertyIsEnumerable("toString"),oe=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ie=function(){return arguments.propertyIsEnumerable("length")}(),ae=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},ue="function"!=typeof Object.keys||ie?n((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=ie&&ne(e);for(t in e)!c(t,e)||o&&"length"===t||(r[r.length]=t);if(re)for(n=oe.length-1;n>=0;)c(t=oe[n],e)&&!ae(r,t)&&(r[r.length]=t),n-=1;return r})):n((function(e){return Object(e)!==e?[]:Object.keys(e)})),ce=n((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function se(t,n,r,o){if(X(t,n))return!0;var i,a,u=ce(t);if(u!==ce(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(u){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===(i=t.constructor,null==(a=String(i).match(/^function (\w*)/))?"":a[1]))return t===n;break;case"Boolean":case"Number":case"String":if((void 0===t?"undefined":e(t))!=(void 0===n?"undefined":e(n))||!X(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!X(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===t)return o[l]===n;l-=1}switch(u){case"Map":return t.size===n.size&&s(t.entries(),n.entries(),r.concat([t]),o.concat([n]));case"Set":return t.size===n.size&&s(t.values(),n.values(),r.concat([t]),o.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=ue(t);if(f.length!==ue(n).length)return!1;var p=r.concat([t]),d=o.concat([n]);for(l=f.length-1;l>=0;){var h=f[l];if(!c(h,n)||!se(n[h],t[h],p,d))return!1;l-=1}return!0}var le=r((function(e,t){return se(e,t,[],[])}));function fe(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var u in t[a+1]=e,n[a+1]=o,e)o[u]=r?fe(e[u],t,n,!0):e[u];return o};switch(ce(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}var pe,de,he=n((function(e){return null!=e&&"function"==typeof e.clone?e.clone():fe(e,[],[],!0)})),ve=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},ye=n((function(e){return!!ve(e)||!!e&&"object"==typeof e&&(t=e,!("[object String]"===Object.prototype.toString.call(t)))&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1));var t})),me=function(){var e=function(e){this.f=e};return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),ge=r((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,c){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,c,s){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,c,s,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))})),be=ge,we="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",_e=l((function(e,t,n){if("function"==typeof e&&(e=new me(e)),ye(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return p(e,t,n,"fantasy-land/reduce");if(null!=n[we])return f(e,t,n[we]());if("function"==typeof n.next)return f(e,t,n);if("function"==typeof n.reduce)return p(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),xe=l((function(e,t,n){var r,o={};for(r in t)c(r,t)&&(o[r]=c(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)c(r,n)&&!c(r,o)&&(o[r]=n[r]);return o})),Se=l((function e(t,n,r){return xe((function(n,r,o){return d(r)&&d(o)?e(t,r,o):t(n,r,o)}),n,r)})),Oe=r((function(e,t){return Se((function(e,t,n){return n}),e,t)}));(de=pe||(pe={})).Array="Array",de.Boolean="Boolean",de.ConceptUuid="ConceptUuid",de.Number="Number",de.Object="Object",de.String="String",de.UUID="UUID",de.PersonAttributeTypeUuid="PersonAttributeTypeUuid",de.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var Ee=h((function(e){return Array.isArray(e)}),"must be an array"),ke=h((function(e){return"boolean"==typeof e}),"must be a boolean"),je=h((function(e){return"number"==typeof e}),"must be a number"),Ce=h((function(e){return"string"==typeof e}),"must be a string"),$e=h((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),Pe=h((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),Ae=i(685),Te={providedConfigs:[],schemas:{},devDefaultsAreOn:v()},Ie=(0,Ae.createGlobalStore)("config-internal",Te),Re=v();Ie.subscribe((function(e){var t;e.devDefaultsAreOn!=Re&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),Re=e.devDefaultsAreOn)}));var De=(0,Ae.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});De.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var Le=(0,Ae.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Me=(0,Ae.createGlobalStore)("config-implementer-tools",{config:{}});function Ne(e){return e.hasOwnProperty("_default")?E({},e,{_value:e._default,_source:"default"}):Z(e)?Object.keys(e).reduce((function(t,n){return t[n]=Ne(e[n]),t}),{}):{}}function Ue(e,t){return Z(e)?Object.keys(e).reduce((function(n,r){return n[r]=Ue(e[r],t),n}),{}):{_value:e,_source:t}}function Be(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var u,c=function(o,i){var a=i.value,u=n+(n&&".")+a,c=t[a];if(!Z(c))return console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r)),"continue";c.hasOwnProperty("_default")||Be(e,c,u);var s=c._elements;if(q(s)&&Be(e,s,u+"._elements"),c._validators){var l=!0,f=!1,p=void 0;try{for(var d,h=c._validators[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var v=d.value;"function"!=typeof v&&console.error("".concat(e," has invalid validator for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(e){f=!0,p=e}finally{try{l||null==h.return||h.return()}finally{if(f)throw p}}}var y=c._type;y&&!Object.values(pe).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(pe).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(c).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(c))),s&&y&&![pe.Array,pe.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},s=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(s,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}}function ze(e,t,n){W(n,e._type,t),Z(t)?e._type===pe.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c];H(e._elements,s,"".concat(n,".").concat(c))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||H(e,t,n):e._type===pe.Array&&function(e,t,n){if(q(e._elements))for(var r=0;r<t.length;r++)ze(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;W("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}(e,t,n)}function Fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&K(n,e._validators,t),Z(t)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e._type===pe.Object&&e._elements?Fe(e._elements,s,l):Fe(f,s,l)}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var p=0;p<t.length;p++)Fe(e._elements,t[p],"".concat(n,"[").concat(p,"]"))}$(Ie.getState(),De.getState()),Ie.subscribe((function(e){return $(e,De.getState())})),De.subscribe((function(e){return $(Ie.getState(),e)})),A(Ie.getState(),De.getState()),Ie.subscribe((function(e){return A(e,De.getState())})),De.subscribe((function(e){return A(Ie.getState(),e)})),P(Ie.getState(),De.getState()),Ie.subscribe((function(e){return P(e,De.getState())})),De.subscribe((function(e){return P(Ie.getState(),e)})),T(Ie.getState(),Le.getState(),De.getState()),Ie.subscribe((function(e){T(e,Le.getState(),De.getState())})),Le.subscribe((function(e){T(Ie.getState(),e,De.getState())})),De.subscribe((function(e){T(Ie.getState(),Le.getState(),e)}));var Ve=function(e,t,n){var r=he(t);if(!e)return r;var o=!0,i=!1,a=void 0;try{for(var u,c=function(t,o){var i=o.value,a=r[i],u=e[i];if(u&&u.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=u._devDefault||u._default;r[i]=n?c:u._default}var s=u._elements;if(a&&q(s))if(u._type===pe.Array&&Array.isArray(a)){var l=a.map((function(e){return Ve(s,e,n)}));r[i]=l}else if(u._type===pe.Object){var f=!0,p=!1,d=void 0;try{for(var h,v=Object.keys(a)[Symbol.iterator]();!(f=(h=v.next()).done);f=!0){var y=h.value;a[y]=Ve(s,a[y],n)}}catch(e){p=!0,d=e}finally{try{f||null==v.return||v.return()}finally{if(p)throw d}}}}else if(Z(u)){var m=r.hasOwnProperty(i)?a:{};Z(m)&&(r[i]=Ve(u,m,n))}},s=Object.keys(e)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(0,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return r},He=i(645),We=function(e,t){return h((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},Ke=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return h((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+t.map((function(e){return"${"+e+"}"})).join(", "))},qe=Ke([]),Ze=function(e){return h((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},Ge={inRange:We,isUrl:qe,isUrlWithTemplateParameters:Ke,oneOf:Ze}}(),a}())}}}))},606:function(n,r,o){var i=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},a=function(t,n){if(!e(t,n))throw new TypeError("Cannot call a class as a function")},u=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}},c=function(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e},s=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},l=function(t,n){return null!=n&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](t):e(t,n)},f=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){s(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},p=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},d=function(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},h=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}};n=o.nmd(n);var v=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":t(e)};System.register([],(function(e,t){return{execute:function(){e(function(){var e={9672:function(e,t){var n,r,o;r=t,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",((n=function(e){this.message=e}).prototype=new Error).name="InvalidCharacterError",r.btoa||(r.btoa=function(e){for(var t,r,i=String(e),a=0,u=o,c="";i.charAt(0|a)||(u="=",a%1);c+=u.charAt(63&t>>8-a%1*8)){if((r=i.charCodeAt(a+=3/4))>255)throw new n("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|r}return c}),r.atob||(r.atob=function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,a=0,u=0,c="";i=t.charAt(u++);~i&&(r=a%4?64*r+i:i,a++%4)?c+=String.fromCharCode(255&r>>(-2*a&6)):0)i=o.indexOf(i);return c})},841:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=void 0===n?"undefined":v(n);if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var a=o.apply(null,n);a&&e.push(a)}else if("object"===i)for(var u in n)r.call(n,u)&&n[u]&&e.push(u)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},6618:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(9233),o=n.n(r),i=n(361),a=n.n(i)()(o());a.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.active-left-nav-link{background-color:#e0e0e0;outline:none;color:#161616;border-left:.25rem solid var(--brand-01)}.Y3Q\\+kOxLLWMt9RIQX8EZ2w\\=\\=>div a:nth-child(1){height:2.5rem;color:#8d8d8d;border-left:.25rem solid transparent;font-size:.875rem;font-weight:600;line-height:1.29;letter-spacing:.16px}.omrs-breakpoint-gt-tablet .Y3Q\\+kOxLLWMt9RIQX8EZ2w\\=\\=>div{padding-top:1rem}.Y3Q\\+kOxLLWMt9RIQX8EZ2w\\=\\=>div a:nth-child(1):hover{background-color:#e0e0e0;color:#161616;border-left:var(--brand-01);padding:1.2rem 0 1.2rem 1.2rem}.Y3Q\\+kOxLLWMt9RIQX8EZ2w\\=\\=>div a:nth-child(1):focus{background-color:#e0e0e0;outline:none;color:#161616;border-left:var(--brand-01)}","",{version:3,sources:["webpack://./../esm-styleguide/src/_vars.scss","webpack://./../esm-styleguide/src/left-nav/left-nav.module.scss","webpack://./../../../node_modules/carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/themes/generated/_mixins.scss","webpack://./../../../node_modules/carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,sBACE,wBC0CQ,CDzCR,YAAA,CACA,aC0CQ,CDzCR,wCAAA,CAGF,gDACE,aAAA,CACA,aCmCQ,CDlCR,oCAAA,CEigBE,iBAqLsB,CArLtB,eAqLsB,CArLtB,gBAqLsB,CArLtB,oBAqLsB,CFlrB1B,4DACE,gBAAA,CAGF,sDACE,wBCwBQ,CDvBR,aCyBQ,CDxBR,2BAAA,CACA,8BAAA,CAGF,sDACE,wBCiBQ,CDhBR,YAAA,CACA,aCiBQ,CDhBR,2BAAA",sourcesContent:["$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1200px;\n$breakpoint-desktop-min: 1201px;\n$breakpoint-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n",'@import "../vars";\n@import "carbon-components/scss/globals/scss/typography.scss";\n@import "~carbon-components/scss/globals/scss/_spacing.scss";\n\n:global(.active-left-nav-link) {\n background-color: $ui-03;\n outline: none;\n color: $ui-05;\n border-left: 0.25rem solid var(--brand-01);\n}\n\n.leftNav > div a:nth-child(1) {\n height: 2.5rem;\n color: $ui-04;\n border-left: 0.25rem solid transparent;\n @include carbon--type-style("productive-heading-01");\n}\n\n:global(.omrs-breakpoint-gt-tablet) .leftNav > div {\n padding-top: 1rem;\n}\n\n.leftNav > div a:nth-child(1):hover {\n background-color: $ui-03;\n color: $ui-05;\n border-left: var(--brand-01);\n padding: 1.2rem 0 1.2rem 1.2rem;\n}\n\n.leftNav > div a:nth-child(1):focus {\n background-color: $ui-03;\n outline: none;\n color: $ui-05;\n border-left: var(--brand-01);\n}\n',"// Code generated by @carbon/themes. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2019\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n@import './themes';\n\n/// Define theme variables from a map of tokens\n/// @access public\n/// @param {Map} $theme [$carbon--theme] - Map of theme tokens\n/// @param {Bool} $emit-custom-properties [false] - Output CSS Custom Properties for theme tokens\n/// @content Pass in your custom declaration blocks to be used after the token maps set theming variables.\n///\n/// @example scss\n/// // Default usage\n/// @include carbon--theme();\n///\n/// // Alternate styling (not white theme)\n/// @include carbon--theme($carbon--theme--g90) {\n/// // declarations...\n/// }\n///\n/// // Inline styling\n/// @include carbon--theme($carbon--theme--g90) {\n/// .my-dark-theme {\n/// // declarations...\n/// }\n/// }\n///\n/// @group @carbon/themes\n@mixin carbon--theme(\n $theme: $carbon--theme,\n $emit-custom-properties: false,\n $emit-difference: false\n) {\n $parent-carbon-theme: $carbon--theme;\n $carbon--theme: $theme !global;\n $interactive-01: map-get($theme, 'interactive-01') !global;\n $interactive-02: map-get($theme, 'interactive-02') !global;\n $interactive-03: map-get($theme, 'interactive-03') !global;\n $interactive-04: map-get($theme, 'interactive-04') !global;\n $ui-background: map-get($theme, 'ui-background') !global;\n $ui-01: map-get($theme, 'ui-01') !global;\n $ui-02: map-get($theme, 'ui-02') !global;\n $ui-03: map-get($theme, 'ui-03') !global;\n $ui-04: map-get($theme, 'ui-04') !global;\n $ui-05: map-get($theme, 'ui-05') !global;\n $text-01: map-get($theme, 'text-01') !global;\n $text-02: map-get($theme, 'text-02') !global;\n $text-03: map-get($theme, 'text-03') !global;\n $text-04: map-get($theme, 'text-04') !global;\n $text-05: map-get($theme, 'text-05') !global;\n $text-error: map-get($theme, 'text-error') !global;\n $icon-01: map-get($theme, 'icon-01') !global;\n $icon-02: map-get($theme, 'icon-02') !global;\n $icon-03: map-get($theme, 'icon-03') !global;\n $link-01: map-get($theme, 'link-01') !global;\n $link-02: map-get($theme, 'link-02') !global;\n $inverse-link: map-get($theme, 'inverse-link') !global;\n $field-01: map-get($theme, 'field-01') !global;\n $field-02: map-get($theme, 'field-02') !global;\n $inverse-01: map-get($theme, 'inverse-01') !global;\n $inverse-02: map-get($theme, 'inverse-02') !global;\n $support-01: map-get($theme, 'support-01') !global;\n $support-02: map-get($theme, 'support-02') !global;\n $support-03: map-get($theme, 'support-03') !global;\n $support-04: map-get($theme, 'support-04') !global;\n $inverse-support-01: map-get($theme, 'inverse-support-01') !global;\n $inverse-support-02: map-get($theme, 'inverse-support-02') !global;\n $inverse-support-03: map-get($theme, 'inverse-support-03') !global;\n $inverse-support-04: map-get($theme, 'inverse-support-04') !global;\n $overlay-01: map-get($theme, 'overlay-01') !global;\n $danger-01: map-get($theme, 'danger-01') !global;\n $danger-02: map-get($theme, 'danger-02') !global;\n $focus: map-get($theme, 'focus') !global;\n $inverse-focus-ui: map-get($theme, 'inverse-focus-ui') !global;\n $hover-primary: map-get($theme, 'hover-primary') !global;\n $active-primary: map-get($theme, 'active-primary') !global;\n $hover-primary-text: map-get($theme, 'hover-primary-text') !global;\n $hover-secondary: map-get($theme, 'hover-secondary') !global;\n $active-secondary: map-get($theme, 'active-secondary') !global;\n $hover-tertiary: map-get($theme, 'hover-tertiary') !global;\n $active-tertiary: map-get($theme, 'active-tertiary') !global;\n $hover-ui: map-get($theme, 'hover-ui') !global;\n $hover-light-ui: map-get($theme, 'hover-light-ui') !global;\n $hover-selected-ui: map-get($theme, 'hover-selected-ui') !global;\n $active-ui: map-get($theme, 'active-ui') !global;\n $active-light-ui: map-get($theme, 'active-light-ui') !global;\n $selected-ui: map-get($theme, 'selected-ui') !global;\n $selected-light-ui: map-get($theme, 'selected-light-ui') !global;\n $inverse-hover-ui: map-get($theme, 'inverse-hover-ui') !global;\n $hover-danger: map-get($theme, 'hover-danger') !global;\n $active-danger: map-get($theme, 'active-danger') !global;\n $hover-row: map-get($theme, 'hover-row') !global;\n $visited-link: map-get($theme, 'visited-link') !global;\n $disabled-01: map-get($theme, 'disabled-01') !global;\n $disabled-02: map-get($theme, 'disabled-02') !global;\n $disabled-03: map-get($theme, 'disabled-03') !global;\n $highlight: map-get($theme, 'highlight') !global;\n $decorative-01: map-get($theme, 'decorative-01') !global;\n $button-separator: map-get($theme, 'button-separator') !global;\n $skeleton-01: map-get($theme, 'skeleton-01') !global;\n $skeleton-02: map-get($theme, 'skeleton-02') !global;\n $brand-01: map-get($theme, 'brand-01') !global;\n $brand-02: map-get($theme, 'brand-02') !global;\n $brand-03: map-get($theme, 'brand-03') !global;\n $active-01: map-get($theme, 'active-01') !global;\n $hover-field: map-get($theme, 'hover-field') !global;\n $danger: map-get($theme, 'danger') !global;\n $caption-01: map-get($theme, 'caption-01') !global;\n $label-01: map-get($theme, 'label-01') !global;\n $helper-text-01: map-get($theme, 'helper-text-01') !global;\n $body-short-01: map-get($theme, 'body-short-01') !global;\n $body-long-01: map-get($theme, 'body-long-01') !global;\n $body-short-02: map-get($theme, 'body-short-02') !global;\n $body-long-02: map-get($theme, 'body-long-02') !global;\n $code-01: map-get($theme, 'code-01') !global;\n $code-02: map-get($theme, 'code-02') !global;\n $heading-01: map-get($theme, 'heading-01') !global;\n $productive-heading-01: map-get($theme, 'productive-heading-01') !global;\n $heading-02: map-get($theme, 'heading-02') !global;\n $productive-heading-02: map-get($theme, 'productive-heading-02') !global;\n $productive-heading-03: map-get($theme, 'productive-heading-03') !global;\n $productive-heading-04: map-get($theme, 'productive-heading-04') !global;\n $productive-heading-05: map-get($theme, 'productive-heading-05') !global;\n $productive-heading-06: map-get($theme, 'productive-heading-06') !global;\n $productive-heading-07: map-get($theme, 'productive-heading-07') !global;\n $expressive-heading-01: map-get($theme, 'expressive-heading-01') !global;\n $expressive-heading-02: map-get($theme, 'expressive-heading-02') !global;\n $expressive-heading-03: map-get($theme, 'expressive-heading-03') !global;\n $expressive-heading-04: map-get($theme, 'expressive-heading-04') !global;\n $expressive-heading-05: map-get($theme, 'expressive-heading-05') !global;\n $expressive-heading-06: map-get($theme, 'expressive-heading-06') !global;\n $expressive-paragraph-01: map-get($theme, 'expressive-paragraph-01') !global;\n $quotation-01: map-get($theme, 'quotation-01') !global;\n $quotation-02: map-get($theme, 'quotation-02') !global;\n $display-01: map-get($theme, 'display-01') !global;\n $display-02: map-get($theme, 'display-02') !global;\n $display-03: map-get($theme, 'display-03') !global;\n $display-04: map-get($theme, 'display-04') !global;\n $spacing-01: map-get($theme, 'spacing-01') !global;\n $spacing-02: map-get($theme, 'spacing-02') !global;\n $spacing-03: map-get($theme, 'spacing-03') !global;\n $spacing-04: map-get($theme, 'spacing-04') !global;\n $spacing-05: map-get($theme, 'spacing-05') !global;\n $spacing-06: map-get($theme, 'spacing-06') !global;\n $spacing-07: map-get($theme, 'spacing-07') !global;\n $spacing-08: map-get($theme, 'spacing-08') !global;\n $spacing-09: map-get($theme, 'spacing-09') !global;\n $spacing-10: map-get($theme, 'spacing-10') !global;\n $spacing-11: map-get($theme, 'spacing-11') !global;\n $spacing-12: map-get($theme, 'spacing-12') !global;\n $fluid-spacing-01: map-get($theme, 'fluid-spacing-01') !global;\n $fluid-spacing-02: map-get($theme, 'fluid-spacing-02') !global;\n $fluid-spacing-03: map-get($theme, 'fluid-spacing-03') !global;\n $fluid-spacing-04: map-get($theme, 'fluid-spacing-04') !global;\n $layout-01: map-get($theme, 'layout-01') !global;\n $layout-02: map-get($theme, 'layout-02') !global;\n $layout-03: map-get($theme, 'layout-03') !global;\n $layout-04: map-get($theme, 'layout-04') !global;\n $layout-05: map-get($theme, 'layout-05') !global;\n $layout-06: map-get($theme, 'layout-06') !global;\n $layout-07: map-get($theme, 'layout-07') !global;\n $container-01: map-get($theme, 'container-01') !global;\n $container-02: map-get($theme, 'container-02') !global;\n $container-03: map-get($theme, 'container-03') !global;\n $container-04: map-get($theme, 'container-04') !global;\n $container-05: map-get($theme, 'container-05') !global;\n $icon-size-01: map-get($theme, 'icon-size-01') !global;\n $icon-size-02: map-get($theme, 'icon-size-02') !global;\n\n @if global-variable-exists('feature-flags') and\n map-get($feature-flags, 'enable-css-custom-properties')\n {\n $interactive-01: var(\n --#{$custom-property-prefix}-interactive-01,\n map-get($theme, 'interactive-01')\n ) !global;\n $interactive-02: var(\n --#{$custom-property-prefix}-interactive-02,\n map-get($theme, 'interactive-02')\n ) !global;\n $interactive-03: var(\n --#{$custom-property-prefix}-interactive-03,\n map-get($theme, 'interactive-03')\n ) !global;\n $interactive-04: var(\n --#{$custom-property-prefix}-interactive-04,\n map-get($theme, 'interactive-04')\n ) !global;\n $ui-background: var(\n --#{$custom-property-prefix}-ui-background,\n map-get($theme, 'ui-background')\n ) !global;\n $ui-01: var(\n --#{$custom-property-prefix}-ui-01,\n map-get($theme, 'ui-01')\n ) !global;\n $ui-02: var(\n --#{$custom-property-prefix}-ui-02,\n map-get($theme, 'ui-02')\n ) !global;\n $ui-03: var(\n --#{$custom-property-prefix}-ui-03,\n map-get($theme, 'ui-03')\n ) !global;\n $ui-04: var(\n --#{$custom-property-prefix}-ui-04,\n map-get($theme, 'ui-04')\n ) !global;\n $ui-05: var(\n --#{$custom-property-prefix}-ui-05,\n map-get($theme, 'ui-05')\n ) !global;\n $text-01: var(\n --#{$custom-property-prefix}-text-01,\n map-get($theme, 'text-01')\n ) !global;\n $text-02: var(\n --#{$custom-property-prefix}-text-02,\n map-get($theme, 'text-02')\n ) !global;\n $text-03: var(\n --#{$custom-property-prefix}-text-03,\n map-get($theme, 'text-03')\n ) !global;\n $text-04: var(\n --#{$custom-property-prefix}-text-04,\n map-get($theme, 'text-04')\n ) !global;\n $text-05: var(\n --#{$custom-property-prefix}-text-05,\n map-get($theme, 'text-05')\n ) !global;\n $text-error: var(\n --#{$custom-property-prefix}-text-error,\n map-get($theme, 'text-error')\n ) !global;\n $icon-01: var(\n --#{$custom-property-prefix}-icon-01,\n map-get($theme, 'icon-01')\n ) !global;\n $icon-02: var(\n --#{$custom-property-prefix}-icon-02,\n map-get($theme, 'icon-02')\n ) !global;\n $icon-03: var(\n --#{$custom-property-prefix}-icon-03,\n map-get($theme, 'icon-03')\n ) !global;\n $link-01: var(\n --#{$custom-property-prefix}-link-01,\n map-get($theme, 'link-01')\n ) !global;\n $link-02: var(\n --#{$custom-property-prefix}-link-02,\n map-get($theme, 'link-02')\n ) !global;\n $inverse-link: var(\n --#{$custom-property-prefix}-inverse-link,\n map-get($theme, 'inverse-link')\n ) !global;\n $field-01: var(\n --#{$custom-property-prefix}-field-01,\n map-get($theme, 'field-01')\n ) !global;\n $field-02: var(\n --#{$custom-property-prefix}-field-02,\n map-get($theme, 'field-02')\n ) !global;\n $inverse-01: var(\n --#{$custom-property-prefix}-inverse-01,\n map-get($theme, 'inverse-01')\n ) !global;\n $inverse-02: var(\n --#{$custom-property-prefix}-inverse-02,\n map-get($theme, 'inverse-02')\n ) !global;\n $support-01: var(\n --#{$custom-property-prefix}-support-01,\n map-get($theme, 'support-01')\n ) !global;\n $support-02: var(\n --#{$custom-property-prefix}-support-02,\n map-get($theme, 'support-02')\n ) !global;\n $support-03: var(\n --#{$custom-property-prefix}-support-03,\n map-get($theme, 'support-03')\n ) !global;\n $support-04: var(\n --#{$custom-property-prefix}-support-04,\n map-get($theme, 'support-04')\n ) !global;\n $inverse-support-01: var(\n --#{$custom-property-prefix}-inverse-support-01,\n map-get($theme, 'inverse-support-01')\n ) !global;\n $inverse-support-02: var(\n --#{$custom-property-prefix}-inverse-support-02,\n map-get($theme, 'inverse-support-02')\n ) !global;\n $inverse-support-03: var(\n --#{$custom-property-prefix}-inverse-support-03,\n map-get($theme, 'inverse-support-03')\n ) !global;\n $inverse-support-04: var(\n --#{$custom-property-prefix}-inverse-support-04,\n map-get($theme, 'inverse-support-04')\n ) !global;\n $overlay-01: var(\n --#{$custom-property-prefix}-overlay-01,\n map-get($theme, 'overlay-01')\n ) !global;\n $danger-01: var(\n --#{$custom-property-prefix}-danger-01,\n map-get($theme, 'danger-01')\n ) !global;\n $danger-02: var(\n --#{$custom-property-prefix}-danger-02,\n map-get($theme, 'danger-02')\n ) !global;\n $focus: var(\n --#{$custom-property-prefix}-focus,\n map-get($theme, 'focus')\n ) !global;\n $inverse-focus-ui: var(\n --#{$custom-property-prefix}-inverse-focus-ui,\n map-get($theme, 'inverse-focus-ui')\n ) !global;\n $hover-primary: var(\n --#{$custom-property-prefix}-hover-primary,\n map-get($theme, 'hover-primary')\n ) !global;\n $active-primary: var(\n --#{$custom-property-prefix}-active-primary,\n map-get($theme, 'active-primary')\n ) !global;\n $hover-primary-text: var(\n --#{$custom-property-prefix}-hover-primary-text,\n map-get($theme, 'hover-primary-text')\n ) !global;\n $hover-secondary: var(\n --#{$custom-property-prefix}-hover-secondary,\n map-get($theme, 'hover-secondary')\n ) !global;\n $active-secondary: var(\n --#{$custom-property-prefix}-active-secondary,\n map-get($theme, 'active-secondary')\n ) !global;\n $hover-tertiary: var(\n --#{$custom-property-prefix}-hover-tertiary,\n map-get($theme, 'hover-tertiary')\n ) !global;\n $active-tertiary: var(\n --#{$custom-property-prefix}-active-tertiary,\n map-get($theme, 'active-tertiary')\n ) !global;\n $hover-ui: var(\n --#{$custom-property-prefix}-hover-ui,\n map-get($theme, 'hover-ui')\n ) !global;\n $hover-light-ui: var(\n --#{$custom-property-prefix}-hover-light-ui,\n map-get($theme, 'hover-light-ui')\n ) !global;\n $hover-selected-ui: var(\n --#{$custom-property-prefix}-hover-selected-ui,\n map-get($theme, 'hover-selected-ui')\n ) !global;\n $active-ui: var(\n --#{$custom-property-prefix}-active-ui,\n map-get($theme, 'active-ui')\n ) !global;\n $active-light-ui: var(\n --#{$custom-property-prefix}-active-light-ui,\n map-get($theme, 'active-light-ui')\n ) !global;\n $selected-ui: var(\n --#{$custom-property-prefix}-selected-ui,\n map-get($theme, 'selected-ui')\n ) !global;\n $selected-light-ui: var(\n --#{$custom-property-prefix}-selected-light-ui,\n map-get($theme, 'selected-light-ui')\n ) !global;\n $inverse-hover-ui: var(\n --#{$custom-property-prefix}-inverse-hover-ui,\n map-get($theme, 'inverse-hover-ui')\n ) !global;\n $hover-danger: var(\n --#{$custom-property-prefix}-hover-danger,\n map-get($theme, 'hover-danger')\n ) !global;\n $active-danger: var(\n --#{$custom-property-prefix}-active-danger,\n map-get($theme, 'active-danger')\n ) !global;\n $hover-row: var(\n --#{$custom-property-prefix}-hover-row,\n map-get($theme, 'hover-row')\n ) !global;\n $visited-link: var(\n --#{$custom-property-prefix}-visited-link,\n map-get($theme, 'visited-link')\n ) !global;\n $disabled-01: var(\n --#{$custom-property-prefix}-disabled-01,\n map-get($theme, 'disabled-01')\n ) !global;\n $disabled-02: var(\n --#{$custom-property-prefix}-disabled-02,\n map-get($theme, 'disabled-02')\n ) !global;\n $disabled-03: var(\n --#{$custom-property-prefix}-disabled-03,\n map-get($theme, 'disabled-03')\n ) !global;\n $highlight: var(\n --#{$custom-property-prefix}-highlight,\n map-get($theme, 'highlight')\n ) !global;\n $decorative-01: var(\n --#{$custom-property-prefix}-decorative-01,\n map-get($theme, 'decorative-01')\n ) !global;\n $button-separator: var(\n --#{$custom-property-prefix}-button-separator,\n map-get($theme, 'button-separator')\n ) !global;\n $skeleton-01: var(\n --#{$custom-property-prefix}-skeleton-01,\n map-get($theme, 'skeleton-01')\n ) !global;\n $skeleton-02: var(\n --#{$custom-property-prefix}-skeleton-02,\n map-get($theme, 'skeleton-02')\n ) !global;\n $brand-01: var(\n --#{$custom-property-prefix}-brand-01,\n map-get($theme, 'brand-01')\n ) !global;\n $brand-02: var(\n --#{$custom-property-prefix}-brand-02,\n map-get($theme, 'brand-02')\n ) !global;\n $brand-03: var(\n --#{$custom-property-prefix}-brand-03,\n map-get($theme, 'brand-03')\n ) !global;\n $active-01: var(\n --#{$custom-property-prefix}-active-01,\n map-get($theme, 'active-01')\n ) !global;\n $hover-field: var(\n --#{$custom-property-prefix}-hover-field,\n map-get($theme, 'hover-field')\n ) !global;\n $danger: var(\n --#{$custom-property-prefix}-danger,\n map-get($theme, 'danger')\n ) !global;\n $spacing-01: var(\n --#{$custom-property-prefix}-spacing-01,\n map-get($theme, 'spacing-01')\n ) !global;\n $spacing-02: var(\n --#{$custom-property-prefix}-spacing-02,\n map-get($theme, 'spacing-02')\n ) !global;\n $spacing-03: var(\n --#{$custom-property-prefix}-spacing-03,\n map-get($theme, 'spacing-03')\n ) !global;\n $spacing-04: var(\n --#{$custom-property-prefix}-spacing-04,\n map-get($theme, 'spacing-04')\n ) !global;\n $spacing-05: var(\n --#{$custom-property-prefix}-spacing-05,\n map-get($theme, 'spacing-05')\n ) !global;\n $spacing-06: var(\n --#{$custom-property-prefix}-spacing-06,\n map-get($theme, 'spacing-06')\n ) !global;\n $spacing-07: var(\n --#{$custom-property-prefix}-spacing-07,\n map-get($theme, 'spacing-07')\n ) !global;\n $spacing-08: var(\n --#{$custom-property-prefix}-spacing-08,\n map-get($theme, 'spacing-08')\n ) !global;\n $spacing-09: var(\n --#{$custom-property-prefix}-spacing-09,\n map-get($theme, 'spacing-09')\n ) !global;\n $spacing-10: var(\n --#{$custom-property-prefix}-spacing-10,\n map-get($theme, 'spacing-10')\n ) !global;\n $spacing-11: var(\n --#{$custom-property-prefix}-spacing-11,\n map-get($theme, 'spacing-11')\n ) !global;\n $spacing-12: var(\n --#{$custom-property-prefix}-spacing-12,\n map-get($theme, 'spacing-12')\n ) !global;\n $fluid-spacing-01: var(\n --#{$custom-property-prefix}-fluid-spacing-01,\n map-get($theme, 'fluid-spacing-01')\n ) !global;\n $fluid-spacing-02: var(\n --#{$custom-property-prefix}-fluid-spacing-02,\n map-get($theme, 'fluid-spacing-02')\n ) !global;\n $fluid-spacing-03: var(\n --#{$custom-property-prefix}-fluid-spacing-03,\n map-get($theme, 'fluid-spacing-03')\n ) !global;\n $fluid-spacing-04: var(\n --#{$custom-property-prefix}-fluid-spacing-04,\n map-get($theme, 'fluid-spacing-04')\n ) !global;\n $layout-01: var(\n --#{$custom-property-prefix}-layout-01,\n map-get($theme, 'layout-01')\n ) !global;\n $layout-02: var(\n --#{$custom-property-prefix}-layout-02,\n map-get($theme, 'layout-02')\n ) !global;\n $layout-03: var(\n --#{$custom-property-prefix}-layout-03,\n map-get($theme, 'layout-03')\n ) !global;\n $layout-04: var(\n --#{$custom-property-prefix}-layout-04,\n map-get($theme, 'layout-04')\n ) !global;\n $layout-05: var(\n --#{$custom-property-prefix}-layout-05,\n map-get($theme, 'layout-05')\n ) !global;\n $layout-06: var(\n --#{$custom-property-prefix}-layout-06,\n map-get($theme, 'layout-06')\n ) !global;\n $layout-07: var(\n --#{$custom-property-prefix}-layout-07,\n map-get($theme, 'layout-07')\n ) !global;\n $container-01: var(\n --#{$custom-property-prefix}-container-01,\n map-get($theme, 'container-01')\n ) !global;\n $container-02: var(\n --#{$custom-property-prefix}-container-02,\n map-get($theme, 'container-02')\n ) !global;\n $container-03: var(\n --#{$custom-property-prefix}-container-03,\n map-get($theme, 'container-03')\n ) !global;\n $container-04: var(\n --#{$custom-property-prefix}-container-04,\n map-get($theme, 'container-04')\n ) !global;\n $container-05: var(\n --#{$custom-property-prefix}-container-05,\n map-get($theme, 'container-05')\n ) !global;\n $icon-size-01: var(\n --#{$custom-property-prefix}-icon-size-01,\n map-get($theme, 'icon-size-01')\n ) !global;\n $icon-size-02: var(\n --#{$custom-property-prefix}-icon-size-02,\n map-get($theme, 'icon-size-02')\n ) !global;\n }\n @if $emit-custom-properties == true {\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'interactive-01',\n $emit-difference\n )\n {\n @include custom-property(\n 'interactive-01',\n map-get($theme, 'interactive-01')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'interactive-02',\n $emit-difference\n )\n {\n @include custom-property(\n 'interactive-02',\n map-get($theme, 'interactive-02')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'interactive-03',\n $emit-difference\n )\n {\n @include custom-property(\n 'interactive-03',\n map-get($theme, 'interactive-03')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'interactive-04',\n $emit-difference\n )\n {\n @include custom-property(\n 'interactive-04',\n map-get($theme, 'interactive-04')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'ui-background',\n $emit-difference\n )\n {\n @include custom-property(\n 'ui-background',\n map-get($theme, 'ui-background')\n );\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'ui-01', $emit-difference) {\n @include custom-property('ui-01', map-get($theme, 'ui-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'ui-02', $emit-difference) {\n @include custom-property('ui-02', map-get($theme, 'ui-02'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'ui-03', $emit-difference) {\n @include custom-property('ui-03', map-get($theme, 'ui-03'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'ui-04', $emit-difference) {\n @include custom-property('ui-04', map-get($theme, 'ui-04'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'ui-05', $emit-difference) {\n @include custom-property('ui-05', map-get($theme, 'ui-05'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'text-01', $emit-difference) {\n @include custom-property('text-01', map-get($theme, 'text-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'text-02', $emit-difference) {\n @include custom-property('text-02', map-get($theme, 'text-02'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'text-03', $emit-difference) {\n @include custom-property('text-03', map-get($theme, 'text-03'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'text-04', $emit-difference) {\n @include custom-property('text-04', map-get($theme, 'text-04'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'text-05', $emit-difference) {\n @include custom-property('text-05', map-get($theme, 'text-05'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'text-error',\n $emit-difference\n )\n {\n @include custom-property('text-error', map-get($theme, 'text-error'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'icon-01', $emit-difference) {\n @include custom-property('icon-01', map-get($theme, 'icon-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'icon-02', $emit-difference) {\n @include custom-property('icon-02', map-get($theme, 'icon-02'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'icon-03', $emit-difference) {\n @include custom-property('icon-03', map-get($theme, 'icon-03'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'link-01', $emit-difference) {\n @include custom-property('link-01', map-get($theme, 'link-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'link-02', $emit-difference) {\n @include custom-property('link-02', map-get($theme, 'link-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'inverse-link',\n $emit-difference\n )\n {\n @include custom-property('inverse-link', map-get($theme, 'inverse-link'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'field-01', $emit-difference)\n {\n @include custom-property('field-01', map-get($theme, 'field-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'field-02', $emit-difference)\n {\n @include custom-property('field-02', map-get($theme, 'field-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'inverse-01',\n $emit-difference\n )\n {\n @include custom-property('inverse-01', map-get($theme, 'inverse-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'inverse-02',\n $emit-difference\n )\n {\n @include custom-property('inverse-02', map-get($theme, 'inverse-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'support-01',\n $emit-difference\n )\n {\n @include custom-property('support-01', map-get($theme, 'support-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'support-02',\n $emit-difference\n )\n {\n @include custom-property('support-02', map-get($theme, 'support-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'support-03',\n $emit-difference\n )\n {\n @include custom-property('support-03', map-get($theme, 'support-03'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'support-04',\n $emit-difference\n )\n {\n @include custom-property('support-04', map-get($theme, 'support-04'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'inverse-support-01',\n $emit-difference\n )\n {\n @include custom-property(\n 'inverse-support-01',\n map-get($theme, 'inverse-support-01')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'inverse-support-02',\n $emit-difference\n )\n {\n @include custom-property(\n 'inverse-support-02',\n map-get($theme, 'inverse-support-02')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'inverse-support-03',\n $emit-difference\n )\n {\n @include custom-property(\n 'inverse-support-03',\n map-get($theme, 'inverse-support-03')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'inverse-support-04',\n $emit-difference\n )\n {\n @include custom-property(\n 'inverse-support-04',\n map-get($theme, 'inverse-support-04')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'overlay-01',\n $emit-difference\n )\n {\n @include custom-property('overlay-01', map-get($theme, 'overlay-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'danger-01', $emit-difference)\n {\n @include custom-property('danger-01', map-get($theme, 'danger-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'danger-02', $emit-difference)\n {\n @include custom-property('danger-02', map-get($theme, 'danger-02'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'focus', $emit-difference) {\n @include custom-property('focus', map-get($theme, 'focus'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'inverse-focus-ui',\n $emit-difference\n )\n {\n @include custom-property(\n 'inverse-focus-ui',\n map-get($theme, 'inverse-focus-ui')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'hover-primary',\n $emit-difference\n )\n {\n @include custom-property(\n 'hover-primary',\n map-get($theme, 'hover-primary')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'active-primary',\n $emit-difference\n )\n {\n @include custom-property(\n 'active-primary',\n map-get($theme, 'active-primary')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'hover-primary-text',\n $emit-difference\n )\n {\n @include custom-property(\n 'hover-primary-text',\n map-get($theme, 'hover-primary-text')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'hover-secondary',\n $emit-difference\n )\n {\n @include custom-property(\n 'hover-secondary',\n map-get($theme, 'hover-secondary')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'active-secondary',\n $emit-difference\n )\n {\n @include custom-property(\n 'active-secondary',\n map-get($theme, 'active-secondary')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'hover-tertiary',\n $emit-difference\n )\n {\n @include custom-property(\n 'hover-tertiary',\n map-get($theme, 'hover-tertiary')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'active-tertiary',\n $emit-difference\n )\n {\n @include custom-property(\n 'active-tertiary',\n map-get($theme, 'active-tertiary')\n );\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'hover-ui', $emit-difference)\n {\n @include custom-property('hover-ui', map-get($theme, 'hover-ui'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'hover-light-ui',\n $emit-difference\n )\n {\n @include custom-property(\n 'hover-light-ui',\n map-get($theme, 'hover-light-ui')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'hover-selected-ui',\n $emit-difference\n )\n {\n @include custom-property(\n 'hover-selected-ui',\n map-get($theme, 'hover-selected-ui')\n );\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'active-ui', $emit-difference)\n {\n @include custom-property('active-ui', map-get($theme, 'active-ui'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'active-light-ui',\n $emit-difference\n )\n {\n @include custom-property(\n 'active-light-ui',\n map-get($theme, 'active-light-ui')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'selected-ui',\n $emit-difference\n )\n {\n @include custom-property('selected-ui', map-get($theme, 'selected-ui'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'selected-light-ui',\n $emit-difference\n )\n {\n @include custom-property(\n 'selected-light-ui',\n map-get($theme, 'selected-light-ui')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'inverse-hover-ui',\n $emit-difference\n )\n {\n @include custom-property(\n 'inverse-hover-ui',\n map-get($theme, 'inverse-hover-ui')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'hover-danger',\n $emit-difference\n )\n {\n @include custom-property('hover-danger', map-get($theme, 'hover-danger'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'active-danger',\n $emit-difference\n )\n {\n @include custom-property(\n 'active-danger',\n map-get($theme, 'active-danger')\n );\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'hover-row', $emit-difference)\n {\n @include custom-property('hover-row', map-get($theme, 'hover-row'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'visited-link',\n $emit-difference\n )\n {\n @include custom-property('visited-link', map-get($theme, 'visited-link'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'disabled-01',\n $emit-difference\n )\n {\n @include custom-property('disabled-01', map-get($theme, 'disabled-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'disabled-02',\n $emit-difference\n )\n {\n @include custom-property('disabled-02', map-get($theme, 'disabled-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'disabled-03',\n $emit-difference\n )\n {\n @include custom-property('disabled-03', map-get($theme, 'disabled-03'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'highlight', $emit-difference)\n {\n @include custom-property('highlight', map-get($theme, 'highlight'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'decorative-01',\n $emit-difference\n )\n {\n @include custom-property(\n 'decorative-01',\n map-get($theme, 'decorative-01')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'button-separator',\n $emit-difference\n )\n {\n @include custom-property(\n 'button-separator',\n map-get($theme, 'button-separator')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'skeleton-01',\n $emit-difference\n )\n {\n @include custom-property('skeleton-01', map-get($theme, 'skeleton-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'skeleton-02',\n $emit-difference\n )\n {\n @include custom-property('skeleton-02', map-get($theme, 'skeleton-02'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'brand-01', $emit-difference)\n {\n @include custom-property('brand-01', map-get($theme, 'brand-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'brand-02', $emit-difference)\n {\n @include custom-property('brand-02', map-get($theme, 'brand-02'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'brand-03', $emit-difference)\n {\n @include custom-property('brand-03', map-get($theme, 'brand-03'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'active-01', $emit-difference)\n {\n @include custom-property('active-01', map-get($theme, 'active-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'hover-field',\n $emit-difference\n )\n {\n @include custom-property('hover-field', map-get($theme, 'hover-field'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'danger', $emit-difference) {\n @include custom-property('danger', map-get($theme, 'danger'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'caption-01',\n $emit-difference\n )\n {\n @include custom-property('caption-01', map-get($theme, 'caption-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'label-01', $emit-difference)\n {\n @include custom-property('label-01', map-get($theme, 'label-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'helper-text-01',\n $emit-difference\n )\n {\n @include custom-property(\n 'helper-text-01',\n map-get($theme, 'helper-text-01')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'body-short-01',\n $emit-difference\n )\n {\n @include custom-property(\n 'body-short-01',\n map-get($theme, 'body-short-01')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'body-long-01',\n $emit-difference\n )\n {\n @include custom-property('body-long-01', map-get($theme, 'body-long-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'body-short-02',\n $emit-difference\n )\n {\n @include custom-property(\n 'body-short-02',\n map-get($theme, 'body-short-02')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'body-long-02',\n $emit-difference\n )\n {\n @include custom-property('body-long-02', map-get($theme, 'body-long-02'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'code-01', $emit-difference) {\n @include custom-property('code-01', map-get($theme, 'code-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'code-02', $emit-difference) {\n @include custom-property('code-02', map-get($theme, 'code-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'heading-01',\n $emit-difference\n )\n {\n @include custom-property('heading-01', map-get($theme, 'heading-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'productive-heading-01',\n $emit-difference\n )\n {\n @include custom-property(\n 'productive-heading-01',\n map-get($theme, 'productive-heading-01')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'heading-02',\n $emit-difference\n )\n {\n @include custom-property('heading-02', map-get($theme, 'heading-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'productive-heading-02',\n $emit-difference\n )\n {\n @include custom-property(\n 'productive-heading-02',\n map-get($theme, 'productive-heading-02')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'productive-heading-03',\n $emit-difference\n )\n {\n @include custom-property(\n 'productive-heading-03',\n map-get($theme, 'productive-heading-03')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'productive-heading-04',\n $emit-difference\n )\n {\n @include custom-property(\n 'productive-heading-04',\n map-get($theme, 'productive-heading-04')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'productive-heading-05',\n $emit-difference\n )\n {\n @include custom-property(\n 'productive-heading-05',\n map-get($theme, 'productive-heading-05')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'productive-heading-06',\n $emit-difference\n )\n {\n @include custom-property(\n 'productive-heading-06',\n map-get($theme, 'productive-heading-06')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'productive-heading-07',\n $emit-difference\n )\n {\n @include custom-property(\n 'productive-heading-07',\n map-get($theme, 'productive-heading-07')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'expressive-heading-01',\n $emit-difference\n )\n {\n @include custom-property(\n 'expressive-heading-01',\n map-get($theme, 'expressive-heading-01')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'expressive-heading-02',\n $emit-difference\n )\n {\n @include custom-property(\n 'expressive-heading-02',\n map-get($theme, 'expressive-heading-02')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'expressive-heading-03',\n $emit-difference\n )\n {\n @include custom-property(\n 'expressive-heading-03',\n map-get($theme, 'expressive-heading-03')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'expressive-heading-04',\n $emit-difference\n )\n {\n @include custom-property(\n 'expressive-heading-04',\n map-get($theme, 'expressive-heading-04')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'expressive-heading-05',\n $emit-difference\n )\n {\n @include custom-property(\n 'expressive-heading-05',\n map-get($theme, 'expressive-heading-05')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'expressive-heading-06',\n $emit-difference\n )\n {\n @include custom-property(\n 'expressive-heading-06',\n map-get($theme, 'expressive-heading-06')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'expressive-paragraph-01',\n $emit-difference\n )\n {\n @include custom-property(\n 'expressive-paragraph-01',\n map-get($theme, 'expressive-paragraph-01')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'quotation-01',\n $emit-difference\n )\n {\n @include custom-property('quotation-01', map-get($theme, 'quotation-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'quotation-02',\n $emit-difference\n )\n {\n @include custom-property('quotation-02', map-get($theme, 'quotation-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'display-01',\n $emit-difference\n )\n {\n @include custom-property('display-01', map-get($theme, 'display-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'display-02',\n $emit-difference\n )\n {\n @include custom-property('display-02', map-get($theme, 'display-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'display-03',\n $emit-difference\n )\n {\n @include custom-property('display-03', map-get($theme, 'display-03'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'display-04',\n $emit-difference\n )\n {\n @include custom-property('display-04', map-get($theme, 'display-04'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-01',\n $emit-difference\n )\n {\n @include custom-property('spacing-01', map-get($theme, 'spacing-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-02',\n $emit-difference\n )\n {\n @include custom-property('spacing-02', map-get($theme, 'spacing-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-03',\n $emit-difference\n )\n {\n @include custom-property('spacing-03', map-get($theme, 'spacing-03'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-04',\n $emit-difference\n )\n {\n @include custom-property('spacing-04', map-get($theme, 'spacing-04'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-05',\n $emit-difference\n )\n {\n @include custom-property('spacing-05', map-get($theme, 'spacing-05'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-06',\n $emit-difference\n )\n {\n @include custom-property('spacing-06', map-get($theme, 'spacing-06'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-07',\n $emit-difference\n )\n {\n @include custom-property('spacing-07', map-get($theme, 'spacing-07'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-08',\n $emit-difference\n )\n {\n @include custom-property('spacing-08', map-get($theme, 'spacing-08'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-09',\n $emit-difference\n )\n {\n @include custom-property('spacing-09', map-get($theme, 'spacing-09'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-10',\n $emit-difference\n )\n {\n @include custom-property('spacing-10', map-get($theme, 'spacing-10'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-11',\n $emit-difference\n )\n {\n @include custom-property('spacing-11', map-get($theme, 'spacing-11'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'spacing-12',\n $emit-difference\n )\n {\n @include custom-property('spacing-12', map-get($theme, 'spacing-12'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'fluid-spacing-01',\n $emit-difference\n )\n {\n @include custom-property(\n 'fluid-spacing-01',\n map-get($theme, 'fluid-spacing-01')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'fluid-spacing-02',\n $emit-difference\n )\n {\n @include custom-property(\n 'fluid-spacing-02',\n map-get($theme, 'fluid-spacing-02')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'fluid-spacing-03',\n $emit-difference\n )\n {\n @include custom-property(\n 'fluid-spacing-03',\n map-get($theme, 'fluid-spacing-03')\n );\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'fluid-spacing-04',\n $emit-difference\n )\n {\n @include custom-property(\n 'fluid-spacing-04',\n map-get($theme, 'fluid-spacing-04')\n );\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'layout-01', $emit-difference)\n {\n @include custom-property('layout-01', map-get($theme, 'layout-01'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'layout-02', $emit-difference)\n {\n @include custom-property('layout-02', map-get($theme, 'layout-02'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'layout-03', $emit-difference)\n {\n @include custom-property('layout-03', map-get($theme, 'layout-03'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'layout-04', $emit-difference)\n {\n @include custom-property('layout-04', map-get($theme, 'layout-04'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'layout-05', $emit-difference)\n {\n @include custom-property('layout-05', map-get($theme, 'layout-05'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'layout-06', $emit-difference)\n {\n @include custom-property('layout-06', map-get($theme, 'layout-06'));\n }\n\n @if should-emit($theme, $parent-carbon-theme, 'layout-07', $emit-difference)\n {\n @include custom-property('layout-07', map-get($theme, 'layout-07'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'container-01',\n $emit-difference\n )\n {\n @include custom-property('container-01', map-get($theme, 'container-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'container-02',\n $emit-difference\n )\n {\n @include custom-property('container-02', map-get($theme, 'container-02'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'container-03',\n $emit-difference\n )\n {\n @include custom-property('container-03', map-get($theme, 'container-03'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'container-04',\n $emit-difference\n )\n {\n @include custom-property('container-04', map-get($theme, 'container-04'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'container-05',\n $emit-difference\n )\n {\n @include custom-property('container-05', map-get($theme, 'container-05'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'icon-size-01',\n $emit-difference\n )\n {\n @include custom-property('icon-size-01', map-get($theme, 'icon-size-01'));\n }\n\n @if should-emit(\n $theme,\n $parent-carbon-theme,\n 'icon-size-02',\n $emit-difference\n )\n {\n @include custom-property('icon-size-02', map-get($theme, 'icon-size-02'));\n }\n }\n\n @content;\n\n // Reset to default theme after apply in content\n @if $carbon--theme != $parent-carbon-theme {\n $carbon--theme: $parent-carbon-theme !global;\n\n @include carbon--theme();\n }\n}\n","//\n// Copyright IBM Corp. 2018, 2018\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n@import '../layout/breakpoint';\n@import 'font-family';\n@import 'scale';\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$caption-01: (\n font-size: carbon--type-scale(1),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.34,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-01: (\n font-size: carbon--type-scale(1),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.34,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$helper-text-01: (\n font-size: carbon--type-scale(1),\n line-height: 1.34,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-01: (\n font-size: carbon--type-scale(2),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.29,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-01: (\n font-size: carbon--type-scale(2),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.43,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-02: (\n font-size: carbon--type-scale(3),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-02: (\n font-size: carbon--type-scale(3),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-01: (\n font-family: carbon--font-family('mono'),\n font-size: carbon--type-scale(1),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.34,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-02: (\n font-family: carbon--font-family('mono'),\n font-size: carbon--type-scale(2),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.43,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-01: (\n font-size: carbon--type-scale(2),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.29,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-01: $heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-02: (\n font-size: carbon--type-scale(3),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-02: $heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-03: (\n font-size: carbon--type-scale(5),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-04: (\n font-size: carbon--type-scale(7),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.29,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-05: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-06: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('light'),\n // Extra digit needed for precision in Chrome\n line-height: 1.199,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-07: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-01: map-merge(\n $heading-01,\n (\n line-height: 1.25,\n )\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-02: map-merge(\n $heading-02,\n (\n line-height: 1.5,\n )\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-03: (\n font-size: carbon--type-scale(5),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: carbon--type-scale(5),\n line-height: 1.25,\n ),\n max: (\n font-size: carbon--type-scale(6),\n line-height: 1.334,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-04: (\n font-size: carbon--type-scale(7),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.29,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: carbon--type-scale(7),\n line-height: 1.25,\n ),\n max: (\n font-size: carbon--type-scale(8),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-05: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(9),\n font-weight: carbon--font-weight('light'),\n line-height: 1.22,\n ),\n lg: (\n font-size: carbon--type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: carbon--type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: carbon--type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-06: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: carbon--type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: carbon--type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: carbon--type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-paragraph-01: (\n font-size: carbon--type-scale(6),\n font-weight: carbon--font-weight('light'),\n line-height: 1.334,\n letter-spacing: 0,\n breakpoints: (\n lg: (\n font-size: carbon--type-scale(7),\n line-height: 1.29,\n ),\n max: (\n font-size: carbon--type-scale(8),\n line-height: 1.25,\n ),\n ),\n);\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-01: (\n font-size: carbon--type-scale(5),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.3,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(5),\n ),\n lg: (\n font-size: carbon--type-scale(6),\n line-height: 1.334,\n ),\n xlg: (\n font-size: carbon--type-scale(7),\n line-height: 1.29,\n ),\n max: (\n font-size: carbon--type-scale(8),\n line-height: 1.25,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-02: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('light'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: carbon--type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: carbon--type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: carbon--type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-01: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(10),\n ),\n lg: (\n font-size: carbon--type-scale(12),\n ),\n xlg: (\n font-size: carbon--type-scale(13),\n line-height: 1.17,\n ),\n max: (\n font-size: carbon--type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-02: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(10),\n ),\n lg: (\n font-size: carbon--type-scale(12),\n ),\n xlg: (\n font-size: carbon--type-scale(13),\n line-height: 1.16,\n ),\n max: (\n font-size: carbon--type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-03: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: carbon--type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: carbon--type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: carbon--type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-04: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: carbon--type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: carbon--type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: carbon--type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$tokens: (\n caption-01: $caption-01,\n label-01: $label-01,\n helper-text-01: $helper-text-01,\n body-short-01: $body-short-01,\n body-short-02: $body-short-02,\n body-long-01: $body-long-01,\n body-long-02: $body-long-02,\n code-01: $code-01,\n code-02: $code-02,\n heading-01: $heading-01,\n heading-02: $heading-02,\n productive-heading-01: $productive-heading-01,\n productive-heading-02: $productive-heading-02,\n productive-heading-03: $productive-heading-03,\n productive-heading-04: $productive-heading-04,\n productive-heading-05: $productive-heading-05,\n productive-heading-06: $productive-heading-06,\n productive-heading-07: $productive-heading-07,\n expressive-paragraph-01: $expressive-paragraph-01,\n expressive-heading-01: $expressive-heading-01,\n expressive-heading-02: $expressive-heading-02,\n expressive-heading-03: $expressive-heading-03,\n expressive-heading-04: $expressive-heading-04,\n expressive-heading-05: $expressive-heading-05,\n expressive-heading-06: $expressive-heading-06,\n quotation-01: $quotation-01,\n quotation-02: $quotation-02,\n display-01: $display-01,\n display-02: $display-02,\n display-03: $display-03,\n display-04: $display-04,\n);\n\n/// @param {Map} $map\n/// @access public\n/// @group @carbon/type\n@mixin properties($map) {\n @each $name, $value in $map {\n #{$name}: $value;\n }\n}\n\n/// @param {Number} $value - Number with units\n/// @return {Number} Without units\n/// @access public\n/// @group @carbon/type\n@function strip-unit($value) {\n @return $value / ($value * 0 + 1);\n}\n\n/// This helper includes fluid type styles for the given token value. Fluid type\n/// means that the `font-size` is computed using `calc()` in order to be\n/// determined by the screen size instead of a breakpoint. As a result, fluid\n/// styles should be used with caution in fixed width contexts.\n///\n/// In addition, we make use of %-based line-heights so that the line-height of\n/// each type style is computed correctly due to the dynamic nature of the\n/// `font-size`.\n///\n/// Most of the logic for this work comes from CSS Tricks:\n/// https://css-tricks.com/snippets/css/fluid-typography/\n///\n/// @param {Map} $type-styles - The value of a given type token\n/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - Custom breakpoints to use\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type($type-styles, $breakpoints: $carbon--grid-breakpoints) {\n // Include the initial styles for the given token by default without any\n // media query guard. This includes `font-size` as a fallback in the case\n // that a browser does not support `calc()`\n @include properties(map-remove($type-styles, breakpoints));\n // We also need to include the `sm` styles by default since they don't\n // appear in the fluid styles for tokens\n @include fluid-type-size($type-styles, sm, $breakpoints);\n\n // Finally, we need to go through all the breakpoints defined in the type\n // token and apply the properties and fluid type size for that given\n // breakpoint\n @each $name, $values in map-get($type-styles, breakpoints) {\n @include carbon--breakpoint($name) {\n @include properties($values);\n @include fluid-type-size($type-styles, $name, $breakpoints);\n }\n }\n}\n\n/// Computes the fluid `font-size` for a given type style and breakpoint\n/// @param {Map} $type-styles - The styles for a given token\n/// @param {String} $name - The name of the breakpoint to which we apply the fluid\n/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - The breakpoints for the grid system\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type-size(\n $type-styles,\n $name,\n $breakpoints: $carbon--grid-breakpoints\n) {\n // Get the information about the breakpoint we're currently working in. Useful\n // for getting initial width information\n $breakpoint: map-get($breakpoints, $name);\n\n // Our fluid styles are captured under the 'breakpoints' property in our type\n // styles map. These define what values to treat as `max-` variables below\n $fluid-sizes: map-get($type-styles, breakpoints);\n $fluid-breakpoint: ();\n // Special case for `sm` because the styles for small are on the type style\n // directly\n @if $name == sm {\n $fluid-breakpoint: map-remove($type-styles, breakpoints);\n } @else {\n $fluid-breakpoint: map-get($fluid-sizes, $name);\n }\n\n // Initialize our font-sizes to the default size for the type style\n $max-font-size: map-get($type-styles, font-size);\n $min-font-size: map-get($type-styles, font-size);\n @if map-has-key($fluid-breakpoint, font-size) {\n $min-font-size: map-get($fluid-breakpoint, font-size);\n }\n\n // Initialize our min and max width to the width of the current breakpoint\n $max-vw: map-get($breakpoint, width);\n $min-vw: map-get($breakpoint, width);\n\n // We can use `breakpoint-next` to see if there is another breakpoint we can\n // use to update `max-font-size` and `max-vw` with larger values\n $next-breakpoint-available: carbon--breakpoint-next($name, $breakpoints);\n $next-fluid-breakpoint-name: null;\n\n // We need to figure out what the next available fluid breakpoint is for our\n // given $type-styles. In this loop we try and iterate through breakpoints\n // until we either manually set $next-breakpoint-available to null or\n // `breakpoint-next` returns null.\n @while $next-breakpoint-available {\n @if map-has-key($fluid-sizes, $next-breakpoint-available) {\n $next-fluid-breakpoint-name: $next-breakpoint-available;\n $next-breakpoint-available: null;\n } @else {\n $next-breakpoint-available: carbon--breakpoint-next(\n $next-breakpoint-available,\n $breakpoints\n );\n }\n }\n\n // If we have found the next available fluid breakpoint name, then we know\n // that we have values that we can use to set max-font-size and max-vw as both\n // values derive from the next breakpoint\n @if $next-fluid-breakpoint-name {\n $next-fluid-breakpoint: map-get($breakpoints, $next-fluid-breakpoint-name);\n $max-font-size: map-get(\n map-get($fluid-sizes, $next-fluid-breakpoint-name),\n font-size\n );\n $max-vw: map-get($next-fluid-breakpoint, width);\n\n // prettier-ignore\n font-size: calc(#{$min-font-size} +\n #{strip-unit($max-font-size - $min-font-size)} *\n ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})\n );\n } @else {\n // Otherwise, just default to setting the font size found from the type\n // style or the given fluid breakpoint in the type style\n font-size: $min-font-size;\n }\n}\n\n// TODO move following variable and `custom-property` mixin into shared file for\n// both `@carbon/type` and `@carbon/themes`\n\n/// @access private\n/// @group @carbon/type\n$custom-property-prefix: 'cds' !default;\n\n/// @access private\n/// @group @carbon/type\n@mixin custom-properties($name, $value) {\n @each $property, $value in $value {\n #{$property}: var(\n --#{$custom-property-prefix}-#{$name}-#{$property},\n #{$value}\n );\n }\n}\n\n/// Helper mixin to include the styles for a given token in any selector in your\n/// project. Also includes an optional fluid option that will enable fluid\n/// styles for the token if they are defined. Fluid styles will cause the\n/// token's font-size to be computed based on the viewport size. As a result, use\n/// with caution in fixed contexts.\n/// @param {String} $name - The name of the token to get the styles for\n/// @param {Boolean} $fluid [false] - Specify whether to include fluid styles for the\n/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - Provide a custom breakpoint map to use\n/// @access public\n/// @group @carbon/type\n@mixin carbon--type-style(\n $name,\n $fluid: false,\n $breakpoints: $carbon--grid-breakpoints\n) {\n @if not map-has-key($tokens, $name) {\n @error 'Unable to find a token with the name: `#{$name}`';\n }\n\n $token: map-get($tokens, $name);\n\n // If $fluid is set to true and the token has breakpoints defined for fluid\n // styles, delegate to the fluid-type helper for the given token\n @if $fluid == true and map-has-key($token, 'breakpoints') {\n @include fluid-type($token, $breakpoints);\n } @else {\n @if global-variable-exists('feature-flags') and\n map-get($feature-flags, 'enable-css-custom-properties')\n {\n @include custom-properties($name, $token);\n } @else {\n // Otherwise, we just include all the property declarations directly on the\n // selector\n @include properties(map-remove($token, 'breakpoints'));\n }\n }\n}\n"],sourceRoot:""}]),a.locals={leftNav:"Y3Q+kOxLLWMt9RIQX8EZ2w=="};var u=a},361:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);r&&o[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},9233:function(e){"use strict";var t=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r};e.exports=function(e){var n,r=function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),4!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n)||function(e,n){if(e){if("string"==typeof e)return t(e,4);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,4):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=r[1],i=r[3];if(!i)return o;if("function"==typeof btoa){var a=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),c="/*# ".concat(u," */"),s=i.sources.map((function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")}));return[o].concat(s).concat([c]).join("\n")}return[o].join("\n")}},7530:function(e){e.exports=function(){"use strict";var e=6e4,t=36e5,n="millisecond",r="second",o="minute",i="hour",a="day",u="week",c="month",s="quarter",f="year",p="date",d="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},g={s:m,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+m(r,2,"0")+":"+m(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,c),i=n-o<0,a=t.clone().add(r+(i?-1:1),c);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:f,w:u,d:a,D:p,h:i,m:o,s:r,ms:n,Q:s}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=y;var _=function(e){return l(e,j)},x=function e(t,n,r){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),n&&(w[i]=n,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var u=t.name;w[u]=t,o=u}return!r&&o&&(b=o),o||!r&&b},S=function(e,t){if(_(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new j(n)},O=g;O.l=x,O.i=_,O.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E,k,j=((k=(E=function(e){this.$L=x(e.locale,null,!0),this.parse(e)}).prototype).parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(O.u(t))return new Date;if(l(t,Date))return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(h);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},k.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},k.$utils=function(){return O},k.isValid=function(){return!(this.$d.toString()===d)},k.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},k.isAfter=function(e,t){return S(e)<this.startOf(t)},k.isBefore=function(e,t){return this.endOf(t)<S(e)},k.$g=function(e,t,n){return O.u(e)?this[t]:this.set(n,e)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(e,t){var n=this,s=!!O.u(t)||t,l=O.p(e),d=function(e,t){var r=O.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return s?r:r.endOf(a)},h=function(e,t){return O.w(n.toDate()[e].apply(n.toDate("s"),(s?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},v=this.$W,y=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(l){case f:return s?d(1,0):d(31,11);case c:return s?d(1,y):d(0,y+1);case u:var b=this.$locale().weekStart||0,w=(v<b?v+7:v)-b;return d(s?m-w:m+(6-w),y);case a:case p:return h(g+"Hours",0);case i:return h(g+"Minutes",1);case o:return h(g+"Seconds",2);case r:return h(g+"Milliseconds",3);default:return this.clone()}},k.endOf=function(e){return this.startOf(e,!1)},k.$set=function(e,t){var u,s=O.p(e),l="set"+(this.$u?"UTC":""),d=(u={},u[a]=l+"Date",u[p]=l+"Date",u[c]=l+"Month",u[f]=l+"FullYear",u[i]=l+"Hours",u[o]=l+"Minutes",u[r]=l+"Seconds",u[n]=l+"Milliseconds",u)[s],h=s===a?this.$D+(t-this.$W):t;if(s===c||s===f){var v=this.clone().set(p,1);v.$d[d](h),v.init(),this.$d=v.set(p,Math.min(this.$D,v.daysInMonth())).$d}else d&&this.$d[d](h);return this.init(),this},k.set=function(e,t){return this.clone().$set(e,t)},k.get=function(e){return this[O.p(e)]()},k.add=function(n,s){var l,p=this;n=Number(n);var d=O.p(s),h=function(e){var t=S(p);return O.w(t.date(t.date()+Math.round(e*n)),p)};if(d===c)return this.set(c,this.$M+n);if(d===f)return this.set(f,this.$y+n);if(d===a)return h(1);if(d===u)return h(7);var v=(l={},l[o]=e,l[i]=t,l[r]=1e3,l)[d]||1,y=this.$d.getTime()+n*v;return O.w(y,this)},k.subtract=function(e,t){return this.add(-1*e,t)},k.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||d;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=O.z(this),i=this.$H,a=this.$m,u=this.$M,c=n.weekdays,s=n.months,l=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].substr(0,i)},f=function(e){return O.s(i%12||12,e,"0")},p=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},h={YY:String(this.$y).slice(-2),YYYY:this.$y,M:u+1,MM:O.s(u+1,2,"0"),MMM:l(n.monthsShort,u,s,3),MMMM:l(s,u),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,c,2),ddd:l(n.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(i),HH:O.s(i,2,"0"),h:f(1),hh:f(2),a:p(i,a,!0),A:p(i,a,!1),m:String(a),mm:O.s(a,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:o};return r.replace(v,(function(e,t){return t||h[e]||o.replace(":","")}))},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(n,l,p){var d,h=O.p(l),v=S(n),y=(v.utcOffset()-this.utcOffset())*e,m=this-v,g=O.m(this,v);return g=(d={},d[f]=g/12,d[c]=g,d[s]=g/3,d[u]=(m-y)/6048e5,d[a]=(m-y)/864e5,d[i]=m/t,d[o]=m/e,d[r]=m/1e3,d)[h]||m,p?g:O.a(g)},k.daysInMonth=function(){return this.endOf(c).$D},k.$locale=function(){return w[this.$L]},k.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=x(e,t,!0);return r&&(n.$L=r),n},k.clone=function(){return O.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},E),C=j.prototype;return S.prototype=C,[["$ms",n],["$s",r],["$m",o],["$H",i],["$W",a],["$M",c],["$y",f],["$D",p]].forEach((function(e){C[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),S.extend=function(e,t){return e.$i||(e(t,j,S),e.$i=!0),S},S.locale=x,S.isDayjs=_,S.unix=function(e){return S(1e3*e)},S.en=w[b],S.Ls=w,S.p={},S}()},4332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},4525:function(e){(function(){var t,n,r=function(e,r,o,i){n.defer(),t.search(e).then((function(e){a(e,r).then((function(){o()}),(function(e){i(e)}))}),(function(e){i(e)}))},o=function(e){var t=n.defer(),o=[];return r(e,(function(e){e.forEach((function(e){o.push(e)}))}),(function(){t.resolve(o)}),(function(e){t.reject(e)})),t.promise},i=function(e,r){var o=n.defer();return t.search(e).then((function(e){var n=function(){a.pop()()},i={},a=[function(){o.resolve(e,i)}],u=e.data;u.entry&&u.entry.forEach((function(e){var o=e.resource,c=o.resourceType;r&&r.forEach((function(e){var r,s,l,f=e.split("."),p=f[0],d=f[1],h=o[d];if(c===p&&h){var v=h.reference;i[v]||(r=u,s=o,l=h,a.push((function(){var e,o,a,u;e=r,o=s,u=(a=l).reference,t.resolve({bundle:e,resource:o,reference:a}).then((function(e){var t=e.data||e.content;i[u]=t,n()}))})))}}))})),n()}),(function(){o.reject("Could not fetch search results")})),o.promise};function a(e,r){var o,i=e.data.entry||[],u=[];for(o=0;o<i.length;o++)u.push(i[o].resource);r(u);var c=n.defer();return t.nextPage({bundle:e.data}).then((function(e){a(e,r).then((function(e){c.resolve()}))}),(function(e){c.resolve()})),c.promise}e.exports=function(e,a){return t=e,n=a,e.drain=r,e.fetchAll=o,e.fetchAllWithReferences=i,e}}).call(this)},1256:function(e,t,n){(function(){n(5454);var t=n(4801),r=n(7921),o=n(8294),i=n(8821),a=n(442),u=n(856),c=n(7719),s=n(3029),l=n(2723),f=n(4249),p=n(4525);e.exports=function(e,n){var d=t.Middleware,h=t.$$Attr,v=function(e){return h("method",e)},y=function(e,t){return h("headers."+e,t)},m=d(a),g=d(u(e,n)).and(m).and(o.$Basic).and(o.$Bearer).and(o.$Credentials).and(i.$JsonData).and(y("Accept",e.headers&&e.headers.Accept?e.headers.Accept:"application/json")).and(y("Content-Type",e.headers&&e.headers["Content-Type"]?e.headers["Content-Type"]:"application/json")),b=g.and(v("GET")),w=g.and(v("POST")),_=g.and(v("PUT")),x=g.and(v("DELETE")),S=g.and(v("PATCH")),O=i.Http(e,n),E=f.Path,k=E(e.baseUrl),j=k.slash(":type || :resource.resourceType"),C=j.slash("_history"),$=j.slash(":id || :resource.id"),P=$.slash("_history"),A=$.slash(":versionId || :resource.meta.versionId"),T=k.slash(":target.resourceType || :target.type").slash(":target.id").slash(":target.versionId"),I=y("Prefer","return=representation"),R=d(r.$Paging);return p({conformance:b.and(k.slash("metadata")).end(O),document:w.and(k.slash("Document")).end(O),profile:b.and(k.slash("Profile").slash(":type")).end(O),transaction:w.and(k).end(O),history:b.and(k.slash("_history")).and(R).end(O),typeHistory:b.and(C).and(R).end(O),resourceHistory:b.and(P).and(R).end(O),read:b.and(s.$WithPatient).and($).end(O),vread:b.and(A).end(O),delete:x.and($).and(I).end(O),create:w.and(j).and(I).end(O),validate:w.and(j.slash("_validate")).end(O),meta:{add:w.and(T.slash("$meta-add")).end(O),delete:w.and(T.slash("$meta-delete")).end(O),read:b.and(T.slash("$meta")).end(O)},search:b.and(j).and(s.$WithPatient).and(r.$SearchParams).and(R).end(O),update:_.and($).and(I).end(O),conditionalUpdate:_.and(j).and(r.$SearchParams).and(I).end(O),conditionalDelete:x.and(j).and(r.$SearchParams).and(I).end(O),nextPage:b.and(c.$$BundleLinkUrl("next")).end(O),prevPage:b.and(c.$$BundleLinkUrl("previous")).and(c.$$BundleLinkUrl("prev")).end(O),getBundleByUrl:b.and(E(":url")).end(O),resolve:b.and(l.resolve).end(O),patch:S.and($).and(y("Content-Type","application/json-patch+json")).end(O)},n)}}).call(this)},8294:function(e,t,n){(function(){var e,r=n(4801),o=n(9672).btoa;t.$Basic=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.user&&e.auth.pass)return"Basic "+o(e.auth.user+":"+e.auth.pass)})),t.$Bearer=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.bearer)return"Bearer "+e.auth.bearer})),t.$Credentials=r.Middleware(r.$$Attr("credentials",(function(t){return e=t.credentials,""}))).and(r.$$Attr("credentials",(function(t){if(["same-origin","include"].indexOf(e)>-1)return e})))}).call(this)},7719:function(e,t){t.$$BundleLinkUrl=function(e){return function(t){return function(n){var r=n.bundle&&(n.bundle.link||[]).filter((function(t){return t.relation&&t.relation===e}))[0];return r&&r.url&&(n.url=r.url,n.data=null),t(n)}}}},856:function(e){(function(){var t=function(e,t,n){var r=e[n];return r&&!t[n]&&(t[n]=r),e};e.exports=function(e,n){return function(r){return function(o){return t(e,o,"baseUrl"),t(e,o,"cache"),t(e,o,"auth"),t(e,o,"patient"),t(e,o,"debug"),t(e,o,"credentials"),t(e,o,"headers"),t(e,o,"agentOptions"),t(n,o,"defer"),t(n,o,"http"),r(o)}}}}).call(this)},4801:function(e,t,n){(function(){var e=n(5454),r=function(e){return e.and=function(t){return r((n=e,o=t,function(e){return n(o(e))}));var n,o},e.end=function(t){return e(t)},e};t.$$Simple=function(e){return function(t){return function(n){return t(e(n))}}},t.$$Attr=function(t,n){return r((function(r){return function(o){var i;return i="function"==e.type(n)?n(o):n,r(null==i&&null==i?o:function(e,t,n){for(var r=t.split("."),o=e,i=0;i<r.length-1;i++){var a=r[i];(o=e[a])||(o={},e[a]=o)}return o[r[r.length-1]]=n,e}(o,t,i))}}))};var o=function(e,t){return r((function(n){return function(r){return r[e]=t(r),n(r)}}))};t.Middleware=r,t.Attribute=o,t.Method=function(e){return o("method",(t=e,function(){return t}));var t}}).call(this)},442:function(e){e.exports=function(e){return function(t){try{return e(t)}catch(e){if(t.debug&&(console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack)),!t.defer)throw console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack),new Error("I need adapter.defer");var n=t.defer();return n.reject(e),n.promise}}}},8821:function(e,t,n){(function(){var e=n(5454);t.Http=function(e,t){return function(n){n.debug&&console.log("\nDEBUG (request):",n.method,n.url,n);var r=(n.http||t.http||e.http)(n);return n.debug&&r&&r.then&&r.then((function(e){console.log("\nDEBUG: (responce)",e)})),r}},t.$JsonData=function(t){return function(n){var r,o=n.bundle||n.data||n.resource;return o&&(n.data=(r=o,"object"==e.type(r)||"array"==e.type(r)?JSON.stringify(r):r)),t(n)}}}).call(this)},3029:function(e,t,n){(function(){var e=n(4801),r=["Account","AllergyIntolerance","BodySite","CarePlan","Claim","ClinicalImpression","Communication","CommunicationRequest","Composition","Condition","Contract","DetectedIssue","Device","DeviceUseRequest","DeviceUseStatement","DiagnosticOrder","DiagnosticReport","DocumentManifest","DocumentReference","Encounter","EnrollmentRequest","EpisodeOfCare","FamilyMemberHistory","Flag","Goal","ImagingObjectSelection","ImagingStudy","Immunization","ImmunizationRecommendation","List","Media","MedicationAdministration","MedicationDispense","MedicationOrder","MedicationStatement","NutritionOrder","Observation","Order","Procedure","ProcedureRequest","QuestionnaireResponse","ReferralRequest","RelatedPerson","RiskAssessment","Specimen","SupplyDelivery","SupplyRequest","VisionPrescription"];t.$WithPatient=e.$$Simple((function(e){var t=e.type;return e.patient&&("Patient"===t?(e.query=e.query||{},e.query._id=e.patient,e.id=e.patient):r.indexOf(t)>=0&&(e.query=e.query||{},e.query.patient=e.patient)),e}))}).call(this)},2723:function(e,t,n){(function(){var t=n(5454),r=/^#(.*)/,o=function(e){var n,o,i,a,u=e.cache,c=e.reference,s=e.bundle,l=c;if(!l.reference)return null;if(l.reference.match(r))return n=l.reference,o=e.resource,i=n.match(r)[1],(a=(o.contained||[]).filter((function(e){return(e.id||e._id)==i}))[0])&&{content:a}||null;var f=t.absoluteUrl(e.baseUrl,l.reference);return(s&&s.entry||[]).filter((function(e){return e.id===f}))[0]||(null!=u?u[f]:void 0)||null};e.exports.sync=o,e.exports.resolve=function(e){return function(n){var i=o(n),a=n.reference,u=n.defer();if(i){if(!n.defer)throw new Error("I need promise constructor 'adapter.defer' in adapter");return u.resolve(i),u.promise}if(!a)throw new Error("No reference found");if(a&&a.reference.match(r))throw new Error("Contained resource not found");return n.url=t.absoluteUrl(n.baseUrl,a.reference),n.data=null,e(n)}}}).call(this)},7921:function(e,t,n){(function(){var e=n(5454),r=e.type,o=e.assertArray,i=(e.assertObject,e.reduceMap),a=e.identity,u={$gt:"gt",$lt:"lt",$lte:"lte",$gte:"gte",$ge:"ge",$le:"le"},c={$asc:":asc",$desc:":desc",$exact:":exact",$missing:":missing",$null:":missing",$text:":text"},s=function(e,t){if("$sort"===e)return function(e){var t,n,i,a;for(o(e),i=[],t=0,n=e.length;t<n;t++)switch(a=e[t],r(a)){case"array":i.push({param:"_sort",value:a[0],modifier:":"+a[1]});break;case"string":i.push({param:"_sort",value:a});break;default:i.push(void 0)}return i}(t);if("$has"===e)return i(t,(function(e,t){var n,o;return n=t[0],o=t[1],e.concat(function(){switch(r(o)){case"array":return o.map((function(e){return{param:"_has",value:n+"="+e}}));case"string":return[{param:"_has",value:n+"="+o}]}}())}));if("$include"===e||"$revInclude"===e)return n=e,i(t,(function(e,t){var o,i;return o=t[0],i=t[1],e.concat(function(){switch(r(i)){case"array":return i.map((function(e){return{param:"$include"===n?"_include":"_revinclude",value:o+":"+e}}));case"string":return[{param:"$include"===n?"_include":"_revinclude",value:o+":"+i}]}}())}));var n,a,l;switch(r(t)){case"object":return a=e,i(l=t,(function(e,t){var n,i,f,p;return n=t[0],p=t[1],e.concat("$and"===n?o(p).reduce((function(e,t){return e.concat(s(a,t))}),[]):"$type"===n?[]:0===n.indexOf("$")?(i={param:a},"$or"===n?i.value=p:(u[n]&&(i.operator=u[n]),c[n]&&(i.modifier=c[n]),"object"===r(p)&&p.$or?i.value=p.$or:i.value=[p]),[i]):(l.$type&&(f=":"+l.$type),s(""+a+(f||"")+"."+n,p)))}));case"string":case"number":return[{param:e,value:[t]}];case"array":return[{param:e,value:[t.join("|")]}];default:throw"could not linearizeParams "+r(t)}},l=function(e){return i(e,(function(e,t){var n,r;return n=t[0],r=t[1],e.concat(s(n,r))}))},f=function(e){var t,n,r=["_include","_revinclude","_has"];return function(){var o,i,u,c;for(c=[],o=0,i=(u=l(e)).length;o<i;o++)t=u[o],n=-1===r.indexOf(t.param)?encodeURIComponent(t.value):t.value,c.push([t.param,t.modifier,"_has"==t.param?":":"=",t.operator,n].filter(a).join(""));return c}().join("&")};t._query=l,t.query=f;var p=n(4801);t.$SearchParams=p.$$Attr("url",(function(e){var t=e.url;return e.query?t+"?"+f(e.query):t})),t.$Paging=function(e){return function(t){var n=t.params||{};return t.since&&(n._since=t.since),t.count&&(n._count=t.count),t.params=n,e(t)}}}).call(this)},4249:function(e,t,n){(function(){n(5454);var e=n(4801),r=function(t,n){var o=function(e){return n&&t.includes("target.versionId")&&!e.target.versionId?n(e):(n&&n(e)+"/"||"")+function(e,t){var n,r,o=(r=t,0==(n=e.trim()).indexOf(":")?function(e,t){for(var n,r=e.split("||").map((function(e){return e.trim().substring(1)})),o=0;o<r.length;o++){var i=(n=t,r[o].split(".").reduce((function(e,t){return"versionId"===t&&e[t]?"_history/"+e[t]:null==e||null==e?null:e[t]}),n));if(i)return i}return null}(n,r):n);if((null==o||void 0===o)&&0==e.includes("target.versionId"))throw new Error("Parameter "+e+" is required: "+JSON.stringify(t));return o}(t,e)},i=e.Attribute("url",o);return i.slash=function(e){return r(e,o)},i};t.Path=r}).call(this)},5454:function(e,t,n){(function(){var e=n(651),r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;t.trim=function(e){return e?e.toString().replace(r,""):""};var o=function(e){return null==e&&void 0===e?String(e):{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"}[Object.prototype.toString.call(e)]};t.type=o,t.assertArray=function(e){if("array"!==o(e))throw"not array";return e};var i=function(e){if("object"!==o(e))throw"not object";return e};t.assertObject=i;var a=function(e,t,n){var r,o;return n||(n=[]),i(e),function(){var t;for(r in t=[],e)o=e[r],t.push([r,o]);return t}().reduce(t,n)};t.reduceMap=a,t.identity=function(e){return e};var u=function(){return Array.prototype.slice.call(arguments)};t.argsArray=u,t.mergeLists=function(){var t;return t=function(t,n){var r,o,i;for(r in o=e(!0,t),n)i=n[r],o[r]=(o[r]||[]).concat(i);return o},u.apply(null,arguments).reduce(t,{})},t.absoluteUrl=function(e,t){return t.match(/https?:\/\/./)?t:e+"/"+t},t.relativeUrl=function(e,t){return t.slice(t,e.length+1)===e+"/"?t.slice(e.length+1):t},t.resourceIdToUrl=function(e,t,n){return t=t.replace(/\/$/,""),(e=e.replace(/^\//,"")).indexOf("/")<0?t+"/"+n+"/"+e:0!==e.indexOf(t)?t+"/"+e:e};var c=function(e,t,n,r){var i;switch(o(n)){case"array":return t(n.map((function(t){return e(t,[n,r])})),r);case"object":return i=function(t,o){var i,a;return i=o[0],a=o[1],t[i]=e(a,[n].concat(r)),t},t(a(n,i,{}),r);default:return t(n,r)}};t.walk=c;var s=function(e,t,n){return t?c(s(e),e,t,n):function(t,n){return s(e,t,n)}};t.postwalk=s}).call(this)},6058:function(e,t,n){"use strict";var r=function(e){return o.isMemo(e)?u:c[e.$$typeof]||i},o=n(2594),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},u={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};c[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[o.Memo]=u;var s=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,o){if("string"!=typeof n){if(h){var i=d(n);i&&i!==h&&e(t,i,o)}var u=l(n);f&&(u=u.concat(f(n)));for(var c=r(t),v=r(n),y=0;y<u.length;++y){var m=u[y];if(!(a[m]||o&&o[m]||v&&v[m]||c&&c[m])){var g=p(n,m);try{s(t,m,g)}catch(e){}}}}return t}},2891:function(e,t,n){var r;e=n.nmd(e),function(){var o,i=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},a=function(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r},u=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},c=function(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e},s=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0},f=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i},p=function(e,t){return!(null==e||!e.length)&&x(e,t,0)>-1},d=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},h=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},y=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},m=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n},g=function(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n},b=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},w=function(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r},_=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1},x=function(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):_(e,O,n)},S=function(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1},O=function(e){return e!=e},E=function(e,t){var n=null==e?0:e.length;return n?$(e,t)/n:ee},k=function(e){return function(t){return null==t?o:t[e]}},j=function(e){return function(t){return null==e?o:e[t]}},C=function(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n},$=function(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==o&&(n=n===o?a:n+a)}return n},P=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},A=function(e){return e?e.slice(0,K(e)+1).replace(We,""):e},T=function(e){return function(t){return e(t)}},I=function(e,t){return h(t,(function(t){return e[t]}))},R=function(e,t){return e.has(t)},D=function(e,t){for(var n=-1,r=e.length;++n<r&&x(t,e[n],0)>-1;);return n},L=function(e,t){for(var n=e.length;n--&&x(t,e[n],0)>-1;);return n},M=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r},N=function(e){return"\\"+Ft[e]},U=function(e){return Lt.test(e)},B=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},z=function(e,t){return function(n){return e(t(n))}},F=function(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==G||(e[n]=G,i[o++]=n)}return i},V=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},H=function(e){return U(e)?function(e){for(var t=Rt.lastIndex=0;Rt.test(e);)++t;return t}(e):an(e)},W=function(e){return U(e)?e.match(Rt)||[]:e.split("")},K=function(e){for(var t=e.length;t--&&Ke.test(e.charAt(t)););return t},q="Expected a function",Z="__lodash_hash_undefined__",G="__lodash_placeholder__",Q=32,Y=128,J=1/0,X=9007199254740991,ee=NaN,te=4294967295,ne=[["ary",Y],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",Q],["partialRight",64],["rearg",256]],re="[object Arguments]",oe="[object Array]",ie="[object Boolean]",ae="[object Date]",ue="[object Error]",ce="[object Function]",se="[object GeneratorFunction]",le="[object Map]",fe="[object Number]",pe="[object Object]",de="[object Promise]",he="[object RegExp]",ve="[object Set]",ye="[object String]",me="[object Symbol]",ge="[object WeakMap]",be="[object ArrayBuffer]",we="[object DataView]",_e="[object Float32Array]",xe="[object Float64Array]",Se="[object Int8Array]",Oe="[object Int16Array]",Ee="[object Int32Array]",ke="[object Uint8Array]",je="[object Uint8ClampedArray]",Ce="[object Uint16Array]",$e="[object Uint32Array]",Pe=/\b__p \+= '';/g,Ae=/\b(__p \+=) '' \+/g,Te=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ie=/&(?:amp|lt|gt|quot|#39);/g,Re=/[&<>"']/g,De=RegExp(Ie.source),Le=RegExp(Re.source),Me=/<%-([\s\S]+?)%>/g,Ne=/<%([\s\S]+?)%>/g,Ue=/<%=([\s\S]+?)%>/g,Be=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ze=/^\w*$/,Fe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ve=/[\\^$.*+?()[\]{}|]/g,He=RegExp(Ve.source),We=/^\s+/,Ke=/\s/,qe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ze=/\{\n\/\* \[wrapped with (.+)\] \*/,Ge=/,? & /,Qe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ye=/[()=,{}\[\]\/\s]/,Je=/\\(\\)?/g,Xe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,et=/\w*$/,tt=/^[-+]0x[0-9a-f]+$/i,nt=/^0b[01]+$/i,rt=/^\[object .+?Constructor\]$/,ot=/^0o[0-7]+$/i,it=/^(?:0|[1-9]\d*)$/,at=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ut=/($^)/,ct=/['\n\r\u2028\u2029\\]/g,st="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",lt="a-z\\xdf-\\xf6\\xf8-\\xff",ft="A-Z\\xc0-\\xd6\\xd8-\\xde",pt="\\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",dt="["+pt+"]",ht="["+st+"]",vt="\\d+",yt="["+lt+"]",mt="[^\ud800-\udfff"+pt+vt+"\\u2700-\\u27bf"+lt+ft+"]",gt="\ud83c[\udffb-\udfff]",bt="[^\ud800-\udfff]",wt="(?:\ud83c[\udde6-\uddff]){2}",_t="[\ud800-\udbff][\udc00-\udfff]",xt="["+ft+"]",St="(?:"+yt+"|"+mt+")",Ot="(?:"+xt+"|"+mt+")",Et="(?:['’](?:d|ll|m|re|s|t|ve))?",kt="(?:['’](?:D|LL|M|RE|S|T|VE))?",jt="(?:"+ht+"|"+gt+")?",Ct="[\\ufe0e\\ufe0f]?",$t=Ct+jt+"(?:\\u200d(?:"+[bt,wt,_t].join("|")+")"+Ct+jt+")*",Pt="(?:"+["[\\u2700-\\u27bf]",wt,_t].join("|")+")"+$t,At="(?:"+[bt+ht+"?",ht,wt,_t,"[\ud800-\udfff]"].join("|")+")",Tt=RegExp("['’]","g"),It=RegExp(ht,"g"),Rt=RegExp(gt+"(?="+gt+")|"+At+$t,"g"),Dt=RegExp([xt+"?"+yt+"+"+Et+"(?="+[dt,xt,"$"].join("|")+")",Ot+"+"+kt+"(?="+[dt,xt+St,"$"].join("|")+")",xt+"?"+St+"+"+Et,xt+"+"+kt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vt,Pt].join("|"),"g"),Lt=RegExp("[\\u200d\ud800-\udfff"+st+"\\ufe0e\\ufe0f]"),Mt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ut=-1,Bt={};Bt[_e]=Bt[xe]=Bt[Se]=Bt[Oe]=Bt[Ee]=Bt[ke]=Bt[je]=Bt[Ce]=Bt[$e]=!0,Bt[re]=Bt[oe]=Bt[be]=Bt[ie]=Bt[we]=Bt[ae]=Bt[ue]=Bt[ce]=Bt[le]=Bt[fe]=Bt[pe]=Bt[he]=Bt[ve]=Bt[ye]=Bt[ge]=!1;var zt={};zt[re]=zt[oe]=zt[be]=zt[we]=zt[ie]=zt[ae]=zt[_e]=zt[xe]=zt[Se]=zt[Oe]=zt[Ee]=zt[le]=zt[fe]=zt[pe]=zt[he]=zt[ve]=zt[ye]=zt[me]=zt[ke]=zt[je]=zt[Ce]=zt[$e]=!0,zt[ue]=zt[ce]=zt[ge]=!1;var Ft={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vt=parseFloat,Ht=parseInt,Wt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Kt="object"==typeof self&&self&&self.Object===Object&&self,qt=Wt||Kt||Function("return this")(),Zt=t&&!t.nodeType&&t,Gt=Zt&&e&&!e.nodeType&&e,Qt=Gt&&Gt.exports===Zt,Yt=Qt&&Wt.process,Jt=function(){try{return Gt&&Gt.require&&Gt.require("util").types||Yt&&Yt.binding&&Yt.binding("util")}catch(e){}}(),Xt=Jt&&Jt.isArrayBuffer,en=Jt&&Jt.isDate,tn=Jt&&Jt.isMap,nn=Jt&&Jt.isRegExp,rn=Jt&&Jt.isSet,on=Jt&&Jt.isTypedArray,an=k("length"),un=j({À:"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"}),cn=j({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),sn=j({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),ln=function e(t){var n,r,j=function(e){if(Po(e)&&!Pu(e)&&!l(e,lt)){if(l(e,st))return e;if(bi.call(e,"__wrapped__"))return no(e)}return new st(e)},Ke=function(){},st=function(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o},lt=function(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]},ft=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},pt=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},dt=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},ht=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new dt;++t<n;)this.add(e[t])},vt=function(e){var t=this.__data__=new pt(e);this.size=t.size},yt=function(e,t){var n=Pu(e),r=!n&&$u(e),o=!n&&!r&&Tu(e),i=!n&&!r&&!o&&Mu(e),a=n||r||o||i,u=a?P(e.length,pi):[],c=u.length;for(var s in e)!t&&!bi.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Br(s,c))||u.push(s);return u},mt=function(e){var t=e.length;return t?e[Cn(0,t-1)]:o},gt=function(e,t){return Xr(or(e),jt(t,0,e.length))},bt=function(e){return Xr(or(e))},wt=function(e,t,n){(n!==o&&!xo(e[t],n)||n===o&&!(t in e))&&Et(e,t,n)},_t=function(e,t,n){var r=e[t];bi.call(e,t)&&xo(r,n)&&(n!==o||t in e)||Et(e,t,n)},xt=function(e,t){for(var n=e.length;n--;)if(xo(e[n][0],t))return n;return-1},St=function(e,t,n,r){return ga(e,(function(e,o,i){t(r,e,n(e),i)})),r},Ot=function(e,t){return e&&ir(t,Ho(t),e)},Et=function(e,t,n){"__proto__"==t&&Mi?Mi(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},kt=function(e,t){for(var n=-1,r=t.length,i=ii(r),a=null==e;++n<r;)i[n]=a?o:Fo(e,t[n]);return i},jt=function(e,t,n){return e==e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e},Ct=function(e,t,n){var r=n.length;if(null==e)return!r;for(e=li(e);r--;){var i=n[r],a=t[i],u=e[i];if(u===o&&!(i in e)||!a(u))return!1}return!0},$t=function(e,t,n){if("function"!=typeof e)throw new di(q);return za((function(){e.apply(o,n)}),t)},Pt=function(e,t,n,r){var o=-1,i=p,a=!0,u=e.length,c=[],s=t.length;if(!u)return c;n&&(t=h(t,T(n))),r?(i=d,a=!1):t.length>=200&&(i=R,a=!1,t=new ht(t));e:for(;++o<u;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var v=s;v--;)if(t[v]===f)continue e;c.push(l)}else i(t,f,r)||c.push(l)}return c},At=function(e,t){var n=!0;return ga(e,(function(e,r,o){return n=!!t(e,r,o)})),n},Rt=function(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],u=t(a);if(null!=u&&(c===o?u==u&&!Ro(u):n(u,c)))var c=u,s=a}return s},Lt=function(e,t){var n=[];return ga(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n},Ft=function(e,t){return e&&_a(e,t,Ho)},Wt=function(e,t){return e&&xa(e,t,Ho)},Kt=function(e,t){return f(t,(function(t){return ko(e[t])}))},Zt=function(e,t){for(var n=0,r=(t=Qn(t,e)).length;null!=e&&n<r;)e=e[eo(t[n++])];return n&&n==r?e:o},Gt=function(e,t,n){var r=t(e);return Pu(e)?r:y(r,n(e))},Yt=function(e){return null==e?e===o?"[object Undefined]":"[object Null]":Li&&Li in li(e)?function(e){var t=bi.call(e,Li),n=e[Li];try{e[Li]=o;var r=!0}catch(e){}var i=xi.call(e);return r&&(t?e[Li]=n:delete e[Li]),i}(e):(t=e,xi.call(t));var t},Jt=function(e,t){return e>t},an=function(e,t){return null!=e&&bi.call(e,t)},fn=function(e,t){return null!=e&&t in li(e)},pn=function(e,t,n){for(var r=n?d:p,i=e[0].length,a=e.length,u=a,c=ii(a),s=1/0,l=[];u--;){var f=e[u];u&&t&&(f=h(f,T(t))),s=Gi(f.length,s),c[u]=!n&&(t||i>=120&&f.length>=120)?new ht(u&&f):o}f=e[0];var v=-1,y=c[0];e:for(;++v<i&&l.length<s;){var m=f[v],g=t?t(m):m;if(m=n||0!==m?m:0,!(y?R(y,g):r(l,g,n))){for(u=a;--u;){var b=c[u];if(!(b?R(b,g):r(e[u],g,n)))continue e}y&&y.push(g),l.push(m)}}return l},dn=function(e,t,n){var r=null==(e=Zr(e,t=Qn(t,e)))?e:e[eo(uo(t))];return null==r?o:i(r,e,n)},hn=function(e){return Po(e)&&Yt(e)==re},vn=function(e,t,n,r){var i=n.length,a=i,u=!r;if(null==e)return!a;for(e=li(e);i--;){var c=n[i];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<a;){var s=(c=n[i])[0],l=e[s],f=c[1];if(u&&c[2]){if(l===o&&!(s in e))return!1}else{var p=new vt;if(r)var d=r(l,f,s,e,t,p);if(!(d===o?Sa(f,l,3,r,p):d))return!1}}return!0},yn=function(e){return!(!$o(e)||(t=e,_i&&_i in t))&&(ko(e)?Ei:rt).test(to(e));var t},mn=function(e){return"function"==typeof e?e:null==e?Jo:"object"==typeof e?Pu(e)?xn(e[0],e[1]):_n(e):ni(e)},gn=function(e){if(!Hr(e))return qi(e);var t=[];for(var n in li(e))bi.call(e,n)&&"constructor"!=n&&t.push(n);return t},bn=function(e,t){return e<t},wn=function(e,t){var n=-1,r=So(e)?ii(e.length):[];return ga(e,(function(e,o,i){r[++n]=t(e,o,i)})),r},_n=function(e){var t=Dr(e);return 1==t.length&&t[0][2]?Kr(t[0][0],t[0][1]):function(n){return n===e||vn(n,e,t)}},xn=function(e,t){return Fr(e)&&Wr(t)?Kr(eo(e),t):function(n){var r=Fo(n,e);return r===o&&r===t?Vo(n,e):Sa(t,r,3)}},Sn=function(e,t){var n=e.length;if(n)return Br(t+=t<0?n:0,n)?e[t]:o},On=function(e,t,n){t=t.length?h(t,(function(e){return Pu(e)?function(t){return Zt(t,1===e.length?e[0]:e)}:e})):[Jo];var r=-1;return t=h(t,T(Ir())),function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,u=n.length;++r<a;){var c=tr(o[r],i[r]);if(c)return r>=u?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(wn(e,(function(e,n,o){return{criteria:h(t,(function(t){return t(e)})),index:++r,value:e}})))},En=function(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],u=Zt(e,a);n(u,a)&&In(i,Qn(a,e),u)}return i},kn=function(e,t,n,r){var o=r?S:x,i=-1,a=t.length,u=e;for(e===t&&(t=or(t)),n&&(u=h(e,T(n)));++i<a;)for(var c=0,s=t[i],l=n?n(s):s;(c=o(u,l,c,r))>-1;)u!==e&&Ii.call(u,c,1),Ii.call(e,c,1);return e},jn=function(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;Br(o)?Ii.call(e,o,1):Fn(e,o)}}return e},Cn=function(e,t){return e+Fi(Ji()*(t-e+1))},$n=function(e,t){var n="";if(!e||t<1||t>X)return n;do{t%2&&(n+=e),(t=Fi(t/2))&&(e+=e)}while(t);return n},Pn=function(e,t){return Fa(qr(e,t,Jo),e+"")},An=function(e){return mt(qo(e))},Tn=function(e,t){var n=qo(e);return Xr(n,jt(t,0,n.length))},In=function(e,t,n,r){if(!$o(e))return e;for(var i=-1,a=(t=Qn(t,e)).length,u=a-1,c=e;null!=c&&++i<a;){var s=eo(t[i]),l=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(i!=u){var f=c[s];(l=r?r(f,s,c):o)===o&&(l=$o(f)?f:Br(t[i+1])?[]:{})}_t(c,s,l),c=c[s]}return e},Rn=function(e){return Xr(qo(e))},Dn=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=ii(o);++r<o;)i[r]=e[r+t];return i},Ln=function(e,t){var n;return ga(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n},Mn=function(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!Ro(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return Nn(e,t,Jo,n)},Nn=function(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var u=(t=n(t))!=t,c=null===t,s=Ro(t),l=t===o;i<a;){var f=Fi((i+a)/2),p=n(e[f]),d=p!==o,h=null===p,v=p==p,y=Ro(p);if(u)var m=r||v;else m=l?v&&(r||d):c?v&&d&&(r||!h):s?v&&d&&!h&&(r||!y):!h&&!y&&(r?p<=t:p<t);m?i=f+1:a=f}return Gi(a,4294967294)},Un=function(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],u=t?t(a):a;if(!n||!xo(u,c)){var c=u;i[o++]=0===a?0:a}}return i},Bn=function(e){return"number"==typeof e?e:Ro(e)?ee:+e},zn=function(e,t,n){var r=-1,o=p,i=e.length,a=!0,u=[],c=u;if(n)a=!1,o=d;else if(i>=200){var s=t?null:Aa(e);if(s)return V(s);a=!1,o=R,c=new ht}else c=t?[]:u;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var h=c.length;h--;)if(c[h]===f)continue e;t&&c.push(f),u.push(l)}else o(c,f,n)||(c!==u&&c.push(f),u.push(l))}return u},Fn=function(e,t){return null==(e=Zr(e,t=Qn(t,e)))||delete e[eo(uo(t))]},Vn=function(e,t,n,r){return In(e,t,n(Zt(e,t)),r)},Hn=function(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?Dn(e,r?0:i,r?i+1:o):Dn(e,r?i+1:0,r?o:i)},Wn=function(e,t){var n=e;return l(n,lt)&&(n=n.value()),m(t,(function(e,t){return t.func.apply(t.thisArg,y([e],t.args))}),n)},Kn=function(e,t,n){var r=e.length;if(r<2)return r?zn(e[0]):[];for(var o=-1,i=ii(r);++o<r;)for(var a=e[o],u=-1;++u<r;)u!=o&&(i[o]=Pt(i[o]||a,e[u],t,n));return zn(wa(i,1),t,n)},qn=function(e,t,n){for(var r=-1,i=e.length,a=t.length,u={};++r<i;){var c=r<a?t[r]:o;n(u,e[r],c)}return u},Zn=function(e){return Oo(e)?e:[]},Gn=function(e){return"function"==typeof e?e:Jo},Qn=function(e,t){return Pu(e)?e:Fr(e,t)?[e]:Va(zo(e))},Yn=function(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:Dn(e,t,n)},Jn=function(e,t){if(t)return e.slice();var n=e.length,r=$i?$i(n):new e.constructor(n);return e.copy(r),r},Xn=function(e){var t=new e.constructor(e.byteLength);return new Ci(t).set(new Ci(e)),t},er=function(e,t){var n=t?Xn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},tr=function(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=Ro(e),u=t!==o,c=null===t,s=t==t,l=Ro(t);if(!c&&!l&&!a&&e>t||a&&u&&s&&!c&&!l||r&&u&&s||!n&&s||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||c&&n&&i||!u&&i||!s)return-1}return 0},nr=function(e,t,n,r){for(var o=-1,i=e.length,a=n.length,u=-1,c=t.length,s=Zi(i-a,0),l=ii(c+s),f=!r;++u<c;)l[u]=t[u];for(;++o<a;)(f||o<i)&&(l[n[o]]=e[o]);for(;s--;)l[u++]=e[o++];return l},rr=function(e,t,n,r){for(var o=-1,i=e.length,a=-1,u=n.length,c=-1,s=t.length,l=Zi(i-u,0),f=ii(l+s),p=!r;++o<l;)f[o]=e[o];for(var d=o;++c<s;)f[d+c]=t[c];for(;++a<u;)(p||o<i)&&(f[d+n[a]]=e[o++]);return f},or=function(e,t){var n=-1,r=e.length;for(t||(t=ii(r));++n<r;)t[n]=e[n];return t},ir=function(e,t,n,r){var i=!n;n||(n={});for(var a=-1,u=t.length;++a<u;){var c=t[a],s=r?r(n[c],e[c],c,n,e):o;s===o&&(s=e[c]),i?Et(n,c,s):_t(n,c,s)}return n},ar=function(e,t){return function(n,r){var o=Pu(n)?a:St,i=t?t():{};return o(n,e,Ir(r,2),i)}},ur=function(e){return Pn((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,u=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,u&&zr(n[0],n[1],u)&&(a=i<3?o:a,i=1),t=li(t);++r<i;){var c=n[r];c&&e(t,c,r,a)}return t}))},cr=function(e,t){return function(n,r){if(null==n)return n;if(!So(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=li(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}},sr=function(e){return function(t,n,r){for(var o=-1,i=li(t),a=r(t),u=a.length;u--;){var c=a[e?u:++o];if(!1===n(i[c],c,i))break}return t}},lr=function(e){return function(t){var n=U(t=zo(t))?W(t):o,r=n?n[0]:t.charAt(0),i=n?Yn(n,1).join(""):t.slice(1);return r[e]()+i}},fr=function(e){return function(t){return m(Qo(Go(t).replace(Tt,"")),e,"")}},pr=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=ya(e.prototype),r=e.apply(n,t);return $o(r)?r:n}},dr=function(e){return function(t,n,r){var i=li(t);if(!So(t)){var a=Ir(n,3);t=Ho(t),n=function(e){return a(i[e],e,i)}}var u=e(t,n,r);return u>-1?i[a?t[u]:u]:o}},hr=function(e){return Cr((function(t){var n=t.length,r=n,i=st.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new di(q);if(i&&!u&&"wrapper"==Ar(a))var u=new st([],!0)}for(r=u?r:n;++r<n;){var c=Ar(a=t[r]),s="wrapper"==c?Ia(a):o;u=s&&Vr(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?u[Ar(s[0])].apply(u,s[3]):1==a.length&&Vr(a)?u[c]():u.thru(a)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Pu(r))return u.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))},vr=function(e,t){return function(n,r){return o=n,i=e,a=t(r),u={},Ft(o,(function(e,t,n){i(u,a(e),t,n)})),u;var o,i,a,u}},yr=function(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=ja(n),r=ja(r)):(n=Bn(n),r=Bn(r)),i=e(n,r)}return i}},mr=function(e){return Cr((function(t){return t=h(t,T(Ir())),Pn((function(n){var r=this;return e(t,(function(e){return i(e,r,n)}))}))}))},gr=function(e,t){var n=(t=t===o?" ":ja(t)).length;if(n<2)return n?$n(t,e):t;var r=$n(t,zi(e/H(t)));return U(t)?Yn(W(r),0,e).join(""):r.slice(0,e)},br=function(e){return function(t,n,r){return r&&"number"!=typeof r&&zr(t,n,r)&&(n=r=o),t=Lo(t),n===o?(n=t,t=0):n=Lo(n),function(e,t,n,r){for(var o=-1,i=Zi(zi((t-e)/(n||1)),0),a=ii(i);i--;)a[r?i:++o]=e,e+=n;return a}(t,n,r=r===o?t<n?1:-1:Lo(r),e)}},wr=function(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Uo(t),n=Uo(n)),e(t,n)}},_r=function(e,t,n,r,i,a,u,c,s,l){var f=8&t;t|=f?Q:64,4&(t&=~(f?64:Q))||(t&=-4);var p=[e,t,i,f?a:o,f?u:o,f?o:a,f?o:u,c,s,l],d=n.apply(o,p);return Vr(e)&&Ba(d,p),d.placeholder=r,Yr(d,e,t)},xr=function(e){var t=si[e];return function(e,n){if(e=Uo(e),(n=null==n?0:Gi(Mo(n),292))&&Wi(e)){var r=(zo(e)+"e").split("e");return+((r=(zo(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}},Sr=function(e){return function(t){var n,r,o,i,a,u=La(t);return u==le?B(t):u==ve?(o=t,i=-1,a=Array(o.size),o.forEach((function(e){a[++i]=[e,e]})),a):(n=t,r=e(t),h(r,(function(e){return[e,n[e]]})))}},Or=function(e,t,n,r,a,u,c,s){var f=2&t;if(!f&&"function"!=typeof e)throw new di(q);var p=r?r.length:0;if(p||(t&=-97,r=a=o),c=c===o?c:Zi(Mo(c),0),s=s===o?s:Mo(s),p-=a?a.length:0,64&t){var d=r,h=a;r=a=o}var v,y,m,g,b=f?o:Ia(e),w=[e,t,n,r,a,d,h,u,c,s];if(b&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==Y&&8==n||r==Y&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?nr(c,u,t[4]):u,e[4]=c?F(e[3],G):t[4]}(u=t[5])&&(c=e[5],e[5]=c?rr(c,u,t[6]):u,e[6]=c?F(e[5],G):t[6]),(u=t[7])&&(e[7]=u),r&Y&&(e[8]=null==e[8]?t[8]:Gi(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(w,b),e=w[0],t=w[1],n=w[2],r=w[3],a=w[4],!(s=w[9]=w[9]===o?f?0:e.length:Zi(w[9]-p,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?(y=t,m=s,g=pr(v=e),function e(){for(var t=arguments.length,n=ii(t),r=t,a=Tr(e);r--;)n[r]=arguments[r];var u=t<3&&n[0]!==a&&n[t-1]!==a?[]:F(n,a);return(t-=u.length)<m?_r(v,y,Pa,e.placeholder,o,n,u,o,o,m-t):i(this&&this!==qt&&l(this,e)?g:v,this,n)}):t!=Q&&33!=t||a.length?Pa.apply(o,w):function(e,t,n,r){var o=1&t,a=pr(e);return function t(){for(var u=-1,c=arguments.length,s=-1,f=r.length,p=ii(f+c),d=this&&this!==qt&&l(this,t)?a:e;++s<f;)p[s]=r[s];for(;c--;)p[s++]=arguments[++u];return i(d,o?n:this,p)}}(e,t,n,r);else var _=function(e,t,n){var r=1&t,o=pr(e);return function t(){return(this&&this!==qt&&l(this,t)?o:e).apply(r?n:this,arguments)}}(e,t,n);return Yr((b?Ea:Ba)(_,w),e,t)},Er=function(e,t,n,r){return e===o||xo(e,yi[n])&&!bi.call(r,n)?t:e},kr=function(e){return To(e)?o:e},jr=function(e,t,n,r,i,a){var u=1&n,c=e.length,s=t.length;if(c!=s&&!(u&&s>c))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var p=-1,d=!0,h=2&n?new ht:o;for(a.set(e,t),a.set(t,e);++p<c;){var v=e[p],y=t[p];if(r)var m=u?r(y,v,p,t,e,a):r(v,y,p,e,t,a);if(m!==o){if(m)continue;d=!1;break}if(h){if(!b(t,(function(e,t){if(!R(h,t)&&(v===e||i(v,e,n,r,a)))return h.push(t)}))){d=!1;break}}else if(v!==y&&!i(v,y,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d},Cr=function(e){return Fa(qr(e,o,io),e+"")},$r=function(e){return Gt(e,Ho,Ra)},Pr=function(e){return Gt(e,Wo,Da)},Ar=function(e){for(var t=e.name+"",n=ua[t],r=bi.call(ua,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t},Tr=function(e){return(bi.call(j,"placeholder")?j:e).placeholder},Ir=function(){var e=j.iteratee||Xo;return e=e===Xo?mn:e,arguments.length?e(arguments[0],arguments[1]):e},Rr=function(e,t){var n,r,o=e.__data__;return("string"==(r=v(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map},Dr=function(e){for(var t=Ho(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Wr(o)]}return t},Lr=function(e,t){var n,r=null==(n=e)?o:n[t];return yn(r)?r:o},Mr=function(e,t,n){for(var r=-1,o=(t=Qn(t,e)).length,i=!1;++r<o;){var a=eo(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Co(o)&&Br(a,o)&&(Pu(e)||$u(e))},Nr=function(e){return"function"!=typeof e.constructor||Hr(e)?{}:ya(Pi(e))},Ur=function(e){return Pu(e)||$u(e)||!!(Ri&&e&&e[Ri])},Br=function(e,t){var n=void 0===e?"undefined":v(e);return!!(t=null==t?X:t)&&("number"==n||"symbol"!=n&&it.test(e))&&e>-1&&e%1==0&&e<t},zr=function(e,t,n){if(!$o(n))return!1;var r=void 0===t?"undefined":v(t);return!!("number"==r?So(n)&&Br(t,n.length):"string"==r&&t in n)&&xo(n[t],e)},Fr=function(e,t){if(Pu(e))return!1;var n=void 0===e?"undefined":v(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ro(e))||ze.test(e)||!Be.test(e)||null!=t&&e in li(t)},Vr=function(e){var t=Ar(e),n=j[t];if("function"!=typeof n||!(t in lt.prototype))return!1;if(e===n)return!0;var r=Ia(n);return!!r&&e===r[0]},Hr=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||yi)},Wr=function(e){return e==e&&!$o(e)},Kr=function(e,t){return function(n){return null!=n&&n[e]===t&&(t!==o||e in li(n))}},qr=function(e,t,n){return t=Zi(t===o?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=Zi(r.length-t,0),u=ii(a);++o<a;)u[o]=r[t+o];o=-1;for(var c=ii(t+1);++o<t;)c[o]=r[o];return c[t]=n(u),i(e,this,c)}},Zr=function(e,t){return t.length<2?e:Zt(e,Dn(t,0,-1))},Gr=function(e,t){for(var n=e.length,r=Gi(t.length,n),i=or(e);r--;){var a=t[r];e[r]=Br(a,n)?i[a]:o}return e},Qr=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},Yr=function(e,t,n){var r,o,i,a=t+"";return Fa(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(qe,"{\n/* [wrapped with "+t+"] */\n")}(a,(o=(r=a.match(Ze))?r[1].split(Ge):[],i=n,u(ne,(function(e){var t="_."+e[0];i&e[1]&&!p(o,t)&&o.push(t)})),o.sort())))},Jr=function(e){var t=0,n=0;return function(){var r=Qi(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}},Xr=function(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var a=Cn(n,i),u=e[a];e[a]=e[n],e[n]=u}return e.length=t,e},eo=function(e){if("string"==typeof e||Ro(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},to=function(e){if(null!=e){try{return gi.call(e)}catch(e){}try{return e+""}catch(e){}}return""},no=function(e){if(l(e,lt))return e.clone();var t=new st(e.__wrapped__,e.__chain__);return t.__actions__=or(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t},ro=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Mo(n);return o<0&&(o=Zi(r+o,0)),_(e,Ir(t,3),o)},oo=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=Mo(n),i=n<0?Zi(r+i,0):Gi(i,r-1)),_(e,Ir(t,3),i,!0)},io=function(e){return null!=e&&e.length?wa(e,1):[]},ao=function(e){return e&&e.length?e[0]:o},uo=function(e){var t=null==e?0:e.length;return t?e[t-1]:o},co=function(e,t){return e&&e.length&&t&&t.length?kn(e,t):e},so=function(e){return null==e?e:Xi.call(e)},lo=function(e){if(!e||!e.length)return[];var t=0;return e=f(e,(function(e){if(Oo(e))return t=Zi(e.length,t),!0})),P(t,(function(t){return h(e,k(t))}))},fo=function(e,t){if(!e||!e.length)return[];var n=lo(e);return null==t?n:h(n,(function(e){return i(t,o,e)}))},po=function(e){var t=j(e);return t.__chain__=!0,t},ho=function(e,t){return t(e)},vo=function(e,t){return(Pu(e)?u:ga)(e,Ir(t,3))},yo=function(e,t){return(Pu(e)?c:ba)(e,Ir(t,3))},mo=function(e,t){return(Pu(e)?h:wn)(e,Ir(t,3))},go=function(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Or(e,Y,o,o,o,o,t)},bo=function(e,t){var n;if("function"!=typeof t)throw new di(q);return e=Mo(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}},wo=function(e,t,n){var r,i,a,u,c,s,l=function(t){var n=r,a=i;return r=i=o,v=t,u=e.apply(a,n)},f=function(e){return v=e,c=za(b,t),y?l(e):u},p=function(e){var n=e-s;return s===o||n>=t||n<0||m&&e-v>=a},d=function(e){return c=o,g&&r?l(e):(r=i=o,u)},h=function(){var e=yu(),n=p(e);if(r=arguments,i=this,s=e,n){if(c===o)return f(s);if(m)return $a(c),c=za(b,t),l(s)}return c===o&&(c=za(b,t)),u},v=0,y=!1,m=!1,g=!0;if("function"!=typeof e)throw new di(q);function b(){var e,n,r=yu();if(p(r))return d(r);c=za(b,(n=t-((e=r)-s),m?Gi(n,a-(e-v)):n))}return t=Uo(t)||0,$o(n)&&(y=!!n.leading,a=(m="maxWait"in n)?Zi(Uo(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g),h.cancel=function(){c!==o&&$a(c),v=0,r=s=i=c=o},h.flush=function(){return c===o?u:d(yu())},h},_o=function(e){if("function"!=typeof e)throw new di(q);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}},xo=function(e,t){return e===t||e!=e&&t!=t},So=function(e){return null!=e&&Co(e.length)&&!ko(e)},Oo=function(e){return Po(e)&&So(e)},Eo=function(e){if(!Po(e))return!1;var t=Yt(e);return t==ue||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!To(e)},ko=function(e){if(!$o(e))return!1;var t=Yt(e);return t==ce||t==se||"[object AsyncFunction]"==t||"[object Proxy]"==t},jo=function(e){return"number"==typeof e&&e==Mo(e)},Co=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=X},$o=function(e){var t=void 0===e?"undefined":v(e);return null!=e&&("object"==t||"function"==t)},Po=function(e){return null!=e&&"object"==typeof e},Ao=function(e){return"number"==typeof e||Po(e)&&Yt(e)==fe},To=function(e){if(!Po(e)||Yt(e)!=pe)return!1;var t=Pi(e);if(null===t)return!0;var n=bi.call(t,"constructor")&&t.constructor;return"function"==typeof n&&l(n,n)&&gi.call(n)==Si},Io=function(e){return"string"==typeof e||!Pu(e)&&Po(e)&&Yt(e)==ye},Ro=function(e){return"symbol"==(void 0===e?"undefined":v(e))||Po(e)&&Yt(e)==me},Do=function(e){if(!e)return[];if(So(e))return Io(e)?W(e):or(e);if(Di&&e[Di])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Di]());var t=La(e);return(t==le?B:t==ve?V:qo)(e)},Lo=function(e){return e?(e=Uo(e))===J||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},Mo=function(e){var t=Lo(e),n=t%1;return t==t?n?t-n:t:0},No=function(e){return e?jt(Mo(e),0,te):0},Uo=function(e){if("number"==typeof e)return e;if(Ro(e))return ee;if($o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=$o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=A(e);var n=nt.test(e);return n||ot.test(e)?Ht(e.slice(2),n?2:8):tt.test(e)?ee:+e},Bo=function(e){return ir(e,Wo(e))},zo=function(e){return null==e?"":ja(e)},Fo=function(e,t,n){var r=null==e?o:Zt(e,t);return r===o?n:r},Vo=function(e,t){return null!=e&&Mr(e,t,fn)},Ho=function(e){return So(e)?yt(e):gn(e)},Wo=function(e){return So(e)?yt(e,!0):function(e){if(!$o(e))return function(e){var t=[];if(null!=e)for(var n in li(e))t.push(n);return t}(e);var t=Hr(e),n=[];for(var r in e)("constructor"!=r||!t&&bi.call(e,r))&&n.push(r);return n}(e)},Ko=function(e,t){if(null==e)return{};var n=h(Pr(e),(function(e){return[e]}));return t=Ir(t),En(e,n,(function(e,n){return t(e,n[0])}))},qo=function(e){return null==e?[]:I(e,Ho(e))},Zo=function(e){return sc(zo(e).toLowerCase())},Go=function(e){return(e=zo(e))&&e.replace(at,un).replace(It,"")},Qo=function(e,t,n){return e=zo(e),(t=n?o:t)===o?(r=e,Mt.test(r)?e.match(Dt)||[]:e.match(Qe)||[]):e.match(t)||[];var r},Yo=function(e){return function(){return e}},Jo=function(e){return e},Xo=function(e){return mn("function"==typeof e?e:ma(e,1))},ei=function(e,t,n){var r=Ho(t),o=Kt(t,r);null!=n||$o(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=Kt(t,Ho(t)));var i=!($o(n)&&"chain"in n&&!n.chain),a=ko(e);return u(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=or(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,y([this.value()],arguments))})})),e},ti=function(){},ni=function(e){return Fr(e)?k(eo(e)):(t=e,function(e){return Zt(e,t)});var t},ri=function(){return[]},oi=function(){return!1},ii=(t=null==t?qt:ln.defaults(qt.Object(),t,ln.pick(qt,Nt))).Array,ai=t.Date,ui=t.Error,ci=t.Function,si=t.Math,li=t.Object,fi=t.RegExp,pi=t.String,di=t.TypeError,hi=ii.prototype,vi=ci.prototype,yi=li.prototype,mi=t["__core-js_shared__"],gi=vi.toString,bi=yi.hasOwnProperty,wi=0,_i=(n=/[^.]+$/.exec(mi&&mi.keys&&mi.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",xi=yi.toString,Si=gi.call(li),Oi=qt._,Ei=fi("^"+gi.call(bi).replace(Ve,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ki=Qt?t.Buffer:o,ji=t.Symbol,Ci=t.Uint8Array,$i=ki?ki.allocUnsafe:o,Pi=z(li.getPrototypeOf,li),Ai=li.create,Ti=yi.propertyIsEnumerable,Ii=hi.splice,Ri=ji?ji.isConcatSpreadable:o,Di=ji?ji.iterator:o,Li=ji?ji.toStringTag:o,Mi=function(){try{var e=Lr(li,"defineProperty");return e({},"",{}),e}catch(e){}}(),Ni=t.clearTimeout!==qt.clearTimeout&&t.clearTimeout,Ui=ai&&ai.now!==qt.Date.now&&ai.now,Bi=t.setTimeout!==qt.setTimeout&&t.setTimeout,zi=si.ceil,Fi=si.floor,Vi=li.getOwnPropertySymbols,Hi=ki?ki.isBuffer:o,Wi=t.isFinite,Ki=hi.join,qi=z(li.keys,li),Zi=si.max,Gi=si.min,Qi=ai.now,Yi=t.parseInt,Ji=si.random,Xi=hi.reverse,ea=Lr(t,"DataView"),ta=Lr(t,"Map"),na=Lr(t,"Promise"),ra=Lr(t,"Set"),oa=Lr(t,"WeakMap"),ia=Lr(li,"create"),aa=oa&&new oa,ua={},ca=to(ea),sa=to(ta),la=to(na),fa=to(ra),pa=to(oa),da=ji?ji.prototype:o,ha=da?da.valueOf:o,va=da?da.toString:o,ya=(r=function(){},function(e){if(!$o(e))return{};if(Ai)return Ai(e);r.prototype=e;var t=new r;return r.prototype=o,t});function ma(e,t,n,r,i,a){var c,s=1&t,l=2&t,f=4&t;if(n&&(c=i?n(e,r,i,a):n(e)),c!==o)return c;if(!$o(e))return e;var p,d,h,v,y,m=Pu(e);if(m){if(d=(p=e).length,h=new p.constructor(d),d&&"string"==typeof p[0]&&bi.call(p,"index")&&(h.index=p.index,h.input=p.input),c=h,!s)return or(e,c)}else{var g=La(e),b=g==ce||g==se;if(Tu(e))return Jn(e,s);if(g==pe||g==re||b&&!i){if(c=l||b?{}:Nr(e),!s)return l?function(e,t){return ir(e,Da(e),t)}(e,(y=e,(v=c)&&ir(y,Wo(y),v))):function(e,t){return ir(e,Ra(e),t)}(e,Ot(c,e))}else{if(!zt[g])return i?e:{};c=function(e,t,n){var r,o=e.constructor;switch(t){case be:return Xn(e);case ie:case ae:return new o(+e);case we:return function(e,t){var n=t?Xn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case _e:case xe:case Se:case Oe:case Ee:case ke:case je:case Ce:case $e:return er(e,n);case le:return new o;case fe:case ye:return new o(e);case he:return function(e){var t=new e.constructor(e.source,et.exec(e));return t.lastIndex=e.lastIndex,t}(e);case ve:return new o;case me:return r=e,ha?li(ha.call(r)):{}}}(e,g,s)}}a||(a=new vt);var w=a.get(e);if(w)return w;a.set(e,c),Lu(e)?e.forEach((function(r){c.add(ma(r,t,n,r,e,a))})):Ru(e)&&e.forEach((function(r,o){c.set(o,ma(r,t,n,o,e,a))}));var _=m?o:(f?l?Pr:$r:l?Wo:Ho)(e);return u(_||e,(function(r,o){_&&(r=e[o=r]),_t(c,o,ma(r,t,n,o,e,a))})),c}j.templateSettings={escape:Me,evaluate:Ne,interpolate:Ue,variable:"",imports:{_:j}},(j.prototype=Ke.prototype).constructor=j,st.prototype=ya(Ke.prototype),st.prototype.constructor=st,lt.prototype=ya(Ke.prototype),lt.prototype.constructor=lt,ft.prototype.clear=function(){this.__data__=ia?ia(null):{},this.size=0},ft.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ft.prototype.get=function(e){var t=this.__data__;if(ia){var n=t[e];return n===Z?o:n}return bi.call(t,e)?t[e]:o},ft.prototype.has=function(e){var t=this.__data__;return ia?t[e]!==o:bi.call(t,e)},ft.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ia&&t===o?Z:t,this},pt.prototype.clear=function(){this.__data__=[],this.size=0},pt.prototype.delete=function(e){var t=this.__data__,n=xt(t,e);return!(n<0||(n==t.length-1?t.pop():Ii.call(t,n,1),--this.size,0))},pt.prototype.get=function(e){var t=this.__data__,n=xt(t,e);return n<0?o:t[n][1]},pt.prototype.has=function(e){return xt(this.__data__,e)>-1},pt.prototype.set=function(e,t){var n=this.__data__,r=xt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},dt.prototype.clear=function(){this.size=0,this.__data__={hash:new ft,map:new(ta||pt),string:new ft}},dt.prototype.delete=function(e){var t=Rr(this,e).delete(e);return this.size-=t?1:0,t},dt.prototype.get=function(e){return Rr(this,e).get(e)},dt.prototype.has=function(e){return Rr(this,e).has(e)},dt.prototype.set=function(e,t){var n=Rr(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ht.prototype.add=ht.prototype.push=function(e){return this.__data__.set(e,Z),this},ht.prototype.has=function(e){return this.__data__.has(e)},vt.prototype.clear=function(){this.__data__=new pt,this.size=0},vt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},vt.prototype.get=function(e){return this.__data__.get(e)},vt.prototype.has=function(e){return this.__data__.has(e)},vt.prototype.set=function(e,t){var n=this.__data__;if(l(n,pt)){var r=n.__data__;if(!ta||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new dt(r)}return n.set(e,t),this.size=n.size,this};var ga=cr(Ft),ba=cr(Wt,!0);function wa(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=Ur),o||(o=[]);++i<a;){var u=e[i];t>0&&n(u)?t>1?wa(u,t-1,n,r,o):y(o,u):r||(o[o.length]=u)}return o}var _a=sr(),xa=sr(!0);function Sa(e,t,n,r,i){return e===t||(null==e||null==t||!Po(e)&&!Po(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var u=Pu(e),c=Pu(t),s=u?oe:La(e),f=c?oe:La(t),p=(s=s==re?pe:s)==pe,d=(f=f==re?pe:f)==pe,h=s==f;if(h&&Tu(e)){if(!Tu(t))return!1;u=!0,p=!1}if(h&&!p)return a||(a=new vt),u||Mu(e)?jr(e,t,n,r,i,a):function(e,t,n,r,o,i,a){switch(n){case we:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case be:return!(e.byteLength!=t.byteLength||!i(new Ci(e),new Ci(t)));case ie:case ae:case fe:return xo(+e,+t);case ue:return e.name==t.name&&e.message==t.message;case he:case ye:return e==t+"";case le:var u=B;case ve:var c=1&r;if(u||(u=V),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var l=jr(u(e),u(t),r,o,i,a);return a.delete(e),l;case me:if(ha)return ha.call(e)==ha.call(t)}return!1}(e,t,s,n,r,i,a);if(!(1&n)){var v=p&&bi.call(e,"__wrapped__"),y=d&&bi.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,g=y?t.value():t;return a||(a=new vt),i(m,g,n,r,a)}}return!!h&&(a||(a=new vt),function(e,t,n,r,i,a){var u=1&n,c=$r(e),s=c.length;if(s!=$r(t).length&&!u)return!1;for(var f=s;f--;){var p=c[f];if(!(u?p in t:bi.call(t,p)))return!1}var d=a.get(e),h=a.get(t);if(d&&h)return d==t&&h==e;var v=!0;a.set(e,t),a.set(t,e);for(var y=u;++f<s;){var m=e[p=c[f]],g=t[p];if(r)var b=u?r(g,m,p,t,e,a):r(m,g,p,e,t,a);if(!(b===o?m===g||i(m,g,n,r,a):b)){v=!1;break}y||(y="constructor"==p)}if(v&&!y){var w=e.constructor,_=t.constructor;w==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&l(w,w)&&"function"==typeof _&&l(_,_)||(v=!1)}return a.delete(e),a.delete(t),v}(e,t,n,r,i,a))}(e,t,n,r,Sa,i))}function Oa(e,t,n,r,i){e!==t&&_a(t,(function(a,u){if(i||(i=new vt),$o(a))!function(e,t,n,r,i,a,u){var c=Qr(e,n),s=Qr(t,n),l=u.get(s);if(l)wt(e,n,l);else{var f=a?a(c,s,n+"",e,t,u):o,p=f===o;if(p){var d=Pu(s),h=!d&&Tu(s),v=!d&&!h&&Mu(s);f=s,d||h||v?Pu(c)?f=c:Oo(c)?f=or(c):h?(p=!1,f=Jn(s,!0)):v?(p=!1,f=er(s,!0)):f=[]:To(s)||$u(s)?(f=c,$u(c)?f=Bo(c):$o(c)&&!ko(c)||(f=Nr(s))):p=!1}p&&(u.set(s,f),i(f,s,r,a,u),u.delete(s)),wt(e,n,f)}}(e,t,u,n,Oa,r,i);else{var c=r?r(Qr(e,u),a,u+"",e,t,i):o;c===o&&(c=a),wt(e,u,c)}}),Wo)}var Ea=aa?function(e,t){return aa.set(e,t),e}:Jo,ka=Mi?function(e,t){return Mi(e,"toString",{configurable:!0,enumerable:!1,value:Yo(t),writable:!0})}:Jo;function ja(e){if("string"==typeof e)return e;if(Pu(e))return h(e,ja)+"";if(Ro(e))return va?va.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var Ca=Pn,$a=Ni||function(e){return qt.clearTimeout(e)};function Pa(e,t,n,r,i,a,u,c,s,f){var p=t&Y,d=1&t,h=2&t,v=24&t,y=512&t,m=h?o:pr(e);return function o(){for(var g=arguments.length,b=ii(g),w=g;w--;)b[w]=arguments[w];if(v)var _=Tr(o),x=M(b,_);if(r&&(b=nr(b,r,i,v)),a&&(b=rr(b,a,u,v)),g-=x,v&&g<f){var S=F(b,_);return _r(e,t,Pa,o.placeholder,n,b,S,c,s,f-g)}var O=d?n:this,E=h?O[e]:e;return g=b.length,c?b=Gr(b,c):y&&g>1&&b.reverse(),p&&s<g&&(b.length=s),this&&this!==qt&&l(this,o)&&(E=m||pr(E)),E.apply(O,b)}}var Aa=ra&&1/V(new ra([,-0]))[1]==J?function(e){return new ra(e)}:ti;function Ta(e,t,n,r,i,a){return $o(e)&&$o(t)&&(a.set(t,e),Oa(e,t,o,Ta,a),a.delete(t)),e}var Ia=aa?function(e){return aa.get(e)}:ti,Ra=Vi?function(e){return null==e?[]:(e=li(e),f(Vi(e),(function(t){return Ti.call(e,t)})))}:ri,Da=Vi?function(e){for(var t=[];e;)y(t,Ra(e)),e=Pi(e);return t}:ri,La=Yt;(ea&&La(new ea(new ArrayBuffer(1)))!=we||ta&&La(new ta)!=le||na&&La(na.resolve())!=de||ra&&La(new ra)!=ve||oa&&La(new oa)!=ge)&&(La=function(e){var t=Yt(e),n=t==pe?e.constructor:o,r=n?to(n):"";if(r)switch(r){case ca:return we;case sa:return le;case la:return de;case fa:return ve;case pa:return ge}return t});var Ma,Na,Ua=mi?ko:oi,Ba=Jr(Ea),za=Bi||function(e,t){return qt.setTimeout(e,t)},Fa=Jr(ka),Va=(Ma=_u((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Fe,(function(e,n,r,o){t.push(r?o.replace(Je,"$1"):n||e)})),t}),(function(e){return 500===Na.size&&Na.clear(),e})),Na=Ma.cache,Ma),Ha=Pn((function(e,t){return Oo(e)?Pt(e,wa(t,1,Oo,!0)):[]})),Wa=Pn((function(e,t){var n=uo(t);return Oo(n)&&(n=o),Oo(e)?Pt(e,wa(t,1,Oo,!0),Ir(n,2)):[]})),Ka=Pn((function(e,t){var n=uo(t);return Oo(n)&&(n=o),Oo(e)?Pt(e,wa(t,1,Oo,!0),o,n):[]})),qa=Pn((function(e){var t=h(e,Zn);return t.length&&t[0]===e[0]?pn(t):[]})),Za=Pn((function(e){var t=uo(e),n=h(e,Zn);return t===uo(n)?t=o:n.pop(),n.length&&n[0]===e[0]?pn(n,Ir(t,2)):[]})),Ga=Pn((function(e){var t=uo(e),n=h(e,Zn);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?pn(n,o,t):[]})),Qa=Pn(co),Ya=Cr((function(e,t){var n=null==e?0:e.length,r=kt(e,t);return jn(e,h(t,(function(e){return Br(e,n)?+e:e})).sort(tr)),r})),Ja=Pn((function(e){return zn(wa(e,1,Oo,!0))})),Xa=Pn((function(e){var t=uo(e);return Oo(t)&&(t=o),zn(wa(e,1,Oo,!0),Ir(t,2))})),eu=Pn((function(e){var t=uo(e);return t="function"==typeof t?t:o,zn(wa(e,1,Oo,!0),o,t)})),tu=Pn((function(e,t){return Oo(e)?Pt(e,t):[]})),nu=Pn((function(e){return Kn(f(e,Oo))})),ru=Pn((function(e){var t=uo(e);return Oo(t)&&(t=o),Kn(f(e,Oo),Ir(t,2))})),ou=Pn((function(e){var t=uo(e);return t="function"==typeof t?t:o,Kn(f(e,Oo),o,t)})),iu=Pn(lo),au=Pn((function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,fo(e,n)})),uu=Cr((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return kt(t,e)};return t>1||this.__actions__.length||!l(r,lt)||!Br(n)?this.thru(i):((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ho,args:[i],thisArg:o}),new st(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e})))})),cu=ar((function(e,t,n){bi.call(e,n)?++e[n]:Et(e,n,1)})),su=dr(ro),lu=dr(oo),fu=ar((function(e,t,n){bi.call(e,n)?e[n].push(t):Et(e,n,[t])})),pu=Pn((function(e,t,n){var r=-1,o="function"==typeof t,a=So(e)?ii(e.length):[];return ga(e,(function(e){a[++r]=o?i(t,e,n):dn(e,t,n)})),a})),du=ar((function(e,t,n){Et(e,n,t)})),hu=ar((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),vu=Pn((function(e,t){if(null==e)return[];var n=t.length;return n>1&&zr(e,t[0],t[1])?t=[]:n>2&&zr(t[0],t[1],t[2])&&(t=[t[0]]),On(e,wa(t,1),[])})),yu=Ui||function(){return qt.Date.now()},mu=Pn((function(e,t,n){var r=1;if(n.length){var o=F(n,Tr(mu));r|=Q}return Or(e,r,t,n,o)})),gu=Pn((function(e,t,n){var r=3;if(n.length){var o=F(n,Tr(gu));r|=Q}return Or(t,r,e,n,o)})),bu=Pn((function(e,t){return $t(e,1,t)})),wu=Pn((function(e,t,n){return $t(e,Uo(t)||0,n)}));function _u(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new di(q);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(_u.Cache||dt),n}_u.Cache=dt;var xu,Su=Ca((function(e,t){var n=(t=1==t.length&&Pu(t[0])?h(t[0],T(Ir())):h(wa(t,1),T(Ir()))).length;return Pn((function(r){for(var o=-1,a=Gi(r.length,n);++o<a;)r[o]=t[o].call(this,r[o]);return i(e,this,r)}))})),Ou=Pn((function(e,t){var n=F(t,Tr(Ou));return Or(e,Q,o,t,n)})),Eu=Pn((function(e,t){var n=F(t,Tr(Eu));return Or(e,64,o,t,n)})),ku=Cr((function(e,t){return Or(e,256,o,o,o,t)})),ju=wr(Jt),Cu=wr((function(e,t){return e>=t})),$u=hn(function(){return arguments}())?hn:function(e){return Po(e)&&bi.call(e,"callee")&&!Ti.call(e,"callee")},Pu=ii.isArray,Au=Xt?T(Xt):function(e){return Po(e)&&Yt(e)==be},Tu=Hi||oi,Iu=en?T(en):function(e){return Po(e)&&Yt(e)==ae},Ru=tn?T(tn):function(e){return Po(e)&&La(e)==le},Du=nn?T(nn):function(e){return Po(e)&&Yt(e)==he},Lu=rn?T(rn):function(e){return Po(e)&&La(e)==ve},Mu=on?T(on):function(e){return Po(e)&&Co(e.length)&&!!Bt[Yt(e)]},Nu=wr(bn),Uu=wr((function(e,t){return e<=t})),Bu=ur((function(e,t){if(Hr(t)||So(t))ir(t,Ho(t),e);else for(var n in t)bi.call(t,n)&&_t(e,n,t[n])})),zu=ur((function(e,t){ir(t,Wo(t),e)})),Fu=ur((function(e,t,n,r){ir(t,Wo(t),e,r)})),Vu=ur((function(e,t,n,r){ir(t,Ho(t),e,r)})),Hu=Cr(kt),Wu=Pn((function(e,t){e=li(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&zr(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],u=Wo(a),c=-1,s=u.length;++c<s;){var l=u[c],f=e[l];(f===o||xo(f,yi[l])&&!bi.call(e,l))&&(e[l]=a[l])}return e})),Ku=Pn((function(e){return e.push(o,Ta),i(Yu,o,e)})),qu=vr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=xi.call(t)),e[t]=n}),Yo(Jo)),Zu=vr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=xi.call(t)),bi.call(e,t)?e[t].push(n):e[t]=[n]}),Ir),Gu=Pn(dn),Qu=ur((function(e,t,n){Oa(e,t,n)})),Yu=ur((function(e,t,n,r){Oa(e,t,n,r)})),Ju=Cr((function(e,t){var n={};if(null==e)return n;var r=!1;t=h(t,(function(t){return t=Qn(t,e),r||(r=t.length>1),t})),ir(e,Pr(e),n),r&&(n=ma(n,7,kr));for(var o=t.length;o--;)Fn(n,t[o]);return n})),Xu=Cr((function(e,t){return null==e?{}:En(n=e,t,(function(e,t){return Vo(n,t)}));var n})),ec=Sr(Ho),tc=Sr(Wo),nc=fr((function(e,t,n){return t=t.toLowerCase(),e+(n?Zo(t):t)})),rc=fr((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),oc=fr((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),ic=lr("toLowerCase"),ac=fr((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),uc=fr((function(e,t,n){return e+(n?" ":"")+sc(t)})),cc=fr((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),sc=lr("toUpperCase"),lc=Pn((function(e,t){try{return i(e,o,t)}catch(e){return Eo(e)?e:new ui(e)}})),fc=Cr((function(e,t){return u(t,(function(t){t=eo(t),Et(e,t,mu(e[t],e))})),e})),pc=hr(),dc=hr(!0),hc=Pn((function(e,t){return function(n){return dn(n,e,t)}})),vc=Pn((function(e,t){return function(n){return dn(e,n,t)}})),yc=mr(h),mc=mr(s),gc=mr(b),bc=br(),wc=br(!0),_c=yr((function(e,t){return e+t}),0),xc=xr("ceil"),Sc=yr((function(e,t){return e/t}),1),Oc=xr("floor"),Ec=yr((function(e,t){return e*t}),1),kc=xr("round"),jc=yr((function(e,t){return e-t}),0);return j.after=function(e,t){if("function"!=typeof t)throw new di(q);return e=Mo(e),function(){if(--e<1)return t.apply(this,arguments)}},j.ary=go,j.assign=Bu,j.assignIn=zu,j.assignInWith=Fu,j.assignWith=Vu,j.at=Hu,j.before=bo,j.bind=mu,j.bindAll=fc,j.bindKey=gu,j.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Pu(e)?e:[e]},j.chain=po,j.chunk=function(e,t,n){t=(n?zr(e,t,n):t===o)?1:Zi(Mo(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var i=0,a=0,u=ii(zi(r/t));i<r;)u[a++]=Dn(e,i,i+=t);return u},j.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},j.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ii(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return y(Pu(n)?or(n):[n],wa(t,1))},j.cond=function(e){var t=null==e?0:e.length,n=Ir();return e=t?h(e,(function(e){if("function"!=typeof e[1])throw new di(q);return[n(e[0]),e[1]]})):[],Pn((function(n){for(var r=-1;++r<t;){var o=e[r];if(i(o[0],this,n))return i(o[1],this,n)}}))},j.conforms=function(e){return t=ma(e,1),n=Ho(t),function(e){return Ct(e,t,n)};var t,n},j.constant=Yo,j.countBy=cu,j.create=function(e,t){var n=ya(e);return null==t?n:Ot(n,t)},j.curry=function e(t,n,r){var i=Or(t,8,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},j.curryRight=function e(t,n,r){var i=Or(t,16,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},j.debounce=wo,j.defaults=Wu,j.defaultsDeep=Ku,j.defer=bu,j.delay=wu,j.difference=Ha,j.differenceBy=Wa,j.differenceWith=Ka,j.drop=function(e,t,n){var r=null==e?0:e.length;return r?Dn(e,(t=n||t===o?1:Mo(t))<0?0:t,r):[]},j.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Dn(e,0,(t=r-(t=n||t===o?1:Mo(t)))<0?0:t):[]},j.dropRightWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3),!0,!0):[]},j.dropWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3),!0):[]},j.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&zr(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=Mo(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:Mo(r))<0&&(r+=i),r=n>r?0:No(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},j.filter=function(e,t){return(Pu(e)?f:Lt)(e,Ir(t,3))},j.flatMap=function(e,t){return wa(mo(e,t),1)},j.flatMapDeep=function(e,t){return wa(mo(e,t),J)},j.flatMapDepth=function(e,t,n){return n=n===o?1:Mo(n),wa(mo(e,t),n)},j.flatten=io,j.flattenDeep=function(e){return null!=e&&e.length?wa(e,J):[]},j.flattenDepth=function(e,t){return null!=e&&e.length?wa(e,t=t===o?1:Mo(t)):[]},j.flip=function(e){return Or(e,512)},j.flow=pc,j.flowRight=dc,j.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},j.functions=function(e){return null==e?[]:Kt(e,Ho(e))},j.functionsIn=function(e){return null==e?[]:Kt(e,Wo(e))},j.groupBy=fu,j.initial=function(e){return null!=e&&e.length?Dn(e,0,-1):[]},j.intersection=qa,j.intersectionBy=Za,j.intersectionWith=Ga,j.invert=qu,j.invertBy=Zu,j.invokeMap=pu,j.iteratee=Xo,j.keyBy=du,j.keys=Ho,j.keysIn=Wo,j.map=mo,j.mapKeys=function(e,t){var n={};return t=Ir(t,3),Ft(e,(function(e,r,o){Et(n,t(e,r,o),e)})),n},j.mapValues=function(e,t){var n={};return t=Ir(t,3),Ft(e,(function(e,r,o){Et(n,r,t(e,r,o))})),n},j.matches=function(e){return _n(ma(e,1))},j.matchesProperty=function(e,t){return xn(e,ma(t,1))},j.memoize=_u,j.merge=Qu,j.mergeWith=Yu,j.method=hc,j.methodOf=vc,j.mixin=ei,j.negate=_o,j.nthArg=function(e){return e=Mo(e),Pn((function(t){return Sn(t,e)}))},j.omit=Ju,j.omitBy=function(e,t){return Ko(e,_o(Ir(t)))},j.once=function(e){return bo(2,e)},j.orderBy=function(e,t,n,r){return null==e?[]:(Pu(t)||(t=null==t?[]:[t]),Pu(n=r?o:n)||(n=null==n?[]:[n]),On(e,t,n))},j.over=yc,j.overArgs=Su,j.overEvery=mc,j.overSome=gc,j.partial=Ou,j.partialRight=Eu,j.partition=hu,j.pick=Xu,j.pickBy=Ko,j.property=ni,j.propertyOf=function(e){return function(t){return null==e?o:Zt(e,t)}},j.pull=Qa,j.pullAll=co,j.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?kn(e,t,Ir(n,2)):e},j.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?kn(e,t,o,n):e},j.pullAt=Ya,j.range=bc,j.rangeRight=wc,j.rearg=ku,j.reject=function(e,t){return(Pu(e)?f:Lt)(e,_o(Ir(t,3)))},j.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=Ir(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return jn(e,o),n},j.rest=function(e,t){if("function"!=typeof e)throw new di(q);return Pn(e,t=t===o?t:Mo(t))},j.reverse=so,j.sampleSize=function(e,t,n){return t=(n?zr(e,t,n):t===o)?1:Mo(t),(Pu(e)?gt:Tn)(e,t)},j.set=function(e,t,n){return null==e?e:In(e,t,n)},j.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:In(e,t,n,r)},j.shuffle=function(e){return(Pu(e)?bt:Rn)(e)},j.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&zr(e,t,n)?(t=0,n=r):(t=null==t?0:Mo(t),n=n===o?r:Mo(n)),Dn(e,t,n)):[]},j.sortBy=vu,j.sortedUniq=function(e){return e&&e.length?Un(e):[]},j.sortedUniqBy=function(e,t){return e&&e.length?Un(e,Ir(t,2)):[]},j.split=function(e,t,n){return n&&"number"!=typeof n&&zr(e,t,n)&&(t=n=o),(n=n===o?te:n>>>0)?(e=zo(e))&&("string"==typeof t||null!=t&&!Du(t))&&!(t=ja(t))&&U(e)?Yn(W(e),0,n):e.split(t,n):[]},j.spread=function(e,t){if("function"!=typeof e)throw new di(q);return t=null==t?0:Zi(Mo(t),0),Pn((function(n){var r=n[t],o=Yn(n,0,t);return r&&y(o,r),i(e,this,o)}))},j.tail=function(e){var t=null==e?0:e.length;return t?Dn(e,1,t):[]},j.take=function(e,t,n){return e&&e.length?Dn(e,0,(t=n||t===o?1:Mo(t))<0?0:t):[]},j.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Dn(e,(t=r-(t=n||t===o?1:Mo(t)))<0?0:t,r):[]},j.takeRightWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3),!1,!0):[]},j.takeWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3)):[]},j.tap=function(e,t){return t(e),e},j.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new di(q);return $o(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),wo(e,t,{leading:r,maxWait:t,trailing:o})},j.thru=ho,j.toArray=Do,j.toPairs=ec,j.toPairsIn=tc,j.toPath=function(e){return Pu(e)?h(e,eo):Ro(e)?[e]:or(Va(zo(e)))},j.toPlainObject=Bo,j.transform=function(e,t,n){var r=Pu(e),o=r||Tu(e)||Mu(e);if(t=Ir(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:$o(e)&&ko(i)?ya(Pi(e)):{}}return(o?u:Ft)(e,(function(e,r,o){return t(n,e,r,o)})),n},j.unary=function(e){return go(e,1)},j.union=Ja,j.unionBy=Xa,j.unionWith=eu,j.uniq=function(e){return e&&e.length?zn(e):[]},j.uniqBy=function(e,t){return e&&e.length?zn(e,Ir(t,2)):[]},j.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?zn(e,o,t):[]},j.unset=function(e,t){return null==e||Fn(e,t)},j.unzip=lo,j.unzipWith=fo,j.update=function(e,t,n){return null==e?e:Vn(e,t,Gn(n))},j.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Vn(e,t,Gn(n),r)},j.values=qo,j.valuesIn=function(e){return null==e?[]:I(e,Wo(e))},j.without=tu,j.words=Qo,j.wrap=function(e,t){return Ou(Gn(t),e)},j.xor=nu,j.xorBy=ru,j.xorWith=ou,j.zip=iu,j.zipObject=function(e,t){return qn(e||[],t||[],_t)},j.zipObjectDeep=function(e,t){return qn(e||[],t||[],In)},j.zipWith=au,j.entries=ec,j.entriesIn=tc,j.extend=zu,j.extendWith=Fu,ei(j,j),j.add=_c,j.attempt=lc,j.camelCase=nc,j.capitalize=Zo,j.ceil=xc,j.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=Uo(n))==n?n:0),t!==o&&(t=(t=Uo(t))==t?t:0),jt(Uo(e),t,n)},j.clone=function(e){return ma(e,4)},j.cloneDeep=function(e){return ma(e,5)},j.cloneDeepWith=function(e,t){return ma(e,5,t="function"==typeof t?t:o)},j.cloneWith=function(e,t){return ma(e,4,t="function"==typeof t?t:o)},j.conformsTo=function(e,t){return null==t||Ct(e,t,Ho(t))},j.deburr=Go,j.defaultTo=function(e,t){return null==e||e!=e?t:e},j.divide=Sc,j.endsWith=function(e,t,n){e=zo(e),t=ja(t);var r=e.length,i=n=n===o?r:jt(Mo(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},j.eq=xo,j.escape=function(e){return(e=zo(e))&&Le.test(e)?e.replace(Re,cn):e},j.escapeRegExp=function(e){return(e=zo(e))&&He.test(e)?e.replace(Ve,"\\$&"):e},j.every=function(e,t,n){var r=Pu(e)?s:At;return n&&zr(e,t,n)&&(t=o),r(e,Ir(t,3))},j.find=su,j.findIndex=ro,j.findKey=function(e,t){return w(e,Ir(t,3),Ft)},j.findLast=lu,j.findLastIndex=oo,j.findLastKey=function(e,t){return w(e,Ir(t,3),Wt)},j.floor=Oc,j.forEach=vo,j.forEachRight=yo,j.forIn=function(e,t){return null==e?e:_a(e,Ir(t,3),Wo)},j.forInRight=function(e,t){return null==e?e:xa(e,Ir(t,3),Wo)},j.forOwn=function(e,t){return e&&Ft(e,Ir(t,3))},j.forOwnRight=function(e,t){return e&&Wt(e,Ir(t,3))},j.get=Fo,j.gt=ju,j.gte=Cu,j.has=function(e,t){return null!=e&&Mr(e,t,an)},j.hasIn=Vo,j.head=ao,j.identity=Jo,j.includes=function(e,t,n,r){e=So(e)?e:qo(e),n=n&&!r?Mo(n):0;var o=e.length;return n<0&&(n=Zi(o+n,0)),Io(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&x(e,t,n)>-1},j.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Mo(n);return o<0&&(o=Zi(r+o,0)),x(e,t,o)},j.inRange=function(e,t,n){return t=Lo(t),n===o?(n=t,t=0):n=Lo(n),(r=e=Uo(e))>=Gi(i=t,a=n)&&r<Zi(i,a);var r,i,a},j.invoke=Gu,j.isArguments=$u,j.isArray=Pu,j.isArrayBuffer=Au,j.isArrayLike=So,j.isArrayLikeObject=Oo,j.isBoolean=function(e){return!0===e||!1===e||Po(e)&&Yt(e)==ie},j.isBuffer=Tu,j.isDate=Iu,j.isElement=function(e){return Po(e)&&1===e.nodeType&&!To(e)},j.isEmpty=function(e){if(null==e)return!0;if(So(e)&&(Pu(e)||"string"==typeof e||"function"==typeof e.splice||Tu(e)||Mu(e)||$u(e)))return!e.length;var t=La(e);if(t==le||t==ve)return!e.size;if(Hr(e))return!gn(e).length;for(var n in e)if(bi.call(e,n))return!1;return!0},j.isEqual=function(e,t){return Sa(e,t)},j.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?Sa(e,t,o,n):!!r},j.isError=Eo,j.isFinite=function(e){return"number"==typeof e&&Wi(e)},j.isFunction=ko,j.isInteger=jo,j.isLength=Co,j.isMap=Ru,j.isMatch=function(e,t){return e===t||vn(e,t,Dr(t))},j.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,vn(e,t,Dr(t),n)},j.isNaN=function(e){return Ao(e)&&e!=+e},j.isNative=function(e){if(Ua(e))throw new ui("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return yn(e)},j.isNil=function(e){return null==e},j.isNull=function(e){return null===e},j.isNumber=Ao,j.isObject=$o,j.isObjectLike=Po,j.isPlainObject=To,j.isRegExp=Du,j.isSafeInteger=function(e){return jo(e)&&e>=-9007199254740991&&e<=X},j.isSet=Lu,j.isString=Io,j.isSymbol=Ro,j.isTypedArray=Mu,j.isUndefined=function(e){return e===o},j.isWeakMap=function(e){return Po(e)&&La(e)==ge},j.isWeakSet=function(e){return Po(e)&&"[object WeakSet]"==Yt(e)},j.join=function(e,t){return null==e?"":Ki.call(e,t)},j.kebabCase=rc,j.last=uo,j.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=Mo(n))<0?Zi(r+i,0):Gi(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):_(e,O,i,!0)},j.lowerCase=oc,j.lowerFirst=ic,j.lt=Nu,j.lte=Uu,j.max=function(e){return e&&e.length?Rt(e,Jo,Jt):o},j.maxBy=function(e,t){return e&&e.length?Rt(e,Ir(t,2),Jt):o},j.mean=function(e){return E(e,Jo)},j.meanBy=function(e,t){return E(e,Ir(t,2))},j.min=function(e){return e&&e.length?Rt(e,Jo,bn):o},j.minBy=function(e,t){return e&&e.length?Rt(e,Ir(t,2),bn):o},j.stubArray=ri,j.stubFalse=oi,j.stubObject=function(){return{}},j.stubString=function(){return""},j.stubTrue=function(){return!0},j.multiply=Ec,j.nth=function(e,t){return e&&e.length?Sn(e,Mo(t)):o},j.noConflict=function(){return qt._===this&&(qt._=Oi),this},j.noop=ti,j.now=yu,j.pad=function(e,t,n){e=zo(e);var r=(t=Mo(t))?H(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return gr(Fi(o),n)+e+gr(zi(o),n)},j.padEnd=function(e,t,n){e=zo(e);var r=(t=Mo(t))?H(e):0;return t&&r<t?e+gr(t-r,n):e},j.padStart=function(e,t,n){e=zo(e);var r=(t=Mo(t))?H(e):0;return t&&r<t?gr(t-r,n)+e:e},j.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),Yi(zo(e).replace(We,""),t||0)},j.random=function(e,t,n){if(n&&"boolean"!=typeof n&&zr(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=Lo(e),t===o?(t=e,e=0):t=Lo(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=Ji();return Gi(e+i*(t-e+Vt("1e-"+((i+"").length-1))),t)}return Cn(e,t)},j.reduce=function(e,t,n){var r=Pu(e)?m:C,o=arguments.length<3;return r(e,Ir(t,4),n,o,ga)},j.reduceRight=function(e,t,n){var r=Pu(e)?g:C,o=arguments.length<3;return r(e,Ir(t,4),n,o,ba)},j.repeat=function(e,t,n){return t=(n?zr(e,t,n):t===o)?1:Mo(t),$n(zo(e),t)},j.replace=function(){var e=arguments,t=zo(e[0]);return e.length<3?t:t.replace(e[1],e[2])},j.result=function(e,t,n){var r=-1,i=(t=Qn(t,e)).length;for(i||(i=1,e=o);++r<i;){var a=null==e?o:e[eo(t[r])];a===o&&(r=i,a=n),e=ko(a)?a.call(e):a}return e},j.round=kc,j.runInContext=e,j.sample=function(e){return(Pu(e)?mt:An)(e)},j.size=function(e){if(null==e)return 0;if(So(e))return Io(e)?H(e):e.length;var t=La(e);return t==le||t==ve?e.size:gn(e).length},j.snakeCase=ac,j.some=function(e,t,n){var r=Pu(e)?b:Ln;return n&&zr(e,t,n)&&(t=o),r(e,Ir(t,3))},j.sortedIndex=function(e,t){return Mn(e,t)},j.sortedIndexBy=function(e,t,n){return Nn(e,t,Ir(n,2))},j.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Mn(e,t);if(r<n&&xo(e[r],t))return r}return-1},j.sortedLastIndex=function(e,t){return Mn(e,t,!0)},j.sortedLastIndexBy=function(e,t,n){return Nn(e,t,Ir(n,2),!0)},j.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=Mn(e,t,!0)-1;if(xo(e[n],t))return n}return-1},j.startCase=uc,j.startsWith=function(e,t,n){return e=zo(e),n=null==n?0:jt(Mo(n),0,e.length),t=ja(t),e.slice(n,n+t.length)==t},j.subtract=jc,j.sum=function(e){return e&&e.length?$(e,Jo):0},j.sumBy=function(e,t){return e&&e.length?$(e,Ir(t,2)):0},j.template=function(e,t,n){var r=j.templateSettings;n&&zr(e,t,n)&&(t=o),e=zo(e),t=Fu({},t,r,Er);var i,a,u=Fu({},t.imports,r.imports,Er),c=Ho(u),s=I(u,c),l=0,f=t.interpolate||ut,p="__p += '",d=fi((t.escape||ut).source+"|"+f.source+"|"+(f===Ue?Xe:ut).source+"|"+(t.evaluate||ut).source+"|$","g"),h="//# sourceURL="+(bi.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ut+"]")+"\n";e.replace(d,(function(t,n,r,o,u,c){return r||(r=o),p+=e.slice(l,c).replace(ct,N),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),u&&(a=!0,p+="';\n"+u+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+t.length,t})),p+="';\n";var v=bi.call(t,"variable")&&t.variable;if(v){if(Ye.test(v))throw new ui("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(Pe,""):p).replace(Ae,"$1").replace(Te,"$1;"),p="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=lc((function(){return ci(c,h+"return "+p).apply(o,s)}));if(y.source=p,Eo(y))throw y;return y},j.times=function(e,t){if((e=Mo(e))<1||e>X)return[];var n=te,r=Gi(e,te);t=Ir(t),e-=te;for(var o=P(r,t);++n<e;)t(n);return o},j.toFinite=Lo,j.toInteger=Mo,j.toLength=No,j.toLower=function(e){return zo(e).toLowerCase()},j.toNumber=Uo,j.toSafeInteger=function(e){return e?jt(Mo(e),-9007199254740991,X):0===e?e:0},j.toString=zo,j.toUpper=function(e){return zo(e).toUpperCase()},j.trim=function(e,t,n){if((e=zo(e))&&(n||t===o))return A(e);if(!e||!(t=ja(t)))return e;var r=W(e),i=W(t);return Yn(r,D(r,i),L(r,i)+1).join("")},j.trimEnd=function(e,t,n){if((e=zo(e))&&(n||t===o))return e.slice(0,K(e)+1);if(!e||!(t=ja(t)))return e;var r=W(e);return Yn(r,0,L(r,W(t))+1).join("")},j.trimStart=function(e,t,n){if((e=zo(e))&&(n||t===o))return e.replace(We,"");if(!e||!(t=ja(t)))return e;var r=W(e);return Yn(r,D(r,W(t))).join("")},j.truncate=function(e,t){var n=30,r="...";if($o(t)){var i="separator"in t?t.separator:i;n="length"in t?Mo(t.length):n,r="omission"in t?ja(t.omission):r}var a=(e=zo(e)).length;if(U(e)){var u=W(e);a=u.length}if(n>=a)return e;var c=n-H(r);if(c<1)return r;var s=u?Yn(u,0,c).join(""):e.slice(0,c);if(i===o)return s+r;if(u&&(c+=s.length-c),Du(i)){if(e.slice(c).search(i)){var l,f=s;for(i.global||(i=fi(i.source,zo(et.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var p=l.index;s=s.slice(0,p===o?c:p)}}else if(e.indexOf(ja(i),c)!=c){var d=s.lastIndexOf(i);d>-1&&(s=s.slice(0,d))}return s+r},j.unescape=function(e){return(e=zo(e))&&De.test(e)?e.replace(Ie,sn):e},j.uniqueId=function(e){var t=++wi;return zo(e)+t},j.upperCase=cc,j.upperFirst=sc,j.each=vo,j.eachRight=yo,j.first=ao,ei(j,(xu={},Ft(j,(function(e,t){bi.call(j.prototype,t)||(xu[t]=e)})),xu),{chain:!1}),j.VERSION="4.17.21",u(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){j[e].placeholder=j})),u(["drop","take"],(function(e,t){lt.prototype[e]=function(n){n=n===o?1:Zi(Mo(n),0);var r=this.__filtered__&&!t?new lt(this):this.clone();return r.__filtered__?r.__takeCount__=Gi(n,r.__takeCount__):r.__views__.push({size:Gi(n,te),type:e+(r.__dir__<0?"Right":"")}),r},lt.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),u(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;lt.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ir(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),u(["head","last"],(function(e,t){var n="take"+(t?"Right":"");lt.prototype[e]=function(){return this[n](1).value()[0]}})),u(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");lt.prototype[e]=function(){return this.__filtered__?new lt(this):this[n](1)}})),lt.prototype.compact=function(){return this.filter(Jo)},lt.prototype.find=function(e){return this.filter(e).head()},lt.prototype.findLast=function(e){return this.reverse().find(e)},lt.prototype.invokeMap=Pn((function(e,t){return"function"==typeof e?new lt(this):this.map((function(n){return dn(n,e,t)}))})),lt.prototype.reject=function(e){return this.filter(_o(Ir(e)))},lt.prototype.slice=function(e,t){e=Mo(e);var n=this;return n.__filtered__&&(e>0||t<0)?new lt(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=Mo(t))<0?n.dropRight(-t):n.take(t-e)),n)},lt.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},lt.prototype.toArray=function(){return this.take(te)},Ft(lt.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=j[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(j.prototype[t]=function(){var t=this.__wrapped__,u=r?[1]:arguments,c=l(t,lt),s=u[0],f=c||Pu(t),p=function(e){var t=i.apply(j,y([e],u));return r&&d?t[0]:t};f&&n&&"function"==typeof s&&1!=s.length&&(c=f=!1);var d=this.__chain__,h=!!this.__actions__.length,v=a&&!d,m=c&&!h;if(!a&&f){t=m?t:new lt(this);var g=e.apply(t,u);return g.__actions__.push({func:ho,args:[p],thisArg:o}),new st(g,d)}return v&&m?e.apply(this,u):(g=this.thru(p),v?r?g.value()[0]:g.value():g)})})),u(["pop","push","shift","sort","splice","unshift"],(function(e){var t=hi[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);j.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Pu(o)?o:[],e)}return this[n]((function(n){return t.apply(Pu(n)?n:[],e)}))}})),Ft(lt.prototype,(function(e,t){var n=j[t];if(n){var r=n.name+"";bi.call(ua,r)||(ua[r]=[]),ua[r].push({name:t,func:n})}})),ua[Pa(o,2).name]=[{name:"wrapper",func:o}],lt.prototype.clone=function(){var e=new lt(this.__wrapped__);return e.__actions__=or(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=or(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=or(this.__views__),e},lt.prototype.reverse=function(){if(this.__filtered__){var e=new lt(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},lt.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Pu(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=Gi(t,e+a);break;case"takeRight":e=Zi(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,u=i.end,c=u-a,s=r?u:a-1,l=this.__iteratees__,f=l.length,p=0,d=Gi(c,this.__takeCount__);if(!n||!r&&o==c&&d==c)return Wn(e,this.__actions__);var h=[];e:for(;c--&&p<d;){for(var v=-1,y=e[s+=t];++v<f;){var m=l[v],g=m.iteratee,b=m.type,w=g(y);if(2==b)y=w;else if(!w){if(1==b)continue e;break e}}h[p++]=y}return h},j.prototype.at=uu,j.prototype.chain=function(){return po(this)},j.prototype.commit=function(){return new st(this.value(),this.__chain__)},j.prototype.next=function(){this.__values__===o&&(this.__values__=Do(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},j.prototype.plant=function(e){for(var t,n=this;l(n,Ke);){var r=no(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},j.prototype.reverse=function(){var e=this.__wrapped__;if(l(e,lt)){var t=e;return this.__actions__.length&&(t=new lt(this)),(t=t.reverse()).__actions__.push({func:ho,args:[so],thisArg:o}),new st(t,this.__chain__)}return this.thru(so)},j.prototype.toJSON=j.prototype.valueOf=j.prototype.value=function(){return Wn(this.__wrapped__,this.__actions__)},j.prototype.first=j.prototype.head,Di&&(j.prototype[Di]=function(){return this}),j}();qt._=ln,(r=function(){return ln}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},651:function(e,t,n){!function(t){var n=function(e,t,n){var a=n[0],u=n.length;(e||"object"!==r(a))&&(a={});for(var c=0;c<u;++c){var s=n[c];if("object"===r(s))for(var l in s)if("__proto__"!==l){var f=e?o.clone(s[l]):s[l];a[l]=t?i(a[l],f):f}}return a},r=function(e){return{}.toString.call(e).slice(8,-1).toLowerCase()},o=function(e){return n(!0===e,!1,arguments)};function i(e,t){if("object"!==r(e))return t;for(var n in t)"object"===r(e[n])&&"object"===r(t[n])?e[n]=i(e[n],t[n]):e[n]=t[n];return e}o.recursive=function(e){return n(!0===e,!0,arguments)},o.clone=function(e){var t,n,i=e,a=r(e);if("array"===a)for(i=[],n=e.length,t=0;t<n;++t)i[t]=o.clone(e[t]);else if("object"===a)for(t in i={},e)i[t]=o.clone(e[t]);return i},t?e.exports=o:window.merge=o}((e=n.nmd(e))&&"object"==typeof e.exports&&e.exports)},4516:function(e){"use strict";var t=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)},n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,u,c=t(e),s=1;s<arguments.length;s++){for(var l in a=Object(arguments[s]))r.call(a,l)&&(c[l]=a[l]);if(n){u=n(a);for(var f=0;f<u.length;f++)o.call(a,u[f])&&(c[u[f]]=a[u[f]])}}return c}},459:function(e,t,n){"use strict";var r=function(){},o=function(){},i=n(5704);o.resetWarningCache=r,e.exports=function(){var e=function(e,t,n,r,o,a){if(a!==i){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}},t=function(){return e};e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:r};return n.PropTypes=n,n}},216:function(e,t,n){e.exports=n(459)()},5704:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},3975:function(e,t,n){"use strict";var r=function(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."},o=function(e,t,n,r,o,i,a,u,c){var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(e){this.onError(e)}},i=function(e,t,n,r,i,a,u,c,s){wo=!1,_o=null,o.apply(Oo,arguments)},a=function(e,t,n){var o=e.type||"unknown-event";e.currentTarget=jo(n),function(e,t,n,o,a,u,c,s,l){if(i.apply(this,arguments),wo){if(!wo)throw Error(r(198));var f=_o;wo=!1,_o=null,xo||(xo=!0,So=f)}}(o,t,void 0,e),e.currentTarget=null},u=function(){if(Co)for(var e in $o){var t=$o[e],n=Co.indexOf(e);if(!(-1<n))throw Error(r(96,e));if(!Po[n]){if(!t.extractEvents)throw Error(r(97,e));for(var o in Po[n]=t,n=t.eventTypes){var i=void 0,a=n[o],u=t,s=o;if(Ao.hasOwnProperty(s))throw Error(r(99,s));Ao[s]=a;var l=a.phasedRegistrationNames;if(l){for(i in l)l.hasOwnProperty(i)&&c(l[i],u,s);i=!0}else a.registrationName?(c(a.registrationName,u,s),i=!0):i=!1;if(!i)throw Error(r(98,o,e))}}}},c=function(e,t,n){if(To[e])throw Error(r(100,e));To[e]=t,Io[e]=t.eventTypes[n].dependencies},s=function(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var o=e[t];if(!$o.hasOwnProperty(t)||$o[t]!==o){if($o[t])throw Error(r(102,t));$o[t]=o,n=!0}}n&&u()},f=function(e){if(e=ko(e)){if("function"!=typeof Do)throw Error(r(280));var t=e.stateNode;t&&(t=Eo(t),Do(e.stateNode,e.type,t))}},p=function(e){Lo?Mo?Mo.push(e):Mo=[e]:Lo=e},d=function(){if(Lo){var e=Lo,t=Mo;if(Mo=Lo=null,f(e),t)for(e=0;e<t.length;e++)f(t[e])}},h=function(e,t){return e(t)},y=function(e,t,n,r,o){return e(t,n,r,o)},m=function(){},g=function(){null===Lo&&null===Mo||(m(),d())},b=function(e,t,n){if(Bo)return e(t,n);Bo=!0;try{return No(e,t,n)}finally{Bo=!1,g()}},w=function(e,t,n,r,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i},_=function(e){return e[1].toUpperCase()},x=function(e,t,n,r){var o,i=Wo.hasOwnProperty(t)?Wo[t]:null;(null!==i?0===i.type:!r&&2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1]))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(void 0===t?"undefined":v(t)){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?(o=t,(Fo.call(Ho,o)||!Fo.call(Vo,o)&&(zo.test(o)?Ho[o]=!0:(Vo[o]=!0,0)))&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n))):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))},S=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=li&&e[li]||e["@@iterator"])?e:null},O=function(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,o=e._debugSource,i=fi(e.type);n=null,r&&(n=fi(r.type)),r=i,i="",o?i=" (at "+o.fileName.replace(Zo,"")+":"+o.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n in "+(r||"Unknown")+i}t+=n,e=e.return}while(e);return t},E=function(e){switch(void 0===e?"undefined":v(e)){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}},k=function(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)},j=function(e){e._valueTracker||(e._valueTracker=function(e){var t=k(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))},C=function(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=k(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)},$=function(e,t){var n=t.checked;return go({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})},P=function(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=E(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}},A=function(e,t){null!=(t=t.checked)&&x(e,"checked",t,!1)},T=function(e,t){A(e,t);var n=E(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?R(e,t.type,n):t.hasOwnProperty("defaultValue")&&R(e,t.type,E(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)},I=function(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)},R=function(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))},D=function(e,t){return e=go({children:void 0},t),n=t.children,r="",mo.Children.forEach(n,(function(e){null!=e&&(r+=e)})),(t=r)&&(e.children=t),e;var n,r},L=function(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+E(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}},M=function(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(r(91));return go({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})},N=function(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(r(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(r(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:E(n)}},U=function(e,t){var n=E(t.value),r=E(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)},B=function(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)},z=function(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}},F=function(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?z(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e},V=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t},H=function(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n},W=function(e){if(yi[e])return yi[e];if(!vi[e])return e;var t,n=vi[e];for(t in n)if(n.hasOwnProperty(t)&&t in mi)return yi[e]=n[t];return e},K=function(e){var t=ki.get(e);return void 0===t&&(t=new Map,ki.set(e,t)),t},q=function(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null},Z=function(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null},G=function(e){if(q(e)!==e)throw Error(r(188))},Q=function(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=q(e)))throw Error(r(188));return t!==e?null:e}for(var n=e,o=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(o=i.return)){n=o;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return G(i),e;if(a===o)return G(i),t;a=a.sibling}throw Error(r(188))}if(n.return!==o.return)n=i,o=a;else{for(var u=!1,c=i.child;c;){if(c===n){u=!0,n=i,o=a;break}if(c===o){u=!0,o=i,n=a;break}c=c.sibling}if(!u){for(c=a.child;c;){if(c===n){u=!0,n=a,o=i;break}if(c===o){u=!0,o=a,n=i;break}c=c.sibling}if(!u)throw Error(r(189))}}if(n.alternate!==o)throw Error(r(190))}if(3!==n.tag)throw Error(r(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null},Y=function(e,t){if(null==t)throw Error(r(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]},J=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)},X=function(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)a(e,t[r],n[r]);else t&&a(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}},ee=function(e){if(null!==e&&(ji=Y(ji,e)),e=ji,ji=null,e){if(J(e,X),ji)throw Error(r(95));if(xo)throw e=So,xo=!1,So=null,e}},te=function(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e},ne=function(e){if(!Ro)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t},re=function(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>Ci.length&&Ci.push(e)},oe=function(e,t,n,r){if(Ci.length){var o=Ci.pop();return o.topLevelType=e,o.eventSystemFlags=r,o.nativeEvent=t,o.targetInst=n,o}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}},ie=function(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=Ne(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var o=te(e.nativeEvent);r=e.topLevelType;var i=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var u=null,c=0;c<Po.length;c++){var s=Po[c];s&&(s=s.extractEvents(r,t,i,o,a))&&(u=Y(u,s))}ee(u)}},ae=function(e,t,n){if(!n.has(e)){switch(e){case"scroll":ge(t,"scroll",!0);break;case"focus":case"blur":ge(t,"focus",!0),ge(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":ne(e)&&ge(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Ei.indexOf(e)&&me(e,t)}n.set(e,null)}},ue=function(e,t,n,r,o){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:o,container:r}},ce=function(e,t){switch(e){case"focus":case"blur":Ai=null;break;case"dragenter":case"dragleave":Ti=null;break;case"mouseover":case"mouseout":Ii=null;break;case"pointerover":case"pointerout":Ri.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Di.delete(t.pointerId)}},se=function(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=ue(t,n,r,o,i),null!==t&&null!==(t=Ue(t))&&bi(t),e):(e.eventSystemFlags|=r,e)},le=function(e){var t=Ne(e.target);if(null!==t){var n=q(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Z(n)))return e.blockedOn=t,void bo.unstable_runWithPriority(e.priority,(function(){wi(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null},fe=function(e){if(null!==e.blockedOn)return!1;var t=xe(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=Ue(t);return null!==n&&bi(n),e.blockedOn=t,!1}return!0},pe=function(e,t,n){fe(e)&&n.delete(t)},de=function(){for($i=!1;0<Pi.length;){var e=Pi[0];if(null!==e.blockedOn){null!==(e=Ue(e.blockedOn))&&gi(e);break}var t=xe(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:Pi.shift()}null!==Ai&&fe(Ai)&&(Ai=null),null!==Ti&&fe(Ti)&&(Ti=null),null!==Ii&&fe(Ii)&&(Ii=null),Ri.forEach(pe),Di.forEach(pe)},he=function(e,t){e.blockedOn===t&&(e.blockedOn=null,$i||($i=!0,bo.unstable_scheduleCallback(bo.unstable_NormalPriority,de)))},ve=function(e){var t=function(t){return he(t,e)};if(0<Pi.length){he(Pi[0],e);for(var n=1;n<Pi.length;n++){var r=Pi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Ai&&he(Ai,e),null!==Ti&&he(Ti,e),null!==Ii&&he(Ii,e),Ri.forEach(t),Di.forEach(t),n=0;n<Li.length;n++)(r=Li[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Li.length&&null===(n=Li[0]).blockedOn;)le(n),null===n.blockedOn&&Li.shift()},ye=function(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1],i="on"+(o[0].toUpperCase()+o.slice(1));i={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[r],eventPriority:t},zi.set(r,t),Bi.set(r,i),Ui[o]=i}},me=function(e,t){ge(t,e,!1)},ge=function(e,t,n){var r=zi.get(t);switch(void 0===r?2:r){case 0:r=be.bind(null,t,1,e);break;case 1:r=we.bind(null,t,1,e);break;default:r=_e.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)},be=function(e,t,n,r){Uo||m();var o=_e,i=Uo;Uo=!0;try{y(o,e,t,n,r)}finally{(Uo=i)||g()}},we=function(e,t,n,r){Ki(Wi,_e.bind(null,e,t,n,r))},_e=function(e,t,n,r){if(qi)if(0<Pi.length&&-1<Mi.indexOf(e))e=ue(null,e,t,n,r),Pi.push(e);else{var o=xe(e,t,n,r);if(null===o)ce(e,r);else if(-1<Mi.indexOf(e))e=ue(o,e,t,n,r),Pi.push(e);else if(!function(e,t,n,r,o){switch(t){case"focus":return Ai=se(Ai,e,t,n,r,o),!0;case"dragenter":return Ti=se(Ti,e,t,n,r,o),!0;case"mouseover":return Ii=se(Ii,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Ri.set(i,se(Ri.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Di.set(i,se(Di.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r)){ce(e,r),e=oe(e,r,null,t);try{b(ie,e)}finally{re(e)}}}},xe=function(e,t,n,r){if(null!==(n=Ne(n=te(r)))){var o=q(n);if(null===o)n=null;else{var i=o.tag;if(13===i){if(null!==(n=Z(o)))return n;n=null}else if(3===i){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null)}}e=oe(e,r,n,t);try{b(ie,e)}finally{re(e)}return null},Se=function(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Zi.hasOwnProperty(e)&&Zi[e]?(""+t).trim():t+"px"},Oe=function(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=Se(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}},Ee=function(e,t){if(t){if(Qi[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(r(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(r(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(r(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(r(62,""))}},ke=function(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},je=function(e,t){var n=K(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=Io[t];for(var r=0;r<t.length;r++)ae(t[r],e,n)},Ce=function(){},$e=function(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}},Pe=function(e){for(;e&&e.firstChild;)e=e.firstChild;return e},Ae=function(e,t){var n,r=Pe(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Pe(r)}},Te=function(){for(var e=window,t=$e();l(t,e.HTMLIFrameElement);){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=$e((e=t.contentWindow).document)}return t},Ie=function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)},Re=function(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1},De=function(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html},Le=function(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e},Me=function(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||n===ea||n===Xi){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null},Ne=function(e){var t=e[aa];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ca]||n[aa]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Me(e);null!==e;){if(n=e[aa])return n;e=Me(e)}return t}n=(e=n).parentNode}return null},Ue=function(e){return!(e=e[aa]||e[ca])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e},Be=function(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(r(33))},ze=function(e){return e[ua]||null},Fe=function(e){do{e=e.return}while(e&&5!==e.tag);return e||null},Ve=function(e,t){var n=e.stateNode;if(!n)return null;var o=Eo(n);if(!o)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(o=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!o;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(r(231,t,void 0===n?"undefined":v(n)));return n},He=function(e,t,n){(t=Ve(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=Y(n._dispatchListeners,t),n._dispatchInstances=Y(n._dispatchInstances,e))},We=function(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=Fe(t);for(t=n.length;0<t--;)He(n[t],"captured",e);for(t=0;t<n.length;t++)He(n[t],"bubbled",e)}},Ke=function(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Ve(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=Y(n._dispatchListeners,t),n._dispatchInstances=Y(n._dispatchInstances,e))},qe=function(e){e&&e.dispatchConfig.registrationName&&Ke(e._targetInst,null,e)},Ze=function(e){J(e,We)},Ge=function(){if(fa)return fa;var e,t,n=la,r=n.length,o="value"in sa?sa.value:sa.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return fa=o.slice(e,1<t?1-t:void 0)},Qe=function(){return!0},Ye=function(){return!1},Je=function(e,t,n,r){for(var o in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Qe:Ye,this.isPropagationStopped=Ye,this},Xe=function(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)},et=function(e){if(!l(e,this))throw Error(r(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)},tt=function(e){e.eventPool=[],e.getPooled=Xe,e.release=et},nt=function(e,t){switch(e){case"keyup":return-1!==ha.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}},rt=function(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null},ot=function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Oa[e.type]:"textarea"===t},it=function(e,t,n){return(e=Je.getPooled(Ea.change,e,t,n)).type="change",p(n),Ze(e),e},at=function(e){ee(e)},ut=function(e){if(C(Be(e)))return e},ct=function(e,t){if("change"===e)return t},st=function(){ka&&(ka.detachEvent("onpropertychange",lt),ja=ka=null)},lt=function(e){if("value"===e.propertyName&&ut(ja))if(e=it(ja,e,te(e)),Uo)ee(e);else{Uo=!0;try{h(at,e)}finally{Uo=!1,g()}}},ft=function(e,t,n){"focus"===e?(st(),ja=n,(ka=t).attachEvent("onpropertychange",lt)):"blur"===e&&st()},pt=function(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return ut(ja)},dt=function(e,t){if("click"===e)return ut(t)},ht=function(e,t){if("input"===e||"change"===e)return ut(t)},vt=function(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Aa[e])&&!!t[e]},yt=function(){return vt},mt=function(e,t){if(Ba(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!za.call(t,n[r])||!Ba(e[n[r]],t[n[r]]))return!1;return!0},gt=function(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return qa||null==Ha||Ha!==$e(n)?null:(n="selectionStart"in(n=Ha)&&Ie(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Ka&&mt(Ka,n)?null:(Ka=n,(e=Je.getPooled(Va.select,Wa,e,t)).type="select",e.target=Ha,Ze(e),e))},bt=function(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0},wt=function(e){0>lu||(e.current=su[lu],su[lu]=null,lu--)},_t=function(e,t){lu++,su[lu]=e.current,e.current=t},xt=function(e,t){var n=e.type.contextTypes;if(!n)return fu;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i},St=function(e){return null!=e.childContextTypes},Ot=function(){wt(du),wt(pu)},Et=function(e,t,n){if(pu.current!==fu)throw Error(r(168));_t(pu,t),_t(du,n)},kt=function(e,t,n){var o=e.stateNode;if(e=t.childContextTypes,"function"!=typeof o.getChildContext)return n;for(var i in o=o.getChildContext())if(!(i in e))throw Error(r(108,fi(t)||"Unknown",i));return go({},n,{},o)},jt=function(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||fu,hu=pu.current,_t(pu,e),_t(du,du.current),!0},Ct=function(e,t,n){var o=e.stateNode;if(!o)throw Error(r(169));n?(e=kt(e,t,hu),o.__reactInternalMemoizedMergedChildContext=e,wt(du),wt(pu),_t(pu,e)):wt(du),_t(du,n)},$t=function(){switch(wu()){case _u:return 99;case xu:return 98;case Su:return 97;case Ou:return 96;case Eu:return 95;default:throw Error(r(332))}},Pt=function(e){switch(e){case 99:return _u;case 98:return xu;case 97:return Su;case 96:return Ou;case 95:return Eu;default:throw Error(r(332))}},At=function(e,t){return e=Pt(e),vu(e,t)},Tt=function(e,t,n){return e=Pt(e),yu(e,t,n)},It=function(e){return null===$u?($u=[e],Pu=yu(_u,Dt)):$u.push(e),ku},Rt=function(){if(null!==Pu){var e=Pu;Pu=null,mu(e)}Dt()},Dt=function(){if(!Au&&null!==$u){Au=!0;var e=0;try{var t=$u;At(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),$u=null}catch(t){throw null!==$u&&($u=$u.slice(e+1)),yu(_u,Rt),t}finally{Au=!1}}},Lt=function(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n},Mt=function(e,t){if(e&&e.defaultProps)for(var n in t=go({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t},Nt=function(){Mu=Lu=Du=null},Ut=function(e){var t=Ru.current;wt(Ru),e.type._context._currentValue=t},Bt=function(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}},zt=function(e,t){Du=e,Mu=Lu=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(fc=!0),e.firstContext=null)},Ft=function(e,t){if(Mu!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Mu=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Lu){if(null===Du)throw Error(r(308));Lu=t,Du.dependencies={expirationTime:0,firstContext:t,responders:null}}else Lu=Lu.next=t;return e._currentValue},Vt=function(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}},Ht=function(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})},Wt=function(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e},Kt=function(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}},qt=function(e,t){var n=e.alternate;null!==n&&Ht(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)},Zt=function(e,t,n,r){var o=e.updateQueue;Nu=!1;var i=o.baseQueue,a=o.shared.pending;if(null!==a){if(null!==i){var u=i.next;i.next=a.next,a.next=u}i=a,o.shared.pending=null,null!==(u=e.alternate)&&null!==(u=u.updateQueue)&&(u.baseQueue=a)}if(null!==i){u=i.next;var c=o.baseState,s=0,l=null,f=null,p=null;if(null!==u)for(var d=u;;){if((a=d.expirationTime)<r){var h={expirationTime:d.expirationTime,suspenseConfig:d.suspenseConfig,tag:d.tag,payload:d.payload,callback:d.callback,next:null};null===p?(f=p=h,l=c):p=p.next=h,a>s&&(s=a)}else{null!==p&&(p=p.next={expirationTime:1073741823,suspenseConfig:d.suspenseConfig,tag:d.tag,payload:d.payload,callback:d.callback,next:null}),Tr(a,d.suspenseConfig);e:{var v=e,y=d;switch(a=t,h=n,y.tag){case 1:if("function"==typeof(v=y.payload)){c=v.call(h,c,a);break e}c=v;break e;case 3:v.effectTag=-4097&v.effectTag|64;case 0:if(null==(a="function"==typeof(v=y.payload)?v.call(h,c,a):v))break e;c=go({},c,a);break e;case 2:Nu=!0}}null!==d.callback&&(e.effectTag|=32,null===(a=o.effects)?o.effects=[d]:a.push(d))}if(null===(d=d.next)||d===u){if(null===(a=o.shared.pending))break;d=i.next=a.next,a.next=u,o.baseQueue=i=a,o.shared.pending=null}}null===p?l=c:p.next=f,o.baseState=l,o.baseQueue=p,Ir(s),e.expirationTime=s,e.memoizedState=c}},Gt=function(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var o=e[t],i=o.callback;if(null!==i){if(o.callback=null,o=i,i=n,"function"!=typeof o)throw Error(r(191,o));o.call(i)}}},Qt=function(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:go({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)},Yt=function(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!(t.prototype&&t.prototype.isPureReactComponent&&mt(n,r)&&mt(o,i))},Jt=function(e,t,n){var r=!1,o=fu,i=t.contextType;return"object"==typeof i&&null!==i?i=Ft(i):(o=St(t)?hu:pu.current,i=(r=null!=(r=t.contextTypes))?xt(e,o):fu),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=zu,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t},Xt=function(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&zu.enqueueReplaceState(t,t.state,null)},en=function(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Bu,Vt(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=Ft(i):(i=St(t)?hu:pu.current,o.context=xt(e,i)),Zt(e,n,o,r),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(Qt(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&zu.enqueueReplaceState(o,o.state,null),Zt(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.effectTag|=4)},tn=function(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(r(309));var o=n.stateNode}if(!o)throw Error(r(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=o.refs;t===Bu&&(t=o.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!=typeof e)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e},nn=function(e,t){if("textarea"!==e.type)throw Error(r(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))},rn=function(e){var t=function(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}},n=function(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null},o=function(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e},i=function(e,t){return(e=Yr(e,t)).index=0,e.sibling=null,e},a=function(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n},u=function(t){return e&&null===t.alternate&&(t.effectTag=2),t},c=function(e,t,n,r){return null===t||6!==t.tag?((t=eo(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)},s=function(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=tn(e,t,n),r.return=e,r):((r=Jr(n.type,n.key,n.props,null,e.mode,r)).ref=tn(e,t,n),r.return=e,r)},l=function(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=to(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)},f=function(e,t,n,r,o){return null===t||7!==t.tag?((t=Xr(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)},p=function(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=eo(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Qo:return(n=Jr(t.type,t.key,t.props,null,e.mode,n)).ref=tn(e,null,t),n.return=e,n;case Yo:return(t=to(t,e.mode,n)).return=e,t}if(Fu(t)||S(t))return(t=Xr(t,e.mode,n,null)).return=e,t;nn(e,t)}return null},d=function(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:c(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Qo:return n.key===o?n.type===Jo?f(e,t,n.props.children,r,o):s(e,t,n,r):null;case Yo:return n.key===o?l(e,t,n,r):null}if(Fu(n)||S(n))return null!==o?null:f(e,t,n,r,null);nn(e,n)}return null},h=function(e,t,n,r,o){if("string"==typeof r||"number"==typeof r)return c(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Qo:return e=e.get(null===r.key?n:r.key)||null,r.type===Jo?f(t,e,r.props.children,o,r.key):s(t,e,r,o);case Yo:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(Fu(r)||S(r))return f(t,e=e.get(n)||null,r,o,null);nn(t,r)}return null};return function(c,s,l,f){var v="object"==typeof l&&null!==l&&l.type===Jo&&null===l.key;v&&(l=l.props.children);var y="object"==typeof l&&null!==l;if(y)switch(l.$$typeof){case Qo:e:{for(y=l.key,v=s;null!==v;){if(v.key===y){if(7===v.tag){if(l.type===Jo){n(c,v.sibling),(s=i(v,l.props.children)).return=c,c=s;break e}}else if(v.elementType===l.type){n(c,v.sibling),(s=i(v,l.props)).ref=tn(c,v,l),s.return=c,c=s;break e}n(c,v);break}t(c,v),v=v.sibling}l.type===Jo?((s=Xr(l.props.children,c.mode,f,l.key)).return=c,c=s):((f=Jr(l.type,l.key,l.props,null,c.mode,f)).ref=tn(c,s,l),f.return=c,c=f)}return u(c);case Yo:e:{for(v=l.key;null!==s;){if(s.key===v){if(4===s.tag&&s.stateNode.containerInfo===l.containerInfo&&s.stateNode.implementation===l.implementation){n(c,s.sibling),(s=i(s,l.children||[])).return=c,c=s;break e}n(c,s);break}t(c,s),s=s.sibling}(s=to(l,c.mode,f)).return=c,c=s}return u(c)}if("string"==typeof l||"number"==typeof l)return l=""+l,null!==s&&6===s.tag?(n(c,s.sibling),(s=i(s,l)).return=c,c=s):(n(c,s),(s=eo(l,c.mode,f)).return=c,c=s),u(c);if(Fu(l))return function(r,i,u,c){for(var s=null,l=null,f=i,v=i=0,y=null;null!==f&&v<u.length;v++){f.index>v?(y=f,f=null):y=f.sibling;var m=d(r,f,u[v],c);if(null===m){null===f&&(f=y);break}e&&f&&null===m.alternate&&t(r,f),i=a(m,i,v),null===l?s=m:l.sibling=m,l=m,f=y}if(v===u.length)return n(r,f),s;if(null===f){for(;v<u.length;v++)null!==(f=p(r,u[v],c))&&(i=a(f,i,v),null===l?s=f:l.sibling=f,l=f);return s}for(f=o(r,f);v<u.length;v++)null!==(y=h(f,r,v,u[v],c))&&(e&&null!==y.alternate&&f.delete(null===y.key?v:y.key),i=a(y,i,v),null===l?s=y:l.sibling=y,l=y);return e&&f.forEach((function(e){return t(r,e)})),s}(c,s,l,f);if(S(l))return function(i,u,c,s){var l=S(c);if("function"!=typeof l)throw Error(r(150));if(null==(c=l.call(c)))throw Error(r(151));for(var f=l=null,v=u,y=u=0,m=null,g=c.next();null!==v&&!g.done;y++,g=c.next()){v.index>y?(m=v,v=null):m=v.sibling;var b=d(i,v,g.value,s);if(null===b){null===v&&(v=m);break}e&&v&&null===b.alternate&&t(i,v),u=a(b,u,y),null===f?l=b:f.sibling=b,f=b,v=m}if(g.done)return n(i,v),l;if(null===v){for(;!g.done;y++,g=c.next())null!==(g=p(i,g.value,s))&&(u=a(g,u,y),null===f?l=g:f.sibling=g,f=g);return l}for(v=o(i,v);!g.done;y++,g=c.next())null!==(g=h(v,i,y,g.value,s))&&(e&&null!==g.alternate&&v.delete(null===g.key?y:g.key),u=a(g,u,y),null===f?l=g:f.sibling=g,f=g);return e&&v.forEach((function(e){return t(i,e)})),l}(c,s,l,f);if(y&&nn(c,l),void 0===l&&!v)switch(c.tag){case 1:case 0:throw c=c.type,Error(r(152,c.displayName||c.name||"Component"))}return n(c,s)}},on=function(e){if(e===Wu)throw Error(r(174));return e},an=function(e,t){switch(_t(Zu,t),_t(qu,e),_t(Ku,Wu),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:F(null,"");break;default:t=F(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}wt(Ku),_t(Ku,t)},un=function(){wt(Ku),wt(qu),wt(Zu)},cn=function(e){on(Zu.current);var t=on(Ku.current),n=F(t,e.type);t!==n&&(_t(qu,e),_t(Ku,n))},sn=function(e){qu.current===e&&(wt(Ku),wt(qu))},ln=function(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||n.data===Xi||n.data===ea))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null},fn=function(e,t){return{responder:e,props:t}},pn=function(){throw Error(r(321))},dn=function(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ba(e[n],t[n]))return!1;return!0},hn=function(e,t,n,o,i,a){if(Ju=a,Xu=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Qu.current=null===e||null===e.memoizedState?oc:ic,e=n(o,i),t.expirationTime===Ju){a=0;do{if(t.expirationTime=0,!(25>a))throw Error(r(301));a+=1,tc=ec=null,t.updateQueue=null,Qu.current=ac,e=n(o,i)}while(t.expirationTime===Ju)}if(Qu.current=rc,t=null!==ec&&null!==ec.next,Ju=0,tc=ec=Xu=null,nc=!1,t)throw Error(r(300));return e},vn=function(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===tc?Xu.memoizedState=tc=e:tc=tc.next=e,tc},yn=function(){if(null===ec){var e=Xu.alternate;e=null!==e?e.memoizedState:null}else e=ec.next;var t=null===tc?Xu.memoizedState:tc.next;if(null!==t)tc=t,ec=e;else{if(null===e)throw Error(r(310));e={memoizedState:(ec=e).memoizedState,baseState:ec.baseState,baseQueue:ec.baseQueue,queue:ec.queue,next:null},null===tc?Xu.memoizedState=tc=e:tc=tc.next=e}return tc},mn=function(e,t){return"function"==typeof t?t(e):t},gn=function(e){var t=yn(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var o=ec,i=o.baseQueue,a=n.pending;if(null!==a){if(null!==i){var u=i.next;i.next=a.next,a.next=u}o.baseQueue=i=a,n.pending=null}if(null!==i){i=i.next,o=o.baseState;var c=u=a=null,s=i;do{var l=s.expirationTime;if(l<Ju){var f={expirationTime:s.expirationTime,suspenseConfig:s.suspenseConfig,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null};null===c?(u=c=f,a=o):c=c.next=f,l>Xu.expirationTime&&(Xu.expirationTime=l,Ir(l))}else null!==c&&(c=c.next={expirationTime:1073741823,suspenseConfig:s.suspenseConfig,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null}),Tr(l,s.suspenseConfig),o=s.eagerReducer===e?s.eagerState:e(o,s.action);s=s.next}while(null!==s&&s!==i);null===c?a=o:c.next=u,Ba(o,t.memoizedState)||(fc=!0),t.memoizedState=o,t.baseState=a,t.baseQueue=c,n.lastRenderedState=o}return[t.memoizedState,n.dispatch]},bn=function(e){var t=yn(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var o=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var u=i=i.next;do{a=e(a,u.action),u=u.next}while(u!==i);Ba(a,t.memoizedState)||(fc=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,o]},wn=function(e){var t=vn();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:mn,lastRenderedState:e}).dispatch=Dn.bind(null,Xu,e),[t.memoizedState,e]},_n=function(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Xu.updateQueue)?(t={lastEffect:null},Xu.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e},xn=function(){return yn().memoizedState},Sn=function(e,t,n,r){var o=vn();Xu.effectTag|=e,o.memoizedState=_n(1|t,n,void 0,void 0===r?null:r)},On=function(e,t,n,r){var o=yn();r=void 0===r?null:r;var i=void 0;if(null!==ec){var a=ec.memoizedState;if(i=a.destroy,null!==r&&dn(r,a.deps))return void _n(t,n,i,r)}Xu.effectTag|=e,o.memoizedState=_n(1|t,n,i,r)},En=function(e,t){return Sn(516,4,e,t)},kn=function(e,t){return On(516,4,e,t)},jn=function(e,t){return On(4,2,e,t)},Cn=function(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0},$n=function(e,t,n){return n=null!=n?n.concat([e]):null,On(4,2,Cn.bind(null,t,e),n)},Pn=function(){},An=function(e,t){return vn().memoizedState=[e,void 0===t?null:t],e},Tn=function(e,t){var n=yn();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&dn(t,r[1])?r[0]:(n.memoizedState=[e,t],e)},In=function(e,t){var n=yn();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&dn(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)},Rn=function(e,t,n){var r=$t();At(98>r?98:r,(function(){e(!0)})),At(97<r?97:r,(function(){var r=Yu.suspense;Yu.suspense=void 0===t?null:t;try{e(!1),n()}finally{Yu.suspense=r}}))},Dn=function(e,t,n){var r=wr(),o=Uu.suspense;o={expirationTime:r=_r(r,e,o),suspenseConfig:o,action:n,eagerReducer:null,eagerState:null,next:null};var i=t.pending;if(null===i?o.next=o:(o.next=i.next,i.next=o),t.pending=o,i=e.alternate,e===Xu||null!==i&&i===Xu)nc=!0,o.expirationTime=Ju,Xu.expirationTime=Ju;else{if(0===e.expirationTime&&(null===i||0===i.expirationTime)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,u=i(a,n);if(o.eagerReducer=i,o.eagerState=u,Ba(u,a))return}catch(e){}xr(e,r)}},Ln=function(e,t){var n=Gr(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n},Mn=function(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}},Nn=function(e){if(sc){var t=cc;if(t){var n=t;if(!Mn(e,t)){if(!(t=Le(n.nextSibling))||!Mn(e,t))return e.effectTag=-1025&e.effectTag|2,sc=!1,void(uc=e);Ln(uc,n)}uc=e,cc=Le(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,sc=!1,uc=e}},Un=function(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;uc=e},Bn=function(e){if(e!==uc)return!1;if(!sc)return Un(e),sc=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!De(t,e.memoizedProps))for(t=cc;t;)Ln(e,t),t=Le(t.nextSibling);if(Un(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){cc=Le(e.nextSibling);break e}t--}else"$"!==n&&n!==ea&&n!==Xi||t++}e=e.nextSibling}cc=null}}else cc=uc?Le(e.stateNode.nextSibling):null;return!0},zn=function(){cc=uc=null,sc=!1},Fn=function(e,t,n,r){t.child=null===e?Hu(t,null,n,r):Vu(t,e.child,n,r)},Vn=function(e,t,n,r,o){n=n.render;var i=t.ref;return zt(t,o),r=hn(e,t,n,r,i,o),null===e||fc?(t.effectTag|=1,Fn(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),tr(e,t,o))},Hn=function(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!=typeof a||Qr(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Jr(n.type,null,r,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Wn(e,t,a,r,o,i))}return a=e.child,o<i&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:mt)(o,r)&&e.ref===t.ref)?tr(e,t,i):(t.effectTag|=1,(e=Yr(a,r)).ref=t.ref,e.return=t,t.child=e)},Wn=function(e,t,n,r,o,i){return null!==e&&mt(e.memoizedProps,r)&&e.ref===t.ref&&(fc=!1,o<i)?(t.expirationTime=e.expirationTime,tr(e,t,i)):qn(e,t,n,r,i)},Kn=function(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)},qn=function(e,t,n,r,o){var i=St(n)?hu:pu.current;return i=xt(t,i),zt(t,o),n=hn(e,t,n,r,i,o),null===e||fc?(t.effectTag|=1,Fn(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),tr(e,t,o))},Zn=function(e,t,n,r,o){if(St(n)){var i=!0;jt(t)}else i=!1;if(zt(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),Jt(t,n,r),en(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,u=t.memoizedProps;a.props=u;var c=a.context,s=n.contextType;s="object"==typeof s&&null!==s?Ft(s):xt(t,s=St(n)?hu:pu.current);var l=n.getDerivedStateFromProps,f="function"==typeof l||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(u!==r||c!==s)&&Xt(t,a,r,s),Nu=!1;var p=t.memoizedState;a.state=p,Zt(t,r,a,o),c=t.memoizedState,u!==r||p!==c||du.current||Nu?("function"==typeof l&&(Qt(t,n,l,r),c=t.memoizedState),(u=Nu||Yt(t,n,u,r,p,c,s))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=s,r=u):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,Ht(e,t),u=t.memoizedProps,a.props=t.type===t.elementType?u:Mt(t.type,u),c=a.context,s="object"==typeof(s=n.contextType)&&null!==s?Ft(s):xt(t,s=St(n)?hu:pu.current),(f="function"==typeof(l=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(u!==r||c!==s)&&Xt(t,a,r,s),Nu=!1,c=t.memoizedState,a.state=c,Zt(t,r,a,o),p=t.memoizedState,u!==r||c!==p||du.current||Nu?("function"==typeof l&&(Qt(t,n,l,r),p=t.memoizedState),(l=Nu||Yt(t,n,u,r,c,p,s))?(f||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,s),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,s)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||u===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=s,r=l):("function"!=typeof a.componentDidUpdate||u===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),r=!1);return Gn(e,t,n,r,i,o)},Gn=function(e,t,n,r,o,i){Kn(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return o&&Ct(t,n,!1),tr(e,t,i);r=t.stateNode,lc.current=t;var u=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=Vu(t,e.child,null,i),t.child=Vu(t,null,u,i)):Fn(e,t,u,i),t.memoizedState=r.state,o&&Ct(t,n,!0),t.child},Qn=function(e){var t=e.stateNode;t.pendingContext?Et(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Et(0,t.context,!1),an(e,t.containerInfo)},Yn=function(e,t,n){var r,o=t.mode,i=t.pendingProps,a=Gu.current,u=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&a)&&(null===e||null!==e.memoizedState)),r?(u=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),_t(Gu,1&a),null===e){if(void 0!==i.fallback&&Nn(t),u){if(u=i.fallback,(i=Xr(null,o,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Xr(u,o,n,null)).return=t,i.sibling=n,t.memoizedState=pc,t.child=i,n}return o=i.children,t.memoizedState=null,t.child=Hu(t,null,o,n)}if(null!==e.memoizedState){if(o=(e=e.child).sibling,u){if(i=i.fallback,(n=Yr(e,e.pendingProps)).return=t,0==(2&t.mode)&&(u=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=u;null!==u;)u.return=n,u=u.sibling;return(o=Yr(o,i)).return=t,n.sibling=o,n.childExpirationTime=0,t.memoizedState=pc,t.child=n,o}return n=Vu(t,e.child,i.children,n),t.memoizedState=null,t.child=n}if(e=e.child,u){if(u=i.fallback,(i=Xr(null,o,0,null)).return=t,i.child=e,null!==e&&(e.return=i),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Xr(u,o,n,null)).return=t,i.sibling=n,n.effectTag|=2,i.childExpirationTime=0,t.memoizedState=pc,t.child=i,n}return t.memoizedState=null,t.child=Vu(t,e,i.children,n)},Jn=function(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),Bt(e.return,t)},Xn=function(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=o,a.lastEffect=i)},er=function(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Fn(e,t,r.children,n),0!=(2&(r=Gu.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Jn(e,n);else if(19===e.tag)Jn(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(_t(Gu,r),0==(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===ln(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Xn(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===ln(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Xn(t,!0,n,null,i,t.lastEffect);break;case"together":Xn(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child},tr=function(e,t,n){null!==e&&(t.dependencies=e.dependencies);var o=t.expirationTime;if(0!==o&&Ir(o),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(r(153));if(null!==t.child){for(n=Yr(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Yr(e,e.pendingProps)).return=t;n.sibling=null}return t.child},nr=function(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}},rr=function(e,t,n){var o=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return St(t.type)&&Ot(),null;case 3:return un(),wt(du),wt(pu),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!Bn(t)||(t.effectTag|=4),null;case 5:sn(t),n=on(Zu.current);var i=t.type;if(null!==e&&null!=t.stateNode)uu(e,t,i,o,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!o){if(null===t.stateNode)throw Error(r(166));return null}if(e=on(Ku.current),Bn(t)){o=t.stateNode,i=t.type;var a=t.memoizedProps;switch(o[aa]=t,o[ua]=a,i){case"iframe":case"object":case"embed":me("load",o);break;case"video":case"audio":for(e=0;e<Ei.length;e++)me(Ei[e],o);break;case"source":me("error",o);break;case"img":case"image":case"link":me("error",o),me("load",o);break;case"form":me("reset",o),me("submit",o);break;case"details":me("toggle",o);break;case"input":P(o,a),me("invalid",o),je(n,"onChange");break;case"select":o._wrapperState={wasMultiple:!!a.multiple},me("invalid",o),je(n,"onChange");break;case"textarea":N(o,a),me("invalid",o),je(n,"onChange")}for(var u in Ee(i,a),e=null,a)if(a.hasOwnProperty(u)){var c=a[u];"children"===u?"string"==typeof c?o.textContent!==c&&(e=["children",c]):"number"==typeof c&&o.textContent!==""+c&&(e=["children",""+c]):To.hasOwnProperty(u)&&null!=c&&je(n,u)}switch(i){case"input":j(o),I(o,a,!0);break;case"textarea":j(o),B(o);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(o.onclick=Ce)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(u=9===n.nodeType?n:n.ownerDocument,e===Yi&&(e=z(i)),e===Yi?"script"===i?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof o.is?e=u.createElement(i,{is:o.is}):(e=u.createElement(i),"select"===i&&(u=e,o.multiple?u.multiple=!0:o.size&&(u.size=o.size))):e=u.createElementNS(e,i),e[aa]=t,e[ua]=o,au(e,t),t.stateNode=e,u=ke(i,o),i){case"iframe":case"object":case"embed":me("load",e),c=o;break;case"video":case"audio":for(c=0;c<Ei.length;c++)me(Ei[c],e);c=o;break;case"source":me("error",e),c=o;break;case"img":case"image":case"link":me("error",e),me("load",e),c=o;break;case"form":me("reset",e),me("submit",e),c=o;break;case"details":me("toggle",e),c=o;break;case"input":P(e,o),c=$(e,o),me("invalid",e),je(n,"onChange");break;case"option":c=D(e,o);break;case"select":e._wrapperState={wasMultiple:!!o.multiple},c=go({},o,{value:void 0}),me("invalid",e),je(n,"onChange");break;case"textarea":N(e,o),c=M(e,o),me("invalid",e),je(n,"onChange");break;default:c=o}Ee(i,c);var s=c;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];"style"===a?Oe(e,l):"dangerouslySetInnerHTML"===a?null!=(l=l?l.__html:void 0)&&hi(e,l):"children"===a?"string"==typeof l?("textarea"!==i||""!==l)&&V(e,l):"number"==typeof l&&V(e,""+l):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(To.hasOwnProperty(a)?null!=l&&je(n,a):null!=l&&x(e,a,l,u))}switch(i){case"input":j(e),I(e,o,!1);break;case"textarea":j(e),B(e);break;case"option":null!=o.value&&e.setAttribute("value",""+E(o.value));break;case"select":e.multiple=!!o.multiple,null!=(n=o.value)?L(e,!!o.multiple,n,!1):null!=o.defaultValue&&L(e,!!o.multiple,o.defaultValue,!0);break;default:"function"==typeof c.onClick&&(e.onclick=Ce)}Re(i,o)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)cu(0,t,e.memoizedProps,o);else{if("string"!=typeof o&&null===t.stateNode)throw Error(r(166));n=on(Zu.current),on(Ku.current),Bn(t)?(n=t.stateNode,o=t.memoizedProps,n[aa]=t,n.nodeValue!==o&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(o))[aa]=t,t.stateNode=n)}return null;case 13:return wt(Gu),o=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==o,o=!1,null===e?void 0!==t.memoizedProps.fallback&&Bn(t):(o=null!==(i=e.memoizedState),n||null===i||null!==(i=e.child.sibling)&&(null!==(a=t.firstEffect)?(t.firstEffect=i,i.nextEffect=a):(t.firstEffect=t.lastEffect=i,i.nextEffect=null),i.effectTag=8)),n&&!o&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Gu.current)?$c===xc&&($c=Sc):($c!==xc&&$c!==Sc||($c=Oc),0!==Rc&&null!==kc&&(oo(kc,Cc),io(kc,Rc)))),(n||o)&&(t.effectTag|=4),null);case 4:return un(),null;case 10:return Ut(t),null;case 19:if(wt(Gu),null===(o=t.memoizedState))return null;if(i=0!=(64&t.effectTag),null===(a=o.rendering)){if(i)nr(o,!1);else if($c!==xc||null!==e&&0!=(64&e.effectTag))for(a=t.child;null!==a;){if(null!==(e=ln(a))){for(t.effectTag|=64,nr(o,!1),null!==(i=e.updateQueue)&&(t.updateQueue=i,t.effectTag|=4),null===o.lastEffect&&(t.firstEffect=null),t.lastEffect=o.lastEffect,o=t.child;null!==o;)a=n,(i=o).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(e=i.alternate)?(i.childExpirationTime=0,i.expirationTime=a,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=e.childExpirationTime,i.expirationTime=e.expirationTime,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,a=e.dependencies,i.dependencies=null===a?null:{expirationTime:a.expirationTime,firstContext:a.firstContext,responders:a.responders}),o=o.sibling;return _t(Gu,1&Gu.current|2),t.child}a=a.sibling}}else{if(!i)if(null!==(e=ln(a))){if(t.effectTag|=64,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),nr(o,!0),null===o.tail&&"hidden"===o.tailMode&&!a.alternate)return null!==(t=t.lastEffect=o.lastEffect)&&(t.nextEffect=null),null}else 2*Iu()-o.renderingStartTime>o.tailExpiration&&1<n&&(t.effectTag|=64,i=!0,nr(o,!1),t.expirationTime=t.childExpirationTime=n-1);o.isBackwards?(a.sibling=t.child,t.child=a):(null!==(n=o.last)?n.sibling=a:t.child=a,o.last=a)}return null!==o.tail?(0===o.tailExpiration&&(o.tailExpiration=Iu()+500),n=o.tail,o.rendering=n,o.tail=n.sibling,o.lastEffect=t.lastEffect,o.renderingStartTime=Iu(),n.sibling=null,t=Gu.current,_t(Gu,i?1&t|2:1&t),n):null}throw Error(r(156,t.tag))},or=function(e){switch(e.tag){case 1:St(e.type)&&Ot();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(un(),wt(du),wt(pu),0!=(64&(t=e.effectTag)))throw Error(r(285));return e.effectTag=-4097&t|64,e;case 5:return sn(e),null;case 13:return wt(Gu),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return wt(Gu),null;case 4:return un(),null;case 10:return Ut(e),null;default:return null}},ir=function(e,t){return{value:e,source:t,stack:O(t)}},ar=function(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=O(n)),null!==n&&fi(n.type),t=t.value,null!==e&&1===e.tag&&fi(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}},ur=function(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Wr(e,t)}else t.current=null},cr=function(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 3:case 5:case 6:case 4:case 17:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,o=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Mt(t.type,n),o),e.__reactInternalSnapshotBeforeUpdate=t}return}throw Error(r(163))},sr=function(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}},lr=function(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}},fr=function(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void lr(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var o=n.elementType===n.type?t.memoizedProps:Mt(n.type,t.memoizedProps);e.componentDidUpdate(o,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&Gt(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}Gt(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&Re(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&ve(n)))))}throw Error(r(163))},pr=function(e,t,n){switch("function"==typeof Qc&&Qc(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;At(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var o=t;try{n()}catch(e){Wr(o,e)}}e=e.next}while(e!==r)}))}break;case 1:ur(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Wr(e,t)}}(t,n);break;case 5:ur(t);break;case 4:vr(e,t,n)}},dr=function(e){return 5===e.tag||3===e.tag||4===e.tag},hr=function(e){e:{for(var t=e.return;null!==t;){if(dr(t)){var n=t;break e}t=t.return}throw Error(r(160))}switch(t=n.stateNode,n.tag){case 5:var o=!1;break;case 3:case 4:t=t.containerInfo,o=!0;break;default:throw Error(r(161))}16&n.effectTag&&(V(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||dr(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}o?vc(e,n,t):yc(e,n,t)},vr=function(e,t,n){for(var o,i,a=t,u=!1;;){if(!u){u=a.return;e:for(;;){if(null===u)throw Error(r(160));switch(o=u.stateNode,u.tag){case 5:i=!1;break e;case 3:case 4:o=o.containerInfo,i=!0;break e}u=u.return}u=!0}if(5===a.tag||6===a.tag){e:for(var c=e,s=a,l=n,f=s;;)if(pr(c,f,l),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===s)break e;for(;null===f.sibling;){if(null===f.return||f.return===s)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}i?(c=o,s=a.stateNode,8===c.nodeType?c.parentNode.removeChild(s):c.removeChild(s)):o.removeChild(a.stateNode)}else if(4===a.tag){if(null!==a.child){o=a.stateNode.containerInfo,i=!0,a.child.return=a,a=a.child;continue}}else if(pr(e,a,n),null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;4===(a=a.return).tag&&(u=!1)}a.sibling.return=a.return,a=a.sibling}},yr=function(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void sr(3,t);case 1:case 12:case 17:return;case 5:var n=t.stateNode;if(null!=n){var o=t.memoizedProps,i=null!==e?e.memoizedProps:o;e=t.type;var a=t.updateQueue;if(t.updateQueue=null,null!==a){for(n[ua]=o,"input"===e&&"radio"===o.type&&null!=o.name&&A(n,o),ke(e,i),t=ke(e,o),i=0;i<a.length;i+=2){var u=a[i],c=a[i+1];"style"===u?Oe(n,c):"dangerouslySetInnerHTML"===u?hi(n,c):"children"===u?V(n,c):x(n,u,c,t)}switch(e){case"input":T(n,o);break;case"textarea":U(n,o);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!o.multiple,null!=(e=o.value)?L(n,!!o.multiple,e,!1):t!==!!o.multiple&&(null!=o.defaultValue?L(n,!!o.multiple,o.defaultValue,!0):L(n,!!o.multiple,o.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(r(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,ve(t.containerInfo)));case 13:if(n=t,null===t.memoizedState?o=!1:(o=!0,n=t.child,Lc=Iu()),null!==n)e:for(e=n;;){if(5===e.tag)a=e.stateNode,o?"function"==typeof(a=a.style).setProperty?a.setProperty("display","none","important"):a.display="none":(a=e.stateNode,i=null!=(i=e.memoizedProps.style)&&i.hasOwnProperty("display")?i.display:null,a.style.display=Se("display",i));else if(6===e.tag)e.stateNode.nodeValue=o?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(a=e.child.sibling).return=e,e=a;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void mr(t);case 19:return void mr(t)}throw Error(r(163))},mr=function(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new dc),t.forEach((function(t){var r=qr.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}},gr=function(e,t,n){(n=Wt(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Nc||(Nc=!0,Uc=r),ar(e,t)},n},br=function(e,t,n){(n=Wt(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return ar(e,t),r(o)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Bc?Bc=new Set([this]):Bc.add(this),ar(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n},wr=function(){return 0!=(48&Ec)?1073741821-(Iu()/10|0):0!==qc?qc:qc=1073741821-(Iu()/10|0)},_r=function(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var o=$t();if(0==(4&t))return 99===o?1073741823:1073741822;if(0!=(16&Ec))return Cc;if(null!==n)e=Lt(e,0|n.timeoutMs||5e3,250);else switch(o){case 99:e=1073741823;break;case 98:e=Lt(e,150,100);break;case 97:case 96:e=Lt(e,5e3,250);break;case 95:e=2;break;default:throw Error(r(326))}return null!==kc&&e===Cc&&--e,e},xr=function(e,t){if(50<Wc)throw Wc=0,Kc=null,Error(r(185));if(null!==(e=Sr(e,t))){var n=$t();1073741823===t?0!=(8&Ec)&&0==(48&Ec)?kr(e):(Er(e),0===Ec&&Rt()):Er(e),0==(4&Ec)||98!==n&&99!==n||(null===Hc?Hc=new Map([[e,t]]):(void 0===(n=Hc.get(e))||n>t)&&Hc.set(e,t))}},Sr=function(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,o=null;if(null===r&&3===e.tag)o=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){o=r.stateNode;break}r=r.return}return null!==o&&(kc===o&&(Ir(t),$c===Oc&&oo(o,Cc)),io(o,t)),o},Or=function(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!ro(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e},Er=function(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=It(kr.bind(null,e));else{var t=Or(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=wr();if(r=1073741823===t?99:1===t||2===t?95:0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var o=e.callbackPriority;if(e.callbackExpirationTime===t&&o>=r)return;n!==ku&&mu(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?It(kr.bind(null,e)):Tt(r,Zc.bind(null,e),{timeout:10*(1073741821-t)-Iu()}),e.callbackNode=t}}},kr=function(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&Ec))throw Error(r(327));if(Fr(),e===kc&&t===Cc||$r(e,t),null!==jc){var n=Ec;Ec|=16;for(var o=Ar();;)try{Rr();break}catch(t){Pr(e,t)}if(Nt(),Ec=n,wc.current=o,1===$c)throw n=Pc,$r(e,t),oo(e,t),Er(e),n;if(null!==jc)throw Error(r(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,kc=null,Ur(e),Er(e)}return null},jr=function(e,t){var n=Ec;Ec|=1;try{return e(t)}finally{0===(Ec=n)&&Rt()}},Cr=function(e,t){var n=Ec;Ec&=-2,Ec|=8;try{return e(t)}finally{0===(Ec=n)&&Rt()}},$r=function(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,oa(n)),null!==jc)for(n=jc.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&Ot();break;case 3:un(),wt(du),wt(pu);break;case 5:sn(r);break;case 4:un();break;case 13:case 19:wt(Gu);break;case 10:Ut(r)}n=n.return}kc=e,jc=Yr(e.current,null),Cc=t,$c=xc,Pc=null,Tc=Ac=1073741823,Ic=null,Rc=0,Dc=!1},Pr=function(e,t){for(;;){try{if(Nt(),Qu.current=rc,nc)for(var n=Xu.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(Ju=0,tc=ec=Xu=null,nc=!1,null===jc||null===jc.return)return $c=1,Pc=t,jc=null;e:{var o=e,i=jc.return,a=jc,u=t;if(t=Cc,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==u&&"object"==typeof u&&"function"==typeof u.then){var c=u;if(0==(2&a.mode)){var s=a.alternate;s?(a.updateQueue=s.updateQueue,a.memoizedState=s.memoizedState,a.expirationTime=s.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var l=0!=(1&Gu.current),f=i;do{var p;if(p=13===f.tag){var d=f.memoizedState;if(null!==d)p=null!==d.dehydrated;else{var h=f.memoizedProps;p=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!l)}}if(p){var v=f.updateQueue;if(null===v){var y=new Set;y.add(c),f.updateQueue=y}else v.add(c);if(0==(2&f.mode)){if(f.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var m=Wt(1073741823,null);m.tag=2,Kt(a,m)}a.expirationTime=1073741823;break e}u=void 0,a=t;var g=o.pingCache;if(null===g?(g=o.pingCache=new gc,u=new Set,g.set(c,u)):void 0===(u=g.get(c))&&(u=new Set,g.set(c,u)),!u.has(a)){u.add(a);var b=Kr.bind(null,o,c,a);c.then(b,b)}f.effectTag|=4096,f.expirationTime=t;break e}f=f.return}while(null!==f);u=Error((fi(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+O(a))}5!==$c&&($c=2),u=ir(u,a),f=i;do{switch(f.tag){case 3:c=u,f.effectTag|=4096,f.expirationTime=t,qt(f,gr(f,c,t));break e;case 1:c=u;var w=f.type,_=f.stateNode;if(0==(64&f.effectTag)&&("function"==typeof w.getDerivedStateFromError||null!==_&&"function"==typeof _.componentDidCatch&&(null===Bc||!Bc.has(_)))){f.effectTag|=4096,f.expirationTime=t,qt(f,br(f,c,t));break e}}f=f.return}while(null!==f)}jc=Mr(jc)}catch(e){t=e;continue}break}},Ar=function(){var e=wc.current;return wc.current=rc,null===e?rc:e},Tr=function(e,t){e<Ac&&2<e&&(Ac=e),null!==t&&e<Tc&&2<e&&(Tc=e,Ic=t)},Ir=function(e){e>Rc&&(Rc=e)},Rr=function(){for(;null!==jc;)jc=Lr(jc)},Dr=function(){for(;null!==jc&&!ju();)jc=Lr(jc)},Lr=function(e){var t=mc(e.alternate,e,Cc);return e.memoizedProps=e.pendingProps,null===t&&(t=Mr(e)),_c.current=null,t},Mr=function(e){jc=e;do{var t=jc.alternate;if(e=jc.return,0==(2048&jc.effectTag)){if(t=rr(t,jc,Cc),1===Cc||1!==jc.childExpirationTime){for(var n=0,r=jc.child;null!==r;){var o=r.expirationTime,i=r.childExpirationTime;o>n&&(n=o),i>n&&(n=i),r=r.sibling}jc.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=jc.firstEffect),null!==jc.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=jc.firstEffect),e.lastEffect=jc.lastEffect),1<jc.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=jc:e.firstEffect=jc,e.lastEffect=jc))}else{if(null!==(t=or(jc)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=jc.sibling))return t;jc=e}while(null!==jc);return $c===xc&&($c=5),null},Nr=function(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e},Ur=function(e){var t=$t();return At(99,Br.bind(null,e,t)),null},Br=function(e,t){do{Fr()}while(null!==Fc);if(0!=(48&Ec))throw Error(r(327));var n=e.finishedWork,o=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var i=Nr(n);if(e.firstPendingTime=i,o<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:o<=e.firstSuspendedTime&&(e.firstSuspendedTime=o-1),o<=e.lastPingedTime&&(e.lastPingedTime=0),o<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===kc&&(jc=kc=null,Cc=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var a=Ec;Ec|=32,_c.current=null,ta=qi;var u=Te();if(Ie(u)){if("selectionStart"in u)var c={start:u.selectionStart,end:u.selectionEnd};else e:{var s=(c=(c=u.ownerDocument)&&c.defaultView||window).getSelection&&c.getSelection();if(s&&0!==s.rangeCount){c=s.anchorNode;var l=s.anchorOffset,f=s.focusNode;s=s.focusOffset;try{c.nodeType,f.nodeType}catch(e){c=null;break e}var p=0,d=-1,h=-1,v=0,y=0,m=u,g=null;t:for(;;){for(var b;m!==c||0!==l&&3!==m.nodeType||(d=p+l),m!==f||0!==s&&3!==m.nodeType||(h=p+s),3===m.nodeType&&(p+=m.nodeValue.length),null!==(b=m.firstChild);)g=m,m=b;for(;;){if(m===u)break t;if(g===c&&++v===l&&(d=p),g===f&&++y===s&&(h=p),null!==(b=m.nextSibling))break;g=(m=g).parentNode}m=b}c=-1===d||-1===h?null:{start:d,end:h}}else c=null}c=c||{start:0,end:0}}else c=null;na={activeElementDetached:null,focusedElem:u,selectionRange:c},qi=!1,Mc=i;do{try{zr()}catch(e){if(null===Mc)throw Error(r(330));Wr(Mc,e),Mc=Mc.nextEffect}}while(null!==Mc);Mc=i;do{try{for(u=e,c=t;null!==Mc;){var w=Mc.effectTag;if(16&w&&V(Mc.stateNode,""),128&w){var _=Mc.alternate;if(null!==_){var x=_.ref;null!==x&&("function"==typeof x?x(null):x.current=null)}}switch(1038&w){case 2:hr(Mc),Mc.effectTag&=-3;break;case 6:hr(Mc),Mc.effectTag&=-3,yr(Mc.alternate,Mc);break;case 1024:Mc.effectTag&=-1025;break;case 1028:Mc.effectTag&=-1025,yr(Mc.alternate,Mc);break;case 4:yr(Mc.alternate,Mc);break;case 8:vr(u,l=Mc,c),hc(l)}Mc=Mc.nextEffect}}catch(e){if(null===Mc)throw Error(r(330));Wr(Mc,e),Mc=Mc.nextEffect}}while(null!==Mc);if(x=na,_=Te(),w=x.focusedElem,c=x.selectionRange,_!==w&&w&&w.ownerDocument&&Ji(w.ownerDocument.documentElement,w)){null!==c&&Ie(w)&&(_=c.start,void 0===(x=c.end)&&(x=_),"selectionStart"in w?(w.selectionStart=_,w.selectionEnd=Math.min(x,w.value.length)):(x=(_=w.ownerDocument||document)&&_.defaultView||window).getSelection&&(x=x.getSelection(),l=w.textContent.length,u=Math.min(c.start,l),c=void 0===c.end?u:Math.min(c.end,l),!x.extend&&u>c&&(l=c,c=u,u=l),l=Ae(w,u),f=Ae(w,c),l&&f&&(1!==x.rangeCount||x.anchorNode!==l.node||x.anchorOffset!==l.offset||x.focusNode!==f.node||x.focusOffset!==f.offset)&&((_=_.createRange()).setStart(l.node,l.offset),x.removeAllRanges(),u>c?(x.addRange(_),x.extend(f.node,f.offset)):(_.setEnd(f.node,f.offset),x.addRange(_))))),_=[];for(x=w;x=x.parentNode;)1===x.nodeType&&_.push({element:x,left:x.scrollLeft,top:x.scrollTop});for("function"==typeof w.focus&&w.focus(),w=0;w<_.length;w++)(x=_[w]).element.scrollLeft=x.left,x.element.scrollTop=x.top}qi=!!ta,na=ta=null,e.current=n,Mc=i;do{try{for(w=e;null!==Mc;){var S=Mc.effectTag;if(36&S&&fr(w,Mc.alternate,Mc),128&S){_=void 0;var O=Mc.ref;if(null!==O){var E=Mc.stateNode;Mc.tag,_=E,"function"==typeof O?O(_):O.current=_}}Mc=Mc.nextEffect}}catch(e){if(null===Mc)throw Error(r(330));Wr(Mc,e),Mc=Mc.nextEffect}}while(null!==Mc);Mc=null,Cu(),Ec=a}else e.current=n;if(zc)zc=!1,Fc=e,Vc=t;else for(Mc=i;null!==Mc;)t=Mc.nextEffect,Mc.nextEffect=null,Mc=t;if(0===(t=e.firstPendingTime)&&(Bc=null),1073741823===t?e===Kc?Wc++:(Wc=0,Kc=e):Wc=0,"function"==typeof Gc&&Gc(n.stateNode,o),Er(e),Nc)throw Nc=!1,e=Uc,Uc=null,e;return 0!=(8&Ec)||Rt(),null},zr=function(){for(;null!==Mc;){var e=Mc.effectTag;0!=(256&e)&&cr(Mc.alternate,Mc),0==(512&e)||zc||(zc=!0,Tt(97,(function(){return Fr(),null}))),Mc=Mc.nextEffect}},Fr=function(){if(90!==Vc){var e=97<Vc?97:Vc;return Vc=90,At(e,Vr)}},Vr=function(){if(null===Fc)return!1;var e=Fc;if(Fc=null,0!=(48&Ec))throw Error(r(331));var t=Ec;for(Ec|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:sr(5,n),lr(5,n)}}catch(t){if(null===e)throw Error(r(330));Wr(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return Ec=t,Rt(),!0},Hr=function(e,t,n){Kt(e,t=gr(e,t=ir(n,t),1073741823)),null!==(e=Sr(e,1073741823))&&Er(e)},Wr=function(e,t){if(3===e.tag)Hr(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Hr(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Bc||!Bc.has(r))){Kt(n,e=br(n,e=ir(t,e),1073741823)),null!==(n=Sr(n,1073741823))&&Er(n);break}}n=n.return}},Kr=function(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),kc===e&&Cc===n?$c===Oc||$c===Sc&&1073741823===Ac&&Iu()-Lc<500?$r(e,Cc):Dc=!0:ro(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,Er(e)))},qr=function(e,t){var n=e.stateNode;null!==n&&n.delete(t),0==(t=0)&&(t=_r(t=wr(),e,null)),null!==(e=Sr(e,t))&&Er(e)},Zr=function(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null},Gr=function(e,t,n,r){return new Zr(e,t,n,r)},Qr=function(e){return!(!(e=e.prototype)||!e.isReactComponent)},Yr=function(e,t){var n=e.alternate;return null===n?((n=Gr(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n},Jr=function(e,t,n,o,i,a){var u=2;if(o=e,"function"==typeof e)Qr(e)&&(u=1);else if("string"==typeof e)u=5;else e:switch(e){case Jo:return Xr(n.children,i,a,t);case ri:u=8,i|=7;break;case Xo:u=8,i|=1;break;case ei:return(e=Gr(12,n,t,8|i)).elementType=ei,e.type=ei,e.expirationTime=a,e;case ii:return(e=Gr(13,n,t,i)).type=ii,e.elementType=ii,e.expirationTime=a,e;case ai:return(e=Gr(19,n,t,i)).elementType=ai,e.expirationTime=a,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case ti:u=10;break e;case ni:u=9;break e;case oi:u=11;break e;case ui:u=14;break e;case ci:u=16,o=null;break e;case si:u=22;break e}throw Error(r(130,null==e?e:void 0===e?"undefined":v(e),""))}return(t=Gr(u,n,t,i)).elementType=e,t.type=o,t.expirationTime=a,t},Xr=function(e,t,n,r){return(e=Gr(7,e,r,t)).expirationTime=n,e},eo=function(e,t,n){return(e=Gr(6,e,null,t)).expirationTime=n,e},to=function(e,t,n){return(t=Gr(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t},no=function(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0},ro=function(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t},oo=function(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)},io=function(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))},ao=function(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)},uo=function(e,t,n,o){var i=t.current,a=wr(),u=Uu.suspense;a=_r(a,i,u);e:if(n){t:{if(q(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(r(170));var c=n;do{switch(c.tag){case 3:c=c.stateNode.context;break t;case 1:if(St(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break t}}c=c.return}while(null!==c);throw Error(r(171))}if(1===n.tag){var s=n.type;if(St(s)){n=kt(n,s,c);break e}}n=c}else n=fu;return null===t.context?t.context=n:t.pendingContext=n,(t=Wt(a,u)).payload={element:e},null!==(o=void 0===o?null:o)&&(t.callback=o),Kt(i,t),xr(i,a),a},co=function(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null},so=function(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)},lo=function(e,t){so(e,t),(e=e.alternate)&&so(e,t)},fo=function(e,t,n){var r,o,i=new no(e,t,n=null!=n&&!0===n.hydrate),a=Gr(3,null,null,2===t?7:1===t?3:0);i.current=a,a.stateNode=i,Vt(a),e[ca]=i.current,n&&0!==t&&(r=9===e.nodeType?e:e.ownerDocument,o=K(r),Mi.forEach((function(e){ae(e,r,o)})),Ni.forEach((function(e){ae(e,r,o)}))),this._internalRoot=i},po=function(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))},ho=function(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"==typeof o){var u=o;o=function(){var e=co(a);u.call(e)}}uo(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new fo(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"==typeof o){var c=o;o=function(){var e=co(a);c.call(e)}}Cr((function(){uo(t,a,e,o)}))}return co(a)},vo=function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Yo,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}},yo=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!po(t))throw Error(r(200));return vo(e,t,null,n)},mo=n(2735),go=n(4516),bo=n(9146);if(!mo)throw Error(r(227));var wo=!1,_o=null,xo=!1,So=null,Oo={onError:function(e){wo=!0,_o=e}},Eo=null,ko=null,jo=null,Co=null,$o={},Po=[],Ao={},To={},Io={},Ro=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Do=null,Lo=null,Mo=null,No=h,Uo=!1,Bo=!1,zo=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Fo=Object.prototype.hasOwnProperty,Vo={},Ho={},Wo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){Wo[e]=new w(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];Wo[t]=new w(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){Wo[e]=new w(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){Wo[e]=new w(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){Wo[e]=new w(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){Wo[e]=new w(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){Wo[e]=new w(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){Wo[e]=new w(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){Wo[e]=new w(e,5,!1,e.toLowerCase(),null,!1)}));var Ko=/[\-:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(Ko,_);Wo[t]=new w(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(Ko,_);Wo[t]=new w(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(Ko,_);Wo[t]=new w(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){Wo[e]=new w(e,1,!1,e.toLowerCase(),null,!1)})),Wo.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){Wo[e]=new w(e,1,!1,e.toLowerCase(),null,!0)}));var qo=mo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;qo.hasOwnProperty("ReactCurrentDispatcher")||(qo.ReactCurrentDispatcher={current:null}),qo.hasOwnProperty("ReactCurrentBatchConfig")||(qo.ReactCurrentBatchConfig={suspense:null});var Zo=/^(.*)[\\\/]/,Go="function"==typeof Symbol&&Symbol.for,Qo=Go?Symbol.for("react.element"):60103,Yo=Go?Symbol.for("react.portal"):60106,Jo=Go?Symbol.for("react.fragment"):60107,Xo=Go?Symbol.for("react.strict_mode"):60108,ei=Go?Symbol.for("react.profiler"):60114,ti=Go?Symbol.for("react.provider"):60109,ni=Go?Symbol.for("react.context"):60110,ri=Go?Symbol.for("react.concurrent_mode"):60111,oi=Go?Symbol.for("react.forward_ref"):60112,ii=Go?Symbol.for("react.suspense"):60113,ai=Go?Symbol.for("react.suspense_list"):60120,ui=Go?Symbol.for("react.memo"):60115,ci=Go?Symbol.for("react.lazy"):60116,si=Go?Symbol.for("react.block"):60121,li="function"==typeof Symbol&&Symbol.iterator;function fi(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Jo:return"Fragment";case Yo:return"Portal";case ei:return"Profiler";case Xo:return"StrictMode";case ii:return"Suspense";case ai:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ni:return"Context.Consumer";case ti:return"Context.Provider";case oi:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case ui:return fi(e.type);case si:return fi(e.render);case ci:if(e=1===e._status?e._result:null)return fi(e)}return null}var pi,di,hi=(di=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((pi=pi||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return di(e,t)}))}:di),vi={animationend:H("Animation","AnimationEnd"),animationiteration:H("Animation","AnimationIteration"),animationstart:H("Animation","AnimationStart"),transitionend:H("Transition","TransitionEnd")},yi={},mi={};Ro&&(mi=document.createElement("div").style,"AnimationEvent"in window||(delete vi.animationend.animation,delete vi.animationiteration.animation,delete vi.animationstart.animation),"TransitionEvent"in window||delete vi.transitionend.transition);var gi,bi,wi,_i=W("animationend"),xi=W("animationiteration"),Si=W("animationstart"),Oi=W("transitionend"),Ei="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ki=new("function"==typeof WeakMap?WeakMap:Map),ji=null,Ci=[],$i=!1,Pi=[],Ai=null,Ti=null,Ii=null,Ri=new Map,Di=new Map,Li=[],Mi="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Ni="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" "),Ui={},Bi=new Map,zi=new Map,Fi=["abort","abort",_i,"animationEnd",xi,"animationIteration",Si,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Oi,"transitionEnd","waiting","waiting"];ye("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),ye("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),ye(Fi,2);for(var Vi="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Hi=0;Hi<Vi.length;Hi++)zi.set(Vi[Hi],0);var Wi=bo.unstable_UserBlockingPriority,Ki=bo.unstable_runWithPriority,qi=!0,Zi={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Gi=["Webkit","ms","Moz","O"];Object.keys(Zi).forEach((function(e){Gi.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zi[t]=Zi[e]}))}));var Qi=go({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),Yi="http://www.w3.org/1999/xhtml";function Ji(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Ji(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var Xi="$?",ea="$!",ta=null,na=null,ra="function"==typeof setTimeout?setTimeout:void 0,oa="function"==typeof clearTimeout?clearTimeout:void 0,ia=Math.random().toString(36).slice(2),aa="__reactInternalInstance$"+ia,ua="__reactEventHandlers$"+ia,ca="__reactContainere$"+ia,sa=null,la=null,fa=null;go(Je.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=v(e.returnValue)&&(e.returnValue=!1),this.isDefaultPrevented=Qe)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=v(e.cancelBubble)&&(e.cancelBubble=!0),this.isPropagationStopped=Qe)},persist:function(){this.isPersistent=Qe},isPersistent:Ye,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Ye,this._dispatchInstances=this._dispatchListeners=null}}),Je.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Je.extend=function(e){var t=function(){},n=function(){return r.apply(this,arguments)},r=this;t.prototype=r.prototype;var o=new t;return go(o,n.prototype),(n.prototype=o).constructor=n,n.Interface=go({},r.Interface,e),n.extend=r.extend,tt(n),n},tt(Je);var pa=Je.extend({data:null}),da=Je.extend({data:null}),ha=[9,13,27,32],va=Ro&&"CompositionEvent"in window,ya=null;Ro&&"documentMode"in document&&(ya=document.documentMode);var ma=Ro&&"TextEvent"in window&&!ya,ga=Ro&&(!va||ya&&8<ya&&11>=ya),ba=String.fromCharCode(32),wa={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},_a=!1,xa=!1,Sa={eventTypes:wa,extractEvents:function(e,t,n,r){var o;if(va)e:{switch(e){case"compositionstart":var i=wa.compositionStart;break e;case"compositionend":i=wa.compositionEnd;break e;case"compositionupdate":i=wa.compositionUpdate;break e}i=void 0}else xa?nt(e,n)&&(i=wa.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=wa.compositionStart);return i?(ga&&"ko"!==n.locale&&(xa||i!==wa.compositionStart?i===wa.compositionEnd&&xa&&(o=Ge()):(la="value"in(sa=r)?sa.value:sa.textContent,xa=!0)),i=pa.getPooled(i,t,n,r),(o||null!==(o=rt(n)))&&(i.data=o),Ze(i),o=i):o=null,(e=ma?function(e,t){switch(e){case"compositionend":return rt(t);case"keypress":return 32!==t.which?null:(_a=!0,ba);case"textInput":return(e=t.data)===ba&&_a?null:e;default:return null}}(e,n):function(e,t){if(xa)return"compositionend"===e||!va&&nt(e,t)?(e=Ge(),fa=la=sa=null,xa=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ga&&"ko"!==t.locale?null:t.data}}(e,n))?((t=da.getPooled(wa.beforeInput,t,n,r)).data=e,Ze(t)):t=null,null===o?t:null===t?o:[o,t]}},Oa={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},Ea={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}},ka=null,ja=null,Ca=!1;Ro&&(Ca=ne("input")&&(!document.documentMode||9<document.documentMode));var $a={eventTypes:Ea,_isInputEventSupported:Ca,extractEvents:function(e,t,n,r){var o=t?Be(t):window,i=o.nodeName&&o.nodeName.toLowerCase();if("select"===i||"input"===i&&"file"===o.type)var a=ct;else if(ot(o))if(Ca)a=ht;else{a=pt;var u=ft}else(i=o.nodeName)&&"input"===i.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(a=dt);if(a&&(a=a(e,t)))return it(a,n,r);u&&u(e,o,t),"blur"===e&&(e=o._wrapperState)&&e.controlled&&"number"===o.type&&R(o,"number",o.value)}},Pa=Je.extend({view:null,detail:null}),Aa={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},Ta=0,Ia=0,Ra=!1,Da=!1,La=Pa.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:yt,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Ta;return Ta=e.screenX,Ra?"mousemove"===e.type?e.screenX-t:0:(Ra=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Ia;return Ia=e.screenY,Da?"mousemove"===e.type?e.screenY-t:0:(Da=!0,0)}}),Ma=La.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Na={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Ua={eventTypes:Na,extractEvents:function(e,t,n,r,o){var i="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(i&&0==(32&o)&&(n.relatedTarget||n.fromElement)||!a&&!i)return null;if(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,a?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?Ne(t):null)&&(t!==q(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null,a===t)return null;if("mouseout"===e||"mouseover"===e)var u=La,c=Na.mouseLeave,s=Na.mouseEnter,l="mouse";else"pointerout"!==e&&"pointerover"!==e||(u=Ma,c=Na.pointerLeave,s=Na.pointerEnter,l="pointer");if(e=null==a?i:Be(a),i=null==t?i:Be(t),(c=u.getPooled(c,a,n,r)).type=l+"leave",c.target=e,c.relatedTarget=i,(n=u.getPooled(s,t,n,r)).type=l+"enter",n.target=i,n.relatedTarget=e,l=t,(r=a)&&l)e:{for(s=l,a=0,e=u=r;e;e=Fe(e))a++;for(e=0,t=s;t;t=Fe(t))e++;for(;0<a-e;)u=Fe(u),a--;for(;0<e-a;)s=Fe(s),e--;for(;a--;){if(u===s||u===s.alternate)break e;u=Fe(u),s=Fe(s)}u=null}else u=null;for(s=u,u=[];r&&r!==s&&(null===(a=r.alternate)||a!==s);)u.push(r),r=Fe(r);for(r=[];l&&l!==s&&(null===(a=l.alternate)||a!==s);)r.push(l),l=Fe(l);for(l=0;l<u.length;l++)Ke(u[l],"bubbled",c);for(l=r.length;0<l--;)Ke(r[l],"captured",n);return 0==(64&o)?[c]:[c,n]}},Ba="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},za=Object.prototype.hasOwnProperty,Fa=Ro&&"documentMode"in document&&11>=document.documentMode,Va={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Ha=null,Wa=null,Ka=null,qa=!1,Za={eventTypes:Va,extractEvents:function(e,t,n,r,o,i){if(!(i=!(o=i||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{o=K(o),i=Io.onSelect;for(var a=0;a<i.length;a++)if(!o.has(i[a])){o=!1;break e}o=!0}i=!o}if(i)return null;switch(o=t?Be(t):window,e){case"focus":(ot(o)||"true"===o.contentEditable)&&(Ha=o,Wa=t,Ka=null);break;case"blur":Ka=Wa=Ha=null;break;case"mousedown":qa=!0;break;case"contextmenu":case"mouseup":case"dragend":return qa=!1,gt(n,r);case"selectionchange":if(Fa)break;case"keydown":case"keyup":return gt(n,r)}return null}},Ga=Je.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Qa=Je.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ya=Pa.extend({relatedTarget:null}),Ja={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xa={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},eu=Pa.extend({key:function(e){if(e.key){var t=Ja[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=bt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Xa[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:yt,charCode:function(e){return"keypress"===e.type?bt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?bt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),tu=La.extend({dataTransfer:null}),nu=Pa.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:yt}),ru=Je.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ou=La.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),iu={eventTypes:Ui,extractEvents:function(e,t,n,r){var o=Bi.get(e);if(!o)return null;switch(e){case"keypress":if(0===bt(n))return null;case"keydown":case"keyup":e=eu;break;case"blur":case"focus":e=Ya;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=La;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=tu;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=nu;break;case _i:case xi:case Si:e=Ga;break;case Oi:e=ru;break;case"scroll":e=Pa;break;case"wheel":e=ou;break;case"copy":case"cut":case"paste":e=Qa;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Ma;break;default:e=Je}return Ze(t=e.getPooled(o,t,n,r)),t}};if(Co)throw Error(r(101));Co=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),u(),Eo=ze,ko=Ue,jo=Be,s({SimpleEventPlugin:iu,EnterLeaveEventPlugin:Ua,ChangeEventPlugin:$a,SelectEventPlugin:Za,BeforeInputEventPlugin:Sa});var au,uu,cu,su=[],lu=-1,fu={},pu={current:fu},du={current:!1},hu=fu,vu=bo.unstable_runWithPriority,yu=bo.unstable_scheduleCallback,mu=bo.unstable_cancelCallback,gu=bo.unstable_requestPaint,bu=bo.unstable_now,wu=bo.unstable_getCurrentPriorityLevel,_u=bo.unstable_ImmediatePriority,xu=bo.unstable_UserBlockingPriority,Su=bo.unstable_NormalPriority,Ou=bo.unstable_LowPriority,Eu=bo.unstable_IdlePriority,ku={},ju=bo.unstable_shouldYield,Cu=void 0!==gu?gu:function(){},$u=null,Pu=null,Au=!1,Tu=bu(),Iu=1e4>Tu?bu:function(){return bu()-Tu},Ru={current:null},Du=null,Lu=null,Mu=null,Nu=!1,Uu=qo.ReactCurrentBatchConfig,Bu=(new mo.Component).refs,zu={isMounted:function(e){return!!(e=e._reactInternalFiber)&&q(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=wr(),o=Uu.suspense;(o=Wt(r=_r(r,e,o),o)).payload=t,null!=n&&(o.callback=n),Kt(e,o),xr(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=wr(),o=Uu.suspense;(o=Wt(r=_r(r,e,o),o)).tag=1,o.payload=t,null!=n&&(o.callback=n),Kt(e,o),xr(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=wr(),r=Uu.suspense;(r=Wt(n=_r(n,e,r),r)).tag=2,null!=t&&(r.callback=t),Kt(e,r),xr(e,n)}},Fu=Array.isArray,Vu=rn(!0),Hu=rn(!1),Wu={},Ku={current:Wu},qu={current:Wu},Zu={current:Wu},Gu={current:0},Qu=qo.ReactCurrentDispatcher,Yu=qo.ReactCurrentBatchConfig,Ju=0,Xu=null,ec=null,tc=null,nc=!1,rc={readContext:Ft,useCallback:pn,useContext:pn,useEffect:pn,useImperativeHandle:pn,useLayoutEffect:pn,useMemo:pn,useReducer:pn,useRef:pn,useState:pn,useDebugValue:pn,useResponder:pn,useDeferredValue:pn,useTransition:pn},oc={readContext:Ft,useCallback:An,useContext:Ft,useEffect:En,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Sn(4,2,Cn.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Sn(4,2,e,t)},useMemo:function(e,t){var n=vn();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=vn();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Dn.bind(null,Xu,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},vn().memoizedState=e},useState:wn,useDebugValue:Pn,useResponder:fn,useDeferredValue:function(e,t){var n=wn(e),r=n[0],o=n[1];return En((function(){var n=Yu.suspense;Yu.suspense=void 0===t?null:t;try{o(e)}finally{Yu.suspense=n}}),[e,t]),r},useTransition:function(e){var t=wn(!1),n=t[0];return t=t[1],[An(Rn.bind(null,t,e),[t,e]),n]}},ic={readContext:Ft,useCallback:Tn,useContext:Ft,useEffect:kn,useImperativeHandle:$n,useLayoutEffect:jn,useMemo:In,useReducer:gn,useRef:xn,useState:function(){return gn(mn)},useDebugValue:Pn,useResponder:fn,useDeferredValue:function(e,t){var n=gn(mn),r=n[0],o=n[1];return kn((function(){var n=Yu.suspense;Yu.suspense=void 0===t?null:t;try{o(e)}finally{Yu.suspense=n}}),[e,t]),r},useTransition:function(e){var t=gn(mn),n=t[0];return t=t[1],[Tn(Rn.bind(null,t,e),[t,e]),n]}},ac={readContext:Ft,useCallback:Tn,useContext:Ft,useEffect:kn,useImperativeHandle:$n,useLayoutEffect:jn,useMemo:In,useReducer:bn,useRef:xn,useState:function(){return bn(mn)},useDebugValue:Pn,useResponder:fn,useDeferredValue:function(e,t){var n=bn(mn),r=n[0],o=n[1];return kn((function(){var n=Yu.suspense;Yu.suspense=void 0===t?null:t;try{o(e)}finally{Yu.suspense=n}}),[e,t]),r},useTransition:function(e){var t=bn(mn),n=t[0];return t=t[1],[Tn(Rn.bind(null,t,e),[t,e]),n]}},uc=null,cc=null,sc=!1,lc=qo.ReactCurrentOwner,fc=!1,pc={dehydrated:null,retryTime:0};au=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},uu=function(e,t,n,r,o){var i=e.memoizedProps;if(i!==r){var a,u,c=t.stateNode;switch(on(Ku.current),e=null,n){case"input":i=$(c,i),r=$(c,r),e=[];break;case"option":i=D(c,i),r=D(c,r),e=[];break;case"select":i=go({},i,{value:void 0}),r=go({},r,{value:void 0}),e=[];break;case"textarea":i=M(c,i),r=M(c,r),e=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(c.onclick=Ce)}for(a in Ee(n,r),n=null,i)if(!r.hasOwnProperty(a)&&i.hasOwnProperty(a)&&null!=i[a])if("style"===a)for(u in c=i[a])c.hasOwnProperty(u)&&(n||(n={}),n[u]="");else"dangerouslySetInnerHTML"!==a&&"children"!==a&&"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(To.hasOwnProperty(a)?e||(e=[]):(e=e||[]).push(a,null));for(a in r){var s=r[a];if(c=null!=i?i[a]:void 0,r.hasOwnProperty(a)&&s!==c&&(null!=s||null!=c))if("style"===a)if(c){for(u in c)!c.hasOwnProperty(u)||s&&s.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in s)s.hasOwnProperty(u)&&c[u]!==s[u]&&(n||(n={}),n[u]=s[u])}else n||(e||(e=[]),e.push(a,n)),n=s;else"dangerouslySetInnerHTML"===a?(s=s?s.__html:void 0,c=c?c.__html:void 0,null!=s&&c!==s&&(e=e||[]).push(a,s)):"children"===a?c===s||"string"!=typeof s&&"number"!=typeof s||(e=e||[]).push(a,""+s):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&(To.hasOwnProperty(a)?(null!=s&&je(o,a),e||c===s||(e=[])):(e=e||[]).push(a,s))}n&&(e=e||[]).push("style",n),o=e,(t.updateQueue=o)&&(t.effectTag|=4)}},cu=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var dc="function"==typeof WeakSet?WeakSet:Set;function hc(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&hc(t)}function vc(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Ce));else if(4!==r&&null!==(e=e.child))for(vc(e,t,n),e=e.sibling;null!==e;)vc(e,t,n),e=e.sibling}function yc(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(yc(e,t,n),e=e.sibling;null!==e;)yc(e,t,n),e=e.sibling}var mc,gc="function"==typeof WeakMap?WeakMap:Map,bc=Math.ceil,wc=qo.ReactCurrentDispatcher,_c=qo.ReactCurrentOwner,xc=0,Sc=3,Oc=4,Ec=0,kc=null,jc=null,Cc=0,$c=xc,Pc=null,Ac=1073741823,Tc=1073741823,Ic=null,Rc=0,Dc=!1,Lc=0,Mc=null,Nc=!1,Uc=null,Bc=null,zc=!1,Fc=null,Vc=90,Hc=null,Wc=0,Kc=null,qc=0;function Zc(e,t){if(qc=0,t)return ao(e,t=wr()),Er(e),null;var n=Or(e);if(0!==n){if(t=e.callbackNode,0!=(48&Ec))throw Error(r(327));if(Fr(),e===kc&&n===Cc||$r(e,n),null!==jc){var o=Ec;Ec|=16;for(var i=Ar();;)try{Dr();break}catch(t){Pr(e,t)}if(Nt(),Ec=o,wc.current=i,1===$c)throw t=Pc,$r(e,n),oo(e,n),Er(e),t;if(null===jc)switch(i=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,o=$c,kc=null,o){case xc:case 1:throw Error(r(345));case 2:ao(e,2<n?2:n);break;case Sc:if(oo(e,n),n===(o=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=Nr(i)),1073741823===Ac&&10<(i=Lc+500-Iu())){if(Dc){var a=e.lastPingedTime;if(0===a||a>=n){e.lastPingedTime=n,$r(e,n);break}}if(0!==(a=Or(e))&&a!==n)break;if(0!==o&&o!==n){e.lastPingedTime=o;break}e.timeoutHandle=ra(Ur.bind(null,e),i);break}Ur(e);break;case Oc:if(oo(e,n),n===(o=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=Nr(i)),Dc&&(0===(i=e.lastPingedTime)||i>=n)){e.lastPingedTime=n,$r(e,n);break}if(0!==(i=Or(e))&&i!==n)break;if(0!==o&&o!==n){e.lastPingedTime=o;break}if(1073741823!==Tc?o=10*(1073741821-Tc)-Iu():1073741823===Ac?o=0:(o=10*(1073741821-Ac)-5e3,0>(o=(i=Iu())-o)&&(o=0),(n=10*(1073741821-n)-i)<(o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*bc(o/1960))-o)&&(o=n)),10<o){e.timeoutHandle=ra(Ur.bind(null,e),o);break}Ur(e);break;case 5:if(1073741823!==Ac&&null!==Ic){a=Ac;var u=Ic;if(0>=(o=0|u.busyMinDurationMs)?o=0:(i=0|u.busyDelayMs,o=(a=Iu()-(10*(1073741821-a)-(0|u.timeoutMs||5e3)))<=i?0:i+o-a),10<o){oo(e,n),e.timeoutHandle=ra(Ur.bind(null,e),o);break}}Ur(e);break;default:throw Error(r(329))}if(Er(e),e.callbackNode===t)return Zc.bind(null,e)}}return null}mc=function(e,t,n){var o=t.expirationTime;if(null!==e){var i=t.pendingProps;if(e.memoizedProps!==i||du.current)fc=!0;else{if(o<n){switch(fc=!1,t.tag){case 3:Qn(t),zn();break;case 5:if(cn(t),4&t.mode&&1!==n&&i.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:St(t.type)&&jt(t);break;case 4:an(t,t.stateNode.containerInfo);break;case 10:o=t.memoizedProps.value,i=t.type._context,_t(Ru,i._currentValue),i._currentValue=o;break;case 13:if(null!==t.memoizedState)return 0!==(o=t.child.childExpirationTime)&&o>=n?Yn(e,t,n):(_t(Gu,1&Gu.current),null!==(t=tr(e,t,n))?t.sibling:null);_t(Gu,1&Gu.current);break;case 19:if(o=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(o)return er(e,t,n);t.effectTag|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null),_t(Gu,Gu.current),!o)return null}return tr(e,t,n)}fc=!1}}else fc=!1;switch(t.expirationTime=0,t.tag){case 2:if(o=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=xt(t,pu.current),zt(t,n),i=hn(null,t,o,e,i,n),t.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,St(o)){var a=!0;jt(t)}else a=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Vt(t);var u=o.getDerivedStateFromProps;"function"==typeof u&&Qt(t,o,u,e),i.updater=zu,t.stateNode=i,i._reactInternalFiber=t,en(t,o,e,n),t=Gn(null,t,o,!0,a,n)}else t.tag=0,Fn(null,t,i,n),t=t.child;return t;case 16:e:{if(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(i),1!==i._status)throw i._result;switch(i=i._result,t.type=i,a=t.tag=function(e){if("function"==typeof e)return Qr(e)?1:0;if(null!=e){if((e=e.$$typeof)===oi)return 11;if(e===ui)return 14}return 2}(i),e=Mt(i,e),a){case 0:t=qn(null,t,i,e,n);break e;case 1:t=Zn(null,t,i,e,n);break e;case 11:t=Vn(null,t,i,e,n);break e;case 14:t=Hn(null,t,i,Mt(i.type,e),o,n);break e}throw Error(r(306,i,""))}return t;case 0:return o=t.type,i=t.pendingProps,qn(e,t,o,i=t.elementType===o?i:Mt(o,i),n);case 1:return o=t.type,i=t.pendingProps,Zn(e,t,o,i=t.elementType===o?i:Mt(o,i),n);case 3:if(Qn(t),o=t.updateQueue,null===e||null===o)throw Error(r(282));if(o=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,Ht(e,t),Zt(t,o,null,n),(o=t.memoizedState.element)===i)zn(),t=tr(e,t,n);else{if((i=t.stateNode.hydrate)&&(cc=Le(t.stateNode.containerInfo.firstChild),uc=t,i=sc=!0),i)for(n=Hu(t,null,o,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Fn(e,t,o,n),zn();t=t.child}return t;case 5:return cn(t),null===e&&Nn(t),o=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,u=i.children,De(o,i)?u=null:null!==a&&De(o,a)&&(t.effectTag|=16),Kn(e,t),4&t.mode&&1!==n&&i.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Fn(e,t,u,n),t=t.child),t;case 6:return null===e&&Nn(t),null;case 13:return Yn(e,t,n);case 4:return an(t,t.stateNode.containerInfo),o=t.pendingProps,null===e?t.child=Vu(t,null,o,n):Fn(e,t,o,n),t.child;case 11:return o=t.type,i=t.pendingProps,Vn(e,t,o,i=t.elementType===o?i:Mt(o,i),n);case 7:return Fn(e,t,t.pendingProps,n),t.child;case 8:case 12:return Fn(e,t,t.pendingProps.children,n),t.child;case 10:e:{o=t.type._context,i=t.pendingProps,u=t.memoizedProps,a=i.value;var c=t.type._context;if(_t(Ru,c._currentValue),c._currentValue=a,null!==u)if(c=u.value,0==(a=Ba(c,a)?0:0|("function"==typeof o._calculateChangedBits?o._calculateChangedBits(c,a):1073741823))){if(u.children===i.children&&!du.current){t=tr(e,t,n);break e}}else for(null!==(c=t.child)&&(c.return=t);null!==c;){var s=c.dependencies;if(null!==s){u=c.child;for(var l=s.firstContext;null!==l;){if(l.context===o&&0!=(l.observedBits&a)){1===c.tag&&((l=Wt(n,null)).tag=2,Kt(c,l)),c.expirationTime<n&&(c.expirationTime=n),null!==(l=c.alternate)&&l.expirationTime<n&&(l.expirationTime=n),Bt(c.return,n),s.expirationTime<n&&(s.expirationTime=n);break}l=l.next}}else u=10===c.tag&&c.type===t.type?null:c.child;if(null!==u)u.return=c;else for(u=c;null!==u;){if(u===t){u=null;break}if(null!==(c=u.sibling)){c.return=u.return,u=c;break}u=u.return}c=u}Fn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,o=(a=t.pendingProps).children,zt(t,n),o=o(i=Ft(i,a.unstable_observedBits)),t.effectTag|=1,Fn(e,t,o,n),t.child;case 14:return a=Mt(i=t.type,t.pendingProps),Hn(e,t,i,a=Mt(i.type,a),o,n);case 15:return Wn(e,t,t.type,t.pendingProps,o,n);case 17:return o=t.type,i=t.pendingProps,i=t.elementType===o?i:Mt(o,i),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,St(o)?(e=!0,jt(t)):e=!1,zt(t,n),Jt(t,o,i),en(t,o,i,n),Gn(null,t,o,!0,e,n);case 19:return er(e,t,n)}throw Error(r(156,t.tag))};var Gc=null,Qc=null;fo.prototype.render=function(e){uo(e,this._internalRoot,null,null)},fo.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;uo(null,e,null,(function(){t[ca]=null}))},gi=function(e){if(13===e.tag){var t=Lt(wr(),150,100);xr(e,t),lo(e,t)}},bi=function(e){13===e.tag&&(xr(e,3),lo(e,3))},wi=function(e){if(13===e.tag){var t=wr();xr(e,t=_r(t,e,null)),lo(e,t)}},Do=function(e,t,n){switch(t){case"input":if(T(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var i=ze(o);if(!i)throw Error(r(90));C(o),T(o,i)}}}break;case"textarea":U(e,n);break;case"select":null!=(t=n.value)&&L(e,!!n.multiple,t,!1)}},h=jr,y=function(e,t,n,r,o){var i=Ec;Ec|=4;try{return At(98,e.bind(null,t,n,r,o))}finally{0===(Ec=i)&&Rt()}},m=function(){0==(49&Ec)&&(function(){if(null!==Hc){var e=Hc;Hc=null,e.forEach((function(e,t){ao(t,e),Er(t)})),Rt()}}(),Fr())},No=function(e,t){var n=Ec;Ec|=2;try{return e(t)}finally{0===(Ec=n)&&Rt()}};var Yc,Jc,Xc={Events:[Ue,Be,ze,s,Ao,Ze,function(e){J(e,qe)},p,d,_e,ee,Fr,{current:!1}]};Jc=(Yc={findFiberByHostInstance:Ne,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}).findFiberByHostInstance,function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Gc=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},Qc=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}}(go({},Yc,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:qo.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Q(e))?null:e.stateNode},findFiberByHostInstance:function(e){return Jc?Jc(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null})),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xc,t.createPortal=yo,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(r(188));throw Error(r(268,Object.keys(e)))}return null===(e=Q(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!=(48&Ec))throw Error(r(187));var n=Ec;Ec|=1;try{return At(99,e.bind(null,t))}finally{Ec=n,Rt()}},t.hydrate=function(e,t,n){if(!po(t))throw Error(r(200));return ho(null,e,t,!0,n)},t.render=function(e,t,n){if(!po(t))throw Error(r(200));return ho(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!po(e))throw Error(r(40));return!!e._reactRootContainer&&(Cr((function(){ho(null,null,e,!1,(function(){e._reactRootContainer=null,e[ca]=null}))})),!0)},t.unstable_batchedUpdates=jr,t.unstable_createPortal=function(e,t){return yo(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,o){if(!po(n))throw Error(r(200));if(null==e||void 0===e._reactInternalFiber)throw Error(r(38));return ho(e,t,n,!1,o)},t.version="16.14.0"},2788:function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(3975)},6697:function(e,t){"use strict";var n=function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case p:case d:case u:case s:case c:case v:return e;default:switch(e=e&&e.$$typeof){case f:case h:case g:case m:case l:return e;default:return t}}case a:return t}}},r=function(e){return n(e)===d},o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,s=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.async_mode"):60111,d=o?Symbol.for("react.concurrent_mode"):60111,h=o?Symbol.for("react.forward_ref"):60112,v=o?Symbol.for("react.suspense"):60113,y=o?Symbol.for("react.suspense_list"):60120,m=o?Symbol.for("react.memo"):60115,g=o?Symbol.for("react.lazy"):60116,b=o?Symbol.for("react.block"):60121,w=o?Symbol.for("react.fundamental"):60117,_=o?Symbol.for("react.responder"):60118,x=o?Symbol.for("react.scope"):60119;t.AsyncMode=p,t.ConcurrentMode=d,t.ContextConsumer=f,t.ContextProvider=l,t.Element=i,t.ForwardRef=h,t.Fragment=u,t.Lazy=g,t.Memo=m,t.Portal=a,t.Profiler=s,t.StrictMode=c,t.Suspense=v,t.isAsyncMode=function(e){return r(e)||n(e)===p},t.isConcurrentMode=r,t.isContextConsumer=function(e){return n(e)===f},t.isContextProvider=function(e){return n(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return n(e)===h},t.isFragment=function(e){return n(e)===u},t.isLazy=function(e){return n(e)===g},t.isMemo=function(e){return n(e)===m},t.isPortal=function(e){return n(e)===a},t.isProfiler=function(e){return n(e)===s},t.isStrictMode=function(e){return n(e)===c},t.isSuspense=function(e){return n(e)===v},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===u||e===d||e===s||e===c||e===v||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===f||e.$$typeof===h||e.$$typeof===w||e.$$typeof===_||e.$$typeof===x||e.$$typeof===b)},t.typeOf=n},2594:function(e,t,n){"use strict";e.exports=n(6697)},9547:function(e){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},2816:function(e,t,n){var r=function(e,t){for(var n,r=[],o=0,i=0,c="",s=t&&t.delimiter||"/";null!=(n=d.exec(e));){var l=n[0],f=n[1],p=n.index;if(c+=e.slice(i,p),i=p+l.length,f)c+=f[1];else{var h=e[i],v=n[2],y=n[3],m=n[4],g=n[5],b=n[6],w=n[7];c&&(r.push(c),c="");var _=null!=v&&null!=h&&h!==v,x="+"===b||"*"===b,S="?"===b||"*"===b,O=n[2]||s,E=m||g;r.push({name:y||o++,prefix:v||"",delimiter:O,optional:S,repeat:x,partial:_,asterisk:!!w,pattern:E?u(E):w?".*":"[^"+a(O)+"]+?"})}}return i<e.length&&(c+=e.substr(i)),c&&r.push(c),r},o=function(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))},i=function(e,t){for(var n=new Array(e.length),r=0;r<e.length;r++)"object"==typeof e[r]&&(n[r]=new RegExp("^(?:"+e[r].pattern+")$",s(t)));return function(t,r){for(var i=function(t,r,o,i){var u=e[i];if("string"!=typeof u){var c,s=r[u.name];if(null==s){if(u.optional)return u.partial&&(t+=u.prefix),a=t,"continue";throw new TypeError('Expected "'+u.name+'" to be defined')}if(p(s)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(s)+"`");if(0===s.length){if(u.optional)return a=t,"continue";throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var l=0;l<s.length;l++){if(c=o(s[l]),!n[i].test(c))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(c)+"`");t+=(0===l?u.prefix:u.delimiter)+c}}else{if(c=u.asterisk?encodeURI(s).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):o(s),!n[i].test(c))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+c+'"');t+=u.prefix+c}}else t+=u;a=t},a="",u=t||{},c=(r||{}).pretty?o:encodeURIComponent,s=0;s<e.length;s++)i(a,u,c,s);return a}},a=function(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")},u=function(e){return e.replace(/([=!:$\/()])/g,"\\$1")},c=function(e,t){return e.keys=t,e},s=function(e){return e&&e.sensitive?"":"i"},f=function(e,t,n){p(t)||(n=t||n,t=[]);for(var r=(n=n||{}).strict,o=!1!==n.end,i="",u=0;u<e.length;u++){var l=e[u];if("string"==typeof l)i+=a(l);else{var f=a(l.prefix),d="(?:"+l.pattern+")";t.push(l),l.repeat&&(d+="(?:"+f+d+")*"),i+=d=l.optional?l.partial?f+"("+d+")?":"(?:"+f+"("+d+"))?":f+"("+d+")"}}var h=a(n.delimiter||"/"),v=i.slice(-h.length)===h;return r||(i=(v?i.slice(0,-h.length):i)+"(?:"+h+"(?=$))?"),i+=o?"$":r&&v?"":"(?="+h+"|$)",c(new RegExp("^"+i,s(n)),t)},p=n(9547);e.exports=function e(t,n,o){return p(n)||(o=n||o,n=[]),o=o||{},l(t,RegExp)?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return c(e,t)}(t,n):p(t)?function(t,n,r){for(var o=[],i=0;i<t.length;i++)o.push(e(t[i],n,r).source);return c(new RegExp("(?:"+o.join("|")+")",s(r)),n)}(t,n,o):(i=n,f(r(t,a=o),i,a));var i,a},e.exports.parse=r,e.exports.compile=function(e,t){return i(r(e,t),t)},e.exports.tokensToFunction=i,e.exports.tokensToRegExp=f;var d=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g")},8447:function(e,t,n){"use strict";var r=function(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."},o=function(e,t,n){this.props=e,this.context=t,this.refs=I,this.updater=n||T},i=function(){},a=function(e,t,n){this.props=e,this.context=t,this.refs=I,this.updater=n||T},u=function(e,t,n){var r,o={},i=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)L.call(t,r)&&!M.hasOwnProperty(r)&&(o[r]=t[r]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var c=Array(u),s=0;s<u;s++)c[s]=arguments[s+2];o.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===o[r]&&(o[r]=u[r]);return{$$typeof:w,type:e,key:i,ref:a,props:o,_owner:D.current}},c=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===w},s=function(e,t,n,r){if(U.length){var o=U.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}},l=function(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>U.length&&U.push(e)},f=function(e,t,n){return null==e?0:B(e,"",t,n)},p=function(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r},d=function(e,t){e.func.call(e.context,t,e.count++)},h=function(e,t,n){var r,o,i=e.result,a=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?y(e,i,n,(function(e){return e})):null!=e&&(c(e)&&(r=e,o=a+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(N,"$&/")+"/")+n,e={$$typeof:w,type:r.type,key:o,ref:r.ref,props:r.props,_owner:r._owner}),i.push(e))},y=function(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(N,"$&/")+"/"),f(e,h,t=s(t,i,r,o)),l(t)},m=function(){var e=z.current;if(null===e)throw Error(r(321));return e},g=n(4516),b="function"==typeof Symbol&&Symbol.for,w=b?Symbol.for("react.element"):60103,_=b?Symbol.for("react.portal"):60106,x=b?Symbol.for("react.fragment"):60107,S=b?Symbol.for("react.strict_mode"):60108,O=b?Symbol.for("react.profiler"):60114,E=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,j=b?Symbol.for("react.forward_ref"):60112,C=b?Symbol.for("react.suspense"):60113,$=b?Symbol.for("react.memo"):60115,P=b?Symbol.for("react.lazy"):60116,A="function"==typeof Symbol&&Symbol.iterator,T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},I={};o.prototype.isReactComponent={},o.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(r(85));this.updater.enqueueSetState(this,e,t,"setState")},o.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},i.prototype=o.prototype;var R=a.prototype=new i;R.constructor=a,g(R,o.prototype),R.isPureReactComponent=!0;var D={current:null},L=Object.prototype.hasOwnProperty,M={key:!0,ref:!0,__self:!0,__source:!0},N=/\/+/g,U=[];function B(e,t,n,o){var i=void 0===e?"undefined":v(e);"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case w:case _:a=!0}}if(a)return n(o,e,""===t?"."+p(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var u=0;u<e.length;u++){var c=t+p(i=e[u],u);a+=B(i,c,n,o)}else if("function"==typeof(c=null===e||"object"!=typeof e?null:"function"==typeof(c=A&&e[A]||e["@@iterator"])?c:null))for(e=c.call(e),u=0;!(i=e.next()).done;)a+=B(i=i.value,c=t+p(i,u++),n,o);else if("object"===i)throw n=""+e,Error(r(31,"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return a}var z={current:null},F={ReactCurrentDispatcher:z,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:D,IsSomeRendererActing:{current:!1},assign:g};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return y(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;f(e,d,t=s(null,null,t,n)),l(t)},count:function(e){return f(e,(function(){return null}),null)},toArray:function(e){var t=[];return y(e,t,null,(function(e){return e})),t},only:function(e){if(!c(e))throw Error(r(143));return e}},t.Component=o,t.Fragment=x,t.Profiler=O,t.PureComponent=a,t.StrictMode=S,t.Suspense=C,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=F,t.cloneElement=function(e,t,n){if(null==e)throw Error(r(267,e));var o=g({},e.props),i=e.key,a=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,u=D.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(s in t)L.call(t,s)&&!M.hasOwnProperty(s)&&(o[s]=void 0===t[s]&&void 0!==c?c[s]:t[s])}var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){c=Array(s);for(var l=0;l<s;l++)c[l]=arguments[l+2];o.children=c}return{$$typeof:w,type:e.type,key:i,ref:a,props:o,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:k,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:E,_context:e},e.Consumer=e},t.createElement=u,t.createFactory=function(e){var t=u.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:j,render:e}},t.isValidElement=c,t.lazy=function(e){return{$$typeof:P,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:$,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return m().useCallback(e,t)},t.useContext=function(e,t){return m().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return m().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return m().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return m().useLayoutEffect(e,t)},t.useMemo=function(e,t){return m().useMemo(e,t)},t.useReducer=function(e,t,n){return m().useReducer(e,t,n)},t.useRef=function(e){return m().useRef(e)},t.useState=function(e){return m().useState(e)},t.version="16.14.0"},2735:function(e,t,n){"use strict";e.exports=n(8447)},1602:function(e){var t=function(e){"use strict";var t,n=function(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]},r=function(e,t,n,r){var a,u,c,s,f=t&&l(t.prototype,i)?t:i,p=Object.create(f.prototype),h=new d(r||[]);return p._invoke=(a=e,u=n,c=h,s=x,function(e,t){if(s===O)throw new Error("Generator is already running");if(s===E){if("throw"===e)throw t;return v()}for(c.method=e,c.arg=t;;){var n=c.delegate;if(n){var r=A(n,c);if(r){if(r===k)continue;return r}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(s===x)throw s=E,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);s=O;var i=o(a,u,c);if("normal"===i.type){if(s=c.done?E:S,i.arg===k)continue;return{value:i.arg,done:c.done}}"throw"===i.type&&(s=E,c.method="throw",c.arg=i.arg)}}),p},o=function(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}},i=function(){},a=function(){},u=function(){},c=function(e){["next","throw","return"].forEach((function(t){n(e,t,(function(e){return this._invoke(t,e)}))}))},s=function(e,t){function n(r,i,a,u){var c=o(e[r],e,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&m.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(l).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var r;this._invoke=function(e,o){var i=function(){return new t((function(t,r){n(e,o,t,r)}))};return r=r?r.then(i,i):i()}},f=function(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)},p=function(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t},d=function(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)},h=function(e){if(e){var n=e[b];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function n(){for(;++r<e.length;)if(m.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:t,done:!0}},y=Object.prototype,m=y.hasOwnProperty,g="function"==typeof Symbol?Symbol:{},b=g.iterator||"@@iterator",w=g.asyncIterator||"@@asyncIterator",_=g.toStringTag||"@@toStringTag";try{n({},"")}catch(e){n=function(e,t,n){return e[t]=n}}e.wrap=r;var x="suspendedStart",S="suspendedYield",O="executing",E="completed",k={},j={};n(j,b,(function(){return this}));var C=Object.getPrototypeOf,$=C&&C(C(h([])));$&&$!==y&&m.call($,b)&&(j=$);var P=u.prototype=i.prototype=Object.create(j);function A(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,A(e,n),"throw"===n.method))return k;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return k}var i=o(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,k;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,k):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,k)}return a.prototype=u,n(P,"constructor",u),n(u,"constructor",a),a.displayName=n(u,_,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,n(e,_,"GeneratorFunction")),e.prototype=Object.create(P),e},e.awrap=function(e){return{__await:e}},c(s.prototype),n(s.prototype,w,(function(){return this})),e.AsyncIterator=s,e.async=function(t,n,o,i,a){void 0===a&&(a=Promise);var u=new s(r(t,n,o,i),a);return e.isGeneratorFunction(n)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},c(P),n(P,_,"Generator"),n(P,b,(function(){return this})),n(P,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=h,d.prototype={constructor:d,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(p),!e)for(var n in this)"t"===n.charAt(0)&&m.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){var n=function(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o};if(this.done)throw e;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=m.call(i,"catchLoc"),c=m.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&m.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,k):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),k},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),p(n),k}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;p(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:h(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),k}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},1720:function(e,t,n){"use strict";var r=function(e){return e},o=function(e){return 0===e.length?r:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}},i=function(e){if(e||(e=p.v.Promise||Promise),!e)throw new Error("no Promise impl found");return e};n.d(t,{y:function(){return d}});var a,u=n(7811),c=n(9573),s=n(2412),f="function"==typeof Symbol&&Symbol.observable||"@@observable",p=n(5769),d=((a=function(e){this._isScalar=!1,e&&(this._subscribe=e)}).prototype.lift=function(e){var t=new a;return t.source=this,t.operator=e,t},a.prototype.subscribe=function(e,t,n){var r=this.operator,o=function(e,t,n){if(e){if(l(e,u.L))return e;if(e[c.b])return e[c.b]()}return e||t||n?new u.L(e,t,n):new u.L(s.c)}(e,t,n);if(r?o.add(r.call(o,this.source)):o.add(this.source||p.v.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),p.v.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},a.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){p.v.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,r=t.destination,o=t.isStopped;if(n||o)return!1;e=r&&l(r,u.L)?r:null}return!0}(e)?e.error(t):console.warn(t)}},a.prototype.forEach=function(e,t){var n=this;return new(t=i(t))((function(t,r){var o;o=n.subscribe((function(t){try{e(t)}catch(e){r(e),o&&o.unsubscribe()}}),r,t)}))},a.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},a.prototype[f]=function(){return this},a.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:o(e)(this)},a.prototype.toPromise=function(e){var t=this;return new(e=i(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},a.create=function(e){return new a(e)},a)},2412:function(e,t,n){"use strict";n.d(t,{c:function(){return i}});var r=n(5769),o=n(1450),i={closed:!0,next:function(e){},error:function(e){if(r.v.useDeprecatedSynchronousErrorHandling)throw e;(0,o.z)(e)},complete:function(){}}},7860:function(e,t,n){"use strict";n.d(t,{xQ:function(){return v}});var r,o,i,a,u=n(7080),c=n(1720),s=n(7811),l=n(6462),f=n(7043),p=(r=l.w,o=function(e,t){var n=r.call(this)||this;return n.subject=e,n.subscriber=t,n.closed=!1,n},u.ZT(o,r),o.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},o),d=n(9573),h=(i=s.L,a=function(e){var t=i.call(this,e)||this;return t.destination=e,t},u.ZT(a,i),a),v=function(e){var t=function(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t};return u.ZT(t,e),t.prototype[d.b]=function(){return new h(this)},t.prototype.lift=function(e){var t=new y(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new f.N;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new f.N;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new f.N;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(this.closed)throw new f.N;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new f.N;return this.hasError?(e.error(this.thrownError),l.w.EMPTY):this.isStopped?(e.complete(),l.w.EMPTY):(this.observers.push(e),new p(this,e))},t.prototype.asObservable=function(){var e=new c.y;return e.source=this,e},t.create=function(e,t){return new y(e,t)},t}(c.y),y=function(e){var t=function(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r};return u.ZT(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):l.w.EMPTY},t}(v)},7811:function(e,t,n){"use strict";n.d(t,{L:function(){return d}});var r,o,i=n(7080),a=n(9147),u=n(2412),c=n(6462),s=n(9573),f=n(5769),p=n(1450),d=function(e){function t(n,r,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=u.c;break;case 1:if(!n){i.destination=u.c;break}if("object"==typeof n){l(n,t)?(i.syncErrorThrowable=n.syncErrorThrowable,i.destination=n,n.add(i)):(i.syncErrorThrowable=!0,i.destination=new h(i,n));break}default:i.syncErrorThrowable=!0,i.destination=new h(i,n,r,o)}return i}return i.ZT(t,e),t.prototype[s.b]=function(){return this},t.create=function(e,n,r){var o=new t(e,n,r);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(c.w),h=(r=d,o=function(e,t,n,o){var i,c=r.call(this)||this;c._parentSubscriber=e;var s=c;return(0,a.m)(t)?i=t:t&&(i=t.next,n=t.error,o=t.complete,t!==u.c&&(s=Object.create(t),(0,a.m)(s.unsubscribe)&&c.add(s.unsubscribe.bind(s)),s.unsubscribe=c.unsubscribe.bind(c))),c._context=s,c._next=i,c._error=n,c._complete=o,c},i.ZT(o,r),o.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;f.v.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},o.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=f.v.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):(0,p.z)(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;(0,p.z)(e)}}},o.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};f.v.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},o.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),f.v.useDeprecatedSynchronousErrorHandling)throw e;(0,p.z)(e)}},o.prototype.__tryOrSetError=function(e,t,n){if(!f.v.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return f.v.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):((0,p.z)(t),!0)}return!1},o.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},o)},6462:function(e,t,n){"use strict";var r=function(e){return e.reduce((function(e,t){return e.concat(l(t,s)?t.errors:t)}),[])};n.d(t,{w:function(){return f}});var o,i,a,u=Array.isArray||function(e){return e&&"number"==typeof e.length},c=n(9147),s=((o=function(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}).prototype=Object.create(Error.prototype),o),f=((a=function(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}).prototype.unsubscribe=function(){var e;if(!this.closed){var t,n=this,o=n._parentOrParents,i=n._ctorUnsubscribe,f=n._unsubscribe,p=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,l(o,a))o.remove(this);else if(null!==o)for(var d=0;d<o.length;++d)o[d].remove(this);if((0,c.m)(f)){i&&(this._unsubscribe=void 0);try{f.call(this)}catch(t){e=l(t,s)?r(t.errors):[t]}}if(u(p)){d=-1;for(var h=p.length;++d<h;){var v=p[d];if(null!==(t=v)&&"object"==typeof t)try{v.unsubscribe()}catch(t){e=e||[],l(t,s)?e=e.concat(r(t.errors)):e.push(t)}}}if(e)throw new s(e)}},a.prototype.add=function(e){var t=e;if(!e)return a.EMPTY;switch(void 0===e?"undefined":v(e)){case"function":t=new a(e);case"object":if(t===this||t.closed||"function"!=typeof t.unsubscribe)return t;if(this.closed)return t.unsubscribe(),t;if(!l(t,a)){var n=t;(t=new a)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var r=t._parentOrParents;if(null===r)t._parentOrParents=this;else if(l(r,a)){if(r===this)return t;t._parentOrParents=[r,this]}else{if(-1!==r.indexOf(this))return t;r.push(this)}var o=this._subscriptions;return null===o?this._subscriptions=[t]:o.push(t),t},a.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},a.EMPTY=((i=new a).closed=!0,i),a)},5769:function(e,t,n){"use strict";n.d(t,{v:function(){return o}});var r=!1,o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,r=e},get useDeprecatedSynchronousErrorHandling(){return r}}},9573:function(e,t,n){"use strict";n.d(t,{b:function(){return r}});var r="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()},7043:function(e,t,n){"use strict";n.d(t,{N:function(){return o}});var r,o=((r=function(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}).prototype=Object.create(Error.prototype),r)},1450:function(e,t,n){"use strict";var r=function(e){setTimeout((function(){throw e}),0)};n.d(t,{z:function(){return r}})},9147:function(e,t,n){"use strict";var r=function(e){return"function"==typeof e};n.d(t,{m:function(){return r}})},7080:function(e,t,n){"use strict";var r=function(e,t){var n=function(){this.constructor=e};o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)};n.d(t,{ZT:function(){return r}});var o=function(e,t){return(o=Object.setPrototypeOf||l({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)}},9666:function(e,t){"use strict";var n,r,o,i,a,u=function(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<l(o,t)))break e;e[r]=t,e[n]=o,n=r}},c=function(e){return void 0===(e=e[0])?null:e},s=function(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],u=i+1,c=e[u];if(void 0!==a&&0>l(a,n))void 0!==c&&0>l(c,a)?(e[r]=c,e[u]=n,r=u):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==c&&0>l(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}return null},l=function(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id},f=function(e){for(var t=c(T);null!==t;){if(null===t.callback)s(T);else{if(!(t.startTime<=e))break;s(T),t.sortIndex=t.expirationTime,u(A,t)}t=c(T)}},p=function(e,n){M=!1,N&&(N=!1,o()),L=!0;var a=D;try{for(f(n),R=c(A);null!==R&&(!(R.expirationTime>n)||e&&!i());){var u=R.callback;if(null!==u){R.callback=null,D=R.priorityLevel;var l=u(R.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?R.callback=l:R===c(A)&&s(A),f(n)}else s(A);R=c(A)}if(null!==R)var p=!0;else{var d=c(T);null!==d&&r(U,d.startTime-n),p=!1}return p}finally{R=null,D=a,L=!1}},d=function(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}};if("undefined"==typeof window||"function"!=typeof MessageChannel){var h=null,v=null,y=function(){if(null!==h)try{var e=t.unstable_now();h(!0,e),h=null}catch(e){throw setTimeout(y,0),e}},m=Date.now();t.unstable_now=function(){return Date.now()-m},n=function(e){null!==h?setTimeout(n,0,e):(h=e,setTimeout(y,0))},r=function(e,t){v=setTimeout(e,t)},o=function(){clearTimeout(v)},i=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var g=window.performance,b=window.Date,w=window.setTimeout,_=window.clearTimeout;if("undefined"!=typeof console){var x=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof x&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof g&&"function"==typeof g.now)t.unstable_now=function(){return g.now()};else{var S=b.now();t.unstable_now=function(){return b.now()-S}}var O=!1,E=null,k=-1,j=5,C=0;i=function(){return t.unstable_now()>=C},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):j=0<e?Math.floor(1e3/e):5};var $=new MessageChannel,P=$.port2;$.port1.onmessage=function(){if(null!==E){var e=t.unstable_now();C=e+j;try{E(!0,e)?P.postMessage(null):(O=!1,E=null)}catch(e){throw P.postMessage(null),e}}else O=!1},n=function(e){E=e,O||(O=!0,P.postMessage(null))},r=function(e,n){k=w((function(){e(t.unstable_now())}),n)},o=function(){_(k),k=-1}}var A=[],T=[],I=1,R=null,D=3,L=!1,M=!1,N=!1;function U(e){if(N=!1,f(e),!M)if(null!==c(A))M=!0,n(p);else{var t=c(T);null!==t&&r(U,t.startTime-e)}}var B=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){M||L||(M=!0,n(p))},t.unstable_getCurrentPriorityLevel=function(){return D},t.unstable_getFirstCallbackNode=function(){return c(A)},t.unstable_next=function(e){switch(D){case 1:case 2:case 3:var t=3;break;default:t=D}var n=D;D=t;try{return e()}finally{D=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=B,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=D;D=e;try{return t()}finally{D=n}},t.unstable_scheduleCallback=function(e,i,a){var s=t.unstable_now();if("object"==typeof a&&null!==a){var l=a.delay;l="number"==typeof l&&0<l?s+l:s,a="number"==typeof a.timeout?a.timeout:d(e)}else a=d(e),l=s;return e={id:I++,callback:i,priorityLevel:e,startTime:l,expirationTime:a=l+a,sortIndex:-1},l>s?(e.sortIndex=l,u(T,e),null===c(A)&&e===c(T)&&(N?o():N=!0,r(U,l-s))):(e.sortIndex=a,u(A,e),M||L||(M=!0,n(p))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();f(e);var n=c(A);return n!==R&&null!==R&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<R.expirationTime||i()},t.unstable_wrapCallback=function(e){var t=D;return function(){var n=D;D=t;try{return e.apply(this,arguments)}finally{D=n}}}},9146:function(e,t,n){"use strict";e.exports=n(9666)},3710:function(e,t,n){"use strict";var r=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},o=function(e,t,n){var r=c(e,t,n);de.length?de.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))},i=function(e){if("function"!=typeof e)throw Error(u(28,!1));de.push(e)},a=function(e){if("function"!=typeof e)throw Error(u(29,!1));var t=!1;return de=de.filter((function(n){var r=n===e;return t=t||r,!r})),t},u=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(e,": ").concat(t?t+" ":"","See https://single-spa.js.org/error/?code=").concat(e).concat(r.length?"&arg=".concat(r.join("&arg=")):"")},c=function(e,t,n){var r,o="".concat(h(t)," '").concat(p(t),"' died in status ").concat(t.status,": ");if(l(e,Error)){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(u(30,!1,t.status,p(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=p(t),t.status=n,r},s=function(e){return e.status===we},f=function(e){try{return e.activeWhen(window.location)}catch(t){return o(t,e,Oe),!1}},p=function(e){return e.name},d=function(e){return Boolean(e.unmountThisParcel)},h=function(e){return d(e)?"parcel":"application"},y=function(){for(var e=arguments.length-1;e>0;e--)for(var t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]},m=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null},g=function(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!m(t,(function(e){return"function"!=typeof e}))));var t},b=function(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=h(e),o=p(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return w(n)?n:Promise.reject(u(15,!1,r,o,t,a))}))}),Promise.resolve())}},w=function(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch},_=function(e,t){var n=function(){return e.status=ge,e};return Promise.resolve().then((function(){return e.status!==ye?e:(e.status=me,e.bootstrap?T(e,"bootstrap").then(n).catch((function(n){if(t)throw c(n,e,Oe);return o(n,e,Oe),e})):Promise.resolve().then(n))}))},x=function(e,t){return Promise.resolve().then((function(){var n=function(){return T(e,"unmount").then((function(){e.status=ge})).catch((function(n){if(t)throw c(n,e,Oe);o(n,e,Oe)}))};if(e.status!==we)return e;e.status=xe;var r=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(r).then(n,(function(r){return n().then((function(){var n=Error(r.message);if(t)throw c(n,e,Oe);o(n,e,Oe)}))})).then((function(){return e}))}))},S=function(e,t){return Promise.resolve().then((function(){return e.status!==ge?e:(Ee||(window.dispatchEvent(new pe("single-spa:before-first-mount")),Ee=!0),T(e,"mount").then((function(){return e.status=we,ke||(window.dispatchEvent(new pe("single-spa:first-mount")),ke=!0),e})).catch((function(n){var r=function(){if(t)throw c(n,e,Oe);return o(n,e,Oe),e};return e.status=we,x(e,!0).then(r,r)})))}))},O=function(){return E.apply(Ce,arguments)},E=function(e,t){var n=this;if(!e||"object"!==se(e)&&"function"!=typeof e)throw Error(u(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(u(3,!1,se(e.name)));if("object"!==se(t))throw Error(u(4,!1,name,se(t)));if(!t.domElement)throw Error(u(5,!1,name));var r,o=je++,i="function"==typeof e,a=i?e:function(){return Promise.resolve(e)},s={id:o,parcels:{},status:i?ve:ye,customProps:t,parentName:p(n),unmountThisParcel:function(){return v.then((function(){if(s.status!==we)throw Error(u(6,!1,name,s.status));return x(s,!0)})).then((function(e){return s.parentName&&delete n.parcels[s.id],e})).then((function(e){return f(e),e})).catch((function(e){throw s.status=Oe,d(e),e}))}};n.parcels[o]=s;var l=a();if(!l||"function"!=typeof l.then)throw Error(u(7,!1));var f,d,h=(l=l.then((function(e){if(!e)throw Error(u(8,!1));var t=e.name||"parcel-".concat(o);if(Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!g(e.bootstrap))throw Error(u(9,!1,t));if(!g(e.mount))throw Error(u(10,!1,t));if(!g(e.unmount))throw Error(u(11,!1,t));if(e.update&&!g(e.update))throw Error(u(12,!1,t));var n=b(e,"bootstrap"),i=b(e,"mount"),a=b(e,"unmount");s.status=ye,s.name=t,s.bootstrap=n,s.mount=i,s.unmount=a,s.timeouts=I(e.timeouts),e.update&&(s.update=b(e,"update"),r.update=function(e){return s.customProps=e,k((t=s,Promise.resolve().then((function(){if(t.status!==we)throw Error(u(32,!1,p(t)));return t.status=_e,T(t,"update").then((function(){return t.status=we,t})).catch((function(e){throw c(e,t,Oe)}))}))));var t})}))).then((function(){return _(s,!0)})),v=h.then((function(){return S(s,!0)})),y=new Promise((function(e,t){f=e,d=t}));return r={mount:function(){return k(Promise.resolve().then((function(){if(s.status!==ge)throw Error(u(13,!1,name,s.status));return n.parcels[o]=s,S(s)})))},unmount:function(){return k(s.unmountThisParcel())},getStatus:function(){return s.status},loadPromise:k(l),bootstrapPromise:k(h),mountPromise:k(v),unmountPromise:k(y)}},k=function(e){return e.then((function(){return null}))},j=function(e){var t=p(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!==se(n)||null===n||Array.isArray(n))&&(n={},console.warn(u(40,!1),t,n));var r=y({},n,{name:t,mountParcel:E.bind(e),singleSpa:ce});return d(e)&&(r.unmountSelf=e.unmountThisParcel),r},C=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(u(16,!1));$e.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},$=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(u(17,!1));$e.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},P=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(u(18,!1));$e.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},A=function(e,t,n){if("number"!=typeof e||e<=0)throw Error(u(19,!1));$e.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}},T=function(e,t){var n=e.timeouts[t],r=n.warningMillis,o=h(e);return new Promise((function(i,a){var c=!1,s=!1;e[t](j(e)).then((function(e){c=!0,i(e)})).catch((function(e){c=!0,a(e)})),setTimeout((function(){return f(1)}),r),setTimeout((function(){return f(!0)}),n.millis);var l=u(31,!1,t,o,p(e),n.millis);function f(e){if(!c)if(!0===e)s=!0,n.dieOnTimeout?a(Error(l)):console.error(l);else if(!s){var t=e,o=t*r;console.warn(l),o+r<n.millis&&setTimeout((function(){return f(t+1)}),r)}}}))},I=function(e){var t={};for(var n in $e)t[n]=y({},$e[n],e&&e[n]||{});return t},R=function(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==he&&e.status!==Se?e:(e.status=ve,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(j(e));if(!w(r))throw n=!0,Error(u(33,!1,p(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!==se(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!g(t.bootstrap)&&(r=35),g(t.mount)||(r=36),g(t.unmount)||(r=37);var i=h(t);if(r){var a;try{a=JSON.stringify(t)}catch(e){}return console.error(u(r,!1,i,p(e),a),t),o(void 0,e,Oe),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=y({},e.devtools.overlays,t.devtools.overlays)),e.status=ye,e.bootstrap=b(t,"bootstrap"),e.mount=b(t,"mount"),e.unmount=b(t,"unmount"),e.unload=b(t,"unload"),e.timeouts=I(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=Oe:(r=Se,e.loadErrorTime=(new Date).getTime()),o(t,e,r),e})));var t,n}))},D=function(e){var t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(u(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=B(window.location.href),r=B(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)},L=function(e){var t=this;if(e){var n=e[0].type;Te.indexOf(n)>=0&&Ae[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}},M=function(){ze([],arguments)},N=function(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return le&&n===o||(ue()?window.dispatchEvent(U(window.history.state,t)):ze([])),r}},U=function(e,t){var n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n},B=function(e){var t=document.createElement("a");return t.href=e,t},z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!De){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return F.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return F.call(this,n,window.removeEventListener,e,t,arguments)},De=!0}},F=function(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){Te.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))},V=function(e){return Promise.resolve().then((function(){var t=Le[p(e)];if(!t)return e;if(e.status===he)return H(e,t),e;if("UNLOADING"===e.status)return t.promise.then((function(){return e}));if(e.status!==ge&&e.status!==Se)return e;var n=e.status===Se?Promise.resolve():T(e,"unload");return e.status="UNLOADING",n.then((function(){return H(e,t),e})).catch((function(n){return i=t,a=n,delete Le[p(r=e)],delete r.bootstrap,delete r.mount,delete r.unmount,delete r.unload,o(a,r,Oe),i.reject(a),e;var r,i,a}))}))},H=function(e,t){delete Le[p(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=he,t.resolve()},W=function(e,t,n,r){Le[p(e)]={app:e,resolve:n,reject:r},Object.defineProperty(Le[p(e)],"promise",{get:t})},K=function(e){return Le[e]},q=function(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return Me.forEach((function(i){var a=i.status!==Oe&&f(i);switch(i.status){case Se:a&&o-i.loadErrorTime>=200&&n.push(i);break;case he:case ve:a&&n.push(i);break;case ye:case ge:!a&&K(p(i))?e.push(i):a&&r.push(i);break;case we:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}},Z=function(){return Me.filter(s).map(p)},G=function(){return Me.map(p)},Q=function(e){var t=m(Me,(function(t){return p(t)===e}));return t?t.status:null},Y=function(e,t,n,r){var o=function(e,t,n,r){var o,i,a,c={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===se(e)?(function(e){if(Array.isArray(e)||null===e)throw Error(u(39,!1));var t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((function(e,n){return t.indexOf(n)>=0?e:e.concat(n)}),[]);if(0!==n.length)throw Error(u(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(u(20,!1));if("object"!==se(e.app)&&"function"!=typeof e.app)throw Error(u(20,!1));var r=function(e){return"string"==typeof e||"function"==typeof e};if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(u(24,!1));if(!ne(e.customProps))throw Error(u(22,!1))}(e),c.name=e.name,c.loadApp=e.app,c.activeWhen=e.activeWhen,c.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(u(20,!1));if(!t)throw Error(u(23,!1));if("function"!=typeof n)throw Error(u(24,!1));if(!ne(r))throw Error(u(22,!1))}(e,t,n,r),c.name=e,c.loadApp=t,c.activeWhen=n,c.customProps=r),c.loadApp="function"!=typeof(o=c.loadApp)?function(){return Promise.resolve(o)}:o,c.customProps=c.customProps||{},c.activeWhen=(i=c.activeWhen,a=(a=Array.isArray(i)?i:[i]).map((function(e){return"function"==typeof e?e:re(e)})),function(e){return a.some((function(t){return t(e)}))}),c}(e,t,n,r);if(-1!==G().indexOf(o.name))throw Error(u(21,!1,o.name));Me.push(y({loadErrorTime:null,status:he,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),Pe&&(z(),ze())},J=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return Me.filter((function(t){return t.activeWhen(e)})).map(p)},X=function(e){if(0===Me.filter((function(t){return p(t)===e})).length)throw Error(u(25,!1,e));return ee(e).then((function(){var t=Me.map(p).indexOf(e);Me.splice(t,1)}))},ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(u(26,!1));var n=m(Me,(function(t){return p(t)===e}));if(!n)throw Error(u(27,!1,e));var r,o=K(p(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){W(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,te(n,o.resolve,o.reject)):r=new Promise((function(e,t){W(n,(function(){return r}),e,t),te(n,e,t)})),r},te=function(e,t,n){x(e).then(V).then((function(){t(),setTimeout((function(){ze()}))})).catch(n)},ne=function(e){return!e||"function"==typeof e||"object"===se(e)&&null!==e&&!Array.isArray(e)},re=function(e,t){var n=function(e,t){var n=function(n){var a=e.slice(r,n).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(i+=o?"[^/]+/?":a,n===e.length)if(o)t&&(i+="$");else{var u=t?"":".*";i="/"===i.charAt(i.length-1)?"".concat(i).concat(u,"$"):"".concat(i,"(/").concat(u,")?(#.*)?$")}o=!o,r=n},r=0,o=!1,i="^";"/"!==e[0]&&(e="/"+e);for(var a=0;a<e.length;a++){var u=e[a];(!o&&":"===u||o&&"/"===u)&&n(a)}return n(e.length),new RegExp(i,"i")}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}},oe=function(){return ze()},ie=function(e,t){return f(e)?_(e).then((function(e){return t.then((function(){return f(e)?S(e):e}))})):t.then((function(){return e}))},ae=function(e){var t;Fe=!0,e&&e.urlRerouteOnly&&(t=e.urlRerouteOnly,le=t),Pe&&ze()},ue=function(){return Fe};n.d(t,{BP:function(){return O},UO:function(){return D}});var ce=Object.freeze({__proto__:null,get start(){return ae},get ensureJQuerySupport(){return z},get setBootstrapMaxTime(){return C},get setMountMaxTime(){return $},get setUnmountMaxTime(){return P},get setUnloadMaxTime(){return A},get registerApplication(){return Y},get unregisterApplication(){return X},get getMountedApps(){return Z},get getAppStatus(){return Q},get unloadApplication(){return ee},get checkActivityFunctions(){return J},get getAppNames(){return G},get pathToActiveWhen(){return re},get navigateToUrl(){return D},get triggerAppChange(){return oe},get addErrorHandler(){return i},get removeErrorHandler(){return a},get mountRootParcel(){return O},get NOT_LOADED(){return he},get LOADING_SOURCE_CODE(){return ve},get NOT_BOOTSTRAPPED(){return ye},get BOOTSTRAPPING(){return me},get NOT_MOUNTED(){return ge},get MOUNTING(){return be},get UPDATING(){return _e},get LOAD_ERROR(){return Se},get MOUNTED(){return we},get UNMOUNTING(){return xe},get SKIP_BECAUSE_BROKEN(){return Oe}});function se(e){return(se="function"==typeof Symbol&&"symbol"==v(Symbol.iterator)?function(e){return void 0===e?"undefined":v(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":v(e)})(e)}var le,fe=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).CustomEvent,pe=function(){try{var e=new fe("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?fe:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},de=[],he="NOT_LOADED",ve="LOADING_SOURCE_CODE",ye="NOT_BOOTSTRAPPED",me="BOOTSTRAPPING",ge="NOT_MOUNTED",be="MOUNTING",we="MOUNTED",_e="UPDATING",xe="UNMOUNTING",Se="LOAD_ERROR",Oe="SKIP_BECAUSE_BROKEN",Ee=!1,ke=!1,je=0,Ce={parcels:{}},$e={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}},Pe="undefined"!=typeof window,Ae={hashchange:[],popstate:[]},Te=["hashchange","popstate"];if(Pe){window.addEventListener("hashchange",M),window.addEventListener("popstate",M);var Ie=window.addEventListener,Re=window.removeEventListener;window.addEventListener=function(e,t){if(!("function"==typeof t&&Te.indexOf(e)>=0)||m(Ae[e],(function(e){return e===t})))return Ie.apply(this,arguments);Ae[e].push(t)},window.removeEventListener=function(e,t){if(!("function"==typeof t&&Te.indexOf(e)>=0))return Re.apply(this,arguments);Ae[e]=Ae[e].filter((function(e){return e!==t}))},window.history.pushState=N(window.history.pushState,"pushState"),window.history.replaceState=N(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(u(41,!1)):window.singleSpaNavigate=D}var De=!1,Le={},Me=[],Ne=!1,Ue=[],Be=Pe&&window.location.href;function ze(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(Ne)return new Promise((function(e,n){Ue.push({resolve:e,reject:n,eventArguments:t})}));var n,o=q(),i=o.appsToUnload,a=o.appsToUnmount,u=o.appsToLoad,c=o.appsToMount,s=!1,l=Be,f=Be=window.location.href;return ue()?(Ne=!0,n=i.concat(u,a,c),v()):(n=u,h());function d(){s=!0}function h(){return Promise.resolve().then((function(){var e=u.map(R);return Promise.all(e).then(g).then((function(){return[]})).catch((function(e){throw g(),e}))}))}function v(){return Promise.resolve().then((function(){if(window.dispatchEvent(new pe(0===n.length?"single-spa:before-no-app-change":"single-spa:before-app-change",b(!0))),window.dispatchEvent(new pe("single-spa:before-routing-event",b(!0,{cancelNavigation:d}))),s)return window.dispatchEvent(new pe("single-spa:before-mount-routing-event",b(!0))),m(),void D(l);var t=i.map(V),r=a.map(x).map((function(e){return e.then(V)})).concat(t),o=Promise.all(r);o.then((function(){window.dispatchEvent(new pe("single-spa:before-mount-routing-event",b(!0)))}));var f=u.map((function(e){return R(e).then((function(e){return ie(e,o)}))})),p=c.filter((function(e){return u.indexOf(e)<0})).map((function(e){return ie(e,o)}));return o.catch((function(e){throw g(),e})).then((function(){return g(),Promise.all(f.concat(p)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(m)}))}))}function m(){var t=Z();e.forEach((function(e){return e.resolve(t)}));try{var r=0===n.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new pe(r,b())),window.dispatchEvent(new pe("single-spa:routing-event",b()))}catch(e){setTimeout((function(){throw e}))}if(Ne=!1,Ue.length>0){var o=Ue;Ue=[],ze(o)}return t}function g(){e.forEach((function(e){L(e.eventArguments)})),L(t)}function b(){var e,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0],d=arguments.length>1?arguments[1]:void 0,h={},v=(r(e={},we,[]),r(e,ge,[]),r(e,he,[]),r(e,Oe,[]),e);o?(u.concat(c).forEach((function(e,t){g(e,we)})),i.forEach((function(e){g(e,he)})),a.forEach((function(e){g(e,ge)}))):n.forEach((function(e){g(e)}));var m={detail:{newAppStatuses:h,appsByNewStatus:v,totalAppChanges:n.length,originalEvent:null==t?void 0:t[0],oldUrl:l,newUrl:f,navigationIsCanceled:s}};return d&&y(m.detail,d),m;function g(e,t){var n=p(e);t=t||Q(n),h[n]=t,(v[t]=v[t]||[]).push(n)}}}var Fe=!1;Pe&&setTimeout((function(){Fe||console.warn(u(1,!1))}),5e3);var Ve={getRawAppData:function(){return[].concat(Me)},reroute:ze,NOT_LOADED:he,toLoadPromise:R,toBootstrapPromise:_,unregisterApplication:X};Pe&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Ve)},487:function(e){"use strict";var t=function(e){for(var t=-1,n=0;n<o.length;n++)if(o[n].identifier===e){t=n;break}return t},n=function(e,n){for(var i={},a=[],u=0;u<e.length;u++){var c=e[u],s=n.base?c[0]+n.base:c[0],l=i[s]||0,f="".concat(s," ").concat(l);i[s]=l+1;var p=t(f),d={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==p)o[p].references++,o[p].updater(d);else{var h=r(d,n);n.byIndex=u,o.splice(u,0,{identifier:f,updater:h,references:1})}a.push(f)}return a},r=function(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}},o=[];e.exports=function(e,r){var i=n(e=e||[],r=r||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var u=t(i[a]);o[u].references--}for(var c=n(e,r),s=0;s<i.length;s++){var l=t(i[s]);0===o[l].references&&(o[l].updater(),o.splice(l,1))}i=c}}},2052:function(e){"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&l(n,window.HTMLIFrameElement))try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},1469:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},4010:function(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},631:function(e){"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},9329:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},7641:function(e,t,n){var r=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):l(e,t)},o=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":v(e)};System.register(["@openmrs/esm-config","@openmrs/esm-error-handling"],(function(e,t){var i={},a={};return{setters:[function(e){i.Type=e.Type,i.defineConfigSchema=e.defineConfigSchema,i.getConfig=e.getConfig,i.navigate=e.navigate,i.validators=e.validators},function(e){a.reportError=e.reportError}],execute:function(){e(function(){var e={672:function(e,t){var n,r,o;r=t,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",((n=function(e){this.message=e}).prototype=new Error).name="InvalidCharacterError",r.btoa||(r.btoa=function(e){for(var t,r,i=String(e),a=0,u=o,c="";i.charAt(0|a)||(u="=",a%1);c+=u.charAt(63&t>>8-a%1*8)){if((r=i.charCodeAt(a+=3/4))>255)throw new n("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|r}return c}),r.atob||(r.atob=function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,a=0,u=0,c="";i=t.charAt(u++);~i&&(r=a%4?64*r+i:i,a++%4)?c+=String.fromCharCode(255&r>>(-2*a&6)):0)i=o.indexOf(i);return c})},525:function(e){(function(){var t,n,r=function(e,r,o,i){n.defer(),t.search(e).then((function(e){a(e,r).then((function(){o()}),(function(e){i(e)}))}),(function(e){i(e)}))},o=function(e){var t=n.defer(),o=[];return r(e,(function(e){e.forEach((function(e){o.push(e)}))}),(function(){t.resolve(o)}),(function(e){t.reject(e)})),t.promise},i=function(e,r){var o=n.defer();return t.search(e).then((function(e){var n=function(){a.pop()()},i={},a=[function(){o.resolve(e,i)}],u=e.data;u.entry&&u.entry.forEach((function(e){var o=e.resource,c=o.resourceType;r&&r.forEach((function(e){var r,s,l,f=e.split("."),p=f[0],d=f[1],h=o[d];if(c===p&&h){var v=h.reference;i[v]||(r=u,s=o,l=h,a.push((function(){!function(e,r,o){var a=o.reference;t.resolve({bundle:e,resource:r,reference:o}).then((function(e){var t=e.data||e.content;i[a]=t,n()}))}(r,s,l)})))}}))})),n()}),(function(){o.reject("Could not fetch search results")})),o.promise};function a(e,r){var o,i=e.data.entry||[],u=[];for(o=0;o<i.length;o++)u.push(i[o].resource);r(u);var c=n.defer();return t.nextPage({bundle:e.data}).then((function(e){a(e,r).then((function(e){c.resolve()}))}),(function(e){c.resolve()})),c.promise}e.exports=function(e,a){return t=e,n=a,e.drain=r,e.fetchAll=o,e.fetchAllWithReferences=i,e}}).call(this)},256:function(e,t,n){(function(){n(454);var t=n(801),r=n(921),o=n(294),i=n(821),a=n(442),u=n(856),c=n(719),s=n(29),l=n(723),f=n(249),p=n(525);e.exports=function(e,n){var d=t.Middleware,h=t.$$Attr,v=function(e){return h("method",e)},y=function(e,t){return h("headers."+e,t)},m=d(a),g=d(u(e,n)).and(m).and(o.$Basic).and(o.$Bearer).and(o.$Credentials).and(i.$JsonData).and(y("Accept",e.headers&&e.headers.Accept?e.headers.Accept:"application/json")).and(y("Content-Type",e.headers&&e.headers["Content-Type"]?e.headers["Content-Type"]:"application/json")),b=g.and(v("GET")),w=g.and(v("POST")),_=g.and(v("PUT")),x=g.and(v("DELETE")),S=g.and(v("PATCH")),O=i.Http(e,n),E=f.Path,k=E(e.baseUrl),j=k.slash(":type || :resource.resourceType"),C=j.slash("_history"),$=j.slash(":id || :resource.id"),P=$.slash("_history"),A=$.slash(":versionId || :resource.meta.versionId"),T=k.slash(":target.resourceType || :target.type").slash(":target.id").slash(":target.versionId"),I=y("Prefer","return=representation"),R=d(r.$Paging);return p({conformance:b.and(k.slash("metadata")).end(O),document:w.and(k.slash("Document")).end(O),profile:b.and(k.slash("Profile").slash(":type")).end(O),transaction:w.and(k).end(O),history:b.and(k.slash("_history")).and(R).end(O),typeHistory:b.and(C).and(R).end(O),resourceHistory:b.and(P).and(R).end(O),read:b.and(s.$WithPatient).and($).end(O),vread:b.and(A).end(O),delete:x.and($).and(I).end(O),create:w.and(j).and(I).end(O),validate:w.and(j.slash("_validate")).end(O),meta:{add:w.and(T.slash("$meta-add")).end(O),delete:w.and(T.slash("$meta-delete")).end(O),read:b.and(T.slash("$meta")).end(O)},search:b.and(j).and(s.$WithPatient).and(r.$SearchParams).and(R).end(O),update:_.and($).and(I).end(O),conditionalUpdate:_.and(j).and(r.$SearchParams).and(I).end(O),conditionalDelete:x.and(j).and(r.$SearchParams).and(I).end(O),nextPage:b.and(c.$$BundleLinkUrl("next")).end(O),prevPage:b.and(c.$$BundleLinkUrl("previous")).and(c.$$BundleLinkUrl("prev")).end(O),getBundleByUrl:b.and(E(":url")).end(O),resolve:b.and(l.resolve).end(O),patch:S.and($).and(y("Content-Type","application/json-patch+json")).end(O)},n)}}).call(this)},294:function(e,t,n){(function(){var e,r=n(801),o=n(672).btoa;t.$Basic=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.user&&e.auth.pass)return"Basic "+o(e.auth.user+":"+e.auth.pass)})),t.$Bearer=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.bearer)return"Bearer "+e.auth.bearer})),t.$Credentials=r.Middleware(r.$$Attr("credentials",(function(t){return e=t.credentials,""}))).and(r.$$Attr("credentials",(function(t){if(["same-origin","include"].indexOf(e)>-1)return e})))}).call(this)},719:function(e,t){t.$$BundleLinkUrl=function(e){return function(t){return function(n){var r=n.bundle&&(n.bundle.link||[]).filter((function(t){return t.relation&&t.relation===e}))[0];return r&&r.url&&(n.url=r.url,n.data=null),t(n)}}}},856:function(e){(function(){var t=function(e,t,n){var r=e[n];return r&&!t[n]&&(t[n]=r),e};e.exports=function(e,n){return function(r){return function(o){return t(e,o,"baseUrl"),t(e,o,"cache"),t(e,o,"auth"),t(e,o,"patient"),t(e,o,"debug"),t(e,o,"credentials"),t(e,o,"headers"),t(e,o,"agentOptions"),t(n,o,"defer"),t(n,o,"http"),r(o)}}}}).call(this)},801:function(e,t,n){(function(){var e=n(454),r=function(e){return e.and=function(t){return r((n=e,o=t,function(e){return n(o(e))}));var n,o},e.end=function(t){return e(t)},e};t.$$Simple=function(e){return function(t){return function(n){return t(e(n))}}},t.$$Attr=function(t,n){return r((function(r){return function(o){var i;return i="function"==e.type(n)?n(o):n,r(null==i&&null==i?o:function(e,t,n){for(var r=t.split("."),o=e,i=0;i<r.length-1;i++){var a=r[i];(o=e[a])||(o={},e[a]=o)}return o[r[r.length-1]]=n,e}(o,t,i))}}))};var o=function(e,t){return r((function(n){return function(r){return r[e]=t(r),n(r)}}))};t.Middleware=r,t.Attribute=o,t.Method=function(e){return o("method",(t=e,function(){return t}));var t}}).call(this)},442:function(e){e.exports=function(e){return function(t){try{return e(t)}catch(e){if(t.debug&&(console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack)),!t.defer)throw console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack),new Error("I need adapter.defer");var n=t.defer();return n.reject(e),n.promise}}}},821:function(e,t,n){(function(){var e=n(454);t.Http=function(e,t){return function(n){n.debug&&console.log("\nDEBUG (request):",n.method,n.url,n);var r=(n.http||t.http||e.http)(n);return n.debug&&r&&r.then&&r.then((function(e){console.log("\nDEBUG: (responce)",e)})),r}},t.$JsonData=function(t){return function(n){var r,o=n.bundle||n.data||n.resource;return o&&(n.data=(r=o,"object"==e.type(r)||"array"==e.type(r)?JSON.stringify(r):r)),t(n)}}}).call(this)},29:function(e,t,n){(function(){var e=n(801),r=["Account","AllergyIntolerance","BodySite","CarePlan","Claim","ClinicalImpression","Communication","CommunicationRequest","Composition","Condition","Contract","DetectedIssue","Device","DeviceUseRequest","DeviceUseStatement","DiagnosticOrder","DiagnosticReport","DocumentManifest","DocumentReference","Encounter","EnrollmentRequest","EpisodeOfCare","FamilyMemberHistory","Flag","Goal","ImagingObjectSelection","ImagingStudy","Immunization","ImmunizationRecommendation","List","Media","MedicationAdministration","MedicationDispense","MedicationOrder","MedicationStatement","NutritionOrder","Observation","Order","Procedure","ProcedureRequest","QuestionnaireResponse","ReferralRequest","RelatedPerson","RiskAssessment","Specimen","SupplyDelivery","SupplyRequest","VisionPrescription"];t.$WithPatient=e.$$Simple((function(e){var t=e.type;return e.patient&&("Patient"===t?(e.query=e.query||{},e.query._id=e.patient,e.id=e.patient):r.indexOf(t)>=0&&(e.query=e.query||{},e.query.patient=e.patient)),e}))}).call(this)},723:function(e,t,n){(function(){var t=n(454),r=/^#(.*)/,o=function(e){var n,o,i,a,u=e.cache,c=e.reference,s=e.bundle,l=c;if(!l.reference)return null;if(l.reference.match(r))return n=l.reference,o=e.resource,i=n.match(r)[1],(a=(o.contained||[]).filter((function(e){return(e.id||e._id)==i}))[0])&&{content:a}||null;var f=t.absoluteUrl(e.baseUrl,l.reference);return(s&&s.entry||[]).filter((function(e){return e.id===f}))[0]||(null!=u?u[f]:void 0)||null};e.exports.sync=o,e.exports.resolve=function(e){return function(n){var i=o(n),a=n.reference,u=n.defer();if(i){if(!n.defer)throw new Error("I need promise constructor 'adapter.defer' in adapter");return u.resolve(i),u.promise}if(!a)throw new Error("No reference found");if(a&&a.reference.match(r))throw new Error("Contained resource not found");return n.url=t.absoluteUrl(n.baseUrl,a.reference),n.data=null,e(n)}}}).call(this)},921:function(e,t,n){(function(){var e=n(454),r=e.type,o=e.assertArray,i=(e.assertObject,e.reduceMap),a=e.identity,u={$gt:"gt",$lt:"lt",$lte:"lte",$gte:"gte",$ge:"ge",$le:"le"},c={$asc:":asc",$desc:":desc",$exact:":exact",$missing:":missing",$null:":missing",$text:":text"},s=function(e,t){if("$sort"===e)return function(e){var t,n,i,a;for(o(e),i=[],t=0,n=e.length;t<n;t++)switch(a=e[t],r(a)){case"array":i.push({param:"_sort",value:a[0],modifier:":"+a[1]});break;case"string":i.push({param:"_sort",value:a});break;default:i.push(void 0)}return i}(t);if("$has"===e)return i(t,(function(e,t){var n,o;return n=t[0],o=t[1],e.concat(function(){switch(r(o)){case"array":return o.map((function(e){return{param:"_has",value:n+"="+e}}));case"string":return[{param:"_has",value:n+"="+o}]}}())}));if("$include"===e||"$revInclude"===e)return n=e,i(t,(function(e,t){var o,i;return o=t[0],i=t[1],e.concat(function(){switch(r(i)){case"array":return i.map((function(e){return{param:"$include"===n?"_include":"_revinclude",value:o+":"+e}}));case"string":return[{param:"$include"===n?"_include":"_revinclude",value:o+":"+i}]}}())}));var n,a,l;switch(r(t)){case"object":return a=e,i(l=t,(function(e,t){var n,i,f,p;return n=t[0],p=t[1],e.concat("$and"===n?o(p).reduce((function(e,t){return e.concat(s(a,t))}),[]):"$type"===n?[]:0===n.indexOf("$")?(i={param:a},"$or"===n?i.value=p:(u[n]&&(i.operator=u[n]),c[n]&&(i.modifier=c[n]),"object"===r(p)&&p.$or?i.value=p.$or:i.value=[p]),[i]):(l.$type&&(f=":"+l.$type),s(""+a+(f||"")+"."+n,p)))}));case"string":case"number":return[{param:e,value:[t]}];case"array":return[{param:e,value:[t.join("|")]}];default:throw"could not linearizeParams "+r(t)}},l=function(e){return i(e,(function(e,t){var n,r;return n=t[0],r=t[1],e.concat(s(n,r))}))},f=function(e){var t,n,r=["_include","_revinclude","_has"];return function(){var o,i,u,c;for(c=[],o=0,i=(u=l(e)).length;o<i;o++)t=u[o],n=-1===r.indexOf(t.param)?encodeURIComponent(t.value):t.value,c.push([t.param,t.modifier,"_has"==t.param?":":"=",t.operator,n].filter(a).join(""));return c}().join("&")};t._query=l,t.query=f;var p=n(801);t.$SearchParams=p.$$Attr("url",(function(e){var t=e.url;return e.query?t+"?"+f(e.query):t})),t.$Paging=function(e){return function(t){var n=t.params||{};return t.since&&(n._since=t.since),t.count&&(n._count=t.count),t.params=n,e(t)}}}).call(this)},249:function(e,t,n){(function(){n(454);var e=n(801),r=function(t,n){var o=function(e){return n&&t.includes("target.versionId")&&!e.target.versionId?n(e):(n&&n(e)+"/"||"")+function(e,t){var n,r,o=(r=t,0==(n=e.trim()).indexOf(":")?function(e,t){for(var n,r=e.split("||").map((function(e){return e.trim().substring(1)})),o=0;o<r.length;o++){var i=(n=t,r[o].split(".").reduce((function(e,t){return"versionId"===t&&e[t]?"_history/"+e[t]:null==e||null==e?null:e[t]}),n));if(i)return i}return null}(n,r):n);if((null==o||void 0===o)&&0==e.includes("target.versionId"))throw new Error("Parameter "+e+" is required: "+JSON.stringify(t));return o}(t,e)},i=e.Attribute("url",o);return i.slash=function(e){return r(e,o)},i};t.Path=r}).call(this)},454:function(e,t,n){(function(){var e=n(651),r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;t.trim=function(e){return e?e.toString().replace(r,""):""};var o=function(e){return null==e&&void 0===e?String(e):{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"}[Object.prototype.toString.call(e)]};t.type=o,t.assertArray=function(e){if("array"!==o(e))throw"not array";return e};var i=function(e){if("object"!==o(e))throw"not object";return e};t.assertObject=i;var a=function(e,t,n){var r,o;return n||(n=[]),i(e),function(){var t;for(r in t=[],e)o=e[r],t.push([r,o]);return t}().reduce(t,n)};t.reduceMap=a,t.identity=function(e){return e};var u=function(){return Array.prototype.slice.call(arguments)};t.argsArray=u,t.mergeLists=function(){var t;return t=function(t,n){var r,o,i;for(r in o=e(!0,t),n)i=n[r],o[r]=(o[r]||[]).concat(i);return o},u.apply(null,arguments).reduce(t,{})},t.absoluteUrl=function(e,t){return t.match(/https?:\/\/./)?t:e+"/"+t},t.relativeUrl=function(e,t){return t.slice(t,e.length+1)===e+"/"?t.slice(e.length+1):t},t.resourceIdToUrl=function(e,t,n){return t=t.replace(/\/$/,""),(e=e.replace(/^\//,"")).indexOf("/")<0?t+"/"+n+"/"+e:0!==e.indexOf(t)?t+"/"+e:e};var c=function(e,t,n,r){var i;switch(o(n)){case"array":return t(n.map((function(t){return e(t,[n,r])})),r);case"object":return i=function(t,o){var i,a;return i=o[0],a=o[1],t[i]=e(a,[n].concat(r)),t},t(a(n,i,{}),r);default:return t(n,r)}};t.walk=c;var s=function(e,t,n){return t?c(s(e),e,t,n):function(t,n){return s(e,t,n)}};t.postwalk=s}).call(this)},651:function(e,t,n){!function(t){var n=function(e,t,n){var a=n[0],u=n.length;(e||"object"!==r(a))&&(a={});for(var c=0;c<u;++c){var s=n[c];if("object"===r(s))for(var l in s)if("__proto__"!==l){var f=e?o.clone(s[l]):s[l];a[l]=t?i(a[l],f):f}}return a},r=function(e){return{}.toString.call(e).slice(8,-1).toLowerCase()},o=function(e){return n(!0===e,!1,arguments)};function i(e,t){if("object"!==r(e))return t;for(var n in t)"object"===r(e[n])&&"object"===r(t[n])?e[n]=i(e[n],t[n]):e[n]=t[n];return e}o.recursive=function(e){return n(!0===e,!0,arguments)},o.clone=function(e){var t,n,i=e,a=r(e);if("array"===a)for(i=[],n=e.length,t=0;t<n;++t)i[t]=o.clone(e[t]);else if("object"===a)for(t in i={},e)i[t]=o.clone(e[t]);return i},t?e.exports=o:window.merge=o}((e=n.nmd(e))&&"object"==typeof e.exports&&e.exports)},602:function(e){var t=function(e){"use strict";var t,n=function(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]},o=function(e,t,n,o){var u,c,s,l,f=t&&r(t.prototype,a)?t:a,p=Object.create(f.prototype),h=new d(o||[]);return p._invoke=(u=e,c=n,s=h,l=x,function(e,t){if(l===O)throw new Error("Generator is already running");if(l===E){if("throw"===e)throw t;return v()}for(s.method=e,s.arg=t;;){var n=s.delegate;if(n){var r=A(n,s);if(r){if(r===k)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(l===x)throw l=E,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l=O;var o=i(u,c,s);if("normal"===o.type){if(l=s.done?E:S,o.arg===k)continue;return{value:o.arg,done:s.done}}"throw"===o.type&&(l=E,s.method="throw",s.arg=o.arg)}}),p},i=function(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}},a=function(){},u=function(){},c=function(){},s=function(e){["next","throw","return"].forEach((function(t){n(e,t,(function(e){return this._invoke(t,e)}))}))},l=function(e,t){function n(r,o,a,u){var c=i(e[r],e,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&m.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(l).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var r;this._invoke=function(e,o){var i=function(){return new t((function(t,r){n(e,o,t,r)}))};return r=r?r.then(i,i):i()}},f=function(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)},p=function(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t},d=function(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)},h=function(e){if(e){var n=e[b];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function n(){for(;++r<e.length;)if(m.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:t,done:!0}},y=Object.prototype,m=y.hasOwnProperty,g="function"==typeof Symbol?Symbol:{},b=g.iterator||"@@iterator",w=g.asyncIterator||"@@asyncIterator",_=g.toStringTag||"@@toStringTag";try{n({},"")}catch(e){n=function(e,t,n){return e[t]=n}}e.wrap=o;var x="suspendedStart",S="suspendedYield",O="executing",E="completed",k={},j={};n(j,b,(function(){return this}));var C=Object.getPrototypeOf,$=C&&C(C(h([])));$&&$!==y&&m.call($,b)&&(j=$);var P=c.prototype=a.prototype=Object.create(j);function A(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,A(e,n),"throw"===n.method))return k;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return k}var o=i(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,k;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,k):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,k)}return u.prototype=c,n(P,"constructor",c),n(c,"constructor",u),u.displayName=n(c,_,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===u||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,n(e,_,"GeneratorFunction")),e.prototype=Object.create(P),e},e.awrap=function(e){return{__await:e}},s(l.prototype),n(l.prototype,w,(function(){return this})),e.AsyncIterator=l,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var u=new l(o(t,n,r,i),a);return e.isGeneratorFunction(n)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},s(P),n(P,_,"Generator"),n(P,b,(function(){return this})),n(P,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=h,d.prototype={constructor:d,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(p),!e)for(var n in this)"t"===n.charAt(0)&&m.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){var n=function(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o};if(this.done)throw e;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=m.call(i,"catchLoc"),c=m.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&m.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,k):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),k},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),p(n),k}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;p(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:h(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),k}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},385:function(){System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e,t){for(var n in t)e[n]=t[n];return e},t=function(t){var n=function(e){for(var t=[],n=0;n<o.length;n++)o[n]===e?e=null:t.push(o[n]);o=t},r=function(n,r,i){t=r?n:e(e({},t),n);for(var a=o,u=0;u<a.length;u++)a[u](t,i)},o=[];return t=t||{},{action:function(e){var n=function(t){r(t,!1,e)};return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:r,subscribe:function(e){return o.push(e),function(){n(e)}},unsubscribe:n,getState:function(){return t}}},n=function(e,n){var r=s[e];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=t(n);return s[e]={value:o,active:!0},o},i=function(e,n){var r=s[e];if(!r){var o=t(n);return s[e]={value:o,active:!1},o}return r.value},a=function(e){return n("app",e)},u=function(){return i("app",{})},c=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:function(e){"use strict";e.exports=i},254:function(e){"use strict";e.exports=a}},u={};function c(t){var n=u[t];if(void 0!==n)return n.exports;var r=u[t]={id:t,loaded:!1,exports:{}};return e[t].call(r.exports,r,r.exports,c),r.loaded=!0,r.exports}c.y=t,c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},c.d=function(e,t){for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e;c.g.importScripts&&(e=c.g.location+"");var t=c.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=e}();var s={};return(0,c(968).s)(1),function(){"use strict";var e=function(e,t){var n=function(){this.constructor=e};Q(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},t=function(e){return"function"==typeof e},i=function(e){setTimeout((function(){throw e}),0)},a=function(e){return e.reduce((function(e,t){return e.concat(r(t,te)?t.errors:t)}),[])},u=function(e){return e},l=function(e){return 0===e.length?u:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}},f=function(e){if(e||(e=J.Promise||Promise),!e)throw new Error("no Promise impl found");return e},p=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},d=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){p(i,r,o,a,u,"next",e)}function u(e){p(i,r,o,a,u,"throw",e)}a(void 0)}))}},h=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}},v=function(e,t){return!t||"object"!==Ce(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t},y=function(e){return window.openmrsBase+e},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");var n=y(e);t.headers||(t.headers={}),Se(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept;var r,o=Error();return window.fetch(n,t).then((r=d(G().mark((function e(t){var r,i;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t).ok){e.next=10;break}if(204!==r.status){e.next=7;break}return r.data=null,e.abrupt("return",r);case 7:return e.abrupt("return",r.text().then((function(e){try{e&&(r.data=JSON.parse(e))}catch(e){}return r})));case 8:e.next=19;break;case 10:return e.next=12,(0,Oe.getConfig)("@openmrs/esm-api");case 12:if(i=e.sent.redirectAuthFailure,!(n===y(Pe)&&403===r.status||i.enabled&&i.errors.includes(r.status))){e.next=18;break}return(0,Oe.navigate)({to:i.url}),e.abrupt("return",i.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return e.abrupt("return",r.text().then((function(e){var t=e;try{t=JSON.parse(e)}catch(e){}throw new Ae(n,r,t,o)}),(function(e){throw new Ae(n,r,null,o)})));case 19:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)}))},g=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return t.signal=n.signal,new ue((function(r){var o=!1;return m(e,t).then((function(e){o=!0,r.next(e),r.complete()}),(function(e){o=!0,r.error(e)})),function(){o||n.abort()}}))},b=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},w=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){b(i,r,o,a,u,"next",e)}function u(e){b(i,r,o,a,u,"throw",e)}a(void 0)}))}},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(Le<Date.now()-6e4||!De.getState().loaded)&&S(),new ue((function(t){var n=function(n){var r;n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(De.getState()),De.subscribe(n)}))},x=function(){return(Le<Date.now()-6e4||!De.getState().loaded)&&S(),De},S=function(){return new Promise((function(e,t){Le=Date.now(),m(Pe).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return t(),Promise.reject();var r,o,i,a,u;(u=null!==(a=null==(r=n.data)||null===(o=r.user)||void 0===o||null===(i=o.userProperties)||void 0===i?void 0:i.defaultLocale)&&void 0!==a?a:r.locale)!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",u),e(n.data),De.setState({loaded:!0,session:n.data})})).catch((function(e){return(0,Re.reportError)("Failed to fetch new session information: ".concat(e)),t(e),{sessionId:"",authenticated:!1}}))}))},O=function(){De.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},E=function(e,t){return n=e,t.privileges.find((function(e){return n===e.display}))||t.roles.find((function(e){return"System Developer"===e.display}));var n},k=function(){var e,t;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};o(De.getState()),e||(t=De.subscribe(o))}))},j=function(){return new Promise((function(e,t){var n=_().subscribe((function(t){e(t.sessionLocation),n.unsubscribe()}),t)}))},C=function(e,t){return Me.apply(this,arguments)},$=function(){(0,Oe.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:Oe.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:Oe.Type.String,_default:"${openmrsSpaBase}/login",_validators:[Oe.validators.isUrl]},errors:{_type:Oe.Type.Array,_default:[401],_elements:{_type:Oe.Type.Number,_validators:[Oe.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:Oe.Type.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}}}),S()},P=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},A=function(e,t){return e?Ie.read(function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){P(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({type:"Patient",patient:e},t)):Promise.resolve(null)},T=function(e){return function(t){return 0===e?Ye:t.lift(new Je(e))}},I=function(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new et(e,t))}},R=function(e,t,n){var r=null!=n?n:nt;return g("/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(r),{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(T(1)).pipe(I((function(e){return e})))},D=function(e,t){return g("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},L=function(e,t,n){return g("/ws/rest/v1/visit/".concat(e),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},M=function(e){return{uuid:e.uuid,display:e.display,name:e.name}},N=function(){return g("/ws/rest/v1/visittype").pipe(I((function(e){return e.data.results.map(M)}))).pipe(T(1))},U=function(e){return{uuid:e.uuid,display:e.display}},B=function(){return g("/ws/rest/v1/location").pipe(I((function(e){return e.data.results.map(U)}))).pipe(T(1))};c.r(s),c.d(s,{OpenmrsFetchError:function(){return Ae},VisitMode:function(){return Ne},VisitStatus:function(){return Ue},backendDependencies:function(){return ot},clearCurrentUser:function(){return O},defaultVisitCustomRepresentation:function(){return nt},fetchCurrentPatient:function(){return A},fhir:function(){return Ie},fhirBaseUrl:function(){return Te},getCurrentUser:function(){return _},getLocations:function(){return B},getLoggedInUser:function(){return k},getSessionLocation:function(){return j},getSessionStore:function(){return x},getStartedVisit:function(){return rt},getVisitTypes:function(){return N},getVisitsForPatient:function(){return R},makeUrl:function(){return y},openmrsFetch:function(){return m},openmrsObservableFetch:function(){return g},refetchCurrentUser:function(){return S},saveVisit:function(){return D},sessionEndpoint:function(){return Pe},setSessionLocation:function(){return C},setupApiModule:function(){return $},toLocationObject:function(){return U},toVisitTypeObject:function(){return M},updateVisit:function(){return L},userHasAccess:function(){return E}});var z,F,V,H,W,K,q,Z=c(602),G=c.n(Z),Q=function(e,t){return(Q=Object.setPrototypeOf||r({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},Y=!1,J={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,Y=e},get useDeprecatedSynchronousErrorHandling(){return Y}},X={closed:!0,next:function(e){},error:function(e){if(J.useDeprecatedSynchronousErrorHandling)throw e;i(e)},complete:function(){}},ee=Array.isArray||function(e){return e&&"number"==typeof e.length},te=(z=function(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this},z.prototype=Object.create(Error.prototype),z),ne=((q=function(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}).prototype.unsubscribe=function(){var e;if(!this.closed){var n,o=this,i=o._parentOrParents,u=o._ctorUnsubscribe,c=o._unsubscribe,s=o._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r(i,q))i.remove(this);else if(null!==i)for(var l=0;l<i.length;++l)i[l].remove(this);if(t(c)){u&&(this._unsubscribe=void 0);try{c.call(this)}catch(t){e=r(t,te)?a(t.errors):[t]}}if(ee(s)){l=-1;for(var f=s.length;++l<f;){var p=s[l];if(null!==(n=p)&&"object"==typeof n)try{p.unsubscribe()}catch(t){e=e||[],r(t,te)?e=e.concat(a(t.errors)):e.push(t)}}}if(e)throw new te(e)}},q.prototype.add=function(e){var t=e;if(!e)return q.EMPTY;switch(void 0===e?"undefined":o(e)){case"function":t=new q(e);case"object":if(t===this||t.closed||"function"!=typeof t.unsubscribe)return t;if(this.closed)return t.unsubscribe(),t;if(!r(t,q)){var n=t;(t=new q)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var i=t._parentOrParents;if(null===i)t._parentOrParents=this;else if(r(i,q)){if(i===this)return t;t._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return t;i.push(this)}var a=this._subscriptions;return null===a?this._subscriptions=[t]:a.push(t),t},q.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},q.EMPTY=((K=new q).closed=!0,K),q),re="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),oe=function(t){function n(e,o,i){var a=t.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=X;break;case 1:if(!e){a.destination=X;break}if("object"==typeof e){r(e,n)?(a.syncErrorThrowable=e.syncErrorThrowable,a.destination=e,e.add(a)):(a.syncErrorThrowable=!0,a.destination=new ie(a,e));break}default:a.syncErrorThrowable=!0,a.destination=new ie(a,e,o,i)}return a}return e(n,t),n.prototype[re]=function(){return this},n.create=function(e,t,r){var o=new n(e,t,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},n}(ne),ie=(V=function(e,n,r,o){var i,a=F.call(this)||this;a._parentSubscriber=e;var u=a;return t(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==X&&(t((u=Object.create(n)).unsubscribe)&&a.add(u.unsubscribe.bind(u)),u.unsubscribe=a.unsubscribe.bind(a))),a._context=u,a._next=i,a._error=r,a._complete=o,a},e(V,F=oe),V.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;J.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},V.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=J.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):i(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;i(e)}}},V.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};J.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},V.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),J.useDeprecatedSynchronousErrorHandling)throw e;i(e)}},V.prototype.__tryOrSetError=function(e,t,n){if(!J.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return J.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(i(t),!0)}return!1},V.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},V),ae="function"==typeof Symbol&&Symbol.observable||"@@observable",ue=function(){var e=function(e){this._isScalar=!1,e&&(this._subscribe=e)};return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var o=this.operator,i=function(e,t,n){if(e){if(r(e,oe))return e;if(e[re])return e[re]()}return e||t||n?new oe(e,t,n):new oe(X)}(e,t,n);if(o?i.add(o.call(i,this.source)):i.add(this.source||J.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),J.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){J.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,o=t.destination,i=t.isStopped;if(n||i)return!1;e=o&&r(o,oe)?o:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=f(t))((function(t,r){var o;o=n.subscribe((function(t){try{e(t)}catch(e){r(e),o&&o.unsubscribe()}}),r,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[ae]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:l(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=f(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}(),ce="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,se="object"==typeof self&&self&&self.Object===Object&&self,le=(ce||se||Function("return this")()).Symbol,fe=Object.prototype,pe=fe.hasOwnProperty,de=fe.toString,he=le?le.toStringTag:void 0,ve=Object.prototype.toString,ye=le?le.toStringTag:void 0,me=(H=Object.getPrototypeOf,W=Object,function(e){return H(W(e))}),ge=Function.prototype,be=Object.prototype,we=ge.toString,_e=be.hasOwnProperty,xe=we.call(Object),Se=function(e){if(null==(o=e)||"object"!=typeof o||"[object Object]"!=(null==(t=e)?void 0===t?"[object Undefined]":"[object Null]":ye&&ye in Object(t)?function(e){var t=pe.call(e,he),n=e[he];try{e[he]=void 0;var r=!0}catch(e){}var o=de.call(e);return r&&(t?e[he]=n:delete e[he]),o}(t):(n=t,ve.call(n))))return!1;var t,n,o,i=me(e);if(null===i)return!0;var a=_e.call(i,"constructor")&&i.constructor;return"function"==typeof a&&r(a,a)&&we.call(a)==xe},Oe=c(824);function Ee(e,t,n){return Ee=h()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&je(o,n.prototype),o},Ee.apply(null,arguments)}function ke(e){return(ke=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function je(e,t){return(je=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ce=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":o(e)};function $e(e){var t="function"==typeof Map?new Map:void 0;return $e=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Ee(e,arguments,ke(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),je(r,e)},$e(e)}var Pe="/ws/rest/v1/session",Ae=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&je(e,t)}(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ke(t);if(n){var o=ke(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return v(this,e)});function i(e,t,n,a){var u;return function(e,t){if(!r(e,t))throw new TypeError("Cannot call a class as a function")}(this,i),(u=o.call(this)).message="Server responded with ".concat(t.status," (").concat(t.statusText,") for url ").concat(e,". Check err.responseBody or network tab in dev tools for more info"),a.message=u.message,u.responseBody=n,u.response=t,u.stack="Stacktrace for outgoing request:\n".concat(a.stack,"\nStacktrace for incoming response:\n").concat(u.stack),u}return i}($e(Error)),Te="/ws/fhir2/R4",Ie=c(256)({baseUrl:Te},{http:function(e){return m(e.url,{method:e.method,headers:e.headers}).then((function(t){return{status:t.status,headers:t.headers,data:t.data,config:e}}),(function(t){return{status:t.response.status,headers:t.response.headers,data:t.responseBody,config:e}}))}}),Re=c(254),De=(0,c(385).createGlobalStore)("session",{loaded:!1,session:null}),Le=0;function Me(){return(Me=w(G().mark((function e(t,n){return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m(Pe,{method:"POST",body:{sessionLocation:t},headers:{"Content-Type":"application/json"},signal:n.signal});case 2:S();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ne,Ue,Be,ze,Fe,Ve,He=function(){var e=function(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this};return e.prototype=Object.create(Error.prototype),e}(),We=(Ve=function(e,t){var n=Fe.call(this)||this;return n.subject=e,n.subscriber=t,n.closed=!1,n},e(Ve,Fe=ne),Ve.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},Ve),Ke=function(t){var n=function(e){var n=t.call(this,e)||this;return n.destination=e,n};return e(n,t),n}(oe),qe=function(t){var n=function(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e};return e(n,t),n.prototype[re]=function(){return new Ke(this)},n.prototype.lift=function(e){var t=new Ze(this,this);return t.operator=e,t},n.prototype.next=function(e){if(this.closed)throw new He;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},n.prototype.error=function(e){if(this.closed)throw new He;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].error(e);this.observers.length=0},n.prototype.complete=function(){if(this.closed)throw new He;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},n.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},n.prototype._trySubscribe=function(e){if(this.closed)throw new He;return t.prototype._trySubscribe.call(this,e)},n.prototype._subscribe=function(e){if(this.closed)throw new He;return this.hasError?(e.error(this.thrownError),ne.EMPTY):this.isStopped?(e.complete(),ne.EMPTY):(this.observers.push(e),new We(this,e))},n.prototype.asObservable=function(){var e=new ue;return e.source=this,e},n.create=function(e,t){return new Ze(e,t)},n}(ue),Ze=function(t){var n=function(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r};return e(n,t),n.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},n.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},n.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},n.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):ne.EMPTY},n}(qe),Ge=function(t){var n=function(e){var n=t.call(this)||this;return n._value=e,n};return e(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),n.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},n.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new He;return this._value},n.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},n}(qe),Qe=function(){var e=function(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this};return e.prototype=Object.create(Error.prototype),e}(),Ye=new ue((function(e){return e.complete()})),Je=function(){var e=function(e){if(this.total=e,this.total<0)throw new Qe};return e.prototype.call=function(e,t){return t.subscribe(new Xe(e,this.total))},e}(),Xe=function(t){var n=function(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r};return e(n,t),n.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},n}(oe),et=function(){var e=function(e,t){this.project=e,this.thisArg=t};return e.prototype.call=function(e,t){return t.subscribe(new tt(e,this.project,this.thisArg))},e}(),tt=function(t){var n=function(e,n,r){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=r||o,o};return e(n,t),n.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},n}(oe),nt="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,value),location:(uuid,name,display),startDatetime,stopDatetime)",rt=new Ge(null);(Be=Ne||(Ne={})).NEWVISIT="startVisit",Be.EDITVISIT="editVisit",Be.LOADING="loadingVisit",(ze=Ue||(Ue={})).NOTSTARTED="notStarted",ze.ONGOING="ongoing";var ot={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),s}())}}}))},8461:function(e,t,n){"use strict";var r=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},o=function(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function u(e){r(a,o,i,u,c,"next",e)}function c(e){r(a,o,i,u,c,"throw",e)}u(void 0)}))}},i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}},a=function(e,t){return!t||"object"!==G(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t},u=function(e){return window.openmrsBase+e},c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");var n=u(e);t.headers||(t.headers={}),H(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept;var r,i=Error();return window.fetch(n,t).then((r=o(R().mark((function e(t){var r,o;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t).ok){e.next=10;break}if(204!==r.status){e.next=7;break}return r.data=null,e.abrupt("return",r);case 7:return e.abrupt("return",r.text().then((function(e){try{e&&(r.data=JSON.parse(e))}catch(e){}return r})));case 8:e.next=19;break;case 10:return e.next=12,(0,W.getConfig)("@openmrs/esm-api");case 12:if(o=e.sent.redirectAuthFailure,!(n===u(Y)&&403===r.status||o.enabled&&o.errors.includes(r.status))){e.next=18;break}return(0,W.navigate)({to:o.url}),e.abrupt("return",o.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return e.abrupt("return",r.text().then((function(e){var t=e;try{t=JSON.parse(e)}catch(e){}throw new J(n,r,t,i)}),(function(e){throw new J(n,r,null,i)})));case 19:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)}))},s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return t.signal=n.signal,new D.y((function(r){var o=!1;return c(e,t).then((function(e){o=!0,r.next(e),r.complete()}),(function(e){o=!0,r.error(e)})),function(){o||n.abort()}}))},f=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},p=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){f(i,r,o,a,u,"next",e)}function u(e){f(i,r,o,a,u,"throw",e)}a(void 0)}))}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(re<Date.now()-6e4||!ne.getState().loaded)&&y(),new D.y((function(t){var n=function(n){var r;n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(ne.getState()),ne.subscribe(n)}))},h=function(){return(re<Date.now()-6e4||!ne.getState().loaded)&&y(),ne},y=function(){return new Promise((function(e,t){re=Date.now(),c(Y).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return t(),Promise.reject();var r,o,i,a,u;(u=null!==(a=null==(r=n.data)||null===(o=r.user)||void 0===o||null===(i=o.userProperties)||void 0===i?void 0:i.defaultLocale)&&void 0!==a?a:r.locale)!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",u),e(n.data),ne.setState({loaded:!0,session:n.data})})).catch((function(e){return(0,te.reportError)("Failed to fetch new session information: ".concat(e)),t(e),{sessionId:"",authenticated:!1}}))}))},m=function(){ne.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},g=function(e,t){return n=e,t.privileges.find((function(e){return n===e.display}))||t.roles.find((function(e){return"System Developer"===e.display}));var n},b=function(){var e,t;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};o(ne.getState()),e||(t=ne.subscribe(o))}))},w=function(){return new Promise((function(e,t){var n=d().subscribe((function(t){e(t.sessionLocation),n.unsubscribe()}),t)}))},_=function(e,t){return oe.apply(this,arguments)},x=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},S=function(e,t){return e?ee.read(function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){x(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({type:"Patient",patient:e},t)):Promise.resolve(null)},O=function(e){return function(t){return 0===e?we:t.lift(new _e(e))}},E=function(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Se(e,t))}},k=function(e,t,n){var r=null!=n?n:Ee;return s("/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(r),{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(O(1)).pipe(E((function(e){return e})))},j=function(e,t){return s("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},C=function(e,t,n){return s("/ws/rest/v1/visit/".concat(e),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},$=function(e){return{uuid:e.uuid,display:e.display,name:e.name}},P=function(){return s("/ws/rest/v1/visittype").pipe(E((function(e){return e.data.results.map($)}))).pipe(O(1))},A=function(e){return{uuid:e.uuid,display:e.display}},T=function(){return s("/ws/rest/v1/location").pipe(E((function(e){return e.data.results.map(A)}))).pipe(O(1))};n.d(t,{nF:function(){return J},u4:function(){return ce},Rx:function(){return se},Wf:function(){return je},Ze:function(){return m},I$:function(){return Ee},Vy:function(){return S},N$:function(){return ee},DN:function(){return X},ts:function(){return d},JC:function(){return T},r:function(){return b},WK:function(){return w},KJ:function(){return h},$X:function(){return ke},P9:function(){return P},nx:function(){return k},bf:function(){return u},vb:function(){return c},uj:function(){return s},VJ:function(){return y},bX:function(){return j},z$:function(){return Y},jK:function(){return _},Lq:function(){return A},VF:function(){return $},ym:function(){return C},y9:function(){return g}});var I=n(1602),R=n.n(I),D=n(1720),L=n(963),M=(0,n(6899).Z)(Object.getPrototypeOf,Object),N=n(4897),U=Function.prototype,B=Object.prototype,z=U.toString,F=B.hasOwnProperty,V=z.call(Object),H=function(e){if(!(0,N.Z)(e)||"[object Object]"!=(0,L.Z)(e))return!1;var t=M(e);if(null===t)return!0;var n=F.call(t,"constructor")&&t.constructor;return"function"==typeof n&&l(n,n)&&z.call(n)==V},W=n(9714);function K(e,t,n){return(K=i()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Z(o,n.prototype),o}).apply(null,arguments)}function q(e){return(q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Z(e,t){return(Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var G=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":v(e)};function Q(e){var t="function"==typeof Map?new Map:void 0;return Q=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return K(e,arguments,q(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Z(r,e)},Q(e)}var Y="/ws/rest/v1/session",J=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Z(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=q(t);if(n){var o=q(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return a(this,e)});function o(e,t,n,i){var a;return function(e,t){if(!l(e,t))throw new TypeError("Cannot call a class as a function")}(this,o),(a=r.call(this)).message="Server responded with ".concat(t.status," (").concat(t.statusText,") for url ").concat(e,". Check err.responseBody or network tab in dev tools for more info"),i.message=a.message,a.responseBody=n,a.response=t,a.stack="Stacktrace for outgoing request:\n".concat(i.stack,"\nStacktrace for incoming response:\n").concat(a.stack),a}return o}(Q(Error)),X="/ws/fhir2/R4",ee=n(1256)({baseUrl:X},{http:function(e){return c(e.url,{method:e.method,headers:e.headers}).then((function(t){return{status:t.status,headers:t.headers,data:t.data,config:e}}),(function(t){return{status:t.response.status,headers:t.response.headers,data:t.responseBody,config:e}}))}}),te=n(674),ne=(0,n(5385).createGlobalStore)("session",{loaded:!1,session:null}),re=0;function oe(){return(oe=p(R().mark((function e(t,n){return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(Y,{method:"POST",body:{sessionLocation:t},headers:{"Content-Type":"application/json"},signal:n.signal});case 2:y();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ie,ae,ue,ce,se,le,fe,pe,de,he=n(7080),ve=n(7860),ye=n(7043),me=(ae=ve.xQ,ue=function(e){var t=ae.call(this)||this;return t._value=e,t},he.ZT(ue,ae),Object.defineProperty(ue.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),ue.prototype._subscribe=function(e){var t=ae.prototype._subscribe.call(this,e);return t&&!t.closed&&e.next(this._value),t},ue.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new ye.N;return this._value},ue.prototype.next=function(e){ae.prototype.next.call(this,this._value=e)},ue),ge=n(7811),be=((ie=function(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}).prototype=Object.create(Error.prototype),ie),we=new D.y((function(e){return e.complete()})),_e=(pe=function(e){if(this.total=e,this.total<0)throw new be},pe.prototype.call=function(e,t){return t.subscribe(new xe(e,this.total))},pe),xe=(le=ge.L,fe=function(e,t){var n=le.call(this,e)||this;return n.total=t,n.count=0,n},he.ZT(fe,le),fe.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},fe),Se=function(){var e=function(e,t){this.project=e,this.thisArg=t};return e.prototype.call=function(e,t){return t.subscribe(new Oe(e,this.project,this.thisArg))},e}(),Oe=function(e){var t=function(t,n,r){var o=e.call(this,t)||this;return o.project=n,o.count=0,o.thisArg=r||o,o};return he.ZT(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(ge.L),Ee="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,value),location:(uuid,name,display),startDatetime,stopDatetime)",ke=new me(null);(de=ce||(ce={})).NEWVISIT="startVisit",de.EDITVISIT="editVisit",de.LOADING="loadingVisit",function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(se||(se={}));var je={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}},6066:function(){var e=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):l(e,t)};System.register(["@openmrs/esm-state"],(function(t,n){var r={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore}],execute:function(){t(function(){var t={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},685:function(e){"use strict";e.exports=r}},o={};function i(e){var n=o[e];if(void 0!==n)return n.exports;var r=o[e]={exports:{}};return t[e](r,r.exports,i),r.exports}i.y=n,i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e}();var a={};return(0,i(968).s)(1),function(){"use strict";var t=function(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")},n=function(e){return e&&e.sensitive?"":"i"},r=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},o=function(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},u=function(t){return n=t.matcher,(null!=(r=RegExp)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):e(n,r))?t.matcher:"string"==typeof t.matcher?h(t.matcher):h(t.path);var n,r},c=function(e){return s([e])},s=function(e){var t=l(),n=e.map((function(e){return{matcher:u(e),settings:e}})),r=o(t).concat(o(n));v.setState(r,!0)},l=function(){return v.getState()},f=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},p=function(e,t){if(e.length>0){var n=y(e,t);if(n){for(var r=[n],o=y(e,n.settings.parent);void 0!==o;)r.push(o),o=y(e,o.settings.parent);return r.reverse()}}return[]},d=function(e){return p(l(),e)};function h(r,o,i){return e(r,RegExp)?function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return e}(r,o):Array.isArray(r)?(c=o,s=i,l=r.map((function(e){return h(e,c,s).source})),new RegExp("(?:"+l.join("|")+")",n(s))):(a=o,function(e,r,o){void 0===o&&(o={});for(var i=o.strict,a=void 0!==i&&i,u=o.start,c=void 0===u||u,s=o.end,l=void 0===s||s,f=o.encode,p=void 0===f?function(e){return e}:f,d="["+t(o.endsWith||"")+"]|$",h="["+t(o.delimiter||"/#?")+"]",v=c?"^":"",y=0,m=e;y<m.length;y++){var g=m[y];if("string"==typeof g)v+=t(p(g));else{var b=t(p(g.prefix)),w=t(p(g.suffix));if(g.pattern)if(r&&r.push(g),b||w)if("+"===g.modifier||"*"===g.modifier){var _="*"===g.modifier?"?":"";v+="(?:"+b+"((?:"+g.pattern+")(?:"+w+b+"(?:"+g.pattern+"))*)"+w+")"+_}else v+="(?:"+b+"("+g.pattern+")"+w+")"+g.modifier;else v+="("+g.pattern+")"+g.modifier;else v+="(?:"+b+w+")"+g.modifier}}if(l)a||(v+=h+"?"),v+=o.endsWith?"(?="+d+")":"$";else{var x=e[e.length-1],S="string"==typeof x?h.indexOf(x[x.length-1])>-1:void 0===x;a||(v+="(?:"+h+"(?="+d+"))?"),S||(v+="(?="+h+"|"+d+")")}return new RegExp(v,n(o))}(function(e,n){void 0===n&&(n={});for(var r=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[u=n+1])throw new TypeError('Pattern cannot start with "?" at '+u);for(;u<e.length;)if("\\"!==e[u]){if(")"===e[u]){if(0==--o){u++;break}}else if("("===e[u]&&(o++,"?"!==e[u+1]))throw new TypeError("Capturing groups are not allowed at "+u);i+=e[u++]}else i+=e[u++]+e[u++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=u}else{for(var a="",u=n+1;u<e.length;){var c=e.charCodeAt(u);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;a+=e[u++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=u}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),o=n.prefixes,i=void 0===o?"./":o,a="[^"+t(n.delimiter||"/#?")+"]+?",u=[],c=0,s=0,l="",f=function(e){if(s<r.length&&r[s].type===e)return r[s++].value},p=function(e){var t=f(e);if(void 0!==t)return t;var n=r[s],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},d=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};s<r.length;){var h=f("CHAR"),v=f("NAME"),y=f("PATTERN");if(v||y){var m=h||"";-1===i.indexOf(m)&&(l+=m,m=""),l&&(u.push(l),l=""),u.push({name:v||c++,prefix:m,suffix:"",pattern:y||a,modifier:f("MODIFIER")||""})}else{var g=h||f("ESCAPED_CHAR");if(g)l+=g;else if(l&&(u.push(l),l=""),f("OPEN")){m=d();var b=f("NAME")||"",w=f("PATTERN")||"",_=d();p("CLOSE"),u.push({name:b||(w?c++:""),pattern:b&&!w?a:w,prefix:m,suffix:_,modifier:f("MODIFIER")||""})}else p("END")}}return u}(r,u=i),a,u));var a,u,c,s,l}i.r(a),i.d(a,{filterBreadcrumbs:function(){return p},getBreadcrumbs:function(){return l},getBreadcrumbsFor:function(){return d},registerBreadcrumb:function(){return c},registerBreadcrumbs:function(){return s}});var v=(0,i(685).createGlobalStore)("breadcrumbs",[]);function y(e,t){if(t)return n=t,(r=e.filter((function(e){return e.matcher.test(n)})),function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),1!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(r)||function(e,t){if(e){if("string"==typeof e)return f(e,1);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,1):void 0}}(r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0]||function(e,t){for(var n=t.split("/");n.length>1;){n.pop();var r=y(e,n.join("/"));if(r)return r}}(e,t);var n,r}}(),a}())}}}))},9714:function(){var e=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":v(e)};System.register(["@openmrs/esm-state","single-spa"],(function(t,n){var r={},o={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore,r.getGlobalStore=e.getGlobalStore},function(e){o.navigateToUrl=e.navigateToUrl}],execute:function(){t(function(){"use strict";var t={685:function(e){e.exports=r},645:function(e){e.exports=o}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){var t=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},n=function(e){return function n(r){return 0===arguments.length||t(r)?n:e.apply(this,arguments)}},r=function(e){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return t(o)?r:n((function(t){return e(o,t)}));default:return t(o)&&t(i)?r:t(o)?n((function(t){return e(t,i)})):t(i)?n((function(t){return e(o,t)})):e(o,i)}}},o=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},u=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},c=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},s=function(e,t,n,r){var i=function(e,t){return se(e,t,n.slice(),r.slice())},a=o(e);return!u((function(e,t){return!u(i,t,e)}),o(t),a)},l=function(e){return function o(i,a,u){switch(arguments.length){case 0:return o;case 1:return t(i)?o:r((function(t,n){return e(i,t,n)}));case 2:return t(i)&&t(a)?o:t(i)?r((function(t,n){return e(t,a,n)})):t(a)?r((function(t,n){return e(i,t,n)})):n((function(t){return e(i,a,t)}));default:return t(i)&&t(a)&&t(u)?o:t(i)&&t(a)?r((function(t,n){return e(t,n,u)})):t(i)&&t(u)?r((function(t,n){return e(t,a,n)})):t(a)&&t(u)?r((function(t,n){return e(i,t,n)})):t(i)?n((function(t){return e(t,a,u)})):t(a)?n((function(t){return e(i,t,u)})):t(u)?n((function(t){return e(i,a,t)})):e(i,a,u)}}},f=function(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)},p=function(e,t,n,r){return e["@@transducer/result"](n[r](be(e["@@transducer/step"],e),t))},d=function(e){return"[object Object]"===Object.prototype.toString.call(e)},h=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},v=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}},y=function(e){return(0,Ae.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1})},m=function(){return(0,Ae.getGlobalStore)("config-extension-slots",{slots:{}})},g=function(e){return b(m().getState(),e)},b=function(e,t){var n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}},w=function(){return(0,Ae.getGlobalStore)("config-extensions",{configs:{}})},_=function(e,t){return x(w().getState(),e,t)},x=function(e,t,n){var r,o=null===(r=e.configs[t])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},S=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},O=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},E=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){O(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},k=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||C(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},j=function(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||C(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},C=function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}},$=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,c=z(u,e,t);y(u).setState({loaded:!0,config:c})}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},P=function(e,t){var n,r,o=(n=V(B(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=k(o.value,2),u=a[0],c=a[1],s=!0,l=!1,f=void 0;try{for(var p,d=Object.entries(c)[Symbol.iterator]();!(s=(p=d.next()).done);s=!0){var h=k(p.value,2),v=h[0];U(h[1],u,v)}}catch(e){l=!0,f=e}finally{try{s||null==d.return||d.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return E({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=k(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=m(),u=a.getState(),c={slots:E({},u.slots,i)};le(u,c)||a.setState(c)},A=function(e,t){var n=function(e,t){var n=Ne(he(e.schemas)),r=j(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,c=r[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=k(u.value,2);n=V([n,Ue(s[0],s[1])])}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t);Me.setState({config:n})},T=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=t.mountedExtensions[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=u.value,l=N(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,e,n);r[s.slotName]=E({},r[s.slotName],O({},s.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}w().setState({configs:r})},I=function(e,t){Be(e,t);var n=Ie.getState();Ie.setState({schemas:E({},n.schemas,O({},e,t))})},R=function(e,t){Be(e,t);var n=Ie.getState();n.schemas[e]&&console.warn("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),Ie.setState({schemas:E({},n.schemas,O({},e,t))})},D=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Ie.getState();Ie.setState({providedConfigs:j(n.providedConfigs).concat([{source:t,config:e}])})},L=function(e){return new Promise((function(t){var n=function(e){e.loaded&&e.config&&(t(e.config),o&&o())},r=y(e);n(r.getState());var o=r.subscribe(n)}))},M=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];H(e,t,n);var o=Ve(e,t,r);return Fe(e,o,n),o},N=function(e,t,n,r,o,i){var a,u,c,s,l=k(r.split("#"),1)[0],f=o.schemas[l],p=f?l:t,d=B(o,i),h=F(e,d),v=null!==(s=null==h||null===(a=h.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(c=u.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=V([F(p,d),v]),m=null!=f?f:o.schemas[t];H(m,y,p);var g=Ve(m,y,o.devDefaultsAreOn);return Fe(m,g,p),delete g.extensionSlots,g},U=function(e,t,n){var r="Extension slot config '".concat(t,".extensionSlots.").concat(n),o=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Z(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},B=function(e,t){return j(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},z=function(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);var r=t.schemas[e],o=F(e,B(t,n));H(r,o,e);var i=Ve(r,o,t.devDefaultsAreOn);return Fe(r,i,e),delete i.extensionSlots,i},F=function(e,t){return V(t.map((function(t){return t[e]})).filter((function(e){return!!e})))},V=function(e){return _e(Oe)({},e)},H=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e.hasOwnProperty(c)?ze(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},W=function(e,t,n){t&&K(e,[{Array:Ee,Boolean:ke,ConceptUuid:Pe,Number:je,Object:$e,String:Ce,UUID:Pe,PersonAttributeTypeUuid:Pe,PatientIdentifierTypeUuid:Pe}[t]],n)},K=function(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=(0,a.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(e,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(e,": ").concat(c)))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}},q=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},Z=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},G=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Q=function(e,t){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return Y(e,function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){G(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},t)).replace(/^\/\//,"/")},Y=function(e,t){return Object.keys(t).reduce((function(e,n){return e.split("${"+n+"}").join(t[n])}),e)},J=function(e){var t=e.to,n=e.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=Q(t,n);o.startsWith(r)?(0,He.navigateToUrl)(o):window.location.assign(o)};i.r(a),i.d(a,{Type:function(){return pe},configExtensionStore:function(){return Le},configInternalStore:function(){return Ie},defineConfigSchema:function(){return I},defineExtensionConfigSchema:function(){return R},getConfig:function(){return L},getConfigStore:function(){return y},getExtensionConfig:function(){return _},getExtensionConfigFromStore:function(){return x},getExtensionSlotConfig:function(){return g},getExtensionSlotConfigFromStore:function(){return b},getExtensionSlotsConfigStore:function(){return m},getExtensionsConfigStore:function(){return w},implementerToolsConfigStore:function(){return Me},inRange:function(){return We},interpolateString:function(){return Y},interpolateUrl:function(){return Q},isUrl:function(){return qe},isUrlWithTemplateParameters:function(){return Ke},navigate:function(){return J},oneOf:function(){return Ze},processConfig:function(){return M},provide:function(){return D},temporaryConfigStore:function(){return De},validator:function(){return h},validators:function(){return Ge}});var X="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},ee=Object.prototype.toString,te=function(){return"[object Arguments]"===ee.call(arguments)?function(e){return"[object Arguments]"===ee.call(e)}:function(e){return c("callee",e)}}(),ne=te,re=!{toString:null}.propertyIsEnumerable("toString"),oe=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ie=function(){return arguments.propertyIsEnumerable("length")}(),ae=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},ue="function"!=typeof Object.keys||ie?n((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=ie&&ne(e);for(t in e)!c(t,e)||o&&"length"===t||(r[r.length]=t);if(re)for(n=oe.length-1;n>=0;)c(t=oe[n],e)&&!ae(r,t)&&(r[r.length]=t),n-=1;return r})):n((function(e){return Object(e)!==e?[]:Object.keys(e)})),ce=n((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function se(t,n,r,o){if(X(t,n))return!0;var i,a,u=ce(t);if(u!==ce(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(u){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===(i=t.constructor,null==(a=String(i).match(/^function (\w*)/))?"":a[1]))return t===n;break;case"Boolean":case"Number":case"String":if((void 0===t?"undefined":e(t))!=(void 0===n?"undefined":e(n))||!X(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!X(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===t)return o[l]===n;l-=1}switch(u){case"Map":return t.size===n.size&&s(t.entries(),n.entries(),r.concat([t]),o.concat([n]));case"Set":return t.size===n.size&&s(t.values(),n.values(),r.concat([t]),o.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=ue(t);if(f.length!==ue(n).length)return!1;var p=r.concat([t]),d=o.concat([n]);for(l=f.length-1;l>=0;){var h=f[l];if(!c(h,n)||!se(n[h],t[h],p,d))return!1;l-=1}return!0}var le=r((function(e,t){return se(e,t,[],[])}));function fe(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var u in t[a+1]=e,n[a+1]=o,e)o[u]=r?fe(e[u],t,n,!0):e[u];return o};switch(ce(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}var pe,de,he=n((function(e){return null!=e&&"function"==typeof e.clone?e.clone():fe(e,[],[],!0)})),ve=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},ye=n((function(e){return!!ve(e)||!!e&&"object"==typeof e&&(t=e,!("[object String]"===Object.prototype.toString.call(t)))&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1));var t})),me=function(){var e=function(e){this.f=e};return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),ge=r((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,c){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,c,s){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,c,s,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))})),be=ge,we="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",_e=l((function(e,t,n){if("function"==typeof e&&(e=new me(e)),ye(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return p(e,t,n,"fantasy-land/reduce");if(null!=n[we])return f(e,t,n[we]());if("function"==typeof n.next)return f(e,t,n);if("function"==typeof n.reduce)return p(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),xe=l((function(e,t,n){var r,o={};for(r in t)c(r,t)&&(o[r]=c(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)c(r,n)&&!c(r,o)&&(o[r]=n[r]);return o})),Se=l((function e(t,n,r){return xe((function(n,r,o){return d(r)&&d(o)?e(t,r,o):t(n,r,o)}),n,r)})),Oe=r((function(e,t){return Se((function(e,t,n){return n}),e,t)}));(de=pe||(pe={})).Array="Array",de.Boolean="Boolean",de.ConceptUuid="ConceptUuid",de.Number="Number",de.Object="Object",de.String="String",de.UUID="UUID",de.PersonAttributeTypeUuid="PersonAttributeTypeUuid",de.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var Ee=h((function(e){return Array.isArray(e)}),"must be an array"),ke=h((function(e){return"boolean"==typeof e}),"must be a boolean"),je=h((function(e){return"number"==typeof e}),"must be a number"),Ce=h((function(e){return"string"==typeof e}),"must be a string"),$e=h((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),Pe=h((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),Ae=i(685),Te={providedConfigs:[],schemas:{},devDefaultsAreOn:v()},Ie=(0,Ae.createGlobalStore)("config-internal",Te),Re=v();Ie.subscribe((function(e){var t;e.devDefaultsAreOn!=Re&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),Re=e.devDefaultsAreOn)}));var De=(0,Ae.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});De.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var Le=(0,Ae.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Me=(0,Ae.createGlobalStore)("config-implementer-tools",{config:{}});function Ne(e){return e.hasOwnProperty("_default")?E({},e,{_value:e._default,_source:"default"}):Z(e)?Object.keys(e).reduce((function(t,n){return t[n]=Ne(e[n]),t}),{}):{}}function Ue(e,t){return Z(e)?Object.keys(e).reduce((function(n,r){return n[r]=Ue(e[r],t),n}),{}):{_value:e,_source:t}}function Be(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var u,c=function(o,i){var a=i.value,u=n+(n&&".")+a,c=t[a];if(!Z(c))return console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r)),"continue";c.hasOwnProperty("_default")||Be(e,c,u);var s=c._elements;if(q(s)&&Be(e,s,u+"._elements"),c._validators){var l=!0,f=!1,p=void 0;try{for(var d,h=c._validators[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var v=d.value;"function"!=typeof v&&console.error("".concat(e," has invalid validator for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(e){f=!0,p=e}finally{try{l||null==h.return||h.return()}finally{if(f)throw p}}}var y=c._type;y&&!Object.values(pe).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(pe).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(c).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(c))),s&&y&&![pe.Array,pe.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},s=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(s,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}}function ze(e,t,n){W(n,e._type,t),Z(t)?e._type===pe.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c];H(e._elements,s,"".concat(n,".").concat(c))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||H(e,t,n):e._type===pe.Array&&function(e,t,n){if(q(e._elements))for(var r=0;r<t.length;r++)ze(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;W("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}(e,t,n)}function Fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&K(n,e._validators,t),Z(t)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e._type===pe.Object&&e._elements?Fe(e._elements,s,l):Fe(f,s,l)}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var p=0;p<t.length;p++)Fe(e._elements,t[p],"".concat(n,"[").concat(p,"]"))}$(Ie.getState(),De.getState()),Ie.subscribe((function(e){return $(e,De.getState())})),De.subscribe((function(e){return $(Ie.getState(),e)})),A(Ie.getState(),De.getState()),Ie.subscribe((function(e){return A(e,De.getState())})),De.subscribe((function(e){return A(Ie.getState(),e)})),P(Ie.getState(),De.getState()),Ie.subscribe((function(e){return P(e,De.getState())})),De.subscribe((function(e){return P(Ie.getState(),e)})),T(Ie.getState(),Le.getState(),De.getState()),Ie.subscribe((function(e){T(e,Le.getState(),De.getState())})),Le.subscribe((function(e){T(Ie.getState(),e,De.getState())})),De.subscribe((function(e){T(Ie.getState(),Le.getState(),e)}));var Ve=function(e,t,n){var r=he(t);if(!e)return r;var o=!0,i=!1,a=void 0;try{for(var u,c=function(t,o){var i=o.value,a=r[i],u=e[i];if(u&&u.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=u._devDefault||u._default;r[i]=n?c:u._default}var s=u._elements;if(a&&q(s))if(u._type===pe.Array&&Array.isArray(a)){var l=a.map((function(e){return Ve(s,e,n)}));r[i]=l}else if(u._type===pe.Object){var f=!0,p=!1,d=void 0;try{for(var h,v=Object.keys(a)[Symbol.iterator]();!(f=(h=v.next()).done);f=!0){var y=h.value;a[y]=Ve(s,a[y],n)}}catch(e){p=!0,d=e}finally{try{f||null==v.return||v.return()}finally{if(p)throw d}}}}else if(Z(u)){var m=r.hasOwnProperty(i)?a:{};Z(m)&&(r[i]=Ve(u,m,n))}},s=Object.keys(e)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(0,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return r},He=i(645),We=function(e,t){return h((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},Ke=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return h((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+t.map((function(e){return"${"+e+"}"})).join(", "))},qe=Ke([]),Ze=function(e){return h((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},Ge={inRange:We,isUrl:qe,isUrlWithTemplateParameters:Ke,oneOf:Ze}}(),a}())}}}))},3373:function(e,t,n){"use strict";var r=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},o=function(e,t){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return i(e,function(e){for(var t=arguments,n=function(n){var o=null!=t[n]?t[n]:{},i=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(o).filter((function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})))),i.forEach((function(t){r(e,t,o[t])}))},o=1;o<arguments.length;o++)n(o);return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},t)).replace(/^\/\//,"/")},i=function(e,t){return Object.keys(t).reduce((function(e,n){return e.split("${"+n+"}").join(t[n])}),e)},a=function(e){var t=e.to,n=e.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),i=o(t,n);i.startsWith(r)?(0,J.UO)(i):window.location.assign(i)},u=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},c=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},s=function(e){return function t(n){return 0===arguments.length||c(n)?t:e.apply(this,arguments)}},l=function(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return c(n)?t:s((function(t){return e(n,t)}));default:return c(n)&&c(r)?t:c(n)?s((function(t){return e(t,r)})):c(r)?s((function(t){return e(n,t)})):e(n,r)}}},f=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},p=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},d=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},h=function(e,t,n,r){var o=function(e,t){return he(e,t,n.slice(),r.slice())},i=f(e);return!p((function(e,t){return!p(o,t,e)}),f(t),i)},y=function(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return c(n)?t:l((function(t,r){return e(n,t,r)}));case 2:return c(n)&&c(r)?t:c(n)?l((function(t,n){return e(t,r,n)})):c(r)?l((function(t,r){return e(n,t,r)})):s((function(t){return e(n,r,t)}));default:return c(n)&&c(r)&&c(o)?t:c(n)&&c(r)?l((function(t,n){return e(t,n,o)})):c(n)&&c(o)?l((function(t,n){return e(t,r,n)})):c(r)&&c(o)?l((function(t,r){return e(n,t,r)})):c(n)?s((function(t){return e(t,r,o)})):c(r)?s((function(t){return e(n,t,o)})):c(o)?s((function(t){return e(n,r,t)})):e(n,r,o)}}},m=function(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)},g=function(e,t,n,r){return e["@@transducer/result"](n[r](Se(e["@@transducer/step"],e),t))},b=function(e){return"[object Object]"===Object.prototype.toString.call(e)},w=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}},_=function(e){return(0,De.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1})},x=function(){return(0,De.getGlobalStore)("config-extension-slots",{slots:{}})},S=function(){return(0,De.getGlobalStore)("config-extensions",{configs:{}})},O=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},E=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},k=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){E(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},j=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||$(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},C=function(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},$=function(e,t){if(e){if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(e,t):void 0}},P=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,c=z(u,e,t);_(u).setState({loaded:!0,config:c})}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},A=function(e,t){var n,r,o=(n=V(B(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=j(o.value,2),u=a[0],c=a[1],s=!0,l=!1,f=void 0;try{for(var p,d=Object.entries(c)[Symbol.iterator]();!(s=(p=d.next()).done);s=!0){var h=j(p.value,2),v=h[0];U(h[1],u,v)}}catch(e){l=!0,f=e}finally{try{s||null==d.return||d.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return k({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=j(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=x(),u=a.getState(),c={slots:k({},u.slots,i)};ve(u,c)||a.setState(c)},T=function(e,t){var n=function(e,t){var n=Fe(ge(e.schemas)),r=C(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,c=r[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=j(u.value,2);n=V([n,Ve(s[0],s[1])])}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t);ze.setState({config:n})},I=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=t.mountedExtensions[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=u.value,l=N(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,e,n);r[s.slotName]=k({},r[s.slotName],E({},s.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}S().setState({configs:r})},R=function(e,t){He(e,t);var n=Me.getState();Me.setState({schemas:k({},n.schemas,E({},e,t))})},D=function(e,t){He(e,t);var n=Me.getState();n.schemas[e]&&console.warn("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),Me.setState({schemas:k({},n.schemas,E({},e,t))})},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Me.getState();Me.setState({providedConfigs:C(n.providedConfigs).concat([{source:t,config:e}])})},M=function(e){return new Promise((function(t){var n=function(e){e.loaded&&e.config&&(t(e.config),o&&o())},r=_(e);n(r.getState());var o=r.subscribe(n)}))},N=function(e,t,n,r,o,i){var a,u,c,s,l=j(r.split("#"),1)[0],f=o.schemas[l],p=f?l:t,d=B(o,i),h=F(e,d),v=null!==(s=null==h||null===(a=h.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(c=u.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=V([F(p,d),v]),m=null!=f?f:o.schemas[t];H(m,y,p);var g=qe(m,y,o.devDefaultsAreOn);return Ke(m,g,p),delete g.extensionSlots,g},U=function(e,t,n){var r="Extension slot config '".concat(t,".extensionSlots.").concat(n),o=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Z(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},B=function(e,t){return C(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},z=function(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);var r=t.schemas[e],o=F(e,B(t,n));H(r,o,e);var i=qe(r,o,t.devDefaultsAreOn);return Ke(r,i,e),delete i.extensionSlots,i},F=function(e,t){return V(t.map((function(t){return t[e]})).filter((function(e){return!!e})))},V=function(e){return Ee(Ce)({},e)},H=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e.hasOwnProperty(c)?We(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},W=function(e,t,n){t&&K(e,[{Array:$e,Boolean:Pe,ConceptUuid:Re,Number:Ae,Object:Ie,String:Te,UUID:Re,PersonAttributeTypeUuid:Re,PatientIdentifierTypeUuid:Re}[t]],n)},K=function(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=(0,a.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(e,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(e,": ").concat(c)))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}},q=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},Z=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e};n.d(t,{JU:function(){return Y.ConfigStore},Dy:function(){return G},SH:function(){return R},Tj:function(){return D},iE:function(){return M},pR:function(){return _},Z2:function(){return X},IT:function(){return i},ll:function(){return o},CB:function(){return te},gZ:function(){return ee},c4:function(){return a},kw:function(){return ne},JJ:function(){return L},sC:function(){return u},z2:function(){return re}});var G,Q,Y={};n.r(Y),n.d(Y,{R2:function(){return Be},hv:function(){return Me},pR:function(){return _},Gr:function(){return x},_z:function(){return S},HN:function(){return ze},DK:function(){return Ue}}),(Q=G||(G={})).Array="Array",Q.Boolean="Boolean",Q.ConceptUuid="ConceptUuid",Q.Number="Number",Q.Object="Object",Q.String="String",Q.UUID="UUID",Q.PersonAttributeTypeUuid="PersonAttributeTypeUuid",Q.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var J=n(3710),X=function(e,t){return u((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},ee=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return u((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+t.map((function(e){return"${"+e+"}"})).join(", "))},te=ee([]),ne=function(e){return u((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},re={inRange:X,isUrl:te,isUrlWithTemplateParameters:ee,oneOf:ne},oe="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},ie=Object.prototype.toString,ae=function(){return"[object Arguments]"===ie.call(arguments)?function(e){return"[object Arguments]"===ie.call(e)}:function(e){return d("callee",e)}}(),ue=ae,ce=!{toString:null}.propertyIsEnumerable("toString"),se=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],le=function(){return arguments.propertyIsEnumerable("length")}(),fe=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},pe="function"!=typeof Object.keys||le?s((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=le&&ue(e);for(t in e)!d(t,e)||o&&"length"===t||(r[r.length]=t);if(ce)for(n=se.length-1;n>=0;)d(t=se[n],e)&&!fe(r,t)&&(r[r.length]=t),n-=1;return r})):s((function(e){return Object(e)!==e?[]:Object.keys(e)})),de=s((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function he(e,t,n,r){if(oe(e,t))return!0;var o,i,a=de(e);if(a!==de(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(o=e.constructor,null==(i=String(o).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if((void 0===e?"undefined":v(e))!=(void 0===t?"undefined":v(t))||!oe(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!oe(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var u=n.length-1;u>=0;){if(n[u]===e)return r[u]===t;u-=1}switch(a){case"Map":return e.size===t.size&&h(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&h(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var c=pe(e);if(c.length!==pe(t).length)return!1;var s=n.concat([e]),l=r.concat([t]);for(u=c.length-1;u>=0;){var f=c[u];if(!d(f,t)||!he(t[f],e[f],s,l))return!1;u-=1}return!0}var ve=l((function(e,t){return he(e,t,[],[])}));function ye(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var u in t[a+1]=e,n[a+1]=o,e)o[u]=r?ye(e[u],t,n,!0):e[u];return o};switch(de(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}var me,ge=s((function(e){return null!=e&&"function"==typeof e.clone?e.clone():ye(e,[],[],!0)})),be=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},we=s((function(e){return!!be(e)||!!e&&"object"==typeof e&&(t=e,!("[object String]"===Object.prototype.toString.call(t)))&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1));var t})),_e=((me=function(e){this.f=e}).prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},me.prototype["@@transducer/result"]=function(e){return e},me.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},me),xe=l((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,c){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,c,s){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,c,s,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))})),Se=xe,Oe="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Ee=y((function(e,t,n){if("function"==typeof e&&(e=new _e(e)),we(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return g(e,t,n,"fantasy-land/reduce");if(null!=n[Oe])return m(e,t,n[Oe]());if("function"==typeof n.next)return m(e,t,n);if("function"==typeof n.reduce)return g(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),ke=y((function(e,t,n){var r,o={};for(r in t)d(r,t)&&(o[r]=d(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)d(r,n)&&!d(r,o)&&(o[r]=n[r]);return o})),je=y((function e(t,n,r){return ke((function(n,r,o){return b(r)&&b(o)?e(t,r,o):t(n,r,o)}),n,r)})),Ce=l((function(e,t){return je((function(e,t,n){return n}),e,t)})),$e=u((function(e){return Array.isArray(e)}),"must be an array"),Pe=u((function(e){return"boolean"==typeof e}),"must be a boolean"),Ae=u((function(e){return"number"==typeof e}),"must be a number"),Te=u((function(e){return"string"==typeof e}),"must be a string"),Ie=u((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),Re=u((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),De=n(5385),Le={providedConfigs:[],schemas:{},devDefaultsAreOn:w()},Me=(0,De.createGlobalStore)("config-internal",Le),Ne=w();Me.subscribe((function(e){var t;e.devDefaultsAreOn!=Ne&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),Ne=e.devDefaultsAreOn)}));var Ue=(0,De.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});Ue.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var Be=(0,De.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),ze=(0,De.createGlobalStore)("config-implementer-tools",{config:{}});function Fe(e){return e.hasOwnProperty("_default")?k({},e,{_value:e._default,_source:"default"}):Z(e)?Object.keys(e).reduce((function(t,n){return t[n]=Fe(e[n]),t}),{}):{}}function Ve(e,t){return Z(e)?Object.keys(e).reduce((function(n,r){return n[r]=Ve(e[r],t),n}),{}):{_value:e,_source:t}}function He(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var u,c=function(o,i){var a=i.value,u=n+(n&&".")+a,c=t[a];if(!Z(c))return console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r)),"continue";c.hasOwnProperty("_default")||He(e,c,u);var s=c._elements;if(q(s)&&He(e,s,u+"._elements"),c._validators){var l=!0,f=!1,p=void 0;try{for(var d,h=c._validators[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var v=d.value;"function"!=typeof v&&console.error("".concat(e," has invalid validator for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(e){f=!0,p=e}finally{try{l||null==h.return||h.return()}finally{if(f)throw p}}}var y=c._type;y&&!Object.values(G).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(G).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(c).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(c))),s&&y&&![G.Array,G.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},s=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(s,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}}function We(e,t,n){W(n,e._type,t),Z(t)?e._type===G.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c];H(e._elements,s,"".concat(n,".").concat(c))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||H(e,t,n):e._type===G.Array&&function(e,t,n){if(q(e._elements))for(var r=0;r<t.length;r++)We(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;W("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}(e,t,n)}function Ke(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&K(n,e._validators,t),Z(t)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e._type===G.Object&&e._elements?Ke(e._elements,s,l):Ke(f,s,l)}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var p=0;p<t.length;p++)Ke(e._elements,t[p],"".concat(n,"[").concat(p,"]"))}P(Me.getState(),Ue.getState()),Me.subscribe((function(e){return P(e,Ue.getState())})),Ue.subscribe((function(e){return P(Me.getState(),e)})),T(Me.getState(),Ue.getState()),Me.subscribe((function(e){return T(e,Ue.getState())})),Ue.subscribe((function(e){return T(Me.getState(),e)})),A(Me.getState(),Ue.getState()),Me.subscribe((function(e){return A(e,Ue.getState())})),Ue.subscribe((function(e){return A(Me.getState(),e)})),I(Me.getState(),Be.getState(),Ue.getState()),Me.subscribe((function(e){I(e,Be.getState(),Ue.getState())})),Be.subscribe((function(e){I(Me.getState(),e,Ue.getState())})),Ue.subscribe((function(e){I(Me.getState(),Be.getState(),e)}));var qe=function(e,t,n){var r=ge(t);if(!e)return r;var o=!0,i=!1,a=void 0;try{for(var u,c=function(t,o){var i=o.value,a=r[i],u=e[i];if(u&&u.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=u._devDefault||u._default;r[i]=n?c:u._default}var s=u._elements;if(a&&q(s))if(u._type===G.Array&&Array.isArray(a)){var l=a.map((function(e){return qe(s,e,n)}));r[i]=l}else if(u._type===G.Object){var f=!0,p=!1,d=void 0;try{for(var h,v=Object.keys(a)[Symbol.iterator]();!(f=(h=v.next()).done);f=!0){var y=h.value;a[y]=qe(s,a[y],n)}}catch(e){p=!0,d=e}finally{try{f||null==v.return||v.return()}finally{if(p)throw d}}}}else if(Z(u)){var m=r.hasOwnProperty(i)?a:{};Z(m)&&(r[i]=qe(u,m,n))}},s=Object.keys(e)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(0,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return r}},674:function(){System.register(["@openmrs/esm-globals"],(function(e,t){var n={};return{setters:[function(e){n.dispatchNotificationShown=e.dispatchNotificationShown}],execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},728:function(e){"use strict";e.exports=n}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.y=t,o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e}();var i={};return(0,o(968).s)(1),function(){"use strict";var e=function(e){var t=n(e);setTimeout((function(){throw t}))},t=function(){var t=Error();return function(r){n(r).stack+="\nAsync stacktrace:\n".concat(t.stack),e(r)}},n=function(e){var t,n,r,o,i;if(n=e,null!=(r=Error)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):(o=n,null!=(i=r)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):l(o,i)))return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t="Object thrown as error: ".concat(JSON.stringify(e))}catch(n){t="Object thrown as error with the following properties: ".concat(Object.keys(e))}return Error(t)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())};o.r(i),o.d(i,{createErrorHandler:function(){return t},reportError:function(){return e}});var r=o(728);window.onerror=function(){return(0,r.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."}),!1},window.onunhandledrejection=function(){(0,r.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."})}}(),i}())}}}))},225:function(e,t,n){var r=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):l(e,t)};e=n.nmd(e);var o=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":v(e)};System.register(["@openmrs/esm-config","@openmrs/esm-state","single-spa"],(function(i,a){var u={},c={},s={};return{setters:[function(e){u.configExtensionStore=e.configExtensionStore,u.getExtensionConfigFromStore=e.getExtensionConfigFromStore,u.getExtensionSlotConfig=e.getExtensionSlotConfig,u.getExtensionSlotConfigFromStore=e.getExtensionSlotConfigFromStore,u.getExtensionSlotsConfigStore=e.getExtensionSlotsConfigStore,u.getExtensionsConfigStore=e.getExtensionsConfigStore},function(e){c.createGlobalStore=e.createGlobalStore,c.getGlobalStore=e.getGlobalStore},function(e){s.mountRootParcel=e.mountRootParcel}],execute:function(){i(function(){var i={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:function(e){"use strict";e.exports=u},685:function(e){"use strict";e.exports=c},645:function(e){"use strict";e.exports=s}},l={};function f(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}};return i[e](n,n.exports,f),n.exports}f.y=a,f.d=function(e,t){for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;f.g.importScripts&&(e=f.g.location+"");var t=f.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),f.p=e}();var p={};return(0,f(968).s)(1),function(){"use strict";var i=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},a=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},u=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},c=function(e){var t=this.__data__=new W(e);this.size=t.size},s=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new xe;++t<n;)this.add(e[t])},l=function(e){var t=Dt.getState(),n=e(t);n!==t&&Dt.setState(n)},d=function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(e.extensions)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,c=!0,s=!1,l=void 0;try{for(var f,p=u.instances[Symbol.iterator]();!(c=(f=p.next()).done);c=!0){var d=f.value;t.push({slotModuleName:d.slotModuleName,extensionModuleName:u.moduleName,slotName:d.slotName,extensionId:d.id})}}catch(e){s=!0,l=e}finally{try{c||null==p.return||p.return()}finally{if(s)throw l}}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}Tt(It.configExtensionStore.getState().mountedExtensions,t)||It.configExtensionStore.setState({mountedExtensions:t})},h=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},v=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},y=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){v(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},m=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},g=function(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},b=function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}},w=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=Object.entries(e.slots)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=m(u.value,2),l=s[0],f=s[1],p=P(l,e,(0,It.getExtensionSlotConfigFromStore)(t,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:p}}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}Tt(Ut.getState().slots,r)||Ut.setState({slots:r})},_=function(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}},x=function(e){return m(e.split("#"),1)[0]},S=function(e,t){var n=x(t);return e.extensions[n]},O=function(e){return S(Nt.getState(),e)},E=function(e,t){l((function(n){var r=n.slots[e];return y({},n,r?{slots:y({},n.slots,v({},e,y({},r,{attachedIds:g(r.attachedIds).concat([t])})))}:{slots:y({},n.slots,v({},e,y({},_(e),{attachedIds:[t]})))})}))},k=function(e,t){l((function(n){var r=n.slots[e];return r&&r.attachedIds.includes(t)?y({},n,{slots:y({},n.slots,v({},e,y({},r,{attachedIds:r.attachedIds.filter((function(e){return e!==t}))})))}):n}))},j=function(e){l((function(t){var n=t.slots[e];return n?y({},t,{slots:y({},t.slots,v({},e,y({},n,{attachedIds:[]})))}):t}))},C=function(e,t,n,r){var o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(e);return-1!==i?2e3+i:-1},$=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null!=t?t:navigator.onLine;return e.filter((function(e){return I(n,e.online,e.offline)}))},P=function(e,t,n,r){var o,i,a,u,c,s,l=(o=n,i=t.slots[e].attachedIds,a=o.add||[],u=o.remove||[],c=o.order||[],s=Nt.getState().extensions,g(i).concat(g(a)).filter((function(e){return!u.includes(e)})).sort((function(e,t){var n,r,o=C(e,c,null===(n=s[x(e)])||void 0===n?void 0:n.order,i),a=C(t,c,null===(r=s[x(t)])||void 0===r?void 0:r.order,i);return-1===a?-1:-1===o?1:o-a}))),f=[],p=!0,d=!1,h=void 0;try{for(var v,y=l[Symbol.iterator]();!(p=(v=y.next()).done);p=!0){var m=v.value,b=(0,It.getExtensionConfigFromStore)(r,e,m).config,w=x(m),_=t.extensions[w];_&&f.push({id:m,name:w,moduleName:_.moduleName,config:b,meta:_.meta,online:_.online,offline:_.offline})}}catch(e){d=!0,h=e}finally{try{p||null==y.return||y.return()}finally{if(d)throw h}}return f},A=function(e){return P(e,Nt.getState(),(0,It.getExtensionSlotConfig)(e).config,zt.getState())},T=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=navigator.onLine;return I(n,e,t)},I=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(e?t:n)},R=function(e,t){var n=navigator.onLine?e:t;return"object"==typeof n?n:{}},D=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},L=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},M=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){L(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},N=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},U=function(e){return function(e){if(Array.isArray(e))return D(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},B=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(e){return e},i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=x(r),u=O(r),c=!0,s=null;if(e){if(!u)throw Error("Couldn't find extension '".concat(a,"' to attach to '").concat(t,"'"));var f=u.load,p=u.online,d=u.offline,h=u.meta,v=u.moduleName;T(p,d)&&(f().then((function(a){var u=a.default,l=N(a,["default"]);c&&(s=(0,Wt.mountRootParcel)(o(null!=u?u:l),M({},R(p,d),i,{_meta:h,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:v},domElement:e})))})),l((function(o){var i={domElement:e,id:r,slotName:t,slotModuleName:n};return M({},o,{extensions:M({},o.extensions,L({},a,M({},o.extensions[a],{instances:U(o.extensions[a].instances).concat([i])})))})})))}else console.warn("Tried to render ".concat(r," into ").concat(t," but no DOM element was available."));return function(){c=!1,s&&("MOUNTED"!==s.getStatus()?s.mountPromise.then((function(){s&&s.unmount()})):s.unmount())}};f.r(p),f.d(p,{attach:function(){return E},checkStatus:function(){return T},checkStatusFor:function(){return I},detach:function(){return k},detachAll:function(){return j},extensionStore:function(){return Kt},getAssignedExtensions:function(){return A},getConnectedExtensions:function(){return $},getCustomProps:function(){return R},getExtensionInternalStore:function(){return Lt},getExtensionNameFromId:function(){return x},getExtensionRegistration:function(){return O},getExtensionRegistrationFrom:function(){return S},getExtensionStore:function(){return Mt},registerExtension:function(){return Ft},registerExtensionSlot:function(){return Vt},renderExtension:function(){return B},reset:function(){return Ht},updateInternalExtensionStore:function(){return l}});var z=function(e,t){return e===t||e!=e&&t!=t},F=function(e,t){for(var n=e.length;n--;)if(z(e[n][0],t))return n;return-1},V=Array.prototype.splice;i.prototype.clear=function(){this.__data__=[],this.size=0},i.prototype.delete=function(e){var t=this.__data__,n=F(t,e);return!(n<0||(n==t.length-1?t.pop():V.call(t,n,1),--this.size,0))},i.prototype.get=function(e){var t=this.__data__,n=F(t,e);return n<0?void 0:t[n][1]},i.prototype.has=function(e){return F(this.__data__,e)>-1},i.prototype.set=function(e,t){var n=this.__data__,r=F(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var H,W=i,K="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,q="object"==typeof self&&self&&self.Object===Object&&self,Z=K||q||Function("return this")(),G=Z.Symbol,Q=Object.prototype,Y=Q.hasOwnProperty,J=Q.toString,X=G?G.toStringTag:void 0,ee=Object.prototype.toString,te=G?G.toStringTag:void 0,ne=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":te&&te in Object(e)?function(e){var t=Y.call(e,X),n=e[X];try{e[X]=void 0;var r=!0}catch(e){}var o=J.call(e);return r&&(t?e[X]=n:delete e[X]),o}(e):(t=e,ee.call(t));var t},re=function(e){var t=void 0===e?"undefined":o(e);return null!=e&&("object"==t||"function"==t)},oe=function(e){if(!re(e))return!1;var t=ne(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},ie=Z["__core-js_shared__"],ae=(H=/[^.]+$/.exec(ie&&ie.keys&&ie.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",ue=Function.prototype.toString,ce=function(e){if(null!=e){try{return ue.call(e)}catch(e){}try{return e+""}catch(e){}}return""},se=/^\[object .+?Constructor\]$/,le=Function.prototype,fe=Object.prototype,pe=le.toString,de=fe.hasOwnProperty,he=RegExp("^"+pe.call(de).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ve=function(e,t){var n,r,o=null==(n=e)?void 0:n[t];return!re(r=o)||ae&&ae in r||!(oe(r)?he:se).test(ce(r))?void 0:o},ye=ve(Z,"Map"),me=ve(Object,"create"),ge=Object.prototype.hasOwnProperty,be=Object.prototype.hasOwnProperty;a.prototype.clear=function(){this.__data__=me?me(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},a.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ge.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:be.call(t,e)},a.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=me&&void 0===t?"__lodash_hash_undefined__":t,this};var we=a,_e=function(e,t){var n,r,i=e.__data__;return("string"==(r=o(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};u.prototype.clear=function(){this.size=0,this.__data__={hash:new we,map:new(ye||W),string:new we}},u.prototype.delete=function(e){var t=_e(this,e).delete(e);return this.size-=t?1:0,t},u.prototype.get=function(e){return _e(this,e).get(e)},u.prototype.has=function(e){return _e(this,e).has(e)},u.prototype.set=function(e,t){var n=_e(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var xe=u;c.prototype.clear=function(){this.__data__=new W,this.size=0},c.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},c.prototype.get=function(e){return this.__data__.get(e)},c.prototype.has=function(e){return this.__data__.has(e)},c.prototype.set=function(e,t){var n=this.__data__;if(r(n,W)){var o=n.__data__;if(!ye||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new xe(o)}return n.set(e,t),this.size=n.size,this};var Se=c;s.prototype.add=s.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},s.prototype.has=function(e){return this.__data__.has(e)};var Oe=s,Ee=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},ke=function(e,t,n,r,o,i){var a=1&n,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(e),l=i.get(t);if(s&&l)return s==t&&l==e;var f=-1,p=!0,d=2&n?new Oe:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var h=e[f],v=t[f];if(r)var y=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==y){if(y)continue;p=!1;break}if(d){if(!Ee(t,(function(e,t){if(a=t,!d.has(a)&&(h===e||o(h,e,n,r,i)))return d.push(t);var a}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p},je=Z.Uint8Array,Ce=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},$e=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Pe=G?G.prototype:void 0,Ae=Pe?Pe.valueOf:void 0,Te=Array.isArray,Ie=Object.prototype.propertyIsEnumerable,Re=Object.getOwnPropertySymbols,De=Re?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(Re(e),(function(t){return Ie.call(e,t)})))}:function(){return[]},Le=function(e){return null!=e&&"object"==typeof e},Me=function(e){return Le(e)&&"[object Arguments]"==ne(e)},Ne=Object.prototype,Ue=Ne.hasOwnProperty,Be=Ne.propertyIsEnumerable,ze=Me(function(){return arguments}())?Me:function(e){return Le(e)&&Ue.call(e,"callee")&&!Be.call(e,"callee")},Fe=ze,Ve=t&&!t.nodeType&&t,He=Ve&&e&&!e.nodeType&&e,We=He&&He.exports===Ve?Z.Buffer:void 0,Ke=(We?We.isBuffer:void 0)||function(){return!1},qe=/^(?:0|[1-9]\d*)$/,Ze=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Ge={};Ge["[object Float32Array]"]=Ge["[object Float64Array]"]=Ge["[object Int8Array]"]=Ge["[object Int16Array]"]=Ge["[object Int32Array]"]=Ge["[object Uint8Array]"]=Ge["[object Uint8ClampedArray]"]=Ge["[object Uint16Array]"]=Ge["[object Uint32Array]"]=!0,Ge["[object Arguments]"]=Ge["[object Array]"]=Ge["[object ArrayBuffer]"]=Ge["[object Boolean]"]=Ge["[object DataView]"]=Ge["[object Date]"]=Ge["[object Error]"]=Ge["[object Function]"]=Ge["[object Map]"]=Ge["[object Number]"]=Ge["[object Object]"]=Ge["[object RegExp]"]=Ge["[object Set]"]=Ge["[object String]"]=Ge["[object WeakMap]"]=!1;var Qe,Ye,Je,Xe=t&&!t.nodeType&&t,et=Xe&&e&&!e.nodeType&&e,tt=et&&et.exports===Xe&&K.process,nt=function(){try{return et&&et.require&&et.require("util").types||tt&&tt.binding&&tt.binding("util")}catch(e){}}(),rt=nt&&nt.isTypedArray,ot=rt?(Qe=rt,function(e){return Qe(e)}):function(e){return Le(e)&&Ze(e.length)&&!!Ge[ne(e)]},it=Object.prototype.hasOwnProperty,at=Object.prototype,ut=(Ye=Object.keys,Je=Object,function(e){return Ye(Je(e))}),ct=Object.prototype.hasOwnProperty,st=function(e){return i=De,a=null!=(n=t=r=e)&&Ze(n.length)&&!oe(n)?function(e,t){var n,r,i,a=Te(e),u=!a&&Fe(e),c=!a&&!u&&Ke(e),s=!a&&!u&&!c&&ot(e),l=a||u||c||s,f=l?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],p=f.length;for(var d in e)!it.call(e,d)||l&&("length"==d||c&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||(r=p,i=void 0===(n=d)?"undefined":o(n),(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&qe.test(n))&&n>-1&&n%1==0&&n<r))||f.push(d);return f}(t):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||at))return ut(e);var t,n,r=[];for(var o in Object(e))ct.call(e,o)&&"constructor"!=o&&r.push(o);return r}(t),Te(r)?a:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(a,i(r));var t,n,r,i,a},lt=Object.prototype.hasOwnProperty,ft=ve(Z,"DataView"),pt=ve(Z,"Promise"),dt=ve(Z,"Set"),ht=ve(Z,"WeakMap"),vt="[object Map]",yt="[object Promise]",mt="[object Set]",gt="[object WeakMap]",bt="[object DataView]",wt=ce(ft),_t=ce(ye),xt=ce(pt),St=ce(dt),Ot=ce(ht),Et=ne;(ft&&Et(new ft(new ArrayBuffer(1)))!=bt||ye&&Et(new ye)!=vt||pt&&Et(pt.resolve())!=yt||dt&&Et(new dt)!=mt||ht&&Et(new ht)!=gt)&&(Et=function(e){var t=ne(e),n="[object Object]"==t?e.constructor:void 0,r=n?ce(n):"";if(r)switch(r){case wt:return bt;case _t:return vt;case xt:return yt;case St:return mt;case Ot:return gt}return t});var kt=Et,jt="[object Arguments]",Ct="[object Array]",$t="[object Object]",Pt=Object.prototype.hasOwnProperty,At=function e(t,n,o,i,a){return t===n||(null==t||null==n||!Le(t)&&!Le(n)?t!=t&&n!=n:function(e,t,n,o,i,a){var u=Te(e),c=Te(t),s=u?Ct:kt(e),l=c?Ct:kt(t),f=(s=s==jt?$t:s)==$t,p=(l=l==jt?$t:l)==$t,d=s==l;if(d&&Ke(e)){if(!Ke(t))return!1;u=!0,f=!1}if(d&&!f)return a||(a=new Se),u||ot(e)?ke(e,t,n,o,i,a):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new je(e),new je(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return z(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=Ce;case"[object Set]":var c=1&r;if(u||(u=$e),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var l=ke(u(e),u(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(Ae)return Ae.call(e)==Ae.call(t)}return!1}(e,t,s,n,o,i,a);if(!(1&n)){var h=f&&Pt.call(e,"__wrapped__"),v=p&&Pt.call(t,"__wrapped__");if(h||v){var y=h?e.value():e,m=v?t.value():t;return a||(a=new Se),i(y,m,n,o,a)}}return!!d&&(a||(a=new Se),function(e,t,n,o,i,a){var u=1&n,c=st(e),s=c.length;if(s!=st(t).length&&!u)return!1;for(var l=s;l--;){var f=c[l];if(!(u?f in t:lt.call(t,f)))return!1}var p=a.get(e),d=a.get(t);if(p&&d)return p==t&&d==e;var h=!0;a.set(e,t),a.set(t,e);for(var v=u;++l<s;){var y=e[f=c[l]],m=t[f];if(o)var g=u?o(m,y,f,t,e,a):o(y,m,f,e,t,a);if(!(void 0===g?y===m||i(y,m,n,o,a):g)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,o,i,a))}(t,n,o,i,e,a))},Tt=function(e,t){return At(e,t)},It=f(824),Rt=f(685),Dt=(0,Rt.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),Lt=function(){return(0,Rt.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})},Mt=function(){return(0,Rt.getGlobalStore)("extensions",{slots:{}})};d(Dt.getState()),Dt.subscribe(d);var Nt=Lt(),Ut=Mt(),Bt=(0,It.getExtensionSlotsConfigStore)(),zt=(0,It.getExtensionsConfigStore)();Nt.subscribe((function(e){w(e,Bt.getState(),zt.getState())})),Bt.subscribe((function(e){w(Nt.getState(),e,zt.getState())})),zt.subscribe((function(e){w(Nt.getState(),Bt.getState(),e)}));var Ft=Nt.action((function(e,t){e.extensions[t.name]=y({},t,{instances:[]})})),Vt=Nt.action((function(e,t,n){var r,o=null===(r=e.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=t)return console.warn("An extension slot with the name '".concat(n,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),e;if(o&&o==t)return e;if(e.slots[n])return y({},e,{slots:y({},e.slots,v({},n,y({},e.slots[n],{moduleName:t})))});var i=_(n,t);return y({},e,{slots:y({},e.slots,v({},n,i))})})),Ht=Ut.action((function(){return{slots:{},extensions:{}}})),Wt=f(645),Kt=Lt()}(),p}())}}}))},6856:function(e,t,n){"use strict";var r=function(e){var t=L.getState(),n=e(t);n!==t&&L.setState(n)},o=function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(e.extensions)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,c=!0,s=!1,l=void 0;try{for(var f,p=u.instances[Symbol.iterator]();!(c=(f=p.next()).done);c=!0){var d=f.value;t.push({slotModuleName:d.slotModuleName,extensionModuleName:u.moduleName,slotName:d.slotName,extensionId:d.id})}}catch(e){s=!0,l=e}finally{try{c||null==p.return||p.return()}finally{if(s)throw l}}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}(0,R.Z)(I.configExtensionStore.getState().mountedExtensions,t)||I.configExtensionStore.setState({mountedExtensions:t})},i=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=navigator.onLine;return a(n,e,t)},a=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(e?t:n)},u=function(e,t){var n=navigator.onLine?e:t;return"object"==typeof n?n:{}},c=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},s=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},l=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){s(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},f=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},p=function(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e)||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.")}()},d=function(e,t,n,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(e){return e},c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},d=x(o),h=S(o),v=!0,y=null;if(e){if(!h)throw Error("Couldn't find extension '".concat(d,"' to attach to '").concat(t,"'"));var m=h.load,g=h.online,b=h.offline,w=h.meta,_=h.moduleName;i(g,b)&&(m().then((function(r){var i=r.default,s=f(r,["default"]);v&&(y=(0,U.BP)(a(null!=i?i:s),l({},u(g,b),c,{_meta:w,_extensionContext:{extensionId:o,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:_},domElement:e})))})),r((function(r){var i={domElement:e,id:o,slotName:t,slotModuleName:n};return l({},r,{extensions:l({},r.extensions,s({},d,l({},r.extensions[d],{instances:p(r.extensions[d].instances).concat([i])})))})})))}else console.warn("Tried to render ".concat(o," into ").concat(t," but no DOM element was available."));return function(){v=!1,y&&("MOUNTED"!==y.getStatus()?y.mountPromise.then((function(){y&&y.unmount()})):y.unmount())}},h=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},v=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},y=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){v(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},m=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},g=function(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},b=function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}},w=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=Object.entries(e.slots)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=m(u.value,2),l=s[0],f=s[1],p=$(l,e,(0,I.getExtensionSlotConfigFromStore)(t,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:p}}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}(0,R.Z)(z.getState().slots,r)||z.setState({slots:r})},_=function(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}},x=function(e){return m(e.split("#"),1)[0]},S=function(e){return t=B.getState(),n=x(e),t.extensions[n];var t,n},O=function(e,t){r((function(n){var r=n.slots[e];return y({},n,r?{slots:y({},n.slots,v({},e,y({},r,{attachedIds:g(r.attachedIds).concat([t])})))}:{slots:y({},n.slots,v({},e,y({},_(e),{attachedIds:[t]})))})}))},E=function(e,t){r((function(n){var r=n.slots[e];return r&&r.attachedIds.includes(t)?y({},n,{slots:y({},n.slots,v({},e,y({},r,{attachedIds:r.attachedIds.filter((function(e){return e!==t}))})))}):n}))},k=function(e){r((function(t){var n=t.slots[e];return n?y({},t,{slots:y({},t.slots,v({},e,y({},n,{attachedIds:[]})))}):t}))},j=function(e,t,n,r){var o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(e);return-1!==i?2e3+i:-1},C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null!=t?t:navigator.onLine;return e.filter((function(e){return a(n,e.online,e.offline)}))},$=function(e,t,n,r){var o,i,a,u,c,s,l=(o=n,i=t.slots[e].attachedIds,a=o.add||[],u=o.remove||[],c=o.order||[],s=B.getState().extensions,g(i).concat(g(a)).filter((function(e){return!u.includes(e)})).sort((function(e,t){var n,r,o=j(e,c,null===(n=s[x(e)])||void 0===n?void 0:n.order,i),a=j(t,c,null===(r=s[x(t)])||void 0===r?void 0:r.order,i);return-1===a?-1:-1===o?1:o-a}))),f=[],p=!0,d=!1,h=void 0;try{for(var v,y=l[Symbol.iterator]();!(p=(v=y.next()).done);p=!0){var m=v.value,b=(0,I.getExtensionConfigFromStore)(r,e,m).config,w=x(m),_=t.extensions[w];_&&f.push({id:m,name:w,moduleName:_.moduleName,config:b,meta:_.meta,online:_.online,offline:_.offline})}}catch(e){d=!0,h=e}finally{try{p||null==y.return||y.return()}finally{if(d)throw h}}return f},P=function(e){return $(e,B.getState(),(0,I.getExtensionSlotConfig)(e).config,V.getState())};n.d(t,{pv:function(){return A.AssignedExtension},x9:function(){return T.CancelLoading},uP:function(){return A.ConnectedExtension},uu:function(){return A.ExtensionMeta},tj:function(){return A.ExtensionRegistration},u_:function(){return A.ExtensionSlotState},qN:function(){return A.ExtensionStore},ub:function(){return O},og:function(){return E},lW:function(){return k},h6:function(){return P},Kq:function(){return C},EB:function(){return x},yw:function(){return N},ix:function(){return H},Qq:function(){return W},H8:function(){return d}});var A={};n.r(A),n.d(A,{Co:function(){return M},yw:function(){return N},qO:function(){return r}});var T={};n.r(T),n.d(T,{H:function(){return d}});var I=n(9714),R=n(3202),D=n(5385),L=(0,D.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),M=function(){return(0,D.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})},N=function(){return(0,D.getGlobalStore)("extensions",{slots:{}})};o(L.getState()),L.subscribe(o);var U=n(3710);M();var B=M(),z=N(),F=(0,I.getExtensionSlotsConfigStore)(),V=(0,I.getExtensionsConfigStore)();B.subscribe((function(e){w(e,F.getState(),V.getState())})),F.subscribe((function(e){w(B.getState(),e,V.getState())})),V.subscribe((function(e){w(B.getState(),F.getState(),e)}));var H=B.action((function(e,t){e.extensions[t.name]=y({},t,{instances:[]})})),W=B.action((function(e,t,n){var r,o=null===(r=e.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=t)return console.warn("An extension slot with the name '".concat(n,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),e;if(o&&o==t)return e;if(e.slots[n])return y({},e,{slots:y({},e.slots,v({},n,y({},e.slots[n],{moduleName:t})))});var i=_(n,t);return y({},e,{slots:y({},e.slots,v({},n,i))})}));z.action((function(){return{slots:{},extensions:{}}}))},3103:function(){System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e){window.dispatchEvent(new CustomEvent(p,{detail:{online:e}}))},t=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(p,t),function(){return window.removeEventListener(p,t)}},n=function(e){return e({online:navigator.onLine}),t(e)},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(d,{detail:e}))},a=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(d,t),function(){return window.removeEventListener(d,t)}},u=function(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))},c=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(h,t),function(){return window.removeEventListener(h,t)}},s=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(v,t),function(){return window.removeEventListener(v,t)}},l=function(e){window.openmrsBase=e.apiUrl,window.spaBase=e.spaPath,window.spaEnv=e.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=function(){return"".concat(window.spaBase,"/")}},f=function(){window.copyText=function(e){var t=window.getSelection();if(t){var n=document.createRange();n.selectNode(e),t.removeAllRanges(),t.addRange(n),document.execCommand("copy"),t.removeAllRanges()}}};r.r(o),r.d(o,{dispatchConnectivityChanged:function(){return e},dispatchNotificationShown:function(){return u},dispatchPrecacheStaticDependencies:function(){return i},setupPaths:function(){return l},setupUtils:function(){return f},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return t},subscribeNotificationShown:function(){return c},subscribePrecacheStaticDependencies:function(){return a},subscribeToastShown:function(){return s}});var p="openmrs:connectivity-changed",d="openmrs:precache-static-dependencies",h="openmrs:notification-shown",v="openmrs:toast-shown"}(),o}())}}}))},2034:function(e,t,n){"use strict";var r=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(s,t),function(){return window.removeEventListener(s,t)}},o=function(e){return e({online:navigator.onLine}),r(e)},i=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(l,t),function(){return window.removeEventListener(l,t)}},a=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(f,t),function(){return window.removeEventListener(f,t)}},u=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(p,t),function(){return window.removeEventListener(p,t)}};n.d(t,{ac:function(){return c.ConnectivityChangedEvent},hM:function(){return c.PrecacheStaticDependenciesEvent},Kj:function(){return c.ShowNotificationEvent},P3:function(){return c.ShowToastEvent},BW:function(){return o},XS:function(){return r},NQ:function(){return a},dY:function(){return i},id:function(){return u}});var c={};n.r(c),n.d(c,{BW:function(){return o},XS:function(){return r},NQ:function(){return a},dY:function(){return i},id:function(){return u}});var s="openmrs:connectivity-changed",l="openmrs:precache-static-dependencies",f="openmrs:notification-shown",p="openmrs:toast-shown"},8082:function(e,t,n){"use strict";var r=function(){return{current:vn,notAvailable:!0,active:!1}},i=function(e,t){return"object"!=typeof t||bn(t).forEach((function(n){e[n]=t[n]})),e},u=function(e,t){return xn.call(e,t)},h=function(e,t){"function"==typeof t&&(t=t(_n(e))),("undefined"==typeof Reflect?bn:Reflect.ownKeys)(t).forEach((function(n){y(e,n,t[n])}))},y=function(e,t,n,r){Sn(e,t,i(n&&u(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))},m=function(e){return{from:function(t){return e.prototype=Object.create(t.prototype),y(e.prototype,"constructor",e),{extend:h.bind(null,e.prototype)}}}},g=function(e,t,n){return kn.call(e,t,n)},b=function(e,t){return t(e)},w=function(e){if(!e)throw new Error("Assertion Failed")},x=function(e){gn.setImmediate?setImmediate(e):setTimeout(e,0)},S=function(e,t){return e.reduce((function(e,n,r){var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})},O=function(e){var t={};for(var n in e)u(e,n)&&(t[n]=e[n]);return t},E=function(e){return $n.apply([],e)},k=function(e){Tn="undefined"!=typeof WeakMap&&new WeakMap;var t=In(e);return Tn=null,t},j=function(e){return Rn.call(e).slice(8,-1)},C=function(e){var t,n,r,o;if(1===arguments.length){if(wn(e))return e.slice();if(this===Mn&&"string"==typeof e)return[e];if(o=Ln(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n},$=function(e,t){Un=e,Bn=t},P=function(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(Bn).map((function(e){return"\n"+e})).join("")):""},A=function(e,t){this._e=Fn(),this.name=e,this.message=t},T=function(e,t){return e+". Errors: "+Object.keys(t).map((function(e){return t[e].toString()})).filter((function(e,t,n){return n.indexOf(e)===t})).join("\n")},I=function(e,t,n,r){this._e=Fn(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=T(e,t)},R=function(e,t){this._e=Fn(),this.name="BulkError",this.failures=Object.keys(t).map((function(e){return t[e]})),this.failuresByPos=t,this.message=T(e,t)},D=function(){},L=function(e){return e},M=function(e,t){return null==e||e===L?t:function(n){return t(e(n))}},N=function(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}},U=function(e,t){return e===D?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?N(r,this.onsuccess):r),o&&(this.onerror=this.onerror?N(o,this.onerror):o),void 0!==i?i:n}},B=function(e,t){return e===D?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?N(n,this.onsuccess):n),r&&(this.onerror=this.onerror?N(r,this.onerror):r)}},z=function(e,t){return e===D?t:function(n){var r=e.apply(this,arguments);i(n,r);var o=this.onsuccess,a=this.onerror;this.onsuccess=null,this.onerror=null;var u=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?N(o,this.onsuccess):o),a&&(this.onerror=this.onerror?N(a,this.onerror):a),void 0===r?void 0===u?void 0:u:i(r,u)}},F=function(e,t){return e===D?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}},V=function(e,t){return e===D?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return t.apply(r,i)}))}return t.apply(this,arguments)}},H=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=D,this._lib=!1;var t=this._PSD=vr;if(Un&&(this._stackHolder=Fn(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==Yn)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&K(this,this._value))}this._state=null,this._value=null,++t.ref,wr(this,e)},W=function(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o},K=function(e,t){if(fr.push(t),null===e._state){var n=e._lib&&J();t=dr(t),e._state=!1,e._value=t,Un&&null!==t&&"object"==typeof t&&!t._promise&&function(n,r,o){try{(function(){var n=En(t,"stack");t._promise=e,y(t,"stack",{get:function(){return ir?n&&(n.get?n.get.apply(t):n.value):e.stack}})}).apply(null,void 0)}catch(e){}}(),r=e,lr.some((function(e){return e._value===r._value}))||lr.push(r),q(e),n&&X()}var r},q=function(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)Z(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===mr&&(++mr,ur((function(){0==--mr&&ee()}),[]))},Z=function(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++mr,ur(G,[n,e,t])}else e._listeners.push(t)},G=function(e,t,n){try{pr=t;var r,o=t._value;t._state?r=e(o):(fr.length&&(fr=[]),r=e(o),-1===fr.indexOf(o)&&function(e){for(var t=lr.length;t;)if(lr[--t]._value===e._value)return void lr.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{pr=null,0==--mr&&ee(),--n.psd.ref||n.psd.finalize()}},Q=function(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)},Y=function(){J()&&X()},J=function(){var e=cr;return cr=!1,sr=!1,e},X=function(){var e,t,n;do{for(;yr.length>0;)for(e=yr,yr=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(yr.length>0);cr=!0,sr=!0},ee=function(){var e=lr;lr=[],e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));for(var t=gr.slice(0),n=t.length;n;)t[--n]()},te=function(e){return new H(Yn,!1,e)},ne=function(e,t){var n=vr;return function(){var r=J(),o=vr;try{return se(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{se(o,!1),r&&X()}}},re=function(e,t,n,r){var o=vr,a=Object.create(o);a.parent=o,a.ref=0,a.global=!1,a.id=++jr;var u=hr.env;a.env=or?{Promise:H,PromiseProp:{value:H,configurable:!0,writable:!0},all:H.all,race:H.race,allSettled:H.allSettled,any:H.any,resolve:H.resolve,reject:H.reject,nthen:he(u.nthen,a),gthen:he(u.gthen,a)}:{},t&&i(a,t),++o.ref,a.finalize=function(){--this.parent.ref||this.parent.finalize()};var c=fe(a,e,n,r);return 0===a.ref&&a.finalize(),c},oe=function(){return xr.id||(xr.id=++Sr),++xr.awaits,xr.echoes+=100,xr.id},ie=function(){return!!xr.awaits&&(0==--xr.awaits&&(xr.id=0),xr.echoes=100*xr.awaits,!0)},ae=function(e){return xr.echoes&&e&&e.constructor===rr?(oe(),e.then((function(e){return ie(),e}),(function(e){return ie(),Cr(e)}))):e},ue=function(e){++kr,xr.echoes&&0!=--xr.echoes||(xr.echoes=xr.id=0),Or.push(vr),se(e,!0)},ce=function(){var e=Or[Or.length-1];Or.pop(),se(e,!1)},se=function(e,t){var n=vr;if((t?!xr.echoes||Er++&&e===vr:!Er||--Er&&e===vr)||pe(t?ue.bind(null,e):ce),e!==vr&&(vr=e,n===hr&&(hr.env=le()),or)){var r=hr.env.Promise,o=e.env;er.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(gn,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}},le=function(){var e=gn.Promise;return or?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(gn,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:er.then,gthen:e.prototype.then}:{}},fe=function(e,t,n,r,o){var i=vr;try{return se(e,!0),t(n,r,o)}finally{se(i,!1)}},pe=function(e){nr.call(Xn,e)},de=function(e,t,n,r){return"function"!=typeof e?e:function(){var o=vr;n&&oe(),se(t,!0);try{return e.apply(this,arguments)}finally{se(o,!1),r&&pe(ie)}}},he=function(e,t){return function(n,r){return e.call(this,de(n,t),de(r,t))}},ve=function(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(gn.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),i(r,o)):gn.CustomEvent&&i(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&gn.dispatchEvent&&(dispatchEvent(r),!gn.PromiseRejectionEvent&&gn.onunhandledrejection))try{gn.onunhandledrejection(r)}catch(e){}Un&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: ".concat(e.stack||e))}catch(e){}},ye=function(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t},me=function(e){return"string"!=typeof e||/\./.test(e)?function(e){return e}:function(t){return void 0===t[e]&&e in t&&delete(t=k(t))[e],t}},ge=function(e){var t=function(e,t,i){if("object"==typeof e)return n(e);t||(t=F),i||(i=D);var a={subscribers:[],fire:i,subscribe:function(e){-1===a.subscribers.indexOf(e)&&(a.subscribers.push(e),a.fire=t(a.fire,e))},unsubscribe:function(e){a.subscribers=a.subscribers.filter((function(t){return t!==e})),a.fire=a.subscribers.reduce(t,i)}};return r[e]=o[e]=a,a},n=function(e){bn(e).forEach((function(n){var r=e[n];if(wn(r))t(n,e[n][0],e[n][1]);else{if("asap"!==r)throw new Zn.InvalidArgument("Invalid event config");var o=t(n,L,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];o.subscribers.forEach((function(e){x((function(){e.apply(null,t)}))}))}))}}))},r={},o=function(t,n){if(n){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return r[t].subscribe.apply(null,i),e}if("string"==typeof t)return r[t]};o.addEventType=t;for(var i=1,a=arguments.length;i<a;++i)t(arguments[i]);return o},be=function(e,t){return m(t).from({prototype:e}),t},we=function(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)},_e=function(e,t){e.filter=ye(e.filter,t)},xe=function(e,t,n){var r=e.replayFilter;e.replayFilter=r?function(){return ye(r(),t())}:t,e.justLimit=n&&!r},Se=function(e,t){if(e.isPrimKey)return t.primaryKey;var n=t.getIndexByKeyPath(e.index);if(!n)throw new Zn.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n},Oe=function(e,t,n){var r=Se(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})},Ee=function(e,t,n,r){var o=e.replayFilter?ye(e.filter,e.replayFilter()):e.filter;if(e.or){var i={},a=function(e,n,r){if(!o||o(n,r,(function(e){return n.stop(e)}),(function(e){return n.fail(e)}))){var a=n.primaryKey,c=""+a;"[object ArrayBuffer]"===c&&(c=""+new Uint8Array(a)),u(i,c)||(i[c]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),ke(Oe(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return ke(Oe(e,r,n),ye(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)},ke=function(e,t,n,r){var o=ne(r?function(e,t,o){return n(r(e),t,o)}:n);return e.then((function(e){if(e)return e.start((function(){var n=function(){return e.continue()};t&&!t(e,(function(e){return n=e}),(function(t){e.stop(t),n=D}),(function(t){e.fail(t),n=D}))||o(e.value,e,(function(e){return n=e})),n()}))}))},je=function(e){var t=void 0===e?"undefined":v(e);if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";var n=j(e);return"ArrayBuffer"===n?"binary":n},Ce=function(e){return l(e,Uint8Array)?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)},$e=function(e,t){return e<t?-1:e===t?0:1},Pe=function(e,t){return e>t?-1:e===t?0:1},Ae=function(e,t,n){var r=l(e,Fr)?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r},Te=function(e){return new e.Collection(e,(function(){return Le("")})).limit(0)},Ie=function(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),u=-1,c=0;c<a;++c){var s=t[c];if(s!==r[c])return o(e[c],n[c])<0?e.substr(0,c)+n[c]+n.substr(c+1):o(e[c],r[c])<0?e.substr(0,c)+r[c]+n.substr(c+1):u>=0?e.substr(0,u)+t[u]+n.substr(u+1):null;o(e[c],s)<0&&(u=c)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):u<0?null:e.substr(0,u)+r[u]+n.substr(u+1)},Re=function(e,t,n,r){var o,i,a,u,c,s,l,f=function(e){o="next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()},i="next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()},a="next"===e?$e:Pe;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));u=t.map((function(e){return e.upper})),c=t.map((function(e){return e.lower})),s=e,l="next"===e?"":r},p=n.length;if(!n.every((function(e){return"string"==typeof e})))return Ae(e,"String expected.");f("next");var d=new e.Collection(e,(function(){return De(u[0],c[p-1]+r)}));d._ondirectionchange=function(e){f(e)};var h=0;return d._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var f=i(o);if(t(f,c,h))return!0;for(var d=null,v=h;v<p;++v){var y=Ie(o,f,u[v],c[v],a,s);null===y&&null===d?h=v+1:(null===d||a(d,y)>0)&&(d=y)}return n(null!==d?function(){e.continue(d+l)}:r),!1})),d},De=function(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}},Le=function(e){return{type:1,lower:e,upper:e}},Me=function(e){return ne((function(t){return Ne(t),e(t.target.error),!1}))},Ne=function(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()},Ue=function(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+Be(t)}},Be=function(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""},ze=function(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:S(n,(function(e){return[e.name,e]}))}},Fe=function(e){return null==e?function(){}:"string"==typeof e?1===(t=e).split(".").length?function(e){return e[t]}:function(e){return jn(e,t)}:function(t){return jn(t,e)};var t},Ve=function(e){return[].slice.call(e)},He=function(e){return null==e?":id":"string"==typeof e?e:"[".concat(e.join("+"),"]")},We=function(e,t){var n,r,o,i,a,u,c,s,d,h,v,y,m,g,b,w,_,x=e._novip,S=t.db,O=(n=x._middlewares,r=S,i=t,u=(o=x._deps).IDBKeyRange,o.indexedDB,s=u,y=function(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");var t=e.lower,n=e.upper,r=e.lowerOpen,o=e.upperOpen;return void 0===t?void 0===n?null:s.upperBound(n,!!o):void 0===n?s.lowerBound(t,!!r):s.bound(t,n,!!r,!!o)},h=i,v=Ve((d=c=r).objectStoreNames),m={schema:{name:d.name,tables:v.map((function(e){return h.objectStore(e)})).map((function(e){var t=e.keyPath,n=e.autoIncrement,r=wn(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:Fe(t)},indexes:Ve(e.indexNames).map((function(t){return e.index(t)})).map((function(e){var t=e.name,n=e.unique,r=e.multiEntry,o=e.keyPath,a={name:t,compound:wn(o),keyPath:o,unique:n,multiEntry:r,extractKey:Fe(o)};return i[He(o)]=a,a})),getIndexByKeyPath:function(e){return i[He(e)]}};return i[":id"]=a.primaryKey,null!=t&&(i[He(t)]=a.primaryKey),a}))},hasGetAll:v.length>0&&"getAll"in h.objectStore(v[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)},b=m.hasGetAll,w=(g=m.schema).tables.map((function(e){return{name:r=(t=e).name,schema:t,mutate:function(e){var t=e.trans,n=e.type,o=e.keys,i=e.values,a=e.range;return new Promise((function(e,u){e=ne(e);var c=t.objectStore(r),s=null==c.keyPath,l="put"===n||"add"===n;if(!l&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);var f,d=(o||i||{length:1}).length;if(o&&i&&o.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===d)return e({numFailures:0,failures:{},results:[],lastResult:void 0});var h=[],v=[],m=0,g=function(e){++m,Ne(e)};if("deleteRange"===n){if(4===a.type)return e({numFailures:m,failures:v,results:[],lastResult:void 0});3===a.type?h.push(f=c.clear()):h.push(f=c.delete(y(a)))}else{var b=p(l?s?[i,o]:[i,null]:[o,null],2),w=b[0],_=b[1];if(l)for(var x=0;x<d;++x)h.push(f=_&&void 0!==_[x]?c[n](w[x],_[x]):c[n](w[x])),f.onerror=g;else for(var S=0;S<d;++S)h.push(f=c[n](w[S])),f.onerror=g}var O=function(t){var r=t.target.result;h.forEach((function(e,t){return null!=e.error&&(v[t]=e.error)})),e({numFailures:m,failures:v,results:"delete"===n?o:h.map((function(e){return e.result})),lastResult:r})};f.onerror=function(e){g(e),O(e)},f.onsuccess=O}))},getMany:function(e){var t=e.trans,n=e.keys;return new Promise((function(e,o){e=ne(e);for(var i,a=t.objectStore(r),u=n.length,c=new Array(u),s=0,l=0,f=function(t){var n=t.target;c[n._pos]=n.result,++l===s&&e(c)},p=Me(o),d=0;d<u;++d)null!=n[d]&&((i=a.get(n[d]))._pos=d,i.onsuccess=f,i.onerror=p,++s);0===s&&e(c)}))},get:function(e){var t=e.trans,n=e.key;return new Promise((function(e,o){e=ne(e);var i=t.objectStore(r).get(n);i.onsuccess=function(t){return e(t.target.result)},i.onerror=Me(o)}))},query:(n=b,function(e){return new Promise((function(t,o){t=ne(t);var i=e.trans,a=e.values,u=e.limit,c=e.query,s=u===1/0?void 0:u,l=c.index,f=c.range,p=i.objectStore(r),d=l.isPrimaryKey?p:p.index(l.name),h=y(f);if(0===u)return t({result:[]});if(n){var v=a?d.getAll(h,s):d.getAllKeys(h,s);v.onsuccess=function(e){return t({result:e.target.result})},v.onerror=Me(o)}else{var m=0,g=a||!("openKeyCursor"in d)?d.openCursor(h):d.openKeyCursor(h),b=[];g.onsuccess=function(e){var n=g.result;return n?(b.push(a?n.value:n.primaryKey),++m===u?t({result:b}):void n.continue()):t({result:b})},g.onerror=Me(o)}}))}),openCursor:function(e){var t=e.trans,n=e.values,o=e.query,i=e.reverse,a=e.unique;return new Promise((function(e,u){e=ne(e);var c=o.index,s=o.range,l=t.objectStore(r),f=c.isPrimaryKey?l:l.index(c.name),p=i?a?"prevunique":"prev":a?"nextunique":"next",d=n||!("openKeyCursor"in f)?f.openCursor(y(s),p):f.openKeyCursor(y(s),p);d.onerror=Me(u),d.onsuccess=ne((function(n){var r=d.result;if(r){r.___id=++Kr,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var a=r.advance.bind(r),c=function(){throw new Error("Cursor not stopped")};r.trans=t,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=ne(u),r.next=function(){var e=this,t=1;return this.start((function(){return t--?e.continue():e.stop()})).then((function(){return e}))},r.start=function(e){var t=new Promise((function(e,t){e=ne(e),d.onerror=Me(t),r.fail=t,r.stop=function(t){r.stop=r.continue=r.continuePrimaryKey=r.advance=c,e(t)}})),n=function(){if(d.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return d.onsuccess=ne((function(e){d.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=a,n(),t},e(r)}else e(null)}),u)}))},count:function(e){var t=e.query,n=e.trans,o=t.index,i=t.range;return new Promise((function(e,t){var a=n.objectStore(r),u=o.isPrimaryKey?a:a.index(o.name),c=y(i),s=c?u.count(c):u.count();s.onsuccess=ne((function(t){return e(t.target.result)})),s.onerror=Me(t)}))}};var t,n,r})),_={},w.forEach((function(e){return _[e.name]=e})),a={stack:"dbcore",transaction:c.transaction.bind(c),table:function(e){if(!_[e])throw new Error("Table '".concat(e,"' not found"));return _[e]},MIN_KEY:-1/0,MAX_KEY:Wr(s),schema:g},{dbcore:n.dbcore.reduce((function(e,t){return f({},e,(0,t.create)(e))}),a)});x.core=O.dbcore,x.tables.forEach((function(e){var t=e.name;x.core.schema.tables.some((function(e){return e.name===t}))&&(e.core=x.core.table(t),l(x[t],x.Table)&&(x[t].core=e.core))}))},Ke=function(e,t,n,r){var o=e._novip;n.forEach((function(e){var n=r[e];t.forEach((function(t){var r=En(t,e);(!r||"value"in r&&void 0===r.value)&&(t===o.Transaction.prototype||l(t,o.Transaction)?y(t,e,{get:function(){return this.table(e)},set:function(t){Sn(this,e,{value:t,writable:!0,configurable:!0,enumerable:!0})}}):t[e]=new o.Table(e,n))}))}))},qe=function(e,t){var n=e._novip;t.forEach((function(e){for(var t in e)l(e[t],n.Table)&&delete e[t]}))},Ze=function(e,t){return e._cfg.version-t._cfg.version},Ge=function(e,t){var n,r={del:[],add:[],change:[]};for(n in e)t[n]||r.del.push(n);for(n in t){var o=e[n],i=t[n];if(o){var a={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!Ir)a.recreate=!0,r.change.push(a);else{var u=o.idxByName,c=i.idxByName,s=void 0;for(s in u)c[s]||a.del.push(s);for(s in c){var l=u[s],f=c[s];l?l.src!==f.src&&a.change.push(f):a.add.push(f)}(a.del.length>0||a.add.length>0||a.change.length>0)&&r.change.push(a)}}else r.add.push([n,i])}return r},Qe=function(e,t,n,r){var o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(e){return Ye(o,e)})),o},Ye=function(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})},Je=function(e,t,n){var r={};return g(t.objectStoreNames,0).forEach((function(e){for(var t=n.objectStore(e),o=t.keyPath,i=Ue(Be(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[],u=0;u<t.indexNames.length;++u){var c=t.index(t.indexNames[u]);o=c.keyPath;var s=Ue(c.name,o,!!c.unique,!!c.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=ze(e,i,a)})),r},Xe=function(e,t,n){for(var r=e._novip,o=n.db.objectStoreNames,i=0;i<o.length;++i){var a=o[i],u=n.objectStore(a);r._hasGetAll="getAll"in u;for(var c=0;c<u.indexNames.length;++c){var s=u.indexNames[c],f=u.index(s).keyPath,p="string"==typeof f?f:"["+g(f).join("+")+"]";if(t[a]){var d=t[a].idxByName[p];d&&(d.name=s,delete t[a].idxByName[p],t[a].idxByName[s]=d)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&gn.WorkerGlobalScope&&l(gn,gn.WorkerGlobalScope)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)},et=function(e,t){var n=e._dbNamesDB;return n||(n=e._dbNamesDB=new ro("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")},tt=function(e){return e&&"function"==typeof e.databases},nt=function(e){return re((function(){return vr.letThrough=!0,e()}))},rt=function(e){var t=function(e){return function(t){var n=e(t),i=n.value;return n.done?i:i&&"function"==typeof i.then?i.then(r,o):wn(i)?Promise.all(i).then(r,o):r(i)}},n=function(t){return e.next(t)},r=t(n),o=t((function(t){return e.throw(t)}));return t(n)()},ot=function(e,t,n){var r=arguments.length;if(r<2)throw new Zn.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=E(o);return[e,i,n]},it=function(e,t,n){for(var r=wn(e)?e.slice():[e],o=0;o<n;++o)r.push(t);return r},at=function(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;for(var r=[],o=0,i=0;o<t.keys.length&&i<e.length;++o)0===Ur(t.keys[o],e[i])&&(r.push(n?k(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}},ut=function(e){return!("from"in e)},ct=function(e,t){ut(t)||function e(t,n){var r=n.from,o=n.to,i=n.l,a=n.r;eo(t,r,o),i&&e(t,i),a&&e(t,a)}(e,t)},st=function(e){var t=ut(e)?null:{s:0,n:e};return{next:function(e){for(var n=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&Ur(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||Ur(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}},lt=function(e){var t,n,r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){var i="r"===o?"l":"r",a=f({},e),u=e[o];e.from=u.from,e.to=u.to,e[o]=u[o],a[o]=u[i],e[i]=a,a.d=ft(a)}e.d=ft(e)},ft=function(e){var t=e.r,n=e.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1},pt=function(e,t){return bn(t).forEach((function(n){ct(e[n]||(e[n]=new Xr),t[n])})),e},dt=function(e){var t=uo;try{uo=!0,Vr.storagemutated.fire(e)}finally{uo=t}},ht=function(e,t){return!t||"object"!==po(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t},vt=function(){return new ho},yt=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},mt=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},gt=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){mt(i,r,o,a,u,"next",e)}function u(e){mt(i,r,o,a,u,"throw",e)}a(void 0)}))}},bt=function(e){return function(e){if(Array.isArray(e))return yt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return yt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},wt=function(){return Object.values(vo)},_t=function(e){vo[e.id]&&console.warn('[setupDynamicOfflineDataHandler] Another second handler with the ID "'.concat(e.id,'" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.')),vo[e.id]=e},xt=function(e){return yo.apply(this,arguments)},St=function(e,t){return mo.apply(this,arguments)},Ot=function(e,t){return go.apply(this,arguments)},Et=function(e,t,n){return bo.apply(this,arguments)},kt=function(e,t){return wo.apply(this,arguments)},jt=function(e,t,n){return _o.apply(this,arguments)},Ct=function(e,t){return xo.apply(this,arguments)},$t=function(e,t,n){return So.apply(this,arguments)},Pt=function(){return Oo.apply(this,arguments)},At=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},Tt=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){At(i,r,o,a,u,"next",e)}function u(e){At(i,r,o,a,u,"throw",e)}a(void 0)}))}},It=function(){return Lt(),Eo},Rt=function(e,t){Lt(),_t({type:"patient",displayName:t.displayName,id:e,isSynced:function(){return Promise.resolve(!0)},sync:function(e,n){return t.onOfflinePatientAdded({patientUuid:e,signal:null!=n?n:(new AbortController).signal})}})},Dt=function(e){return ko.apply(this,arguments)},Lt=function(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")},Mt=function(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))},Nt=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ut=function(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href},Bt=function(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)},zt=function(){},Ft=function(e,t){if(!t)return e&&e.then?e.then(zt):Promise.resolve()},Vt=function(){return Promise.resolve(void 0)},Ht=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},Wt=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ht(i,r,o,a,u,"next",e)}function u(e){Ht(i,r,o,a,u,"throw",e)}a(void 0)}))}},Kt=function(e){return To.apply(this,arguments)},qt=function(){if(!Io&&!(Io="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Io(Mo)},Zt=function(){return Vo+Fo()},Gt=function(e){return e.startsWith(Vo)},Qt=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},Yt=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Qt(i,r,o,a,u,"next",e)}function u(e){Qt(i,r,o,a,u,"throw",e)}a(void 0)}))}},Jt=function(){return Ko.apply(this,arguments)},Xt=function(e,t,n,r){return qo.apply(this,arguments)},en=function(e,t,n){return Zo.apply(this,arguments)},tn=function(e,t){return Go.apply(this,arguments)},nn=function(e,t){return Qo.apply(this,arguments)},rn=function(e){return Yo.apply(this,arguments)},on=function(e){return Jo.apply(this,arguments)},an=function(e){return Xo.apply(this,arguments)},un=function(e){var t;return!!(null===(t=Wo[e])||void 0===t?void 0:t.options.onBeginEditSyncItem)},cn=function(e){return ei.apply(this,arguments)},sn=function(e){return ti.apply(this,arguments)},ln=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Wo[e]={type:e,dependsOn:t,process:n,options:r}};n.d(t,{iC:function(){return fn.OfflineMode},Vm:function(){return fn.OfflineModeResult},Cg:function(){return pn.QueueItemDescriptor},we:function(){return pn.SyncItem},Ug:function(){return pn.SyncProcessOptions},jp:function(){return cn},Qd:function(){return un},Gy:function(){return sn},sF:function(){return Zt},vm:function(){return r},xA:function(){return xt},H_:function(){return St},Ui:function(){return wt},D2:function(){return on},WB:function(){return nn},aA:function(){return vt},k1:function(){return It},TI:function(){return an},Q2:function(){return rn},z7:function(){return Gt},gp:function(){return Kt},a7:function(){return Vo},Rz:function(){return Lo},QI:function(){return Ro},$9:function(){return Do},cV:function(){return Ot},fR:function(){return Et},X2:function(){return en},dt:function(){return Rt},pO:function(){return kt},ME:function(){return jt},Xc:function(){return _t},Kb:function(){return ln},ps:function(){return Ct},mF:function(){return $t},MO:function(){return Dt}});var fn={};n.r(fn),n.d(fn,{vm:function(){return r}});var pn={};n.r(pn),n.d(pn,{jp:function(){return cn},Qd:function(){return un},Gy:function(){return sn},D2:function(){return on},WB:function(){return nn},TI:function(){return an},Q2:function(){return rn},X2:function(){return en},H_:function(){return ln}});var dn=n(1602),hn=n.n(dn),vn="unavailable",yn=n(5385),mn=n(7641),gn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:o.g,bn=Object.keys,wn=Array.isArray;"undefined"==typeof Promise||gn.Promise||(gn.Promise=Promise);var _n=Object.getPrototypeOf,xn={}.hasOwnProperty,Sn=Object.defineProperty,On=Object.getOwnPropertyDescriptor;function En(e,t){var n;return On(e,t)||(n=_n(e))&&En(n,t)}var kn=[].slice;function jn(e,t){if(u(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,o=t.length;r<o;++r){var i=jn(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var c=e[t.substr(0,a)];return void 0===c?void 0:jn(c,t.substr(a+1))}}function Cn(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){w("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)Cn(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),u=t.substr(i+1);if(""===u)void 0===n?wn(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var c=e[a];c||(c=e[a]={}),Cn(c,u,n)}}else void 0===n?wn(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}var $n=[].concat,Pn="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(E([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return gn[e]})),An=Pn.map((function(e){return gn[e]}));S(Pn,(function(e){return[e,!0]}));var Tn=null;function In(e){if(!e||"object"!=typeof e)return e;var t=Tn&&Tn.get(e);if(t)return t;if(wn(e)){t=[],Tn&&Tn.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(In(e[n]))}else if(An.indexOf(e.constructor)>=0)t=e;else{var o=_n(e);for(var i in t=o===Object.prototype?{}:Object.create(o),Tn&&Tn.set(e,t),e)u(e,i)&&(t[i]=In(e[i]))}return t}var Rn={}.toString,Dn="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Ln="symbol"==(void 0===Dn?"undefined":v(Dn))?function(e){var t;return null!=e&&(t=e[Dn])&&t.apply(e)}:function(){return null},Mn={},Nn="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},Un="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),Bn=function(){return!0},zn=!new Error("").stack;function Fn(){if(zn)try{throw Fn.arguments,new Error}catch(e){return e}return new Error}var Vn=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Hn=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Vn),Wn={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};m(A).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+P(this._e,2))}},toString:function(){return this.name+": "+this.message}}),m(I).from(A),m(R).from(A);var Kn=Hn.reduce((function(e,t){return e[t]=t+"Error",e}),{}),qn=A,Zn=Hn.reduce((function(e,t){var n=function(e,n){this._e=Fn(),this.name=r,e?"string"==typeof e?(this.message="".concat(e).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof e&&(this.message="".concat(e.name," ").concat(e.message),this.inner=e):(this.message=Wn[t]||r,this.inner=null)},r=t+"Error";return m(n).from(qn),e[t]=n,e}),{});Zn.Syntax=SyntaxError,Zn.Type=TypeError,Zn.Range=RangeError;var Gn=Vn.reduce((function(e,t){return e[t+"Error"]=Zn[t],e}),{}),Qn=Hn.reduce((function(e,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=Zn[t]),e}),{});Qn.ModifyError=I,Qn.DexieError=A,Qn.BulkError=R;var Yn={},Jn=p("undefined"==typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,_n(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,_n(t),e]}(),3),Xn=Jn[0],er=Jn[1],tr=Jn[2],nr=er&&er.then,rr=Xn&&Xn.constructor,or=!!tr,ir=!1,ar=tr?function(){tr.then(Y)}:gn.setImmediate?setImmediate.bind(null,Y):gn.MutationObserver?function(){var e=document.createElement("div");new MutationObserver((function(){Y(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:function(){setTimeout(Y,0)},ur=function(e,t){yr.push([e,t]),sr&&(ar(),sr=!1)},cr=!0,sr=!0,lr=[],fr=[],pr=null,dr=L,hr={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ve,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(e){try{ve(e[0],e[1])}catch(e){}}))}},vr=hr,yr=[],mr=0,gr=[],br={get:function(){var e=function(e,r){var o=this,i=!t.global&&(t!==vr||n!==kr),a=i&&!ie(),u=new H((function(n,u){Z(o,new W(de(e,t,i,a),de(r,t,i,a),n,u,t))}));return Un&&Q(u,this),u},t=vr,n=kr;return e.prototype=Yn,e},set:function(e){y(this,"then",e&&e.prototype===Yn?br:{get:function(){return e},set:br.set})}};function wr(e,t){try{t((function(t){if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&J();t&&"function"==typeof t.then?wr(e,(function(e,n){l(t,H)?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,q(e)),n&&X()}}),K.bind(null,e))}catch(t){K(e,t)}}function _r(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=P(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return Un&&((r=P(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&_r(e._prev,t,n)),t}h(H.prototype,{then:br,_then:function(e,t){Z(this,new W(null,null,e,t,vr))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(function(e){return l(e,t)?n(e):te(e)})):this.then(null,(function(e){return e&&e.name===t?n(e):te(e)}))},finally:function(e){return this.then((function(t){return e(),t}),(function(t){return e(),te(t)}))},stack:{get:function(){if(this._stack)return this._stack;try{ir=!0;var e=_r(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{ir=!1}}},timeout:function(e,t){var n=this;return e<1/0?new H((function(r,o){var i=setTimeout((function(){return o(new Zn.Timeout(t))}),e);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&y(H.prototype,Symbol.toStringTag,"Dexie.Promise"),hr.env=le(),h(H,{all:function(){var e=C.apply(null,arguments).map(ae);return new H((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach((function(o,i){return H.resolve(o).then((function(n){e[i]=n,--r||t(e)}),n)}))}))},resolve:function(e){if(l(e,H))return e;if(e&&"function"==typeof e.then)return new H((function(t,n){e.then(t,n)}));var t=new H(Yn,!0,e);return Q(t,pr),t},reject:te,race:function(){var e=C.apply(null,arguments).map(ae);return new H((function(t,n){e.map((function(e){return H.resolve(e).then(t,n)}))}))},PSD:{get:function(){return vr},set:function(e){return vr=e}},totalEchoes:{get:function(){return kr}},newPSD:re,usePSD:fe,scheduler:{get:function(){return ur},set:function(e){ur=e}},rejectionMapper:{get:function(){return dr},set:function(e){dr=e}},follow:function(e,t){return new H((function(n,r){return re((function(t,n){var r=vr;r.unhandleds=[],r.onunhandled=n,r.finalize=N((function(){var e=this;gr.push((function r(){0===e.unhandleds.length?t():n(e.unhandleds[0]),gr.splice(gr.indexOf(r),1)})),++mr,ur((function(){0==--mr&&ee()}),[])}),r.finalize),e()}),t,n,r)}))}}),rr&&(rr.allSettled&&y(H,"allSettled",(function(){var e=C.apply(null,arguments).map(ae);return new H((function(t){0===e.length&&t([]);var n=e.length,r=new Array(n);e.forEach((function(e,o){return H.resolve(e).then((function(e){return r[o]={status:"fulfilled",value:e}}),(function(e){return r[o]={status:"rejected",reason:e}})).then((function(){return--n||t(r)}))}))}))})),rr.any&&"undefined"!=typeof AggregateError&&y(H,"any",(function(){var e=C.apply(null,arguments).map(ae);return new H((function(t,n){0===e.length&&n(new AggregateError([]));var r=e.length,o=new Array(r);e.forEach((function(e,i){return H.resolve(e).then((function(e){return t(e)}),(function(e){o[i]=e,--r||n(new AggregateError(o))}))}))}))})));var xr={awaits:0,echoes:0,id:0},Sr=0,Or=[],Er=0,kr=0,jr=0;-1===(""+nr).indexOf("[native code]")&&(oe=ie=D);var Cr=H.reject;function $r(e,t,n,r){if(e.idbdb&&(e._state.openComplete||vr.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===Kn.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return $r(e,t,n,r)}))):Cr(o)}return o._promise(t,(function(e,t){return re((function(){return vr.trans=o,r(e,t,o)}))})).then((function(e){return o._completion.then((function(){return e}))}))}if(e._state.openComplete)return Cr(new Zn.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return Cr(new Zn.DatabaseClosed);e.open().catch(D)}return e._state.dbReadyPromise.then((function(){return $r(e,t,n,r)}))}var Pr=String.fromCharCode(65535),Ar="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Tr=[],Ir="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),Rr=Ir,Dr=Ir,Lr=function(e){return!/(dexie\.js|dexie\.min\.js)/.test(e)},Mr={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1},Nr=function(){function e(){a(this,e)}return c(e,[{key:"_trans",value:function(e,t,n){var r=function(e,n,r){if(!r.schema[i])throw new Zn.NotFound("Table "+i+" not part of transaction");return t(r.idbtrans,r)},o=this._tx||vr.trans,i=this.name,a=J();try{return o&&o.db===this.db?o===vr.trans?o._promise(e,r,n):re((function(){return o._promise(e,r,n)}),{trans:o,transless:vr.transless||vr}):$r(this.db,e,[this.name],r)}finally{a&&X()}}},{key:"get",value:function(e,t){var n=this;return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(function(t){return n.core.get({trans:t,key:e}).then((function(e){return n.hook.reading.fire(e)}))})).then(t)}},{key:"where",value:function(e){var t=function(e,t){try{return 0===i.cmp(e,t)}catch(e){return!1}};if("string"==typeof e)return new this.db.WhereClause(this,e);if(wn(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var n=bn(e);if(1===n.length)return this.where(n[0]).equals(e[n[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(e){return e.compound&&n.every((function(t){return e.keyPath.indexOf(t)>=0}))&&e.keyPath.every((function(e){return n.indexOf(e)>=0}))}))[0];if(r&&this.db._maxKey!==Pr)return this.where(r.name).equals(r.keyPath.map((function(t){return e[t]})));!r&&Un&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit of a compound index [").concat(n.join("+"),"]"));var o=this.schema.idxByName,i=this.db._deps.indexedDB,a=p(n.reduce((function(n,r){var i=p(n,2),a=i[0],u=i[1],c=o[r],s=e[r];return[a||c,a||!c?ye(u,c&&c.multi?function(e){var n=jn(e,r);return wn(n)&&n.some((function(e){return t(s,e)}))}:function(e){return t(s,jn(e,r))}):u]}),[null,null]),2),u=a[0],c=a[1];return u?this.where(u.name).equals(e[u.keyPath]).filter(c):r?this.filter(c):this.where(n).equals("")}},{key:"filter",value:function(e){return this.toCollection().and(e)}},{key:"count",value:function(e){return this.toCollection().count(e)}},{key:"offset",value:function(e){return this.toCollection().offset(e)}},{key:"limit",value:function(e){return this.toCollection().limit(e)}},{key:"each",value:function(e){return this.toCollection().each(e)}},{key:"toArray",value:function(e){return this.toCollection().toArray(e)}},{key:"toCollection",value:function(){return new this.db.Collection(new this.db.WhereClause(this))}},{key:"orderBy",value:function(e){return new this.db.Collection(new this.db.WhereClause(this,wn(e)?"[".concat(e.join("+"),"]"):e))}},{key:"reverse",value:function(){return this.toCollection().reverse()}},{key:"mapToClass",value:function(e){this.schema.mappedClass=e;var t=function(t){if(!t)return t;var n=Object.create(e.prototype);for(var r in t)if(u(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}},{key:"defineClass",value:function(){return this.mapToClass((function(e){i(this,e)}))}},{key:"add",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=me(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]})})).then((function(e){return e.numFailures?H.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{Cn(e,i,t)}catch(e){}return t}))}},{key:"update",value:function(e,t){if("object"!=typeof e||wn(e))return this.where(":id").equals(e).modify(t);var n=jn(e,this.schema.primKey.keyPath);if(void 0===n)return Cr(new Zn.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?bn(t).forEach((function(n){Cn(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}},{key:"put",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=me(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null})})).then((function(e){return e.numFailures?H.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{Cn(e,i,t)}catch(e){}return t}))}},{key:"delete",value:function(e){var t=this;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:[e]})})).then((function(e){return e.numFailures?H.reject(e.failures[0]):void 0}))}},{key:"clear",value:function(){var e=this;return this._trans("readwrite",(function(t){return e.core.mutate({trans:t,type:"deleteRange",range:Mr})})).then((function(e){return e.numFailures?H.reject(e.failures[0]):void 0}))}},{key:"bulkGet",value:function(e){var t=this;return this._trans("readonly",(function(n){return t.core.getMany({keys:e,trans:n}).then((function(e){return e.map((function(e){return t.hook.reading.fire(e)}))}))}))}},{key:"bulkAdd",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r,a=r.schema.primKey,u=a.auto,c=a.keyPath;if(c&&o)throw new Zn.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new Zn.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,l=c&&u?e.map(me(c)):e;return r.core.mutate({trans:t,type:"add",keys:o,values:l,wantResults:i}).then((function(e){var t=e.numFailures,r=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?r:o;throw new R("".concat(n.name,".bulkAdd(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkPut",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r,a=r.schema.primKey,u=a.auto,c=a.keyPath;if(c&&o)throw new Zn.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new Zn.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,l=c&&u?e.map(me(c)):e;return r.core.mutate({trans:t,type:"put",keys:o,values:l,wantResults:i}).then((function(e){var t=e.numFailures,r=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?r:o;throw new R("".concat(n.name,".bulkPut(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkDelete",value:function(e){var t=this,n=e.length;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:e})})).then((function(e){var r=e.numFailures,o=e.lastResult,i=e.failures;if(0===r)return o;throw new R("".concat(t.name,".bulkDelete(): ").concat(r," of ").concat(n," operations failed"),i)}))}}]),e}();function Ur(e,t){try{var n=je(e),r=je(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i)if(e[i]!==t[i])return e[i]<t[i]?-1:1;return n===r?0:n<r?-1:1}(Ce(e),Ce(t));case"Array":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i){var a=Ur(e[i],t[i]);if(0!==a)return a}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}var Br=function(){function e(){a(this,e)}return c(e,[{key:"_read",value:function(e,t){var n=this._ctx;return n.error?n.table._trans(null,Cr.bind(null,n.error)):n.table._trans("readonly",e).then(t)}},{key:"_write",value:function(e){var t=this._ctx;return t.error?t.table._trans(null,Cr.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}},{key:"_addAlgorithm",value:function(e){var t=this._ctx;t.algorithm=ye(t.algorithm,e)}},{key:"_iterate",value:function(e,t){return Ee(this._ctx,e,t,this._ctx.table.core)}},{key:"clone",value:function(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&i(n,e),t._ctx=n,t}},{key:"raw",value:function(){return this._ctx.valueMapper=null,this}},{key:"each",value:function(e){var t=this._ctx;return this._read((function(n){return Ee(t,e,n,t.table.core)}))}},{key:"count",value:function(e){var t=this;return this._read((function(e){var n=t._ctx,r=n.table.core;if(we(n,!0))return r.count({trans:e,query:{index:Se(n,r.schema),range:n.range}}).then((function(e){return Math.min(e,n.limit)}));var o=0;return Ee(n,(function(){return++o,!1}),e,r).then((function(){return o}))})).then(e)}},{key:"sortBy",value:function(e,t){var n=function(e,t){var n=a(e,i),r=a(t,i);return n<r?-u:n>r?u:0},r=e.split(".").reverse(),o=r[0],i=r.length-1;function a(e,t){return t?a(e[r[t]],t-1):e[o]}var u="next"===this._ctx.dir?1:-1;return this.toArray((function(e){return e.sort(n)})).then(t)}},{key:"toArray",value:function(e){var t=this;return this._read((function(e){var n=t._ctx;if("next"===n.dir&&we(n,!0)&&n.limit>0){var r=n.valueMapper,o=Se(n,n.table.core.schema);return n.table.core.query({trans:e,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(e){var t=e.result;return r?t.map(r):t}))}var i=[];return Ee(n,(function(e){return i.push(e)}),e,n.table.core).then((function(){return i}))}),e)}},{key:"offset",value:function(e){var t=this._ctx;return e<=0||(t.offset+=e,we(t)?xe(t,(function(){var t=e;return function(e,n){return 0===t||(1===t?(--t,!1):(n((function(){e.advance(t),t=0})),!1))}})):xe(t,(function(){var t=e;return function(){return--t<0}}))),this}},{key:"limit",value:function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),xe(this._ctx,(function(){var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}},{key:"until",value:function(e,t){return _e(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}},{key:"first",value:function(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}},{key:"last",value:function(e){return this.reverse().first(e)}},{key:"filter",value:function(e){var t,n;return _e(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=ye(t.isMatch,n),this}},{key:"and",value:function(e){return this.filter(e)}},{key:"or",value:function(e){return new this.db.WhereClause(this._ctx.table,e,this)}},{key:"reverse",value:function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}},{key:"desc",value:function(){return this.reverse()}},{key:"eachKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}},{key:"eachUniqueKey",value:function(e){return this._ctx.unique="unique",this.eachKey(e)}},{key:"eachPrimaryKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}},{key:"keys",value:function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}},{key:"primaryKeys",value:function(e){var t=this._ctx;if("next"===t.dir&&we(t,!0)&&t.limit>0)return this._read((function(e){var n=Se(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((function(e){return e.result})).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}},{key:"uniqueKeys",value:function(e){return this._ctx.unique="unique",this.keys(e)}},{key:"firstKey",value:function(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}},{key:"lastKey",value:function(e){return this.reverse().firstKey(e)}},{key:"distinct",value:function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return _e(this._ctx,(function(e){var t=e.primaryKey.toString(),r=u(n,t);return n[t]=!0,!r})),this}},{key:"modify",value:function(e){var t=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof e)o=e;else{var i=bn(e),a=i.length;o=function(t){for(var n=!1,r=0;r<a;++r){var o=i[r],u=e[o];jn(t,o)!==u&&(Cn(t,o,u),n=!0)}return n}}var u=n.table.core,c=u.schema.primaryKey,s=c.outbound,l=c.extractKey,f=t.db._options.modifyChunkSize||200,p=[],d=0,h=[],v=function(e,t){var n=t.failures,r=t.numFailures;d+=e-r;var o=!0,i=!1,a=void 0;try{for(var u,c=bn(n)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=u.value;p.push(n[s])}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}};return t.clone().primaryKeys().then((function(t){var i=function(a){var c=Math.min(f,t.length-a);return u.getMany({trans:r,keys:t.slice(a,a+c),cache:"immutable"}).then((function(p){for(var d=[],h=[],y=s?[]:null,m=[],g=0;g<c;++g){var b=p[g],w={value:k(b),primKey:t[a+g]};!1!==o.call(w,w.value,w)&&(null==w.value?m.push(t[a+g]):s||0===Ur(l(b),l(w.value))?(h.push(w.value),s&&y.push(t[a+g])):(m.push(t[a+g]),d.push(w.value)))}var _=we(n)&&n.limit===1/0&&("function"!=typeof e||e===zr)&&{index:n.index,range:n.range};return Promise.resolve(d.length>0&&u.mutate({trans:r,type:"add",values:d}).then((function(e){for(var t in e.failures)m.splice(parseInt(t),1);v(d.length,e)}))).then((function(){return(h.length>0||_&&"object"==typeof e)&&u.mutate({trans:r,type:"put",keys:y,values:h,criteria:_,changeSpec:"function"!=typeof e&&e}).then((function(e){return v(h.length,e)}))})).then((function(){return(m.length>0||_&&e===zr)&&u.mutate({trans:r,type:"delete",keys:m,criteria:_}).then((function(e){return v(m.length,e)}))})).then((function(){return t.length>a+c&&i(a+f)}))}))};return i(0).then((function(){if(p.length>0)throw new I("Error modifying one or more objects",p,d,h);return t.length}))}))}))}},{key:"delete",value:function(){var e=this._ctx,t=e.range;return we(e)&&(e.isPrimKey&&!Dr||3===t.type)?this._write((function(n){var r=e.table.core.schema.primaryKey,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((function(t){return e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(e){var n=e.failures,r=(e.lastResult,e.results,e.numFailures);if(r)throw new I("Could not delete some values",Object.keys(n).map((function(e){return n[e]})),t-r);return t-r}))}))})):this.modify(zr)}}]),e}(),zr=function(e,t){return t.value=null},Fr=function(){function e(){a(this,e)}return c(e,[{key:"Collection",get:function(){return this._ctx.table.db.Collection}},{key:"between",value:function(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?Te(this):new this.Collection(this,(function(){return De(e,t,!n,!r)}))}catch(e){return Ae(this,Ar)}}},{key:"equals",value:function(e){return null==e?Ae(this,Ar):new this.Collection(this,(function(){return Le(e)}))}},{key:"above",value:function(e){return null==e?Ae(this,Ar):new this.Collection(this,(function(){return De(e,void 0,!0)}))}},{key:"aboveOrEqual",value:function(e){return null==e?Ae(this,Ar):new this.Collection(this,(function(){return De(e,void 0,!1)}))}},{key:"below",value:function(e){return null==e?Ae(this,Ar):new this.Collection(this,(function(){return De(void 0,e,!1,!0)}))}},{key:"belowOrEqual",value:function(e){return null==e?Ae(this,Ar):new this.Collection(this,(function(){return De(void 0,e)}))}},{key:"startsWith",value:function(e){return"string"!=typeof e?Ae(this,"String expected."):this.between(e,e+Pr,!0,!0)}},{key:"startsWithIgnoreCase",value:function(e){return""===e?this.startsWith(e):Re(this,(function(e,t){return 0===e.indexOf(t[0])}),[e],Pr)}},{key:"equalsIgnoreCase",value:function(e){return Re(this,(function(e,t){return e===t[0]}),[e],"")}},{key:"anyOfIgnoreCase",value:function(){var e=C.apply(Mn,arguments);return 0===e.length?Te(this):Re(this,(function(e,t){return-1!==t.indexOf(e)}),e,"")}},{key:"startsWithAnyOfIgnoreCase",value:function(){var e=C.apply(Mn,arguments);return 0===e.length?Te(this):Re(this,(function(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}),e,Pr)}},{key:"anyOf",value:function(){var e=this,t=C.apply(Mn,arguments),n=this._cmp;try{t.sort(n)}catch(e){return Ae(this,Ar)}if(0===t.length)return Te(this);var r=new this.Collection(this,(function(){return De(t[0],t[t.length-1])}));r._ondirectionchange=function(r){n="next"===r?e._ascending:e._descending,t.sort(n)};var o=0;return r._addAlgorithm((function(e,r,i){for(var a=e.key;n(a,t[o])>0;)if(++o===t.length)return r(i),!1;return 0===n(a,t[o])||(r((function(){e.continue(t[o])})),!1)})),r}},{key:"notEqual",value:function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}},{key:"noneOf",value:function(){var e=C.apply(Mn,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Ae(this,Ar)}var t=e.reduce((function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]}),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}},{key:"inAnyRange",value:function(e,t){var n=this,r=function(e,t){return p(e[0],t[0])},o=this._cmp,i=this._ascending,a=this._descending,u=this._min,c=this._max;if(0===e.length)return Te(this);if(!e.every((function(e){return void 0!==e[0]&&void 0!==e[1]&&i(e[0],e[1])<=0})))return Ae(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Zn.InvalidArgument);var s,l=!t||!1!==t.includeLowers,f=t&&!0===t.includeUppers,p=i;try{(s=e.reduce((function(e,t){for(var n=0,r=e.length;n<r;++n){var i=e[n];if(o(t[0],i[1])<0&&o(t[1],i[0])>0){i[0]=u(i[0],t[0]),i[1]=c(i[1],t[1]);break}}return n===r&&e.push(t),e}),[])).sort(r)}catch(e){return Ae(this,Ar)}var d=0,h=f?function(e){return i(e,s[d][1])>0}:function(e){return i(e,s[d][1])>=0},v=l?function(e){return a(e,s[d][0])>0}:function(e){return a(e,s[d][0])>=0},y=h,m=new this.Collection(this,(function(){return De(s[0][0],s[s.length-1][1],!l,!f)}));return m._ondirectionchange=function(e){"next"===e?(y=h,p=i):(y=v,p=a),s.sort(r)},m._addAlgorithm((function(e,t,r){for(var o=e.key;y(o);)if(++d===s.length)return t(r),!1;return!((h(a=o)||v(a))&&(0===n._cmp(o,s[d][1])||0===n._cmp(o,s[d][0])||t((function(){p===i?e.continue(s[d][0]):e.continue(s[d][1])})),1));var a})),m}},{key:"startsWithAnyOf",value:function(){var e=C.apply(Mn,arguments);return e.every((function(e){return"string"==typeof e}))?0===e.length?Te(this):this.inAnyRange(e.map((function(e){return[e,e+Pr]}))):Ae(this,"startsWithAnyOf() only works with strings")}}]),e}(),Vr=ge(null,"storagemutated"),Hr=function(){function e(){a(this,e)}return c(e,[{key:"_lock",value:function(){return w(!vr.global),++this._reculock,1!==this._reculock||vr.global||(vr.lockOwnerFor=this),this}},{key:"_unlock",value:function(){if(w(!vr.global),0==--this._reculock)for(vr.global||(vr.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{fe(e[1],e[0])}catch(e){}}return this}},{key:"_locked",value:function(){return this._reculock&&vr.lockOwnerFor!==this}},{key:"create",value:function(e){var t=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(w(!this.idbtrans),!e&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new Zn.DatabaseClosed(r);case"MissingAPIError":throw new Zn.MissingAPI(r.message,r);default:throw new Zn.OpenFailed(r)}if(!this.active)throw new Zn.TransactionInactive;return w(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=ne((function(n){Ne(n),t._reject(e.error)})),e.onabort=ne((function(n){Ne(n),t.active&&t._reject(new Zn.Abort(e.error)),t.active=!1,t.on("abort").fire(n)})),e.oncomplete=ne((function(){t.active=!1,t._resolve(),"mutatedParts"in e&&Vr.storagemutated.fire(e.mutatedParts)})),this}},{key:"_promise",value:function(e,t,n){var r=this;if("readwrite"===e&&"readwrite"!==this.mode)return Cr(new Zn.ReadOnly("Transaction is readonly"));if(!this.active)return Cr(new Zn.TransactionInactive);if(this._locked())return new H((function(o,i){var a=r;r._blockedFuncs.push([function(){a._promise(e,t,n).then(o,i)},vr])}));if(n)return re((function(){var e=r,n=new H((function(n,r){e._lock();var o=t(n,r,e);o&&o.then&&o.then(n,r)}));return n.finally((function(){return e._unlock()})),n._lib=!0,n}));var o=new H((function(e,n){var o=t(e,n,r);o&&o.then&&o.then(e,n)}));return o._lib=!0,o}},{key:"_root",value:function(){return this.parent?this.parent._root():this}},{key:"waitFor",value:function(e){var t=this._root(),n=H.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((function(){return n}));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new H((function(e,r){n.then((function(n){return t._waitingQueue.push(ne(e.bind(null,n)))}),(function(e){return t._waitingQueue.push(ne(r.bind(null,e)))})).finally((function(){t._waitingFor===o&&(t._waitingFor=null)}))}))}},{key:"abort",value:function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Zn.Abort))}},{key:"table",value:function(e){var t=this._memoizedTables||(this._memoizedTables={});if(u(t,e))return t[e];var n=this.schema[e];if(!n)throw new Zn.NotFound("Table "+e+" not part of transaction");var r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}]),e}(),Wr=function(e){try{return e.only([[]]),Wr=function(){return[[]]},[[]]}catch(e){return Wr=function(){return Pr},Pr}},Kr=0,qr=function(){function e(){a(this,e)}return c(e,[{key:"_parseStoresSpec",value:function(e,t){bn(e).forEach((function(n){if(null!==e[n]){var r=e[n].split(",").map((function(e,t){var n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return Ue(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),wn(r),0===t)})),o=r.shift();if(o.multi)throw new Zn.Schema("Primary key cannot be multi-valued");r.forEach((function(e){if(e.auto)throw new Zn.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new Zn.Schema("Index must have a name and cannot be an empty string")})),t[n]=ze(n,o,r)}}))}},{key:"stores",value:function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?i(this._cfg.storesSource,e):e;var n=t._versions,r={},o={};return n.forEach((function(e){i(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,qe(t,[t._allTables,t,t.Transaction.prototype]),Ke(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],bn(o),o),t._storeNames=bn(o),this}},{key:"upgrade",value:function(e){return this._cfg.contentUpgrade=V(this._cfg.contentUpgrade||D,e),this}}]),e}();function Zr(e,t,n,r,o){return H.resolve().then((function(){var i=vr.transless||vr,a=e._createTransaction(t,n,e._dbSchema,r),u={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===Kn.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return Zr(e,t,n,null,o)}))):Cr(r)}var c,s=Nn(o);s&&oe();var l=H.follow((function(){if(c=o.call(a,a))if(s){var e=ie.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=rt(c))}),u);return(c&&"function"==typeof c.then?H.resolve(c).then((function(e){return a.active?e:Cr(new Zn.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return c}))).then((function(e){return r&&a._resolve(),a._completion.then((function(){return e}))})).catch((function(e){return a._reject(e),Cr(e)}))}))}var Gr={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return f({},e,{table:function(t){var n=function(t){var n,r,o=t.query.index;return o.isVirtual?f({},t,{query:{index:o,range:(n=t.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:it(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,r),lowerOpen:!0,upper:it(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,r),upperOpen:!0})}}):t},r=e.table(t),o=r.schema,i={},a=[];function u(e,t,n){var r=He(e),o=i[r]=i[r]||[],c=null==e?0:"string"==typeof e?1:e.length,s=t>0,l=f({},n,{isVirtual:s,keyTail:t,keyLength:c,extractKey:Fe(e),unique:!s&&n.unique});return o.push(l),l.isPrimaryKey||a.push(l),c>1&&u(2===c?e[0]:e.slice(0,c-1),t+1,n),o.sort((function(e,t){return e.keyTail-t.keyTail})),l}var c=u(o.primaryKey.keyPath,0,o.primaryKey);i[":id"]=[c];var s=!0,l=!1,p=void 0;try{for(var d,h=o.indexes[Symbol.iterator]();!(s=(d=h.next()).done);s=!0){var v=d.value;u(v.keyPath,0,v)}}catch(e){l=!0,p=e}finally{try{s||null==h.return||h.return()}finally{if(l)throw p}}var y=f({},r,{schema:f({},o,{primaryKey:c,indexes:a,getIndexByKeyPath:function(e){var t=i[He(e)];return t&&t[0]}}),count:function(e){return r.count(n(e))},query:function(e){return r.query(n(e))},openCursor:function(t){var o=t.query.index,i=o.keyTail,a=o.isVirtual,u=o.keyLength;return a?r.openCursor(n(t)).then((function(n){return n&&(r=n,Object.create(r,{continue:{value:function(n){null!=n?r.continue(it(n,t.reverse?e.MAX_KEY:e.MIN_KEY,i)):t.unique?r.continue(r.key.slice(0,u).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,i)):r.continue()}},continuePrimaryKey:{value:function(t,n){r.continuePrimaryKey(it(t,e.MAX_KEY,i),n)}},primaryKey:{get:function(){return r.primaryKey}},key:{get:function(){var e=r.key;return 1===u?e[0]:e.slice(0,u)}},value:{get:function(){return r.value}}}));var r})):r.openCursor(t)}});return y}})}};function Qr(e,t,n,r){return n=n||{},r=r||"",bn(e).forEach((function(o){if(u(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){var c=j(i);c!==j(a)?n[r+o]=t[o]:"Object"===c?Qr(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0})),bn(t).forEach((function(o){u(e,o)||(n[r+o]=t[o])})),n}var Yr={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return f({},e,{table:function(t){var n=e.table(t),r=n.schema.primaryKey,o=f({},n,{mutate:function(e){var o=function(e){var t,o,i,a,p,h=vr.trans,v=e.keys||(t=r,"delete"===(o=e).type?o.keys:o.keys||o.values.map(t.extractKey));if(!v)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?f({},e,{keys:v}):f({},e)).type&&(e.values=d(e.values)),e.keys&&(e.keys=d(e.keys)),(i=n,a=e,p=v,"add"===a.type?Promise.resolve([]):i.getMany({trans:a.trans,keys:p,cache:"immutable"})).then((function(t){var o=v.map((function(n,o){var i=t[o],a={onerror:null,onsuccess:null};if("delete"===e.type)c.fire.call(a,n,i,h);else if("add"===e.type||void 0===i){var f=s.fire.call(a,n,e.values[o],h);null==n&&null!=f&&(n=f,e.keys[o]=n,r.outbound||Cn(e.values[o],r.keyPath,n))}else{var p=Qr(i,e.values[o]),d=l.fire.call(a,p,n,i,h);if(d){var v=e.values[o];Object.keys(d).forEach((function(e){u(v,e)?v[e]=d[e]:Cn(v,e,d[e])}))}}return a}));return n.mutate(e).then((function(n){for(var r=n.failures,i=n.results,a=n.numFailures,u=n.lastResult,c=0;c<v.length;++c){var s=i?i[c]:v[c],l=o[c];null==s?l.onerror&&l.onerror(r[c]):l.onsuccess&&l.onsuccess("put"===e.type&&t[c]?e.values[c]:s)}return{failures:r,results:i,numFailures:a,lastResult:u}})).catch((function(e){return o.forEach((function(t){return t.onerror&&t.onerror(e)})),Promise.reject(e)}))}))},i=vr.trans,a=i.table(t).hook,c=a.deleting,s=a.creating,l=a.updating;switch(e.type){case"add":if(s.fire===D)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"put":if(s.fire===D&&l.fire===D)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"delete":if(c.fire===D)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"deleteRange":if(c.fire===D)break;return i._promise("readwrite",(function(){return p((t=e).trans,t.range,1e4);var t}),!0)}return n.mutate(e);function p(e,t,i){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:i}).then((function(n){var r=n.result;return o({type:"delete",keys:r,trans:e}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:p(e,f({},t,{lower:r[r.length-1],lowerOpen:!0}),i)}))}))}}});return o}})}},Jr={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var n=e.table(t);return f({},n,{getMany:function(e){if(!e.cache)return n.getMany(e);var t=at(e.keys,e.trans._cache,"clone"===e.cache);return t?H.resolve(t):n.getMany(e).then((function(t){return e.trans._cache={keys:e.keys,values:"clone"===e.cache?k(t):t},t}))},mutate:function(e){return"add"!==e.type&&(e.trans._cache=null),n.mutate(e)}})}}}},Xr=function(e,t){if(!this){var n=new Xr;return e&&"d"in e&&i(n,e),n}i(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function eo(e,t,n){var r=Ur(t,n);if(!isNaN(r)){if(r>0)throw RangeError();if(ut(e))return i(e,{from:t,to:n,d:1});var o=e.l,a=e.r;if(Ur(n,e.from)<0)return o?eo(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},lt(e);if(Ur(t,e.to)>0)return a?eo(a,t,n):e.r={from:t,to:n,d:1,l:null,r:null},lt(e);Ur(t,e.from)<0&&(e.from=t,e.l=null,e.d=a?a.d+1:1),Ur(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);var u=!e.r;o&&!e.l&&ct(e,o),a&&u&&ct(e,a)}}h(Xr.prototype,s({add:function(e){return ct(this,e),this},addKey:function(e){return eo(this,e,e),this},addKeys:function(e){var t=this;return e.forEach((function(e){return eo(t,e,e)})),this}},Dn,(function(){return st(this)})));var to,no={stack:"dbcore",level:0,create:function(e){var t=e.schema.name,n=new Xr(e.MIN_KEY,e.MAX_KEY);return f({},e,{table:function(r){var o=e.table(r),i=o.schema,a=i.primaryKey,u=a.extractKey,c=a.outbound,s=f({},o,{mutate:function(e){var a=e.trans,u=a.mutatedParts||(a.mutatedParts={}),c=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return u[n]||(u[n]=new Xr)},s=c(""),l=c(":dels"),f=e.type,d=p("deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],2),h=d[0],v=d[1],y=e.trans._cache;return o.mutate(e).then((function(e){if(wn(h)){"delete"!==f&&(h=e.results),s.addKeys(h);var t=at(h,y);t||"add"===f||l.addKeys(h),(t||v)&&(o=c,a=t,u=v,i.indexes.forEach((function(e){var t=function(t){return null!=t?e.extractKey(t):null},n=o(e.name||""),r=function(t){return e.multiEntry&&wn(t)?t.forEach((function(e){return n.addKey(e)})):n.addKey(t)};(a||u).forEach((function(e,n){var o=a&&t(a[n]),i=u&&t(u[n]);0!==Ur(o,i)&&(null!=o&&r(o),null!=i&&r(i))}))})))}else if(h){var r={from:h.lower,to:h.upper};l.add(r),s.add(r)}else s.add(n),l.add(n),i.indexes.forEach((function(e){return c(e.name).add(n)}));var o,a,u;return e}))}}),l=function(t){var n,r,o=t.query,i=o.index,a=o.range;return[i,new Xr(null!==(n=a.lower)&&void 0!==n?n:e.MIN_KEY,null!==(r=a.upper)&&void 0!==r?r:e.MAX_KEY)]},d={get:function(e){return[a,new Xr(e.key)]},getMany:function(e){return[a,(new Xr).addKeys(e.keys)]},count:l,query:l,openCursor:l};return bn(d).forEach((function(e){s[e]=function(i){var a=vr.subscr;if(a){var s=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return a[n]||(a[n]=new Xr)},l=s(""),h=s(":dels"),v=p(d[e](i),2),y=v[0],m=v[1];if(s(y.name||"").add(m),!y.isPrimaryKey){if("count"!==e){var g="query"===e&&c&&i.values&&o.query(f({},i,{values:!1}));return o[e].apply(this,arguments).then((function(t){if("query"===e){if(c&&i.values)return g.then((function(e){var n=e.result;return l.addKeys(n),t}));var n=i.values?t.result.map(u):t.result;i.values?l.addKeys(n):h.addKeys(n)}else if("openCursor"===e){var r=t,o=i.values;return r&&Object.create(r,{key:{get:function(){return h.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var e=r.primaryKey;return h.addKey(e),e}},value:{get:function(){return o&&l.addKey(r.primaryKey),r.value}}})}return t}))}h.add(n)}}return o[e].apply(this,arguments)}})),s}})}},ro=function(){function e(t,n){var r=this;a(this,e),this._middlewares={},this.verno=0;var o=e.dependencies;this._options=n=f({addons:e.addons,autoOpen:!0,indexedDB:o.indexedDB,IDBKeyRange:o.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var i=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var u,c,s,l,p,d={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:D,dbReadyPromise:null,cancelOpen:D,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};d.dbReadyPromise=new H((function(e){d.dbReadyResolve=e})),d.openCanceller=new H((function(e,t){d.cancelOpen=t})),this._state=d,this.name=t,this.on=ge(this,"populate","blocked","versionchange","close",{ready:[V,D]}),this.on.ready.subscribe=b(this.on.ready.subscribe,(function(t){return function(n,o){var i=r;e.vip((function(){var e=i._state;if(e.openComplete)e.dbOpenError||H.resolve().then(n),o&&t(n);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(n),o&&t(n);else{t(n);var r=i;o||t((function e(){r.on.ready.unsubscribe(n),r.on.ready.unsubscribe(e)}))}}))}})),this.Collection=(u=this,be(Br.prototype,(function(e,t){this.db=u;var n=Mr,r=null;if(t)try{n=t()}catch(e){r=e}var o=e._ctx,i=o.table,a=i.hook.reading.fire;this._ctx={table:i,index:o.index,isPrimKey:!o.index||i.schema.primKey.keyPath&&o.index===i.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:a!==L?a:null}}))),this.Table=(l=this,be(Nr.prototype,(function(e,t,n){this.db=l,this._tx=n,this.name=e,this.schema=t,this.hook=l._allTables[e]?l._allTables[e].hook:ge(null,{creating:[U,D],reading:[M,L],updating:[z,D],deleting:[B,D]})}))),this.Transaction=(s=this,be(Hr.prototype,(function(e,t,n,r,o){var i=this;this.db=s,this.mode=e,this.storeNames=t,this.schema=n,this.chromeTransactionDurability=r,this.idbtrans=null,this.on=ge(this,"complete","error","abort"),this.parent=o||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new H((function(e,t){i._resolve=e,i._reject=t})),this._completion.then((function(){i.active=!1,i.on.complete.fire()}),(function(e){var t=i.active;return i.active=!1,i.on.error.fire(e),i.parent?i.parent._reject(e):t&&i.idbtrans&&i.idbtrans.abort(),Cr(e)}))}))),this.Version=(p=this,be(qr.prototype,(function(e){this.db=p,this._cfg={version:e,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))),this.WhereClause=(c=this,be(Fr.prototype,(function(e,t,n){this.db=c,this._ctx={table:e,index:":id"===t?null:t,or:n};var r=c._deps.indexedDB;if(!r)throw new Zn.MissingAPI;this._cmp=this._ascending=r.cmp.bind(r),this._descending=function(e,t){return r.cmp(t,e)},this._max=function(e,t){return r.cmp(e,t)>0?e:t},this._min=function(e,t){return r.cmp(e,t)<0?e:t},this._IDBKeyRange=c._deps.IDBKeyRange}))),this.on("versionchange",(function(e){e.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(r.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(r.name,"'. Closing db now to resume the delete request.")),r.close()})),this.on("blocked",(function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(e.oldVersion/10))})),this._maxKey=Wr(n.IDBKeyRange),this._createTransaction=function(e,t,n,o){return new r.Transaction(e,t,n,r._options.chromeTransactionDurability,o)},this._fireOnBlocked=function(e){var t=r;r.on("blocked").fire(e),Tr.filter((function(e){return e.name===t.name&&e!==t&&!e._state.vcFired})).map((function(t){return t.on("versionchange").fire(e)}))},this.use(Gr),this.use(Yr),this.use(no),this.use(Jr),this.vip=Object.create(this,{_vip:{value:!0}}),i.forEach((function(e){return e(r)}))}return c(e,[{key:"version",value:function(e){if(isNaN(e)||e<.1)throw new Zn.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Zn.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,n=t.filter((function(t){return t._cfg.version===e}))[0];return n||(n=new this.Version(e),t.push(n),t.sort(Ze),n.stores({}),this._state.autoSchema=!1,n)}},{key:"_whenReady",value:function(e){var t=this;return this.idbdb&&(this._state.openComplete||vr.letThrough||this._vip)?e():new H((function(e,n){if(t._state.openComplete)return n(new Zn.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return void n(new Zn.DatabaseClosed);t.open().catch(D)}t._state.dbReadyPromise.then(e,n)})).then(e)}},{key:"use",value:function(e){var t=e.stack,n=e.create,r=e.level,o=e.name;o&&this.unuse({stack:t,name:o});var i=this._middlewares[t]||(this._middlewares[t]=[]);return i.push({stack:t,create:n,level:null==r?10:r,name:o}),i.sort((function(e,t){return e.level-t.level})),this}},{key:"unuse",value:function(e){var t=e.stack,n=e.name,r=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((function(e){return r?e.create!==r:!!n&&e.name!==n}))),this}},{key:"open",value:function(){return function(e){var t=function(){if(n.openCanceller!==i)throw new Zn.DatabaseClosed("db.open() was cancelled")},n=e._state,r=e._deps.indexedDB;if(n.isBeingOpened||e.idbdb)return n.dbReadyPromise.then((function(){return n.dbOpenError?Cr(n.dbOpenError):e}));Un&&(n.openCanceller._stackHolder=Fn()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;var o,i=n.openCanceller,a=n.dbReadyResolve,u=null,c=!1;return H.race([i,("undefined"==typeof navigator?H.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(e){var t=function(){return indexedDB.databases().finally(e)};o=setInterval(t,100),t()})).finally((function(){return clearInterval(o)})):Promise.resolve()).then((function(){return new H((function(o,i){if(t(),!r)throw new Zn.MissingAPI;var a=e.name,s=n.autoSchema?r.open(a):r.open(a,Math.round(10*e.verno));if(!s)throw new Zn.MissingAPI;s.onerror=Me(i),s.onblocked=ne(e._fireOnBlocked),s.onupgradeneeded=ne((function(t){if(u=s.transaction,n.autoSchema&&!e._options.allowEmptyDB){s.onerror=Ne,u.abort(),s.result.close();var o=r.deleteDatabase(a);o.onsuccess=o.onerror=ne((function(){i(new Zn.NoSuchDatabase("Database ".concat(a," doesnt exist")))}))}else{u.onerror=Me(i);var l=t.oldVersion>Math.pow(2,62)?0:t.oldVersion;c=l<1,e._novip.idbdb=s.result,function(e,t,n,r){var o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);var a=i._reject.bind(i),u=vr.transless||vr;re((function(){var r,c,s,l,f,p,d,h,v;vr.trans=i,vr.transless=u,0===t?(bn(o).forEach((function(e){Qe(n,e,o[e].primKey,o[e].indexes)})),We(e,n),H.follow((function(){return e.on.populate.fire(i)})).catch(a)):(r=e,c=t,s=i,l=n,f=r._novip,p=[],d=f._versions,h=f._dbSchema=Je(0,f.idbdb,l),v=!1,d.filter((function(e){return e._cfg.version>=c})).forEach((function(e){p.push((function(){var t=h,n=e._cfg.dbschema;Xe(f,t,l),Xe(f,n,l),h=f._dbSchema=n;var r=Ge(t,n);r.add.forEach((function(e){Qe(l,e[0],e[1].primKey,e[1].indexes)})),r.change.forEach((function(e){if(e.recreate)throw new Zn.Upgrade("Not yet support for changing primary key");var t=l.objectStore(e.name);e.add.forEach((function(e){return Ye(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),Ye(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var o=e._cfg.contentUpgrade;if(o&&e._cfg.version>c){We(f,l),s._memoizedTables={},v=!0;var i=O(n);r.del.forEach((function(e){i[e]=t[e]})),qe(f,[f.Transaction.prototype]),Ke(f,[f.Transaction.prototype],bn(i),i),s.schema=i;var a,u=Nn(o);u&&oe();var p=H.follow((function(){if((a=o(s))&&u){var e=ie.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?H.resolve(a):p.then((function(){return a}))}})),p.push((function(t){var n,r;v&&Rr||(n=e._cfg.dbschema,r=t,[].slice.call(r.db.objectStoreNames).forEach((function(e){return null==n[e]&&r.db.deleteObjectStore(e)}))),qe(f,[f.Transaction.prototype]),Ke(f,[f.Transaction.prototype],f._storeNames,f._dbSchema),s.schema=f._dbSchema}))})),function e(){return p.length?H.resolve(p.shift()(s.idbtrans)).then(e):H.resolve()}().then((function(){var e,t;t=l,bn(e=h).forEach((function(n){t.db.objectStoreNames.contains(n)||Qe(t,n,e[n].primKey,e[n].indexes)}))}))).catch(a)}))}(e,l/10,u,i)}}),i),s.onsuccess=ne((function(){u=null;var t,r,i,l,f,p,d,h,v=e._novip.idbdb=s.result,y=g(v.objectStoreNames);if(y.length>0)try{var m=v.transaction(1===(l=y).length?l[0]:l,"readonly");n.autoSchema?function(e,t,n){var r=e._novip;r.verno=t.version/10;var o=r._dbSchema=Je(0,t,n);r._storeNames=g(t.objectStoreNames,0),Ke(r,[r._allTables],bn(o),o)}(e,v,m):(Xe(e,e._dbSchema,m),r=m,!((i=Ge(Je(0,(t=e).idbdb,r),t._dbSchema)).add.length||i.change.some((function(e){return e.add.length||e.change.length})))||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),We(e,m)}catch(e){}Tr.push(e),v.onversionchange=ne((function(t){n.vcFired=!0,e.on("versionchange").fire(t)})),v.onclose=ne((function(t){e.on("close").fire(t)})),c&&(f=e._deps,p=a,d=f.indexedDB,h=f.IDBKeyRange,!tt(d)&&"__dbnames"!==p&&et(d,h).put({name:p}).catch(D)),o()}),i)}))}))]).then((function(){return t(),n.onReadyBeingFired=[],H.resolve(nt((function(){return e.on.ready.fire(e.vip)}))).then((function t(){if(n.onReadyBeingFired.length>0){var r=n.onReadyBeingFired.reduce(V,D);return n.onReadyBeingFired=[],H.resolve(nt((function(){return r(e.vip)}))).then(t)}}))})).finally((function(){n.onReadyBeingFired=null,n.isBeingOpened=!1})).then((function(){return e})).catch((function(t){n.dbOpenError=t;try{u&&u.abort()}catch(e){}return i===n.openCanceller&&e._close(),Cr(t)})).finally((function(){n.openComplete=!0,a()}))}(this)}},{key:"_close",value:function(){var e=this._state,t=Tr.indexOf(this);if(t>=0&&Tr.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new H((function(t){e.dbReadyResolve=t})),e.openCanceller=new H((function(t,n){e.cancelOpen=n}))}},{key:"close",value:function(){this._close();var e=this._state;this._options.autoOpen=!1,e.dbOpenError=new Zn.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}},{key:"delete",value:function(){var e=this,t=arguments.length>0,n=this._state;return new H((function(r,o){var i=e,a=function(){var e=i;i.close();var t=i._deps.indexedDB.deleteDatabase(i.name);t.onsuccess=ne((function(){var t,n,o,i;t=e._deps,n=e.name,o=t.indexedDB,i=t.IDBKeyRange,!tt(o)&&"__dbnames"!==n&&et(o,i).delete(n).catch(D),r()})),t.onerror=Me(o),t.onblocked=i._fireOnBlocked};if(t)throw new Zn.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(a):a()}))}},{key:"backendDB",value:function(){return this.idbdb}},{key:"isOpen",value:function(){return null!==this.idbdb}},{key:"hasBeenClosed",value:function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}},{key:"hasFailed",value:function(){return null!==this._state.dbOpenError}},{key:"dynamicallyOpened",value:function(){return this._state.autoSchema}},{key:"tables",get:function(){var e=this;return bn(this._allTables).map((function(t){return e._allTables[t]}))}},{key:"transaction",value:function(){var e=ot.apply(this,arguments);return this._transaction.apply(this,e)}},{key:"_transaction",value:function(e,t,n){var r=this,o=vr.trans;o&&o.db===this&&-1===e.indexOf("!")||(o=null);var i,a,u=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{var c=this;if(a=t.map((function(e){var t=l(e,c.Table)?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new Zn.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(o){if("readonly"===o.mode&&"readwrite"===i){if(!u)throw new Zn.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&a.forEach((function(e){if(o&&-1===o.storeNames.indexOf(e)){if(!u)throw new Zn.SubTransaction("Table "+e+" not included in parent transaction.");o=null}})),u&&o&&!o.active&&(o=null)}}catch(e){return o?o._promise(null,(function(t,n){n(e)})):Cr(e)}var s=Zr.bind(null,this,i,a,o,n);return o?o._promise(i,s,"lock"):vr.trans?fe(vr.transless,(function(){return r._whenReady(s)})):this._whenReady(s)}},{key:"table",value:function(e){if(!u(this._allTables,e))throw new Zn.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]}}]),e}(),oo="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",io=function(){function e(t){a(this,e),this._subscribe=t}return c(e,[{key:"subscribe",value:function(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}},{key:oo,value:function(){return this}}]),e}();try{to={indexedDB:gn.indexedDB||gn.mozIndexedDB||gn.webkitIndexedDB||gn.msIndexedDB,IDBKeyRange:gn.IDBKeyRange||gn.webkitIDBKeyRange}}catch(e){to={indexedDB:null,IDBKeyRange:null}}var ao=ro;h(ao,f({},Qn,{delete:function(e){return new ao(e,{addons:[]}).delete()},exists:function(e){return new ao(e,{addons:[]}).open().then((function(e){return e.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(e){try{return(t=ao.dependencies,n=t.indexedDB,r=t.IDBKeyRange,tt(n)?Promise.resolve(n.databases()).then((function(e){return e.map((function(e){return e.name})).filter((function(e){return"__dbnames"!==e}))})):et(n,r).toCollection().primaryKeys()).then(e)}catch(e){return Cr(new Zn.MissingAPI)}var t,n,r},defineClass:function(){return function(e){i(this,e)}},ignoreTransaction:function(e){return vr.trans?fe(vr.transless,e):e()},vip:nt,async:function(e){return function(){try{var t=rt(e.apply(this,arguments));return t&&"function"==typeof t.then?t:H.resolve(t)}catch(e){return Cr(e)}}},spawn:function(e,t,n){try{var r=rt(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:H.resolve(r)}catch(e){return Cr(e)}},currentTransaction:{get:function(){return vr.trans||null}},waitFor:function(e,t){var n=H.resolve("function"==typeof e?ao.ignoreTransaction(e):e).timeout(t||6e4);return vr.trans?vr.trans.waitFor(n):n},Promise:H,debug:{get:function(){return Un},set:function(e){$(e,"dexie"===e?function(){return!0}:Lr)}},derive:m,extend:i,props:h,override:b,Events:ge,on:Vr,liveQuery:function(e){return new io((function(t){var n=function(){return bn(a).some((function(e){return i[e]&&function(e,t){var n=st(t),r=n.next();if(r.done)return!1;for(var o=r.value,i=st(e),a=i.next(o.from),u=a.value;!r.done&&!a.done;){if(Ur(u.from,o.to)<=0&&Ur(u.to,o.from)>=0)return!0;Ur(o.from,u.from)<0?o=(r=n.next(u.from)).value:u=(a=i.next(o.from)).value}return!1}(i[e],a[e])}))},r=Nn(e),o=!1,i={},a={},u={get closed(){return o},unsubscribe:function(){o=!0,Vr.storagemutated.unsubscribe(l)}};t.start&&t.start(u);var c=!1,s=!1,l=function(e){pt(i,e),n()&&f()},f=function(){if(!c&&!o){i={};var p={},d=function(t){r&&oe();var n=function(){return re(e,{subscr:t,trans:null})},o=vr.trans?fe(vr.transless,n):n();return r&&o.then(ie,ie),o}(p);s||(Vr("storagemutated",l),s=!0),c=!0,Promise.resolve(d).then((function(e){c=!1,o||(n()?f():(i={},a=p,t.next&&t.next(e)))}),(function(e){c=!1,t.error&&t.error(e),u.unsubscribe()}))}};return f(),u}))},extendObservabilitySet:pt,getByKeyPath:jn,setByKeyPath:Cn,delByKeyPath:function(e,t){"string"==typeof t?Cn(e,t,void 0):"length"in t&&[].map.call(t,(function(t){Cn(e,t,void 0)}))},shallowClone:O,deepClone:k,getObjectDiff:Qr,cmp:Ur,asap:x,minKey:-1/0,addons:[],connections:Tr,errnames:Kn,dependencies:to,semVer:"3.2.1",version:"3.2.1".split(".").map((function(e){return parseInt(e)})).reduce((function(e,t,n){return e+t/Math.pow(10,2*n)}))})),ao.maxKey=Wr(ao.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Vr("storagemutated",(function(e){var t;uo||(Ir?(t=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,e):t=new CustomEvent("x-storagemutated-1",{detail:e}),uo=!0,dispatchEvent(t),uo=!1)})),addEventListener("x-storagemutated-1",(function(e){var t=e.detail;uo||dt(t)})));var uo=!1;if("undefined"!=typeof BroadcastChannel){var co=new BroadcastChannel("x-storagemutated-1");Vr("storagemutated",(function(e){uo||co.postMessage(e)})),co.onmessage=function(e){e.data&&dt(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){Vr("storagemutated",(function(e){try{uo||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&d(self.clients.matchAll({includeUncontrolled:!0})).forEach((function(t){return t.postMessage({type:"x-storagemutated-1",changedParts:e})})))}catch(e){}})),addEventListener("storage",(function(e){if("x-storagemutated-1"===e.key){var t=JSON.parse(e.newValue);t&&dt(t.changedParts)}}));var so=self.document&&navigator.serviceWorker;so&&so.addEventListener("message",(function(e){var t=e.data;t&&"x-storagemutated-1"===t.type&&dt(t.changedParts)}))}function lo(e){return(lo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function fo(e,t){return(fo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}H.rejectionMapper=function(e,t){if(!e||l(e,A)||l(e,TypeError)||l(e,SyntaxError)||!e.name||!Gn[e.name])return e;var n=new Gn[e.name](t||e.message,e);return"stack"in e&&y(n,"stack",{get:function(){return this.inner.stack}}),n},$(Un,Lr);var po=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":v(e)},ho=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fo(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=lo(t);if(n){var o=lo(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return ht(this,e)});function o(){var e;return function(e,t){if(!l(e,t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,"EsmOffline")).version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),e.syncQueue=e.table("syncQueue"),e.dynamicOfflineData=e.table("dynamicOfflineData"),e}return o}(ro),vo={};function yo(){return(yo=gt(hn().mark((function e(t){var n;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pt();case 2:return n=e.sent,e.next=5,St(n,t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mo(){return(mo=gt(hn().mark((function e(t,n){var r,o;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n?{type:n,users:t}:{users:t},o=new ho,e.next=4,o.dynamicOfflineData.where(r).toArray().catch(ro.errnames.DatabaseClosed,(function(){return[]}));case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function go(){return(go=gt(hn().mark((function e(t,n){var r;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pt();case 2:return r=e.sent,e.next=5,Et(r,t,n);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bo(){return(bo=gt(hn().mark((function e(t,n,r){var o,i;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new ho,e.next=3,o.dynamicOfflineData.get({type:n,identifier:r}).catch(ro.errnames.DatabaseClosed,(function(){}));case 3:if(i=e.sent){e.next=9;break}return e.next=7,o.dynamicOfflineData.add({users:[t],type:n,identifier:r}).catch(ro.errnames.DatabaseClosed);case 7:e.next=12;break;case 9:if(i.users.includes(t)){e.next=12;break}return e.next=12,o.dynamicOfflineData.update(i.id,{users:bt(i.users).concat([t])}).catch(ro.errnames.DatabaseClosed);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wo(){return(wo=gt(hn().mark((function e(t,n){var r;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pt();case 2:return r=e.sent,e.next=5,jt(r,t,n);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _o(){return(_o=gt(hn().mark((function e(t,n,r){var o,i;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new ho,e.next=3,o.dynamicOfflineData.get({type:n,identifier:r,users:t}).catch(ro.errnames.DatabaseClosed,(function(){}));case 3:if(!(i=e.sent)){e.next=12;break}if(!(i.users.length>1)){e.next=10;break}return e.next=8,o.dynamicOfflineData.update(i.id,{users:i.users.filter((function(e){return e!==t}))}).catch(ro.errnames.DatabaseClosed);case 8:e.next=12;break;case 10:return e.next=12,o.dynamicOfflineData.delete(i.id).catch(ro.errnames.DatabaseClosed);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xo(){return xo=gt(hn().mark((function e(t,n){var r;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,xt(t);case 2:return r=e.sent,e.next=5,Promise.all(r.map(function(){var e=gt(hn().mark((function e(t){return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",$t(t.type,t.identifier,n));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:case"end":return e.stop()}}),e)}))),xo.apply(this,arguments)}function So(){return So=gt(hn().mark((function e(t,n,r){var o,i,a,u,c,s,l,f,p;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ot(t,n);case 2:return o=new ho,e.next=5,Pt();case 5:return i=e.sent,e.next=8,o.dynamicOfflineData.get({type:t,identifier:n}).catch(ro.errnames.DatabaseClosed,(function(){}));case 8:if(a=e.sent,u=wt().filter((function(e){return e.type===t})),a){e.next=12;break}return e.abrupt("return");case 12:return e.next=14,Promise.all(u.map(function(){var e=gt(hn().mark((function e(t){var o,i,a;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.sync(n,r),e.abrupt("return",{id:t.id,error:void 0});case 5:return e.prev=5,e.t0=e.catch(0),a=null!==(i=null===(o=e.t0.message)||void 0===o?void 0:o.toString())&&void 0!==i?i:e.t0.toString(),e.abrupt("return",{id:t.id,error:a});case 11:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}()));case 14:if(c=e.sent,s=c.filter((function(e){return!e.error})).map((function(e){return e.id})),l=c.filter((function(e){return e.error})).map((function(e){return e.id})),f=c.filter((function(e){return e.error})).map((function(e){return{handlerId:e.id,message:e.error}})),p={syncedOn:new Date,syncedBy:i,succeededHandlers:s,erroredHandlers:l,errors:f},!a.id){e.next=22;break}return e.next=22,o.dynamicOfflineData.update(a.id,{syncState:p}).catch(ro.errnames.DatabaseClosed);case 22:case"end":return e.stop()}}),e)}))),So.apply(this,arguments)}function Oo(){return(Oo=gt(hn().mark((function e(){var t;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,mn.getLoggedInUser)();case 2:if(t=e.sent.uuid){e.next=5;break}throw new Error("Using the dynamic offline data API requires a logged in user.");case 5:return e.abrupt("return",t);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Eo=(0,yn.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function ko(){return(ko=Tt(hn().mark((function e(t){return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Lt(),e.next=3,$t("patient",t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}try{self["workbox:window:6.5.1"]&&_()}catch(e){}try{self["workbox:core:6.5.1"]&&_()}catch(e){}var jo,Co,$o=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))},Po=function(e,t){this.type=e,Object.assign(this,t)},Ao={type:"SKIP_WAITING"};function To(){return(To=Wt(hn().mark((function e(t){var n;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Vt();case 2:if(!(n=e.sent)){e.next=9;break}return e.next=6,n.messageSW(t);case 6:e.t0=e.sent,e.next=10;break;case 9:e.t0={success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."};case 10:return e.abrupt("return",e.t0);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(e){var t,n,r=function(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new $o,r.en=new $o,r.on=new $o,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!Ut(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener("updatefound",r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener("statechange",r.ln)},r.ln=function(e){var t=r.fn,n=e.target,o=n.state,i=n===r.vn,a={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new Po(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new Po("waiting",a))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(e){var t=r.hn,n=t!==navigator.serviceWorker.controller;r.dispatchEvent(new Po("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},r.gn=(o=function(e){var t=e.data,n=e.ports,o=e.source;return Bt(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new Po("message",{data:t,originalEvent:e,ports:n,sw:o}))}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=t,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r};n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o,i=r.prototype;i.register=function(e){var t,n,r=(void 0===e?{}:e).immediate,o=void 0!==r&&r;try{var i=this;return t=function(){return i.mn=Boolean(navigator.serviceWorker.controller),i.yn=i.pn(),Bt(i.bn(),(function(e){i.fn=e,i.yn&&(i.hn=i.yn,i.en.resolve(i.yn),i.on.resolve(i.yn),i.yn.addEventListener("statechange",i.ln,{once:!0}));var t=i.fn.waiting;return t&&Ut(t.scriptURL,i.sn.toString())&&(i.hn=t,Promise.resolve().then((function(){i.dispatchEvent(new Po("waiting",{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),i.hn&&(i.rn.resolve(i.hn),i.an.add(i.hn)),i.fn.addEventListener("updatefound",i.cn),navigator.serviceWorker.addEventListener("controllerchange",i.dn),i.fn}))},(n=function(){if(!o&&"complete"!==document.readyState)return Ft(new Promise((function(e){return window.addEventListener("load",e)})))}())&&n.then?n.then(t):t()}catch(e){return Promise.reject(e)}},i.update=function(){try{return this.fn?Ft(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},i.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},i.messageSW=function(e){try{return Bt(this.getSW(),(function(t){return Mt(t,e)}))}catch(e){return Promise.reject(e)}},i.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&Mt(this.fn.waiting,Ao)},i.pn=function(){var e=navigator.serviceWorker.controller;return e&&Ut(e.scriptURL,this.sn.toString())?e:void 0},i.bn=function(){try{var e=this;return function(t,n){try{var r=Bt(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}catch(e){return n(e)}return r&&r.then?r.then(void 0,n):r}(0,(function(e){throw e}))}catch(e){return Promise.reject(e)}},(o=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,o)}((jo=function(){this.Pn=new Map},Co=jo.prototype,Co.addEventListener=function(e,t){this.Sn(e).add(t)},Co.removeEventListener=function(e,t){this.Sn(e).delete(t)},Co.dispatchEvent=function(e){e.target=this;for(var t,n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Nt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nt(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},Co.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},jo));for(var Io,Ro="x-omrs-offline-response-body",Do="x-omrs-offline-response-status",Lo="x-omrs-offline-caching-strategy",Mo=new Uint8Array(16),No=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Uo=function(e){return"string"==typeof e&&No.test(e)},Bo=[],zo=0;zo<256;++zo)Bo.push((zo+256).toString(16).substr(1));var Fo=function(e,t,n){var r=(e=e||{}).random||(e.rng||qt)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Bo[e[t+0]]+Bo[e[t+1]]+Bo[e[t+2]]+Bo[e[t+3]]+"-"+Bo[e[t+4]]+Bo[e[t+5]]+"-"+Bo[e[t+6]]+Bo[e[t+7]]+"-"+Bo[e[t+8]]+Bo[e[t+9]]+"-"+Bo[e[t+10]]+Bo[e[t+11]]+Bo[e[t+12]]+Bo[e[t+13]]+Bo[e[t+14]]+Bo[e[t+15]]).toLowerCase();if(!Uo(n))throw TypeError("Stringified UUID is invalid");return n}(r)},Vo="OFFLINE+",Ho=new ho,Wo={};function Ko(){return(Ko=Yt(hn().mark((function e(){var t;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,mn.getLoggedInUser)();case 2:return t=e.sent,e.abrupt("return",(null==t?void 0:t.uuid)||"*");case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qo(){return(qo=Yt(hn().mark((function e(t,n,r,o){var i,a;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===(i=o&&o.id)){e.next=4;break}return e.next=4,Ho.syncQueue.where({type:n,userId:t}).filter((function(e){return(null==e?void 0:e.descriptor.id)===i})).delete().catch(ro.errnames.DatabaseClosed);case 4:return e.next=6,Ho.syncQueue.add({type:n,content:r,userId:t,descriptor:o||{},createdOn:new Date}).catch(ro.errnames.DatabaseClosed,(function(){return-1}));case 6:return a=e.sent,e.abrupt("return",a);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Zo(){return(Zo=Yt(hn().mark((function e(t,n,r){var o;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jt();case 2:return o=e.sent,e.next=5,Xt(o,t,n,r);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Go(){return(Go=Yt(hn().mark((function e(t,n){var r;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,nn(t,n);case 2:return r=e.sent,e.abrupt("return",r.map((function(e){return e.content})));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Qo(){return(Qo=Yt(hn().mark((function e(t,n){var r;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n?{type:n,userId:t}:{userId:t},e.next=3,Ho.syncQueue.where(r).toArray().catch(ro.errnames.DatabaseClosed,(function(){return[]}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Yo(){return(Yo=Yt(hn().mark((function e(t){var n;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jt();case 2:return n=e.sent,e.next=5,tn(n,t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Jo(){return(Jo=Yt(hn().mark((function e(t){var n;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jt();case 2:return n=e.sent,e.next=5,nn(n,t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Xo(){return(Xo=Yt(hn().mark((function e(t){return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ho.syncQueue.get(t).catch(ro.errnames.DatabaseClosed,(function(){}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ei(){return(ei=Yt(hn().mark((function e(t){var n,r,o;return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,an(t);case 3:if(r=e.sent){e.next=6;break}throw new Error("No sync item with the ID ".concat(t," exists."));case 6:if(o=null===(n=Wo[r.type])||void 0===n?void 0:n.options.onBeginEditSyncItem){e.next=9;break}throw new Error("A sync item with the ID ".concat(t,' exists, but the associated handler (if one exists) doesn\'t support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "').concat(r.type,'" supports editing items.'));case 9:o(r);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ti(){return(ti=Yt(hn().mark((function e(t){return hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ho.syncQueue.delete(t).catch(ro.errnames.DatabaseClosed);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,yn.createGlobalStore)("offline-synchronization",{})},4077:function(e,t,n){var r=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):l(e,t)};e=n.nmd(e);var o=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":v(e)};System.register(["react","@openmrs/esm-config","@openmrs/esm-extensions","@openmrs/esm-globals","react-dom","i18next","react-i18next","@openmrs/esm-api","dayjs"],(function(i,a){var u={},c={},s={},l={},f={},p={},d={},h={},v={};return{setters:[function(e){u.createContext=e.createContext,u.createElement=e.createElement,u.default=e.default,u.useCallback=e.useCallback,u.useContext=e.useContext,u.useDebugValue=e.useDebugValue,u.useEffect=e.useEffect,u.useLayoutEffect=e.useLayoutEffect,u.useMemo=e.useMemo,u.useReducer=e.useReducer,u.useRef=e.useRef,u.useState=e.useState},function(e){c.getConfigStore=e.getConfigStore,c.getExtensionConfigFromStore=e.getExtensionConfigFromStore,c.getExtensionsConfigStore=e.getExtensionsConfigStore,c.interpolateUrl=e.interpolateUrl,c.navigate=e.navigate},function(e){s.getConnectedExtensions=e.getConnectedExtensions,s.getExtensionInternalStore=e.getExtensionInternalStore,s.getExtensionStore=e.getExtensionStore,s.registerExtensionSlot=e.registerExtensionSlot,s.renderExtension=e.renderExtension},function(e){l.subscribeConnectivityChanged=e.subscribeConnectivityChanged},function(e){f.default=e.default},function(e){p.default=e.default},function(e){d.I18nextProvider=e.I18nextProvider},function(e){h.defaultVisitCustomRepresentation=e.defaultVisitCustomRepresentation,h.fetchCurrentPatient=e.fetchCurrentPatient,h.getCurrentUser=e.getCurrentUser,h.getLocations=e.getLocations,h.getSessionStore=e.getSessionStore,h.getVisitTypes=e.getVisitTypes,h.openmrsFetch=e.openmrsFetch,h.userHasAccess=e.userHasAccess},function(e){v.default=e.default}],execute:function(){i(function(){var i={332:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},891:function(e,t,n){var i;e=n.nmd(e),function(){var a,u=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},c=function(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r},s=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},l=function(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e},f=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0},p=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i},d=function(e,t){return!(null==e||!e.length)&&x(e,t,0)>-1},h=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},v=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},y=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},m=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n},g=function(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n},b=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},w=function(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r},_=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1},x=function(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):_(e,O,n)},S=function(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1},O=function(e){return e!=e},E=function(e,t){var n=null==e?0:e.length;return n?$(e,t)/n:ee},k=function(e){return function(t){return null==t?a:t[e]}},j=function(e){return function(t){return null==e?a:e[t]}},C=function(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n},$=function(e,t){for(var n,r=-1,o=e.length;++r<o;){var i=t(e[r]);i!==a&&(n=n===a?i:n+i)}return n},P=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},A=function(e){return e?e.slice(0,K(e)+1).replace(We,""):e},T=function(e){return function(t){return e(t)}},I=function(e,t){return v(t,(function(t){return e[t]}))},R=function(e,t){return e.has(t)},D=function(e,t){for(var n=-1,r=e.length;++n<r&&x(t,e[n],0)>-1;);return n},L=function(e,t){for(var n=e.length;n--&&x(t,e[n],0)>-1;);return n},M=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r},N=function(e){return"\\"+Ft[e]},U=function(e){return Lt.test(e)},B=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},z=function(e,t){return function(n){return e(t(n))}},F=function(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==G||(e[n]=G,i[o++]=n)}return i},V=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},H=function(e){return U(e)?function(e){for(var t=Rt.lastIndex=0;Rt.test(e);)++t;return t}(e):an(e)},W=function(e){return U(e)?e.match(Rt)||[]:e.split("")},K=function(e){for(var t=e.length;t--&&Ke.test(e.charAt(t)););return t},q="Expected a function",Z="__lodash_hash_undefined__",G="__lodash_placeholder__",Q=32,Y=128,J=1/0,X=9007199254740991,ee=NaN,te=4294967295,ne=[["ary",Y],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",Q],["partialRight",64],["rearg",256]],re="[object Arguments]",oe="[object Array]",ie="[object Boolean]",ae="[object Date]",ue="[object Error]",ce="[object Function]",se="[object GeneratorFunction]",le="[object Map]",fe="[object Number]",pe="[object Object]",de="[object Promise]",he="[object RegExp]",ve="[object Set]",ye="[object String]",me="[object Symbol]",ge="[object WeakMap]",be="[object ArrayBuffer]",we="[object DataView]",_e="[object Float32Array]",xe="[object Float64Array]",Se="[object Int8Array]",Oe="[object Int16Array]",Ee="[object Int32Array]",ke="[object Uint8Array]",je="[object Uint8ClampedArray]",Ce="[object Uint16Array]",$e="[object Uint32Array]",Pe=/\b__p \+= '';/g,Ae=/\b(__p \+=) '' \+/g,Te=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ie=/&(?:amp|lt|gt|quot|#39);/g,Re=/[&<>"']/g,De=RegExp(Ie.source),Le=RegExp(Re.source),Me=/<%-([\s\S]+?)%>/g,Ne=/<%([\s\S]+?)%>/g,Ue=/<%=([\s\S]+?)%>/g,Be=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ze=/^\w*$/,Fe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ve=/[\\^$.*+?()[\]{}|]/g,He=RegExp(Ve.source),We=/^\s+/,Ke=/\s/,qe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ze=/\{\n\/\* \[wrapped with (.+)\] \*/,Ge=/,? & /,Qe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ye=/[()=,{}\[\]\/\s]/,Je=/\\(\\)?/g,Xe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,et=/\w*$/,tt=/^[-+]0x[0-9a-f]+$/i,nt=/^0b[01]+$/i,rt=/^\[object .+?Constructor\]$/,ot=/^0o[0-7]+$/i,it=/^(?:0|[1-9]\d*)$/,at=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ut=/($^)/,ct=/['\n\r\u2028\u2029\\]/g,st="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",lt="a-z\\xdf-\\xf6\\xf8-\\xff",ft="A-Z\\xc0-\\xd6\\xd8-\\xde",pt="\\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",dt="["+pt+"]",ht="["+st+"]",vt="\\d+",yt="["+lt+"]",mt="[^\ud800-\udfff"+pt+vt+"\\u2700-\\u27bf"+lt+ft+"]",gt="\ud83c[\udffb-\udfff]",bt="[^\ud800-\udfff]",wt="(?:\ud83c[\udde6-\uddff]){2}",_t="[\ud800-\udbff][\udc00-\udfff]",xt="["+ft+"]",St="(?:"+yt+"|"+mt+")",Ot="(?:"+xt+"|"+mt+")",Et="(?:['’](?:d|ll|m|re|s|t|ve))?",kt="(?:['’](?:D|LL|M|RE|S|T|VE))?",jt="(?:"+ht+"|"+gt+")?",Ct="[\\ufe0e\\ufe0f]?",$t=Ct+jt+"(?:\\u200d(?:"+[bt,wt,_t].join("|")+")"+Ct+jt+")*",Pt="(?:"+["[\\u2700-\\u27bf]",wt,_t].join("|")+")"+$t,At="(?:"+[bt+ht+"?",ht,wt,_t,"[\ud800-\udfff]"].join("|")+")",Tt=RegExp("['’]","g"),It=RegExp(ht,"g"),Rt=RegExp(gt+"(?="+gt+")|"+At+$t,"g"),Dt=RegExp([xt+"?"+yt+"+"+Et+"(?="+[dt,xt,"$"].join("|")+")",Ot+"+"+kt+"(?="+[dt,xt+St,"$"].join("|")+")",xt+"?"+St+"+"+Et,xt+"+"+kt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vt,Pt].join("|"),"g"),Lt=RegExp("[\\u200d\ud800-\udfff"+st+"\\ufe0e\\ufe0f]"),Mt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ut=-1,Bt={};Bt[_e]=Bt[xe]=Bt[Se]=Bt[Oe]=Bt[Ee]=Bt[ke]=Bt[je]=Bt[Ce]=Bt[$e]=!0,Bt[re]=Bt[oe]=Bt[be]=Bt[ie]=Bt[we]=Bt[ae]=Bt[ue]=Bt[ce]=Bt[le]=Bt[fe]=Bt[pe]=Bt[he]=Bt[ve]=Bt[ye]=Bt[ge]=!1;var zt={};zt[re]=zt[oe]=zt[be]=zt[we]=zt[ie]=zt[ae]=zt[_e]=zt[xe]=zt[Se]=zt[Oe]=zt[Ee]=zt[le]=zt[fe]=zt[pe]=zt[he]=zt[ve]=zt[ye]=zt[me]=zt[ke]=zt[je]=zt[Ce]=zt[$e]=!0,zt[ue]=zt[ce]=zt[ge]=!1;var Ft={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vt=parseFloat,Ht=parseInt,Wt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Kt="object"==typeof self&&self&&self.Object===Object&&self,qt=Wt||Kt||Function("return this")(),Zt=t&&!t.nodeType&&t,Gt=Zt&&e&&!e.nodeType&&e,Qt=Gt&&Gt.exports===Zt,Yt=Qt&&Wt.process,Jt=function(){try{return Gt&&Gt.require&&Gt.require("util").types||Yt&&Yt.binding&&Yt.binding("util")}catch(e){}}(),Xt=Jt&&Jt.isArrayBuffer,en=Jt&&Jt.isDate,tn=Jt&&Jt.isMap,nn=Jt&&Jt.isRegExp,rn=Jt&&Jt.isSet,on=Jt&&Jt.isTypedArray,an=k("length"),un=j({À:"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"}),cn=j({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),sn=j({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),ln=function e(t){var n,i,j=function(e){if(Po(e)&&!Pu(e)&&!r(e,lt)){if(r(e,st))return e;if(bi.call(e,"__wrapped__"))return no(e)}return new st(e)},Ke=function(){},st=function(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=a},lt=function(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]},ft=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},pt=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},dt=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},ht=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new dt;++t<n;)this.add(e[t])},vt=function(e){var t=this.__data__=new pt(e);this.size=t.size},yt=function(e,t){var n=Pu(e),r=!n&&$u(e),o=!n&&!r&&Tu(e),i=!n&&!r&&!o&&Mu(e),a=n||r||o||i,u=a?P(e.length,pi):[],c=u.length;for(var s in e)!t&&!bi.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Br(s,c))||u.push(s);return u},mt=function(e){var t=e.length;return t?e[Cn(0,t-1)]:a},gt=function(e,t){return Xr(or(e),jt(t,0,e.length))},bt=function(e){return Xr(or(e))},wt=function(e,t,n){(n!==a&&!xo(e[t],n)||n===a&&!(t in e))&&Et(e,t,n)},_t=function(e,t,n){var r=e[t];bi.call(e,t)&&xo(r,n)&&(n!==a||t in e)||Et(e,t,n)},xt=function(e,t){for(var n=e.length;n--;)if(xo(e[n][0],t))return n;return-1},St=function(e,t,n,r){return ga(e,(function(e,o,i){t(r,e,n(e),i)})),r},Ot=function(e,t){return e&&ir(t,Ho(t),e)},Et=function(e,t,n){"__proto__"==t&&Mi?Mi(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},kt=function(e,t){for(var n=-1,r=t.length,o=ii(r),i=null==e;++n<r;)o[n]=i?a:Fo(e,t[n]);return o},jt=function(e,t,n){return e==e&&(n!==a&&(e=e<=n?e:n),t!==a&&(e=e>=t?e:t)),e},Ct=function(e,t,n){var r=n.length;if(null==e)return!r;for(e=li(e);r--;){var o=n[r],i=t[o],u=e[o];if(u===a&&!(o in e)||!i(u))return!1}return!0},$t=function(e,t,n){if("function"!=typeof e)throw new di(q);return za((function(){e.apply(a,n)}),t)},Pt=function(e,t,n,r){var o=-1,i=d,a=!0,u=e.length,c=[],s=t.length;if(!u)return c;n&&(t=v(t,T(n))),r?(i=h,a=!1):t.length>=200&&(i=R,a=!1,t=new ht(t));e:for(;++o<u;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=s;p--;)if(t[p]===f)continue e;c.push(l)}else i(t,f,r)||c.push(l)}return c},At=function(e,t){var n=!0;return ga(e,(function(e,r,o){return n=!!t(e,r,o)})),n},Rt=function(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],u=t(i);if(null!=u&&(c===a?u==u&&!Ro(u):n(u,c)))var c=u,s=i}return s},Lt=function(e,t){var n=[];return ga(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n},Ft=function(e,t){return e&&_a(e,t,Ho)},Wt=function(e,t){return e&&xa(e,t,Ho)},Kt=function(e,t){return p(t,(function(t){return ko(e[t])}))},Zt=function(e,t){for(var n=0,r=(t=Qn(t,e)).length;null!=e&&n<r;)e=e[eo(t[n++])];return n&&n==r?e:a},Gt=function(e,t,n){var r=t(e);return Pu(e)?r:y(r,n(e))},Yt=function(e){return null==e?e===a?"[object Undefined]":"[object Null]":Li&&Li in li(e)?function(e){var t=bi.call(e,Li),n=e[Li];try{e[Li]=a;var r=!0}catch(e){}var o=xi.call(e);return r&&(t?e[Li]=n:delete e[Li]),o}(e):(t=e,xi.call(t));var t},Jt=function(e,t){return e>t},an=function(e,t){return null!=e&&bi.call(e,t)},fn=function(e,t){return null!=e&&t in li(e)},pn=function(e,t,n){for(var r=n?h:d,o=e[0].length,i=e.length,u=i,c=ii(i),s=1/0,l=[];u--;){var f=e[u];u&&t&&(f=v(f,T(t))),s=Gi(f.length,s),c[u]=!n&&(t||o>=120&&f.length>=120)?new ht(u&&f):a}f=e[0];var p=-1,y=c[0];e:for(;++p<o&&l.length<s;){var m=f[p],g=t?t(m):m;if(m=n||0!==m?m:0,!(y?R(y,g):r(l,g,n))){for(u=i;--u;){var b=c[u];if(!(b?R(b,g):r(e[u],g,n)))continue e}y&&y.push(g),l.push(m)}}return l},dn=function(e,t,n){var r=null==(e=Zr(e,t=Qn(t,e)))?e:e[eo(uo(t))];return null==r?a:u(r,e,n)},hn=function(e){return Po(e)&&Yt(e)==re},vn=function(e,t,n,r){var o=n.length,i=o,u=!r;if(null==e)return!i;for(e=li(e);o--;){var c=n[o];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++o<i;){var s=(c=n[o])[0],l=e[s],f=c[1];if(u&&c[2]){if(l===a&&!(s in e))return!1}else{var p=new vt;if(r)var d=r(l,f,s,e,t,p);if(!(d===a?Sa(f,l,3,r,p):d))return!1}}return!0},yn=function(e){return!(!$o(e)||(t=e,_i&&_i in t))&&(ko(e)?Ei:rt).test(to(e));var t},mn=function(e){return"function"==typeof e?e:null==e?Jo:"object"==typeof e?Pu(e)?xn(e[0],e[1]):_n(e):ni(e)},gn=function(e){if(!Hr(e))return qi(e);var t=[];for(var n in li(e))bi.call(e,n)&&"constructor"!=n&&t.push(n);return t},bn=function(e,t){return e<t},wn=function(e,t){var n=-1,r=So(e)?ii(e.length):[];return ga(e,(function(e,o,i){r[++n]=t(e,o,i)})),r},_n=function(e){var t=Dr(e);return 1==t.length&&t[0][2]?Kr(t[0][0],t[0][1]):function(n){return n===e||vn(n,e,t)}},xn=function(e,t){return Fr(e)&&Wr(t)?Kr(eo(e),t):function(n){var r=Fo(n,e);return r===a&&r===t?Vo(n,e):Sa(t,r,3)}},Sn=function(e,t){var n=e.length;if(n)return Br(t+=t<0?n:0,n)?e[t]:a},On=function(e,t,n){t=t.length?v(t,(function(e){return Pu(e)?function(t){return Zt(t,1===e.length?e[0]:e)}:e})):[Jo];var r=-1;return t=v(t,T(Ir())),function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,u=n.length;++r<a;){var c=tr(o[r],i[r]);if(c)return r>=u?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(wn(e,(function(e,n,o){return{criteria:v(t,(function(t){return t(e)})),index:++r,value:e}})))},En=function(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],u=Zt(e,a);n(u,a)&&In(i,Qn(a,e),u)}return i},kn=function(e,t,n,r){var o=r?S:x,i=-1,a=t.length,u=e;for(e===t&&(t=or(t)),n&&(u=v(e,T(n)));++i<a;)for(var c=0,s=t[i],l=n?n(s):s;(c=o(u,l,c,r))>-1;)u!==e&&Ii.call(u,c,1),Ii.call(e,c,1);return e},jn=function(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;Br(o)?Ii.call(e,o,1):Fn(e,o)}}return e},Cn=function(e,t){return e+Fi(Ji()*(t-e+1))},$n=function(e,t){var n="";if(!e||t<1||t>X)return n;do{t%2&&(n+=e),(t=Fi(t/2))&&(e+=e)}while(t);return n},Pn=function(e,t){return Fa(qr(e,t,Jo),e+"")},An=function(e){return mt(qo(e))},Tn=function(e,t){var n=qo(e);return Xr(n,jt(t,0,n.length))},In=function(e,t,n,r){if(!$o(e))return e;for(var o=-1,i=(t=Qn(t,e)).length,u=i-1,c=e;null!=c&&++o<i;){var s=eo(t[o]),l=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(o!=u){var f=c[s];(l=r?r(f,s,c):a)===a&&(l=$o(f)?f:Br(t[o+1])?[]:{})}_t(c,s,l),c=c[s]}return e},Rn=function(e){return Xr(qo(e))},Dn=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=ii(o);++r<o;)i[r]=e[r+t];return i},Ln=function(e,t){var n;return ga(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n},Mn=function(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!Ro(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return Nn(e,t,Jo,n)},Nn=function(e,t,n,r){var o=0,i=null==e?0:e.length;if(0===i)return 0;for(var u=(t=n(t))!=t,c=null===t,s=Ro(t),l=t===a;o<i;){var f=Fi((o+i)/2),p=n(e[f]),d=p!==a,h=null===p,v=p==p,y=Ro(p);if(u)var m=r||v;else m=l?v&&(r||d):c?v&&d&&(r||!h):s?v&&d&&!h&&(r||!y):!h&&!y&&(r?p<=t:p<t);m?o=f+1:i=f}return Gi(i,4294967294)},Un=function(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],u=t?t(a):a;if(!n||!xo(u,c)){var c=u;i[o++]=0===a?0:a}}return i},Bn=function(e){return"number"==typeof e?e:Ro(e)?ee:+e},zn=function(e,t,n){var r=-1,o=d,i=e.length,a=!0,u=[],c=u;if(n)a=!1,o=h;else if(i>=200){var s=t?null:Aa(e);if(s)return V(s);a=!1,o=R,c=new ht}else c=t?[]:u;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=c.length;p--;)if(c[p]===f)continue e;t&&c.push(f),u.push(l)}else o(c,f,n)||(c!==u&&c.push(f),u.push(l))}return u},Fn=function(e,t){return null==(e=Zr(e,t=Qn(t,e)))||delete e[eo(uo(t))]},Vn=function(e,t,n,r){return In(e,t,n(Zt(e,t)),r)},Hn=function(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?Dn(e,r?0:i,r?i+1:o):Dn(e,r?i+1:0,r?o:i)},Wn=function(e,t){var n=e;return r(n,lt)&&(n=n.value()),m(t,(function(e,t){return t.func.apply(t.thisArg,y([e],t.args))}),n)},Kn=function(e,t,n){var r=e.length;if(r<2)return r?zn(e[0]):[];for(var o=-1,i=ii(r);++o<r;)for(var a=e[o],u=-1;++u<r;)u!=o&&(i[o]=Pt(i[o]||a,e[u],t,n));return zn(wa(i,1),t,n)},qn=function(e,t,n){for(var r=-1,o=e.length,i=t.length,u={};++r<o;){var c=r<i?t[r]:a;n(u,e[r],c)}return u},Zn=function(e){return Oo(e)?e:[]},Gn=function(e){return"function"==typeof e?e:Jo},Qn=function(e,t){return Pu(e)?e:Fr(e,t)?[e]:Va(zo(e))},Yn=function(e,t,n){var r=e.length;return n=n===a?r:n,!t&&n>=r?e:Dn(e,t,n)},Jn=function(e,t){if(t)return e.slice();var n=e.length,r=$i?$i(n):new e.constructor(n);return e.copy(r),r},Xn=function(e){var t=new e.constructor(e.byteLength);return new Ci(t).set(new Ci(e)),t},er=function(e,t){var n=t?Xn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},tr=function(e,t){if(e!==t){var n=e!==a,r=null===e,o=e==e,i=Ro(e),u=t!==a,c=null===t,s=t==t,l=Ro(t);if(!c&&!l&&!i&&e>t||i&&u&&s&&!c&&!l||r&&u&&s||!n&&s||!o)return 1;if(!r&&!i&&!l&&e<t||l&&n&&o&&!r&&!i||c&&n&&o||!u&&o||!s)return-1}return 0},nr=function(e,t,n,r){for(var o=-1,i=e.length,a=n.length,u=-1,c=t.length,s=Zi(i-a,0),l=ii(c+s),f=!r;++u<c;)l[u]=t[u];for(;++o<a;)(f||o<i)&&(l[n[o]]=e[o]);for(;s--;)l[u++]=e[o++];return l},rr=function(e,t,n,r){for(var o=-1,i=e.length,a=-1,u=n.length,c=-1,s=t.length,l=Zi(i-u,0),f=ii(l+s),p=!r;++o<l;)f[o]=e[o];for(var d=o;++c<s;)f[d+c]=t[c];for(;++a<u;)(p||o<i)&&(f[d+n[a]]=e[o++]);return f},or=function(e,t){var n=-1,r=e.length;for(t||(t=ii(r));++n<r;)t[n]=e[n];return t},ir=function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,u=t.length;++i<u;){var c=t[i],s=r?r(n[c],e[c],c,n,e):a;s===a&&(s=e[c]),o?Et(n,c,s):_t(n,c,s)}return n},ar=function(e,t){return function(n,r){var o=Pu(n)?c:St,i=t?t():{};return o(n,e,Ir(r,2),i)}},ur=function(e){return Pn((function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:a,u=o>2?n[2]:a;for(i=e.length>3&&"function"==typeof i?(o--,i):a,u&&zr(n[0],n[1],u)&&(i=o<3?a:i,o=1),t=li(t);++r<o;){var c=n[r];c&&e(t,c,r,i)}return t}))},cr=function(e,t){return function(n,r){if(null==n)return n;if(!So(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=li(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}},sr=function(e){return function(t,n,r){for(var o=-1,i=li(t),a=r(t),u=a.length;u--;){var c=a[e?u:++o];if(!1===n(i[c],c,i))break}return t}},lr=function(e){return function(t){var n=U(t=zo(t))?W(t):a,r=n?n[0]:t.charAt(0),o=n?Yn(n,1).join(""):t.slice(1);return r[e]()+o}},fr=function(e){return function(t){return m(Qo(Go(t).replace(Tt,"")),e,"")}},pr=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=ya(e.prototype),r=e.apply(n,t);return $o(r)?r:n}},dr=function(e){return function(t,n,r){var o=li(t);if(!So(t)){var i=Ir(n,3);t=Ho(t),n=function(e){return i(o[e],e,o)}}var u=e(t,n,r);return u>-1?o[i?t[u]:u]:a}},hr=function(e){return Cr((function(t){var n=t.length,r=n,o=st.prototype.thru;for(e&&t.reverse();r--;){var i=t[r];if("function"!=typeof i)throw new di(q);if(o&&!u&&"wrapper"==Ar(i))var u=new st([],!0)}for(r=u?r:n;++r<n;){var c=Ar(i=t[r]),s="wrapper"==c?Ia(i):a;u=s&&Vr(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?u[Ar(s[0])].apply(u,s[3]):1==i.length&&Vr(i)?u[c]():u.thru(i)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Pu(r))return u.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))},vr=function(e,t){return function(n,r){return o=n,i=e,a=t(r),u={},Ft(o,(function(e,t,n){i(u,a(e),t,n)})),u;var o,i,a,u}},yr=function(e,t){return function(n,r){var o;if(n===a&&r===a)return t;if(n!==a&&(o=n),r!==a){if(o===a)return r;"string"==typeof n||"string"==typeof r?(n=ja(n),r=ja(r)):(n=Bn(n),r=Bn(r)),o=e(n,r)}return o}},mr=function(e){return Cr((function(t){return t=v(t,T(Ir())),Pn((function(n){var r=this;return e(t,(function(e){return u(e,r,n)}))}))}))},gr=function(e,t){var n=(t=t===a?" ":ja(t)).length;if(n<2)return n?$n(t,e):t;var r=$n(t,zi(e/H(t)));return U(t)?Yn(W(r),0,e).join(""):r.slice(0,e)},br=function(e){return function(t,n,r){return r&&"number"!=typeof r&&zr(t,n,r)&&(n=r=a),t=Lo(t),n===a?(n=t,t=0):n=Lo(n),function(e,t,n,r){for(var o=-1,i=Zi(zi((t-e)/(n||1)),0),a=ii(i);i--;)a[r?i:++o]=e,e+=n;return a}(t,n,r=r===a?t<n?1:-1:Lo(r),e)}},wr=function(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Uo(t),n=Uo(n)),e(t,n)}},_r=function(e,t,n,r,o,i,u,c,s,l){var f=8&t;t|=f?Q:64,4&(t&=~(f?64:Q))||(t&=-4);var p=[e,t,o,f?i:a,f?u:a,f?a:i,f?a:u,c,s,l],d=n.apply(a,p);return Vr(e)&&Ba(d,p),d.placeholder=r,Yr(d,e,t)},xr=function(e){var t=si[e];return function(e,n){if(e=Uo(e),(n=null==n?0:Gi(Mo(n),292))&&Wi(e)){var r=(zo(e)+"e").split("e");return+((r=(zo(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}},Sr=function(e){return function(t){var n,r,o,i,a,u=La(t);return u==le?B(t):u==ve?(o=t,i=-1,a=Array(o.size),o.forEach((function(e){a[++i]=[e,e]})),a):(n=t,r=e(t),v(r,(function(e){return[e,n[e]]})))}},Or=function(e,t,n,o,i,c,s,l){var f=2&t;if(!f&&"function"!=typeof e)throw new di(q);var p=o?o.length:0;if(p||(t&=-97,o=i=a),s=s===a?s:Zi(Mo(s),0),l=l===a?l:Mo(l),p-=i?i.length:0,64&t){var d=o,h=i;o=i=a}var v,y,m,g,b,w,_,x,S=f?a:Ia(e),O=[e,t,n,o,i,d,h,c,s,l];if(S&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==Y&&8==n||r==Y&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?nr(c,u,t[4]):u,e[4]=c?F(e[3],G):t[4]}(u=t[5])&&(c=e[5],e[5]=c?rr(c,u,t[6]):u,e[6]=c?F(e[5],G):t[6]),(u=t[7])&&(e[7]=u),r&Y&&(e[8]=null==e[8]?t[8]:Gi(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(O,S),e=O[0],t=O[1],n=O[2],o=O[3],i=O[4],!(l=O[9]=O[9]===a?f?0:e.length:Zi(O[9]-p,0))&&24&t&&(t&=-25),t&&1!=t)E=8==t||16==t?(y=t,m=l,g=pr(v=e),function e(){for(var t=arguments.length,n=ii(t),o=t,i=Tr(e);o--;)n[o]=arguments[o];var c=t<3&&n[0]!==i&&n[t-1]!==i?[]:F(n,i);return(t-=c.length)<m?_r(v,y,Pa,e.placeholder,a,n,c,a,a,m-t):u(this&&this!==qt&&r(this,e)?g:v,this,n)}):t!=Q&&33!=t||i.length?Pa.apply(a,O):function(e,t,n,o){var i=1&t,a=pr(e);return function t(){for(var c=-1,s=arguments.length,l=-1,f=o.length,p=ii(f+s),d=this&&this!==qt&&r(this,t)?a:e;++l<f;)p[l]=o[l];for(;s--;)p[l++]=arguments[++c];return u(d,i?n:this,p)}}(e,t,n,o);else var E=(w=n,_=1&t,x=pr(b=e),function e(){return(this&&this!==qt&&r(this,e)?x:b).apply(_?w:this,arguments)});return Yr((S?Ea:Ba)(E,O),e,t)},Er=function(e,t,n,r){return e===a||xo(e,yi[n])&&!bi.call(r,n)?t:e},kr=function(e){return To(e)?a:e},jr=function(e,t,n,r,o,i){var u=1&n,c=e.length,s=t.length;if(c!=s&&!(u&&s>c))return!1;var l=i.get(e),f=i.get(t);if(l&&f)return l==t&&f==e;var p=-1,d=!0,h=2&n?new ht:a;for(i.set(e,t),i.set(t,e);++p<c;){var v=e[p],y=t[p];if(r)var m=u?r(y,v,p,t,e,i):r(v,y,p,e,t,i);if(m!==a){if(m)continue;d=!1;break}if(h){if(!b(t,(function(e,t){if(!R(h,t)&&(v===e||o(v,e,n,r,i)))return h.push(t)}))){d=!1;break}}else if(v!==y&&!o(v,y,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d},Cr=function(e){return Fa(qr(e,a,io),e+"")},$r=function(e){return Gt(e,Ho,Ra)},Pr=function(e){return Gt(e,Wo,Da)},Ar=function(e){for(var t=e.name+"",n=ua[t],r=bi.call(ua,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t},Tr=function(e){return(bi.call(j,"placeholder")?j:e).placeholder},Ir=function(){var e=j.iteratee||Xo;return e=e===Xo?mn:e,arguments.length?e(arguments[0],arguments[1]):e},Rr=function(e,t){var n,r,i=e.__data__;return("string"==(r=o(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map},Dr=function(e){for(var t=Ho(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Wr(o)]}return t},Lr=function(e,t){var n,r=null==(n=e)?a:n[t];return yn(r)?r:a},Mr=function(e,t,n){for(var r=-1,o=(t=Qn(t,e)).length,i=!1;++r<o;){var a=eo(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Co(o)&&Br(a,o)&&(Pu(e)||$u(e))},Nr=function(e){return"function"!=typeof e.constructor||Hr(e)?{}:ya(Pi(e))},Ur=function(e){return Pu(e)||$u(e)||!!(Ri&&e&&e[Ri])},Br=function(e,t){var n=void 0===e?"undefined":o(e);return!!(t=null==t?X:t)&&("number"==n||"symbol"!=n&&it.test(e))&&e>-1&&e%1==0&&e<t},zr=function(e,t,n){if(!$o(n))return!1;var r=void 0===t?"undefined":o(t);return!!("number"==r?So(n)&&Br(t,n.length):"string"==r&&t in n)&&xo(n[t],e)},Fr=function(e,t){if(Pu(e))return!1;var n=void 0===e?"undefined":o(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ro(e))||ze.test(e)||!Be.test(e)||null!=t&&e in li(t)},Vr=function(e){var t=Ar(e),n=j[t];if("function"!=typeof n||!(t in lt.prototype))return!1;if(e===n)return!0;var r=Ia(n);return!!r&&e===r[0]},Hr=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||yi)},Wr=function(e){return e==e&&!$o(e)},Kr=function(e,t){return function(n){return null!=n&&n[e]===t&&(t!==a||e in li(n))}},qr=function(e,t,n){return t=Zi(t===a?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=Zi(r.length-t,0),a=ii(i);++o<i;)a[o]=r[t+o];o=-1;for(var c=ii(t+1);++o<t;)c[o]=r[o];return c[t]=n(a),u(e,this,c)}},Zr=function(e,t){return t.length<2?e:Zt(e,Dn(t,0,-1))},Gr=function(e,t){for(var n=e.length,r=Gi(t.length,n),o=or(e);r--;){var i=t[r];e[r]=Br(i,n)?o[i]:a}return e},Qr=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},Yr=function(e,t,n){var r,o,i,a=t+"";return Fa(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(qe,"{\n/* [wrapped with "+t+"] */\n")}(a,(o=(r=a.match(Ze))?r[1].split(Ge):[],i=n,s(ne,(function(e){var t="_."+e[0];i&e[1]&&!d(o,t)&&o.push(t)})),o.sort())))},Jr=function(e){var t=0,n=0;return function(){var r=Qi(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(a,arguments)}},Xr=function(e,t){var n=-1,r=e.length,o=r-1;for(t=t===a?r:t;++n<t;){var i=Cn(n,o),u=e[i];e[i]=e[n],e[n]=u}return e.length=t,e},eo=function(e){if("string"==typeof e||Ro(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},to=function(e){if(null!=e){try{return gi.call(e)}catch(e){}try{return e+""}catch(e){}}return""},no=function(e){if(r(e,lt))return e.clone();var t=new st(e.__wrapped__,e.__chain__);return t.__actions__=or(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t},ro=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Mo(n);return o<0&&(o=Zi(r+o,0)),_(e,Ir(t,3),o)},oo=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==a&&(o=Mo(n),o=n<0?Zi(r+o,0):Gi(o,r-1)),_(e,Ir(t,3),o,!0)},io=function(e){return null!=e&&e.length?wa(e,1):[]},ao=function(e){return e&&e.length?e[0]:a},uo=function(e){var t=null==e?0:e.length;return t?e[t-1]:a},co=function(e,t){return e&&e.length&&t&&t.length?kn(e,t):e},so=function(e){return null==e?e:Xi.call(e)},lo=function(e){if(!e||!e.length)return[];var t=0;return e=p(e,(function(e){if(Oo(e))return t=Zi(e.length,t),!0})),P(t,(function(t){return v(e,k(t))}))},fo=function(e,t){if(!e||!e.length)return[];var n=lo(e);return null==t?n:v(n,(function(e){return u(t,a,e)}))},po=function(e){var t=j(e);return t.__chain__=!0,t},ho=function(e,t){return t(e)},vo=function(e,t){return(Pu(e)?s:ga)(e,Ir(t,3))},yo=function(e,t){return(Pu(e)?l:ba)(e,Ir(t,3))},mo=function(e,t){return(Pu(e)?v:wn)(e,Ir(t,3))},go=function(e,t,n){return t=n?a:t,t=e&&null==t?e.length:t,Or(e,Y,a,a,a,a,t)},bo=function(e,t){var n;if("function"!=typeof t)throw new di(q);return e=Mo(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=a),n}},wo=function(e,t,n){var r,o,i,u,c,s,l=function(t){var n=r,i=o;return r=o=a,v=t,u=e.apply(i,n)},f=function(e){return v=e,c=za(b,t),y?l(e):u},p=function(e){var n=e-s;return s===a||n>=t||n<0||m&&e-v>=i},d=function(e){return c=a,g&&r?l(e):(r=o=a,u)},h=function(){var e=yu(),n=p(e);if(r=arguments,o=this,s=e,n){if(c===a)return f(s);if(m)return $a(c),c=za(b,t),l(s)}return c===a&&(c=za(b,t)),u},v=0,y=!1,m=!1,g=!0;if("function"!=typeof e)throw new di(q);function b(){var e,n,r=yu();if(p(r))return d(r);c=za(b,(n=t-((e=r)-s),m?Gi(n,i-(e-v)):n))}return t=Uo(t)||0,$o(n)&&(y=!!n.leading,i=(m="maxWait"in n)?Zi(Uo(n.maxWait)||0,t):i,g="trailing"in n?!!n.trailing:g),h.cancel=function(){c!==a&&$a(c),v=0,r=s=o=c=a},h.flush=function(){return c===a?u:d(yu())},h},_o=function(e){if("function"!=typeof e)throw new di(q);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}},xo=function(e,t){return e===t||e!=e&&t!=t},So=function(e){return null!=e&&Co(e.length)&&!ko(e)},Oo=function(e){return Po(e)&&So(e)},Eo=function(e){if(!Po(e))return!1;var t=Yt(e);return t==ue||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!To(e)},ko=function(e){if(!$o(e))return!1;var t=Yt(e);return t==ce||t==se||"[object AsyncFunction]"==t||"[object Proxy]"==t},jo=function(e){return"number"==typeof e&&e==Mo(e)},Co=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=X},$o=function(e){var t=void 0===e?"undefined":o(e);return null!=e&&("object"==t||"function"==t)},Po=function(e){return null!=e&&"object"==typeof e},Ao=function(e){return"number"==typeof e||Po(e)&&Yt(e)==fe},To=function(e){if(!Po(e)||Yt(e)!=pe)return!1;var t=Pi(e);if(null===t)return!0;var n=bi.call(t,"constructor")&&t.constructor;return"function"==typeof n&&r(n,n)&&gi.call(n)==Si},Io=function(e){return"string"==typeof e||!Pu(e)&&Po(e)&&Yt(e)==ye},Ro=function(e){return"symbol"==(void 0===e?"undefined":o(e))||Po(e)&&Yt(e)==me},Do=function(e){if(!e)return[];if(So(e))return Io(e)?W(e):or(e);if(Di&&e[Di])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Di]());var t=La(e);return(t==le?B:t==ve?V:qo)(e)},Lo=function(e){return e?(e=Uo(e))===J||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},Mo=function(e){var t=Lo(e),n=t%1;return t==t?n?t-n:t:0},No=function(e){return e?jt(Mo(e),0,te):0},Uo=function(e){if("number"==typeof e)return e;if(Ro(e))return ee;if($o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=$o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=A(e);var n=nt.test(e);return n||ot.test(e)?Ht(e.slice(2),n?2:8):tt.test(e)?ee:+e},Bo=function(e){return ir(e,Wo(e))},zo=function(e){return null==e?"":ja(e)},Fo=function(e,t,n){var r=null==e?a:Zt(e,t);return r===a?n:r},Vo=function(e,t){return null!=e&&Mr(e,t,fn)},Ho=function(e){return So(e)?yt(e):gn(e)},Wo=function(e){return So(e)?yt(e,!0):function(e){if(!$o(e))return function(e){var t=[];if(null!=e)for(var n in li(e))t.push(n);return t}(e);var t=Hr(e),n=[];for(var r in e)("constructor"!=r||!t&&bi.call(e,r))&&n.push(r);return n}(e)},Ko=function(e,t){if(null==e)return{};var n=v(Pr(e),(function(e){return[e]}));return t=Ir(t),En(e,n,(function(e,n){return t(e,n[0])}))},qo=function(e){return null==e?[]:I(e,Ho(e))},Zo=function(e){return sc(zo(e).toLowerCase())},Go=function(e){return(e=zo(e))&&e.replace(at,un).replace(It,"")},Qo=function(e,t,n){return e=zo(e),(t=n?a:t)===a?(r=e,Mt.test(r)?e.match(Dt)||[]:e.match(Qe)||[]):e.match(t)||[];var r},Yo=function(e){return function(){return e}},Jo=function(e){return e},Xo=function(e){return mn("function"==typeof e?e:ma(e,1))},ei=function(e,t,n){var r=Ho(t),o=Kt(t,r);null!=n||$o(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=Kt(t,Ho(t)));var i=!($o(n)&&"chain"in n&&!n.chain),a=ko(e);return s(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=or(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,y([this.value()],arguments))})})),e},ti=function(){},ni=function(e){return Fr(e)?k(eo(e)):(t=e,function(e){return Zt(e,t)});var t},ri=function(){return[]},oi=function(){return!1},ii=(t=null==t?qt:ln.defaults(qt.Object(),t,ln.pick(qt,Nt))).Array,ai=t.Date,ui=t.Error,ci=t.Function,si=t.Math,li=t.Object,fi=t.RegExp,pi=t.String,di=t.TypeError,hi=ii.prototype,vi=ci.prototype,yi=li.prototype,mi=t["__core-js_shared__"],gi=vi.toString,bi=yi.hasOwnProperty,wi=0,_i=(n=/[^.]+$/.exec(mi&&mi.keys&&mi.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",xi=yi.toString,Si=gi.call(li),Oi=qt._,Ei=fi("^"+gi.call(bi).replace(Ve,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ki=Qt?t.Buffer:a,ji=t.Symbol,Ci=t.Uint8Array,$i=ki?ki.allocUnsafe:a,Pi=z(li.getPrototypeOf,li),Ai=li.create,Ti=yi.propertyIsEnumerable,Ii=hi.splice,Ri=ji?ji.isConcatSpreadable:a,Di=ji?ji.iterator:a,Li=ji?ji.toStringTag:a,Mi=function(){try{var e=Lr(li,"defineProperty");return e({},"",{}),e}catch(e){}}(),Ni=t.clearTimeout!==qt.clearTimeout&&t.clearTimeout,Ui=ai&&ai.now!==qt.Date.now&&ai.now,Bi=t.setTimeout!==qt.setTimeout&&t.setTimeout,zi=si.ceil,Fi=si.floor,Vi=li.getOwnPropertySymbols,Hi=ki?ki.isBuffer:a,Wi=t.isFinite,Ki=hi.join,qi=z(li.keys,li),Zi=si.max,Gi=si.min,Qi=ai.now,Yi=t.parseInt,Ji=si.random,Xi=hi.reverse,ea=Lr(t,"DataView"),ta=Lr(t,"Map"),na=Lr(t,"Promise"),ra=Lr(t,"Set"),oa=Lr(t,"WeakMap"),ia=Lr(li,"create"),aa=oa&&new oa,ua={},ca=to(ea),sa=to(ta),la=to(na),fa=to(ra),pa=to(oa),da=ji?ji.prototype:a,ha=da?da.valueOf:a,va=da?da.toString:a,ya=(i=function(){},function(e){if(!$o(e))return{};if(Ai)return Ai(e);i.prototype=e;var t=new i;return i.prototype=a,t});function ma(e,t,n,r,o,i){var u,c=1&t,l=2&t,f=4&t;if(n&&(u=o?n(e,r,o,i):n(e)),u!==a)return u;if(!$o(e))return e;var p,d,h,v,y,m,g,b=Pu(e);if(b){if(d=(p=e).length,h=new p.constructor(d),d&&"string"==typeof p[0]&&bi.call(p,"index")&&(h.index=p.index,h.input=p.input),u=h,!c)return or(e,u)}else{var w=La(e),_=w==ce||w==se;if(Tu(e))return Jn(e,c);if(w==pe||w==re||_&&!o){if(u=l||_?{}:Nr(e),!c)return l?(m=e,y=e,g=(v=u)&&ir(y,Wo(y),v),ir(m,Da(m),g)):function(e,t){return ir(e,Ra(e),t)}(e,Ot(u,e))}else{if(!zt[w])return o?e:{};u=function(e,t,n){var r,o=e.constructor;switch(t){case be:return Xn(e);case ie:case ae:return new o(+e);case we:return function(e,t){var n=t?Xn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case _e:case xe:case Se:case Oe:case Ee:case ke:case je:case Ce:case $e:return er(e,n);case le:return new o;case fe:case ye:return new o(e);case he:return function(e){var t=new e.constructor(e.source,et.exec(e));return t.lastIndex=e.lastIndex,t}(e);case ve:return new o;case me:return r=e,ha?li(ha.call(r)):{}}}(e,w,c)}}i||(i=new vt);var x=i.get(e);if(x)return x;i.set(e,u),Lu(e)?e.forEach((function(r){u.add(ma(r,t,n,r,e,i))})):Ru(e)&&e.forEach((function(r,o){u.set(o,ma(r,t,n,o,e,i))}));var S=b?a:(f?l?Pr:$r:l?Wo:Ho)(e);return s(S||e,(function(r,o){S&&(r=e[o=r]),_t(u,o,ma(r,t,n,o,e,i))})),u}j.templateSettings={escape:Me,evaluate:Ne,interpolate:Ue,variable:"",imports:{_:j}},(j.prototype=Ke.prototype).constructor=j,st.prototype=ya(Ke.prototype),st.prototype.constructor=st,lt.prototype=ya(Ke.prototype),lt.prototype.constructor=lt,ft.prototype.clear=function(){this.__data__=ia?ia(null):{},this.size=0},ft.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ft.prototype.get=function(e){var t=this.__data__;if(ia){var n=t[e];return n===Z?a:n}return bi.call(t,e)?t[e]:a},ft.prototype.has=function(e){var t=this.__data__;return ia?t[e]!==a:bi.call(t,e)},ft.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ia&&t===a?Z:t,this},pt.prototype.clear=function(){this.__data__=[],this.size=0},pt.prototype.delete=function(e){var t=this.__data__,n=xt(t,e);return!(n<0||(n==t.length-1?t.pop():Ii.call(t,n,1),--this.size,0))},pt.prototype.get=function(e){var t=this.__data__,n=xt(t,e);return n<0?a:t[n][1]},pt.prototype.has=function(e){return xt(this.__data__,e)>-1},pt.prototype.set=function(e,t){var n=this.__data__,r=xt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},dt.prototype.clear=function(){this.size=0,this.__data__={hash:new ft,map:new(ta||pt),string:new ft}},dt.prototype.delete=function(e){var t=Rr(this,e).delete(e);return this.size-=t?1:0,t},dt.prototype.get=function(e){return Rr(this,e).get(e)},dt.prototype.has=function(e){return Rr(this,e).has(e)},dt.prototype.set=function(e,t){var n=Rr(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ht.prototype.add=ht.prototype.push=function(e){return this.__data__.set(e,Z),this},ht.prototype.has=function(e){return this.__data__.has(e)},vt.prototype.clear=function(){this.__data__=new pt,this.size=0},vt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},vt.prototype.get=function(e){return this.__data__.get(e)},vt.prototype.has=function(e){return this.__data__.has(e)},vt.prototype.set=function(e,t){var n=this.__data__;if(r(n,pt)){var o=n.__data__;if(!ta||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new dt(o)}return n.set(e,t),this.size=n.size,this};var ga=cr(Ft),ba=cr(Wt,!0);function wa(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=Ur),o||(o=[]);++i<a;){var u=e[i];t>0&&n(u)?t>1?wa(u,t-1,n,r,o):y(o,u):r||(o[o.length]=u)}return o}var _a=sr(),xa=sr(!0);function Sa(e,t,n,o,i){return e===t||(null==e||null==t||!Po(e)&&!Po(t)?e!=e&&t!=t:function(e,t,n,o,i,u){var c=Pu(e),s=Pu(t),l=c?oe:La(e),f=s?oe:La(t),p=(l=l==re?pe:l)==pe,d=(f=f==re?pe:f)==pe,h=l==f;if(h&&Tu(e)){if(!Tu(t))return!1;c=!0,p=!1}if(h&&!p)return u||(u=new vt),c||Mu(e)?jr(e,t,n,o,i,u):function(e,t,n,r,o,i,a){switch(n){case we:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case be:return!(e.byteLength!=t.byteLength||!i(new Ci(e),new Ci(t)));case ie:case ae:case fe:return xo(+e,+t);case ue:return e.name==t.name&&e.message==t.message;case he:case ye:return e==t+"";case le:var u=B;case ve:var c=1&r;if(u||(u=V),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var l=jr(u(e),u(t),r,o,i,a);return a.delete(e),l;case me:if(ha)return ha.call(e)==ha.call(t)}return!1}(e,t,l,n,o,i,u);if(!(1&n)){var v=p&&bi.call(e,"__wrapped__"),y=d&&bi.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,g=y?t.value():t;return u||(u=new vt),i(m,g,n,o,u)}}return!!h&&(u||(u=new vt),function(e,t,n,o,i,u){var c=1&n,s=$r(e),l=s.length;if(l!=$r(t).length&&!c)return!1;for(var f=l;f--;){var p=s[f];if(!(c?p in t:bi.call(t,p)))return!1}var d=u.get(e),h=u.get(t);if(d&&h)return d==t&&h==e;var v=!0;u.set(e,t),u.set(t,e);for(var y=c;++f<l;){var m=e[p=s[f]],g=t[p];if(o)var b=c?o(g,m,p,t,e,u):o(m,g,p,e,t,u);if(!(b===a?m===g||i(m,g,n,o,u):b)){v=!1;break}y||(y="constructor"==p)}if(v&&!y){var w=e.constructor,_=t.constructor;w==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&r(w,w)&&"function"==typeof _&&r(_,_)||(v=!1)}return u.delete(e),u.delete(t),v}(e,t,n,o,i,u))}(e,t,n,o,Sa,i))}function Oa(e,t,n,r,o){e!==t&&_a(t,(function(i,u){if(o||(o=new vt),$o(i))!function(e,t,n,r,o,i,u){var c=Qr(e,n),s=Qr(t,n),l=u.get(s);if(l)wt(e,n,l);else{var f=i?i(c,s,n+"",e,t,u):a,p=f===a;if(p){var d=Pu(s),h=!d&&Tu(s),v=!d&&!h&&Mu(s);f=s,d||h||v?Pu(c)?f=c:Oo(c)?f=or(c):h?(p=!1,f=Jn(s,!0)):v?(p=!1,f=er(s,!0)):f=[]:To(s)||$u(s)?(f=c,$u(c)?f=Bo(c):$o(c)&&!ko(c)||(f=Nr(s))):p=!1}p&&(u.set(s,f),o(f,s,r,i,u),u.delete(s)),wt(e,n,f)}}(e,t,u,n,Oa,r,o);else{var c=r?r(Qr(e,u),i,u+"",e,t,o):a;c===a&&(c=i),wt(e,u,c)}}),Wo)}var Ea=aa?function(e,t){return aa.set(e,t),e}:Jo,ka=Mi?function(e,t){return Mi(e,"toString",{configurable:!0,enumerable:!1,value:Yo(t),writable:!0})}:Jo;function ja(e){if("string"==typeof e)return e;if(Pu(e))return v(e,ja)+"";if(Ro(e))return va?va.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var Ca=Pn,$a=Ni||function(e){return qt.clearTimeout(e)};function Pa(e,t,n,o,i,u,c,s,l,f){var p=t&Y,d=1&t,h=2&t,v=24&t,y=512&t,m=h?a:pr(e);return function a(){for(var g=arguments.length,b=ii(g),w=g;w--;)b[w]=arguments[w];if(v)var _=Tr(a),x=M(b,_);if(o&&(b=nr(b,o,i,v)),u&&(b=rr(b,u,c,v)),g-=x,v&&g<f){var S=F(b,_);return _r(e,t,Pa,a.placeholder,n,b,S,s,l,f-g)}var O=d?n:this,E=h?O[e]:e;return g=b.length,s?b=Gr(b,s):y&&g>1&&b.reverse(),p&&l<g&&(b.length=l),this&&this!==qt&&r(this,a)&&(E=m||pr(E)),E.apply(O,b)}}var Aa=ra&&1/V(new ra([,-0]))[1]==J?function(e){return new ra(e)}:ti;function Ta(e,t,n,r,o,i){return $o(e)&&$o(t)&&(i.set(t,e),Oa(e,t,a,Ta,i),i.delete(t)),e}var Ia=aa?function(e){return aa.get(e)}:ti,Ra=Vi?function(e){return null==e?[]:(e=li(e),p(Vi(e),(function(t){return Ti.call(e,t)})))}:ri,Da=Vi?function(e){for(var t=[];e;)y(t,Ra(e)),e=Pi(e);return t}:ri,La=Yt;(ea&&La(new ea(new ArrayBuffer(1)))!=we||ta&&La(new ta)!=le||na&&La(na.resolve())!=de||ra&&La(new ra)!=ve||oa&&La(new oa)!=ge)&&(La=function(e){var t=Yt(e),n=t==pe?e.constructor:a,r=n?to(n):"";if(r)switch(r){case ca:return we;case sa:return le;case la:return de;case fa:return ve;case pa:return ge}return t});var Ma,Na,Ua=mi?ko:oi,Ba=Jr(Ea),za=Bi||function(e,t){return qt.setTimeout(e,t)},Fa=Jr(ka),Va=(Ma=_u((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Fe,(function(e,n,r,o){t.push(r?o.replace(Je,"$1"):n||e)})),t}),(function(e){return 500===Na.size&&Na.clear(),e})),Na=Ma.cache,Ma),Ha=Pn((function(e,t){return Oo(e)?Pt(e,wa(t,1,Oo,!0)):[]})),Wa=Pn((function(e,t){var n=uo(t);return Oo(n)&&(n=a),Oo(e)?Pt(e,wa(t,1,Oo,!0),Ir(n,2)):[]})),Ka=Pn((function(e,t){var n=uo(t);return Oo(n)&&(n=a),Oo(e)?Pt(e,wa(t,1,Oo,!0),a,n):[]})),qa=Pn((function(e){var t=v(e,Zn);return t.length&&t[0]===e[0]?pn(t):[]})),Za=Pn((function(e){var t=uo(e),n=v(e,Zn);return t===uo(n)?t=a:n.pop(),n.length&&n[0]===e[0]?pn(n,Ir(t,2)):[]})),Ga=Pn((function(e){var t=uo(e),n=v(e,Zn);return(t="function"==typeof t?t:a)&&n.pop(),n.length&&n[0]===e[0]?pn(n,a,t):[]})),Qa=Pn(co),Ya=Cr((function(e,t){var n=null==e?0:e.length,r=kt(e,t);return jn(e,v(t,(function(e){return Br(e,n)?+e:e})).sort(tr)),r})),Ja=Pn((function(e){return zn(wa(e,1,Oo,!0))})),Xa=Pn((function(e){var t=uo(e);return Oo(t)&&(t=a),zn(wa(e,1,Oo,!0),Ir(t,2))})),eu=Pn((function(e){var t=uo(e);return t="function"==typeof t?t:a,zn(wa(e,1,Oo,!0),a,t)})),tu=Pn((function(e,t){return Oo(e)?Pt(e,t):[]})),nu=Pn((function(e){return Kn(p(e,Oo))})),ru=Pn((function(e){var t=uo(e);return Oo(t)&&(t=a),Kn(p(e,Oo),Ir(t,2))})),ou=Pn((function(e){var t=uo(e);return t="function"==typeof t?t:a,Kn(p(e,Oo),a,t)})),iu=Pn(lo),au=Pn((function(e){var t=e.length,n=t>1?e[t-1]:a;return n="function"==typeof n?(e.pop(),n):a,fo(e,n)})),uu=Cr((function(e){var t=e.length,n=t?e[0]:0,o=this.__wrapped__,i=function(t){return kt(t,e)};return t>1||this.__actions__.length||!r(o,lt)||!Br(n)?this.thru(i):((o=o.slice(n,+n+(t?1:0))).__actions__.push({func:ho,args:[i],thisArg:a}),new st(o,this.__chain__).thru((function(e){return t&&!e.length&&e.push(a),e})))})),cu=ar((function(e,t,n){bi.call(e,n)?++e[n]:Et(e,n,1)})),su=dr(ro),lu=dr(oo),fu=ar((function(e,t,n){bi.call(e,n)?e[n].push(t):Et(e,n,[t])})),pu=Pn((function(e,t,n){var r=-1,o="function"==typeof t,i=So(e)?ii(e.length):[];return ga(e,(function(e){i[++r]=o?u(t,e,n):dn(e,t,n)})),i})),du=ar((function(e,t,n){Et(e,n,t)})),hu=ar((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),vu=Pn((function(e,t){if(null==e)return[];var n=t.length;return n>1&&zr(e,t[0],t[1])?t=[]:n>2&&zr(t[0],t[1],t[2])&&(t=[t[0]]),On(e,wa(t,1),[])})),yu=Ui||function(){return qt.Date.now()},mu=Pn((function(e,t,n){var r=1;if(n.length){var o=F(n,Tr(mu));r|=Q}return Or(e,r,t,n,o)})),gu=Pn((function(e,t,n){var r=3;if(n.length){var o=F(n,Tr(gu));r|=Q}return Or(t,r,e,n,o)})),bu=Pn((function(e,t){return $t(e,1,t)})),wu=Pn((function(e,t,n){return $t(e,Uo(t)||0,n)}));function _u(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new di(q);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(_u.Cache||dt),n}_u.Cache=dt;var xu,Su=Ca((function(e,t){var n=(t=1==t.length&&Pu(t[0])?v(t[0],T(Ir())):v(wa(t,1),T(Ir()))).length;return Pn((function(r){for(var o=-1,i=Gi(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return u(e,this,r)}))})),Ou=Pn((function(e,t){var n=F(t,Tr(Ou));return Or(e,Q,a,t,n)})),Eu=Pn((function(e,t){var n=F(t,Tr(Eu));return Or(e,64,a,t,n)})),ku=Cr((function(e,t){return Or(e,256,a,a,a,t)})),ju=wr(Jt),Cu=wr((function(e,t){return e>=t})),$u=hn(function(){return arguments}())?hn:function(e){return Po(e)&&bi.call(e,"callee")&&!Ti.call(e,"callee")},Pu=ii.isArray,Au=Xt?T(Xt):function(e){return Po(e)&&Yt(e)==be},Tu=Hi||oi,Iu=en?T(en):function(e){return Po(e)&&Yt(e)==ae},Ru=tn?T(tn):function(e){return Po(e)&&La(e)==le},Du=nn?T(nn):function(e){return Po(e)&&Yt(e)==he},Lu=rn?T(rn):function(e){return Po(e)&&La(e)==ve},Mu=on?T(on):function(e){return Po(e)&&Co(e.length)&&!!Bt[Yt(e)]},Nu=wr(bn),Uu=wr((function(e,t){return e<=t})),Bu=ur((function(e,t){if(Hr(t)||So(t))ir(t,Ho(t),e);else for(var n in t)bi.call(t,n)&&_t(e,n,t[n])})),zu=ur((function(e,t){ir(t,Wo(t),e)})),Fu=ur((function(e,t,n,r){ir(t,Wo(t),e,r)})),Vu=ur((function(e,t,n,r){ir(t,Ho(t),e,r)})),Hu=Cr(kt),Wu=Pn((function(e,t){e=li(e);var n=-1,r=t.length,o=r>2?t[2]:a;for(o&&zr(t[0],t[1],o)&&(r=1);++n<r;)for(var i=t[n],u=Wo(i),c=-1,s=u.length;++c<s;){var l=u[c],f=e[l];(f===a||xo(f,yi[l])&&!bi.call(e,l))&&(e[l]=i[l])}return e})),Ku=Pn((function(e){return e.push(a,Ta),u(Yu,a,e)})),qu=vr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=xi.call(t)),e[t]=n}),Yo(Jo)),Zu=vr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=xi.call(t)),bi.call(e,t)?e[t].push(n):e[t]=[n]}),Ir),Gu=Pn(dn),Qu=ur((function(e,t,n){Oa(e,t,n)})),Yu=ur((function(e,t,n,r){Oa(e,t,n,r)})),Ju=Cr((function(e,t){var n={};if(null==e)return n;var r=!1;t=v(t,(function(t){return t=Qn(t,e),r||(r=t.length>1),t})),ir(e,Pr(e),n),r&&(n=ma(n,7,kr));for(var o=t.length;o--;)Fn(n,t[o]);return n})),Xu=Cr((function(e,t){return null==e?{}:En(n=e,t,(function(e,t){return Vo(n,t)}));var n})),ec=Sr(Ho),tc=Sr(Wo),nc=fr((function(e,t,n){return t=t.toLowerCase(),e+(n?Zo(t):t)})),rc=fr((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),oc=fr((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),ic=lr("toLowerCase"),ac=fr((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),uc=fr((function(e,t,n){return e+(n?" ":"")+sc(t)})),cc=fr((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),sc=lr("toUpperCase"),lc=Pn((function(e,t){try{return u(e,a,t)}catch(e){return Eo(e)?e:new ui(e)}})),fc=Cr((function(e,t){return s(t,(function(t){t=eo(t),Et(e,t,mu(e[t],e))})),e})),pc=hr(),dc=hr(!0),hc=Pn((function(e,t){return function(n){return dn(n,e,t)}})),vc=Pn((function(e,t){return function(n){return dn(e,n,t)}})),yc=mr(v),mc=mr(f),gc=mr(b),bc=br(),wc=br(!0),_c=yr((function(e,t){return e+t}),0),xc=xr("ceil"),Sc=yr((function(e,t){return e/t}),1),Oc=xr("floor"),Ec=yr((function(e,t){return e*t}),1),kc=xr("round"),jc=yr((function(e,t){return e-t}),0);return j.after=function(e,t){if("function"!=typeof t)throw new di(q);return e=Mo(e),function(){if(--e<1)return t.apply(this,arguments)}},j.ary=go,j.assign=Bu,j.assignIn=zu,j.assignInWith=Fu,j.assignWith=Vu,j.at=Hu,j.before=bo,j.bind=mu,j.bindAll=fc,j.bindKey=gu,j.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Pu(e)?e:[e]},j.chain=po,j.chunk=function(e,t,n){t=(n?zr(e,t,n):t===a)?1:Zi(Mo(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var o=0,i=0,u=ii(zi(r/t));o<r;)u[i++]=Dn(e,o,o+=t);return u},j.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},j.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ii(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return y(Pu(n)?or(n):[n],wa(t,1))},j.cond=function(e){var t=null==e?0:e.length,n=Ir();return e=t?v(e,(function(e){if("function"!=typeof e[1])throw new di(q);return[n(e[0]),e[1]]})):[],Pn((function(n){for(var r=-1;++r<t;){var o=e[r];if(u(o[0],this,n))return u(o[1],this,n)}}))},j.conforms=function(e){return t=ma(e,1),n=Ho(t),function(e){return Ct(e,t,n)};var t,n},j.constant=Yo,j.countBy=cu,j.create=function(e,t){var n=ya(e);return null==t?n:Ot(n,t)},j.curry=function e(t,n,r){var o=Or(t,8,a,a,a,a,a,n=r?a:n);return o.placeholder=e.placeholder,o},j.curryRight=function e(t,n,r){var o=Or(t,16,a,a,a,a,a,n=r?a:n);return o.placeholder=e.placeholder,o},j.debounce=wo,j.defaults=Wu,j.defaultsDeep=Ku,j.defer=bu,j.delay=wu,j.difference=Ha,j.differenceBy=Wa,j.differenceWith=Ka,j.drop=function(e,t,n){var r=null==e?0:e.length;return r?Dn(e,(t=n||t===a?1:Mo(t))<0?0:t,r):[]},j.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Dn(e,0,(t=r-(t=n||t===a?1:Mo(t)))<0?0:t):[]},j.dropRightWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3),!0,!0):[]},j.dropWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3),!0):[]},j.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&zr(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=Mo(n))<0&&(n=-n>o?0:o+n),(r=r===a||r>o?o:Mo(r))<0&&(r+=o),r=n>r?0:No(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},j.filter=function(e,t){return(Pu(e)?p:Lt)(e,Ir(t,3))},j.flatMap=function(e,t){return wa(mo(e,t),1)},j.flatMapDeep=function(e,t){return wa(mo(e,t),J)},j.flatMapDepth=function(e,t,n){return n=n===a?1:Mo(n),wa(mo(e,t),n)},j.flatten=io,j.flattenDeep=function(e){return null!=e&&e.length?wa(e,J):[]},j.flattenDepth=function(e,t){return null!=e&&e.length?wa(e,t=t===a?1:Mo(t)):[]},j.flip=function(e){return Or(e,512)},j.flow=pc,j.flowRight=dc,j.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},j.functions=function(e){return null==e?[]:Kt(e,Ho(e))},j.functionsIn=function(e){return null==e?[]:Kt(e,Wo(e))},j.groupBy=fu,j.initial=function(e){return null!=e&&e.length?Dn(e,0,-1):[]},j.intersection=qa,j.intersectionBy=Za,j.intersectionWith=Ga,j.invert=qu,j.invertBy=Zu,j.invokeMap=pu,j.iteratee=Xo,j.keyBy=du,j.keys=Ho,j.keysIn=Wo,j.map=mo,j.mapKeys=function(e,t){var n={};return t=Ir(t,3),Ft(e,(function(e,r,o){Et(n,t(e,r,o),e)})),n},j.mapValues=function(e,t){var n={};return t=Ir(t,3),Ft(e,(function(e,r,o){Et(n,r,t(e,r,o))})),n},j.matches=function(e){return _n(ma(e,1))},j.matchesProperty=function(e,t){return xn(e,ma(t,1))},j.memoize=_u,j.merge=Qu,j.mergeWith=Yu,j.method=hc,j.methodOf=vc,j.mixin=ei,j.negate=_o,j.nthArg=function(e){return e=Mo(e),Pn((function(t){return Sn(t,e)}))},j.omit=Ju,j.omitBy=function(e,t){return Ko(e,_o(Ir(t)))},j.once=function(e){return bo(2,e)},j.orderBy=function(e,t,n,r){return null==e?[]:(Pu(t)||(t=null==t?[]:[t]),Pu(n=r?a:n)||(n=null==n?[]:[n]),On(e,t,n))},j.over=yc,j.overArgs=Su,j.overEvery=mc,j.overSome=gc,j.partial=Ou,j.partialRight=Eu,j.partition=hu,j.pick=Xu,j.pickBy=Ko,j.property=ni,j.propertyOf=function(e){return function(t){return null==e?a:Zt(e,t)}},j.pull=Qa,j.pullAll=co,j.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?kn(e,t,Ir(n,2)):e},j.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?kn(e,t,a,n):e},j.pullAt=Ya,j.range=bc,j.rangeRight=wc,j.rearg=ku,j.reject=function(e,t){return(Pu(e)?p:Lt)(e,_o(Ir(t,3)))},j.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=Ir(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return jn(e,o),n},j.rest=function(e,t){if("function"!=typeof e)throw new di(q);return Pn(e,t=t===a?t:Mo(t))},j.reverse=so,j.sampleSize=function(e,t,n){return t=(n?zr(e,t,n):t===a)?1:Mo(t),(Pu(e)?gt:Tn)(e,t)},j.set=function(e,t,n){return null==e?e:In(e,t,n)},j.setWith=function(e,t,n,r){return r="function"==typeof r?r:a,null==e?e:In(e,t,n,r)},j.shuffle=function(e){return(Pu(e)?bt:Rn)(e)},j.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&zr(e,t,n)?(t=0,n=r):(t=null==t?0:Mo(t),n=n===a?r:Mo(n)),Dn(e,t,n)):[]},j.sortBy=vu,j.sortedUniq=function(e){return e&&e.length?Un(e):[]},j.sortedUniqBy=function(e,t){return e&&e.length?Un(e,Ir(t,2)):[]},j.split=function(e,t,n){return n&&"number"!=typeof n&&zr(e,t,n)&&(t=n=a),(n=n===a?te:n>>>0)?(e=zo(e))&&("string"==typeof t||null!=t&&!Du(t))&&!(t=ja(t))&&U(e)?Yn(W(e),0,n):e.split(t,n):[]},j.spread=function(e,t){if("function"!=typeof e)throw new di(q);return t=null==t?0:Zi(Mo(t),0),Pn((function(n){var r=n[t],o=Yn(n,0,t);return r&&y(o,r),u(e,this,o)}))},j.tail=function(e){var t=null==e?0:e.length;return t?Dn(e,1,t):[]},j.take=function(e,t,n){return e&&e.length?Dn(e,0,(t=n||t===a?1:Mo(t))<0?0:t):[]},j.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Dn(e,(t=r-(t=n||t===a?1:Mo(t)))<0?0:t,r):[]},j.takeRightWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3),!1,!0):[]},j.takeWhile=function(e,t){return e&&e.length?Hn(e,Ir(t,3)):[]},j.tap=function(e,t){return t(e),e},j.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new di(q);return $o(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),wo(e,t,{leading:r,maxWait:t,trailing:o})},j.thru=ho,j.toArray=Do,j.toPairs=ec,j.toPairsIn=tc,j.toPath=function(e){return Pu(e)?v(e,eo):Ro(e)?[e]:or(Va(zo(e)))},j.toPlainObject=Bo,j.transform=function(e,t,n){var r=Pu(e),o=r||Tu(e)||Mu(e);if(t=Ir(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:$o(e)&&ko(i)?ya(Pi(e)):{}}return(o?s:Ft)(e,(function(e,r,o){return t(n,e,r,o)})),n},j.unary=function(e){return go(e,1)},j.union=Ja,j.unionBy=Xa,j.unionWith=eu,j.uniq=function(e){return e&&e.length?zn(e):[]},j.uniqBy=function(e,t){return e&&e.length?zn(e,Ir(t,2)):[]},j.uniqWith=function(e,t){return t="function"==typeof t?t:a,e&&e.length?zn(e,a,t):[]},j.unset=function(e,t){return null==e||Fn(e,t)},j.unzip=lo,j.unzipWith=fo,j.update=function(e,t,n){return null==e?e:Vn(e,t,Gn(n))},j.updateWith=function(e,t,n,r){return r="function"==typeof r?r:a,null==e?e:Vn(e,t,Gn(n),r)},j.values=qo,j.valuesIn=function(e){return null==e?[]:I(e,Wo(e))},j.without=tu,j.words=Qo,j.wrap=function(e,t){return Ou(Gn(t),e)},j.xor=nu,j.xorBy=ru,j.xorWith=ou,j.zip=iu,j.zipObject=function(e,t){return qn(e||[],t||[],_t)},j.zipObjectDeep=function(e,t){return qn(e||[],t||[],In)},j.zipWith=au,j.entries=ec,j.entriesIn=tc,j.extend=zu,j.extendWith=Fu,ei(j,j),j.add=_c,j.attempt=lc,j.camelCase=nc,j.capitalize=Zo,j.ceil=xc,j.clamp=function(e,t,n){return n===a&&(n=t,t=a),n!==a&&(n=(n=Uo(n))==n?n:0),t!==a&&(t=(t=Uo(t))==t?t:0),jt(Uo(e),t,n)},j.clone=function(e){return ma(e,4)},j.cloneDeep=function(e){return ma(e,5)},j.cloneDeepWith=function(e,t){return ma(e,5,t="function"==typeof t?t:a)},j.cloneWith=function(e,t){return ma(e,4,t="function"==typeof t?t:a)},j.conformsTo=function(e,t){return null==t||Ct(e,t,Ho(t))},j.deburr=Go,j.defaultTo=function(e,t){return null==e||e!=e?t:e},j.divide=Sc,j.endsWith=function(e,t,n){e=zo(e),t=ja(t);var r=e.length,o=n=n===a?r:jt(Mo(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},j.eq=xo,j.escape=function(e){return(e=zo(e))&&Le.test(e)?e.replace(Re,cn):e},j.escapeRegExp=function(e){return(e=zo(e))&&He.test(e)?e.replace(Ve,"\\$&"):e},j.every=function(e,t,n){var r=Pu(e)?f:At;return n&&zr(e,t,n)&&(t=a),r(e,Ir(t,3))},j.find=su,j.findIndex=ro,j.findKey=function(e,t){return w(e,Ir(t,3),Ft)},j.findLast=lu,j.findLastIndex=oo,j.findLastKey=function(e,t){return w(e,Ir(t,3),Wt)},j.floor=Oc,j.forEach=vo,j.forEachRight=yo,j.forIn=function(e,t){return null==e?e:_a(e,Ir(t,3),Wo)},j.forInRight=function(e,t){return null==e?e:xa(e,Ir(t,3),Wo)},j.forOwn=function(e,t){return e&&Ft(e,Ir(t,3))},j.forOwnRight=function(e,t){return e&&Wt(e,Ir(t,3))},j.get=Fo,j.gt=ju,j.gte=Cu,j.has=function(e,t){return null!=e&&Mr(e,t,an)},j.hasIn=Vo,j.head=ao,j.identity=Jo,j.includes=function(e,t,n,r){e=So(e)?e:qo(e),n=n&&!r?Mo(n):0;var o=e.length;return n<0&&(n=Zi(o+n,0)),Io(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&x(e,t,n)>-1},j.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Mo(n);return o<0&&(o=Zi(r+o,0)),x(e,t,o)},j.inRange=function(e,t,n){return t=Lo(t),n===a?(n=t,t=0):n=Lo(n),(r=e=Uo(e))>=Gi(o=t,i=n)&&r<Zi(o,i);var r,o,i},j.invoke=Gu,j.isArguments=$u,j.isArray=Pu,j.isArrayBuffer=Au,j.isArrayLike=So,j.isArrayLikeObject=Oo,j.isBoolean=function(e){return!0===e||!1===e||Po(e)&&Yt(e)==ie},j.isBuffer=Tu,j.isDate=Iu,j.isElement=function(e){return Po(e)&&1===e.nodeType&&!To(e)},j.isEmpty=function(e){if(null==e)return!0;if(So(e)&&(Pu(e)||"string"==typeof e||"function"==typeof e.splice||Tu(e)||Mu(e)||$u(e)))return!e.length;var t=La(e);if(t==le||t==ve)return!e.size;if(Hr(e))return!gn(e).length;for(var n in e)if(bi.call(e,n))return!1;return!0},j.isEqual=function(e,t){return Sa(e,t)},j.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:a)?n(e,t):a;return r===a?Sa(e,t,a,n):!!r},j.isError=Eo,j.isFinite=function(e){return"number"==typeof e&&Wi(e)},j.isFunction=ko,j.isInteger=jo,j.isLength=Co,j.isMap=Ru,j.isMatch=function(e,t){return e===t||vn(e,t,Dr(t))},j.isMatchWith=function(e,t,n){return n="function"==typeof n?n:a,vn(e,t,Dr(t),n)},j.isNaN=function(e){return Ao(e)&&e!=+e},j.isNative=function(e){if(Ua(e))throw new ui("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return yn(e)},j.isNil=function(e){return null==e},j.isNull=function(e){return null===e},j.isNumber=Ao,j.isObject=$o,j.isObjectLike=Po,j.isPlainObject=To,j.isRegExp=Du,j.isSafeInteger=function(e){return jo(e)&&e>=-9007199254740991&&e<=X},j.isSet=Lu,j.isString=Io,j.isSymbol=Ro,j.isTypedArray=Mu,j.isUndefined=function(e){return e===a},j.isWeakMap=function(e){return Po(e)&&La(e)==ge},j.isWeakSet=function(e){return Po(e)&&"[object WeakSet]"==Yt(e)},j.join=function(e,t){return null==e?"":Ki.call(e,t)},j.kebabCase=rc,j.last=uo,j.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==a&&(o=(o=Mo(n))<0?Zi(r+o,0):Gi(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):_(e,O,o,!0)},j.lowerCase=oc,j.lowerFirst=ic,j.lt=Nu,j.lte=Uu,j.max=function(e){return e&&e.length?Rt(e,Jo,Jt):a},j.maxBy=function(e,t){return e&&e.length?Rt(e,Ir(t,2),Jt):a},j.mean=function(e){return E(e,Jo)},j.meanBy=function(e,t){return E(e,Ir(t,2))},j.min=function(e){return e&&e.length?Rt(e,Jo,bn):a},j.minBy=function(e,t){return e&&e.length?Rt(e,Ir(t,2),bn):a},j.stubArray=ri,j.stubFalse=oi,j.stubObject=function(){return{}},j.stubString=function(){return""},j.stubTrue=function(){return!0},j.multiply=Ec,j.nth=function(e,t){return e&&e.length?Sn(e,Mo(t)):a},j.noConflict=function(){return qt._===this&&(qt._=Oi),this},j.noop=ti,j.now=yu,j.pad=function(e,t,n){e=zo(e);var r=(t=Mo(t))?H(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return gr(Fi(o),n)+e+gr(zi(o),n)},j.padEnd=function(e,t,n){e=zo(e);var r=(t=Mo(t))?H(e):0;return t&&r<t?e+gr(t-r,n):e},j.padStart=function(e,t,n){e=zo(e);var r=(t=Mo(t))?H(e):0;return t&&r<t?gr(t-r,n)+e:e},j.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),Yi(zo(e).replace(We,""),t||0)},j.random=function(e,t,n){if(n&&"boolean"!=typeof n&&zr(e,t,n)&&(t=n=a),n===a&&("boolean"==typeof t?(n=t,t=a):"boolean"==typeof e&&(n=e,e=a)),e===a&&t===a?(e=0,t=1):(e=Lo(e),t===a?(t=e,e=0):t=Lo(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=Ji();return Gi(e+o*(t-e+Vt("1e-"+((o+"").length-1))),t)}return Cn(e,t)},j.reduce=function(e,t,n){var r=Pu(e)?m:C,o=arguments.length<3;return r(e,Ir(t,4),n,o,ga)},j.reduceRight=function(e,t,n){var r=Pu(e)?g:C,o=arguments.length<3;return r(e,Ir(t,4),n,o,ba)},j.repeat=function(e,t,n){return t=(n?zr(e,t,n):t===a)?1:Mo(t),$n(zo(e),t)},j.replace=function(){var e=arguments,t=zo(e[0]);return e.length<3?t:t.replace(e[1],e[2])},j.result=function(e,t,n){var r=-1,o=(t=Qn(t,e)).length;for(o||(o=1,e=a);++r<o;){var i=null==e?a:e[eo(t[r])];i===a&&(r=o,i=n),e=ko(i)?i.call(e):i}return e},j.round=kc,j.runInContext=e,j.sample=function(e){return(Pu(e)?mt:An)(e)},j.size=function(e){if(null==e)return 0;if(So(e))return Io(e)?H(e):e.length;var t=La(e);return t==le||t==ve?e.size:gn(e).length},j.snakeCase=ac,j.some=function(e,t,n){var r=Pu(e)?b:Ln;return n&&zr(e,t,n)&&(t=a),r(e,Ir(t,3))},j.sortedIndex=function(e,t){return Mn(e,t)},j.sortedIndexBy=function(e,t,n){return Nn(e,t,Ir(n,2))},j.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Mn(e,t);if(r<n&&xo(e[r],t))return r}return-1},j.sortedLastIndex=function(e,t){return Mn(e,t,!0)},j.sortedLastIndexBy=function(e,t,n){return Nn(e,t,Ir(n,2),!0)},j.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=Mn(e,t,!0)-1;if(xo(e[n],t))return n}return-1},j.startCase=uc,j.startsWith=function(e,t,n){return e=zo(e),n=null==n?0:jt(Mo(n),0,e.length),t=ja(t),e.slice(n,n+t.length)==t},j.subtract=jc,j.sum=function(e){return e&&e.length?$(e,Jo):0},j.sumBy=function(e,t){return e&&e.length?$(e,Ir(t,2)):0},j.template=function(e,t,n){var r=j.templateSettings;n&&zr(e,t,n)&&(t=a),e=zo(e),t=Fu({},t,r,Er);var o,i,u=Fu({},t.imports,r.imports,Er),c=Ho(u),s=I(u,c),l=0,f=t.interpolate||ut,p="__p += '",d=fi((t.escape||ut).source+"|"+f.source+"|"+(f===Ue?Xe:ut).source+"|"+(t.evaluate||ut).source+"|$","g"),h="//# sourceURL="+(bi.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ut+"]")+"\n";e.replace(d,(function(t,n,r,a,u,c){return r||(r=a),p+=e.slice(l,c).replace(ct,N),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),u&&(i=!0,p+="';\n"+u+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+t.length,t})),p+="';\n";var v=bi.call(t,"variable")&&t.variable;if(v){if(Ye.test(v))throw new ui("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(i?p.replace(Pe,""):p).replace(Ae,"$1").replace(Te,"$1;"),p="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=lc((function(){return ci(c,h+"return "+p).apply(a,s)}));if(y.source=p,Eo(y))throw y;return y},j.times=function(e,t){if((e=Mo(e))<1||e>X)return[];var n=te,r=Gi(e,te);t=Ir(t),e-=te;for(var o=P(r,t);++n<e;)t(n);return o},j.toFinite=Lo,j.toInteger=Mo,j.toLength=No,j.toLower=function(e){return zo(e).toLowerCase()},j.toNumber=Uo,j.toSafeInteger=function(e){return e?jt(Mo(e),-9007199254740991,X):0===e?e:0},j.toString=zo,j.toUpper=function(e){return zo(e).toUpperCase()},j.trim=function(e,t,n){if((e=zo(e))&&(n||t===a))return A(e);if(!e||!(t=ja(t)))return e;var r=W(e),o=W(t);return Yn(r,D(r,o),L(r,o)+1).join("")},j.trimEnd=function(e,t,n){if((e=zo(e))&&(n||t===a))return e.slice(0,K(e)+1);if(!e||!(t=ja(t)))return e;var r=W(e);return Yn(r,0,L(r,W(t))+1).join("")},j.trimStart=function(e,t,n){if((e=zo(e))&&(n||t===a))return e.replace(We,"");if(!e||!(t=ja(t)))return e;var r=W(e);return Yn(r,D(r,W(t))).join("")},j.truncate=function(e,t){var n=30,r="...";if($o(t)){var o="separator"in t?t.separator:o;n="length"in t?Mo(t.length):n,r="omission"in t?ja(t.omission):r}var i=(e=zo(e)).length;if(U(e)){var u=W(e);i=u.length}if(n>=i)return e;var c=n-H(r);if(c<1)return r;var s=u?Yn(u,0,c).join(""):e.slice(0,c);if(o===a)return s+r;if(u&&(c+=s.length-c),Du(o)){if(e.slice(c).search(o)){var l,f=s;for(o.global||(o=fi(o.source,zo(et.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;s=s.slice(0,p===a?c:p)}}else if(e.indexOf(ja(o),c)!=c){var d=s.lastIndexOf(o);d>-1&&(s=s.slice(0,d))}return s+r},j.unescape=function(e){return(e=zo(e))&&De.test(e)?e.replace(Ie,sn):e},j.uniqueId=function(e){var t=++wi;return zo(e)+t},j.upperCase=cc,j.upperFirst=sc,j.each=vo,j.eachRight=yo,j.first=ao,ei(j,(xu={},Ft(j,(function(e,t){bi.call(j.prototype,t)||(xu[t]=e)})),xu),{chain:!1}),j.VERSION="4.17.21",s(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){j[e].placeholder=j})),s(["drop","take"],(function(e,t){lt.prototype[e]=function(n){n=n===a?1:Zi(Mo(n),0);var r=this.__filtered__&&!t?new lt(this):this.clone();return r.__filtered__?r.__takeCount__=Gi(n,r.__takeCount__):r.__views__.push({size:Gi(n,te),type:e+(r.__dir__<0?"Right":"")}),r},lt.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),s(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;lt.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ir(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),s(["head","last"],(function(e,t){var n="take"+(t?"Right":"");lt.prototype[e]=function(){return this[n](1).value()[0]}})),s(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");lt.prototype[e]=function(){return this.__filtered__?new lt(this):this[n](1)}})),lt.prototype.compact=function(){return this.filter(Jo)},lt.prototype.find=function(e){return this.filter(e).head()},lt.prototype.findLast=function(e){return this.reverse().find(e)},lt.prototype.invokeMap=Pn((function(e,t){return"function"==typeof e?new lt(this):this.map((function(n){return dn(n,e,t)}))})),lt.prototype.reject=function(e){return this.filter(_o(Ir(e)))},lt.prototype.slice=function(e,t){e=Mo(e);var n=this;return n.__filtered__&&(e>0||t<0)?new lt(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==a&&(n=(t=Mo(t))<0?n.dropRight(-t):n.take(t-e)),n)},lt.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},lt.prototype.toArray=function(){return this.take(te)},Ft(lt.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),i=j[o?"take"+("last"==t?"Right":""):t],u=o||/^find/.test(t);i&&(j.prototype[t]=function(){var t=this.__wrapped__,c=o?[1]:arguments,s=r(t,lt),l=c[0],f=s||Pu(t),p=function(e){var t=i.apply(j,y([e],c));return o&&d?t[0]:t};f&&n&&"function"==typeof l&&1!=l.length&&(s=f=!1);var d=this.__chain__,h=!!this.__actions__.length,v=u&&!d,m=s&&!h;if(!u&&f){t=m?t:new lt(this);var g=e.apply(t,c);return g.__actions__.push({func:ho,args:[p],thisArg:a}),new st(g,d)}return v&&m?e.apply(this,c):(g=this.thru(p),v?o?g.value()[0]:g.value():g)})})),s(["pop","push","shift","sort","splice","unshift"],(function(e){var t=hi[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);j.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Pu(o)?o:[],e)}return this[n]((function(n){return t.apply(Pu(n)?n:[],e)}))}})),Ft(lt.prototype,(function(e,t){var n=j[t];if(n){var r=n.name+"";bi.call(ua,r)||(ua[r]=[]),ua[r].push({name:t,func:n})}})),ua[Pa(a,2).name]=[{name:"wrapper",func:a}],lt.prototype.clone=function(){var e=new lt(this.__wrapped__);return e.__actions__=or(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=or(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=or(this.__views__),e},lt.prototype.reverse=function(){if(this.__filtered__){var e=new lt(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},lt.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Pu(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=Gi(t,e+a);break;case"takeRight":e=Zi(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,u=i.end,c=u-a,s=r?u:a-1,l=this.__iteratees__,f=l.length,p=0,d=Gi(c,this.__takeCount__);if(!n||!r&&o==c&&d==c)return Wn(e,this.__actions__);var h=[];e:for(;c--&&p<d;){for(var v=-1,y=e[s+=t];++v<f;){var m=l[v],g=m.iteratee,b=m.type,w=g(y);if(2==b)y=w;else if(!w){if(1==b)continue e;break e}}h[p++]=y}return h},j.prototype.at=uu,j.prototype.chain=function(){return po(this)},j.prototype.commit=function(){return new st(this.value(),this.__chain__)},j.prototype.next=function(){this.__values__===a&&(this.__values__=Do(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?a:this.__values__[this.__index__++]}},j.prototype.plant=function(e){for(var t,n=this;r(n,Ke);){var o=no(n);o.__index__=0,o.__values__=a,t?i.__wrapped__=o:t=o;var i=o;n=n.__wrapped__}return i.__wrapped__=e,t},j.prototype.reverse=function(){var e=this.__wrapped__;if(r(e,lt)){var t=e;return this.__actions__.length&&(t=new lt(this)),(t=t.reverse()).__actions__.push({func:ho,args:[so],thisArg:a}),new st(t,this.__chain__)}return this.thru(so)},j.prototype.toJSON=j.prototype.valueOf=j.prototype.value=function(){return Wn(this.__wrapped__,this.__actions__)},j.prototype.first=j.prototype.head,Di&&(j.prototype[Di]=function(){return this}),j}();qt._=ln,(i=function(){return ln}.call(t,n,t,e))===a||(e.exports=i)}.call(this)},385:function(){System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e,t){for(var n in t)e[n]=t[n];return e},t=function(t){var n=function(e){for(var t=[],n=0;n<o.length;n++)o[n]===e?e=null:t.push(o[n]);o=t},r=function(n,r,i){t=r?n:e(e({},t),n);for(var a=o,u=0;u<a.length;u++)a[u](t,i)},o=[];return t=t||{},{action:function(e){var n=function(t){r(t,!1,e)};return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:r,subscribe:function(e){return o.push(e),function(){n(e)}},unsubscribe:n,getState:function(){return t}}},n=function(e,n){var r=s[e];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=t(n);return s[e]={value:o,active:!0},o},i=function(e,n){var r=s[e];if(!r){var o=t(n);return s[e]={value:o,active:!1},o}return r.value},a=function(e){return n("app",e)},u=function(){return i("app",{})},c=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},766:function(e){"use strict";e.exports=h},824:function(e){"use strict";e.exports=c},45:function(e){"use strict";e.exports=s},728:function(e){"use strict";e.exports=l},688:function(e){"use strict";e.exports=v},64:function(e){"use strict";e.exports=p},954:function(e){"use strict";e.exports=u},493:function(e){"use strict";e.exports=f},281:function(e){"use strict";e.exports=d}},y={};function m(e){var t=y[e];if(void 0!==t)return t.exports;var n=y[e]={id:e,loaded:!1,exports:{}};return i[e].call(n.exports,n,n.exports,m),n.loaded=!0,n.exports}m.y=a,m.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return m.d(t,{a:t}),t},m.d=function(e,t){for(var n in t)m.o(t,n)&&!m.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},m.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),m.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},m.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},m.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e;m.g.importScripts&&(e=m.g.location+"");var t=m.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),m.p=e}();var g={};return(0,m(968).s)(1),function(){"use strict";var i=function(e){var t=e.to,n=e.templateParams,r=e.children,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["to","templateParams","children"]);return Re.default.createElement("a",Me({onClick:function(e){return o=t,i=n,void((r=e).metaKey||r.ctrlKey||r.shiftKey||0!=r.button||(r.preventDefault(),(0,Le.navigate)({to:o,templateParams:i})));var r,o,i},href:(0,Le.interpolateUrl)(t,n)},o),r)},a=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},u=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},c=function(e){return function(t){var n,r=function(e){if(Array.isArray(e))return e}(n=(0,Re.useState)(e.getState()))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n)||function(e,t){if(e){if("string"==typeof e)return a(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,2):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=r[0],i=r[1];(0,Re.useEffect)((function(){return e.subscribe((function(e){return i(e)}))}),[]);var c={};return t&&(c=(0,Re.useMemo)((function(){return function(e,t){"function"==typeof t&&(t=t(e));var n={};for(var r in t)n[r]=e.action(t[r]);return n}(e,t)}),[e,t])),function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){u(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({},o,c)}},s=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},l=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},f=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)(window.navigator.onLine))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return l(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Re.useEffect)((function(){return(0,Be.subscribeConnectivityChanged)((function(e){var t=e.online;return r(t)}))}),[]),n},p=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},d=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Re.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return p(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1];return(0,Re.useEffect)((function(){var t=function(t){var n,i,a=null!==(i=null===(n=t.slots[e])||void 0===n?void 0:n.assignedExtensions)&&void 0!==i?i:[];(0,ze.isEqual)(a,r)||o(a)};return t((0,Ne.getExtensionStore)().getState()),(0,Ne.getExtensionStore)().subscribe(t)}),[e,r]),r},h=function(e){var t=f(),n=d(e);return(0,Re.useMemo)((function(){return(0,Ne.getConnectedExtensions)(n,t)}),[n,t])},v=function(e){var t=(0,Re.useContext)(De).moduleName;if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,Re.useEffect)((function(){(0,Ne.registerExtensionSlot)(t,e)}),[]),{extensions:h(e),extensionSlotName:e,extensionSlotModuleName:t}},y=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},b=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){y(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},w=function(e){return e},_=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},x=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{};n%2?_(Object(r),!0).forEach((function(t){S(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))},r=1;r<arguments.length;r++)n(r);return e},S=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},O=function(e,t){var n;if("function"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(Ke(n)));return function(){var e=n(t);if(!r(e,HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(Ke(e)));return e}},E=function(e){if("object"!==We(e))throw new Error("single-spa-react requires a configuration object");var t=x(x({},Ze),e);if(!t.React)throw new Error("single-spa-react must be passed opts.React");if(!t.ReactDOM)throw new Error("single-spa-react must be passed opts.ReactDOM");if(!t.rootComponent&&!t.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(t.errorBoundary&&"function"!=typeof t.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!qe&&t.React.createContext&&(qe=t.React.createContext()),t.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(t);var n={bootstrap:k.bind(null,t),mount:j.bind(null,t),unmount:C.bind(null,t)};return t.parcelCanUpdate&&(n.update=$.bind(null,t)),n},k=function(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then((function(t){e.rootComponent=t}))},j=function(e,t){return new Promise((function(n,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=P(e,t,(function(){n(this)})),i=O(e,t)(),a=function(e){var t=e.opts,n=e.elementToRender,r=e.domElement,o="function"==typeof t.renderType?t.renderType():t.renderType;if(["createRoot","unstable_createRoot","createBlockingRoot","unstable_createBlockingRoot"].indexOf(o)>=0){var i=t.ReactDOM[o](r);return i.render(n),i}return"hydrate"===o?t.ReactDOM.hydrate(n,r):t.ReactDOM.render(n,r),null}({elementToRender:o,domElement:i,opts:e});e.domElements[t.name]=i,e.renderResults[t.name]=a}))},C=function(e,t){return new Promise((function(n){e.unmountFinished=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():e.ReactDOM.unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]}))},$=function(e,t){return new Promise((function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=P(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=O(e,t)();e.ReactDOM.render(r,i)}}))},P=function(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=qe?e.React.createElement(qe.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),e.React.createElement(e.SingleSpaRoot,x(x({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach((function(e){return e()})),delete e.updateResolves[t.name])},unmountFinished:function(){setTimeout(e.unmountFinished)}}),o)},A=function(e,t){return!t||"object"!==et(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t},T=function(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw new Error("Invalid options");var t=Object.assign({},nt,e);return function(e){var n;return(n=function(n){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xe(e,t)}(u,n);var o,i,a=(o=u,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Je(o);if(i){var n=Je(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return A(this,e)});function u(e){var n;return function(e,t){if(!r(e,t))throw new TypeError("Cannot call a class as a function")}(this,u),(n=a.call(this,e)).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,extension:e._extensionContext}},n}var c=u.prototype;return c.componentDidCatch=function(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout((function(){throw e})),this.setState({caughtError:e,caughtErrorInfo:n})},c.render=function(){if(this.state.caughtError)return Re.default.createElement("div",null,"An error has occurred. Please try reloading the page.");var n=this,r=Re.default.createElement(De.Provider,{value:this.state.config},Re.default.createElement(Re.default.Suspense,{fallback:null},t.disableTranslations?Re.default.createElement(e,Ye({},this.props)):Re.default.createElement(rt,{ns:t.moduleName,forceUpdate:function(){return n.forceUpdate()}},Re.default.createElement(Qe.I18nextProvider,{i18n:tt,defaultNS:t.moduleName},Re.default.createElement(e,Ye({},this.props))))));return t.strictMode||!Re.default.StrictMode?r:Re.default.createElement(Re.default.StrictMode,null,r)},u}(Re.default.Component)).displayName="OpenmrsReactComponent(".concat(t.featureName,")"),n}},I=function(e,t){return E({React:Re.default,ReactDOM:He.default,rootComponent:T(t)(e)})},R=function(e,t){return function(){return e().then((function(e){return I(e.default,t)}))}},D=function(e,t){return function(){return Promise.resolve(I(e,t))}},L=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},M=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Re.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return L(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1];return(0,Re.useEffect)((function(){return(0,Ne.getExtensionStore)().subscribe((function(t){var n,i,a=null!==(i=null===(n=t.slots[e])||void 0===n?void 0:n.assignedExtensions.map((function(e){return e.id})))&&void 0!==i?i:[];(0,ze.isEqual)(a,r)||o(a)}))}),[]),r},N=function(e){(0,Re.useEffect)((function(){if(e){var t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=t}}}),[e])},U=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},B=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},z=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},F=function(e){var t=this.__data__=new st(e);this.size=t.size},V=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Bt;++t<n;)this.add(e[t])},H=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},W=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},K=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return H(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},q=function(){var e=(0,Re.useContext)(De),t=e.moduleName,n=e.extension;if(!t&&!n)throw Error('No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".');var r=function(e){var t,n,r,o,i,a,u=(0,Re.useMemo)((function(){return(0,Le.getConfigStore)(e)}),[e]),c=e,s=(t=u,o=(r=K((0,Re.useState)((n=t,function(){var e=n.getState();return e.loaded&&e.config?e.config:null})),2))[0],i=r[1],(0,Re.useEffect)((function(){return null==t?void 0:t.subscribe((function(e){e.loaded&&e.config&&i(e.config)}))}),[t]),o);if(!s)throw tr[c]||(tr[c]=(a=u,new Promise((function(e){var t=a.subscribe((function(n){n.loaded&&n.config&&(e(n.config),t())}))})))),tr[c];return s}(t),o=function(e){var t,n,r,o,i,a,u,c,s,l=(0,Re.useMemo)(Le.getExtensionsConfigStore,[]),f=(t=l,n=e,i=K((0,Re.useState)((r=t,(o=n)?function(){var e=r.getState(),t=(0,Le.getExtensionConfigFromStore)(e,o.extensionSlotName,o.extensionId);if(t.loaded&&t.config)return t.config}:null)),2),a=i[0],u=i[1],(0,Re.useEffect)((function(){if(n)return t.subscribe((function(e){var t=(0,Le.getExtensionConfigFromStore)(e,n.extensionSlotName,n.extensionId);t.loaded&&t.config&&!er(t.config,a)&&u(t.config)}))}),[t,n,a]),a);if(!f&&e){var p="".concat(e.extensionSlotName,"-").concat(e.extensionId);throw!tr[p]&&l&&(tr[p]=(c=l,s=e,new Promise((function(e){var t=c.subscribe((function(n){var r=(0,Le.getExtensionConfigFromStore)(n,s.extensionSlotName,s.extensionId);r.loaded&&r.config&&(e(r.config),t())}))})))),tr[p]}return f||{}}(n),i=(0,Re.useMemo)((function(){return function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){W(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({},r,o)}),[r,o]);return i},Z=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},G=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Q=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){G(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},Y=function(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]},J=function(e,t){switch(t.type){case Kn.loadPatient:return Q({},e,{patientUuid:t.patientUuid,patient:null,isPendingUuid:!1,isLoadingPatient:!0,err:null});case Kn.newPatient:return Q({},e,{patient:t.patient,isPendingUuid:!1,isLoadingPatient:!1,err:null});case Kn.loadError:return Q({},e,{patient:null,isPendingUuid:!1,isLoadingPatient:!1,err:t.err});default:return e}},X=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Re.useReducer)(J,Q({},ir,{patientUuid:null!=e?e:null,isPendingUuid:!e,isLoadingPatient:!!e})))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return Z(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1];return(0,Re.useEffect)((function(){if(r.isPendingUuid){var e=Y();o(e?{type:Kn.loadPatient,patientUuid:e}:{type:Kn.newPatient,patient:null})}var t=!0;return r.isLoadingPatient&&r.patientUuid&&(0,nr.fetchCurrentPatient)(r.patientUuid).then((function(e){return t&&o({patient:e.data,type:Kn.newPatient})}),(function(e){return t&&o({err:e,type:Kn.loadError})})),function(){t=!1}}),[r.isPendingUuid,r.isLoadingPatient,r.patientUuid]),(0,Re.useEffect)((function(){var e=function(e){var t=Y();t!=r.patientUuid&&o({type:Kn.loadPatient,patientUuid:t})};return window.addEventListener("single-spa:routing-event",e),function(){return window.removeEventListener("single-spa:routing-event",e)}}),[r.patientUuid]),{isLoading:r.isPendingUuid||r.isLoadingPatient,patient:r.patient,patientUuid:null!=e?e:r.patientUuid,error:r.err}},ee=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},te=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ne=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){te(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},re=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ee(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},oe=function(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]},ie=function(e,t){switch(t.type){case rr.loadPatient:return ne({},e,{patient:null,isLoadingPatient:!0,err:null});case rr.newPatient:return ne({},e,{patient:t.patient,isLoadingPatient:!1,err:null});case rr.loadError:return ne({},e,{patient:null,isLoadingPatient:!1,err:t.err});default:return e}},ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe(),t=re((0,Re.useReducer)(ie,sr),2),n=t[0],r=t[1];return(0,Re.useEffect)((function(){var t=!0;return e?((0,nr.fetchCurrentPatient)(e).then((function(e){return t&&r({patient:e.data,type:rr.newPatient})}),(function(e){return t&&r({err:e,type:rr.loadError})})),r({type:rr.loadPatient})):r({type:rr.newPatient,patient:null}),function(){t=!1}}),[e]),[n.isLoadingPatient,n.patient,e,n.err]},ue=function(e){var t=h(e);return(0,Re.useMemo)((function(){return Object.fromEntries(t.map((function(e){return[e.name,e.meta]})))}),[t])},ce=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},se=function(){var e,t=(e=(0,Re.useState)(0),function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return ce(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ce(e,2):void 0}}(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.")}())[1];return(0,Re.useCallback)((function(){t((function(e){return e+1}))}),[])},le=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},fe=function(){var e="tablet";return document.body.classList.forEach((function(t){switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-tablet":e="desktop"}})),e},pe=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)(fe))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return le(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?le(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Re.useEffect)((function(){var e=function(){r(fe())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),n},de=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},he=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return de(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?de(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Re.useEffect)((function(){var e=(0,nr.getLocations)().subscribe((function(e){r(e)}),(function(e){console.error(e)}));return function(){return e.unsubscribe()}}),[]),n},ve=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,Re.useRef)(null);return(0,Re.useEffect)((function(){if(t){var r=function(t){var r;(null==n||null===(r=n.current)||void 0===r?void 0:r.contains(t.target))||e(t)};return window.addEventListener("click",r),function(){return window.removeEventListener("click",r)}}}),[e,t]),n},ye=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},me=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},ge=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)(null))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return me(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?me(e,2):void 0}}(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.")}(),n=t[0],r=t[1],o=null;if(!n){if(ar){var i=(0,nr.getSessionStore)().getState();i.loaded&&(o=i.session)}else ar=new Promise((function(e){var t=function(t){var n=t.loaded,r=t.session;n&&(e(r),o=r,ur&&ur(),ur=void 0)};t((0,nr.getSessionStore)().getState()),o||(ur=(0,nr.getSessionStore)().subscribe(t))}));if(!o)throw ar;r(o)}(0,Re.useEffect)((function(){return ur||(ur=(0,nr.getSessionStore)().subscribe((function(e){var t=e.loaded,n=e.session;t&&(o=n,r(n))}))),function(){ur&&ur(),ur=void 0}}),[]);var a=n||o;if(!a)throw ar?(console.warn("useSession is in an unexpected state. Attempting to recover."),ar):Error("useSession is in an invalid state.");return a},be=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},we=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},_e=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){we(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},xe=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return be(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?be(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Se=function(e,t){"function"==typeof t&&(t=t(e));var n={};for(var r in t)n[r]=e.action(t[r]);return n},Oe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hr,n=arguments.length>2?arguments[2]:void 0,r=xe((0,Re.useState)((function(){return t(e.getState())})),2),o=r[0],i=r[1];(0,Re.useEffect)((function(){return(0,dr.subscribeTo)(e,t,i)}),[e,t]);var a={};return n&&(a=(0,Re.useMemo)((function(){return Se(e,n)}),[e,n])),_e({},o,a)},Ee=function(e,t){return Oe(e,hr,t)},ke=function(e,t,n,o){return new(n||(n=Promise))((function(i,a){var u=function(e){try{s(o.next(e))}catch(e){a(e)}},c=function(e){try{s(o.throw(e))}catch(e){a(e)}},s=function(e){var t;e.done?i(e.value):(t=e.value,r(t,n)?t:new n((function(e){e(t)}))).then(u,c)};s((o=o.apply(e,t||[])).next())}))},je=function(e,t){var n,r,o,i,a=function(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)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 u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}},u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i},Ce=function(e){var t,n=ro(e?"/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(nr.defaultVisitCustomRepresentation,"&includeInactive=false"):null,nr.openmrsFetch),r=n.data,o=n.error;return{error:o,mutate:n.mutate,isValidating:n.isValidating,currentVisit:(0,Re.useMemo)((function(){return null!==(t=null==r?void 0:r.data.results.find((function(e){return null===e.stopDatetime&&(0,oo.default)(e.startDatetime).isToday()})))&&void 0!==t?t:null}),[null==r?void 0:r.data.results]),isLoading:!r&&!o}},$e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Pe=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return $e(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$e(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Re.useEffect)((function(){var e=(0,nr.getVisitTypes)().subscribe((function(e){r(e)}),(function(e){return console.error(e)}));return function(){return e.unsubscribe()}}),[]),n},Ae=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Te=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ae(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ae(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=Te((0,Re.useState)(1),2),r=n[0],o=n[1],i=(0,Re.useMemo)((function(){return Math.max(1,Math.ceil(e.length/t))}),[e.length,t]),a=(0,Re.useMemo)((function(){var n=(r-1)*t,o=(r+0)*t;return e.slice(n,o)}),[e,r,t]);return{results:a,totalPages:i,currentPage:r,paginated:e.length>t,showNextButton:r<i,showPreviousButton:r>1,goTo:function(e){o(Math.max(1,Math.min(i,e)))},goToNext:function(){r<i&&o(r+1)},goToPrevious:function(){r>1&&o(r-1)}}};m.r(g),m.d(g,{ComponentContext:function(){return De},ConfigurableLink:function(){return i},Extension:function(){return Ue},ExtensionSlot:function(){return Ve},UserHasAccess:function(){return pr},createUseStore:function(){return c},getAsyncExtensionLifecycle:function(){return ot},getAsyncLifecycle:function(){return R},getLifecycle:function(){return I},getSyncLifecycle:function(){return D},openmrsComponentDecorator:function(){return T},useAssignedExtensionIds:function(){return M},useAssignedExtensions:function(){return d},useBodyScrollLock:function(){return N},useConfig:function(){return q},useConnectedExtensions:function(){return h},useConnectivity:function(){return f},useCurrentPatient:function(){return ae},useExtensionInternalStore:function(){return lr},useExtensionSlot:function(){return v},useExtensionSlotMeta:function(){return ue},useExtensionStore:function(){return fr},useForceUpdate:function(){return se},useLayoutType:function(){return pe},useLocations:function(){return he},useOnClickOutside:function(){return ve},usePagination:function(){return Ie},usePatient:function(){return X},useSession:function(){return ge},useStore:function(){return Oe},useStoreWithActions:function(){return Ee},useVisit:function(){return Ce},useVisitTypes:function(){return Pe}});var Re=m(954),De=Re.default.createContext({moduleName:""}),Le=m(824);function Me(){return Me=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Me.apply(this,arguments)}var Ne=m(45),Ue=function(e){var t,n=e.state,r=e.wrap,o=function(e){if(Array.isArray(e))return e}(t=(0,Re.useState)())||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return s(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=o[0],a=o[1],u=(0,Re.useContext)(De).extension,c=(0,Re.useCallback)((function(e){a(e)}),[]);(0,Re.useEffect)((function(){if(null!=i&&u)return(0,Ne.renderExtension)(i,u.extensionSlotName,u.extensionSlotModuleName,u.extensionId,void 0,n)}),[null==u?void 0:u.extensionSlotName,null==u?void 0:u.extensionId,null==u?void 0:u.extensionSlotModuleName,n,i]);var l=Re.default.createElement("div",{ref:c,"data-extension-id":null==u?void 0:u.extensionId,style:{position:"relative"}});return u&&r?r(l,u):l},Be=m(728),ze=m(891);function Fe(){return Fe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fe.apply(this,arguments)}var Ve=function(e){var t=e.extensionSlotName,n=e.select,r=void 0===n?w:n,o=e.children,i=e.state,a=e.style,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["extensionSlotName","select","children","state","style"]),c=(0,Re.useRef)(null),s=v(t),l=s.extensions,f=s.extensionSlotModuleName,p=(0,Re.useRef)(i);(function(e,t){if(e===t)return!0;if(!e&&t)return!1;if(e&&!t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(!(i in t)||t[i]!==e[i])return!1}return!0})(p.current,i)||(p.current=i);var d=(0,Re.useMemo)((function(){return t&&r(l).map((function(e){return Re.default.createElement(De.Provider,{key:e.id,value:{moduleName:f,extension:{extensionId:e.id,extensionSlotName:t,extensionSlotModuleName:f}}},null!=o?o:Re.default.createElement(Ue,{state:p.current}))}))}),[r,l,t,p.current]);return Re.default.createElement("div",Fe({ref:c,"data-extension-slot-name":t,"data-extension-slot-module-name":f,style:b({},a,{position:"relative"})},u),d)},He=m(493);function We(e){return(We="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":o(e)})(e)}function Ke(e){return(Ke="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":o(e)})(e)}var qe=null;try{qe=n(2735).createContext()}catch(e){}var Ze={React:null,ReactDOM:null,rootComponent:null,loadRootComponent:null,renderType:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{}},Ge=m(64),Qe=m(281);function Ye(){return Ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ye.apply(this,arguments)}function Je(e){return(Je=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xe(e,t){return(Xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var et=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":o(e)},tt=Ge.default.default||Ge.default,nt={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},rt=function(e){(0,Re.useEffect)((function(){return tt.on("languageChanged",e.forceUpdate),function(){return tt.off("languageChanged",e.forceUpdate)}}),[e.forceUpdate]);var t=(0,Re.useRef)(null);if(t.current)throw t.current;if(!tt.hasLoadedNamespace(e.ns)){var n=setTimeout((function(){console.warn("openmrsComponentDecorator: the React suspense promise for i18next.loadNamespaces(['".concat(e.ns,"']) did not resolve nor reject after three seconds. This could mean you have multiple versions of i18next and haven't made i18next a webpack external in all projects."))}),3e3);throw tt.loadNamespaces([e.ns]).then((function(){return clearTimeout(n)})).catch((function(e){clearTimeout(n),t.current=e}))}return Re.default.createElement(Re.default.Fragment,null,e.children)},ot=R,it=function(e,t){return e===t||e!=e&&t!=t},at=function(e,t){for(var n=e.length;n--;)if(it(e[n][0],t))return n;return-1},ut=Array.prototype.splice;U.prototype.clear=function(){this.__data__=[],this.size=0},U.prototype.delete=function(e){var t=this.__data__,n=at(t,e);return!(n<0||(n==t.length-1?t.pop():ut.call(t,n,1),--this.size,0))},U.prototype.get=function(e){var t=this.__data__,n=at(t,e);return n<0?void 0:t[n][1]},U.prototype.has=function(e){return at(this.__data__,e)>-1},U.prototype.set=function(e,t){var n=this.__data__,r=at(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var ct,st=U,lt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ft="object"==typeof self&&self&&self.Object===Object&&self,pt=lt||ft||Function("return this")(),dt=pt.Symbol,ht=Object.prototype,vt=ht.hasOwnProperty,yt=ht.toString,mt=dt?dt.toStringTag:void 0,gt=Object.prototype.toString,bt=dt?dt.toStringTag:void 0,wt=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":bt&&bt in Object(e)?function(e){var t=vt.call(e,mt),n=e[mt];try{e[mt]=void 0;var r=!0}catch(e){}var o=yt.call(e);return r&&(t?e[mt]=n:delete e[mt]),o}(e):(t=e,gt.call(t));var t},_t=function(e){var t=void 0===e?"undefined":o(e);return null!=e&&("object"==t||"function"==t)},xt=function(e){if(!_t(e))return!1;var t=wt(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},St=pt["__core-js_shared__"],Ot=(ct=/[^.]+$/.exec(St&&St.keys&&St.keys.IE_PROTO||""))?"Symbol(src)_1."+ct:"",Et=Function.prototype.toString,kt=function(e){if(null!=e){try{return Et.call(e)}catch(e){}try{return e+""}catch(e){}}return""},jt=/^\[object .+?Constructor\]$/,Ct=Function.prototype,$t=Object.prototype,Pt=Ct.toString,At=$t.hasOwnProperty,Tt=RegExp("^"+Pt.call(At).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),It=function(e,t){var n,r,o=null==(n=e)?void 0:n[t];return!_t(r=o)||Ot&&Ot in r||!(xt(r)?Tt:jt).test(kt(r))?void 0:o},Rt=It(pt,"Map"),Dt=It(Object,"create"),Lt=Object.prototype.hasOwnProperty,Mt=Object.prototype.hasOwnProperty;B.prototype.clear=function(){this.__data__=Dt?Dt(null):{},this.size=0},B.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},B.prototype.get=function(e){var t=this.__data__;if(Dt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Lt.call(t,e)?t[e]:void 0},B.prototype.has=function(e){var t=this.__data__;return Dt?void 0!==t[e]:Mt.call(t,e)},B.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Dt&&void 0===t?"__lodash_hash_undefined__":t,this};var Nt=B,Ut=function(e,t){var n,r,i=e.__data__;return("string"==(r=o(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};z.prototype.clear=function(){this.size=0,this.__data__={hash:new Nt,map:new(Rt||st),string:new Nt}},z.prototype.delete=function(e){var t=Ut(this,e).delete(e);return this.size-=t?1:0,t},z.prototype.get=function(e){return Ut(this,e).get(e)},z.prototype.has=function(e){return Ut(this,e).has(e)},z.prototype.set=function(e,t){var n=Ut(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Bt=z;F.prototype.clear=function(){this.__data__=new st,this.size=0},F.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},F.prototype.get=function(e){return this.__data__.get(e)},F.prototype.has=function(e){return this.__data__.has(e)},F.prototype.set=function(e,t){var n=this.__data__;if(r(n,st)){var o=n.__data__;if(!Rt||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new Bt(o)}return n.set(e,t),this.size=n.size,this};var zt=F;V.prototype.add=V.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},V.prototype.has=function(e){return this.__data__.has(e)};var Ft=V,Vt=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Ht=function(e,t){return e.has(t)},Wt=function(e,t,n,r,o,i){var a=1&n,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(e),l=i.get(t);if(s&&l)return s==t&&l==e;var f=-1,p=!0,d=2&n?new Ft:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var h=e[f],v=t[f];if(r)var y=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==y){if(y)continue;p=!1;break}if(d){if(!Vt(t,(function(e,t){if(!Ht(d,t)&&(h===e||o(h,e,n,r,i)))return d.push(t)}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p},Kt=pt.Uint8Array,qt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Zt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Gt=dt?dt.prototype:void 0,Qt=Gt?Gt.valueOf:void 0,Yt=Array.isArray,Jt=Object.prototype.propertyIsEnumerable,Xt=Object.getOwnPropertySymbols,en=Xt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(Xt(e),(function(t){return Jt.call(e,t)})))}:function(){return[]},tn=function(e){return null!=e&&"object"==typeof e},nn=function(e){return tn(e)&&"[object Arguments]"==wt(e)},rn=Object.prototype,on=rn.hasOwnProperty,an=rn.propertyIsEnumerable,un=nn(function(){return arguments}())?nn:function(e){return tn(e)&&on.call(e,"callee")&&!an.call(e,"callee")},cn=un,sn=t&&!t.nodeType&&t,ln=sn&&e&&!e.nodeType&&e,fn=ln&&ln.exports===sn?pt.Buffer:void 0,pn=(fn?fn.isBuffer:void 0)||function(){return!1},dn=/^(?:0|[1-9]\d*)$/,hn=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},vn={};vn["[object Float32Array]"]=vn["[object Float64Array]"]=vn["[object Int8Array]"]=vn["[object Int16Array]"]=vn["[object Int32Array]"]=vn["[object Uint8Array]"]=vn["[object Uint8ClampedArray]"]=vn["[object Uint16Array]"]=vn["[object Uint32Array]"]=!0,vn["[object Arguments]"]=vn["[object Array]"]=vn["[object ArrayBuffer]"]=vn["[object Boolean]"]=vn["[object DataView]"]=vn["[object Date]"]=vn["[object Error]"]=vn["[object Function]"]=vn["[object Map]"]=vn["[object Number]"]=vn["[object Object]"]=vn["[object RegExp]"]=vn["[object Set]"]=vn["[object String]"]=vn["[object WeakMap]"]=!1;var yn,mn,gn,bn=t&&!t.nodeType&&t,wn=bn&&e&&!e.nodeType&&e,_n=wn&&wn.exports===bn&&lt.process,xn=function(){try{return wn&&wn.require&&wn.require("util").types||_n&&_n.binding&&_n.binding("util")}catch(e){}}(),Sn=xn&&xn.isTypedArray,On=Sn?(yn=Sn,function(e){return yn(e)}):function(e){return tn(e)&&hn(e.length)&&!!vn[wt(e)]},En=Object.prototype.hasOwnProperty,kn=Object.prototype,jn=(mn=Object.keys,gn=Object,function(e){return mn(gn(e))}),Cn=Object.prototype.hasOwnProperty,$n=function(e){return i=en,a=null!=(n=t=r=e)&&hn(n.length)&&!xt(n)?function(e,t){var n,r,i,a=Yt(e),u=!a&&cn(e),c=!a&&!u&&pn(e),s=!a&&!u&&!c&&On(e),l=a||u||c||s,f=l?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],p=f.length;for(var d in e)!En.call(e,d)||l&&("length"==d||c&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||(r=p,i=void 0===(n=d)?"undefined":o(n),(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&dn.test(n))&&n>-1&&n%1==0&&n<r))||f.push(d);return f}(t):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||kn))return jn(e);var t,n,r=[];for(var o in Object(e))Cn.call(e,o)&&"constructor"!=o&&r.push(o);return r}(t),Yt(r)?a:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(a,i(r));var t,n,r,i,a},Pn=Object.prototype.hasOwnProperty,An=It(pt,"DataView"),Tn=It(pt,"Promise"),In=It(pt,"Set"),Rn=It(pt,"WeakMap"),Dn="[object Map]",Ln="[object Promise]",Mn="[object Set]",Nn="[object WeakMap]",Un="[object DataView]",Bn=kt(An),zn=kt(Rt),Fn=kt(Tn),Vn=kt(In),Hn=kt(Rn),Wn=wt;(An&&Wn(new An(new ArrayBuffer(1)))!=Un||Rt&&Wn(new Rt)!=Dn||Tn&&Wn(Tn.resolve())!=Ln||In&&Wn(new In)!=Mn||Rn&&Wn(new Rn)!=Nn)&&(Wn=function(e){var t=wt(e),n="[object Object]"==t?e.constructor:void 0,r=n?kt(n):"";if(r)switch(r){case Bn:return Un;case zn:return Dn;case Fn:return Ln;case Vn:return Mn;case Hn:return Nn}return t});var Kn,qn,Zn=Wn,Gn="[object Arguments]",Qn="[object Array]",Yn="[object Object]",Jn=Object.prototype.hasOwnProperty,Xn=function e(t,n,o,i,a){return t===n||(null==t||null==n||!tn(t)&&!tn(n)?t!=t&&n!=n:function(e,t,n,o,i,a){var u=Yt(e),c=Yt(t),s=u?Qn:Zn(e),l=c?Qn:Zn(t),f=(s=s==Gn?Yn:s)==Yn,p=(l=l==Gn?Yn:l)==Yn,d=s==l;if(d&&pn(e)){if(!pn(t))return!1;u=!0,f=!1}if(d&&!f)return a||(a=new zt),u||On(e)?Wt(e,t,n,o,i,a):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Kt(e),new Kt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return it(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=qt;case"[object Set]":var c=1&r;if(u||(u=Zt),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var l=Wt(u(e),u(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(Qt)return Qt.call(e)==Qt.call(t)}return!1}(e,t,s,n,o,i,a);if(!(1&n)){var h=f&&Jn.call(e,"__wrapped__"),v=p&&Jn.call(t,"__wrapped__");if(h||v){var y=h?e.value():e,m=v?t.value():t;return a||(a=new zt),i(y,m,n,o,a)}}return!!d&&(a||(a=new zt),function(e,t,n,o,i,a){var u=1&n,c=$n(e),s=c.length;if(s!=$n(t).length&&!u)return!1;for(var l=s;l--;){var f=c[l];if(!(u?f in t:Pn.call(t,f)))return!1}var p=a.get(e),d=a.get(t);if(p&&d)return p==t&&d==e;var h=!0;a.set(e,t),a.set(t,e);for(var v=u;++l<s;){var y=e[f=c[l]],m=t[f];if(o)var g=u?o(m,y,f,t,e,a):o(y,m,f,e,t,a);if(!(void 0===g?y===m||i(y,m,n,o,a):g)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,o,i,a))}(t,n,o,i,e,a))},er=function(e,t){return Xn(e,t)},tr={},nr=m(766);(qn=Kn||(Kn={})).loadPatient="loadPatient",qn.newPatient="newPatient",qn.loadError="patientLoadError";var rr,or,ir={patientUuid:null,patient:null,isPendingUuid:!0,isLoadingPatient:!1,err:null};(or=rr||(rr={})).loadPatient="loadPatient",or.newPatient="newPatient",or.loadError="patientLloadErroroadError";var ar,ur,cr,sr={patient:null,isLoadingPatient:!0,err:null},lr=c((0,Ne.getExtensionInternalStore)()),fr=c((0,Ne.getExtensionStore)()),pr=function(e){var t,n=e.privilege,r=e.children,o=function(e){if(Array.isArray(e))return e}(t=(0,Re.useState)(null))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return ye(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ye(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=o[0],a=o[1];return(0,Re.useEffect)((function(){var e=(0,nr.getCurrentUser)({includeAuthStatus:!1}).subscribe(a);return function(){return e.unsubscribe()}}),[]),i&&(0,nr.userHasAccess)(n,i)?Re.default.createElement(Re.default.Fragment,null,r):null},dr=m(385),hr=function(e){return e},vr=function(){},yr=void 0,mr=Object,gr=function(e){return e===yr},br=function(e){return"function"==typeof e},wr=function(e,t){return mr.assign({},e,t)},_r="undefined",xr=function(){return("undefined"==typeof window?"undefined":o(window))!=_r},Sr=new WeakMap,Or=0,Er=function(e){var t,n,r=void 0===e?"undefined":o(e),i=e&&e.constructor,a=i==Date;if(mr(e)!==e||a||i==RegExp)t=a?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=Sr.get(e))return t;if(t=++Or+"~",Sr.set(e,t),i==Array){for(t="@",n=0;n<e.length;n++)t+=Er(e[n])+",";Sr.set(e,t)}if(i==mr){t="#";for(var u=mr.keys(e).sort();!gr(n=u.pop());)gr(e[n])||(t+=n+":"+Er(e[n])+",");Sr.set(e,t)}}return t},kr=!0,jr=xr(),Cr=("undefined"==typeof document?"undefined":o(document))!=_r,$r=jr&&window.addEventListener?window.addEventListener.bind(window):vr,Pr=Cr?document.addEventListener.bind(document):vr,Ar=jr&&window.removeEventListener?window.removeEventListener.bind(window):vr,Tr=Cr?document.removeEventListener.bind(document):vr,Ir={isOnline:function(){return kr},isVisible:function(){var e=Cr&&document.visibilityState;return gr(e)||"hidden"!==e}},Rr={initFocus:function(e){return Pr("visibilitychange",e),$r("focus",e),function(){Tr("visibilitychange",e),Ar("focus",e)}},initReconnect:function(e){var t=function(){kr=!0,e()},n=function(){kr=!1};return $r("online",t),$r("offline",n),function(){Ar("online",t),Ar("offline",n)}}},Dr=!xr()||"Deno"in window,Lr=Dr?Re.useEffect:Re.useLayoutEffect,Mr="undefined"!=typeof navigator&&navigator.connection,Nr=!Dr&&Mr&&(["slow-2g","2g"].includes(Mr.effectiveType)||Mr.saveData),Ur=function(e){if(br(e))try{e=e()}catch(t){e=""}var t=[].concat(e);return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?Er(e):"",t,e?"$swr$"+e:""]},Br=new WeakMap,zr=function(e,t,n,r,o,i,a){void 0===a&&(a=!0);var u=Br.get(e),c=u[0],s=u[1],l=u[3],f=c[t],p=s[t];if(a&&p)for(var d=0;d<p.length;++d)p[d](n,r,o);return i&&(delete l[t],f&&f[0])?f[0](2).then((function(){return e.get(t)})):e.get(t)},Fr=0,Vr=function(){return++Fr},Hr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ke(void 0,void 0,void 0,(function(){var t,n,r,o,i,a,u,c,s,l,f,p,d,h,v,y,m,g,b,w;return je(this,(function(_){switch(_.label){case 0:if(t=e[0],n=e[1],r=e[2],o=e[3],a=!!gr((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,u=!1!==i.revalidate,c=!1!==i.rollbackOnError,s=i.optimisticData,l=Ur(n),f=l[0],p=l[2],!f)return[2];if(d=Br.get(t),h=d[2],e.length<3)return[2,zr(t,f,t.get(f),yr,yr,u,!0)];if(v=r,m=Vr(),h[f]=[m,0],g=!gr(s),b=t.get(f),g&&(t.set(f,s),zr(t,f,s)),br(v))try{v=v(t.get(f))}catch(e){y=e}return v&&br(v.then)?[4,v.catch((function(e){y=e}))]:[3,2];case 1:if(v=_.sent(),m!==h[f][0]){if(y)throw y;return[2,v]}y&&g&&c&&(a=!0,v=b,t.set(f,b)),_.label=2;case 2:return a&&(y||(br(a)&&(v=a(v,b)),t.set(f,v)),t.set(p,wr(t.get(p),{error:y}))),h[f][1]=Vr(),[4,zr(t,f,v,y,yr,u,!!a)];case 3:if(w=_.sent(),y)throw y;return[2,a?w:v]}}))}))},Wr=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},Kr=function(e,t){if(!Br.has(e)){var n=wr(Rr,t),r={},o=Hr.bind(yr,e),i=vr;if(Br.set(e,[r,{},{},{},o]),!Dr){var a=n.initFocus(setTimeout.bind(yr,Wr.bind(yr,r,0))),u=n.initReconnect(setTimeout.bind(yr,Wr.bind(yr,r,1)));i=function(){a&&a(),u&&u(),Br.delete(e)}}return[e,o,i]}return[e,Br.get(e)[4]]},qr=Kr(new Map),Zr=qr[0],Gr=qr[1],Qr=wr({onLoadingSlow:vr,onSuccess:vr,onError:vr,onErrorRetry:function(e,t,n,r,o){var i=n.errorRetryCount,a=o.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!gr(i)&&a>i||setTimeout(r,u,o)},onDiscarded:vr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Nr?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Nr?5e3:3e3,compare:function(e,t){return Er(e)==Er(t)},isPaused:function(){return!1},cache:Zr,mutate:Gr,fallback:{}},Ir),Yr=function(e,t){var n=wr(e,t);if(t){var r=e.use,o=e.fallback,i=t.use,a=t.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=wr(o,a))}return n},Jr=(0,Re.createContext)({}),Xr=function(e){return br(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},eo=function(){return wr(Qr,(0,Re.useContext)(Jr))},to=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},no={dedupe:!0},ro=(mr.defineProperty((function(e){var t=e.value,n=Yr((0,Re.useContext)(Jr),t),r=t&&t.provider,o=(0,Re.useState)((function(){return r?Kr(r(n.cache||Zr),t):yr}))[0];return o&&(n.cache=o[0],n.mutate=o[1]),Lr((function(){return o?o[2]:yr}),[]),(0,Re.createElement)(Jr.Provider,wr(e,{value:n}))}),"default",{value:Qr}),cr=function(e,t,n){var r=n.cache,i=n.compare,a=n.fallbackData,u=n.suspense,c=n.revalidateOnMount,s=n.refreshInterval,l=n.refreshWhenHidden,f=n.refreshWhenOffline,p=Br.get(r),d=p[0],h=p[1],v=p[2],y=p[3],m=Ur(e),g=m[0],b=m[1],w=m[2],_=(0,Re.useRef)(!1),x=(0,Re.useRef)(!1),S=(0,Re.useRef)(g),O=(0,Re.useRef)(t),E=(0,Re.useRef)(n),k=function(){return E.current},j=function(){return k().isVisible()&&k().isOnline()},C=function(e){return r.set(w,wr(r.get(w),e))},$=r.get(g),P=gr(a)?n.fallback[g]:a,A=gr($)?P:$,T=r.get(w)||{},I=T.error,R=!_.current,D=function(){return R&&!gr(c)?c:!k().isPaused()&&(u?!gr(A):gr(A)||n.revalidateIfStale)},L=!(!g||!t)&&(!!T.isValidating||R&&D()),M=function(e,t){var n=(0,Re.useState)({})[1],r=(0,Re.useRef)(e),o=(0,Re.useRef)({data:!1,error:!1,isValidating:!1}),i=(0,Re.useCallback)((function(e){var i=!1,a=r.current;for(var u in e){var c=u;a[c]!==e[c]&&(a[c]=e[c],o.current[c]&&(i=!0))}i&&!t.current&&n({})}),[]);return Lr((function(){r.current=e})),[r,o.current,i]}({data:A,error:I,isValidating:L},x),N=M[0],U=M[1],B=M[2],z=(0,Re.useCallback)((function(e){return ke(void 0,void 0,void 0,(function(){var t,o,a,u,c,s,l,f,p,d,h,m,w;return je(this,(function(E){switch(E.label){case 0:if(t=O.current,!g||!t||x.current||k().isPaused())return[2,!1];u=!0,c=e||{},s=!y[g]||!c.dedupe,l=function(){return!x.current&&g===S.current&&_.current},f=function(){var e=y[g];e&&e[1]===a&&delete y[g]},p={isValidating:!1},d=function(){C({isValidating:!1}),l()&&B(p)},C({isValidating:!0}),B({isValidating:!0}),E.label=1;case 1:return E.trys.push([1,3,,4]),s&&(zr(r,g,N.current.data,N.current.error,!0),n.loadingTimeout&&!r.get(g)&&setTimeout((function(){u&&l()&&k().onLoadingSlow(g,n)}),n.loadingTimeout),y[g]=[t.apply(void 0,b),Vr()]),w=y[g],o=w[0],a=w[1],[4,o];case 2:return o=E.sent(),s&&setTimeout(f,n.dedupingInterval),y[g]&&y[g][1]===a?(C({error:yr}),p.error=yr,h=v[g],!gr(h)&&(a<=h[0]||a<=h[1]||0===h[1])?(d(),s&&l()&&k().onDiscarded(g),[2,!1]):(i(N.current.data,o)?p.data=N.current.data:p.data=o,i(r.get(g),o)||r.set(g,o),s&&l()&&k().onSuccess(o,g,n),[3,4])):(s&&l()&&k().onDiscarded(g),[2,!1]);case 3:return m=E.sent(),f(),k().isPaused()||(C({error:m}),p.error=m,s&&l()&&(k().onError(m,g,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||br(n.shouldRetryOnError)&&n.shouldRetryOnError(m))&&j()&&k().onErrorRetry(m,g,n,z,{retryCount:(c.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return u=!1,d(),l()&&s&&zr(r,g,p.data,p.error,!1),[2,!0]}}))}))}),[g]),F=(0,Re.useCallback)(Hr.bind(yr,r,(function(){return S.current})),[]);if(Lr((function(){O.current=t,E.current=n})),Lr((function(){if(g){var e=g!==S.current,t=z.bind(yr,no),n=0,r=to(g,h,(function(e,t,n){B(wr({error:t,isValidating:n},i(N.current.data,e)?yr:{data:e}))})),a=to(g,d,(function(e){if(0==e){var r=Date.now();k().revalidateOnFocus&&r>n&&j()&&(n=r+k().focusThrottleInterval,t())}else if(1==e)k().revalidateOnReconnect&&j()&&t();else if(2==e)return z()}));return x.current=!1,S.current=g,_.current=!0,e&&B({data:A,error:I,isValidating:L}),D()&&(gr(A)||Dr?t():(u=t,xr()&&o(window.requestAnimationFrame)!=_r?window.requestAnimationFrame(u):setTimeout(u,1))),function(){x.current=!0,r(),a()}}var u}),[g,z]),Lr((function(){var e,t=function(){var t=br(s)?s(A):s;t&&-1!==e&&(e=setTimeout(n,t))},n=function(){N.current.error||!l&&!k().isVisible()||!f&&!k().isOnline()?t():z(no).then(t)};return t(),function(){e&&(clearTimeout(e),e=-1)}}),[s,l,f,z]),(0,Re.useDebugValue)(A),u&&gr(A)&&g)throw O.current=t,E.current=n,x.current=!1,gr(I)?z(no):I;return{mutate:F,get data(){return U.data=!0,A},get error(){return U.error=!0,I},get isValidating(){return U.isValidating=!0,L}}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=eo(),r=Xr(e),o=r[0],i=r[1],a=r[2],u=Yr(n,a),c=cr,s=u.use;if(s)for(var l=s.length;l-- >0;)c=s[l](c);return c(o,i||u.fetcher,u)}),oo=m(688),io=m(332),ao=m.n(io);oo.default.extend(ao())}(),g}())}}}))},5309:function(e,t,n){"use strict";var r=function(e){var t=e.to,n=e.templateParams,r=e.children,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["to","templateParams","children"]);return Qe.createElement("a",Xe({onClick:function(e){return o=t,i=n,void((r=e).metaKey||r.ctrlKey||r.shiftKey||0!=r.button||(r.preventDefault(),(0,Je.navigate)({to:o,templateParams:i})));var r,o,i},href:(0,Je.interpolateUrl)(t,n)},o),r)},i=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},a=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},u=function(e){return function(t){var n,r=function(e){if(Array.isArray(e))return e}(n=(0,Qe.useState)(e.getState()))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n)||function(e,t){if(e){if("string"==typeof e)return i(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,2):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=r[0],u=r[1];(0,Qe.useEffect)((function(){return e.subscribe((function(e){return u(e)}))}),[]);var c={};return t&&(c=(0,Qe.useMemo)((function(){return function(e,t){"function"==typeof t&&(t=t(e));var n={};for(var r in t)n[r]=e.action(t[r]);return n}(e,t)}),[e,t])),function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){a(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({},o,c)}},c=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},s=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Qe.useState)(window.navigator.onLine))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Qe.useEffect)((function(){return(0,tt.subscribeConnectivityChanged)((function(e){var t=e.online;return r(t)}))}),[]),n},f=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},p=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Qe.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return f(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1];return(0,Qe.useEffect)((function(){var t=function(t){var n,i,a=null!==(i=null===(n=t.slots[e])||void 0===n?void 0:n.assignedExtensions)&&void 0!==i?i:[];(0,nt.isEqual)(a,r)||o(a)};return t((0,et.getExtensionStore)().getState()),(0,et.getExtensionStore)().subscribe(t)}),[e,r]),r},d=function(e){var t=s(),n=p(e);return(0,Qe.useMemo)((function(){return(0,et.getConnectedExtensions)(n,t)}),[n,t])},h=function(e){var t=(0,Qe.useContext)(Ye).moduleName;if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,Qe.useEffect)((function(){(0,et.registerExtensionSlot)(t,e)}),[]),{extensions:d(e),extensionSlotName:e,extensionSlotModuleName:t}},y=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},m=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){y(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},g=function(e){return e},b=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},w=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{};n%2?b(Object(r),!0).forEach((function(t){_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))},r=1;r<arguments.length;r++)n(r);return e},_=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},x=function(e,t){var n;if("function"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(ut(n)));return function(){var e=n(t);if(!l(e,HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(ut(e)));return e}},S=function(e){if("object"!==at(e))throw new Error("single-spa-react requires a configuration object");var t=w(w({},st),e);if(!t.React)throw new Error("single-spa-react must be passed opts.React");if(!t.ReactDOM)throw new Error("single-spa-react must be passed opts.ReactDOM");if(!t.rootComponent&&!t.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(t.errorBoundary&&"function"!=typeof t.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!ct&&t.React.createContext&&(ct=t.React.createContext()),t.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(t);var n={bootstrap:O.bind(null,t),mount:E.bind(null,t),unmount:k.bind(null,t)};return t.parcelCanUpdate&&(n.update=j.bind(null,t)),n},O=function(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then((function(t){e.rootComponent=t}))},E=function(e,t){return new Promise((function(n,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=C(e,t,(function(){n(this)})),i=x(e,t)(),a=function(e){var t=e.opts,n=e.elementToRender,r=e.domElement,o="function"==typeof t.renderType?t.renderType():t.renderType;if(["createRoot","unstable_createRoot","createBlockingRoot","unstable_createBlockingRoot"].indexOf(o)>=0){var i=t.ReactDOM[o](r);return i.render(n),i}return"hydrate"===o?t.ReactDOM.hydrate(n,r):t.ReactDOM.render(n,r),null}({elementToRender:o,domElement:i,opts:e});e.domElements[t.name]=i,e.renderResults[t.name]=a}))},k=function(e,t){return new Promise((function(n){e.unmountFinished=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():e.ReactDOM.unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]}))},j=function(e,t){return new Promise((function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=C(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=x(e,t)();e.ReactDOM.render(r,i)}}))},C=function(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=ct?e.React.createElement(ct.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),e.React.createElement(e.SingleSpaRoot,w(w({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach((function(e){return e()})),delete e.updateResolves[t.name])},unmountFinished:function(){setTimeout(e.unmountFinished)}}),o)},$=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},P=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?Object(t[n]):{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&o.push.apply(o,Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach((function(t){$(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},A=function(e,t){if(!l(e,t))throw new TypeError("Cannot call a class as a function")},T=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}},I=function(e,t,n){return t&&T(e.prototype,t),n&&T(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},R=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},D=function(e,t){if(t&&("object"===lt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return R(e)},L=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,pt.Z)(e,t)},M=function(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n},N=function(e){return null==e?"":""+e},U=function(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))},B=function(e,t,n){for(var r=function(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e},o=function(){return!e||"string"==typeof e},i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}},z=function(e,t,n){var r=B(e,t,Object);r.obj[r.k]=n},F=function(e,t){var n=B(e,t),r=n.obj,o=n.k;if(r)return r[o]},V=function(e,t,n){var r=F(e,n);return void 0!==r?r:F(t,n)},H=function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},W=function(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return gt[e]})):e},K=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},q=function(){var e={};return Et.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:kt[t.fc]}}))})),e},Z=function(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===lt(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===lt(e[2])||"object"===lt(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}},G=function(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e},Q=function(){},Y=function(e){var t=e.i18n,n=e.defaultNS,r=e.children,o=(0,Qe.useMemo)((function(){return{i18n:t,defaultNS:n}}),[t,n]);return(0,Qe.createElement)(Tt.Provider,{value:o},r)},J=function(e,t){return!t||"object"!==Nt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t},X=function(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw new Error("Invalid options");var t=Object.assign({},Bt,e);return function(e){var n;return(n=function(n){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Dt(e,t)}(a,n);var r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Rt(r);if(o){var n=Rt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return J(this,e)});function a(e){var n;return function(e,t){if(!l(e,t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=i.call(this,e)).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,extension:e._extensionContext}},n}var u=a.prototype;return u.componentDidCatch=function(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout((function(){throw e})),this.setState({caughtError:e,caughtErrorInfo:n})},u.render=function(){if(this.state.caughtError)return Qe.createElement("div",null,"An error has occurred. Please try reloading the page.");var n=this,r=Qe.createElement(Ye.Provider,{value:this.state.config},Qe.createElement(Qe.Suspense,{fallback:null},t.disableTranslations?Qe.createElement(e,It({},this.props)):Qe.createElement(zt,{ns:t.moduleName,forceUpdate:function(){return n.forceUpdate()}},Qe.createElement(Y,{i18n:Ut,defaultNS:t.moduleName},Qe.createElement(e,It({},this.props))))));return t.strictMode||!Qe.StrictMode?r:Qe.createElement(Qe.StrictMode,null,r)},a}(Qe.Component)).displayName="OpenmrsReactComponent(".concat(t.featureName,")"),n}},ee=function(e,t){return S({React:Qe,ReactDOM:it,rootComponent:X(t)(e)})},te=function(e,t){return function(){return e().then((function(e){return ee(e.default,t)}))}},ne=function(e,t){return function(){return Promise.resolve(ee(e,t))}},re=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},oe=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Qe.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return re(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?re(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1];return(0,Qe.useEffect)((function(){return(0,et.getExtensionStore)().subscribe((function(t){var n,i,a=null!==(i=null===(n=t.slots[e])||void 0===n?void 0:n.assignedExtensions.map((function(e){return e.id})))&&void 0!==i?i:[];(0,nt.isEqual)(a,r)||o(a)}))}),[]),r},ie=function(e){(0,Qe.useEffect)((function(){if(e){var t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=t}}}),[e])},ae=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},ue=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ce=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ae(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ae(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},se=function(){var e=(0,Qe.useContext)(Ye),t=e.moduleName,n=e.extension;if(!t&&!n)throw Error('No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".');var r=function(e){var t,n,r,o,i,a,u=(0,Qe.useMemo)((function(){return(0,Je.getConfigStore)(e)}),[e]),c=e,s=(t=u,o=(r=ce((0,Qe.useState)((n=t,function(){var e=n.getState();return e.loaded&&e.config?e.config:null})),2))[0],i=r[1],(0,Qe.useEffect)((function(){return null==t?void 0:t.subscribe((function(e){e.loaded&&e.config&&i(e.config)}))}),[t]),o);if(!s)throw Ht[c]||(Ht[c]=(a=u,new Promise((function(e){var t=a.subscribe((function(n){n.loaded&&n.config&&(e(n.config),t())}))})))),Ht[c];return s}(t),o=function(e){var t,n,r,o,i,a,u,c,s,l=(0,Qe.useMemo)(Je.getExtensionsConfigStore,[]),f=(t=l,n=e,i=ce((0,Qe.useState)((r=t,(o=n)?function(){var e=r.getState(),t=(0,Je.getExtensionConfigFromStore)(e,o.extensionSlotName,o.extensionId);if(t.loaded&&t.config)return t.config}:null)),2),a=i[0],u=i[1],(0,Qe.useEffect)((function(){if(n)return t.subscribe((function(e){var t=(0,Je.getExtensionConfigFromStore)(e,n.extensionSlotName,n.extensionId);t.loaded&&t.config&&!(0,Vt.Z)(t.config,a)&&u(t.config)}))}),[t,n,a]),a);if(!f&&e){var p="".concat(e.extensionSlotName,"-").concat(e.extensionId);throw!Ht[p]&&l&&(Ht[p]=(c=l,s=e,new Promise((function(e){var t=c.subscribe((function(n){var r=(0,Je.getExtensionConfigFromStore)(n,s.extensionSlotName,s.extensionId);r.loaded&&r.config&&(e(r.config),t())}))})))),Ht[p]}return f||{}}(n),i=(0,Qe.useMemo)((function(){return function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){ue(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({},r,o)}),[r,o]);return i},le=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},fe=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},pe=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){fe(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},de=function(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]},he=function(e,t){switch(t.type){case Lt.loadPatient:return pe({},e,{patientUuid:t.patientUuid,patient:null,isPendingUuid:!1,isLoadingPatient:!0,err:null});case Lt.newPatient:return pe({},e,{patient:t.patient,isPendingUuid:!1,isLoadingPatient:!1,err:null});case Lt.loadError:return pe({},e,{patient:null,isPendingUuid:!1,isLoadingPatient:!1,err:t.err});default:return e}},ve=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Qe.useReducer)(he,pe({},Zt,{patientUuid:null!=e?e:null,isPendingUuid:!e,isLoadingPatient:!!e})))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return le(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?le(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],o=n[1];return(0,Qe.useEffect)((function(){if(r.isPendingUuid){var e=de();o(e?{type:Lt.loadPatient,patientUuid:e}:{type:Lt.newPatient,patient:null})}var t=!0;return r.isLoadingPatient&&r.patientUuid&&(0,Wt.fetchCurrentPatient)(r.patientUuid).then((function(e){return t&&o({patient:e.data,type:Lt.newPatient})}),(function(e){return t&&o({err:e,type:Lt.loadError})})),function(){t=!1}}),[r.isPendingUuid,r.isLoadingPatient,r.patientUuid]),(0,Qe.useEffect)((function(){var e=function(e){var t=de();t!=r.patientUuid&&o({type:Lt.loadPatient,patientUuid:t})};return window.addEventListener("single-spa:routing-event",e),function(){return window.removeEventListener("single-spa:routing-event",e)}}),[r.patientUuid]),{isLoading:r.isPendingUuid||r.isLoadingPatient,patient:r.patient,patientUuid:null!=e?e:r.patientUuid,error:r.err}},ye=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},me=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ge=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){me(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},be=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ye(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ye(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},we=function(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]},_e=function(e,t){switch(t.type){case Kt.loadPatient:return ge({},e,{patient:null,isLoadingPatient:!0,err:null});case Kt.newPatient:return ge({},e,{patient:t.patient,isLoadingPatient:!1,err:null});case Kt.loadError:return ge({},e,{patient:null,isLoadingPatient:!1,err:t.err});default:return e}},xe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:we(),t=be((0,Qe.useReducer)(_e,Gt),2),n=t[0],r=t[1];return(0,Qe.useEffect)((function(){var t=!0;return e?((0,Wt.fetchCurrentPatient)(e).then((function(e){return t&&r({patient:e.data,type:Kt.newPatient})}),(function(e){return t&&r({err:e,type:Kt.loadError})})),r({type:Kt.loadPatient})):r({type:Kt.newPatient,patient:null}),function(){t=!1}}),[e]),[n.isLoadingPatient,n.patient,e,n.err]},Se=function(e){var t=d(e);return(0,Qe.useMemo)((function(){return Object.fromEntries(t.map((function(e){return[e.name,e.meta]})))}),[t])},Oe=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ee=function(){var e="tablet";return document.body.classList.forEach((function(t){switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-tablet":e="desktop"}})),e},ke=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Qe.useState)(Ee))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Oe(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Oe(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Qe.useEffect)((function(){var e=function(){r(Ee())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),n},je=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ce=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Qe.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return je(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?je(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Qe.useEffect)((function(){var e=(0,Wt.getLocations)().subscribe((function(e){r(e)}),(function(e){console.error(e)}));return function(){return e.unsubscribe()}}),[]),n},$e=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,Qe.useRef)(null);return(0,Qe.useEffect)((function(){if(t){var r=function(t){var r;(null==n||null===(r=n.current)||void 0===r?void 0:r.contains(t.target))||e(t)};return window.addEventListener("click",r),function(){return window.removeEventListener("click",r)}}}),[e,t]),n},Pe=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ae=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Te=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Qe.useState)(null))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Ae(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ae(e,2):void 0}}(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.")}(),n=t[0],r=t[1],o=null;if(!n){if(Qt){var i=(0,Wt.getSessionStore)().getState();i.loaded&&(o=i.session)}else Qt=new Promise((function(e){var t=function(t){var n=t.loaded,r=t.session;n&&(e(r),o=r,Yt&&Yt(),Yt=void 0)};t((0,Wt.getSessionStore)().getState()),o||(Yt=(0,Wt.getSessionStore)().subscribe(t))}));if(!o)throw Qt;r(o)}(0,Qe.useEffect)((function(){return Yt||(Yt=(0,Wt.getSessionStore)().subscribe((function(e){var t=e.loaded,n=e.session;t&&(o=n,r(n))}))),function(){Yt&&Yt(),Yt=void 0}}),[]);var a=n||o;if(!a)throw Qt?(console.warn("useSession is in an unexpected state. Attempting to recover."),Qt):Error("useSession is in an invalid state.");return a},Ie=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Re=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},De=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){Re(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},Le=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ie(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Me=function(e,t){"function"==typeof t&&(t=t(e));var n={};for(var r in t)n[r]=e.action(t[r]);return n},Ne=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nn,n=arguments.length>2?arguments[2]:void 0,r=Le((0,Qe.useState)((function(){return t(e.getState())})),2),o=r[0],i=r[1];(0,Qe.useEffect)((function(){return(0,tn.subscribeTo)(e,t,i)}),[e,t]);var a={};return n&&(a=(0,Qe.useMemo)((function(){return Me(e,n)}),[e,n])),De({},o,a)},Ue=function(e,t){return Ne(e,nn,t)},Be=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){var a=function(e){try{c(r.next(e))}catch(e){i(e)}},u=function(e){try{c(r.throw(e))}catch(e){i(e)}},c=function(e){var t;e.done?o(e.value):(t=e.value,l(t,n)?t:new n((function(e){e(t)}))).then(a,u)};c((r=r.apply(e,t||[])).next())}))},ze=function(e,t){var n,r,o,i,a=function(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)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 u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}},u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i},Fe=function(e){var t,n=Kn(e?"/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(Wt.defaultVisitCustomRepresentation,"&includeInactive=false"):null,Wt.openmrsFetch),r=n.data,o=n.error;return{error:o,mutate:n.mutate,isValidating:n.isValidating,currentVisit:(0,Qe.useMemo)((function(){return null!==(t=null==r?void 0:r.data.results.find((function(e){return null===e.stopDatetime&&Zn()(e.startDatetime).isToday()})))&&void 0!==t?t:null}),[null==r?void 0:r.data.results]),isLoading:!r&&!o}},Ve=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},He=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Qe.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Ve(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ve(e,2):void 0}}(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.")}(),n=t[0],r=t[1];return(0,Qe.useEffect)((function(){var e=(0,Wt.getVisitTypes)().subscribe((function(e){r(e)}),(function(e){return console.error(e)}));return function(){return e.unsubscribe()}}),[]),n},We=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Ke=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return We(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?We(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},qe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=Ke((0,Qe.useState)(1),2),r=n[0],o=n[1],i=(0,Qe.useMemo)((function(){return Math.max(1,Math.ceil(e.length/t))}),[e.length,t]),a=(0,Qe.useMemo)((function(){var n=(r-1)*t,o=(r+0)*t;return e.slice(n,o)}),[e,r,t]);return{results:a,totalPages:i,currentPage:r,paginated:e.length>t,showNextButton:r<i,showPreviousButton:r>1,goTo:function(e){o(Math.max(1,Math.min(i,e)))},goToNext:function(){r<i&&o(r+1)},goToPrevious:function(){r>1&&o(r-1)}}},Ze=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r};n.d(t,{w:function(){return r},hj:function(){return Yn},g:function(){return Ge.ExtensionData},dT:function(){return ot},Vz:function(){return en},NV:function(){return u},D$:function(){return Ft},Ae:function(){return te},tl:function(){return ee},a$:function(){return ne},YV:function(){return oe},P3:function(){return p},yn:function(){return ie},ZR:function(){return se},BL:function(){return d},Y9:function(){return s},Yq:function(){return xe},p8:function(){return h},qd:function(){return Se},jf:function(){return Xt},mr:function(){return ke},Z_:function(){return Ce},t$:function(){return $e},h0:function(){return qe},lm:function(){return ve},kP:function(){return Te},oR:function(){return Ne},xQ:function(){return Ue},JF:function(){return Fe},NN:function(){return He}});var Ge={};n.r(Ge),n.d(Ge,{s:function(){return Ye}});var Qe=n(2735),Ye=Qe.createContext({moduleName:""}),Je=n(9714);function Xe(){return Xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xe.apply(this,arguments)}var et=n(225),tt=n(3103),nt=n(2891);function rt(){return rt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rt.apply(this,arguments)}var ot=function(e){var t=e.extensionSlotName,n=e.select,r=void 0===n?g:n,o=e.children,i=e.state,a=e.style,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["extensionSlotName","select","children","state","style"]),c=(0,Qe.useRef)(null),s=h(t),l=s.extensions,f=s.extensionSlotModuleName,p=(0,Qe.useRef)(i);(function(e,t){if(e===t)return!0;if(!e&&t)return!1;if(e&&!t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(!(i in t)||t[i]!==e[i])return!1}return!0})(p.current,i)||(p.current=i);var d=(0,Qe.useMemo)((function(){return t&&r(l).map((function(e){return Qe.createElement(Ye.Provider,{key:e.id,value:{moduleName:f,extension:{extensionId:e.id,extensionSlotName:t,extensionSlotModuleName:f}}},null!=o?o:Qe.createElement(Yn,{state:p.current}))}))}),[r,l,t,p.current]);return Qe.createElement("div",rt({ref:c,"data-extension-slot-name":t,"data-extension-slot-module-name":f,style:m({},a,{position:"relative"})},u),d)},it=n(2788);function at(e){return(at="function"==typeof Symbol&&"symbol"==v(Symbol.iterator)?function(e){return void 0===e?"undefined":v(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":v(e)})(e)}function ut(e){return(ut="function"==typeof Symbol&&"symbol"==v(Symbol.iterator)?function(e){return void 0===e?"undefined":v(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":v(e)})(e)}var ct=null;try{ct=o(954).createContext()}catch(e){}var st={React:null,ReactDOM:null,rootComponent:null,loadRootComponent:null,renderType:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{}};function lt(e){return(lt="function"==typeof Symbol&&"symbol"==v(Symbol.iterator)?function(e){return void 0===e?"undefined":v(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":v(e)})(e)}function ft(e){return(ft=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pt=n(5901),dt={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},ht=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};A(this,e),this.init(t,n)}return I(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||dt,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,P({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}(),vt=new ht,yt=function(){function e(){A(this,e),this.observers={}}return I(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function mt(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||l(e[r],String)||"string"==typeof t[r]||l(t[r],String)?n&&(e[r]=t[r]):mt(e[r],t[r],n):e[r]=t[r]);return e}var gt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},bt="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,wt=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return A(this,t),n=D(this,ft(t).call(this)),bt&&yt.call(R(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return L(t,e),I(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=[e,t];return n&&"string"!=typeof n&&(i=i.concat(n)),n&&"string"==typeof n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split(".")),F(this.data,i)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),z(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var u=F(this.data,a)||{};r?mt(u,n,o):u=P({},u,n),z(this.data,a,u),i.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?P({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(yt),_t={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}},xt={},St=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return A(this,t),n=D(this,ft(t).call(this)),bt&&yt.call(R(n)),U(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,R(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=vt.create("translator"),n}return L(t,e),I(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:o};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,r){var o=this;if("object"!==lt(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],n),u=a.key,c=a.namespaces,s=c[c.length-1],l=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(f){var p=n.nsSeparator||this.options.nsSeparator;return s+p+u}return u}var d=this.resolve(e,n),h=d&&d.res,v=d&&d.usedKey||u,y=d&&d.exactUsedKey||u,m=Object.prototype.toString.apply(h),g=["[object Number]","[object Function]","[object RegExp]"],b=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,_="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(w&&h&&_&&g.indexOf(m)<0&&("string"!=typeof b||"[object Array]"!==m)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,h,n):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");if(i){var x="[object Array]"===m,S=x?[]:{},O=x?y:v;for(var E in h)if(Object.prototype.hasOwnProperty.call(h,E)){var k="".concat(O).concat(i).concat(E);S[E]=this.translate(k,P({},n,{joinArrays:!1,ns:c})),S[E]===k&&(S[E]=h[E])}h=S}}else if(w&&"string"==typeof b&&"[object Array]"===m)(h=h.join(b))&&(h=this.extendTranslation(h,e,n,r));else{var j=!1,C=!1,$=void 0!==n.count&&"string"!=typeof n.count,A=t.hasDefaultValue(n),T=$?this.pluralResolver.getSuffix(l,n.count):"",I=n["defaultValue".concat(T)]||n.defaultValue;!this.isValidLookup(h)&&A&&(j=!0,h=I),this.isValidLookup(h)||(C=!0,h=u);var R=A&&I!==h&&this.options.updateMissing;if(C||j||R){if(this.logger.log(R?"updateKey":"missingKey",l,s,u,R?I:h),i){var D=this.resolve(u,P({},n,{keySeparator:!1}));D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var L=[],M=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&M&&M[0])for(var N=0;N<M.length;N++)L.push(M[N]);else"all"===this.options.saveMissingTo?L=this.languageUtils.toResolveHierarchy(n.lng||this.language):L.push(n.lng||this.language);var U=function(e,t,r){o.options.missingKeyHandler?o.options.missingKeyHandler(e,s,t,R?r:h,R,n):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,s,t,R?r:h,R,n),o.emit("missingKey",e,s,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&$?L.forEach((function(e){o.pluralResolver.getSuffixes(e).forEach((function(t){U([e],u+t,n["defaultValue".concat(t)]||I)}))})):U(L,u,I))}h=this.extendTranslation(h,e,n,d,r),C&&h===u&&this.options.appendNamespaceToMissingKey&&(h="".concat(s,":").concat(u)),C&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(P({},n,{interpolation:P({},this.options.interpolation,n.interpolation)}));var a,u=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(u){var c=e.match(this.interpolator.nestingRegexp);a=c&&c.length}var s=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(s=P({},this.options.interpolation.defaultVariables,s)),e=this.interpolator.interpolate(e,s,n.lng||this.language,n),u){var l=e.match(this.interpolator.nestingRegexp);a<(l&&l.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate.apply(i,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var f=n.postProcess||this.options.postProcess,p="string"==typeof f?[f]:f;return null!=e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=_t.handle(p,e,t,this.options&&this.options.postProcessPassResolved?P({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var c=a.extractFromKey(e,u),s=c.key;n=s;var l=c.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==u.count&&"string"!=typeof u.count,p=void 0!==u.context&&"string"==typeof u.context&&""!==u.context,d=u.lngs?u.lngs:a.languageUtils.toResolveHierarchy(u.lng||a.language,u.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!xt["".concat(d[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(xt["".concat(d[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,c,l=s,d=[l];for(a.i18nFormat&&a.i18nFormat.addLookupKeys?a.i18nFormat.addLookupKeys(d,s,n,e,u):(f&&(i=a.pluralResolver.getSuffix(n,u.count)),f&&p&&d.push(l+i),p&&d.push(l+="".concat(a.options.contextSeparator).concat(u.context)),f&&d.push(l+=i));c=d.pop();)a.isValidLookup(t)||(r=c,t=a.getResource(n,e,c,u))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),t}(yt),Ot=function(){function e(t){A(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=vt.create("languageUtils")}return I(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=K(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=K(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=K(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),Et=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],kt={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},jt=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};A(this,e),this.languageUtils=t,this.options=n,this.logger=vt.create("pluralResolver"),this.rules=q()}return I(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var o=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),i=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),Ct=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};A(this,e),this.logger=vt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return I(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:W,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?H(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?H(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?H(t.nestingPrefix):t.nestingPrefixEscaped||H("$t("),this.nestingSuffix=t.nestingSuffix?H(t.nestingSuffix):t.nestingSuffixEscaped||H(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,u=function(e){return e.replace(/\$/g,"$$$$")},c=this,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=function(e){if(e.indexOf(c.formatSeparator)<0){var o=V(t,s,e);return c.alwaysFormat?c.format(o,void 0,n):o}var i=e.split(c.formatSeparator),a=i.shift().trim(),u=i.join(c.formatSeparator).trim();return c.format(V(t,s,a),u,n,r)};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return u(e)}},{regex:this.regexp,safeValue:function(e){return c.escapeValue?u(c.escape(e)):u(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){if(void 0===(i=l(o[1].trim())))if("function"==typeof f){var n=f(e,o,r);i="string"==typeof n?n:""}else{if(p){i=o[0];continue}c.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i=""}else"string"==typeof i||c.useRawValueToEscape||(i=N(i));if(e=e.replace(o[0],t.safeValue(i)),t.regex.lastIndex=0,++a>=c.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=function(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,u)).replace(/'/g,'"');try{u=JSON.parse(o),t&&(u=P({},t,u))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete u.defaultValue,e},i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=P({},a);for(u.applyPostProcessor=!1,delete u.defaultValue;n=this.nestingRegexp.exec(e);){var c=[],s=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var l=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=l.shift(),c=l,s=!0}if((r=t(o.call(this,n[1].trim(),u),u))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=N(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),s&&(r=c.reduce((function(e,t){return i.format(e,t,a.lng,a)}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}(),$t=function(e){function t(e,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return A(this,t),o=D(this,ft(t).call(this)),bt&&yt.call(R(o)),o.backend=e,o.store=n,o.services=r,o.languageUtils=r.languageUtils,o.options=i,o.logger=vt.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,i.backend,i),o}return L(t,e),I(t,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i=[],a=[],u=[],c=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var u="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[u]=2:o.state[u]<0||(1===o.state[u]?a.indexOf(u)<0&&a.push(u):(o.state[u]=1,r=!1,a.indexOf(u)<0&&a.push(u),i.indexOf(u)<0&&i.push(u),c.indexOf(t)<0&&c.push(t)))})),r||u.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:i,pending:a,toLoadLanguages:u,toLoadNamespaces:c}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,u,c,s,l;r=n.loaded,u=i,(s=(c=B(r,[o],Object)).obj)[l=c.k]=s[l]||[],s[l].push(u),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(u,c){u&&c&&o<5?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(u,c)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,P({},i,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(yt),Pt=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(A(this,t),e=D(this,ft(t).call(this)),bt&&yt.call(R(e)),e.options=G(n),e.services={},e.logger=vt,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),D(e,R(e));setTimeout((function(){e.init(n,r)}),0)}return e}return L(t,e),I(t,[{key:"init",value:function(){var e=function(e){return e?"function"==typeof e?new e:e:null},t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if("function"==typeof n&&(r=n,n={}),n.whitelist&&!n.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),n.nonExplicitWhitelist&&!n.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=P({},Z(),this.options,G(n)),this.format=this.options.interpolation.format,r||(r=Q),!this.options.isClone){this.modules.logger?vt.init(e(this.modules.logger),this.options):vt.init(null,this.options);var o=new Ot(this.options);this.store=new wt(this.options.resources,this.options);var i=this.services;i.logger=vt,i.resourceStore=this.store,i.languageUtils=o,i.pluralResolver=new jt(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i.interpolator=new Ct(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new $t(e(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit.apply(t,[e].concat(r))})),this.modules.languageDetector&&(i.languageDetector=e(this.modules.languageDetector),i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=e(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new St(this.services,this.options),this.translator.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit.apply(t,[e].concat(r))})),this.modules.external.forEach((function(e){e.init&&e.init(t)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.length>0&&"dev"!==a[0]&&(this.options.lng=a[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var u=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];u.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}}));var s=M(),l=function(){var e=function(e,n){t.isInitialized&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),s.resolve(n),r(e,n)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return e(null,t.t.bind(t));t.changeLanguage(t.options.lng,e)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),s}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Q,r=n,o="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return r();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){i.indexOf(e)<0&&i.push(e)}))};if(o)a(o);else{var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(i,this.options.ns,r)}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=M();return e||(e=this.languages),t||(t=this.options.ns),n||(n=Q),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&_t.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=M();this.emit("languageChanging",e);var o=function(e){var o="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);o&&(n.language||(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o)),n.translator.language||n.translator.changeLanguage(o),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(o)),n.loadResources(o,(function(e){var i,a;i=e,(a=o)?(n.language=a,n.languages=n.services.languageUtils.toResolveHierarchy(a),n.translator.changeLanguage(a),n.isLanguageChangingTo=void 0,n.emit("languageChanged",a),n.logger.log("languageChanged",a)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(i,(function(){return n.t.apply(n,arguments)}))}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,r=function e(t,r){var o;if("object"!==lt(r)){for(var i=arguments.length,a=new Array(i>2?i-2:0),u=2;u<i;u++)a[u-2]=arguments[u];o=n.options.overloadTranslationOptionHandler([t,r].concat(a))}else o=P({},r);return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,n.t(t,o)};return"string"==typeof e?r.lng=e:r.lngs=e,r.ns=t,r}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var u=n.precheck(this,a);if(void 0!==u)return u}return!!this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||!(!a(r,e)||o&&!a(i,e))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=M();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=M();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Q,o=P({},this.options,n,{isClone:!0}),i=new t(o),a=["store","services","language"];return a.forEach((function(t){i[t]=e[t]})),i.services=P({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new St(i.services,i.options),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit.apply(i,[e].concat(n))})),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}}]),t}(yt),At=new Pt,Tt=Qe.createContext();function It(){return It=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},It.apply(this,arguments)}function Rt(e){return(Rt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Dt(e,t){return(Dt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}I((function e(){A(this,e),this.usedNamespaces={}}),[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]);var Lt,Mt,Nt=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":v(e)},Ut=At.default||At,Bt={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},zt=function(e){(0,Qe.useEffect)((function(){return Ut.on("languageChanged",e.forceUpdate),function(){return Ut.off("languageChanged",e.forceUpdate)}}),[e.forceUpdate]);var t=(0,Qe.useRef)(null);if(t.current)throw t.current;if(!Ut.hasLoadedNamespace(e.ns)){var n=setTimeout((function(){console.warn("openmrsComponentDecorator: the React suspense promise for i18next.loadNamespaces(['".concat(e.ns,"']) did not resolve nor reject after three seconds. This could mean you have multiple versions of i18next and haven't made i18next a webpack external in all projects."))}),3e3);throw Ut.loadNamespaces([e.ns]).then((function(){return clearTimeout(n)})).catch((function(e){clearTimeout(n),t.current=e}))}return Qe.createElement(Qe.Fragment,null,e.children)},Ft=te,Vt=n(3202),Ht={},Wt=n(7641);(Mt=Lt||(Lt={})).loadPatient="loadPatient",Mt.newPatient="newPatient",Mt.loadError="patientLoadError";var Kt,qt,Zt={patientUuid:null,patient:null,isPendingUuid:!0,isLoadingPatient:!1,err:null};(qt=Kt||(Kt={})).loadPatient="loadPatient",qt.newPatient="newPatient",qt.loadError="patientLloadErroroadError";var Gt={patient:null,isLoadingPatient:!0,err:null};u((0,et.getExtensionInternalStore)());var Qt,Yt,Jt,Xt=u((0,et.getExtensionStore)()),en=function(e){var t,n=e.privilege,r=e.children,o=function(e){if(Array.isArray(e))return e}(t=(0,Qe.useState)(null))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return Pe(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pe(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=o[0],a=o[1];return(0,Qe.useEffect)((function(){var e=(0,Wt.getCurrentUser)({includeAuthStatus:!1}).subscribe(a);return function(){return e.unsubscribe()}}),[]),i&&(0,Wt.userHasAccess)(n,i)?Qe.createElement(Qe.Fragment,null,r):null},tn=n(5385),nn=function(e){return e},rn=function(){},on=void 0,an=Object,un=function(e){return e===on},cn=function(e){return"function"==typeof e},sn=function(e,t){return an.assign({},e,t)},ln="undefined",fn=function(){return("undefined"==typeof window?"undefined":v(window))!=ln},pn=new WeakMap,dn=0,hn=function(e){var t,n,r=void 0===e?"undefined":v(e),o=e&&e.constructor,i=o==Date;if(an(e)!==e||i||o==RegExp)t=i?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=pn.get(e))return t;if(t=++dn+"~",pn.set(e,t),o==Array){for(t="@",n=0;n<e.length;n++)t+=hn(e[n])+",";pn.set(e,t)}if(o==an){t="#";for(var a=an.keys(e).sort();!un(n=a.pop());)un(e[n])||(t+=n+":"+hn(e[n])+",");pn.set(e,t)}}return t},vn=!0,yn=fn(),mn=("undefined"==typeof document?"undefined":v(document))!=ln,gn=yn&&window.addEventListener?window.addEventListener.bind(window):rn,bn=mn?document.addEventListener.bind(document):rn,wn=yn&&window.removeEventListener?window.removeEventListener.bind(window):rn,_n=mn?document.removeEventListener.bind(document):rn,xn={isOnline:function(){return vn},isVisible:function(){var e=mn&&document.visibilityState;return un(e)||"hidden"!==e}},Sn={initFocus:function(e){return bn("visibilitychange",e),gn("focus",e),function(){_n("visibilitychange",e),wn("focus",e)}},initReconnect:function(e){var t=function(){vn=!0,e()},n=function(){vn=!1};return gn("online",t),gn("offline",n),function(){wn("online",t),wn("offline",n)}}},On=!fn()||"Deno"in window,En=On?Qe.useEffect:Qe.useLayoutEffect,kn="undefined"!=typeof navigator&&navigator.connection,jn=!On&&kn&&(["slow-2g","2g"].includes(kn.effectiveType)||kn.saveData),Cn=function(e){if(cn(e))try{e=e()}catch(t){e=""}var t=[].concat(e);return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?hn(e):"",t,e?"$swr$"+e:""]},$n=new WeakMap,Pn=function(e,t,n,r,o,i,a){void 0===a&&(a=!0);var u=$n.get(e),c=u[0],s=u[1],l=u[3],f=c[t],p=s[t];if(a&&p)for(var d=0;d<p.length;++d)p[d](n,r,o);return i&&(delete l[t],f&&f[0])?f[0](2).then((function(){return e.get(t)})):e.get(t)},An=0,Tn=function(){return++An},In=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Be(void 0,void 0,void 0,(function(){var t,n,r,o,i,a,u,c,s,l,f,p,d,h,v,y,m,g,b,w;return ze(this,(function(_){switch(_.label){case 0:if(t=e[0],n=e[1],r=e[2],o=e[3],a=!!un((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,u=!1!==i.revalidate,c=!1!==i.rollbackOnError,s=i.optimisticData,l=Cn(n),f=l[0],p=l[2],!f)return[2];if(d=$n.get(t),h=d[2],e.length<3)return[2,Pn(t,f,t.get(f),on,on,u,!0)];if(v=r,m=Tn(),h[f]=[m,0],g=!un(s),b=t.get(f),g&&(t.set(f,s),Pn(t,f,s)),cn(v))try{v=v(t.get(f))}catch(e){y=e}return v&&cn(v.then)?[4,v.catch((function(e){y=e}))]:[3,2];case 1:if(v=_.sent(),m!==h[f][0]){if(y)throw y;return[2,v]}y&&g&&c&&(a=!0,v=b,t.set(f,b)),_.label=2;case 2:return a&&(y||(cn(a)&&(v=a(v,b)),t.set(f,v)),t.set(p,sn(t.get(p),{error:y}))),h[f][1]=Tn(),[4,Pn(t,f,v,y,on,u,!!a)];case 3:if(w=_.sent(),y)throw y;return[2,a?w:v]}}))}))},Rn=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},Dn=function(e,t){if(!$n.has(e)){var n=sn(Sn,t),r={},o=In.bind(on,e),i=rn;if($n.set(e,[r,{},{},{},o]),!On){var a=n.initFocus(setTimeout.bind(on,Rn.bind(on,r,0))),u=n.initReconnect(setTimeout.bind(on,Rn.bind(on,r,1)));i=function(){a&&a(),u&&u(),$n.delete(e)}}return[e,o,i]}return[e,$n.get(e)[4]]},Ln=Dn(new Map),Mn=Ln[0],Nn=Ln[1],Un=sn({onLoadingSlow:rn,onSuccess:rn,onError:rn,onErrorRetry:function(e,t,n,r,o){var i=n.errorRetryCount,a=o.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!un(i)&&a>i||setTimeout(r,u,o)},onDiscarded:rn,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:jn?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:jn?5e3:3e3,compare:function(e,t){return hn(e)==hn(t)},isPaused:function(){return!1},cache:Mn,mutate:Nn,fallback:{}},xn),Bn=function(e,t){var n=sn(e,t);if(t){var r=e.use,o=e.fallback,i=t.use,a=t.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=sn(o,a))}return n},zn=(0,Qe.createContext)({}),Fn=function(e){return cn(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},Vn=function(){return sn(Un,(0,Qe.useContext)(zn))},Hn=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},Wn={dedupe:!0},Kn=(an.defineProperty((function(e){var t=e.value,n=Bn((0,Qe.useContext)(zn),t),r=t&&t.provider,o=(0,Qe.useState)((function(){return r?Dn(r(n.cache||Mn),t):on}))[0];return o&&(n.cache=o[0],n.mutate=o[1]),En((function(){return o?o[2]:on}),[]),(0,Qe.createElement)(zn.Provider,sn(e,{value:n}))}),"default",{value:Un}),Jt=function(e,t,n){var r,o,i,a,u,c,s=n.cache,l=n.compare,f=n.fallbackData,p=n.suspense,d=n.revalidateOnMount,h=n.refreshInterval,y=n.refreshWhenHidden,m=n.refreshWhenOffline,g=$n.get(s),b=g[0],w=g[1],_=g[2],x=g[3],S=Cn(e),O=S[0],E=S[1],k=S[2],j=(0,Qe.useRef)(!1),C=(0,Qe.useRef)(!1),$=(0,Qe.useRef)(O),P=(0,Qe.useRef)(t),A=(0,Qe.useRef)(n),T=function(){return A.current},I=function(){return T().isVisible()&&T().isOnline()},R=function(e){return s.set(k,sn(s.get(k),e))},D=s.get(O),L=un(f)?n.fallback[O]:f,M=un(D)?L:D,N=s.get(k)||{},U=N.error,B=!j.current,z=function(){return B&&!un(d)?d:!T().isPaused()&&(p?!un(M):un(M)||n.revalidateIfStale)},F=!(!O||!t)&&(!!N.isValidating||B&&z()),V=(r={data:M,error:U,isValidating:F},o=C,i=(0,Qe.useState)({})[1],a=(0,Qe.useRef)(r),u=(0,Qe.useRef)({data:!1,error:!1,isValidating:!1}),c=(0,Qe.useCallback)((function(e){var t=!1,n=a.current;for(var r in e){var c=r;n[c]!==e[c]&&(n[c]=e[c],u.current[c]&&(t=!0))}t&&!o.current&&i({})}),[]),En((function(){a.current=r})),[a,u.current,c]),H=V[0],W=V[1],K=V[2],q=(0,Qe.useCallback)((function(e){return Be(void 0,void 0,void 0,(function(){var t,r,o,i,a,u,c,f,p,d,h,v,y;return ze(this,(function(m){switch(m.label){case 0:if(t=P.current,!O||!t||C.current||T().isPaused())return[2,!1];i=!0,a=e||{},u=!x[O]||!a.dedupe,c=function(){return!C.current&&O===$.current&&j.current},f=function(){var e=x[O];e&&e[1]===o&&delete x[O]},p={isValidating:!1},d=function(){R({isValidating:!1}),c()&&K(p)},R({isValidating:!0}),K({isValidating:!0}),m.label=1;case 1:return m.trys.push([1,3,,4]),u&&(Pn(s,O,H.current.data,H.current.error,!0),n.loadingTimeout&&!s.get(O)&&setTimeout((function(){i&&c()&&T().onLoadingSlow(O,n)}),n.loadingTimeout),x[O]=[t.apply(void 0,E),Tn()]),y=x[O],r=y[0],o=y[1],[4,r];case 2:return r=m.sent(),u&&setTimeout(f,n.dedupingInterval),x[O]&&x[O][1]===o?(R({error:on}),p.error=on,h=_[O],!un(h)&&(o<=h[0]||o<=h[1]||0===h[1])?(d(),u&&c()&&T().onDiscarded(O),[2,!1]):(l(H.current.data,r)?p.data=H.current.data:p.data=r,l(s.get(O),r)||s.set(O,r),u&&c()&&T().onSuccess(r,O,n),[3,4])):(u&&c()&&T().onDiscarded(O),[2,!1]);case 3:return v=m.sent(),f(),T().isPaused()||(R({error:v}),p.error=v,u&&c()&&(T().onError(v,O,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||cn(n.shouldRetryOnError)&&n.shouldRetryOnError(v))&&I()&&T().onErrorRetry(v,O,n,q,{retryCount:(a.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return i=!1,d(),c()&&u&&Pn(s,O,p.data,p.error,!1),[2,!0]}}))}))}),[O]),Z=(0,Qe.useCallback)(In.bind(on,s,(function(){return $.current})),[]);if(En((function(){P.current=t,A.current=n})),En((function(){if(O){var e=O!==$.current,t=q.bind(on,Wn),n=0,r=Hn(O,w,(function(e,t,n){K(sn({error:t,isValidating:n},l(H.current.data,e)?on:{data:e}))})),o=Hn(O,b,(function(e){if(0==e){var r=Date.now();T().revalidateOnFocus&&r>n&&I()&&(n=r+T().focusThrottleInterval,t())}else if(1==e)T().revalidateOnReconnect&&I()&&t();else if(2==e)return q()}));return C.current=!1,$.current=O,j.current=!0,e&&K({data:M,error:U,isValidating:F}),z()&&(un(M)||On?t():(i=t,fn()&&v(window.requestAnimationFrame)!=ln?window.requestAnimationFrame(i):setTimeout(i,1))),function(){C.current=!0,r(),o()}}var i}),[O,q]),En((function(){var e,t=function(){var t=cn(h)?h(M):h;t&&-1!==e&&(e=setTimeout(n,t))},n=function(){H.current.error||!y&&!T().isVisible()||!m&&!T().isOnline()?t():q(Wn).then(t)};return t(),function(){e&&(clearTimeout(e),e=-1)}}),[h,y,m,q]),(0,Qe.useDebugValue)(M),p&&un(M)&&O)throw P.current=t,A.current=n,C.current=!1,un(U)?q(Wn):U;return{mutate:Z,get data(){return W.data=!0,M},get error(){return W.error=!0,U},get isValidating(){return W.isValidating=!0,F}}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Vn(),r=Fn(e),o=r[0],i=r[1],a=r[2],u=Bn(n,a),c=Jt,s=u.use;if(s)for(var l=s.length;l-- >0;)c=s[l](c);return c(o,i||u.fetcher,u)}),qn=n(7530),Zn=n.n(qn),Gn=n(4332),Qn=n.n(Gn);Zn().extend(Qn());var Yn=function(e){var t,n=e.state,r=e.wrap,o=function(e){if(Array.isArray(e))return e}(t=(0,Qe.useState)())||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return Ze(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ze(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=o[0],a=o[1],u=(0,Qe.useContext)(Ye).extension,c=(0,Qe.useCallback)((function(e){a(e)}),[]);(0,Qe.useEffect)((function(){if(null!=i&&u)return(0,et.renderExtension)(i,u.extensionSlotName,u.extensionSlotModuleName,u.extensionId,void 0,n)}),[null==u?void 0:u.extensionSlotName,null==u?void 0:u.extensionId,null==u?void 0:u.extensionSlotModuleName,n,i]);var s=Qe.createElement("div",{ref:c,"data-extension-id":null==u?void 0:u.extensionId,style:{position:"relative"}});return u&&r?r(s,u):s}},5385:function(){System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e,t){for(var n in t)e[n]=t[n];return e},t=function(t){var n=function(e){for(var t=[],n=0;n<o.length;n++)o[n]===e?e=null:t.push(o[n]);o=t},r=function(n,r,i){t=r?n:e(e({},t),n);for(var a=o,u=0;u<a.length;u++)a[u](t,i)},o=[];return t=t||{},{action:function(e){var n=function(t){r(t,!1,e)};return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:r,subscribe:function(e){return o.push(e),function(){n(e)}},unsubscribe:n,getState:function(){return t}}},n=function(e,n){var r=s[e];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=t(n);return s[e]={value:o,active:!0},o},i=function(e,n){var r=s[e];if(!r){var o=t(n);return s[e]={value:o,active:!1},o}return r.value},a=function(e){return n("app",e)},u=function(){return i("app",{})},c=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},1645:function(e,t,n){"use strict";var r=function(e,t){for(var n in t)e[n]=t[n];return e},o=function(e){var t=function(e){for(var t=[],n=0;n<o.length;n++)o[n]===e?e=null:t.push(o[n]);o=t},n=function(t,n,i){e=n?t:r(r({},e),t);for(var a=o,u=0;u<a.length;u++)a[u](e,i)},o=[];return e=e||{},{action:function(t){var r=function(e){n(e,!1,t)};return function(){for(var n=arguments,o=[e],i=0;i<arguments.length;i++)o.push(n[i]);var a=t.apply(this,o);if(null!=a)return a.then?a.then(r):r(a)}},setState:n,subscribe:function(e){return o.push(e),function(){t(e)}},unsubscribe:t,getState:function(){return e}}},i=function(e,t){var n=l[e];if(n)return n.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):n.value.setState(t,!0),n.active=!0,n.value;var r=o(t);return l[e]={value:r,active:!0},r},a=function(e,t){var n=l[e];if(!n){var r=o(t);return l[e]={value:r,active:!1},r}return n.value},u=function(){return a("app",{})},c=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))};n.d(t,{aB:function(){return s.AppState},jk:function(){return i},W5:function(){return u},zJ:function(){return a},se:function(){return c}});var s={};n.r(s),n.d(s,{jk:function(){return i},W5:function(){return u},zJ:function(){return a},se:function(){return c}});var l={}},6353:function(e,t,n){"use strict";var r=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},o=function(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!Z(t))?setTimeout((function(){G.next(function(e){for(var t=arguments,n=function(n){var o=null!=t[n]?t[n]:{},i=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(o).filter((function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})))),i.forEach((function(t){r(e,t,o[t])}))},o=1;o<arguments.length;o++)n(o);return e}({},e,{id:Q++}))}),0):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")},i=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},a=function(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!Z(t))?setTimeout((function(){Y.next(function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){i(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({},e,{id:J++}))}),0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")},u=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},c=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},s=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){c(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},f=function(e){var t,n=ee.getState(),r=[e].concat(function(e){if(Array.isArray(e))return u(e)}(t=n.modalStack)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(t)||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.")}());ee.setState(s({},n,{modalStack:r}))},p=function(e){var t=ee.getState(),n=t.modalStack.map((function(t){return t===e?s({},t,{state:"TO_BE_DELETED"}):t}));ee.setState(s({},t,{modalStack:n}))},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=function(){var e=ee.getState().modalStack.find((function(e){return e.onClose===n}));e&&p(e)};return f({state:"NEW",onClose:n,extensionId:e,props:s({extensionId:e,close:r},t)}),r},h=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,te.Z)(e,t)},v=function(e){return"/"===e.charAt(0)},y=function(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()},m=function(e,t){if(!e)throw new Error("Invariant failed")},g=function(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o},b=function(e,t,n,r){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(o=ne({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw l(e,URIError)?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],o=t&&t.split("/")||[],i=e&&v(e),a=t&&v(t),u=i||a;if(e&&v(e)?o=r:r.length&&(o.pop(),o=o.concat(r)),!o.length)return"/";if(o.length){var c=o[o.length-1];n="."===c||".."===c||""===c}else n=!1;for(var s=0,l=o.length;l>=0;l--){var f=o[l];"."===f?y(o,l):".."===f?(y(o,l),s++):s&&(y(o,l),s--)}if(!u)for(;s--;s)o.unshift("..");!u||""===o[0]||o[0]&&v(o[0])||o.unshift("");var p=o.join("/");return n&&"/"!==p.substr(-1)&&(p+="/"),p}(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o},w=function(e,t){t(window.confirm(e))},_=function(){try{return window.history.state||{}}catch(e){return{}}},x=function(e){var t=function(e){var t=e||{},n=t.key,r=t.state,o=window.location,i=o.pathname+o.search+o.hash;return P&&(i=function(e,t){return r=t,0===(n=e).toLowerCase().indexOf(r.toLowerCase())&&-1!=="/?#".indexOf(n.charAt(r.length))?e.substr(t.length):e;var n,r}(i,P)),b(i,r,n)},n=function(){return Math.random().toString(36).substr(2,$)},r=function(e){ne(M,e),M.length=v.length,A.notifyListeners(M.location,M.action)},o=function(e){void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")||a(t(e.state))},i=function(){a(t(_()))},a=function(e){T?(T=!1,r()):A.confirmTransitionTo(e,"POP",j,(function(t){t?r({action:"POP",location:e}):function(e){var t=M.location,n=R.indexOf(t.key);-1===n&&(n=0);var r=R.indexOf(e.key);-1===r&&(r=0);var o=n-r;o&&(T=!0,c(o))}(e)}))},u=function(e){return P+g(e)},c=function(e){v.go(e)},s=function(e){1===(D+=e)&&1===e?(window.addEventListener(oe,o),x&&window.addEventListener(ie,i)):0===D&&(window.removeEventListener(oe,o),x&&window.removeEventListener(ie,i))};void 0===e&&(e={}),re||m(!1);var l,f,p,d,h,v=window.history,y=(-1===(l=window.navigator.userAgent).indexOf("Android 2.")&&-1===l.indexOf("Android 4.0")||-1===l.indexOf("Mobile Safari")||-1!==l.indexOf("Chrome")||-1!==l.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,x=!(-1===window.navigator.userAgent.indexOf("Trident")),S=e,O=S.forceRefresh,E=void 0!==O&&O,k=S.getUserConfirmation,j=void 0===k?w:k,C=S.keyLength,$=void 0===C?6:C,P=e.basename?"/"===(p="/"===(f=e.basename).charAt(0)?f:"/"+f).charAt(p.length-1)?p.slice(0,-1):p:"",A=(d=null,h=[],{setPrompt:function(e){return d=e,function(){d===e&&(d=null)}},confirmTransitionTo:function(e,t,n,r){if(null!=d){var o="function"==typeof d?d(e,t):d;"string"==typeof o?"function"==typeof n?n(o,r):r(!0):r(!1!==o)}else r(!0)},appendListener:function(e){var t=function(){n&&e.apply(void 0,arguments)},n=!0;return h.push(t),function(){n=!1,h=h.filter((function(e){return e!==t}))}},notifyListeners:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];h.forEach((function(e){return e.apply(void 0,t)}))}}),T=!1,I=t(_()),R=[I.key],D=0,L=!1,M={length:v.length,action:"POP",location:I,createHref:u,push:function(e,t){var o="PUSH",i=b(e,t,n(),M.location);A.confirmTransitionTo(i,o,j,(function(e){if(e){var t=u(i),n=i.key,a=i.state;if(y)if(v.pushState({key:n,state:a},null,t),E)window.location.href=t;else{var c=R.indexOf(M.location.key),s=R.slice(0,c+1);s.push(i.key),R=s,r({action:o,location:i})}else window.location.href=t}}))},replace:function(e,t){var o="REPLACE",i=b(e,t,n(),M.location);A.confirmTransitionTo(i,o,j,(function(e){if(e){var t=u(i),n=i.key,a=i.state;if(y)if(v.replaceState({key:n,state:a},null,t),E)window.location.replace(t);else{var c=R.indexOf(M.location.key);-1!==c&&(R[c]=i.key),r({action:o,location:i})}else window.location.replace(t)}}))},go:c,goBack:function(){c(-1)},goForward:function(){c(1)},block:function(e){void 0===e&&(e=!1);var t=A.setPrompt(e);return L||(s(1),L=!0),function(){return L&&(L=!1,s(-1)),t()}},listen:function(e){var t=A.appendListener(e);return s(1),function(){s(-1),t()}}};return M},S=function(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}},O=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},E=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},k=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{};n%2?E(Object(r),!0).forEach((function(t){j(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))},r=1;r<arguments.length;r++)n(r);return e},j=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},C=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},$=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{};n%2?C(Object(r),!0).forEach((function(t){P(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))},r=1;r<arguments.length;r++)n(r);return e},P=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},A=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},T=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},I=function(e){var t=e.name,n=e.basePath;nt.setState({slotName:t,basePath:n})},R=function(e){nt.getState().slotName==e&&nt.setState({slotName:null})};n.d(t,{iW:function(){return D.InlineNotificationType},cW:function(){return rt},MK:function(){return D.NotificationDescriptor},fU:function(){return L.ToastDescriptor},yQ:function(){return L.ToastNotificationMeta},pC:function(){return L.ToastType},VM:function(){return I},K4:function(){return d},c0:function(){return o},CF:function(){return a},$d:function(){return R}});var D={};n.r(D);var L={};n.r(L);var M=n(2735),N=(n(2788),n(7860)),U=n(9295),B=n(606),z=n(175),F=n(6575),V=n(6905),H=n(7840),W=n(9494),K=n(8396),q=Object.prototype.hasOwnProperty,Z=function(e){if(null==e)return!0;if((0,V.Z)(e)&&((0,F.Z)(e)||"string"==typeof e||"function"==typeof e.splice||(0,H.Z)(e)||(0,K.Z)(e)||(0,z.Z)(e)))return!e.length;var t=(0,B.Z)(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if((0,W.Z)(e))return!(0,U.Z)(e).length;for(var n in e)if(q.call(e,n))return!1;return!0},G=new N.xQ,Q=0,Y=new N.xQ,J=0;n(225);var X=n(5385),ee=(0,X.createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]});window.getComputedStyle(document.body).overflow;var te=n(5901);function ne(){return ne=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ne.apply(this,arguments)}var re=!("undefined"==typeof window||!window.document||!window.document.createElement),oe="popstate",ie="hashchange",ae=n(216),ue=n.n(ae),ce=1073741823,se="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},le=M.createContext||function(e,t){var n,r,o="__create-react-context-"+(se.__global_unique_id__=(se.__global_unique_id__||0)+1)+"__",i=function(e){var n=function(){var t;return(t=e.apply(this,arguments)||this).emitter=S(t.props.value),t};h(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[o]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,o=e.value;((i=r)===(a=o)?0!==i||1/i==1/a:i!=i&&a!=a)?n=0:(n="function"==typeof t?t(r,o):ce,0!=(n|=0)&&this.emitter.set(e.value,n))}var i,a},r.render=function(){return this.props.children},n}(M.Component);i.childContextTypes=((n={})[o]=ue().object.isRequired,n);var a=function(t){var n=function(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e};h(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?ce:t},r.componentDidMount=function(){this.context[o]&&this.context[o].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?ce:e},r.componentWillUnmount=function(){this.context[o]&&this.context[o].off(this.onUpdate)},r.getValue=function(){return this.context[o]?this.context[o].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(M.Component);return a.contextTypes=((r={})[o]=ue().object,r),{Provider:i,Consumer:a}},fe=le,pe=n(2816),de=n.n(pe);n(2594),n(6058);var he=function(e){var t=fe();return t.displayName=e,t},ve=he("Router-History"),ye=he("Router"),me=function(e){var t=function(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n};h(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return M.createElement(ye.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},M.createElement(ve.Provider,{children:this.props.children||null,value:this.props.history}))},t}(M.Component);M.Component,M.Component;var ge={},be=0;M.Component,M.Component,M.Component,M.useContext;var we,_e,xe=(we=M.Component,_e=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=we.call.apply(we,[this].concat(n))||this).history=x(e.props),e},h(_e,we),_e.prototype.render=function(){return M.createElement(me,{history:this.history,children:this.props.children})},_e);M.Component;var Se=function(e,t){return"function"==typeof e?e(t):e},Oe=function(e,t){return"string"==typeof e?b(e,null,null,t):e},Ee=function(e){return e},ke=M.forwardRef;void 0===ke&&(ke=Ee);var je=ke((function(e,t){var n=e.innerRef,r=e.navigate,o=e.onClick,i=O(e,["innerRef","navigate","onClick"]),a=i.target,u=ne({},i,{onClick:function(e){try{o&&o(e)}catch(t){throw e.preventDefault(),t}var t;e.defaultPrevented||0!==e.button||a&&"_self"!==a||(t=e).metaKey||t.altKey||t.ctrlKey||t.shiftKey||(e.preventDefault(),r())}});return u.ref=Ee!==ke&&t||n,M.createElement("a",u)})),Ce=ke((function(e,t){var n=e.component,r=void 0===n?je:n,o=e.replace,i=e.to,a=e.innerRef,u=O(e,["component","replace","to","innerRef"]);return M.createElement(ye.Consumer,null,(function(e){e||m(!1);var n=e.history,c=Oe(Se(i,e.location),e.location),s=c?n.createHref(c):"",l=ne({},u,{href:s,navigate:function(){var t=Se(i,e.location),r=g(e.location)===g(Oe(t));(o||r?n.replace:n.push)(t)}});return Ee!==ke?l.ref=t||a:l.innerRef=a,M.createElement(r,l)}))})),$e=function(e){return e},Pe=M.forwardRef;void 0===Pe&&(Pe=$e),Pe((function(e,t){var n=e["aria-current"],r=void 0===n?"page":n,o=e.activeClassName,i=void 0===o?"active":o,a=e.activeStyle,u=e.className,c=e.exact,s=e.isActive,l=e.location,f=e.sensitive,p=e.strict,d=e.style,h=e.to,v=e.innerRef,y=O(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return M.createElement(ye.Consumer,null,(function(e){e||m(!1);var n=l||e.location,o=Oe(Se(h,n),n),g=o.pathname,b=g&&g.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),w=b?function(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,u=void 0!==a&&a,c=n.sensitive,s=void 0!==c&&c;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=ge[n]||(ge[n]={});if(r[e])return r[e];var o=[],i={regexp:de()(e,o,t),keys:o};return be<1e4&&(r[e]=i,be++),i}(n,{end:i,strict:u,sensitive:s}),o=r.regexp,a=r.keys,c=o.exec(e);if(!c)return null;var l=c[0],f=c.slice(1),p=e===l;return i&&!p?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:p,params:a.reduce((function(e,t,n){return e[t.name]=f[n],e}),{})}}),null)}(n.pathname,{path:b,exact:c,sensitive:f,strict:p}):null,_=!!(s?s(w,n):w),x="function"==typeof u?u(_):u,S="function"==typeof d?d(_):d;_&&(x=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(x,i),S=ne({},S,a));var O=ne({"aria-current":_&&r||null,className:x,style:S,to:o},y);return $e!==Pe?O.ref=t||v:O.innerRef=v,M.createElement(Ce,O)}))}));var Ae,Te=n(4077),Ie=n(841),Re=n.n(Ie),De=(Ae={"aria-label":ue().string,"aria-labelledby":ue().string},Object.keys(Ae).reduce((function(e,t){return k(k({},e),{},j({},t,(n=Ae[t],function(e,t,r){for(var o=arguments.length,i=new Array(o>3?o-3:0),a=3;a<o;a++)i[a-3]=arguments[a];return n.apply(void 0,[e,t,r].concat(i))})));var n}),{}));function Le(){return Le=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Le.apply(this,arguments)}var Me="bx",Ne=M.forwardRef((function(e,t){var n,r,o=e.expanded,i=e.defaultExpanded,a=e.isChildOfHeader,u=e["aria-label"],c=e["aria-labelledby"],s=e.children,l=e.onToggle,f=e.className,p=e.isFixedNav,d=e.isRail,h=e.isPersistent,v=e.addFocusListeners,y=e.addMouseListeners,m=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["expanded","defaultExpanded","isChildOfHeader","aria-label","aria-labelledby","children","onToggle","className","isFixedNav","isRail","isPersistent","addFocusListeners","addMouseListeners"]),g=(0,M.useRef)(void 0!==o).current,b=A((0,M.useState)(i),2),w=b[0],_=b[1],x=A((0,M.useState)(i),2),S=x[0],O=x[1],E=g?o:w,k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!E;g||_(t),l&&l(e,t),(g||d)&&O(t)},j={"aria-label":u,"aria-labelledby":c},C=Re()((P(n={},"".concat(Me,"--side-nav"),!0),P(n,"".concat(Me,"--side-nav--expanded"),E||S),P(n,"".concat(Me,"--side-nav--collapsed"),!E&&p),P(n,"".concat(Me,"--side-nav--rail"),d),P(n,f,!!f),P(n,"".concat(Me,"--side-nav--ux"),a),P(n,"".concat(Me,"--side-nav--hidden"),!h),n)),$=Re()((P(r={},"".concat(Me,"--side-nav__overlay"),!0),P(r,"".concat(Me,"--side-nav__overlay-active"),E||S),r)),T=s;d&&(T=M.Children.map(s,(function(e){var t=g&&S||E;return M.cloneElement(e,{isSideNavExpanded:t})})));var I={};return v&&(I.onFocus=function(e){e.currentTarget.contains(e.relatedTarget)||k(e,!0)},I.onBlur=function(e){e.currentTarget.contains(e.relatedTarget)||k(e,!1)}),y&&d&&(I.onMouseEnter=function(){return k(!0,!0)},I.onMouseLeave=function(){return k(!1,!1)}),M.createElement(M.Fragment,null,p?null:M.createElement("div",{className:$}),M.createElement("nav",Le({"aria-hidden":!E,ref:t,className:"".concat(Me,"--side-nav__navigation ").concat(C)},j,I,m),T))}));Ne.defaultProps={defaultExpanded:!1,isChildOfHeader:!0,isFixedNav:!1,isPersistent:!0,addFocusListeners:!0,addMouseListeners:!0},Ne.propTypes=$($({},De),{},{addFocusListeners:ue().bool,addMouseListeners:ue().bool,className:ue().string,defaultExpanded:ue().bool,expanded:ue().bool,isChildOfHeader:ue().bool,isFixedNav:ue().bool,isPersistent:ue().bool,isRail:ue().bool,onToggle:ue().func,translateById:ue().func});var Ue=Ne,Be=n(487),ze=n.n(Be),Fe=n(631),Ve=n.n(Fe),He=n(2052),We=n.n(He),Ke=n(4010),qe=n.n(Ke),Ze=n(1469),Ge=n.n(Ze),Qe=n(9329),Ye=n.n(Qe),Je=n(6618),Xe={};Xe.styleTagTransform=Ye(),Xe.setAttributes=qe(),Xe.insert=We().bind(null,"head"),Xe.domAPI=Ve(),Xe.insertStyleElement=Ge(),ze()(Je.Z,Xe);var et=Je.Z&&Je.Z.locals?Je.Z.locals:void 0;function tt(){return tt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tt.apply(this,arguments)}var nt=(0,X.createGlobalStore)("left-nav",{slotName:null,basePath:window.spaBase}),rt=M.forwardRef((function(e,t){var n,r=(0,Te.useStore)(nt),o=r.slotName,i=r.basePath,a=null!==(n=window.location)&&void 0!==n?n:{pathname:""};return M.createElement(xe,null,M.createElement(Ue,tt({ref:t,expanded:!0,"aria-label":"Left navigation",className:et.leftNav},e),M.createElement(Te.ExtensionSlot,{extensionSlotName:"global-nav-menu-slot"}),o?M.createElement(Te.ExtensionSlot,{extensionSlotName:o,state:{basePath:i,currentPath:a}}):null))}))},7968:function(e,t,n){var r=n(1577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},1577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},5901:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,{Z:function(){return r}})},6763:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(682),o=n(658),i=(0,r.Z)(o.Z,"Map")},7851:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var r=n(658).Z.Symbol},963:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(7851),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r.Z?r.Z.toStringTag:void 0,c=Object.prototype.toString,s=r.Z?r.Z.toStringTag:void 0,l=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?function(e){var t=i.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[u]=n:delete e[u]),o}(e):(t=e,c.call(t));var t}},9295:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(9494),o=(0,n(6899).Z)(Object.keys,Object),i=Object.prototype.hasOwnProperty,a=function(e){if(!(0,r.Z)(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},5852:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var r="object"==typeof o.g&&o.g&&o.g.Object===Object&&o.g},682:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r,o=n(3200),i=n(658).Z["__core-js_shared__"],a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",u=n(7275),c=n(9441),s=/^\[object .+?Constructor\]$/,l=Function.prototype,f=Object.prototype,p=l.toString,d=f.hasOwnProperty,h=RegExp("^"+p.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),v=function(e,t){var n,r,i=null==(n=e)?void 0:n[t];return r=i,(0,u.Z)(r)&&(!a||!(a in r))&&((0,o.Z)(r)?h:s).test((0,c.Z)(r))?i:void 0}},606:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var r=n(682),o=n(658),i=(0,r.Z)(o.Z,"DataView"),a=n(6763),u=(0,r.Z)(o.Z,"Promise"),c=(0,r.Z)(o.Z,"Set"),s=(0,r.Z)(o.Z,"WeakMap"),l=n(963),f=n(9441),p="[object Map]",d="[object Promise]",h="[object Set]",v="[object WeakMap]",y="[object DataView]",m=(0,f.Z)(i),g=(0,f.Z)(a.Z),b=(0,f.Z)(u),w=(0,f.Z)(c),_=(0,f.Z)(s),x=l.Z;(i&&x(new i(new ArrayBuffer(1)))!=y||a.Z&&x(new a.Z)!=p||u&&x(u.resolve())!=d||c&&x(new c)!=h||s&&x(new s)!=v)&&(x=function(e){var t=(0,l.Z)(e),n="[object Object]"==t?e.constructor:void 0,r=n?(0,f.Z)(n):"";if(r)switch(r){case m:return y;case g:return p;case b:return d;case w:return h;case _:return v}return t});var S=x},9494:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=Object.prototype,o=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},6899:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var r=function(e,t){return function(n){return e(t(n))}}},658:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(5852),o="object"==typeof self&&self&&self.Object===Object&&self,i=r.Z||o||Function("return this")()},9441:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=Function.prototype.toString,o=function(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},175:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(963),o=n(4897),i=function(e){return(0,o.Z)(e)&&"[object Arguments]"==(0,r.Z)(e)},a=Object.prototype,u=a.hasOwnProperty,c=a.propertyIsEnumerable,s=i(function(){return arguments}())?i:function(e){return(0,o.Z)(e)&&u.call(e,"callee")&&!c.call(e,"callee")},l=s},6575:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var r=Array.isArray},6905:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(3200),o=n(3492),i=function(e){return null!=e&&(0,o.Z)(e.length)&&!(0,r.Z)(e)}},7840:function(e,t,o){"use strict";o.d(t,{Z:function(){return s}});var i=o(658),a=r&&!r.nodeType&&r,u=a&&n&&!n.nodeType&&n,c=u&&u.exports===a?i.Z.Buffer:void 0,s=(c?c.isBuffer:void 0)||function(){return!1}},3202:function(e,t,n){"use strict";var r=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},o=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},i=function(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}},a=function(e){var t=this.__data__=new p(e);this.size=t.size},u=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new w;++t<n;)this.add(e[t])};n.d(t,{Z:function(){return Y}});var c=function(e,t){return e===t||e!=e&&t!=t},s=function(e,t){for(var n=e.length;n--;)if(c(e[n][0],t))return n;return-1},f=Array.prototype.splice;r.prototype.clear=function(){this.__data__=[],this.size=0},r.prototype.delete=function(e){var t=this.__data__,n=s(t,e);return!(n<0||(n==t.length-1?t.pop():f.call(t,n,1),--this.size,0))},r.prototype.get=function(e){var t=this.__data__,n=s(t,e);return n<0?void 0:t[n][1]},r.prototype.has=function(e){return s(this.__data__,e)>-1},r.prototype.set=function(e,t){var n=this.__data__,r=s(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var p=r,d=n(6763),h=(0,n(682).Z)(Object,"create"),y=Object.prototype.hasOwnProperty,m=Object.prototype.hasOwnProperty;o.prototype.clear=function(){this.__data__=h?h(null):{},this.size=0},o.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},o.prototype.get=function(e){var t=this.__data__;if(h){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return y.call(t,e)?t[e]:void 0},o.prototype.has=function(e){var t=this.__data__;return h?void 0!==t[e]:m.call(t,e)},o.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=h&&void 0===t?"__lodash_hash_undefined__":t,this};var g=o,b=function(e,t){var n,r,o=e.__data__;return("string"==(r=v(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};i.prototype.clear=function(){this.size=0,this.__data__={hash:new g,map:new(d.Z||p),string:new g}},i.prototype.delete=function(e){var t=b(this,e).delete(e);return this.size-=t?1:0,t},i.prototype.get=function(e){return b(this,e).get(e)},i.prototype.has=function(e){return b(this,e).has(e)},i.prototype.set=function(e,t){var n=b(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var w=i;a.prototype.clear=function(){this.__data__=new p,this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},a.prototype.get=function(e){return this.__data__.get(e)},a.prototype.has=function(e){return this.__data__.has(e)},a.prototype.set=function(e,t){var n=this.__data__;if(l(n,p)){var r=n.__data__;if(!d.Z||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new w(r)}return n.set(e,t),this.size=n.size,this};var _=a;u.prototype.add=u.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},u.prototype.has=function(e){return this.__data__.has(e)};var x=u,S=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},O=function(e,t,n,r,o,i){var a=1&n,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(e),l=i.get(t);if(s&&l)return s==t&&l==e;var f=-1,p=!0,d=2&n?new x:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var h=e[f],v=t[f];if(r)var y=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==y){if(y)continue;p=!1;break}if(d){if(!S(t,(function(e,t){if(a=t,!d.has(a)&&(h===e||o(h,e,n,r,i)))return d.push(t);var a}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p},E=n(7851),k=n(658).Z.Uint8Array,j=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},C=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},$=E.Z?E.Z.prototype:void 0,P=$?$.valueOf:void 0,A=n(6575),T=Object.prototype.propertyIsEnumerable,I=Object.getOwnPropertySymbols,R=I?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a)&&(i[o++]=a)}return i}(I(e),(function(t){return T.call(e,t)})))}:function(){return[]},D=n(175),L=n(7840),M=/^(?:0|[1-9]\d*)$/,N=n(8396),U=Object.prototype.hasOwnProperty,B=n(9295),z=n(6905),F=function(e){return r=R,t=n=e,o=(0,z.Z)(t)?function(e,t){var n,r,o,i=(0,A.Z)(e),a=!i&&(0,D.Z)(e),u=!i&&!a&&(0,L.Z)(e),c=!i&&!a&&!u&&(0,N.Z)(e),s=i||a||u||c,l=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],f=l.length;for(var p in e)!U.call(e,p)||s&&("length"==p||u&&("offset"==p||"parent"==p)||c&&("buffer"==p||"byteLength"==p||"byteOffset"==p)||(r=f,o=void 0===(n=p)?"undefined":v(n),(r=null==r?9007199254740991:r)&&("number"==o||"symbol"!=o&&M.test(n))&&n>-1&&n%1==0&&n<r))||l.push(p);return l}(t):(0,B.Z)(t),(0,A.Z)(n)?o:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(o,r(n));var t,n,r,o},V=Object.prototype.hasOwnProperty,H=n(606),W="[object Arguments]",K="[object Array]",q="[object Object]",Z=Object.prototype.hasOwnProperty,G=n(4897),Q=function e(t,n,r,o,i){return t===n||(null==t||null==n||!(0,G.Z)(t)&&!(0,G.Z)(n)?t!=t&&n!=n:function(e,t,n,r,o,i){var a=(0,A.Z)(e),u=(0,A.Z)(t),s=a?K:(0,H.Z)(e),f=u?K:(0,H.Z)(t),p=(s=s==W?q:s)==q,d=(f=f==W?q:f)==q,h=s==f;if(h&&(0,L.Z)(e)){if(!(0,L.Z)(t))return!1;a=!0,p=!1}if(h&&!p)return i||(i=new _),a||(0,N.Z)(e)?O(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new k(e),new k(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return c(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=j;case"[object Set]":var s=1&r;if(u||(u=C),e.size!=t.size&&!s)return!1;var l=a.get(e);if(l)return l==t;r|=2,a.set(e,t);var f=O(u(e),u(t),r,o,i,a);return a.delete(e),f;case"[object Symbol]":if(P)return P.call(e)==P.call(t)}return!1}(e,t,s,n,r,o,i);if(!(1&n)){var v=p&&Z.call(e,"__wrapped__"),y=d&&Z.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,g=y?t.value():t;return i||(i=new _),o(m,g,n,r,i)}}return!!h&&(i||(i=new _),function(e,t,n,r,o,i){var a=1&n,u=F(e),c=u.length;if(c!=F(t).length&&!a)return!1;for(var s=c;s--;){var f=u[s];if(!(a?f in t:V.call(t,f)))return!1}var p=i.get(e),d=i.get(t);if(p&&d)return p==t&&d==e;var h=!0;i.set(e,t),i.set(t,e);for(var v=a;++s<c;){var y=e[f=u[s]],m=t[f];if(r)var g=a?r(m,y,f,t,e,i):r(y,m,f,e,t,i);if(!(void 0===g?y===m||o(y,m,n,r,i):g)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&l(b,b)&&"function"==typeof w&&l(w,w)||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,r,o,i))}(t,n,r,o,e,i))},Y=function(e,t){return Q(e,t)}},3200:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(963),o=n(7275),i=function(e){if(!(0,o.Z)(e))return!1;var t=(0,r.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},3492:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var r=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7275:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var r=function(e){var t=void 0===e?"undefined":v(e);return null!=e&&("object"==t||"function"==t)}},4897:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var r=function(e){return null!=e&&"object"==typeof e}},8396:function(e,t,o){"use strict";o.d(t,{Z:function(){return y}});var i=o(963),a=o(3492),u=o(4897),c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c["[object Arguments]"]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c["[object Function]"]=c["[object Map]"]=c["[object Number]"]=c["[object Object]"]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1;var s,l=o(5852),f=r&&!r.nodeType&&r,p=f&&n&&!n.nodeType&&n,d=p&&p.exports===f&&l.Z.process,h=function(){try{return p&&p.require&&p.require("util").types||d&&d.binding&&d.binding("util")}catch(e){}}(),v=h&&h.isTypedArray,y=v?(s=v,function(e){return s(e)}):function(e){return(0,u.Z)(e)&&(0,a.Z)(e.length)&&!!c[(0,i.Z)(e)]}}},i={};function u(t){var n=i[t];if(void 0!==n)return n.exports;var r=i[t]={id:t,loaded:!1,exports:{}};return e[t].call(r.exports,r,r.exports,u),r.loaded=!0,r.exports}u.y=t,u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,{a:t}),t},u.d=function(e,t){for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e;u.g.importScripts&&(e=u.g.location+"");var t=u.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),u.p=e}();var h={};return(0,u(7968).s)(1),function(){"use strict";var e=function(e){["default","OpenmrsFetchError","VisitMode","VisitStatus","backendDependencies","clearCurrentUser","defaultVisitCustomRepresentation","fetchCurrentPatient","fhir","fhirBaseUrl","getCurrentUser","getLocations","getLoggedInUser","getSessionLocation","getSessionStore","getStartedVisit","getVisitTypes","getVisitsForPatient","makeUrl","openmrsFetch","openmrsObservableFetch","refetchCurrentUser","saveVisit","sessionEndpoint","setSessionLocation","toLocationObject","toVisitTypeObject","updateVisit","userHasAccess"].indexOf(e)<0&&(o[e]=function(){return r[e]})},t=function(e){["default","OpenmrsFetchError","VisitMode","VisitStatus","backendDependencies","clearCurrentUser","defaultVisitCustomRepresentation","fetchCurrentPatient","fhir","fhirBaseUrl","getCurrentUser","getLocations","getLoggedInUser","getSessionLocation","getSessionStore","getStartedVisit","getVisitTypes","getVisitsForPatient","makeUrl","openmrsFetch","openmrsObservableFetch","refetchCurrentUser","saveVisit","sessionEndpoint","setSessionLocation","toLocationObject","toVisitTypeObject","updateVisit","userHasAccess","ConfigStore","Type","defineConfigSchema","defineExtensionConfigSchema","getConfig","getConfigStore","inRange","interpolateString","interpolateUrl","isUrl","isUrlWithTemplateParameters","navigate","oneOf","provide","validator","validators"].indexOf(e)<0&&(o[e]=function(){return c[e]})};u.r(h),u.d(h,{AppState:function(){return v.aB},AssignedExtension:function(){return l.pv},CancelLoading:function(){return l.x9},ConfigStore:function(){return a.JU},ConfigurableLink:function(){return d.w},ConnectedExtension:function(){return l.uP},ConnectivityChangedEvent:function(){return f.ac},Extension:function(){return d.hj},ExtensionData:function(){return d.g},ExtensionMeta:function(){return l.uu},ExtensionRegistration:function(){return l.tj},ExtensionSlot:function(){return d.dT},ExtensionSlotState:function(){return l.u_},ExtensionStore:function(){return l.qN},InlineNotificationType:function(){return y.iW},LeftNavMenu:function(){return y.cW},NotificationDescriptor:function(){return y.MK},OfflineMode:function(){return p.iC},OfflineModeResult:function(){return p.Vm},OpenmrsFetchError:function(){return n.nF},PrecacheStaticDependenciesEvent:function(){return f.hM},QueueItemDescriptor:function(){return p.Cg},ShowNotificationEvent:function(){return f.Kj},ShowToastEvent:function(){return f.P3},SyncItem:function(){return p.we},SyncProcessOptions:function(){return p.Ug},ToastDescriptor:function(){return y.fU},ToastNotificationMeta:function(){return y.yQ},ToastType:function(){return y.pC},Type:function(){return a.Dy},UserHasAccess:function(){return d.Vz},VisitMode:function(){return n.u4},VisitStatus:function(){return n.Rx},attach:function(){return l.ub},backendDependencies:function(){return n.Wf},beginEditSynchronizationItem:function(){return p.jp},canBeginEditSynchronizationItemsOfType:function(){return p.Qd},clearCurrentUser:function(){return n.Ze},createGlobalStore:function(){return v.jk},createUseStore:function(){return d.NV},defaultVisitCustomRepresentation:function(){return n.I$},defineConfigSchema:function(){return a.SH},defineExtensionConfigSchema:function(){return a.Tj},deleteSynchronizationItem:function(){return p.Gy},detach:function(){return l.og},detachAll:function(){return l.lW},fetchCurrentPatient:function(){return n.Vy},fhir:function(){return n.N$},fhirBaseUrl:function(){return n.DN},generateOfflineUuid:function(){return p.sF},getAppState:function(){return v.W5},getAssignedExtensions:function(){return l.h6},getAsyncExtensionLifecycle:function(){return d.D$},getAsyncLifecycle:function(){return d.Ae},getConfig:function(){return a.iE},getConfigStore:function(){return a.pR},getConnectedExtensions:function(){return l.Kq},getCurrentOfflineMode:function(){return p.vm},getCurrentUser:function(){return n.ts},getDynamicOfflineDataEntries:function(){return p.xA},getDynamicOfflineDataEntriesFor:function(){return p.H_},getDynamicOfflineDataHandlers:function(){return p.Ui},getExtensionNameFromId:function(){return l.EB},getExtensionStore:function(){return l.yw},getFullSynchronizationItems:function(){return p.D2},getFullSynchronizationItemsFor:function(){return p.WB},getGlobalStore:function(){return v.zJ},getLifecycle:function(){return d.tl},getLocations:function(){return n.JC},getLoggedInUser:function(){return n.r},getOfflineDb:function(){return p.aA},getOfflinePatientDataStore:function(){return p.k1},getSessionLocation:function(){return n.WK},getSessionStore:function(){return n.KJ},getStartedVisit:function(){return n.$X},getSyncLifecycle:function(){return d.a$},getSynchronizationItem:function(){return p.TI},getSynchronizationItems:function(){return p.Q2},getVisitTypes:function(){return n.P9},getVisitsForPatient:function(){return n.nx},inRange:function(){return a.Z2},interpolateString:function(){return a.IT},interpolateUrl:function(){return a.ll},isOfflineUuid:function(){return p.z7},isUrl:function(){return a.CB},isUrlWithTemplateParameters:function(){return a.gZ},makeUrl:function(){return n.bf},messageOmrsServiceWorker:function(){return p.gp},navigate:function(){return a.c4},offlineUuidPrefix:function(){return p.a7},omrsOfflineCachingStrategyHttpHeaderName:function(){return p.Rz},omrsOfflineResponseBodyHttpHeaderName:function(){return p.QI},omrsOfflineResponseStatusHttpHeaderName:function(){return p.$9},oneOf:function(){return a.kw},openmrsFetch:function(){return n.vb},openmrsObservableFetch:function(){return n.uj},provide:function(){return a.JJ},putDynamicOfflineData:function(){return p.cV},putDynamicOfflineDataFor:function(){return p.fR},queueSynchronizationItem:function(){return p.X2},refetchCurrentUser:function(){return n.VJ},registerExtension:function(){return l.ix},registerExtensionSlot:function(){return l.Qq},registerOfflinePatientHandler:function(){return p.dt},removeDynamicOfflineData:function(){return p.pO},removeDynamicOfflineDataFor:function(){return p.ME},renderExtension:function(){return l.H8},saveVisit:function(){return n.bX},sessionEndpoint:function(){return n.z$},setLeftNav:function(){return y.VM},setSessionLocation:function(){return n.jK},setupDynamicOfflineDataHandler:function(){return p.Xc},setupOfflineSync:function(){return p.Kb},showModal:function(){return y.K4},showNotification:function(){return y.c0},showToast:function(){return y.CF},subscribeConnectivity:function(){return f.BW},subscribeConnectivityChanged:function(){return f.XS},subscribeNotificationShown:function(){return f.NQ},subscribePrecacheStaticDependencies:function(){return f.dY},subscribeTo:function(){return v.se},subscribeToastShown:function(){return f.id},syncAllDynamicOfflineData:function(){return p.ps},syncDynamicOfflineData:function(){return p.mF},syncOfflinePatientData:function(){return p.MO},toLocationObject:function(){return n.Lq},toVisitTypeObject:function(){return n.VF},unsetLeftNav:function(){return y.$d},updateVisit:function(){return n.ym},useAssignedExtensionIds:function(){return d.YV},useAssignedExtensions:function(){return d.P3},useBodyScrollLock:function(){return d.yn},useConfig:function(){return d.ZR},useConnectedExtensions:function(){return d.BL},useConnectivity:function(){return d.Y9},useCurrentPatient:function(){return d.Yq},useExtensionSlot:function(){return d.p8},useExtensionSlotMeta:function(){return d.qd},useExtensionStore:function(){return d.jf},useLayoutType:function(){return d.mr},useLocations:function(){return d.Z_},useOnClickOutside:function(){return d.t$},usePagination:function(){return d.h0},usePatient:function(){return d.lm},useSession:function(){return d.kP},useStore:function(){return d.oR},useStoreWithActions:function(){return d.xQ},useVisit:function(){return d.JF},useVisitTypes:function(){return d.NN},userHasAccess:function(){return n.y9},validator:function(){return a.sC},validators:function(){return a.z2}});var n=u(8461),r=u(6066),o={};for(var i in r)e(i);u.d(h,o);var a=u(3373),c=u(674);for(var s in o={},c)t(s);u.d(h,o);var l=u(6856),f=u(2034),p=u(8082),d=u(5309),v=u(1645),y=u(6353)}(),h}())}}}))},991:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/access_time24px">\n <path id="icon/callend/access_time24px" d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm-.22-13h-.06c-.4 0-.72.32-.72.72v4.72c0 .35.18.68.49.86l4.15 2.49c.34.2.78.1.98-.24.21-.34.1-.79-.25-.99l-3.87-2.3V7.72c0-.4-.32-.72-.72-.72z" />\n </g>\n <title>Access time rounded</title>\n</svg>'},662:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Add rounded</title>\n</svg>\n'},865:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_back_24px">\n <path id="icon/navigation/arrow_back_24px_2" d="M18.7912 11.005H7.62124L12.5012 6.12499C12.8912 5.73499 12.8912 5.09499 12.5012 4.70499C12.3144 4.51774 12.0608 4.41251 11.7962 4.41251C11.5317 4.41251 11.2781 4.51774 11.0912 4.70499L4.50124 11.295C4.11124 11.685 4.11124 12.315 4.50124 12.705L11.0912 19.295C11.4812 19.685 12.1112 19.685 12.5012 19.295C12.8912 18.905 12.8912 18.275 12.5012 17.885L7.62124 13.005H18.7912C19.3412 13.005 19.7912 12.555 19.7912 12.005C19.7912 11.455 19.3412 11.005 18.7912 11.005Z"/>\n </g>\n <title>Arrow back rounded</title>\n</svg>\n'},646:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_downward_24px">\n <path id="icon/navigation/arrow_downward_24px_2" d="M11.005 5.20874V16.3787L6.12498 11.4987C5.73498 11.1087 5.09498 11.1087 4.70498 11.4987C4.31498 11.8887 4.31498 12.5187 4.70498 12.9087L11.295 19.4987C11.685 19.8887 12.315 19.8887 12.705 19.4987L19.295 12.9087C19.685 12.5187 19.685 11.8887 19.295 11.4987C19.1081 11.3115 18.8545 11.2063 18.59 11.2063C18.3255 11.2063 18.0718 11.3115 17.885 11.4987L13.005 16.3787V5.20874C13.005 4.65874 12.555 4.20874 12.005 4.20874C11.455 4.20874 11.005 4.65874 11.005 5.20874Z"/>\n </g>\n <title>Arrow downward rounded</title>\n</svg>\n'},509:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"/>\n <title>Arrow forward rounded</title>\n</svg>'},250:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_upward_24px">\n <path id="icon/navigation/arrow_upward_24px_2" d="M13 18.7913V7.62126L17.88 12.5013C18.27 12.8913 18.91 12.8913 19.3 12.5013C19.69 12.1113 19.69 11.4813 19.3 11.0913L12.71 4.50126C12.5231 4.314 12.2695 4.20877 12.005 4.20877C11.7405 4.20877 11.4868 4.314 11.3 4.50126L4.69997 11.0813C4.30997 11.4713 4.30997 12.1013 4.69997 12.4913C5.08997 12.8813 5.71997 12.8813 6.10997 12.4913L11 7.62126V18.7913C11 19.3413 11.45 19.7913 12 19.7913C12.55 19.7913 13 19.3413 13 18.7913Z"/>\n </g>\n <title>Arrow upward rounded </title>\n</svg>\n'},142:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/calendar24px">\n <path d="M20 3h-1V2c0-.55-.45-1-1-1s-1 .45-1 1v1H7V2c0-.55-.45-1-1-1s-1 .45-1 1v1H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 18H5c-.55 0-1-.45-1-1V8h16v12c0 .55-.45 1-1 1z"/>\n </g>\n <title>Calendar rounded</title>\n</svg>'},451:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>\n <title>Check circle</title>\n</svg>\n'},61:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_down_24px">\n <path id="icon/navigation/chevron_down_24px" d="M8.12 9.29L12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7c-.39-.39-.39-1.02 0-1.41.39-.38 1.03-.39 1.42 0z"/>\n </g>\n <title>Chevron down</title>\n</svg>\n'},76:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_left_24px">\n <path id="icon/navigation/chevron_left_24px_2" d="M15 6.70499C14.8132 6.51774 14.5595 6.41251 14.295 6.41251C14.0305 6.41251 13.7769 6.51774 13.59 6.70499L9.00002 11.295C8.61002 11.685 8.61002 12.315 9.00002 12.705L13.59 17.295C13.98 17.685 14.61 17.685 15 17.295C15.39 16.905 15.39 16.275 15 15.885L11.12 11.995L15 8.11499C15.39 7.72499 15.38 7.08499 15 6.70499Z"/>\n </g>\n <title>Chevron left</title>\n</svg>\n'},600:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_right_24px">\n <path id="icon/navigation/chevron_right_24px_2" d="M9.00002 6.71063C8.61002 7.10063 8.61002 7.73063 9.00002 8.12063L12.88 12.0006L9.00002 15.8806C8.61002 16.2706 8.61002 16.9006 9.00002 17.2906C9.39002 17.6806 10.02 17.6806 10.41 17.2906L15 12.7006C15.39 12.3106 15.39 11.6806 15 11.2906L10.41 6.70063C10.03 6.32063 9.39002 6.32063 9.00002 6.71063Z"/>\n </g>\n <title>Chevron right</title>\n</svg>\n'},40:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_up_24px">\n <path d="M11.29 8.71L6.7 13.3c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 10.83l3.88 3.88c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L12.7 8.71c-.38-.39-1.02-.39-1.41 0z"/>\n </g>\n <title>Chevron up</title>\n</svg>\n'},714:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/>\n <title>Close icon</title>\n</svg>'},752:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z" />\n <title>Download icon</title>\n</svg>'},862:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n<g id="icon/navigation/home_24px">\n <path id="icon/navigation/home_24px" d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z"/>\n</g>\n<title>Home rounded</title>\n</svg>'},601:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/important_notification_24px_rounded">\n <path d="M12 23c1.1 0 1.99-.89 1.99-1.99h-3.98c0 1.1.89 1.99 1.99 1.99zm8.29-4.71L19 17v-6c0-3.35-2.36-6.15-5.5-6.83V3c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v1.17C7.36 4.85 5 7.65 5 11v6l-1.29 1.29c-.63.63-.19 1.71.7 1.71h15.17c.9 0 1.34-1.08.71-1.71zM13 16h-2v-2h2v2zm0-5c0 .55-.45 1-1 1s-1-.45-1-1V9c0-.55.45-1 1-1s1 .45 1 1v2z"/>\n </g>\n <title>Important notification</title>\n</svg>\n'},879:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24">\n <path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/>\n <path d="M0 0h24v24H0z" class="omrs-icon-location"/>\n <title>Location icon</title>\n</svg>'},739:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/menu_24px">\n <path id="icon/navigation/menu_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M4 8C3.44995 8 3 7.54999 3 7C3 6.45001 3.44995 6 4 6H20C20.55 6 21 6.45001 21 7C21 7.54999 20.55 8 20 8H4ZM4 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H4C3.44995 11 3 11.45 3 12C3 12.55 3.44995 13 4 13ZM4 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H4C3.44995 16 3 16.45 3 17C3 17.55 3.44995 18 4 18Z"/>\n </g>\n <title>Menu rounded</title>\n</svg>\n'},524:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Remove rounded</title>\n</svg>\n'},787:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/search_24px">\n <path id="icon/action/search_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M15.1865 14.4716H15.9765L20.2165 18.7316C20.6266 19.1416 20.6266 19.8116 20.2165 20.2216C19.8065 20.6316 19.1366 20.6316 18.7265 20.2216L14.4765 15.9716V15.1816L14.2065 14.9016C12.8065 16.1016 10.8966 16.7216 8.86655 16.3816C6.08652 15.9116 3.86655 13.5916 3.52658 10.7916C3.00656 6.56158 6.5665 3.00158 10.7966 3.52157C13.5965 3.86157 15.9166 6.08157 16.3866 8.86157C16.7265 10.8916 16.1065 12.8016 14.9066 14.2016L15.1865 14.4716ZM5.47653 9.97155C5.47653 12.4615 7.48654 14.4716 9.97653 14.4716C12.4665 14.4716 14.4765 12.4615 14.4765 9.97155C14.4765 7.48156 12.4665 5.47155 9.97653 5.47155C7.48654 5.47155 5.47653 7.48156 5.47653 9.97155Z"/>\n </g>\n <title>Search rounded</title>\n</svg>\n'},592:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/supervised_user_circle_24px">\n <path id="icon/action/supervised_user_circle_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.47998 2 2 6.48001 2 12C2 17.52 6.47998 22 12 22C17.52 22 22 17.52 22 12C22 6.48001 17.52 2 12 2ZM15.61 8.34C16.6801 8.34 17.54 9.19998 17.54 10.27C17.54 11.34 16.6801 12.2 15.61 12.2C14.54 12.2 13.6801 11.34 13.6801 10.27C13.67 9.19998 14.54 8.34 15.61 8.34ZM11.97 9.12C11.97 7.82001 10.91 6.76001 9.60999 6.76001C8.30005 6.76001 7.25 7.81 7.25 9.12C7.25 10.42 8.31006 11.48 9.60999 11.48C10.91 11.48 11.97 10.42 11.97 9.12ZM9.60999 15.89V19.64C7.20996 18.89 5.30994 17.04 4.46997 14.68C5.52002 13.56 8.14001 12.99 9.60999 12.99C10.14 12.99 10.8099 13.07 11.51 13.21C9.87 14.08 9.60999 15.23 9.60999 15.89ZM11.21 19.96C11.47 19.99 11.73 20 12 20C15.39 20 18.2799 17.88 19.45 14.91C18.5299 14.15 16.6799 13.76 15.61 13.76C14.1499 13.76 11.21 14.47 11.21 15.89V19.96Z"/>\n </g>\n <title>Supervised user circle rounded</title>\n</svg>\n'},141:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path id="icon/action/visibility_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 4.5C7 4.5 2.72998 7.60999 1 12C2.72998 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.60999 17 4.5 12 4.5ZM12 17C9.23999 17 7 14.76 7 12C7 9.23999 9.23999 7 12 7C14.76 7 17 9.23999 17 12C17 14.76 14.76 17 12 17ZM9 12C9 10.34 10.34 9 12 9C13.66 9 15 10.34 15 12C15 13.66 13.66 15 12 15C10.34 15 9 13.66 9 12Z"/>\n </g>\n <title>Visibility rounded</title>\n</svg>\n'},647:function(e){"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path d="M15.85 3.85L17.3 5.3l-2.18 2.16c-.39.39-.39 1.03 0 1.42.39.39 1.03.39 1.42 0L18.7 6.7l1.45 1.45c.31.31.85.09.85-.36V3.5c0-.28-.22-.5-.5-.5h-4.29c-.45 0-.67.54-.36.85zm-12 4.3L5.3 6.7l2.16 2.18c.39.39 1.03.39 1.42 0 .39-.39.39-1.03 0-1.42L6.7 5.3l1.45-1.45c.31-.31.09-.85-.36-.85H3.5c-.28 0-.5.22-.5.5v4.29c0 .45.54.67.85.36zm4.3 12L6.7 18.7l2.18-2.16c.39-.39.39-1.03 0-1.42-.39-.39-1.03-.39-1.42 0L5.3 17.3l-1.45-1.45c-.31-.31-.85-.09-.85.36v4.29c0 .28.22.5.5.5h4.29c.45 0 .67-.54.36-.85zm12-4.3L18.7 17.3l-2.16-2.18c-.39-.39-1.03-.39-1.42 0-.39.39-.39 1.03 0 1.42l2.18 2.16-1.45 1.45c-.31.31-.09.85.36.85h4.29c.28 0 .5-.22.5-.5v-4.29c0-.45-.54-.67-.85-.36z" />\n </g>\n <title>\n Zoom Out \n </title>\n</svg>'},885:function(e){"use strict";e.exports='<svg viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.29 40.3278C45.3275 35.2904 52.2878 32.1739 59.9776 32.1739C67.6466 32.1739 74.5911 35.2765 79.6245 40.29L79.6454 21.7502C73.7513 18.7143 67.0622 17 59.9776 17C52.8891 17 46.1652 18.9309 40.2692 21.9679L40.29 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6719 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6868 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.507L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M185.885 90.9982H187.309L190.043 97.3236H190.066L192.824 90.9982H194.215V99.0676H193.258V92.2971H193.234L190.34 99.0676H189.758L186.864 92.2971H186.842V99.0676H185.885V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M198.386 90.9982H203.457V91.8867H199.343V94.4168H203.184V95.3062H199.343V98.1782H203.663V99.0676H198.386V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M207.891 98.1782H209.713C211.561 98.1782 212.963 97.2431 212.963 95.0319C212.963 92.8218 211.561 91.8867 209.713 91.8867H207.891V98.1782ZM206.934 90.9982H210.034C211.617 90.9982 213.987 92.0586 213.987 95.0319C213.987 98.0083 211.617 99.0676 210.034 99.0676H206.934V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.007 99.0676H217.965V90.9982H217.007V99.0676Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.105 92.6628C226.627 92.0119 225.863 91.6819 225.088 91.6819C223.288 91.6819 222.011 93.266 222.011 95.0319C222.011 96.9012 223.277 98.3839 225.088 98.3839C226.068 98.3839 226.855 97.9844 227.425 97.255L228.143 97.8582C227.425 98.8281 226.377 99.2724 225.088 99.2724C222.774 99.2724 220.986 97.4826 220.986 95.0319C220.986 92.6628 222.695 90.7935 225.088 90.7935C226.183 90.7935 227.254 91.1701 227.937 92.0586L227.105 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M233.557 92.2295H233.533L231.858 96.1947H235.152L233.557 92.2295ZM233.123 90.9982H234.023L237.453 99.0676H236.336L235.516 97.0841H231.482L230.65 99.0676H229.568L233.123 90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M240.006 90.9982H240.964V98.1782H244.656V99.0676H240.006V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M252.793 94.5539H253.648C254.708 94.5539 256.087 94.5539 256.087 93.2203C256.087 92.0586 255.073 91.8867 254.139 91.8867H252.793V94.5539ZM251.836 90.9982H253.899C255.46 90.9982 257.113 91.2258 257.113 93.2203C257.113 94.3939 256.349 95.1582 255.095 95.3519L257.386 99.0676H256.213L254.023 95.4434H252.793V99.0676H251.836V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M260.51 90.9982H265.58V91.8867H261.468V94.4168H265.308V95.3062H261.468V98.1782H265.786V99.0676H260.51V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M274.402 92.6628C273.923 92.0119 273.16 91.6819 272.384 91.6819C270.584 91.6819 269.307 93.266 269.307 95.0319C269.307 96.9012 270.573 98.3839 272.384 98.3839C273.364 98.3839 274.151 97.9844 274.72 97.255L275.438 97.8582C274.72 98.8281 273.672 99.2724 272.384 99.2724C270.071 99.2724 268.282 97.4826 268.282 95.0319C268.282 92.6628 269.991 90.7935 272.384 90.7935C273.478 90.7935 274.55 91.1701 275.234 92.0586L274.402 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M284.739 95.0319C284.739 93.1746 283.439 91.6819 281.548 91.6819C279.656 91.6819 278.357 93.1746 278.357 95.0319C278.357 96.8903 279.656 98.3839 281.548 98.3839C283.439 98.3839 284.739 96.8903 284.739 95.0319ZM277.33 95.0319C277.33 92.5932 279.097 90.7935 281.548 90.7935C283.998 90.7935 285.765 92.5932 285.765 95.0319C285.765 97.4726 283.998 99.2724 281.548 99.2724C279.097 99.2724 277.33 97.4726 277.33 95.0319Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M289.514 94.5539H290.369C291.428 94.5539 292.807 94.5539 292.807 93.2203C292.807 92.0586 291.793 91.8867 290.859 91.8867H289.514V94.5539ZM288.556 90.9982H290.618C292.181 90.9982 293.833 91.2258 293.833 93.2203C293.833 94.3939 293.07 95.1582 291.817 95.3519L294.106 99.0676H292.933L290.744 95.4434H289.514V99.0676H288.556V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M297.81 98.1782H299.635C301.48 98.1782 302.881 97.2431 302.881 95.0319C302.881 92.8218 301.48 91.8867 299.635 91.8867H297.81V98.1782ZM296.853 90.9982H299.953C301.538 90.9982 303.909 92.0586 303.909 95.0319C303.909 98.0083 301.538 99.0676 299.953 99.0676H296.853V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M315.407 92.4223C315.089 91.9095 314.517 91.6819 313.937 91.6819C313.093 91.6819 312.216 92.0814 312.216 93.0384C312.216 93.7788 312.626 94.1097 313.914 94.5202C315.168 94.9187 316.331 95.3291 316.331 96.9132C316.331 98.5201 314.951 99.2724 313.493 99.2724C312.558 99.2724 311.555 98.9643 311.007 98.1554L311.828 97.4826C312.17 98.0759 312.854 98.3839 313.549 98.3839C314.37 98.3839 315.303 97.9049 315.303 96.9807C315.303 95.9899 314.633 95.818 313.196 95.341C312.057 94.9644 311.19 94.4625 311.19 93.1189C311.19 91.5677 312.523 90.7935 313.937 90.7935C314.837 90.7935 315.601 91.0439 316.193 91.7386L315.407 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M320.844 95.5914L317.835 90.9982H319.054L321.323 94.6454L323.658 90.9982H324.81L321.8 95.5914V99.0676H320.844V95.5914Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M330.565 92.4223C330.245 91.9095 329.675 91.6819 329.094 91.6819C328.251 91.6819 327.374 92.0814 327.374 93.0384C327.374 93.7788 327.784 94.1097 329.072 94.5202C330.326 94.9187 331.487 95.3291 331.487 96.9132C331.487 98.5201 330.109 99.2724 328.65 99.2724C327.716 99.2724 326.713 98.9643 326.165 98.1554L326.986 97.4826C327.328 98.0759 328.012 98.3839 328.707 98.3839C329.528 98.3839 330.461 97.9049 330.461 96.9807C330.461 95.9899 329.79 95.818 328.354 95.341C327.215 94.9644 326.348 94.4625 326.348 93.1189C326.348 91.5677 327.681 90.7935 329.094 90.7935C329.995 90.7935 330.759 91.0439 331.351 91.7386L330.565 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M339.283 91.8867H336.617V99.0676H335.659V91.8867H332.992V90.9982H339.283V91.8867Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M341.665 90.9982H346.736V91.8867H342.623V94.4168H346.463V95.3062H342.623V98.1782H346.942V99.0676H341.665V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M349.905 90.9982H351.329L354.064 97.3236H354.087L356.845 90.9982H358.236V99.0676H357.278V92.2971H357.255L354.361 99.0676H353.779L350.884 92.2971H350.863V99.0676H349.905V90.9982Z" fill="var(--logo-black)"/>\n</svg>\n'},575:function(e){"use strict";e.exports='<svg id="omrs-logo-icon" width="121" height="118" viewBox="0 0 121 118" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.436 39.474C45.505 34.405 52.509 31.269 60.247 31.269C67.964 31.269 74.952 34.391 80.017 39.436L80.038 20.78C74.107 17.725 67.376 16 60.247 16C53.114 16 46.348 17.943 40.415 20.999L40.436 39.474Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.038 79.064C74.969 84.134 67.968 87.269 60.23 87.269C52.513 87.269 45.525 84.148 40.456 79.102L40.436 97.759C46.37 100.813 53.098 102.539 60.23 102.539C67.363 102.539 74.093 100.813 80.024 97.758L80.038 79.064Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.474 79.089C35.405 74.02 32.269 67.019 32.269 59.281C32.269 51.564 35.39 44.577 40.436 39.508L21.779 39.488C18.725 45.421 17 52.148 17 59.281C17 66.414 18.725 73.144 21.782 79.076L40.474 79.089Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.027 39.435C85.096 44.503 88.232 51.508 88.232 59.246C88.232 66.963 85.111 73.951 80.064 79.015L98.722 79.036C101.776 73.105 103.501 66.375 103.501 59.246C103.501 52.112 101.776 45.381 98.72 39.448L80.027 39.435Z" fill="var(--logo-green)"/>\n</svg>\n'},93:function(e){"use strict";e.exports='<svg id="omrs-logo-partial" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n</svg>\n'},839:function(e){"use strict";e.exports='<svg id="omrs-logo-white" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-white)"/>\n</svg>\n'},45:function(e){"use strict";e.exports=o},740:function(e){"use strict";e.exports=i},685:function(e){"use strict";e.exports=a},954:function(e){"use strict";e.exports=u},493:function(e){"use strict";e.exports=c},792:function(e){"use strict";e.exports=s}},l={};function f(e){var t=l[e];if(void 0!==t)return t.exports;var r=l[e]={id:e,loaded:!1,exports:{}};return n[e](r,r.exports,f),r.loaded=!0,r.exports}f.y=r,f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e;f.g.importScripts&&(e=f.g.location+"");var t=f.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),f.p=e}();var p={};return(0,f(584).s)(1),function(){"use strict";var t=function(e,t){var n=(new DOMParser).parseFromString(t,"text/html").querySelector("svg");n&&(n.id=e,c.appendChild(n))},n=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},r=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},o=f(885),i=f(93),a=f(575),u=f(839),c=document.createElement("div"),s=function(){document.body.appendChild(c)};c.id="omrs-svgs-container",c.style.display="none","complete"===document.readyState?s():window.addEventListener("load",s);var l=f(141),p=f(739),d=f(787),h=f(865),v=f(509),y=f(646),m=f(250),g=f(76),b=f(600),w=f(40),_=f(61),x=f(592),S=f(862),O=f(714),E=f(601),k=f(142),j=f(991),C=f(662),$=f(524),P=f(451),A=f(647),T=f(879),I=f(752),R=f(78);Number.MAX_SAFE_INTEGER,f(954);var D=f(792),L={};try{process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES&&"true"===process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES?L.enableCssCustomProperties=!0:L.enableCssCustomProperties=!1,process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE&&"true"===process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE?L.enableUseControlledStateWithValue=!0:L.enableUseControlledStateWithValue=!1,process.env.CARBON_ENABLE_CSS_GRID&&"true"===process.env.CARBON_ENABLE_CSS_GRID?L.enableCssGrid=!0:L.enableCssGrid=!1,process.env.CARBON_ENABLE_V11_RELEASE&&"true"===process.env.CARBON_ENABLE_V11_RELEASE?L.enableV11Release=!0:L.enableV11Release=!1}catch(e){L.enableCssCustomProperties=!1,L.enableUseControlledStateWithValue=!1,L.enableCssGrid=!1,L.enableV11Release=!1}for(var M=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:L.enableCssCustomProperties},{name:"enable-use-controlled-state-with-value",description:"Enable components to be created in either a controlled or uncontrolled mode\n",enabled:L.enableUseControlledStateWithValue},{name:"enable-css-grid",description:"Enable CSS Grid Layout in the Grid and Column React components\n",enabled:L.enableCssGrid},{name:"enable-v11-release",description:"Enable the features and functionality for the v11 Release\n",enabled:L.enableV11Release}],N=function(){function t(n){var r=this;(function(t,n){if(r=t,!(null!=(o=n)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?o[Symbol.hasInstance](r):e(r,o)))throw new TypeError("Cannot call a class as a function");var r,o})(this,t),this.flags=new Map,n&&Object.keys(n).forEach((function(e){r.flags.set(e,n[e])}))}var r,o;return r=t,(o=[{key:"checkForFlag",value:function(e){if(!this.flags.has(e))throw new Error("Unable to find a feature flag with the name: `".concat(e,"`"))}},{key:"add",value:function(e,t){if(this.flags.has(e))throw new Error("The feature flag: ".concat(e," already exists"));this.flags.set(e,t)}},{key:"enable",value:function(e){this.checkForFlag(e),this.flags.set(e,!0)}},{key:"disable",value:function(e){this.checkForFlag(e),this.flags.set(e,!1)}},{key:"merge",value:function(e){var t=this;Object.keys(e).forEach((function(n){t.flags.set(n,e[n])}))}},{key:"mergeWithScope",value:function(e){var t,r,o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=n(e))){r&&(e=r);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}(e.flags);try{for(o.s();!(t=o.n()).done;){var i=function(e){if(Array.isArray(e))return e}(r=t.value)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(r)||n(r,2)||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.")}(),a=i[0],u=i[1];this.flags.has(a)||this.flags.set(a,u)}}catch(e){o.e(e)}finally{o.f()}}},{key:"enabled",value:function(e){return this.checkForFlag(e),this.flags.get(e)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),t}(),U=new N(void 0),B=0;B<M.length;B++){var z=M[B];U.add(z.name,z.enabled)}!function(){U.merge.apply(U,arguments)}({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0}),f(279),new D.Subject,new D.Subject,f(45);var F,V=f(685);(0,V.createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]}),window.getComputedStyle(document.body).overflow,f(740),(0,V.createGlobalStore)("left-nav",{slotName:null,basePath:window.spaBase}),f(606),F=function(e,t){document.documentElement.style.setProperty(e,t)},(0,R.defineConfigSchema)("@openmrs/esm-styleguide",{"Brand color #1":{_default:"#005d5d",_type:R.Type.String},"Brand color #2":{_default:"#004144",_type:R.Type.String},"Brand color #3":{_default:"#007d79",_type:R.Type.String}}),(0,R.getConfigStore)("@openmrs/esm-styleguide").subscribe((function(e){e.loaded&&e.config&&(F("--brand-01",e.config["Brand color #1"]),F("--brand-02",e.config["Brand color #2"]),F("--brand-03",e.config["Brand color #3"]))})),t("omrs-logo-full-color",o),t("omrs-logo-full-mono",o),t("omrs-logo-full-grey",o),t("omrs-logo-partial-color",i),t("omrs-logo-partial-mono",i),t("omrs-logo-partial-grey",i),t("omrs-logo-icon-color",a),t("omrs-logo-icon-mono",a),t("omrs-logo-icon-grey",a),t("omrs-logo-white",u),t("omrs-icon-visibility",l),t("omrs-icon-menu",p),t("omrs-icon-search",d),t("omrs-icon-arrow-back",h),t("omrs-icon-arrow-forward",v),t("omrs-icon-arrow-downward",y),t("omrs-icon-arrow-upward",m),t("omrs-icon-chevron-left",g),t("omrs-icon-chevron-right",b),t("omrs-icon-chevron-up",w),t("omrs-icon-chevron-down",_),t("omrs-icon-supervised-user-circle",x),t("omrs-icon-home",S),t("omrs-icon-close",O),t("omrs-icon-important-notification",E),t("omrs-icon-calendar",k),t("omrs-icon-access-time",j),t("omrs-icon-add",C),t("omrs-icon-remove",$),t("omrs-icon-check-circle",P),t("omrs-icon-zoomoutmap",A),t("omrs-icon-location",T),t("omrs-icon-download",I)}(),function(){"use strict";f.r(p)}(),p}())}}}))}}]);