{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./wwwroot/js/latest.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;AClFA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU,gBAAgB;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,aAAa,YAAY,SAAS,YAAY,SAAS,QAAQ,KAAK;AAC/F;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,uBAAuB,wBAAwB,aAAa;AACzG;AACA;AACA,0CAA0C,uBAAuB;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,wCAAwC,UAAU,GAAG,uBAAuB;AAC5E;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC,YAAY,QAAQ,QAAQ;AACnE;AACA,yDAAyD,QAAQ,qBAAqB,UAAU;AAChG,mEAAmE,eAAe,2CAA2C,UAAU;AACvI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA,2GAA2G,gBAAgB,IAAI,kBAAkB;AACjJ;AACA;AACA;AACA;AACA,qDAAqD,eAAe;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA","file":"latest.entry.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./wwwroot/js/latest.js\");\n","window.addEventListener(\"hashchange\", (event) => {\r\n searchMinis();\r\n});\r\n\r\ndocument.addEventListener(\"DOMContentLoaded\", (event) => {\r\n //Next Page Listener\r\n var nextPageBtn = document.getElementById(\"nextPageBtn\");\r\n if (nextPageBtn) {\r\n nextPageBtn.addEventListener(\"click\", nextPage);\r\n }\r\n\r\n //We came here from a back button or something. Do something kinda smart and load the latest page\r\n if (window.location.hash.startsWith(\"#\")) {\r\n searchMinis(true);\r\n }\r\n\r\n // Maintain a current visit and last visit. Every browse pageview will update CurrentVisit.\r\n // If the CurrentVisit is stale (2 hours), then we'll assume that's the last time the user was here.\r\n // Move that value to LastVisit and highlight Minis that are new since then.\r\n var currentVisitTimestamp = getCookie(\"CurrentVisit\");\r\n if (currentVisitTimestamp != \"\") {\r\n if (Date.now() - currentVisitTimestamp > 3600000 * 2) {\r\n fetch(\r\n `/api/overhead/Session/?since=` +\r\n (Date.now() - currentVisitTimestamp)\r\n );\r\n document.cookie =\r\n \"LastVisit=\" +\r\n currentVisitTimestamp +\r\n \";SameSite=Strict;max-age=\" +\r\n 60 * 60 * 24 * 28;\r\n }\r\n }\r\n\r\n updateDateCookie(\"CurrentVisit\");\r\n flagNewMinis();\r\n});\r\n\r\nfunction flagNewMinis() {\r\n var lastVisitTimestamp = getCookie(\"LastVisit\");\r\n\r\n if (lastVisitTimestamp != \"\") {\r\n var approvedMinis = document.getElementsByClassName(\"Approved\");\r\n for (\r\n var i = 0, len = approvedMinis.length | 0;\r\n i < len;\r\n i = (i + 1) | 0\r\n ) {\r\n var approvedTime =\r\n approvedMinis[i].children[approvedMinis[i].children.length - 1]\r\n .innerText;\r\n\r\n if (Number(lastVisitTimestamp) < Number(approvedTime)) {\r\n approvedMinis[i].children[\r\n approvedMinis[i].children.length - 2\r\n ].classList.remove(\"hidden\");\r\n }\r\n }\r\n } else {\r\n updateDateCookie(\"LastVisit\");\r\n fetch(`/api/overhead/Session/?since=-1`);\r\n }\r\n}\r\n\r\nfunction getCookie(cookieName) {\r\n if (\r\n document.cookie\r\n .split(\";\")\r\n .some((item) => item.trim().startsWith(cookieName + \"=\"))\r\n ) {\r\n return document.cookie\r\n .split(\"; \")\r\n .find((row) => row.startsWith(cookieName + \"=\"))\r\n .split(\"=\")[1];\r\n }\r\n\r\n return \"\";\r\n}\r\n\r\nfunction updateDateCookie(cookieName) {\r\n document.cookie =\r\n cookieName +\r\n \"=\" +\r\n Date.now() +\r\n \";SameSite=Strict;max-age=\" +\r\n 60 * 60 * 24 * 28;\r\n}\r\n\r\nfunction constructFetchString() {\r\n var searchString = encodeURIComponent(\r\n document.getElementById(\"SearchString\").value\r\n );\r\n var freeOnly = document.getElementById(\"FreeOnly\").checked;\r\n var sortType = document.getElementById(\"SortType\").value;\r\n var tags = encodeURIComponent(document.getElementById(\"tagsValue\").value);\r\n\r\n return `SearchString=${searchString}&FreeOnly=${freeOnly}&SortType=${sortType}&Tags=${tags}`;\r\n}\r\n\r\nasync function searchMinis(freshLoad) {\r\n let galleryElement = document.getElementById(\"gallery\");\r\n var pageIndex = 1;\r\n\r\n if (window.location.hash.startsWith(\"#\")) {\r\n pageIndex = window.location.hash.substr(1);\r\n }\r\n\r\n //TODO: There's a bit of layout shifting here, probably can refactor to make it cleaner\r\n //Handle page refresh or back scenario\r\n if (freshLoad) {\r\n galleryElement.replaceChildren();\r\n var backButtonHTML = `\r\n