PageSourceSearch

https://www.borju.com.br/app-borju/assets/scripts/lib/toastfy.js?1746812558

js borju.com.br collected 2026-10-02 01:18:07 UTC 8,448 bytes, 4 lines download raw bytes

vendor: 8,124 bytes, lines 1-3
1(function(root,factory){if(typeof module==="object"&&module.exports){module.exports=factory();}else{root.Toastify=factory();}})(this,function(global){var Toastify=function(options){return new Toastify.lib.init(options);},version="1.12.0";Toastify.defaults={oldestFirst:true,text:"Toastify is awesome!",node:undefined,duration:3000,selector:undefined,callback:function(){},destination:undefined,newWindow:false,close:false,gravity:"toastify-top",positionLeft:false,position:'',backgroundColor:'',avatar:"",className:"",stopOnFocus:true,onClick:function(){},offset:{x:0,y:0},escapeMarkup:true,ariaLive:'polite',style:{background:''}};Toastify.lib=Toastify.prototype={toastify:version,constructor:Toastify,init:function(options){if(!options){options={};}this.options={};this.toastElement=null;this.options.text=options.text||Toastify.defaults.text;this.options.node=options.node||Toastify.defaults.node;this.options.duration=options.duration===0?0:options.duration||Toastify.defaults.duration;this.options.selector=options.selector||Toastify.defaults.selector;this.options.callback=options.callback||Toastify.defaults.callback;this.options.destination=options.destination||Toastify.defaults.destination;this.options.newWindow=options.newWindow||Toastify.defaults.newWindow;this.options.close=options.close||Toastify.defaults.close;this.options.gravity=options.gravity==="bottom"?"toastify-bottom":Toastify.defaults.gravity;this.options.positionLeft=options.positionLeft||Toastify.defaults.positionLeft;this.options.position=options.position||Toastify.defaults.position;this.options.backgroundColor=options.backgroundColor||Toastify.defaults.backgroundColor;this.options.avatar=options.avatar||Toastify.defaults.avatar;this.options.className=options.className||Toastify.defaults.className;this.options.stopOnFocus=options.stopOnFocus===undefined?Toastify.defaults.stopOnFocus:options.stopOnFocus;this.options.onClick=options.onClick||Toastify.defaults.onClick;this.options.offset=options.offset||Toastify.defaults.offset;this.options.escapeMarkup=options.escapeMarkup!==undefined?options.escapeMarkup:Toastify.defaults.escapeMarkup;this.options.ariaLive=options.ariaLive||Toastify.defaults.ariaLive;this.options.style=options.style||Toastify.defaults.style;if(options.backgroundColor){this.options.style.background=options.backgroundColor;}return this;},buildToast:function(){if(!this.options){throw"Toastify is not initialized";}var divElement=document.createElement("div");divElement.className="toastify on "+this.options.className;if(!!this.options.position){divElement.className+=" toastify-"+this.options.position;}else{if(this.options.positionLeft===true){divElement.className+=" toastify-left";console.warn('Property `positionLeft` will be depreciated in further versions. Please use `position` instead.')}else{divElement.className+=" toastify-right";}}divElement.className+=" "+this.options.gravity;if(this.options.backgroundColor){console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');}for(var property in this.options.style){divElement.style[property]=this.options.style[property];}if(this.options.ariaLive){divElement.setAttribute('aria-live',this.options.ariaLive)}if(this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE){divElement.appendChild(this.options.node)}else{if(this.options.escapeMarkup){divElement.innerText=this.options.text;}else{divElement.innerHTML=this.options.text;}if(this.options.avatar!==""){var avatarElement=document.createElement("img");avatarElement.src=this.options.avatar;avatarElement.className="toastify-avatar";if(this.options.position=="left"||this.options.positionLeft===true){divElement.appendChild(avatarElement);}else{divElement.insertAdjacentElement("afterbegin",avatarElement);}}}if(this.options.close===true){var closeElement=document.createElement("button");closeElement.type="button";closeElement.setAttribute("aria-label","Close");closeElement.className="toast-close";closeElement.innerHTML="✖";closeElement.addEventListener("click",function(event){event.stopPropagation();this.removeElement(this.toastElement);window.clearTimeout(this.toastElement.timeOutValue);}.bind(this));var width=window.innerWidth>0?window.innerWidth:screen.width;if((this.options.position=="left"||this.options.positionLeft===true)&&width>360){divElement.insertAdjacentElement("afterbegin",closeElement);}else{divElement.appendChild(closeElement);}}if(this.options.stopOnFocus&&this.options.duration>0){var self=this;divElement.addEventListener("mouseover",function(event){window.clearTimeout(divElement.timeOutValue);})
2divElement.addEventListener("mouseleave",function(){divElement.timeOutValue=window.setTimeout(function(){self.removeElement(divElement);},self.options.duration)})}if(typeof this.options.destination!=="undefined"){divElement.addEventListener("click",function(event){event.stopPropagation();if(this.options.newWindow===true){window.open(this.options.destination,"_blank");}else{window.location=this.options.destination;}}.bind(this));}if(typeof this.options.onClick==="function"&&typeof this.options.destination==="undefined"){divElement.addEventListener("click",function(event){event.stopPropagation();this.options.onClick();}.bind(this));}if(typeof this.options.offset==="object"){var x=getAxisOffsetAValue("x",this.options);var y=getAxisOffsetAValue("y",this.options);var xOffset=this.options.position=="left"?x:"-"+x;var yOffset=this.options.gravity=="toastify-top"?y:"-"+y;divElement.style.transform="translate("+xOffset+","+yOffset+")";}return divElement;},showToast:function(){this.toastElement=this.buildToast();var rootElement;if(typeof this.options.selector==="string"){rootElement=document.getElementById(this.options.selector);}else if(this.options.selector instanceof HTMLElement||(typeof ShadowRoot!=='undefined'&&this.options.selector instanceof ShadowRoot)){rootElement=this.options.selector;}else{rootElement=document.body;}if(!rootElement){throw"Root element is not defined";}var elementToInsert=Toastify.defaults.oldestFirst?rootElement.firstChild:rootElement.lastChild;rootElement.insertBefore(this.toastElement,elementToInsert);Toastify.reposition();if(this.options.duration>0){this.toastElement.timeOutValue=window.setTimeout(function(){this.removeElement(this.toastElement);}.bind(this),this.options.duration);}return this;},hideToast:function(){if(this.toastElement.timeOutValue){clearTimeout(this.toastElement.timeOutValue);}this.removeElement(this.toastElement);},removeElement:function(toastElement){toastElement.className=toastElement.className.replace(" on","");window.setTimeout(function(){if(this.options.node&&this.options.node.parentNode){this.options.node.parentNode.removeChild(this.options.node);}if(toastElement.parentNode){toastElement.parentNode.removeChild(toastElement);}this.options.callback.call(toastElement);Toastify.reposition();}.bind(this),400);},};Toastify.reposition=function(){var topLeftOffsetSize={top:15,bottom:15,};var topRightOffsetSize={top:15,bottom:15,};var offsetSize={top:15,bottom:15,};var allToasts=document.getElementsByClassName("toastify");var classUsed;for(var i=0;i<allToasts.length;i++){if(containsClass(allToasts[i],"toastify-top")===true){classUsed="toastify-top";}else{classUsed="toastify-bottom";}var height=allToasts[i].offsetHeight;classUsed=classUsed.substr(9,classUsed.length-1)
3var offset=15;var width=window.innerWidth>0?window.innerWidth:screen.width;if(width<=360){allToasts[i].style[classUsed]=offsetSize[classUsed]+"px";offsetSize[classUsed]+=height+offset;}else{if(containsClass(allToasts[i],"toastify-left")===true){allToasts[i].style[classUsed]=topLeftOffsetSize[classUsed]+"px";topLeftOffsetSize[classUsed]+=height+offset;}else{allToasts[i].style[classUsed]=topRightOffsetSize[classUsed]+"px";topRightOffsetSize[classUsed]+=height+offset;}}}return this;};function getAxisOffsetAValue(axis,options){if(options.offset[axis]){if(isNaN(options.offset[axis])){return options.offset[axis];}else{return options.offset[axis]+'px';}}return'0px';}function containsClass(elem,yourClass){if(!elem||typeof yourClass!=="str
3ing"){return false;}else if(elem.className&&elem.className.trim().split(/\s+/gi).indexOf(yourClass)>-1){return true;}else{return false;}}Toastify.lib.init.prototype=Toastify.lib;return Toastify;});
4//# sourceMappingURL=https://www.borju.com.br/app-borju/assets/scripts/lib/toastfy.js,q1746812558.pagespeed.sm.iBDMwqTTOF.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.