ok
Direktori : /home2/selectio/www/subamangala/admin/autocomplete/dist/ |
Current File : //home2/selectio/www/subamangala/admin/autocomplete/dist/disableautofill.min.js.map |
{"version":3,"sources":["webpack://disableautofill/webpack/universalModuleDefinition","webpack://disableautofill/./src/DisableAutoFill.js","webpack://disableautofill/./src/debug.js","webpack://disableautofill/./src/handler.js","webpack://disableautofill/./src/listener.js","webpack://disableautofill/./src/randomizer.js","webpack://disableautofill/webpack/bootstrap","webpack://disableautofill/webpack/runtime/global","webpack://disableautofill/./index.js"],"names":["root","factory","exports","module","define","amd","a","i","self","listener","debug","g","DAF_DEBUG","setting","this","Object","keys","forEach","key","Array","prototype","insert","index","item","splice","form","fields","asterisk","callback","level","message","data","c1","c2","c3","msg","print","setTimeout","console","log","bind","randomizer","originalValue","tempValue","length","obj","event","action","id","Math","random","toString","substring","hasOwnProperty","orig","value","temp","len","currKeyupPos","selectionStart","diff","keyCode","charCode","replace","ran","randomize","restore","handler","formDom","getDom","text","indexOf","document","getElementsByClassName","getElementById","addEventListener","field","fieldDom","preventDefault","restorePassword","Promise","resolve","reject","then","submit","origName","tempName","object","_instance","randomName","name","join","__webpack_module_cache__","__webpack_require__","moduleId","__webpack_modules__","globalThis","Function","e","window","disableautofill"],"mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAAqB,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,OACP,CACJ,IAAIK,EAAIL,IACR,IAAI,IAAIM,KAAKD,GAAuB,iBAAZJ,QAAuBA,QAAUF,GAAMO,GAAKD,EAAEC,IAPxE,CASGC,MAAM,WACT,M,2BCTA,MAAMC,EAAW,EAAQ,GACnBC,EAAQ,EAAQ,KAGtB,EAAAC,EAAOC,WAAY,EAkDnBT,EAAOD,QA5CP,MAEI,YAAYW,GAGRC,KAAKD,QAAU,CACX,KAAQ,KACR,OAAU,GACV,SAAY,IACZ,OAAS,EACT,SA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,GAAU5F,QAG3C,IAAIC,EAASyF,EAAyBE,GAAY,CAGjD5F,QAAS,IAOV,OAHA6F,EAAoBD,GAAU3F,EAAQA,EAAOD,QAAS2F,GAG/C1F,EAAOD,QCpBf2F,EAAoBlF,EAAI,WACvB,GAA0B,iBAAfqF,WAAyB,OAAOA,WAC3C,IACC,OAAOlF,MAAQ,IAAImF,SAAS,cAAb,GACd,MAAOC,GACR,GAAsB,iBAAXC,OAAqB,OAAOA,QALjB,G,ICApBC,E,OAAAA,EAAkB,EAAQ,KAER,oBAAXD,SACVA,OAAOC,gBAAmBA,G","file":"disableautofill.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(self, function() {\nreturn ","\nconst listener = require('listener');\nconst debug = require('debug');\n\n// Global variable for debug.js\nglobal.DAF_DEBUG = false;\n\n/**\n * This class is used as an initialization, defining the basic settings\n * and implementing the functionality of disabling autofill.\n */\nclass DisableAutoFill {\n\n constructor(setting) {\n\n // Default settings.\n this.setting = {\n 'form': null,\n 'fields': [],\n 'asterisk': '●',\n 'debug': false,\n 'callback': null,\n };\n \n Object.keys(this.setting).forEach(key => {\n if (typeof setting[key] !== 'undefined') {\n this.setting[key] = setting[key];\n }\n });\n }\n\n init() {\n\n debug('info', 'DisableAutoFill.js is initialized.');\n\n // Extends native Array.\n // This method will be used in handler.js\n Array.prototype.insert = function (index, item) {\n this.splice(index, 0, item);\n };\n\n let form = this.setting.form;\n let fields = this.setting.fields;\n let asterisk = this.setting.asterisk;\n let callback = this.setting.callback;\n\n if (this.setting.debug) {\n DAF_DEBUG = true;\n }\n\n // Magic happens here.\n listener(form, fields, asterisk, callback);\n }\n}\n\nmodule.exports = DisableAutoFill;","'use strict';\n\n /**\n * Print colorful messages to the browser console. \n * For debugging purpose.\n *\n * @param {string} level The level.\n * @param {string} message The message.\n * @param {mixed} data The data.\n * @return null\n */\nfunction debug(level, message, data) {\n let c1, c2, c3, msg;\n let print = false;\n\n // DAF_DEBUG is defined at DisableAutoFill.js\n if (typeof DAF_DEBUG !== 'undefined') {\n print = DAF_DEBUG;\n }\n\n switch (level) {\n case 'error':\n c1 = 'color: #e60012';\n c2 = 'color: #c55f67';\n break;\n case 'info':\n c1 = 'color: #00a0e9';\n c2 = 'color: #458ca2';\n break;\n case 'warning':\n c1 = 'color: #eb6100';\n c2 = 'color: #c09374';\n break;\n case 'debug':\n c1 = 'color: #920783';\n c2 = 'color: #8957a1';\n break;\n default:\n return null;\n }\n c3 = 'color: #333333';\n\n msg = '%c[' + level + '] %cDAF: %c' + message;\n\n if (print) {\n // Hide line number and source URL.\n setTimeout(console.log.bind(console, msg, c1, c2, c3));\n\n if (typeof data !== 'undefined' && data !== null) {\n setTimeout(console.log(data));\n }\n }\n}\n\nmodule.exports = debug;\n","'use strict';\n\nconst randomizer = require('randomizer');\nconst debug = require('debug');\n\n// Those variables are used as module scope containers.\nvar originalValue = [];\nvar tempValue = [];\nvar length = [];\n\n/**\n * Handler function handle the DOM is triggered.\n *\n * @param {object} obj The DOM element.\n * @param {orject} event The listening event.\n * @param {string} asterisk The asterisk symbol.\n * @param {string} action The randomizer's action. Option: randomize, restore\n */\nfunction handler(obj, event, asterisk, action) {\n\n if (!obj.id) {\n // Create a radom string for this DOM's id, if the id doesn't exist.\n obj.id = Math.random().toString(36).substring(5);\n }\n\n if (!originalValue.hasOwnProperty(obj.id)) {\n // Defind a empty array for this random id string.\n // We'd like to store the original value for restore it later.\n originalValue[obj.id] = [];\n }\n\n let orig = originalValue[obj.id];\n\n tempValue[obj.id] = obj.value;\n let temp = tempValue[obj.id];\n\n length[obj.id] = temp.length;\n let len = length[obj.id];\n\n // Get current keyup character position.\n let currKeyupPos = obj.selectionStart;\n\n for (let i = 0; i < len; i++) {\n if (temp[i] !== asterisk) {\n orig[i] = temp[i];\n }\n }\n\n if (len < orig.length) {\n var diff = orig.length - len;\n\n var key = event.keyCode || event.charCode;\n\n // Check if last keypress was backspace or delete\n if (key == 8 || key == 46) {\n orig.splice(currKeyupPos, diff);\n }\n // User highlighted and overwrote a portion of the password\n else {\n orig.splice(currKeyupPos - 1, diff + 1);\n orig.insert(currKeyupPos - 1, temp[currKeyupPos - 1]);\n }\n }\n\n // Mark password as asterrisk symbols.\n obj.value = temp.replace(/./g, asterisk);\n\n // Let's randomize the name attribute, preventing Chrome from remembering filled data.\n // We will resotre the real data back when performing form submission.\n let ran = randomizer(obj, orig);\n\n if (action === 'randomize') {\n ran.randomize();\n } else if (action === 'restore') {\n ran.restore();\n }\n\n debug('debug', 'Current keyup position: ' + currKeyupPos);\n debug('debug', 'Password length: ' + len);\n debug('debug', 'Password: ', orig);\n}\n\nmodule.exports = handler;\n","'use strict';\n\nconst debug = require('debug');\nconst handler = require('handler');\n\n /**\n * Event listener for password fields.\n * We'd like to hide the original password string with symbol characters.\n *\n * @param {string} form The form's .class or #id\n * @param {array} fields A collecition of the DOMs' .class or #id\n * @param {string} asterisk The asterisk symbol. (option)\n * @param {function} callback Generally the form validator.\n * @return null\n */\nfunction listener(form, fields, asterisk, callback) {\n let formDom = null;\n\n let getDom = text => {\n\n // text is a string of \"class\".\n if (text.indexOf('.') == 0) {\n return document.getElementsByClassName(\n text.substring(1)\n )[0];\n\n // text is a string of \"id\".\n } else if (text.indexOf('#') == 0) {\n return document.getElementById(\n text.substring(1)\n );\n }\n };\n\n formDom = getDom(form);\n\n if (formDom !== null) {\n formDom.addEventListener('keyup', event => {\n fields.forEach((field, i) => {\n let fieldDom = {};\n fieldDom[i] = getDom(field);\n\n if (typeof fieldDom[i] !== 'undefined') {\n debug('info', 'Keyup event ' + i + ' is triggered!');\n handler(fieldDom[i], event, asterisk, 'randomize');\n } else {\n debug('warning', 'The field called \"' + field + '\" is not found.');\n }\n });\n });\n\n formDom.addEventListener('submit', event => {\n event.preventDefault();\n\n let restorePassword = new Promise((resolve, reject) => {\n fields.forEach((field, i) => {\n let fieldDom = {};\n fieldDom[i] = getDom(field);\n \n if (typeof fieldDom[i] !== 'undefined') {\n handler(fieldDom[i], event, asterisk, 'restore');\n return resolve();\n } else {\n debug('warning', 'The field called \"' + field + '\" is not found.');\n return reject();\n }\n });\n });\n\n if (typeof callback === 'function') {\n restorePassword.then(() => {\n // Once restore the password successfully, run callback function to check the form.\n if (callback(formDom)) {\n formDom.submit();\n } else {\n debug('warning', 'Callback returned false.');\n }\n });\n } else {\n restorePassword.then(() => {\n formDom.submit();\n });\n }\n });\n\n } else {\n debug('warning', 'Form element \"' + form + '\" not found.');\n }\n return null;\n}\n\nmodule.exports = listener;\n","'use strict';\n\n// Those variables are used as module scope containers, for using on both methods.\nvar origName = {};\nvar tempName = {};\n\n/**\n * Randomize or recover the name attribute.\n *\n * @param {object} object The DOM.\n * @param {array} originalValue The original password.\n */\nfunction randomizer(object, originalValue) {\n \n\n let _instance = {};\n\n let obj = object;\n let orig = originalValue;\n\n /**\n * ramdomize\n *\n * Add random chars on \"name\" attribute to avid Browser remember what you submitted before.\n */\n _instance.randomize = function() {\n let id = obj.id;\n let randomName = Math.random().toString(36).replace(/[^a-z]+/g, '');\n\n if (!origName[id]) {\n origName[id] = obj.name;\n }\n\n if (tempName[origName[id]]) {\n obj.name = tempName[origName[id]];\n } else {\n obj.name = randomName;\n tempName[origName[id]] = randomName;\n }\n };\n\n /**\n * resote\n *\n * Remove random chars on \"name\" attribute, so we can submit correct data then.\n * Restore password from star signs to original input password.\n */\n _instance.restore = function() {\n obj.name = origName[obj.id];\n obj.value = orig.join('');\n };\n\n return _instance;\n}\n\nmodule.exports = randomizer;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","var disableautofill = require('./src/DisableAutoFill');\n\nif (typeof window !== 'undefined') {\n\twindow.disableautofill = disableautofill;\n}\n"],"sourceRoot":""}