var XDate,AVL,jss,EventRecorder,EventPlayer;!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("underscore",t):(n="undefined"!=typeof globalThis?globalThis:n||self,function(){var r=n._,i=n._=t();i.noConflict=function(){return n._=r,i}}())}(this,function(){function f(n,t){return t=null==t?n.length-1:+t,function(){for(var u,f=Math.max(arguments.length-t,0),r=Array(f),i=0;i<f;i++)r[i]=arguments[i+t];switch(t){case 0:return n.call(this,r);case 1:return n.call(this,arguments[0],r);case 2:return n.call(this,arguments[0],arguments[1],r)}for(u=Array(t+1),i=0;i<t;i++)u[i]=arguments[i];return u[t]=r,n.apply(this,u)}}function l(n){var t=typeof n;return"function"===t||"object"===t&&!!n}function lr(n){return void 0===n}function ar(n){return!0===n||!1===n||"[object Boolean]"===g.call(n)}function i(n){var t="[object "+n+"]";return function(n){return g.call(n)===t}}function c(n,t){return null!=n&&re.call(n,t)}function dr(n){return vr(n)&&ee(n)}function gr(n){return function(){return n}}function nu(n){return function(t){var i=n(t);return"number"==typeof i&&i>=0&&i<=se}}function tu(n){return function(t){if(null!=t)return t[n]}}function ru(n,t){t=function(n){for(var t={},r=n.length,i=0;i<r;++i)t[n[i]]=!0;return{contains:function(n){return t[n]},push:function(i){return t[i]=!0,n.push(i)}}}(t);var u=cr.length,f=n.constructor,e=r(f)&&f.prototype||pt,i="constructor";for(c(n,i)&&!t.contains(i)&&t.push(i);u--;)(i=cr[u])in n&&n[i]!==e[i]&&!t.contains(i)&&t.push(i)}function t(n){var t,i;if(!l(n))return[];if(er)return er(n);t=[];for(i in n)c(n,i)&&t.push(i);return hr&&ru(n,t),t}function uu(n,i){var e=t(i),o=e.length,f,r,u;if(null==n)return!o;for(f=Object(n),r=0;r<o;r++)if(u=e[r],i[u]!==f[u]||!(u in f))return!1;return!0}function n(t){return t instanceof n?t:this instanceof n?void(this._wrapped=t):new n(t)}function fu(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,st(n))}function dt(i,u,f,e){if(i===u)return 0!==i||1/i==1/u;if(null==i||null==u)return!1;if(i!=i)return u!=u;var o=typeof i;return("function"===o||"object"===o||"object"==typeof u)&&function i(u,f,e,o){var h,l,a,v,s,y,p;if(u instanceof n&&(u=u._wrapped),f instanceof n&&(f=f._wrapped),h=g.call(u),h!==g.call(f))return!1;if(kr&&"[object Object]"==h&&ft(u)){if(!ft(f))return!1;h=kt}switch(h){case"[object RegExp]":case"[object String]":return""+u==""+f;case"[object Number]":return+u!=+u?+f!=+f:0==+u?1/+u==1/f:+u==+f;case"[object Date]":case"[object Boolean]":return+u==+f;case"[object Symbol]":return ur.valueOf.call(u)===ur.valueOf.call(f);case"[object ArrayBuffer]":case kt:return i(fu(u),fu(f),e,o)}if(l="[object Array]"===h,!l&&iu(u)){if(st(u)!==st(f))return!1;if(u.buffer===f.buffer&&u.byteOffset===f.byteOffset)return!0;l=!0}if(!l&&("object"!=typeof u||"object"!=typeof f||(a=u.constructor,v=f.constructor,a!==v&&!(r(a)&&a instanceof a&&r(v)&&v instanceof v)&&"constructor"in u&&"constructor"in f)))return!1;for(o=o||[],s=(e=e||[]).length;s--;)if(e[s]===u)return o[s]===f;if(e.push(u),o.push(f),l){if((s=u.length)!==f.length)return!1;for(;s--;)if(!dt(u[s],f[s],e,o))return!1}else{if(p=t(u),s=p.length,t(f).length!==s)return!1;for(;s--;)if(y=p[s],!c(f,y)||!dt(u[y],f[y],e,o))return!1}return e.pop(),o.pop(),!0}(i,u,f,e)}function nt(n){var t,i;if(!l(n))return[];t=[];for(i in n)t.push(i);return hr&&ru(n,t),t}function gt(n){var t=e(n);return function(i){var f,u;if(null==i||(f=nt(i),e(f)))return!1;for(u=0;u<t;u++)if(!r(i[n[u]]))return!1;return n!==su||!r(i[ni])}}function v(n){for(var r=t(n),u=r.length,f=Array(u),i=0;i<u;i++)f[i]=n[r[i]];return f}function hu(n){for(var u={},r=t(n),i=0,f=r.length;i<f;i++)u[n[r[i]]]=r[i];return u}function ii(n){var i=[],t;for(t in n)r(n[t])&&i.push(t);return i.sort()}function ri(n,t){return function(i){var e=arguments.length,r,u;if(t&&(i=Object(i)),e<2||null==i)return i;for(r=1;r<e;r++)for(var o=arguments[r],s=n(o),h=s.length,f=0;f<h;f++)u=s[f],t&&void 0!==i[u]||(i[u]=o[u]);return i}}function au(n){var t,i;return l(n)?or?or(n):(t=function(){},t.prototype=n,i=new t,t.prototype=null,i):{}}function vu(n){return l(n)?a(n)?n.slice():cu({},n):n}function yu(n){return a(n)?n:[n]}function tt(t){return n.toPath(t)}function ui(n,t){for(var r=t.length,i=0;i<r;i++){if(null==n)return;n=n[t[i]]}if(r)return n}function pu(n,t,i){var r=ui(n,tt(t));return lr(r)?i:r}function fi(n){return n}function it(n){return n=ht({},n),function(t){return uu(t,n)}}function ei(n){return n=tt(n),function(t){return ui(t,n)}}function rt(n,t,i){if(void 0===t)return n;switch(null==i?3:i){case 1:return function(i){return n.call(t,i)};case 3:return function(i,r,u){return n.call(t,i,r,u)};case 4:return function(i,r,u,f){return n.call(t,i,r,u,f)}}return function(){return n.apply(t,arguments)}}function wu(n,t,i){return null==n?fi:r(n)?rt(n,t,i):l(n)&&!a(n)?it(n):ei(n)}function oi(n,t){return wu(n,t,1/0)}function o(t,i,r){return n.iteratee!==oi?n.iteratee(t,i):wu(t,i,r)}function bu(){}function si(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))}function ku(n){var r=function(t){return n[t]},i="(?:"+t(n).join("|")+")",u=RegExp(i),f=RegExp(i,"g");return function(n){return n=null==n?"":""+n,u.test(n)?n.replace(f,r):n}}function eo(n){return"\\"+uo[n]}function tf(n,t,i,r,u){if(!(r instanceof t))return n.apply(i,u);var f=au(n.prototype),e=n.apply(f,u);return l(e)?e:f}function p(n,t,i,r){var f,h,c;if(r=r||[],t||0===t){if(t<=0)return r.concat(n)}else t=1/0;for(var o=r.length,s=0,l=e(n);s<l;s++)if(f=n[s],u(f)&&(a(f)||ot(f)))if(t>1)p(f,t-1,i,r),o=r.length;else for(h=0,c=f.length;h<c;)r[o++]=f[h++];else i||(r[o++]=f);return r}function li(n){return function(){return!n.apply(this,arguments)}}function uf(n,t){var i;return function(){return--n>0&&(i=t.apply(this,arguments)),n<=1&&(t=null),i}}function ef(n,i,r){i=o(i,r);for(var u,e=t(n),f=0,s=e.length;f<s;f++)if(i(n[u=e[f]],u,n))return u}function of(n){return function(t,i,r){i=o(i,r);for(var f=e(t),u=n>0?0:f-1;u>=0&&u<f;u+=n)if(i(t[u],u,t))return u;return-1}}function sf(n,t,i,r){for(var f,h=(i=o(i,r,1))(t),u=0,s=e(n);u<s;)f=Math.floor((u+s)/2),i(n[f])<h?u=f+1:s=f;return u}function hf(n,t,i){return function(r,u,f){var s=0,o=e(r);if("number"==typeof f)n>0?s=f>=0?f:Math.max(f+o,s):o=f>=0?Math.min(f+1,o):f+o+1;else if(i&&f&&o)return r[f=i(r,u)]===u?f:-1;if(u!=u)return(f=t(d.call(r,s,o),dr))>=0?f+s:-1;for(f=n>0?s:o-1;f>=0&&f<o;f+=n)if(r[f]===u)return f;return-1}}function yi(n,t,i){var r=(u(n)?ct:ef)(n,t,i);if(void 0!==r&&-1!==r)return n[r]}function s(n,i,r){var f,e,o;if(i=rt(i,r),u(n))for(f=0,e=n.length;f<e;f++)i(n[f],f,n);else for(o=t(n),f=0,e=o.length;f<e;f++)i(n[o[f]],o[f],n);return n}function w(n,i,r){var s;i=o(i,r);for(var e=!u(n)&&t(n),h=(e||n).length,c=Array(h),f=0;f<h;f++)s=e?e[f]:f,c[f]=i(n[s],s,n);return c}function lf(n){var i=function(i,r,f,e){var s=!u(i)&&t(i),c=(s||i).length,o=n>0?0:c-1,h;for(e||(f=i[s?s[o]:o],o+=n);o>=0&&o<c;o+=n)h=s?s[o]:o,f=r(f,i[h],h,i);return f};return function(n,t,r,u){var f=arguments.length>=3;return i(n,rt(t,u,4),r,f)}}function k(n,t,i){var r=[];return t=o(t,i),s(n,function(n,i,u){t(n,i,u)&&r.push(n)}),r}function af(n,i,r){var s;i=o(i,r);for(var e=!u(n)&&t(n),h=(e||n).length,f=0;f<h;f++)if(s=e?e[f]:f,!i(n[s],s,n))return!1;return!0}function vf(n,i,r){var s;i=o(i,r);for(var e=!u(n)&&t(n),h=(e||n).length,f=0;f<h;f++)if(s=e?e[f]:f,i(n[s],s,n))return!0;return!1}function h(n,t,i,r){return u(n)||(n=v(n)),("number"!=typeof i||r)&&(i=0),vi(n,t,i)>=0}function wi(n,t){return w(n,ei(t))}function pf(n,t,i){var e,h,r=-1/0,c=-1/0,f,l;if(null==t||"number"==typeof t&&"object"!=typeof n[0]&&null!=n)for(f=0,l=(n=u(n)?n:v(n)).length;f<l;f++)null!=(e=n[f])&&e>r&&(r=e);else t=o(t,i),s(n,function(n,i,u){((h=t(n,i,u))>c||h===-1/0&&r===-1/0)&&(r=n,c=h)});return r}function wf(n,t,i){var r,o,h,f,s,c;if(null==t||i)return u(n)||(n=v(n)),n[si(n.length-1)];for(r=u(n)?vu(n):v(n),o=e(r),t=Math.max(Math.min(t,o),0),h=o-1,f=0;f<t;f++)s=si(f,h),c=r[f],r[f]=r[s],r[s]=c;return r.slice(0,t)}function at(n,t){return function(i,r,u){var f=t?[[],[]]:{};return r=o(r,u),s(i,function(t,u){var e=r(t,u,i);n(f,t,e)}),f}}function yo(n,t,i){return t in i}function kf(n,t,i){return d.call(n,0,Math.max(0,n.length-(null==t||i?1:t)))}function ki(n,t,i){return null==n||n.length<1?null==t||i?void 0:[]:null==t||i?n[0]:kf(n,n.length-t)}function vt(n,t,i){return d.call(n,null==t||i?1:t)}function gi(n,t,i,r){var u,c;ar(t)||(r=i,i=t,t=!1);null!=i&&(i=o(i,r));for(var f=[],l=[],s=0,a=e(n);s<a;s++)u=n[s],c=i?i(u,s,n):u,t&&!i?(s&&l===c||f.push(u),l=c):i?h(l,c)||(l.push(c),f.push(u)):h(f,u)||f.push(u);return f}function nr(n){for(var i=n&&pf(n,e).length||0,r=Array(i),t=0;t<i;t++)r[t]=wi(n,t);return r}function tr(t,i){return t._chain?n(i).chain():i}function te(t){return s(ii(t),function(i){var r=n[i]=t[i];n.prototype[i]=function(){var t=[this._wrapped];return ie.apply(t,arguments),tr(this,r.apply(n,t))}}),n}var ir="1.13.1",rr="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},ut=Array.prototype,pt=Object.prototype,ur="undefined"!=typeof Symbol?Symbol.prototype:null,ie=ut.push,d=ut.slice,g=pt.toString,re=pt.hasOwnProperty,fr="undefined"!=typeof ArrayBuffer,ue="undefined"!=typeof DataView,fe=Array.isArray,er=Object.keys,or=Object.create,sr=fr&&ArrayBuffer.isView,ee=isNaN,oe=isFinite,hr=!{toString:null}.propertyIsEnumerable("toString"),cr=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],se=Math.pow(2,53)-1,wt=i("String"),vr=i("Number"),he=i("Date"),ce=i("RegExp"),le=i("Error"),yr=i("Symbol"),pr=i("ArrayBuffer"),wr=i("Function"),ae=rr.document&&rr.document.childNodes,et,ot,kt,b,gu,nf,y,ci,u,ff,ct,ai,vi,cf,lt,pi,yf,bi,bf,di,df,gf,ne,yt;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof ae&&(wr=function(n){return"function"==typeof n||!1});var r=wr,br=i("Object"),kr=ue&&br(new DataView(new ArrayBuffer(8))),bt="undefined"!=typeof Map&&br(new Map),ve=i("DataView"),ft=kr?function(n){return null!=n&&r(n.getInt8)&&pr(n.buffer)}:ve,a=fe||i("Array");et=i("Arguments");!function(){et(arguments)||(et=function(n){return c(n,"callee")})}();ot=et;var st=tu("byteLength"),ye=nu(st),pe=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/,iu=fr?function(n){return sr?sr(n)&&!ft(n):ye(n)&&pe.test(g.call(n))}:gr(!1),e=tu("length");n.VERSION=ir;n.prototype.value=function(){return this._wrapped};n.prototype.valueOf=n.prototype.toJSON=n.prototype.value;n.prototype.toString=function(){return String(this._wrapped)};kt="[object DataView]";var ni="forEach",eu="has",ti=["clear","delete"],ou=["get",eu,"set"],we=ti.concat(ni,ou),su=ti.concat(ou),be=["add"].concat(ti,ni,eu),ke=bt?gt(we):i("Map"),de=bt?gt(su):i("WeakMap"),ge=bt?gt(be):i("Set"),no=i("WeakSet");var cu=ri(nt),ht=ri(t),lu=ri(nt,!0);n.toPath=yu;n.iteratee=oi;b=Date.now||function(){return(new Date).getTime()};var du={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},to=ku(du),io=ku(hu(du)),ro=n.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},hi=/(.)^/,uo={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},fo=/\\|'|\r|\n|\u2028|\u2029/g;gu=/^\s*(\w|\$)+\s*$/;nf=0;y=f(function(n,t){var r=y.placeholder,i=function(){for(var f=0,o=t.length,e=Array(o),u=0;u<o;u++)e[u]=t[u]===r?arguments[f++]:t[u];for(;f<arguments.length;)e.push(arguments[f++]);return tf(n,i,this,this,e)};return i});y.placeholder=n;ci=f(function(n,t,i){if(!r(n))throw new TypeError("Bind must be called on a function");var u=f(function(r){return tf(n,u,t,this,i.concat(r))});return u});u=nu(e);var oo=f(function(n,t){var i=(t=p(t,!1,!1)).length,r;if(i<1)throw new Error("bindAll must be passed function names");for(;i--;)r=t[i],n[r]=ci(n[r],n);return n}),rf=f(function(n,t,i){return setTimeout(function(){return n.apply(null,i)},t)}),so=y(rf,n,1);ff=y(uf,2);ct=of(1);ai=of(-1);vi=hf(1,ct,sf);cf=hf(-1,ai);lt=lf(1);pi=lf(-1);yf=f(function(n,t,i){var u,f;return r(t)?f=t:(t=tt(t),u=t.slice(0,-1),t=t[t.length-1]),w(n,function(n){var r=f;if(!r){if(u&&u.length&&(n=ui(n,u)),null==n)return;r=n[t]}return null==r?r:r.apply(n,i)})});var ho=at(function(n,t,i){c(n,i)?n[i].push(t):n[i]=[t]}),co=at(function(n,t,i){n[i]=t}),lo=at(function(n,t,i){c(n,i)?n[i]++:n[i]=1}),ao=at(function(n,t,i){n[i?0:1].push(t)},!0),vo=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;return bi=f(function(n,t){var e={},i=t[0],u,s,f,o;if(null==n)return e;for(r(i)?(t.length>1&&(i=rt(i,t[1])),t=nt(n)):(i=yo,t=p(t,!1,!1),n=Object(n)),u=0,s=t.length;u<s;u++)f=t[u],o=n[f],i(o,f,n)&&(e[f]=o);return e}),bf=f(function(n,t){var u,i=t[0];return r(i)?(i=li(i),t.length>1&&(u=t[1])):(t=w(p(t,!1,!1),String),i=function(n,i){return!h(t,i)}),bi(n,i,u)}),di=f(function(n,t){return t=p(t,!0,!0),k(n,function(n){return!h(t,n)})}),df=f(function(n,t){return di(n,t)}),gf=f(function(n){return gi(p(n,!0,!0))}),ne=f(nr),s(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var i=ut[t];n.prototype[t]=function(){var n=this._wrapped;return null!=n&&(i.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0]),tr(this,n)}}),s(["concat","join","slice"],function(t){var i=ut[t];n.prototype[t]=function(){var n=this._wrapped;return null!=n&&(n=i.apply(n,arguments)),tr(this,n)}}),yt=te({__proto__:null,VERSION:ir,restArguments:f,isObject:l,isNull:function(n){return null===n},isUndefined:lr,isBoolean:ar,isElement:function(n){return!(!n||1!==n.nodeType)},isString:wt,isNumber:vr,isDate:he,isRegExp:ce,isError:le,isSymbol:yr,isArrayBuffer:pr,isDataView:ft,isArray:a,isFunction:r,isArguments:ot,isFinite:function(n){return!yr(n)&&oe(n)&&!isNaN(parseFloat(n))},isNaN:dr,isTypedArray:iu,isEmpty:function(n){if(null==n)return!0;var i=e(n);return"number"==typeof i&&(a(n)||wt(n)||ot(n))?0===i:0===e(t(n))},isMatch:uu,isEqual:function(n,t){return dt(n,t)},isMap:ke,isWeakMap:de,isSet:ge,isWeakSet:no,keys:t,allKeys:nt,values:v,pairs:function(n){for(var r=t(n),u=r.length,f=Array(u),i=0;i<u;i++)f[i]=[r[i],n[r[i]]];return f},invert:hu,functions:ii,methods:ii,extend:cu,extendOwn:ht,assign:ht,defaults:lu,create:function(n,t){var i=au(n);return t&&ht(i,t),i},clone:vu,tap:function(n,t){return t(n),n},get:pu,has:function(n,t){for(var u,r=(t=tt(t)).length,i=0;i<r;i++){if(u=t[i],!c(n,u))return!1;n=n[u]}return!!r},mapObject:function(n,i,r){var u;i=o(i,r);for(var e=t(n),h=e.length,s={},f=0;f<h;f++)u=e[f],s[u]=i(n[u],u,n);return s},identity:fi,constant:gr,noop:bu,toPath:yu,property:ei,propertyOf:function(n){return null==n?bu:function(t){return pu(n,t)}},matcher:it,matches:it,times:function(n,t,i){var u=Array(Math.max(0,n)),r;for(t=rt(t,i,1),r=0;r<n;r++)u[r]=t(r);return u},random:si,now:b,escape:to,unescape:io,templateSettings:ro,template:function(t,i,r){var s,f,e;!i&&r&&(i=r);i=lu({},i,n.templateSettings);var h=RegExp([(i.escape||hi).source,(i.interpolate||hi).source,(i.evaluate||hi).source].join("|")+"|$","g"),o=0,u="__p+='";if(t.replace(h,function(n,i,r,f,e){return u+=t.slice(o,e).replace(fo,eo),o=e+n.length,i?u+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'":r?u+="'+\n((__t=("+r+"))==null?'':__t)+\n'":f&&(u+="';\n"+f+"\n__p+='"),n}),u+="';\n",f=i.variable,f){if(!gu.test(f))throw new Error("variable is not a bare identifier: "+f);}else u="with(obj||{}){\n"+u+"}\n",f="obj";u="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+u+"return __p;\n";try{s=new Function(f,"_",u)}catch(t){throw t.source=u,t;}return e=function(t){return s.call(this,t,n)},e.source="function("+f+"){\n"+u+"}",e},result:function(n,t,i){var e=(t=tt(t)).length,f,u;if(!e)return r(i)?i.call(n):i;for(f=0;f<e;f++)u=null==n?void 0:n[t[f]],void 0===u&&(u=i,f=e),n=r(u)?u.call(n):u;return n},uniqueId:function(n){var t=++nf+"";return n?n+t:t},chain:function(t){var i=n(t);return i._chain=!0,i},iteratee:oi,partial:y,bind:ci,bindAll:oo,memoize:function(n,t){var i=function(r){var u=i.cache,f=""+(t?t.apply(this,arguments):r);return c(u,f)||(u[f]=n.apply(this,arguments)),u[f]};return i.cache={},i},delay:rf,defer:so,throttle:function(n,t,i){var r,u,f,o,e=0,h,s;return i||(i={}),h=function(){e=!1===i.leading?0:b();r=null;o=n.apply(u,f);r||(u=f=null)},s=function(){var c=b(),s;return e||!1!==i.leading||(e=c),s=t-(c-e),u=this,f=arguments,s<=0||s>t?(r&&(clearTimeout(r),r=null),e=c,o=n.apply(u,f),r||(u=f=null)):r||!1===i.trailing||(r=setTimeout(h,s)),o},s.cancel=function(){clearTimeout(r);e=0;r=u=f=null},s},debounce:function(n,t,i){var r,s,u,o,e,h=function(){var f=b()-s;t>f?r=setTimeout(h,t-f):(r=null,i||(o=n.apply(e,u)),r||(u=e=null))},c=f(function(f){return e=this,u=f,s=b(),r||(r=setTimeout(h,t),i&&(o=n.apply(e,u))),o});return c.cancel=function(){clearTimeout(r);r=u=e=null},c},wrap:function(n,t){return y(t,n)},negate:li,compose:function(){var n=arguments,t=n.length-1;return function(){for(var r=t,i=n[t].apply(this,arguments);r--;)i=n[r].call(this,i);return i}},after:function(n,t){return function(){if(--n<1)return t.apply(this,arguments)}},before:uf,once:ff,findKey:ef,findIndex:ct,findLastIndex:ai,sortedIndex:sf,indexOf:vi,lastIndexOf:cf,find:yi,detect:yi,findWhere:function(n,t){return yi(n,it(t))},each:s,forEach:s,map:w,collect:w,reduce:lt,foldl:lt,inject:lt,reduceRight:pi,foldr:pi,filter:k,select:k,reject:function(n,t,i){return k(n,li(o(t)),i)},every:af,all:af,some:vf,any:vf,contains:h,includes:h,include:h,invoke:yf,pluck:wi,where:function(n,t){return k(n,it(t))},max:pf,min:function(n,t,i){var e,h,r=1/0,c=1/0,f,l;if(null==t||"number"==typeof t&&"object"!=typeof n[0]&&null!=n)for(f=0,l=(n=u(n)?n:v(n)).length;f<l;f++)null!=(e=n[f])&&e<r&&(r=e);else t=o(t,i),s(n,function(n,i,u){((h=t(n,i,u))<c||h===1/0&&r===1/0)&&(r=n,c=h)});return r},shuffle:function(n){return wf(n,1/0)},sample:wf,sortBy:function(n,t,i){var r=0;return t=o(t,i),wi(w(n,function(n,i,u){return{value:n,index:r++,criteria:t(n,i,u)}}).sort(function(n,t){var i=n.criteria,r=t.criteria;if(i!==r){if(i>r||void 0===i)return 1;if(i<r||void 0===r)return-1}return n.index-t.index}),"value")},groupBy:ho,indexBy:co,countBy:lo,partition:ao,toArray:function(n){return n?a(n)?d.call(n):wt(n)?n.match(vo):u(n)?w(n,fi):v(n):[]},size:function(n){return null==n?0:u(n)?n.length:t(n).length},pick:bi,omit:bf,first:ki,head:ki,take:ki,initial:kf,last:function(n,t,i){return null==n||n.length<1?null==t||i?void 0:[]:null==t||i?n[n.length-1]:vt(n,Math.max(0,n.length-t))},rest:vt,tail:vt,drop:vt,compact:function(n){return k(n,Boolean)},flatten:function(n,t){return p(n,t,!1)},without:df,uniq:gi,unique:gi,union:gf,intersection:function(n){for(var i,t,r=[],f=arguments.length,u=0,o=e(n);u<o;u++)if(i=n[u],!h(r,i)){for(t=1;t<f&&h(arguments[t],i);t++);t===f&&r.push(i)}return r},difference:di,unzip:nr,transpose:nr,zip:ne,object:function(n,t){for(var r={},i=0,u=e(n);i<u;i++)t?r[n[i]]=t[i]:r[n[i][0]]=n[i][1];return r},range:function(n,t,i){null==t&&(t=n||0,n=0);i||(i=t<n?-1:1);for(var u=Math.max(Math.ceil((t-n)/i),0),f=Array(u),r=0;r<u;r++,n+=i)f[r]=n;return f},chunk:function(n,t){if(null==t||t<1)return[];for(var r=[],i=0,u=n.length;i<u;)r.push(d.call(n,i,i+=t));return r},mixin:te,"default":n}),yt._=yt,yt});XDate=function(n,t,i,r){function f(){var r=this instanceof f?this:new f,i=arguments,t=i.length,e,u;if(typeof i[t-1]=="boolean"&&(e=i[--t],i=w(i,0,t)),t)if(t==1){if(t=i[0],t instanceof n||typeof t=="number")r[0]=new n(+t);else if(t instanceof f)i=r,u=new n(+t[0]),s(t)&&(u.toString=g),i[0]=u;else if(typeof t=="string"){r[0]=new n(0);n:{for(var i=t,t=e||!1,u=f.parsers,o=0,c;o<u.length;o++)if(c=u[o](i,t,r)){r=c;break n}r[0]=new n(i)}}}else r[0]=new n(h.apply(n,i)),e||(r[0]=p(r[0]));else r[0]=new n;return typeof e=="boolean"&&nt(r,e),r}function s(n){return n[0].toString===g}function nt(t,i,r){return i?s(t)||(r&&(t[0]=new n(h(t[0].getFullYear(),t[0].getMonth(),t[0].getDate(),t[0].getHours(),t[0].getMinutes(),t[0].getSeconds(),t[0].getMilliseconds()))),t[0].toString=g):s(t)&&(t[0]=r?p(t[0]):new n(+t[0])),t}function tt(n,t,i,r,u){var f=c(o,n[0],u),n=c(ot,n[0],u),u=!1;r.length==2&&typeof r[1]=="boolean"&&(u=r[1],r=[i]);i=t==1?(i%12+12)%12:f(1);n(t,r);u&&f(1)!=i&&(n(1,[f(1)-1]),n(2,[st(f(0),f(1))]))}function it(n,i,r,u){var r=Number(r),f=t.floor(r);n["set"+l[i]](n["get"+l[i]]()+f,u||!1);f!=r&&i<6&&it(n,i+1,(r-f)*lt[i],u)}function rt(n,i,r){var n=n.clone().setUTCMode(!0,!0),i=f(i).setUTCMode(!0,!0),u=0,e;if(r==0||r==1){for(e=6;e>=r;e--)u/=lt[e],u+=o(i,!1,e)-o(n,!1,e);r==1&&(u+=(i.getFullYear()-n.getFullYear())*12)}else r==2?(r=n.toDate().setUTCHours(0,0,0,0),u=i.toDate().setUTCHours(0,0,0,0),u=t.round((u-r)/864e5)+(i-u-(n-r))/864e5):u=(i-n)/[36e5,6e4,1e3,1][r-3];return u}function a(i){var r=i(0),u=i(1),f=i(2),i=new n(h(r,u,f)),r=v(ut(r,u,f));return t.floor(t.round((i-r)/864e5)/7)+1}function ut(t,i,r){return(i=new n(h(t,i,r)),i<v(t))?t-1:i>=v(t+1)?t+1:t}function v(t){return t=new n(h(t,0,4)),t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+6)%7),t}function ft(n,t,i,u){var f=c(o,n,u),e=c(ot,n,u);i===r&&(i=ut(f(0),f(1),f(2)));i=v(i);u||(i=p(i));n.setTime(+i);e(2,[f(2)+(t-1)*7])}function et(n,t,i,r,u){var e=f.locales,h=e[f.defaultLocale]||{},s=c(o,n,u),i=(typeof i=="string"?e[i]:i)||{};return b(n,t,function(n){if(r)for(var t=(n==7?2:n)-1;t>=0;t--)r.push(s(t));return s(n)},function(n){return i[n]||h[n]},u)}function b(n,t,i,u,f){for(var e,h,o="";e=t.match(vt);){if(o+=t.substr(0,e.index),e[1]){h=o;for(var o=n,s=e[1],v=i,y=u,p=f,c=s.length,l=void 0,a="";c>0;)l=at(o,s.substr(0,c),v,y,p),l!==r?(a+=l,s=s.substr(c),c=s.length):c--;o=h+(a+s)}else e[3]?(h=b(n,e[4],i,u,f),parseInt(h.replace(/\D/g,""),10)&&(o+=h)):o+=e[7]||"'";t=t.substr(e.index+e[0].length)}return o+t}function at(n,i,r,u,o){var s=f.formatters[i];if(typeof s=="string")return b(n,s,r,u,o);if(typeof s=="function")return s(n,o||!1,u);switch(i){case"fff":return e(r(6),3);case"s":return r(5);case"ss":return e(r(5));case"m":return r(4);case"mm":return e(r(4));case"h":return r(3)%12||12;case"hh":return e(r(3)%12||12);case"H":return r(3);case"HH":return e(r(3));case"d":return r(2);case"dd":return e(r(2));case"ddd":return u("dayNamesShort")[r(7)]||"";case"dddd":return u("dayNames")[r(7)]||"";case"M":return r(1)+1;case"MM":return e(r(1)+1);case"MMM":return u("monthNamesShort")[r(1)]||"";case"MMMM":return u("monthNames")[r(1)]||"";case"yy":return(r(0)+"").substring(2);case"yyyy":return r(0);case"t":return y(r,u).substr(0,1).toLowerCase();case"tt":return y(r,u).toLowerCase();case"T":return y(r,u).substr(0,1);case"TT":return y(r,u);case"z":case"zz":case"zzz":return o?i="Z":(u=n.getTimezoneOffset(),n=u<0?"+":"-",r=t.floor(t.abs(u)/60),u=t.abs(u)%60,o=r,i=="zz"?o=e(r):i=="zzz"&&(o=e(r)+":"+e(u)),i=n+o),i;case"w":return a(r);case"ww":return e(a(r));case"S":return i=r(2),i>10&&i<20?"th":["st","nd","rd"][i%10-1]||"th"}}function y(n,t){return n(3)<12?t("amDesignator"):t("pmDesignator")}function k(n){return!isNaN(+n[0])}function o(n,t,i){return n["get"+(t?"UTC":"")+l[i]]()}function ot(n,t,i,r){n["set"+(t?"UTC":"")+l[i]].apply(n,r)}function p(t){return new n(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds())}function st(t,i){return 32-new n(h(t,i,32)).getUTCDate()}function d(n){return function(){return n.apply(r,[this].concat(w(arguments)))}}function c(n){var t=w(arguments,1);return function(){return n.apply(r,t.concat(w(arguments)))}}function w(n,t,u){return i.prototype.slice.call(n,t||0,u===r?n.length:u)}function ht(n,t){for(var i=0;i<n.length;i++)t(n[i],i)}function e(n,t){for(t=t||2,n+="";n.length<t;)n="0"+n;return n}var l="FullYear,Month,Date,Hours,Minutes,Seconds,Milliseconds,Day,Year".split(","),ct=["Years","Months","Days"],lt=[12,31,24,60,60,1e3,1],vt=/(([a-zA-Z])\2*)|(\((('.*?'|\(.*?\)|.)*?)\))|('(.*?)')/,h=n.UTC,g=n.prototype.toUTCString,u=f.prototype;return u.length=1,u.splice=i.prototype.splice,u.getUTCMode=d(s),u.setUTCMode=d(nt),u.getTimezoneOffset=function(){return s(this)?0:this[0].getTimezoneOffset()},ht(l,function(n,t){u["get"+n]=function(){return o(this[0],s(this),t)};t!=8&&(u["getUTC"+n]=function(){return o(this[0],!0,t)});t!=7&&(u["set"+n]=function(n){return tt(this,t,n,arguments,s(this)),this},t!=8&&(u["setUTC"+n]=function(n){return tt(this,t,n,arguments,!0),this},u["add"+(ct[t]||n)]=function(n,i){return it(this,t,n,i),this},u["diff"+(ct[t]||n)]=function(n){return rt(this,n,t)}))}),u.getWeek=function(){return a(c(o,this,!1))},u.getUTCWeek=function(){return a(c(o,this,!0))},u.setWeek=function(n,t){return ft(this,n,t,!1),this},u.setUTCWeek=function(n,t){return ft(this,n,t,!0),this},u.addWeeks=function(n){return this.addDays(Number(n)*7)},u.diffWeeks=function(n){return rt(this,n,2)/7},f.parsers=[function(t,i,r){if(t=t.match(/^(\d{4})(-(\d{2})(-(\d{2})([T ](\d{2}):(\d{2})(:(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/)){var u=new n(h(t[1],t[3]?t[3]-1:0,t[5]||1,t[7]||0,t[8]||0,t[10]||0,t[12]?Number("0."+t[12])*1e3:0));return t[13]?t[14]&&u.setUTCMinutes(u.getUTCMinutes()+(t[15]=="-"?1:-1)*(Number(t[16])*60+(t[18]?Number(t[18]):0))):i||(u=p(u)),r.setTime(+u)}}],f.parse=function(n){return+f(""+n)},u.toString=function(n,t,i){return n===r||!k(this)?this[0].toString():et(this,n,t,i,s(this))},u.toUTCString=u.toGMTString=function(n,t,i){return n===r||!k(this)?this[0].toUTCString():et(this,n,t,i,!0)},u.toISOString=function(){return this.toUTCString("yyyy-MM-dd'T'HH:mm:ss(.fff)zzz")},f.defaultLocale="",f.locales={"":{monthNames:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthNamesShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),dayNames:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),dayNamesShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),amDesignator:"AM",pmDesignator:"PM"}},f.formatters={i:"yyyy-MM-dd'T'HH:mm:ss(.fff)",u:"yyyy-MM-dd'T'HH:mm:ss(.fff)zzz"},ht("getTime,valueOf,toDateString,toTimeString,toLocaleString,toLocaleDateString,toLocaleTimeString,toJSON".split(","),function(n){u[n]=function(){return this[0][n]()}}),u.setTime=function(n){return this[0].setTime(n),this},u.valid=d(k),u.clone=function(){return new f(this)},u.clearTime=function(){return this.setHours(0,0,0,0)},u.toDate=function(){return new n(+this[0])},f.now=function(){return+new n},f.today=function(){return(new f).clearTime()},f.UTC=h,f.getDaysInMonth=st,typeof module!="undefined"&&module.exports&&(module.exports=f),typeof define=="function"&&define.amd&&define([],function(){return f}),f}(Date,Math,Array),function(n){function t(n,t){if(!(n.originalEvent.touches.length>1)){n.preventDefault();var i=n.originalEvent.changedTouches[0],r=document.createEvent("MouseEvents");r.initMouseEvent(t,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null);n.target.dispatchEvent(r)}}if(n.support.touch="ontouchend"in document,n.support.touch){var i=n.ui.mouse.prototype,u=i._mouseInit,r;i._touchStart=function(n){var i=this;!r&&i._mouseCapture(n.originalEvent.changedTouches[0])&&(r=!0,i._touchMoved=!1,t(n,"mouseover"),t(n,"mousemove"),t(n,"mousedown"))};i._touchMove=function(n){r&&(this._touchMoved=!0,t(n,"mousemove"))};i._touchEnd=function(n){r&&(t(n,"mouseup"),t(n,"mouseout"),this._touchMoved||t(n,"click"),r=!1)};i._mouseInit=function(){var t=this;t.element.bind("touchstart",n.proxy(t,"_touchStart")).bind("touchmove",n.proxy(t,"_touchMove")).bind("touchend",n.proxy(t,"_touchEnd"));u.call(t)}}}(jQuery),function(n){typeof define=="function"&&define.amd?define(["jquery"],function(t){return n(t)}):typeof module=="object"&&typeof module.exports=="object"?exports=n(require("jquery")):n(jQuery)}(function(n){function o(n){var i=7.5625,t=2.75;return n<1/t?i*n*n:n<2/t?i*(n-=1.5/t)*n+.75:n<2.5/t?i*(n-=2.25/t)*n+.9375:i*(n-=2.625/t)*n+.984375}n.easing.jswing=n.easing.swing;var t=Math.pow,u=Math.sqrt,i=Math.sin,s=Math.cos,r=Math.PI,f=1.70158,e=f*1.525,h=f+1,c=2*r/3,l=2*r/4.5;n.extend(n.easing,{def:"easeOutQuad",swing:function(t){return n.easing[n.easing.def](t)},easeInQuad:function(n){return n*n},easeOutQuad:function(n){return 1-(1-n)*(1-n)},easeInOutQuad:function(n){return n<.5?2*n*n:1-t(-2*n+2,2)/2},easeInCubic:function(n){return n*n*n},easeOutCubic:function(n){return 1-t(1-n,3)},easeInOutCubic:function(n){return n<.5?4*n*n*n:1-t(-2*n+2,3)/2},easeInQuart:function(n){return n*n*n*n},easeOutQuart:function(n){return 1-t(1-n,4)},easeInOutQuart:function(n){return n<.5?8*n*n*n*n:1-t(-2*n+2,4)/2},easeInQuint:function(n){return n*n*n*n*n},easeOutQuint:function(n){return 1-t(1-n,5)},easeInOutQuint:function(n){return n<.5?16*n*n*n*n*n:1-t(-2*n+2,5)/2},easeInSine:function(n){return 1-s(n*r/2)},easeOutSine:function(n){return i(n*r/2)},easeInOutSine:function(n){return-(s(r*n)-1)/2},easeInExpo:function(n){return n===0?0:t(2,10*n-10)},easeOutExpo:function(n){return n===1?1:1-t(2,-10*n)},easeInOutExpo:function(n){return n===0?0:n===1?1:n<.5?t(2,20*n-10)/2:(2-t(2,-20*n+10))/2},easeInCirc:function(n){return 1-u(1-t(n,2))},easeOutCirc:function(n){return u(1-t(n-1,2))},easeInOutCirc:function(n){return n<.5?(1-u(1-t(2*n,2)))/2:(u(1-t(-2*n+2,2))+1)/2},easeInElastic:function(n){return n===0?0:n===1?1:-t(2,10*n-10)*i((n*10-10.75)*c)},easeOutElastic:function(n){return n===0?0:n===1?1:t(2,-10*n)*i((n*10-.75)*c)+1},easeInOutElastic:function(n){return n===0?0:n===1?1:n<.5?-(t(2,20*n-10)*i((20*n-11.125)*l))/2:t(2,-20*n+10)*i((20*n-11.125)*l)/2+1},easeInBack:function(n){return h*n*n*n-f*n*n},easeOutBack:function(n){return 1+h*t(n-1,3)+f*t(n-1,2)},easeInOutBack:function(n){return n<.5?t(2*n,2)*((e+1)*2*n-e)/2:(t(2*n-2,2)*((e+1)*(n*2-2)+e)+2)/2},easeInBounce:function(n){return 1-o(1-n)},easeOutBounce:o,easeInOutBounce:function(n){return n<.5?(1-o(1-2*n))/2:(1+o(2*n-1))/2}})}),function(n){"use strict";"function"==typeof define&&define.amd?define(["jquery"],n):"undefined"!=typeof module&&module.exports?module.exports=n(require("jquery")):n(jQuery)}(function(n){"use strict";function r(t){return!t.nodeName||-1!==n.inArray(t.nodeName.toLowerCase(),["iframe","#document","html","body"])}function i(t){return n.isFunction(t)||n.isPlainObject(t)?t:{top:t,left:t}}var t=n.scrollTo=function(t,i,r){return n(window).scrollTo(t,i,r)};return t.defaults={axis:"xy",duration:0,limit:!0},n.fn.scrollTo=function(u,f,e){"object"==typeof f&&(e=f,f=0);"function"==typeof e&&(e={onAfter:e});"max"===u&&(u=9e9);e=n.extend({},t.defaults,e);f=f||e.duration;var o=e.queue&&1<e.axis.length;return o&&(f/=2),e.offset=i(e.offset),e.over=i(e.over),this.each(function(){function y(t){var i=n.extend({},e,{queue:!0,duration:f,complete:t&&function(){t.call(c,s,e)}});a.animate(h,i)}var p;if(null!==u){var l=r(this),c=l?this.contentWindow||window:this,a=n(c),s=u,h={},v;switch(typeof s){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(s)){s=i(s);break}s=l?n(s):n(s,c);case"object":if(s.length===0)return;(s.is||s.style)&&(v=(s=n(s)).offset())}p=n.isFunction(e.offset)&&e.offset(c,s)||e.offset;n.each(e.axis.split(""),function(n,i){var u="x"===i?"Left":"Top",f=u.toLowerCase(),r="scroll"+u,w=a[r](),b=t.max(c,i);v?(h[r]=v[f]+(l?0:w-a.offset()[f]),e.margin&&(h[r]-=parseInt(s.css("margin"+u),10)||0,h[r]-=parseInt(s.css("border"+u+"Width"),10)||0),h[r]+=p[f]||0,e.over[f]&&(h[r]+=s["x"===i?"width":"height"]()*e.over[f])):(u=s[f],h[r]=u.slice&&"%"===u.slice(-1)?parseFloat(u)/100*b:u);e.limit&&/^\d+$/.test(h[r])&&(h[r]=0>=h[r]?0:Math.min(h[r],b));!n&&1<e.axis.length&&(w===h[r]?h={}:o&&(y(e.onAfterFirst),h={}))});y(e.onAfter)}})},t.max=function(t,i){var u="x"===i?"Width":"Height",e="scroll"+u;if(!r(t))return t[e]-n(t)[u.toLowerCase()]();var u="client"+u,f=t.ownerDocument||t.document,o=f.documentElement,f=f.body;return Math.max(o[e],f[e])-Math.min(o[u],f[u])},n.Tween.propHooks.scrollLeft=n.Tween.propHooks.scrollTop={get:function(t){return n(t.elem)[t.prop]()},set:function(t){var r=this.get(t),i;if(t.options.interrupt&&t._last&&t._last!==r)return n(t.elem).stop();i=Math.round(t.now);r!==i&&(n(t.elem)[t.prop](i),t._last=this.get(t))}},t}),function(n){"use strict";var o=function(n,t){typeof t=="undefined"&&(t={});this.init(n,t)},t=o.prototype,f,e=["canvas","vml"],i=["oval","spiral","square","rect","roundRect"],v=/^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/,c=navigator.appVersion.indexOf("MSIE")!==-1&&parseFloat(navigator.appVersion.split("MSIE")[1])===8?!0:!1,y=!!document.createElement("canvas").getContext,l=40,a=!0,u=function(n,t,i){var r=document.createElement(n),u;for(u in i)r[u]=i[u];return t!=null&&typeof t!="undefined"&&t.appendChild(r),r},r=function(n,t){for(var i in t)n.style[i]=t[i];return n},s=function(n,t){for(var i in t)n.setAttribute(i,t[i]);return n},h=function(n,t,i,r){n.save();n.translate(t,i);n.rotate(r);n.translate(-t,-i);n.beginPath()};t.init=function(n,t){var s,i;typeof t.safeVML=="boolean"&&(a=t.safeVML);try{this.mum=document.getElementById(n)!==undefined?document.getElementById(n):document.body}catch(h){this.mum=document.body}if(t.id=typeof t.id!="undefined"?t.id:"canvasLoader",this.cont=u("div",this.mum,{id:t.id}),y)f=e[0],this.can=u("canvas",this.cont),this.con=this.can.getContext("2d"),this.cCan=r(u("canvas",this.cont),{display:"none"}),this.cCon=this.cCan.getContext("2d");else{if(f=e[1],typeof o.vmlSheet=="undefined")for(document.getElementsByTagName("head")[0].appendChild(u("style")),o.vmlSheet=document.styleSheets[document.styleSheets.length-1],s=["group","oval","roundrect","fill"],i=0;i<s.length;++i)o.vmlSheet.addRule(s[i],"behavior:url(#default#VML); position:absolute;");this.vml=u("group",this.cont)}this.setColor(this.color);this.draw();r(this.cont,{display:"none"})};t.cont={};t.can={};t.con={};t.cCan={};t.cCon={};t.timer={};t.activeId=0;t.diameter=40;t.setDiameter=function(n){this.diameter=Math.round(Math.abs(n));this.redraw()};t.getDiameter=function(){return this.diameter};t.cRGB={};t.color="#000000";t.setColor=function(n){this.color=v.test(n)?n:"#000000";this.cRGB=this.getRGB(this.color);this.redraw()};t.getColor=function(){return this.color};t.shape=i[0];t.setShape=function(n){var t;for(t in i)if(n===i[t]){this.shape=n;this.redraw();break}};t.getShape=function(){return this.shape};t.density=40;t.setDensity=function(n){this.density=a&&f===e[1]?Math.round(Math.abs(n))<=l?Math.round(Math.abs(n)):l:Math.round(Math.abs(n));this.density>360&&(this.density=360);this.activeId=0;this.redraw()};t.getDensity=function(){return this.density};t.range=1.3;t.setRange=function(n){this.range=Math.abs(n);this.redraw()};t.getRange=function(){return this.range};t.speed=2;t.setSpeed=function(n){this.speed=Math.round(Math.abs(n))};t.getSpeed=function(){return this.speed};t.fps=24;t.setFPS=function(n){this.fps=Math.round(Math.abs(n));this.reset()};t.getFPS=function(){return this.fps};t.getRGB=function(n){return n=n.charAt(0)==="#"?n.substring(1,7):n,{r:parseInt(n.substring(0,2),16),g:parseInt(n.substring(2,4),16),b:parseInt(n.substring(4,6),16)}};t.draw=function(){var w=0,a,p,n,o,l,tt,d,b,nt=this.density,it=Math.round(nt*this.range),k,rt=0,ft,et,ut,st,y=1e3,ot=0,v=this.cCon,t=this.diameter,g=.47;if(f===e[0])for(v.clearRect(0,0,y,y),s(this.can,{width:t,height:t}),s(this.cCan,{width:t,height:t});w<nt;){k=w<=it?1-(1-rt)/it*w:k=rt;tt=270-360/nt*w;d=tt/180*Math.PI;v.fillStyle="rgba("+this.cRGB.r+","+this.cRGB.g+","+this.cRGB.b+","+k.toString()+")";switch(this.shape){case i[0]:case i[1]:a=t*.07;o=t*g+Math.cos(d)*(t*g-a)-t*g;l=t*g+Math.sin(d)*(t*g-a)-t*g;v.beginPath();this.shape===i[1]?v.arc(t*.5+o,t*.5+l,a*k,0,Math.PI*2,!1):v.arc(t*.5+o,t*.5+l,a,0,Math.PI*2,!1);break;case i[2]:a=t*.12;o=Math.cos(d)*(t*g-a)+t*.5;l=Math.sin(d)*(t*g-a)+t*.5;h(v,o,l,d);v.fillRect(o,l-a*.5,a,a);break;case i[3]:case i[4]:p=t*.3;n=p*.27;o=Math.cos(d)*(n+(t-n)*.13)+t*.5;l=Math.sin(d)*(n+(t-n)*.13)+t*.5;h(v,o,l,d);this.shape===i[3]?v.fillRect(o,l-n*.5,p,n):(b=n*.55,v.moveTo(o+b,l-n*.5),v.lineTo(o+p-b,l-n*.5),v.quadraticCurveTo(o+p,l-n*.5,o+p,l-n*.5+b),v.lineTo(o+p,l-n*.5+n-b),v.quadraticCurveTo(o+p,l-n*.5+n,o+p-b,l-n*.5+n),v.lineTo(o+b,l-n*.5+n),v.quadraticCurveTo(o,l-n*.5+n,o,l-n*.5+n-b),v.lineTo(o,l-n*.5+b),v.quadraticCurveTo(o,l-n*.5,o+b,l-n*.5))}v.closePath();v.fill();v.restore();++w}else{r(this.cont,{width:t,height:t});r(this.vml,{width:t,height:t});switch(this.shape){case i[0]:case i[1]:ut="oval";a=y*.14;break;case i[2]:ut="roundrect";a=y*.12;break;case i[3]:case i[4]:ut="roundrect";a=y*.3}for(p=n=a,o=y*.5-n,l=-n*.5;w<nt;){k=w<=it?1-(1-rt)/it*w:k=rt;tt=270-360/nt*w;switch(this.shape){case i[1]:p=n=a*k;o=y*.5-a*.5-a*k*.5;l=(a-a*k)*.5;break;case i[0]:case i[2]:c&&(l=0,this.shape===i[2]&&(o=y*.5-n*.5));break;case i[3]:case i[4]:p=a*.95;n=p*.28;c?(o=0,l=y*.5-n*.5):(o=y*.5-p,l=-n*.5);ot=this.shape===i[4]?.6:0}et=s(r(u("group",this.vml),{width:y,height:y,rotation:tt}),{coordsize:y+","+y,coordorigin:-y*.5+","+-y*.5});ft=r(u(ut,et,{stroked:!1,arcSize:ot}),{width:p,height:n,top:l,left:o});st=u("fill",ft,{color:this.color,opacity:k});++w}}this.tick(!0)};t.clean=function(){if(f===e[0])this.con.clearRect(0,0,1e3,1e3);else{var n=this.vml;if(n.hasChildNodes())while(n.childNodes.length>=1)n.removeChild(n.firstChild)}};t.redraw=function(){this.clean();this.draw()};t.reset=function(){typeof this.timer=="number"&&(this.hide(),this.show())};t.tick=function(n){var i=this.con,t=this.diameter;n||(this.activeId+=360/this.density*this.speed);f===e[0]?(i.clearRect(0,0,t,t),h(i,t*.5,t*.5,this.activeId/180*Math.PI),i.drawImage(this.cCan,0,0,t,t),i.restore()):(this.activeId>=360&&(this.activeId-=360),r(this.vml,{rotation:this.activeId}))};t.show=function(){if(typeof this.timer!="number"){var n=this;this.timer=self.setInterval(function(){n.tick()},Math.round(1e3/this.fps));r(this.cont,{display:"block"})}};t.hide=function(){typeof this.timer=="number"&&(clearInterval(this.timer),delete this.timer,r(this.cont,{display:"none"}))};t.kill=function(){var n=this.cont,t;typeof this.timer=="number"&&this.hide();f===e[0]?(n.removeChild(this.can),n.removeChild(this.cCan)):n.removeChild(this.vml);for(t in this)delete this[t]};n.CanvasLoader=o}(window),function(n,t,i){if(jQuery.fn.cssAnimate=function(t,i,r,u){return typeof i!="number"&&(u=r,r=i,i=400),typeof r=="function"&&(u=r,r=""),this.each(function(){var o;if(jQuery.fn.cssAnimate.hasTransitions){var e="transitionend",f="";e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",transition:"transitionend"}[Modernizr.prefixed("transition")];this.addEventListener(e,function(){this.removeEventListener(e,arguments.callee,!1);n(this).css({"-webkit-transition":"","-moz-transition":"","-o-transition":"","-ms-transition":"",transition:""});typeof u=="function"&&u()},!1);(typeof r=="undefined"||r=="swing")&&(r="ease");for(o in t)f!=""&&(f+=", "),f+=o+" "+i+"ms "+r;n(this).css({"-webkit-transition":f,"-moz-transition":f,"-o-transition":f,"-ms-transition":f,transition:f});n(this).css(t)}else r!="linear"&&(r="swing"),typeof u!="function"&&(onAnimationComplete=function(){}),n(this).animate(t,i,r,u)})},jQuery.fn.cssAnimate.hasTransitions=!1,typeof Modernizr!="undefined"&&typeof Modernizr.csstransitions!="undefined")jQuery.fn.cssAnimate.hasTransitions=Modernizr.csstransitions;else{var r=i.createElement("p").style;jQuery.fn.cssAnimate.hasTransitions="transition"in r||"WebkitTransition"in r||"MozTransition"in r||"msTransition"in r||"OTransition"in r}}(jQuery,window,document),function(n){function t(t,i){i||(n("#site-container").removeClass("overlay-helper"),n("#avlOverlay").fadeOut(t.overlayHideSpeed,function(){s(t)}))}function s(t){n("#avlOverlay").remove();t.onHide()}function i(t,i){n(t.target).parent().hasClass("avlModal")&&n(t.target).unwrap();i&&n(".avlModal").css("zIndex","10000");(n("object embed[type]").length>0&&n("object embed[type]").attr("type").match("java")||n("object[codeBase]").length>0&&n("object[codeBase]").attr("codeBase").match("java"))&&n("object").parent().css({width:"100%",height:"",position:"static",right:"",bottom:"",overflow:"show"});n(t.target).find(".avlModal-content").css({"max-height":"",height:""})}function h(t){return t.target!=""&&n(t.target).length||t.url!=""?!0:!1}function c(t){t.target!=""?r(t,n(t.target)):n.ajax({url:t.url,data:t.parameters,cache:t.cache,dataType:"html",method:"GET",success:function(n){t.onSuccess();r(t,n)}})}function r(t,i){n("#avlOverlay").length?f(t,i):(n(i).parent().append("<div id='avlOverlay'><!-- --><\/div>"),n("#avlOverlay").css({position:"absolute",zIndex:"9999",left:"0",top:"0",opacity:t.overlayOpacity,display:"none"}),t.overlayImage!=""?n("#avlOverlay").css({backgroundImage:"url("+t.overlayImage+")"}):n("#avlOverlay").css({backgroundColor:t.overlayColor}),u(),n("#site-container").addClass("overlay-helper"),n("#avlOverlay").fadeIn(t.overlayShowSpeed,function(){}),f(t,i))}function u(){n("#avlOverlay").css({position:"fixed",top:"0px",left:"0px",height:"100%",width:"100%",transform:"translateZ(1px)"})}function l(n){return!isNaN(parseFloat(n))&&isFinite(n)}function f(t,i){var u,f,r;n(".avlModal").length>0&&n(".avlModal").css("zIndex","9998");n(i).wrap("<div class='avlModal' />").removeClass("avlModal-container");r=n(i).parent();n(i).find(".avlModal-content-wrapper").length==0&&(n(i).find(".avlModal-content").wrapInner("<div class='avlModal-content-wrapper' />"),n(i).data("initialHeight",r.height()).data("initialWidth",parseInt(t.width)).data("modalShowSpeed",t.modalShowSpeed).data("initialContentHeight",n(i).find(".avlModal-content").height()).data("windowBuffer",t.windowBuffer));f=n(i).find(".avlModal-content-wrapper")[0];t.showCloseButton&&n(t.target).find(".avlModal-close").length==0&&n(i).find(".avlModal-wrapper").find(".avlModal-close").length<1&&(n(i).find(".avlModal-wrapper").append("<a href='#close' class='avlModal-close' title='Close this modal window'><i id='closeModalIcon' class='icon-cancel'><\/i><\/a>"),n(i).find(".avlModal-close").attr("onclick","return $.closeModal({ target: '#"+n(i).attr("id")+"', onClose:"+t.closeButtonFunction+"});"));u=parseInt(i.find(".avlModal-wrapper").css("padding"));l(u)||(u=0);r.css({zIndex:"10000",transform:"translateZ(1px)",width:parseInt(t.width)+u,height:"auto"});setModalPosition("show",r,t);OpenModals.push({modal:r[0],modalContent:f,previousHeight:f.scrollHeight});OpenModals.length==1&&e();(n("object embed[type]").length>0&&n("object embed[type]").attr("type").match("java")||n("object[codeBase]").length>0&&n("object[codeBase]").attr("codeBase").match("java"))&&n("object").parent().css({width:"1px",top:"99%",height:"1px",right:"0px",bottom:"0px",position:"absolute",overflow:"hidden"})}function e(){OpenModals.length>0&&(requestAnimFrame(e),CheckModalContentSize())}var o;n.openModal=function(t){if(t=jQuery.extend({width:"700px",height:null,windowBuffer:null,overlayOpacity:"0.5",overlayImage:"",overlayColor:"#000",overlayShowSpeed:500,modalShowSpeed:400,useTransitions:!0,showCloseButton:!0,enableTabKeyInModalOnly:!1,closeButtonFunction:function(){},target:"",url:"",parameters:{},cache:!1,onShow:function(){},onComplete:function(){},onSuccess:function(){},onError:function(){}},t),n(t.target).parent().hasClass("avlModal"))return!1;n(t.target).find(".avlModal-close").removeAttr("onclick").off("click").on("click",function(){return n.closeModal({target:"#"+n(t.target).attr("id"),onClose:t.closeButtonFunction})});return t.onShow(),o=t,h(t)&&c(t),t.enableTabKeyInModalOnly&&n(t.target).modalTabbing(),!1};n.closeModal=function(r){r=jQuery.extend({overlayHideSpeed:500,modalHideSpeed:400,target:"",useTransitions:!0,onClose:function(){},onHide:function(){}},r);var f=n(".avlModal").length>1?!0:!1,u,e;r.onClose(r);for(u=0,e=OpenModals.length;u<e;u++)if(n(r.target).parent()[0]==OpenModals[u].modal){OpenModals.splice(u,1);break}return AVL.UTILITIES.FUNCTIONS.GoForTransitions(r.useTransitions)?(n(r.target).find(".avlModal-wrapper").addClass("hide"),t(r,f),n(r.target).find(".avlModal-wrapper").removeClass("hide").removeClass("show"),n(r.target).addClass("avlModal-container"),i(r,f)):(t(r,f),n(r.target).addClass("avlModal-container"),i(r,f)),!1};setModalPosition=function(t,i,r){var f,e,u;i.each(function(){var i=n(this),a=i.children()[0],p=i.find(".avlModal-header"),v=i.find(".avlModal-content"),c=i.find(".avlModal-close"),ut=i.find(".avlModal-wrapper"),o=6,w=5,nt=p.length>0?p.outerHeight(!0):0,b=c.length>0?c.height()/3-w:0,y=c.length>0?c.width()/3-w:0,s=n(a).data("windowBuffer")||30,tt=i.find(".avlModal-wrapper").css("padding-left").replace("px","")*2,k=n(window).height(),it=n(window).width(),d="auto",l=it-s,h=n(a).data("initialWidth"),rt=i.css({"max-width":l}).find(".avlModal-content-wrapper")[0].scrollHeight,g=rt-v.height()+i.height();isNaN(o)&&(o=0);g+b+s+o>=k?(f=k-s-b,d=f+v.height()-i.height()+"px"):f=g;e=(n(window).height()+y+o-f-s/2)/2;u=h>l?(n(window).width()+y+o-l-s/2)/2:(n(window).width()+y+o-h-s/2)/2;v.css("height",d);t==="show"&&(i.css({position:"fixed",top:Math.round(e),left:Math.round(u),height:"auto",width:h,display:"block"}),AVL.UTILITIES.FUNCTIONS.GoForTransitions(r.useTransitions)?(i.find(".avlModal-wrapper").addClass("show"),r!=undefined&&r.onComplete()):(i.find(".avlModal-wrapper").addClass("no-trans").css({opacity:1}),i.animate({left:Math.round(u),width:h},n(a).data("modalShowSpeed"),"easeInOutExpo",function(){i.animate({top:Math.round(e),height:"auto"},400,"easeInOutExpo",function(){n(this).parent().parent().css({minHeight:nt+tt/2});r!=undefined&&r.onComplete()})})));t==="resize"&&i.css({top:Math.round(e),left:Math.round(u),height:"auto",width:h,"max-width":l,display:"block"})})};n(window).on("resize onorientationchange",function(){n(".avlModal").is(":visible")&&(u(),setModalPosition("resize",n(".avlModal:visible")))});OpenModals=[];CheckModalContentSize=function(){var i=0,r=0,t=0,u=OpenModals.length,f=document.getElementsByTagName("HTML")[0].scrollHeight;if(u)for(t=0;t<u;t++)i=OpenModals[t].modalContent.scrollHeight,r=OpenModals[t].modal.scrollHeight,(OpenModals[t].previousHeight!=i||r>f)&&setModalPosition("resize",n(OpenModals[t].modal)),OpenModals[t].previousHeight=i};window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(n){window.setTimeout(n,1e3/60)}}();n.fn.modalTabbing=function(){var t=function(t){var i=n(t).find("select, input, textarea, button, a[href]").filter(":visible").not(":disabled");i.first().trigger("focus");n(t).on("keydown",function(i){if(i.which===9){var r=n(t).find("select, input, textarea, button, a[href]").filter(":visible").not(":disabled");i.shiftKey?r[0]===i.target&&(i.preventDefault(),r.last().trigger("focus")):r[r.length-1]===i.target&&(i.preventDefault(),r.first().trigger("focus"))}})};return this.each(function(){t(this)})}}(jQuery),function(n){"use strict";n.fn.extend({customSelect:function(t){if(typeof document.body.style.maxHeight=="undefined")return this;var t=n.extend({customClass:"customSelect",mapClass:!0,mapStyle:!0},t),u=t.customClass,r=function(t,r){var u=t.find(":selected"),f=r.children(":first"),e=u.html()||"&nbsp;";f.html(e);u.attr("disabled")?r.addClass(i("DisabledOption")):r.removeClass(i("DisabledOption"));setTimeout(function(){r.removeClass(i("Open"));n(document).off("mouseup."+i("Open"))},60)},i=function(n){return u+n};return this.each(function(){var e=n(this),o=n("<span />").addClass(i("Inner")),f=n("<span />");e.hasClass("hasCustomSelect")||(e.after(f.append(o)),f.addClass(u),t.mapClass&&f.addClass(e.attr("class")),t.mapStyle&&f.attr("style",e.attr("style")),e.addClass("hasCustomSelect").on("update",function(){var n,t;r(e,f);n=parseInt(e.outerWidth(),10)-(parseInt(f.outerWidth(),10)-parseInt(f.width(),10));f.css({display:"inline-block"});t=f.outerHeight();e.attr("disabled")?f.addClass(i("Disabled")):f.removeClass(i("Disabled"));o.css({"padding-right":"30px",display:"inline-block"});e.css({"-webkit-appearance":"menulist-button",width:"100%",position:"absolute",opacity:0,zIndex:"3",height:e.closest("p").height()===0?"25px":e.closest("p").height(),fontSize:f.css("font-size")})}).on("change",function(){f.addClass(i("Changed"));r(e,f)}).on("keyup",function(n){f.hasClass(i("Open"))?(n.which==13||n.which==27)&&r(e,f):(e.trigger("blur"),e.trigger("focus"))}).on("mousedown",function(){f.removeClass(i("Changed"))}).on("mouseup",function(t){if(!f.hasClass(i("Open")))if(n("."+i("Open")).not(f).length>0&&typeof InstallTrigger!="undefined")e.trigger("focus");else{f.addClass(i("Open"));t.stopPropagation();n(document).one("mouseup."+i("Open"),function(t){t.target!=e.get(0)&&n.inArray(t.target,e.find("*").get())<0?e.trigger("blur"):r(e,f)})}}).on("focus",function(){f.removeClass(i("Changed")).addClass(i("Focus"))}).on("blur",function(){f.removeClass(i("Focus")+" "+i("Open"))}).on("mouseenter",function(){f.addClass(i("Hover"))}).on("mouseleave",function(){f.removeClass(i("Hover"))}).trigger("update"))})}})}(jQuery);typeof JSON!="object"&&(JSON={}),function(){"use strict";function i(n){return n<10?"0"+n:n}function o(n){return e.lastIndex=0,e.test(n)?'"'+n.replace(e,function(n){var t=s[n];return typeof t=="string"?t:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function u(i,f){var s,l,h,a,v=n,c,e=f[i];e&&typeof e=="object"&&typeof e.toJSON=="function"&&(e=e.toJSON(i));typeof t=="function"&&(e=t.call(f,i,e));switch(typeof e){case"string":return o(e);case"number":return isFinite(e)?String(e):"null";case"boolean":case"null":return String(e);case"object":if(!e)return"null";if(n+=r,c=[],Object.prototype.toString.apply(e)==="[object Array]"){for(a=e.length,s=0;s<a;s+=1)c[s]=u(s,e)||"null";return h=c.length===0?"[]":n?"[\n"+n+c.join(",\n"+n)+"\n"+v+"]":"["+c.join(",")+"]",n=v,h}if(t&&typeof t=="object")for(a=t.length,s=0;s<a;s+=1)typeof t[s]=="string"&&(l=t[s],h=u(l,e),h&&c.push(o(l)+(n?": ":":")+h));else for(l in e)Object.prototype.hasOwnProperty.call(e,l)&&(h=u(l,e),h&&c.push(o(l)+(n?": ":":")+h));return h=c.length===0?"{}":n?"{\n"+n+c.join(",\n"+n)+"\n"+v+"}":"{"+c.join(",")+"}",n=v,h}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+i(this.getUTCMonth()+1)+"-"+i(this.getUTCDate())+"T"+i(this.getUTCHours())+":"+i(this.getUTCMinutes())+":"+i(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var f=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,r,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},t;typeof JSON.stringify!="function"&&(JSON.stringify=function(i,f,e){var o;if(n="",r="",typeof e=="number")for(o=0;o<e;o+=1)r+=" ";else typeof e=="string"&&(r=e);if(t=f,f&&typeof f!="function"&&(typeof f!="object"||typeof f.length!="number"))throw new Error("JSON.stringify");return u("",{"":i})});typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(n,t){var r,u,i=n[t];if(i&&typeof i=="object")for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(u=walk(i,r),u!==undefined?i[r]=u:delete i[r]);return reviver.call(n,t,i)}var j;if(text=String(text),f.lastIndex=0,f.test(text)&&(text=text.replace(f,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse");})}();AVL=AVL||{};AVL.RESPONSIVEFORM=AVL.RESPONSIVEFORM||{};AVL.RESPONSIVEFORM.CORE={NewFormContent:!0,BypassPhoneCountryCode:typeof phoneOptional!="undefined"?phoneOptional:!1,UseSisyphus:typeof bypassLocalStorage=="undefined"||typeof bypassLocalStorage!="undefined"&&!bypassLocalStorage,INIT:{Init:function(){var n=$(".responsive-form");AVL.RESPONSIVEFORM.CORE.INIT.InitResponsiveForms(n);AVL.RESPONSIVEFORM.CORE.INIT.InitAutoFillCatches(n)},InitAutoFillCatches:function(n){setTimeout(function(){AVL.RESPONSIVEFORM.CORE.INIT.InitFormLabels(n)},100)},InitResponsiveForms:function(n){n!=="#address-container"&&AVL.RESPONSIVEFORM.CORE.INIT.InitSisyphus(n);AVL.RESPONSIVEFORM.CORE.INIT.InitFormWarningContainers(n);AVL.RESPONSIVEFORM.CORE.INIT.InitFormMasks(n);AVL.RESPONSIVEFORM.CORE.INIT.InitFormStatusIcons(n);AVL.RESPONSIVEFORM.CORE.INIT.InitFormInputs(n);AVL.RESPONSIVEFORM.CORE.INIT.InitFormInstantValidation(n);AVL.RESPONSIVEFORM.CORE.INIT.InitUSPhoneInputs(n);AVL.RESPONSIVEFORM.CORE.INIT.InitAddressInputs(n);AVL.RESPONSIVEFORM.CORE.INIT.InitAddressModal();AVL.RESPONSIVEFORM.CORE.INIT.InitFormLabels(n);AVL.RESPONSIVEFORM.CORE.INIT.InitFormButtons(n);AVL.RESPONSIVEFORM.CORE.INIT.InitAlertBoxIcons();$(".txt-state").find(".textbox").attr("maxlength","30")},InitSisyphus:function(n){AVL.RESPONSIVEFORM.CORE.UseSisyphus&&(n.is("fieldset")?n.sisyphus({excludeFields:$(".no-sisy, input[type='hidden'], .no-sisy input[type='radio'], .no-sisy input[type='checkbox']"),includeFields:$("input.has-sisy"),customKeySuffix:document.domain+window.location.pathname.replace(/\//g,"_")+"_"}):(n.find("fieldset").each(function(){$(this).sisyphus({excludeFields:$(".no-sisy, input[type='hidden'], .no-sisy input[type='radio'], .no-sisy input[type='checkbox']"),includeFields:$("input.has-sisy"),customKeySuffix:document.domain+window.location.pathname.replace(/\//g,"_")+"_"})}),AVL.RESPONSIVEFORM.CORE.UTILITIES.RemoveInputScriptTags(n)))},InitAddressInputs:function(n){var t=n.find(".dd-country .dropdown").length>0&&typeof n.find(".dd-country .dropdown option[selected='selected']").val()!="undefined"?n.find(".dd-country .dropdown option[selected='selected']").val().toLowerCase():"";AVL.RESPONSIVEFORM.CORE.UTILITIES.PrefixPhoneWithCountryCode(n,t,AVL.RESPONSIVEFORM.CORE.NewFormContent,AVL.RESPONSIVEFORM.CORE.BypassPhoneCountryCode);n.find(".dd-country .dropdown").on("change",function(){$("#update-action").text("country-updated")});n.find(".dd-opt-states .dropdown, .txt-opt-state .textbox").on("change",function(){$("#update-action").text("states-updated")});n.find(".txt-addressline1 .textbox").each(function(){var n=$(this).closest(".responsive-form");$(this).on("keydown",function(n){n.keyCode===$.ui.keyCode.TAB&&$(this).data("ui-autocomplete").menu.active&&n.preventDefault()}).autocomplete({position:{my:"left top",at:"left bottom-1",of:n.find(".txt-addressline1")},delay:0,source:function(t,i){var f=n.find(".txt-addressline1 .textbox"),r=$.trim(f.val()),e=n.find(".dd-country .dropdown").val(),u;r!==""&&r.length>1&&e==="US"&&(u={testing:!1,companyname:n.find(".txt-company .textbox").val(),addressline1:n.find(".txt-addressline1 .textbox").val(),addressline2:n.find(".txt-addressline2 .textbox").val(),city:n.find(".txt-city .textbox").val(),state:n.find(".dd-states .dropdown").val(),zipCode:n.find(".txt-zipcode .textbox").val(),country:n.find(".dd-country .dropdown").val()},$.ajax({url:"/MyAccount/CommonControls/ResponsiveForms/Handlers/UPSAddressValidationStreetLevel.ashx",type:"POST",data:JSON.stringify(u),contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){var t=n.AddressKeyFormats;if(t.length>0){var r=[],u=[],f=[];AVL.RESPONSIVEFORM.VALIDATION.ShowJSONAddressData&&console.log(t);$.each(t,function(n){r.push(AVL.RESPONSIVEFORM.CORE.UTILITIES.CapitalizeFirstLetter(t[n].AddressLine1)+", "+AVL.RESPONSIVEFORM.CORE.UTILITIES.CapitalizeFirstLetter(t[n].PoliticalDivision2)+" "+t[n].PoliticalDivision1+" "+AVL.RESPONSIVEFORM.CORE.UTILITIES.CapitalizeFirstLetter(t[n].PostcodePrimaryLow))});$.each(r,function(n,i){$.inArray(i,u)===-1&&(u.push(i),f.push(t[n]))});i($.map(f,function(n){return{data:{addressline1:AVL.RESPONSIVEFORM.CORE.UTILITIES.CapitalizeFirstLetter(n.AddressLine1),city:AVL.RESPONSIVEFORM.CORE.UTILITIES.CapitalizeFirstLetter(n.PoliticalDivision2),state:n.PoliticalDivision1,zip:n.PostcodePrimaryLow},value:AVL.RESPONSIVEFORM.CORE.UTILITIES.CapitalizeFirstLetter(n.AddressLine1),label:AVL.RESPONSIVEFORM.CORE.UTILITIES.CapitalizeFirstLetter(n.AddressLine1)+", "+AVL.RESPONSIVEFORM.CORE.UTILITIES.CapitalizeFirstLetter(n.PoliticalDivision2)+" "+n.PoliticalDivision1+" "+n.PostcodePrimaryLow}}))}}}))},minLength:2,select:function(t,i){var s,r;AVL.RESPONSIVEFORM.CORE.UTILITIES.ProcessInputChange(n.find(".txt-addressline1"),n.find(".txt-addressline1 .textbox"),i.item.data.addressline1,!0);AVL.RESPONSIVEFORM.CORE.UTILITIES.ProcessInputChange(n.find(".txt-zipcode"),n.find(".txt-zipcode .textbox"),i.item.data.zip,!0);AVL.RESPONSIVEFORM.CORE.UTILITIES.ProcessInputChange(n.find(".txt-city"),n.find(".txt-city .textbox"),i.item.data.city,!0);AVL.RESPONSIVEFORM.VALIDATION.DOM.DisplayValidationResult(n.find(".txt-addressline1"),n.find(".txt-addressline1 .textbox"),!1,!1);n.find(".dd-states .dropdown").trigger("focus").val(i.item.data.state).trigger("blur").trigger("update");var u=n.find(".txt-addressline1 .textbox").val(),h=n.find(".txt-addressline2 .textbox").val(),f=n.find(".txt-city .textbox").val(),e=n.find(".dd-states .dropdown").val(),o=n.find(".txt-zipcode .textbox").val();u!==""&&f!==""&&e!==""&&o!==""&&(s="<address><addressline1>"+u+"<\/addressline1><addressline2>"+h+"<\/addressline2><city>"+f+"<\/city><state>"+e+"<\/state><zip>"+o+"<\/zip><\/address>",r=!1,$.ajax({type:"POST",url:"/SiteUtilities/AddressVerification.aspx",contentType:"text/xml",dataType:"text",data:s,success:function(t){var u=$.parseXML(t),f=$(u),i=f.find("ismissingaptnumber");i!=null&&i!==""?(r=i.text().toLowerCase()==="true",r?(n.find(".txt-addressline2").attr("title","Please enter your Apt, Suite, Bldg. (required)."),n.find(".txt-addressline2 .textbox").trigger("focus"),n.find(".txt-addressline2 label em").text("(required)"),n.find(".txt-addressline2 input[type='text']").attr("data-validation","req-field")):(n.find(".txt-addressline2").attr("title","Please enter your Apt, Suite, Bldg. (if applicable)."),n.find(".txt-addressline2 label em").text("(if applicable)"),n.find(".txt-addressline2").removeClass("failed-validation"),n.find(".txt-addressline2 input[type='text']").attr("data-validation","opt-addressline2"),AVL.RESPONSIVEFORM.CORE.UTILITIES.FocusNextFocusableEmptyInput(n,n.find(".dd-states .dropdown")))):(n.find(".txt-addressline2 label em").text("(if applicable)"),AVL.RESPONSIVEFORM.CORE.UTILITIES.FocusNextFocusableEmptyInput(n,n.find(".dd-states .dropdown")))},fail:function(){n.find(".txt-addressline2 label em").text("(if applicable)");n.find(".txt-addressline2 .textbox").trigger("focus")}}))},open:function(){$(this).removeClass("ui-corner-all").addClass("ui-corner-top")},close:function(){$(this).removeClass("ui-corner-top").addClass("ui-corner-all");n.find(".txt-addressline1 .textbox").trigger("change")}})})},InitUSPhoneInputs:function(){if($("input[data-validation='req-phone-us']").length>0){AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.FormatUSPhoneNumber($("input[data-validation='req-phone-us']"),$("input[data-validation='req-phone-us']").val(),!0);$("input[data-validation='req-phone-us']").on("change",function(){var n=$(this);AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.FormatUSPhoneNumber(n,n.val(),!0)})}if($("input[data-validation='opt-phone-us']").length>0){AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.FormatUSPhoneNumber($("input[data-validation='opt-phone-us']"),$("input[data-validation='opt-phone-us']").val(),!0);$("input[data-validation='opt-phone-us']").on("change",function(){var n=$(this);AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.FormatUSPhoneNumber(n,n.val(),!0)})}},InitAddressModal:function(){$("body").on("click","#ar-change",function(){var n="#"+$(this).attr("data-addressline1"),t=$(n).closest(".responsive-form");return t.find(".txt-addressline1 .textbox").trigger("focus"),$(this).attr("data-showDeliveryModal")==="true",$.closeModal({target:"#address-results"})});$("body").on("click","#ar-certify",function(){var n="#"+$(this).attr("data-addressline1"),t=$(n).closest(".responsive-form");return $("#address-results").find("#addressCertified").val("true"),AVL.RESPONSIVEFORM.VALIDATION.AddressCertified=!0,t.find(".txt-addressline1 .textbox").trigger("change"),$.closeModal({target:"#address-results"})});$("body").on("click",".ar-choice",function(){var r="#"+$(this).attr("data-addressline1"),n=$(r).closest(".responsive-form"),t=$("#address-results").data("addresses"),i=$(this).prop("rel");return t!=null&&t.length>0&&(AVL.RESPONSIVEFORM.CORE.UTILITIES.ProcessInputChange(n.find(".txt-addressline1"),n.find(".txt-addressline1 .textbox"),AVL.RESPONSIVEFORM.CORE.UTILITIES.CapitalizeFirstLetter(t[i].AddressLine1),!0),AVL.RESPONSIVEFORM.CORE.UTILITIES.ProcessInputChange(n.find(".txt-addressline2"),n.find(".txt-addressline2 .textbox"),AVL.RESPONSIVEFORM.CORE.UTILITIES.CapitalizeFirstLetter(t[i].AddressLine2),!0),AVL.RESPONSIVEFORM.CORE.UTILITIES.ProcessInputChange(n.find(".txt-city"),n.find(".txt-city .textbox"),AVL.RESPONSIVEFORM.CORE.UTILITIES.CapitalizeFirstLetter(t[i].PoliticalDivision2),!0),AVL.RESPONSIVEFORM.CORE.UTILITIES.ProcessInputChange(n.find(".dd-states"),n.find(".dd-states .dropdown"),t[i].PoliticalDivision1,!0),AVL.RESPONSIVEFORM.CORE.UTILITIES.ProcessInputChange(n.find(".txt-zipcode"),n.find(".txt-zipcode .textbox"),t[i].PostcodePrimaryLow,!0),AVL.RESPONSIVEFORM.VALIDATION.DOM.DisplayValidationResult(n.find(".txt-addressline1"),n.find(".txt-addressline1 .textbox"),!1,!1)),$.closeModal({target:"#address-results"})})},InitAlertBoxIcons:function(){$(".success-message").each(function(){AVL.RESPONSIVEFORM.CORE.DOM.AddAlertBoxIcon($(this),"icon-ok")})},InitFormWarningContainers:function(n){var t=n.is("fieldset")?n:n.find("fieldset");t.each(function(){var n=$(this),t="<div class='warning-messages'><\/div>";n.find("div.warning-messages").length||(n.find("legend").length===0?n.find("ul:first").before(t):n.find("legend").after(t))});$(".responsive-form").on("click",".bypass-field-link",function(){var t="bypassed-"+$(this).attr("data-element-id"),n=$("#"+$(this).attr("data-element-id"));return n.parent().attr("id")==="pAddressLine2"&&n.attr("data-validation","opt-addressline2"),$("#"+t).length===0&&$("body").append("<div id='"+t+"'><\/div>"),AVL.RESPONSIVEFORM.VALIDATION.FUNCTIONS.ValidateInput(n),!1})},InitFormMasks:function(n){var t=n.find("ul li p, ul li div");t.on("click",function(){$(this).hasClass("focused")||$(this).find(".textbox, .textarea, .dropdown").trigger("focus")})},InitFormInputs:function(n){var t=n.find("ul li p"),i=t.find("select");i.customSelect();t.find(".textbox, .dropdown, .textarea").not(":disabled").on("focus",function(){if(!$(this).closest("p").hasClass("focused")){var n=$(this),i=n.closest("p"),t=i.find("label");$(".focused").removeClass("focused");i.addClass("focused");n.val()!=null&&n.val().length>0&&(t.hasClass("inputted")?t.addClass("inputting-notrans"):t.addClass("inputting"));localStorage.focus=n.not(".no-focus").attr("id")}}).on("blur",function(){var t=$(this),i=t.closest("p"),r=i.find("label");i.hasClass("focused")&&(i.removeClass("focused"),AVL.RESPONSIVEFORM.CORE.INIT.InitFormLabels(n));t.val()!=null&&t.val().length===0||t.val()==null?r.removeClass("inputting inputted inputting-notrans"):r.removeClass("inputting inputting-notrans").addClass("inputted")});t.find(".textarea").not(":disabled").on("focus",function(){$(this).closest("li").find("label.outter-label").addClass("focused")}).on("blur",function(){$(this).closest("li").find("label.outter-label").removeClass("focused")});t.find(".textbox, .textarea").on("keydown",function(){var n=$(this).parent().find("label");n.hasClass("inputting-notrans")||n.addClass("inputting")}).on("keyup",function(){var i=$(this),t=$(this).parent().find("label");i.val().length===0?t.removeClass("inputted inputting inputting-notrans"):t.hasClass("inputting-notrans")||t.addClass("inputting");AVL.RESPONSIVEFORM.CORE.INIT.InitFormLabels(n)});t.find("select").not(".no-reset").each(function(){var n=$(this),t=n.parent().find("label"),i=n.parent().find(".dropdown option:selected").index();(i===-1||n.val()==="")&&t.removeClass("inputted")}).on("change",function(){var n=$(this),t=$(this).parent().find("label");n.val()!=null&&n.val().length===0?t.removeClass("inputted inputting inputting-notrans"):t.addClass("inputted")});t.find("select.dropdown").on("keypress",function(n){n.which===13&&n.stopPropagation()});n.hasClass("skip-focus")||AVL.RESPONSIVEFORM.CORE.UTILITIES.SetFocusToCorrectInput(n)},InitFormStatusIcons:function(n){var t=n.find("ul li");t.find(".textbox, .textarea, .dropdown").each(function(){var n=$(this).closest("p"),t=n.prop("title");n.find("i.input-warning").length||n.append("<i class='input-status input-warning icon-attention' title='"+t+"' onclick='return AVL.RESPONSIVEFORM.CORE.DOM.ShowValidationMessage(event, $(this));'><\/i>")});t.find(".radiobutton, .checkbox").each(function(){var n=$(this).closest(".radio-mask, .checkbox-mask"),t=n.prop("title");!n.find("i.input-warning").length&&n.find("label").length&&n.append("<i class='input-status input-warning icon-attention' title='"+t+"' onclick='return AVL.RESPONSIVEFORM.CORE.DOM.ShowValidationMessage(event, $(this));'><\/i>")});t.find("[data-loader='true']").each(function(){var n=$(this).closest("p");n.append("<img class='input-loading' src='/CommonControls/ResponsiveForms/IMG/async-loader-1.gif' alt='Loading' />")})},InitFormLabels:function(n){var t=n.find("ul li p, ul li div");t.find(".textbox, .textarea").each(function(){var n=$(this),t=n.parent().find("label");n.val().length===0?t.removeClass("inputting inputted"):t.addClass("inputted")});t.find("select").each(function(){var n=$(this),t=n.parent().find("label"),i=n.prop("selectedIndex");i===-1||n.val()===""?t.removeClass("inputting inputted"):t.addClass("inputted")})},InitFormInstantValidation:function(n){var t=n.find("ul li p, ul li div");t.find("input.textbox, textarea.textarea, select.dropdown, input.checkbox, input.radiobutton, .radiobutton input, .checkbox input").on("change",function(){var n=$(this);AVL.RESPONSIVEFORM.VALIDATION.FUNCTIONS.ValidateInput(n)});n.find("input.radiobutton, .radiobutton input").on("click",function(){var n=$(this).closest(".radiobutton");AVL.RESPONSIVEFORM.VALIDATION.FUNCTIONS.ValidateInput(n)})},InitFormButtons:function(n){n.find(".button-container .clear-button").on("click",function(){return AVL.RESPONSIVEFORM.CORE.UTILITIES.ClearLocalStorage(n),$(":input",n).each(function(){if(!($(this).hasClass("no-reset")||$(this).parent().hasClass("no-reset"))){var n=this.type,t=this.tagName.toLowerCase();n==="text"||n==="password"||t==="textarea"?this.value="":n==="checkbox"||n==="radio"?this.checked=!1:t==="select"&&(this.selectedIndex=0,$(this).trigger("update"))}}),AVL.RESPONSIVEFORM.CORE.INIT.InitFormLabels(n),!1})}},DOM:{AddAlertBoxIcon:function(n,t){var i=n.find("i."+t).length>0,r="<i class='"+t+"'><\/i>";i||n.prepend(r)},ShowValidationMessage:function(n,t){if(n.preventDefault?n.preventDefault():n.returnValue=!1,n.stopPropagation?n.stopPropagation():null,$("#responsive-form-message").length===0){var i="<div id='responsive-form-message' class='avlModal-container'><div class='avlModal-wrapper'><div class='avlModal-content'><p class='warning-message'><\/p><\/div><\/div><\/div>";$("form").length===1?$("form").append(i):$("body").append(i)}return $(".error-override").is(":visible")?$("#responsive-form-message").find(".avlModal-content p.warning-message").text($(".error-override").text()):$("#responsive-form-message").find(".avlModal-content p.warning-message").text(t.attr("title")),$.openModal({target:"#responsive-form-message",width:"300px"}),setTimeout(function(){$(":focus").trigger("blur")}),!1},SetCountryRelatedInputStates:function(n,t,i){i?n.find(".dropdown").trigger("change"):(n.find(".phone-format").text(""),t.toLowerCase()==="us"&&(n.find(".txt-phone").find("[data-validation^='req-phone']").each(function(){var n=$(this);n.attr("title","Please enter your phone number with area code.");n.val()!==""&&AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.FormatUSPhoneNumber(n,n.val(),!0)}),n.find(".phone-format").text("(xxx) xxx-xxxx")))}},UTILITIES:{RemoveInputScriptTags:function(n){$(n.find("fieldset input[type='text']")).each(function(){$(this).val($(this).val().replace(/<|>/g,""))})},CapitalizeFirstLetter:function(n){for(var u=n.toLowerCase(),i=u.split(" "),t=0,r=i.length;t<r;t++)i[t]=i[t].charAt(0).toUpperCase()+i[t].slice(1);return i.join(" ")},FocusNextFocusableEmptyInput:function(n,t){var i=n.find(":focusable"),u=i.filter(function(){return $(this).val()===""}),r=!1;u.each(function(){!r&&i.index($(this))>i.index(t)&&($(this).trigger("focus"),r=!0)})},SetFocusToCorrectInput:function(n){var t,i=!1;localStorage.focus!=null&&localStorage.focus.length>0?(t=$("#"+localStorage.focus),i&&console.log("focus to: localStorage")):n.find(".focus").length>0?(t=n.find(".focus"),i&&console.log("focus to: .focus")):$(".avlModal").is(":visible")?(t=$(".avlModal:visible").find("fieldset ul li p:first").find(".textbox, .textarea, .dropdown"),i&&console.log("focus to: visible modal")):(t=n.find(".responsive-form fieldset ul li p").first().find(".textbox, .textarea, .dropdown").not(".no-focus"),i&&console.log("focus to: first input"));setTimeout(function(){t.trigger("focus").val(t.val())},10)},ProcessInputChange:function(n,t,i,r){var f=t.val(),u=i;t.val(u);r&&f!==u&&t.trigger("change");u===""?n.find("label").removeClass("inputted"):n.find("label").addClass("inputted")},VerifyAddress:function(n,t,i,r,u){var e="<address><addressline1>"+$("[id$='"+n+"']").val()+"<\/addressline1><addressline2>"+$("[id$='"+t+"']").val()+"<\/addressline2><city>"+$("[id$='"+i+"']").val()+"<\/city><state>"+$("[id$='"+r+"']").val()+"<\/state><zip>"+$("[id$='"+u+"']").val()+"<\/zip><\/address>",f=$("[id$='"+n+"']").closest(".responsive-form");$.ajax({type:"POST",url:"/SiteUtilities/AddressVerification.aspx",contentType:"text/xml",dataType:"text",data:e,success:function(n){var i=$.parseXML(n),r=$(i),t=r.find("ismissingaptnumber");t!=null&&t!==""&&t.text().toLowerCase()==="true"&&(f.find(".txt-addressline2 label em").text("(required)"),f.find(".txt-addressline2 input[type='text']").attr("data-validation","req-field"))}})},PrefixPhoneWithCountryCode:function(n,t,i,r){if(t!==""&&!r){var u="";$.ajax({type:"GET",url:"/MyAccount/CommonControls/ResponsiveForms/XML/country-codes.xml",dataType:"xml",success:function(r){$(r).find("country").each(function(){var f=$(this).attr("code"),r;return u=$(this).attr("phoneCode"),t.toUpperCase()===f?(r=u==="1"?n.find(".txt-phone .textbox").val():"+"+u,n.find(".txt-phone .textbox").data("phonecode",u),i||AVL.RESPONSIVEFORM.CORE.UTILITIES.ProcessInputChange(n.find(".txt-phone"),n.find(".txt-phone .textbox"),r,!1),!1):void 0})}})}AVL.RESPONSIVEFORM.CORE.NewFormContent=!1;AVL.RESPONSIVEFORM.CORE.BypassPhoneCountryCode=typeof phoneOptional!="undefined"?phoneOptional:!1},ReleaseLocalStorage:function(n){AVL.RESPONSIVEFORM.CORE.UseSisyphus&&(n.is("fieldset")?n.sisyphus().manuallyReleaseData():n.find("fieldset").each(function(){$(this).sisyphus().manuallyReleaseData()}))},ClearLocalStorage:function(n){AVL.RESPONSIVEFORM.CORE.UseSisyphus&&n.find("fieldset").each(function(){$(this).sisyphus().manuallyReleaseData()});localStorage.removeItem("focus");AVL.RESPONSIVEFORM.CORE.UTILITIES.SetFocusToCorrectInput(n);AVL.RESPONSIVEFORM.VALIDATION.DOM.HideAllValidationResults(n)}}};$(document).ready(function(){AVL.RESPONSIVEFORM.CORE.INIT.Init()}),function(n){n.fn.sisyphus=function(t){var r=n.map(this,function(t){return n(t).attr("id")+n(t).attr("name")}).join(),i=Sisyphus.getInstance(r);return t!==undefined&&i.protect(this,t),i};var t={};t.isAvailable=function(){if(typeof n.jStorage=="object")return!0;try{return localStorage.getItem}catch(t){return!1}};t.set=function(t,i){if(typeof n.jStorage=="object")n.jStorage.set(t,i+"");else try{localStorage.setItem(t,i+"")}catch(r){}};t.get=function(t){if(typeof n.jStorage=="object"){var i=n.jStorage.get(t);return i?i.toString():i}return localStorage.getItem(t)};t.remove=function(t){typeof n.jStorage=="object"?n.jStorage.deleteKey(t):localStorage.removeItem(t)};Sisyphus=function(){function r(){return{setInstanceIdentifier:function(n){this.identifier=n},getInstanceIdentifier:function(){return this.identifier},setInitialOptions:function(i){var r={excludeFields:[],includeFields:[],customKeySuffix:"",locationBased:!1,timeout:0,autoRelease:!0,onSave:function(){},onBeforeRestore:function(){},onRestore:function(){},onRelease:function(){}};this.options=this.options||n.extend(r,i);this.browserStorage=t},setOptions:function(t){this.options=this.options||this.setInitialOptions(t);this.options=n.extend(this.options,t)},protect:function(t,r){var u,f,e;if(this.setOptions(r),t=t||{},u=this,this.targets=this.targets||[],this.href=location.hostname+location.pathname+location.search+location.hash,this.targets=n.merge(this.targets,t),this.targets=n.unique(this.targets),this.targets=n(this.targets),!this.browserStorage.isAvailable())return!1;f=u.options.onBeforeRestore.call(u);(f===undefined||f)&&u.restoreAllData();this.options.autoRelease&&u.bindReleaseData();i.started[this.getInstanceIdentifier()]||(u.isCKEditorPresent()?e=setInterval(function(){CKEDITOR.isLoaded&&(clearInterval(e),u.bindSaveData(),i.started[u.getInstanceIdentifier()]=!0)},100):(u.bindSaveData(),i.started[u.getInstanceIdentifier()]=!0))},isCKEditorPresent:function(){if(this.isCKEditorExists()){CKEDITOR.isLoaded=!1;CKEDITOR.on("instanceReady",function(){CKEDITOR.isLoaded=!0});return!0}return!1},isCKEditorExists:function(){return typeof CKEDITOR!="undefined"},findFieldsToProtect:function(n){return n.find(":input").not(":submit").not(":reset").not(":button").not(":file").not(":password").not(":disabled").not("[readonly]")},bindSaveData:function(){var t=this;t.options.timeout&&t.saveDataByTimeout();t.targets.each(function(){var i=n(this).attr("id")+n(this).attr("name");t.findFieldsToProtect(n(this)).each(function(){if(n.inArray(this,t.options.excludeFields)!==-1&&n.inArray(this,t.options.includeFields)===-1)return!0;var i=n(this),r=t.options.customKeySuffix+i.attr("name");(i.is(":text")||i.is("textarea"))&&(t.options.timeout||t.bindSaveDataImmediately(i,r));t.bindSaveDataOnChange(i)})})},saveAllData:function(){var t=this;t.targets.each(function(){var r=n(this).attr("id")+n(this).attr("name"),i={};t.findFieldsToProtect(n(this)).each(function(){var r=n(this),f,u,e;if(n.inArray(this,t.options.excludeFields)!==-1&&n.inArray(this,t.options.includeFields)===-1||r.attr("name")===undefined)return!0;if(f=t.options.customKeySuffix+r.attr("name"),u=r.val(),r.is(":checkbox")){if(r.attr("name").indexOf("[")!==-1){if(i[r.attr("name")]===!0)return;u=[];n("[name='"+r.attr("name")+"']:checked").each(function(){u.push(n(this).val())});i[r.attr("name")]=!0}else u=r.is(":checked");t.saveToBrowserStorage(f,u,!1)}else r.is(":radio")?r.is(":checked")&&(u=r.val(),t.saveToBrowserStorage(f,u,!1)):t.isCKEditorExists()?(e=CKEDITOR.instances[r.attr("name")]||CKEDITOR.instances[r.attr("id")])?(e.updateElement(),t.saveToBrowserStorage(f,r.val(),!1)):t.saveToBrowserStorage(f,u,!1):t.saveToBrowserStorage(f,u,!1)})});t.options.onSave.call(t)},restoreAllData:function(){var t=this,i=!1;t.targets.each(function(){var r=n(this),u=n(this).attr("id")+n(this).attr("name");t.findFieldsToProtect(r).each(function(){if(n.inArray(this,t.options.excludeFields)!==-1&&n.inArray(this,t.options.includeFields)===-1)return!0;var r=n(this),f=t.options.customKeySuffix+r.attr("name"),u=t.browserStorage.get(f);u!==null&&(t.restoreFieldsData(r,u),i=!0)})});i&&t.options.onRestore.call(t)},restoreFieldsData:function(n,t){if(n.attr("name")===undefined)return!1;n.is(":checkbox")&&t!=="false"&&n.attr("name").indexOf("[")===-1?n.prop("checked",!0):n.is(":checkbox")&&t==="false"&&n.attr("name").indexOf("[")===-1?n.prop("checked",!1):n.is(":radio")?n.val()===t&&n.prop("checked",!0):n.attr("name").indexOf("[")===-1?(n.val()===""||n.attr("data-override-server")==="true")&&n.val(t):(t=t.split(","),n.val(t))},bindSaveDataImmediately:function(n,t){var i=this,r;if("onpropertychange"in n?n.get(0).onpropertychange=function(){i.saveToBrowserStorage(t,n.val())}:n.get(0).oninput=function(){i.saveToBrowserStorage(t,n.val())},this.isCKEditorExists()&&(r=CKEDITOR.instances[n.attr("name")]||CKEDITOR.instances[n.attr("id")]))r.document.on("keyup",function(){r.updateElement();i.saveToBrowserStorage(t,n.val())})},saveToBrowserStorage:function(n,t,i){i=i===undefined?!0:i;this.browserStorage.set(n,t);i&&t!==""&&this.options.onSave.call(this)},bindSaveDataOnChange:function(n){var t=this;n.on("change",function(){})},saveDataByTimeout:function(){var n=this,t=n.targets;setTimeout(function(){function t(){n.saveAllData();setTimeout(t,n.options.timeout*1e3)}return t}(t),n.options.timeout*1e3)},bindReleaseData:function(){var t=this;t.targets.each(function(){var i=n(this),r=i.attr("id")+i.attr("name");n(this).on("submit reset",function(){t.releaseData(r,t.findFieldsToProtect(i))})})},manuallyReleaseData:function(){var t=this;!t.targets||t.targets.each(function(){var i=n(this),r=i.attr("id")+i.attr("name");t.releaseData(r,t.findFieldsToProtect(i))})},releaseData:function(t,r){var f=!1,u=this;i.started[u.getInstanceIdentifier()]=!1;r.each(function(){if(n.inArray(this,u.options.excludeFields)!==-1&&n.inArray(this,u.options.includeFields)===-1)return!0;var t=n(this),i=u.options.customKeySuffix+t.attr("name");u.browserStorage.remove(i);f=!0});f&&u.options.onRelease.call(u)}}}var i={instantiated:[],started:[]};return{getInstance:function(n){return i.instantiated[n]||(i.instantiated[n]=r(),i.instantiated[n].setInstanceIdentifier(n),i.instantiated[n].setInitialOptions()),n,i.instantiated[n]},free:function(){return i={instantiated:[],started:[]},null},version:"1.1.107"}}()}(jQuery);window.console||(console={log:function(){}});AVL=AVL||{};AVL.RESPONSIVEFORM=AVL.RESPONSIVEFORM||{};AVL.RESPONSIVEFORM.VALIDATION={InstantValidationDebug:!1,SubmitValidationDebug:!1,ShowJSONAddressData:!1,AddressCertified:!1,HasInvalidTextWarning:!1,IsZipCodeValid:!0,IsZipCodeError:!1,UnselectedCardType:"transparent",JsonCertifiedAddress:{addressline1:"",city:"",state:"",zipCode:"",country:""},DOM:{BuildAddressResultsModal:function(n,t,i,r){var f,u;$("#address-results").remove();$("form").append("<div id='address-results' class='avlModal-container'><div class='avlModal-wrapper'><div class='avlModal-header'><\/div><div class='avlModal-content'><\/div><\/div><input type='hidden' name='addressCertified' id='addressCertified' value='false'/><\/div>");switch(t){case"none":u="We were unable to verify your address. Please choose one of the following options below to proceed:";$("#address-results").find(".avlModal-header").text("Address Not Found");$("#address-results").find(".avlModal-content").html("<h6>"+u+"<\/h6><p><a id='ar-change' data-addressline1='"+n+"' href='#' title='Change the address'>Change the address<\/a><\/p><p><a id='ar-certify' data-addressline1='"+n+"' href='#' title='Certify that the address you entered is the correct address'>Certify that the address is correct ( <em> "+i+" <\/em> )<\/a><\/p>");break;case"multiple":f="";u="We were unable to verify your address. Please choose one of the following options below to proceed:";$.each(r,function(t){f+="<p><a class='ar-choice' data-addressline1='"+n+"' href='#' rel='"+t+"' title='Use this address'>"+r[t].fullAddress+"<\/a><\/p>"});$("#address-results").find(".avlModal-header").text("Choose Correct Address");$("#address-results").find(".avlModal-content").html("<h6>"+u+"<\/h6>"+f+"<p><a id='ar-change' data-addressline1='"+n+"' href='#' title='Change the address'>Change the address<\/a><\/p><p><a id='ar-certify' data-addressline1='"+n+"' href='#' title='Certify that the address you entered is the correct address'>Certify the address is correct - <em> "+i+" <\/em><\/a><\/p>");$("#address-results").data("addresses",r)}$.openModal({target:"#address-results",width:"650px"})},ShowLoadingImage:function(n,t,i){i.show();n.removeClass("failed-validation")},MoveToFirstFailedInput:function(){$(".failed-validation").length>0&&$(".failed-validation:first").closest("fieldset").length>0&&($("#slideout-content").animate({scrollTop:$("#slideout-content").scrollTop()+$(".failed-validation:first").closest("fieldset").offset().top-10},500)||$("html, body").animate({scrollTop:$(".failed-validation:first").closest("fieldset").offset().top-10},500),$(".failed-validation:first input:not(.hasDatepicker), .failed-validation:first textarea, .failed-validation:first select").trigger("focus"))},HideAllValidationResults:function(n){var t=n.find("ul li p, ul li div");t.each(function(){var n=$(this);AVL.RESPONSIVEFORM.VALIDATION.DOM.SetValidationClass(n,!1);AVL.RESPONSIVEFORM.VALIDATION.DOM.SetValidationMessage(n,n.find("input.textbox:visible, textarea.textarea:visible, select.dropdown:visible, input.checkbox:visible, input.radiobutton:visible"),!1,!1)})},DisplayValidationResult:function(n,t,i,r){t.val()===""?n.find("label").removeClass("inputted"):n.find("label").addClass("inputted");AVL.RESPONSIVEFORM.VALIDATION.DOM.SetValidationClass(n,i);AVL.RESPONSIVEFORM.VALIDATION.DOM.SetValidationMessage(n,t,i,r)},SetValidationClass:function(n,t){t?n.addClass("failed-validation"):n.removeClass("failed-validation")},SetValidationMessage:function(n,t,i,r){var o,e,h;typeof t.attr("id")!=typeof undefined?(e=t.attr("id").split("_"),o=e[e.length-2]+"_"+e[e.length-1]+"_warning"):o=t.attr("id")+"_warning";var u=n.attr("data-warning-override"),f="",s=$('[id$="'+o+'"]');f=t.attr("data-validation")==="opt-addressline2"?AVL.RESPONSIVEFORM.VALIDATION.HasInvalidTextWarning?"Please provide valid apartment,suite or building number":typeof u!="undefined"&&u!==!1?u:n.attr("title")||!1:typeof u!="undefined"&&u!==!1?u:n.attr("title")||!1;n.find(".input-warning").attr("title",f);i&&f?(h="",t.attr("data-validation")!=="opt-addressline2"&&t.parent().attr("id")!=="pAddressLine2"||AVL.RESPONSIVEFORM.VALIDATION.HasInvalidTextWarning||(h=" <a href='#bypass-field' class='bypass-field-link' data-element-id='"+t.attr("id")+"'>Click here if the value is correct.<\/a>"),f+=h,s.length===0&&(r||AVL.RESPONSIVEFORM.VALIDATION.HasInvalidTextWarning&&t.attr("data-validation")==="opt-addressline2")?n.closest("fieldset").find(".warning-messages:first").append("<div id='"+o+"'>"+f+"<\/div>"):s.length>0&&s.html(f)):s.slideUp(200,function(){$(this).remove()})},SetIconWarningMessage:function(n){var t=n.prop("title");n.find("i.input-warning").length?$(n.find("i.input-warning")).attr("title",t):$parent.append("<i class='input-status input-warning icon-attention' title='"+t+"' onclick='return ShowValidationMessage(event, $(this));'><\/i>")}},FUNCTIONS:{CheckInputValue:function(n,t,i,r,u,f){var e=t.closest(".responsive-form"),ni,d,ot,ii,st,ri,p,h,si,hi,ct,g,ci,li,y,v,nt,lt,at,wt,wi,bi,i,ki,di,bt,rt,kt,gi,nr,n,ut,o,ir;switch(r){case"req-field":t.is(":password")||(i=i.replace(/<|>/g,""),t.val(i));u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i));break;case"req-selection":u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNoSelection(i));break;case"req-checked":u.resolve(!t.is(":checked"));break;case"req-checked-list":u.resolve(!t.find("input:checked").length);break;case"req-price":t.hasClass("format-price")&&(i=i.replace(/[^.0-9]/g,""),t.val("$"+parseFloat(i).toFixed(2)));u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsPrice(i)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotZero(i));break;case"req-price-min":var rr=i.replace(/[^.0-9]/g,""),a=parseFloat(rr),ur=t.attr("data-minprice");AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNumber(a)&&t.val("$"+a);u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(a)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNumber(a)||a<ur);break;case"req-price-range":ni="$";t.hasClass("format-price")&&(i=i.replace(/[^.0-9]/g,""),t.val("$"+parseFloat(i).toFixed(2)));case"req-number-range":var fr=AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNumber(i),er=t.closest(":has(.req-price-top)").find(".req-price-top").text().replace(/[^.0-9]/g,""),ft=parseFloat(er),or=t.closest(":has(.req-price-bottom)").find(".req-price-bottom").text().replace(/[^.0-9]/g,""),et=parseFloat(or),a=parseFloat(i),ti=ni||"",k=!1;i!=="N/A"&&(!fr||i<=0)?(k=!0,n.attr("data-warning-override","Please enter a valid amount.")):!isNaN(ft)&&ft<a?(k=!0,n.attr("data-warning-override","Please enter an amount less than or equal to "+ti+ft+".")):!isNaN(et)&&et>a&&(k=!0,n.attr("data-warning-override","Please enter an amount more than "+ti+et+"."));u.resolve(k);break;case"req-customwidth-range":u.resolve(AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.ValidateRange(n,i,0,299,2,"custom trim width"));break;case"req-customheight-range":u.resolve(AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.ValidateRange(n,i,0,299,2,"custom trim height"));break;case"req-spinewidth-range":u.resolve(AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.ValidateRange(n,i,.25,2,3,"spine width"));break;case"req-number":AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)?n.attr("data-warning-override",n.attr("title")+" (Must be a valid number)"):n.removeAttr("data-warning-override");d=t.attr("minLength");d!==null&&t.val().length<d&&(n.attr("data-warning-override",n.attr("title")+" (Must be a "+d+"-digit number)"),u.resolve(!0));t.hasClass("req-route")&&(ot=i,ot!==""&&$.ajax({type:"POST",url:"/MyAccount/PaymentInformation.aspx/ValidateBankRoutingNumber",async:!1,data:"{'routingNumber':'"+ot+"'}",contentType:"application/json; charset=utf-8",dataType:"json",beforeSend:function(n){n.setRequestHeader("content-type","application/json; charset=utf-8")},success:function(t){var i=t.d;i==="Not Found"&&(n.attr("data-warning-override","Invalid routing number."),u.resolve(!0))}}));u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsWholeNumber(i)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNumber(i)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotZero(i));break;case"req-three":u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsWholeNumber(i)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNumber(i)||parseInt(i)<0||parseInt(i)>3);break;case"opt-number":u.resolve(AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)&&(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsWholeNumber(i)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNumber(i)));break;case"req-upc":u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsWholeNumber(i)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNumber(i)||i.length!==11&&i.length!==12);break;case"opt-isbn":i===""&&u.resolve(!1);case"req-isbn":case"req-isbn-design":i=i.replace("-","");u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsWholeNumber(i)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNumber(i)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsISBN(i));r==="req-isbn-design"&&n.attr("data-warning-override","Please enter a valid 13 digit ISBN code.");break;case"opt-phone":AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.FormatUSPhoneNumber(t,i,!1);u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsPhoneNumber(i)&&!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsInternationalPhoneNumber(i)&&AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i));break;case"req-phone-us":AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.FormatUSPhoneNumber(t,i,!0);u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsUSPhoneNumber(i)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i));break;case"opt-phone-us":AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.FormatUSPhoneNumber(t,i,!1);u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsUSPhoneNumber(i)&&AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i));break;case"req-phone-bycountry":AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.FormatUSPhoneNumber(t,i,!1);u.resolve(AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsPhoneNumberByCountry(i,AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.GetCountryCode(t))||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i));break;case"opt-phone-bycountry":AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.FormatUSPhoneNumber(t,i,!1);u.resolve(AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsPhoneNumberByCountry(i,AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.GetCountryCode(t))&&AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i));break;case"req-addressline1":case"opt-addressline1":ii={addressline1:e.find(".txt-addressline1 .textbox").val(),city:e.find(".txt-city .textbox").val(),state:e.find(".dd-states .dropdown").val(),zipCode:e.find(".txt-zipcode .textbox").val(),country:e.find(".dd-country .dropdown").val()};r!=="opt-addressline1"||AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)?AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)?AVL.RESPONSIVEFORM.VALIDATION.FUNCTIONS.CheckCertifiedAddressMatch(ii)?u.resolve(!1):(p=e.find(".dd-country .dropdown").val(),p==="US"&&AVL.RESPONSIVEFORM.VALIDATION.IsZipCodeValid&&f?(h={testing:!1,companyname:e.find(".txt-company .textbox").val(),addressline1:e.find(".txt-addressline1 .textbox").val(),addressline2:e.find(".txt-addressline2 .textbox").val(),city:e.find(".txt-city .textbox").val(),state:e.find(".dd-states .dropdown").val(),zipCode:e.find(".txt-zipcode .textbox").val(),country:e.find(".dd-country .dropdown").val()},st=e.find(".txt-addressline1 .textbox").val()+" "+e.find(".txt-addressline2 .textbox").val()+" "+e.find(".txt-city .textbox").val()+" "+e.find(".dd-states .dropdown").val()+" "+e.find(".txt-zipcode .textbox").val(),AVL.RESPONSIVEFORM.VALIDATION.ShowJSONAddressData&&console.log(h),$.ajax({url:"/MyAccount/CommonControls/ResponsiveForms/Handlers/UPSAddressValidationStreetLevel.ashx",type:"POST",data:JSON.stringify(h),contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){var s,t,i,r,f;if(n!=undefined&&n.Response!=undefined)if(s=n.Response,t=n.AddressKeyFormats,AVL.RESPONSIVEFORM.VALIDATION.ShowJSONAddressData&&console.log(n),s.ResponseStatusDescription==="Failure")u.resolve(!1);else if(i=typeof APPLICATION!="undefined"&&typeof APPLICATION.CHECKOUTPROCESS!="undefined"&&typeof APPLICATION.CHECKOUTPROCESS.CORE.BypassModal!="undefined"&&APPLICATION.CHECKOUTPROCESS.CORE.BypassModal,t.length===0)i||$.trim(h.addressline1)===""||$.trim(h.city)===""||$.trim(h.state)===""||$.trim(h.zipCode)===""||AVL.RESPONSIVEFORM.VALIDATION.DOM.BuildAddressResultsModal(e.find(".txt-addressline1 .textbox").attr("id"),"none",st),u.resolve(!0);else if(t.length!==1||/\d-\d/.test(t[0].AddressLine1)){var o=[],c=[],l=[];$.each(t,function(n){o.push(AVL.RESPONSIVEFORM.CORE.UTILITIES.CapitalizeFirstLetter(t[n].AddressLine1)+", "+AVL.RESPONSIVEFORM.CORE.UTILITIES.CapitalizeFirstLetter(t[n].PoliticalDivision2)+" "+t[n].PoliticalDivision1+" "+AVL.RESPONSIVEFORM.CORE.UTILITIES.CapitalizeFirstLetter(t[n].PostcodePrimaryLow))});$.each(o,function(n,i){$.inArray(i,c)===-1&&(c.push(i),t[n].fullAddress=o[n],l.push(t[n]))});i||AVL.RESPONSIVEFORM.VALIDATION.DOM.BuildAddressResultsModal(e.find(".txt-addressline1 .textbox").attr("id"),"multiple",st,l);u.resolve(!0)}else e.find(".txt-addressline1 .textbox").val(AVL.RESPONSIVEFORM.CORE.UTILITIES.CapitalizeFirstLetter(t[0].AddressLine1)).trigger("change"),t[0].AddressLine2!==""&&e.find(".txt-addressline2 .textbox").val(AVL.RESPONSIVEFORM.CORE.UTILITIES.CapitalizeFirstLetter(t[0].AddressLine2)).trigger("change"),e.find(".txt-city .textbox").val(AVL.RESPONSIVEFORM.CORE.UTILITIES.CapitalizeFirstLetter(t[0].PoliticalDivision2)).trigger("change"),r=e.find(".dd-states .dropdown"),f=t[0].PoliticalDivision1,r.val()!==f&&r.val(f).trigger("change"),AVL.RESPONSIVEFORM.VALIDATION.IsZipCodeError||e.find(".txt-zipcode .textbox").val(t[0].PostcodePrimaryLow),e.find(".txt-zipcode label").addClass("inputted"),e.find(".txt-city label").addClass("inputted"),u.resolve(!1)},fail:function(){e.find(".txt-city, .txt-state, .dd-states").find(".input-loading").hide();u.resolve(!1)}})):u.resolve(!1)):u.resolve(!0):u.resolve(!1);break;case"opt-addressline2":if(ri=$.trim(e.find(".txt-addressline2 .textbox").val()),/^[a-zA-Z0-9-#&. ]*$/.test(ri)===!1)AVL.RESPONSIVEFORM.VALIDATION.HasInvalidTextWarning=!0,u.resolve(!0);else{if(AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNonUSCountry(t)||$("#bypassed-"+t.attr("id")).length!==0)u.resolve(!1);else{var ui=$.trim(e.find(".txt-addressline1 .textbox").val()),sr=$.trim(e.find(".txt-addressline2 .textbox").val()),fi=$.trim(e.find(".txt-city .textbox").val()),hr=e.find(".dd-states").css("display")!=="none",ei=hr?e.find(".dd-states .dropdown").val():$.trim(e.find(".txt-state .textbox").val()),oi=$.trim(e.find(".txt-zipcode .textbox").val());if(ui!==""&&fi!==""&&ei!==""&&oi!==""){var cr="<address><addressline1>"+ui+"<\/addressline1><addressline2>"+sr+"<\/addressline2><city>"+fi+"<\/city><state>"+ei+"<\/state><zip>"+oi+"<\/zip><\/address>",ht=t.parent().find(".input-loading"),w=!1;AVL.RESPONSIVEFORM.VALIDATION.DOM.ShowLoadingImage(n,t,ht);$.ajax({type:"POST",url:"/SiteUtilities/AddressVerification.aspx",contentType:"text/xml",dataType:"text",data:cr,success:function(n){ht.fadeOut(100,function(){var i=$.parseXML(n),r=$(i),t=r.find("ismissingaptnumber");t!=null&&t!==""?(w=t.text().toLowerCase()==="true",e.find(".txt-addressline2 label em").text(w?"(required)":"(if applicable)"),w&&e.find(".txt-addressline2 input[type='text']").attr("data-validation","req-field"),w&&(address2Flagged=!0),u.resolve(w)):u.resolve(!1)})},error:function(){ht.hide();u.resolve(!1)}})}else u.resolve(!1)}AVL.RESPONSIVEFORM.VALIDATION.HasInvalidTextWarning=!1}break;case"req-zipcode":case"opt-zipcode":r!=="opt-zipcode"||AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)?!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)||/[\/\\\"?&.*:<>|@#%,]/g.test(i)?u.resolve(!0):(p=e.find(".dd-country .dropdown").val(),p==="US"?(f||e.find(".txt-city, .txt-state, .dd-states").find(".input-loading").show(),h={testing:!1,country:e.find(".dd-country .dropdown").val(),zipCode:i},AVL.RESPONSIVEFORM.VALIDATION.ShowJSONAddressData&&console.log(h),$.ajax({url:"/MyAccount/CommonControls/ResponsiveForms/Handlers/UPSAddressValidationCityStateZIP.ashx",type:"POST",data:JSON.stringify(h),contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){if(n!=undefined&&n.Response!=undefined){var i=n.Response,t=n.AddressValidationResults;AVL.RESPONSIVEFORM.VALIDATION.ShowJSONAddressData&&console.log(i);i.ResponseStatusDescription==="Failure"?(f||e.find(".txt-city, .txt-state, .dd-states").find(".input-loading").hide(),i.ErrorCode==="101112"||i.ErrorCode==="20008"?(AVL.RESPONSIVEFORM.VALIDATION.IsZipCodeValid=!1,AVL.RESPONSIVEFORM.VALIDATION.IsZipCodeError=!0,u.resolve(!0)):u.resolve(!1)):(AVL.RESPONSIVEFORM.VALIDATION.ShowJSONAddressData&&$.each(t,function(n){console.log(t[n])}),f?u.resolve(!1):(e.find(".txt-state .input-loading, .dd-states .input-loading").fadeOut(100),e.find(".txt-city .input-loading").fadeOut(100,function(){var n,i,r;if(t.length>0){if(n=t[0].StateProvinceCode,AVL.RESPONSIVEFORM.VALIDATION.DOM.DisplayValidationResult(e.find(".dd-states"),e.find(".dd-states .dropdown"),!1,f),t[0].City!=="")if(t.length===1)e.find(".txt-city .textbox").val(AVL.RESPONSIVEFORM.CORE.UTILITIES.CapitalizeFirstLetter(t[0].City)),AVL.RESPONSIVEFORM.VALIDATION.DOM.DisplayValidationResult(e.find(".txt-city"),e.find(".txt-city .textbox"),!1,f),e.find(".txt-city .textbox").autocomplete({source:[]});else{i=[];r=!1;$.each(t,function(n){i[n]=AVL.RESPONSIVEFORM.CORE.UTILITIES.CapitalizeFirstLetter(t[n].City);t[n].City.toLowerCase()===$.trim(e.find(".txt-city .textbox").val()).toLowerCase()&&(r=!0)});r||(e.find(".txt-city .textbox").val(""),e.find(".txt-city").find("label").removeClass("inputted"));e.find(".txt-city .textbox").autocomplete({position:{my:"left top",at:"left bottom-1",of:e.find(".txt-city")},delay:0,source:i,minLength:0,select:function(){var n=e.find(".txt-city .textbox");n.parent().find("label").addClass("inputted");AVL.RESPONSIVEFORM.VALIDATION.DOM.DisplayValidationResult(e.find(".txt-city"),e.find(".txt-city .textbox"),!1,f)},close:function(){e.find(".txt-city .textbox").trigger("change")}}).on("focus",function(){$(this).hasClass("ui-autocomplete-input")&&$(this).autocomplete("search","")})}e.find(".txt-state").length>0&&e.find(".txt-state").css("display")!=="none"?(e.find(".txt-state .textbox").val(n),AVL.RESPONSIVEFORM.VALIDATION.DOM.DisplayValidationResult(e.find(".txt-state"),e.find(".txt-state .textbox"),!1,f)):(e.find(".dd-states select").val(n).trigger("change"),AVL.RESPONSIVEFORM.VALIDATION.DOM.DisplayValidationResult(e.find(".dd-states"),e.find(".dd-states .dropdown"),!1,f));AVL.RESPONSIVEFORM.CORE.INIT.InitFormLabels($("#address-container"));u.resolve(!1)}else u.resolve(!0)})))}else AVL.RESPONSIVEFORM.VALIDATION.ShowJSONAddressData&&console.log(n),f||e.find(".txt-city, .txt-state, .dd-states").find(".input-loading").hide(),u.resolve(!1)},fail:function(){e.find(".txt-city, .txt-state, .dd-states").find(".input-loading").hide();u.resolve(!1)}})):u.resolve(!1)):u.resolve(!1);break;case"req-cvv":u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNumber(i)||i.length<3||i.length>4);break;case"req-cvv2":var lr=!$("#amex").hasClass(AVL.RESPONSIVEFORM.VALIDATION.UnselectedCardType),ar=!$("#visa").hasClass(AVL.RESPONSIVEFORM.VALIDATION.UnselectedCardType),vr=!$("#mastercard").hasClass(AVL.RESPONSIVEFORM.VALIDATION.UnselectedCardType),yr=!$("#discover").hasClass(AVL.RESPONSIVEFORM.VALIDATION.UnselectedCardType);lr?(u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNumber(i)||i.length!==4),AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotZero(i)&&n.attr("title","Please enter a valid cvv number.")):(ar||vr||yr)&&(u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNumber(i)||i.length!==3),AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotZero(i)&&n.attr("title","Please enter a valid cvv number."));break;case"req-cvv3":si=$("#ccPaymentMode").val();hi=si=="AMEX"?"4":"3";u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNumber(i)||!(hi==i.length));break;case"req-creditcard":i=i.replace(/ /g,"");u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsLuhnPass(i)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotZero(i));AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotZero(i)&&n.attr("title","Please enter a valid credit card number.");break;case"req-email":u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsEmailAddress(i)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i));break;case"opt-multi-email":if(i===""){u.resolve(!1);break}if(ct=!1,g=i.split(","),AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(g))for(ci in g){li=AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsEmailAddress(g[ci]);li||(ct=!0);break}u.resolve(ct);break;case"req-email-newaccount":u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsEmailAddress(i)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i));break;case"req-ssn":u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsSSN(i)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i));break;case"req-url":u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsURL(i)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i));break;case"opt-date-mm-dd-yy":AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)&&!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsValidDate(i)?(n.attr("title","Please enter the Publish Date in this format (MM/DD/YYYY)."),u.resolve(!0)):(new Date).setHours(0,0,0,0)>Date.parse(i)?(n.attr("title","Publish date must be today's date or a date in the future."),u.resolve(!0)):u.resolve(!1);break;case"req-date":u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsDate(i)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i));break;case"req-date-mm-dd-yy":u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsValidDate(i));break;case"req-pod-availabledate-mm-dd-yy":AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsValidDate(i)?new Date((new Date).setDate((new Date).getDate()+56)).setHours(0,0,0,0)>Date.parse(i)?(n.attr("title","We require that you make your book release date at least 8 weeks after you upload your book file to BookBaby.com."),u.resolve(!0)):u.resolve(!1):(n.attr("title","Please enter the Available Date in this format (MM/DD/YYYY)."),u.resolve(!0));break;case"req-available-date-mm-dd-yy":AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsValidDate(i)?(new Date).setHours(0,0,0,0)>Date.parse(i)?(n.attr("title","Available date must be today's date or a date in the future."),u.resolve(!0)):u.resolve(!1):(n.attr("title","Please enter the Available Date in this format (MM/DD/YYYY)."),u.resolve(!0));break;case"req-CouponEndDate-mm-dd-yy":v=$("#coupon-modal [id$='txtStartDate'] ").val();y=i;AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsValidDate(i)?(new Date).setHours(0,0,0,0)>Date.parse(y)||Date.parse(v)>Date.parse(y)?(n.attr("title","Expiration date must be after the Start Date."),u.resolve(!0)):u.resolve(!1):(n.attr("title","Please enter the Expiration Date in this format (MM/DD/YYYY)."),u.resolve(!0));break;case"req-CouponStartDate-mm-dd-yy":y=$("#coupon-modal [id$='txtEndDate'] ").val();v=i;AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsValidDate(i)?(new Date).setHours(0,0,0,0)>Date.parse(v)?(n.attr("title","Start date should be today's date or a date in the future."),u.resolve(!0)):Date.parse(v)>Date.parse(y)?(n.attr("title","Expiration date must be after the Start Date."),u.resolve(!0)):u.resolve(!1):(n.attr("title","Please enter the Start Date in this format (MM/DD/YYYY)."),u.resolve(!0));break;case"req-StartDateAddSeven-mm-dd-yy":AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsValidDate(i)?(nt=new Date,nt.setDate((new Date).getDate()+7),nt.setHours(0,0,0),Date.parse(nt)>Date.parse(i)?(n.attr("title","Start date must be at least 7 days from today’s date."),u.resolve(!0)):u.resolve(!1)):(n.attr("title","Please enter the Start Date in this format (MM/DD/YYYY)."),u.resolve(!0));break;case"req-expmonth":lt=e.find("select[data-validation=req-expyear]");at=AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i);at&&AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(lt.val())&&AVL.RESPONSIVEFORM.VALIDATION.FUNCTIONS.ValidateInput(lt);u.resolve(!at);break;case"req-expyear":var ai=new Date,pr=ai.getMonth()+1,vi=ai.getFullYear(),vt=$(e.find("select[data-validation=req-expmonth]")[0]).val()||"12",yi=0,pi=parseInt(i)||0;yi=vt[0]==="0"?parseInt(vt[1]):parseInt(vt);u.resolve(pi<vi||pi===vi&&yi<pr);break;case"req-dateddl-gt":var tt=new Date,yt=i.split("/"),it=new Date,pt=e.find("select[data-validation=req-dateddl-lt]").val().split("/");tt.setDate(parseInt(yt[0]));tt.setMonth(parseInt(yt[1])-1);tt.setYear(parseInt(yt[2]));it.setDate(parseInt(pt[0]));it.setMonth(parseInt(pt[1])-1);it.setYear(parseInt(pt[2]));u.resolve(tt.getTime()<it.getTime());break;case"req-password":case"req-password1":i.length===0?n.attr("title","Please enter a password."):i.length<8?n.attr("title","Your password must be at least 8 characters."):i.length>20&&n.attr("title","Your password must be 20 characters or less.");wt=e.find("input[data-validation=req-password2]");wi=wt.val();wi!==""&&AVL.RESPONSIVEFORM.VALIDATION.FUNCTIONS.ValidateInput(wt);u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)||i.length<8||i.length>20);break;case"req-password2":bi=e.find("input[data-validation=req-password1]").val();AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)?i!==bi?(n.attr("title","The password and confirmation don't match."),u.resolve(!0)):i.length<8?(n.attr("title","Your confirming password must be at least 8 characters."),u.resolve(!0)):i.length>20?(n.attr("title","Your confirming password must be 20 characters or less."),u.resolve(!0)):u.resolve(!1):u.resolve(!0);break;case"req-coupon":i=t.val();ki=$("#coupon-modal [id$='rbCouponType'] input:checked").val();ki==="1"?u.resolve(!1):AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsAlphNumeric(i)&&AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)?(di=/The coupon code you entered has already been used. Please enter a different code/i,$("[id$='btnValidateCoupon']").show(),bt=t.attr("id")+"_warning",di.test($("#"+bt).html())?(n.attr("title","The coupon code you entered has already been used. Please enter a different code."),/./i.test($("#"+bt).html())?u.resolve(!1):u.resolve(!0)):u.resolve(!1)):(i!==""?n.attr("title","Special characters are not allowed."):n.attr("title","Please enter coupon code."),$("[id$='lblCouponCodeAvailable']").hide(),u.resolve(!0));break;case"req-coupon-discount":rt=$("#coupon-modal [id$='rbDiscountType'] input:checked").val();kt=rt==="1"?t.val().replace(/[$]/g,""):t.val().replace(/[%]/g,"");isValid=!0;$.isNumeric(kt)?(gi=parseFloat($("#coupon-modal [id$='hfModalBookPrice']").val()),nr=$("#coupon-modal [id$='hfModalBookType']").val(),u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.FUNCTIONS.ValidateCoupondiscount(rt,nr,kt,gi,n))):(n.attr("title",rt===undefined?"Please select the discount type first.":"Please enter a valid discount amount."),u.resolve(!0));break;case"req-budget":var c=i.replace(/[^.0-9]/g,""),s=$('[id$="txtNumWeeks"]').val().replace(/[^.0-9]/g,""),tr=$('[id$="spEnteredBudget"]'),wr=!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(c)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsWholeNumber(c)||c<100,l=AVL.RESPONSIVEFORM.VALIDATION.FUNCTIONS.GetRoundDownBudget(c),b=l/100;wr?(n.attr("title",l===0?"The budget you have entered does not meet the minimum of $100 per week.":"Please enter an integer that meets the minimum budget."),tr.text(c!==""?"The budget you have entered does not meet the minimum of $100 per week.":""),u.resolve(!0)):($('[id$="txtBudget"]').val("$"+c),n=$('[id$="txtNumWeeks"]').parent("p"),ut=$('[id$="txtNumWeeks_warning"]'),s!==""&&(s>b||s==="0")?(o=b===1?"Please enter 1 week":"Please enter number of weeks between 1 – "+b,o+=" or increase your budget.",n.attr("title",o),n.find("i.input-warning").length?n.find("i.input-warning").attr("title",o):n.append("<i class='input-status input-warning icon-attention' title='"+o+"' onclick='ShowValidationMessage(event, $(this));'><\/i>"),n.addClass("failed-validation"),ut.text(o)):s!==""&&(n.attr("title",""),n.removeClass("failed-validation"),ut.length>0&&ut.text("")),AVL.RESPONSIVEFORM.VALIDATION.FUNCTIONS.ShowBudgetLabel(l,b,b,tr),u.resolve(!1));break;case"req-budget-per-week":var s=i.replace(/[^.0-9]/g,""),c=$('[id$="txtBudget"]').val().replace(/[^.0-9]/g,""),dt=!1,o="",l=AVL.RESPONSIVEFORM.VALIDATION.FUNCTIONS.GetRoundDownBudget(c),gt=$.isNumeric(s)&&$.isNumeric(c)&&l!=="0",br=l/100;if(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsWholeNumber(s)){o="Please enter a valid integer.";n.attr("title",o);$('[id$="input-warning"]').attr("title",o);gt=!1;u.resolve(!0);break}if($("[id$='txtNumWeeks']").val(s),s!==""&&s!=="0"&&c===""||l===0){u.resolve(!1);break}gt?(dt=parseInt(s)>=1?l/s>=100:!1,dt?n.attr("title",""):(o=br===1?"Please enter 1 week":"Please enter number of weeks between 1 – "+l/100,o+=" or increase your budget.",n.attr("title",o),$('[id$="input-warning"]').attr("title",o))):n.attr("title","Please enter the week in the correct format.");u.resolve(!gt||!dt);break;case"req-albumname":case"req-artistname":case"req-volumename":case"req-tracktitle":case"req-urlpage":case"req-cdtext":ir=r==="req-volumename"||r==="req-urlpage"?/[\[\]\/\\\"~'&^$!}{\;()?.*+=:<>| @#%,]/g:/[\/\\\*:<>|@#%]/g;i=t.val().replace(/[^\x00-\x7F]/g,"");i=i.replace(ir,"");t.val(i);t.closest("fieldset").sisyphus().saveAllData();f?u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i.trim())):u.resolve(!1);break;case"opt-isrc":if(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)){u.resolve(!1);break}case"req-isrc":u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)||!/^[a-zA-Z]{2}(-?)[0-9a-zA-Z]{3}(-?)\d{2}(-?)\d{5}$/.test(i));break;case"req-search":u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)||i.trim().toLowerCase()==="search");break;case"req-youtubelink":u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)||!/^(http(s?)\:\/\/)?(www\.)?((youtube\.com\/watch\?v=)|(youtu.be\/))([a-zA-Z0-9\-_]){11}/.test(i.toLowerCase()));break;case"req-youtubechannel":u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)||!/((http|https):\/\/|)(www\.|)youtube\.com\/(channel\/|user\/|c\/)[a-zA-Z0-9_\-]{1,}$/.test(i.toLowerCase()));break;case"req-partnerlink":u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i));break;case"req-fullname":u.resolve(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(i)||!i.trim().includes(" "));break;default:u.resolve(!1)}return u.promise()},CheckCertifiedAddressMatch:function(n){return!AVL.RESPONSIVEFORM.VALIDATION.AddressCertified||AVL.RESPONSIVEFORM.VALIDATION.JsonCertifiedAddress.addressline1!==$.trim(n.addressline1)||AVL.RESPONSIVEFORM.VALIDATION.JsonCertifiedAddress.city!==$.trim(n.city)||AVL.RESPONSIVEFORM.VALIDATION.JsonCertifiedAddress.zipCode!==$.trim(n.zipCode)||AVL.RESPONSIVEFORM.VALIDATION.JsonCertifiedAddress.state!==$.trim(n.state)||AVL.RESPONSIVEFORM.VALIDATION.JsonCertifiedAddress.country!==$.trim(n.country)?(AVL.RESPONSIVEFORM.VALIDATION.AddressCertified=!1,$("#address-results").find("#addressCertified").val("false"),AVL.RESPONSIVEFORM.VALIDATION.JsonCertifiedAddress.addressline1=$.trim(n.addressline1),AVL.RESPONSIVEFORM.VALIDATION.JsonCertifiedAddress.city=$.trim(n.city),AVL.RESPONSIVEFORM.VALIDATION.JsonCertifiedAddress.zipCode=$.trim(n.zipCode),AVL.RESPONSIVEFORM.VALIDATION.JsonCertifiedAddress.state=$.trim(n.state),AVL.RESPONSIVEFORM.VALIDATION.JsonCertifiedAddress.country=$.trim(n.country),!1):!0},ValidateInput:function(n){var t=n.closest("p, div.radio-mask, div.textbox-mask"),i=$.trim(n.val()),r=n.attr("data-validation")||n.parent().attr("data-validation"),u=new $.Deferred;$.when(AVL.RESPONSIVEFORM.VALIDATION.FUNCTIONS.CheckInputValue(t,n,i,r,u,!1)).done(function(r){AVL.RESPONSIVEFORM.VALIDATION.DOM.DisplayValidationResult(t,n,r,!1);AVL.RESPONSIVEFORM.VALIDATION.InstantValidationDebug&&console.log("input: "+n.attr("id")+"\r\nvalue: '"+i+"'\r\nfail: "+r)})},GetProjectedProceed:function(n,t,i,r){var u,f=r==="1"?t:t*n/100,e=i==="Print"?n/2:15*n/100;return u=n-f,u=u-e,u>0?u.toFixed(2):0..toFixed(2)},ValidateCoupondiscount:function(n,t,i,r,u){var f=!0;if(u.attr("title",""),$.isNumeric(i)){$("#coupon-modal [id$='projected-amount']").text("");switch(n){case"1":t==="eBook"?i>r*85/100&&i!=r&&(u.attr("title","The maximum allowable discount for an eBook is up to 85% or 100% of the book price [$"+r+"]."),f=!1):i>r/2&&(u.attr("title","The maximum allowable discount for a print book is half of the book price [$"+r+"]."),f=!1);break;case"2":t==="eBook"?parseFloat(i)!==100&&parseFloat(i)>85&&(u.attr("title","The maximum allowable discount for an eBook is up to 85% or 100% of the book price [$"+r+"]."),f=!1):r*i/100>r/2&&(u.attr("title","The maximum allowable discount for a print book is 50% of the price [$"+r+"]."),f=!1);break;case undefined:u.attr("title","Please select the discount type first.");f=!1}$("#coupon-modal [id$='projected-amount']").text(f?"Projected Proceeds: $"+AVL.RESPONSIVEFORM.VALIDATION.FUNCTIONS.GetProjectedProceed(r,i,t,n):"")}else u.attr("title","Please enter a valid discount amount."),f=!1;return f||AVL.RESPONSIVEFORM.VALIDATION.DOM.SetIconWarningMessage(u),f},ShowBudgetLabel:function(n,t,i,r){var u=n/t>=100;r.text(u?"The budget you have entered will allow for 1 "+(i===1?"week":"- "+i+" weeks")+" of advertising":"")},GetRoundDownBudget:function(n){return n%100!=0?n-n%100:n}},POSTBACKS:{ValidateInputs:function(n,t,i){var f=n.target||n.srcElement,r=$(f),e=[],u=!0,o=r.attr("data-submit-text")==undefined?"Submitting...":r.attr("data-submit-text"),s=r.attr("data-submit-scrollform")==undefined?!0:r.attr("data-submit-scrollform");return r.data("validated")==="true"?!0:(r.data("original")==undefined&&r.data("original",r.val()),r.val(o),t.each(function(){var n=$(this);AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.RemoveHazardousStrings(t);$(n).find("input.textbox:visible, textarea.textarea:visible, select.dropdown:visible, input.checkbox:visible, .checkbox input:visible, .radiobutton:visible").each(function(){var n=$(this),t=n.closest("p, div.radio-mask, div.textbox-mask"),r=$.trim(n.val()),f=n.attr("data-validation")||n.parent().attr("data-validation"),i=new $.Deferred;e.push(i);$.when(AVL.RESPONSIVEFORM.VALIDATION.FUNCTIONS.CheckInputValue(t,n,r,f,i,!0)).done(function(i){i&&(u=!1);AVL.RESPONSIVEFORM.VALIDATION.DOM.DisplayValidationResult(t,n,i,!0);AVL.RESPONSIVEFORM.VALIDATION.SubmitValidationDebug&&console.log(n.attr("id").split("_").pop()+"("+n.val()+") - fail: "+i)})})}),$.when.apply(null,e).done(function(){r.val(r.data("original"));u?i!=null?(AVL.RESPONSIVEFORM.CORE.UTILITIES.ReleaseLocalStorage($(".responsive-form")),localStorage.removeItem("focus"),i.apply(r[0])):(r.val(o).data("validated","true"),AVL.RESPONSIVEFORM.CORE.UTILITIES.ReleaseLocalStorage($(".responsive-form")),localStorage.removeItem("focus"),f.onclick=null,setTimeout(function(){r.trigger("click");r.attr("data-submit-disable")=="true"&&r.prop("disabled",!0)},1)):s===!0&&AVL.RESPONSIVEFORM.VALIDATION.DOM.MoveToFirstFailedInput();AVL.RESPONSIVEFORM.VALIDATION.SubmitValidationDebug&&console.log("Form sumbit validated: "+u)}),!1)}},UTILITIES:{FormatUSPhoneNumber:function(n,t,i){t=t.replace(/["'()-]/g,"");t=t.replace(/ /g,"");t=t.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3");(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNonUSCountry(n)||i)&&n.val(t)},GetCountryCode:function(n){var i="",t=n.closest(".responsive-form").find(".dd-country select");return t.length>0&&t.val()&&(i=t.val().toLowerCase()),i},ValidateRange:function(n,t,i,r,u,f){var c=AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNumber(t),l=t.replace(/[^.0-9]/g,""),s=parseFloat(l),e=(""+t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/),h,o=!1;return h=Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)),t===""||!c||s<=0?(o=!0,n.attr("data-warning-override","Please enter a valid "+f+".")):s<i||s>r?(o=!0,n.attr("data-warning-override","Please enter a valid "+f+".")):h>u&&(o=!0,n.attr("data-warning-override","Please enter a "+f+" of up to "+u+" decimal places.")),o},RemoveHazardousStrings:function(n){n.find("input.textbox, textarea.textarea").each(function(){$(this).val(AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.SanitizeValue($(this).val()))})},SanitizeValue:function(n){return n.replace(/\< /g,"<").replace(/\</g,"< ").replace(/\&\#/g,"& #")},IsAlphNumeric:function(n){return!/[^A-Za-z0-9]/.test(n)},IsNoSelection:function(n){return n!=="0"&&AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(n)},IsNotZero:function(n){return n>0},IsNotEmpty:function(n){return n!==""},IsNotAvailable:function(n){return n!=="N/A"},IsNumber:function(n){return!isNaN(n)},IsWholeNumber:function(n){return/^\d+$/.test(n)},IsPrice:function(n){return/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(n)},IsISBN:function(n){return/^(979|978)\d{10}$/i.test(n)},IsPhoneNumber:function(n){return/^((\+\d{1,3}(-| )?\(?\d\)?(-| )?\d{1,5})|(\(?\d{2,6}\)?))(-| )?(\d{3,4})(-| )?(\d{4})(( x| ext)\d{1,5}){0,1}$/i.test(n)},IsUSPhoneNumber:function(n){var t=n.replace(/["'()-]/g,"");return t=t.replace(/ /g,""),/^[0-9]{1,11}$/.test(+t)&&(t.length===10||t.length===11)},IsPhoneNumberByCountry:function(n,t){var i=!1;switch(t){case"us":i=!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsUSPhoneNumber(n)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(n);break;case"ca":case"ant":case"bar":case"bah":case"angu":case"brv":case"cay":case"ber":case"gren":case"tc":case"mons":case"guam":case"stm":case"stl":case"domi":case"stv":case"pr":case"do":case"tri":case"stk":case"jam":i=!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsPhoneNumber(n);break;default:i=!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsInternationalPhoneNumber(n)}return i},IsInternationalPhoneNumber:function(n){return/^(\+)?[0-9\-().\s]{7,15}$/i.test(n)},IsNonUSCountry:function(n){var t=AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.GetCountryCode(n);return t!=="us"},IsEmailAddress:function(n){return/^[^@\s]{1,}@[^@\s]{1,}\.[^@\s]{1,}$/i.test(n)},IsLuhnPass:function(t){var e=!0,f,i;if(/[^0-9-]+/.test(t))e=!1;else{var u=0,i=0,r=!1;for(t=t.replace(/\D/g,""),n=t.length-1;n>=0;n--)f=t.charAt(n),i=parseInt(f,10),r&&(i*=2)>9&&(i-=9),u+=i,r=!r;return u%10==0?!0:!1}},IsSSN:function(n){return/^(?!000)([0-9]\d{2}|7([0-9]\d|7[012]))([ -]?)(?!00)\d\d\3(?!0000)\d{4}$/i.test(n)},IsURL:function(n){return/^(https?):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(n)},IsDate:function(n){return!/Invalid|NaN/.test(new Date(n))},IsValidDate:function(n){if(!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsNotEmpty(n)||!AVL.RESPONSIVEFORM.VALIDATION.UTILITIES.IsDateMMDDYY(n))return!1;var t=n.split("/"),r=parseInt(t[2],10),u=parseInt(t[0],10)-1,f=parseInt(t[1],10),i=new Date(r,u,f);return i.getFullYear()===r&&i.getMonth()===u&&i.getDate()===f},IsDateMMDDYY:function(n){return/^(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d$/i.test(n)}}},function(n){var t=function(){var i=function(n){var t={data:[],heatmap:n};this.max=1;this.get=function(n){return t[n]};this.set=function(n,i){t[n]=i}},n,t;return i.prototype={addDataPoint:function(n,t){if(!(n<0)&&!(t<0)){var r=this,u=r.get("heatmap"),i=r.get("data");if(i[n]||(i[n]=[]),i[n][t]||(i[n][t]=0),i[n][t]+=arguments.length<3?1:arguments[2],r.set("data",i),r.max<i[n][t]){u.get("actx").clearRect(0,0,u.get("width"),u.get("height"));r.setDataSet({max:i[n][t],data:i},!0);return}u.drawAlpha(n,t,i[n][t],!0)}},setDataSet:function(n,t){var h=this,r=h.get("heatmap"),f=[],u=n.data,s=u.length,e,o,i;if(r.clear(),this.max=n.max,r.get("legend")&&r.get("legend").update(n.max),t!=null&&t){for(e in u)if(e!==undefined)for(o in u[e])o!==undefined&&r.drawAlpha(e,o,u[e][o],!1)}else while(s--)i=u[s],r.drawAlpha(i.x,i.y,i.count,!1),f[i.x]||(f[i.x]=[]),f[i.x][i.y]||(f[i.x][i.y]=0),f[i.x][i.y]=i.count;r.colorize();this.set("data",u)},exportDataSet:function(){var r=this,i=r.get("data"),u=[],n,t;for(n in i)if(n!==undefined)for(t in i[n])t!==undefined&&u.push({x:parseInt(n,10),y:parseInt(t,10),count:i[n][t]});return{max:r.max,data:u}},generateRandomDataSet:function(n){var r=this.get("heatmap"),f=r.get("width"),e=r.get("height"),t={},u=Math.floor(Math.random()*1e3+1),i;for(t.max=u,i=[];n--;)i.push({x:Math.floor(Math.random()*f+1),y:Math.floor(Math.random()*e+1),count:Math.floor(Math.random()*u+1)});t.data=i;this.setDataSet(t)}},n=function(n){this.config=n;var t={element:null,labelsEl:null,gradientCfg:null,ctx:null};this.get=function(n){return t[n]};this.set=function(n,i){t[n]=i};this.init()},n.prototype={init:function(){var n=this,i=n.config,s=i.title||"Legend",o=i.position,r=i.offset||10,h=i.gradient,u=document.createElement("ul"),t,f,e="";n.processGradientObject();e+=o.indexOf("t")>-1?"top:"+r+"px;":"bottom:"+r+"px;";e+=o.indexOf("l")>-1?"left:"+r+"px;":"right:"+r+"px;";t=document.createElement("div");t.style.cssText="border-radius:5px;position:absolute;"+e+"font-family:Helvetica; width:256px;z-index:10000000000; background:rgba(255,255,255,1);padding:10px;border:1px solid black;margin:0;";t.innerHTML="<h3 style='padding:0;margin:0;text-align:center;font-size:16px;'>"+s+"<\/h3>";u.style.cssText="position:relative;font-size:12px;display:block;list-style:none;list-style-type:none;margin:0;height:15px;";f=document.createElement("div");f.style.cssText=["position:relative;display:block;width:256px;height:15px;border-bottom:1px solid black; background-image:url(",n.createGradientImage(),");"].join("");t.appendChild(u);t.appendChild(f);n.set("element",t);n.set("labelsEl",u);n.update(1)},processGradientObject:function(){var r=this,i=this.config.gradient,n=[],t;for(t in i)i.hasOwnProperty(t)&&n.push({stop:t,value:i[t]});n.sort(function(n,t){return n.stop-t.stop});n.unshift({stop:0,value:"rgba(0,0,0,0)"});r.set("gradientArr",n)},createGradientImage:function(){var f=this,e=f.get("gradientArr"),i=e.length,r=document.createElement("canvas"),n=r.getContext("2d"),u,t;for(r.width="256",r.height="15",u=n.createLinearGradient(0,5,256,10),t=0;t<i;t++)u.addColorStop(1/(i-1)*t,e[t].value);for(n.fillStyle=u,n.fillRect(0,5,256,10),n.strokeStyle="black",n.beginPath(),t=0;t<i;t++)n.moveTo((1/(i-1)*t*256>>0)+.5,0),n.lineTo((1/(i-1)*t*256>>0)+.5,t==0?15:5);return n.moveTo(255.5,0),n.lineTo(255.5,15),n.moveTo(255.5,4.5),n.lineTo(0,4.5),n.stroke(),f.set("ctx",n),r.toDataURL()},getElement:function(){return this.get("element")},update:function(n){for(var u=this,i=u.get("gradientArr"),o=u.get("ctx"),s=u.get("labelsEl"),f,e="",r,t=0;t<i.length;t++)f=n*i[t].stop>>0,r=o.measureText(f).width/2>>0,t==0&&(r=0),t==i.length-1&&(r*=2),e+='<li style="position:absolute;left:'+(((1/(i.length-1)*t*256||0)>>0)-r+.5)+'px">'+f+"<\/li>";s.innerHTML=e}},t=function(n){var t={radius:40,element:{},canvas:{},acanvas:{},ctx:{},actx:{},legend:null,visible:!0,width:0,height:0,max:!1,gradient:!1,opacity:180,premultiplyAlpha:!1,bounds:{l:1e3,r:0,t:1e3,b:0},debug:!1};this.store=new i(this);this.get=function(n){return t[n]};this.set=function(n,i){t[n]=i};this.configure(n);this.init()},t.prototype={configure:function(t){var i=this,r;i.set("radius",t.radius||40);i.set("element",t.element instanceof Object?t.element:document.getElementById(t.element));i.set("visible",t.visible!=null?t.visible:!0);i.set("max",t.max||!1);i.set("gradient",t.gradient||{.45:"rgb(0,0,255)",.55:"rgb(0,255,255)",.65:"rgb(0,255,0)",.95:"yellow",1:"rgb(255,0,0)"});i.set("opacity",parseInt(255/(100/t.opacity),10)||180);i.set("width",t.width||0);i.set("height",t.height||0);i.set("debug",t.debug);t.legend&&(r=t.legend,r.gradient=i.get("gradient"),i.set("legend",new n(r)))},resize:function(){var n=this,t=n.get("element"),i=n.get("canvas"),r=n.get("acanvas");i.width=r.width=n.get("width")||t.style.width.replace(/px/,"")||n.getWidth(t);this.set("width",i.width);i.height=r.height=n.get("height")||t.style.height.replace(/px/,"")||n.getHeight(t);this.set("height",i.height)},init:function(){var n=this,t=document.createElement("canvas"),i=document.createElement("canvas"),f=t.getContext("2d"),r=i.getContext("2d"),u=n.get("element");n.initColorPalette();n.set("canvas",t);n.set("ctx",f);n.set("acanvas",i);n.set("actx",r);n.resize();t.style.cssText=i.style.cssText="position:absolute;top:0;left:0;z-index:10000000;";t.setAttribute("id","heatmap-canvas");n.get("visible")||(t.style.display="none");u.appendChild(t);n.get("legend")&&u.appendChild(n.get("legend").getElement());n.get("debug")&&document.body.appendChild(i);r.shadowOffsetX=15e3;r.shadowOffsetY=15e3;r.shadowBlur=15},initColorPalette:function(){var i=this,r=document.createElement("canvas"),e=i.get("gradient"),t,u,n,f;r.width="1";r.height="256";t=r.getContext("2d");u=t.createLinearGradient(0,0,1,256);n=t.getImageData(0,0,1,1);n.data[0]=n.data[3]=64;n.data[1]=n.data[2]=0;t.putImageData(n,0,0);n=t.getImageData(0,0,1,1);i.set("premultiplyAlpha",n.data[0]<60||n.data[0]>70);for(f in e)u.addColorStop(f,e[f]);t.fillStyle=u;t.fillRect(0,0,1,256);i.set("gradient",t.getImageData(0,0,1,256).data)},getWidth:function(n){var t=n.offsetWidth;return n.style.paddingLeft&&(t+=n.style.paddingLeft),n.style.paddingRight&&(t+=n.style.paddingRight),t},getHeight:function(n){var t=n.offsetHeight;return n.style.paddingTop&&(t+=n.style.paddingTop),n.style.paddingBottom&&(t+=n.style.paddingBottom),t},colorize:function(n,t){var u=this,l=u.get("width"),g=u.get("radius"),a=u.get("height"),nt=u.get("actx"),tt=u.get("ctx"),e=g*3,it=u.get("premultiplyAlpha"),p=u.get("gradient"),k=u.get("opacity"),f=u.get("bounds"),o,s,w,b,v,i,d,y,h,c,r;for(n!=null&&t!=null?(n+e>l&&(n=l-e),n<0&&(n=0),t<0&&(t=0),t+e>a&&(t=a-e),o=n,s=t,b=n+e,w=t+e):(o=f.l<0?0:f.l,b=f.r>l?l:f.r,s=f.t<0?0:f.t,w=f.b>a?a:f.b),v=nt.getImageData(o,s,b-o,w-s),i=v.data,d=i.length,r=3;r<d;r+=4)(y=i[r],h=y*4,h)&&(c=y<k?y:k,i[r-3]=p[h],i[r-2]=p[h+1],i[r-1]=p[h+2],it&&(i[r-3]/=255/c,i[r-2]/=255/c,i[r-1]/=255/c),i[r]=c);v.data=i;tt.putImageData(v,o,s)},drawAlpha:function(n,t,i,r){var e=this,o=e.get("radius"),u=e.get("actx"),a=e.get("max"),f=e.get("bounds"),s=n-1.5*o>>0,h=t-1.5*o>>0,c=n+1.5*o>>0,l=t+1.5*o>>0;u.shadowColor="rgba(0,0,0,"+(i?i/e.store.max:"0.1")+")";u.shadowOffsetX=15e3;u.shadowOffsetY=15e3;u.shadowBlur=15;u.beginPath();u.arc(n-15e3,t-15e3,o,0,Math.PI*2,!0);u.closePath();u.fill();r?e.colorize(s,h):(s<f.l&&(f.l=s),h<f.t&&(f.t=h),c>f.r&&(f.r=c),l>f.b&&(f.b=l))},toggleDisplay:function(){var n=this,t=n.get("visible"),i=n.get("canvas");i.style.display=t?"none":"block";n.set("visible",!t)},getImageData:function(){return this.get("canvas").toDataURL()},clear:function(){var n=this,t=n.get("width"),i=n.get("height");n.store.set("data",[]);n.get("ctx").clearRect(0,0,t,i);n.get("actx").clearRect(0,0,t,i)},cleanup:function(){var n=this;n.get("element").removeChild(n.get("canvas"))}},{create:function(n){return new t(n)},util:{mousePosition:function(n){var t,i;if(n.layerX?(t=n.layerX,i=n.layerY):n.offsetX&&(t=n.offsetX,i=n.offsetY),typeof t!="undefined")return[t,i]}}}}();n.h337=n.heatmapFactory=t}(window);jss=function(){function a(n){for(var u=n.cssRules||n.rules||[],i={},r,t=0;t<u.length;t++)r=s(u[t].selectorText),i[r]||(i[r]=[]),i[r].push({sheet:n,index:t,style:u[t].style});return i}function n(n,t){var u=n.cssRules||n.rules||[],f=[],i,r;for(t=t.toLowerCase(),i=0;i<u.length;i++)r=u[i].selectorText,r&&(r==t||r==b(t)||r==k(t))&&f.push({sheet:n,index:i,style:u[i].style});return f}function v(n,t){var u=n.cssRules||n.rules||[],i=u.length,f=y(n,t,u,i);return f||r(n,t,i),{sheet:n,index:i,style:u[i].style}}function r(n,t,i){n.insertRule?n.insertRule(t+" { }",i):n.addRule(t,null,i)}function y(n,u,f,e){var c,l;if(t.exec(u))c=u,l=h(u);else if(o.exec(u))c=s(u),l=u;else return!1;return i||(r(n,c,e),f.length<=e&&(i=!0)),i&&r(n,l,e),!0}function s(n){return n.replace(o,function(n,t,i,r){return t+"::"+r})}function h(n){return n.replace(t,function(n,t,i){return":"+i})}function p(n){var t=n.sheet;t.deleteRule?t.deleteRule(n.index):t.removeRule&&t.removeRule(n.index)}function c(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return n}function u(n){for(var i={},t=0;t<n.length;t++)c(i,w(n[t].style));return i}function w(n){for(var i={},t=0;t<n.length;t++)i[n[t]]=n[g(n[t])];return i}function b(n){for(var t="",i=0;(match=l.exec(n))!=null;){if(match[0]==="")break;t+=n.substring(i,match.index);t+=n.substr(match.index+match[1].length,match[2].length);t+=n.substr(match.index,match[1].length);i=match.index+match[0].length}return t+n.substr(i)}function k(n){return t.exec(n)?h(n):n}function d(n,t){var i,r,u;for(i in t)r=t[i],u=r.indexOf(" !important"),n.style.removeProperty(i),u>0?n.style.setProperty(i,r.substr(0,u),"important"):n.style.setProperty(i,r)}function g(n){return n.replace(/-([a-z])/g,function(n,t){return t.toUpperCase()})}function nt(n){var i={},t;for(t in n)i[tt(t)]=n[t];return i}function tt(n){return n.replace(/([A-Z])/g,function(n,t){return"-"+t.toLowerCase()})}var l=/((?:\.|#)[^\.\s#]+)((?:\.|#)[^\.\s#]+)/g,t=/(::)(before|after|first-line|first-letter|selection)/,o=/([^:])(:)(before|after|first-line|first-letter|selection)/,i,f=function(n){this.doc=n;this.head=this.doc.head||this.doc.getElementsByTagName("head")[0];this.sheets=this.doc.styleSheets||[]},e;return f.prototype={get:function(t){if(!this.defaultSheet)return{};if(t)return u(n(this.defaultSheet,t));var i=a(this.defaultSheet);for(t in i)i[t]=u(i[t]);return i},getAll:function(t){for(var r={},i=0;i<this.sheets.length;i++)c(r,u(n(this.sheets[i],t)));return r},set:function(t,i){var r,u;for(this.defaultSheet||(this.defaultSheet=this._createSheet()),i=nt(i),r=n(this.defaultSheet,t),r.length||(r=[v(this.defaultSheet,t)]),u=0;u<r.length;u++)d(r[u],i)},remove:function(t){var i,r;if(this.defaultSheet){if(!t){this._removeSheet(this.defaultSheet);delete this.defaultSheet;return}for(i=n(this.defaultSheet,t),r=0;r<i.length;r++)p(i[r]);return i.length}},_createSheet:function(){var n=this.doc.createElement("style");return n.type="text/css",n.rel="stylesheet",this.head.appendChild(n),n.sheet},_removeSheet:function(n){var t=n.ownerNode;t.parentNode.removeChild(t)}},e=new f(document),e.forDocument=function(n){return new f(n)},e}();typeof module!="undefined"&&module.exports&&(module.exports=jss);EventRecorder=function(n,t,i){var r={},s=null,l=-1,a=!1,v=2147483647,nt=3e3,f={record:!0,debug:!1,escPlayback:!1},tt=function(n,t,i){var r=parent&&parent.EVENTPLAYBACK&&parent.EVENTPLAYBACK.playback;typeof n=="boolean"&&(f.record=n);typeof t=="boolean"&&(f.debug=t);typeof i=="boolean"&&(f.escPlayback=i);f.record&&!r&&ot()},it=function(){f.record&&(s=Date.now(),e(null,null,null,null,null,null,null,null,null,o(s),null,null,null),u("recording started at "+s),a=!0,et())},rt=function(){var t=Date.now(),n;u("recording stopped");a=!1;e(null,null,null,null,null,null,null,null,null,o(t),null,null,null);r.Filesize=AVL.UTILITIES.FUNCTIONS.GetPhysicalSize(h());(r.Inactivity==null||r.Inactivity<0)&&(r.Inactivity=0);n=t-s;r.Duration=n>v?v:n;r.Engagement=r.Duration-r.Inactivity;ut()},ut=function(){r.Active=!1;f.record&&r.Unloadable&&ht()},h=function(){return JSON.stringify(r)},ft=function(t){if(t.length>0)switch(t[0]){case"tagRecording":typeof r.Tags=="undefined"&&(r.Tags="");switch(typeof t[1]){case"object":n.each(t[1],function(n,t){var i=t==null||t==""?"":":"+t,u=n+i,f=r.Tags==""?"":",";r.Tags+=f+u});break;case"string":r.Tags+=","+t[1]}u(r.Tags)}},et=function(){if(f.record){i.onload=function(){wgxpath.install()};"onbeforeunload"in i?(i.onbeforeunload=function(){rt()},r.Unloadable=!0,u("window beforeunload event bound!")):(r.Unloadable=!1,r.Active=!1,u("window beforeunload failed!"));n(i).on("resize",function(n){n.timeStamp=Date.now();y(n)});n(t).on("resize mousedown mouseup mousemove dblclick keydown keyup scroll change touchstart touchmove touchend touchcancel",function(n){if(yt(n)){n.timeStamp=Date.now();switch(n.type){case"mousedown":case"mouseup":n.which==1&&y(n);break;default:y(n)}}});var e=n("#slideout-content").length==0?n(t):n("#slideout-content");e.on("scroll",function(n){n.timeStamp=Date.now();y(n)})}},y=function(t){if(a&&f.record)switch(t.type){case"mousemove":case"mousedown":case"mouseup":case"dblclick":(r.Events.length==0||t.type!="mousemove"||t.type=="mousemove"&&r.Events[r.Events.length-1].Mx!=t.pageX&&r.Events[r.Events.length-1].My!=t.pageY)&&(lt(n(AVL.UTILITIES.FUNCTIONS.GetEventTarget(t))),t.type=="mouseup"&&(e(t.type,null,t.pageX,t.pageY,n(i).scrollLeft(),n(i).scrollTop(),null,n(i).width(),n(i).height(),o(Date.now()),k(n(AVL.UTILITIES.FUNCTIONS.GetEventTarget(t))),AVL.UTILITIES.FUNCTIONS.GetElementXPath(AVL.UTILITIES.FUNCTIONS.GetEventTarget(t)),null),t.type="click",r.Clicks==null?r.Clicks=1:r.Clicks++),e(t.type,null,t.pageX,t.pageY,n(i).scrollLeft(),n(i).scrollTop(),null,n(i).width(),n(i).height(),o(Date.now()),null,AVL.UTILITIES.FUNCTIONS.GetElementXPath(AVL.UTILITIES.FUNCTIONS.GetEventTarget(t)),null));break;case"keydown":case"keyup":var u=t.which?t.which:t.keyCode;e(t.type,u,null,null,n(i).scrollLeft(),n(i).scrollTop(),null,n(i).width(),n(i).height(),o(Date.now()),null,AVL.UTILITIES.FUNCTIONS.GetElementXPath(AVL.UTILITIES.FUNCTIONS.GetEventTarget(t)),n(AVL.UTILITIES.FUNCTIONS.GetEventTarget(t)).val());break;case"change":e(t.type,null,null,null,n(i).scrollLeft(),n(i).scrollTop(),null,n(i).width(),n(i).height(),o(Date.now()),k(n(AVL.UTILITIES.FUNCTIONS.GetEventTarget(t))),AVL.UTILITIES.FUNCTIONS.GetElementXPath(AVL.UTILITIES.FUNCTIONS.GetEventTarget(t)),n(AVL.UTILITIES.FUNCTIONS.GetEventTarget(t)).val());break;case"resize":p();e(t.type,null,null,null,n(i).scrollLeft(),n(i).scrollTop(),null,n(i).width(),n(i).height(),o(Date.now()),null,AVL.UTILITIES.FUNCTIONS.GetElementXPath(AVL.UTILITIES.FUNCTIONS.GetEventTarget(t)),null);break;case"scroll":p();e(t.type,t.pageX,t.pageY,null,n(i).scrollLeft(),n(i).scrollTop(),"window",n(i).width(),n(i).height(),o(Date.now()),null,AVL.UTILITIES.FUNCTIONS.GetElementXPath(AVL.UTILITIES.FUNCTIONS.GetEventTarget(t)),null)}},e=function(n,t,i,f,e,o,s,h,c,l,a,v,y){var p={Et:n,Kc:t,Mx:i,My:f,Sx:e,Sy:o,St:s,Ww:h,Wh:c,Ts:l,Tg:a,Tr:v,Vl:y};vt(l,nt);r.Events.push(p);u(p)},u=function(n){f.debug&&console.log(n)},ot=function(){r={Active:!0,Application:"",Belowfold:0,Brand:0,Browsername:"",Browserversion:"",Clicks:0,Colordepth:"",Cookiesenabled:!1,Country:"",Countrycode:"",Customerid:"",Date:c(),Devicetype:"",Documentheight:0,Duration:0,Engagement:0,Error:0,Events:"",Filesize:"",Inactivity:0,Ip:"",Isp:"",Javaenabled:!1,Language:"",Lastmodified:c(),Lastvisit:c(),Latitude:"",Loadtime:0,Longitude:"",Osname:"",Osversion:"",Page:"",Pagetitle:"",Referrer:"",Region:"",Regioncode:"",Screenheight:0,Screenres:"",Screenwidth:0,Scrollreach:0,Servertime:0,Sessionid:"",Sourcecode:"",Tags:"",Timezone:"",Unscrolled:0,Url:"",Useragent:"",Utmcampaign:"",Utmsource:"",Utmmedium:"",Utmcontent:"",Viewportheight:"",Viewportwidth:"",Visitortype:"",Browserfeatures:{Applicationcache:"",Audio:"",Backgroundsize:"",Borderimage:"",Canvas:"",Canvastext:"",Cssanimations:"",Csscolumns:"",Cssgradients:"",Cssreflections:"",Csstransforms:"",Csstransforms3d:"",Csstransitions:"",Borderradius:"",Boxshadow:"",Draganddrop:"",Flexbox:"",Fontface:"",Geolocation:"",Generatedcontent:"",Hashchange:"",History:"",Hsla:"",Indexeddb:"",Inlinesvg:"",Localstorage:"",Multiplebgs:"",Opacity:"",Postmessage:"",Rgba:"",Sessionstorage:"",Smil:"",Svg:"",Svgclippaths:"",Textshadow:"",Touch:"",Unloadable:0,Video:"",Webgl:"",Websockets:"",websqldatabase:"",webworkers:""}};ct();at();st();u(r);it()},st=function(){function i(n){l=parseInt(n.d);r.Servertime=(new Date).getTime()-t;u(r.Servertime)}function f(){r.Servertime=(new Date).getTime()-t;u("failed save!")}var t=(new Date).getTime();!0&&n.ajax({type:"POST",async:!0,cache:!1,url:g()+"/AddRecording",contentType:"application/json; charset=utf-8",data:JSON.stringify({jsonRequest:h()}),dataType:"json",success:i,error:f})},ht=function(){function r(n){u(n)}function f(n){u(n.status+" \n\r "+n.statusText+"\n\r"+n.responseText)}var t=g()+(l==-1?"/AddRecording":"/UpdateRecording"),i=l==-1?JSON.stringify({jsonRequest:h()}):JSON.stringify({id:l,jsonRequest:h()});!0&&n.ajax({type:"POST",async:!1,cache:!1,url:t,contentType:"application/json; charset=utf-8",data:i,dataType:"json",success:r,error:f})},ct=function(){var e=!0,o="ER_PV_"+d(),s="ER_RSID",u="ER_RLV",h="ER_RVT",t=AVL.UTILITIES.FUNCTIONS.GetCookie(s),f,n,i;t==undefined||t==null||t==""?(r.Sessionid=pt(),AVL.UTILITIES.FUNCTIONS.SetSessionCookie(s,r.Sessionid)):(r.Sessionid=t,e=!1);f=AVL.UTILITIES.FUNCTIONS.GetCookie(u);n=AVL.UTILITIES.FUNCTIONS.GetCookie(h);e||!w(f)||n==undefined||n==null||n==""?(i=AVL.UTILITIES.FUNCTIONS.GetCookie(o),w(i)?(r.Visitortype="returning",r.Lastvisit=i,AVL.UTILITIES.FUNCTIONS.SetSessionCookie(u,i)):(r.Visitortype="new",r.Lastvisit=b(),AVL.UTILITIES.FUNCTIONS.SetSessionCookie(u,b())),AVL.UTILITIES.FUNCTIONS.SetSessionCookie(h,r.Visitortype)):(r.Lastvisit=f,r.Visitortype=n);w(r.Lastvisit)||(r.Lastvisit=b());AVL.UTILITIES.FUNCTIONS.SetCookie(o,c(),360)},lt=function(r){var f=r.scrollParent(),s=r.hasScroll(),h=!f.is(t)&&f.hasScroll(),u;if((s||h)&&(u=s?r:r.scrollParent(),!u.hasClass("scrollable-record"))){u.addClass("scrollable-record");u.on("scroll",function(t){a&&e(t.type,null,null,null,u.scrollLeft(),u.scrollTop(),"element",n(i).width(),n(i).height(),o(Date.now()),null,AVL.UTILITIES.FUNCTIONS.GetElementXPath(AVL.UTILITIES.FUNCTIONS.GetEventTarget(t)),null)})}},p=function(){var h=n(i).height(),c=n("#slideout-content").length==0?n(t).height():n("#slideout-content")[0].scrollHeight,o=n("#slideout-content").length==0?n(i).scrollTop():n("#slideout-content").scrollTop(),e=c-h,l=Math.ceil(e-o),s=100,f;return e>0&&(s=parseInt((o/e*100).toFixed(0))),f={percent:s,unscrolled:l},(r.Scrollreach==null||r.Scrollreach<f.percent)&&(r.Scrollreach=f.percent),(r.Unscrolled==null||r.Unscrolled>f.unscrolled)&&(r.Unscrolled=Math.ceil(f.unscrolled)),u(r.Unscrolled+"/"+f.unscrolled+"px - "+r.Scrollreach+"/"+f.percent+"%"),f},at=function(){var w="-",b=screen.width||0,k=screen.height||0,tt=b+" x "+k,it=navigator.appVersion||"",u=navigator.userAgent||"",o=navigator.appName||"",f=""+parseFloat(navigator.appVersion),a=parseInt(navigator.appVersion,10),g,e,l,h,v,nt,y,s;(e=u.indexOf("Opera"))!=-1?(o="Opera",f=u.substring(e+6),(e=u.indexOf("Version"))!=-1&&(f=u.substring(e+8))):(e=u.indexOf("MSIE"))!=-1?(o="Internet Explorer",f=u.substring(e+5)):(e=u.indexOf("Chrome"))!=-1?(o="Chrome",f=u.substring(e+7)):(e=u.indexOf("Safari"))!=-1?(o="Safari",f=u.substring(e+7),(e=u.indexOf("Version"))!=-1&&(f=u.substring(e+8))):(e=u.indexOf("Firefox"))!=-1?(o="Firefox",f=u.substring(e+8)):u.indexOf("Trident/")!=-1?(o="Internet Explorer",f=u.substring(u.indexOf("rv:")+3)):(g=u.lastIndexOf(" ")+1)<(e=u.lastIndexOf("/"))&&(o=u.substring(g,e),f=u.substring(e+1),o.toLowerCase()==o.toUpperCase()&&(o=navigator.appName||""));(l=f.indexOf(";"))!=-1&&(f=f.substring(0,l));(l=f.indexOf(" "))!=-1&&(f=f.substring(0,l));(l=f.indexOf(")"))!=-1&&(f=f.substring(0,l));a=parseInt(""+f,10);isNaN(a)&&(f=""+parseFloat(navigator.appVersion),a=parseInt(navigator.appVersion,10));typeof navigator.cookieEnabled!="undefined"||cookieEnabled||(t.cookie="testcookie",cookieEnabled=t.cookie.indexOf("testcookie")!=-1?!0:!1);h=w;v=[{s:"Windows 3.11",r:/Win16/},{s:"Windows 95",r:/(Windows 95|Win95|Windows_95)/},{s:"Windows ME",r:/(Win 9x 4.90|Windows ME)/},{s:"Windows 98",r:/(Windows 98|Win98)/},{s:"Windows CE",r:/Windows CE/},{s:"Windows 2000",r:/(Windows NT 5.0|Windows 2000)/},{s:"Windows XP",r:/(Windows NT 5.1|Windows XP)/},{s:"Windows Server 2003",r:/Windows NT 5.2/},{s:"Windows Vista",r:/Windows NT 6.0/},{s:"Windows 7",r:/(Windows 7|Windows NT 6.1)/},{s:"Windows 8.1",r:/(Windows 8.1|Windows NT 6.3)/},{s:"Windows 8",r:/(Windows 8|Windows NT 6.2)/},{s:"Windows NT 4.0",r:/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/},{s:"Windows ME",r:/Windows ME/},{s:"Android",r:/Android/},{s:"Open BSD",r:/OpenBSD/},{s:"Sun OS",r:/SunOS/},{s:"Linux",r:/(Linux|X11)/},{s:"iOS",r:/(iPhone|iPad|iPod)/},{s:"Mac OS X",r:/Mac OS X/},{s:"Mac OS",r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/},{s:"QNX",r:/QNX/},{s:"UNIX",r:/UNIX/},{s:"BeOS",r:/BeOS/},{s:"OS/2",r:/OS\/2/},{s:"Search Bot",r:/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/}];for(nt in v)if(y=v[nt],y.r.test(u)){h=y.s;break}s=w;/Windows/.test(h)&&(s=/Windows (.*)/.exec(h)[1],h="Windows");switch(h){case"Mac OS X":s=/Mac OS X (10[\.\_\d]+)/.exec(u)[1];break;case"Android":s=/Android ([\.\_\d]+)/.exec(u)[1];break;case"iOS":s=/OS (\d+)_(\d+)_?(\d+)?/.exec(it);s=s[1]+"."+s[2]+"."+(s[3]|0)}typeof r.Tags=="undefined"&&(r.Tags="");r.Customerid=n("#avlCT").val()||"";r.Devicetype=AVL.UTILITIES.FUNCTIONS.GetDeviceType();r.Application=AVL.UTILITIES.FUNCTIONS.GetApplication();r.Date=c();r.Brand=AVL.UTILITIES.FUNCTIONS.GetAvlBrand();r.Lastmodified=t.lastModified||"";r.Loadtime=(new Date).getTime()-ERMV.ls;r.Url=t.URL||"";r.Page=AVL.UTILITIES.FUNCTIONS.GetFileNameNoParams(t.URL);r.Pagetitle=AVL.UTILITIES.FUNCTIONS.GetPageTitle();r.Error=AVL.UTILITIES.FUNCTIONS.IsErrorPage(t.URL);r.Duration=0;r.Language=navigator.language||"";r.Useragent=navigator.userAgent||"";r.Browsername=o||"";r.Browserversion=f||"";r.Osname=h||"";r.Osversion=s||"";r.Cookiesenabled=AVL.UTILITIES.FUNCTIONS.IsCookiesEnabled();r.Javaenabled=navigator.javaEnabled()||!1;r.Belowfold=n(t).height()-n(i).height();r.Documentheight=n(t).height();r.Scrollreach=p().percent;r.Unscrolled=p().unscrolled;r.Viewportheight=n(i).height();r.Viewportwidth=n(i).width();r.Screenres=tt;r.Screenwidth=b;r.Screenheight=k;r.Colordepth=screen.colorDepth+" bit";r.Sourcecode=AVL.UTILITIES.FUNCTIONS.GetCookie(d()+"SourceCode","")||"";r.Utmcampaign=AVL.UTILITIES.FUNCTIONS.GetQuerystringParamByName(t.URL,"utm_campaign");r.Utmsource=AVL.UTILITIES.FUNCTIONS.GetQuerystringParamByName(t.URL,"utm_source");r.Utmmedium=AVL.UTILITIES.FUNCTIONS.GetQuerystringParamByName(t.URL,"utm_medium");r.Utmcontent=AVL.UTILITIES.FUNCTIONS.GetQuerystringParamByName(t.URL,"utm_content");r.Referrer=t.referrer||"";r.Events=[];r.Browserfeatures=AVL.UTILITIES.FUNCTIONS.GetBrowserFeatures()},w=function(n){return!(n==undefined||n==null||n==""||!XDate(n).valid())},c=function(){return AVL.UTILITIES.FUNCTIONS.FormatDate(new Date)},b=function(){return AVL.UTILITIES.FUNCTIONS.FormatDate(new Date(1970,0,1,12))},o=function(n){return n-s},k=function(n){var t=n.attr("data-tagEvent"),i=null;return typeof t!="undefined"&&t!==!1&&(i=t),i},vt=function(n,t){if(r.Events.length>0){var i=n-r.Events[r.Events.length-1].Ts;i>t&&((r.Inactivity==null||r.Inactivity<0)&&(r.Inactivity=0),r.Inactivity+=i,r.Inactivity>v&&(r.Inactivity=v),u(n+" / "+r.Inactivity))}},yt=function(t){var i=n(AVL.UTILITIES.FUNCTIONS.GetEventTarget(t));return i.attr("data-recordingignore")!="true"&&i.closest("[data-recordingignore='true']").length==0},pt=function(){var n=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=(n+Math.random()*16)%16|0;return n=Math.floor(n/16),(t=="x"?i:i&7|8).toString(16)})},d=function(){var n="";switch(AVL.UTILITIES.FUNCTIONS.GetAvlBrand()){case"0":n="DM";break;case"4":n="OAS";break;case"5":n="CDB";break;case"12":n="TC";break;case"14":n="BB";break;case"16":n="BS";break;case"17":n="AS"}return n},g=function(){return"/EventRecorderWebService/EventRecorder.asmx"};return{init:tt,push:ft,getRecording:h}}(jQuery,document,window);EventPlayer=function(n,t,i){var f=null,u=[],o=null,p=!1,g=!1,w=null,a=null,s=[],v=0,b=new Date,c=null,h=parent&&parent.EVENTPLAYBACK&&parent.EVENTPLAYBACK.playback,r={autoplay:!1,debug:!1,showprogress:!1,playbackSpeed:h?parent.PAGE.PlaybackSpeed:1},nt=function(n,t,i,o){typeof n=="string"?f=JSON.parse(n):n===Object(n)?f=n:e("invalid recording...");typeof t=="boolean"&&(r.autoplay=t);typeof i=="boolean"&&(r.showprogress=i);typeof o=="boolean"&&(r.debug=o);d();ct();u=_.clone(f.Events);pt();r.debug&&wt();r.showprogress&&parent.AVL.UTILITIES.MODULES.ProgressBar.init({duration:f.Duration,debug:!1});r.autoplay&&y()},y=function(){e("play recording...");l(!0,!1);n("#virtual-cursor").show();k()},tt=function(){clearTimeout(c);u=_.clone(f.Events);h&&u!=null&&u[1]!=null&&parent.PAGE.UTILITIES.ResizeIframe(null,u[1].Ww,u[1].Wh);y();r.showprogress&&parent.AVL.UTILITIES.MODULES.ProgressBar.replay()},it=function(){e("pause recording...");l(!1,!0);r.showprogress&&parent.AVL.UTILITIES.MODULES.ProgressBar.pause()},rt=function(){e("stop recording...");clearTimeout(c);l(!1,!1);u=_.clone(f.Events);r.showprogress&&parent.AVL.UTILITIES.MODULES.ProgressBar.pause()},ut=function(){e("stop recording...");clearTimeout(c);l(!1,!1)},ft=function(n){r.playbackSpeed=n},et=function(){var i=f.Events,r,u,n;if(i.length>0)for(r={element:t.getElementsByTagName("body")[0],radius:20,opacity:50},u=h337.create(r),n=0;n<i.length;n++)i[n].Et=="click"&&u.store.addDataPoint(i[n].Mx,i[n].My)},ot=function(){var i=f.Events,r,n;if(i.length>0)for(r={element:t.getElementsByTagName("body")[0],radius:10,opacity:50},w=h337.create(r),n=0;n<i.length;n++)i[n].Et=="mousemove"&&w.store.addDataPoint(i[n].Mx,i[n].My)},e=function(n){r.debug&&console.log(n)},st=function(){return f},l=function(n,t){p=n;g=t},k=function(){if(u.length>0){if(p){var t=u[0].Ts,n=t;o!=null&&(n-=o.Ts);n<v&&(n=v);h&&parent.PAGE.SkipInactivity&&n>1e3&&(n=1e3);c=setTimeout(function(){k()},n/r.playbackSpeed);r.showprogress&&h&&o&&parent.AVL.UTILITIES.MODULES.ProgressBar.play(o.Ts);ht(u[0]);o=u[0];u.shift()}}else ut()},ht=function(t){var f,r,o,l,c,u;switch(t.Et){case"dblclick":n(AVL.UTILITIES.FUNCTIONS.GetElementByXPath(t.Tr)).trigger("dblclick");break;case"click":f=n("<div class='pulse_holder' style='top:"+t.My+"px; left:"+t.Mx+"px;'><div class='pulse_marker'><div class='pulse_rays'><\/div><\/div><\/div>");n("body").append(f);setTimeout(function(){f.fadeOut()},1e3);n(AVL.UTILITIES.FUNCTIONS.GetElementByXPath(t.Tr)).trigger("click");break;case"mousedown":n("#virtual-cursor").addClass("mousedown");n(AVL.UTILITIES.FUNCTIONS.GetElementByXPath(t.Tr)).trigger("mousedown");break;case"mouseup":n("#virtual-cursor").removeClass("mousedown");n(AVL.UTILITIES.FUNCTIONS.GetElementByXPath(t.Tr)).trigger("mouseup");break;case"mousemove":r=!1;o=a!=null?a.Tr:"";yt(n(AVL.UTILITIES.FUNCTIONS.GetElementByXPath(t.Tr)).closest("a"));at(o,t.Tr)?(l=n.unique(s),n.each(l,function(t,i){n(AVL.UTILITIES.FUNCTIONS.GetElementByXPath(i)).trigger("mouseleave");r&&e("MouseLeave ... "+t+" "+i)}),r&&e(n.unique(s).length+" element(s) triggered mouseenter/mouseleave..."),s=[],n(AVL.UTILITIES.FUNCTIONS.GetElementByXPath(t.Tr)).trigger("mouseenter"),s.push(t.Tr),r&&e("\r\nMouseEnter (new) ... "+t.Tr)):t.Tr!=o&&(s.push(t.Tr),n(AVL.UTILITIES.FUNCTIONS.GetElementByXPath(t.Tr)).trigger("mouseenter"),r&&e("MouseEnter (sibling) ... "+t.Tr));a=t;n("#virtual-cursor").css({left:t.Mx+"px",top:t.My+"px"});break;case"scroll":c=t.St=="window"?n(i):n(AVL.UTILITIES.FUNCTIONS.GetElementByXPath(t.Tr));c.scrollLeft(t.Sx);c.scrollTop(t.Sy);n("#virtual-cursor").css({left:t.Mx,top:t.My});break;case"keydown":case"keyup":n(AVL.UTILITIES.FUNCTIONS.GetElementByXPath(t.Tr)).val(t.Vl);u=jQuery.Event(t.Et);u.which=t.Kc;u.keyCode=t.Kc;n(AVL.UTILITIES.FUNCTIONS.GetElementByXPath(t.Tr)).trigger("focus").trigger(u);break;case"change":n(AVL.UTILITIES.FUNCTIONS.GetElementByXPath(t.Tr)).val(t.Vl);break;case"touchstart":case"touchmove":case"touchend":case"touchcancel":n(AVL.UTILITIES.FUNCTIONS.GetElementByXPath(t.Tr)).trigger(t.Et);break;case"resize":h&&parent.PAGE.UTILITIES.ResizeIframe(null,t.Ww,t.Wh)}},d=function(){var n=new Date;v=n-b;b=n;requestAnimationFrame(d)},ct=function(){var r=t.styleSheets,i,e,u,o,f;if(r&&r.length>0){for(e=/:hover/,u="",i=0;i<r.length;++i)o=r[i],f=AVL.UTILITIES.FUNCTIONS.GetStylesheetRules(o),f&&n.each(f,function(t,r){if(e.test(r.selectorText)){var o=r.selectorText.toLowerCase().replace(/:hover/g,""),s=r.style?r.style.cssText:r.cssText,f="tempHoverClass"+i+t;u+="."+f+"{"+lt(s)+"}";n(o).on({mouseenter:function(){n(this).addClass("tempHoverClass "+f)},mouseleave:function(){n(this).removeClass("tempHoverClass "+f)}})}});AVL.UTILITIES.FUNCTIONS.AddCSSToPage(u)}},lt=function(n){return n.replace(/!important/g,"").replace(/;/," !important;")},at=function(n,t){var i=!1;return n!=null&&(n==t||vt(n,t))||(i=!0),i},vt=function(t,i){return n(AVL.UTILITIES.FUNCTIONS.GetElementByXPath(t)).closest(".tempHoverClass").is(n(AVL.UTILITIES.FUNCTIONS.GetElementByXPath(i)).closest(".tempHoverClass"))},yt=function(t){t.length>0&&!n("#virtual-cursor").hasClass("showhand")?n("#virtual-cursor").addClass("showhand"):t.length==0&&n("#virtual-cursor").removeClass("showhand")},pt=function(){n("#virtual-cursor").length==0&&(n("body").append("<div id='virtual-cursor'><\/div>"),n("#virtual-cursor").append("<div id='cursor-highlight'><\/div>"),n("#virtual-cursor").append("<img id='cursor-pointer' src='/commoncontrols/eventrecorder/img/cursor.png''>"),n("#virtual-cursor").append("<img id='cursor-hand' src='/commoncontrols/eventrecorder/img/hand.png''>"))},wt=function(){n("#playback").length==0&&(n("body").append("<div id='playback'><\/div>"),n("#playback").append("<a href='#view' onclick='$(\"#heatmap-canvas\").remove(); console.log(EventPlayer.getRecording()); return false;'>view object<\/a>").append("<a href='#clickmap' id='clickmap' onclick='$(\"#heatmap-canvas\").remove(); EventPlayer.clickHeatmap(); return false;'>click map<\/a>").append("<a href='#movemap' id='movemap' onclick='$(\"#heatmap-canvas\").remove(); EventPlayer.movementHeatmap(); return false;'>move map<\/a>").append("<a href='#play' onclick='$(\"#heatmap-canvas\").remove(); EventPlayer.play(); return false;'>play<\/a>").append("<a href='#pause' onclick='$(\"#heatmap-canvas\").remove(); EventPlayer.pause(); return false;'>pause<\/a>").append("<a href='#stop' onclick='$(\"#heatmap-canvas\").remove(); EventPlayer.stop(); return false;'>stop<\/a>").append("<a href='#replay' onclick='$(\"#heatmap-canvas\").remove(); EventPlayer.replay(); return false;'>replay<\/a>"));n("#playback-progress").length==0&&n("body").append("<div id='playback-progress'><div class='bar'><\/div><div class='spinner'><div class='spinner-icon'><\/div><\/div><\/div>")};return{init:nt,play:y,replay:tt,pause:it,stop:rt,updateSpeed:ft,getRecording:st,clickHeatmap:et,movementHeatmap:ot}}(jQuery,document,window);$(document).ready(function(){typeof ERMV!="undefined"&&ERMV.on&&typeof overrideERMV=="undefined"&&EventRecorder.init(!0,!1,!1)})