1 line
68 KiB
JavaScript
1 line
68 KiB
JavaScript
|
|
function scrollToGatewayInputError(){var e=jQuery(".gateway-errors,.assisted-cc-input-feedback").first();(e.closest("form")||jQuery("form").first()).find('button[type="submit"],input[type="submit"]').prop("disabled",!1).removeClass("disabled").find("i.fas,i.far,i.fal,i.fab").removeAttr("class").addClass("fas fa-arrow-circle-right").find("span").toggle(),e.length&&elementOutOfViewPort(e[0])&&jQuery("html, body").animate({scrollTop:e.offset().top-50},500)}function elementOutOfViewPort(e){var e=e.getBoundingClientRect(),t={};return t.top=e.top<0,t.left=e.left<0,t.bottom=e.bottom>(window.innerHeight||document.documentElement.clientHeight),t.right=e.right>(window.innerWidth||document.documentElement.clientWidth),t.any=t.top||t.left||t.bottom||t.right,t.any}!function(g){var v="iCheck",j=v+"-helper",C="checkbox",b="radio",w="checked",p="un"+w,Q="disabled",f="determinate",k="in"+f,S="update",M="type",x="click",D="touchbegin.i touchend.i",T="addClass",R="removeClass",U="trigger",H="label",m="cursor",W=/ip(hone|od|ad)|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent)||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints;function A(e,t,n){var i=e[0],a=/er/.test(n)?k:/bl/.test(n)?Q:w,r=n==S?{checked:i[w],disabled:i[Q],indeterminate:"true"==e.attr(k)||"false"==e.attr(f)}:i[a];if(/^(ch|di|in)/.test(n)&&!r)P(e,a);else if(/^(un|en|de)/.test(n)&&r)I(e,a);else if(n==S)for(var o in r)(r[o]?P:I)(e,o,!0);else t&&"toggle"!=n||(t||e[U]("ifClicked"),r?i[M]!==b&&I(e,a):P(e,a))}function P(e,t,n){var i,a,r=e[0],o=e.parent(),s=t==w,d=t==k,l=t==Q,u=d?f:s?p:"enabled",c=y(e,u+E(r[M])),h=y(e,t+E(r[M]));!0!==r[t]&&(!n&&t==w&&r[M]==b&&r.name&&(i=e.closest("form"),a='input[name="'+r.name+'"]',(a=i.length?i.find(a):g(a)).each(function(){this!==r&&g(this).data(v)&&I(g(this),t)})),d?(r[t]=!0,r[w]&&I(e,w,"force")):(n||(r[t]=!0),s&&r[k]&&I(e,k,!1)),O(e,s,t,n)),r[Q]&&y(e,m,!0)&&o.find("."+j).css(m,"default"),o[T](h||y(e,t)||""),o.attr("role")&&!d&&o.attr("aria-"+(l?Q:w),"true"),o[R](c||y(e,u)||"")}function I(e,t,n){var i=e[0],a=e.parent(),r=t==w,o=t==k,s=t==Q,d=o?f:r?p:"enabled",l=y(e,d+E(i[M])),u=y(e,t+E(i[M]));!1!==i[t]&&(!o&&n&&"force"!=n||(i[t]=!1),O(e,r,d,n)),!i[Q]&&y(e,m,!0)&&a.find("."+j).css(m,"pointer"),a[R](u||y(e,t)||""),a.attr("role")&&!o&&a.attr("aria-"+(s?Q:w),"false"),a[T](l||y(e,d)||"")}function L(e,t){e.data(v)&&(e.parent().html(e.attr("style",e.data(v).s||"")),t&&e[U](t),e.off(".i").unwrap(),g(H+'[for="'+e[0].id+'"]').add(e.closest(H)).off(".i"))}function y(e,t,n){if(e.data(v))return e.data(v).o[t+(n?"":"Class")]}function E(e){return e.charAt(0).toUpperCase()+e.slice(1)}function O(e,t,n,i){i||(t&&e[U]("ifToggled"),e[U]("change")[U]("ifChanged")[U]("if"+E(n)))}g.fn[v]=function(t,n){function e(e){e.each(function(){var e=g(this);r=e.is(a)?r.add(e):r.add(e.find(a))})}var u,i,c,h,p,f,m,y,a='input[type="'+C+'"], input[type="'+b+'"]',r=g();return/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(t)?(t=t.toLowerCase(),e(this),r.each(function(){var e=g(this);"destroy"==t?L(e,"ifDestroyed"):A(e,!0,t),g.isFunction(n)&&n()})):"object"!=typeof t&&t?this:(i=(u=g.extend({checkedClass:w,disabledClass:Q,indeterminateClass:k,labelHover:!0},t)).handle,c=u.hoverClass||"hover",h=u.focusClass||"focus",p=u.activeClass||"active",f=!!u.labelHover,m=u.labelHoverClass||"hover",y=0|(""+u.increaseArea).replace("%",""),i!=C&&i!=b||(a='input[type="'+i+'"]'),y<-50&&(y=-50),e(this),r.each(function(){var i=g(this),a=(L(i),this),e=a.id,t=-y+"%",n=100+2*y+"%",t={position:"absolute",top:t,left:t,display:"block",width:n,height:n,margin:0,padding:0,background:"#fff",border:0,opacity:0},n=W?{position:"absolute",visibility:"hidden"}:y?t:{position:"absolute",opacity:0},r=a[M]==C?u.checkboxClass||"i"+C:u.radioClass||"i"+b,o=g(H+'[for="'+e+'"]').add(i.closest(H)),s=!!u.aria,d=v+"-"+Math.random().toString(36).substr(2,6),l='<div class="'+r+'" '+(s?'role="'+a[M]+'" ':"");s&&o.each(function(){l+='aria-labelledby="',this.id?l+=this.id:(this.id=d,l+=d),l+='"'}),l=i.wrap(l+"/>")[U]("ifCreated").parent().append(u.insert),
|