tweb/public/14.0c3a1ae74a0c65edf059.chu...

2 lines
11 KiB
JavaScript
Raw Normal View History

2022-04-16 19:15:57 +02:00
(this.webpackJsonp=this.webpackJsonp||[]).push([[14,16,17,18],{115:function(e,t,n){"use strict";function i(e,t){return t?e.replace(/\+/g,"-").replace(/\//g,"_").replace(/\=+$/,""):e.replace(/-/g,"+").replace(/_/g,"/")}n.d(t,"a",(function(){return i}))},116:function(e,t,n){"use strict";function i(e,t){const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;++i)if(e[i]!==t[i])return!1;return!0}n.d(t,"a",(function(){return i}))},122:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var i=n(32),a=n(56),o=n(41),s=n(7),r=n(8),l=n(0),c=n(57),d=n(60);let u,h=!1;function p(e){h||(u||(u=r.a.getConfig().then(e=>e.suggested_lang_code!==s.c.lastRequestedLangCode?Promise.all([e,s.c.getStrings(e.suggested_lang_code,["Login.ContinueOnLanguage"]),s.c.getCacheLangPack()]):[]))).then(([t,n])=>{if(!t)return;const r=[];n.forEach(e=>{const t=s.c.strings.get(e.key);t&&(r.push(t),s.c.strings.set(e.key,e))});const u="Login.ContinueOnLanguage",p=Object(c.a)("btn-primary btn-secondary btn-primary-transparent primary",{text:u});p.lastElementChild.classList.remove("i18n"),Object(o.a)({text:[s.c.format(u,!0)]}).then(()=>{window.requestAnimationFrame(()=>{e.append(p)})}),l.a.addEventListener("language_change",()=>{p.remove()},{once:!0}),r.forEach(e=>{s.c.strings.set(e.key,e)}),Object(a.b)(p,e=>{Object(i.a)(e),h=!0,p.disabled=!0,Object(d.f)(p),s.c.getLangPack(t.suggested_lang_code)})})}},129:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n(69);class a{constructor(e,t){this.inputField=e,this.size=t,this.max=45,this.needFrame=0,this.container=document.createElement("div"),this.container.classList.add("media-sticker-wrapper");const n=e.input;n.addEventListener("blur",()=>{this.playAnimation(0)}),n.addEventListener("input",t=>{this.playAnimation(e.value.length)})}playAnimation(e){if(!this.animation)return;let t;(e=Math.min(e,30))?(t=Math.round(Math.min(this.max,e)*(165/this.max)+11.33),this.idleAnimation&&(this.idleAnimation.stop(!0),this.idleAnimation.canvas.style.display="none"),this.animation.canvas.style.display=""):t=0;const n=this.needFrame>t?-1:1;this.animation.setDirection(n),0!==this.needFrame&&0===t&&this.animation.setSpeed(7),this.needFrame=t,this.animation.play()}load(){return this.loadPromise?this.loadPromise:this.loadPromise=Promise.all([i.a.loadAnimationAsAsset({container:this.container,loop:!0,autoplay:!0,width:this.size,height:this.size},"TwoFactorSetupMonkeyIdle").then(e=>(this.idleAnimation=e,this.inputField.value.length||e.play(),i.a.waitForFirstFrame(e))),i.a.loadAnimationAsAsset({container:this.container,loop:!1,autoplay:!1,width:this.size,height:this.size},"TwoFactorSetupMonkeyTracking").then(e=>(this.animation=e,this.inputField.value.length||(this.animation.canvas.style.display="none"),this.animation.addEventListener("enterFrame",e=>{(1===this.animation.direction&&e>=this.needFrame||-1===this.animation.direction&&e<=this.needFrame)&&(this.animation.setSpeed(1),this.animation.pause()),0===e&&0===this.needFrame&&this.idleAnimation&&(this.idleAnimation.canvas.style.display="",this.idleAnimation.play(),this.animation.canvas.style.display="none")}),i.a.waitForFirstFrame(e)))])}remove(){this.animation&&this.animation.remove(),this.idleAnimation&&this.idleAnimation.remove()}}},130:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n(64);class a extends i.b{constructor(e){super(Object.assign({plainText:!0},e));const t=this.input;t.type="tel",t.setAttribute("required",""),t.autocomplete="off";let n=0;this.input.addEventListener("input",t=>{this.input.classList.remove("error"),this.setLabel();const i=this.value.replace(/\D/g,"").slice(0,e.length);this.setValueSilently(i);const a=this.value.length;if(a===e.length)e.onFill(this.value);else if(a===n)return;n=a})}}},161:function(e,t,n){"use strict";n.r(t);var i=n(8),a=n(87),o=n(85),s=n(5),r=n(57),l=n(7),c=n(34),d=n(0),u=n(60),h=n(122),p=n(16),m=n(115),g=n(116);function f(e){return e<26?e+65:e<52?e+71:e<62?e-4:62===e?43:63===e?47:65}var y=function(e,t,n,i){return new(n||(n=Promise))((function(a,o){function s(e){try{l(i.next(e))}catch(e){o(e)}
//# sourceMappingURL=14.0c3a1ae74a0c65edf059.chunk.js.map