/** * jQuery serializeObject * @copyright 2014, macek * @link https://github.com/macek/jquery-serialize-object * @license BSD * @version 2.5.0 */ (function(n,t){if(typeof define=="function"&&define.amd)define(["exports","jquery"],function(n,i){return t(n,i)});else if(typeof exports!="undefined"){var i=require("jquery");t(exports,i)}else t(n,n.jQuery||n.Zepto||n.ender||n.$)})(this,function(n,t){function i(n,i){function e(n,t,i){return n[t]=i,n}function s(n,t){for(var f=n.match(r.key),i,u;(i=f.pop())!==undefined;)r.push.test(i)?(u=h(n.replace(/\[\]$/,"")),t=e([],u,t)):r.fixed.test(i)?t=e([],i,t):r.named.test(i)&&(t=e({},i,t));return t}function h(n){return f[n]===undefined&&(f[n]=0),f[n]++}function c(n){switch(t('[name="'+n.name+'"]',i).attr("type")){case"checkbox":return n.value==="on"?!0:n.value;default:var r=t('[name="'+n.name+'"]',i).attr("data-type"),u=t('[name="'+n.name+'"]',i).attr("data-name");return r&&u&&u=="int"||r=="pop"?t('[name="'+n.name+'"]',i).data("value")||t('[name="'+n.name+'"]',i).attr("data-value")||n.value:n.value}}function l(t){if(!r.validate.test(t.name))return this;var i=s(t.name,c(t));return u=n.extend(!0,u,i),this}function a(t){if(!n.isArray(t))throw new Error("formSerializer.addPairs expects an Array");for(var i=0,r=t.length;i