%PDF- %PDF-
| Direktori : /home/gachan/www/wp-content/plugins/mailchimp/assets/js/ |
| Current File : /home/gachan/www/wp-content/plugins/mailchimp/assets/js/form-request.min.js |
!function(){function a(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent("on"+b,c)}var b=function(b){function c(){return d.element=document.getElementById(b.formElementId),d.element?(1!=b.success&&d.repopulate(),void d.scrollTo()):!1}var d=this;this.scrollTo=function(){var a=d.element,c=0,e=a,f=window.innerHeight;if(e.offsetParent){do c+=e.offsetTop;while(e=e.offsetParent)}else c=a.offsetTop;c-=f-80>a.clientHeight?(f-a.clientHeight)/2:80,b.animate_scroll&&void 0!==window.jQuery?jQuery("html, body").animate({scrollTop:c},800):window.scrollTo(0,c)},this.repopulate=function(){populate(d.element.querySelector("form"),b.data)},a(window,"load",c)};window.mc4wpFormRequest=new b(mc4wpFormRequestData),function(a){var b=function(a,c,d){for(var e in c)if(c.hasOwnProperty(e)){var f=e,g=c[e];if("undefined"!=typeof d&&(f=d+"["+e+"]"),g.constructor===Array)f+="[]";else if("object"==typeof g){b(a,g,f);continue}var h=a.elements.namedItem(f);if(h)switch(h.type||h.constructor){default:h.value=g;break;case RadioNodeList:for(var i=0;i<h.length;i++)h[i].checked=g.indexOf(h[i].value)>-1;break;case"select-multiple":for(var j=g.constructor==Array?g:[g],k=0;k<h.options.length;k++)h.options[k].selected|=j.indexOf(h.options[k].value)>-1;break;case"select":case"select-one":h.value=g.toString()||g}}};"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return b}):"object"==typeof exports?exports.populate=b:a.populate=b}(this)}();