{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./js/jquery.floatify.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","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","$","pluginName","defaults","jQuery","window","document","position","hGap","_class","el","config","_classCallCheck","this","$el","test","attr","extend","_defaults","init","_createClass","updateHTML","wireEvents","toggle","ph","toLowerCase","replace","parent","addClass","class","text","for","css","insertBefore","$this","val","length","removeClass","_this","on","e","currentTarget","fn","options","each","data"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAA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AKF,OAAOJ,UAGzCN,EAAE,YAAa,CACxB4B,MAAO,kBACPC,KAAMN,EACNO,IAAKlB,KAAKC,IAAIE,KAAK,MACnBgB,YACK,UAAYnB,KAAKF,OAAOJ,WAAWM,KAAKF,OAAOH,MAAQ,oGAE7DyB,aAAapB,KAAKC,KAGrBD,KAAKC,IAAIc,SAAS,sBA5C1B,CAAApC,IAAA,SAAAN,MAAA,SA+CWwB,GACH,IAAIwB,EAAQjC,EAAES,GAEVwB,EAAMC,MAAMC,OAAQF,EAAMP,SAASC,SAAS,oBAC3CM,EAAMP,SAASU,YAAY,sBAnDxC,CAAA7C,IAAA,aAAAN,MAAA,WAsDiB,IAAAoD,EAAAzB,KACTA,KAAKC,IAAIyB,GAAG,cAAe,SAACC,GAAD,OAAOF,EAAKf,OAAOiB,EAAEC,qBAvDxDhC,EAAA,GA2DAR,EAAEyC,GAAGxC,GAAc,SAAUyC,GACzB,OAAO9B,KAAK+B,KAAK,WACR3C,EAAE4C,KAAKhC,KAAM,UAAYX,IAC1BD,EAAE4C,KAAKhC,KAAM,UAAYX,EAAY,IAAIH,EAAEG,GAAYW,KAAM8B","file":"jquery.floatify.min.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 = 0);\n","import '../scss/jquery.floatify.scss';\r\n\r\n/*!\r\n * Floatify - A light-weight floating form label plugin for jQuery\r\n *\r\n * Copyright 2018, Mehdi Dehghani\r\n *\r\n * @author Mehdi Dehghani (http://www.github.com/dehghani-mehdi)\r\n * @license Licensed under MIT (https://github.com/dehghani-mehdi/floatify/blob/master/LICENSE)\r\n *\r\n */\r\n\r\n(function ($, window, document, undefined) {\r\n const pluginName = 'floatify',\r\n p = {},\r\n defaults = {\r\n position: 'left',\r\n hGap: 10\r\n };\r\n\r\n p[pluginName] = class {\r\n constructor(el, config) {\r\n this.el = el;\r\n this.$el = $(el);\r\n\r\n if (/submit|checkbox|radio|hidden/.test(this.$el.attr('type'))) return;\r\n\r\n this.config = $.extend({}, defaults, config);\r\n\r\n this._defaults = defaults;\r\n\r\n this.init();\r\n }\r\n\r\n init() {\r\n this.updateHTML();\r\n this.wireEvents();\r\n\r\n this.toggle(this.el);\r\n }\r\n\r\n updateHTML() {\r\n let ph = this.$el.attr('placeholder');\r\n\r\n if (typeof ph === 'undefined') return;\r\n\r\n // add id to input, if not exists\r\n if (typeof this.$el.attr('id') === 'undefined') this.$el.attr('id', ph.toLowerCase().replace(/ /g, '-'));\r\n\r\n // add floatify class to element parent\r\n this.$el.parent().addClass('floatify');\r\n this.$el.parent().addClass('floatify__' + this.config.position);\r\n\r\n // add float label\r\n let $label = $('<label />', {\r\n class: 'floatify__label',\r\n text: ph,\r\n for: this.$el.attr('id'),\r\n css: {\r\n ['margin-' + this.config.position]: this.config.hGap || 0\r\n }\r\n }).insertBefore(this.$el);\r\n\r\n // remove placeholder attribute from element and add floatify__input class\r\n this.$el.addClass('floatify__input');\r\n }\r\n\r\n toggle(el) {\r\n let $this = $(el);\r\n\r\n if ($this.val().length) $this.parent().addClass('floatify__active');\r\n else $this.parent().removeClass('floatify__active');\r\n }\r\n\r\n wireEvents() {\r\n this.$el.on('input paste', (e) => this.toggle(e.currentTarget));\r\n }\r\n }\r\n\r\n $.fn[pluginName] = function (options) {\r\n return this.each(function () {\r\n if (!$.data(this, 'plugin_' + pluginName)) {\r\n $.data(this, 'plugin_' + pluginName, new p[pluginName](this, options));\r\n }\r\n });\r\n };\r\n})(jQuery, window, document);"],"sourceRoot":""}