{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./_dev/js/admin/global.js","webpack:///./_dev/js/admin/help.js"],"names":["clearAjaxMessages","box","$","fadeOut","empty","displayAjaxMessages","fadeIn","addAjaxConfirmation","content","queue","append","clone","attr","removeClass","html","dequeue","addAjaxError","addClass","addAjaxMessages","data","confirmations","forEach","confirmation","error","settings","MONDIALRELAY_HELP","document","on","button","messagesBox","params","ajax","action","MR","disabled","url","helpUrl","method","dataType","success","response","MONDIALRELAY_MESSAGES","unknown_error","complete"],"mappings":";;;;;;;;;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;AClFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;AAQA;;;;;AAMA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,GAAD,EAAS;AACjCC,GAAC,CAACD,GAAG,IAAI,UAAR,CAAD,CAAqBE,OAArB,CAA6B,YAAY;AACvCD,KAAC,CAAC,IAAD,CAAD,CAAQE,KAAR;AACD,GAFD;AAGD,CAJD;;AAMA,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAsB,CAACJ,GAAD,EAAS;AACnCC,GAAC,CAACD,GAAG,IAAI,UA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AACY,OADT;AAELC,UAAM,EAAE,MAFH;AAGLlB,QAAI,EAAEW,MAHD;AAILQ,YAAQ,EAAE,MAJL;AAMLC,WAAO,EAAE,iBAAAC,QAAQ,EAAI;AACnBP,6DAAA,CAAmBO,QAAnB,EAA6BX,WAA7B;AACAI,iEAAA,CAAuBJ,WAAvB;AACD,KATI;AAWLN,SAAK,EAAE,eAAAiB,QAAQ,EAAI;AACjBP,0DAAA,CAAgBQ,qBAAqB,CAACC,aAAtC,EAAqDb,WAArD;AACAI,iEAAA,CAAuBJ,WAAvB;AACD,KAdI;AAgBLc,YAAQ,EAAE,oBAAM;AACdf,YAAM,CAACM,QAAP,GAAkB,KAAlB;AACD;AAlBI,GAAP;AAoBD,CAhCD,E","file":"js/admin/help.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 = \"./_dev/js/admin/help.js\");\n","/**\n * NOTICE OF LICENSE\n *\n * @author 202 ecommerce \n * @author Mondial Relay\n * @copyright Copyright (c) Mondial Relay\n */\n\n/**\n * IMPORTANT NOTE : since the #ajaxBox is animated and its content modified\n * using callbacks on the animations, every function using that box should\n * probably use JQuery's .queue() method for synchronization\n */\n\nconst clearAjaxMessages = (box) => {\n $(box || '#ajaxBox').fadeOut(function () {\n $(this).empty();\n });\n};\n\nconst displayAjaxMessages = (box) => {\n $(box || '#ajaxBox').fadeIn();\n};\n\nconst addAjaxConfirmation = (content, box) => {\n $(box || '#ajaxBox').queue(function () {\n $(this).append(\n $('#ajax_confirmation')\n .clone()\n .attr('id', null)\n .removeClass('hide')\n .html(content)\n );\n $(this).dequeue();\n });\n};\n\nconst addAjaxError = (content, box) => {\n $(box || '#ajaxBox').queue(function () {\n $(this).append(\n $('#ajax_confirmation')\n .clone()\n .attr('id', null)\n .removeClass('hide alert-success')\n .addClass('alert-danger')\n .html(content)\n );\n $(this).dequeue();\n });\n};\n\nconst addAjaxMessages = (data, box) => {\n data.confirmations.forEach(confirmation => {\n addAjaxConfirmation(confirmation, box);\n });\n\n data.error.forEach(error => {\n addAjaxError(error, box);\n });\n};\n\nexport {\n clearAjaxMessages,\n displayAjaxMessages,\n addAjaxConfirmation,\n addAjaxError,\n addAjaxMessages\n};\n","/**\n * NOTICE OF LICENSE\n *\n * @author 202 ecommerce \n * @author Mondial Relay\n * @copyright Copyright (c) Mondial Relay\n */\n\n// modules ES6\nimport * as MR from './global';\n\nconst settings = MONDIALRELAY_HELP;\n\n$(document).on('click', '#mondialrelay_check-requirements', function () {\n const button = this;\n const messagesBox = '#mondialrelay_requirements-results'; \n\n let params = {\n ajax: true,\n action: 'checkRequirements'\n };\n\n MR.clearAjaxMessages(messagesBox);\n button.disabled = true;\n\n $.ajax({\n url: settings.helpUrl,\n method: 'POST',\n data: params,\n dataType: 'json',\n\n success: response => {\n MR.addAjaxMessages(response, messagesBox);\n MR.displayAjaxMessages(messagesBox);\n },\n\n error: response => {\n MR.addAjaxError(MONDIALRELAY_MESSAGES.unknown_error, messagesBox);\n MR.displayAjaxMessages(messagesBox);\n },\n\n complete: () => {\n button.disabled = false;\n }\n });\n});\n\n$(document).on('click', '#mondialrelay_register-hooks', function () {\n const button = this;\n const messagesBox = '#mondialrelay_requirements-results'; \n\n let params = {\n ajax: true,\n action: 'registerHooks'\n };\n\n MR.clearAjaxMessages(messagesBox);\n button.disabled = true;\n\n $.ajax({\n url: settings.helpUrl,\n method: 'POST',\n data: params,\n dataType: 'json',\n\n success: response => {\n MR.addAjaxMessages(response, messagesBox);\n MR.displayAjaxMessages(messagesBox);\n },\n\n error: response => {\n MR.addAjaxError(MONDIALRELAY_MESSAGES.unknown_error, messagesBox);\n MR.displayAjaxMessages(messagesBox);\n },\n\n complete: () => {\n button.disabled = false;\n }\n });\n});\n"],"sourceRoot":""}