b=a.getOffsets(),d=c.getOffsets();return{left:d.left-b.left,top:d.top-b.top}},staticTips:[],showStaticTip:function(c,a,b){var d=c.attr("id"),e=this.staticTips[d]||c,b=b||{};if(e){this.staticTips[d]||(this.staticTips[d]=e);this.hideAllStaticTips();var d=this.getOffsets(a,b.parent),f=a.region(),g=f.bottom-f.top,f=f.right-f.left;"right"===b.position?e.setStyle({left:d.left+f+(b.offsetLeft||0)+"px",top:d.top+parseInt(g/2,10)+(b.offsetTop||0)+"px"}):"bottom"===b.position?e.setStyle({left:d.left+parseInt(f/
2,10)+(b.offsetLeft||0)+"px",top:d.top+g+b.offsetTop+(b.offsetTop||0)+"px"}):e.setStyle({left:d.left+"px",top:d.top+"px"});e.attr("isbindevent")||(d=e.query(".j-apop-close"),d.length&&(E.on(d[0],"click",function(a){a.stopEvent();e.addClass("fn-hide")}),e.attr("isbindevent",!0)));e.removeClass("fn-hide");this.hasTipShow=!0;E.publish("cashier/common/showStaticTip",[c,a,b])}},hasTipShow:!1,staticTips:{},hideAllStaticTips:function(){for(var c in this.staticTips)this.staticTips[c]&&(this.staticTips[c].addClass("fn-hide"),
E.publish("cashier/common/hideStaticTip",[this.staticTips[c]]));Cashier.Module.hasTipShow=!1},clickHideTip:function(c){E.subscribe("common/click/body",window,function(a){if(Cashier.Module.hasTipShow){for(var b=$(a.target),d=d||20,a=!1;d--&&b;){for(var e=b.attr("className"),f=0,g;g=c[f];f++)if(~e.indexOf(g)){a=!0;break}if(a)break;b=b.parent()}a||(Cashier.Module.hideAllStaticTips(),$E.publish("common/hideAllTip",[]))}})},init:function()}}(window);
Cashier.Module.Cookie={set:function(c,a,b){c=this._createCookieString(c,a,!0,b);return document.cookie=c},get:function(c){var a=this._parseCookieString(document.cookie);try{return a[c]}catch(b){return null}},_parseCookieString:function(c,a){var b={};if(arale.isString(c)&&0<c.length){var d=!1===a?function(a){return a}:decodeURIComponent;if(/[^=]+=[^=;]?(?:; [^=]+=[^=]?)?/.test(c))for(var e=c.split(/;\s/g),f=null,g=null,h=null,i=0,j=e.length;i<j;i++){h=e[i].match(/([^=]+)=/i);if(h instanceof Array)try{f=
decodeURIComponent(h[1]),g=d(e[i].substring(h[1].length+1))}catch(k){}else g=f=decodeURIComponent(e[i]);b[f]=g}}return b},_createCookieString:function(c,a,b,d){c=encodeURIComponent(c)+"="+(b?encodeURIComponent(a):a);arale.isObject(d)&&(d.expires instanceof Date&&(c+="; expires="+d.expires.toGMTString()),arale.isString(d.path)&&""!==d.path&&(c+="; path="+d.path),arale.isString(d.domain)&&""!==d.domain&&(c+="; domain="+d.domain),!0===d.secure&&(c+="; secure"));return c}};