wiki-grav/plugins/git-sync/js/app.js

196 lines
76 KiB
JavaScript
Raw Normal View History

/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ 849:
/***/ ((__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) => {
eval("\n;// CONCATENATED MODULE: external \"GitSync\"\nconst external_GitSync_namespaceObject = GitSync;\nvar external_GitSync_default = /*#__PURE__*/__webpack_require__.n(external_GitSync_namespaceObject);\n// EXTERNAL MODULE: external \"jQuery\"\nvar external_jQuery_ = __webpack_require__(609);\nvar external_jQuery_default = /*#__PURE__*/__webpack_require__.n(external_jQuery_);\n// EXTERNAL MODULE: ../../../grav/grav-plugin-admin/themes/grav/node_modules/toastr/toastr.js\nvar toastr = __webpack_require__(860);\nvar toastr_default = /*#__PURE__*/__webpack_require__.n(toastr);\n;// CONCATENATED MODULE: ../../../grav/grav-plugin-admin/themes/grav/app/utils/toastr.js\n\n(toastr_default()).options.positionClass = 'toast-top-right';\n(toastr_default()).options.preventDuplicates = true;\n/* harmony default export */ const utils_toastr = ((toastr_default()));\n;// CONCATENATED MODULE: ../../../grav/grav-plugin-admin/themes/grav/app/utils/offline.js\n\n\nvar offlineElement = external_jQuery_default()('#offline-status');\nexternal_jQuery_default()(window).on('offline', function () {\n offlineElement.slideDown();\n});\nexternal_jQuery_default()(window).on('online', function () {\n offlineElement.slideUp();\n});\nexternal_jQuery_default()(document).ready(function () {\n if (!offline) {\n offlineElement.slideDown();\n }\n}); // assume online if can't check\n\n/* harmony default export */ const offline = (typeof __webpack_require__.g.navigator.onLine !== 'undefined' ? __webpack_require__.g.navigator.onLine : true);\n;// CONCATENATED MODULE: external \"GravAdmin\"\nconst external_GravAdmin_namespaceObject = GravAdmin;\n// EXTERNAL MODULE: ../../../grav/grav-plugin-admin/themes/grav/node_modules/mout/string/trim.js\nvar trim = __webpack_require__(284);\nvar trim_default = /*#__PURE__*/__webpack_require__.n(trim);\n;// CONCATENATED MODULE: ../../../grav/grav-plugin-admin/themes/grav/app/utils/response.js\n\n\n\n\n\nvar UNLOADING = false;\n\nvar error = function error(response) {\n var error = new Error(response.statusText || response || '');\n error.response = response;\n return error;\n};\n\nfunction parseStatus(response) {\n return response;\n /* Whoops can handle JSON responses so we don't need this for now.\n if (response.status >= 200 && response.status < 300) {\n return response;\n } else {\n throw error(response);\n }\n */\n}\nfunction parseJSON(response) {\n return response.text().then(function (text) {\n var parsed = text;\n\n try {\n parsed = JSON.parse(text);\n } catch (error) {\n var content = document.createElement('div');\n content.innerHTML = text;\n var the_error = new Error();\n the_error.stack = trim_default()(content.innerText);\n throw the_error;\n }\n\n return parsed;\n });\n}\nfunction userFeedback(response) {\n if (UNLOADING) {\n return true;\n }\n\n var status = response.status || (response.error ? 'error' : '');\n var message = response.message || (response.error ? response.error.message : null);\n var settings = response.toastr || null;\n var backup;\n\n switch (status) {\n case 'unauthenticated':\n document.location.href = external_GravAdmin_namespaceObject.config.base_url_relative;\n throw error('Logged out');\n\n case 'unauthorized':\n status = 'error';\n message = message || 'Unauthorized.';\n break;\n\n case 'error':\n status = 'error';\n message = message || 'Unknown error.';\n break;\n\n case 'success':\n status = 'success';\n message = message || '';\n break;\n\n default:\n status = 'error';\n message = message || 'Invalid AJAX response.';\n break;\n }\n\n if (settings) {\n backup = Object.assign({}, utils_toastr.options);\n Object.keys(settings).forEach(function (key) {\n utils_toastr.options[key] = settings[key];\n });\n }\n\n if (message && (offline || !offline && status !== 'error')) {\n utils_toastr[status === 'success' ? 'success' : 'error'](message);\n }\n\n if (settings) {\n utils_to
/***/ }),
/***/ 609:
/***/ ((module) => {
module.exports = jQuery;
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/amd define */
/******/ (() => {
/******/ __webpack_require__.amdD = function () {
/******/ throw new Error('define cannot be used indirect');
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ result = fn();
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => (module['default']) :
/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/global */
/******/ (() => {
/******/ __webpack_require__.g = (function() {
/******/ if (typeof globalThis === 'object') return globalThis;
/******/ try {
/******/ return this || new Function('return this')();
/******/ } catch (e) {
/******/ if (typeof window === 'object') return window;
/******/ }
/******/ })();
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ 143: 0
/******/ };
/******/
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkIds[i]] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = self["webpackChunktrilby_grav_plugin_gitsync"] = self["webpackChunktrilby_grav_plugin_gitsync"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, [736], () => (__webpack_require__(849)))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;