Path: blob/master/phs/UberEats-Phishing/otp_files/client.js
996 views
// An UI change targeting on 5/18/2018 will show relying party's privacy1// policy URL and terms of service URL inside the one-tap UI for new users.2// If enabled, SHOW_RP_TOS can be found in GOOGLE_ONETAP_EXPERIMENTAL_FEATURES array.3// There is another UI change that moves the two URLs into a popup confirmation4// dialog. If enabled, DISPLAY_CLICKJACKING_POPUP can be found in the experimental5// feature array.67var GOOGLE_ONETAP_EXPERIMENTAL_FEATURES = ['DISPLAY_RP_TOS'];89var PROVIDER_URL_BASE = 'https://smartlock.google.com/iframe/request';10(function(){/*11@license12OpenYOLO for Web13Copyright 2017 The OpenYOLO for Web Authors. All Rights Reserved.1415Licensed under the Apache License, Version 2.0 (the "License");16you may not use this file except in compliance with the License.17You may obtain a copy of the License at1819http://www.apache.org/licenses/LICENSE-2.02021Unless required by applicable law or agreed to in writing, software22distributed under the License is distributed on an "AS IS" BASIS,23WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.24See the License for the specific language governing permissions and25limitations under the License.2627-----------------------------------------------------------------------------2829This file also contains code imported from tslib30https://github.com/Microsoft/tslib3132Licensed under the Apache License, Version 2.0 (the "License");33you may not use this file except in compliance with the License.34You may obtain a copy of the License at3536http://www.apache.org/licenses/LICENSE-2.03738Unless required by applicable law or agreed to in writing, software39distributed under the License is distributed on an "AS IS" BASIS,40WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.41See the License for the specific language governing permissions and42limitations under the License.43*****************************************************************************44Copyright (c) Microsoft Corporation. All rights reserved.45Licensed under the Apache License, Version 2.0 (the "License"); you may not use46this file except in compliance with the License. You may obtain a copy of the47License at http://www.apache.org/licenses/LICENSE-2.04849THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY50KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED51WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,52MERCHANTABLITY OR NON-INFRINGEMENT.5354See the Apache Version 2.0 License for specific language governing permissions55and limitations under the License.56*****************************************************************************/57var w="function"==typeof Object.defineProperties?Object.defineProperty:function(g,d,f){g!=Array.prototype&&g!=Object.prototype&&(g[d]=f.value)},D="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function F(g,d){if(d){for(var f=D,h=g.split("."),r=0;r<h.length-1;r++){var c=h[r];c in f||(f[c]={});f=f[c]}h=h[h.length-1];r=f[h];c=d(r);c!=r&&null!=c&&w(f,h,{configurable:!0,writable:!0,value:c})}}58F("Object.setPrototypeOf",function(g){return g?g:"object"!=typeof"".__proto__?null:function(d,f){d.__proto__=f;if(d.__proto__!==f)throw new TypeError(d+" is not extensible");return d}});F("Object.assign",function(g){return g?g:function(d,f){for(var h=1;h<arguments.length;h++){var g=arguments[h];if(g)for(var c in g)Object.prototype.hasOwnProperty.call(g,c)&&(d[c]=g[c])}return d}});function J(){J=function(){};D.Symbol||(D.Symbol=K)}var L=0;function K(g){return"jscomp_symbol_"+(g||"")+L++}59function M(){J();var g=D.Symbol.iterator;g||(g=D.Symbol.iterator=D.Symbol("iterator"));"function"!=typeof Array.prototype[g]&&w(Array.prototype,g,{configurable:!0,writable:!0,value:function(){return W(this)}});M=function(){}}function W(g){var d=0;return X(function(){return d<g.length?{done:!1,value:g[d++]}:{done:!0}})}function X(g){M();g={next:g};g[D.Symbol.iterator]=function(){return this};return g}function Y(g){M();var d=g[Symbol.iterator];return d?d.call(g):W(g)}60F("Promise",function(g){function d(c){this.i=0;this.R=void 0;this.c=[];var d=this.O();try{c(d.resolve,d.reject)}catch(v){d.reject(v)}}function f(){this.c=null}if(g)return g;f.prototype.i=function(c){this.c||(this.c=[],this.O());this.c.push(c)};f.prototype.O=function(){var c=this;this.v(function(){c.R()})};var h=D.setTimeout;f.prototype.v=function(c){h(c,0)};f.prototype.R=function(){for(;this.c&&this.c.length;){var c=this.c;this.c=[];for(var d=0;d<c.length;++d){var f=c[d];delete c[d];try{f()}catch(A){this.P(A)}}}this.c=61null};f.prototype.P=function(c){this.v(function(){throw c;})};d.prototype.O=function(){function c(c){return function(h){f||(f=!0,c.call(d,h))}}var d=this,f=!1;return{resolve:c(this.ya),reject:c(this.P)}};d.prototype.ya=function(c){if(c===this)this.P(new TypeError("A Promise cannot resolve to itself"));else if(c instanceof d)this.Ca(c);else{a:switch(typeof c){case "object":var f=null!=c;break a;case "function":f=!0;break a;default:f=!1}f?this.wa(c):this.ia(c)}};d.prototype.wa=function(c){var d=void 0;62try{d=c.then}catch(v){this.P(v);return}"function"==typeof d?this.Da(d,c):this.ia(c)};d.prototype.P=function(c){this.ja(2,c)};d.prototype.ia=function(c){this.ja(1,c)};d.prototype.ja=function(c,d){if(0!=this.i)throw Error("Cannot settle("+c+", "+d|"): Promise already settled in state"+this.i);this.i=c;this.R=d;this.va()};d.prototype.va=function(){if(this.c){for(var c=this.c,d=0;d<c.length;++d)c[d].call(),c[d]=null;this.c=null}};var r=new f;d.prototype.Ca=function(d){var c=this.O();d.v(c.resolve,c.reject)};63d.prototype.Da=function(d,f){var c=this.O();try{d.call(f,c.resolve,c.reject)}catch(A){c.reject(A)}};d.prototype.then=function(c,f){function h(d,c){return"function"==typeof d?function(c){try{g(d(c))}catch(x){n(x)}}:c}var g,n,r=new d(function(d,c){g=d;n=c});this.v(h(c,g),h(f,n));return r};d.prototype["catch"]=function(d){return this.then(void 0,d)};d.prototype.v=function(d,f){function c(){switch(h.i){case 1:d(h.R);break;case 2:f(h.R);break;default:throw Error("Unexpected state: "+h.i);}}var h=this;64this.c?this.c.push(function(){r.i(c)}):r.i(c)};d.resolve=function(c){return c instanceof d?c:new d(function(d){d(c)})};d.reject=function(c){return new d(function(d,f){f(c)})};d.race=function(c){return new d(function(f,h){for(var g=Y(c),n=g.next();!n.done;n=g.next())d.resolve(n.value).v(f,h)})};d.c=function(c){var f=Y(c),h=f.next();return h.done?d.resolve([]):new d(function(c,g){function n(d){return function(f){r[d]=f;t--;t||c(r)}}var r=[],t=0;do r.push(void 0),t++,d.resolve(h.value).v(n(r.length-651),g),h=f.next();while(!h.done)})};d.$jscomp$new$AsyncExecutor=function(){return new f};return d});66F("String.prototype.startsWith",function(g){return g?g:function(d,f){if(null==this)throw new TypeError("The 'this' value for String.prototype.startsWith must not be null or undefined");if(d instanceof RegExp)throw new TypeError("First argument to String.prototype.startsWith must not be a regular expression");var h=this+"";d+="";for(var g=h.length,c=d.length,n=Math.max(0,Math.min(f|0,h.length)),v=0;v<c&&n<g;)if(h[n++]!=d[v++])return!1;return v>=c}});67(function(g){function d(a,b){function e(){this.constructor=a}Z(a,b);a.prototype=null===b?Object.create(b):(e.prototype=b.prototype,new e)}function f(a,b){var e=void 0;return new (e||(e=Promise))(function(l,k){function u(a){try{c(b.next(a))}catch(H){k(H)}}function d(a){try{c(b["throw"](a))}catch(H){k(H)}}function c(b){b.done?l(b.value):(new e(function(a){a(b.value)})).then(u,d)}c((b=b.apply(a,[])).next())})}function h(a,b){function e(b){return function(a){return l([b,a])}}function l(e){if(u)throw new TypeError("Generator is already executing.");68for(;k;)try{if(u=1,d&&(c=d[e[0]&2?"return":e[0]?"throw":"next"])&&!(c=c.call(d,e[1])).done)return c;if(d=0,c)e=[0,c.value];switch(e[0]){case 0:case 1:c=e;break;case 4:return k.label++,{value:e[1],done:!1};case 5:k.label++;d=e[1];e=[0];continue;case 7:e=k.la.pop();k.g.pop();continue;default:if(!(c=k.g,c=0<c.length&&c[c.length-1])&&(6===e[0]||2===e[0])){k=0;continue}if(3===e[0]&&(!c||e[1]>c[0]&&e[1]<c[3]))k.label=e[1];else if(6===e[0]&&k.label<c[1])k.label=c[1],c=e;else if(c&&k.label<c[2])k.label=c[2],69k.la.push(e);else{c[2]&&k.la.pop();k.g.pop();continue}}e=b.call(a,k)}catch(aa){e=[6,aa],d=0}finally{u=c=0}if(e[0]&5)throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}var k={label:0,a:function(){if(c[0]&1)throw c[1];return c[1]},g:[],la:[]},u,d,c,f;return f={next:e(0),"throw":e(1),"return":e(2)},"function"===typeof Symbol&&(f[Symbol.iterator]=function(){return this}),f}function r(a){a=ba.exec(a);if(!a)return null;var b={scheme:a[1],W:a[2]};a[3]&&(b.query=a[3]);a[4]&&(b.Ma=a[4]);return b}function c(a){return"undefined"===70typeof a}function n(a){return"string"===typeof a&&0<a.length}function v(a){return"boolean"===typeof a}function A(a){if(!n(a))return!1;a=r(a);var b;(b=!a||a.query||a.Ma||!a.W.startsWith("//"))||(b=a.W.indexOf("/",a.W.startsWith("//")?2:0),b=0>b?null:a.W.substring(b));return b?!1:!0}function G(a){var b;!(b=!(a&&"object"===typeof a)||!n(a.id)||!A(a.authMethod)||"authDomain"in a&&!A(a.authDomain)||"password"in a&&!n(a.password)||"displayName"in a&&!n(a.displayName))&&(b="profilePicture"in a)&&(b=a.profilePicture,71n(b)?(b=r(b),b=!b||"http"!==b.scheme&&"https"!==b.scheme||!b.W.startsWith("//")?!1:!!b):b=!1,b=!b);return b||"exchangeToken"in a&&!n(a.exchangeToken)||"idToken"in a&&!n(a.idToken)||"generatedPassword"in a&&!n(a.generatedPassword)||"proxiedAuthRequired"in a&&!v(a.proxiedAuthRequired)?!1:!0}function O(){return!0}function N(){return!0}function t(a){return function(b){return!!b&&"object"===typeof b&&"id"in b&&"string"===typeof b.id&&a(b.args)}}function z(a,b,e){return{type:a,data:{id:b,args:e,ack:!1}}}72function x(a,b){function e(e){var k=e.data;if(!(k&&"object"===typeof k&&"type"in k&&"data"in k&&e.data.type===a&&(0,ca[a])(e.data.data)))return!1;b(e.data.data,e.data.type,e);return!0}e.toString=function(){return a+" message listener"};return e}function P(){var a=new Uint32Array(2);window.crypto.getRandomValues(a);return a[0].toString(16)+a[1].toString(16)}function Q(a){return f(this,function(){var b,e;return h(this,function(l){switch(l.label){case 0:if(!I)return[2,Promise.resolve(a)];if("undefined"!==73typeof TextEncoder)var k=(new TextEncoder("utf-8")).encode(a);else{k=[];for(var c=0,d=0;d<a.length;d++){var f=a.charCodeAt(d);128>f?k[c++]=f:2048>f?(k[c++]=f>>6|192,k[c++]=f&63|128):55296===(f&64512)&&d+1<a.length&&56320===(a.charCodeAt(d+1)&64512)?(f=65536+((f&1023)<<10)+(a.charCodeAt(++d)&1023),k[c++]=f>>18|240,k[c++]=f>>12&63|128,k[c++]=f>>6&63|128,k[c++]=f&63|128):(k[c++]=f>>12|224,k[c++]=f>>6&63|128,k[c++]=f&63|128)}k=new Uint8Array(k)}b=k;l.label=1;case 1:return l.g.push([1,3,,4]),[4,I.digest("SHA-256",74b)];case 2:e=l.a();l=[];k=new DataView(e);for(c=0;c<k.byteLength;c+=4)d=("00000000"+k.getUint32(c).toString(16)).slice(-8),l.push(d);return[2,l.join("")];case 3:return l.a(),[2,Promise.resolve(a)];case 4:return[2]}})})}function R(a){var b=Object.keys(a).reduce(function(b,l){b[l]=a[l].l;return b},Object.create(null));return Object.freeze(b)}function da(){var a=window;E&&a.removeEventListener("message",E);E=x("verifyPing",function(b,a,l){l.source.postMessage({type:"verifyAck",data:b},l.origin||"*")});75a.addEventListener("message",E)}var q=function(){function a(b){this.data=b;this.name="OpenYoloInternalError";this.message=b.message}a.prototype.h=function(){return y.ha(this.$a())};a.prototype.$a=function(){return{type:this.data.f,message:this.data.code+": "+this.data.message}};a.i=function(){return new a({code:"ackTimeout",f:"initializationError",message:"A parent frame failed to acknowledge the handshake. This can be due, in nested context, to the absence of the handshake responder library."})};76a.R=function(){return new a({code:"establishSecureChannelTimeout",f:"initializationError",message:"The Secure Channel failed to initialize in a timely manner. This can be due to network latency or a wrong configuration."})};a.wa=function(){return new a({code:"parentVerifyTimeout",f:"initializationError",message:"The credentials provider frame failed to verify the ancestor frames in a timely manner."})};a.ua=function(b){return new a({code:"illegalStateError",f:"initializationError",message:"An internal error happened: "+77b})};a.Ca=function(){return new a({code:"providerInitializationFailed",f:"initializationError",message:"The credentials provider frame failed to initialize."})};a.v=function(){return new a({code:"apiDisabled",f:"initializationError",message:"The API has been disabled by the user\u2019s preference or has not been enabled in the OpenYolo configuration."})};a.eb=function(b){return new a({code:"untrustedOrigin",f:"configurationError",message:"A parent frame does not belong to an authorized origin. "+78("Ensure the configuration of OpenYolo contains '"+b+"'.")})};a.va=function(){return new a({code:"parentIsNotRoot",f:"configurationError",message:"The caller window is an IFrame which is not authorized in OpenYoloconfiguration."})};a.fb=function(){return new a({code:"userCanceled",f:"userCanceled",message:"The user canceled the operation."})};a.aa=function(){return new a({code:"noCredentialsAvailable",f:"noCredentialsAvailable",message:"No credential is available for the current user."})};a.ja=function(){return new a({code:"operationCanceled",79f:"operationCanceled",message:"The operation was canceled."})};a.Ka=function(){return new a({code:"clientDisposed",f:"clientDisposed",message:"The API has been disposed from the current context."})};a.S=function(b){return new a({code:"requestFailed",f:"requestFailed",message:"The API request failed to resolve: "+b})};a.Va=function(){return new a({code:"requestTimeout",f:"requestFailed",message:"The API request timed out."})};a.Wa=function(){return new a({code:"requestTimeout",f:"requestFailed",message:"The API request timed out. This may occur when error is returned upon initialization. If you are using Google Yolo, this error could happen if you haven't registered the origin with your OAuth client."})};80a.ia=function(){return new a({code:"illegalConcurrentRequest",f:"illegalConcurrentRequest",message:"The request could not be resolved because another operation is currently pending."})};a.Da=function(b){return new a({code:"unknownRequest",f:"requestFailed",message:"The '"+b+"' request sent could not be handled by the credentials provider."})};a.O=function(){return new a({code:"browserWrappingRequired",f:"browserWrappingRequired",message:"The current request requires using navigator.credentials."})};81a.cb=function(){return new a({code:"unsupportedBrowser",f:"unsupportedBrowser",message:"Unsupported browser - API disabled"})};a.ab=function(){return new a({code:"unknownError",f:"unknownError",message:"Unknown error."})};a.P=function(b,a){return"data"in b?b.data.code===a:!1};return a}(),y=function(){function a(b,a){this.type=a;this.name="OpenYoloError";this.message=b}a.ha=function(b){return new a(b.message,b.type)};return a}(),Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=82b}||function(a,b){for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e])},ba=/^(?:([^:/?#]+):)((?:\/\/)?[^?#]*)(?:\\?([^#]*))?(?:#([^?]*))?$/,ca=(Object.assign||function(a){for(var b,e=1,l=arguments.length;e<l;e++){b=arguments[e];for(var k in b)Object.prototype.hasOwnProperty.call(b,k)&&(a[k]=b[k])}return a})({},{ack:n,verifyPing:n,verifyAck:n,readyForConnect:n,channelConnect:n,channelReady:n,channelError:N},{disableAutoSignIn:t(c),disableAutoSignInResult:t(c),retrieve:t(function(){return!0}),hintAvailable:t(O),83hintAvailableResult:t(v),hint:t(O),save:t(G),saveResult:t(v),proxy:t(G),proxyResult:t(function(){return!0}),showProvider:t(function(){return!0}),credential:t(G),error:t(N),cancelLastOperation:t(c),cancelLastOperationResult:t(c)}),I=null;window.crypto&&(I=window.crypto.subtle||window.crypto.webkitSubtle);var B=function(){function a(){var b=this;this.K=new Promise(function(a,l){b.ma=a;b.ca=l})}a.prototype.resolve=function(b){if(!this.ma)throw Error("Promise Resolver already disposed.");this.ma(b);this.dispose()};84a.prototype.reject=function(b){if(!this.ca)throw Error("Promise Resolver already disposed.");this.ca(b);this.dispose()};a.prototype.dispose=function(){this.ca=this.ma=null};return a}(),ea=function(a){function b(b,l){var e=a.call(this)||this;e.Xa=b;e.Ba=!0;e.Ya=setTimeout(e.Za.bind(e),l);return e}d(b,a);b.prototype.resolve=function(b){a.prototype.resolve.call(this,b);this.clear()};b.prototype.reject=function(b){a.prototype.reject.call(this,b);this.clear()};b.prototype.clear=function(){clearTimeout(this.Ya)};85b.prototype.s=function(){return!this.Ba};b.prototype.Za=function(){this.ca&&(this.Ba=!1,this.reject(this.Xa))};return b}(B);(function(a){function b(){return a.call(this)||this}d(b,a);b.prototype.cancel=function(){this.reject(b.i)};b.c="CancellablePromise { Operation Cancelled }";b.i=Error(b.c);return b})(B);var fa=function(){return function(){this.name="TimeoutRacerError";this.message="The timeout has expired."}}(),ga=function(){function a(b){this.error=new fa;this.da=new ea(this.error,b)}a.prototype.race=86function(b){return Promise.race([this.da.K,b])};a.prototype.stop=function(){this.da.clear()};a.prototype.s=function(){return this.da.s()};a.prototype.na=function(b){if(b!==this.error)throw b;};a.prototype.dispose=function(){this.da.dispose()};return a}(),S=function(){function a(){}a.prototype.race=function(b){return b};a.prototype.stop=function(){};a.prototype.s=function(){return!1};a.prototype.na=function(b){throw b;};a.prototype.dispose=function(){};return a}(),ha=function(){function a(b){var a=87this;this.port=b;this.J=[];this.ga=[];this.xa=function(b){for(var e=!1,l=0;l<a.J.length;l++){var c=a.J[l];c&&(e=!!c.Sa(b)||e)}if(!e)for(l=0;l<a.ga.length;l++)a.ga[l](b)};this.port.addEventListener("message",this.xa);this.port.start()}a.Ja=function(b,e,l){var k=window;return f(this,function(){var c,d,f,g,m;return h(this,function(u){switch(u.label){case 0:return[4,a.c(k,l)];case 1:u.a(),c=new MessageChannel,d=new B,f=x("channelReady",function(){d.resolve()}),g=x("channelError",function(b){d.reject(y.ha(b))}),88k.addEventListener("message",f),k.addEventListener("message",g),b.postMessage({type:"channelConnect",data:e},"*",[c.port2]),u.label=2;case 2:return u.g.push([2,4,5,6]),[4,d.K];case 3:return u.a(),[2,new a(c.port1)];case 4:throw m=u.a(),c.port1.close(),m;case 5:return k.removeEventListener("message",f),k.removeEventListener("message",g),[7];case 6:return[2]}})})};a.c=function(b,a){var e=new B,c=x("readyForConnect",function(b){a===b&&e.resolve()});b.addEventListener("message",c);e.K.then(function(){b.removeEventListener("message",89c)},function(){b.removeEventListener("message",c)});return e.K};a.ya=function(b,e,c){return f(this,function(){var k,l,d;return h(this,function(){k=null;l=new B;d=x("channelConnect",function(d,u,g){return f(this,function(){var f;return h(this,function(u){switch(u.label){case 0:return"string"!==typeof d?[2]:[4,Q(d)];case 1:f=u.a();if(f!==c)return[2];if(-1===e.indexOf(g.origin))return l.reject(q.eb(g.origin)),[2];if(!g.ports)return l.reject(q.ua("channel initialization message does not contain ports")),90[2];k=g.ports[0];b.parent.postMessage({type:"channelReady",data:c},g.origin);l.resolve(new a(k));return[2]}})})});b.addEventListener("message",d);l.K.then(function(){b.removeEventListener("message",d)},function(){b.removeEventListener("message",d)});b.parent.postMessage({type:"readyForConnect",data:c},"*");return[2,l.K]})})};a.prototype.send=function(b){this.port.postMessage(b)};a.prototype.Qa=function(b,a){var e=this;if(!b||!a)throw q.ua("invalid type or listener");this.J.push({Sa:x(b,function(b,91c,l){b.ack&&e.port.postMessage({type:"ack",data:b.id});a(b,c,l)}),qb:a});return this.J.length-1};a.prototype.bb=function(b){this.J[b]&&(this.J[b]=null)};a.prototype.dispose=function(){this.port.removeEventListener("message",this.xa);this.J=[];this.ga=[];this.port.close()};return a}(),m=function(){function a(b,a,c){void 0===c&&(c=P());this.frame=b;this.channel=a;this.id=c;this.ba=new B;this.ka=[];this.U=!1;this.Y=null}a.prototype.B=function(b,a){return f(this,function(){var e;return h(this,function(c){switch(c.label){case 0:this.Y=92a||new S,this.Ua(),this.G(b),c.label=1;case 1:return c.g.push([1,3,,4]),[4,this.Y.race(this.ba.K)];case 2:return[2,c.a()];case 3:throw e=c.a(),this.Y.na(e),this.frame.$(),this.dispose(),q.Va().h();case 4:return[2]}})})};a.prototype.Ua=function(){var b=this;this.u("error",function(a){b.reject(a?y.ha(a):q.ab().h());b.dispose()});this.u("showProvider",function(a){b.clearTimeout();b.frame.display(a)})};a.prototype.resolve=function(b){this.ba.resolve(b);this.frame.$()};a.prototype.reject=function(b){this.ba.reject(b);93"illegalConcurrentRequest"!==b.type&&this.frame.$()};a.prototype.u=function(b,a){function e(e,l,d){if(e.id!==c.id)return!1;a(e.args,b,d);return!0}var c=this;e.toString=function(){return b+" message handler"};this.ka.push(this.channel.Qa(b,e))};a.prototype.Ia=function(){var b=this;this.ka.forEach(function(a){b.channel.bb(a)});this.ka=[]};a.prototype.clearTimeout=function(){null!==this.Y&&this.Y.stop()};a.prototype.dispose=function(){this.U||(this.clearTimeout(),this.Ia(),this.ba.dispose(),this.U=!0)};94return a}(),T=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}d(b,a);b.prototype.G=function(){var b=this;this.u("cancelLastOperationResult",function(){return b.V()});this.channel.send(z("cancelLastOperation",this.id,void 0))};b.prototype.V=function(){this.resolve();this.dispose()};return b}(m),ia=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}d(b,a);b.prototype.G=function(b){var a=this;this.u("credential",function(b){return a.V(b)});this.channel.send(z("retrieve",95this.id,b))};b.prototype.V=function(b){this.resolve(b);this.dispose()};return b}(m),ja=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}d(b,a);b.prototype.G=function(b){var a=this;this.u("saveResult",function(b){b?a.resolve():a.reject(q.fb().h());a.dispose()});this.channel.send(z("save",this.id,b))};return b}(m),ka=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}d(b,a);b.prototype.G=function(){var b=this;this.u("disableAutoSignInResult",function(){b.resolve();96b.dispose()});this.channel.send(z("disableAutoSignIn",this.id,void 0))};return b}(m),la=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}d(b,a);b.prototype.G=function(b){var a=this;this.u("hintAvailableResult",function(b){a.resolve(b);a.dispose()});this.channel.send(z("hintAvailable",this.id,b))};return b}(m),ma=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}d(b,a);b.prototype.G=function(b){var a=this;this.u("credential",function(b){return a.V(b)});97this.channel.send(z("hint",this.id,b))};b.prototype.V=function(b){this.resolve(b);this.dispose()};return b}(m),C=R({Z:{l:"openyolo://id-and-password"},Ea:{l:"https://accounts.google.com"},hb:{l:"https://www.facebook.com"},ib:{l:"https://www.linkedin.com"},Fa:{l:"https://login.live.com"},kb:{l:"https://www.paypal.com"},mb:{l:"https://twitter.com"},nb:{l:"https://login.yahoo.com"}}),na=R({Ea:{l:"https://accounts.google.com"},Fa:{l:"https://login.live.com"}});(function(a){a.signIn="signIn";a.signUp=98"signUp";a["continue"]="continue";a.use="use"})(g.Ga||(g.Ga={}));var U=function(){function a(){this.map={}}a.prototype.Oa=function(b){this.map[b.id+"::"+b.type]=b};a.prototype.j=function(b){return this.map[b]};a.Na=function(b){return b.id+"::"+(b.authMethod===C.Z?"password":"federated")};return a}(),oa=function(){function a(){}a.prototype.A=function(){return Promise.resolve()};a.prototype.j=function(){return f(this,function(){return h(this,function(){throw q.aa().h();})})};a.prototype.save=function(){return f(this,99function(){return h(this,function(){return[2]})})};a.prototype.hint=function(){return f(this,function(){return h(this,function(){throw q.aa().h();})})};a.prototype.C=function(){return f(this,function(){return h(this,function(){return[2,!1]})})};a.prototype.m=function(){return f(this,function(){return h(this,function(){return[2]})})};a.prototype.F=function(){return f(this,function(){return h(this,function(){throw q.S("Cannot proxy login through the browser.").h();})})};return a}(),pa=function(){function a(b){this.fa=100b;this.sa=new U}a.prototype.A=function(){return f(this,function(){return h(this,function(b){switch(b.label){case 0:return b.g.push([0,2,,3]),[4,this.fa.preventSilentAccess()];case 1:return[2,b.a()];case 2:return b.a(),[2];case 3:return[2]}})})};a.prototype.j=function(b){return f(this,function(){var a,c,d,f;return h(this,function(e){switch(e.label){case 0:if(b){var k={password:!1,La:{Ta:[],ob:[]},pb:!1},l=b.supportedAuthMethods.slice(),u=l.indexOf(C.Z);-1!==u&&(k.password=!0,l.splice(u,1));k.La.Ta=101l;a=k}else a=void 0;e.label=1;case 1:return e.g.push([1,3,,4]),[4,this.fa.get(a)];case 2:return c=e.a(),[3,4];case 3:throw d=e.a(),f="navigator.credentials error: ("+d.message+")",q.S(f).h();case 4:if(!c)throw q.aa().h();this.sa.Oa(c);e={id:c.id,authMethod:"federated"===c.type?c.provider:C.Z,displayName:c.name||void 0,profilePicture:c.iconURL||void 0,proxiedAuthRequired:!1};c instanceof PasswordCredential&&(e.password=c.password);return[2,e]}})})};a.prototype.save=function(b){return f(this,function(){var a,102c,d;return h(this,function(e){switch(e.label){case 0:var k;a=b.authMethod===C.Z?k=new PasswordCredential({id:b.id,type:"password",name:b.displayName,iconURL:b.profilePicture,password:b.password}):k=new FederatedCredential({id:b.id,name:b.displayName,iconURL:b.profilePicture,provider:b.authMethod});e.label=1;case 1:return e.g.push([1,3,,4]),[4,this.fa.store(a)];case 2:return e.a(),[3,4];case 3:throw c=e.a(),d="navigator.credentials error: ("+c.message+")",q.S(d).h();case 4:return[2]}})})};a.prototype.hint=103function(){return f(this,function(){return h(this,function(){throw q.aa().h();})})};a.prototype.C=function(){return f(this,function(){return h(this,function(){return[2,!1]})})};a.prototype.m=function(){return f(this,function(){return h(this,function(){return[2]})})};a.prototype.F=function(b){return f(this,function(){var a,c,d,f,g;return h(this,function(e){switch(e.label){case 0:a=window.location.protocol+"//"+window.location.host+"/signin";c=this.sa.j(U.Na(b));if(!c||"password"!==c.type)throw q.S("Invalid credential.").h();104e.label=1;case 1:return e.g.push([1,3,,4]),[4,fetch(a,{method:"POST",credentials:c})];case 2:return d=e.a(),[3,4];case 3:throw f=e.a(),q.S(f.message).h();case 4:if(200!==d.status)throw q.S("Status code "+d.status).h();return[4,d.text()];case 5:return g=e.a(),[2,{statusCode:d.status,responseText:g}]}})})};return a}(),qa={bottomSheet:{bottom:"0",left:"0",width:"100%",height:"320px"},navPopout:{top:"0",right:"0",width:"320px",height:"320px"},fullScreen:{top:"0",left:"0",width:"100%",height:"100%"}},105ra=function(){function a(b,a,c,d,f,g,h){this.ea=b;this.Pa=a;this.X=d;this.b=this.ea.createElement("iframe");this.b.src=""+f+("?client="+encodeURIComponent(c))+("&id="+this.Pa)+("&renderMode="+d);h&&(b=encodeURIComponent(JSON.stringify(h)),this.b.src+="&preloadRequest="+b);g&&(g=encodeURIComponent(JSON.stringify(g)),this.b.src+="&features="+g);this.b.style.border="none";this.b.style.position="fixed";this.b.style.zIndex="9999";this.$();this.ea.body.appendChild(this.b)}a.prototype.display=function(b){this.b.hidden&&106(this.Aa(),this.Ha(qa[this.X]),this.b.hidden=!1);(b.height||b.width)&&"fullScreen"!==this.X&&(b.height&&(this.b.style.height=b.height+"px"),b.width&&(this.b.style.width=b.width+"px"))};a.prototype.$=function(){this.Aa();this.b.style.display="none";this.b.hidden=!0};a.prototype.dispose=function(){this.ea.body.removeChild(this.b)};a.prototype.Aa=function(){this.b.style.display="";this.b.style.height="";this.b.style.width="";this.b.style.top="";this.b.style.left="";this.b.style.right="";this.b.style.bottom=107""};a.prototype.Ha=function(b){b.bottom&&(this.b.style.bottom=b.bottom);b.top&&(this.b.style.top=b.top);b.right&&(this.b.style.right=b.right);b.left&&(this.b.style.left=b.left);b.width&&(this.b.style.width=b.width);b.height&&(this.b.style.height=b.height)};return a}(),sa=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}d(b,a);b.prototype.G=function(b){var a=this;this.u("proxyResult",function(b){a.resolve(b);a.dispose()});this.channel.send(z("proxy",this.id,b))};return b}(m),108E,ta=/android|iphone|ipod|iemobile/i,ua=["bottomSheet","navPopout","fullScreen"],va=function(){function a(b,a,c){this.o=b;this.channel=a;this.U=!1;this.D=c||("undefined"===typeof navigator.credentials||"function"!==typeof navigator.credentials.preventSilentAccess||"https:"!==window.location.protocol&&"localhost"!==window.location.hostname&&"127.0.0.1"!==window.location.hostname?new oa:new pa(navigator.credentials))}a.prototype.C=function(b,a){return f(this,function(){var c,e;return h(this,function(d){switch(d.label){case 0:this.w(),109c=new la(this.o,this.channel),d.label=1;case 1:return d.g.push([1,3,,4]),[4,c.B(b,a)];case 2:return[2,d.a()];case 3:e=d.a();if(a.s())this.N();else if("browserWrappingRequired"===e.type)return[2,this.D.C(b)];throw e;case 4:return[2]}})})};a.prototype.hint=function(b,a){return f(this,function(){var c,e;return h(this,function(d){switch(d.label){case 0:this.w(),c=new ma(this.o,this.channel),d.label=1;case 1:return d.g.push([1,3,,4]),[4,c.B(b,a)];case 2:return[2,d.a()];case 3:e=d.a();if(a.s())this.N();110else if("browserWrappingRequired"===e.type)return[2,this.D.hint(b)];throw e;case 4:return[2]}})})};a.prototype.j=function(b,a){return f(this,function(){var c,e;return h(this,function(d){switch(d.label){case 0:this.w(),c=new ia(this.o,this.channel),d.label=1;case 1:return d.g.push([1,3,,4]),[4,c.B(b,a)];case 2:return[2,d.a()];case 3:e=d.a();if(a.s())this.N();else if("browserWrappingRequired"===e.type)return[2,this.D.j(b)];throw e;case 4:return[2]}})})};a.prototype.save=function(a,c){return f(this,111function(){var b,d;return h(this,function(e){switch(e.label){case 0:this.w(),b=new ja(this.o,this.channel),e.label=1;case 1:return e.g.push([1,3,,4]),[4,b.B(a,c)];case 2:return[2,e.a()];case 3:d=e.a();if(c.s())this.N();else if("browserWrappingRequired"===d.type)return[2,this.D.save(a)];throw d;case 4:return[2]}})})};a.prototype.F=function(a,c){return f(this,function(){var b,d;return h(this,function(e){switch(e.label){case 0:this.w(),b=new sa(this.o,this.channel),e.label=1;case 1:return e.g.push([1,1123,,4]),[4,b.B(a,c)];case 2:return[2,e.a()];case 3:d=e.a();if(c.s())this.N();else if("browserWrappingRequired"===d.type)return[2,this.D.F(a)];throw d;case 4:return[2]}})})};a.prototype.A=function(a){return f(this,function(){var b,c,d,f;return h(this,function(e){switch(e.label){case 0:this.w(),b=new ka(this.o,this.channel),e.label=1;case 1:return e.g.push([1,3,,4]),c=b.B(void 0,a),d=this.D.A(),[4,Promise.all([c,d])];case 2:return e.a(),[3,4];case 3:throw f=e.a(),a.s()&&this.N(),f;case 4:return[2]}})})};113a.prototype.m=function(a){return f(this,function(){var b,c;return h(this,function(d){switch(d.label){case 0:this.w(),b=new T(this.o,this.channel),d.label=1;case 1:return d.g.push([1,3,,4]),[4,b.B(void 0,a)];case 2:return[2,d.a()];case 3:c=d.a();if("browserWrappingRequired"===c.type)return[2,this.D.m()];throw c;case 4:return[2]}})})};a.prototype.N=function(){f(this,function(){var a,c;return h(this,function(b){switch(b.label){case 0:this.w(),a=new T(this.o,this.channel),b.label=1;case 1:return b.g.push([1,1143,,4]),[4,a.B(void 0,void 0)];case 2:return[2,b.a()];case 3:c=b.a();if("browserWrappingRequired"===c.type)return[2,this.D.m()];throw c;case 4:return[2]}})})};a.prototype.dispose=function(){if(this.U)return Promise.resolve();this.channel.dispose();this.o.dispose();return Promise.resolve()};a.prototype.w=function(){if(this.U)throw q.Ka().h();};return a}(),m=function(){function a(){this.za="https://provider.openyolo.org";this.ta=[];this.T=this.X=this.H=null;da()}a.c=function(a,c,d,f,g){var b=null,e=115f&&-1!==ua.indexOf(f)?f:window.parent!==window?"fullScreen":navigator.userAgent.match(ta)?"bottomSheet":"navPopout",k=P();return Promise.resolve().then(function(){return a.race(Q(k))}).then(function(f){var l=void 0;0<d.length&&(l={feature:d});b=new ra(document,f,window.location.origin,e,c,l,g);return a.race(ha.Ja(b.b.contentWindow,k,f))}).then(function(a){return new va(b,a)})["catch"](function(c){null!==b&&b.dispose();a.na(c);throw q.Wa().h();})};a.prototype.pa=function(a){this.za=a;this.reset()};116a.prototype.oa=function(a){this.ta=a;this.reset()};a.prototype.qa=function(a){this.X=a;this.reset()};a.prototype.ra=function(a){if(null===a)this.T=null,this.reset();else{if("number"!==typeof a||0>a)throw Error("Invalid timeout. It must be a number greater than or equal to 0. Setting it to 0 disable timeouts.");var b=this.T!==a&&!a;this.T=a;b&&this.reset()}};a.prototype.reset=function(){if(this.H){var a=this.H;this.H=null;a.then(function(a){a.dispose()})}};a.prototype.I=function(b,c){var d=this;this.H||117(this.H=a.c(b,this.za,this.ta,this.X,c));this.H["catch"](function(){d.reset()});return this.H};a.prototype.L=function(a){a=null!==this.T?this.T:a;return 0>=a?new S:new ga(a)};a.prototype.C=function(a){return f(this,function(){var b,c,d;return h(this,function(e){switch(e.label){case 0:return b=this.L(3E3),c={type:"hint",options:a},[4,this.I(b,c)];case 1:return d=e.a(),[4,d.C(a,b)];case 2:return[2,e.a()]}})})};a.prototype.hint=function(a){return f(this,function(){var b,c,d;return h(this,function(e){switch(e.label){case 0:return b=118{type:"hint",options:a},c=this.L(3E3),[4,this.I(c,b)];case 1:return d=e.a(),[4,d.hint(a,c)];case 2:return[2,e.a()]}})})};a.prototype.j=function(a){return f(this,function(){var b,c,d;return h(this,function(e){switch(e.label){case 0:return b={type:"retrieve",options:a},c=this.L(3E3),[4,this.I(c,b)];case 1:return d=e.a(),[2,d.j(a,c)]}})})};a.prototype.save=function(a){return f(this,function(){var b,c;return h(this,function(d){switch(d.label){case 0:return b=this.L(3E3),[4,this.I(b)];case 1:return c=119d.a(),[2,c.save(a,b)]}})})};a.prototype.A=function(){return f(this,function(){var a,c;return h(this,function(b){switch(b.label){case 0:return a=this.L(3E3),[4,this.I(a)];case 1:return c=b.a(),[2,c.A(a)]}})})};a.prototype.F=function(a){return f(this,function(){var b,c;return h(this,function(d){switch(d.label){case 0:return b=this.L(1E4),[4,this.I(b)];case 1:return c=d.a(),[2,c.F(a,b)]}})})};a.prototype.m=function(){return f(this,function(){var a,c;return h(this,function(b){switch(b.label){case 0:return a=120this.L(3E3),[4,this.I(a)];case 1:return c=b.a(),[2,c.m(a)]}})})};return a}(),p=function(){function a(){this.M=Promise.reject(q.cb().h())}a.prototype.pa=function(){};a.prototype.oa=function(){};a.prototype.qa=function(){};a.prototype.ra=function(){};a.prototype.reset=function(){};a.prototype.C=function(){return this.M};a.prototype.hint=function(){return this.M};a.prototype.j=function(){return this.M};a.prototype.save=function(){return this.M};a.prototype.A=function(){return this.M};a.prototype.m=function(){return this.M};121a.prototype.F=function(){return this.M};return a}(),wa=function(a){var b=a.hasOwnProperty("crypto")&&"getRandomValues"in a.crypto;b||console.warn("The current browser does not provide window.crypto.getRandomValues. This is required by the API to work. This is likely due to an old browser.");(a=a.hasOwnProperty("crypto")&&("subtle"in a.crypto||"webkitSubtle"in a.crypto))||console.warn("The current environment does not provide window.crypto.subtle. This is required by the API to work. This is likely due to an old browser, or running the API in an unsecure origin - only secure origins (https: and localhost) provide crypto.subtle.");122return b&&a}(window)?new m:new p,V=window;V.openyolo=wa;m.prototype.setProviderUrlBase=m.prototype.pa;m.prototype.setFeatureConfig=m.prototype.oa;m.prototype.setRenderMode=m.prototype.qa;m.prototype.setTimeouts=m.prototype.ra;m.prototype.hintsAvailable=m.prototype.C;m.prototype.hint=m.prototype.hint;m.prototype.retrieve=m.prototype.j;m.prototype.save=m.prototype.save;m.prototype.disableAutoSignIn=m.prototype.A;m.prototype.proxyLogin=m.prototype.F;m.prototype.cancelLastOperation=m.prototype.m;p.prototype.setProviderUrlBase=123p.prototype.pa;p.prototype.setFeatureConfig=p.prototype.oa;p.prototype.setRenderMode=p.prototype.qa;p.prototype.setTimeouts=p.prototype.ra;p.prototype.hintsAvailable=p.prototype.C;p.prototype.hint=p.prototype.hint;p.prototype.retrieve=p.prototype.j;p.prototype.save=p.prototype.save;p.prototype.disableAutoSignIn=p.prototype.A;p.prototype.proxyLogin=p.prototype.F;p.prototype.cancelLastOperation=p.prototype.m;V.OpenYoloError=y;y.prototype.type=y.prototype.type;y.prototype.message=y.prototype.message;124g.jb=q;g.gb=C;g.lb=na})(this.Ra=this.Ra||{});}).call(this);125(function(){/*126127Copyright The Closure Library Authors.128SPDX-License-Identifier: Apache-2.0129*/130'use strict';var n,p=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}},q=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:p(a)}},r=function(a){a=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global,a];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");},t=r(this),u="function"==typeof Object.defineProperties?131Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},w=function(){w=function(){};t.Symbol||(t.Symbol=x)},y=function(a,b){this.m=a;u(this,"description",{configurable:!0,writable:!0,value:b})};y.prototype.toString=function(){return this.m};132var x=function(){function a(c){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new y("jscomp_symbol_"+(c||"")+"_"+b++,c)}var b=0;return a}(),A=function(){w();var a=t.Symbol.iterator;a||(a=t.Symbol.iterator=t.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[a]&&u(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return z(p(this))}});A=function(){}},z=function(a){A();a={next:a};a[t.Symbol.iterator]=function(){return this};return a},B=function(a,133b){return Object.prototype.hasOwnProperty.call(a,b)},C=function(a,b){if(b){var c=t;a=a.split(".");for(var g=0;g<a.length-1;g++){var k=a[g];k in c||(c[k]={});c=c[k]}a=a[a.length-1];g=c[a];b=b(g);b!=g&&null!=b&&u(c,a,{configurable:!0,writable:!0,value:b})}};134C("WeakMap",function(a){function b(){}function c(e){var f=typeof e;return"object"===f&&null!==e||"function"===f}function g(e){if(!B(e,h)){var f=new b;u(e,h,{value:f})}}function k(e){var f=Object[e];f&&(Object[e]=function(l){if(l instanceof b)return l;g(l);return f(l)})}if(function(){if(!a||!Object.seal)return!1;try{var e=Object.seal({}),f=Object.seal({}),l=new a([[e,2],[f,3]]);if(2!=l.get(e)||3!=l.get(f))return!1;l.delete(e);l.set(f,4);return!l.has(e)&&4==l.get(f)}catch(v){return!1}}())return a;var h=135"$jscomp_hidden_"+Math.random();k("freeze");k("preventExtensions");k("seal");var m=0,d=function(e){this.j=(m+=Math.random()+1).toString();if(e){e=q(e);for(var f;!(f=e.next()).done;)f=f.value,this.set(f[0],f[1])}};d.prototype.set=function(e,f){if(!c(e))throw Error("Invalid WeakMap key");g(e);if(!B(e,h))throw Error("WeakMap key fail: "+e);e[h][this.j]=f;return this};d.prototype.get=function(e){return c(e)&&B(e,h)?e[h][this.j]:void 0};d.prototype.has=function(e){return c(e)&&B(e,h)&&B(e[h],this.j)};136d.prototype.delete=function(e){return c(e)&&B(e,h)&&B(e[h],this.j)?delete e[h][this.j]:!1};return d});137C("Map",function(a){if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var d=Object.seal({x:4}),e=new a(q([[d,"s"]]));if("s"!=e.get(d)||1!=e.size||e.get({x:4})||e.set({x:4},"t")!=e||2!=e.size)return!1;var f=e.entries(),l=f.next();if(l.done||l.value[0]!=d||"s"!=l.value[1])return!1;l=f.next();return l.done||4!=l.value[0].x||"t"!=l.value[1]||!f.next().done?!1:!0}catch(v){return!1}}())return a;A();var b=new WeakMap,c=function(d){this.i={};this.c=138h();this.size=0;if(d){d=q(d);for(var e;!(e=d.next()).done;)e=e.value,this.set(e[0],e[1])}};c.prototype.set=function(d,e){d=0===d?0:d;var f=g(this,d);f.list||(f.list=this.i[f.id]=[]);f.a?f.a.value=e:(f.a={next:this.c,f:this.c.f,head:this.c,key:d,value:e},f.list.push(f.a),this.c.f.next=f.a,this.c.f=f.a,this.size++);return this};c.prototype.delete=function(d){d=g(this,d);return d.a&&d.list?(d.list.splice(d.index,1),d.list.length||delete this.i[d.id],d.a.f.next=d.a.next,d.a.next.f=d.a.f,d.a.head=null,139this.size--,!0):!1};c.prototype.clear=function(){this.i={};this.c=this.c.f=h();this.size=0};c.prototype.has=function(d){return!!g(this,d).a};c.prototype.get=function(d){return(d=g(this,d).a)&&d.value};c.prototype.entries=function(){return k(this,function(d){return[d.key,d.value]})};c.prototype.keys=function(){return k(this,function(d){return d.key})};c.prototype.values=function(){return k(this,function(d){return d.value})};c.prototype.forEach=function(d,e){for(var f=this.entries(),l;!(l=f.next()).done;)l=140l.value,d.call(e,l[1],l[0],this)};c.prototype[Symbol.iterator]=c.prototype.entries;var g=function(d,e){var f=e&&typeof e;"object"==f||"function"==f?b.has(e)?f=b.get(e):(f=""+ ++m,b.set(e,f)):f="p_"+e;var l=d.i[f];if(l&&B(d.i,f))for(d=0;d<l.length;d++){var v=l[d];if(e!==e&&v.key!==v.key||e===v.key)return{id:f,list:l,index:d,a:v}}return{id:f,list:l,index:-1,a:void 0}},k=function(d,e){var f=d.c;return z(function(){if(f){for(;f.head!=d.c;)f=f.f;for(;f.next!=f.head;)return f=f.next,{done:!1,value:e(f)};141f=null}return{done:!0,value:void 0}})},h=function(){var d={};return d.f=d.next=d.head=d},m=0;return c});142C("Set",function(a){if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),g=new a(q([c]));if(!g.has(c)||1!=g.size||g.add(c)!=g||1!=g.size||g.add({x:4})!=g||2!=g.size)return!1;var k=g.entries(),h=k.next();if(h.done||h.value[0]!=c||h.value[1]!=c)return!1;h=k.next();return h.done||h.value[0]==c||4!=h.value[0].x||h.value[1]!=h.value[0]?!1:k.next().done}catch(m){return!1}}())return a;A();var b=function(c){this.b=new Map;if(c){c=143q(c);for(var g;!(g=c.next()).done;)this.add(g.value)}this.size=this.b.size};b.prototype.add=function(c){c=0===c?0:c;this.b.set(c,c);this.size=this.b.size;return this};b.prototype.delete=function(c){c=this.b.delete(c);this.size=this.b.size;return c};b.prototype.clear=function(){this.b.clear();this.size=0};b.prototype.has=function(c){return this.b.has(c)};b.prototype.entries=function(){return this.b.entries()};b.prototype.values=function(){return this.b.values()};b.prototype.keys=b.prototype.values;144b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,g){var k=this;this.b.forEach(function(h){return c.call(g,h,h,k)})};return b});145var D=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";146else if("function"==b&&"undefined"==typeof a.call)return"object";return b};function E(a,b,c){a:{var g=!1;g=void 0===g?!1:g;var k=0;for(var h=!1,m=q(b),d=m.next();!d.done;d=m.next())if(d.value.optional)h=!0;else{if(h)throw Error("Argument validator encountered a required argument after an optional argument.");k++}h=b.length;if(c.length<k||h<c.length)b="Expected "+(k===h?1===k?"1 argument":k+" arguments":k+"-"+h+" arguments")+" but got "+c.length+".";else{for(k=0;k<c.length;k++)try{F(b[k],c[k],"must be ")}catch(e){g=void 0===g?!1:g;if(0>k||k>=G.length)throw Error("Argument validator received an unsupported number of arguments.");147c=G[k];b=(g?"":c+" argument ")+'"'+b[k].name+'" '+e.message+".";break a}b=null}}b&&window.console&&"function"===typeof window.console.warn&&window.console.warn(a+" failed: "+b)}function F(a,b,c){c=void 0===c?"":c;if(!(a.optional&&void 0===b||a.h(b)))throw Error(c+a.g);}var G="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");function H(a,b){return{name:a,g:"a valid string",optional:void 0===b?!1:b,h:function(c){return"string"===typeof c}}}148function I(){return{name:"timeoutMs",g:"a valid number",optional:!1,h:function(a){return"number"===typeof a}}}function J(){return{name:"renderMode",g:"null",optional:!1,h:function(a){return null===a}}}function K(){var a=[H("renderMode"),J()];var b=void 0===b?!1:b;return{name:"renderMode",g:a.map(function(c){return c.g}).join(" or "),optional:b,h:function(c){return a.some(function(g){return g.h(c)})}}}149function L(a){var b=a.g;0===b.indexOf("a ")?b=b.substr(2):0===b.indexOf("an ")&&(b=b.substr(3));return{name:"supportedIdTokenProviders",g:"list of "+b,optional:!1,h:function(c){if(!c||"array"!=D(c))return!1;c=q(c);for(var g=c.next();!g.done;g=c.next())if(!a.h(g.value))return!1;return!0}}}150function M(a){var b=void 0===b?!1:b;var c=new Set(a);return{name:"supportedAuthMethods",g:"list of values from ("+a.map(function(g){return g?g.toString():"undefined"}).join(", ")+")",optional:b,h:function(g){if("array"!=D(g))return!1;g=q(g);for(var k=g.next();!k.done;k=g.next())if(!c.has(k.value))return!1;return!0}}}151function N(a,b){var c=void 0===c?!1:c;var g=Object.keys(a),k=new Set(g.map(function(h){return a[h].name}));return{name:b,g:"a valid object",optional:c,h:function(h){var m;(m=!h)||(m=typeof h,m=!("object"==m&&null!=h||"function"==m));if(m)return!1;m=q(g);for(var d=m.next();!d.done;d=m.next()){d=a[d.value];var e=d.name;try{F(d,h[e])}catch(f){throw Error('must have a "'+e+'" property '+(0===f.message.indexOf("must")?"which":"as")+" "+f.message);}}h=q(Object.keys(h));for(d=h.next();!d.done;d=h.next())if(m=152d.value,!k.has(m))throw Error('must not contain a "'+m+'" property');return!0}}};var O=/^openyolo:\/\//,P=!1,Q=function(a){this.o=a;this.s=new RegExp("^"+a);var b={uri:H("uri"),clientId:H("clientId")};this.l={u:M(["https://accounts.google.com",a+"id-and-password"]),v:L(N(b,"supportedIdTokenProviders")),context:H("context",!0)}},R=function(a,b){return b.map(function(c){return c.replace(a.s,"openyolo://")})},S=function(a,b){a={supportedAuthMethods:R(a,b.supportedAuthMethods)};b.supportedIdTokenProviders&&(a.supportedIdTokenProviders=b.supportedIdTokenProviders);b.context&&(a.context=153b.context);return a},T=function(a,b){a={id:b.id,authMethod:b.authMethod.replace(O,a.o)};b.password&&(a.password=b.password);b.authDomain&&(a.authDomain=b.authDomain);b.displayName&&(a.displayName=b.displayName);b.profilePicture&&(a.profilePicture=b.profilePicture);b.idToken&&(a.idToken=b.idToken);b.newGrant&&(a.newGrant=b.newGrant);return a};n=Q.prototype;n.hintsAvailable=function(a){E("hintsAvailable",[N(this.l,"options")],[a]);a=S(this,a);return openyolo.hintsAvailable(a)};154n.hint=function(a){var b=this;E("hint",[N(this.l,"options")],[a]);a=S(this,a);return openyolo.hint(a).then(function(c){return T(b,c)})};n.retrieve=function(a){var b=this;E("retrieve",[N(this.l,"options")],[a]);a=S(this,a);return openyolo.retrieve(a).then(function(c){return T(b,c)})};n.disableAutoSignIn=function(){return openyolo.disableAutoSignIn()};n.cancelLastOperation=function(){return openyolo.cancelLastOperation()};n.setTimeouts=function(a){E("setTimeouts",[I()],[a]);openyolo.setTimeouts(a)};155n.setRenderMode=function(a){E("setRenderMode",[K()],[a]);openyolo.setRenderMode(a)};Q.prototype.setRenderMode=Q.prototype.setRenderMode;Q.prototype.setTimeouts=Q.prototype.setTimeouts;Q.prototype.cancelLastOperation=Q.prototype.cancelLastOperation;Q.prototype.disableAutoSignIn=Q.prototype.disableAutoSignIn;Q.prototype.retrieve=Q.prototype.retrieve;Q.prototype.hint=Q.prototype.hint;Q.prototype.hintsAvailable=Q.prototype.hintsAvailable;var U=window;U.PROVIDER_URL_BASE&&openyolo.setProviderUrlBase(U.PROVIDER_URL_BASE);156U.GOOGLE_ONETAP_EXPERIMENTAL_FEATURES&&openyolo.setFeatureConfig(U.GOOGLE_ONETAP_EXPERIMENTAL_FEATURES);var V=new Q("smartlock://"),W=new Q("googleyolo://"),X=window;X.smartlock=V;X.googleyolo=W;U.smartlock=V;U.googleyolo=W;X.onSmartLockLoad&&(P=!0,X.onSmartLockLoad(V));X.onGoogleYoloLoad&&(P=!0,X.onGoogleYoloLoad(W));document.addEventListener("DOMContentLoaded",function(){P||(X.onGoogleYoloLoad&&(P=!0,X.onGoogleYoloLoad(W)),X.onSmartLockLoad&&(P=!0,X.onSmartLockLoad(V)))});}).call(this);157158159