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AAY,KAE1D,CACT,EAEA,aAAc,SAAS,EAAG,GACxB,GAAS,MAAL,GAAc,EAAE,QAAQ,KAAO,EAAE,OACnC,EAAE,WAAW,gBAGb,IAAK,IAAI,KADT,EAAK,EAAE,QAAQ,GAAI,EAAE,CAAC,GAEpB,EAAE,OAAO,WAAW,EAAY,EAAE,IAAI,MAAM,KAAK,UAAW,WAGhE,MAAO,CAAC,EAAG,EACb,EAEA,UAAW,SAAS,EAAG,GAMrB,OALS,MAAL,EACF,EAAE,WAAW,WAEb,EAAE,OAAO,WAAW,EAAY,GAAG,MAAM,KAAK,UAAW,WAEpD,CAAC,EAAG,EACb,EAEA,WAAY,SAAS,EAAG,GAEtB,OADA,EAAE,IAAI,GACC,CAAC,EAAG,EACb,EAEA,SAAU,SAAS,EAAG,GACpB,GAAI,GAAK,EAAE,OAET,GAAI,KAAK,iBAAmB,EAAE,GAAG,KAAK,iBAAkB,CAEtD,IAAI,EAAI,KACJ,EAAE,WAAW,KAAK,cACpB,EAAI,KAAK,WAAW,IAGlB,aAAa,KACX,EAAE,WAAW,KAAK,gBACpB,EAAE,IAAI,KAAK,cAAc,EAAG,KAAK,aAGnC,EAAE,IAAI,EAGV,MAEQ,KAAK,oBAAsB,EAAE,GAAG,cAAe,EAAI,EAAE,QAAQ,gBAAiB,OACpF,EAAE,IAAI,GAGV,MAAO,CAAC,EAAG,EACb,GAIH,CAnVA,CAmVE","file":"/npm/jquery-prefill-form@1.0.0/src/jquery.prefillForm.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/jquery-prefill-form@1.0.0/src/jquery.prefillForm.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/* Copyright (c) 2013 Jordan Kasper\n * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)\n * Copyright notice and license must remain intact for legal use\n *\n * Requires: jQuery 1.7+\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, \n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF \n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS \n * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN \n * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN \n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * \n * Fore more usage documentation and examples, visit:\n *   https://github.com/jakerella/jqueryPrefillForm\n * \n */\n\n;(function($) {\n\n  // PRIVATE VARS & METHODS\n  var ns = 'prefillForm';\n  function getCleanVal(v) {\n    // can't include brackets or double quotes for some jQuery selectors\n    return v.replace(/[\\[\\]\\\"]/g, '');\n  }\n\n\n  /**\n   * This method will add a prefiller to the selected <form> and do the prefill with\n   * data provided in the options.\n   * \n   *  Typical usage:\n   *   $('#myForm').prefillForm({\n   *     data: eval(<?= json_encode($_POST) ?>)\n   *   });\n   * \n   * Optionally, if a prefiller is already on this node you can call the method again with:\n   *  - the name of an option to retrieve that option's value (i.e. var df = $('#myForm').prefillForm('dateFormat'); )\n   *  - the name of an option and a value to set that option's value (i.e. $('#myForm').prefillForm('dateFormat', 'Y-m-d'); )\n   *  - \"fillform\" to fill (or refill) the form from the data (i.e. $('#myForm').prefillForm('fillform'); )\n   * \n   * @param  {object|string} o If an OBJECT, creates a new prefiller on this <form> and uses the object as options (see method description for other uses)\n   * @param  {object} d The value of the option being set; only used when the first argument is a STRING\n   * @return {jQuery} The jQuery object for chain calling (NOTE: If an option was requested (not set) then this method returns that option value)\n   */\n  $.fn.prefillForm = function(o, d) {\n    var n = $(this);\n\n    if (n.hasClass(ns+'-prefiller') && n.data('prefiller') && o) {\n      var p = n.data('prefiller');\n      \n      if (o === 'fillform') {\n        return p.doFill(p.data);\n\n      } else {\n        if (d && p[o]) {\n          p[o] = d;\n        } else {\n          return p[o];\n        }\n      }\n\n    } else {\n      o = $.extend({}, $.Prefiller.defaults, ((o)?o:{}));\n      \n      if (!o.form && n.is('form')) {\n        o = $.extend(((o)?o:{}), {form: n});\n        var p = new $.Prefiller(o);\n\n        p.doFill(p.data);\n      }\n    }\n\n    return n;\n  };\n\n  \n  // CONSTRUCTOR\n  $.Prefiller = function(o) {\n    var t = this;\n    $.extend(t, ((o)?o:{}));\n\n    if (!t.form && !!t.findForm) {\n      t.form = t.doFindForm();\n      if (t.form.length) { t.form.trigger(ns+'.formFound', [t]) };\n    }\n    t.form = $(t.form); // ensure we have a jQuery object\n\n    // tweak date classes array for internal use\n    if (t.dateClasses && $.isArray(t.dateClasses) && t.dateClasses.length) {\n      t.dateClassString = '.'+t.dateClasses.join(', .');\n    } else {\n      t.dateClassString = null;\n    }\n\n    if (t.form.length && t.form.is('form')) {\n      t.form\n        .addClass(ns+'-prefiller')\n        .data('prefiller', t);\n    }\n    t.form.trigger(ns+'.created', [t])\n  };\n\n\n  // STATIC METHODS & PROPERTIES\n  /**\n   * Formats a given date object using the format provided\n   * @param  {Date} d    The Date object to format\n   * @param  {String} f  A string representation of the format (see $.Prefiller.formatters for options)\n   * @see $.Prefiller.formatters\n   * @return {String}    The String representation of the date\n   */\n  $.Prefiller.formatDate = function(d, f) {\n    if (!d || !(d instanceof Date)) { return d; }\n    \n    var v = '';\n    f = (''+f).split('');\n    var fm = $.Prefiller.formatters;\n    var c;\n    for (var ch in f) {\n      if ($.isFunction(fm[f[ch]])) {\n        c = ''+fm[f[ch]](d);\n      } else if (fm[f[ch]]) {\n        c = ''+d[fm[f[ch]]].call(d);\n      }\n      v += (c && c.length)?c:f[ch];\n      c = null;\n    }\n\n    return v;\n  };\n  // Static date format options based on PHP date() formatters\n  $.Prefiller.formatters = {\n    'Y': 'getFullYear', // four digit year\n    'm': function(d) { var m = d.getMonth()+1; return ((m<10)?('0'+m):m); }, // two digit month\n    'n': function(d) { return d.getMonth()+1; }, // one or two digit month\n    'j': function(d) { var dt = d.getDate(); return ((dt<10)?('0'+dt):dt); }, // two digit day\n    'd': 'getDate', // one or two digit day\n    'H': function(d) { var h = d.getHours(); return ((h<10)?('0'+h):h); }, // two digit hours on 24-hour clock\n    'G': 'getHours', // one or two digit hours on 24-hour clock\n    'h': function(d) { var h = d.getHours(); h = ((h>12)?(h-12):h); return ((h<10)?('0'+h):h); }, // two digit hours on 12-hour clock\n    'g': function(d) { var h = d.getHours(); return ((h>12)?(h-12):h); }, // one or two digit hours on 12-hour clock\n    'i': function(d) { var m = d.getMinutes(); return ((m<10)?('0'+m):m); }, // two digit minutes\n    's': function(d) { var s = d.getSeconds(); return ((s<10)?('0'+s):s); }, // two digit seconds\n    'a': function(d) { var h = d.getHours(); return ((h<12)?'am':'pm'); } // meridiem (\"am\"/\"pm\")\n  };\n\n\n  // PUBLIC PROPERTIES (Default options)\n  // Assign default options to the class prototype\n  $.extend($.Prefiller.prototype, {\n    form: null, // the form to prefill\n    action: null, // only match forms with this action\n    data: {}, // the request data (either POST or GET)\n    findForm: true, // if no form is provided, should the plugin find matching forms on the page?\n    matchMethod: true, // should the form finder match method? (only used when finding matching forms on the page)\n    method: 'get', // the form method to check for (only used when finding matching forms on the page)\n    matchEmptyAction: true, // should the form finder match empty form action attributes? (only used when finding matching forms on the page)\n    ignoreNames: ['MAX_FILE_SIZE'], // field names to ignore when prefilling - case insensitive\n    ignoreIds: [], // field IDs to ignore when prefilling\n    ignoreTypes: ['button', 'submit', 'reset', 'password'], // field types (for <input>) or tags (<textarea>, etc) to ignore (NOTE: always make these lower case! (the input type or tag will be converted to lower case))\n    convertBrToNewLine: true, // for texarea's only, should <br /> tags be converted to new line characters for display in the textarea?\n    dateClasses: ['date', 'datepicker'], // format date values for inputs with these classes (make this null (or empty) to disable date formatting)\n    dateFormatter: $.Prefiller.formatDate, // you can provide your own function here, but it must take the date object as the first arg and the string format as the second\n    dateParser: function(v) { return (new Date(v)); }, // you can provide your own date parsing function, but it must take a string date value as an argument\n    dateFormat: 'm/d/Y', // passed into the 'dateFormatter' option as second argument; for interal dateFormatter this uses PHP date() characters (but only some, see $.Prefiller.formatters)\n    location: window.location // Should only be used for testing, must include valid \"pathname\" and \"host\" entries\n  });\n  \n\n  // PUBLIC METHODS\n  $.extend($.Prefiller.prototype, {\n    \n    doFindForm: function() {\n      var t = this;\n      \n      var s = '';\n      var f = p = null;\n      var m = (t.matchMethod && t.method)?'[method=\"'+t.method+'\"]':'';\n\n      if (t.action) {\n        s += 'form[action=\"'+getCleanVal(t.action)+'\"]'+m;\n\n      } else {\n        var a = t.location.pathname.match(/(.+?)\\/?([^\\/]+\\.[^.]+)?$/);\n        if (a && a[0].length === 1) { a = null; } // don't match lonely \"/\"\n        if (a) {\n          p = ((a[1] && a[1].length > 1)?a[1]:null);\n          f = (a[2] && !(/^(index|default)\\./.test(a[2])))?a[2]:null; // ignore index or default files\n        }\n\n        if (p) {\n          s += 'form[action*=\"'+getCleanVal(p)+((f)?('/'+getCleanVal(f)):'')+'\"]'+m;\n          \n        } else {\n          s += 'form[action*=\"'+t.location.host+'\"]'+m+', form[action=\"/\"]'+m+', form[action^=\"/index.\"]'+m+', form[action^=\"/default.\"]'+m;\n        }\n\n        if (f) {\n          s += ', form[action^=\"'+getCleanVal(f)+'\"]'+m;\n        }\n      }\n\n      // Check for forms with no action (which submit to the current page, thus matching)\n      if (t.matchEmptyAction) { s += ', form[action=\"\"]'+m; }\n\n      var forms = null;\n      $(s).each(function() {\n        if (t.action) {\n          forms = $(this).add(forms);\n\n        } else {\n          // if we had to find the form(s) without a specific action, \n          // we may need to double check the \"action\" for an ending query string or \"index\" file\n          var a = $(this).attr('action');\n          if (a && a.length) {\n            if (f) {\n              // specific filename\n              var rep = (p)?\"(\"+p+\"/|^)\":'';\n              if ((new RegExp(rep+f.replace('.', '\\\\.')+\"(\\\\?.*)?$\")).test(a)) {\n                forms = $(this).add(forms);\n              }\n\n            } else if (p) {\n              if ((new RegExp(p+\"(/|/(index|default)\\\\.[a-zA-Z0-9]{1,5})?(\\\\?.*)?$\")).test(a)) {\n                forms = $(this).add(forms);\n              }\n\n            } else {\n              if ((new RegExp(\"^(https?://\"+t.location.host+\"/?|/)((index|default)\\\\.[a-zA-Z0-9]{1,5})?(\\\\?.*)?$\")).test(a)) {\n                forms = $(this).add(forms);\n              }\n            }\n          } else {\n            // blank action, let it in\n            forms = $(this).add(forms);\n          }\n        }\n        \n      });\n      return (forms)?forms:$(null);\n    },\n\n    doFill: function(d) {\n      var t = this;\n      d = (d)?d:((t.data)?t.data:{});\n\n      if (!t.form || !t.form.length || !t.form.is('form')) { return []; } // no form to fill!\n\n      var fields = [];\n      // loop through submitted data\n      for (n in d) {\n        \n        // Either gets the input or ignores it per options\n        var i = t.getOrIgnore(n);\n        if (!i) { continue; }\n\n        // go through various input types/tags and add values\n        \n        if (i.is(':checkbox')) {\n          t.fillCheckbox(i, d[n]);\n\n        } else if (i.is(':radio')) {\n          t.fillRadio(i, d[n]);\n\n        } else if (i.is('select')) {\n          t.fillSelect(i, d[n]);\n\n        } else {\n          t.fillText(i, d[n]);\n        }\n\n        fields.push([i, d[n]]);\n        i.trigger(ns+'.fieldFilled', [t, d[n]]);\n      }\n\n      this.form\n        .addClass(ns+'-prefilled')\n        .trigger(ns+'.formFilled', [t, fields]);\n      return fields;\n    },\n\n    getOrIgnore: function(n) {\n      // ignore by name (no need to find the field)\n      if ($.inArray(n, this.ignoreNames) > -1) { return null; }\n      \n      // find the field\n      var i = this.form.find('[name=\"'+n+'\"], [name=\"'+n+'[]\"]');\n      if (!i.length) { return null; }\n\n      // ignore some field IDs\n      var id = i.attr('id');\n      if (id && $.inArray(id, this.ignoreIds) > -1) { return null; }\n      \n      // ignore some field types (or tags)\n      var tp = (i.attr('type'))?i.attr('type'):i[0].tagName;\n      if ($.inArray(tp.toLowerCase(), this.ignoreTypes) > -1) { return null; }\n\n      return i;\n    },\n\n    fillCheckbox: function(i, v) {\n      if (v == null || ($.isArray(v) && !v.length)) {\n        i.removeAttr('checked');\n      } else {\n        v = ($.isArray(v))?v:[v];\n        for (var k in v) {\n          i.filter('[value=\"'+getCleanVal(v[k])+'\"]').attr('checked', 'checked');\n        }\n      }\n      return [i, v];\n    },\n\n    fillRadio: function(i, v) {\n      if (v == null) {\n        i.removeAttr('checked');\n      } else {\n        i.filter('[value=\"'+getCleanVal(v)+'\"]').attr('checked', 'checked');\n      }\n      return [i, v];\n    },\n\n    fillSelect: function(i, v) {\n      i.val(v); // jQuery handles this one pretty well...\n      return [i, v];\n    },\n\n    fillText: function(i, v) {\n      if (v && v.length) {\n        // date field handling\n        if (this.dateClassString && i.is(this.dateClassString)) {\n          // date input\n          var d = null;\n          if ($.isFunction(this.dateParser)) {\n            d = this.dateParser(v);\n          }\n          \n          if (d instanceof Date) {\n            if ($.isFunction(this.dateFormatter)) {\n              i.val(this.dateFormatter(d, this.dateFormat));\n            }\n          } else {\n            i.val(v);\n          }\n\n        } else {\n          // \"normal\" text inputs & textareas\n          if (!!this.convertBrToNewLine && i.is('textarea')) { v = v.replace(/\\<br\\s?\\/?\\>/g, \"\\n\"); }\n          i.val(v);\n        }\n      }\n      return [i, v];\n    }\n\n  });\n\n})(jQuery);"]}