text: /*!
   * Webtags v0.4.9-pl, Dashboard for Webtags v1.0.20-pl
   * Webtags GitHub page (source code and links): (https://github.com/earthperson/Webtags)
   * Webtags website: (http://earthperson.github.io/Webtags/)
   * Dashboard for Webtags: (http://earthperson.github.io/Webtags/dashboard/)
   * Author website: (http://earthperson.info)
   *
   * Copyright (c) 2013-2015 Dmitry Ponomarev
   * Licensed under the MIT License: (http://www.opensource.org/licenses/mit-license.php)
   */
  !function(a){"use strict";function b(a){if(a instanceof Object&&a.items){b.prototype.options=a;var d=new c;d.render&&d.render.call(d)}}function c(){var a={items:[],id:"webtags",type:"rounded",width:500,height:350,border:!0,grid:!1,style:{border:"1px solid #5e8cc2"},tag:{},_poweredBy:{x:null,y:null},_url:null};g(a,b.prototype.options);for(var c in a)this[c]=a[c];this._element=document.getElementById(this.id)}function d(a,b,c){var d={width:100,height:32,context:{fillStyle:"#5e8cc2",textBaseline:"top",font:"12px Arial",strokeStyle:"#5e8cc2",lineWidth:2,lineJoin:"round",lineCap:"round",shadowOffsetX:2,shadowOffsetY:2,shadowBlur:2,shadowColor:"rgba(54, 111, 179, 0.4)"}};g(d,c.tag),g(a,d.context),delete d.context;for(var e in d)this[e]=d[e];this._context=a,this._item=b,this._canvas=c,this._text=null}function e(a,b,c){this.prototype=new d(a,b,c),this.prototype.render(),this.render.call(this.prototype),d.prototype.line.width+=Math.floor(this.prototype.edgeWidth()+this.prototype._text.width),d.prototype.count++}function f(a,b,c){this.prototype=new d(a,b,c),this.prototype.render(),this.render.call(this.prototype),d.prototype.line.width+=Math.floor(41+this.prototype._text.width),d.prototype.count++}function g(a,b){for(var c in b)try{a[c]=b[c].constructor==Object?g(a[c],b[c]):b[c]}catch(d){a[c]=b[c]}return a}c.POWERED_BY={LABEL:"Powered by Webtags v0.4.9-pl",URL:"https://github.com/earthperson/Webtags",FONT:"10px Helvetica"},c.prototype.getMousePosition=function(a,b){var c=a.getBoundingClientRect();return{x:b.clientX-c.left,y:b.clientY-c.top}},c.prototype.onMousemove=function(a){var b,e,f=c.prototype.getMousePosition(this,a),g=f.x,h=f.y;document.body.style.cursor=this._url=null;for(b in this.items)if(this.items[b].prototype instanceof d&&(e=this.items[b].prototype._text,g>=parseInt(e.x+e.translating.x)&&g<=parseInt(e.x+e.translating.x)+parseInt(e.width)&&h>=parseInt(e.y+e.translating.y)&&h<=parseInt(e.y+e.translating.y)+parseInt(e.height))){document.body.style.cursor="pointer",this._url=this.items[b].prototype._item.url;break}this.border&&(e=this._poweredBy,g>=e.x&&g<=this.width&&h>=e.y-1&&h<=this.height&&(document.body.style.cursor="pointer",this._url=c.POWERED_BY.URL))},c.prototype.onClick=function(){this._url&&a.open(this._url)},c.prototype.render=function(){if(null!==this._element&&(this._element.width=this.width,this._element.height=this.height,this._element.style.border=this.border?this.style.border:"none",this._element.getContext)){var a=this._element.getContext("2d"),b=0,e=this.items.length;for(a.clearRect(0,0,this.width,this.height),d.prototype.count=0,d.prototype.line={width:0,count:0},this._element.items=this.items,this._element.border=this.border,this._element._poweredBy=this._poweredBy,this._element.addEventListener("mousemove",c.prototype.onMousemove,!1),this._element.addEventListener("click",c.prototype.onClick,!1);e>b;b++)this.items.push(new(d.prototype.factory(this.type))(a,this.items[b],this));a.fillStyle=this.style.border.match(/#\w{3,}$/)||"#5e8cc2",this.border&&(a.font=c.POWERED_BY.FONT,this._poweredBy.x=parseInt(this.width-a.measureText(c.POWERED_BY.LABEL).width),this._poweredBy.y=parseInt(this.height-parseInt(c.POWERED_BY.FONT)),a.fillText(c.POWERED_BY.LABEL,this._poweredBy.x,this._poweredBy.y-1))}},d.prototype.factory=function(a){switch(d.prototype.getType(a)){case"SquareTag":return f;default:return e}},d.prototype.getType=function(a){return a.charAt(0).toUpperCase()+a.substr(1,a.length-1)+"Tag"},d.prototype.getRandomFactor=function(){return 10*Math.random()+1},d.prototype.offsetX=function(){var a=this.width+this.edgeWidth();return parseFloat(this.count%Math.floor(this._canvas.width/a)*a)},d.prototype.offsetY=function(){var a=this.width+this.edgeWidth();return Math.floor(this.count/Math.floor(this._canvas.width/a))*(this.height+8)},d.prototype.translateX=function(){return this.line.width+this._text.width>this._canvas.width-this.edgeWidth()?(this.line.width=0,this.line.count++,0):this.line.width},d.prototype.edgeWidth=function(){switch(d.prototype.getType(this._canvas.type)){case"SquareTag":return 41;default:return 16+this.height+2}},d.prototype.translateY=function(){return(this.height+8)*this.line.count},d.prototype.render=function(){var a,b=this.getRandomFactor();a=Math.floor(this.height/2),this._text={x:34,y:a,translating:{x:0,y:0}},this._text.width=this._context.measureText(this._item.label).width,this._text.height=parseInt(this._context.font),this._context.save(),this._canvas.grid?(this._text.translating.x=this.offsetX(),this._text.translating.y=this.offsetY()):(this._text.translating.x=this.translateX(),this._text.translating.y=this.translateY()),this._context.translate(this._text.translating.x,this._text.translating.y),this._context.beginPath(),this._context.arc(26,4+a,4,0,2*Math.PI),this._context.moveTo(4,18),this._context.bezierCurveTo(2+b,10+b,8,10,10,14),this._context.bezierCurveTo(13,23,16,17,27,4+a),this._context.moveTo(2,26),b=this.getRandomFactor(),this._context.quadraticCurveTo(2+b,18+b,12,22),this._context.quadraticCurveTo(18,28,27,4+a),this._context.stroke(),this._context.fillText(this._item.label,this._text.x,this._text.y-2),this._context.restore()},e.prototype.render=function(){var a=Math.floor(this.height/2);this._context.save(),this._canvas.grid?this._context.translate(this.offsetX(),this.offsetY()):this._context.translate(this.translateX(),this.translateY()),this._context.beginPath(),this._context.arc(16+a,4+a,a,.5*Math.PI,1.5*Math.PI),this._canvas.grid?(this._context.lineTo(16+a+this.width,4),this._context.arc(16+a+this.width,4+a,a,1.5*Math.PI,.5*Math.PI)):(this._context.lineTo(16+a+this._text.width,4),this._context.arc(16+a+this._text.width,4+a,a,1.5*Math.PI,.5*Math.PI)),this._context.closePath(),this._context.stroke(),this._context.restore()},f.prototype.render=function(){this._context.save(),this._canvas.grid?this._context.translate(this.offsetX(),this.offsetY()):this._context.translate(this.translateX(),this.translateY()),this._context.beginPath(),this._context.moveTo(16,4+Math.floor(this.height/2)),this._context.lineTo(23,4),this._canvas.grid?(this._context.lineTo(23+this.width,4),this._context.lineTo(23+this.width,this.height+4)):(this._context.lineTo(39+this._text.width,4),this._context.lineTo(39+this._text.width,this.height+4)),this._context.lineTo(23,this.height+4),this._context.closePath(),this._context.stroke(),this._context.restore()},a.Webtags=b}(window);