{"version":3,"file":"global.js","mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAA0B;AAChC;AACA,IAAI;AACJ;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,aAAa,WAAW;AACxB;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,kEAAkE;AAClE,mEAAmE;AACnE,2GAA2G;AAC3G,8EAA8E;AAC9E,8EAA8E;AAC9E,uFAAuF;AACvF,iFAAiF;AACjF,qEAAqE;AACrE,2GAA2G;AAC3G,0FAA0F;AAC1F,8EAA8E;AAC9E,mGAAmG;AACnG,wEAAwE;AACxE,iFAAiF;AACjF,0HAA0H;AAC1H,2EAA2E;AAC3E,wEAAwE;AACxE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,CAA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;wBACR,OAAO;qBACV;iBACJ;gBACD,KAAI,CAAC,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;YAC9E,CAAC,CAAC,CAAC;SACN;aAAM;YACH,IAAI,OAAO,gBAAgB,KAAK,SAAS,EAAE;gBACvC,gBAAkB,EAAE,CAAC;aACxB;SACJ;QACD,OAAO;IACX,CAAC;IACL,iBAAC;AAAD,CAAC;AA5GY,gCAAU;;;;;;;UC/IvB;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;;;;;;;;;ACtBA,qIAAwD;AAaxD,kEAAkE;AAClE,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,EAA8B,CAAC;AAChE,MAAM,CAAC,aAAa,GAAG,IAAI,6BAAa,EAAE,CAAC;AAC3C,MAAM,CAAC,0BAA0B,GAAG,IAAI,CAAC","sources":["webpack://mvc/./node_modules/toastify-js/src/toastify.js","webpack://mvc/./FrontEndDev/typescript/Global/Helpers/GlobalMethods.ts","webpack://mvc/./FrontEndDev/typescript/SharedLibrary/AjaxHelper.ts","webpack://mvc/webpack/bootstrap","webpack://mvc/./FrontEndDev/typescript/Global/index.ts"],"sourcesContent":["/*!\n * Toastify js 1.12.0\n * https://github.com/apvarun/toastify-js\n * @license MIT licensed\n *\n * Copyright (C) 2018 Varun A P\n */\n(function(root, factory) {\n if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n } else {\n root.Toastify = factory();\n }\n})(this, function(global) {\n // Object initialization\n var Toastify = function(options) {\n // Returning a new init object\n return new Toastify.lib.init(options);\n },\n // Library version\n version = \"1.12.0\";\n\n // Set the default global options\n Toastify.defaults = {\n oldestFirst: true,\n text: \"Toastify is awesome!\",\n node: undefined,\n duration: 3000,\n selector: undefined,\n callback: function () {\n },\n destination: undefined,\n newWindow: false,\n close: false,\n gravity: \"toastify-top\",\n positionLeft: false,\n position: '',\n backgroundColor: '',\n avatar: \"\",\n className: \"\",\n stopOnFocus: true,\n onClick: function () {\n },\n offset: {x: 0, y: 0},\n escapeMarkup: true,\n ariaLive: 'polite',\n style: {background: ''}\n };\n\n // Defining the prototype of the object\n Toastify.lib = Toastify.prototype = {\n toastify: version,\n\n constructor: Toastify,\n\n // Initializing the object with required parameters\n init: function(options) {\n // Verifying and validating the input object\n if (!options) {\n options = {};\n }\n\n // Creating the options object\n this.options = {};\n\n this.toastElement = null;\n\n // Validating the options\n this.options.text = options.text || Toastify.defaults.text; // Display message\n this.options.node = options.node || Toastify.defaults.node; // Display content as node\n this.options.duration = options.duration === 0 ? 0 : options.duration || Toastify.defaults.duration; // Display duration\n this.options.selector = options.selector || Toastify.defaults.selector; // Parent selector\n this.options.callback = options.callback || Toastify.defaults.callback; // Callback after display\n this.options.destination = options.destination || Toastify.defaults.destination; // On-click destination\n this.options.newWindow = options.newWindow || Toastify.defaults.newWindow; // Open destination in new window\n this.options.close = options.close || Toastify.defaults.close; // Show toast close icon\n this.options.gravity = options.gravity === \"bottom\" ? \"toastify-bottom\" : Toastify.defaults.gravity; // toast position - top or bottom\n this.options.positionLeft = options.positionLeft || Toastify.defaults.positionLeft; // toast position - left or right\n this.options.position = options.position || Toastify.defaults.position; // toast position - left or right\n this.options.backgroundColor = options.backgroundColor || Toastify.defaults.backgroundColor; // toast background color\n this.options.avatar = options.avatar || Toastify.defaults.avatar; // img element src - url or a path\n this.options.className = options.className || Toastify.defaults.className; // additional class names for the toast\n this.options.stopOnFocus = options.stopOnFocus === undefined ? Toastify.defaults.stopOnFocus : options.stopOnFocus; // stop timeout on focus\n this.options.onClick = options.onClick || Toastify.defaults.onClick; // Callback after click\n this.options.offset = options.offset || Toastify.defaults.offset; // toast offset\n this.options.escapeMarkup = options.escapeMarkup !== undefined ? options.escapeMarkup : Toastify.defaults.escapeMarkup;\n this.options.ariaLive = options.ariaLive || Toastify.defaults.ariaLive;\n this.options.style = options.style || Toastify.defaults.style;\n if(options.backgroundColor) {\n this.options.style.background = options.backgroundColor;\n }\n\n // Returning the current object for chaining functions\n return this;\n },\n\n // Building the DOM element\n buildToast: function() {\n // Validating if the options are defined\n if (!this.options) {\n throw \"Toastify is not initialized\";\n }\n\n // Creating the DOM object\n var divElement = document.createElement(\"div\");\n divElement.className = \"toastify on \" + this.options.className;\n\n // Positioning toast to left or right or center\n if (!!this.options.position) {\n divElement.className += \" toastify-\" + this.options.position;\n } else {\n // To be depreciated in further versions\n if (this.options.positionLeft === true) {\n divElement.className += \" toastify-left\";\n console.warn('Property `positionLeft` will be depreciated in further versions. Please use `position` instead.')\n } else {\n // Default position\n divElement.className += \" toastify-right\";\n }\n }\n\n // Assigning gravity of element\n divElement.className += \" \" + this.options.gravity;\n\n if (this.options.backgroundColor) {\n // This is being deprecated in favor of using the style HTML DOM property\n console.warn('DEPRECATION NOTICE: \"backgroundColor\" is being deprecated. Please use the \"style.background\" property.');\n }\n\n // Loop through our style object and apply styles to divElement\n for (var property in this.options.style) {\n divElement.style[property] = this.options.style[property];\n }\n\n // Announce the toast to screen readers\n if (this.options.ariaLive) {\n divElement.setAttribute('aria-live', this.options.ariaLive)\n }\n\n // Adding the toast message/node\n if (this.options.node && this.options.node.nodeType === Node.ELEMENT_NODE) {\n // If we have a valid node, we insert it\n divElement.appendChild(this.options.node)\n } else {\n if (this.options.escapeMarkup) {\n divElement.innerText = this.options.text;\n } else {\n divElement.innerHTML = this.options.text;\n }\n\n if (this.options.avatar !== \"\") {\n var avatarElement = document.createElement(\"img\");\n avatarElement.src = this.options.avatar;\n\n avatarElement.className = \"toastify-avatar\";\n\n if (this.options.position == \"left\" || this.options.positionLeft === true) {\n // Adding close icon on the left of content\n divElement.appendChild(avatarElement);\n } else {\n // Adding close icon on the right of content\n divElement.insertAdjacentElement(\"afterbegin\", avatarElement);\n }\n }\n }\n\n // Adding a close icon to the toast\n if (this.options.close === true) {\n // Create a span for close element\n var closeElement = document.createElement(\"button\");\n closeElement.type = \"button\";\n closeElement.setAttribute(\"aria-label\", \"Close\");\n closeElement.className = \"toast-close\";\n closeElement.innerHTML = \"✖\";\n\n // Triggering the removal of toast from DOM on close click\n closeElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n this.removeElement(this.toastElement);\n window.clearTimeout(this.toastElement.timeOutValue);\n }.bind(this)\n );\n\n //Calculating screen width\n var width = window.innerWidth > 0 ? window.innerWidth : screen.width;\n\n // Adding the close icon to the toast element\n // Display on the right if screen width is less than or equal to 360px\n if ((this.options.position == \"left\" || this.options.positionLeft === true) && width > 360) {\n // Adding close icon on the left of content\n divElement.insertAdjacentElement(\"afterbegin\", closeElement);\n } else {\n // Adding close icon on the right of content\n divElement.appendChild(closeElement);\n }\n }\n\n // Clear timeout while toast is focused\n if (this.options.stopOnFocus && this.options.duration > 0) {\n var self = this;\n // stop countdown\n divElement.addEventListener(\n \"mouseover\",\n function(event) {\n window.clearTimeout(divElement.timeOutValue);\n }\n )\n // add back the timeout\n divElement.addEventListener(\n \"mouseleave\",\n function() {\n divElement.timeOutValue = window.setTimeout(\n function() {\n // Remove the toast from DOM\n self.removeElement(divElement);\n },\n self.options.duration\n )\n }\n )\n }\n\n // Adding an on-click destination path\n if (typeof this.options.destination !== \"undefined\") {\n divElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n if (this.options.newWindow === true) {\n window.open(this.options.destination, \"_blank\");\n } else {\n window.location = this.options.destination;\n }\n }.bind(this)\n );\n }\n\n if (typeof this.options.onClick === \"function\" && typeof this.options.destination === \"undefined\") {\n divElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n this.options.onClick();\n }.bind(this)\n );\n }\n\n // Adding offset\n if(typeof this.options.offset === \"object\") {\n\n var x = getAxisOffsetAValue(\"x\", this.options);\n var y = getAxisOffsetAValue(\"y\", this.options);\n\n var xOffset = this.options.position == \"left\" ? x : \"-\" + x;\n var yOffset = this.options.gravity == \"toastify-top\" ? y : \"-\" + y;\n\n divElement.style.transform = \"translate(\" + xOffset + \",\" + yOffset + \")\";\n\n }\n\n // Returning the generated element\n return divElement;\n },\n\n // Displaying the toast\n showToast: function() {\n // Creating the DOM object for the toast\n this.toastElement = this.buildToast();\n\n // Getting the root element to with the toast needs to be added\n var rootElement;\n if (typeof this.options.selector === \"string\") {\n rootElement = document.getElementById(this.options.selector);\n } else if (this.options.selector instanceof HTMLElement || (typeof ShadowRoot !== 'undefined' && this.options.selector instanceof ShadowRoot)) {\n rootElement = this.options.selector;\n } else {\n rootElement = document.body;\n }\n\n // Validating if root element is present in DOM\n if (!rootElement) {\n throw \"Root element is not defined\";\n }\n\n // Adding the DOM element\n var elementToInsert = Toastify.defaults.oldestFirst ? rootElement.firstChild : rootElement.lastChild;\n rootElement.insertBefore(this.toastElement, elementToInsert);\n\n // Repositioning the toasts in case multiple toasts are present\n Toastify.reposition();\n\n if (this.options.duration > 0) {\n this.toastElement.timeOutValue = window.setTimeout(\n function() {\n // Remove the toast from DOM\n this.removeElement(this.toastElement);\n }.bind(this),\n this.options.duration\n ); // Binding `this` for function invocation\n }\n\n // Supporting function chaining\n return this;\n },\n\n hideToast: function() {\n if (this.toastElement.timeOutValue) {\n clearTimeout(this.toastElement.timeOutValue);\n }\n this.removeElement(this.toastElement);\n },\n\n // Removing the element from the DOM\n removeElement: function(toastElement) {\n // Hiding the element\n // toastElement.classList.remove(\"on\");\n toastElement.className = toastElement.className.replace(\" on\", \"\");\n\n // Removing the element from DOM after transition end\n window.setTimeout(\n function() {\n // remove options node if any\n if (this.options.node && this.options.node.parentNode) {\n this.options.node.parentNode.removeChild(this.options.node);\n }\n\n // Remove the element from the DOM, only when the parent node was not removed before.\n if (toastElement.parentNode) {\n toastElement.parentNode.removeChild(toastElement);\n }\n\n // Calling the callback function\n this.options.callback.call(toastElement);\n\n // Repositioning the toasts again\n Toastify.reposition();\n }.bind(this),\n 400\n ); // Binding `this` for function invocation\n },\n };\n\n // Positioning the toasts on the DOM\n Toastify.reposition = function() {\n\n // Top margins with gravity\n var topLeftOffsetSize = {\n top: 15,\n bottom: 15,\n };\n var topRightOffsetSize = {\n top: 15,\n bottom: 15,\n };\n var offsetSize = {\n top: 15,\n bottom: 15,\n };\n\n // Get all toast messages on the DOM\n var allToasts = document.getElementsByClassName(\"toastify\");\n\n var classUsed;\n\n // Modifying the position of each toast element\n for (var i = 0; i < allToasts.length; i++) {\n // Getting the applied gravity\n if (containsClass(allToasts[i], \"toastify-top\") === true) {\n classUsed = \"toastify-top\";\n } else {\n classUsed = \"toastify-bottom\";\n }\n\n var height = allToasts[i].offsetHeight;\n classUsed = classUsed.substr(9, classUsed.length-1)\n // Spacing between toasts\n var offset = 15;\n\n var width = window.innerWidth > 0 ? window.innerWidth : screen.width;\n\n // Show toast in center if screen with less than or equal to 360px\n if (width <= 360) {\n // Setting the position\n allToasts[i].style[classUsed] = offsetSize[classUsed] + \"px\";\n\n offsetSize[classUsed] += height + offset;\n } else {\n if (containsClass(allToasts[i], \"toastify-left\") === true) {\n // Setting the position\n allToasts[i].style[classUsed] = topLeftOffsetSize[classUsed] + \"px\";\n\n topLeftOffsetSize[classUsed] += height + offset;\n } else {\n // Setting the position\n allToasts[i].style[classUsed] = topRightOffsetSize[classUsed] + \"px\";\n\n topRightOffsetSize[classUsed] += height + offset;\n }\n }\n }\n\n // Supporting function chaining\n return this;\n };\n\n // Helper function to get offset.\n function getAxisOffsetAValue(axis, options) {\n\n if(options.offset[axis]) {\n if(isNaN(options.offset[axis])) {\n return options.offset[axis];\n }\n else {\n return options.offset[axis] + 'px';\n }\n }\n\n return '0px';\n\n }\n\n function containsClass(elem, yourClass) {\n if (!elem || typeof yourClass !== \"string\") {\n return false;\n } else if (\n elem.className &&\n elem.className\n .trim()\n .split(/\\s+/gi)\n .indexOf(yourClass) > -1\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n // Setting up the prototype for the init object\n Toastify.lib.init.prototype = Toastify.lib;\n\n // Returning the Toastify function to be assigned to the window object/module\n return Toastify;\n});\n","import * as Toastify from 'toastify-js'\r\nimport GenericResponse from '../../../react/Account/models/GenericResponse';\r\nimport { AjaxHelper } from '../../SharedLibrary/AjaxHelper';\r\nimport { IRequirementsModel } from '../Models/IRequirementsModel';\r\n\r\ndeclare global {\r\n interface Window {\r\n bootstrap: any\r\n }\r\n}\r\n\r\ninterface IGetRequirements {\r\n Success: boolean,\r\n TaskPart?: IRequirementsModel,\r\n Message?: string\r\n}\r\n\r\nexport class GlobalMethods {\r\n public static HelloWorld(): void {\r\n console.log(\"Global Hello World\");\r\n }\r\n\r\n public AddToast(toasts: Record, key: string, text: string) {\r\n toasts[key] = Toastify({\r\n text: text,\r\n position: \"top-center\",\r\n duration: -1,\r\n })\r\n return toasts;\r\n }\r\n\r\n public ShowToast(toasts: Record, key: string) {\r\n toasts[key].showToast()\r\n }\r\n\r\n public HideToast(toasts: Record, key: string) {\r\n toasts[key].hideToast()\r\n }\r\n\r\n public ShowSuccess(text: string, duration?: number) {\r\n duration = duration ?? 20;\r\n var key = \"Notice-\" + (Math.random() * 1000);\r\n window.toasts[key] = Toastify({\r\n text: \"  \" + text,\r\n gravity: \"top\",\r\n position: \"right\",\r\n duration: duration * 1000,\r\n close: true,\r\n style: { background: \"#d1e7dd\", \"border-color\": \"#badbcc\", color: \"#0f5132\", padding: \"1rem 1rem\", \"border-radius\": \"0.25rem\", border: \"1px solid transparent\" },\r\n escapeMarkup: false\r\n });\r\n window.toasts[key].showToast();\r\n }\r\n\r\n public ShowMessage(text: string, duration?: number) {\r\n duration = duration ?? 20;\r\n var key = \"Notice-\" + (Math.random() * 1000);\r\n window.toasts[key] = Toastify({\r\n text: \"  \" + text,\r\n gravity: \"top\",\r\n position: \"right\",\r\n duration: duration * 1000,\r\n style: { background: \"#cff4fc\", \"border-color\": \"#b6effb\", color: \"#055160\", padding: \"1rem 1rem\", \"border-radius\": \"0.25rem\", border: \"1px solid transparent\" },\r\n escapeMarkup: false\r\n });\r\n window.toasts[key].showToast();\r\n }\r\n\r\n public ShowWarning(text: string, closeable: boolean, durationSeconds?: number) {\r\n var key = \"Notice-\" + (Math.random() * 1000);\r\n var duration = durationSeconds ?? 20;\r\n\r\n window.toasts[key] = Toastify({\r\n text: \"  \" + text,\r\n gravity: \"top\",\r\n position: \"right\",\r\n duration: duration * 1000,\r\n close: closeable,\r\n style: { background: \"#fff3cd\", \"border-color\": \"#ffecb5\", color: \"#664d03\", padding: \"1rem 1rem\", \"border-radius\": \"0.25rem\", border: \"1px solid transparent\" },\r\n escapeMarkup: false\r\n });\r\n window.toasts[key].showToast();\r\n }\r\n\r\n public ShowError(text: string, durationSeconds?: number) {\r\n var key = \"Notice-\" + (Math.random() * 1000);\r\n var duration = durationSeconds ?? 20;\r\n\r\n window.toasts[key] = Toastify({\r\n text: \"  \" + text,\r\n gravity: \"top\",\r\n position: \"right\",\r\n duration: duration * 1000,\r\n close: true,\r\n style: { background: \"#f8d7da\", \"border-color\": \"#f5c2c7\", color: \"#842029\", padding: \"1rem 1rem\", \"border-radius\": \"0.25rem\", border: \"1px solid transparent\" },\r\n escapeMarkup: false\r\n });\r\n window.toasts[key].showToast();\r\n }\r\n\r\n public ShowBootstrapModal = (modalId: string) => {\r\n var popupModal = new window.bootstrap.Modal(document.getElementById(modalId), { backdrop: true, keyboard: true, focus: true })\r\n popupModal.show();\r\n }\r\n\r\n public ShowBootstrapModalStatic = (modalId: string) => {\r\n var popupModal = new window.bootstrap.Modal(document.getElementById(modalId), { backdrop: \"static\", keyboard: false, focus: true })\r\n popupModal.show();\r\n }\r\n\r\n public HideBootstrapModal = (modalId: string) => {\r\n var modal = window.bootstrap.Modal.getInstance(document.getElementById(modalId))\r\n modal.hide();\r\n }\r\n\r\n public GetRequirements(taskPartGuid: string) {\r\n const ajax = new AjaxHelper();\r\n return ajax.postRequest(\"/api/tasktracker/taskpartrequirements\", {\r\n TaskPartGuid: taskPartGuid\r\n });\r\n }\r\n\r\n public UserIsCourseOwner(courseID: number) {\r\n const ajax = new AjaxHelper();\r\n return ajax.getRequest<{ success: boolean, errorType: string, message: string }>(\"/api/Account/UserIsCourseOwner/\" + courseID);\r\n }\r\n\r\n public UserIsCourseOwnerOrCoTeacher(courseID: number) {\r\n const ajax = new AjaxHelper();\r\n return ajax.getRequest<{ successful: boolean, errorType: string, message: string, isOwner: boolean, isCoTeacher: boolean }>(\"/api/Account/UserIsCourseOwnerOrCoTeacher/\" + courseID);\r\n }\r\n}","import { ITestingLoginResponse } from \"./Models/ITestingLoginResponse\";\r\n\r\nexport interface IAjaxHelper {\r\n postRequest(Url: string, Data?: any): Promise\r\n getRequest(Url: string, Data?: Record): Promise\r\n runInSequence(values: Array, funcToRun: (value: T) => Promise, funcAfterEachRun?: (value: TPromise) => boolean | any | undefined, funcWhenFinished?: () => any | undefined): void\r\n}\r\n\r\nexport class AjaxHelperTesting implements IAjaxHelper {\r\n sessionId: string = \"\";\r\n\r\n constructor() {\r\n fetch(\"https://physicsclassroom.hbstest.net/api/tasktracker/questions/TestingUserLogin\", {\r\n method: \"POST\",\r\n mode: 'cors',\r\n credentials: \"include\",\r\n cache: \"no-cache\",\r\n headers: {\r\n \"Authorization\": \"Bearer \" + this.sessionId,\r\n 'Content-Type': 'application/json',\r\n }\r\n }).then(x => {\r\n return x.json();\r\n }).then(x => {\r\n var response = x as ITestingLoginResponse;\r\n if (response.successful) {\r\n this.sessionId = response.SessionID;\r\n } else {\r\n alert(\"Error setting up testing instance: \" + response.message);\r\n }\r\n });\r\n }\r\n\r\n /*\r\n * Performs a POST on the given url, passing the given data (if any) as the Body post\r\n * @param Url - Url of the API to hit\r\n * @param Data - The JSON object the post as the body parameters\r\n * @returns response parsed as T Type\r\n */\r\n async postRequest(Url: string, Data?: any): Promise {\r\n const response = await fetch(\"https://physicsclassroom.hbstest.net\" + Url, {\r\n method: \"POST\",\r\n mode: 'cors',\r\n credentials: \"include\",\r\n cache: \"no-cache\",\r\n headers: {\r\n \"Authorization\": \"Bearer \" + this.sessionId,\r\n 'Content-Type': 'application/json'\r\n },\r\n body: (Data ? JSON.stringify(Data) : \"\")\r\n });\r\n return await response.json();\r\n }\r\n\r\n /*\r\n * Performs a GET on the given url, passing any data records as query parameters, and parsing the response as T object type\r\n * @param Url - Url of the API to hit\r\n * @param Data - Key (string) value (string, number, or boolean) of any parameters to include in the call, these are parsed as URL variables \r\n * @returns response parsed as T Type\r\n */\r\n async getRequest(Url: string, Data?: Record): Promise {\r\n var urlWithParams = \"https://physicsclassroom.hbstest.net\" + Url;\r\n if (Data) {\r\n let params = new Array();\r\n for (let key in Data) {\r\n params.push(encodeURI(key) + \"=\" + encodeURI(Data[key].toString()))\r\n }\r\n urlWithParams += \"?\" + params.join(\"&\");\r\n }\r\n const response = await fetch(urlWithParams, {\r\n method: \"GET\",\r\n mode: 'cors',\r\n credentials: \"include\",\r\n cache: \"no-cache\",\r\n headers: {\r\n \"Authorization\": \"Bearer \" + this.sessionId,\r\n 'Content-Type': 'application/json'\r\n }\r\n });\r\n return await response.json();\r\n }\r\n\r\n /*\r\n * Runs the given promise calls in order against the provided array of values, waiting for each item to finish it's promise before executing the next\r\n * @param values - Array of values that will execute in the funcToRun in order\r\n * @param funcToRun - Function that takes the single value and returns a Promise of the asynchronous call (ex postRequest or getRequest of this helper)\r\n * @param funcAfterEachRun - Optional function that receives the Promise's result, if you return false then aborts the rest of the calls, nothing / true continues\r\n * @param funcWhenFinished - Optional function that runs once every item is executed.\r\n */\r\n public runInSequence(values: Array, funcToRun: (value: T) => Promise, funcAfterEachRun?: (value: TPromise) => boolean | any | undefined, funcWhenFinished?: () => any | undefined): void {\r\n console.log(\"Cannot use RunInSequence method for testing instance of ajax helper.\");\r\n if (typeof funcWhenFinished !== undefined) {\r\n funcWhenFinished!!();\r\n }\r\n return;\r\n }\r\n}\r\n\r\nexport class AjaxCaller {\r\n /*\r\n * Performs a POST on the given url, passing the given data (if any) as the Body post\r\n * @param Url - Url of the API to hit\r\n * @param Data - The JSON object the post as the body parameters\r\n * @returns response parsed as T Type\r\n */\r\n static async postRequest(Url: string, Data?: any): Promise {\r\n const helper = new AjaxHelper();\r\n return helper.postRequest(Url, Data);\r\n }\r\n\r\n static async postRequestExcelFile(Url: string, FileName: string, Data?: any): Promise {\r\n const helper = new AjaxHelper();\r\n var sanitizedFilename = FileName.replace(/[\\\\/:*?\"<>|\\.]/g, '');\r\n return helper.postRequestFile(Url, Data)\r\n .then(blob => {\r\n var file = new Blob([blob], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });\r\n console.log(file);\r\n var fileURL = URL.createObjectURL(file);\r\n\r\n // create tag dinamically\r\n var fileLink = document.createElement('a');\r\n fileLink.href = fileURL;\r\n\r\n // it forces the name of the downloaded file\r\n fileLink.download = sanitizedFilename;\r\n\r\n // triggers the click event\r\n fileLink.click();\r\n });\r\n }\r\n\r\n /*\r\n * Performs a GET on the given url, passing any data records as query parameters, and parsing the response as T object type\r\n * @param Url - Url of the API to hit\r\n * @param Data - Key (string) value (string, number, or boolean) of any parameters to include in the call, these are parsed as URL variables \r\n * @returns response parsed as T Type\r\n */\r\n static async getRequest(Url: string, Data?: Record): Promise {\r\n const helper = new AjaxHelper();\r\n return helper.getRequest(Url, Data);\r\n }\r\n}\r\n\r\nexport class AjaxHelper implements IAjaxHelper {\r\n\r\n constructor() {\r\n\r\n }\r\n\r\n /*\r\n * Performs a POST on the given url, passing the given data (if any) as the Body post\r\n * @param Url - Url of the API to hit\r\n * @param Data - The JSON object the post as the body parameters\r\n * @returns response parsed as T Type\r\n */\r\n async postRequest(Url: string, Data?: any): Promise {\r\n const response = await fetch(Url, {\r\n method: \"POST\",\r\n mode: 'cors',\r\n cache: \"no-cache\",\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n },\r\n body: (Data ? JSON.stringify(Data) : \"\")\r\n });\r\n if (!response.ok) {\r\n var json = await response.json();\r\n throw json.message ?? json.Message;\r\n }\r\n return await response.json();\r\n }\r\n\r\n /*\r\n * Performs a POST on the given url, passing the given data (if any) as the Body post\r\n * @param Url - Url of the API to hit\r\n * @param Data - The JSON object the post as the body parameters\r\n * @returns response parsed as T Type\r\n */\r\n async postRequestFile(Url: string, Data?: any): Promise {\r\n const response = await fetch(Url, {\r\n method: \"POST\",\r\n mode: 'cors',\r\n cache: \"no-cache\",\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n body: (Data ? JSON.stringify(Data) : \"\")\r\n });\r\n if (!response.ok) {\r\n var json = await response.json();\r\n throw json.message;\r\n }\r\n console.log(response);\r\n return await response.blob();\r\n }\r\n\r\n /*\r\n * Performs a GET on the given url, passing any data records as query parameters, and parsing the response as T object type\r\n * @param Url - Url of the API to hit\r\n * @param Data - Key (string) value (string, number, or boolean) of any parameters to include in the call, these are parsed as URL variables \r\n * @returns response parsed as T Type\r\n */\r\n async getRequest(Url: string, Data?: Record): Promise {\r\n var urlWithParams = Url;\r\n if (Data) {\r\n let params = new Array();\r\n for (let key in Data) {\r\n params.push(encodeURI(key) + \"=\" + encodeURI(Data[key].toString()))\r\n }\r\n urlWithParams += \"?\" + params.join(\"&\");\r\n }\r\n const response = await fetch(urlWithParams, {\r\n method: \"GET\",\r\n mode: 'cors',\r\n cache: \"no-cache\"\r\n });\r\n if (!response.ok) {\r\n var json = await response.json();\r\n throw json.message ?? json.Message;\r\n }\r\n return await response.json();\r\n }\r\n\r\n /*\r\n * Runs the given promise calls in order against the provided array of values, waiting for each item to finish it's promise before executing the next\r\n * @param values - Array of values that will execute in the funcToRun in order\r\n * @param funcToRun - Function that takes the single value and returns a Promise of the asynchronous call (ex postRequest or getRequest of this helper)\r\n * @param funcAfterEachRun - Optional function that receives the Promise's result, if you return false then aborts the rest of the calls, nothing / true continues\r\n * @param funcWhenFinished - Optional function that runs once every item is executed.\r\n */\r\n public runInSequence(values: Array, funcToRun: (value: T) => Promise, funcAfterEachRun?: (value: TPromise) => boolean | any | undefined, funcWhenFinished?: () => any | undefined): void {\r\n if (values.length > 0) {\r\n var value = values[0];\r\n values = values.splice(1);\r\n funcToRun(value).then((tPromise: TPromise) => {\r\n if (typeof funcAfterEachRun !== undefined && funcAfterEachRun != null) {\r\n var result = funcAfterEachRun(tPromise);\r\n if (typeof result === \"boolean\" && !(result as boolean)) {\r\n // Abort\r\n return;\r\n }\r\n }\r\n this.runInSequence(values, funcToRun, funcAfterEachRun, funcWhenFinished);\r\n });\r\n } else {\r\n if (typeof funcWhenFinished !== undefined) {\r\n funcWhenFinished!!();\r\n }\r\n }\r\n return;\r\n }\r\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","import { GlobalMethods } from './Helpers/GlobalMethods';\r\nimport Toastify from 'toastify-js'\r\n\r\n// declare my helper in the window interface\r\ndeclare global {\r\n interface Window {\r\n GlobalMethods: GlobalMethods\r\n toasts: Record\r\n DoNotReloadOnColorboxClose: boolean,\r\n \"$\": any\r\n }\r\n}\r\n\r\n// Can access your methods with window.SiteMethods.theMethodName()\r\nwindow.toasts = window.toasts || {} as Record;\r\nwindow.GlobalMethods = new GlobalMethods();\r\nwindow.DoNotReloadOnColorboxClose = true;"],"names":[],"sourceRoot":""}