tweb/public/53.0848e83cc329eb6130be.chu...

2 lines
17 KiB
JavaScript
Raw Normal View History

2022-03-25 11:56:31 +01:00
"use strict";(this.webpackChunktweb=this.webpackChunktweb||[]).push([[53,688,465,392,810],{4489:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(503);class a extends i.Z{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}))}}},9638:(e,t,n)=>{n.d(t,{Z:()=>p});var i=n(3910),a=n(2738),o=n(4541),s=n(4727),r=n(9518),l=n(3512),d=n(4494),c=n(6858);let u,h=!1;function p(e){h||(u||(u=r.Z.getConfig().then((e=>e.suggested_lang_code!==s.default.lastRequestedLangCode?Promise.all([e,s.default.getStrings(e.suggested_lang_code,["Login.ContinueOnLanguage"]),s.default.getCacheLangPack()]):[])))).then((([t,n])=>{if(!t)return;const r=[];n.forEach((e=>{const t=s.default.strings.get(e.key);t&&(r.push(t),s.default.strings.set(e.key,e))}));const u=(0,d.Z)("btn-primary btn-secondary btn-primary-transparent primary",{text:"Login.ContinueOnLanguage"});u.lastElementChild.classList.remove("i18n"),(0,o.Z)().then((()=>{window.requestAnimationFrame((()=>{e.append(u)}))})),l.default.addEventListener("language_change",(()=>{u.remove()}),{once:!0}),r.forEach((e=>{s.default.strings.set(e.key,e)})),(0,a.fc)(u,(e=>{(0,i.d)(e),h=!0,u.disabled=!0,(0,c.y7)(u),s.default.getLangPack(t.suggested_lang_code)}))}))}},3083:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(2897);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.Z.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.Z.waitForFirstFrame(e)))),i.Z.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.Z.waitForFirstFrame(e))))])}remove(){this.animation&&this.animation.remove(),this.idleAnimation&&this.idleAnimation.remove()}}},4484:(e,t,n)=>{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,{Z:()=>i})},8079:(e,t,n)=>{function i(e,t){return t?e.replace(/\+/g,"-").replace(/\//g,"_").replace(/\=+$/,""):e.replace(/-/g,"+").replace(/_/g,"/")}n.d(t,{Z:()=>i})},8045:(e,t,n)=>{n.d(t,{Z:()=>r});var i=n(410),a=n(7487),o=n(9518);const s=new class{constructor(){this.serverTimeOffset=0,a.Z.get("server_time_offset").then((e=>{e&&(this.serverTimeOffset=e)})),o.Z.addTaskListener("applyServerTimeOffset",(e=>{this.serverTimeOffset=e.payload}))}};i.GO&&(i.GO.serverTimeManager=s);const r=s},6392:(e,t,n)=>{n.r(t),n.d(t,{default:()=>y});var i=n(4755),a=n(4687),o=n(9518),s=n(4874),r=n(810),l=n(30
//# sourceMappingURL=53.0848e83cc329eb6130be.chunk.js.map