diff --git a/.prettierignore b/.prettierignore
index c6c190c..a156cc6 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -30,7 +30,7 @@ core/scripts/APIandLibraries/**/*
.vscode
# workbox
-workbox-config.js
+workbox-config.cjs
core/scripts/serviceWorker
# Visual Studio Code
diff --git a/README.md b/README.md
index 3e687eb..51fc680 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ SciGrade is an online web-tool that allows students (or any user with access) to
## Getting Started
-It is recommended that you use the web-version available at . For local runs, the landing page [index.html](index.html) links to the runtime page [core/systemrun.html](core/systemrun.html), which initializes the practice flow by default and hides the account UI in the navigation.
+It is recommended that you use the web-version available at . For local runs, the landing page [index.html](index.html) links to the runtime page [core/systemrun.html](core/systemrun.html), which initializes the practice flow by default.
## Browser Compatibilities
diff --git a/core/scripts/crispr_scripts.js b/core/scripts/crispr_scripts.js
index 788a38f..514bb7c 100644
--- a/core/scripts/crispr_scripts.js
+++ b/core/scripts/crispr_scripts.js
@@ -1,4 +1,3 @@
-/* eslint-disable indent */
//= ================================ SciGrade ==================================
//
// Purpose: General script for SciGrade
@@ -212,7 +211,7 @@ let MARPAMseq = false;
let MARCutPos = false;
let MARstrand = false;
let MAROffTarget = false;
-let MAROffTarget_degree = 0; // 0 wrong, 1 above 75, 2 above 35, 3 only option
+let MAROffTarget_degree = 0; // 0 wrong, 1 optimal or >=35 with max < 80, 2 >=35 with max >= 80, 3 only option
let MAROffTarget_aboveOpt = false;
let MAROffTarget_above35 = false;
let MAROffTarget_onlyOption = false;
@@ -402,7 +401,7 @@ let offtarget_Use = [];
function checkOffTarget(score) {
// Reset variables:
MAROffTarget = false;
- MAROffTarget_degree = 0; // 0 wrong, 1 above 75, 2 above 35, 3 only option
+ MAROffTarget_degree = 0; // 0 wrong, 1 optimal or >=35 with max < 80, 2 >=35 with max >= 80, 3 only option
MAROffTarget_aboveOpt = false;
MAROffTarget_above35 = false;
MAROffTarget_onlyOption = false;
@@ -446,17 +445,7 @@ function checkOffTarget(score) {
// Is it within the optimal range?
const Max_range = Math.max.apply(null, offtarget_List);
- const Min_optimal = Max_range - Max_range * 0.2;
- let optimalValue = Min_optimal;
- const { studentClass } = student_reg_information[0].student_list[studentParseNum];
- // Change optimal range based on custom input
- if (student_reg_information[0].classMarkingMod[studentClass][0] === "Optimal") {
- if (Min_optimal > 80 || Min_optimal < 35) {
- optimalValue = 80;
- }
- } else {
- optimalValue = student_reg_information[0].classMarkingMod[studentClass][0];
- }
+ const optimalValue = getOffTargetOptimalValue(Max_range);
// Determine if off-target is optimal or not
if (InputOffTargetValue >= optimalValue) {
MAROffTarget_aboveOpt = true;
@@ -476,6 +465,18 @@ function checkOffTarget(score) {
}
}
+/**
+ * Determine the default optimal off-target threshold for practice mode.
+ * @param {number} maxRange Maximum specificity score in the local window
+ */
+function getOffTargetOptimalValue(maxRange) {
+ const minOptimal = maxRange - maxRange * 0.2;
+ if (minOptimal > 80 || minOptimal < 35) {
+ return 80;
+ }
+ return minOptimal;
+}
+
let possible_F1_primers = [];
/**
* Checks whether the F1 primer matches one of the generated candidates.
@@ -542,6 +543,7 @@ function createComplementarySeq(seq) {
for (const element of seq) {
comp_seq = complementary_nt_dict[element] + comp_seq;
}
+ return comp_seq;
}
let studentMark = 0;
@@ -816,531 +818,9 @@ function showNewInput(docCheck, checkFor, docDisplay) {
}
let completed_assignments = [];
-/**
- * Generates a list of completed_assignments
- */
-function generateCompletedAssignmentList() {
- completed_assignments = [];
- // Assignments
- if (student_reg_information[0].student_list[studentParseNum]["assignment-HBB-Marks"]) {
- if (!completed_assignments.includes("HBB")) {
- completed_assignments.push("HBB");
- }
- }
- if (student_reg_information[0].student_list[studentParseNum]["assignment-CCR5-Marks"]) {
- if (!completed_assignments.includes("CCR5")) {
- completed_assignments.push("CCR5");
- }
- }
- if (student_reg_information[0].student_list[studentParseNum]["assignment-ANKK1-Marks"]) {
- if (!completed_assignments.includes("ANKK1")) {
- completed_assignments.push("ANKK1");
- }
- }
- if (student_reg_information[0].student_list[studentParseNum]["assignment-APOE-Marks"]) {
- if (!completed_assignments.includes("APOE")) {
- completed_assignments.push("APOE");
- }
- }
-}
-
-/**
- * Account management functions. This function depends on login.js, without that, this will not run!
- */
-function openAccountManagement() {
- generateCompletedAssignmentList();
- $("#accountManagementBody").empty();
- let append_str = `
-
";
-
- // Append TAs or Admins:
- append_str +=
- "
If you would like to add a single user (students, TAs or admins), please fill in the form below. Please note, this will default the user as a student. Only admins will be able to create new TAs or admins
";
- // Form opening
- append_str += "";
-
- // Close card
- append_str += "
If you would like to change a class's off-target optimal goal, you can do that here
";
-
- // Choose class:
- append_str += '
';
- append_str += '';
- append_str += `";
- append_str +=
- 'Choose the class for which you are modifying marking scheme for.';
- append_str += "
";
-
- // Modify controls:
- append_str += '
';
- append_str += '
Modify controls for:
';
- append_str += '';
-
- append_str += '
Current off-target marking is set to:
';
- append_str +=
- '";
- append_str +=
- '';
- append_str +=
- 'Choose how you want the off-target score to be marked. Optimal is Min_optimal = Max_range - (Max_range * 0.2) if below 80 (if below, optimal = 80). Custom value can be any number between 0.01 and 100 which will be the new custom "optimal" value for your class.';
- append_str += "
";
- $("#accountManagementBody").append(append_str);
- }
-
- // Close account management
- append_str = "";
- $("#accountManagementBody").append(append_str);
-
- // Open the Bootstrap modal
- $("#accountModal").modal("show");
-}
-
-/**
- * Update the choose user's options in the account management's change user type
- * @param {string} domUser
- */
-function UpdateChooseUser(domUser) {
- ClearSelectOptions(domUser);
- for (const key in updatedListOfStudents) {
- if (updatedListOfStudents[key]) {
- AddToOptions(domUser, key, updatedListOfStudents[key]);
- }
- }
-}
-
-/**
- * Add more options to a select
- * @param {string} domID The DOM ID in the HTML file for the select
- * @param {string} optionsValue The value and ID for the options being added
- * @param {string} optionsInner The InnerHTML for the options being added
- */
-function AddToOptions(domID, optionsValue, optionsInner) {
- const dom = document.getElementById(domID);
- const option = document.createElement("option");
- option.value = optionsValue;
- option.innerHTML = optionsInner;
- dom.appendChild(option);
-}
-
-/**
- * Clear an select's options
- * @param {string} domID The DOM ID in the HTML for the select
- */
-function ClearSelectOptions(domID) {
- const dom = document.getElementById(domID);
- while (dom.options.length > 0) {
- dom.options.remove(0);
- }
-}
-
-let updatedListOfStudents = {};
-/**
- * Update the list of students available for a class
- * @param {string} className The class for which the students belong to
- */
-function UpdateStudentList(className) {
- updatedListOfStudents = {};
- const studentList = student_reg_information[0].student_list;
- for (const student of studentList) {
- if (student.studentClass === className) {
- updatedListOfStudents[student.name] = `${student.name} - ${student.type}`;
- }
- }
-}
-
-/**
- * Change a DOM's innerHTML
- * @param {string} domID DOM's ID that is being modified
- * @param {string} changeTo The content of the innerHTML
- */
-function ChangeDOMInnerhtml(domID, changeTo) {
- document.getElementById(domID).innerHTML = changeTo;
-}
-
-const downloadIndexTable_start = "\t\t
\n\t\t\t
Student Number
\n\t\t\t
Name
";
-const downloadIndexTable_end = "\n\t\t
\n";
-let downloadIndexTable_fill = "";
-/**
- * Generates the base index table header used for CSV export.
- * @param {string} whichIndexTable Placeholder parameter for compatibility
- * @param {boolean} SimpleComplex Placeholder parameter for compatibility
- */
-function generateRestOfIndexTable(whichIndexTable, SimpleComplex) {
- whichIndexTable = downloadIndexTable_start;
- whichIndexTable += downloadIndexTable_end;
- return whichIndexTable;
-}
-
-/**
- * Generated a download button from JSON to CSV
- * @param {string} whichClass Which class is being downloaded
- * @param {boolean} whichType True is simple, false is complex
- */
-function generateHiddenStudentDownload(whichClass, whichType) {
- // Check if TA/Admin
- if (
- student_reg_information[0].student_list[studentParseNum].type === "TA" ||
- student_reg_information[0].student_list[studentParseNum].type === "admin"
- ) {
- downloadIndexTable_fill = generateRestOfIndexTable(downloadIndexTable_fill, whichType);
- $("#hiddenDownloadModal_table").empty(); // reset
- const d = new Date();
- let downloadIndexTable_str = "
\n\t\n";
- let captionTitleBegin = "SciGrade_studentMark_";
- if (!whichType) {
- captionTitleBegin = "SciGrade_studentMarkRaw_";
- }
- downloadIndexTable_str += `\t\t
\n`;
- downloadIndexTable_str += downloadIndexTable_fill;
- // Looping through each row of the table
- const studentRegList = student_reg_information[0].student_list;
- for (const student of studentRegList) {
- if (student.type === "Student" && student.studentClass === whichClass) {
- downloadIndexTable_str += "\t\t
\n";
- downloadIndexTable_str += `\t\t\t
${student.student_number}
\n`;
- downloadIndexTable_str += `\t\t\t
${student.name}
\n`;
- downloadIndexTable_str += "\t\t
\n";
- }
- }
- downloadIndexTable_str += "\t\n
"; // Closing
- document.getElementById("hiddenDownloadModal_table").innerHTML += downloadIndexTable_str;
- $("#hiddenDownloadModal_table").tableToCSV();
- } else {
- showRegError(7);
- }
-}
-
-/**
- * Updates one input value when another input matches a target value.
- * @param {string} docCheck The DOM ID to check
- * @param {string} checkFor The value to compare against
- * @param {string} docChange The DOM ID to update
- * @param {string} trueChangeValueTo The value to apply when matched
- */
-function changeInputClass(docCheck, checkFor, docChange, trueChangeValueTo) {
- if (trueChangeValueTo === "" || trueChangeValueTo === undefined) {
- trueChangeValueTo = "undefined Class";
- }
- trueChangeValueTo = trueChangeValueTo.replace(/\s/g, "");
- if (document.getElementById(docCheck).value === checkFor) {
- document.getElementById(docChange).value = trueChangeValueTo;
- }
-}
-
let all_answers = [];
let all_outputs = [];
let all_marks = [];
-let studentAnswers = `student_list.${studentParseNum}.${loadedMode}-${current_gene}-Answers`;
-let studentOutputs = `student_list.${studentParseNum}.${loadedMode}-${current_gene}-Outputs`;
-let studentMarks = `student_list.${studentParseNum}.${loadedMode}-${current_gene}-Marks`;
/**
* Collects the student's answers, calculates marks, and triggers feedback display.
*/
@@ -1351,9 +831,6 @@ function submitAnswers() {
checkAnswers();
setTimeout(() => {
markAnswers();
- studentAnswers = `student_list.${studentParseNum}.${loadedMode}-${current_gene}-Answers`;
- studentOutputs = `student_list.${studentParseNum}.${loadedMode}-${current_gene}-Outputs`;
- studentMarks = `student_list.${studentParseNum}.${loadedMode}-${current_gene}-Marks`;
all_answers.push(
document?.getElementById("sequence_input")?.value?.trim() || "",
document.getElementById("pam_input").value.trim(),
@@ -1412,3 +889,50 @@ function backToAssignments() {
$(() => {
$("form").submit(() => false);
});
+
+// Export for testing
+if (typeof module !== "undefined" && module.exports) {
+ module.exports = {
+ getOffTargetOptimalValue,
+ isNumberOrDashKey,
+ createComplementarySeq,
+ checkOffTarget,
+ checkF1Primers,
+ checkR1Primers,
+ fillGeneList,
+ // Export getters for testing
+ get MAROffTarget() {
+ return MAROffTarget;
+ },
+ get MAROffTarget_degree() {
+ return MAROffTarget_degree;
+ },
+ get MARF1primers() {
+ return MARF1primers;
+ },
+ get MARR1primers() {
+ return MARR1primers;
+ },
+ // Export setters for test setup
+ __setTestState(state = {}) {
+ if (state.correctNucleotideIncluded !== undefined)
+ correctNucleotideIncluded = state.correctNucleotideIncluded;
+ if (state.MARgRNAseq !== undefined) MARgRNAseq = state.MARgRNAseq;
+ if (state.benchling_gRNA_outputs !== undefined) benchling_gRNA_outputs = state.benchling_gRNA_outputs;
+ if (state.current_gene !== undefined) current_gene = state.current_gene;
+ if (state.gene_backgroundInfo !== undefined) gene_backgroundInfo = state.gene_backgroundInfo;
+ },
+ // Reset state for clean tests
+ __resetState() {
+ MAROffTarget = false;
+ MAROffTarget_degree = 0;
+ MARF1primers = false;
+ MARR1primers = false;
+ MAROffTarget_aboveOpt = false;
+ MAROffTarget_above35 = false;
+ MAROffTarget_onlyOption = false;
+ correctNucleotideIncluded = false;
+ MARgRNAseq = false;
+ },
+ };
+}
diff --git a/core/scripts/crispr_scripts.min.js b/core/scripts/crispr_scripts.min.js
index eab48c5..791d708 100644
--- a/core/scripts/crispr_scripts.min.js
+++ b/core/scripts/crispr_scripts.min.js
@@ -1 +1,27 @@
-let selection_inMode="practice";const listOfGenes=["eBFP","ACTN3","HBB","CCR5","ANKK1","APOE"];let gene_backgroundInfo,benchling_gRNA_outputs,possible_gene="eBFP",current_gene="empty";function select_Gene(){""!==possible_gene||possible_gene?(current_gene=possible_gene,loadWork(),checkAnswers_executed=!1):("empty"===current_gene&&"eBFP"===current_gene&&"ACTN3"===current_gene&&"HBB"===current_gene&&"CCR5"===current_gene&&"ANKK1"===current_gene&&"APOE"===current_gene||(current_gene="empty"),alert("Error code sG34-42 occurred. Please contact admin or TA!"))}async function loadCRISPRJSON_Files(){try{const e=await fetch("./data/Benchling_gRNA_Outputs.json");benchling_gRNA_outputs=await e.json();const t=await fetch("data/Background_info/gene_background_info.json");gene_backgroundInfo=await t.json()}catch(e){console.error("Error fetching file:",e)}}function fillGeneList(){if(gene_backgroundInfo?.gene_list){let e;$("#gene_dropdown_selection").empty();const t=Object.keys(gene_backgroundInfo.gene_list);for(const n of t)e+=`\n\t\t\t\t\n\t\t\t`;$("#gene_dropdown_selection").append(e)}}let loadedMode="practice";function loadWork(){if(gene_backgroundInfo||""!==gene_backgroundInfo||backgroundInfo?.[0].gene_list[current_gene]){let e;$("#work").empty(),loadedMode=selection_inMode,checkAnswers_executed=!1,e='
',e+='
\n
Please refer to your dry lab protocol for full instructions on how and what to do. Below is a brief reminder of what you are supposed to do with each gene: \n Your objective is to find these mutations, design a gRNA and its corresponding F1/R1 primers
\n
\n',e+=`
Here is some background information about your gene: ${gene_backgroundInfo?.gene_list[current_gene].name} (${current_gene})
Please input the following information for your gRNA for your selected gene.
\n",e+="",e+="
",$("#work").append(e)}else""!==gene_backgroundInfo&&gene_backgroundInfo&&backgroundInfo?.[0].gene_list[current_gene]||alert("Error code lFS50-66 occurred. Please contact admin or TA!")}function isNumberOrDashKey(e){const t=e.which?e.which:e.keyCode;return!(46!==t&&45!==t&&t>31&&(t<48||t>57))}let MARgRNAseq=!1,MARgRNAseq_degree=0,MARPAMseq=!1,MARCutPos=!1,MARstrand=!1,MAROffTarget=!1,MAROffTarget_degree=0,MAROffTarget_aboveOpt=!1,MAROffTarget_above35=!1,MAROffTarget_onlyOption=!1,MARF1primers=!1,MARR1primers=!1,possible_comparable_answers=[],correctNucleotideIncluded=!1,true_counts=0,checkAnswers_executed=!1;function checkAnswers(){MARgRNAseq=!1,MARgRNAseq_degree=0,MARPAMseq=!1,MARCutPos=!1,MARstrand=!1,correctNucleotideIncluded=!1,true_counts=0;const e=gene_backgroundInfo.gene_list[current_gene]["Target position"]-1,t=document?.getElementById("sequence_input")?.value?.trim()||void 0;if(possible_comparable_answers=[],t)for(const n of benchling_gRNA_outputs.gene_list[current_gene])n.Sequence===t&&possible_comparable_answers.push(n);if(possible_comparable_answers.length>0)for(const n of possible_comparable_answers){if(true_counts=0,correctNucleotideIncluded=!1,1===n.Strand){const t=n.Position-1-1+3;e>=n.Position-1-17&&e<=t&&(correctNucleotideIncluded=!0)}else if(-1===n.Strand){const t=n.Position-1+17;e>=n.Position-1-3&&e<=t&&(correctNucleotideIncluded=!0)}if(correctNucleotideIncluded){let t,a;if(1===n.Strand?(t=n.Position-1+2,a=n.Position-1+4,"Sense (+)"===document.getElementById("strand_input").value&&(MARstrand=!0,true_counts+=1)):-1===n.Strand&&(t=n.Position-1-2,a=n.Position-1-4,"Antisense (-)"===document.getElementById("strand_input").value&&(MARstrand=!0,true_counts+=1)),e>=t&&e<=a?(MARgRNAseq=!1,MARgRNAseq_degree=0):e>=possible_comparable_answers[i].Position-1+1&&e<=possible_comparable_answers[i].Position-1+10||e<=possible_comparable_answers[i].Position-1-1&&e>=possible_comparable_answers[i].Position-1-10?(MARgRNAseq=!0,MARgRNAseq_degree=1,true_counts+=1):e>=possible_comparable_answers[i].Position-1&&e<=possible_comparable_answers[i].Position-1+20||e<=possible_comparable_answers[i].Position-1&&e>=possible_comparable_answers[i].Position-1-20?(MARgRNAseq=!0,MARgRNAseq_degree=2,true_counts+=1):(e>=possible_comparable_answers[i].Position-1&&e<=possible_comparable_answers[i].Position-1+30||e<=possible_comparable_answers[i].Position-1&&e>=possible_comparable_answers[i].Position-1-30)&&(MARgRNAseq=!0,MARgRNAseq_degree=3,true_counts+=1),MARgRNAseq){const e=element;e.Position&&parseInt(e.Position,10)===parseInt(document.getElementById("position_input").value,10)?(MARCutPos=!0,true_counts+=1):null!==e.Position&&void 0!==e.Position||alert("Error code cA302-307: retrieving server information on 'Position' answers occurred. Please contact admin or TA!"),(e.PAM||e.PAM)&&e.PAM===document.getElementById("pam_input").value.trim()?(MARPAMseq=!0,true_counts+=1):null!==e.PAM&&void 0!==e.PAM||alert("Error code cA311-317: retrieving server information on 'PAM' answers occurred. Please contact admin or TA!"),e["Specificity Score"]||e["Specificity Score"]?checkOffTarget(e["Specificity Score"]):null!==e["Specificity Score"]&&void 0!==e["Specificity Score"]||alert("Error code cA342-348: retrieving server information on 'Specificity Score' answers occurred. Please contact admin or TA!"),checkF1Primers(document?.getElementById("sequence_input")?.value?.trim()||""),checkR1Primers(document?.getElementById("sequence_input")?.value?.trim()||"")}}}checkAnswers_executed=!0}let offtarget_List=[],offtarget_dict={},offtarget_dictParse=[],offtarget_Use=[];function checkOffTarget(e){MAROffTarget=!1,MAROffTarget_degree=0,MAROffTarget_aboveOpt=!1,MAROffTarget_above35=!1,MAROffTarget_onlyOption=!1;const t=Math.floor(e),n=Math.ceil(e),a=parseInt(document.getElementById("offtarget_input").value,10);if(correctNucleotideIncluded&&MARgRNAseq&&a>=t&&a<=n&&(MAROffTarget=!0,true_counts+=1),MAROffTarget){const e=parseInt(document.getElementById("position_input").value,10)+35,t=parseInt(document.getElementById("position_input").value,10)-35;offtarget_List=[],offtarget_dict={},offtarget_dictParse=[],offtarget_Use=[];for(let a=0;a=t&&benchling_gRNA_outputs.gene_list[current_gene][a].Position<=e&&benchling_gRNA_outputs.gene_list[current_gene][a]["Specificity Score"]&&(offtarget_List.push(benchling_gRNA_outputs.gene_list[current_gene][a]["Specificity Score"]),offtarget_dict[a]=benchling_gRNA_outputs.gene_list[current_gene][a]["Specificity Score"],offtarget_dictParse.push(a));let n=!0;Math.max.apply(null,offtarget_List)<35&&(n=!1);const s=Math.max.apply(null,offtarget_List),o=s-.2*s;let r=o;const{studentClass:l}=student_reg_information[0].student_list[studentParseNum];"Optimal"===student_reg_information[0].classMarkingMod[l][0]?(o>80||o<35)&&(r=80):r=student_reg_information[0].classMarkingMod[l][0],a>=r?(MAROffTarget_aboveOpt=!0,MAROffTarget_above35=!0,MAROffTarget_degree=1):a>=35?(MAROffTarget_above35=!0,MAROffTarget_degree=Math.max.apply(null,offtarget_List)<80?1:2):n||(MAROffTarget_onlyOption=!0,MAROffTarget_degree=3)}}let possible_F1_primers=[];function checkF1Primers(e){MARF1primers=!1,possible_F1_primers=[];const t="TAATACGACTCACTATAG";let n=!0;"G"===e[0]&&(n=!1);for(let a=16;a<=20;a+=1)possible_F1_primers.push(t+e.slice(0,a));if(!n)for(let a=16;a<=20;a+=1)possible_F1_primers.push(t+e.slice(1,a));possible_F1_primers.includes(document.getElementById("f1_input").value.trim())&&(MARF1primers=!0)}let possible_R1_primers=[];const complementary_nt_dict={A:"T",T:"A",C:"G",G:"C"};function checkR1Primers(e){MARR1primers=!1,possible_R1_primers=[];let t="";for(const n of e)t=complementary_nt_dict[n]+t;for(let n=19;n<=20;n+=1)possible_R1_primers.push("TTCTAGCTCTAAAAC"+t.slice(0,n));possible_R1_primers.includes(document.getElementById("r1_input").value.trim())&&(MARR1primers=!0)}function createComplementarySeq(e){let t="";for(const n of e)t=complementary_nt_dict[n]+t}let studentMark=0,studentMarkPercentage=0;const markTotal=10;function markAnswers(){studentMark=0,checkAnswers_executed||checkAnswers(),checkAnswers_executed&&(MARgRNAseq&&(1===MARgRNAseq_degree?studentMark+=2:2===MARgRNAseq_degree?studentMark+=1:3===MARgRNAseq_degree&&(studentMark+=.5)),MARPAMseq&&(studentMark+=2),MAROffTarget&&(1===MAROffTarget_degree?studentMark+=2:2===MAROffTarget_degree?studentMark+=1:3===MAROffTarget_degree&&(studentMark+=.5)),MARF1primers&&(studentMark+=2),MARR1primers&&(studentMark+=2),studentMarkPercentage=(studentMark/markTotal*100).toFixed(2),studentMarkPercentage>100?studentMarkPercentage=100:studentMarkPercentage<0&&(studentMarkPercentage=0))}function showFeedback(){$("#mainContainer").empty();let e="
You would only receive feedback on your practice attempts and not your final assignments.
";e+="
The assignment itself is marked out of 10 marks with 2 marks for each input excluding gRNA strand direction, cut position and target region range (these three values are used to calculate if you have the right answer or not which means they are still crucial that they are still correct).
",e+="
The following is the breakdown of what marks you would have received and why you would have gotten them:
",e+=`
Mark: ${all_marks[0]}/10 (${all_marks[1]})
`;let t=0,n="Your gRNA sequence was wrong and not found in the Benchling gRNA outputs. Either you made a typo or this answer was not correct and did not contain the target cut site within an acceptable range.";MARgRNAseq&&(1===MARgRNAseq_degree?(t=2,n="This means your answer was correct and you received full marks."):2===MARgRNAseq_degree?(t=1,n="This means your sequence was partially correct as it contains the target sequence within a 20bp range but was not optimal. One mark."):3===MARgRNAseq_degree&&(t=.5,n="This means your sequence was not wrong (therefore was still correct) but there were better options out there. I recommend you try this practice assignment again. Still worth some marks though (half a mark)."));let a=0,s="Your PAM sequence was wrong and not found relative to your gRNA sequence. Either you made a typo or this answer was not correct. Either it contained the cut site within the PAM site or it was not an NGG or NAG PAM site (SciGrade only accepts either of those two PAM sites).";MARPAMseq&&(a=2,s="This means your answer was correct and you received full marks.");let o=0,r="Your off-target score was wrong. Either it was not above/within the optimal range (or above 35) or the last-resort option.";MAROffTarget&&(1===MAROffTarget_degree?(o=2,r="This means your answer was correct while above/within the optimal and you received full marks."):2===MAROffTarget_degree?(o=1,r="This means your answer was technically correct as its on-target value was above 35."):3===MAROffTarget_degree&&(o=.5,r="This means your answer was partially correct as it was found to be your only option is solely based on the target region range you selected."));let l=0,i="";for(let p=0;p",e+="
",e+="
",e+="",e+="
",e+="
",e+="
",e+="
",e+=`
For gRNA Strand Sequence, you put down "${all_answers[0]}" which gave you the mark ${t}.
`,e+=n,e+="
",e+="
",e+="",$("#mainContainer").append(e),e="
",e+="
",e+="
",e+="",e+="
",e+="
",e+="
",e+="
",e+=`
For gRNA PAM Sequence, you put down "${all_answers[1]}" which gave you the mark ${a}.
`,e+=s,e+="
",e+="
",e+="
",$("#mainContainer").append(e),e="
",e+="
",e+="
",e+="",e+="
",e+="
",e+="
",e+="
",e+=`
For Off-Target Score, you put down "${all_answers[4]}" which gave you the mark ${o}.
`,e+=r,e+="
",e+="
",e+="
",$("#mainContainer").append(e),e="
",e+="
",e+="
",e+="",e+="
",e+="
",e+="
",e+="
",e+=`
For F1 Primer, you put down "${all_answers[5]}" which gave you the mark ${l}.
`,e+=d,e+="
",e+="
",e+="
",$("#mainContainer").append(e),e="
",e+="
",e+="
",e+="",e+="
",e+="
",e+="
",e+="
",e+=`
For R1 Primer, you put down "${all_answers[6]}" which gave you the mark ${c}.
`,e+=m,e+="
",e+="
",e+="
",$("#mainContainer").append(e),e=" ",e+="
If at any point you wish to dispute marks, please contact your TA or professor once you completed your assignment. If you have found a bug in our SciGrade marking system, please contact your professor or our admin.
If you would like to create a new class, just fill the form below: ",e+="
",e+="
",e+="
",e+="
",$("#accountManagementBody").append(e),e="
",e+="
",e+="
",e+="",e+="
",e+="
",e+="
",e+="
",e+="
If you would like to add a single user (students, TAs or admins), please fill in the form below. Please note, this will default the user as a student. Only admins will be able to create new TAs or admins
If you would like to change a class's off-target optimal goal, you can do that here
",e+='
',e+='',e+='",e+='Choose the class for which you are modifying marking scheme for.',e+="
",e+='
',e+='
Modify controls for:
',e+='',e+='
Current off-target marking is set to:
',e+='",e+='',e+='Choose how you want the off-target score to be marked. Optimal is Min_optimal = Max_range - (Max_range * 0.2) if below 80 (if below, optimal = 80). Custom value can be any number between 0.01 and 100 which will be the new custom "optimal" value for your class.',e+="
",e+="
",e+="
",e+="
",$("#accountManagementBody").append(e),e="
",e+="
",e+="
",e+="",e+="
",e+="
",e+="
",e+="
",e+="
If you would like to change a user's account type (to TA or admin or back to student), you can do that below
",e+='
',e+='',e+='",e+='Choose the class for which the user belongs to.',e+="
",e+='
',e+='',e+='",e+='Choose the user for which you change their account type for.',e+="
",e+='
',e+='',e+='",e+='Choose the type for which you want the user to become.',e+="
",e+=" ",e+="
",e+="
",e+="
",$("#accountManagementBody").append(e)}e="",$("#accountManagementBody").append(e),$("#accountModal").modal("show")}function UpdateChooseUser(e){ClearSelectOptions(e);for(const t in updatedListOfStudents)updatedListOfStudents[t]&&AddToOptions(e,t,updatedListOfStudents[t])}function AddToOptions(e,t,n){const a=document.getElementById(e),s=document.createElement("option");s.value=t,s.innerHTML=n,a.appendChild(s)}function ClearSelectOptions(e){const t=document.getElementById(e);for(;t.options.length>0;)t.options.remove(0)}let updatedListOfStudents={};function UpdateStudentList(e){updatedListOfStudents={};const t=student_reg_information[0].student_list;for(const n of t)n.studentClass===e&&(updatedListOfStudents[n.name]=`${n.name} - ${n.type}`)}function ChangeDOMInnerhtml(e,t){document.getElementById(e).innerHTML=t}const downloadIndexTable_start="\t\t
\n`,a+=downloadIndexTable_fill;const o=student_reg_information[0].student_list;for(const t of o)"Student"===t.type&&t.studentClass===e&&(a+="\t\t
\n",a+=`\t\t\t
${t.student_number}
\n`,a+=`\t\t\t
${t.name}
\n`,a+="\t\t
\n");a+="\t\n
",document.getElementById("hiddenDownloadModal_table").innerHTML+=a,$("#hiddenDownloadModal_table").tableToCSV()}else showRegError(7)}function changeInputClass(e,t,n,a){""!==a&&void 0!==a||(a="undefined Class"),a=a.replace(/\s/g,""),document.getElementById(e).value===t&&(document.getElementById(n).value=a)}let all_answers=[],all_outputs=[],all_marks=[],studentAnswers=`student_list.${studentParseNum}.${loadedMode}-${current_gene}-Answers`,studentOutputs=`student_list.${studentParseNum}.${loadedMode}-${current_gene}-Outputs`,studentMarks=`student_list.${studentParseNum}.${loadedMode}-${current_gene}-Marks`;function submitAnswers(){all_answers=[],all_outputs=[],all_marks=[],checkAnswers(),setTimeout((()=>{markAnswers(),studentAnswers=`student_list.${studentParseNum}.${loadedMode}-${current_gene}-Answers`,studentOutputs=`student_list.${studentParseNum}.${loadedMode}-${current_gene}-Outputs`,studentMarks=`student_list.${studentParseNum}.${loadedMode}-${current_gene}-Marks`,all_answers.push(document?.getElementById("sequence_input")?.value?.trim()||"",document.getElementById("pam_input").value.trim(),document.getElementById("position_input").value,document.getElementById("strand_input").value,document.getElementById("offtarget_input").value,document.getElementById("f1_input").value.trim(),document.getElementById("r1_input").value.trim()),all_outputs.push(MARstrand,MARgRNAseq,MARgRNAseq_degree,MARCutPos,MARPAMseq,MAROffTarget,MAROffTarget_degree,MAROffTarget_aboveOpt,MAROffTarget_above35,MAROffTarget_onlyOption,MARF1primers,MARR1primers),all_marks.push(studentMark,studentMarkPercentage),document.getElementById("options_label").innerHTML="Would you like to see feedback on your answers or start a new assignment?",document.getElementById("seeFeedback").removeAttribute("hidden"),showFeedback(),$("#feedbackButton").click()}),750)}function IfPressEnter(e,t){13!==e.which&&13!==e.keyCode||$(`#${t}`).click()}function backToAssignments(){redirectCRISPR(),$("#practice").click()}$((()=>{$("form").submit((()=>!1))}));
\ No newline at end of file
+let selection_inMode="practice";const listOfGenes=["eBFP","ACTN3","HBB","CCR5","ANKK1","APOE"];let possible_gene="eBFP",current_gene="empty";function select_Gene(){possible_gene!==""||possible_gene?(current_gene=possible_gene,loadWork(),checkAnswers_executed=!1):((current_gene!=="empty"||current_gene!=="eBFP"||current_gene!=="ACTN3"||current_gene!=="HBB"||current_gene!=="CCR5"||current_gene!=="ANKK1"||current_gene!=="APOE")&&(current_gene="empty"),alert("Error code sG34-42 occurred. Please contact admin or TA!"))}let gene_backgroundInfo,benchling_gRNA_outputs;async function loadCRISPRJSON_Files(){try{benchling_gRNA_outputs=await(await fetch("./data/Benchling_gRNA_Outputs.json")).json(),gene_backgroundInfo=await(await fetch("data/Background_info/gene_background_info.json")).json()}catch(e){console.error("Error fetching file:",e)}}function fillGeneList(){if(gene_backgroundInfo?.gene_list){$("#gene_dropdown_selection").empty();let e;const n=Object.keys(gene_backgroundInfo.gene_list);for(const t of n)e+=`
+
+ `;$("#gene_dropdown_selection").append(e)}}let loadedMode="practice";function loadWork(){if(gene_backgroundInfo||gene_backgroundInfo!==""||backgroundInfo?.[0].gene_list[current_gene]){$("#work").empty(),loadedMode=selection_inMode,checkAnswers_executed=!1;let e;e='
',e+=`
+
Please refer to your dry lab protocol for full instructions on how and what to do. Below is a brief reminder of what you are supposed to do with each gene:
+ Your objective is to find these mutations, design a gRNA and its corresponding F1/R1 primers
+
+`,e+=`
Here is some background information about your gene: ${gene_backgroundInfo?.gene_list[current_gene].name} (${current_gene})
Please input the following information for your gRNA for your selected gene.
+`,e+="",e+="
",$("#work").append(e)}else(gene_backgroundInfo===""||!gene_backgroundInfo||!backgroundInfo?.[0].gene_list[current_gene])&&alert("Error code lFS50-66 occurred. Please contact admin or TA!")}function isNumberOrDashKey(e){const n=e.which?e.which:e.keyCode;return!(n!==46&&n!==45&&n>31&&(n<48||n>57))}let MARgRNAseq=!1,MARgRNAseq_degree=0,MARPAMseq=!1,MARCutPos=!1,MARstrand=!1,MAROffTarget=!1,MAROffTarget_degree=0,MAROffTarget_aboveOpt=!1,MAROffTarget_above35=!1,MAROffTarget_onlyOption=!1,MARF1primers=!1,MARR1primers=!1,possible_comparable_answers=[],correctNucleotideIncluded=!1,true_counts=0,checkAnswers_executed=!1;function checkAnswers(){MARgRNAseq=!1,MARgRNAseq_degree=0,MARPAMseq=!1,MARCutPos=!1,MARstrand=!1,correctNucleotideIncluded=!1,true_counts=0;const e=gene_backgroundInfo.gene_list[current_gene]["Target position"]-1,n=document?.getElementById("sequence_input")?.value?.trim()||void 0;if(possible_comparable_answers=[],n)for(const t of benchling_gRNA_outputs.gene_list[current_gene])t.Sequence===n&&possible_comparable_answers.push(t);if(possible_comparable_answers.length>0)for(const t of possible_comparable_answers){if(true_counts=0,correctNucleotideIncluded=!1,t.Strand===1){const o=t.Position-1-1+3,a=t.Position-1-17;e>=a&&e<=o&&(correctNucleotideIncluded=!0)}else if(t.Strand===-1){const o=t.Position-1+17,a=t.Position-1-3;e>=a&&e<=o&&(correctNucleotideIncluded=!0)}if(correctNucleotideIncluded){let o,a;if(t.Strand===1?(o=t.Position-1+2,a=t.Position-1+4,document.getElementById("strand_input").value==="Sense (+)"&&(MARstrand=!0,true_counts+=1)):t.Strand===-1&&(o=t.Position-1-2,a=t.Position-1-4,document.getElementById("strand_input").value==="Antisense (-)"&&(MARstrand=!0,true_counts+=1)),e>=o&&e<=a?(MARgRNAseq=!1,MARgRNAseq_degree=0):e>=possible_comparable_answers[i].Position-1+1&&e<=possible_comparable_answers[i].Position-1+10||e<=possible_comparable_answers[i].Position-1-1&&e>=possible_comparable_answers[i].Position-1-10?(MARgRNAseq=!0,MARgRNAseq_degree=1,true_counts+=1):e>=possible_comparable_answers[i].Position-1&&e<=possible_comparable_answers[i].Position-1+20||e<=possible_comparable_answers[i].Position-1&&e>=possible_comparable_answers[i].Position-1-20?(MARgRNAseq=!0,MARgRNAseq_degree=2,true_counts+=1):(e>=possible_comparable_answers[i].Position-1&&e<=possible_comparable_answers[i].Position-1+30||e<=possible_comparable_answers[i].Position-1&&e>=possible_comparable_answers[i].Position-1-30)&&(MARgRNAseq=!0,MARgRNAseq_degree=3,true_counts+=1),MARgRNAseq){const r=element;r.Position&&parseInt(r.Position,10)===parseInt(document.getElementById("position_input").value,10)?(MARCutPos=!0,true_counts+=1):(r.Position===null||r.Position===void 0)&&alert("Error code cA302-307: retrieving server information on 'Position' answers occurred. Please contact admin or TA!"),(r.PAM||r.PAM)&&r.PAM===document.getElementById("pam_input").value.trim()?(MARPAMseq=!0,true_counts+=1):(r.PAM===null||r.PAM===void 0)&&alert("Error code cA311-317: retrieving server information on 'PAM' answers occurred. Please contact admin or TA!"),r["Specificity Score"]||r["Specificity Score"]?checkOffTarget(r["Specificity Score"]):(r["Specificity Score"]===null||r["Specificity Score"]===void 0)&&alert("Error code cA342-348: retrieving server information on 'Specificity Score' answers occurred. Please contact admin or TA!"),checkF1Primers(document?.getElementById("sequence_input")?.value?.trim()||""),checkR1Primers(document?.getElementById("sequence_input")?.value?.trim()||"")}}}checkAnswers_executed=!0}let offtarget_List=[],offtarget_dict={},offtarget_dictParse=[],offtarget_Use=[];function checkOffTarget(e){MAROffTarget=!1,MAROffTarget_degree=0,MAROffTarget_aboveOpt=!1,MAROffTarget_above35=!1,MAROffTarget_onlyOption=!1;const n=Math.floor(e),t=Math.ceil(e),o=parseInt(document.getElementById("offtarget_input").value,10);if(correctNucleotideIncluded&&MARgRNAseq&&o>=n&&o<=t&&(MAROffTarget=!0,true_counts+=1),MAROffTarget){const a=parseInt(document.getElementById("position_input").value,10)+35,r=parseInt(document.getElementById("position_input").value,10)-35;offtarget_List=[],offtarget_dict={},offtarget_dictParse=[],offtarget_Use=[];for(let s=0;s=r&&benchling_gRNA_outputs.gene_list[current_gene][s].Position<=a&&benchling_gRNA_outputs.gene_list[current_gene][s]["Specificity Score"]&&(offtarget_List.push(benchling_gRNA_outputs.gene_list[current_gene][s]["Specificity Score"]),offtarget_dict[s]=benchling_gRNA_outputs.gene_list[current_gene][s]["Specificity Score"],offtarget_dictParse.push(s));let c=!0;Math.max.apply(null,offtarget_List)<35&&(c=!1);const d=Math.max.apply(null,offtarget_List),u=getOffTargetOptimalValue(d);o>=u?(MAROffTarget_aboveOpt=!0,MAROffTarget_above35=!0,MAROffTarget_degree=1):o>=35?(MAROffTarget_above35=!0,Math.max.apply(null,offtarget_List)<80?MAROffTarget_degree=1:MAROffTarget_degree=2):c||(MAROffTarget_onlyOption=!0,MAROffTarget_degree=3)}}function getOffTargetOptimalValue(e){const n=e-e*.2;return n>80||n<35?80:n}let possible_F1_primers=[];function checkF1Primers(e){MARF1primers=!1,possible_F1_primers=[];const n="TAATACGACTCACTATAG";let t=!0;e[0]==="G"&&(t=!1);for(let o=16;o<=20;o+=1)possible_F1_primers.push(n+e.slice(0,o));if(!t)for(let o=16;o<=20;o+=1)possible_F1_primers.push(n+e.slice(1,o));possible_F1_primers.includes(document.getElementById("f1_input").value.trim())&&(MARF1primers=!0)}let possible_R1_primers=[];const complementary_nt_dict={A:"T",T:"A",C:"G",G:"C"};function checkR1Primers(e){MARR1primers=!1,possible_R1_primers=[];const n="TTCTAGCTCTAAAAC";let t="";for(const o of e)t=complementary_nt_dict[o]+t;for(let o=19;o<=20;o+=1)possible_R1_primers.push(n+t.slice(0,o));possible_R1_primers.includes(document.getElementById("r1_input").value.trim())&&(MARR1primers=!0)}function createComplementarySeq(e){let n="";for(const t of e)n=complementary_nt_dict[t]+n;return n}let studentMark=0,studentMarkPercentage=0;const markTotal=10;function markAnswers(){studentMark=0,checkAnswers_executed||checkAnswers(),checkAnswers_executed&&(MARgRNAseq&&(MARgRNAseq_degree===1?studentMark+=2:MARgRNAseq_degree===2?studentMark+=1:MARgRNAseq_degree===3&&(studentMark+=.5)),MARPAMseq&&(studentMark+=2),MAROffTarget&&(MAROffTarget_degree===1?studentMark+=2:MAROffTarget_degree===2?studentMark+=1:MAROffTarget_degree===3&&(studentMark+=.5)),MARF1primers&&(studentMark+=2),MARR1primers&&(studentMark+=2),studentMarkPercentage=(studentMark/markTotal*100).toFixed(2),studentMarkPercentage>100?studentMarkPercentage=100:studentMarkPercentage<0&&(studentMarkPercentage=0))}function showFeedback(){$("#mainContainer").empty();let e="
You would only receive feedback on your practice attempts and not your final assignments.
";e+="
The assignment itself is marked out of 10 marks with 2 marks for each input excluding gRNA strand direction, cut position and target region range (these three values are used to calculate if you have the right answer or not which means they are still crucial that they are still correct).
",e+="
The following is the breakdown of what marks you would have received and why you would have gotten them:
",e+=`
Mark: ${all_marks[0]}/10 (${all_marks[1]})
`;let n=0,t="Your gRNA sequence was wrong and not found in the Benchling gRNA outputs. Either you made a typo or this answer was not correct and did not contain the target cut site within an acceptable range.";MARgRNAseq&&(MARgRNAseq_degree===1?(n=2,t="This means your answer was correct and you received full marks."):MARgRNAseq_degree===2?(n=1,t="This means your sequence was partially correct as it contains the target sequence within a 20bp range but was not optimal. One mark."):MARgRNAseq_degree===3&&(n=.5,t="This means your sequence was not wrong (therefore was still correct) but there were better options out there. I recommend you try this practice assignment again. Still worth some marks though (half a mark)."));let o=0,a="Your PAM sequence was wrong and not found relative to your gRNA sequence. Either you made a typo or this answer was not correct. Either it contained the cut site within the PAM site or it was not an NGG or NAG PAM site (SciGrade only accepts either of those two PAM sites).";MARPAMseq&&(o=2,a="This means your answer was correct and you received full marks.");let r=0,c="Your off-target score was wrong. Either it was not above/within the optimal range (or above 35) or the last-resort option.";MAROffTarget&&(MAROffTarget_degree===1?(r=2,c="This means your answer was correct while above/within the optimal and you received full marks."):MAROffTarget_degree===2?(r=1,c="This means your answer was technically correct as its on-target value was above 35."):MAROffTarget_degree===3&&(r=.5,c="This means your answer was partially correct as it was found to be your only option is solely based on the target region range you selected."));let d=0,u="";for(let l=0;l",e+="
",e+="
",e+="",e+="
",e+="
",e+="
",e+="
",e+=`
For gRNA Strand Sequence, you put down "${all_answers[0]}" which gave you the mark ${n}.
`,e+=t,e+="
",e+="
",e+="",$("#mainContainer").append(e),e="
",e+="
",e+="
",e+="",e+="
",e+="
",e+="
",e+="
",e+=`
For gRNA PAM Sequence, you put down "${all_answers[1]}" which gave you the mark ${o}.
`,e+=a,e+="
",e+="
",e+="
",$("#mainContainer").append(e),e="
",e+="
",e+="
",e+="",e+="
",e+="
",e+="
",e+="
",e+=`
For Off-Target Score, you put down "${all_answers[4]}" which gave you the mark ${r}.
`,e+=c,e+="
",e+="
",e+="
",$("#mainContainer").append(e),e="
",e+="
",e+="
",e+="",e+="
",e+="
",e+="
",e+="
",e+=`
For F1 Primer, you put down "${all_answers[5]}" which gave you the mark ${d}.
`,e+=s,e+="
",e+="
",e+="
",$("#mainContainer").append(e),e="
",e+="
",e+="
",e+="",e+="
",e+="
",e+="
",e+="
",e+=`
For R1 Primer, you put down "${all_answers[6]}" which gave you the mark ${p}.
`,e+=m,e+="
",e+="
",e+="
",$("#mainContainer").append(e),e=" ",e+="
If at any point you wish to dispute marks, please contact your TA or professor once you completed your assignment. If you have found a bug in our SciGrade marking system, please contact your professor or our admin.
",e+=" ",e+='
',$("#mainContainer").append(e)}function showNewInput(e,n,t){document.getElementById(String(e)).value===String(n)?document.getElementById(String(t)).removeAttribute("hidden"):document.getElementById(String(t)).setAttribute("hidden",!0)}let completed_assignments=[],all_answers=[],all_outputs=[],all_marks=[];function submitAnswers(){all_answers=[],all_outputs=[],all_marks=[],checkAnswers(),setTimeout(()=>{markAnswers(),all_answers.push(document?.getElementById("sequence_input")?.value?.trim()||"",document.getElementById("pam_input").value.trim(),document.getElementById("position_input").value,document.getElementById("strand_input").value,document.getElementById("offtarget_input").value,document.getElementById("f1_input").value.trim(),document.getElementById("r1_input").value.trim()),all_outputs.push(MARstrand,MARgRNAseq,MARgRNAseq_degree,MARCutPos,MARPAMseq,MAROffTarget,MAROffTarget_degree,MAROffTarget_aboveOpt,MAROffTarget_above35,MAROffTarget_onlyOption,MARF1primers,MARR1primers),all_marks.push(studentMark,studentMarkPercentage),document.getElementById("options_label").innerHTML="Would you like to see feedback on your answers or start a new assignment?",document.getElementById("seeFeedback").removeAttribute("hidden"),showFeedback(),$("#feedbackButton").click()},750)}function IfPressEnter(e,n){(e.which===13||e.keyCode===13)&&$(`#${n}`).click()}function backToAssignments(){redirectCRISPR(),$("#practice").click()}$(()=>{$("form").submit(()=>!1)}),typeof module<"u"&&module.exports&&(module.exports={getOffTargetOptimalValue,isNumberOrDashKey,createComplementarySeq,checkOffTarget,checkF1Primers,checkR1Primers,fillGeneList,get MAROffTarget(){return MAROffTarget},get MAROffTarget_degree(){return MAROffTarget_degree},get MARF1primers(){return MARF1primers},get MARR1primers(){return MARR1primers},__setTestState(e={}){e.correctNucleotideIncluded!==void 0&&(correctNucleotideIncluded=e.correctNucleotideIncluded),e.MARgRNAseq!==void 0&&(MARgRNAseq=e.MARgRNAseq),e.benchling_gRNA_outputs!==void 0&&(benchling_gRNA_outputs=e.benchling_gRNA_outputs),e.current_gene!==void 0&&(current_gene=e.current_gene),e.gene_backgroundInfo!==void 0&&(gene_backgroundInfo=e.gene_backgroundInfo)},__resetState(){MAROffTarget=!1,MAROffTarget_degree=0,MARF1primers=!1,MARR1primers=!1,MAROffTarget_aboveOpt=!1,MAROffTarget_above35=!1,MAROffTarget_onlyOption=!1,correctNucleotideIncluded=!1,MARgRNAseq=!1}});
diff --git a/core/scripts/crispr_scripts.test.js b/core/scripts/crispr_scripts.test.js
index c564314..ff4325c 100644
--- a/core/scripts/crispr_scripts.test.js
+++ b/core/scripts/crispr_scripts.test.js
@@ -1,375 +1,405 @@
+const crispr = require("./crispr_scripts");
+const {
+ getOffTargetOptimalValue,
+ isNumberOrDashKey,
+ createComplementarySeq,
+ checkOffTarget,
+ checkF1Primers,
+ checkR1Primers,
+ fillGeneList,
+ __resetState: resetState,
+ __setTestState: setTestState,
+} = crispr;
+
describe("crispr_scripts.js - Utility Functions", () => {
- // Test the isNumberOrDashKey function without DOM dependencies
- describe("isNumberOrDashKey()", () => {
- // Define the function for testing
- const isNumberOrDashKey = (evt) => {
- const charCode = evt.which ? evt.which : evt.keyCode;
- return !(charCode !== 46 && charCode !== 45 && charCode > 31 && (charCode < 48 || charCode > 57));
+ // Setup mocks for DOM-dependent functions
+ let mockDocument;
+ let mockInput;
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+
+ // Mock DOM elements
+ mockInput = {
+ value: "",
+ trim: jest.fn(function () {
+ return this.value.trim();
+ }),
};
- it("should return true for number keys", () => {
- const event1 = { which: 48 }; // '0'
- const event2 = { which: 57 }; // '9'
- const event3 = { keyCode: 53 }; // '5'
-
- expect(isNumberOrDashKey(event1)).toBe(true);
- expect(isNumberOrDashKey(event2)).toBe(true);
- expect(isNumberOrDashKey(event3)).toBe(true);
- });
-
- it("should return true for dash key", () => {
- const event = { which: 45 }; // '-'
- expect(isNumberOrDashKey(event)).toBe(true);
- });
-
- it("should return true for period key", () => {
- const event = { which: 46 }; // '.'
- expect(isNumberOrDashKey(event)).toBe(true);
- });
-
- it("should return false for letter keys", () => {
- const event1 = { which: 65 }; // 'A'
- const event2 = { which: 90 }; // 'Z'
- const event3 = { which: 97 }; // 'a'
+ mockDocument = {
+ getElementById: jest.fn((id) => {
+ if (id === "offtarget_input") {
+ return { value: "75", trim: jest.fn(() => "75") };
+ } else if (id === "position_input") {
+ return { value: "100", trim: jest.fn(() => "100") };
+ } else if (id === "f1_input") {
+ return mockInput;
+ } else if (id === "r1_input") {
+ return mockInput;
+ }
+ return mockInput;
+ }),
+ };
- expect(isNumberOrDashKey(event1)).toBe(false);
- expect(isNumberOrDashKey(event2)).toBe(false);
- expect(isNumberOrDashKey(event3)).toBe(false);
- });
+ global.document = mockDocument;
+ // Setup global variables used by these functions
+ global.MAROffTarget = false;
+ global.MAROffTarget_degree = 0;
+ global.MAROffTarget_aboveOpt = false;
+ global.MAROffTarget_above35 = false;
+ global.MAROffTarget_onlyOption = false;
+ global.MARF1primers = false;
+ global.MARR1primers = false;
+ global.benchling_gRNA_outputs = {
+ gene_list: {
+ test_gene: [
+ { Position: 100, "Specificity Score": 85 },
+ { Position: 120, "Specificity Score": 75 },
+ ],
+ },
+ };
+ global.current_gene = "test_gene";
+ global.correctNucleotideIncluded = true;
+ global.MARgRNAseq = true;
+ });
- it("should return false for special characters", () => {
- const event1 = { which: 33 }; // '!'
- const event2 = { which: 64 }; // '@'
+ afterEach(() => {
+ jest.clearAllMocks();
+ delete global.document;
+ delete global.MAROffTarget;
+ delete global.MAROffTarget_degree;
+ delete global.MAROffTarget_aboveOpt;
+ delete global.MAROffTarget_above35;
+ delete global.MAROffTarget_onlyOption;
+ delete global.MARF1primers;
+ delete global.MARR1primers;
+ delete global.benchling_gRNA_outputs;
+ delete global.current_gene;
+ delete global.correctNucleotideIncluded;
+ delete global.MARgRNAseq;
+ });
- expect(isNumberOrDashKey(event1)).toBe(false);
- expect(isNumberOrDashKey(event2)).toBe(false);
+ describe("isNumberOrDashKey()", () => {
+ const cases = [
+ { name: "number key 0", input: { which: 48 }, want: true },
+ { name: "number key 9", input: { which: 57 }, want: true },
+ { name: "number key 5 (keyCode)", input: { keyCode: 53 }, want: true },
+ { name: "dash key", input: { which: 45 }, want: true },
+ { name: "period key", input: { which: 46 }, want: true },
+ { name: "letter A", input: { which: 65 }, want: false },
+ { name: "letter Z", input: { which: 90 }, want: false },
+ { name: "letter a", input: { which: 97 }, want: false },
+ { name: "special ! character", input: { which: 33 }, want: false },
+ { name: "special @ character", input: { which: 64 }, want: false },
+ ];
+
+ it.each(cases)("$name", ({ input, want }) => {
+ expect(isNumberOrDashKey(input)).toBe(want);
});
});
- // Test the createComplementarySeq function
describe("createComplementarySeq()", () => {
- const complementary_nt_dict = {
- A: "T",
- T: "A",
- C: "G",
- G: "C",
- };
-
- const createComplementarySeq = (seq) => {
- let comp_seq = "";
- for (const element of seq) {
- comp_seq = complementary_nt_dict[element] + comp_seq;
- }
- return comp_seq;
- };
-
- it("should create correct complementary sequence", () => {
- const sequence = "ATCG";
- const result = createComplementarySeq(sequence);
- expect(result).toBe("CGAT");
- });
-
- it("should handle longer sequences", () => {
- const sequence = "GCTCGTGACCACCCTGACCT";
- const result = createComplementarySeq(sequence);
- expect(result).toBe("AGGTCAGGGTGGTCACGAGC");
+ const cases = [
+ { name: "short sequence ATCG", input: "ATCG", want: "CGAT" },
+ { name: "longer sequence", input: "GCTCGTGACCACCCTGACCT", want: "AGGTCAGGGTGGTCACGAGC" },
+ { name: "empty sequence", input: "", want: "" },
+ { name: "single nucleotide A", input: "A", want: "T" },
+ { name: "single nucleotide T", input: "T", want: "A" },
+ { name: "single nucleotide C", input: "C", want: "G" },
+ { name: "single nucleotide G", input: "G", want: "C" },
+ ];
+
+ it.each(cases)("$name", ({ input, want }) => {
+ const result = createComplementarySeq(input);
+ expect(result).toBe(want);
});
+ });
- it("should handle empty sequence", () => {
- const sequence = "";
- const result = createComplementarySeq(sequence);
- expect(result).toBe("");
+ describe("getOffTargetOptimalValue()", () => {
+ const cases = [
+ {
+ name: "returns 80 when min optimal is below 35 threshold (input: 30)",
+ input: 30,
+ want: 80,
+ expectedType: "number",
+ },
+ {
+ name: "returns 80 when min optimal is below 35 threshold (input: 170)",
+ input: 170,
+ want: 80,
+ expectedType: "number",
+ },
+ {
+ name: "returns 80 when min optimal exceeds 80 threshold (input: 500)",
+ input: 500,
+ want: 80,
+ expectedType: "number",
+ },
+ {
+ name: "returns min optimal for typical range (input: 90)",
+ input: 90,
+ want: 72,
+ expectedType: "number",
+ },
+ {
+ name: "returns min optimal for typical range (input: 60)",
+ input: 60,
+ want: 48,
+ expectedType: "number",
+ },
+ {
+ name: "returns min optimal for typical range (input: 75)",
+ input: 75,
+ want: 60,
+ expectedType: "number",
+ },
+ {
+ name: "handles boundary case at 175 (minOptimal = 140, > 80)",
+ input: 175,
+ want: 80,
+ expectedType: "number",
+ },
+ {
+ name: "handles boundary case at 100 (minOptimal = 80, exactly at boundary)",
+ input: 100,
+ want: 80,
+ expectedType: "number",
+ },
+ {
+ name: "handles small positive value (input: 50)",
+ input: 50,
+ want: 40,
+ expectedType: "number",
+ },
+ ];
+
+ it.each(cases)("$name", ({ input, want, expectedType }) => {
+ const result = getOffTargetOptimalValue(input);
+ expect(result).toEqual(want);
+ expect(typeof result).toBe(expectedType);
});
- it("should handle single nucleotide", () => {
- expect(createComplementarySeq("A")).toBe("T");
- expect(createComplementarySeq("T")).toBe("A");
- expect(createComplementarySeq("C")).toBe("G");
- expect(createComplementarySeq("G")).toBe("C");
+ it("should not modify input parameter", () => {
+ const input = 90;
+ const inputCopy = input;
+ getOffTargetOptimalValue(input);
+ expect(input).toBe(inputCopy);
});
});
- // Test marking logic without DOM dependencies
- describe("markAnswers() logic", () => {
- const calculateMarks = (answers) => {
- let studentMark = 0;
- const {
- MARgRNAseq,
- MARgRNAseq_degree,
- MARPAMseq,
- MAROffTarget,
- MAROffTarget_degree,
- MARF1primers,
- MARR1primers,
- } = answers;
-
- if (MARgRNAseq) {
- if (MARgRNAseq_degree === 1) {
- studentMark += 2;
- } else if (MARgRNAseq_degree === 2) {
- studentMark += 1;
- } else if (MARgRNAseq_degree === 3) {
- studentMark += 0.5;
- }
- }
- if (MARPAMseq) {
- studentMark += 2;
- }
- if (MAROffTarget) {
- if (MAROffTarget_degree === 1) {
- studentMark += 2;
- } else if (MAROffTarget_degree === 2) {
- studentMark += 1;
- } else if (MAROffTarget_degree === 3) {
- studentMark += 0.5;
- }
- }
- if (MARF1primers) {
- studentMark += 2;
- }
- if (MARR1primers) {
- studentMark += 2;
- }
-
- const studentMarkPercentage = ((studentMark / 10) * 100).toFixed(2);
- return { studentMark, studentMarkPercentage };
- };
-
- it("should calculate full marks correctly", () => {
- const answers = {
+ describe("checkOffTarget()", () => {
+ beforeEach(() => {
+ resetState();
+ setTestState({
+ correctNucleotideIncluded: true,
MARgRNAseq: true,
- MARgRNAseq_degree: 1,
- MARPAMseq: true,
- MAROffTarget: true,
- MAROffTarget_degree: 1,
- MARF1primers: true,
- MARR1primers: true,
- };
-
- const result = calculateMarks(answers);
- expect(result.studentMark).toBe(10);
- expect(parseFloat(result.studentMarkPercentage)).toBe(100);
+ benchling_gRNA_outputs: {
+ gene_list: {
+ test_gene: [{ Position: 100, "Specificity Score": 85 }],
+ },
+ },
+ current_gene: "test_gene",
+ });
});
- it("should calculate partial marks correctly", () => {
- const answers = {
- MARgRNAseq: true,
- MARgRNAseq_degree: 2, // 1 mark
- MARPAMseq: true, // 2 marks
- MAROffTarget: false, // 0 marks
- MAROffTarget_degree: 0,
- MARF1primers: true, // 2 marks
- MARR1primers: false, // 0 marks
- };
-
- const result = calculateMarks(answers);
- expect(result.studentMark).toBe(5);
- expect(parseFloat(result.studentMarkPercentage)).toBe(50);
- });
+ it("sets MAROffTarget true when score matches input within bounds", () => {
+ global.document.getElementById = jest.fn((id) => {
+ if (id === "offtarget_input") return { value: "75" };
+ if (id === "position_input") return { value: "100" };
+ return { value: "" };
+ });
- it("should handle zero marks", () => {
- const answers = {
- MARgRNAseq: false,
- MARgRNAseq_degree: 0,
- MARPAMseq: false,
- MAROffTarget: false,
- MAROffTarget_degree: 0,
- MARF1primers: false,
- MARR1primers: false,
- };
-
- const result = calculateMarks(answers);
- expect(result.studentMark).toBe(0);
- expect(parseFloat(result.studentMarkPercentage)).toBe(0);
- });
+ checkOffTarget(75);
- it("should handle fractional marks", () => {
- const answers = {
- MARgRNAseq: true,
- MARgRNAseq_degree: 3, // 0.5 marks
- MARPAMseq: false,
- MAROffTarget: true,
- MAROffTarget_degree: 3, // 0.5 marks
- MARF1primers: false,
- MARR1primers: false,
- };
-
- const result = calculateMarks(answers);
- expect(result.studentMark).toBe(1);
- expect(parseFloat(result.studentMarkPercentage)).toBe(10);
+ expect(crispr.MAROffTarget).toBe(true);
});
- });
- // Test off-target scoring logic
- describe("checkOffTarget() logic", () => {
- const checkOffTargetScore = (score, inputValue, prerequisites) => {
- const { correctNucleotideIncluded, MARgRNAseq } = prerequisites;
- let MAROffTarget = false;
- let MAROffTarget_degree = 0;
- let MAROffTarget_aboveOpt = false;
- let MAROffTarget_above35 = false;
- let MAROffTarget_onlyOption = false;
-
- const OffTargetValue_down = Math.floor(score);
- const OffTargetValue_up = Math.ceil(score);
-
- if (correctNucleotideIncluded && MARgRNAseq) {
- if (inputValue >= OffTargetValue_down && inputValue <= OffTargetValue_up) {
- MAROffTarget = true;
- if (score >= 75) {
- MAROffTarget_degree = 1;
- MAROffTarget_aboveOpt = true;
- } else if (score >= 35) {
- MAROffTarget_degree = 2;
- MAROffTarget_above35 = true;
- } else {
- MAROffTarget_degree = 3;
- MAROffTarget_onlyOption = true;
- }
- }
- }
-
- return {
- MAROffTarget,
- MAROffTarget_degree,
- MAROffTarget_aboveOpt,
- MAROffTarget_above35,
- MAROffTarget_onlyOption,
- };
- };
-
- it("should set correct off-target marking for high score", () => {
- const result = checkOffTargetScore(85, 85, {
- correctNucleotideIncluded: true,
- MARgRNAseq: true,
+ it("sets MAROffTarget degree 1 for score >= 75", () => {
+ global.document.getElementById = jest.fn((id) => {
+ if (id === "offtarget_input") return { value: "85" };
+ if (id === "position_input") return { value: "100" };
+ return { value: "" };
});
- expect(result.MAROffTarget).toBe(true);
- expect(result.MAROffTarget_degree).toBe(1);
- expect(result.MAROffTarget_aboveOpt).toBe(true);
+ checkOffTarget(85);
+
+ expect(crispr.MAROffTarget).toBe(true);
+ expect(crispr.MAROffTarget_degree).toBe(1);
});
- it("should set correct off-target marking for medium score", () => {
- const result = checkOffTargetScore(50, 50, {
- correctNucleotideIncluded: true,
- MARgRNAseq: true,
+ it("sets MAROffTarget degree 2 for score 35-75", () => {
+ global.document.getElementById = jest.fn((id) => {
+ if (id === "offtarget_input") return { value: "50" };
+ if (id === "position_input") return { value: "100" };
+ return { value: "" };
});
- expect(result.MAROffTarget).toBe(true);
- expect(result.MAROffTarget_degree).toBe(2);
- expect(result.MAROffTarget_above35).toBe(true);
+ checkOffTarget(50);
+
+ expect(crispr.MAROffTarget).toBe(true);
+ expect(crispr.MAROffTarget_degree).toBe(2);
});
- it("should set correct off-target marking for low score", () => {
- const result = checkOffTargetScore(25, 25, {
- correctNucleotideIncluded: true,
- MARgRNAseq: true,
- });
+ it("should not set MAROffTarget when prerequisites not met", () => {
+ global.correctNucleotideIncluded = false;
+ global.MARgRNAseq = false;
- expect(result.MAROffTarget).toBe(true);
- expect(result.MAROffTarget_degree).toBe(3);
- expect(result.MAROffTarget_onlyOption).toBe(true);
+ checkOffTarget(75);
+
+ expect(global.MAROffTarget).toBe(false);
+ expect(global.MAROffTarget_degree).toBe(0);
});
+ });
- it("should not set off-target marking when prerequisites not met", () => {
- const result = checkOffTargetScore(85, 85, {
- correctNucleotideIncluded: false,
- MARgRNAseq: false,
+ describe("checkF1Primers()", () => {
+ beforeEach(() => {
+ resetState();
+ });
+
+ it("validates F1 primer for sequence starting with G", () => {
+ const seq = "GCTCGTGACCACCCTGACCT";
+ global.document.getElementById = jest.fn((id) => {
+ if (id === "f1_input") {
+ return {
+ value: "TAATACGACTCACTATAGGCTCGTGACCACCCTG",
+ trim: jest.fn(function () {
+ return this.value;
+ }),
+ };
+ }
+ return { value: "", trim: jest.fn(() => "") };
});
- expect(result.MAROffTarget).toBe(false);
- expect(result.MAROffTarget_degree).toBe(0);
+ checkF1Primers(seq);
+
+ expect(crispr.MARF1primers).toBe(true);
});
- it("should handle decimal scores correctly", () => {
- const result = checkOffTargetScore(85.7, 85, {
- correctNucleotideIncluded: true,
- MARgRNAseq: true,
+ it("rejects incorrect F1 primer", () => {
+ const seq = "GCTCGTGACCACCCTGACCT";
+ global.document.getElementById = jest.fn((id) => {
+ if (id === "f1_input") {
+ return {
+ value: "WRONGPRIMER",
+ trim: jest.fn(function () {
+ return this.value;
+ }),
+ };
+ }
+ return { value: "", trim: jest.fn(() => "") };
});
- expect(result.MAROffTarget).toBe(true);
- expect(result.MAROffTarget_degree).toBe(1);
+ checkF1Primers(seq);
+
+ expect(crispr.MARF1primers).toBe(false);
});
- });
- // Test primer generation logic
- describe("F1 Primer generation logic", () => {
- const generateF1Primers = (seq) => {
- const possible_F1_primers = [];
- const begin_F1 = "TAATACGACTCACTATAG";
- let count_First = true;
- if (seq[0] === "G") {
- count_First = false;
- }
- for (let i = 16; i <= 20; i += 1) {
- possible_F1_primers.push(begin_F1 + seq.slice(0, i));
- }
- if (!count_First) {
- for (let i = 16; i <= 20; i += 1) {
- possible_F1_primers.push(begin_F1 + seq.slice(1, i));
+ it("accepts valid F1 primer within range", () => {
+ const seq = "ATCGATCGATCG";
+ global.document.getElementById = jest.fn((id) => {
+ if (id === "f1_input") {
+ return {
+ value: "TAATACGACTCACTATAGATCGATCGATCG",
+ trim: jest.fn(function () {
+ return this.value;
+ }),
+ };
}
- }
- return possible_F1_primers;
- };
+ return { value: "", trim: jest.fn(() => "") };
+ });
- const validateF1Primer = (seq, inputPrimer) => {
- const possiblePrimers = generateF1Primers(seq);
- return possiblePrimers.includes(inputPrimer);
- };
+ checkF1Primers(seq);
- it("should generate correct F1 primers for sequence starting with G", () => {
- const sequence = "GCTCGTGACCACCCTGACCT";
- const primers = generateF1Primers(sequence);
+ expect(crispr.MARF1primers).toBe(true);
+ });
+ });
- expect(primers.length).toBeGreaterThan(5);
- expect(primers[0]).toBe("TAATACGACTCACTATAGGCTCGTGACCACCCTG");
+ describe("checkR1Primers()", () => {
+ beforeEach(() => {
+ resetState();
});
- it("should validate correct F1 primer", () => {
- const sequence = "GCTCGTGACCACCCTGACCT";
- const primer = "TAATACGACTCACTATAGCTCGTGACCACCCTGA";
+ it("validates R1 primer for complementary sequence", () => {
+ const seq = "ATCGATCG";
+ global.document.getElementById = jest.fn((id) => {
+ if (id === "r1_input") {
+ return {
+ value: "TTCTAGCTCTAAAACCGATCGAT",
+ trim: jest.fn(function () {
+ return this.value;
+ }),
+ };
+ }
+ return { value: "", trim: jest.fn(() => "") };
+ });
+
+ checkR1Primers(seq);
- expect(validateF1Primer(sequence, primer)).toBe(true);
+ expect(crispr.MARR1primers).toBe(true);
});
- it("should reject incorrect F1 primer", () => {
- const sequence = "GCTCGTGACCACCCTGACCT";
- const primer = "WRONGPRIMER";
+ it("rejects incorrect R1 primer", () => {
+ const seq = "ATCGATCG";
+ global.document.getElementById = jest.fn((id) => {
+ if (id === "r1_input") {
+ return {
+ value: "WRONGPRIMER",
+ trim: jest.fn(function () {
+ return this.value;
+ }),
+ };
+ }
+ return { value: "", trim: jest.fn(() => "") };
+ });
- expect(validateF1Primer(sequence, primer)).toBe(false);
+ checkR1Primers(seq);
+
+ expect(crispr.MARR1primers).toBe(false);
});
});
- // Test gene list functionality
- describe("Gene list functionality", () => {
- const fillGeneList = (gene_backgroundInfo) => {
- if (gene_backgroundInfo?.gene_list) {
- return Object.keys(gene_backgroundInfo.gene_list);
- }
- return [];
- };
+ describe("fillGeneList()", () => {
+ beforeEach(() => {
+ resetState();
+ // Setup jQuery mock
+ global.$ = jest.fn((selector) => {
+ return {
+ empty: jest.fn(() => global.$returnValue),
+ append: jest.fn(() => global.$returnValue),
+ };
+ });
+ global.$returnValue = undefined;
+ });
- it("should return gene list when background info exists", () => {
- const backgroundInfo = {
- gene_list: {
- eBFP: { "Target position": 100 },
- ACTN3: { "Target position": 200 },
+ it("populates gene dropdown with genes from background info", () => {
+ setTestState({
+ gene_backgroundInfo: {
+ gene_list: {
+ eBFP: { "Target position": 100 },
+ ACTN3: { "Target position": 200 },
+ },
},
- };
+ });
+
+ fillGeneList();
- const result = fillGeneList(backgroundInfo);
- expect(result).toEqual(["eBFP", "ACTN3"]);
+ expect(global.$).toHaveBeenCalledWith("#gene_dropdown_selection");
+ const calls = global.$.mock.results;
+ const emptyCall = calls.find((c) => c.value.empty);
+ expect(emptyCall).toBeDefined();
});
- it("should return empty array when no background info", () => {
- const result = fillGeneList(null);
- expect(result).toEqual([]);
+ it("does nothing when no background info", () => {
+ setTestState({ gene_backgroundInfo: null });
+ fillGeneList();
+ expect(global.$).not.toHaveBeenCalled();
});
- it("should return empty array when gene_list is undefined", () => {
- const backgroundInfo = {};
- const result = fillGeneList(backgroundInfo);
- expect(result).toEqual([]);
+ it("does nothing when gene_list is undefined", () => {
+ setTestState({ gene_backgroundInfo: {} });
+ fillGeneList();
+ expect(global.$).not.toHaveBeenCalled();
});
});
});
diff --git a/core/scripts/login.js b/core/scripts/login.js
deleted file mode 100644
index be716f9..0000000
--- a/core/scripts/login.js
+++ /dev/null
@@ -1,272 +0,0 @@
-//= ================================ SciGrade ==================================
-//
-// Purpose: Login and registration for SciGrade
-//
-//= ============================================================================
-
-let student_reg_information;
-
-/** Let users continue with practice application without logging in (default true) */
-let continueWithoutLogin = true;
-
-let checkStudentNum = false;
-let studentNumber = 0;
-let studentUmail;
-let alreadyRegistered = false;
-let classRegister;
-
-/**
- * Checks whether a student number and email match the class roster.
- * @param {number} student_num Student number
- * @param {string} student_umail Student email/uMail
- */
-function checkStudentNumber(student_num, student_umail) {
- alreadyRegistered = false;
- checkStudentNum = false;
- let maxNum = 0;
- const classList = student_reg_information?.[0]?.class_list;
- if (classList) {
- for (const key in classList) {
- if (
- student_reg_information[0].student_list !== null &&
- student_reg_information[0].student_list.length > 0
- ) {
- for (const student of student_reg_information[0].student_list) {
- if (student.student_number === student_num && student.studentClass === key) {
- alreadyRegistered = true;
- }
- }
- }
- }
- }
-
- if (!alreadyRegistered) {
- for (const key in classList) {
- if (classList[key][student_num] === student_umail) {
- checkStudentNum = true;
- studentNumber = student_num;
- studentUmail = student_umail;
- studentParseNum = i;
- classRegister = key;
- break;
- } else {
- maxNum += 1;
- }
- }
- }
- if (checkStudentNum) {
- addSecondSection();
- } else if (alreadyRegistered) {
- showRegError(4);
- } else if (!checkStudentNum && maxNum === student_reg_information?.[0]?.student_list.length) {
- showRegError(1);
- } else if (!checkStudentNum) {
- showRegError(2);
- }
-}
-
-/**
- * Checks whether a student number exists in the registration list.
- * @param {number} student_NumVerify - Student number
- */
-function loginVerify(student_NumVerify) {
- alreadyRegistered = false;
- let maxNum = 0;
- checkStudentNum = false;
-
- if (student_reg_information?.[0]?.student_list && student_reg_information[0].student_list.length > 0) {
- for (let i = 0; i < student_reg_information[0].student_list.length; i += 1) {
- if (student_reg_information[0].student_list[i].student_number === student_NumVerify) {
- if (student_reg_information[0].student_list[i].gmail !== "unregistered") {
- alreadyRegistered = true;
- checkStudentNum = true;
- studentNumber = student_NumVerify;
- studentParseNum = i;
- } else if (student_reg_information[0].student_list[i].gmail === "unregistered") {
- alreadyRegistered = false;
- }
- } else {
- maxNum += 1;
- }
- }
- }
-
- if (alreadyRegistered && checkStudentNum) {
- $("#loginForm").empty();
- document.getElementById("loginP2").style.display = "block";
- } else if (!alreadyRegistered) {
- showRegError(5);
- } else if (maxNum === student_reg_information[0].student_list.length) {
- showRegError(1);
- }
-}
-
-/**
- * Shows a registration error message by code.
- * @param {number} whichOne - Error code to display
- */
-function showRegError(whichOne) {
- if (whichOne === 1) {
- // Not in our database
- document.getElementById("errorRegContent").innerHTML =
- "It appears that you are not a student in our database.\n Are you a UofT student? If so, contact your TA, Professor or Admin for further help.";
- $("#errorRegButton").click();
- } else if (whichOne === 2) {
- // Something went wrong with registration
- document.getElementById("errorRegContent").innerHTML =
- "Something went wrong. Please refresh the page and try again. If this persists, please contact your TA, Professor or Admin with the following error code: lgn83-85";
- $("#errorRegButton").click();
- } else if (whichOne === 3) {
- // Verify ID was incorrect
- document.getElementById("errorRegContent").innerHTML =
- "It appears that your verification ID is incorrect. Please retype it and try again. If this persists, contact your TA, Professor or Admin for further help. NOTE: Only students of HMB311 can register for SciGrade.";
- $("#errorRegButton").click();
- } else if (whichOne === 4) {
- // Verify ID was incorrect
- document.getElementById("errorRegContent").innerHTML =
- "You are already registered for SciGrade, please navigate to the login tab instead of the register. If an issue arises, please contact your TA, Professor or Admin for further help.";
- $("#errorRegButton").click();
- } else if (whichOne === 5) {
- // Not yet registered for SciGrade
- document.getElementById("errorRegContent").innerHTML =
- "It appears that you have not yet registered for SciGrade, please navigate to the register tab and register first. If an issue arises, please contact your TA, Professor or Admin for further help.";
- $("#errorRegButton").click();
- } else if (whichOne === 6) {
- // Not yet registered for SciGrade
- document.getElementById("errorRegContent").innerHTML =
- "This is not the Google account associated with this student number. If an issue arises, please contact your TA, Professor or Admin for further help.";
- $("#errorRegButton").click();
- } else if (whichOne === 7) {
- // Restricted access to only TA's and Admins'
- document.getElementById("errorRegContent").innerHTML =
- "This feature is restricted to only TA's and admins. You do not have access. Please contact a TA or admin for access.";
- $("#errorRegButton").click();
- } else if (whichOne === 8) {
- // Unequal amount of student numbers and student emails
- document.getElementById("errorRegContent").innerHTML =
- "There is an unequal amount of student numbers and student uMails, please correct this to proceed";
- $("#errorRegButton").click();
- }
-}
-
-/**
- * Adds the verification student section to the login page
- */
-function addSecondSection() {
- $("#pP1").empty();
- $("#registerP1").empty();
- document.getElementById("pP3").innerHTML =
- "Next, you will login through Google to register for SciGrade. This way you will never need to remember a username or password. Please click the button below to complete your registration.";
- document.getElementById("registerP3").style.display = "block";
-}
-
-/**
- * Signs the user out and returns screen back to login/register display
- */
-function signOutDisplay() {
- if (document.getElementById("accountIO")) {
- document.getElementById("accountIO").setAttribute("hidden", true);
- }
-
- if (document.getElementById("logIO")) {
- document.getElementById("logIO").setAttribute("hidden", true);
- document.getElementById("logIO").innerHTML = `${changeLogin} Login`;
- document.getElementById("logIO").setAttribute("onclick");
- }
-
- $("#mainContainer").empty();
-
- let append_str;
- append_str = "
Use this function to call and load the gene in the gene dropdown
+ * loadGeneContent()
+ * // returns null (does not return anything but loads the gene content on the web app)
+ */
+function loadGeneContent() {
+ checkAnswers_executed = false;
+ possible_gene = document.getElementById("gene_dropdown_selection").value;
+ select_Gene();
+}
+
+/** Builds the selection UI and loads the reference data for the runtime page. */
+async function redirectCRISPR() {
+ $("#mainContainer").empty();
+ let append_str;
+ append_str = `
+
+
+
+
+
+
Please select the dry lab mode you would like to use:
Please select the dry lab mode you would like to use:
+
+
+
+ Please select your gene:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `,$("#mainContainer").append(e),await loadCRISPRJSON_Files(),fillGeneList()}typeof module<"u"&&module.exports&&(module.exports={loadGeneContent,redirectCRISPR});
diff --git a/core/scripts/runtime.test.js b/core/scripts/runtime.test.js
new file mode 100644
index 0000000..f55172b
--- /dev/null
+++ b/core/scripts/runtime.test.js
@@ -0,0 +1,199 @@
+const { loadGeneContent, redirectCRISPR } = require("./runtime");
+
+describe("runtime.js - Runtime Flow Helpers", () => {
+ let mockDocument;
+ let mockElement;
+ let mockJQuery;
+ let jQueryMock;
+
+ beforeEach(() => {
+ // Clear any existing mocks
+ jest.clearAllMocks();
+
+ // Mock DOM elements
+ mockElement = {
+ value: "",
+ id: "gene_dropdown_selection",
+ };
+
+ mockDocument = {
+ getElementById: jest.fn(() => mockElement),
+ };
+
+ mockJQuery = {
+ empty: jest.fn(function () {
+ return this;
+ }),
+ append: jest.fn(function () {
+ return this;
+ }),
+ };
+
+ // Create jQuery mock function
+ jQueryMock = jest.fn(() => mockJQuery);
+ jQueryMock.mockClear = jest.fn();
+
+ // Set up globals
+ global.document = mockDocument;
+ global.$ = jQueryMock;
+ global.checkAnswers_executed = true;
+ global.possible_gene = "";
+ global.select_Gene = jest.fn();
+ global.loadCRISPRJSON_Files = jest.fn(async () => {});
+ global.fillGeneList = jest.fn();
+ });
+
+ afterEach(() => {
+ jest.clearAllMocks();
+ delete global.document;
+ delete global.$;
+ delete global.checkAnswers_executed;
+ delete global.possible_gene;
+ delete global.select_Gene;
+ delete global.loadCRISPRJSON_Files;
+ delete global.fillGeneList;
+ });
+
+ describe("loadGeneContent()", () => {
+ const cases = [
+ {
+ name: "loads eBFP gene and resets flags",
+ geneValue: "eBFP",
+ expectedGeneValue: "eBFP",
+ expectedReset: true,
+ },
+ {
+ name: "loads ACTN3 gene and resets flags",
+ geneValue: "ACTN3",
+ expectedGeneValue: "ACTN3",
+ expectedReset: true,
+ },
+ {
+ name: "loads CCR5 gene and resets flags",
+ geneValue: "CCR5",
+ expectedGeneValue: "CCR5",
+ expectedReset: true,
+ },
+ {
+ name: "handles empty selection gracefully",
+ geneValue: "",
+ expectedGeneValue: "",
+ expectedReset: true,
+ },
+ ];
+
+ it.each(cases)("$name", async ({ geneValue, expectedGeneValue, expectedReset }) => {
+ // Setup
+ mockElement.value = geneValue;
+ global.checkAnswers_executed = true;
+ global.document.getElementById.mockReturnValue(mockElement);
+
+ // Execute the ACTUAL imported function
+ await loadGeneContent();
+
+ // Verify
+ expect(global.possible_gene).toBe(expectedGeneValue);
+ if (expectedReset) {
+ expect(global.checkAnswers_executed).toBe(false);
+ }
+ expect(global.select_Gene).toHaveBeenCalled();
+ expect(global.document.getElementById).toHaveBeenCalledWith("gene_dropdown_selection");
+ });
+
+ it("triggers select_Gene callback with correct context", () => {
+ mockElement.value = "HBB";
+ global.document.getElementById.mockReturnValue(mockElement);
+
+ // Execute the ACTUAL imported function
+ loadGeneContent();
+
+ expect(global.select_Gene).toHaveBeenCalledTimes(1);
+ expect(global.possible_gene).toBe("HBB");
+ });
+ });
+
+ describe("redirectCRISPR()", () => {
+ const cases = [
+ {
+ name: "clears and repopulates main container",
+ },
+ {
+ name: "calls loadCRISPRJSON_Files before fillGeneList",
+ },
+ ];
+
+ it.each(cases)("$name", async ({ name }) => {
+ // Execute the ACTUAL imported function
+ await redirectCRISPR();
+
+ // Verify
+ expect(mockJQuery.empty).toHaveBeenCalled();
+ expect(global.loadCRISPRJSON_Files).toHaveBeenCalledTimes(1);
+ expect(global.fillGeneList).toHaveBeenCalledTimes(1);
+ });
+
+ it("ensures DOM elements are properly cleared before population", async () => {
+ // Execute the ACTUAL imported function
+ await redirectCRISPR();
+
+ expect(mockJQuery.empty).toHaveBeenCalled();
+ expect(mockJQuery.append).toHaveBeenCalled();
+ });
+
+ it("handles asynchronous JSON loading completion", async () => {
+ let jsonLoaded = false;
+ global.loadCRISPRJSON_Files = jest.fn(async () => {
+ jsonLoaded = true;
+ });
+
+ expect(jsonLoaded).toBe(false);
+ await redirectCRISPR();
+ expect(jsonLoaded).toBe(true);
+ });
+
+ it("executes jQuery operations in correct sequence", async () => {
+ const executionSequence = [];
+
+ mockJQuery.empty = jest.fn(() => {
+ executionSequence.push("empty");
+ return mockJQuery;
+ });
+
+ mockJQuery.append = jest.fn(() => {
+ executionSequence.push("append");
+ return mockJQuery;
+ });
+
+ global.loadCRISPRJSON_Files = jest.fn(async () => {
+ executionSequence.push("loadCRISPRJSON_Files");
+ });
+
+ global.fillGeneList = jest.fn(() => {
+ executionSequence.push("fillGeneList");
+ });
+
+ await redirectCRISPR();
+
+ expect(executionSequence).toEqual(["empty", "append", "loadCRISPRJSON_Files", "fillGeneList"]);
+ });
+ });
+
+ describe("Integration: Runtime flow initialization", () => {
+ it("properly initializes runtime flow when both functions are called", async () => {
+ mockElement.value = "APOE";
+ global.checkAnswers_executed = true;
+ global.document.getElementById.mockReturnValue(mockElement);
+
+ // Execute ACTUAL imported functions
+ await redirectCRISPR();
+ loadGeneContent();
+
+ // Verify complete state
+ expect(global.possible_gene).toBe("APOE");
+ expect(global.checkAnswers_executed).toBe(false);
+ expect(mockJQuery.empty).toHaveBeenCalled();
+ expect(global.loadCRISPRJSON_Files).toHaveBeenCalled();
+ expect(global.fillGeneList).toHaveBeenCalled();
+ });
+ });
+});
diff --git a/core/scripts/serviceWorker/sw.js b/core/scripts/serviceWorker/sw.js
index f8158ae..4006668 100644
--- a/core/scripts/serviceWorker/sw.js
+++ b/core/scripts/serviceWorker/sw.js
@@ -1,2 +1,2 @@
-if(!self.define){let e,r={};const c=(c,o)=>(c=new URL(c+".js",o).href,r[c]||new Promise((r=>{if("document"in self){const e=document.createElement("script");e.src=c,e.onload=r,document.head.appendChild(e);}else e=c,importScripts(c),r();})).then((()=>{let e=r[c];if(!e)throw new Error(`Module ${c} didn’t register its module`);return e;})));self.define=(o,i)=>{const a=e||("document"in self?document.currentScript.src:"")||location.href;if(r[a])return;let s={};const n=e=>c(e,a),d={module:{uri:a},exports:s,require:n};r[a]=Promise.all(o.map((e=>d[e]||n(e)))).then((e=>(i(...e),s)));};}define(["./workbox-d365970e"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting();})),e.precacheAndRoute([{url:"../../../core/data/ACTN3/ACTN3.fasta",revision:"93e810b1ce0401a46e96ceaba5687a8f"},{url:"../../../core/data/ACTN3/Benchling_gRNA_Outputs.xlsx",revision:"9d9a05ae5858671f89b87ae185b4917b"},{url:"../../../core/data/APOE/APOE.fasta",revision:"483718a3f932ba66a063811986c9ff94"},{url:"../../../core/data/APOE/Benchling_gRNA_Outputs.xlsx",revision:"d728b00ab3559732abc114c43893ba7e"},{url:"../../../core/data/Background_info/gene_background_info.json",revision:"c949b514552cc7e229ae001f1fc2558f"},{url:"../../../core/data/Benchling_gRNA_Outputs.json",revision:"f16f964789ca6909ec2bbd40afc4a081"},{url:"../../../core/data/CCR5/Benchling_gRNA_Outputs.xlsx",revision:"d204b7de85c0def6a40789a3104dd975"},{url:"../../../core/data/CCR5/CCR5.fasta",revision:"312805e16f0bbaa7378ace3ab275d1b5"},{url:"../../../core/data/eBFP/Benchling_gRNA_outputs.xlsx",revision:"cb29f7f64c8c0f44cfe58c3504af0d2b"},{url:"../../../core/data/eBFP/eBFP.fasta",revision:"3a891a57f27b8180825de1a70974e0ad"},{url:"../../../core/data/HBB/Benchling_gRNA_Outputs.xlsx",revision:"571ef05c0a5fc985423f08ab13e3fc71"},{url:"../../../core/data/HBB/HBB.fasta",revision:"369111a8a700d52e494b75cffef452f9"},{url:"../../../core/icon/android-chrome-144x144.png",revision:"859cb36c4d6354a1d76e8d9692fdd88d"},{url:"../../../core/icon/android-chrome-192x192.png",revision:"f94fc51b10052dcc8f91e04945a618b8"},{url:"../../../core/icon/android-chrome-256x256.png",revision:"d80b94ad67334b9560e3cefaf8b04677"},{url:"../../../core/icon/android-chrome-36x36.png",revision:"c3603b9735bb8397b0ac5351da9e94ed"},{url:"../../../core/icon/android-chrome-384x384.png",revision:"45ea1a83b4d26a9224844344602ad69e"},{url:"../../../core/icon/android-chrome-48x48.png",revision:"7ac44965ab502f17205e2d048d3e1580"},{url:"../../../core/icon/android-chrome-512x512.png",revision:"d5a6869fb6a0d95e1c1398de5aac2278"},{url:"../../../core/icon/android-chrome-72x72.png",revision:"a2b1197f79059981d8a19ba65ce73e6d"},{url:"../../../core/icon/android-chrome-96x96.png",revision:"497e53074c189be631a8368192870f02"},{url:"../../../core/icon/apple-touch-icon-114x114-precomposed.png",revision:"7b0f0af98c190974af01f605b117fc18"},{url:"../../../core/icon/apple-touch-icon-114x114.png",revision:"7b0f0af98c190974af01f605b117fc18"},{url:"../../../core/icon/apple-touch-icon-120x120-precomposed.png",revision:"c61a5acca54b104d7fe15fbc473796b5"},{url:"../../../core/icon/apple-touch-icon-120x120.png",revision:"c61a5acca54b104d7fe15fbc473796b5"},{url:"../../../core/icon/apple-touch-icon-144x144-precomposed.png",revision:"52d597709f2268268fd4063d34bd0ce7"},{url:"../../../core/icon/apple-touch-icon-144x144.png",revision:"52d597709f2268268fd4063d34bd0ce7"},{url:"../../../core/icon/apple-touch-icon-152x152-precomposed.png",revision:"8d46a8911ef72a562c97570d452f83ac"},{url:"../../../core/icon/apple-touch-icon-152x152.png",revision:"8d46a8911ef72a562c97570d452f83ac"},{url:"../../../core/icon/apple-touch-icon-180x180-precomposed.png",revision:"ced32ca13a0c404c96fc081dca7473eb"},{url:"../../../core/icon/apple-touch-icon-180x180.png",revision:"ced32ca13a0c404c96fc081dca7473eb"},{url:"../../../core/icon/apple-touch-icon-57x57-precomposed.png",revision:"b3e1d7fc553b33f086791c138d69bba1"},{url:"../../../core/icon/apple-touch-icon-57x57.png",revision:"b3e1d7fc553b33f086791c138d69bba1"},{url:"../../../core/icon/apple-touch-icon-60x60-precomposed.png",revision:"37be5e105d7a21fc8f3c437508dca233"},{url:"../../../core/icon/apple-touch-icon-60x60.png",revision:"37be5e105d7a21fc8f3c437508dca233"},{url:"../../../core/icon/apple-touch-icon-72x72-precomposed.png",revision:"819a43b6e5dc4991e399ff9b5d9b34b3"},{url:"../../../core/icon/apple-touch-icon-72x72.png",revision:"819a43b6e5dc4991e399ff9b5d9b34b3"},{url:"../../../core/icon/apple-touch-icon-76x76-precomposed.png",revision:"448377ba1760c41142b83ffd0fa47163"},{url:"../../../core/icon/apple-touch-icon-76x76.png",revision:"448377ba1760c41142b83ffd0fa47163"},{url:"../../../core/icon/apple-touch-icon-precomposed.png",revision:"ced32ca13a0c404c96fc081dca7473eb"},{url:"../../../core/icon/apple-touch-icon.png",revision:"ced32ca13a0c404c96fc081dca7473eb"},{url:"../../../core/icon/favicon-16x16.png",revision:"f9e844d671e8e4b80174f643fe4dcf56"},{url:"../../../core/icon/favicon-32x32.png",revision:"a6296dcec5e5a6449807f753d885507d"},{url:"../../../core/icon/favicon.ico",revision:"ea57adfd4a62355e9f4c2b46ef21600f"},{url:"../../../core/icon/manifest.json",revision:"dd34856295abeac04c8578a56413e5ca"},{url:"../../../core/icon/maskable_icon_x128.png",revision:"cf5ea1b4cd68730505d36d59d3c8b04d"},{url:"../../../core/icon/maskable_icon_x192.png",revision:"bd977cf9153d6ebb3e8d8f79b4f100b6"},{url:"../../../core/icon/maskable_icon_x384.png",revision:"83527cdabf00617fb5b56df08a08b2a3"},{url:"../../../core/icon/maskable_icon_x48.png",revision:"c521515543d0ccc88a843690484dfefe"},{url:"../../../core/icon/maskable_icon_x512.png",revision:"499293f67750aa3b60815cb50d8e3b72"},{url:"../../../core/icon/maskable_icon_x72.png",revision:"0603508e30979836bd82b2d95dc0b1f4"},{url:"../../../core/icon/maskable_icon_x96.png",revision:"5269c50f0761a8aa50ae7201c28760c6"},{url:"../../../core/icon/maskable_icon.png",revision:"94a300afab67912c4aa267989a725155"},{url:"../../../core/icon/mstile-144x144.png",revision:"52d597709f2268268fd4063d34bd0ce7"},{url:"../../../core/icon/mstile-150x150.png",revision:"4a6b569778e6b9d81aaee10df7c65284"},{url:"../../../core/icon/mstile-310x150.png",revision:"7555e1760cd643b25105bfe4114eedfd"},{url:"../../../core/icon/mstile-310x310.png",revision:"39af54c06ac44ebe9312f682ddd3602c"},{url:"../../../core/icon/mstile-70x70.png",revision:"b2902f78c5c0344f8a0558a8f36b97bf"},{url:"../../../core/icon/resoc.png",revision:"4b94395e0972a350b0727a20e3d06baa"},{url:"../../../core/icon/safari-pinned-tab.svg",revision:"3a6f655958b21d384ae3dad886960d93"},{url:"../../../core/icon/screenshot1.webp",revision:"426fd7165422ee95968d181411229d95"},{url:"../../../core/icon/screenshot2.webp",revision:"87d56bb07395695fda9e04a30caf1672"},{url:"../../../core/icon/screenshot3.webp",revision:"19ef6219d8f3ba14ebf25b72e07240d8"},{url:"../../../core/images/BackgroundImage/grey.webp",revision:"44f3357b5a1f4d29ea3368de0f0f5279"},{url:"../../../core/images/BackgroundImage/homeBackground.webp",revision:"fcb1240061569d6c355261f8d75a0f1b"},{url:"../../../core/images/dna.png",revision:"d2778bf9fba581a4f4b8c2fca9abc9e8"},{url:"../../../core/images/dna.svg",revision:"7cf969d66011a6cddf39163fa202fa51"},{url:"../../../core/images/EDITmd/002_SciGradePracticeGene.png",revision:"a47cd17752a978f6e468985af11d5f3e"},{url:"../../../core/images/EDITmd/004_FeedbackPage.png",revision:"e4ffddaa8a91c2c5547a89a4c6f47794"},{url:"../../../core/images/EDITmd/005_Algorithm.png",revision:"934afcec1bad4f6cd1b39e799e6de5c2"},{url:"../../../core/images/logo_transparent-Dark.png",revision:"cec8eede6a0b9a7e6da788d86edf6b37"},{url:"../../../core/images/logo_transparent-Dark.svg",revision:"faef5b38e346a12888c11184c890292e"},{url:"../../../core/images/logo_transparent.png",revision:"86746c9170e4cc9fccb363d0c54b3497"},{url:"../../../core/images/logo_transparent.svg",revision:"d6abce258f77c56dfa6bb87765e3dfcf"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-grid.css",revision:"c223f119ec9dea026126fc19efa1cda4"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-grid.min.css",revision:"0bc3c052956530975a1406d6788a256e"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-grid.rtl.css",revision:"8122a112a175dcfc1ce51596916dec94"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-grid.rtl.min.css",revision:"76c20e07d9962cf2045b0a68e0c70172"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-reboot.css",revision:"89f8de928a633a7258c08ba409dc5413"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-reboot.min.css",revision:"05d3df42ebb67a65040216f50432680d"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-reboot.rtl.css",revision:"654a6734347a7a718ac6529411270276"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-reboot.rtl.min.css",revision:"c20056469f2d0f6bf6e88cc481d228ac"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-utilities.css",revision:"66ab28268efbc0dafdb53791d41e755e"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-utilities.min.css",revision:"08aded6a77f986e24299bf9a00f3791d"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-utilities.rtl.css",revision:"dfe0f0007ab21ab80c134ef0777af72f"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-utilities.rtl.min.css",revision:"8479d3eb9eb3e42703c2a46bd839281c"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap.css",revision:"e130b5189b00dbf9549803614a0c35d0"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap.min.css",revision:"1bcf7ee45ab9975f9b9eb016fb96771a"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap.rtl.css",revision:"554e153e05fe7b5c3cfd037b73997215"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap.rtl.min.css",revision:"e9066195b42ddded5976a1c61cd82e2a"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/js/bootstrap.bundle.js",revision:"6cf21db19808a582d229175c96f32bfc"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/js/bootstrap.bundle.min.js",revision:"9977a948cfde2c156160bf47d4d3dd5e"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/js/bootstrap.esm.js",revision:"2de4dc4acece93659c5cbd7abeb21566"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/js/bootstrap.esm.min.js",revision:"a740e6c7cc66aefbfa4b2bcb27a80c2f"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/js/bootstrap.js",revision:"ccd5967383a08b1b42f8dec4fabfa53e"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/js/bootstrap.min.js",revision:"eea75f8c53d120079f003f36ee698c5c"},{url:"../../../core/scripts/APIandLibraries/Fonts/MaterialIcon.css",revision:"85ee0e1867e1b9c1b01ed7e31023ae1f"},{url:"../../../core/scripts/APIandLibraries/jQuery/jquery.min.js",revision:"762e32e4cbf687a7fe34faf9bb0e511e"},{url:"../../../core/scripts/APIandLibraries/tabletoCSV/bower.json",revision:"0786a5142fef978932727a42dcf1f094"},{url:"../../../core/scripts/APIandLibraries/tabletoCSV/dist/jquery.tabletoCSV.js",revision:"38e3e2fcaff8b3a33f2e3bf01190e845"},{url:"../../../core/scripts/APIandLibraries/tabletoCSV/example.html",revision:"b278d32f287f55a0dcb008ead1d7109e"},{url:"../../../core/scripts/APIandLibraries/tabletoCSV/gulpfile.js",revision:"23f0528a75ea40b302fd34d1effe4334"},{url:"../../../core/scripts/APIandLibraries/tabletoCSV/jquery.tabletoCSV.js",revision:"3ab5e2ace2ab26ca4df0a1f06267a978"},{url:"../../../core/scripts/APIandLibraries/tabletoCSV/package.json",revision:"45f34680e60abfca81500be631358328"},{url:"../../../core/scripts/APIandLibraries/tabletoCSV/README.md",revision:"1375c24a3db5a713665c04e433244bf0"},{url:"../../../core/scripts/crispr_scripts.js",revision:"f34a277afa6473242860c4d6dd843f83"},{url:"../../../core/scripts/crispr_scripts.min.js",revision:"59b7cd41725dd02df07b7f2801cdff22"},{url:"../../../core/scripts/login.js",revision:"51d2323c07ba325cf472451668c6b2ac"},{url:"../../../core/scripts/login.min.js",revision:"a1940d1ab02755d049e02507fb0b8ba7"},{url:"../../../core/styling/style.css",revision:"ac7a0fac8e80497aa8332e4e9ae0d3d5"},{url:"../../../core/styling/style.min.css",revision:"65a608b7d010ea2b87bb7ea7584ab875"},{url:"../../../core/systemrun.html",revision:"3a598442c432e1a791a9148ddda6bbd1"}],{}),e.registerRoute(/\.(?:png|jpg|jpeg|webp|ico|svg)$/,new e.CacheFirst({cacheName:"images",plugins:[new e.ExpirationPlugin({maxEntries:10})]}),"GET"),e.registerRoute(/\.html$/,new e.NetworkFirst({cacheName:"html",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:50}),new e.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),e.registerRoute(/\.(?:css|js)$/,new e.NetworkFirst({cacheName:"assets",plugins:[new e.ExpirationPlugin({maxEntries:50}),new e.CacheableResponsePlugin({statuses:[0,200]})]}),"GET");}));
+if(!self.define){let e,r={};const c=(c,o)=>(c=new URL(c+".js",o).href,r[c]||new Promise(r=>{if("document"in self){const e=document.createElement("script");e.src=c,e.onload=r,document.head.appendChild(e);}else e=c,importScripts(c),r();}).then(()=>{let e=r[c];if(!e)throw new Error(`Module ${c} didn’t register its module`);return e;}));self.define=(o,i)=>{const a=e||("document"in self?document.currentScript.src:"")||location.href;if(r[a])return;let s={};const n=e=>c(e,a),d={module:{uri:a},exports:s,require:n};r[a]=Promise.all(o.map(e=>d[e]||n(e))).then(e=>(i(...e),s));};}define(["./workbox-813eeb66"],function(e){"use strict";self.addEventListener("message",e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting();}),e.precacheAndRoute([{url:"../../../core/systemrun.html",revision:"61ec3960f05098c97d298ab90f475771"},{url:"../../../core/styling/style.min.css",revision:"65a608b7d010ea2b87bb7ea7584ab875"},{url:"../../../core/styling/style.css",revision:"b67cbfd3995e07bba50358eaa64009fe"},{url:"../../../core/scripts/runtime.min.js",revision:"6e4641db4ea78c758c56312b1cf2379f"},{url:"../../../core/scripts/runtime.js",revision:"1767d36bb43cfd630a1c01fa2c27f3a9"},{url:"../../../core/scripts/crispr_scripts.min.js",revision:"96fa88586a8017e47d57b94fd287ff3c"},{url:"../../../core/scripts/crispr_scripts.js",revision:"99224226d8d67fb8f654a917e9a2a29d"},{url:"../../../core/scripts/APIandLibraries/tabletoCSV/package.json",revision:"ef0258ebdf3f9d244d7d38c4c35ec723"},{url:"../../../core/scripts/APIandLibraries/tabletoCSV/jquery.tabletoCSV.js",revision:"1757e6cdbbbe5f5a1c330e2f182e24f2"},{url:"../../../core/scripts/APIandLibraries/tabletoCSV/gulpfile.js",revision:"c93880a7ac368dcd9b51d547948cbf8a"},{url:"../../../core/scripts/APIandLibraries/tabletoCSV/example.html",revision:"9b17ab0cdbf7acd33dfcfff87c410d2b"},{url:"../../../core/scripts/APIandLibraries/tabletoCSV/bower.json",revision:"79787e672bb7dc33e2a2e0bdc8467a38"},{url:"../../../core/scripts/APIandLibraries/tabletoCSV/README.md",revision:"d581efd7f3de48bdf77206307df41034"},{url:"../../../core/scripts/APIandLibraries/tabletoCSV/dist/jquery.tabletoCSV.js",revision:"38e3e2fcaff8b3a33f2e3bf01190e845"},{url:"../../../core/scripts/APIandLibraries/jQuery/jquery.min.js",revision:"a8e7cabd4d49dfaf0146678ee147dfc5"},{url:"../../../core/scripts/APIandLibraries/Fonts/MaterialIcon.css",revision:"c1cbea39f07b551807abd9967b809ffd"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/js/bootstrap.min.js",revision:"a92b3364fb0a7349f2a1c31a7ad5ed5e"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/js/bootstrap.js",revision:"52de67605c3d156f4958c83fa9cfc8d9"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/js/bootstrap.esm.min.js",revision:"6ccf144f123da79e62d5e46a06f133b9"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/js/bootstrap.esm.js",revision:"32e42b38a15f27b01f79bb13aad53714"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/js/bootstrap.bundle.min.js",revision:"5cc1b73e70520fa84b1846afe0ec8fb6"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/js/bootstrap.bundle.js",revision:"7d2c412531f05f39e97195f9b48a53dc"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap.rtl.min.css",revision:"53aa521e55523d4f35610e568c5991fd"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap.rtl.css",revision:"f50b588ab5764c08bb2e57da6bbe47c7"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap.min.css",revision:"1b1cb0e2be9a21f091a87691f20c6300"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap.css",revision:"32f9388da564ecf3f4f129021d3736a8"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-utilities.rtl.min.css",revision:"1282e3b4ef0226816da34cd92a7ae69b"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-utilities.rtl.css",revision:"95616dd04a2044a59dbefbc48c050891"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-utilities.min.css",revision:"20d013574c70b2032e408e8f81a8fec9"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-utilities.css",revision:"2609642eaa62f29a2275e0ced5a098fe"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-reboot.rtl.min.css",revision:"c01f229a610e6f96bdb57fd287f48fc9"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-reboot.rtl.css",revision:"0b4f19eb4846adc5a866b80c81bda434"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-reboot.min.css",revision:"7c821536802bd2fa35701c22f2e96d36"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-reboot.css",revision:"cb9d8d28a86d39db9b43030a8248b766"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-grid.rtl.min.css",revision:"fc7e1eb57c409c379d21a8001a0f9b33"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-grid.rtl.css",revision:"93f428651ed8b87b9986050f06e03cb2"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-grid.min.css",revision:"895b9494c7178ac12ad9c56d81305665"},{url:"../../../core/scripts/APIandLibraries/Bootstrap/css/bootstrap-grid.css",revision:"4dd0ce2aa69225d64aacbded692fe756"},{url:"../../../core/images/logo_transparent.svg",revision:"d6abce258f77c56dfa6bb87765e3dfcf"},{url:"../../../core/images/logo_transparent.png",revision:"86746c9170e4cc9fccb363d0c54b3497"},{url:"../../../core/images/logo_transparent-Dark.svg",revision:"faef5b38e346a12888c11184c890292e"},{url:"../../../core/images/logo_transparent-Dark.png",revision:"cec8eede6a0b9a7e6da788d86edf6b37"},{url:"../../../core/images/dna.svg",revision:"7cf969d66011a6cddf39163fa202fa51"},{url:"../../../core/images/dna.png",revision:"d2778bf9fba581a4f4b8c2fca9abc9e8"},{url:"../../../core/images/EDITmd/005_Algorithm.png",revision:"934afcec1bad4f6cd1b39e799e6de5c2"},{url:"../../../core/images/EDITmd/004_FeedbackPage.png",revision:"e4ffddaa8a91c2c5547a89a4c6f47794"},{url:"../../../core/images/EDITmd/002_SciGradePracticeGene.png",revision:"a47cd17752a978f6e468985af11d5f3e"},{url:"../../../core/images/BackgroundImage/homeBackground.webp",revision:"fcb1240061569d6c355261f8d75a0f1b"},{url:"../../../core/images/BackgroundImage/grey.webp",revision:"44f3357b5a1f4d29ea3368de0f0f5279"},{url:"../../../core/icon/screenshot3.webp",revision:"19ef6219d8f3ba14ebf25b72e07240d8"},{url:"../../../core/icon/screenshot2.webp",revision:"87d56bb07395695fda9e04a30caf1672"},{url:"../../../core/icon/screenshot1.webp",revision:"426fd7165422ee95968d181411229d95"},{url:"../../../core/icon/safari-pinned-tab.svg",revision:"3a6f655958b21d384ae3dad886960d93"},{url:"../../../core/icon/resoc.png",revision:"4b94395e0972a350b0727a20e3d06baa"},{url:"../../../core/icon/mstile-70x70.png",revision:"b2902f78c5c0344f8a0558a8f36b97bf"},{url:"../../../core/icon/mstile-310x310.png",revision:"39af54c06ac44ebe9312f682ddd3602c"},{url:"../../../core/icon/mstile-310x150.png",revision:"7555e1760cd643b25105bfe4114eedfd"},{url:"../../../core/icon/mstile-150x150.png",revision:"4a6b569778e6b9d81aaee10df7c65284"},{url:"../../../core/icon/mstile-144x144.png",revision:"52d597709f2268268fd4063d34bd0ce7"},{url:"../../../core/icon/maskable_icon_x96.png",revision:"5269c50f0761a8aa50ae7201c28760c6"},{url:"../../../core/icon/maskable_icon_x72.png",revision:"0603508e30979836bd82b2d95dc0b1f4"},{url:"../../../core/icon/maskable_icon_x512.png",revision:"499293f67750aa3b60815cb50d8e3b72"},{url:"../../../core/icon/maskable_icon_x48.png",revision:"c521515543d0ccc88a843690484dfefe"},{url:"../../../core/icon/maskable_icon_x384.png",revision:"83527cdabf00617fb5b56df08a08b2a3"},{url:"../../../core/icon/maskable_icon_x192.png",revision:"bd977cf9153d6ebb3e8d8f79b4f100b6"},{url:"../../../core/icon/maskable_icon_x128.png",revision:"cf5ea1b4cd68730505d36d59d3c8b04d"},{url:"../../../core/icon/maskable_icon.png",revision:"94a300afab67912c4aa267989a725155"},{url:"../../../core/icon/manifest.json",revision:"ec78f1b4aaf3e8be6d7db11ef45fbf72"},{url:"../../../core/icon/favicon.ico",revision:"ea57adfd4a62355e9f4c2b46ef21600f"},{url:"../../../core/icon/favicon-32x32.png",revision:"a6296dcec5e5a6449807f753d885507d"},{url:"../../../core/icon/favicon-16x16.png",revision:"f9e844d671e8e4b80174f643fe4dcf56"},{url:"../../../core/icon/apple-touch-icon.png",revision:"ced32ca13a0c404c96fc081dca7473eb"},{url:"../../../core/icon/apple-touch-icon-precomposed.png",revision:"ced32ca13a0c404c96fc081dca7473eb"},{url:"../../../core/icon/apple-touch-icon-76x76.png",revision:"448377ba1760c41142b83ffd0fa47163"},{url:"../../../core/icon/apple-touch-icon-76x76-precomposed.png",revision:"448377ba1760c41142b83ffd0fa47163"},{url:"../../../core/icon/apple-touch-icon-72x72.png",revision:"819a43b6e5dc4991e399ff9b5d9b34b3"},{url:"../../../core/icon/apple-touch-icon-72x72-precomposed.png",revision:"819a43b6e5dc4991e399ff9b5d9b34b3"},{url:"../../../core/icon/apple-touch-icon-60x60.png",revision:"37be5e105d7a21fc8f3c437508dca233"},{url:"../../../core/icon/apple-touch-icon-60x60-precomposed.png",revision:"37be5e105d7a21fc8f3c437508dca233"},{url:"../../../core/icon/apple-touch-icon-57x57.png",revision:"b3e1d7fc553b33f086791c138d69bba1"},{url:"../../../core/icon/apple-touch-icon-57x57-precomposed.png",revision:"b3e1d7fc553b33f086791c138d69bba1"},{url:"../../../core/icon/apple-touch-icon-180x180.png",revision:"ced32ca13a0c404c96fc081dca7473eb"},{url:"../../../core/icon/apple-touch-icon-180x180-precomposed.png",revision:"ced32ca13a0c404c96fc081dca7473eb"},{url:"../../../core/icon/apple-touch-icon-152x152.png",revision:"8d46a8911ef72a562c97570d452f83ac"},{url:"../../../core/icon/apple-touch-icon-152x152-precomposed.png",revision:"8d46a8911ef72a562c97570d452f83ac"},{url:"../../../core/icon/apple-touch-icon-144x144.png",revision:"52d597709f2268268fd4063d34bd0ce7"},{url:"../../../core/icon/apple-touch-icon-144x144-precomposed.png",revision:"52d597709f2268268fd4063d34bd0ce7"},{url:"../../../core/icon/apple-touch-icon-120x120.png",revision:"c61a5acca54b104d7fe15fbc473796b5"},{url:"../../../core/icon/apple-touch-icon-120x120-precomposed.png",revision:"c61a5acca54b104d7fe15fbc473796b5"},{url:"../../../core/icon/apple-touch-icon-114x114.png",revision:"7b0f0af98c190974af01f605b117fc18"},{url:"../../../core/icon/apple-touch-icon-114x114-precomposed.png",revision:"7b0f0af98c190974af01f605b117fc18"},{url:"../../../core/icon/android-chrome-96x96.png",revision:"497e53074c189be631a8368192870f02"},{url:"../../../core/icon/android-chrome-72x72.png",revision:"a2b1197f79059981d8a19ba65ce73e6d"},{url:"../../../core/icon/android-chrome-512x512.png",revision:"d5a6869fb6a0d95e1c1398de5aac2278"},{url:"../../../core/icon/android-chrome-48x48.png",revision:"7ac44965ab502f17205e2d048d3e1580"},{url:"../../../core/icon/android-chrome-384x384.png",revision:"45ea1a83b4d26a9224844344602ad69e"},{url:"../../../core/icon/android-chrome-36x36.png",revision:"c3603b9735bb8397b0ac5351da9e94ed"},{url:"../../../core/icon/android-chrome-256x256.png",revision:"d80b94ad67334b9560e3cefaf8b04677"},{url:"../../../core/icon/android-chrome-192x192.png",revision:"f94fc51b10052dcc8f91e04945a618b8"},{url:"../../../core/icon/android-chrome-144x144.png",revision:"859cb36c4d6354a1d76e8d9692fdd88d"},{url:"../../../core/data/Benchling_gRNA_Outputs.json",revision:"515b0830b197e126a294fb15cd6d8e89"},{url:"../../../core/data/eBFP/eBFP.fasta",revision:"a30dc131549dc5fbbaa59128830ca49c"},{url:"../../../core/data/eBFP/Benchling_gRNA_outputs.xlsx",revision:"cb29f7f64c8c0f44cfe58c3504af0d2b"},{url:"../../../core/data/HBB/HBB.fasta",revision:"0314a959f59b730536fddec088d4a6c5"},{url:"../../../core/data/HBB/Benchling_gRNA_Outputs.xlsx",revision:"571ef05c0a5fc985423f08ab13e3fc71"},{url:"../../../core/data/CCR5/CCR5.fasta",revision:"60232b31119c5c0dfd9c59216f46928a"},{url:"../../../core/data/CCR5/Benchling_gRNA_Outputs.xlsx",revision:"d204b7de85c0def6a40789a3104dd975"},{url:"../../../core/data/Background_info/gene_background_info.json",revision:"ebeaca222ceb2e2354f6b2bacb6d0b26"},{url:"../../../core/data/APOE/Benchling_gRNA_Outputs.xlsx",revision:"d728b00ab3559732abc114c43893ba7e"},{url:"../../../core/data/APOE/APOE.fasta",revision:"9955beb43e9fd5a6e506cb9853ef13f2"},{url:"../../../core/data/ACTN3/Benchling_gRNA_Outputs.xlsx",revision:"9d9a05ae5858671f89b87ae185b4917b"},{url:"../../../core/data/ACTN3/ACTN3.fasta",revision:"a5ad42f7acbecbc28bed864b8377c5d4"}],{}),e.registerRoute(/\.(?:png|jpg|jpeg|webp|ico|svg)$/,new e.CacheFirst({cacheName:"images",plugins:[new e.ExpirationPlugin({maxEntries:10})]}),"GET"),e.registerRoute(/\.html$/,new e.NetworkFirst({cacheName:"html",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:50}),new e.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),e.registerRoute(/\.(?:css|js)$/,new e.NetworkFirst({cacheName:"assets",plugins:[new e.ExpirationPlugin({maxEntries:50}),new e.CacheableResponsePlugin({statuses:[0,200]})]}),"GET");});
//# sourceMappingURL=sw.js.map
diff --git a/core/scripts/serviceWorker/sw.js.map b/core/scripts/serviceWorker/sw.js.map
index 170ea7e..1b7c92d 100644
--- a/core/scripts/serviceWorker/sw.js.map
+++ b/core/scripts/serviceWorker/sw.js.map
@@ -1 +1 @@
-{"version":3,"file":"sw.js","sources":["../../../AppData/Local/Temp/b093e3fb9858666c84dc914bd18943f3/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from 'C:/Users/alexa/Documents/code/SciGrade/node_modules/workbox-routing/registerRoute.mjs';\nimport {ExpirationPlugin as workbox_expiration_ExpirationPlugin} from 'C:/Users/alexa/Documents/code/SciGrade/node_modules/workbox-expiration/ExpirationPlugin.mjs';\nimport {CacheFirst as workbox_strategies_CacheFirst} from 'C:/Users/alexa/Documents/code/SciGrade/node_modules/workbox-strategies/CacheFirst.mjs';\nimport {CacheableResponsePlugin as workbox_cacheable_response_CacheableResponsePlugin} from 'C:/Users/alexa/Documents/code/SciGrade/node_modules/workbox-cacheable-response/CacheableResponsePlugin.mjs';\nimport {NetworkFirst as workbox_strategies_NetworkFirst} from 'C:/Users/alexa/Documents/code/SciGrade/node_modules/workbox-strategies/NetworkFirst.mjs';\nimport {precacheAndRoute as workbox_precaching_precacheAndRoute} from 'C:/Users/alexa/Documents/code/SciGrade/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"core/data/ACTN3/ACTN3.fasta\",\n \"revision\": \"93e810b1ce0401a46e96ceaba5687a8f\"\n },\n {\n \"url\": \"core/data/ACTN3/Benchling_gRNA_Outputs.xlsx\",\n \"revision\": \"9d9a05ae5858671f89b87ae185b4917b\"\n },\n {\n \"url\": \"core/data/APOE/APOE.fasta\",\n \"revision\": \"483718a3f932ba66a063811986c9ff94\"\n },\n {\n \"url\": \"core/data/APOE/Benchling_gRNA_Outputs.xlsx\",\n \"revision\": \"d728b00ab3559732abc114c43893ba7e\"\n },\n {\n \"url\": \"core/data/Background_info/gene_background_info.json\",\n \"revision\": \"c949b514552cc7e229ae001f1fc2558f\"\n },\n {\n \"url\": \"core/data/Benchling_gRNA_Outputs.json\",\n \"revision\": \"f16f964789ca6909ec2bbd40afc4a081\"\n },\n {\n \"url\": \"core/data/CCR5/Benchling_gRNA_Outputs.xlsx\",\n \"revision\": \"d204b7de85c0def6a40789a3104dd975\"\n },\n {\n \"url\": \"core/data/CCR5/CCR5.fasta\",\n \"revision\": \"312805e16f0bbaa7378ace3ab275d1b5\"\n },\n {\n \"url\": \"core/data/eBFP/Benchling_gRNA_outputs.xlsx\",\n \"revision\": \"cb29f7f64c8c0f44cfe58c3504af0d2b\"\n },\n {\n \"url\": \"core/data/eBFP/eBFP.fasta\",\n \"revision\": \"3a891a57f27b8180825de1a70974e0ad\"\n },\n {\n \"url\": \"core/data/HBB/Benchling_gRNA_Outputs.xlsx\",\n \"revision\": \"571ef05c0a5fc985423f08ab13e3fc71\"\n },\n {\n \"url\": \"core/data/HBB/HBB.fasta\",\n \"revision\": \"369111a8a700d52e494b75cffef452f9\"\n },\n {\n \"url\": \"core/icon/android-chrome-144x144.png\",\n \"revision\": \"859cb36c4d6354a1d76e8d9692fdd88d\"\n },\n {\n \"url\": \"core/icon/android-chrome-192x192.png\",\n \"revision\": \"f94fc51b10052dcc8f91e04945a618b8\"\n },\n {\n \"url\": \"core/icon/android-chrome-256x256.png\",\n \"revision\": \"d80b94ad67334b9560e3cefaf8b04677\"\n },\n {\n \"url\": \"core/icon/android-chrome-36x36.png\",\n \"revision\": \"c3603b9735bb8397b0ac5351da9e94ed\"\n },\n {\n \"url\": \"core/icon/android-chrome-384x384.png\",\n \"revision\": \"45ea1a83b4d26a9224844344602ad69e\"\n },\n {\n \"url\": \"core/icon/android-chrome-48x48.png\",\n \"revision\": \"7ac44965ab502f17205e2d048d3e1580\"\n },\n {\n \"url\": \"core/icon/android-chrome-512x512.png\",\n \"revision\": \"d5a6869fb6a0d95e1c1398de5aac2278\"\n },\n {\n \"url\": \"core/icon/android-chrome-72x72.png\",\n \"revision\": \"a2b1197f79059981d8a19ba65ce73e6d\"\n },\n {\n \"url\": \"core/icon/android-chrome-96x96.png\",\n \"revision\": \"497e53074c189be631a8368192870f02\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-114x114-precomposed.png\",\n \"revision\": \"7b0f0af98c190974af01f605b117fc18\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-114x114.png\",\n \"revision\": \"7b0f0af98c190974af01f605b117fc18\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-120x120-precomposed.png\",\n \"revision\": \"c61a5acca54b104d7fe15fbc473796b5\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-120x120.png\",\n \"revision\": \"c61a5acca54b104d7fe15fbc473796b5\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-144x144-precomposed.png\",\n \"revision\": \"52d597709f2268268fd4063d34bd0ce7\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-144x144.png\",\n \"revision\": \"52d597709f2268268fd4063d34bd0ce7\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-152x152-precomposed.png\",\n \"revision\": \"8d46a8911ef72a562c97570d452f83ac\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-152x152.png\",\n \"revision\": \"8d46a8911ef72a562c97570d452f83ac\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-180x180-precomposed.png\",\n \"revision\": \"ced32ca13a0c404c96fc081dca7473eb\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-180x180.png\",\n \"revision\": \"ced32ca13a0c404c96fc081dca7473eb\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-57x57-precomposed.png\",\n \"revision\": \"b3e1d7fc553b33f086791c138d69bba1\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-57x57.png\",\n \"revision\": \"b3e1d7fc553b33f086791c138d69bba1\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-60x60-precomposed.png\",\n \"revision\": \"37be5e105d7a21fc8f3c437508dca233\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-60x60.png\",\n \"revision\": \"37be5e105d7a21fc8f3c437508dca233\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-72x72-precomposed.png\",\n \"revision\": \"819a43b6e5dc4991e399ff9b5d9b34b3\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-72x72.png\",\n \"revision\": \"819a43b6e5dc4991e399ff9b5d9b34b3\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-76x76-precomposed.png\",\n \"revision\": \"448377ba1760c41142b83ffd0fa47163\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-76x76.png\",\n \"revision\": \"448377ba1760c41142b83ffd0fa47163\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-precomposed.png\",\n \"revision\": \"ced32ca13a0c404c96fc081dca7473eb\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon.png\",\n \"revision\": \"ced32ca13a0c404c96fc081dca7473eb\"\n },\n {\n \"url\": \"core/icon/favicon-16x16.png\",\n \"revision\": \"f9e844d671e8e4b80174f643fe4dcf56\"\n },\n {\n \"url\": \"core/icon/favicon-32x32.png\",\n \"revision\": \"a6296dcec5e5a6449807f753d885507d\"\n },\n {\n \"url\": \"core/icon/favicon.ico\",\n \"revision\": \"ea57adfd4a62355e9f4c2b46ef21600f\"\n },\n {\n \"url\": \"core/icon/manifest.json\",\n \"revision\": \"dd34856295abeac04c8578a56413e5ca\"\n },\n {\n \"url\": \"core/icon/maskable_icon_x128.png\",\n \"revision\": \"cf5ea1b4cd68730505d36d59d3c8b04d\"\n },\n {\n \"url\": \"core/icon/maskable_icon_x192.png\",\n \"revision\": \"bd977cf9153d6ebb3e8d8f79b4f100b6\"\n },\n {\n \"url\": \"core/icon/maskable_icon_x384.png\",\n \"revision\": \"83527cdabf00617fb5b56df08a08b2a3\"\n },\n {\n \"url\": \"core/icon/maskable_icon_x48.png\",\n \"revision\": \"c521515543d0ccc88a843690484dfefe\"\n },\n {\n \"url\": \"core/icon/maskable_icon_x512.png\",\n \"revision\": \"499293f67750aa3b60815cb50d8e3b72\"\n },\n {\n \"url\": \"core/icon/maskable_icon_x72.png\",\n \"revision\": \"0603508e30979836bd82b2d95dc0b1f4\"\n },\n {\n \"url\": \"core/icon/maskable_icon_x96.png\",\n \"revision\": \"5269c50f0761a8aa50ae7201c28760c6\"\n },\n {\n \"url\": \"core/icon/maskable_icon.png\",\n \"revision\": \"94a300afab67912c4aa267989a725155\"\n },\n {\n \"url\": \"core/icon/mstile-144x144.png\",\n \"revision\": \"52d597709f2268268fd4063d34bd0ce7\"\n },\n {\n \"url\": \"core/icon/mstile-150x150.png\",\n \"revision\": \"4a6b569778e6b9d81aaee10df7c65284\"\n },\n {\n \"url\": \"core/icon/mstile-310x150.png\",\n \"revision\": \"7555e1760cd643b25105bfe4114eedfd\"\n },\n {\n \"url\": \"core/icon/mstile-310x310.png\",\n \"revision\": \"39af54c06ac44ebe9312f682ddd3602c\"\n },\n {\n \"url\": \"core/icon/mstile-70x70.png\",\n \"revision\": \"b2902f78c5c0344f8a0558a8f36b97bf\"\n },\n {\n \"url\": \"core/icon/resoc.png\",\n \"revision\": \"4b94395e0972a350b0727a20e3d06baa\"\n },\n {\n \"url\": \"core/icon/safari-pinned-tab.svg\",\n \"revision\": \"3a6f655958b21d384ae3dad886960d93\"\n },\n {\n \"url\": \"core/icon/screenshot1.webp\",\n \"revision\": \"426fd7165422ee95968d181411229d95\"\n },\n {\n \"url\": \"core/icon/screenshot2.webp\",\n \"revision\": \"87d56bb07395695fda9e04a30caf1672\"\n },\n {\n \"url\": \"core/icon/screenshot3.webp\",\n \"revision\": \"19ef6219d8f3ba14ebf25b72e07240d8\"\n },\n {\n \"url\": \"core/images/BackgroundImage/grey.webp\",\n \"revision\": \"44f3357b5a1f4d29ea3368de0f0f5279\"\n },\n {\n \"url\": \"core/images/BackgroundImage/homeBackground.webp\",\n \"revision\": \"fcb1240061569d6c355261f8d75a0f1b\"\n },\n {\n \"url\": \"core/images/dna.png\",\n \"revision\": \"d2778bf9fba581a4f4b8c2fca9abc9e8\"\n },\n {\n \"url\": \"core/images/dna.svg\",\n \"revision\": \"7cf969d66011a6cddf39163fa202fa51\"\n },\n {\n \"url\": \"core/images/EDITmd/002_SciGradePracticeGene.png\",\n \"revision\": \"a47cd17752a978f6e468985af11d5f3e\"\n },\n {\n \"url\": \"core/images/EDITmd/004_FeedbackPage.png\",\n \"revision\": \"e4ffddaa8a91c2c5547a89a4c6f47794\"\n },\n {\n \"url\": \"core/images/EDITmd/005_Algorithm.png\",\n \"revision\": \"934afcec1bad4f6cd1b39e799e6de5c2\"\n },\n {\n \"url\": \"core/images/logo_transparent-Dark.png\",\n \"revision\": \"cec8eede6a0b9a7e6da788d86edf6b37\"\n },\n {\n \"url\": \"core/images/logo_transparent-Dark.svg\",\n \"revision\": \"faef5b38e346a12888c11184c890292e\"\n },\n {\n \"url\": \"core/images/logo_transparent.png\",\n \"revision\": \"86746c9170e4cc9fccb363d0c54b3497\"\n },\n {\n \"url\": \"core/images/logo_transparent.svg\",\n \"revision\": \"d6abce258f77c56dfa6bb87765e3dfcf\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-grid.css\",\n \"revision\": \"c223f119ec9dea026126fc19efa1cda4\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-grid.min.css\",\n \"revision\": \"0bc3c052956530975a1406d6788a256e\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-grid.rtl.css\",\n \"revision\": \"8122a112a175dcfc1ce51596916dec94\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-grid.rtl.min.css\",\n \"revision\": \"76c20e07d9962cf2045b0a68e0c70172\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-reboot.css\",\n \"revision\": \"89f8de928a633a7258c08ba409dc5413\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-reboot.min.css\",\n \"revision\": \"05d3df42ebb67a65040216f50432680d\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-reboot.rtl.css\",\n \"revision\": \"654a6734347a7a718ac6529411270276\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-reboot.rtl.min.css\",\n \"revision\": \"c20056469f2d0f6bf6e88cc481d228ac\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-utilities.css\",\n \"revision\": \"66ab28268efbc0dafdb53791d41e755e\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-utilities.min.css\",\n \"revision\": \"08aded6a77f986e24299bf9a00f3791d\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-utilities.rtl.css\",\n \"revision\": \"dfe0f0007ab21ab80c134ef0777af72f\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-utilities.rtl.min.css\",\n \"revision\": \"8479d3eb9eb3e42703c2a46bd839281c\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap.css\",\n \"revision\": \"e130b5189b00dbf9549803614a0c35d0\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap.min.css\",\n \"revision\": \"1bcf7ee45ab9975f9b9eb016fb96771a\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap.rtl.css\",\n \"revision\": \"554e153e05fe7b5c3cfd037b73997215\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap.rtl.min.css\",\n \"revision\": \"e9066195b42ddded5976a1c61cd82e2a\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/js/bootstrap.bundle.js\",\n \"revision\": \"6cf21db19808a582d229175c96f32bfc\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/js/bootstrap.bundle.min.js\",\n \"revision\": \"9977a948cfde2c156160bf47d4d3dd5e\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/js/bootstrap.esm.js\",\n \"revision\": \"2de4dc4acece93659c5cbd7abeb21566\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/js/bootstrap.esm.min.js\",\n \"revision\": \"a740e6c7cc66aefbfa4b2bcb27a80c2f\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/js/bootstrap.js\",\n \"revision\": \"ccd5967383a08b1b42f8dec4fabfa53e\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/js/bootstrap.min.js\",\n \"revision\": \"eea75f8c53d120079f003f36ee698c5c\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Fonts/MaterialIcon.css\",\n \"revision\": \"85ee0e1867e1b9c1b01ed7e31023ae1f\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/jQuery/jquery.min.js\",\n \"revision\": \"762e32e4cbf687a7fe34faf9bb0e511e\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/tabletoCSV/bower.json\",\n \"revision\": \"0786a5142fef978932727a42dcf1f094\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/tabletoCSV/dist/jquery.tabletoCSV.js\",\n \"revision\": \"38e3e2fcaff8b3a33f2e3bf01190e845\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/tabletoCSV/example.html\",\n \"revision\": \"b278d32f287f55a0dcb008ead1d7109e\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/tabletoCSV/gulpfile.js\",\n \"revision\": \"23f0528a75ea40b302fd34d1effe4334\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/tabletoCSV/jquery.tabletoCSV.js\",\n \"revision\": \"3ab5e2ace2ab26ca4df0a1f06267a978\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/tabletoCSV/package.json\",\n \"revision\": \"45f34680e60abfca81500be631358328\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/tabletoCSV/README.md\",\n \"revision\": \"1375c24a3db5a713665c04e433244bf0\"\n },\n {\n \"url\": \"core/scripts/crispr_scripts.js\",\n \"revision\": \"f34a277afa6473242860c4d6dd843f83\"\n },\n {\n \"url\": \"core/scripts/crispr_scripts.min.js\",\n \"revision\": \"59b7cd41725dd02df07b7f2801cdff22\"\n },\n {\n \"url\": \"core/scripts/login.js\",\n \"revision\": \"51d2323c07ba325cf472451668c6b2ac\"\n },\n {\n \"url\": \"core/scripts/login.min.js\",\n \"revision\": \"a1940d1ab02755d049e02507fb0b8ba7\"\n },\n {\n \"url\": \"core/styling/style.css\",\n \"revision\": \"ac7a0fac8e80497aa8332e4e9ae0d3d5\"\n },\n {\n \"url\": \"core/styling/style.min.css\",\n \"revision\": \"65a608b7d010ea2b87bb7ea7584ab875\"\n },\n {\n \"url\": \"core/systemrun.html\",\n \"revision\": \"3a598442c432e1a791a9148ddda6bbd1\"\n }\n], {});\n\n\n\n\nworkbox_routing_registerRoute(/\\.(?:png|jpg|jpeg|webp|ico|svg)$/, new workbox_strategies_CacheFirst({ \"cacheName\":\"images\", plugins: [new workbox_expiration_ExpirationPlugin({ maxEntries: 10 })] }), 'GET');\nworkbox_routing_registerRoute(/\\.html$/, new workbox_strategies_NetworkFirst({ \"cacheName\":\"html\",\"networkTimeoutSeconds\":10, plugins: [new workbox_expiration_ExpirationPlugin({ maxEntries: 50 }), new workbox_cacheable_response_CacheableResponsePlugin({ statuses: [ 0, 200 ] })] }), 'GET');\nworkbox_routing_registerRoute(/\\.(?:css|js)$/, new workbox_strategies_NetworkFirst({ \"cacheName\":\"assets\", plugins: [new workbox_expiration_ExpirationPlugin({ maxEntries: 50 }), new workbox_cacheable_response_CacheableResponsePlugin({ statuses: [ 0, 200 ] })] }), 'GET');\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","workbox_routing_registerRoute","workbox_strategies_CacheFirst","cacheName","plugins","workbox_expiration_ExpirationPlugin","maxEntries","workbox_strategies_NetworkFirst","networkTimeoutSeconds","workbox_cacheable_response_CacheableResponsePlugin","statuses"],"mappings":"0nBAwBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,aACP,IAWFC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,sDACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,qDACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qDACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qDACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qDACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qDACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,mDACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,mDACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,mDACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,mDACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,kDACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,kDACPC,SAAY,oCAEd,CACED,IAAO,0CACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,gEACPC,SAAY,oCAEd,CACED,IAAO,oEACPC,SAAY,oCAEd,CACED,IAAO,oEACPC,SAAY,oCAEd,CACED,IAAO,wEACPC,SAAY,oCAEd,CACED,IAAO,kEACPC,SAAY,oCAEd,CACED,IAAO,sEACPC,SAAY,oCAEd,CACED,IAAO,sEACPC,SAAY,oCAEd,CACED,IAAO,0EACPC,SAAY,oCAEd,CACED,IAAO,qEACPC,SAAY,oCAEd,CACED,IAAO,yEACPC,SAAY,oCAEd,CACED,IAAO,yEACPC,SAAY,oCAEd,CACED,IAAO,6EACPC,SAAY,oCAEd,CACED,IAAO,2DACPC,SAAY,oCAEd,CACED,IAAO,+DACPC,SAAY,oCAEd,CACED,IAAO,+DACPC,SAAY,oCAEd,CACED,IAAO,mEACPC,SAAY,oCAEd,CACED,IAAO,gEACPC,SAAY,oCAEd,CACED,IAAO,oEACPC,SAAY,oCAEd,CACED,IAAO,6DACPC,SAAY,oCAEd,CACED,IAAO,iEACPC,SAAY,oCAEd,CACED,IAAO,yDACPC,SAAY,oCAEd,CACED,IAAO,6DACPC,SAAY,oCAEd,CACED,IAAO,sDACPC,SAAY,oCAEd,CACED,IAAO,oDACPC,SAAY,oCAEd,CACED,IAAO,qDACPC,SAAY,oCAEd,CACED,IAAO,oEACPC,SAAY,oCAEd,CACED,IAAO,uDACPC,SAAY,oCAEd,CACED,IAAO,sDACPC,SAAY,oCAEd,CACED,IAAO,+DACPC,SAAY,oCAEd,CACED,IAAO,uDACPC,SAAY,oCAEd,CACED,IAAO,oDACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,qCAEb,CAAE,GAKLC,EAAAA,cAA8B,mCAAoC,IAAIC,aAA8B,CAAEC,UAAY,SAAUC,QAAS,CAAC,IAAIC,mBAAoC,CAAEC,WAAY,QAAW,OACvML,EAAAA,cAA8B,UAAW,IAAIM,eAAgC,CAAEJ,UAAY,OAAOK,sBAAwB,GAAIJ,QAAS,CAAC,IAAIC,mBAAoC,CAAEC,WAAY,KAAO,IAAIG,EAAAA,wBAAmD,CAAEC,SAAU,CAAE,EAAG,UAAc,OAC3RT,EAAAA,cAA8B,gBAAiB,IAAIM,eAAgC,CAAEJ,UAAY,SAAUC,QAAS,CAAC,IAAIC,mBAAoC,CAAEC,WAAY,KAAO,IAAIG,EAAAA,wBAAmD,CAAEC,SAAU,CAAE,EAAG,UAAc"}
\ No newline at end of file
+{"version":3,"file":"sw.js","sources":["../../../../../private/var/folders/x_/xp67pwcd45d2bwd0h9y9cpbw0000gp/T/1764d5872f2a6373fcc69d4be0b40f76/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/Users/joohyun/Documents/code/SciGrade/node_modules/workbox-routing/registerRoute.mjs';\nimport {ExpirationPlugin as workbox_expiration_ExpirationPlugin} from '/Users/joohyun/Documents/code/SciGrade/node_modules/workbox-expiration/ExpirationPlugin.mjs';\nimport {CacheFirst as workbox_strategies_CacheFirst} from '/Users/joohyun/Documents/code/SciGrade/node_modules/workbox-strategies/CacheFirst.mjs';\nimport {CacheableResponsePlugin as workbox_cacheable_response_CacheableResponsePlugin} from '/Users/joohyun/Documents/code/SciGrade/node_modules/workbox-cacheable-response/CacheableResponsePlugin.mjs';\nimport {NetworkFirst as workbox_strategies_NetworkFirst} from '/Users/joohyun/Documents/code/SciGrade/node_modules/workbox-strategies/NetworkFirst.mjs';\nimport {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/Users/joohyun/Documents/code/SciGrade/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"core/systemrun.html\",\n \"revision\": \"61ec3960f05098c97d298ab90f475771\"\n },\n {\n \"url\": \"core/styling/style.min.css\",\n \"revision\": \"65a608b7d010ea2b87bb7ea7584ab875\"\n },\n {\n \"url\": \"core/styling/style.css\",\n \"revision\": \"b67cbfd3995e07bba50358eaa64009fe\"\n },\n {\n \"url\": \"core/scripts/runtime.min.js\",\n \"revision\": \"6e4641db4ea78c758c56312b1cf2379f\"\n },\n {\n \"url\": \"core/scripts/runtime.js\",\n \"revision\": \"1767d36bb43cfd630a1c01fa2c27f3a9\"\n },\n {\n \"url\": \"core/scripts/crispr_scripts.min.js\",\n \"revision\": \"96fa88586a8017e47d57b94fd287ff3c\"\n },\n {\n \"url\": \"core/scripts/crispr_scripts.js\",\n \"revision\": \"99224226d8d67fb8f654a917e9a2a29d\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/tabletoCSV/package.json\",\n \"revision\": \"ef0258ebdf3f9d244d7d38c4c35ec723\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/tabletoCSV/jquery.tabletoCSV.js\",\n \"revision\": \"1757e6cdbbbe5f5a1c330e2f182e24f2\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/tabletoCSV/gulpfile.js\",\n \"revision\": \"c93880a7ac368dcd9b51d547948cbf8a\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/tabletoCSV/example.html\",\n \"revision\": \"9b17ab0cdbf7acd33dfcfff87c410d2b\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/tabletoCSV/bower.json\",\n \"revision\": \"79787e672bb7dc33e2a2e0bdc8467a38\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/tabletoCSV/README.md\",\n \"revision\": \"d581efd7f3de48bdf77206307df41034\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/tabletoCSV/dist/jquery.tabletoCSV.js\",\n \"revision\": \"38e3e2fcaff8b3a33f2e3bf01190e845\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/jQuery/jquery.min.js\",\n \"revision\": \"a8e7cabd4d49dfaf0146678ee147dfc5\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Fonts/MaterialIcon.css\",\n \"revision\": \"c1cbea39f07b551807abd9967b809ffd\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/js/bootstrap.min.js\",\n \"revision\": \"a92b3364fb0a7349f2a1c31a7ad5ed5e\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/js/bootstrap.js\",\n \"revision\": \"52de67605c3d156f4958c83fa9cfc8d9\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/js/bootstrap.esm.min.js\",\n \"revision\": \"6ccf144f123da79e62d5e46a06f133b9\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/js/bootstrap.esm.js\",\n \"revision\": \"32e42b38a15f27b01f79bb13aad53714\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/js/bootstrap.bundle.min.js\",\n \"revision\": \"5cc1b73e70520fa84b1846afe0ec8fb6\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/js/bootstrap.bundle.js\",\n \"revision\": \"7d2c412531f05f39e97195f9b48a53dc\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap.rtl.min.css\",\n \"revision\": \"53aa521e55523d4f35610e568c5991fd\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap.rtl.css\",\n \"revision\": \"f50b588ab5764c08bb2e57da6bbe47c7\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap.min.css\",\n \"revision\": \"1b1cb0e2be9a21f091a87691f20c6300\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap.css\",\n \"revision\": \"32f9388da564ecf3f4f129021d3736a8\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-utilities.rtl.min.css\",\n \"revision\": \"1282e3b4ef0226816da34cd92a7ae69b\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-utilities.rtl.css\",\n \"revision\": \"95616dd04a2044a59dbefbc48c050891\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-utilities.min.css\",\n \"revision\": \"20d013574c70b2032e408e8f81a8fec9\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-utilities.css\",\n \"revision\": \"2609642eaa62f29a2275e0ced5a098fe\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-reboot.rtl.min.css\",\n \"revision\": \"c01f229a610e6f96bdb57fd287f48fc9\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-reboot.rtl.css\",\n \"revision\": \"0b4f19eb4846adc5a866b80c81bda434\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-reboot.min.css\",\n \"revision\": \"7c821536802bd2fa35701c22f2e96d36\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-reboot.css\",\n \"revision\": \"cb9d8d28a86d39db9b43030a8248b766\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-grid.rtl.min.css\",\n \"revision\": \"fc7e1eb57c409c379d21a8001a0f9b33\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-grid.rtl.css\",\n \"revision\": \"93f428651ed8b87b9986050f06e03cb2\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-grid.min.css\",\n \"revision\": \"895b9494c7178ac12ad9c56d81305665\"\n },\n {\n \"url\": \"core/scripts/APIandLibraries/Bootstrap/css/bootstrap-grid.css\",\n \"revision\": \"4dd0ce2aa69225d64aacbded692fe756\"\n },\n {\n \"url\": \"core/images/logo_transparent.svg\",\n \"revision\": \"d6abce258f77c56dfa6bb87765e3dfcf\"\n },\n {\n \"url\": \"core/images/logo_transparent.png\",\n \"revision\": \"86746c9170e4cc9fccb363d0c54b3497\"\n },\n {\n \"url\": \"core/images/logo_transparent-Dark.svg\",\n \"revision\": \"faef5b38e346a12888c11184c890292e\"\n },\n {\n \"url\": \"core/images/logo_transparent-Dark.png\",\n \"revision\": \"cec8eede6a0b9a7e6da788d86edf6b37\"\n },\n {\n \"url\": \"core/images/dna.svg\",\n \"revision\": \"7cf969d66011a6cddf39163fa202fa51\"\n },\n {\n \"url\": \"core/images/dna.png\",\n \"revision\": \"d2778bf9fba581a4f4b8c2fca9abc9e8\"\n },\n {\n \"url\": \"core/images/EDITmd/005_Algorithm.png\",\n \"revision\": \"934afcec1bad4f6cd1b39e799e6de5c2\"\n },\n {\n \"url\": \"core/images/EDITmd/004_FeedbackPage.png\",\n \"revision\": \"e4ffddaa8a91c2c5547a89a4c6f47794\"\n },\n {\n \"url\": \"core/images/EDITmd/002_SciGradePracticeGene.png\",\n \"revision\": \"a47cd17752a978f6e468985af11d5f3e\"\n },\n {\n \"url\": \"core/images/BackgroundImage/homeBackground.webp\",\n \"revision\": \"fcb1240061569d6c355261f8d75a0f1b\"\n },\n {\n \"url\": \"core/images/BackgroundImage/grey.webp\",\n \"revision\": \"44f3357b5a1f4d29ea3368de0f0f5279\"\n },\n {\n \"url\": \"core/icon/screenshot3.webp\",\n \"revision\": \"19ef6219d8f3ba14ebf25b72e07240d8\"\n },\n {\n \"url\": \"core/icon/screenshot2.webp\",\n \"revision\": \"87d56bb07395695fda9e04a30caf1672\"\n },\n {\n \"url\": \"core/icon/screenshot1.webp\",\n \"revision\": \"426fd7165422ee95968d181411229d95\"\n },\n {\n \"url\": \"core/icon/safari-pinned-tab.svg\",\n \"revision\": \"3a6f655958b21d384ae3dad886960d93\"\n },\n {\n \"url\": \"core/icon/resoc.png\",\n \"revision\": \"4b94395e0972a350b0727a20e3d06baa\"\n },\n {\n \"url\": \"core/icon/mstile-70x70.png\",\n \"revision\": \"b2902f78c5c0344f8a0558a8f36b97bf\"\n },\n {\n \"url\": \"core/icon/mstile-310x310.png\",\n \"revision\": \"39af54c06ac44ebe9312f682ddd3602c\"\n },\n {\n \"url\": \"core/icon/mstile-310x150.png\",\n \"revision\": \"7555e1760cd643b25105bfe4114eedfd\"\n },\n {\n \"url\": \"core/icon/mstile-150x150.png\",\n \"revision\": \"4a6b569778e6b9d81aaee10df7c65284\"\n },\n {\n \"url\": \"core/icon/mstile-144x144.png\",\n \"revision\": \"52d597709f2268268fd4063d34bd0ce7\"\n },\n {\n \"url\": \"core/icon/maskable_icon_x96.png\",\n \"revision\": \"5269c50f0761a8aa50ae7201c28760c6\"\n },\n {\n \"url\": \"core/icon/maskable_icon_x72.png\",\n \"revision\": \"0603508e30979836bd82b2d95dc0b1f4\"\n },\n {\n \"url\": \"core/icon/maskable_icon_x512.png\",\n \"revision\": \"499293f67750aa3b60815cb50d8e3b72\"\n },\n {\n \"url\": \"core/icon/maskable_icon_x48.png\",\n \"revision\": \"c521515543d0ccc88a843690484dfefe\"\n },\n {\n \"url\": \"core/icon/maskable_icon_x384.png\",\n \"revision\": \"83527cdabf00617fb5b56df08a08b2a3\"\n },\n {\n \"url\": \"core/icon/maskable_icon_x192.png\",\n \"revision\": \"bd977cf9153d6ebb3e8d8f79b4f100b6\"\n },\n {\n \"url\": \"core/icon/maskable_icon_x128.png\",\n \"revision\": \"cf5ea1b4cd68730505d36d59d3c8b04d\"\n },\n {\n \"url\": \"core/icon/maskable_icon.png\",\n \"revision\": \"94a300afab67912c4aa267989a725155\"\n },\n {\n \"url\": \"core/icon/manifest.json\",\n \"revision\": \"ec78f1b4aaf3e8be6d7db11ef45fbf72\"\n },\n {\n \"url\": \"core/icon/favicon.ico\",\n \"revision\": \"ea57adfd4a62355e9f4c2b46ef21600f\"\n },\n {\n \"url\": \"core/icon/favicon-32x32.png\",\n \"revision\": \"a6296dcec5e5a6449807f753d885507d\"\n },\n {\n \"url\": \"core/icon/favicon-16x16.png\",\n \"revision\": \"f9e844d671e8e4b80174f643fe4dcf56\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon.png\",\n \"revision\": \"ced32ca13a0c404c96fc081dca7473eb\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-precomposed.png\",\n \"revision\": \"ced32ca13a0c404c96fc081dca7473eb\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-76x76.png\",\n \"revision\": \"448377ba1760c41142b83ffd0fa47163\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-76x76-precomposed.png\",\n \"revision\": \"448377ba1760c41142b83ffd0fa47163\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-72x72.png\",\n \"revision\": \"819a43b6e5dc4991e399ff9b5d9b34b3\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-72x72-precomposed.png\",\n \"revision\": \"819a43b6e5dc4991e399ff9b5d9b34b3\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-60x60.png\",\n \"revision\": \"37be5e105d7a21fc8f3c437508dca233\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-60x60-precomposed.png\",\n \"revision\": \"37be5e105d7a21fc8f3c437508dca233\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-57x57.png\",\n \"revision\": \"b3e1d7fc553b33f086791c138d69bba1\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-57x57-precomposed.png\",\n \"revision\": \"b3e1d7fc553b33f086791c138d69bba1\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-180x180.png\",\n \"revision\": \"ced32ca13a0c404c96fc081dca7473eb\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-180x180-precomposed.png\",\n \"revision\": \"ced32ca13a0c404c96fc081dca7473eb\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-152x152.png\",\n \"revision\": \"8d46a8911ef72a562c97570d452f83ac\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-152x152-precomposed.png\",\n \"revision\": \"8d46a8911ef72a562c97570d452f83ac\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-144x144.png\",\n \"revision\": \"52d597709f2268268fd4063d34bd0ce7\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-144x144-precomposed.png\",\n \"revision\": \"52d597709f2268268fd4063d34bd0ce7\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-120x120.png\",\n \"revision\": \"c61a5acca54b104d7fe15fbc473796b5\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-120x120-precomposed.png\",\n \"revision\": \"c61a5acca54b104d7fe15fbc473796b5\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-114x114.png\",\n \"revision\": \"7b0f0af98c190974af01f605b117fc18\"\n },\n {\n \"url\": \"core/icon/apple-touch-icon-114x114-precomposed.png\",\n \"revision\": \"7b0f0af98c190974af01f605b117fc18\"\n },\n {\n \"url\": \"core/icon/android-chrome-96x96.png\",\n \"revision\": \"497e53074c189be631a8368192870f02\"\n },\n {\n \"url\": \"core/icon/android-chrome-72x72.png\",\n \"revision\": \"a2b1197f79059981d8a19ba65ce73e6d\"\n },\n {\n \"url\": \"core/icon/android-chrome-512x512.png\",\n \"revision\": \"d5a6869fb6a0d95e1c1398de5aac2278\"\n },\n {\n \"url\": \"core/icon/android-chrome-48x48.png\",\n \"revision\": \"7ac44965ab502f17205e2d048d3e1580\"\n },\n {\n \"url\": \"core/icon/android-chrome-384x384.png\",\n \"revision\": \"45ea1a83b4d26a9224844344602ad69e\"\n },\n {\n \"url\": \"core/icon/android-chrome-36x36.png\",\n \"revision\": \"c3603b9735bb8397b0ac5351da9e94ed\"\n },\n {\n \"url\": \"core/icon/android-chrome-256x256.png\",\n \"revision\": \"d80b94ad67334b9560e3cefaf8b04677\"\n },\n {\n \"url\": \"core/icon/android-chrome-192x192.png\",\n \"revision\": \"f94fc51b10052dcc8f91e04945a618b8\"\n },\n {\n \"url\": \"core/icon/android-chrome-144x144.png\",\n \"revision\": \"859cb36c4d6354a1d76e8d9692fdd88d\"\n },\n {\n \"url\": \"core/data/Benchling_gRNA_Outputs.json\",\n \"revision\": \"515b0830b197e126a294fb15cd6d8e89\"\n },\n {\n \"url\": \"core/data/eBFP/eBFP.fasta\",\n \"revision\": \"a30dc131549dc5fbbaa59128830ca49c\"\n },\n {\n \"url\": \"core/data/eBFP/Benchling_gRNA_outputs.xlsx\",\n \"revision\": \"cb29f7f64c8c0f44cfe58c3504af0d2b\"\n },\n {\n \"url\": \"core/data/HBB/HBB.fasta\",\n \"revision\": \"0314a959f59b730536fddec088d4a6c5\"\n },\n {\n \"url\": \"core/data/HBB/Benchling_gRNA_Outputs.xlsx\",\n \"revision\": \"571ef05c0a5fc985423f08ab13e3fc71\"\n },\n {\n \"url\": \"core/data/CCR5/CCR5.fasta\",\n \"revision\": \"60232b31119c5c0dfd9c59216f46928a\"\n },\n {\n \"url\": \"core/data/CCR5/Benchling_gRNA_Outputs.xlsx\",\n \"revision\": \"d204b7de85c0def6a40789a3104dd975\"\n },\n {\n \"url\": \"core/data/Background_info/gene_background_info.json\",\n \"revision\": \"ebeaca222ceb2e2354f6b2bacb6d0b26\"\n },\n {\n \"url\": \"core/data/APOE/Benchling_gRNA_Outputs.xlsx\",\n \"revision\": \"d728b00ab3559732abc114c43893ba7e\"\n },\n {\n \"url\": \"core/data/APOE/APOE.fasta\",\n \"revision\": \"9955beb43e9fd5a6e506cb9853ef13f2\"\n },\n {\n \"url\": \"core/data/ACTN3/Benchling_gRNA_Outputs.xlsx\",\n \"revision\": \"9d9a05ae5858671f89b87ae185b4917b\"\n },\n {\n \"url\": \"core/data/ACTN3/ACTN3.fasta\",\n \"revision\": \"a5ad42f7acbecbc28bed864b8377c5d4\"\n }\n], {});\n\n\n\n\nworkbox_routing_registerRoute(/\\.(?:png|jpg|jpeg|webp|ico|svg)$/, new workbox_strategies_CacheFirst({ \"cacheName\":\"images\", plugins: [new workbox_expiration_ExpirationPlugin({ maxEntries: 10 })] }), 'GET');\nworkbox_routing_registerRoute(/\\.html$/, new workbox_strategies_NetworkFirst({ \"cacheName\":\"html\",\"networkTimeoutSeconds\":10, plugins: [new workbox_expiration_ExpirationPlugin({ maxEntries: 50 }), new workbox_cacheable_response_CacheableResponsePlugin({ statuses: [ 0, 200 ] })] }), 'GET');\nworkbox_routing_registerRoute(/\\.(?:css|js)$/, new workbox_strategies_NetworkFirst({ \"cacheName\":\"assets\", plugins: [new workbox_expiration_ExpirationPlugin({ maxEntries: 50 }), new workbox_cacheable_response_CacheableResponsePlugin({ statuses: [ 0, 200 ] })] }), 'GET');\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","workbox_routing_registerRoute","workbox_strategies_CacheFirst","cacheName","plugins","workbox_expiration_ExpirationPlugin","maxEntries","workbox_strategies_NetworkFirst","networkTimeoutSeconds","workbox_cacheable_response_CacheableResponsePlugin","statuses"],"mappings":"inBAwBAA,KAAKC,iBAAiB,UAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,gBAYTC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uDACPC,SAAY,oCAEd,CACED,IAAO,+DACPC,SAAY,oCAEd,CACED,IAAO,sDACPC,SAAY,oCAEd,CACED,IAAO,uDACPC,SAAY,oCAEd,CACED,IAAO,qDACPC,SAAY,oCAEd,CACED,IAAO,oDACPC,SAAY,oCAEd,CACED,IAAO,oEACPC,SAAY,oCAEd,CACED,IAAO,oDACPC,SAAY,oCAEd,CACED,IAAO,sDACPC,SAAY,oCAEd,CACED,IAAO,6DACPC,SAAY,oCAEd,CACED,IAAO,yDACPC,SAAY,oCAEd,CACED,IAAO,iEACPC,SAAY,oCAEd,CACED,IAAO,6DACPC,SAAY,oCAEd,CACED,IAAO,oEACPC,SAAY,oCAEd,CACED,IAAO,gEACPC,SAAY,oCAEd,CACED,IAAO,mEACPC,SAAY,oCAEd,CACED,IAAO,+DACPC,SAAY,oCAEd,CACED,IAAO,+DACPC,SAAY,oCAEd,CACED,IAAO,2DACPC,SAAY,oCAEd,CACED,IAAO,6EACPC,SAAY,oCAEd,CACED,IAAO,yEACPC,SAAY,oCAEd,CACED,IAAO,yEACPC,SAAY,oCAEd,CACED,IAAO,qEACPC,SAAY,oCAEd,CACED,IAAO,0EACPC,SAAY,oCAEd,CACED,IAAO,sEACPC,SAAY,oCAEd,CACED,IAAO,sEACPC,SAAY,oCAEd,CACED,IAAO,kEACPC,SAAY,oCAEd,CACED,IAAO,wEACPC,SAAY,oCAEd,CACED,IAAO,oEACPC,SAAY,oCAEd,CACED,IAAO,oEACPC,SAAY,oCAEd,CACED,IAAO,gEACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,0CACPC,SAAY,oCAEd,CACED,IAAO,kDACPC,SAAY,oCAEd,CACED,IAAO,kDACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,mDACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,mDACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,mDACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,mDACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qDACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qDACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qDACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qDACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qDACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,sDACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,qCAEb,CAAE,GAKLC,EAAAA,cAA8B,mCAAoC,IAAIC,aAA8B,CAAEC,UAAY,SAAUC,QAAS,CAAC,IAAIC,mBAAoC,CAAEC,WAAY,QAAW,OACvML,EAAAA,cAA8B,UAAW,IAAIM,eAAgC,CAAEJ,UAAY,OAAOK,sBAAwB,GAAIJ,QAAS,CAAC,IAAIC,mBAAoC,CAAEC,WAAY,KAAO,IAAIG,EAAAA,wBAAmD,CAAEC,SAAU,CAAE,EAAG,UAAc,OAC3RT,EAAAA,cAA8B,gBAAiB,IAAIM,eAAgC,CAAEJ,UAAY,SAAUC,QAAS,CAAC,IAAIC,mBAAoC,CAAEC,WAAY,KAAO,IAAIG,EAAAA,wBAAmD,CAAEC,SAAU,CAAE,EAAG,UAAc"}
\ No newline at end of file
diff --git a/core/scripts/serviceWorker/workbox-813eeb66.js b/core/scripts/serviceWorker/workbox-813eeb66.js
new file mode 100644
index 0000000..fa56bc9
--- /dev/null
+++ b/core/scripts/serviceWorker/workbox-813eeb66.js
@@ -0,0 +1,2 @@
+define(["exports"],function(t){"use strict";try{self["workbox:core:7.3.0"]&&_();}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s;};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s;}}try{self["workbox:routing:7.3.0"]&&_();}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class i{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s;}setCatchHandler(t){this.catchHandler=n(t);}}class r extends i{constructor(t,e,s){super(({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1);},e,s);}}class a{constructor(){this.t=new Map,this.i=new Map;}get routes(){return this.t;}addFetchListener(){self.addEventListener("fetch",t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s);});}addCacheListener(){self.addEventListener("message",t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map(e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t});}));t.waitUntil(s),t.ports&&t.ports[0]&&s.then(()=>t.ports[0].postMessage(!0));}});}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let a=r&&r.handler;const o=t.method;if(!a&&this.i.has(o)&&(a=this.i.get(o)),!a)return;let c;try{c=a.handle({url:s,request:t,event:e,params:i});}catch(t){c=Promise.reject(t);}const h=r&&r.catchHandler;return c instanceof Promise&&(this.o||h)&&(c=c.catch(async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:i});}catch(t){t instanceof Error&&(n=t);}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n;})),c;}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const i=this.t.get(s.method)||[];for(const r of i){let i;const a=r.match({url:t,sameOrigin:e,request:s,event:n});if(a)return i=a,(Array.isArray(i)&&0===i.length||a.constructor===Object&&0===Object.keys(a).length||"boolean"==typeof a)&&(i=void 0),{route:r,params:i};}return{};}setDefaultHandler(t,e="GET"){this.i.set(e,n(t));}setCatchHandler(t){this.o=n(t);}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t);}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1);}}let o;const c=()=>(o||(o=new a,o.addFetchListener(),o.addCacheListener()),o);function h(t,e,n){let a;if("string"==typeof t){const s=new URL(t,location.href);a=new i(({url:t})=>t.href===s.href,e,n);}else if(t instanceof RegExp)a=new r(t,e,n);else if("function"==typeof t)a=new i(t,e,n);else{if(!(t instanceof i))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=t;}return c().registerRoute(a),a;}const u={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},l=t=>[u.prefix,t,u.suffix].filter(t=>t&&t.length>0).join("-"),f=t=>t||l(u.precache),w=t=>t||l(u.runtime);function d(t){t.then(()=>{});}const p=new Set;function y(){return y=Object.assign?Object.assign.bind():function(t){for(var e=1;e(t[e]=s,!0),has:(t,e)=>t instanceof IDBTransaction&&("done"===e||"store"===e)||e in t};function x(t){return t!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(g||(g=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(E(this),e),L(R.get(this));}:function(...e){return L(t.apply(E(this),e));}:function(e,...s){const n=t.call(E(this),e,...s);return b.set(n,e.sort?e.sort():[e]),L(n);};}function I(t){return"function"==typeof t?x(t):(t instanceof IDBTransaction&&function(t){if(v.has(t))return;const e=new Promise((e,s)=>{const n=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",r),t.removeEventListener("abort",r);},i=()=>{e(),n();},r=()=>{s(t.error||new DOMException("AbortError","AbortError")),n();};t.addEventListener("complete",i),t.addEventListener("error",r),t.addEventListener("abort",r);});v.set(t,e);}(t),e=t,(m||(m=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(t=>e instanceof t)?new Proxy(t,U):t);var e;}function L(t){if(t instanceof IDBRequest)return function(t){const e=new Promise((e,s)=>{const n=()=>{t.removeEventListener("success",i),t.removeEventListener("error",r);},i=()=>{e(L(t.result)),n();},r=()=>{s(t.error),n();};t.addEventListener("success",i),t.addEventListener("error",r);});return e.then(e=>{e instanceof IDBCursor&&R.set(e,t);}).catch(()=>{}),D.set(e,t),e;}(t);if(q.has(t))return q.get(t);const e=I(t);return e!==t&&(q.set(t,e),D.set(e,t)),e;}const E=t=>D.get(t);const C=["get","getKey","getAll","getAllKeys","count"],N=["put","add","delete","clear"],O=new Map;function k(t,e){if(!(t instanceof IDBDatabase)||e in t||"string"!=typeof e)return;if(O.get(e))return O.get(e);const s=e.replace(/FromIndex$/,""),n=e!==s,i=N.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!i&&!C.includes(s))return;const r=async function(t,...e){const r=this.transaction(t,i?"readwrite":"readonly");let a=r.store;return n&&(a=a.index(e.shift())),(await Promise.all([a[s](...e),i&&r.done]))[0];};return O.set(e,r),r;}U=(t=>y({},t,{get:(e,s,n)=>k(e,s)||t.get(e,s,n),has:(e,s)=>!!k(e,s)||t.has(e,s)}))(U);try{self["workbox:expiration:7.3.0"]&&_();}catch(t){}const B="cache-entries",T=t=>{const e=new URL(t,location.href);return e.hash="",e.href;};class M{constructor(t){this.h=null,this.u=t;}l(t){const e=t.createObjectStore(B,{keyPath:"id"});e.createIndex("cacheName","cacheName",{unique:!1}),e.createIndex("timestamp","timestamp",{unique:!1});}p(t){this.l(t),this.u&&function(t,{blocked:e}={}){const s=indexedDB.deleteDatabase(t);e&&s.addEventListener("blocked",t=>e(t.oldVersion,t)),L(s).then(()=>{});}(this.u);}async setTimestamp(t,e){const s={url:t=T(t),timestamp:e,cacheName:this.u,id:this.m(t)},n=(await this.getDb()).transaction(B,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done;}async getTimestamp(t){const e=await this.getDb(),s=await e.get(B,this.m(t));return null==s?void 0:s.timestamp;}async expireEntries(t,e){const s=await this.getDb();let n=await s.transaction(B).store.index("timestamp").openCursor(null,"prev");const i=[];let r=0;for(;n;){const s=n.value;s.cacheName===this.u&&(t&&s.timestamp=e?i.push(n.value):r++),n=await n.continue();}const a=[];for(const t of i)await s.delete(B,t.id),a.push(t.url);return a;}m(t){return this.u+"|"+T(t);}async getDb(){return this.h||(this.h=await function(t,e,{blocked:s,upgrade:n,blocking:i,terminated:r}={}){const a=indexedDB.open(t,e),o=L(a);return n&&a.addEventListener("upgradeneeded",t=>{n(L(a.result),t.oldVersion,t.newVersion,L(a.transaction),t);}),s&&a.addEventListener("blocked",t=>s(t.oldVersion,t.newVersion,t)),o.then(t=>{r&&t.addEventListener("close",()=>r()),i&&t.addEventListener("versionchange",t=>i(t.oldVersion,t.newVersion,t));}).catch(()=>{}),o;}("workbox-expiration",1,{upgrade:this.p.bind(this)})),this.h;}}class P{constructor(t,e={}){this.R=!1,this.v=!1,this.q=e.maxEntries,this.D=e.maxAgeSeconds,this.U=e.matchOptions,this.u=t,this._=new M(t);}async expireEntries(){if(this.R)return void(this.v=!0);this.R=!0;const t=this.D?Date.now()-1e3*this.D:0,e=await this._.expireEntries(t,this.q),s=await self.caches.open(this.u);for(const t of e)await s.delete(t,this.U);this.R=!1,this.v&&(this.v=!1,d(this.expireEntries()));}async updateTimestamp(t){await this._.setTimestamp(t,Date.now());}async isURLExpired(t){if(this.D){const e=await this._.getTimestamp(t),s=Date.now()-1e3*this.D;return void 0===e||e{this.resolve=t,this.reject=e;});}}try{self["workbox:strategies:7.3.0"]&&_();}catch(t){}function S(t){return"string"==typeof t?new Request(t):t;}class K{constructor(t,e){this.I={},Object.assign(this,e),this.event=e.event,this.L=t,this.C=new W,this.N=[],this.O=[...t.plugins],this.k=new Map;for(const t of this.O)this.k.set(t,{});this.event.waitUntil(this.C.promise);}async fetch(t){const{event:e}=this;let n=S(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t;}const i=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e});}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message});}const r=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.L.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:r,response:t});return t;}catch(t){throw i&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:i.clone(),request:r.clone()}),t;}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e;}async cacheMatch(t){const e=S(t);let s;const{cacheName:n,matchOptions:i}=this.L,r=await this.getCacheKey(e,"read"),a=Object.assign(Object.assign({},i),{cacheName:n});s=await caches.match(r,a);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:i,cachedResponse:s,request:r,event:this.event})||void 0;return s;}async cachePut(t,e){const n=S(t);var i;await(i=0,new Promise(t=>setTimeout(t,i)));const r=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(a=r.url,new URL(String(a),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var a;const o=await this.B(e);if(!o)return!1;const{cacheName:c,matchOptions:h}=this.L,u=await self.caches.open(c),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const i=j(e.url,s);if(e.url===i)return t.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),a=await t.keys(e,r);for(const e of a)if(i===j(e.url,s))return t.match(e,n);}(u,r.clone(),["__WB_REVISION__"],h):null;try{await u.put(r,l?o.clone():o);}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of p)await t();}(),t;}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:c,oldResponse:f,newResponse:o.clone(),request:r,event:this.event});return!0;}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.I[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=S(await t({mode:e,request:n,event:this.event,params:this.params}));this.I[s]=n;}return this.I[s];}hasCallback(t){for(const e of this.L.plugins)if(t in e)return!0;return!1;}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e);}*iterateCallbacks(t){for(const e of this.L.plugins)if("function"==typeof e[t]){const s=this.k.get(e),n=n=>{const i=Object.assign(Object.assign({},n),{state:s});return e[t](i);};yield n;}}waitUntil(t){return this.N.push(t),t;}async doneWaiting(){for(;this.N.length;){const t=this.N.splice(0),e=(await Promise.allSettled(t)).find(t=>"rejected"===t.status);if(e)throw e.reason;}}destroy(){this.C.resolve(null);}async B(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e;}}class A{constructor(t={}){this.cacheName=w(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions;}handle(t){const[e]=this.handleAll(t);return e;}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,i=new K(this,{event:e,request:s,params:n}),r=this.T(i,s,e);return[r,this.M(r,i,s,e)];}async T(t,e,n){let i;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(i=await this.P(e,t),!i||"error"===i.type)throw new s("no-response",{url:e.url});}catch(s){if(s instanceof Error)for(const r of t.iterateCallbacks("handlerDidError"))if(i=await r({error:s,event:n,request:e}),i)break;if(!i)throw s;}for(const s of t.iterateCallbacks("handlerWillRespond"))i=await s({event:n,request:e,response:i});return i;}async M(t,e,s,n){let i,r;try{i=await t;}catch(r){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:i}),await e.doneWaiting();}catch(t){t instanceof Error&&(r=t);}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:i,error:r}),e.destroy(),r)throw r;}}try{self["workbox:cacheable-response:7.3.0"]&&_();}catch(t){}class F{constructor(t={}){this.j=t.statuses,this.W=t.headers;}isResponseCacheable(t){let e=!0;return this.j&&(e=this.j.includes(t.status)),this.W&&e&&(e=Object.keys(this.W).some(e=>t.headers.get(e)===this.W[e])),e;}}const H={cacheWillUpdate:async({response:t})=>200===t.status||0===t.status?t:null};function $(t,e){const s=e();return t.waitUntil(s),s;}try{self["workbox:precaching:7.3.0"]&&_();}catch(t){}function G(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href};}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href};}const i=new URL(n,location.href),r=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",e),{cacheKey:i.href,url:r.href};}class V{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t);},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t);}return s;};}}class J{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.S.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t;},this.S=t;}}let Q,z;async function X(t,e){let n=null;if(t.url){n=new URL(t.url).origin;}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const i=t.clone(),r={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},a=e?e(r):r,o=function(){if(void 0===Q){const t=new Response("");if("body"in t)try{new Response(t.body),Q=!0;}catch(t){Q=!1;}Q=!1;}return Q;}()?i.body:await i.blob();return new Response(o,a);}class Y extends A{constructor(t={}){t.cacheName=f(t.cacheName),super(t),this.K=!1!==t.fallbackToNetwork,this.plugins.push(Y.copyRedirectedCacheableResponsesPlugin);}async P(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.A(t,e):await this.F(t,e));}async F(t,e){let n;const i=e.params||{};if(!this.K)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=i.integrity,r=t.integrity,a=!r||r===s;n=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?r||s:void 0})),s&&a&&"no-cors"!==t.mode&&(this.H(),await e.cachePut(t,n.clone()));}return n;}async A(t,e){this.H();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n;}H(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==Y.copyRedirectedCacheableResponsesPlugin&&(n===Y.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(Y.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1);}}Y.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},Y.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await X(t):t};class Z{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.$=new Map,this.G=new Map,this.V=new Map,this.L=new Y({cacheName:f(t),plugins:[...e,new J({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this);}get strategy(){return this.L;}precache(t){this.addToCacheList(t),this.J||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.J=!0);}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:i}=G(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this.$.has(i)&&this.$.get(i)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.$.get(i),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.V.has(t)&&this.V.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:i});this.V.set(t,n.integrity);}if(this.$.set(i,t),this.G.set(i,r),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t);}}}install(t){return $(t,async()=>{const e=new V;this.strategy.plugins.push(e);for(const[e,s]of this.$){const n=this.V.get(s),i=this.G.get(e),r=new Request(e,{integrity:n,cache:i,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:t}));}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n};});}activate(t){return $(t,async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.$.values()),n=[];for(const i of e)s.has(i.url)||(await t.delete(i),n.push(i.url));return{deletedURLs:n};});}getURLsToCacheKeys(){return this.$;}getCachedURLs(){return[...this.$.keys()];}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.$.get(e.href);}getIntegrityForCacheKey(t){return this.V.get(t);}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s);}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s));}}const tt=()=>(z||(z=new Z),z);class et extends i{constructor(t,e){super(({request:s})=>{const n=t.getURLsToCacheKeys();for(const i of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:i}={}){const r=new URL(t,location.href);r.hash="",yield r.href;const a=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some(t=>t.test(s))&&t.searchParams.delete(s);return t;}(r,e);if(yield a.href,s&&a.pathname.endsWith("/")){const t=new URL(a.href);t.pathname+=s,yield t.href;}if(n){const t=new URL(a.href);t.pathname+=".html",yield t.href;}if(i){const t=i({url:r});for(const e of t)yield e.href;}}(s.url,e)){const e=n.get(i);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)};}}},t.strategy);}}t.CacheFirst=class extends A{async P(t,e){let n,i=await e.cacheMatch(t);if(!i)try{i=await e.fetchAndCachePut(t);}catch(t){t instanceof Error&&(n=t);}if(!i)throw new s("no-response",{url:t.url,error:n});return i;}},t.CacheableResponsePlugin=class{constructor(t){this.cacheWillUpdate=async({response:t})=>this.X.isResponseCacheable(t)?t:null,this.X=new F(t);}},t.ExpirationPlugin=class{constructor(t={}){this.cachedResponseWillBeUsed=async({event:t,request:e,cacheName:s,cachedResponse:n})=>{if(!n)return null;const i=this.Y(n),r=this.Z(s);d(r.expireEntries());const a=r.updateTimestamp(e.url);if(t)try{t.waitUntil(a);}catch(t){}return i?n:null;},this.cacheDidUpdate=async({cacheName:t,request:e})=>{const s=this.Z(t);await s.updateTimestamp(e.url),await s.expireEntries();},this.tt=t,this.D=t.maxAgeSeconds,this.et=new Map,t.purgeOnQuotaError&&function(t){p.add(t);}(()=>this.deleteCacheAndMetadata());}Z(t){if(t===w())throw new s("expire-custom-caches-only");let e=this.et.get(t);return e||(e=new P(t,this.tt),this.et.set(t,e)),e;}Y(t){if(!this.D)return!0;const e=this.st(t);if(null===e)return!0;return e>=Date.now()-1e3*this.D;}st(t){if(!t.headers.has("date"))return null;const e=t.headers.get("date"),s=new Date(e).getTime();return isNaN(s)?null:s;}async deleteCacheAndMetadata(){for(const[t,e]of this.et)await self.caches.delete(t),await e.delete();this.et=new Map;}},t.NetworkFirst=class extends A{constructor(t={}){super(t),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(H),this.nt=t.networkTimeoutSeconds||0;}async P(t,e){const n=[],i=[];let r;if(this.nt){const{id:s,promise:a}=this.it({request:t,logs:n,handler:e});r=s,i.push(a);}const a=this.rt({timeoutId:r,request:t,logs:n,handler:e});i.push(a);const o=await e.waitUntil((async()=>await e.waitUntil(Promise.race(i))||await a)());if(!o)throw new s("no-response",{url:t.url});return o;}it({request:t,logs:e,handler:s}){let n;return{promise:new Promise(e=>{n=setTimeout(async()=>{e(await s.cacheMatch(t));},1e3*this.nt);}),id:n};}async rt({timeoutId:t,request:e,logs:s,handler:n}){let i,r;try{r=await n.fetchAndCachePut(e);}catch(t){t instanceof Error&&(i=t);}return t&&clearTimeout(t),!i&&r||(r=await n.cacheMatch(e)),r;}},t.precacheAndRoute=function(t,e){!function(t){tt().precache(t);}(t),function(t){const e=tt();h(new et(e,t));}(e);},t.registerRoute=h;});
+//# sourceMappingURL=workbox-813eeb66.js.map
diff --git a/core/scripts/serviceWorker/workbox-813eeb66.js.map b/core/scripts/serviceWorker/workbox-813eeb66.js.map
new file mode 100644
index 0000000..cb44eef
--- /dev/null
+++ b/core/scripts/serviceWorker/workbox-813eeb66.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"workbox-813eeb66.js","sources":["node_modules/workbox-core/_version.js","node_modules/workbox-core/_private/logger.js","node_modules/workbox-core/models/messages/messageGenerator.js","node_modules/workbox-core/_private/WorkboxError.js","node_modules/workbox-routing/_version.js","node_modules/workbox-routing/utils/constants.js","node_modules/workbox-routing/utils/normalizeHandler.js","node_modules/workbox-routing/Route.js","node_modules/workbox-routing/RegExpRoute.js","node_modules/workbox-routing/Router.js","node_modules/workbox-routing/utils/getOrCreateDefaultRouter.js","node_modules/workbox-routing/registerRoute.js","node_modules/workbox-core/_private/cacheNames.js","node_modules/workbox-core/_private/dontWaitFor.js","node_modules/workbox-core/models/quotaErrorCallbacks.js","node_modules/idb/build/wrap-idb-value.js","node_modules/idb/build/index.js","node_modules/workbox-expiration/_version.js","node_modules/workbox-expiration/models/CacheTimestampsModel.js","node_modules/workbox-expiration/CacheExpiration.js","node_modules/workbox-core/_private/cacheMatchIgnoreParams.js","node_modules/workbox-core/_private/Deferred.js","node_modules/workbox-strategies/_version.js","node_modules/workbox-strategies/StrategyHandler.js","node_modules/workbox-core/_private/timeout.js","node_modules/workbox-core/_private/getFriendlyURL.js","node_modules/workbox-core/_private/executeQuotaErrorCallbacks.js","node_modules/workbox-strategies/Strategy.js","node_modules/workbox-cacheable-response/_version.js","node_modules/workbox-cacheable-response/CacheableResponse.js","node_modules/workbox-strategies/plugins/cacheOkAndOpaquePlugin.js","node_modules/workbox-core/_private/waitUntil.js","node_modules/workbox-precaching/_version.js","node_modules/workbox-precaching/utils/createCacheKey.js","node_modules/workbox-precaching/utils/PrecacheInstallReportPlugin.js","node_modules/workbox-precaching/utils/PrecacheCacheKeyPlugin.js","node_modules/workbox-core/_private/canConstructResponseFromBodyStream.js","node_modules/workbox-precaching/utils/getOrCreatePrecacheController.js","node_modules/workbox-core/copyResponse.js","node_modules/workbox-precaching/PrecacheStrategy.js","node_modules/workbox-precaching/PrecacheController.js","node_modules/workbox-precaching/PrecacheRoute.js","node_modules/workbox-precaching/utils/generateURLVariations.js","node_modules/workbox-precaching/utils/removeIgnoredSearchParams.js","node_modules/workbox-strategies/CacheFirst.js","node_modules/workbox-cacheable-response/CacheableResponsePlugin.js","node_modules/workbox-expiration/ExpirationPlugin.js","node_modules/workbox-core/registerQuotaErrorCallback.js","node_modules/workbox-strategies/NetworkFirst.js","node_modules/workbox-precaching/precacheAndRoute.js","node_modules/workbox-precaching/precache.js","node_modules/workbox-precaching/addRoute.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:core:7.3.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst logger = (process.env.NODE_ENV === 'production'\n ? null\n : (() => {\n // Don't overwrite this value if it's already set.\n // See https://github.com/GoogleChrome/workbox/pull/2284#issuecomment-560470923\n if (!('__WB_DISABLE_DEV_LOGS' in globalThis)) {\n self.__WB_DISABLE_DEV_LOGS = false;\n }\n let inGroup = false;\n const methodToColorMap = {\n debug: `#7f8c8d`,\n log: `#2ecc71`,\n warn: `#f39c12`,\n error: `#c0392b`,\n groupCollapsed: `#3498db`,\n groupEnd: null, // No colored prefix on groupEnd\n };\n const print = function (method, args) {\n if (self.__WB_DISABLE_DEV_LOGS) {\n return;\n }\n if (method === 'groupCollapsed') {\n // Safari doesn't print all console.groupCollapsed() arguments:\n // https://bugs.webkit.org/show_bug.cgi?id=182754\n if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n console[method](...args);\n return;\n }\n }\n const styles = [\n `background: ${methodToColorMap[method]}`,\n `border-radius: 0.5em`,\n `color: white`,\n `font-weight: bold`,\n `padding: 2px 0.5em`,\n ];\n // When in a group, the workbox prefix is not displayed.\n const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')];\n console[method](...logPrefix, ...args);\n if (method === 'groupCollapsed') {\n inGroup = true;\n }\n if (method === 'groupEnd') {\n inGroup = false;\n }\n };\n // eslint-disable-next-line @typescript-eslint/ban-types\n const api = {};\n const loggerMethods = Object.keys(methodToColorMap);\n for (const key of loggerMethods) {\n const method = key;\n api[method] = (...args) => {\n print(method, args);\n };\n }\n return api;\n })());\nexport { logger };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { messages } from './messages.js';\nimport '../../_version.js';\nconst fallback = (code, ...args) => {\n let msg = code;\n if (args.length > 0) {\n msg += ` :: ${JSON.stringify(args)}`;\n }\n return msg;\n};\nconst generatorFunction = (code, details = {}) => {\n const message = messages[code];\n if (!message) {\n throw new Error(`Unable to find message for code '${code}'.`);\n }\n return message(details);\n};\nexport const messageGenerator = process.env.NODE_ENV === 'production' ? fallback : generatorFunction;\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { messageGenerator } from '../models/messages/messageGenerator.js';\nimport '../_version.js';\n/**\n * Workbox errors should be thrown with this class.\n * This allows use to ensure the type easily in tests,\n * helps developers identify errors from workbox\n * easily and allows use to optimise error\n * messages correctly.\n *\n * @private\n */\nclass WorkboxError extends Error {\n /**\n *\n * @param {string} errorCode The error code that\n * identifies this particular error.\n * @param {Object=} details Any relevant arguments\n * that will help developers identify issues should\n * be added as a key on the context object.\n */\n constructor(errorCode, details) {\n const message = messageGenerator(errorCode, details);\n super(message);\n this.name = errorCode;\n this.details = details;\n }\n}\nexport { WorkboxError };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:routing:7.3.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The default HTTP method, 'GET', used when there's no specific method\n * configured for a route.\n *\n * @type {string}\n *\n * @private\n */\nexport const defaultMethod = 'GET';\n/**\n * The list of valid HTTP methods associated with requests that could be routed.\n *\n * @type {Array}\n *\n * @private\n */\nexport const validMethods = [\n 'DELETE',\n 'GET',\n 'HEAD',\n 'PATCH',\n 'POST',\n 'PUT',\n];\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport '../_version.js';\n/**\n * @param {function()|Object} handler Either a function, or an object with a\n * 'handle' method.\n * @return {Object} An object with a handle method.\n *\n * @private\n */\nexport const normalizeHandler = (handler) => {\n if (handler && typeof handler === 'object') {\n if (process.env.NODE_ENV !== 'production') {\n assert.hasMethod(handler, 'handle', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'handler',\n });\n }\n return handler;\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(handler, 'function', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'handler',\n });\n }\n return { handle: handler };\n }\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { defaultMethod, validMethods } from './utils/constants.js';\nimport { normalizeHandler } from './utils/normalizeHandler.js';\nimport './_version.js';\n/**\n * A `Route` consists of a pair of callback functions, \"match\" and \"handler\".\n * The \"match\" callback determine if a route should be used to \"handle\" a\n * request by returning a non-falsy value if it can. The \"handler\" callback\n * is called when there is a match and should return a Promise that resolves\n * to a `Response`.\n *\n * @memberof workbox-routing\n */\nclass Route {\n /**\n * Constructor for Route class.\n *\n * @param {workbox-routing~matchCallback} match\n * A callback function that determines whether the route matches a given\n * `fetch` event by returning a non-falsy value.\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resolving to a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n */\n constructor(match, handler, method = defaultMethod) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(match, 'function', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'match',\n });\n if (method) {\n assert.isOneOf(method, validMethods, { paramName: 'method' });\n }\n }\n // These values are referenced directly by Router so cannot be\n // altered by minificaton.\n this.handler = normalizeHandler(handler);\n this.match = match;\n this.method = method;\n }\n /**\n *\n * @param {workbox-routing-handlerCallback} handler A callback\n * function that returns a Promise resolving to a Response\n */\n setCatchHandler(handler) {\n this.catchHandler = normalizeHandler(handler);\n }\n}\nexport { Route };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { Route } from './Route.js';\nimport './_version.js';\n/**\n * RegExpRoute makes it easy to create a regular expression based\n * {@link workbox-routing.Route}.\n *\n * For same-origin requests the RegExp only needs to match part of the URL. For\n * requests against third-party servers, you must define a RegExp that matches\n * the start of the URL.\n *\n * @memberof workbox-routing\n * @extends workbox-routing.Route\n */\nclass RegExpRoute extends Route {\n /**\n * If the regular expression contains\n * [capture groups]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#grouping-back-references},\n * the captured values will be passed to the\n * {@link workbox-routing~handlerCallback} `params`\n * argument.\n *\n * @param {RegExp} regExp The regular expression to match against URLs.\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n */\n constructor(regExp, handler, method) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(regExp, RegExp, {\n moduleName: 'workbox-routing',\n className: 'RegExpRoute',\n funcName: 'constructor',\n paramName: 'pattern',\n });\n }\n const match = ({ url }) => {\n const result = regExp.exec(url.href);\n // Return immediately if there's no match.\n if (!result) {\n return;\n }\n // Require that the match start at the first character in the URL string\n // if it's a cross-origin request.\n // See https://github.com/GoogleChrome/workbox/issues/281 for the context\n // behind this behavior.\n if (url.origin !== location.origin && result.index !== 0) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`The regular expression '${regExp.toString()}' only partially matched ` +\n `against the cross-origin URL '${url.toString()}'. RegExpRoute's will only ` +\n `handle cross-origin requests if they match the entire URL.`);\n }\n return;\n }\n // If the route matches, but there aren't any capture groups defined, then\n // this will return [], which is truthy and therefore sufficient to\n // indicate a match.\n // If there are capture groups, then it will return their values.\n return result.slice(1);\n };\n super(match, handler, method);\n }\n}\nexport { RegExpRoute };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { defaultMethod } from './utils/constants.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { normalizeHandler } from './utils/normalizeHandler.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport './_version.js';\n/**\n * The Router can be used to process a `FetchEvent` using one or more\n * {@link workbox-routing.Route}, responding with a `Response` if\n * a matching route exists.\n *\n * If no route matches a given a request, the Router will use a \"default\"\n * handler if one is defined.\n *\n * Should the matching Route throw an error, the Router will use a \"catch\"\n * handler if one is defined to gracefully deal with issues and respond with a\n * Request.\n *\n * If a request matches multiple routes, the **earliest** registered route will\n * be used to respond to the request.\n *\n * @memberof workbox-routing\n */\nclass Router {\n /**\n * Initializes a new Router.\n */\n constructor() {\n this._routes = new Map();\n this._defaultHandlerMap = new Map();\n }\n /**\n * @return {Map>} routes A `Map` of HTTP\n * method name ('GET', etc.) to an array of all the corresponding `Route`\n * instances that are registered.\n */\n get routes() {\n return this._routes;\n }\n /**\n * Adds a fetch event listener to respond to events when a route matches\n * the event's request.\n */\n addFetchListener() {\n // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705\n self.addEventListener('fetch', ((event) => {\n const { request } = event;\n const responsePromise = this.handleRequest({ request, event });\n if (responsePromise) {\n event.respondWith(responsePromise);\n }\n }));\n }\n /**\n * Adds a message event listener for URLs to cache from the window.\n * This is useful to cache resources loaded on the page prior to when the\n * service worker started controlling it.\n *\n * The format of the message data sent from the window should be as follows.\n * Where the `urlsToCache` array may consist of URL strings or an array of\n * URL string + `requestInit` object (the same as you'd pass to `fetch()`).\n *\n * ```\n * {\n * type: 'CACHE_URLS',\n * payload: {\n * urlsToCache: [\n * './script1.js',\n * './script2.js',\n * ['./script3.js', {mode: 'no-cors'}],\n * ],\n * },\n * }\n * ```\n */\n addCacheListener() {\n // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705\n self.addEventListener('message', ((event) => {\n // event.data is type 'any'\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (event.data && event.data.type === 'CACHE_URLS') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const { payload } = event.data;\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Caching URLs from the window`, payload.urlsToCache);\n }\n const requestPromises = Promise.all(payload.urlsToCache.map((entry) => {\n if (typeof entry === 'string') {\n entry = [entry];\n }\n const request = new Request(...entry);\n return this.handleRequest({ request, event });\n // TODO(philipwalton): TypeScript errors without this typecast for\n // some reason (probably a bug). The real type here should work but\n // doesn't: `Array | undefined>`.\n })); // TypeScript\n event.waitUntil(requestPromises);\n // If a MessageChannel was used, reply to the message on success.\n if (event.ports && event.ports[0]) {\n void requestPromises.then(() => event.ports[0].postMessage(true));\n }\n }\n }));\n }\n /**\n * Apply the routing rules to a FetchEvent object to get a Response from an\n * appropriate Route's handler.\n *\n * @param {Object} options\n * @param {Request} options.request The request to handle.\n * @param {ExtendableEvent} options.event The event that triggered the\n * request.\n * @return {Promise|undefined} A promise is returned if a\n * registered route can handle the request. If there is no matching\n * route and there's no `defaultHandler`, `undefined` is returned.\n */\n handleRequest({ request, event, }) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'handleRequest',\n paramName: 'options.request',\n });\n }\n const url = new URL(request.url, location.href);\n if (!url.protocol.startsWith('http')) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Workbox Router only supports URLs that start with 'http'.`);\n }\n return;\n }\n const sameOrigin = url.origin === location.origin;\n const { params, route } = this.findMatchingRoute({\n event,\n request,\n sameOrigin,\n url,\n });\n let handler = route && route.handler;\n const debugMessages = [];\n if (process.env.NODE_ENV !== 'production') {\n if (handler) {\n debugMessages.push([`Found a route to handle this request:`, route]);\n if (params) {\n debugMessages.push([\n `Passing the following params to the route's handler:`,\n params,\n ]);\n }\n }\n }\n // If we don't have a handler because there was no matching route, then\n // fall back to defaultHandler if that's defined.\n const method = request.method;\n if (!handler && this._defaultHandlerMap.has(method)) {\n if (process.env.NODE_ENV !== 'production') {\n debugMessages.push(`Failed to find a matching route. Falling ` +\n `back to the default handler for ${method}.`);\n }\n handler = this._defaultHandlerMap.get(method);\n }\n if (!handler) {\n if (process.env.NODE_ENV !== 'production') {\n // No handler so Workbox will do nothing. If logs is set of debug\n // i.e. verbose, we should print out this information.\n logger.debug(`No route found for: ${getFriendlyURL(url)}`);\n }\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // We have a handler, meaning Workbox is going to handle the route.\n // print the routing details to the console.\n logger.groupCollapsed(`Router is responding to: ${getFriendlyURL(url)}`);\n debugMessages.forEach((msg) => {\n if (Array.isArray(msg)) {\n logger.log(...msg);\n }\n else {\n logger.log(msg);\n }\n });\n logger.groupEnd();\n }\n // Wrap in try and catch in case the handle method throws a synchronous\n // error. It should still callback to the catch handler.\n let responsePromise;\n try {\n responsePromise = handler.handle({ url, request, event, params });\n }\n catch (err) {\n responsePromise = Promise.reject(err);\n }\n // Get route's catch handler, if it exists\n const catchHandler = route && route.catchHandler;\n if (responsePromise instanceof Promise &&\n (this._catchHandler || catchHandler)) {\n responsePromise = responsePromise.catch(async (err) => {\n // If there's a route catch handler, process that first\n if (catchHandler) {\n if (process.env.NODE_ENV !== 'production') {\n // Still include URL here as it will be async from the console group\n // and may not make sense without the URL\n logger.groupCollapsed(`Error thrown when responding to: ` +\n ` ${getFriendlyURL(url)}. Falling back to route's Catch Handler.`);\n logger.error(`Error thrown by:`, route);\n logger.error(err);\n logger.groupEnd();\n }\n try {\n return await catchHandler.handle({ url, request, event, params });\n }\n catch (catchErr) {\n if (catchErr instanceof Error) {\n err = catchErr;\n }\n }\n }\n if (this._catchHandler) {\n if (process.env.NODE_ENV !== 'production') {\n // Still include URL here as it will be async from the console group\n // and may not make sense without the URL\n logger.groupCollapsed(`Error thrown when responding to: ` +\n ` ${getFriendlyURL(url)}. Falling back to global Catch Handler.`);\n logger.error(`Error thrown by:`, route);\n logger.error(err);\n logger.groupEnd();\n }\n return this._catchHandler.handle({ url, request, event });\n }\n throw err;\n });\n }\n return responsePromise;\n }\n /**\n * Checks a request and URL (and optionally an event) against the list of\n * registered routes, and if there's a match, returns the corresponding\n * route along with any params generated by the match.\n *\n * @param {Object} options\n * @param {URL} options.url\n * @param {boolean} options.sameOrigin The result of comparing `url.origin`\n * against the current origin.\n * @param {Request} options.request The request to match.\n * @param {Event} options.event The corresponding event.\n * @return {Object} An object with `route` and `params` properties.\n * They are populated if a matching route was found or `undefined`\n * otherwise.\n */\n findMatchingRoute({ url, sameOrigin, request, event, }) {\n const routes = this._routes.get(request.method) || [];\n for (const route of routes) {\n let params;\n // route.match returns type any, not possible to change right now.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const matchResult = route.match({ url, sameOrigin, request, event });\n if (matchResult) {\n if (process.env.NODE_ENV !== 'production') {\n // Warn developers that using an async matchCallback is almost always\n // not the right thing to do.\n if (matchResult instanceof Promise) {\n logger.warn(`While routing ${getFriendlyURL(url)}, an async ` +\n `matchCallback function was used. Please convert the ` +\n `following route to use a synchronous matchCallback function:`, route);\n }\n }\n // See https://github.com/GoogleChrome/workbox/issues/2079\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n params = matchResult;\n if (Array.isArray(params) && params.length === 0) {\n // Instead of passing an empty array in as params, use undefined.\n params = undefined;\n }\n else if (matchResult.constructor === Object && // eslint-disable-line\n Object.keys(matchResult).length === 0) {\n // Instead of passing an empty object in as params, use undefined.\n params = undefined;\n }\n else if (typeof matchResult === 'boolean') {\n // For the boolean value true (rather than just something truth-y),\n // don't set params.\n // See https://github.com/GoogleChrome/workbox/pull/2134#issuecomment-513924353\n params = undefined;\n }\n // Return early if have a match.\n return { route, params };\n }\n }\n // If no match was found above, return and empty object.\n return {};\n }\n /**\n * Define a default `handler` that's called when no routes explicitly\n * match the incoming request.\n *\n * Each HTTP method ('GET', 'POST', etc.) gets its own default handler.\n *\n * Without a default handler, unmatched requests will go against the\n * network as if there were no service worker present.\n *\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {string} [method='GET'] The HTTP method to associate with this\n * default handler. Each method has its own default.\n */\n setDefaultHandler(handler, method = defaultMethod) {\n this._defaultHandlerMap.set(method, normalizeHandler(handler));\n }\n /**\n * If a Route throws an error while handling a request, this `handler`\n * will be called and given a chance to provide a response.\n *\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n */\n setCatchHandler(handler) {\n this._catchHandler = normalizeHandler(handler);\n }\n /**\n * Registers a route with the router.\n *\n * @param {workbox-routing.Route} route The route to register.\n */\n registerRoute(route) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(route, 'object', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.hasMethod(route, 'match', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.isType(route.handler, 'object', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.hasMethod(route.handler, 'handle', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route.handler',\n });\n assert.isType(route.method, 'string', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route.method',\n });\n }\n if (!this._routes.has(route.method)) {\n this._routes.set(route.method, []);\n }\n // Give precedence to all of the earlier routes by adding this additional\n // route to the end of the array.\n this._routes.get(route.method).push(route);\n }\n /**\n * Unregisters a route with the router.\n *\n * @param {workbox-routing.Route} route The route to unregister.\n */\n unregisterRoute(route) {\n if (!this._routes.has(route.method)) {\n throw new WorkboxError('unregister-route-but-not-found-with-method', {\n method: route.method,\n });\n }\n const routeIndex = this._routes.get(route.method).indexOf(route);\n if (routeIndex > -1) {\n this._routes.get(route.method).splice(routeIndex, 1);\n }\n else {\n throw new WorkboxError('unregister-route-route-not-registered');\n }\n }\n}\nexport { Router };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { Router } from '../Router.js';\nimport '../_version.js';\nlet defaultRouter;\n/**\n * Creates a new, singleton Router instance if one does not exist. If one\n * does already exist, that instance is returned.\n *\n * @private\n * @return {Router}\n */\nexport const getOrCreateDefaultRouter = () => {\n if (!defaultRouter) {\n defaultRouter = new Router();\n // The helpers that use the default Router assume these listeners exist.\n defaultRouter.addFetchListener();\n defaultRouter.addCacheListener();\n }\n return defaultRouter;\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { Route } from './Route.js';\nimport { RegExpRoute } from './RegExpRoute.js';\nimport { getOrCreateDefaultRouter } from './utils/getOrCreateDefaultRouter.js';\nimport './_version.js';\n/**\n * Easily register a RegExp, string, or function with a caching\n * strategy to a singleton Router instance.\n *\n * This method will generate a Route for you if needed and\n * call {@link workbox-routing.Router#registerRoute}.\n *\n * @param {RegExp|string|workbox-routing.Route~matchCallback|workbox-routing.Route} capture\n * If the capture param is a `Route`, all other arguments will be ignored.\n * @param {workbox-routing~handlerCallback} [handler] A callback\n * function that returns a Promise resulting in a Response. This parameter\n * is required if `capture` is not a `Route` object.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n * @return {workbox-routing.Route} The generated `Route`.\n *\n * @memberof workbox-routing\n */\nfunction registerRoute(capture, handler, method) {\n let route;\n if (typeof capture === 'string') {\n const captureUrl = new URL(capture, location.href);\n if (process.env.NODE_ENV !== 'production') {\n if (!(capture.startsWith('/') || capture.startsWith('http'))) {\n throw new WorkboxError('invalid-string', {\n moduleName: 'workbox-routing',\n funcName: 'registerRoute',\n paramName: 'capture',\n });\n }\n // We want to check if Express-style wildcards are in the pathname only.\n // TODO: Remove this log message in v4.\n const valueToCheck = capture.startsWith('http')\n ? captureUrl.pathname\n : capture;\n // See https://github.com/pillarjs/path-to-regexp#parameters\n const wildcards = '[*:?+]';\n if (new RegExp(`${wildcards}`).exec(valueToCheck)) {\n logger.debug(`The '$capture' parameter contains an Express-style wildcard ` +\n `character (${wildcards}). Strings are now always interpreted as ` +\n `exact matches; use a RegExp for partial or wildcard matches.`);\n }\n }\n const matchCallback = ({ url }) => {\n if (process.env.NODE_ENV !== 'production') {\n if (url.pathname === captureUrl.pathname &&\n url.origin !== captureUrl.origin) {\n logger.debug(`${capture} only partially matches the cross-origin URL ` +\n `${url.toString()}. This route will only handle cross-origin requests ` +\n `if they match the entire URL.`);\n }\n }\n return url.href === captureUrl.href;\n };\n // If `capture` is a string then `handler` and `method` must be present.\n route = new Route(matchCallback, handler, method);\n }\n else if (capture instanceof RegExp) {\n // If `capture` is a `RegExp` then `handler` and `method` must be present.\n route = new RegExpRoute(capture, handler, method);\n }\n else if (typeof capture === 'function') {\n // If `capture` is a function then `handler` and `method` must be present.\n route = new Route(capture, handler, method);\n }\n else if (capture instanceof Route) {\n route = capture;\n }\n else {\n throw new WorkboxError('unsupported-route-type', {\n moduleName: 'workbox-routing',\n funcName: 'registerRoute',\n paramName: 'capture',\n });\n }\n const defaultRouter = getOrCreateDefaultRouter();\n defaultRouter.registerRoute(route);\n return route;\n}\nexport { registerRoute };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst _cacheNameDetails = {\n googleAnalytics: 'googleAnalytics',\n precache: 'precache-v2',\n prefix: 'workbox',\n runtime: 'runtime',\n suffix: typeof registration !== 'undefined' ? registration.scope : '',\n};\nconst _createCacheName = (cacheName) => {\n return [_cacheNameDetails.prefix, cacheName, _cacheNameDetails.suffix]\n .filter((value) => value && value.length > 0)\n .join('-');\n};\nconst eachCacheNameDetail = (fn) => {\n for (const key of Object.keys(_cacheNameDetails)) {\n fn(key);\n }\n};\nexport const cacheNames = {\n updateDetails: (details) => {\n eachCacheNameDetail((key) => {\n if (typeof details[key] === 'string') {\n _cacheNameDetails[key] = details[key];\n }\n });\n },\n getGoogleAnalyticsName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.googleAnalytics);\n },\n getPrecacheName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.precache);\n },\n getPrefix: () => {\n return _cacheNameDetails.prefix;\n },\n getRuntimeName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.runtime);\n },\n getSuffix: () => {\n return _cacheNameDetails.suffix;\n },\n};\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A helper function that prevents a promise from being flagged as unused.\n *\n * @private\n **/\nexport function dontWaitFor(promise) {\n // Effective no-op.\n void promise.then(() => { });\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n// Callbacks to be executed whenever there's a quota error.\n// Can't change Function type right now.\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst quotaErrorCallbacks = new Set();\nexport { quotaErrorCallbacks };\n","const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);\n\nlet idbProxyableTypes;\nlet cursorAdvanceMethods;\n// This is a function to prevent it throwing up in node environments.\nfunction getIdbProxyableTypes() {\n return (idbProxyableTypes ||\n (idbProxyableTypes = [\n IDBDatabase,\n IDBObjectStore,\n IDBIndex,\n IDBCursor,\n IDBTransaction,\n ]));\n}\n// This is a function to prevent it throwing up in node environments.\nfunction getCursorAdvanceMethods() {\n return (cursorAdvanceMethods ||\n (cursorAdvanceMethods = [\n IDBCursor.prototype.advance,\n IDBCursor.prototype.continue,\n IDBCursor.prototype.continuePrimaryKey,\n ]));\n}\nconst cursorRequestMap = new WeakMap();\nconst transactionDoneMap = new WeakMap();\nconst transactionStoreNamesMap = new WeakMap();\nconst transformCache = new WeakMap();\nconst reverseTransformCache = new WeakMap();\nfunction promisifyRequest(request) {\n const promise = new Promise((resolve, reject) => {\n const unlisten = () => {\n request.removeEventListener('success', success);\n request.removeEventListener('error', error);\n };\n const success = () => {\n resolve(wrap(request.result));\n unlisten();\n };\n const error = () => {\n reject(request.error);\n unlisten();\n };\n request.addEventListener('success', success);\n request.addEventListener('error', error);\n });\n promise\n .then((value) => {\n // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval\n // (see wrapFunction).\n if (value instanceof IDBCursor) {\n cursorRequestMap.set(value, request);\n }\n // Catching to avoid \"Uncaught Promise exceptions\"\n })\n .catch(() => { });\n // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This\n // is because we create many promises from a single IDBRequest.\n reverseTransformCache.set(promise, request);\n return promise;\n}\nfunction cacheDonePromiseForTransaction(tx) {\n // Early bail if we've already created a done promise for this transaction.\n if (transactionDoneMap.has(tx))\n return;\n const done = new Promise((resolve, reject) => {\n const unlisten = () => {\n tx.removeEventListener('complete', complete);\n tx.removeEventListener('error', error);\n tx.removeEventListener('abort', error);\n };\n const complete = () => {\n resolve();\n unlisten();\n };\n const error = () => {\n reject(tx.error || new DOMException('AbortError', 'AbortError'));\n unlisten();\n };\n tx.addEventListener('complete', complete);\n tx.addEventListener('error', error);\n tx.addEventListener('abort', error);\n });\n // Cache it for later retrieval.\n transactionDoneMap.set(tx, done);\n}\nlet idbProxyTraps = {\n get(target, prop, receiver) {\n if (target instanceof IDBTransaction) {\n // Special handling for transaction.done.\n if (prop === 'done')\n return transactionDoneMap.get(target);\n // Polyfill for objectStoreNames because of Edge.\n if (prop === 'objectStoreNames') {\n return target.objectStoreNames || transactionStoreNamesMap.get(target);\n }\n // Make tx.store return the only store in the transaction, or undefined if there are many.\n if (prop === 'store') {\n return receiver.objectStoreNames[1]\n ? undefined\n : receiver.objectStore(receiver.objectStoreNames[0]);\n }\n }\n // Else transform whatever we get back.\n return wrap(target[prop]);\n },\n set(target, prop, value) {\n target[prop] = value;\n return true;\n },\n has(target, prop) {\n if (target instanceof IDBTransaction &&\n (prop === 'done' || prop === 'store')) {\n return true;\n }\n return prop in target;\n },\n};\nfunction replaceTraps(callback) {\n idbProxyTraps = callback(idbProxyTraps);\n}\nfunction wrapFunction(func) {\n // Due to expected object equality (which is enforced by the caching in `wrap`), we\n // only create one new func per func.\n // Edge doesn't support objectStoreNames (booo), so we polyfill it here.\n if (func === IDBDatabase.prototype.transaction &&\n !('objectStoreNames' in IDBTransaction.prototype)) {\n return function (storeNames, ...args) {\n const tx = func.call(unwrap(this), storeNames, ...args);\n transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]);\n return wrap(tx);\n };\n }\n // Cursor methods are special, as the behaviour is a little more different to standard IDB. In\n // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the\n // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense\n // with real promises, so each advance methods returns a new promise for the cursor object, or\n // undefined if the end of the cursor has been reached.\n if (getCursorAdvanceMethods().includes(func)) {\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n func.apply(unwrap(this), args);\n return wrap(cursorRequestMap.get(this));\n };\n }\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n return wrap(func.apply(unwrap(this), args));\n };\n}\nfunction transformCachableValue(value) {\n if (typeof value === 'function')\n return wrapFunction(value);\n // This doesn't return, it just creates a 'done' promise for the transaction,\n // which is later returned for transaction.done (see idbObjectHandler).\n if (value instanceof IDBTransaction)\n cacheDonePromiseForTransaction(value);\n if (instanceOfAny(value, getIdbProxyableTypes()))\n return new Proxy(value, idbProxyTraps);\n // Return the same value back if we're not going to transform it.\n return value;\n}\nfunction wrap(value) {\n // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because\n // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.\n if (value instanceof IDBRequest)\n return promisifyRequest(value);\n // If we've already transformed this value before, reuse the transformed value.\n // This is faster, but it also provides object equality.\n if (transformCache.has(value))\n return transformCache.get(value);\n const newValue = transformCachableValue(value);\n // Not all types are transformed.\n // These may be primitive types, so they can't be WeakMap keys.\n if (newValue !== value) {\n transformCache.set(value, newValue);\n reverseTransformCache.set(newValue, value);\n }\n return newValue;\n}\nconst unwrap = (value) => reverseTransformCache.get(value);\n\nexport { reverseTransformCache as a, instanceOfAny as i, replaceTraps as r, unwrap as u, wrap as w };\n","import { w as wrap, r as replaceTraps } from './wrap-idb-value.js';\nexport { u as unwrap, w as wrap } from './wrap-idb-value.js';\n\n/**\n * Open a database.\n *\n * @param name Name of the database.\n * @param version Schema version.\n * @param callbacks Additional callbacks.\n */\nfunction openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {\n const request = indexedDB.open(name, version);\n const openPromise = wrap(request);\n if (upgrade) {\n request.addEventListener('upgradeneeded', (event) => {\n upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);\n });\n }\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event.newVersion, event));\n }\n openPromise\n .then((db) => {\n if (terminated)\n db.addEventListener('close', () => terminated());\n if (blocking) {\n db.addEventListener('versionchange', (event) => blocking(event.oldVersion, event.newVersion, event));\n }\n })\n .catch(() => { });\n return openPromise;\n}\n/**\n * Delete a database.\n *\n * @param name Name of the database.\n */\nfunction deleteDB(name, { blocked } = {}) {\n const request = indexedDB.deleteDatabase(name);\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event));\n }\n return wrap(request).then(() => undefined);\n}\n\nconst readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];\nconst writeMethods = ['put', 'add', 'delete', 'clear'];\nconst cachedMethods = new Map();\nfunction getMethod(target, prop) {\n if (!(target instanceof IDBDatabase &&\n !(prop in target) &&\n typeof prop === 'string')) {\n return;\n }\n if (cachedMethods.get(prop))\n return cachedMethods.get(prop);\n const targetFuncName = prop.replace(/FromIndex$/, '');\n const useIndex = prop !== targetFuncName;\n const isWrite = writeMethods.includes(targetFuncName);\n if (\n // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.\n !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||\n !(isWrite || readMethods.includes(targetFuncName))) {\n return;\n }\n const method = async function (storeName, ...args) {\n // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(\n const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');\n let target = tx.store;\n if (useIndex)\n target = target.index(args.shift());\n // Must reject if op rejects.\n // If it's a write operation, must reject if tx.done rejects.\n // Must reject with op rejection first.\n // Must resolve with op value.\n // Must handle both promises (no unhandled rejections)\n return (await Promise.all([\n target[targetFuncName](...args),\n isWrite && tx.done,\n ]))[0];\n };\n cachedMethods.set(prop, method);\n return method;\n}\nreplaceTraps((oldTraps) => ({\n ...oldTraps,\n get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop),\n}));\n\nexport { deleteDB, openDB };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:expiration:7.3.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { openDB, deleteDB } from 'idb';\nimport '../_version.js';\nconst DB_NAME = 'workbox-expiration';\nconst CACHE_OBJECT_STORE = 'cache-entries';\nconst normalizeURL = (unNormalizedUrl) => {\n const url = new URL(unNormalizedUrl, location.href);\n url.hash = '';\n return url.href;\n};\n/**\n * Returns the timestamp model.\n *\n * @private\n */\nclass CacheTimestampsModel {\n /**\n *\n * @param {string} cacheName\n *\n * @private\n */\n constructor(cacheName) {\n this._db = null;\n this._cacheName = cacheName;\n }\n /**\n * Performs an upgrade of indexedDB.\n *\n * @param {IDBPDatabase} db\n *\n * @private\n */\n _upgradeDb(db) {\n // TODO(philipwalton): EdgeHTML doesn't support arrays as a keyPath, so we\n // have to use the `id` keyPath here and create our own values (a\n // concatenation of `url + cacheName`) instead of simply using\n // `keyPath: ['url', 'cacheName']`, which is supported in other browsers.\n const objStore = db.createObjectStore(CACHE_OBJECT_STORE, { keyPath: 'id' });\n // TODO(philipwalton): once we don't have to support EdgeHTML, we can\n // create a single index with the keyPath `['cacheName', 'timestamp']`\n // instead of doing both these indexes.\n objStore.createIndex('cacheName', 'cacheName', { unique: false });\n objStore.createIndex('timestamp', 'timestamp', { unique: false });\n }\n /**\n * Performs an upgrade of indexedDB and deletes deprecated DBs.\n *\n * @param {IDBPDatabase} db\n *\n * @private\n */\n _upgradeDbAndDeleteOldDbs(db) {\n this._upgradeDb(db);\n if (this._cacheName) {\n void deleteDB(this._cacheName);\n }\n }\n /**\n * @param {string} url\n * @param {number} timestamp\n *\n * @private\n */\n async setTimestamp(url, timestamp) {\n url = normalizeURL(url);\n const entry = {\n url,\n timestamp,\n cacheName: this._cacheName,\n // Creating an ID from the URL and cache name won't be necessary once\n // Edge switches to Chromium and all browsers we support work with\n // array keyPaths.\n id: this._getId(url),\n };\n const db = await this.getDb();\n const tx = db.transaction(CACHE_OBJECT_STORE, 'readwrite', {\n durability: 'relaxed',\n });\n await tx.store.put(entry);\n await tx.done;\n }\n /**\n * Returns the timestamp stored for a given URL.\n *\n * @param {string} url\n * @return {number | undefined}\n *\n * @private\n */\n async getTimestamp(url) {\n const db = await this.getDb();\n const entry = await db.get(CACHE_OBJECT_STORE, this._getId(url));\n return entry === null || entry === void 0 ? void 0 : entry.timestamp;\n }\n /**\n * Iterates through all the entries in the object store (from newest to\n * oldest) and removes entries once either `maxCount` is reached or the\n * entry's timestamp is less than `minTimestamp`.\n *\n * @param {number} minTimestamp\n * @param {number} maxCount\n * @return {Array}\n *\n * @private\n */\n async expireEntries(minTimestamp, maxCount) {\n const db = await this.getDb();\n let cursor = await db\n .transaction(CACHE_OBJECT_STORE)\n .store.index('timestamp')\n .openCursor(null, 'prev');\n const entriesToDelete = [];\n let entriesNotDeletedCount = 0;\n while (cursor) {\n const result = cursor.value;\n // TODO(philipwalton): once we can use a multi-key index, we\n // won't have to check `cacheName` here.\n if (result.cacheName === this._cacheName) {\n // Delete an entry if it's older than the max age or\n // if we already have the max number allowed.\n if ((minTimestamp && result.timestamp < minTimestamp) ||\n (maxCount && entriesNotDeletedCount >= maxCount)) {\n // TODO(philipwalton): we should be able to delete the\n // entry right here, but doing so causes an iteration\n // bug in Safari stable (fixed in TP). Instead we can\n // store the keys of the entries to delete, and then\n // delete the separate transactions.\n // https://github.com/GoogleChrome/workbox/issues/1978\n // cursor.delete();\n // We only need to return the URL, not the whole entry.\n entriesToDelete.push(cursor.value);\n }\n else {\n entriesNotDeletedCount++;\n }\n }\n cursor = await cursor.continue();\n }\n // TODO(philipwalton): once the Safari bug in the following issue is fixed,\n // we should be able to remove this loop and do the entry deletion in the\n // cursor loop above:\n // https://github.com/GoogleChrome/workbox/issues/1978\n const urlsDeleted = [];\n for (const entry of entriesToDelete) {\n await db.delete(CACHE_OBJECT_STORE, entry.id);\n urlsDeleted.push(entry.url);\n }\n return urlsDeleted;\n }\n /**\n * Takes a URL and returns an ID that will be unique in the object store.\n *\n * @param {string} url\n * @return {string}\n *\n * @private\n */\n _getId(url) {\n // Creating an ID from the URL and cache name won't be necessary once\n // Edge switches to Chromium and all browsers we support work with\n // array keyPaths.\n return this._cacheName + '|' + normalizeURL(url);\n }\n /**\n * Returns an open connection to the database.\n *\n * @private\n */\n async getDb() {\n if (!this._db) {\n this._db = await openDB(DB_NAME, 1, {\n upgrade: this._upgradeDbAndDeleteOldDbs.bind(this),\n });\n }\n return this._db;\n }\n}\nexport { CacheTimestampsModel };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { dontWaitFor } from 'workbox-core/_private/dontWaitFor.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { CacheTimestampsModel } from './models/CacheTimestampsModel.js';\nimport './_version.js';\n/**\n * The `CacheExpiration` class allows you define an expiration and / or\n * limit on the number of responses stored in a\n * [`Cache`](https://developer.mozilla.org/en-US/docs/Web/API/Cache).\n *\n * @memberof workbox-expiration\n */\nclass CacheExpiration {\n /**\n * To construct a new CacheExpiration instance you must provide at least\n * one of the `config` properties.\n *\n * @param {string} cacheName Name of the cache to apply restrictions to.\n * @param {Object} config\n * @param {number} [config.maxEntries] The maximum number of entries to cache.\n * Entries used the least will be removed as the maximum is reached.\n * @param {number} [config.maxAgeSeconds] The maximum age of an entry before\n * it's treated as stale and removed.\n * @param {Object} [config.matchOptions] The [`CacheQueryOptions`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/delete#Parameters)\n * that will be used when calling `delete()` on the cache.\n */\n constructor(cacheName, config = {}) {\n this._isRunning = false;\n this._rerunRequested = false;\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(cacheName, 'string', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n paramName: 'cacheName',\n });\n if (!(config.maxEntries || config.maxAgeSeconds)) {\n throw new WorkboxError('max-entries-or-age-required', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n });\n }\n if (config.maxEntries) {\n assert.isType(config.maxEntries, 'number', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n paramName: 'config.maxEntries',\n });\n }\n if (config.maxAgeSeconds) {\n assert.isType(config.maxAgeSeconds, 'number', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n paramName: 'config.maxAgeSeconds',\n });\n }\n }\n this._maxEntries = config.maxEntries;\n this._maxAgeSeconds = config.maxAgeSeconds;\n this._matchOptions = config.matchOptions;\n this._cacheName = cacheName;\n this._timestampModel = new CacheTimestampsModel(cacheName);\n }\n /**\n * Expires entries for the given cache and given criteria.\n */\n async expireEntries() {\n if (this._isRunning) {\n this._rerunRequested = true;\n return;\n }\n this._isRunning = true;\n const minTimestamp = this._maxAgeSeconds\n ? Date.now() - this._maxAgeSeconds * 1000\n : 0;\n const urlsExpired = await this._timestampModel.expireEntries(minTimestamp, this._maxEntries);\n // Delete URLs from the cache\n const cache = await self.caches.open(this._cacheName);\n for (const url of urlsExpired) {\n await cache.delete(url, this._matchOptions);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (urlsExpired.length > 0) {\n logger.groupCollapsed(`Expired ${urlsExpired.length} ` +\n `${urlsExpired.length === 1 ? 'entry' : 'entries'} and removed ` +\n `${urlsExpired.length === 1 ? 'it' : 'them'} from the ` +\n `'${this._cacheName}' cache.`);\n logger.log(`Expired the following ${urlsExpired.length === 1 ? 'URL' : 'URLs'}:`);\n urlsExpired.forEach((url) => logger.log(` ${url}`));\n logger.groupEnd();\n }\n else {\n logger.debug(`Cache expiration ran and found no entries to remove.`);\n }\n }\n this._isRunning = false;\n if (this._rerunRequested) {\n this._rerunRequested = false;\n dontWaitFor(this.expireEntries());\n }\n }\n /**\n * Update the timestamp for the given URL. This ensures the when\n * removing entries based on maximum entries, most recently used\n * is accurate or when expiring, the timestamp is up-to-date.\n *\n * @param {string} url\n */\n async updateTimestamp(url) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(url, 'string', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'updateTimestamp',\n paramName: 'url',\n });\n }\n await this._timestampModel.setTimestamp(url, Date.now());\n }\n /**\n * Can be used to check if a URL has expired or not before it's used.\n *\n * This requires a look up from IndexedDB, so can be slow.\n *\n * Note: This method will not remove the cached entry, call\n * `expireEntries()` to remove indexedDB and Cache entries.\n *\n * @param {string} url\n * @return {boolean}\n */\n async isURLExpired(url) {\n if (!this._maxAgeSeconds) {\n if (process.env.NODE_ENV !== 'production') {\n throw new WorkboxError(`expired-test-without-max-age`, {\n methodName: 'isURLExpired',\n paramName: 'maxAgeSeconds',\n });\n }\n return false;\n }\n else {\n const timestamp = await this._timestampModel.getTimestamp(url);\n const expireOlderThan = Date.now() - this._maxAgeSeconds * 1000;\n return timestamp !== undefined ? timestamp < expireOlderThan : true;\n }\n }\n /**\n * Removes the IndexedDB object store used to keep track of cache expiration\n * metadata.\n */\n async delete() {\n // Make sure we don't attempt another rerun if we're called in the middle of\n // a cache expiration.\n this._rerunRequested = false;\n await this._timestampModel.expireEntries(Infinity); // Expires all.\n }\n}\nexport { CacheExpiration };\n","/*\n Copyright 2020 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nfunction stripParams(fullURL, ignoreParams) {\n const strippedURL = new URL(fullURL);\n for (const param of ignoreParams) {\n strippedURL.searchParams.delete(param);\n }\n return strippedURL.href;\n}\n/**\n * Matches an item in the cache, ignoring specific URL params. This is similar\n * to the `ignoreSearch` option, but it allows you to ignore just specific\n * params (while continuing to match on the others).\n *\n * @private\n * @param {Cache} cache\n * @param {Request} request\n * @param {Object} matchOptions\n * @param {Array} ignoreParams\n * @return {Promise}\n */\nasync function cacheMatchIgnoreParams(cache, request, ignoreParams, matchOptions) {\n const strippedRequestURL = stripParams(request.url, ignoreParams);\n // If the request doesn't include any ignored params, match as normal.\n if (request.url === strippedRequestURL) {\n return cache.match(request, matchOptions);\n }\n // Otherwise, match by comparing keys\n const keysOptions = Object.assign(Object.assign({}, matchOptions), { ignoreSearch: true });\n const cacheKeys = await cache.keys(request, keysOptions);\n for (const cacheKey of cacheKeys) {\n const strippedCacheKeyURL = stripParams(cacheKey.url, ignoreParams);\n if (strippedRequestURL === strippedCacheKeyURL) {\n return cache.match(cacheKey, matchOptions);\n }\n }\n return;\n}\nexport { cacheMatchIgnoreParams };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nclass Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\nexport { Deferred };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:strategies:7.3.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { cacheMatchIgnoreParams } from 'workbox-core/_private/cacheMatchIgnoreParams.js';\nimport { Deferred } from 'workbox-core/_private/Deferred.js';\nimport { executeQuotaErrorCallbacks } from 'workbox-core/_private/executeQuotaErrorCallbacks.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { timeout } from 'workbox-core/_private/timeout.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport './_version.js';\nfunction toRequest(input) {\n return typeof input === 'string' ? new Request(input) : input;\n}\n/**\n * A class created every time a Strategy instance calls\n * {@link workbox-strategies.Strategy~handle} or\n * {@link workbox-strategies.Strategy~handleAll} that wraps all fetch and\n * cache actions around plugin callbacks and keeps track of when the strategy\n * is \"done\" (i.e. all added `event.waitUntil()` promises have resolved).\n *\n * @memberof workbox-strategies\n */\nclass StrategyHandler {\n /**\n * Creates a new instance associated with the passed strategy and event\n * that's handling the request.\n *\n * The constructor also initializes the state that will be passed to each of\n * the plugins handling this request.\n *\n * @param {workbox-strategies.Strategy} strategy\n * @param {Object} options\n * @param {Request|string} options.request A request to run this strategy for.\n * @param {ExtendableEvent} options.event The event associated with the\n * request.\n * @param {URL} [options.url]\n * @param {*} [options.params] The return value from the\n * {@link workbox-routing~matchCallback} (if applicable).\n */\n constructor(strategy, options) {\n this._cacheKeys = {};\n /**\n * The request the strategy is performing (passed to the strategy's\n * `handle()` or `handleAll()` method).\n * @name request\n * @instance\n * @type {Request}\n * @memberof workbox-strategies.StrategyHandler\n */\n /**\n * The event associated with this request.\n * @name event\n * @instance\n * @type {ExtendableEvent}\n * @memberof workbox-strategies.StrategyHandler\n */\n /**\n * A `URL` instance of `request.url` (if passed to the strategy's\n * `handle()` or `handleAll()` method).\n * Note: the `url` param will be present if the strategy was invoked\n * from a workbox `Route` object.\n * @name url\n * @instance\n * @type {URL|undefined}\n * @memberof workbox-strategies.StrategyHandler\n */\n /**\n * A `param` value (if passed to the strategy's\n * `handle()` or `handleAll()` method).\n * Note: the `param` param will be present if the strategy was invoked\n * from a workbox `Route` object and the\n * {@link workbox-routing~matchCallback} returned\n * a truthy value (it will be that value).\n * @name params\n * @instance\n * @type {*|undefined}\n * @memberof workbox-strategies.StrategyHandler\n */\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(options.event, ExtendableEvent, {\n moduleName: 'workbox-strategies',\n className: 'StrategyHandler',\n funcName: 'constructor',\n paramName: 'options.event',\n });\n }\n Object.assign(this, options);\n this.event = options.event;\n this._strategy = strategy;\n this._handlerDeferred = new Deferred();\n this._extendLifetimePromises = [];\n // Copy the plugins list (since it's mutable on the strategy),\n // so any mutations don't affect this handler instance.\n this._plugins = [...strategy.plugins];\n this._pluginStateMap = new Map();\n for (const plugin of this._plugins) {\n this._pluginStateMap.set(plugin, {});\n }\n this.event.waitUntil(this._handlerDeferred.promise);\n }\n /**\n * Fetches a given request (and invokes any applicable plugin callback\n * methods) using the `fetchOptions` (for non-navigation requests) and\n * `plugins` defined on the `Strategy` object.\n *\n * The following plugin lifecycle methods are invoked when using this method:\n * - `requestWillFetch()`\n * - `fetchDidSucceed()`\n * - `fetchDidFail()`\n *\n * @param {Request|string} input The URL or request to fetch.\n * @return {Promise}\n */\n async fetch(input) {\n const { event } = this;\n let request = toRequest(input);\n if (request.mode === 'navigate' &&\n event instanceof FetchEvent &&\n event.preloadResponse) {\n const possiblePreloadResponse = (await event.preloadResponse);\n if (possiblePreloadResponse) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Using a preloaded navigation response for ` +\n `'${getFriendlyURL(request.url)}'`);\n }\n return possiblePreloadResponse;\n }\n }\n // If there is a fetchDidFail plugin, we need to save a clone of the\n // original request before it's either modified by a requestWillFetch\n // plugin or before the original request's body is consumed via fetch().\n const originalRequest = this.hasCallback('fetchDidFail')\n ? request.clone()\n : null;\n try {\n for (const cb of this.iterateCallbacks('requestWillFetch')) {\n request = await cb({ request: request.clone(), event });\n }\n }\n catch (err) {\n if (err instanceof Error) {\n throw new WorkboxError('plugin-error-request-will-fetch', {\n thrownErrorMessage: err.message,\n });\n }\n }\n // The request can be altered by plugins with `requestWillFetch` making\n // the original request (most likely from a `fetch` event) different\n // from the Request we make. Pass both to `fetchDidFail` to aid debugging.\n const pluginFilteredRequest = request.clone();\n try {\n let fetchResponse;\n // See https://github.com/GoogleChrome/workbox/issues/1796\n fetchResponse = await fetch(request, request.mode === 'navigate' ? undefined : this._strategy.fetchOptions);\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Network request for ` +\n `'${getFriendlyURL(request.url)}' returned a response with ` +\n `status '${fetchResponse.status}'.`);\n }\n for (const callback of this.iterateCallbacks('fetchDidSucceed')) {\n fetchResponse = await callback({\n event,\n request: pluginFilteredRequest,\n response: fetchResponse,\n });\n }\n return fetchResponse;\n }\n catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Network request for ` +\n `'${getFriendlyURL(request.url)}' threw an error.`, error);\n }\n // `originalRequest` will only exist if a `fetchDidFail` callback\n // is being used (see above).\n if (originalRequest) {\n await this.runCallbacks('fetchDidFail', {\n error: error,\n event,\n originalRequest: originalRequest.clone(),\n request: pluginFilteredRequest.clone(),\n });\n }\n throw error;\n }\n }\n /**\n * Calls `this.fetch()` and (in the background) runs `this.cachePut()` on\n * the response generated by `this.fetch()`.\n *\n * The call to `this.cachePut()` automatically invokes `this.waitUntil()`,\n * so you do not have to manually call `waitUntil()` on the event.\n *\n * @param {Request|string} input The request or URL to fetch and cache.\n * @return {Promise}\n */\n async fetchAndCachePut(input) {\n const response = await this.fetch(input);\n const responseClone = response.clone();\n void this.waitUntil(this.cachePut(input, responseClone));\n return response;\n }\n /**\n * Matches a request from the cache (and invokes any applicable plugin\n * callback methods) using the `cacheName`, `matchOptions`, and `plugins`\n * defined on the strategy object.\n *\n * The following plugin lifecycle methods are invoked when using this method:\n * - cacheKeyWillBeUsed()\n * - cachedResponseWillBeUsed()\n *\n * @param {Request|string} key The Request or URL to use as the cache key.\n * @return {Promise} A matching response, if found.\n */\n async cacheMatch(key) {\n const request = toRequest(key);\n let cachedResponse;\n const { cacheName, matchOptions } = this._strategy;\n const effectiveRequest = await this.getCacheKey(request, 'read');\n const multiMatchOptions = Object.assign(Object.assign({}, matchOptions), { cacheName });\n cachedResponse = await caches.match(effectiveRequest, multiMatchOptions);\n if (process.env.NODE_ENV !== 'production') {\n if (cachedResponse) {\n logger.debug(`Found a cached response in '${cacheName}'.`);\n }\n else {\n logger.debug(`No cached response found in '${cacheName}'.`);\n }\n }\n for (const callback of this.iterateCallbacks('cachedResponseWillBeUsed')) {\n cachedResponse =\n (await callback({\n cacheName,\n matchOptions,\n cachedResponse,\n request: effectiveRequest,\n event: this.event,\n })) || undefined;\n }\n return cachedResponse;\n }\n /**\n * Puts a request/response pair in the cache (and invokes any applicable\n * plugin callback methods) using the `cacheName` and `plugins` defined on\n * the strategy object.\n *\n * The following plugin lifecycle methods are invoked when using this method:\n * - cacheKeyWillBeUsed()\n * - cacheWillUpdate()\n * - cacheDidUpdate()\n *\n * @param {Request|string} key The request or URL to use as the cache key.\n * @param {Response} response The response to cache.\n * @return {Promise} `false` if a cacheWillUpdate caused the response\n * not be cached, and `true` otherwise.\n */\n async cachePut(key, response) {\n const request = toRequest(key);\n // Run in the next task to avoid blocking other cache reads.\n // https://github.com/w3c/ServiceWorker/issues/1397\n await timeout(0);\n const effectiveRequest = await this.getCacheKey(request, 'write');\n if (process.env.NODE_ENV !== 'production') {\n if (effectiveRequest.method && effectiveRequest.method !== 'GET') {\n throw new WorkboxError('attempt-to-cache-non-get-request', {\n url: getFriendlyURL(effectiveRequest.url),\n method: effectiveRequest.method,\n });\n }\n // See https://github.com/GoogleChrome/workbox/issues/2818\n const vary = response.headers.get('Vary');\n if (vary) {\n logger.debug(`The response for ${getFriendlyURL(effectiveRequest.url)} ` +\n `has a 'Vary: ${vary}' header. ` +\n `Consider setting the {ignoreVary: true} option on your strategy ` +\n `to ensure cache matching and deletion works as expected.`);\n }\n }\n if (!response) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(`Cannot cache non-existent response for ` +\n `'${getFriendlyURL(effectiveRequest.url)}'.`);\n }\n throw new WorkboxError('cache-put-with-no-response', {\n url: getFriendlyURL(effectiveRequest.url),\n });\n }\n const responseToCache = await this._ensureResponseSafeToCache(response);\n if (!responseToCache) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Response '${getFriendlyURL(effectiveRequest.url)}' ` +\n `will not be cached.`, responseToCache);\n }\n return false;\n }\n const { cacheName, matchOptions } = this._strategy;\n const cache = await self.caches.open(cacheName);\n const hasCacheUpdateCallback = this.hasCallback('cacheDidUpdate');\n const oldResponse = hasCacheUpdateCallback\n ? await cacheMatchIgnoreParams(\n // TODO(philipwalton): the `__WB_REVISION__` param is a precaching\n // feature. Consider into ways to only add this behavior if using\n // precaching.\n cache, effectiveRequest.clone(), ['__WB_REVISION__'], matchOptions)\n : null;\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Updating the '${cacheName}' cache with a new Response ` +\n `for ${getFriendlyURL(effectiveRequest.url)}.`);\n }\n try {\n await cache.put(effectiveRequest, hasCacheUpdateCallback ? responseToCache.clone() : responseToCache);\n }\n catch (error) {\n if (error instanceof Error) {\n // See https://developer.mozilla.org/en-US/docs/Web/API/DOMException#exception-QuotaExceededError\n if (error.name === 'QuotaExceededError') {\n await executeQuotaErrorCallbacks();\n }\n throw error;\n }\n }\n for (const callback of this.iterateCallbacks('cacheDidUpdate')) {\n await callback({\n cacheName,\n oldResponse,\n newResponse: responseToCache.clone(),\n request: effectiveRequest,\n event: this.event,\n });\n }\n return true;\n }\n /**\n * Checks the list of plugins for the `cacheKeyWillBeUsed` callback, and\n * executes any of those callbacks found in sequence. The final `Request`\n * object returned by the last plugin is treated as the cache key for cache\n * reads and/or writes. If no `cacheKeyWillBeUsed` plugin callbacks have\n * been registered, the passed request is returned unmodified\n *\n * @param {Request} request\n * @param {string} mode\n * @return {Promise}\n */\n async getCacheKey(request, mode) {\n const key = `${request.url} | ${mode}`;\n if (!this._cacheKeys[key]) {\n let effectiveRequest = request;\n for (const callback of this.iterateCallbacks('cacheKeyWillBeUsed')) {\n effectiveRequest = toRequest(await callback({\n mode,\n request: effectiveRequest,\n event: this.event,\n // params has a type any can't change right now.\n params: this.params, // eslint-disable-line\n }));\n }\n this._cacheKeys[key] = effectiveRequest;\n }\n return this._cacheKeys[key];\n }\n /**\n * Returns true if the strategy has at least one plugin with the given\n * callback.\n *\n * @param {string} name The name of the callback to check for.\n * @return {boolean}\n */\n hasCallback(name) {\n for (const plugin of this._strategy.plugins) {\n if (name in plugin) {\n return true;\n }\n }\n return false;\n }\n /**\n * Runs all plugin callbacks matching the given name, in order, passing the\n * given param object (merged ith the current plugin state) as the only\n * argument.\n *\n * Note: since this method runs all plugins, it's not suitable for cases\n * where the return value of a callback needs to be applied prior to calling\n * the next callback. See\n * {@link workbox-strategies.StrategyHandler#iterateCallbacks}\n * below for how to handle that case.\n *\n * @param {string} name The name of the callback to run within each plugin.\n * @param {Object} param The object to pass as the first (and only) param\n * when executing each callback. This object will be merged with the\n * current plugin state prior to callback execution.\n */\n async runCallbacks(name, param) {\n for (const callback of this.iterateCallbacks(name)) {\n // TODO(philipwalton): not sure why `any` is needed. It seems like\n // this should work with `as WorkboxPluginCallbackParam[C]`.\n await callback(param);\n }\n }\n /**\n * Accepts a callback and returns an iterable of matching plugin callbacks,\n * where each callback is wrapped with the current handler state (i.e. when\n * you call each callback, whatever object parameter you pass it will\n * be merged with the plugin's current state).\n *\n * @param {string} name The name fo the callback to run\n * @return {Array}\n */\n *iterateCallbacks(name) {\n for (const plugin of this._strategy.plugins) {\n if (typeof plugin[name] === 'function') {\n const state = this._pluginStateMap.get(plugin);\n const statefulCallback = (param) => {\n const statefulParam = Object.assign(Object.assign({}, param), { state });\n // TODO(philipwalton): not sure why `any` is needed. It seems like\n // this should work with `as WorkboxPluginCallbackParam[C]`.\n return plugin[name](statefulParam);\n };\n yield statefulCallback;\n }\n }\n }\n /**\n * Adds a promise to the\n * [extend lifetime promises]{@link https://w3c.github.io/ServiceWorker/#extendableevent-extend-lifetime-promises}\n * of the event associated with the request being handled (usually a\n * `FetchEvent`).\n *\n * Note: you can await\n * {@link workbox-strategies.StrategyHandler~doneWaiting}\n * to know when all added promises have settled.\n *\n * @param {Promise} promise A promise to add to the extend lifetime promises\n * of the event that triggered the request.\n */\n waitUntil(promise) {\n this._extendLifetimePromises.push(promise);\n return promise;\n }\n /**\n * Returns a promise that resolves once all promises passed to\n * {@link workbox-strategies.StrategyHandler~waitUntil}\n * have settled.\n *\n * Note: any work done after `doneWaiting()` settles should be manually\n * passed to an event's `waitUntil()` method (not this handler's\n * `waitUntil()` method), otherwise the service worker thread may be killed\n * prior to your work completing.\n */\n async doneWaiting() {\n while (this._extendLifetimePromises.length) {\n const promises = this._extendLifetimePromises.splice(0);\n const result = await Promise.allSettled(promises);\n const firstRejection = result.find((i) => i.status === 'rejected');\n if (firstRejection) {\n throw firstRejection.reason;\n }\n }\n }\n /**\n * Stops running the strategy and immediately resolves any pending\n * `waitUntil()` promises.\n */\n destroy() {\n this._handlerDeferred.resolve(null);\n }\n /**\n * This method will call cacheWillUpdate on the available plugins (or use\n * status === 200) to determine if the Response is safe and valid to cache.\n *\n * @param {Request} options.request\n * @param {Response} options.response\n * @return {Promise}\n *\n * @private\n */\n async _ensureResponseSafeToCache(response) {\n let responseToCache = response;\n let pluginsUsed = false;\n for (const callback of this.iterateCallbacks('cacheWillUpdate')) {\n responseToCache =\n (await callback({\n request: this.request,\n response: responseToCache,\n event: this.event,\n })) || undefined;\n pluginsUsed = true;\n if (!responseToCache) {\n break;\n }\n }\n if (!pluginsUsed) {\n if (responseToCache && responseToCache.status !== 200) {\n responseToCache = undefined;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (responseToCache) {\n if (responseToCache.status !== 200) {\n if (responseToCache.status === 0) {\n logger.warn(`The response for '${this.request.url}' ` +\n `is an opaque response. The caching strategy that you're ` +\n `using will not cache opaque responses by default.`);\n }\n else {\n logger.debug(`The response for '${this.request.url}' ` +\n `returned a status code of '${response.status}' and won't ` +\n `be cached as a result.`);\n }\n }\n }\n }\n }\n return responseToCache;\n }\n}\nexport { StrategyHandler };\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * Returns a promise that resolves and the passed number of milliseconds.\n * This utility is an async/await-friendly version of `setTimeout`.\n *\n * @param {number} ms\n * @return {Promise}\n * @private\n */\nexport function timeout(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst getFriendlyURL = (url) => {\n const urlObj = new URL(String(url), location.href);\n // See https://github.com/GoogleChrome/workbox/issues/2323\n // We want to include everything, except for the origin if it's same-origin.\n return urlObj.href.replace(new RegExp(`^${location.origin}`), '');\n};\nexport { getFriendlyURL };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from '../_private/logger.js';\nimport { quotaErrorCallbacks } from '../models/quotaErrorCallbacks.js';\nimport '../_version.js';\n/**\n * Runs all of the callback functions, one at a time sequentially, in the order\n * in which they were registered.\n *\n * @memberof workbox-core\n * @private\n */\nasync function executeQuotaErrorCallbacks() {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`About to run ${quotaErrorCallbacks.size} ` +\n `callbacks to clean up caches.`);\n }\n for (const callback of quotaErrorCallbacks) {\n await callback();\n if (process.env.NODE_ENV !== 'production') {\n logger.log(callback, 'is complete.');\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Finished running callbacks.');\n }\n}\nexport { executeQuotaErrorCallbacks };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { StrategyHandler } from './StrategyHandler.js';\nimport './_version.js';\n/**\n * An abstract base class that all other strategy classes must extend from:\n *\n * @memberof workbox-strategies\n */\nclass Strategy {\n /**\n * Creates a new instance of the strategy and sets all documented option\n * properties as public instance properties.\n *\n * Note: if a custom strategy class extends the base Strategy class and does\n * not need more than these properties, it does not need to define its own\n * constructor.\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] Cache name to store and retrieve\n * requests. Defaults to the cache names provided by\n * {@link workbox-core.cacheNames}.\n * @param {Array