tweb/public/12.123d1a86332173c32d35.chunk.js
morethanwords 3c4c960531 Build
2021-09-24 19:42:41 +04:00

2 lines
23 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(this.webpackJsonp=this.webpackJsonp||[]).push([[12,16,20,26],{17:function(t,e,i){"use strict";i.r(e),i.d(e,"ripple",(function(){return l}));var n=i(5),s=i(52),a=i(1),o=i(15);let r=0;function l(t,e=(()=>Promise.resolve()),i=null,l=!1){if(t.querySelector(".c-ripple"))return;t.classList.add("rp");let c=document.createElement("div");c.classList.add("c-ripple");let u;t.classList.contains("rp-square")&&c.classList.add("is-square"),t[l?"prepend":"append"](c);const d=(t,n)=>{const o=Date.now(),l=document.createElement("div"),d=r++,h=1e3*+window.getComputedStyle(c).getPropertyValue("--ripple-duration").replace("s","");u=()=>{let t=Date.now()-o;const e=()=>{s.a.mutate(()=>{l.remove()}),i&&i(d)};if(t<h){let i=Math.max(h-t,h/2);setTimeout(()=>l.classList.add("hiding"),Math.max(i-h/2,0)),setTimeout(e,i)}else l.classList.add("hiding"),setTimeout(e,h/2);a.isTouchSupported||window.removeEventListener("contextmenu",u),u=null,p=!1},e&&e(d),window.requestAnimationFrame(()=>{const e=c.getBoundingClientRect();l.classList.add("c-ripple__circle");const i=t-e.left,s=n-e.top,a=Math.sqrt(Math.pow(Math.abs(s-e.height/2)+e.height/2,2)+Math.pow(Math.abs(i-e.width/2)+e.width/2,2)),o=i-a/2,r=s-a/2;l.style.width=l.style.height=a+"px",l.style.left=o+"px",l.style.top=r+"px",c.append(l)})},h=e=>e.target!==t&&(["BUTTON","A"].includes(e.target.tagName)||Object(n.a)(e.target,"c-ripple")!==c);let p=!1;if(a.isTouchSupported){let e=()=>{u&&u()};t.addEventListener("touchstart",i=>{if(!o.default.settings.animationsEnabled)return;if(i.touches.length>1||p||h(i))return;p=!0;let{clientX:n,clientY:s}=i.touches[0];d(n,s),t.addEventListener("touchend",e,{once:!0}),window.addEventListener("touchmove",i=>{i.cancelBubble=!0,i.stopPropagation(),e(),t.removeEventListener("touchend",e)},{once:!0})},{passive:!0})}else t.addEventListener("mousedown",e=>{if(![0,2].includes(e.button))return;if(!o.default.settings.animationsEnabled)return;if("0"===t.dataset.ripple||h(e))return;if(p)return void(p=!1);let{clientX:i,clientY:n}=e;d(i,n),window.addEventListener("mouseup",u,{once:!0,passive:!0}),window.addEventListener("contextmenu",u,{once:!0,passive:!0})},{passive:!0})}},20:function(t,e,i){"use strict";i.r(e);var n=i(33),s=i(38),a=i(16),o=i(74),r=i(57),l=i(31),c=i(90),u=i(96),d=i(29),h=i(14),p=i(83),m=i(4),g=i(28),f=i(116),v=i(34),b=i(53);let w;const y=new r.a("page-password",!0,()=>{const t=new p.a({className:"page-password",withInputWrapper:!0,titleLangKey:"Login.Password.Title",subtitleLangKey:"Login.Password.Subtitle"}),e=Object(l.a)("btn-primary btn-color-primary"),a=new h.default.IntlElement({key:"Login.Next"});e.append(a.element);const r=new c.a({label:"LoginPassword",name:"password"});let y;w=r.input,t.inputWrapper.append(r.container,e);let L,E=()=>(y||(y=window.setInterval(E,1e4)),o.a.getState().then(t=>{L=t,L.hint?Object(v.a)(r.label,Object(f.a)(d.b.wrapEmojiText(L.hint))):r.setLabel()}));const k=t=>{if(t&&Object(m.a)(t),!w.value.length)return void w.classList.add("error");const s=Object(b.a)([w,e],!0);let l=w.value;a.update({key:"PleaseWait"});const c=Object(n.f)(e);o.a.check(l,L).then(t=>{switch(t._){case"auth.authorization":clearInterval(y),i.e(5).then(i.bind(null,18)).then(t=>{t.default.mount()}),T&&T.remove();break;default:e.removeAttribute("disabled"),a.update({key:t._}),c.remove()}}).catch(t=>{s(),r.input.classList.add("error"),t.type,a.update({key:"PASSWORD_HASH_INVALID"}),w.select(),c.remove(),E()})};Object(g.b)(e,k),w.addEventListener("keypress",(function(t){if(this.classList.remove("error"),a.update({key:"Login.Next"}),"Enter"===t.key)return k()}));const x=s.b.isMobile?100:166,T=new u.a(r,x);return t.imageDiv.append(T.container),Promise.all([T.load(),E()])},null,()=>{w.focus(),a.default.pushToState("authState",{_:"authStatePassword"})});e.default=y},28:function(t,e,i){"use strict";i.d(e,"a",(function(){return a})),i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return r})),i.d(e,"d",(function(){return l}));var n=i(1),s=i(46);const a=n.isTouchSupported?"mousedown":"click";function o(t,e,i={}){const n=i.listenerSetter?i.listenerSetter.add(t):t.addEventListener.bind(t);i.touchMouseDown=!0,n(a,e,i)}function r(t,e,i){t.removeEventListener(a,e,i)}function l(t){Object(s.a)(t,a)}},31:function(t,e,i){"use strict";var n=i(14),s=i(17);e.a=(t,e={})=>{const i=document.createElement(e.asDiv?"div":"button");return i.className=t+(e.icon?" tgico-"+e.icon:""),e.noRipple||(e.rippleSquare&&i.classList.add("rp-square"),Object(s.ripple)(i)),e.onlyMobile&&i.classList.add("only-handhelds"),e.disabled&&i.setAttribute("disabled","true"),e.text&&i.append(Object(n.i18n)(e.text)),i}},33:function(t,e,i){"use strict";i.d(e,"f",(function(){return d})),i.d(e,"g",(function(){return h})),i.d(e,"c",(function(){return g})),i.d(e,"d",(function(){return w})),i.d(e,"e",(function(){return y})),i.d(e,"b",(function(){return k})),i.d(e,"a",(function(){return x}));var n=i(27),s=i(4),a=i(28),o=i(38),r=i(1),l=i(0),c=i(15),u=i(44);function d(t,e=!1){const i='\n <svg xmlns="http://www.w3.org/2000/svg" class="preloader-circular" viewBox="25 25 50 50">\n <circle class="preloader-path" cx="50" cy="50" r="20" fill="none" stroke-miterlimit="10"/>\n </svg>';if(e){const e=document.createElement("div");return e.classList.add("preloader"),e.innerHTML=i,t&&t.appendChild(e),e}return t.insertAdjacentHTML("beforeend",i),t.lastElementChild}function h(t,e="check"){return t.classList.remove("tgico-"+e),t.disabled=!0,d(t),()=>{t.innerHTML="",t.classList.add("tgico-"+e),t.removeAttribute("disabled")}}n.a.putPreloader=d;let p=t=>{let e=f.getBoundingClientRect(),{clientX:i,clientY:n}=t,s=i>=e.right?i-e.right:e.left-i,a=n>=e.bottom?n-e.bottom:e.top-n;(s>=100||a>=100)&&g()};const m=t=>{g()},g=()=>{f&&(f.classList.remove("active"),f.parentElement.classList.remove("menu-open"),b&&b.remove(),f=null,c.default.dispatchEvent("context_menu_toggle",!1)),v&&(v(),v=null),r.isTouchSupported||(window.removeEventListener("mousemove",p),window.removeEventListener("contextmenu",m)),document.removeEventListener(a.a,m),l.isMobileSafari||u.a.removeByType("menu")};window.addEventListener("resize",()=>{f&&g()});let f=null,v=null,b=null;function w(t,e){g(),l.isMobileSafari||u.a.pushItem({type:"menu",onPop:t=>{g()}}),f=t,f.classList.add("active"),f.parentElement.classList.add("menu-open"),b||(b=document.createElement("div"),b.classList.add("btn-menu-overlay"),b.addEventListener(a.a,t=>{Object(s.a)(t),m()})),f.parentElement.insertBefore(b,f),v=e,r.isTouchSupported||(window.addEventListener("mousemove",p),window.addEventListener("contextmenu",m,{once:!0})),document.addEventListener(a.a,m),c.default.dispatchEvent("context_menu_toggle",!0)}function y({pageX:t,pageY:e},i,n){let{scrollWidth:s,scrollHeight:a}=i;const r=document.body.getBoundingClientRect(),l=r.width,c=r.height;n=o.b.isMobile?"right":"left";let u="top";const d={x:{left:t,right:t-s},intermediateX:"right"===n?8:l-s-8,y:{top:e,bottom:e-a},intermediateY:e<c/2?8:c-a-8},h={left:d.x.left+s+8<=l,right:d.x.right>=8},p={top:d.y.top+a+8<=c,bottom:d.y.bottom-8>=8};{let t;t=h[n]?d.x[n]:(n="center",d.intermediateX),i.style.left=t+"px"}{let t;t=p[u]?d.y[u]:(u="center",d.intermediateY),i.style.top=t+"px"}i.className=i.className.replace(/(top|center|bottom)-(left|center|right)/g,""),i.classList.add(("center"===u?u:"bottom")+"-"+("center"===n?n:"left"===n?"right":"left"))}let L=!1,E=0;function k(){E&&clearTimeout(E),E=window.setTimeout(()=>{E=0,L=!1},400),L=!0}function x(t,e,i){const n=i?i.add(t):t.addEventListener.bind(t),a=i?i.removeManual.bind(i,t):t.removeEventListener.bind(t);if(l.isApple&&r.isTouchSupported){let i;const o={capture:!0},r=()=>{clearTimeout(i),a("touchmove",r,o),a("touchend",r,o),a("touchcancel",r,o)};n("touchstart",a=>{a.touches.length>1?r():(n("touchmove",r,o),n("touchend",r,o),n("touchcancel",r,o),i=window.setTimeout(()=>{L?r():(e(a.touches[0]),r(),f&&t.addEventListener("touchend",s.a,{once:!0}))},400))})}else n("contextmenu",r.isTouchSupported?i=>{e(i),f&&t.addEventListener("touchend",s.a,{once:!0})}:e)}},34:function(t,e,i){"use strict";function n(t,e){if("string"==typeof e)return void(t.innerHTML=e);const i=t.firstChild;i?t.lastChild===i?i.replaceWith(e):(t.textContent="",t.append(e)):t.append(e)}i.d(e,"a",(function(){return n}))},37:function(t,e,i){"use strict";i.d(e,"a",(function(){return u}));var n=i(46),s=i(81),a=i(62),o=i(82),r=i(14),l=i(29);let c=()=>{document.addEventListener("paste",t=>{if(!Object(s.a)(t.target,'contenteditable="true"'))return;t.preventDefault();let e=(t.originalEvent||t).clipboardData.getData("text/plain"),i=l.b.parseEntities(e);i=i.filter(t=>"messageEntityEmoji"===t._||"messageEntityLinebreak"===t._),e=l.b.wrapRichText(e,{entities:i,noLinks:!0,wrappingDraft:!0}),window.document.execCommand("insertHTML",!1,e)}),c=null};var u;!function(t){t[t.Neutral=0]="Neutral",t[t.Valid=1]="Valid",t[t.Error=2]="Error"}(u||(u={}));e.b=class{constructor(t={}){this.options=t,this.container=document.createElement("div"),this.container.classList.add("input-field"),this.required=t.required,this.validate=t.validate,t.maxLength&&(t.showLengthOn=Math.min(40,Math.round(t.maxLength/3)));const{placeholder:e,maxLength:i,showLengthOn:n,name:s,plainText:l}=t;let u,d,h=t.label||t.labelText;if(l)this.container.innerHTML=`\n <input type="text" ${s?`name="${s}"`:""} autocomplete="off" ${h?'required=""':""} class="input-field-input">\n `,u=this.container.firstElementChild;else{c&&c(),this.container.innerHTML='\n <div contenteditable="true" class="input-field-input"></div>\n ',u=this.container.firstElementChild;const e=new MutationObserver(()=>{d&&d()});u.addEventListener("input",()=>{Object(o.a)(u)&&(u.innerHTML=""),this.inputFake&&(this.inputFake.innerHTML=u.innerHTML,this.onFakeInput())}),e.observe(u,{characterData:!0,childList:!0,subtree:!0}),t.animate&&(u.classList.add("scrollable","scrollable-y"),this.wasInputFakeClientHeight=0,this.inputFake=document.createElement("div"),this.inputFake.setAttribute("contenteditable","true"),this.inputFake.className=u.className+" input-field-input-fake")}if(u.setAttribute("dir","auto"),e&&(Object(r._i18n)(u,e,void 0,"placeholder"),this.inputFake&&Object(r._i18n)(this.inputFake,e,void 0,"placeholder")),h||e){const t=document.createElement("div");t.classList.add("input-field-border"),this.container.append(t)}if(h&&(this.label=document.createElement("label"),this.setLabel(),this.container.append(this.label)),i){const t=this.container.lastElementChild;let e=!1;d=()=>{const s=u.classList.contains("error"),o=l?u.value.length:[...Object(a.a)(u,!1).value].length,r=i-o,c=r<0;u.classList.toggle("error",c),c||r<=n?(this.setLabel(),t.append(` (${i-o})`),e||(e=!0)):(s&&!c||e)&&(this.setLabel(),e=!1)},u.addEventListener("input",d)}this.input=u}select(){this.input.value&&this.input.select()}setLabel(){this.label.textContent="",this.options.labelText?this.label.innerHTML=this.options.labelText:this.label.append(Object(r.i18n)(this.options.label,this.options.labelOptions))}onFakeInput(){const{scrollHeight:t,clientHeight:e}=this.inputFake;this.wasInputFakeClientHeight=e,this.input.style.height=t?t+"px":""}get value(){return this.options.plainText?this.input.value:Object(a.a)(this.input,!1).value}set value(t){this.setValueSilently(t,!1),Object(n.a)(this.input,"input")}setValueSilently(t,e=!0){this.options.plainText?this.input.value=t:(this.input.innerHTML=t,this.inputFake&&(this.inputFake.innerHTML=t,e&&this.onFakeInput()))}isChanged(){return this.value!==this.originalValue}isValid(){return!this.input.classList.contains("error")&&this.isChanged()&&(!this.validate||this.validate())&&(!this.required||!Object(o.a)(this.input))}setOriginalValue(t="",e=!1){this.originalValue=t,this.options.plainText||(t=l.b.wrapDraftText(t)),e?this.setValueSilently(t,!1):this.value=t}setState(t,e){e&&(this.label.textContent="",this.label.append(Object(r.i18n)(e,this.options.labelOptions))),this.input.classList.toggle("error",!!(t&u.Error)),this.input.classList.toggle("valid",!!(t&u.Valid))}setError(t){this.setState(u.Error,t)}}},44:function(t,e,i){"use strict";var n=i(27),s=i(0),a=i(40),o=i(36),r=i(6),l=i(4);const c=new class{constructor(){this.navigations=[],this.id=Date.now(),this.manual=!1,this.log=Object(a.b)("NC"),this.debug=!0,this.currentHash=window.location.hash;let t=!1;if(window.addEventListener("popstate",e=>{if(this.debug&&this.log("popstate",e,t),window.location.hash!==this.currentHash)return this.onHashChange&&this.onHashChange(),void this.replaceState();this.currentHash=window.location.hash;if(e.state!==this.id)return void this.pushState();const i=this.navigations.pop();i?(this.manual=!t,this.handleItem(i)):this.pushState()}),window.addEventListener("keydown",t=>{const e=this.navigations[this.navigations.length-1];e&&("Escape"!==t.key||e.onEscape&&!e.onEscape()||(Object(l.a)(t),this.back(e.type)))},{capture:!0,passive:!1}),s.isMobileSafari){const e={passive:!0};window.addEventListener("touchstart",i=>{if(i.touches.length>1)return;this.debug&&this.log("touchstart");const n=()=>{window.removeEventListener("touchend",r),window.removeEventListener("touchmove",a)};let s=!1;const a=t=>{this.debug&&this.log("touchmove"),t.touches.length>1?n():s=!0},r=e=>{this.debug&&this.log("touchend"),e.touches.length>1||!s||(t=!0,Object(o.a)().then(()=>{t=!1})),n()};window.addEventListener("touchend",r,e),window.addEventListener("touchmove",a,e)},e)}history.scrollRestoration="manual",this.pushState()}handleItem(t){const e=t.onPop(!!this.manual&&void 0);this.debug&&this.log("popstate, navigation:",t,this.navigations),!1===e?this.pushItem(t):t.noBlurOnPop||Object(r.a)(),this.manual=!1}findItemByType(t){for(let e=this.navigations.length-1;e>=0;--e){const i=this.navigations[e];if(i.type===t)return{item:i,index:e}}}back(t){if(t){const e=this.findItemByType(t);if(e)return this.manual=!0,this.navigations.splice(e.index,1),void this.handleItem(e.item)}history.back()}pushItem(t){this.navigations.push(t),this.debug&&this.log("pushstate",t,this.navigations),t.noHistory||this.pushState()}pushState(){this.manual=!1,history.pushState(this.id,"")}replaceState(){history.replaceState(this.id,"",location.origin+location.pathname)}removeItem(t){this.navigations.findAndSplice(e=>e===t)}removeByType(t,e=!1){for(let i=this.navigations.length-1;i>=0;--i){if(this.navigations[i].type===t&&(this.navigations.splice(i,1),e))break}}};n.a.appNavigationController=c,e.a=c},46:function(t,e,i){"use strict";function n(t,e){const i=new Event(e,{bubbles:!0,cancelable:!0});t.dispatchEvent(i)}i.d(e,"a",(function(){return n}))},52:function(t,e,i){"use strict";var n=i(36),s=i(41),a=i(27),o=i(55);const r=new class{constructor(){this.promises={},this.raf=n.b.bind(null),this.scheduled=!1}do(t,e){let i=this.promises[t];return i||(this.scheduleFlush(),i=this.promises[t]=Object(s.a)()),void 0!==e&&i.then(()=>e()),i}measure(t){return this.do("read",t)}mutate(t){return this.do("write",t)}mutateElement(t,e){const i=Object(o.a)(t)?this.mutate():Promise.resolve();return void 0!==e&&i.then(()=>e()),i}scheduleFlush(){this.scheduled||(this.scheduled=!0,this.raf(()=>{this.promises.read&&this.promises.read.resolve(),this.promises.write&&this.promises.write.resolve(),this.scheduled=!1,this.promises={}}))}};a.a&&(a.a.sequentialDom=r),e.a=r},53:function(t,e,i){"use strict";function n(t,e){return e?t.forEach(t=>t.setAttribute("disabled","true")):t.forEach(t=>t.removeAttribute("disabled")),()=>n(t,!e)}i.d(e,"a",(function(){return n}))},59:function(t,e,i){"use strict";var n=i(27),s=i(56),a=i(30);const o=new class{constructor(){this.serverTimeOffset=0,s.a.get("server_time_offset").then(t=>{t&&(this.serverTimeOffset=t)}),a.a.addTaskListener("applyServerTimeOffset",t=>{this.serverTimeOffset=t.payload})}};n.a&&(n.a.serverTimeManager=o),e.a=o},62:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i(27),s=i(29),a=i(79);function o(t,e=!0){const i=[],n=[],o=e?[]:void 0;Object(a.a)(t,i,n,void 0,void 0,o),n.length&&i.push(n.join(""));let r=i.join("\n");return r=r.replace(/\u00A0/g," "),o&&s.b.combineSameEntities(o),{value:r,entities:o}}n.a.getRichValue=o},74:function(t,e,i){"use strict";var n=i(27),s=i(35),a=i(30);const o=new class{getState(){return a.a.invokeApi("account.getPassword").then(t=>t)}updateSettings(t={}){return this.getState().then(e=>{let i,n;const s={password:null,new_settings:{_:"account.passwordInputSettings",hint:t.hint,email:t.email}};i=t.currentPassword?a.a.invokeCrypto("computeSRP",t.currentPassword,e,!1):Promise.resolve({_:"inputCheckPasswordEmpty"});const o=e.new_algo,r=new Uint8Array(o.salt1.length+32);return r.randomize(),r.set(o.salt1,0),o.salt1=r,n=t.newPassword?a.a.invokeCrypto("computeSRP",t.newPassword,e,!0):Promise.resolve(new Uint8Array),Promise.all([i,n]).then(t=>(s.password=t[0],s.new_settings.new_algo=o,s.new_settings.new_password_hash=t[1],a.a.invokeApi("account.updatePasswordSettings",s)))})}check(t,e,i={}){return a.a.invokeCrypto("computeSRP",t,e,!1).then(t=>a.a.invokeApi("auth.checkPassword",{password:t},i).then(t=>("auth.authorization"===t._&&(s.a.saveApiUser(t.user),a.a.setUserAuth(t.user.id)),t)))}confirmPasswordEmail(t){return a.a.invokeApi("account.confirmPasswordEmail",{code:t})}resendPasswordEmail(){return a.a.invokeApi("account.resendPasswordEmail")}cancelPasswordEmail(){return a.a.invokeApi("account.cancelPasswordEmail")}};n.a.passwordManager=o,e.a=o},79:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"a",(function(){return s}));const n={bold:{match:'[style*="font-weight"], b',entityName:"messageEntityBold"},underline:{match:'[style*="underline"], u',entityName:"messageEntityUnderline"},italic:{match:'[style*="italic"], i',entityName:"messageEntityItalic"},monospace:{match:'[style*="monospace"], [face="monospace"], pre',entityName:"messageEntityPre"},strikethrough:{match:'[style*="line-through"], strike',entityName:"messageEntityStrike"},link:{match:"A:not(.follow)",entityName:"messageEntityTextUrl"},mentionName:{match:"A.follow",entityName:"messageEntityMentionName"}};function s(t,e,i,a,o,r,l={offset:0}){if(3===t.nodeType){const e=t.nodeValue;if(a===t?i.push(e.substr(0,o)+""+e.substr(o)):i.push(e),r&&e.trim()&&t.parentNode){const i=t.parentElement;for(const t in n){const s=n[t],a=i.closest(s.match+", [contenteditable]");a&&null===a.getAttribute("contenteditable")&&("messageEntityTextUrl"===s.entityName?r.push({_:s.entityName,url:i.href,offset:l.offset,length:e.length}):"messageEntityMentionName"===s.entityName?r.push({_:s.entityName,offset:l.offset,length:e.length,user_id:+i.dataset.follow}):r.push({_:s.entityName,offset:l.offset,length:e.length}))}}return void(l.offset+=e.length)}if(1!==t.nodeType)return;const c=a===t,u="DIV"===t.tagName||"P"===t.tagName;if(u&&i.length||"BR"===t.tagName)e.push(i.join("")),i.splice(0,i.length);else if("IMG"===t.tagName){const e=t.alt;e&&(i.push(e),l.offset+=e.length)}c&&!o&&i.push("");let d=t.firstChild;for(;d;)s(d,e,i,a,o,r,l),d=d.nextSibling;c&&o&&i.push(""),u&&i.length&&(e.push(i.join("")),i.splice(0,i.length))}},81:function(t,e,i){"use strict";function n(t,e){return t.closest(`[${e}]`)}i.d(e,"a",(function(){return n}))},82:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i(62);function s(t){return t.hasAttribute("contenteditable")||"INPUT"!==t.tagName?!Object(n.a)(t,!1).value.trim():!t.value.trim()}},83:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i(14);class s{constructor(t){this.element=document.body.querySelector("."+t.className),this.container=document.createElement("div"),this.container.className="container center-align",this.imageDiv=document.createElement("div"),this.imageDiv.className="auth-image",this.title=document.createElement("h4"),t.titleLangKey&&this.title.append(Object(n.i18n)(t.titleLangKey)),this.subtitle=document.createElement("p"),this.subtitle.className="subtitle",t.subtitleLangKey&&this.subtitle.append(Object(n.i18n)(t.subtitleLangKey)),this.container.append(this.imageDiv,this.title,this.subtitle),t.withInputWrapper&&(this.inputWrapper=document.createElement("div"),this.inputWrapper.className="input-wrapper",this.container.append(this.inputWrapper)),this.element.append(this.container)}}},89:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i(14);const s=new Map;let a=0;const o=(t,e,i="")=>{i=e.country_code+i,a=Math.max(a,i.length),s.set(i,{country:t,code:e})};function r(t){s.size||n.default.countriesList.forEach(t=>{t.country_codes.forEach(e=>{e.prefixes?e.prefixes.forEach(i=>{o(t,e,i)}):o(t,e)})});let e,i=t.replace(/\D/g,""),r=i.slice(0,a);for(let t=r.length-1;t>=0&&(e=s.get(r.slice(0,t+1)),!e);--t);if(!e)return{formatted:i,country:void 0,code:void 0,leftPattern:""};const l=e.country,c=e.code.patterns||[],u=i.slice(e.code.country_code.length);let d="",h=0,p="";for(let t=c.length-1;t>=0;--t){d=c[t];const e=d.replace(/ /g,"");let i=0;for(let t=0,n=Math.min(u.length,e.length);t<n;++t){if(u[t]!==e[t]&&"X"!==e[t]){i=0;break}++i}i>h&&(h=i,p=d)}d=p||d,d=d.replace(/\d/g,"X"),d=e.code.country_code+" "+d,d.split("").forEach((t,e)=>{" "===t&&" "!==i[e]&&i.length>e&&(i=i.slice(0,e)+" "+i.slice(e))});let m=d&&d.length>i.length?d.slice(i.length):"";return m&&(m=m.replace(/X/g,"")),{formatted:i,country:l,code:e.code,leftPattern:m}}},90:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i(4),s=i(37);class a extends s.b{constructor(t={}){super(Object.assign({plainText:!0},t)),this.passwordVisible=!1,this.onVisibilityClick=t=>{Object(n.a)(t),this.passwordVisible=!this.passwordVisible,this.toggleVisible.classList.toggle("eye-hidden",this.passwordVisible),this.input.type=this.passwordVisible?"text":"password",this.onVisibilityClickAdditional&&this.onVisibilityClickAdditional()};const e=this.input;e.type="password",e.setAttribute("required",""),e.autocomplete="off";const i=document.createElement("input");i.classList.add("stealthy"),i.tabIndex=-1,i.type="password",e.parentElement.prepend(i),e.parentElement.insertBefore(i.cloneNode(),e.nextSibling);const s=this.toggleVisible=document.createElement("span");s.classList.add("toggle-visible","tgico"),this.container.classList.add("input-field-password"),this.container.append(s),s.addEventListener("click",this.onVisibilityClick),s.addEventListener("touchend",this.onVisibilityClick)}}},96:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i(47);class s{constructor(t,e){this.passwordInputField=t,this.size=e,this.needFrame=0,this.container=document.createElement("div"),this.container.classList.add("media-sticker-wrapper")}load(){return this.loadPromise?this.loadPromise:this.loadPromise=n.b.loadAnimationFromURL({container:this.container,loop:!1,autoplay:!1,width:this.size,height:this.size,noCache:!0},"assets/img/TwoFactorSetupMonkeyPeek.tgs").then(t=>(this.animation=t,this.animation.addEventListener("enterFrame",t=>{(1===this.animation.direction&&t>=this.needFrame||-1===this.animation.direction&&t<=this.needFrame)&&(this.animation.setSpeed(1),this.animation.pause())}),this.passwordInputField.onVisibilityClickAdditional=()=>{this.passwordInputField.passwordVisible?(this.animation.setDirection(1),this.animation.curFrame=0,this.needFrame=16,this.animation.play()):(this.animation.setDirection(-1),this.animation.curFrame=16,this.needFrame=0,this.animation.play())},n.b.waitForFirstFrame(t)))}remove(){this.animation&&this.animation.remove()}}}}]);
//# sourceMappingURL=12.123d1a86332173c32d35.chunk.js.map