core-resource-app-test
Version:
App that contains assets and scripts for the core apps
2 lines • 250 kB
JavaScript
var Dhis2HeaderBar=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,t,r){Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=166)}([function(e,t){e.exports=React},function(e,t){e.exports=function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}},function(e,t){e.exports=fp},function(e,t){"use strict";function r(e,t){if(void 0!==e)return!0;throw new Error([t||"Value","should be provided"].join(" "))}function n(e,t,n){if(r(e,n),r(t,"Type"),"function"==typeof t&&e instanceof t||"string"==typeof t&&typeof e===t)return!0;throw new Error(["Expected",n||e,"to have type",t].join(" "))}function o(e,t){function r(){}try{return n(e,t),!0}catch(e){r()}return!1}function i(e){return o(e,"string")}function a(e){return Array.isArray(e)}function s(e){return o(e,Object)}function l(e){return void 0!==e}function u(e){return"number"==typeof e&&isFinite(e)&&e>-9007199254740992&&e<9007199254740992&&Math.floor(e)===e}function c(e){return"number"==typeof e&&isFinite(e)&&e-parseFloat(e)+1>=0}function f(e,t){var r=a(t)&&t||[];return r.indexOf(e)>=0}function p(e){return e&&11===e.length}Object.defineProperty(t,"__esModule",{value:!0}),t.checkDefined=r,t.checkType=n,t.isType=o,t.isString=i,t.isArray=a,t.isObject=s,t.isDefined=l,t.isInteger=u,t.isNumeric=c,t.contains=f,t.isValidUid=p,Number.isInteger||(Number.isInteger=u),t.default={checkType:n,checkDefined:r,isArray:a,isDefined:l,isInteger:u,isNumeric:c,isString:i,isType:o,contains:f,isValidUid:p}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={easeOutFunction:"cubic-bezier(0.23, 1, 0.32, 1)",easeInOutFunction:"cubic-bezier(0.445, 0.05, 0.55, 0.95)",easeOut:function(e,t,r,n){if(n=n||this.easeOutFunction,t&&"[object Array]"===Object.prototype.toString.call(t)){for(var o="",i=0;i<t.length;i++)o&&(o+=","),o+=this.create(e,t[i],r,n);return o}return this.create(e,t,r,n)},create:function(e,t,r,n){return e=e||"450ms",t=t||"all",r=r||"0ms",n=n||"linear",t+" "+e+" "+n+" "+r}}},function(e,t){e.exports=Rx},function(e,t,r){"use strict";(function(e){function n(e,t){switch(e.userSettings.keyStyle){case"vietnam/vietnam.css":return Object.assign({},t,{background:"#B40303"});case"india/india.css":return Object.assign({},t,{background:"#EA5911"});case"green/green.css":return Object.assign({},t,{background:"#467E4A"})}return t}function o(){return e.document?Math.max(window.document.documentElement.clientWidth,window.innerWidth||0):0}function i(){var t=465;if(!e.document)return t;var r=.8*Math.max(e.document.documentElement.clientHeight,window.innerHeight||0);return r<t?r:t}var a=r(15),s=(r.n(a),r(5)),l=(r.n(s),r(11)),u=r.n(l),c=r(2);r.n(c);r.d(t,"a",function(){return f}),t.e=n,r.d(t,"c",function(){return h}),t.d=i;var f=125,p={},d=r.i(c.curry)(function(e,t,r){return e()?t:r}),h=d(function(){return o()>1150});e.document&&s.Observable.fromEvent(e,"resize").debounce(300).subscribe(function(){return Object.assign(p.searchResults,{maxHeight:i()})},u.a.error),p={avatar:{fontSize:"1.3rem",letterSpacing:-2,lineHeight:"32px"},avatarBig:{fontSize:"34px",letterSpacing:-2,lineHeight:"60px"},headerBar:{boxSizing:"border-box",background:"#276696",display:"flex",position:"fixed",top:0,left:0,width:"100%",minHeight:48,justifyContent:"center",alignItems:"center",zIndex:1400},headerTitle:{flex:1,color:"#FFF"},headerMenu:{flex:"0 0 auto",padding:"0 1rem",height:48,justifyContent:"center",alignItems:"center",display:"flex"},menusWrap:{display:"flex",flexDirection:"row",justifyContent:"flex-end",paddingRight:"2rem"},dropDownWrap:{position:"absolute",display:"none",padding:"1rem",right:40,overflow:"hidden",width:400,flexDirection:"column",top:48},searchField:{display:"flex",flex:1,position:"relative",flexDirection:"row",maxWidth:550,justifyContent:"flex-end",minWidth:420},searchFieldInnerWrap:{transition:"width .5s cubic-bezier(0.39, -0.04, 0.2, 1)",position:"relative"},searchResultList:{display:"flex",flexWrap:"wrap"},searchResults:{position:"absolute",top:48,left:0,right:0,maxWidth:673,maxHeight:i(),overflow:"auto",transition:"padding-top .3s cubic-bezier(0.39, -0.04, 0.2, 1), padding-bottom .3s cubic-bezier(0.39, -0.04, 0.2, 1), height .3s cubic-bezier(0.39, -0.04, 0.2, 1)",boxSizing:"border-box"},searchFieldInput:{color:a.white,flex:1},searchFieldHintText:{color:"rgba(255, 255, 255, 0.5)"},menuItemLink:{padding:"1rem",display:"flex",width:f,height:f,boxSizing:"border-box",flexDirection:"column",alignItems:"center",justifyContent:"center",textDecoration:"none",color:a.black,fontSize:"1rem"},menuItemIcon:{height:48,width:48},menuItemLabel:{flex:"1 1 auto",maxWidth:"100%",textAlign:"center"},moreAppsButton:{marginTop:"1rem",width:"100%",display:"block",textAlign:"center"},moreAppsButtonWrap:{width:"100%",padding:"1rem",boxSizing:"border-box"},clearIcon:{position:"absolute",top:"10px",right:"5px"}},t.b=p}).call(t,r(30))},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function i(e){var t=new m.default;t.setBaseUrl("");var r={getBaseUrl:function(){return this.activities.dhis.href}};return t.get(""+e).then(function(e){return Object.assign({},e,r)})}function a(){var e=m.default.getApi();return S.baseUrl&&T&&e.setBaseUrl(S.baseUrl),e.get("userSettings")}function s(e,t){var r=["apiEndpoint,name,authorities,singular,plural,shareable,metadata,klass,identifiableObject,properties[href","writable,collection,collectionName,name,propertyType,persisted,required,min,max,ordered,unique,constants","owner,itemPropertyType]"].join(","),n=[],o=function(t){return e.get("schemas/"+t,{fields:r})};if(Array.isArray(t)){var i=t.map(o).concat([]),a=Promise.all(i).then(function(e){return{schemas:e}});n.push(a),t.length>0?n.push(e.get("attributes",{fields:":all,optionSet[:all,options[:all]]",paging:!1})):n.push({attributes:[]})}else n.push(e.get("schemas",{fields:r})),n.push(e.get("attributes",{fields:":all,optionSet[:all,options[:all]]",paging:!1}));return n}function l(e){var t=m.default.getApi(),r=p.default.getLogger(),n=O.default.create(S,e),i={models:void 0,model:h.default,Api:m.default,system:v.default.getSystem(),i18n:w.default.getI18n()};O.default.processConfigForD2(n,i),T?T=!1:C=c.Deferred.create();var l=s(t,n.schemas),u=[t.get("me",{fields:":all,organisationUnits[id],userGroups[id],userCredentials[:all,!user,userRoles[id]"}),t.get("me/authorization"),a()],f=[t.get("system/info"),t.get("apps")];return Promise.all([].concat(o(l),u,f,[i.i18n.load()])).then(function(e){var t={schemas:(0,c.pick)("schemas")(e[0]),attributes:(0,c.pick)("attributes")(e[1]),currentUser:e[2],authorities:e[3],userSettings:e[4],systemInfo:e[5],apps:e[6]};return t.schemas.map(function(e){return e.apiEndpoint=(0,c.updateAPIUrlWithBaseUrlVersionNumber)(e.apiEndpoint,n.baseUrl),e}).forEach(function(e){var r=t.attributes.filter(function(t){var r=[e.singular,"Attribute"].join("");return t[r]===!0});Object.prototype.hasOwnProperty.call(i.models,e.singular)||i.models.add(h.default.ModelDefinition.createFromSchema(e,r))}),i.currentUser=P.default.create(t.currentUser,t.authorities,i.models,t.userSettings),i.system.setSystemInfo(t.systemInfo),i.system.setInstalledApps(t.apps),C.resolve(i),C.promise}).catch(function(e){return r.error("Unable to get schemas from the api",JSON.stringify(e),e),C.reject("Unable to get schemas from the DHIS2 API"),C.promise})}function u(){return C.promise}Object.defineProperty(t,"__esModule",{value:!0}),t.getManifest=i,t.getUserSettings=a,t.init=l,t.getInstance=u;var c=r(14),f=r(35),p=n(f),d=r(93),h=n(d),y=r(10),m=n(y),b=r(40),v=n(b),g=r(80),w=n(g),k=r(76),O=n(k),x=r(77),P=n(x);r(54);var T=!0,C=c.Deferred.create(),S=O.default.create(),_=S;t.config=_,t.default={init:l,config:_,getInstance:u,getUserSettings:a,getManifest:i}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){return r?[e,t]:e},e.exports=t.default},function(e,t){e.exports=ReactDOM},function(e,t,r){"use strict";(function(n){function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(){var e=arguments.length<=0||void 0===arguments[0]?"REPLACE":arguments[0],t=d.default.getSystem();return t.version&&Number(t.version.minor)<=22?"mergeStrategy="+e:"mergeMode="+e}function s(e,t){if(new RegExp("^(:?https?:)?//").test(t))return t;var r=[];return e&&r.push(e),r.push(t),r.join("/").replace(new RegExp("(.(?:[^:]))//+","g"),"$1/").replace(new RegExp("/$"),"")}function l(){return l.api?l.api:l.api=new h}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),c=r(3),f=r(14),p=r(40),d=o(p);r(54);var h=function(){function e(t){if(i(this,e),"function"==typeof t)this.fetch=t.bind("undefined"!=typeof window?window:n);else{if("undefined"==typeof fetch)throw new Error("Failed to initialise D2 Api: No fetch implementation is available");this.fetch=fetch.bind("undefined"!=typeof window?window:n)}this.baseUrl="/api",this.defaultFetchOptions={mode:"cors",credentials:"include",cache:"default"}}return u(e,[{key:"get",value:function(e,t,r){return this.request("GET",s(this.baseUrl,e),t,r)}},{key:"post",value:function(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=s(this.baseUrl,e),o=t;if(r.headers=new Headers(r.headers||{}),void 0!==t)if(r.contentType){if("test"!=={NODE_ENV:"production"}.npm_lifecycle_event){var i=new Error;console.warn("Deprecation warning: Setting `contentType` for API POST requests is deprecated, and support may be removed in the next major release of D2. In stead you may set the `Content-Type` header explicitly. If no `Content-Type` header is specified, the browser will try to determine one for you.\nRequest:","POST",n,i.stack)}r.headers.set("Content-Type","text/plain"),delete r.contentType}else"FormData"===t.constructor.name?(r.headers.delete("Content-Type"),o=t):"text/plain"===r.headers.get("Content-Type")?o=String(t):(r.headers.set("Content-Type","application/json"),o=JSON.stringify(t));return this.request("POST",n,o,r)}},{key:"delete",value:function(e,t){return this.request("DELETE",s(this.baseUrl,e),void 0,t)}},{key:"update",value:function(e,t){var r=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],n=r===!0?e+"?"+a():e;return this.request("PUT",s(this.baseUrl,n),JSON.stringify(t))}},{key:"request",value:function(e,t,r){function n(t,n){var o=Object.assign({},s.defaultFetchOptions,t),i=new Headers(t.headers||{});if(o.method=e,"GET"===o.method||!n&&0!==n&&n!==!1?i.delete("Content-Type"):n&&("FormData"===r.constructor.name?i.delete("Content-Type"):i.get("Content-Type")||i.set("Content-Type","application/json"),o.body=n),t.dataType){if("test"!=={NODE_ENV:"production"}.npm_lifecycle_event){var a=new Error;console.warn("Deprecation warning: Setting `dataType` for API requests is deprecated, and support may be removed in the next major release of D2. In stead you should set the `Accept` header directly.\nRequest:",o.method,l,a.stack)}"text"===t.dataType&&(i.set("Accept","text/plain"),delete o.dataType)}return o.headers=i,o}function o(e){try{return JSON.parse(e)}catch(t){return e}}var i=this,a=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];(0,c.checkType)(e,"string","Request type"),(0,c.checkType)(t,"string","Url");var s=this,l=t,u="";l.indexOf("?")!==-1&&(u=l.substr(l.indexOf("?")+1),l=l.substr(0,l.indexOf("?"))),r&&Array.isArray(r.filter)&&(u=""+u+(u.length?"&":"")+"filter="+r.filter.join("&filter="),delete r.filter),r&&"GET"===e&&Object.keys(r).forEach(function(e){u=""+u+(u.length>0?"&":"")+e+"="+r[e]}),u.length&&(l=l+"?"+(0,f.customEncodeURIComponent)(u));var p=n(a,r);return new Promise(function(e,t){i.fetch(l,p).then(function(r){r.ok?r.text().then(function(t){return e(o(t))}):r.text().then(function(e){"test"!=={NODE_ENV:"production"}.npm_lifecycle_event&&console.warn("API request failed with status "+r.status+" "+r.statusText+"\n","Request: "+p.method+" "+l),t(o(e))})}).catch(function(e){"test"!=={NODE_ENV:"production"}.npm_lifecycle_event&&console.error("Server connection error:",e),t("Server connection failed for API request: "+p.method+" "+l)})})}},{key:"setBaseUrl",value:function(e){return(0,c.checkType)(e,"string","Base url"),this.baseUrl=e,this}}]),e}();h.getApi=l,t.default=h,e.exports=t.default}).call(t,r(30))},function(e,t,r){var n,o;!function(i,a){"use strict";n=a,o="function"==typeof n?n.call(t,r,t,e):n,!(void 0!==o&&(e.exports=o))}(this,function(){"use strict";function e(e){return typeof console!==s&&(void 0!==console[e]?t(console,e):void 0!==console.log?t(console,"log"):a)}function t(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function r(e,t,r){return function(){typeof console!==s&&(n.call(this,t,r),this[e].apply(this,arguments))}}function n(e,t){for(var r=0;r<l.length;r++){var n=l[r];this[n]=r<e?a:this.methodFactory(n,e,t)}}function o(t,n,o){return e(t)||r.apply(this,arguments)}function i(e,t,r){function i(e){var t=(l[e]||"silent").toUpperCase();try{return void(window.localStorage[f]=t)}catch(e){}try{window.document.cookie=encodeURIComponent(f)+"="+t+";"}catch(e){}}function a(){var e;try{e=window.localStorage[f]}catch(e){}if(typeof e===s)try{var t=window.document.cookie,r=t.indexOf(encodeURIComponent(f)+"=");r&&(e=/^([^;]+)/.exec(t.slice(r))[1])}catch(e){}return void 0===c.levels[e]&&(e=void 0),e}var u,c=this,f="loglevel";e&&(f+=":"+e),c.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},c.methodFactory=r||o,c.getLevel=function(){return u},c.setLevel=function(t,r){if("string"==typeof t&&void 0!==c.levels[t.toUpperCase()]&&(t=c.levels[t.toUpperCase()]),!("number"==typeof t&&t>=0&&t<=c.levels.SILENT))throw"log.setLevel() called with invalid level: "+t;if(u=t,r!==!1&&i(t),n.call(c,t,e),typeof console===s&&t<c.levels.SILENT)return"No console available for logging"},c.setDefaultLevel=function(e){a()||c.setLevel(e,!1)},c.enableAll=function(e){c.setLevel(c.levels.TRACE,e)},c.disableAll=function(e){c.setLevel(c.levels.SILENT,e)};var p=a();null==p&&(p=null==t?"WARN":t),c.setLevel(p,!1)}var a=function(){},s="undefined",l=["trace","debug","info","warn","error"],u=new i,c={};u.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=c[e];return t||(t=c[e]=new i(e,u.getLevel(),u.methodFactory)),t};var f=typeof window!==s?window.log:void 0;return u.noConflict=function(){return typeof window!==s&&window.log===u&&(window.log=f),u},u})},function(e,t,r){"use strict";function n(e){return e.replace(/\/{1,}$/,"")}function o(e){var t=e.protocol,r=e.host,o=e.pathname,i=/^\//.test(o)?o:"/"+o;return n(t+"//"+r+i)}function i(e){var t=document.createElement("a");return e.Api?(t.href=e.Api.getApi().baseUrl.replace(/\/api(?:\/2[3-9])?\/?$/i,""),t.host||(t.host=window.location.host),o(t)):(console&&console.info("Can not find d2 baseUrl, falling back to one folder up in the current location"),t.href=document.location.pathname+"/../",o(t))}t.a=i},function(e,t,r){"use strict";function n(e,t){return t.map(function(t){return Object.assign({},t,{name:e(t.name)})})}var o=r(7),i=(r.n(o),r(2)),a=(r.n(i),r(72)),s=r(31),l=r(5),u=(r.n(l),r(12));r.d(t,"a",function(){return h}),t.b=n,r.d(t,"d",function(){return b}),r.d(t,"c",function(){return C}),r.d(t,"f",function(){return _});var c=r.i(i.curry)(function(e,t){return e.i18n.getTranslation(t)}),f={currentUser:{userSettings:{}}},p=l.Observable.fromPromise(r.i(o.getInstance)()).catch(l.Observable.just(f)),d=p.map(r.i(i.get)("currentUser")),h=l.Observable.combineLatest(p,l.Observable.just(c),function(e,t){return t(e)}),y=function(e){return e.replace(/^\.\./,"")},m=function(e){return/^(?:https?:)?\/\//.test(e)},b=u.a,v=r.i(i.curry)(function(e,t){return m(t)?t:e+y(t)}),g=function(e){return e.icon||"/icons/program.png"},w=r.i(i.curry)(function(e,t){return Object.assign({},t,{icon:v(e,g(t))})}),k=r.i(i.curry)(function(e,t){return Object.assign({},t,{action:v(e,t.defaultAction)})}),O=function(e){return r.i(i.compose)(w(e),k(e))},x=function(e){return Object.assign({},e,{label:e.displayName||e.name})},P=r.i(i.pick)(["action","icon","description","label","name","parentApp"]),T=function(e){return r.i(i.compose)(P,O(e),x)},C=function(e,t){return r.i(i.map)(T(e),t)},S=l.Observable.combineLatest(h,s.b,n).combineLatest(p,function(e,t){return{items:e,d2:t}}).map(function(e){var t=e.items,r=e.d2;return C(b(r),t)}).catch(l.Observable.just([])),_=s.a.combineLatest(p,function(e,t){return{items:e,d2:t}}).map(function(e){var t=e.items,r=e.d2;return C(b(r),t)}).catch(l.Observable.just([])),j=l.Observable.combineLatest(_,S,d,a.a,function(e,t,r,n){return{appItems:e,profileItems:t,currentUser:r,settings:n}});t.e=j},function(e,t){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e){throw new Error(e)}function o(e,t){return function(){for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return e.apply(this,[t].concat(n))}}function i(e,t,r){var n={enumerable:!0,configurable:!1,writable:!1,value:r};Object.defineProperty(e,t,n)}function a(e,t){var r=void 0;for(r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function s(e){return function(t){if(t)return t[e]}}function l(e,t){if(!t||!e)return e;var r=/api\/(2[3-9])/,n=t.match(r),o=n&&n[1],i=e&&!r.test(e);if(o&&i){var a=n[1];return e.replace(/api/,"api/"+a)}return e}function u(e){return encodeURIComponent(e).replace(h,decodeURIComponent)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();t.throwError=n,t.curry=o,t.addLockedProperty=i,t.copyOwnProperties=a,t.pick=s,t.updateAPIUrlWithBaseUrlVersionNumber=l,t.customEncodeURIComponent=u;var f=function(){function e(){var t=this;r(this,e),this.promise=new Promise(function(e,r){t.resolve=e,t.reject=r})}return c(e,null,[{key:"create",value:function(){return new e}}]),e}();t.Deferred=f;var p=",&$=/;:",d=p.split("").map(function(e){return encodeURIComponent(e)}),h=new RegExp("(?:"+d.join("|")+")","g")},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.red50="#ffebee",t.red100="#ffcdd2",t.red200="#ef9a9a",t.red300="#e57373",t.red400="#ef5350",t.red500="#f44336",t.red600="#e53935",t.red700="#d32f2f",t.red800="#c62828",t.red900="#b71c1c",t.redA100="#ff8a80",t.redA200="#ff5252",t.redA400="#ff1744",t.redA700="#d50000",t.pink50="#fce4ec",t.pink100="#f8bbd0",t.pink200="#f48fb1",t.pink300="#f06292",t.pink400="#ec407a",t.pink500="#e91e63",t.pink600="#d81b60",t.pink700="#c2185b",t.pink800="#ad1457",t.pink900="#880e4f",t.pinkA100="#ff80ab",t.pinkA200="#ff4081",t.pinkA400="#f50057",t.pinkA700="#c51162",t.purple50="#f3e5f5",t.purple100="#e1bee7",t.purple200="#ce93d8",t.purple300="#ba68c8",t.purple400="#ab47bc",t.purple500="#9c27b0",t.purple600="#8e24aa",t.purple700="#7b1fa2",t.purple800="#6a1b9a",t.purple900="#4a148c",t.purpleA100="#ea80fc",t.purpleA200="#e040fb",t.purpleA400="#d500f9",t.purpleA700="#aa00ff",t.deepPurple50="#ede7f6",t.deepPurple100="#d1c4e9",t.deepPurple200="#b39ddb",t.deepPurple300="#9575cd",t.deepPurple400="#7e57c2",t.deepPurple500="#673ab7",t.deepPurple600="#5e35b1",t.deepPurple700="#512da8",t.deepPurple800="#4527a0",t.deepPurple900="#311b92",t.deepPurpleA100="#b388ff",t.deepPurpleA200="#7c4dff",t.deepPurpleA400="#651fff",t.deepPurpleA700="#6200ea",t.indigo50="#e8eaf6",t.indigo100="#c5cae9",t.indigo200="#9fa8da",t.indigo300="#7986cb",t.indigo400="#5c6bc0",t.indigo500="#3f51b5",t.indigo600="#3949ab",t.indigo700="#303f9f",t.indigo800="#283593",t.indigo900="#1a237e",t.indigoA100="#8c9eff",t.indigoA200="#536dfe",t.indigoA400="#3d5afe",t.indigoA700="#304ffe",t.blue50="#e3f2fd",t.blue100="#bbdefb",t.blue200="#90caf9",t.blue300="#64b5f6",t.blue400="#42a5f5",t.blue500="#2196f3",t.blue600="#1e88e5",t.blue700="#1976d2",t.blue800="#1565c0",t.blue900="#0d47a1",t.blueA100="#82b1ff",t.blueA200="#448aff",t.blueA400="#2979ff",t.blueA700="#2962ff",t.lightBlue50="#e1f5fe",t.lightBlue100="#b3e5fc",t.lightBlue200="#81d4fa",t.lightBlue300="#4fc3f7",t.lightBlue400="#29b6f6",t.lightBlue500="#03a9f4",t.lightBlue600="#039be5",t.lightBlue700="#0288d1",t.lightBlue800="#0277bd",t.lightBlue900="#01579b",t.lightBlueA100="#80d8ff",t.lightBlueA200="#40c4ff",t.lightBlueA400="#00b0ff",t.lightBlueA700="#0091ea",t.cyan50="#e0f7fa",t.cyan100="#b2ebf2",t.cyan200="#80deea",t.cyan300="#4dd0e1",t.cyan400="#26c6da",t.cyan500="#00bcd4",t.cyan600="#00acc1",t.cyan700="#0097a7",t.cyan800="#00838f",t.cyan900="#006064",t.cyanA100="#84ffff",t.cyanA200="#18ffff",t.cyanA400="#00e5ff",t.cyanA700="#00b8d4",t.teal50="#e0f2f1",t.teal100="#b2dfdb",t.teal200="#80cbc4",t.teal300="#4db6ac",t.teal400="#26a69a",t.teal500="#009688",t.teal600="#00897b",t.teal700="#00796b",t.teal800="#00695c",t.teal900="#004d40",t.tealA100="#a7ffeb",t.tealA200="#64ffda",t.tealA400="#1de9b6",t.tealA700="#00bfa5",t.green50="#e8f5e9",t.green100="#c8e6c9",t.green200="#a5d6a7",t.green300="#81c784",t.green400="#66bb6a",t.green500="#4caf50",t.green600="#43a047",t.green700="#388e3c",t.green800="#2e7d32",t.green900="#1b5e20",t.greenA100="#b9f6ca",t.greenA200="#69f0ae",t.greenA400="#00e676",t.greenA700="#00c853",t.lightGreen50="#f1f8e9",t.lightGreen100="#dcedc8",t.lightGreen200="#c5e1a5",t.lightGreen300="#aed581",t.lightGreen400="#9ccc65",t.lightGreen500="#8bc34a",t.lightGreen600="#7cb342",t.lightGreen700="#689f38",t.lightGreen800="#558b2f",t.lightGreen900="#33691e",t.lightGreenA100="#ccff90",t.lightGreenA200="#b2ff59",t.lightGreenA400="#76ff03",t.lightGreenA700="#64dd17",t.lime50="#f9fbe7",t.lime100="#f0f4c3",t.lime200="#e6ee9c",t.lime300="#dce775",t.lime400="#d4e157",t.lime500="#cddc39",t.lime600="#c0ca33",t.lime700="#afb42b",t.lime800="#9e9d24",t.lime900="#827717",t.limeA100="#f4ff81",t.limeA200="#eeff41",t.limeA400="#c6ff00",t.limeA700="#aeea00",t.yellow50="#fffde7",t.yellow100="#fff9c4",t.yellow200="#fff59d",t.yellow300="#fff176",t.yellow400="#ffee58",t.yellow500="#ffeb3b",t.yellow600="#fdd835",t.yellow700="#fbc02d",t.yellow800="#f9a825",t.yellow900="#f57f17",t.yellowA100="#ffff8d",t.yellowA200="#ffff00",t.yellowA400="#ffea00",t.yellowA700="#ffd600",t.amber50="#fff8e1",t.amber100="#ffecb3",t.amber200="#ffe082",t.amber300="#ffd54f",t.amber400="#ffca28",t.amber500="#ffc107",t.amber600="#ffb300",t.amber700="#ffa000",t.amber800="#ff8f00",t.amber900="#ff6f00",t.amberA100="#ffe57f",t.amberA200="#ffd740",t.amberA400="#ffc400",t.amberA700="#ffab00",t.orange50="#fff3e0",t.orange100="#ffe0b2",t.orange200="#ffcc80",t.orange300="#ffb74d",t.orange400="#ffa726",t.orange500="#ff9800",t.orange600="#fb8c00",t.orange700="#f57c00",t.orange800="#ef6c00",t.orange900="#e65100",t.orangeA100="#ffd180",t.orangeA200="#ffab40",t.orangeA400="#ff9100",t.orangeA700="#ff6d00",t.deepOrange50="#fbe9e7",t.deepOrange100="#ffccbc",t.deepOrange200="#ffab91",t.deepOrange300="#ff8a65",t.deepOrange400="#ff7043",t.deepOrange500="#ff5722",t.deepOrange600="#f4511e",t.deepOrange700="#e64a19",t.deepOrange800="#d84315",t.deepOrange900="#bf360c",t.deepOrangeA100="#ff9e80",t.deepOrangeA200="#ff6e40",t.deepOrangeA400="#ff3d00",t.deepOrangeA700="#dd2c00",t.brown50="#efebe9",t.brown100="#d7ccc8",t.brown200="#bcaaa4",t.brown300="#a1887f",t.brown400="#8d6e63",t.brown500="#795548",t.brown600="#6d4c41",t.brown700="#5d4037",t.brown800="#4e342e",t.brown900="#3e2723",t.blueGrey50="#eceff1",t.blueGrey100="#cfd8dc",t.blueGrey200="#b0bec5",t.blueGrey300="#90a4ae",t.blueGrey400="#78909c",t.blueGrey500="#607d8b",t.blueGrey600="#546e7a",t.blueGrey700="#455a64",t.blueGrey800="#37474f",t.blueGrey900="#263238",t.grey50="#fafafa",t.grey100="#f5f5f5",t.grey200="#eeeeee",t.grey300="#e0e0e0",t.grey400="#bdbdbd",t.grey500="#9e9e9e",t.grey600="#757575",t.grey700="#616161",t.grey800="#424242",t.grey900="#212121",t.black="#000000",t.white="#ffffff",t.transparent="rgba(0, 0, 0, 0)",t.fullBlack="rgba(0, 0, 0, 1)",t.darkBlack="rgba(0, 0, 0, 0.87)",t.lightBlack="rgba(0, 0, 0, 0.54)",t.minBlack="rgba(0, 0, 0, 0.26)",t.faintBlack="rgba(0, 0, 0, 0.12)",t.fullWhite="rgba(255, 255, 255, 1)",t.darkWhite="rgba(255, 255, 255, 0.87)",t.lightWhite="rgba(255, 255, 255, 0.54)"},function(e,t,r){"use strict";function n(e){var t=x(e.trim().toLowerCase().split(/\s+/));_.take(1).subscribe(function(r){var n=r.filter(P),o=n.filter(t),i=r.filter(t).filter(T).filter(C(n)),a=n.filter(function(e){return i.map(w).some(function(t){return t===e.name})}),s=O([].concat(o,i,a));g.setState(v({},g.getState(),{searchResults:s,searchValue:e}))})}function o(e){g.setState(v({},g.getState(),{isHoveringOverResults:e}))}function i(e){g.setState(v({},g.getState(),{isSearchFieldFocused:e}))}function a(e){var t=g.getState().searchResults.length;g.getState().selected+e>=t||g.getState().selected+e<0||g.setState(v({},g.getState(),{selected:g.getState().selected+e}))}function s(){g.getState()&&!g.getState().isHoveringOverResults&&i(!1)}var l=r(13),u=r(58),c=r(33),f=r(5),p=(r.n(f),r(68)),d=r(70),h=r(11),y=r.n(h),m=r(2);r.n(m);t.c=o,t.b=i,t.e=s,r.d(t,"a",function(){return S}),r.d(t,"d",function(){return j}),r.d(t,"f",function(){return E});var b=function(){function e(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw i}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g=c.a.create({getInitialState:function(){return{isSearchFieldFocused:!1,open:!1,searchValue:"",selected:0,searchResults:[]}}}),w=r.i(m.get)("parentApp"),k=function(e){return!!w(e)},O=r.i(m.uniqBy)(function(e){return e.name}),x=r.i(m.curry)(function(e,t){return e.every(function(e){return t.label.toLowerCase().includes(e)})}),P=function(e){return!k(e)},T=function(e){return!P(e)},C=r.i(m.curry)(function(e,t){return e.some(function(e){return e.name===t.parentApp})}),S=u.a.create("Search Apps");S.map(function(e){return e.data||""}).subscribe(n);var _=l.e.map(function(e){return[].concat(e.appItems,e.profileItems)}).flatMap(p.a).flatMap(d.a),j=f.Observable.combineLatest(g,l.f,function(e,t){return e.searchValue?e:v({},e,{searchResults:t})}).map(function(e){return v({},e,{searchResults:e.searchResults.map(function(t,r){return Object.assign({},t,{selected:e.selected===r})}),open:Boolean(e.isSearchFieldFocused)})}),E=u.a.create(),M=E.map(function(e){return e.data});M.filter(function(e){var t=b(e,1),r=t[0];return 13===r.keyCode||"Enter"===r.key}).flatMap(function(){return g.take(1)}).map(function(e){return e.searchResults.find(function(t,r){return r===e.selected})}).filter(f.helpers.identity).subscribe(function(e){return window.location=e.action},y.a.error),M.map(function(e){return e[0]}).filter(function(e){return 39===e.keyCode||"ArrowRight"===e.key}).subscribe(function(e){return a(1)}),M.map(function(e){return e[0]}).filter(function(e){return 37===e.keyCode||"ArrowLeft"===e.key}).subscribe(function(){return a(-1)}),M.filter(function(e){var t=b(e,2),r=t[0];t[1];return 38===r.keyCode||"ArrowUp"===r.key}).subscribe(function(e){var t=b(e,2),r=(t[0],t[1]);return a(-r)}),M.filter(function(e){var t=b(e,2),r=t[0];t[1];return 40===r.keyCode||"ArrowDown"===r.key}).subscribe(function(e){var t=b(e,2),r=(t[0],t[1]);return a(r)})},function(e,t,r){"use strict";function n(e){return r.i(a.a)(e,{d2:i.a.PropTypes.object})}var o=r(0),i=r.n(o),a=r(73);t.a=n},function(e,t){"use strict";function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=arguments.length<=2||void 0===arguments[2]?function(e,t){return e+t}:arguments[2];return r({},e,["-webkit-","-moz-",""].map(function(e){return n(e,t)}))},e.exports=t.default},function(e,t){"use strict";function r(e,t,r){return e<t?t:e>r?r:e}function n(e){var t=e.type,r=e.values;if(t.indexOf("rgb")>-1)for(var n=0;n<3;n++)r[n]=parseInt(r[n]);var o=void 0;return o=t.indexOf("hsl")>-1?e.type+"("+r[0]+", "+r[1]+"%, "+r[2]+"%":e.type+"("+r[0]+", "+r[1]+", "+r[2],o+=4===r.length?", "+e.values[3]+")":")"}function o(e){if(4===e.length){for(var t="#",r=1;r<e.length;r++)t+=e.charAt(r)+e.charAt(r);e=t}var n={r:parseInt(e.substr(1,2),16),g:parseInt(e.substr(3,2),16),b:parseInt(e.substr(5,2),16)};return"rgb("+n.r+", "+n.g+", "+n.b+")"}function i(e){if("#"===e.charAt(0))return i(o(e));var t=e.indexOf("("),r=e.substring(0,t),n=e.substring(t+1,e.length-1).split(",");return n=n.map(function(e){return parseFloat(e)}),{type:r,values:n}}function a(e,t){var r=s(e),n=s(t),o=(Math.max(r,n)+.05)/(Math.min(r,n)+.05);return Number(o.toFixed(2))}function s(e){if(e=i(e),e.type.indexOf("rgb")>-1){var t=e.values.map(function(e){return e/=255,e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)});return Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}if(e.type.indexOf("hsl")>-1)return e.values[2]/100}function l(e){var t=arguments.length<=1||void 0===arguments[1]?.15:arguments[1];return s(e)>.5?c(e,t):f(e,t)}function u(e,t){return e=i(e),t=r(t,0,1),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,n(e)}function c(e,t){if(e=i(e),t=r(t,0,1),e.type.indexOf("hsl")>-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")>-1)for(var o=0;o<3;o++)e.values[o]*=1-t;return n(e)}function f(e,t){if(e=i(e),t=r(t,0,1),e.type.indexOf("hsl")>-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")>-1)for(var o=0;o<3;o++)e.values[o]+=(255-e.values[o])*t;return n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.convertColorToString=n,t.convertHexToRGB=o,t.decomposeColor=i,t.getContrastRatio=a,t.getLuminance=s,t.emphasize=l,t.fade=u,t.darken=c,t.lighten=f},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=r(41),i=n(o);t.default=i.default},function(e,t,r){"use strict";var n=function(){};e.exports=n},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){var r=function(r){function a(){return n(this,a),o(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return i(a,r),p(a,[{key:"componentDidMount",value:function(){var t=this;this.disposable=e.subscribe(function(e){return t.setState(e)},function(e){return c.a.error(e)})}},{
key:"componentWillUnmount",value:function(){this.disposable&&this.disposable.dispose&&this.disposable.dispose()}},{key:"render",value:function(){return l.a.createElement(t,f({},this.state,this.props))}}]),a}(s.Component);return r.displayName=t.displayName||t.name,r}var s=r(0),l=r.n(s),u=r(11),c=r.n(u);t.a=a;var f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=r(3),s=r(24),l=n(s),u=function(){function e(t){var r=this;o(this,e),(0,a.checkType)(t,"object","modelDefinition"),(0,a.checkType)(t.modelProperties,"object","modelProperties"),Object.defineProperty(this,"modelDefinition",{enumerable:!1,configurable:!1,writable:!1,value:t}),Object.defineProperty(this,"dirty",{enumerable:!1,configurable:!1,writable:!0,value:!1}),Object.defineProperty(this,"dataValues",{enumerable:!1,configurable:!0,writable:!0,value:{}});var n=function(e){return e&&!!Object.keys(e).length},i={},l=t.attributeProperties;n(l)&&(Object.defineProperty(this,"attributes",{enumerable:!1,value:i}),Object.keys(l).forEach(function(e){Object.defineProperty(i,e,{enumerable:!0,get:function(){if(Array.isArray(r.attributeValues))return r.attributeValues.filter(function(t){return t.attribute.name===e}).reduce(function(e,t){return t.value},void 0)},set:function(t){r.attributeValues||(r.attributeValues=[]);var n=r.attributeValues.filter(function(t){return t.attribute.name===e}).reduce(function(e,t){return t},void 0);n&&n.value===t||(n?(void 0!==t&&null!==t&&""!==t||(r.attributeValues=r.attributeValues.filter(function(e){return e!==n})),n.value=t):r.attributeValues.push({value:t,attribute:{id:l[e].id,name:l[e].name}}),r.dirty=!0)}})})),Object.defineProperties(this,t.modelProperties),this[s.DIRTY_PROPERTY_LIST]=new Set([])}return i(e,null,[{key:"create",value:function(t){return new e(t)}}]),e}();u.prototype=l.default,t.default=u,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return Boolean(e.modelDefinition&&e.modelDefinition.modelValidations&&e.modelDefinition.modelValidations[t]&&Object.prototype.hasOwnProperty.call(e.modelDefinition.modelValidations,t))}function a(e){return e&&"Created"===e.httpStatus&&e&&(0,c.isValidUid)(e.response.uid)&&(this.dataValues.id=e.response.uid,this.dataValues.href=[this.modelDefinition.apiEndpoint,this.dataValues.id].join("/")),this.dirty=!1,this.getDirtyChildren().forEach(function(e){e.resetDirtyState?e.resetDirtyState():e.dirty=!1}),this[d].clear(),e}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),l=r(39),u=n(l),c=r(3),f=r(25),p=u.default.getModelValidation(),d=Symbol("List to keep track of dirty properties");t.DIRTY_PROPERTY_LIST=d;var h=function(){function e(){o(this,e)}return s(e,[{key:"create",value:function(){var e=this;return this.validate().then(function(t){return t.status?e.modelDefinition.saveNew(e).then(a.bind(e)):Promise.reject(t)})}},{key:"save",value:function(e){var t=this;return this.isDirty(e)?this.validate().then(function(e){return e.status?t.modelDefinition.save(t).then(a.bind(t)):Promise.reject(e)}):Promise.reject("No changes to be saved")}},{key:"validate",value:function(){var e=this;return new Promise(function(t,r){function n(e,t){return t&&e.indexOf(t)===-1&&e.push(t),e}function o(e){return p.validateAgainstSchema(e)}var i=[];o(e).catch(function(e){return Array.isArray(e)?e:Promise.reject(e)}).then(function(e){i=i.concat(e);var r={status:0===e.length,fields:i.map(function(e){return e.property}).reduce(n,[]),messages:i};t(r)}).catch(function(e){return r(e)})})}},{key:"clone",value:function(){return this.modelDefinition.create((0,f.getJSONForProperties)(this,Object.keys(this.modelDefinition.modelValidations)))}},{key:"delete",value:function(){return this.modelDefinition.delete(this)}},{key:"isDirty",value:function(){var e=arguments.length<=0||void 0===arguments[0]||arguments[0];return!!(this.dirty||e===!0&&this.hasDirtyChildren())}},{key:"getDirtyPropertyNames",value:function(){return Array.from(this[d].values())}},{key:"getCollectionChildren",value:function(){var e=this;return Object.keys(this).filter(function(t){return e[t]&&i(e,t)&&e.modelDefinition.modelValidations[t].owner}).map(function(t){return e[t]})}},{key:"getCollectionChildrenPropertyNames",value:function(){var e=this;return Object.keys(this).filter(function(t){return e.modelDefinition&&e.modelDefinition.modelValidations&&e.modelDefinition.modelValidations[t]&&"COLLECTION"===e.modelDefinition.modelValidations[t].type})}},{key:"getDirtyChildren",value:function(){return this.getCollectionChildren().filter(function(e){return e&&e.dirty===!0})}},{key:"hasDirtyChildren",value:function(){return this.getDirtyChildren().length>0}}]),e}();t.default=new h},function(e,t){"use strict";function r(e){return function(t){return e.indexOf(t)===-1}}function n(e){return function(t){return!r(e)(t)}}function o(e,t){var o={},a=e.getCollectionChildrenPropertyNames().filter(function(e){return"attributeValues"!==e}),s=Object.keys(e.modelDefinition.modelValidations).filter(function(e){return t.indexOf(e)>=0}).filter(function(t){return void 0!==e.dataValues[t]&&null!==e.dataValues[t]});return s.filter(r(a)).forEach(function(t){o[t]=e.dataValues[t]}),s.filter(n(a)).forEach(function(t){return"compulsoryDataElementOperands"===t||"greyedFields"===t||"aggregationLevels"===t||"grantTypes"===t||"translations"===t?void(o[t]=Array.from(e.dataValues[t])):void(o[t]=Array.from(e.dataValues[t].values()).filter(function(e){return e.id}).map(function(t){return e.modelDefinition&&"legendSet"===e.modelDefinition.name?i.call(t.modelDefinition,t):{id:t.id}}))}),o}function i(e){var t=e.modelDefinition.getOwnedPropertyNames();return o(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.getJSONForProperties=o,t.getOwnedPropertyJSON=i},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Array.isArray(e)&&(e=e.join(",")),null!==e.match(/-webkit-|-moz-|-ms-/)},e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={set:function(e,t,r){e[t]=r}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t={},r=0,n=void 0;for(var o in e){var i=e[o];i&&(0===r&&(n=o),t[o]=i,r++)}if(0!==r)return 1===r?t[n]:(0,u.default)(t)}function i(e,t,r){return s.default.isValidElement(e)?s.default.Children.map(e,function(e){var n="function"==typeof t?t(e):t,o="function"==typeof r?r(e):r?r:e.props.children;return s.default.cloneElement(e,n,o)}):e}Object.defineProperty(t,"__esModule",{value:!0}),t.createChildFragment=o,t.extendChildren=i;var a=r(0),s=n(a),l=r(164),u=n(l)},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";function n(){return r.i(l.getInstance)().then(function(e){return e.system.settings.get("helpPageLink")}).catch(function(){return!1}).then(function(e){return d.map(function(t){return e&&"help"===t.name?Object.assign({},t,{defaultAction:e}):t})})}function o(e){var t=e.modules;return r.i(l.getInstance)().then(function(e){var r=e.Api.getApi(),n=t.map(function(e){return e.name});return r.post("i18n",n)}).then(function(e){var r=t.map(function(t){return Object.assign(p({},t),{displayName:e[t.name]||t.name})});return{modules:r}}).catch(function(){return f.a.warn("Could not load translations for modules, defaulting back to English"),{modules:t}})}function i(e){var t=e.modules;return{modules:t.filter(function(e){return"dhis-web-menu-management"!==e.name})}}function a(){return r.i(l.getInstance)().then(function(e){var t=e.Api.getApi(),n=r.i(u.a)(e);return t.get(n+("/dhis-web-commons/menu/getModules.action?_="+(new Date).getTime()))}).then(o).then(i).then(function(e){var t=e.modules;return t})}var s=r(5),l=(r.n(s),r(7)),u=(r.n(l),r(12)),c=r(11),f=r.n(c);r.d(t,"b",function(){return h}),r.d(t,"a",function(){return y});var p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};l.config.i18n.strings.add("settings"),l.config.i18n.strings.add("profile"),l.config.i18n.strings.add("account"),l.config.i18n.strings.add("help"),l.config.i18n.strings.add("log_out"),l.config.i18n.strings.add("about_dhis2");var d=[{name:"settings",namespace:"/dhis-web-user-profile",defaultAction:"/dhis-web-user-profile/#/settings",icon:"/icons/usersettings.png",description:""},{name:"profile",namespace:"/dhis-web-user-profile",defaultAction:"/dhis-web-user-profile/#/profile",icon:"/icons/function-profile.png",description:""},{name:"account",namespace:"/dhis-web-user-profile",defaultAction:"/dhis-web-user-profile/#/account",icon:"/icons/function-account.png",description:""},{name:"help",namespace:"/dhis-web-commons-about",defaultAction:"https://dhis2.github.io/dhis2-docs/master/en/user/html/dhis2_user_manual_en.html",icon:"/icons/function-account.png",description:""},{name:"about_dhis2",namespace:"/dhis-web-commons-about",defaultAction:"/dhis-web-commons-about/about.action",icon:"/icons/function-about-dhis2.png",description:""}],h=s.Observable.fromPromise(n(d)),y=s.Observable.fromPromise(a()).catch(s.Observable.just([]))},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=r(0),s=r.n(a),l=r(6),u=r(16),c=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),f=function(e){return function(){r.i(u.a)(""),r.i(u.b)(!1),window.location=e}},p=function(e){function t(){n(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.state={hovering:!1},e.onMouseEnter=e.onMouseEnter.bind(e),e.onMouseLeave=e.onMouseLeave.bind(e),e}return i(t,e),c(t,[{key:"render",value:function(){var e=this.props,t=Object.assign({backgroundColor:e.selected||this.state.hovering?"#F5F5F5":"transparent"},l.b.menuItemLink);return s.a.createElement("a",{href:e.action,onMouseUp:f(e.action),style:t,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave},s.a.createElement("div",null,s.a.createElement("img",{style:l.b.menuItemIcon,src:e.icon})),s.a.createElement("div",{style:l.b.menuItemLabel},e.label))}},{key:"onMouseEnter",value:function(){this.setState({hovering:!0})}},{key:"onMouseLeave",value:function(){this.setState({hovering:!1})}}]),t}(a.Component);t.a=p,p.propTypes={action:a.PropTypes.string.isRequired,label:a.PropTypes.string.isRequired,icon:a.PropTypes.string}},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=r(5),s=(r.n(a),function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()),l=Symbol("publishState"),u=Symbol("publishError"),c=Symbol("observable"),f=function(e){function t(e){n(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r[c]=new a.ReplaySubject(1),e&&Promise.resolve(e).then(function(e){r.setState(e)}).catch(function(e){r[u](e)}),r}return i(t,e),s(t,[{key:"setState",value:function(e){this.state=e,this[l]()}},{key:"getState",value:function(){return this.state}},{key:"setSource",value:function(e){var t=this;e.subscribe(function(e){return t.setState(e)},function(e){return t[u]("Rethrown error from source: "+e)})}},{key:"_subscribe",value:function(e){return this[c].subscribe(e)}},{key:l,value:function(){return this[c].onNext(this.state)}},{key:u,value:function(e){return this[c].onError(e)}}],[{key:"create",value:function(e){var r=void 0,n={};return e&&(e.getInitialState&&(r=e&&e.getInitialState()),Object.keys(e).filter(function(e){return"getInitialState"!==e}).forEach(function(t){return n[t]=e[t],n})),Object.assign(new t(r),n)}}]),t}(a.Observable);t.a=f},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=new Set(["categoryOptionCombo"]);t.noCreateAllowedFor=r,t.default={baseUrl:"/api",i18n:{sources:new Set,strings:new Set}}},function(e,t,r){"use strict";(function(n){function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=r(3),s=function(){function e(t){o(this,e),(0,a.checkType)(t,"object","console"),this.logger=t}return i(e,[{key:"canLog",value:function(e){return!!(e&&console&&(0,a.isType)(this.logger[e],"function"))}},{key:"debug",value:function(){if(this.canLog("debug")){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.logger.debug.apply(console,t),!0}return!1}},{key:"error",value:function(){if(this.canLog("error")){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.logger.error.apply(console,t),!0}return!1}},{key:"log",value:function(){if(this.canLog("log")){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.logger.log.apply(console,t),!0}return!1}},{key:"warn",value:function(){if(this.canLog("warn")){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.logger.warn.apply(console,t),!0}return!1}}],[{key:"getLogger",value:function(){var t=void 0;try{t=n.console}catch(e){t=window.console}return this.logger?this.logger:this.logger=new e(t)}}]),e}();t.default=s,e.exports=t.default}).call(t,r(30))},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){if(e&&e[Symbol.iterator]){var t=[].concat(o(e));t.forEach(function(e){e instanceof p.default||(0,c.throwError)("Values of a ModelCollection must be instances of Model")})}}function s(e){if(e&&e[Symbol.iterator]){var t=[].concat(o(e));t.forEach(function(e){(0,u.isValidUid)(e.id)||(0,c.throwError)("Can not add a Model without id to a ModelCollection")})}}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=r(3),c=r(14),f=r(23),p=n(f),d=r(37),h=n(d),y=r(94),m=n(y),b=function(){function e(t,r,n){var o=this;i(this,e),(0,u.checkType)(t,h.default),this.modelDefinition=t,this.pager=new m.default(n,t),this.valuesContainerMap=new Map,this[Symbol.iterator]=this.valuesContainerMap[Symbol.iterator].bind(this.valuesContainerMap),a(r),s(r),(0,u.isArray)(r)&&r.forEach(function(e){return o.valuesContainerMap.set(e.id,e)})}return l(e,[{key:"add",value:function(e){return a([e]),s([e]),this.set(e.id,e),this}},{key:"toArray",value:function(){var e=[];return this.forEach(function(t){e.push(t)}),e}},{key:"clear",value:function(){return this.valuesContainerMap.clear.apply(this.valuesContainerMap)}},{key:"delete",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.valuesContainerMap.delete.apply(this.valuesContainerMap,t)}},{key:"entries",value:function(){return this.valuesContainerMap.