text: (function(context){
      context.proxy = false;
      context.url = function(k) {
          var h = context.consts.host;
          if (context.proxy && k != "ns") {
              h = window.location.protocol + "//" + window.location.host + "/ccid";
          }
  
          return (k == "host"? "": h) + context.consts[k];
      };
      context.consts.iframeID = "ccid_iframe";
      context.consts.providers = /^(facebook|gplus|twitter)$/;
  
  var requirejs,require,define;!function(e){function n(e,n){return y.call(e,n)}function r(e,n){var r,i,t,o,u,f,l,c,s,p,a,d=n&&n.split("/"),g=h.map,m=g&&g["*"]||{};if(e&&"."===e.charAt(0))if(n){for(e=e.split("/"),u=e.length-1,h.nodeIdCompat&&v.test(e[u])&&(e[u]=e[u].replace(v,"")),e=d.slice(0,d.length-1).concat(e),s=0;s<e.length;s+=1)if(a=e[s],"."===a)e.splice(s,1),s-=1;else if(".."===a){if(1===s&&(".."===e[2]||".."===e[0]))break;s>0&&(e.splice(s-1,2),s-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((d||m)&&g){for(r=e.split("/"),s=r.length;s>0;s-=1){if(i=r.slice(0,s).join("/"),d)for(p=d.length;p>0;p-=1)if(t=g[d.slice(0,p).join("/")],t&&(t=t[i])){o=t,f=s;break}if(o)break;!l&&m&&m[i]&&(l=m[i],c=s)}!o&&l&&(o=l,f=c),o&&(r.splice(0,f,o),e=r.join("/"))}return e}function i(n,r){return function(){var i=j.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),s.apply(e,i.concat([n,r]))}}function t(e){return function(n){return r(n,e)}}function o(e){return function(n){d[e]=n}}function u(r){if(n(g,r)){var i=g[r];delete g[r],m[r]=!0,c.apply(e,i)}if(!n(d,r)&&!n(m,r))throw new Error("No "+r);return d[r]}function f(e){var n,r=e?e.indexOf("!"):-1;return r>-1&&(n=e.substring(0,r),e=e.substring(r+1,e.length)),[n,e]}function l(e){return function(){return h&&h.config&&h.config[e]||{}}}var c,s,p,a,d={},g={},h={},m={},y=Object.prototype.hasOwnProperty,j=[].slice,v=/\.js$/;p=function(e,n){var i,o=f(e),l=o[0];return e=o[1],l&&(l=r(l,n),i=u(l)),l?e=i&&i.normalize?i.normalize(e,t(n)):r(e,n):(e=r(e,n),o=f(e),l=o[0],e=o[1],l&&(i=u(l))),{f:l?l+"!"+e:e,n:e,pr:l,p:i}},a={require:function(e){return i(e)},exports:function(e){var n=d[e];return"undefined"!=typeof n?n:d[e]={}},module:function(e){return{id:e,uri:"",exports:d[e],config:l(e)}}},c=function(r,t,f,l){var c,s,h,y,j,v,x=[],b=typeof f;if(l=l||r,"undefined"===b||"function"===b){for(t=!t.length&&f.length?["require","exports","module"]:t,j=0;j<t.length;j+=1)if(y=p(t[j],l),s=y.f,"require"===s)x[j]=a.require(r);else if("exports"===s)x[j]=a.exports(r),v=!0;else if("module"===s)c=x[j]=a.module(r);else if(n(d,s)||n(g,s)||n(m,s))x[j]=u(s);else{if(!y.p)throw new Error(r+" missing "+s);y.p.load(y.n,i(l,!0),o(s),{}),x[j]=d[s]}h=f?f.apply(d[r],x):void 0,r&&(c&&c.exports!==e&&c.exports!==d[r]?d[r]=c.exports:h===e&&v||(d[r]=h))}else r&&(d[r]=f)},requirejs=require=s=function(n,r,i,t,o){if("string"==typeof n)return a[n]?a[n](r):u(p(n,r).f);if(!n.splice){if(h=n,h.deps&&s(h.deps,h.callback),!r)return;r.splice?(n=r,r=i,i=null):n=e}return r=r||function(){},"function"==typeof i&&(i=t,t=o),t?c(e,n,r,i):setTimeout(function(){c(e,n,r,i)},4),s},s.config=function(e){return s(e)},requirejs._defined=d,define=function(e,r,i){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");r.splice||(i=r,r=[]),n(d,e)||n(g,e)||(g[e]=[e,r,i])},define.amd={jQuery:!0}}();
  define("templates",["exports"],function(t){"use strict";function e(){return'<iframe id="'+context.consts.iframeID+'" name="'+context.consts.iframeID+'" src="javascript:void(0)" style="border:0;height:0;width:0;position:absolute"></iframe>'}function n(t){var e=t.action,n=t.type,i=t.email,l=t.password;return'<form action="'+e+'" method=POST target="'+context.consts.iframeID+'">\n        <input type="hidden" name="type" value="'+n+'" />\n        <input type="hidden" name="email" value="'+i+'" />\n        <input type="hidden" name="password" value="'+l+'" />\n        <input type="hidden" name="channel" value="'+context.uuid+'" />\n    </form>\n    '}function i(){return'<div class="ccid_modal ccid_login on">\n        <span class="ccid_logo">'+"Cifra Club ID"+'</span>\n        <form id="ccid_form" class="ccid_form" action="'+context.consts.iframeID+'">\n            <input type="text" name="email" placeholder="'+"Email"+'">\n            <input type="password" name="password" placeholder="'+"Senha"+'">\n            <span class="js-ccid-error"></span>\n            <button class="ccid_form_sub" type="submit">'+"Entrar"+'</button>\n            <div class="ccid_form_esq">\n                <a target="_blank" href="'+context.url("forgotPassword/index.html")+'">'+"Esqueci minha senha"+'</a> | <a target="_blank" href="'+context.url("signup/index.html")+'">'+"Cadastre-se"+'</a>\n            </div>\n        </form>\n        <div class="ccid_login_social _ccid_social">\n            <i class="ccid_login_f" data-provider="facebook">'+"Entrar com seu facebook"+'</i>\n            <i class="ccid_login_g" data-provider="gplus">Google</i>\n            <i class="ccid_login_t" data-provider="twitter">Twitter</i>\n        </div>'}function l(t){var e="";return e=0==(0|t.meta.verified)&&t.email?"<p><b>"+"Olá"+" "+t.name+".</b>\n            "+"Para continuar você precisa finalizar o cadastro."+"</p>\n            <div>\n                <span>"+"Verifique seu e-mail"+" <strong>"+t.email+"</strong> "+"para confirmar o endereço."+'</span>\n                <b class="ccid_password_hr"><b>&nbsp;</b></b>\n                <a class="ccid_password_log" href="#confirmar_email">Reenviar e-mail de confirmação</a></div>':"<p><b>"+"Olá"+" "+t.name+".</b> "+"Para continuar você precisa definir uma senha para o seu Cifra Club ID."+'</p>\n        <div class="_cnt_bts">\n            <a class="ccid_password_def" href="#definir_email_e_senha">'+(t.email?"Definir uma senha":"Definir um email e uma senha")+'</a>\n            <b class="ccid_password_hr"><b>'+"ou"+'</b></b>\n            <a class="ccid_password_log" href="#sincronizar">'+"Já tenho uma conta com senha"+'</a>\n        </div>\n        <form class="ccid_form ccid_form_def _cnt_mail" style="display:none" name="form_'+(t.email?"password":"email")+'" action="" onSubmit="return false;">'+(t.email?'<b class="ccid_password_hr"><b>'+"Definir uma senha"+"</b></b>":'<b class="ccid_password_hr"><b>'+"Definir um email e uma senha"+'</b></b>\n            <input class="_ccid_email" type="email" placeholder="'+"Email"+'">')+('<input class="_ccid_password" type="password" placeholder="'+"Senha"+'">\n            <div class="ccid_password_strength _ccid_forca_senha" style="display:none">\n                <b>'+"Nível de senha"+':</b> <i class="_ccid_forca_titulo"></i>\n                <p>'+"Use pelo menos 8 caracteres."+"<br> "+"Não use uma senha muito óbvia, como sua data de nascimento."+'</p>\n            </div>\n            <input type="password" placeholder="'+"Repetir senha"+'">\n            <button class="ccid_form_sub" type="submit">'+"Definir senha"+'</button>\n            <i class="ccid_form_esq"><a href="#" class="_back">'+"Cancelar"+'</a></i>\n        </form>\n        <form class="ccid_form _cnt_pass" style="display:none" method="POST" action="/xhr/sync/" name="form_sync" onSubmit="return false;">\n            <b class="ccid_password_hr"><b>'+"Entrar com meu Cifra Club ID"+'</b></b>\n            <input class="_ccid_email" type="email" placeholder="'+"Email"+'">\n            <input class="_ccid_password" type="password" placeholder="'+"Senha"+'">\n            <button class="ccid_form_sub" type="submit">'+"Entrar"+'</button>\n            <i class="ccid_form_esq">\n                <a href="#" class="_back">'+"Cancelar"+'</a> |\n                <a href="'+context.url("host/index.html")+'/esqueci-senha/" target="_blank">'+"Esqueci minha senha"+"</a>\n            </i>\n        </form>"),'<div class="ccid_client"><div class="ccid_modal ccid_password on">\n        <span class="ccid_logo">'+"Cifra Club ID"+'</span>\n        <i class="ccid_x _ccid_close" title="'+"fechar"+'">×</i>\n        <img src="'+t.avatar(75)+'" alt="" />'+e+'</div><i class="ccid_overlay"></i></div>'}t.__esModule=!0,t.externalIframe=e,t.hiddenLoginForm=n,t.loginPopUp=i,t.syncPopUp=l}),define("cookies",["exports"],function(t){"use strict";function e(t){return t?decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null:null}function n(t,e,n,i,l,o){if(!t||/^(?:expires|max\-age|path|domain|secure)$/i.test(t))return!1;var s="";if(n)switch(n.constructor){case Number:s=n===1/0?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+n;break;case String:s="; expires="+n;break;case Date:s="; expires="+n.toUTCString()}return document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)+s+(l?"; domain="+l:"")+(i?"; path="+i:"")+(o?"; secure":""),!0}function i(t,e,n){return this.has(t)?(document.cookie=encodeURIComponent(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain="+n:"")+(e?"; path="+e:""),!0):!1}function l(t){return t?new RegExp("(?:^|;\\s*)"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie):!1}function o(){for(var t=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),e=t.length,n=0;e>n;n++)t[n]=decodeURIComponent(t[n]);return t}t.__esModule=!0,t.get=e,t.set=n,t.remove=i,t.has=l,t.keys=o}),define("websocket",["exports"],function(t){"use strict";function e(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){var e=t.url,n=t.channel,i=t.since;return p[n]&&p[n].status!=s||(p[n]&&p[n].destroy(),l?p[n]=new c({url:e.replace(/^http/,"ws")+"socket/",channel:n,since:i}):p[n]=new d({url:e+"polling/",channel:n,since:i})),p[n]}t.__esModule=!0,t.getChannel=i;var l=!!("WebSocket"in window),o=-1,s=0,r=1,a=function(){function t(){n(this,t),this.callbacks=null}return t.prototype.set=function(t){this.callback=t},t.prototype.fireWith=function(t,e){this.callback&&this.callback.apply(t,e)},t.prototype.empty=function(){this.callback=null},t}(),u=function(){function t(e){var i=e.url,l=e.channel,s=e.since;n(this,t),this._retries=[3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,3181,5765],this._try=0,this._timeout=null,this._config={url:i,channel:l,since:s},this._on={message:new a,close:new a},this.status=o}return t.prototype.on=function(t,e){if(!this._on[t])throw"on."+t+" não disponivel";return this._on[t].set(e),this},t.prototype._url=function(){var t=this._config.url.split("?")[0],e=(this._config.url.split("?")[1]||"").split("&");e[0].length||e.shift(),this._config.since&&e.push("time="+this._config.since.toGMTString()),this._config.channel&&e.push("channel="+encodeURIComponent(this._config.channel));var n=e?"?":"";return t+n+e.join("&")},t.prototype.connect=function(){return this},t.prototype.close=function(){return this},t.prototype._retry=function(t){var e=this;return this.status=o,null===this._timeout&&(this._timeout=setTimeout(function(){++e._try<e._retries.length?e.connect():e._on.close.fireWith(e,[t]),e._timeout=null},250*this._retries[this._try]+100*this._retries[this._try]*Math.random())),this},t.prototype.destroy=function(){for(var t in this._on)this._on[t].empty();return this},t}(),c=function(t){function i(){n(this,i),t.apply(this,arguments)}return e(i,t),i.prototype.connect=function(){var t=this;return this.status==r?this:(this._error=!1,this._close=!1,this._socket=new WebSocket(this._url()),this._socket.onmessage=function(e){var n=JSON.parse(e.data);t._config.since=new Date(n.time),t._on.message.fireWith(t,[JSON.parse(n.data)])},this._socket.onopen=function(e){t.status=r,t._try=0},this._socket.onerror=function(e){t._error=!0,t._retry(e)},this._socket.onclose=function(e){t._close||t._error?(t.status=s,t._on.close.fireWith(t,[e])):t._retry(e)},this)},i.prototype.close=function(t){if(!this._socket)throw"alread closed";return this._close=!0,this._socket.close(),this},i}(u),d=function(t){function i(){n(this,i),t.apply(this,arguments)}return e(i,t),i.prototype.connect=function(){var t=this;return this.status==r?this:(this._config.since=this._config.since||new Date($.now()-2e3),this._checkTimeout=null,this._request=$.ajax({url:this._url(),dataType:"jsonp",beforeSend:function(){t.status=r,clearTimeout(t._checkTimeout),t._checkTimeout=setTimeout(function(){t._request.abort(),t._retry("dead")},31e3)},success:function(e,n,i){clearTimeout(t._checkTimeout),t._try=0,t._request=null,t.status=o;for(var l=0;l<e.length;l++)"Timed out"!=e[l].data&&(t._config.since=new Date(e[l].time),t._on.message.fireWith(t,[JSON.parse(e[l].data)]));t.connect()},error:function(e,n,i){clearTimeout(t._checkTimeout),t._request=null,t.status=o,"abort"==n?(t.status=s,t._on.close.fireWith(t,[i])):t._retry(i)}}),this)},i.prototype.close=function(){return this.lastRequestID=null,this._request&&(this.status=s,this._request.abort()),null},i}(u),p={}}),define("auth",["exports","templates","cookies","websocket"],function(t,e,n,i){"use strict";function l(t){var e=t.provider,n=t.perms,i=void 0===n?null:n,l=t.flow,o=void 0===l?null:l;s();var r=[],a={twitter:[570,605],facebook:[500,479],gplus:[650,479]},u={toolbar:"yes",location:"no",status:"yes",resizable:"yes",width:a[e][0],height:a[e][1]},c=function(t){var e=t.protocol,n=t.hostname,i=t.port;return e+"//"+n+(i?":"+i:"")}(window.location),d=context.url("host/index.html")+"/auth/"+e+"?referer="+c+"&channel="+context.uuid;i&&i.split(",")[0]&&(d+="&perms="+i);for(var p in u)u.hasOwnProperty(p)&&r.push(p+"="+u[p]);"socialFriends"==o&&(d+="&flow="+o),window.open(d,"Login",r.join(","))}function o(t){f=t}function s(){p=i.getChannel({url:context.url("ns/index.html"),channel:context.uuid,since:new Date}).on("message",function(t){c(t.data)}).on("close",function(){p.destroy(),p=null}).connect()}function r(t){s(),t.action=context.url("login/index.html"),$(e.hiddenLoginForm(t)).appendTo("body").submit().remove()}function a(t,n){var l=t.type,o=t.email,s=t.password;i.getChannel({url:context.url("ns/index.html"),channel:context.uuid,since:new Date}).on("message",function(t){t.data.Error||(this.close(),n[0](),f(t.data,null)),n[1](t.data)}).on("close",function(t){this.destroy()}).connect(),$(e.hiddenLoginForm({action:context.url("api/index.html")+"request/update/",type:l,email:o,password:s})).appendTo("body").submit().remove()}function u(t){"function"==typeof f&&f(null,t)}function c(t){var e=null;if(null===t.Error)p&&p.close(),f(t,e);else{switch(e={code:t.Error.Code},t.Error.Code){case"s01":e.msg="Login indisponível. Este e-mail já esta sendo utilizado por outra conta social.";break;case"u01":e.msg="E-mail ou senha incorreto.";break;case"u02":e.msg="Usuário suspenso.";break;case"oa01":e.msg="Token expirou!, tente novamente!";break;default:e.msg="Login indisponível no momento, tente novamente mais tarde!"}f(t,e)}}function d(t){var e=n.get("always");null===e?$.ajax({url:context.url("api/index.html")+"check/cookies/",dataType:"JSONP",success:function(i){var l=JSON.parse(i);e="true"==l.always,n.set("always",e?"true":"false",2592e3,"/"),t(e)}}):t("true"==e)}t.__esModule=!0,t.authSocial=l,t.setOnLogin=o,t.auth=r,t.updateAccount=a,t.raiseErr=u,t.supportIframeCookies=d;var p=null,f=null}),define("3rd/zxcvbn",[],function(){return function(){var t,e,n,i,l,o,s,r,a,u,c,d,p,f,h,m,g,_,y,v,b;c=function(t){var e,n;n=[];for(e in t)n.push(e);return 0===n.length},p=function(t,e){return t.push.apply(t,e)},v=function(t,e){var n,i,l,o,s;for(o=t.split(""),s=[],i=0,l=o.length;l>i;i++)n=o[i],s.push(e[n]||n);return s.join("")},m=function(t,e){var n,i,l,o;for(o=[],n=0,i=e.length;i>n;n++)l=e[n],p(o,l(t));return o.sort(function(t,e){return t.i-e.i||t.j-e.j})},a=function(t,e){var n,i,l,o,s,r,a,u,c,d,p;for(d=[],o=t.length,r=t.toLowerCase(),n=l=0;o>=0?o>l:l>o;n=o>=0?++l:--l)for(i=s=u=n,c=o;c>=u?c>s:s>c;i=c>=u?++s:--s)r.slice(n,+i+1||9e9)in e&&(p=r.slice(n,+i+1||9e9),a=e[p],d.push({pattern:"dictionary",i:n,j:i,token:t.slice(n,+i+1||9e9),matched_word:p,rank:a}));return d},n=function(t){var e,n,i,l,o;for(l={},e=1,n=0,i=t.length;i>n;n++)o=t[n],l[o]=e,e+=1;return l},e=function(t,e){return function(n){var i,l,o;for(o=a(n,e),n=0,i=o.length;i>n;n++)l=o[n],l.dictionary_name=t;return o}},h={a:["4","@"],b:["8"],c:["(","{","[","<"],e:["3"],g:["6","9"],i:["1","!","|"],l:["1","|","7"],o:["0"],s:["$","5"],t:["+","7"],x:["%"],z:["2"]},g=function(t){var e,n,i,l,o;for(l={},o=t.split(""),e=0,n=o.length;n>e;e++)t=o[e],l[t]=!0;t={};for(i in h){n=h[i];var s=o=void 0,r=void 0,r=[],s=0;for(o=n.length;o>s;s++)e=n[s],e in l&&r.push(e);e=r,0<e.length&&(t[i]=e)}return t},d=function(t){var e,n,i,l,o,s,r,a,u,c,d,p,f;o=function(){var e;e=[];for(l in t)e.push(l);return e}(),f=[[]],n=function(t){var e,n,i,o,s,r,a,u;for(n=[],r={},i=0,s=t.length;s>i;i++)a=t[i],e=function(){var t,e,n;for(n=[],u=e=0,t=a.length;t>e;u=++e)l=a[u],n.push([l,u]);return n}(),e.sort(),o=function(){var t,n,i;for(i=[],u=n=0,t=e.length;t>n;u=++n)l=e[u],i.push(l+","+u);return i}().join("-"),o in r||(r[o]=!0,n.push(a));return n},i=function(e){var l,o,s,r,a,u,c,d,p,h,m,g,_;if(e.length){for(o=e[0],g=e.slice(1),d=[],h=t[o],e=0,a=h.length;a>e;e++)for(r=h[e],c=0,u=f.length;u>c;c++){for(_=f[c],l=-1,s=p=0,m=_.length;m>=0?m>p:p>m;s=m>=0?++p:--p)if(_[s][0]===r){l=s;break}-1===l?(l=_.concat([[r,o]]),d.push(l)):(s=_.slice(0),s.splice(l,1),s.push([r,o]),d.push(_),d.push(s))}return f=n(d),i(g)}},i(o),p=[],o=0;for(r=f.length;r>o;o++){for(c=f[o],d={},u=0,a=c.length;a>u;u++)e=c[u],s=e[0],e=e[1],d[s]=e;p.push(d)}return p},y=function(t,e,n){var i,l,o,s,r,a,u,c,d,p,f,h,m;for(f=[],a=0;a<t.length-1;)for(u=a+1,d=null,h=m=0;;){if(i=t.charAt(u-1),r=!1,s=-1,l=e[i]||[],u<t.length)for(o=t.charAt(u),c=0,p=l.length;p>c;c++)if(i=l[c],s+=1,i&&-1!==i.indexOf(o)){r=!0,1===i.indexOf(o)&&(h+=1),d!==s&&(m+=1,d=s);break}if(!r){u-a>2&&f.push({pattern:"spatial",i:a,j:u-1,token:t.slice(a,u),graph:n,turns:m,shifted_count:h}),a=u;break}u+=1}return f},t={lower:"abcdefghijklmnopqrstuvwxyz",upper:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",digits:"01234567890"},_=function(t,e){var n,i;for(i=[],n=1;e>=1?e>=n:n>=e;e>=1?++n:--n)i.push(t);return i.join("")},f=function(t,e){var n,i;for(i=[];n=t.match(e),n;)n.i=n.index,n.j=n.index+n[0].length-1,i.push(n),t=t.replace(n[0],_(" ",n[0].length));return i},u=/\d{3,}/,b=/19\d\d|200\d|201\d/,r=function(t){var e,n,l,o,s,r,a,u,c,d,p,h,m,g;for(o=[],m=f(t,/\d{4,8}/),u=0,c=m.length;c>u;u++){for(r=m[u],a=[r.i,r.j],r=a[0],a=a[1],l=t.slice(r,+a+1||9e9),e=l.length,n=[],6>=l.length&&(n.push({daymonth:l.slice(2),year:l.slice(0,2),i:r,j:a}),n.push({daymonth:l.slice(0,e-2),year:l.slice(e-2),i:r,j:a})),6<=l.length&&(n.push({daymonth:l.slice(4),year:l.slice(0,4),i:r,j:a}),n.push({daymonth:l.slice(0,e-4),year:l.slice(e-4),i:r,j:a})),l=[],p=0,d=n.length;d>p;p++)switch(e=n[p],e.daymonth.length){case 2:l.push({day:e.daymonth[0],month:e.daymonth[1],year:e.year,i:e.i,j:e.j});break;case 3:l.push({day:e.daymonth.slice(0,2),month:e.daymonth[2],year:e.year,i:e.i,j:e.j}),l.push({day:e.daymonth[0],month:e.daymonth.slice(1,3),year:e.year,i:e.i,j:e.j});break;case 4:l.push({day:e.daymonth.slice(0,2),month:e.daymonth.slice(2,4),year:e.year,i:e.i,j:e.j})}for(d=0,n=l.length;n>d;d++)e=l[d],s=parseInt(e.day),h=parseInt(e.month),g=parseInt(e.year),s=i(s,h,g),p=s[0],g=s[1],s=g[0],h=g[1],g=g[2],p&&o.push({pattern:"date",i:e.i,j:e.j,token:t.slice(r,+a+1||9e9),separator:"",day:s,month:h,year:g})}return o},o=/(\d{1,2})(\s|-|\/|\\|_|\.)(\d{1,2})\2(19\d{2}|200\d|201\d|\d{2})/,l=/(19\d{2}|200\d|201\d|\d{2})(\s|-|\/|\\|_|\.)(\d{1,2})\2(\d{1,2})/,s=function(t){var e,n,s,r,a,u,c,d,p,h;for(u=[],d=f(t,o),s=0,r=d.length;r>s;s++)a=d[s],p=function(){var t,e,i,l;for(i=[1,3,4],l=[],e=0,t=i.length;t>e;e++)n=i[e],l.push(parseInt(a[n]));return l}(),a.day=p[0],a.month=p[1],a.year=p[2],a.sep=a[2],u.push(a);for(d=f(t,l),r=0,s=d.length;s>r;r++)a=d[r],p=function(){var t,e,i,l;for(i=[4,3,1],l=[],e=0,t=i.length;t>e;e++)n=i[e],l.push(parseInt(a[n]));return l}(),a.day=p[0],a.month=p[1],a.year=p[2],a.sep=a[2],u.push(a);for(d=[],r=0,s=u.length;s>r;r++)a=u[r],e=i(a.day,a.month,a.year),p=e[0],h=e[1],e=h[0],c=h[1],h=h[2],p&&d.push({pattern:"date",i:a.i,j:a.j,token:t.slice(a.i,+a.j+1||9e9),separator:a.sep,day:e,month:c,year:h});return d},i=function(t,e,n){return e>=12&&31>=e&&12>=t&&(e=[e,t],t=e[0],e=e[1]),t>31||e>12||!(n>=1900&&2019>=n)?[!1,[]]:[!0,[t,e,n]]};var k,x,w,C,j,T,I,$,N,F,O,D,E,S,q,L,M,P,U,A,R,z;M=function(t,e){var n,i,l;if(e>t)return 0;if(0===e)return 1;for(n=i=l=1;e>=1?e>=i:i>=e;n=e>=1?++i:--i)l*=t,l/=n,t-=1;return l},q=function(t){return Math.log(t)/Math.log(2)},L=function(t,e){var n,i,l,o,s,r,a,u,c,d,p;for(i=j(t),p=[],n=[],o=r=0,d=t.length;d>=0?d>r:r>d;o=d>=0?++r:--r)for(p[o]=(p[o-1]||0)+q(i),n[o]=null,u=0,a=e.length;a>u;u++)c=e[u],c.j===o&&(s=[c.i,c.j],l=s[0],s=s[1],l=(p[l-1]||0)+T(c),l<p[s]&&(p[s]=l,n[s]=c));for(r=[],o=t.length-1;o>=0;)(c=n[o])?(r.push(c),o=c.i-1):o-=1;for(r.reverse(),a=function(e,n){return{pattern:"bruteforce",i:e,j:n,token:t.slice(e,+n+1||9e9),entropy:q(Math.pow(i,n-e+1)),cardinality:i}},o=0,u=[],d=0,n=r.length;n>d;d++)c=r[d],s=[c.i,c.j],l=s[0],s=s[1],l-o>0&&u.push(a(o,l-1)),o=s+1,u.push(c);return o<t.length&&u.push(a(o,t.length-1)),r=u,c=p[t.length-1]||0,o=D(c),{password:t,entropy:U(c,3),match_sequence:r,crack_time:U(o,3),crack_time_display:O(o),score:I(o)}},U=function(t,e){return Math.round(t*Math.pow(10,e))/Math.pow(10,e)},D=function(t){return 5e-5*Math.pow(2,t)},I=function(t){return t<Math.pow(10,2)?0:t<Math.pow(10,4)?1:t<Math.pow(10,6)?2:t<Math.pow(10,8)?3:4},T=function(t){var e;return null!=t.entropy?t.entropy:(e=function(){switch(t.pattern){case"repeat":return P;case"sequence":return A;case"digits":return F;case"year":return z;case"date":return $;case"spatial":return R;case"dictionary":return N}}(),t.entropy=e(t))},P=function(t){var e;return e=j(t.token),q(e*t.token.length)},A=function(t){var e;return e=t.token.charAt(0),e="a"===e||"1"===e?1:e.match(/\d/)?q(10):e.match(/[a-z]/)?q(26):q(26)+1,t.ascending||(e+=1),e+q(t.token.length)},F=function(t){return q(Math.pow(10,t.token.length))},z=function(){return q(119)},$=function(t){var e;return e=q(100>t.year?37200:44268),t.separator&&(e+=2),e},R=function(t){var e,n,i,l,o,s,r,a,u,c;for("qwerty"===(i=t.graph)||"dvorak"===i?(u=H,n=W):(u=V,n=Y),r=0,e=t.token.length,c=t.turns,i=o=2;e>=2?e>=o:o>=e;i=e>=2?++o:--o)for(a=Math.min(c,i-1),l=s=1;a>=1?a>=s:s>=a;l=a>=1?++s:--s)r+=M(i-1,l-1)*u*Math.pow(n,l);if(n=q(r),t.shifted_count){for(e=t.shifted_count,t=t.token.length-t.shifted_count,i=l=r=0,o=Math.min(e,t);o>=0?o>=l:l>=o;i=o>=0?++l:--l)r+=M(e+t,i);n+=q(r)}return n},N=function(t){return t.base_entropy=q(t.rank),t.uppercase_entropy=S(t),t.l33t_entropy=E(t),t.base_entropy+t.uppercase_entropy+t.l33t_entropy},C=/^[A-Z][^A-Z]+$/,w=/^[^A-Z]+[A-Z]$/,x=/^[^a-z]+$/,k=/^[^A-Z]+$/,S=function(t){var e,n,i,l,o,s,r;if(r=t.token,r.match(k))return 0;for(i=[C,w,x],t=0,e=i.length;e>t;t++)if(l=i[t],r.match(l))return 1;for(e=function(){var t,e,i,l;for(i=r.split(""),l=[],e=0,t=i.length;t>e;e++)n=i[e],n.match(/[A-Z]/)&&l.push(n);return l}().length,t=function(){var t,e,i,l;for(i=r.split(""),l=[],e=0,t=i.length;t>e;e++)n=i[e],n.match(/[a-z]/)&&l.push(n);return l}().length,i=l=o=0,s=Math.min(e,t);s>=0?s>=l:l>=s;i=s>=0?++l:--l)o+=M(e+t,i);return q(o)},E=function(t){var e,n,i,l,o,s,r,a,u,c;if(!t.l33t)return 0;s=0,r=t.sub;for(u in r)for(c=r[u],e=function(){var e,n,l,o;for(l=t.token.split(""),o=[],e=0,n=l.length;n>e;e++)i=l[e],i===u&&o.push(i);return o}().length,n=function(){var e,n,l,o;for(l=t.token.split(""),o=[],e=0,n=l.length;n>e;e++)i=l[e],i===c&&o.push(i);return o}().length,l=o=0,a=Math.min(n,e);a>=0?a>=o:o>=a;l=a>=0?++o:--o)s+=M(n+e,l);return q(s)||1},j=function(t){var e,n,i,l,o,s,r,a;for(o=[!1,!1,!1,!1,!1],l=o[0],a=o[1],n=o[2],r=o[3],o=o[4],s=t.split(""),t=0,i=s.length;i>t;t++)e=s[t],e=e.charCodeAt(0),e>=48&&57>=e?n=!0:e>=65&&90>=e?a=!0:e>=97&&122>=e?l=!0:127>=e?r=!0:o=!0;return t=0,n&&(t+=10),a&&(t+=26),l&&(t+=26),r&&(t+=33),o&&(t+=100),t},O=function(t){return 60>t?"instant":3600>t?1+Math.ceil(t/60)+" minutes":86400>t?1+Math.ceil(t/3600)+" hours":2678400>t?1+Math.ceil(t/86400)+" days":32140800>t?1+Math.ceil(t/2678400)+" months":321408e4>t?1+Math.ceil(t/32140800)+" years":"centuries"};var J,G,W,H,Y,V,K,Q,Z,B,X={"!":["`~",null,null,"2@","qQ",null],'"':[";:","[{","]}",null,null,"/?"],"#":["2@",null,null,"4$","eE","wW"],$:["3#",null,null,"5%","rR","eE"],"%":["4$",null,null,"6^","tT","rR"],"&":["6^",null,null,"8*","uU","yY"],"'":[";:","[{","]}",null,null,"/?"],"(":["8*",null,null,"0)","oO","iI"],")":["9(",null,null,"-_","pP","oO"],"*":["7&",null,null,"9(","iI","uU"],"+":["-_",null,null,null,"]}","[{"],",":["mM","kK","lL",".>",null,null],"-":["0)",null,null,"=+","[{","pP"],".":[",<","lL",";:","/?",null,null],"/":[".>",";:","'\"",null,null,null],0:["9(",null,null,"-_","pP","oO"],1:["`~",null,null,"2@","qQ",null],2:["1!",null,null,"3#","wW","qQ"],3:["2@",null,null,"4$","eE","wW"],4:["3#",null,null,"5%","rR","eE"],5:["4$",null,null,"6^","tT","rR"],6:["5%",null,null,"7&","yY","tT"],7:["6^",null,null,"8*","uU","yY"],8:["7&",null,null,"9(","iI","uU"],9:["8*",null,null,"0)","oO","iI"],":":"lL,pP,[{,'\",/?,.>".split(","),";":"lL,pP,[{,'\",/?,.>".split(","),"<":["mM","kK","lL",".>",null,null],"=":["-_",null,null,null,"]}","[{"],">":[",<","lL",";:","/?",null,null],"?":[".>",";:","'\"",null,null,null],"@":["1!",null,null,"3#","wW","qQ"],A:[null,"qQ","wW","sS","zZ",null],B:["vV","gG","hH","nN",null,null],C:["xX","dD","fF","vV",null,null],D:"sS,eE,rR,fF,cC,xX".split(","),E:"wW,3#,4$,rR,dD,sS".split(","),F:"dD,rR,tT,gG,vV,cC".split(","),G:"fF,tT,yY,hH,bB,vV".split(","),H:"gG,yY,uU,jJ,nN,bB".split(","),I:"uU,8*,9(,oO,kK,jJ".split(","),J:"hH,uU,iI,kK,mM,nN".split(","),K:"jJ iI oO lL ,< mM".split(" "),L:"kK oO pP ;: .> ,<".split(" "),M:["nN","jJ","kK",",<",null,null],N:["bB","hH","jJ","mM",null,null],O:"iI,9(,0),pP,lL,kK".split(","),P:"oO,0),-_,[{,;:,lL".split(","),Q:[null,"1!","2@","wW","aA",null],R:"eE,4$,5%,tT,fF,dD".split(","),S:"aA,wW,eE,dD,xX,zZ".split(","),T:"rR,5%,6^,yY,gG,fF".split(","),U:"yY,7&,8*,iI,jJ,hH".split(","),V:["cC","fF","gG","bB",null,null],W:"qQ,2@,3#,eE,sS,aA".split(","),X:["zZ","sS","dD","cC",null,null],Y:"tT,6^,7&,uU,hH,gG".split(","),Z:[null,"aA","sS","xX",null,null],"[":"pP,-_,=+,]},'\",;:".split(","),"\\":["]}",null,null,null,null,null],"]":["[{","=+",null,"\\|",null,"'\""],"^":["5%",null,null,"7&","yY","tT"],_:["0)",null,null,"=+","[{","pP"],"`":[null,null,null,"1!",null,null],a:[null,"qQ","wW","sS","zZ",null],b:["vV","gG","hH","nN",null,null],c:["xX","dD","fF","vV",null,null],d:"sS,eE,rR,fF,cC,xX".split(","),e:"wW,3#,4$,rR,dD,sS".split(","),f:"dD,rR,tT,gG,vV,cC".split(","),g:"fF,tT,yY,hH,bB,vV".split(","),h:"gG,yY,uU,jJ,nN,bB".split(","),i:"uU,8*,9(,oO,kK,jJ".split(","),j:"hH,uU,iI,kK,mM,nN".split(","),k:"jJ iI oO lL ,< mM".split(" "),l:"kK oO pP ;: .> ,<".split(" "),m:["nN","jJ","kK",",<",null,null],n:["bB","hH","jJ","mM",null,null],o:"iI,9(,0),pP,lL,kK".split(","),p:"oO,0),-_,[{,;:,lL".split(","),q:[null,"1!","2@","wW","aA",null],r:"eE,4$,5%,tT,fF,dD".split(","),s:"aA,wW,eE,dD,xX,zZ".split(","),t:"rR,5%,6^,yY,gG,fF".split(","),u:"yY,7&,8*,iI,jJ,hH".split(","),v:["cC","fF","gG","bB",null,null],w:"qQ,2@,3#,eE,sS,aA".split(","),x:["zZ","sS","dD","cC",null,null],y:"tT,6^,7&,uU,hH,gG".split(","),z:[null,"aA","sS","xX",null,null],"{":"pP,-_,=+,]},'\",;:".split(","),"|":["]}",null,null,null,null,null],"}":["[{","=+",null,"\\|",null,"'\""],"~":[null,null,null,"1!",null,null]},tt={"*":["/",null,null,null,"-","+","9","8"],"+":["9","*","-",null,null,null,null,"6"],"-":["*",null,null,null,null,null,"+","9"],".":["0","2","3",null,null,null,null,null],"/":[null,null,null,null,"*","9","8","7"],0:[null,"1","2","3",".",null,null,null],1:[null,null,"4","5","2","0",null,null],2:["1","4","5","6","3",".","0",null],3:["2","5","6",null,null,null,".","0"],4:[null,null,"7","8","5","2","1",null],5:"4,7,8,9,6,3,2,1".split(","),6:["5","8","9","+",null,null,"3","2"],7:[null,null,null,"/","8","5","4",null],8:["7",null,"/","*","9","6","5","4"],9:["8","/","*","-","+",null,"6","5"]};J=[],K=J.concat([function(t){var e,n,i,l,o,s,r,a,u,p,f,h,m,_,y,b;for(p=[],h=d(g(t)),i=0,l=h.length;l>i&&(_=h[i],!c(_));i++)for(r=0,o=J.length;o>r;r++)for(s=J[r],a=v(t,_),m=s(a),f=0,s=m.length;s>f;f++)if(a=m[f],b=t.slice(a.i,+a.j+1||9e9),b.toLowerCase()!==a.matched_word){u={};for(y in _)e=_[y],-1!==b.indexOf(y)&&(u[y]=e);a.l33t=!0,a.token=b,a.sub=u,b=a;var k=void 0,k=[];for(n in u)e=u[n],k.push(n+" -> "+e);b.sub_display=k.join(", "),p.push(a)}return p},function(t){var e,n,i,l,o,s;for(o=f(t,u),s=[],i=0,l=o.length;l>i;i++)e=o[i],n=[e.i,e.j],e=n[0],n=n[1],s.push({pattern:"digits",i:e,j:n,token:t.slice(e,+n+1||9e9)});return s},function(t){var e,n,i,l,o,s;for(o=f(t,b),s=[],i=0,l=o.length;l>i;i++)e=o[i],n=[e.i,e.j],e=n[0],n=n[1],s.push({pattern:"year",i:e,j:n,token:t.slice(e,+n+1||9e9)});return s},function(t){return r(t).concat(s(t))},function(t){var e,n,i;for(i=[],e=0;e<t.length;){for(n=e+1;;){if(t.slice(n-1,+n+1||9e9),t.charAt(n-1)!==t.charAt(n)){n-e>2&&i.push({pattern:"repeat",i:e,j:n-1,token:t.slice(e,n),repeated_char:t.charAt(e)});break}n+=1}e=n}return i},function(e){var n,i,l,o,s,r,a,u,c,d,p,f,h;for(u=[],s=0;s<e.length;){r=s+1,f=h=c=null;for(p in t)if(d=t[p],l=function(){var t,i,l,o;for(l=[e.charAt(s),e.charAt(r)],o=[],t=0,i=l.length;i>t;t++)n=l[t],o.push(d.indexOf(n));return o}(),o=l[0],l=l[1],o>-1&&l>-1&&(o=l-o,1===o||-1===o)){c=d,h=p,f=o;break}if(c)for(;;){if(o=e.slice(r-1,+r+1||9e9),a=o[0],i=o[1],l=function(){var t,e,l,o;for(l=[a,i],o=[],t=0,e=l.length;e>t;t++)n=l[t],o.push(d.indexOf(n));return o}(),o=l[0],l=l[1],l-o!==f){r-s>2&&u.push({pattern:"sequence",i:s,j:r-1,token:e.slice(s,r),sequence_name:h,sequence_space:c.length,ascending:1===f});break}r+=1}s=r}return u},function(t){var e,n,i;i=[];for(n in G)e=G[n],p(i,y(t,e,n));return i}]),G={qwerty:X,dvorak:{"!":["`~",null,null,"2@","'\"",null],'"':[null,"1!","2@",",<","aA",null],"#":["2@",null,null,"4$",".>",",<"],$:["3#",null,null,"5%","pP",".>"],"%":["4$",null,null,"6^","yY","pP"],"&":["6^",null,null,"8*","gG","fF"],"'":[null,"1!","2@",",<","aA",null],"(":["8*",null,null,"0)","rR","cC"],")":["9(",null,null,"[{","lL","rR"],"*":["7&",null,null,"9(","cC","gG"],"+":["/?","]}",null,"\\|",null,"-_"],",":"'\",2@,3#,.>,oO,aA".split(","),"-":["sS","/?","=+",null,null,"zZ"],".":",< 3# 4$ pP eE oO".split(" "),"/":"lL,[{,]},=+,-_,sS".split(","),0:["9(",null,null,"[{","lL","rR"],1:["`~",null,null,"2@","'\"",null],2:["1!",null,null,"3#",",<","'\""],3:["2@",null,null,"4$",".>",",<"],4:["3#",null,null,"5%","pP",".>"],5:["4$",null,null,"6^","yY","pP"],6:["5%",null,null,"7&","fF","yY"],7:["6^",null,null,"8*","gG","fF"],8:["7&",null,null,"9(","cC","gG"],9:["8*",null,null,"0)","rR","cC"],":":[null,"aA","oO","qQ",null,null],";":[null,"aA","oO","qQ",null,null],"<":"'\",2@,3#,.>,oO,aA".split(","),"=":["/?","]}",null,"\\|",null,"-_"],">":",< 3# 4$ pP eE oO".split(" "),"?":"lL,[{,]},=+,-_,sS".split(","),"@":["1!",null,null,"3#",",<","'\""],A:[null,"'\"",",<","oO",";:",null],B:["xX","dD","hH","mM",null,null],C:"gG,8*,9(,rR,tT,hH".split(","),D:"iI,fF,gG,hH,bB,xX".split(","),E:"oO,.>,pP,uU,jJ,qQ".split(","),F:"yY,6^,7&,gG,dD,iI".split(","),G:"fF,7&,8*,cC,hH,dD".split(","),H:"dD,gG,cC,tT,mM,bB".split(","),I:"uU,yY,fF,dD,xX,kK".split(","),J:["qQ","eE","uU","kK",null,null],K:["jJ","uU","iI","xX",null,null],L:"rR,0),[{,/?,sS,nN".split(","),M:["bB","hH","tT","wW",null,null],N:"tT,rR,lL,sS,vV,wW".split(","),O:"aA ,< .> eE qQ ;:".split(" "),P:".>,4$,5%,yY,uU,eE".split(","),Q:[";:","oO","eE","jJ",null,null],R:"cC,9(,0),lL,nN,tT".split(","),S:"nN,lL,/?,-_,zZ,vV".split(","),T:"hH,cC,rR,nN,wW,mM".split(","),U:"eE,pP,yY,iI,kK,jJ".split(","),V:["wW","nN","sS","zZ",null,null],W:["mM","tT","nN","vV",null,null],X:["kK","iI","dD","bB",null,null],Y:"pP,5%,6^,fF,iI,uU".split(","),Z:["vV","sS","-_",null,null,null],"[":["0)",null,null,"]}","/?","lL"],"\\":["=+",null,null,null,null,null],"]":["[{",null,null,null,"=+","/?"],"^":["5%",null,null,"7&","fF","yY"],_:["sS","/?","=+",null,null,"zZ"],"`":[null,null,null,"1!",null,null],a:[null,"'\"",",<","oO",";:",null],b:["xX","dD","hH","mM",null,null],c:"gG,8*,9(,rR,tT,hH".split(","),d:"iI,fF,gG,hH,bB,xX".split(","),e:"oO,.>,pP,uU,jJ,qQ".split(","),f:"yY,6^,7&,gG,dD,iI".split(","),g:"fF,7&,8*,cC,hH,dD".split(","),h:"dD,gG,cC,tT,mM,bB".split(","),i:"uU,yY,fF,dD,xX,kK".split(","),j:["qQ","eE","uU","kK",null,null],k:["jJ","uU","iI","xX",null,null],l:"rR,0),[{,/?,sS,nN".split(","),m:["bB","hH","tT","wW",null,null],n:"tT,rR,lL,sS,vV,wW".split(","),o:"aA ,< .> eE qQ ;:".split(" "),p:".>,4$,5%,yY,uU,eE".split(","),q:[";:","oO","eE","jJ",null,null],r:"cC,9(,0),lL,nN,tT".split(","),s:"nN,lL,/?,-_,zZ,vV".split(","),t:"hH,cC,rR,nN,wW,mM".split(","),u:"eE,pP,yY,iI,kK,jJ".split(","),v:["wW","nN","sS","zZ",null,null],w:["mM","tT","nN","vV",null,null],x:["kK","iI","dD","bB",null,null],y:"pP,5%,6^,fF,iI,uU".split(","),z:["vV","sS","-_",null,null,null],"{":["0)",null,null,"]}","/?","lL"],"|":["=+",null,null,null,null,null],"}":["[{",null,null,null,"=+","/?"],"~":[null,null,null,"1!",null,null]},keypad:tt,mac_keypad:{"*":["/",null,null,null,null,null,"-","9"],"+":["6","9","-",null,null,null,null,"3"],"-":["9","/","*",null,null,null,"+","6"],".":["0","2","3",null,null,null,null,null],"/":["=",null,null,null,"*","-","9","8"],0:[null,"1","2","3",".",null,null,null],1:[null,null,"4","5","2","0",null,null],2:["1","4","5","6","3",".","0",null],3:["2","5","6","+",null,null,".","0"],4:[null,null,"7","8","5","2","1",null],5:"4,7,8,9,6,3,2,1".split(","),6:["5","8","9","-","+",null,"3","2"],7:[null,null,null,"=","8","5","4",null],8:["7",null,"=","/","9","6","5","4"],9:"8,=,/,*,-,+,6,5".split(","),"=":[null,null,null,null,"/","9","8","7"]}},Q=function(t){var e,n,i,l,o;e=0;for(i in t)o=t[i],e+=function(){var t,e,n;for(n=[],t=0,e=o.length;e>t;t++)(l=o[t])&&n.push(l);return n}().length;return e/=function(){var e;e=[];for(n in t)e.push(n);return e}().length},W=Q(X),Y=Q(tt),H=function(){var t;t=[];for(Z in X)t.push(Z);return t}().length,V=function(){var t;t=[];for(Z in tt)t.push(Z);return t}().length,B=function(){return(new Date).getTime()},Q=function(t,i){var l,o;return null==i&&(i=[]),o=B(),l=m(t,K.concat([e("user_inputs",n(i.map(function(t){return t.toLowerCase()})))])),l=L(t,l),l.calc_time=B()-o,l},"undefined"!=typeof window&&null!==window?(window.zxcvbn=Q,"function"==typeof window.zxcvbn_load_hook&&window.zxcvbn_load_hook()):"undefined"!=typeof exports&&null!==exports&&(exports.zxcvbn=Q)}(),zxcvbn}),define("helper",["exports","templates","auth","3rd/zxcvbn"],function(t,e,n,i){"use strict";function l(t){return t&&t.__esModule?t:{"default":t}}function o(t,n,i){var l=t.selector,o=t.element,s=void 0===o?$(l):o,r=t.position,a=void 0===r?"none":r,u=t.onClose,c=void 0===u?function(){}:u;return function(){
  $(document).trigger("click.close_ccid_popup_login");var t=s.offset(),i=void 0,l={},o="ccid_arrow";return-1!=a.indexOf("up")?(o+="_up",l.top=t.top+s.innerHeight()+14,-1!=a.indexOf("left")?(l.left=t.left+s.innerWidth()/2-35,o+="_left"):(l.left=t.left-280+35+s.innerWidth()/2,o+="_right")):(-1!=a.indexOf("bottom")?(l.top=t.top-237,o+="_bottom"):(l.top=t.top-70,o+="_top"),-1!=a.indexOf("left")?(l.left=t.left+14+s.innerWidth(),o+="_left"):(l.left=t.left-282-14,o+="_right")),i=$(e.loginPopUp()).addClass("_ccid_login "+o).css(l).appendTo("body").on("submit.login","form",function(t){var e=$(this),l=e.find("input[name=email]").removeClass("erro"),o=e.find("input[name=password]").removeClass("erro"),s=e.find("[type=submit]"),r=i.find(".ccid_login_social");return l.add(o).add(s.addClass("ccid_sub_off")).prop("disabled",!0),r.addClass("ccid_login_social_off"),i.find("input").removeClass("ccid_erro"),ccid.d("auth",function(t,e){null===e?($(document).trigger("click.close_ccid_popup_login"),n(t,e)):(i.find(".ccid_erro").text(e.msg),i.find("input").addClass("ccid_erro")),l.add(o).add(s.removeClass("ccid_sub_off")).add(r).prop("disabled",!1),r.removeClass("ccid_login_social_off"),o.focus()},{email:l.val(),password:o.val()}),!1}).on("click.authSocial",".ccid_login_social > i",function(t){return $(this).parent().hasClass("ccid_login_social_off")||ccid.d("auth.social",function(t,e){if(null===e)$(document).trigger("click.close_ccid_popup_login"),n(t,e);else{$(".js-ccid-error").removeClass("on");switch(e.code){case"s01":alert("Login indisponível. Este e-mail já esta sendo utilizado por outra conta social.");break;case"u02":alert("Usuário suspenso.");break;case"oa01":alert("Token expirou!, tente novamente!");break;default:alert("Login indisponível no momento, tente novamente mais tarde!")}}},$(this).data()),!1}),i.find("input[name=email]").focus(),$(document).on("click.close_ccid_popup_login",function(t){$(t.target).closest("._ccid_login").length||(i.remove(),c(),$(document).off("click.close_ccid_popup_login"))}),i}()}function s(t,i,l){function o(t){var e=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return e.test(t)}var s=$(e.syncPopUp(l)).appendTo("body").on("click.confirmar_email",'a[href="#confirmar_email"]',function(t){return $.ajax({url:context.url("api/index.html")+"request/email/retry/",type:"POST",xhrFields:{withCredentials:!0},success:function(){alert("Após confirmar o link através de seu e-mail, aguarde alguns minutos e atualize esta página para tentar novamente!")},error:function(t){alert("Não foi possível reenviar o e-mail de confirmação, atualize a página e tente de novo!")}}),!1}).on("click.define_email_n_pass",'a[href="#definir_email_e_senha"]',function(t){return s.find("._cnt_mail").show(),s.find("._cnt_bts").hide(),!1}).on("click.sync",'a[href="#sincronizar"]',function(t){return s.find("._cnt_pass").show(),s.find("._cnt_bts").hide(),!1}).on("click.back","._back",function(t){return s.find("._cnt_mail, ._cnt_pass").hide(),s.find("._cnt_bts").show(),!1}).on("click.close","._ccid_close",function(t){s.remove()}).on("input","._ccid_password",function(t){var e=$(this).val(),n=u["default"](e).score,i=void 0,l=void 0;e.length?s.find("._ccid_forca_senha").show():s.find("._ccid_forca_senha").hide(),2>n?(l="Fraca",i="ccid_forca_fraca"):4>n||e.length<8?(l="Média",i="ccid_forca_media"):(l="Forte",i="ccid_forca_forte"),s.find("._ccid_forca_titulo").text(l),s.find("._ccid_forca_senha").removeClass("ccid_forca_fraca ccid_forca_media ccid_forca_forte").addClass(i)}).on("submit","form",function(t){var e=$(this),r=e.find("._ccid_email"),a=e.find("input[type=password]"),u=e.find("button[type=submit]"),c=e.find("button[type=reset]"),d=!0;a.add(r).removeClass("ccid_erro").siblings("small").remove();var p={type:e.prop("name").match(/form_(\w+)/)[1],email:r.val(),password:a.eq(0).val()};return a.eq(0).val().length||(d=!1,a.eq(0).addClass("ccid_erro").after($("<i class='ccid_form_erro' />").text("Verifique os requisitos mínimos de seguraça para a nova senha."))),"password"==p.type&&a.eq(0).val()!=a.eq(1).val()&&(d=!1,a.addClass("ccid_erro"),a.eq(1).after($("<i class='ccid_form_erro' />").text("A senha e a confirmação não batem."))),"email"!=p.type&&"sync"!=p.type||o(p.email)?p.email==l.email&&(d=!1,r.addClass("ccid_erro").after($("<i class='ccid_form_erro' />").text("Você não pode utilizar a mesma conta."))):(d=!1,r.addClass("ccid_erro").after($("<i class='ccid_form_erro' />").text("Digite um email válido."))),d?(r.add(a).prop("disabled",!0),u.add(c).addClass("ccid_bt--off").prop("disabled",!0),n.updateAccount(p,[i[0],function(t){if(null===t.Error)t.Context&&t.Context.EmailNeeded&&alert("Confirme o endereço de e-mail através do link enviado ao seu e-mail e atualize esta página para continuar!"),s.remove(),i[1]();else{var e=null;switch(t.Error.Code){case"s01":e="Login indisponível. Este e-mail já esta sendo utilizado por outra conta social.";break;case"u01":e="E-mail ou senha incorreto.";break;case"u02":e="Usuário suspenso.";break;case"hle":r.addClass("ccid_erro").after($("<small class='ccid_form_erro' />").text("E-mail já cadastrado!"));break;case"hlp":a.addClass("ccid_erro"),e="Senha inválida!";break;default:e="Login indisponível no momento, tente novamente mais tarde!"}e&&a.eq(a.length-1).addClass("ccid_erro").after($("<small class='ccid_form_erro' />").text(e))}r.add(a).prop("disabled",!1),u.add(c).removeClass("ccid_bt--off").prop("disabled",!1)}])):(r.add(a).prop("disabled",!1),u.add(c).removeClass("ccid_bt--off").prop("disabled",!1)),!1})}function r(){var t=document.domain.match(/\.?(\w+\.(?:mus|com|io|local)(?:\..*)?)$/);return t?"."+t[t.length-1]:document.domain}function a(t,e){$.ajax({url:context.url("api/index.html")+"friendships/fetch/",type:"get",dataType:"json",xhrFields:{withCredentials:!0},data:t,success:function(t){e(t,null)},error:function(t){e(null,t)}})}t.__esModule=!0,t.authPopup=o,t.syncPopup=s,t.getDomain=r,t.fetchFriends=a;var u=l(i)}),define("user",["exports","cookies","helper"],function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(){for(var t={},n=0,i=o.length;i>n;n++){var l=o[n];t[l]=e.get(l)}return new s(t)}t.__esModule=!0,t.fetchFromCookies=l;var o=["checkup","login","email","nickname","avatar","location","palcomp3","verified","ssmod","always"],s=function(){function t(e){var n=e.login,l=e.nickname,o=e.email,s=e.avatar,r=e.location,a=e.checkup,u=e.palcomp3,c=e.verified,d=e.ssmod;i(this,t),this.context=null,this.id=n,this.isLogged()&&(this.name=l.charAt(0)+l.slice(1),this.email=o,this.avatar_file=s,r=r.split("|"),this.city=r[0],this.state=r[1],this.meta={verified:c,checkup:a,palcomp3:u},d&&(this.meta.ssmod=d))}return t.prototype.reset=function(){this.context=null,this.id=null,this.name=null,this.email=null,this.avatar_file=null,this.city=null,this.state=null,this.meta=null},t.prototype.isLogged=function(){return!("string"!=typeof this.id||!this.id.length)},t.prototype.isVerified=function(){return this.meta&&"1"==this.meta.verified},t.prototype.avatar=function(t){var e=void 0;return t="undefined"==typeof t?75:t,this.isLogged()&&this.avatar_file?(e=0===this.avatar_file.indexOf("avatar_")?this.avatar_file:this.id.slice(-2,-1)+"/"+this.id.slice(-1)+"/"+this.avatar_file,context.consts.avatar+(75==t?e:e.replace(".","_"+t+"."))):(e="avatar_masc.gif",context.consts.avatar.replace("/ssdi/","/")+(75==t?e:e.replace(".","_"+t+".")))},t.prototype.auth=function(){var t=2592e3,i=n.getDomain(),l="/";return this.isLogged()?(e.set("login",this.id,t,l,i),e.set("email",this.email,t,l,i),e.set("nickname",this.name,t,l,i),e.set("avatar",this.avatar_file,t,l,i),e.set("location",this.city+"|"+this.state,t,l,i),e.set("checkup",this.meta.checkup,t,l,i),e.set("palcomp3",this.meta.palcomp3,t,l,i),e.set("verified",this.meta.verified,t,l,i),this.meta.ssmod&&e.set("ssmod",this.meta.ssmod,t,l,i)):this.removeCookies(),this},t.prototype.removeCookies=function(){for(var t=0,i=o.length;i>t;t++)e.remove(o[t],"/",n.getDomain()),e.remove(o[t],"/",document.domain);return this.reset(),this},t.prototype.setLoginContext=function(t){return this.context=t,this},t}();t.User=s}),define("notifications",["exports","module","websocket"],function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var l=function(){function t(e){i(this,t),this.socket=null,this.onNotifications=null}return t.prototype.connect=function(t){var e=this;return this.socket||(this.socket=n.getChannel({url:context.url("ns/index.html")}).on("message",function(t){e._onNotifications(t)}).on("close",function(t){e.socket.destroy(),e.socket=null,e.shouldReconnect&&e.connect()}).connect()),this},t.prototype.reconnect=function(){this.socket&&(this.shouldReconnect=!0,this.socket.close())},t.prototype.destroy=function(){return this.socket&&(this.socket.close(),this.onNotifications=null),this},t.prototype._onNotifications=function(t){"function"==typeof this.onNotifications&&this.onNotifications(t)},t.prototype.setOnNotifications=function(t){return this.onNotifications=t,this},t.prototype.getInitialNotifications=function(t){return $.ajax({url:context.url("api/index.html")+"notifications/",type:"GET",dataType:"JSON",xhrFields:{withCredentials:!0},data:{},success:function(e){t(e,null)},error:function(e,n,i){t(null,{code:e.status,msg:n})}}),this},t.prototype.markAsRead=function(t,e){return $.ajax({url:context.url("api/index.html")+"notifications/"+t+"/read/",type:"POST",xhrFields:{withCredentials:!0},data:{},success:function(){e(!0,null)},error:function(t,n,i){e(!1,{code:t.status,msg:n})}}),this},t.prototype.markAsSeen=function(t){return $.ajax({url:context.url("api/index.html")+"notifications/seen/",type:"POST",xhrFields:{withCredentials:!0},data:{},success:function(){t(!0,null)},error:function(e,n,i){t(!1,{code:e.status,msg:n})}}),this},t.prototype.getInitialFriendshipRequests=function(t){return $.ajax({url:context.url("api/index.html")+"friendships/requests/",type:"GET",dataType:"JSON",xhrFields:{withCredentials:!0},data:{received:!0},success:function(e){t(e,null)},error:function(e,n,i){t(null,{code:e.status,msg:n})}}),this},t.prototype.getRequestedFriendship=function(t){return $.ajax({url:context.url("api/index.html")+"friendships/",type:"GET",dataType:"JSON",xhrFields:{withCredentials:!0},data:{accepted:!1},success:function(e){t(e,null)},error:function(e,n,i){t(null,{code:e.status,msg:n})}}),this},t.prototype.markFriendshipAsSeen=function(t){$.ajax({url:context.url("api/index.html")+"friendships/requests/seen/",type:"POST",xhrFields:{withCredentials:!0},data:{},success:function(){t(!0,null)},error:function(e,n,i){t(!1,{code:e.status,msg:n})}})},t.prototype.requestFriendship=function(t,e){var n=t.userID,i=t.serviceID;return $.ajax({url:context.url("api/index.html")+"friendships/",type:"POST",dataType:"JSON",xhrFields:{withCredentials:!0},data:JSON.stringify({userID:n,service:i}),success:function(t){e(t,t.Error)},error:function(t,n,i){e(null,{code:t.status,msg:t.responseText||n})}}),this},t.prototype.revokeFriendship=function(t,e){return $.ajax({url:context.url("api/index.html")+"friendships/",type:"DELETE",dataType:"JSON",xhrFields:{withCredentials:!0},data:JSON.stringify({userID:t}),success:function(t){e(!t.Error,t.Error||null)},error:function(t,n,i){e(!1,{code:t.status,msg:t.responseText||n})}}),this},t.prototype._confirmFriendship=function(t,e,n){return $.ajax({url:context.url("api/index.html")+"friendships/"+t+"/",type:"PUT",xhrFields:{withCredentials:!0},data:JSON.stringify({accepted:e}),complete:function(t,e){switch(t.status){case 200:n(!0,null);break;default:n(!1,{code:t.status,msg:t.responseText||e})}}}),this},t.prototype.declineFriendship=function(t,e){return this._confirmFriendship(t,!1,e)},t.prototype.confirmFriendship=function(t,e){return this._confirmFriendship(t,!0,e)},t.prototype.isMyFriend=function(t,e){return $.ajax({url:context.url("api/index.html")+"friendships/is/"+t+"/",type:"GET",dataType:"JSON",xhrFields:{withCredentials:!0},data:{},success:function(t){e(t)},error:function(t,n,i){e(!1,{code:t.status,msg:t.responseText||n})}}),this},t}();e.exports=l}),define("main",["exports","templates","user","auth","cookies","helper","notifications"],function(t,e,n,i,l,o,s){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=function(){function t(){r(this,t),this.initialized=!1,this.user=new n.User(context.cookies||{}),this.queue=[],this.consts=context.consts,this.callbacks=null,this.notification=null,this.onNotificationsInitialized=!1}return t.prototype.init=function(){var t=this;this.callbacks={onLogin:$.Callbacks("memory"),onLoginOnce:$.Callbacks(),onNotification:$.Callbacks("memory"),onFriendshipUpdate:$.Callbacks("memory")},i.setOnLogin(function(e,i){null===i&&e.Cookies&&(t.user=new n.User(e.Cookies).setLoginContext(e.Context),location.host.match(t.consts.domain+"$")||t.user.auth()),t.user.isLogged()&&t.callbacks.onLogin.fire(t.user,i,e.Context),t.callbacks.onLoginOnce.fire(t.user,i,e.Context),t.callbacks.onLoginOnce.empty()}),$("#"+this.consts.iframeID).length||$(e.externalIframe()).appendTo("body"),i.supportIframeCookies(function(e){e||(context.proxy=!0,t.user=n.fetchFromCookies()),location.host.match(t.consts.domain+"$")||(t.user.isLogged()?t.user.auth():t.user.removeCookies()),t.user.isLogged()&&t.callbacks.onLogin.fire(t.user,null,null)}),this._initializeQueue()},t.prototype.setQueue=function(t){var e=void 0;for(e=0;e<t.length;e++)this.d(t[e][0],t[e][1],t[e][2]);return this},t.prototype._initializeQueue=function(){this.initialized=!0;for(var t=0,e=this.queue.length;e>t;t++)this.d(this.queue[t][0],this.queue[t][1],this.queue[t][2]);return this},t.prototype.d=function(t,e,n){var l=this;if(!this.initialized)return"init"==t?this.init():this.queue.push([t,e,n]),this;var s=!0;switch(t){case"on.ready":e();break;case"init":break;case"on.login":this.callbacks.onLogin.add(e);break;case"auth":"function"==typeof e&&this.callbacks.onLoginOnce.add(e),n.email&&n.password?i.auth(n):i.raiseErr({code:-1,msg:"E-mail ou senha incorreta(o)."});break;case"auth.social":"function"==typeof e&&this.callbacks.onLoginOnce.add(e),null!==n.provider&&context.consts.providers.exec(n.provider)?i.authSocial(n):i.raiseErr({code:-1,msg:"Provider não suportado."});break;case"get.user":e(this.user);break;case"logout":this.user.isLogged()&&this.user.removeCookies(),window.location.href=context.url("logout/index.html");break;case"on.auth":this.user.isLogged()?e(this.user,null):o.authPopup(n,e,this.user);break;case"on.sync":this.user.isVerified()?e(this.user,null):this.user.isLogged()?o.syncPopup(n,[function(){l.callbacks.onNotification.empty(),l.callbacks.onFriendshipUpdate.empty(),l._getNotification().reconnect()},function(){e(l.user,null)}],this.user):e(null,{code:-1,msg:"Usuário esta desconectado."});break;case"notifications":this._getNotification().getInitialNotifications(e);break;case"on.notification":this._startNotificationsIfTheCase(),this.callbacks.onNotification.add(e);break;case"notification.markAsRead":0|n.id?this._getNotification().markAsRead(n.id,e):e(!1,{code:-1,msg:"Parâmetro id não encontrado."});break;case"notification.markAsSeen":this._getNotification().markAsSeen(e);break;case"friendships":this._getNotification().getInitialFriendshipRequests(e);break;case"on.friendship":this._startNotificationsIfTheCase(),this.callbacks.onFriendshipUpdate.add(e);break;case"friendship.markAsSeen":this._getNotification().markFriendshipAsSeen(e);break;case"friendship.confirm":s=!1;case"friendship.decline":"number"==typeof n.id&&n.id?this._getNotification()[["confirmFriendship","declineFriendship"][0|s]](n.id,e):e(!1,{code:-1,msg:"Parâmetros 'id' é obrigatório."});break;case"friendship.requested":this._getNotification().getRequestedFriendship(e);break;case"friendship.isMyFriend":"undefined"!=typeof n&&"number"==typeof n.friendID?this._getNotification().isMyFriend(n.friendID,e):e(!1,{code:-1,msg:"Parâmetros 'friendID' é obrigatório."});break;case"friendship.request":"number"==typeof n.userID&&n.userID&&"number"==typeof n.serviceID?this._getNotification().requestFriendship(n,e):e(!1,{code:-1,msg:"Parâmetros 'userID' e 'serviceID' são obrigatórios."});break;case"friendship.revoke":"number"==typeof n.userID&&n.userID?this._getNotification().revokeFriendship(n.userID,e):e(!1,{code:-1,msg:"Parâmetros 'userID' é obrigatório."});break;case"social.friends":if(!this.user.isLogged()||"facebook"!=n.provider&&"gplus"!=n.provider||"function"!=typeof e){var r="";r+=this.user.isLogged()?"Parâmetros 'provider' e 'callback' são obrigatórios.":"Usuário não está logado.",e(!1,{code:-1,msg:gettext(r)})}else{var a="";a="facebook"==n.provider?"user_friends":"https://www.googleapis.com/auth/plus.login",this.d("auth.social",function(t,i,l){if(null!=t){var s={provider:n.provider,socialID:l.socialID,token:l.token};o.fetchFriends(s,e)}else e(!1,{code:-1,msg:"Erro ao autenticar usuário."})},{provider:n.provider,perms:a,flow:"socialFriends"})}break;default:throw new Error('Method not found: "'+t+'"')}return this},t.prototype._getNotification=function(){return this.notification||(this.notification=new s),this.notification},t.prototype._startNotificationsIfTheCase=function(){var t=this;this.onNotificationsInitialized||(this._getNotification().setOnNotifications(function(e){2==e.type?t.callbacks.onFriendshipUpdate.fire(e.data):1==e.type?t.callbacks.onNotification.fire(e.data):console.error("unknow error",e)}).connect(),this.onNotificationsInitialized=!0)},t}(),u=!window.ccid.w,c=window.ccid.q;window.ccid=new a,window.ccid.setQueue(c),c=null,u&&window.ccid.init()});
  require(["main"]);
  }({"consts":{"api":"/api/v1/","avatar":"//studiosol-a.akamaihd.net/tb/ccid-avatar/","domain":"cifraclub.com.br","forgotPassword":"/esqueci-senha/","host":"https://id.cifraclub.com.br","login":"/auth/external/","logout":"/logout/","ns":"/ns/","service":{"CifraClubID":3,"Letras":1,"OuvirMusica":2,"Palco":0},"signup":"/cadastro/"},"cookies":{},"uuid":"62e93f3706e7b83741026f68891a4c9184b181c65bcc8340"}));
  
  function gettext(s){return s}