{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./Usc.Web/scripts/bundles/admissionstransparency/_admissions-transparency.js","webpack:///./Usc.Web/scripts/bundles/admissionstransparency/transparency.controller.js","webpack:///./Usc.Web/scripts/bundles/admissionstransparency/transparency.directives.js","webpack:///./Usc.Web/scripts/bundles/admissionstransparency/transparency.service.js"],"names":["installedModules","__webpack_require__","moduleId","module","i","l","exports","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","angular","controller","transparencyService","this","getLocationByCode","model","selectedProgram","codes","find","v","trim","selectedCode","programChanged","item","forEach","x","getDataForCode","noData","substring","then","resp","data","programCode","document","querySelector","dataset","institution","recentEd","rankOnly","additionalOnly","rankAdditional","programs","admissionsPeriod","length","directive","row","restrict","replace","scope","label","subLabel","hideLabel","total","link","$watch","newVal","valueAsPercentage","undefined","isNaN","parseFloat","val","Math","round","template","progress","width","loaded","lessThan","pie","counter","text","subtext","wasWere","el","attrs","naString","na","parsed","percentageInt","percentage","isOp","parseInt","service","$http","id","filter","result"],"mappings":"KACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,IAIIC,EAJJ,OAAGH,EAAiBE,KAIhBC,EAASH,EAAiBE,GAAY,CACzCE,EAAGF,EACHG,EAAG,GACHC,QAAS,EACV,EAGAC,EAAQL,GAAUM,KAAKL,EAAOG,QAASH,EAAQA,EAAOG,QAASL,CAAmB,EAGlFE,EAAOE,EAAI,GAGJF,IAhB4BG,OAiBpC,CAIAL,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASL,EAASM,EAAMC,GAC3CZ,EAAoBa,EAAER,EAASM,CAAI,GACtCG,OAAOC,eAAeV,EAASM,EAAM,CAAEK,WAAY,GAAMC,IAAKL,CAAO,CAAC,CAExE,EAGAZ,EAAoBkB,EAAI,SAASb,GACX,aAAlB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EAAM4B,GAAoB,OAAf5B,EAAMsB,KAEjB,OAAOtB,EAAM6B,OACb,OAAO7B,EAAM8B,cACb,OAAO9B,EAAM+B,WAETL,EAAMnE,eAAe,IAAI,IACzByC,EAAMgC,KAAO,IAGZhC,EAAMgC,OACD5B,EAAQ6B,SAASjC,EAAMI,MAAO,EAAE,EACtCJ,EAAM6B,OAASI,SAASjC,EAAMsB,KAAM,EAAE,EAEjCZ,MAAMV,EAAM6B,MAAM,IAAMnB,MAAMN,CAAK,GAAsB,IAAjBJ,EAAM6B,SAC/C7B,EAAM8B,cAAgBjB,KAAKC,MAAMd,EAAM6B,OAASzB,EAAQ,GAAG,EAC3DJ,EAAM+B,WAAqC,IAAxB/B,EAAM8B,cAAsB,MAAQ9B,EAAM8B,cAAgB,KAI7F,CAAC,CACL,EAyBIf;;;;;;;;;;;SACJ,EAKmD,C,qBC1JvDrD,QAAQlC,OAAO,QAAQ,EAAE0G,QAAQ,sBAAuB,CAAC,QAXzD,SAAiBC,GAMb,MAAO,CACH5F,IALQA,CAAC6F,EAAIC,IACbF,EAAM5F,IAAI,yCAA2C6F,EAAK,WAAaC,GAAU,EAAE,EAC9ExD,KAAKyD,GAAUA,EAAOvD,IAAI,CAInC,CACJ,EAE0E,C","file":"admissionstransparency-bundle-8d1b1e0a3003307730a0.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 44);\n","import './transparency.controller.js';\r\nimport './transparency.directives';\r\nimport './transparency.service.js';\r\n\r\nimport 'Sass/views/admissions-transparency.scss';","(() => {\r\n 'use strict';\r\n\r\n function ctrl(transparencyService) {\r\n\r\n this.getLocationByCode = () => !this.model ? '' :\r\n this.selectedProgram.codes.find(v => v.value.trim() === this.selectedCode).key;\r\n\r\n this.programChanged = item => {\r\n this.model = null;\r\n this.selectedProgram = item;\r\n\r\n this.selectedProgram.codes.forEach(x => {\r\n if (x.key === 'Sippy Downs') {\r\n x.key = 'Sunshine Coast';\r\n }\r\n }); \r\n\r\n this.selectedCode = this.selectedProgram.codes[0].value.trim();\r\n\r\n if (this.selectedCode) {\r\n this.getDataForCode();\r\n } else {\r\n this.noData = true;\r\n }\r\n }\r\n\r\n this.getDataForCode = () => {\r\n transparencyService.get(this.selectedCode.trim().substring(0, 6), '')\r\n .then(resp => {\r\n if (resp.data) {\r\n this.noData = false;\r\n this.model = resp.data;\r\n } else {\r\n this.noData = true;\r\n this.model = null;\r\n }\r\n });\r\n }\r\n\r\n //const op = v => v && v.split('/')[0];\r\n\r\n //// minus one to correct indexing\r\n //this.opHigh = v => ((op(v) - 1) * 4) + '%';\r\n\r\n //this.opMedian = v => ((op(v) - 1) * (100 / 25)) + '%';\r\n\r\n //this.opLow = v => ((26 - op(v)) * 4) + '%';\r\n\r\n //// return true if any op field is '<5'\r\n //this.lessThanFive =\r\n // () => this.model && (this.model.highestRank === '<5' || this.model.lowestRank === '<5' || this.model.medianRank === '<5');\r\n\r\n const rootNode = document.querySelector('[ng-controller*=\"transparency.controller\"]');\r\n const programCode = rootNode.dataset.programCode;\r\n\r\n transparencyService.get('1', programCode || '')\r\n .then(resp => {\r\n this.institution = resp.data[0];\r\n\r\n this.institution.recentEd = +this.institution.rankOnly +\r\n +this.institution.additionalOnly +\r\n +this.institution.rankAdditional;\r\n\r\n this.programs = resp.programs;\r\n this.admissionsPeriod = resp.admissionsPeriod;\r\n\r\n // if only a single program, set it as selected - this happens on program pages\r\n if (this.programs.length === 1) {\r\n this.programChanged(this.programs[0]);\r\n }\r\n });\r\n }\r\n\r\n angular.module('Uscapp').controller('transparency.controller', ['transparencyService', ctrl]);\r\n})();","(() => {\r\n\r\n const row = () => {\r\n const dir = {\r\n restrict: 'A',\r\n replace: true,\r\n scope: {\r\n label: '@',\r\n subLabel: '@',\r\n hideLabel: '@',\r\n value: '=',\r\n total: '='\r\n },\r\n link: scope => {\r\n scope.$watch('value', newVal => {\r\n scope.valueAsPercentage = '';\r\n\r\n if (newVal !== undefined) {\r\n if (newVal === '<5') {\r\n scope.valueAsPercentage = 'N/P';\r\n } else if (newVal === '0') {\r\n scope.valueAsPercentage = '0%';\r\n } else if (!isNaN(parseFloat(newVal)) && scope.total > 0) {\r\n const numericValue = parseFloat(newVal);\r\n let val = (numericValue / scope.total) * 100;\r\n val = +(Math.round(val + 'e+2') + 'e-2'); // Round to two decimals\r\n scope.valueAsPercentage = val + '%';\r\n } else {\r\n scope.valueAsPercentage = 'N/P'; // Handle invalid or unexpected cases\r\n }\r\n }\r\n });\r\n },\r\n template: `\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n `\r\n };\r\n\r\n return dir;\r\n };\r\n\r\n angular.module('Uscapp').directive('atRow', row);\r\n\r\n const progress = () => {\r\n\r\n const link = scope => {\r\n scope.$watch('label', newVal => {\r\n if (newVal) {\r\n scope.lessThan = scope.label[0] === '<' ? 'less-than' : '';\r\n }\r\n });\r\n }\r\n\r\n const dir = {\r\n restrict: 'E',\r\n replace: true,\r\n scope: {\r\n width: '@',\r\n loaded: '=',\r\n label: '='\r\n },\r\n link: link,\r\n template: '
'\r\n };\r\n\r\n return dir;\r\n }\r\n\r\n angular.module('Uscapp').directive('atProgress', progress);\r\n\r\n const pie = () => {\r\n\r\n const template = `\r\n
\r\n
\r\n
\r\n `;\r\n\r\n const dir = {\r\n restrict: 'E',\r\n replace: true,\r\n scope: {\r\n value: '=',\r\n total: '='\r\n },\r\n template: template,\r\n link: scope => {\r\n scope.$watch('value',\r\n newVal => {\r\n scope.valueAsPercentage = undefined;\r\n if (newVal !== undefined) {\r\n scope.valueAsPercentage = scope.value !== 0 ? scope.value + '%' : '<1%';\r\n }\r\n });\r\n }\r\n };\r\n\r\n return dir;\r\n }\r\n\r\n angular.module('Uscapp').directive('atPie', pie);\r\n\r\n\r\n const counter = () => {\r\n\r\n const link = (scope, el, attrs) => {\r\n scope.naString = 'To preserve individual privacy, no data is reported in this category';\r\n\r\n scope.$watch('text', newVal => {\r\n if (newVal) {\r\n scope.na = scope.text === 'NP';\r\n\r\n delete scope.parsed;\r\n delete scope.percentageInt;\r\n delete scope.percentage;\r\n\r\n if (attrs.hasOwnProperty('op')) {\r\n scope.isOp = true;\r\n }\r\n\r\n if (!scope.isOp) {\r\n const total = parseInt(scope.total, 10);\r\n scope.parsed = parseInt(scope.text, 10);\r\n\r\n if (!isNaN(scope.parsed) && !isNaN(total) && scope.parsed !== 0) {\r\n scope.percentageInt = Math.round(scope.parsed / total * 100);\r\n scope.percentage = scope.percentageInt === 0 ? '<1%' : scope.percentageInt + '%';\r\n }\r\n }\r\n }\r\n });\r\n }\r\n\r\n const template = `\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

{{ subtext }}

\r\n
\r\n
\r\n
\r\n `;\r\n\r\n const dir = {\r\n restrict: 'E',\r\n replace: true,\r\n scope: {\r\n text: '=',\r\n subtext: '@',\r\n wasWere: '=',\r\n total: '='\r\n },\r\n link: link,\r\n template: template\r\n };\r\n\r\n return dir;\r\n }\r\n\r\n angular.module('Uscapp').directive('atCounter', counter);\r\n\r\n\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n function service($http) {\r\n\r\n const get = (id, filter) =>\r\n $http.get('/webapi/admissionstransparency/get?id=' + id + '&filter=' + filter || '')\r\n .then(result => result.data);\r\n\r\n return {\r\n get\r\n }\r\n }\r\n\r\n angular.module('Uscapp').service('transparencyService', ['$http', service]);\r\n}());"],"sourceRoot":""}