{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./_dev/js/admin/selected-relay.js","webpack:///./_dev/js/mondialrelay_widget.js"],"names":["$","MR_Widget","on","savedRelay","hide","init","ColLivMod","MONDIALRELAY_DELIVERY_MODE","ev","data","displayErrors","val","relayData","ID","document","selected_relay_input","MONDIALRELAY_NO_SELECTION_ERROR","stopPropagation","preventDefault","widget","loadJs","url","callback","script","createElement","onload","src","head","appendChild","load","loaded","params","MONDIALRELAY_BAD_CONFIGURATION","summary_container","slideDown","addLoader","widget_container","defaultParams","Target","Brand","MONDIALRELAY_ENSEIGNE","Country","MONDIALRELAY_COUNTRY_ISO","PostCode","MONDIALRELAY_POSTCODE","ShowResultsOnMap","MONDIALRELAY_DISPLAY_MAP","NbResults","Responsive","OnParcelShopSelected","save_container","show","setSelectedRelay","extend","MR_ParcelShopPicker","initialized","update","trigger","initOrUpdate","relayIdentifier","MONDIALRELAY_SELECTED_RELAY_IDENTIFIER","oldRelay","messages","box","error_container","length","stop","children","fadeOut","empty","queue","errors","each","k","m","push","addClass","text","append","dequeue","fadeIn","container","clone","attr","appendTo","removeLoader","remove","ready","change_button"],"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;;;AA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C,CAAC,IAAD,CAAD,CAAQ+E,OAAR;AACD,GATD;AAUAhB,KAAG,CAACiB,MAAJ;AACD,CA/BD;;AAiCA7D,MAAM,CAACgB,SAAP,GAAmB,UAAC8C,SAAD,EAAe;AAChC,MAAIjF,CAAC,CAACiF,SAAD,CAAD,CAAahB,MAAb,IAAuB,CAA3B,EAA8B;AAC5B;AACD;;AAED,MAAIjE,CAAC,CAACiF,SAAD,CAAD,CAAad,QAAb,CAAsB,sBAAtB,EAA8CF,MAA9C,GAAuD,CAA3D,EAA8D;AAC5D;AACD;;AAEDjE,GAAC,CAAC,+BAAD,CAAD,CACGkF,KADH,GAEGC,IAFH,CAEQ,IAFR,EAEc,IAFd,EAGGhC,IAHH,GAIGiC,QAJH,CAIYH,SAJZ;AAKD,CAdD;;AAgBA9D,MAAM,CAACkE,YAAP,GAAsB,UAACJ,SAAD,EAAe;AACnCjF,GAAC,CAACiF,SAAD,CAAD,CAAad,QAAb,CAAsB,sBAAtB,EAA8CmB,MAA9C;AACD,CAFD;;AAIAtF,CAAC,CAACc,QAAD,CAAD,CAAYyE,KAAZ,CAAkB,YAAW;AAC3BpE,QAAM,CAAChB,UAAP,GAAoByD,sCAApB;AACA5D,GAAC,CAACmB,MAAD,CAAD,CAAUsC,OAAV,CAAkB,oBAAlB;AACD,CAHD;AAKAzD,CAAC,CAACc,QAAD,CAAD,CAAYZ,EAAZ,CAAe,OAAf,EAAwBiB,MAAM,CAACqE,aAA/B,EAA8C,UAAShF,EAAT,EAAa;AACzDW,QAAM,CAACgC,IAAP;AACD,CAFD;AAIAnD,CAAC,CAACc,QAAD,CAAD,CAAYZ,EAAZ,CAAe,OAAf,EAAwB,eAAxB,EAAyC,UAASM,EAAT,EAAa;AAClDA,IAAE,CAACU,cAAH;AACAV,IAAE,CAACS,eAAH;AACH,CAHD","file":"js/admin/selected-relay.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/selected-relay.js\");\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_Widget from '../mondialrelay_widget';\n\n$(MR_Widget.widget).on('mondialrelay.ready', function() {\n // Don't show the map if it's not immediately needed\n if (MR_Widget.widget.savedRelay) {\n MR_Widget.widget.hide();\n }\n MR_Widget.widget.init({ ColLivMod: MONDIALRELAY_DELIVERY_MODE });\n});\n\n $(MR_Widget.widget).on('mondialrelay.selectedRelay', function(ev, data) {\n MR_Widget.widget.displayErrors(null);\n $(\"#mondialrelay_displayed-relay-number\").val(data.relayData.ID);\n});\n\n$(document).on('submit', '#mondialrelay_selected_relay_form', function(ev) {\n if (!$(MR_Widget.widget.selected_relay_input).val()) {\n MR_Widget.widget.displayErrors([MONDIALRELAY_NO_SELECTION_ERROR]);\n ev.stopPropagation();\n ev.preventDefault();\n return false;\n }\n});","/**\n * NOTICE OF LICENSE\n *\n * @author 202 ecommerce \n * @author Mondial Relay\n * @copyright Copyright (c) Mondial Relay\n */\n\nconst widget = {\n 'url': '//widget.mondialrelay.com/parcelshop-picker/jquery.plugin.mondialrelay.parcelshoppicker.min.js',\n 'loaded': false,\n 'initialized': false,\n 'widget_container': '#mondialrelay_widget',\n 'save_container': '#mondialrelay_save-container',\n 'error_container': '#mondialrelay_errors',\n 'summary_container': '#mondialrelay_summary',\n 'save_button': '#mondialrelay_save-relay',\n 'change_button': '#mondialrelay_change-relay',\n 'selected_relay_input': '#mondialrelay_selected-relay',\n 'savedRelay': null,\n};\n\nconst loadJs = (url, callback) => {\n var script = document.createElement('script');\n script.onload = callback;\n script.src = url;\n \n document.head.appendChild(script);\n};\n\nwidget.load = (callback) => {\n loadJs(widget.url, function() {\n widget.loaded = true;\n callback();\n });\n};\n\nwidget.init = (params) => {\n \n // Access to the page may be completely blocked if the configuration isn't\n // done, so this variable may not always be defined.\n if (\n typeof MONDIALRELAY_BAD_CONFIGURATION != 'undefined'\n && MONDIALRELAY_BAD_CONFIGURATION\n ) {\n return;\n }\n \n if (widget.savedRelay) {\n $(widget.summary_container).slideDown();\n }\n \n if (!widget.loaded) {\n widget.addLoader(widget.widget_container);\n widget.load(function() {\n // No need to remove the loader; it will be replaced by the\n // widget's content\n widget.init();\n });\n return;\n }\n \n let defaultParams = {\n // Where to store the selected relay's ID\n Target: widget.selected_relay_input,\n Brand: MONDIALRELAY_ENSEIGNE,\n // iso code, 2 letters\n Country: MONDIALRELAY_COUNTRY_ISO,\n // Postcode for default search\n PostCode: MONDIALRELAY_POSTCODE,\n // Delivery mode; carrier dependent (Standard [24R], XL [24L], XXL [24X], Drive [DRI])\n ColLivMod: '24R',\n // Wether to display the relays on a map or as a list\n ShowResultsOnMap: MONDIALRELAY_DISPLAY_MAP == true,\n // Nombre de Point Relais à afficher\n NbResults: \"7\",\n Responsive: true,\n OnParcelShopSelected: function(relayData) {\n $(widget.save_container).show();\n widget.setSelectedRelay(null, relayData);\n }\n };\n \n if (params) {\n $.extend(defaultParams, params);\n }\n\n // This isn't really pretty, but it *should* add events useful to our processes\n // TODO : OPC, lock process until widget is initialized. How can we detect an\n // error though ?... Is OnNoResultReturned called either way ?...\n /*let firstSearch = true;\n let OnNoResultReturned = defaultParams.OnNoResultReturned;\n let OnSearchSuccess = defaultParams.OnSearchSuccess;\n \n defaultParams.OnNoResultReturned = function() {\n if (firstSearch) {\n firstSearch = false;\n widget.initialized = true;\n $(widget).trigger('mondialrelay.initialized');\n }\n \n if (OnNoResultReturned) {\n OnNoResultReturned();\n }\n \n $(widget).trigger('mondialrelay.searchComplete', {result: []});\n };\n \n defaultParams.OnSearchSuccess = function(data) {\n if (firstSearch) {\n firstSearch = false;\n widget.initialized = true;\n $(widget).trigger('mondialrelay.initialized');\n }\n \n if (OnSearchSuccess) {\n OnSearchSuccess(data);\n }\n \n $(widget).trigger('mondialrelay.searchComplete', {result: data});\n };*/\n\n $(widget.widget_container).MR_ParcelShopPicker(defaultParams);\n widget.initialized = true;\n};\n\nwidget.show = () => {\n $(widget.widget_container).show();\n};\n\nwidget.hide = () => {\n $(widget.widget_container).hide();\n};\n\nwidget.update = (params) => {\n $(widget.widget_container).trigger(\"MR_SetParams\", params);\n};\n\nwidget.initOrUpdate = (params) => {\n if (widget.initialized) {\n widget.update(params);\n } else {\n widget.init(params);\n }\n};\n\nwidget.setSelectedRelay = (relayIdentifier, relayData) => {\n if (typeof relayIdentifier == 'undefined' || !relayIdentifier) {\n relayIdentifier = $(widget.selected_relay_input).val();\n }\n \n if (relayIdentifier != $(widget.selected_relay_input).val()) {\n // @TODO : select relay on map... if we can\n return;\n }\n \n // This can happen sometimes; we don't want to trigger a change if the value\n // didn't actually change\n if (MONDIALRELAY_SELECTED_RELAY_IDENTIFIER != relayIdentifier) {\n let oldRelay = MONDIALRELAY_SELECTED_RELAY_IDENTIFIER;\n MONDIALRELAY_SELECTED_RELAY_IDENTIFIER = relayIdentifier;\n $(widget).trigger('mondialrelay.selectedRelay', {oldRelay: oldRelay, relayData: relayData});\n }\n};\n\nwidget.displayErrors = (messages) => {\n let box = $(widget.error_container);\n if (box.length == 0) {\n return;\n }\n \n box.stop(true);\n \n if (box.children().length) {\n box.fadeOut(function() {\n $(this).empty();\n });\n }\n \n if (typeof messages == 'undefined' || !messages) {\n return;\n }\n \n // Either the queue is already going with .fadeOut(), either it will be\n // launched by .fadeIn()\n box.queue(function() {\n \n let errors = [];\n $.each(messages, function(k, m) {\n errors.push($(\"
\").addClass(\"alert alert-danger\").text(m));\n });\n \n $(this).append(errors);\n $(this).dequeue();\n });\n box.fadeIn();\n};\n\nwidget.addLoader = (container) => {\n if ($(container).length == 0) {\n return;\n }\n \n if ($(container).children('.mondialrelay_loader').length > 0) {\n return;\n }\n \n $(\"#mondialrelay_loader-template\")\n .clone()\n .attr('id', null)\n .show()\n .appendTo(container);\n};\n\nwidget.removeLoader = (container) => {\n $(container).children('.mondialrelay_loader').remove();\n};\n\n$(document).ready(function() {\n widget.savedRelay = MONDIALRELAY_SELECTED_RELAY_IDENTIFIER;\n $(widget).trigger('mondialrelay.ready');\n});\n\n$(document).on('click', widget.change_button, function(ev) {\n widget.show();\n});\n\n$(document).on('click', '.MRW-ShowList', function(ev) {\n ev.preventDefault();\n ev.stopPropagation();\n});\n\nexport { widget };"],"sourceRoot":""}