{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./cartridges/app_storefront_base/cartridge/client/default/js/util.js","webpack:///./cartridges/app_urbanelectric/cartridge/client/default/js/priceList.js","webpack:///./cartridges/app_urbanelectric/cartridge/client/default/js/product/priceList.js"],"names":["installedModules","__webpack_require__","moduleId","module","i","l","exports","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","_typeof","iterator","constructor","include","keys","forEach","processInclude","require","$","document","ready","url","querySelector","window","location","protocol","host","pathname","history","pushState","path","sort","jQuery","fn","sortElements","comparator","getSortable","this","placements","map","sortElement","parentNode","nextSibling","insertBefore","createTextNode","Error","removeChild","each","box","scrollbarWidth","offsetWidth","clientWidth","toString","root","documentElement","minWidthVal","style","setProperty","width","table","click","data","on","divId","title","mywindow","open","write","concat","getElementById","innerHTML","close","focus","setTimeout","print","$rows","wrapInner","th","thIndex","index","inverse","find","filter","a","b","descriptionTextA","valA","text","valB","indexOf","replace","str","isNaN","parseFloat","parseInt","parent","first","descriptionTextB","e","preventDefault","val","trim","toLowerCase","show","hide","addClass","removeClass"],"mappings":"KACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,IAIIC,EAJJ,OAAGH,EAAiBE,KAIhBC,EAASH,EAAiBE,GAAY,CACzCE,EAAGF,EACHG,EAAG,GACHC,QAAS,EACV,EAGAC,EAAQL,GAAUM,KAAKL,EAAOG,QAASH,EAAQA,EAAOG,QAASL,CAAmB,EAGlFE,EAAOE,EAAI,GAGJF,IAhB4BG,OAiBpC,CAIAL,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASL,EAASM,EAAMC,GAC3CZ,EAAoBa,EAAER,EAASM,CAAI,GACtCG,OAAOC,eAAeV,EAASM,EAAM,CAAEK,WAAY,GAAMC,IAAKL,CAAO,CAAC,CAExE,EAGAZ,EA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b,QAAQW,CAAG,CAC7B,CAAC,EAAEI,KAAK,CACZ,CAAC,EAEDtF,EAAE,cAAc,EAAE4C,GAAG,QAAS,WAC1B5C,EAAE,qBAAqB,EAAEsD,MAAM,EAC/BtD,EAAE,wBAAwB,EAAEuF,SAAS,QAAQ,CACjD,CAAC,EAEDvF,EAAE,qBAAqB,EAAE4C,GAAG,QAAS,WACjC5C,EAAE,wBAAwB,EAAEuF,SAAS,QAAQ,CACjD,CAAC,EAEDvF,EAAE,qBAAqB,EAAE4C,GAAG,OAAQ,WAC3BzB,KAAK1C,OACNuB,EAAE,wBAAwB,EAAEwF,YAAY,QAAQ,CAExD,CAAC,CACL,CAAC,C","file":"cartridges/app_urbanelectric/cartridge/static/default/js/priceList.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 = 203);\n","'use strict';\n\nmodule.exports = function (include) {\n if (typeof include === 'function') {\n include();\n } else if (typeof include === 'object') {\n Object.keys(include).forEach(function (key) {\n if (typeof include[key] === 'function') {\n include[key]();\n }\n });\n }\n};\n","'use strict';\n\nvar processInclude = require('base/util');\n\n$(document).ready(function () {\n processInclude(require('./product/priceList'));\n\n // On Patents page, removes query string from URL\n if (document.querySelector('.patents-page')) {\n let url = window.location.protocol + '//' + window.location.host + window.location.pathname;\n window.history.pushState({ path: url }, '', url);\n }\n});\n","'use strict';\n\n// eslint-disable-next-line require-jsdoc\nfunction printDiv(divId, title) {\n let mywindow = window.open('', 'PRINT', 'height=650,width=900,top=100,left=150');\n\n mywindow.document.write(`${title}`);\n mywindow.document.write('');\n mywindow.document.write('');\n mywindow.document.write('
' + document.getElementById('UECoLogo').innerHTML + '
');\n\n mywindow.document.write(document.getElementById(divId).innerHTML);\n mywindow.document.write('');\n\n mywindow.document.close(); // necessary for IE >= 10\n mywindow.focus(); // necessary for IE >= 10*/\n\n setTimeout(function () { mywindow.print(); }, 1400);\n setTimeout(function () { mywindow.close(); }, 1450);\n\n return true;\n}\n\n// eslint-disable-next-line require-jsdoc\nfunction isNumeric(str) {\n if (typeof str !== 'string') return false; // we only process strings!\n return !isNaN(str) && // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...\n !isNaN(parseFloat(str)); // ...and ensure strings of whitespace fail\n}\n\njQuery.fn.sortElements = (() => {\n var sort = [].sort;\n return function (comparator, getSortable) {\n // eslint-disable-next-line no-param-reassign\n getSortable = getSortable || function () { return this; };\n\n var placements = this.map(function () {\n var sortElement = getSortable.call(this),\n parentNode = sortElement.parentNode,\n // Since the element itself will change position, we have\n // to have some way of storing it's original position in\n // the DOM. The easiest way is to have a 'flag' node:\n nextSibling = parentNode.insertBefore(\n document.createTextNode(''),\n sortElement.nextSibling\n );\n\n return function () {\n if (parentNode === this) {\n throw new Error(\n \"You can't sort elements if any one is a descendant of another.\"\n );\n }\n\n // Insert before flag:\n parentNode.insertBefore(this, nextSibling);\n // Remove flag:\n parentNode.removeChild(nextSibling);\n };\n });\n\n return sort.call(this, comparator).each(function (i) {\n placements[i].call(getSortable.call(this));\n });\n };\n})();\n\n$(document).ready(function () {\n var box = document.querySelector('.orders-tbody');\n var scrollbarWidth = (box.offsetWidth - box.clientWidth).toString() + 'px';\n var root = document.documentElement;\n var cssName = '--scroll_bar_width';\n root.style.setProperty(\n cssName, scrollbarWidth\n );\n\n var minWidthName = '--description-min-width';\n var minWidthVal = ($('.orders-tbody').width() * 0.28) + 'px';\n root.style.setProperty(\n minWidthName, minWidthVal\n );\n\n $('.clickable-row').click(function () {\n window.location = $(this).data('href');\n });\n\n $('.pricelist-print-button').on('click', function () {\n var divId = 'maincontent';\n var title = 'Urban Electric Price List';\n printDiv(divId, title);\n // generatePdf();\n });\n\n var table = $('.pricelist-container table');\n\n $('.pricelist-container th')\n .wrapInner('')\n .each(function () {\n var th = $(this),\n thIndex = th.index(),\n inverse = false;\n\n th.click(function () {\n table.find('td').filter(function () {\n return $(this).index() === thIndex;\n }).sortElements(function (a, b) {\n var valA = $.text([a]);\n var valB = $.text([b]);\n\n if (valA.indexOf('$') > -1) {\n valA = valA.replace(/\\D/g, '');\n valB = valB.replace(/\\D/g, '');\n }\n\n if (isNumeric(valA)) {\n valA = parseInt(valA);\n valB = parseInt(valB);\n }\n\n if (valA === valB) {\n var descriptionTextA = $(a).parent().find('.table-cell').first()\n .text();\n var descriptionTextB = $(b).parent().find('.table-cell').first()\n .text();\n\n if (descriptionTextA === descriptionTextB) return 0;\n\n // eslint-disable-next-line no-nested-ternary\n return descriptionTextA > descriptionTextB ? 1 : -1;\n }\n\n // eslint-disable-next-line no-nested-ternary\n return valA > valB ? inverse ? -1 : 1 : inverse ? 1 : -1;\n }, function () {\n // parentNode is the element we want to move\n return this.parentNode;\n });\n\n inverse = !inverse;\n });\n });\n\n $('#productSearchForm').on('submit', function (e) {\n e.preventDefault();\n });\n\n var $rows = $('table tbody tr');\n $('.order-search-input').on('keyup', function () {\n var val = $.trim($(this).val()).replace(/ +/g, ' ').toLowerCase();\n\n $rows.show().filter(function () {\n var text = $(this).text().replace(/\\s+/g, ' ').toLowerCase();\n return !~text.indexOf(val);\n }).hide();\n });\n\n $('.icon-search').on('click', function () {\n $('.order-search-input').focus();\n $('.pricelist-search-icon').addClass('d-none');\n });\n\n $('.order-search-input').on('focus', function () {\n $('.pricelist-search-icon').addClass('d-none');\n });\n\n $('.order-search-input').on('blur', function () {\n if (!this.value) {\n $('.pricelist-search-icon').removeClass('d-none');\n }\n });\n});\n"],"sourceRoot":""}