fansunited-sdk-umd 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.FansUnitedSDK=t():e.FansUnitedSDK=t()}(self,(function(){return(()=>{var e={9669:(e,t,n)=>{e.exports=n(1609)},5448:(e,t,n)=>{"use strict";var r=n(4867),i=n(6026),s=n(4372),a=n(5327),o=n(4097),u=n(4109),c=n(7985),l=n(5061),h=n(5655),d=n(5263);e.exports=function(e){return new Promise((function(t,n){var p,f=e.data,m=e.headers,v=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}r.isFormData(f)&&delete m["Content-Type"];var g=new XMLHttpRequest;if(e.auth){var w=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(w+":"+b)}var _=o(e.baseURL,e.url);function I(){if(g){var r="getAllResponseHeaders"in g?u(g.getAllResponseHeaders()):null,s={data:v&&"text"!==v&&"json"!==v?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g};i((function(e){t(e),y()}),(function(e){n(e),y()}),s),g=null}}if(g.open(e.method.toUpperCase(),a(_,e.params,e.paramsSerializer),!0),g.timeout=e.timeout,"onloadend"in g?g.onloadend=I:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(I)},g.onabort=function(){g&&(n(l("Request aborted",e,"ECONNABORTED",g)),g=null)},g.onerror=function(){n(l("Network Error",e,null,g)),g=null},g.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||h.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",g)),g=null},r.isStandardBrowserEnv()){var E=(e.withCredentials||c(_))&&e.xsrfCookieName?s.read(e.xsrfCookieName):void 0;E&&(m[e.xsrfHeaderName]=E)}"setRequestHeader"in g&&r.forEach(m,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete m[t]:g.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(g.withCredentials=!!e.withCredentials),v&&"json"!==v&&(g.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&g.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&g.upload&&g.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){g&&(n(!e||e&&e.type?new d("canceled"):e),g.abort(),g=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),f||(f=null),g.send(f)}))}},1609:(e,t,n)=>{"use strict";var r=n(4867),i=n(1849),s=n(321),a=n(7185),o=function e(t){var n=new s(t),o=i(s.prototype.request,n);return r.extend(o,s.prototype,n),r.extend(o,n),o.create=function(n){return e(a(t,n))},o}(n(5655));o.Axios=s,o.Cancel=n(5263),o.CancelToken=n(4972),o.isCancel=n(6502),o.VERSION=n(7288).version,o.all=function(e){return Promise.all(e)},o.spread=n(8713),o.isAxiosError=n(6268),e.exports=o,e.exports.default=o},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,n)=>{"use strict";var r=n(5263);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(4867),i=n(5327),s=n(782),a=n(3572),o=n(7185),u=n(4875),c=u.validators;function l(e){this.defaults=e,this.interceptors={request:new s,response:new s}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=o(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&u.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,s=[];if(this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)})),!r){var l=[a,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(s),i=Promise.resolve(e);l.length;)i=i.then(l.shift(),l.shift());return i}for(var h=e;n.length;){var d=n.shift(),p=n.shift();try{h=d(h)}catch(e){p(e);break}}try{i=a(h)}catch(e){return Promise.reject(e)}for(;s.length;)i=i.then(s.shift(),s.shift());return i},l.prototype.getUri=function(e){return e=o(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(o(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(o(r||{},{method:e,url:t,data:n}))}})),e.exports=l},782:(e,t,n)=>{"use strict";var r=n(4867);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},4097:(e,t,n)=>{"use strict";var r=n(1793),i=n(7303);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},5061:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,i,s){var a=new Error(e);return r(a,t,n,i,s)}},3572:(e,t,n)=>{"use strict";var r=n(4867),i=n(8527),s=n(6502),a=n(5655),o=n(5263);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new o("canceled")}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return u(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return s(t)||(u(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},7185:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function o(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function u(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||s,i=t(e);r.isUndefined(i)&&t!==u||(n[e]=i)})),n}},6026:(e,t,n)=>{"use strict";var r=n(5061);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},8527:(e,t,n)=>{"use strict";var r=n(4867),i=n(5655);e.exports=function(e,t,n){var s=this||i;return r.forEach(n,(function(n){e=n.call(s,e,t)})),e}},5655:(e,t,n)=>{"use strict";var r=n(4867),i=n(6016),s=n(481),a={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=n(5448)),u),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(o(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(0,JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||c.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw s(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(a)})),e.exports=c},7288:e=>{e.exports={version:"0.24.0"}},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},5327:(e,t,n)=>{"use strict";var r=n(4867);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var s;if(n)s=n(t);else if(r.isURLSearchParams(t))s=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),s=a.join("&")}if(s){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,s,a){var o=[];o.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),r.isString(i)&&o.push("path="+i),r.isString(s)&&o.push("domain="+s),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},6268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},7985:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},4109:(e,t,n)=>{"use strict";var r=n(4867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,s,a={};return e?(r.forEach(e.split("\n"),(function(e){if(s=e.indexOf(":"),t=r.trim(e.substr(0,s)).toLowerCase(),n=r.trim(e.substr(s+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4875:(e,t,n)=>{"use strict";var r=n(7288).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var s={};i.transitional=function(e,t,n){function i(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new Error(i(r," has been removed"+(t?" in "+t:"")));return t&&!s[r]&&(s[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var s=r[i],a=t[s];if(a){var o=e[s],u=void 0===o||a(o,s,e);if(!0!==u)throw new TypeError("option "+s+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+s)}},validators:i}},4867:(e,t,n)=>{"use strict";var r=n(1849),i=Object.prototype.toString;function s(e){return"[object Array]"===i.call(e)}function a(e){return void 0===e}function o(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),s(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:s,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:o,isPlainObject:u,isUndefined:a,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return o(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:l,merge:function e(){var t={};function n(n,r){u(t[r])&&u(n)?t[r]=e(t[r],n):u(n)?t[r]=e({},n):s(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return t},extend:function(e,t,n){return l(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},6595:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(682),i=n(2141),s=n(4241),a=n(6391),o=n(1512),u=n(4392),c=n(320),l=n(7631),h=n(6965);t.default=function(){var e=this;this.validate=function(t){var n=e.checkFieldsForValues(t);return n.isValid=e.containsErrorMessage(n),n},this.checkFieldsForValues=function(e){for(var t=new l.default,n={apiKey:new o.default,environment:new a.default,idSchema:new u.default,clientId:new h.default,lang:new s.default,authProvider:new c.default},r=0,i=Object.entries(t);r<i.length;r++){var d=i[r],p=d[0];d[1],"isValid"!==p&&n[p].validate(e)}return Object.keys(n).forEach((function(r){t[r]=n[r].validate(e)})),t},this.containsErrorMessage=function(e){for(var t=!0,n=0,s=Object.entries(e);n<s.length;n++){var a=s[n],o=a[0],u=a[1];if(o!==r.ConfigFieldEnum.authProvider){if("isValid"!==o&&u.message.type===i.LogEnum.ERROR)return!1;if("isValid"!==o&&u.message.type===i.LogEnum.WARNING)return!0}}return t}}},682:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigFieldEnum=void 0,(n=t.ConfigFieldEnum||(t.ConfigFieldEnum={})).apiKey="apiKey",n.environment="environment",n.idSchema="idSchema",n.clientId="clientId",n.lang="lang",n.authProvider="authProvider"},2671:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EnvironmentEnum=void 0,(n=t.EnvironmentEnum||(t.EnvironmentEnum={})).DEV="dev",n.PROD="prod",n.SANDBOX="sandbox"},4946:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.IdSchemaEnum=void 0,(n=t.IdSchemaEnum||(t.IdSchemaEnum={})).NATIVE="native",n.ENETPULSE="enetpulse",n.SPORTRADAR="sportradar",n.SPORTAL_365="sportal365"},9377:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LangEnum=void 0,(n=t.LangEnum||(t.LangEnum={})).EN="en",n.BG="bg",n.RO="ro"},2141:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LogEnum=void 0,(n=t.LogEnum||(t.LogEnum={})).ERROR="error",n.WARNING="warning"},9028:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationMessageEnum=void 0,(n=t.ValidationMessageEnum||(t.ValidationMessageEnum={})).API_KEY="The field apiKey with valid value must be provided to use this SDK",n.CLIENT_ID="The field clientId must be provided to use this SDK",n.LANG_MISSING="If no lang is passed the default one will be set which is: EN",n.LANG_INVALID="This lang value is not supported, the default one will be set which is: EN",n.ID_SCHEMA_MISSING="If no idSchema is passed the default one will be set which is: native",n.ID_SCHEMA_INVALID="This idSchema value is not supported, the default one will be set which is: native",n.ENVIRONMENT_MISSING="If no environment is passed the default one will be set which is: prod",n.ENVIRONMENT_INVALID="This environment value is not supported, the default one will be set which is: prod",n.AUTH_PROVIDER_CONFIG_PROP_MISSING="The following property is missing from the authProvider object:",n.AUTH_PROVIDER_CONFIG_INVALID_PROP="You have passed a property which is not supported for the authentication provider:",n.AUTH_PROVIDER_CONFIG_MISSING="The field authProvider must be provided to use this SDK",n.AUTH_PROVIDER_CONFIG_MISSING_CONFIG="The field authProvider has missing properties"},9627:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationResponseEnum=void 0,(n=t.ValidationResponseEnum||(t.ValidationResponseEnum={})).MISSING_VALUE="missing",n.INVALID_VALUE="invalid",n.VALID_VALUE="valid"},7070:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.getIdToken=null,this.logout=null}},2379:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3220);t.default=function(){this.validation=null,this.message=new r.default,this.getIdToken={validation:null,message:new r.default},this.logout={validation:null,message:new r.default}}},7631:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3074);t.default=function(){this.apiKey=null,this.environment=null,this.idSchema=null,this.clientId=null,this.lang=null,this.authProvider={getIdToken:new r.default,logout:new r.default},this.isValid=!1}},3220:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.text=null,this.type=null}},3074:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){}},1512:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=function(){function e(){this.validateField=function(e){return null!=e&&e.length>0?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(e){var t=null,n=s.LogEnum.ERROR;return e===r.ValidationResponseEnum.MISSING_VALUE&&(t=i.ValidationMessageEnum.API_KEY),e===r.ValidationResponseEnum.VALID_VALUE&&(n=null),{text:t,type:n}}}return e.prototype.validate=function(e){var t=this.validateField(e.apiKey);return{validation:t,message:this.generateMessage(t)}},e}();t.default=a},320:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=n(7070),o=n(2379),u=function(){function e(){this.validateAuthProvider=function(e){var t=Object.keys(new a.default),n=new o.default;if(e){var u=Object.keys(e).filter((function(e){return!t.includes(e)}));u.length>0?(n.validation=r.ValidationResponseEnum.INVALID_VALUE,n.message.type=s.LogEnum.WARNING,n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_INVALID_PROP+" "+u.join(",")):n.validation=r.ValidationResponseEnum.VALID_VALUE}else n.validation=r.ValidationResponseEnum.MISSING_VALUE,n.message.type=s.LogEnum.ERROR,n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING;return n},this.validateAuthProviderConfigFields=function(e,t){return Object.keys(new a.default).forEach((function(n){e[n]?t[n].validation=r.ValidationResponseEnum.VALID_VALUE:t[n].validation=r.ValidationResponseEnum.MISSING_VALUE})),t},this.generateAuthProviderConfigMessages=function(e){return Object.keys(e).filter((function(e){return"validation"!==e&&"message"!==e})).forEach((function(t){var n=e[t];n.validation===r.ValidationResponseEnum.MISSING_VALUE&&(n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_PROP_MISSING+" "+t,n.message.type=s.LogEnum.ERROR)})),e},this.checkAuthProviderConfigMessagesForErrors=function(e){return Object.keys(e).filter((function(e){return"validation"!==e&&"message"!==e})).forEach((function(t){e[t].validation===r.ValidationResponseEnum.MISSING_VALUE&&e.validation===r.ValidationResponseEnum.VALID_VALUE&&(e.validation=r.ValidationResponseEnum.INVALID_VALUE,e.message.type=s.LogEnum.ERROR,e.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING_CONFIG)})),e}}return e.prototype.validate=function(e){var t=this.validateAuthProvider(e.authProvider);return t.validation!==r.ValidationResponseEnum.MISSING_VALUE&&(t=this.validateAuthProviderConfigFields(e.authProvider,t),t=this.generateAuthProviderConfigMessages(t),t=this.checkAuthProviderConfigMessagesForErrors(t)),t},e}();t.default=u},6965:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=function(){function e(){this.validateField=function(e){return null!=e&&e.length>0?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(e){var t=null,n=s.LogEnum.WARNING;return e===r.ValidationResponseEnum.MISSING_VALUE&&(t=i.ValidationMessageEnum.CLIENT_ID),e===r.ValidationResponseEnum.VALID_VALUE&&(t=null,n=null),{text:t,type:n}}}return e.prototype.validate=function(e){var t=this.validateField(e.clientId);return{validation:t,message:this.generateMessage(t)}},e}();t.default=a},6391:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=n(2671),o=function(){function e(){this.validateField=function(e){var t=[a.EnvironmentEnum.DEV,a.EnvironmentEnum.SANDBOX,a.EnvironmentEnum.PROD];return null!=e&&e.length>0?t.includes(e)?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.INVALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(e){var t=null,n=s.LogEnum.WARNING;return e===r.ValidationResponseEnum.MISSING_VALUE&&(t=i.ValidationMessageEnum.ENVIRONMENT_MISSING),e===r.ValidationResponseEnum.INVALID_VALUE&&(t=i.ValidationMessageEnum.ENVIRONMENT_INVALID),e===r.ValidationResponseEnum.VALID_VALUE&&(t=null,n=null),{text:t,type:n}}}return e.prototype.validate=function(e){var t=this.validateField(e.environment);return{validation:t,message:this.generateMessage(t)}},e}();t.default=o},4392:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=n(4946),o=function(){function e(){this.validateField=function(e){var t=[a.IdSchemaEnum.NATIVE,a.IdSchemaEnum.SPORTAL_365,a.IdSchemaEnum.ENETPULSE,a.IdSchemaEnum.SPORTRADAR];return null!=e&&e.length>0?t.includes(e)?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.INVALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(e){var t=null,n=s.LogEnum.WARNING;return e===r.ValidationResponseEnum.MISSING_VALUE&&(t=i.ValidationMessageEnum.ID_SCHEMA_MISSING),e===r.ValidationResponseEnum.INVALID_VALUE&&(t=i.ValidationMessageEnum.ID_SCHEMA_INVALID),e===r.ValidationResponseEnum.VALID_VALUE&&(t=null,n=null),{text:t,type:n}}}return e.prototype.validate=function(e){var t=this.validateField(e.idSchema);return{validation:t,message:this.generateMessage(t)}},e}();t.default=o},4241:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9377),i=n(9627),s=n(9028),a=n(2141);t.default=function(){var e=this;this.validate=function(t){var n=e.validateField(t.lang);return{validation:n,message:e.generateMessage(n)}},this.validateField=function(e){var t=[r.LangEnum.BG,r.LangEnum.RO,r.LangEnum.EN];return null!=e&&e.length>0?t.includes(e)?i.ValidationResponseEnum.VALID_VALUE:i.ValidationResponseEnum.INVALID_VALUE:i.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(e){var t=null,n=a.LogEnum.WARNING;return e===i.ValidationResponseEnum.MISSING_VALUE&&(t=s.ValidationMessageEnum.LANG_MISSING),e===i.ValidationResponseEnum.INVALID_VALUE&&(t=s.ValidationMessageEnum.LANG_INVALID),e===i.ValidationResponseEnum.VALID_VALUE&&(t=null,n=null),{text:t,type:n}}}},1260:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ID_TYPES=void 0,t.ID_TYPES={native:"id",sportradar:"sportradar_id",sportal365:"sportal365_id",enetpulse:"enetpulse_id"}},712:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformIdsToBeUnique=t.setBaseUrl=t.limitIds=t.requestChunkBuild=void 0,t.requestChunkBuild=function(e){var t=[],n=0;return t[n]=[],e.forEach((function(e){t[n].length<=250?t[n].push(e):(n++,t[n]=[e])})),t},t.limitIds=function(e){for(var t=[];e.length>200;){var n=e.splice(0,200);t.push(n)}return t.push(e),t},t.setBaseUrl=function(e,t){return"prod"===e||"sandbox"===e?{profile:"https://profile.fansunitedapi.com/v1",football:"https://football.fansunitedapi.com/v1",idMapping:"https://id-mapping.fansunitedapi.com/v1",predictor:"https://prediction.fansunitedapi.com/v1",client:"https://client.fansunitedapi.com/v1"}[t]:{profile:"http://localhost:8010",football:"http://locahost:8080",idMapping:"http://localhost:8030",predictor:"http://localhost:8040",client:"http://localhost:8080"}[t]},t.transformIdsToBeUnique=function(e){return e.filter((function(e,t,n){return t===n.indexOf(e)}))}},5601:function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1260),s="FansUnited",a={football:{ids:[],countries:[],competitions:[]},profile:{own:{},countries:[],expireAt:0}};t.default=function(e){var t=this;this.idSchema="",this.exparationTimeout=600,this.clearData=function(){t.setData(a)},this.getEntityById=function(e,n){return void 0===e&&(e=""),void 0===n&&(n=""),t.getData().football.ids.find((function(r){var s=i.ID_TYPES[t.idSchema];return r&&""+r[s]===n&&r.resource===e}))},this.getEntity=function(e,n,r){return Array.isArray(e)?t.getData().football.ids.filter((function(t){var s=i.ID_TYPES[r];return t&&e.includes(""+t[s])&&t.resource===n})):t.getData().football.ids.find((function(t){var s=i.ID_TYPES[r];return t&&""+t[s]===e&&t.resource===n}))},this.getEntityByNativeId=function(e,n){return void 0===e&&(e=""),void 0===n&&(n=""),t.getData().football.ids.find((function(t){return t&&""+t.id===n&&t.resource===e}))},this.checkForExistingIdObjs=function(e,n){var r=i.ID_TYPES[n],s={};return Object.keys(e).forEach((function(i){var a=e[i],o=t.getEntity(a,i,n).map((function(e){return e[r]})),u=e[i].filter((function(e){return!o.includes(e)}));s[i]=a.map((function(e){return u.includes(e)?{id:e,exists:!1}:{id:e,exists:!0}}))})),s},this.getIdsByType=function(e,n,r){var s=i.ID_TYPES[r],a=i.ID_TYPES[n],o={};return Object.keys(e).forEach((function(n){var r=e[n],i=[];t.getData().football.ids.forEach((function(e){r.forEach((function(t,r){t===e[a]&&n===e.resource&&(i[r]=e[s])}))})),o[n]=i})),o},this.addIdMapping=function(e){var n=t.getData();n.football.ids.push(e),t.setData(n)},this.addIdMappings=function(e){var n=t.getData(),i=n.football.ids;i=r(r([],i,!0),e,!0),n.football.ids=i,t.setData(n)},this.setOwnProfile=function(e){var n=t.getData();n.profile.own=e,n.profile.expireAt=Math.floor(Date.now()/1e3)+t.exparationTimeout,t.setData(n)},this.getOwnProfile=function(){return t.getData().profile.own},this.getProfileCountries=function(){return t.getData().profile.countries},this.setProfileCountries=function(e){var n=t.getData();n.profile.countries=e,t.setData(n)},this.getFootballCountries=function(){return t.getData().football.countries},this.setFootballCountries=function(e){var n=t.getData();n.football.countries=e,t.setData(n)},this.getCompetitions=function(e){var n=t.getData();return e?e.competitionSearchFilter(n.football.competitions):n.football.competitions},this.setCompetitions=function(e){var n,r=t.getData();(n=r.football.competitions).push.apply(n,e),t.setData(r)},this.getExparationProfile=function(){return t.getData().profile.expireAt},this.getData=function(){return JSON.parse(localStorage.getItem(s))},this.setData=function(e){localStorage.setItem(s,JSON.stringify(e))},this.idSchema=e.idSchema,void 0!==this.getData()&&null!==this.getData()||this.setData(a)}},8872:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8902);t.default=function(){this.pagination=new r.default}},8902:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.nextPageStartsAfter=null,this.itemsPerPage=null}},1553:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8872);t.default=function(){this.meta=new r.default,this.data=[]}},3623:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8872);t.default=function(){this.remapMetaData=function(e){var t=new r.default;return t.pagination.nextPageStartsAfter=e.pagination.next_page_starts_after,t.pagination.itemsPerPage=e.pagination.items_per_page,t}}},7686:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(9669),a=n(712);t.default=function(e){var t=this;this.instance=null,this.apiSignInUrl="",this.getConfig=function(){return r(t,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.instance.get(""+this.apiSignInUrl)];case 1:return[2,t.sent().data.data];case 2:throw e=t.sent(),console.warn("There was a problem fetching configuration from Client API",e),e.response;case 3:return[2]}}))}))};var n=(0,a.setBaseUrl)(e.environment,"client");this.apiSignInUrl="/clients/"+e.clientId+"/features?key="+e.apiKey,this.instance=s.default.create({baseURL:n,headers:{"Content-Type":"application/json"}})}},595:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(9669),a=n(712),o=n(3430),u=n(7316),c=n(8758),l=n(5827),h=n(7821),d=n(5284),p=n(9330),f=n(4729),m=n(5157),v=n(7943),y=n(7287),g=n(753),w=n(1925);t.default=function(e){var t=this;this.instance=null,this.apiSignInUrl="",this.idSchema="",this.limitIds=200,this.countryRemapper=null,this.competitionBasicRemapper=null,this.competitionFullRemapper=null,this.teamBasicRemapper=null,this.teamFullRemapper=null,this.matchBasicRemapper=null,this.matchFullRemapper=null,this.playerBasicRemapper=null,this.playerFullRemapper=null,this.topPlayerRemapper=null,this.searchRemapper=null,this.footballMetaRemapper=null,this.getCountries=function(){return r(t,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.instance.get("/countries"+this.apiSignInUrl)];case 1:return e=n.sent(),[2,this.countryRemapper.countriesFromResponse(e.data.data)];case 2:throw t=n.sent(),console.warn("There was a problem with the football countries request",t),t;case 3:return[2]}}))}))},this.getCompetitions=function(e){return r(t,void 0,void 0,(function(){var t,n,r,s,o,u,c,l,h=this;return i(this,(function(i){switch(i.label){case 0:if(i.trys.push([0,11,,12]),t={},!(e&&e.competitionIds&&e.competitionIds.length>this.limitIds-1))return[3,5];n=[],r=(0,a.limitIds)(e.competitionIds),s=0,o=r,i.label=1;case 1:return s<o.length?(u=o[s],e.competitionIds=u,[4,this.instance.get("/competitions"+this.apiSignInUrl+e.constructFilterUrl())]):[3,4];case 2:t=i.sent(),n.push(t.data.data.map((function(e){return h.competitionBasicRemapper.fromResponse(e)}))),i.label=3;case 3:return s++,[3,1];case 4:return[2,Array.prototype.concat.apply([],n)];case 5:return e?[4,this.instance.get("/competitions"+this.apiSignInUrl+e.constructFilterUrl())]:[3,7];case 6:return c=i.sent(),[3,9];case 7:return[4,this.instance.get("/competitions"+this.apiSignInUrl)];case 8:c=i.sent(),i.label=9;case 9:return[2,(t=c).data.data.map((function(e){return h.competitionBasicRemapper.fromResponse(e)}))];case 10:return[3,12];case 11:throw l=i.sent(),console.warn("There was a problem with getCompetitions request",l),l.response;case 12:return[2]}}))}))},this.getCompetitionById=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/competitions/"+e+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.competitionFullRemapper.fromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem with getCompetitionById request",n),n.response;case 3:return[2]}}))}))},this.getTopCompetitions=function(){return r(t,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.instance.get("/competitions/top"+this.apiSignInUrl)];case 1:return[2,n.sent().data.data.map((function(e){return t.competitionBasicRemapper.fromResponse(e)}))];case 2:throw e=n.sent(),console.warn("There was a problem with getTopCompetitions request",e),e.response;case 3:return[2]}}))}))},this.getTeams=function(e){return r(t,void 0,void 0,(function(){var t,n,r,s,o,u,c,l,h,d=this;return i(this,(function(i){switch(i.label){case 0:if(i.trys.push([0,11,,12]),t={},!(e&&e.teamIds&&e.teamIds.length>this.limitIds))return[3,5];n=[],r=(0,a.limitIds)(e.teamIds),s=0,o=r,i.label=1;case 1:return s<o.length?(u=o[s],e.teamIds=u,[4,this.instance.get("/teams"+this.apiSignInUrl+e.constructFilterUrl())]):[3,4];case 2:t=i.sent(),n.push(t.data.data.map((function(e){return d.teamBasicRemapper.fromResponse(e)}))),i.label=3;case 3:return s++,[3,1];case 4:return[2,Array.prototype.concat.apply([],n)];case 5:return c=new g.default,e?[4,this.instance.get("/teams"+this.apiSignInUrl+e.constructFilterUrl())]:[3,7];case 6:return l=i.sent(),[3,9];case 7:return[4,this.instance.get("/teams"+this.apiSignInUrl)];case 8:l=i.sent(),i.label=9;case 9:return t=l,c.meta=this.footballMetaRemapper.remapMetaProp(t.data.meta),c.data=t.data.data.map((function(e){return d.teamBasicRemapper.fromResponse(e)})),[2,c];case 10:return[3,12];case 11:throw h=i.sent(),console.warn("There was a problem with getTeams request",h),h.response;case 12:return[2]}}))}))},this.getTeamById=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/teams/"+e+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.teamFullRemapper.fromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem with getTeamById request",n),n.response;case 3:return[2]}}))}))},this.getTopTeams=function(){return r(t,void 0,void 0,(function(){var e,t,n=this;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/teams/top"+this.apiSignInUrl)];case 1:return[2,(e=r.sent()).data.data?e.data.data.map((function(e){return n.teamBasicRemapper.fromResponse(e)})):[]];case 2:throw t=r.sent(),console.warn("There was a problem with getTopTeams request",t),t.response;case 3:return[2]}}))}))},this.getNextMatchForTeam=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/teams/"+e+"/next-match"+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.matchFullRemapper.fromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem with getNextMatchForTeam request",n),n.response;case 3:return[2]}}))}))},this.getPrevMatchForTeam=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/teams/"+e+"/previous-match"+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.matchFullRemapper.fromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem with getPrevMatchForTeam request",n),n.response;case 3:return[2]}}))}))},this.getPlayers=function(e){return r(t,void 0,void 0,(function(){var t,n,r,s,o,u,c,l,h,d,p=this;return i(this,(function(i){switch(i.label){case 0:if(i.trys.push([0,11,,12]),t={},!(e&&e.playerIds&&e.playerIds.length>this.limitIds-1))return[3,5];n=[],r=(0,a.limitIds)(e.playerIds),s=0,o=r,i.label=1;case 1:return s<o.length?(u=o[s],e.playerIds=u,[4,this.instance.get("/players"+this.apiSignInUrl+e.constructFilterUrl())]):[3,4];case 2:t=i.sent(),n.push(t.data.data.map((function(e){return p.teamBasicRemapper.fromResponse(e)}))),i.label=3;case 3:return s++,[3,1];case 4:return[2,Array.prototype.concat.apply([],n)];case 5:return c=new g.default,e?[4,this.instance.get("/players"+this.apiSignInUrl+e.constructFilterUrl())]:[3,7];case 6:return h=i.sent(),[3,9];case 7:return[4,this.instance.get("/players"+this.apiSignInUrl)];case 8:h=i.sent(),i.label=9;case 9:return l=h,c.meta=this.footballMetaRemapper.remapMetaProp(l.data.meta),c.data=l.data.data.map((function(e){return p.playerBasicRemapper.fromResponse(e)})),[2,c];case 10:return[3,12];case 11:throw d=i.sent(),console.warn("There was a problem with getPlayers request",d),d.response;case 12:return[2]}}))}))},this.getPlayerById=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/players/"+e+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.playerFullRemapper.fromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem with getPlayerById request",n),n.response;case 3:return[2]}}))}))},this.getTopPlayers=function(){return r(t,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.instance.get("/players/top"+this.apiSignInUrl)];case 1:return[2,n.sent().data.data.map((function(e){return t.topPlayerRemapper.fromResponse(e)}))];case 2:throw e=n.sent(),console.warn("There was a problem with getTopPlayers request",e),e.response;case 3:return[2]}}))}))},this.getNextMatchForPlayer=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/players/"+e+"/next-match"+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.matchFullRemapper.fromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem with getNextMatchForPlayer request",n),n.response;case 3:return[2]}}))}))},this.getPrevMatchForPlayer=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/players/"+e+"/previous-match"+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.matchFullRemapper.fromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem with getPrevMatchForPlayer request",n),n.response;case 3:return[2]}}))}))},this.getMatchById=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/matches/"+e+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.matchFullRemapper.fromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem with getMatchById request",n),n.response;case 3:return[2]}}))}))},this.getMatches=function(e){return r(t,void 0,void 0,(function(){var t,n,r,s,a=this;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,5,,6]),t=new g.default,e?[4,this.instance.get("/matches"+this.apiSignInUrl+e.constructFilterUrl())]:[3,2];case 1:return r=i.sent(),[3,4];case 2:return[4,this.instance.get("/matches"+this.apiSignInUrl)];case 3:r=i.sent(),i.label=4;case 4:return n=r,t.meta=this.footballMetaRemapper.remapMetaProp(n.data.meta),t.data=n.data.data.map((function(e){return a.matchBasicRemapper.fromResponse(e)})),[2,t];case 5:throw s=i.sent(),console.warn("There was a problem with getMatches request",s),s.response;case 6:return[2]}}))}))},this.search=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/search"+this.apiSignInUrl+e.constructFilterUrl())];case 1:return t=r.sent(),[2,this.searchRemapper.fromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem with search request",n),n.response;case 3:return[2]}}))}))};var n=(0,a.setBaseUrl)(e.environment,"football");this.apiSignInUrl="?key="+e.apiKey+"&lang="+e.lang+"&client_id="+e.clientId,this.idSchema=e.idSchema,this.instance=s.default.create({baseURL:n}),this.countryRemapper=new o.default,this.competitionBasicRemapper=new u.default,this.competitionFullRemapper=new c.default,this.teamBasicRemapper=new l.default,this.teamFullRemapper=new h.default,this.matchBasicRemapper=new d.default,this.matchFullRemapper=new p.default,this.playerBasicRemapper=new m.default,this.playerFullRemapper=new v.default,this.topPlayerRemapper=new f.default,this.searchRemapper=new y.default,this.footballMetaRemapper=new w.default}},8539:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(9669),a=n(712),o={player:"players",team:"teams",homeTeam:"teams",awayTeam:"teams",country:"countries",competition:"competitions",match:"matches"};t.default=function(e){var t=this;this.instance=null,this.apiSignInUrl="",this.getEntityById=function(n,r){try{return t.instance.get("/football"+t.apiSignInUrl+"&input_provider="+e.idSchema+"&"+o[n]+"="+r)}catch(e){throw console.warn("There was a problem with id mapping request for the following id:"+r,e),e.response}},this.getEntityByIdAndSchema=function(e,n,r){try{return t.instance.get("/football"+t.apiSignInUrl+"&input_provider="+r+"&"+o[e]+"="+n)}catch(e){throw console.warn("There was a problem with id mapping request for the following id:"+n,e),e.response}},this.getEntityIdsByIdsAndSchema=function(e,n,r){try{return t.instance.get("/football"+t.apiSignInUrl+"&input_provider="+r+"&"+o[e]+"="+n.join(","))}catch(e){throw console.warn("There was a problem with id mapping request for the following ids:"+n.join(","),e),e.response}},this.getEntitiesByIds=function(e,n,r){n.sort((function(e,t){return e.localeCompare(t)}));var i=(0,a.requestChunkBuild)(n).map((function(n){try{return t.instance.get("/football"+t.apiSignInUrl+"&input_provider="+r+"&"+o[e]+"="+n.join(","))}catch(e){throw console.warn("There was a problem with id mapping request for the following ids:"+n.join(","),e),e.response}}));return Promise.all(i).then((function(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.data.data)})),t}))},this.getEntitiesByIdObjs=function(e,n){return r(t,void 0,void 0,(function(){var t,r,s,u,c,l,h,d,p,f;return i(this,(function(m){switch(m.label){case 0:t=[],r={},s=[],Object.keys(e).forEach((function(n){t.push.apply(t,e[n])})),u=(0,a.transformIdsToBeUnique)(t),c=(0,a.requestChunkBuild)(u),l=function(t){var a,u,c;return i(this,(function(i){switch(i.label){case 0:if(a="",Object.keys(e).forEach((function(n){r[n]=[];var i=t.filter((function(t){return e[n].includes(t)}));i&&i.length>0&&(r[n]=i)})),Object.keys(r).forEach((function(e){r[e].length>0&&(r[e].sort((function(e,t){return e.localeCompare(t)})),a+="&",a+=o[e]+"="+r[e].join(","))})),!(a&&a.length>0))return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,h.instance.get("/football"+h.apiSignInUrl+"&input_provider="+(n||"native")+a)];case 2:return u=i.sent(),s.push(u.data.data),[3,4];case 3:throw c=i.sent(),console.warn("There was a problem with id mapping request",c),c.response;case 4:return[3,6];case 5:s.push([]),i.label=6;case 6:return[2]}}))},h=this,d=0,p=c,m.label=1;case 1:return d<p.length?(f=p[d],[5,l(f)]):[3,4];case 2:m.sent(),m.label=3;case 3:return d++,[3,1];case 4:return[2,Array.prototype.concat.apply([],s)]}}))}))};var n=(0,a.setBaseUrl)(e.environment,"idMapping");this.apiSignInUrl="?key="+e.apiKey+"&client_id="+e.clientId,this.instance=s.default.create({baseURL:n})}},2793:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(9669),a=n(2726),o=n(9679),u=n(712),c=n(4780),l=n(1553),h=n(3623);t.default=function(e,t){var n=this;this.instanceAuth=null,this.instance=null,this.apiSignInUrl=null,this.clientApiSignInUrl=null,this.predictionRemapper=null,this.matchSummaryRemapper=null,this.gamesRemapper=null,this.metaRemapper=null,this.makeFootballPrediction=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t=this.predictionRemapper.remapRequestBody(e),[4,this.instanceAuth.post("/predictions"+this.apiSignInUrl,JSON.stringify(t))];case 1:return n=i.sent(),[4,this.predictionRemapper.remapResponseObjBody(n.data)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem making POST request: ",r),r.response;case 4:return[2]}}))}))},this.getMatchSummary=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/predictions/summary/"+e+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.matchSummaryRemapper.remapResponse(t.data)];case 2:throw n=r.sent(),console.warn("There was a problem fetching predictions for match: "+e+" ",n),n.response;case 3:return[2]}}))}))},this.deleteFootballPrediction=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.instanceAuth.delete("/predictions/"+e+this.apiSignInUrl)];case 1:return n.sent(),[2,!0];case 2:throw t=n.sent(),console.warn("There was a problem deleting your prediction: "+e,t),t.response;case 3:return[2]}}))}))},this.getMyPredictions=function(e){return r(n,void 0,void 0,(function(){var t,n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,6,,7]),t=new l.default,e?[4,this.instanceAuth.get("/predictions"+this.apiSignInUrl+e.constructFilterUrl())]:[3,2];case 1:return r=i.sent(),[3,4];case 2:return[4,this.instanceAuth.get("/predictions"+this.apiSignInUrl)];case 3:r=i.sent(),i.label=4;case 4:return n=r,t.meta=this.metaRemapper.remapMetaData(n.data.meta),s=t,[4,this.predictionRemapper.remapResponseArrayBody(n.data.data)];case 5:return s.data=i.sent(),[2,t];case 6:throw a=i.sent(),console.warn("There was a problem fetching own predictions",a),a.response;case 7:return[2]}}))}))},this.getMyPredictionsNoRemap=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.instanceAuth.get("/predictions"+this.apiSignInUrl+e.constructFilterUrl())];case 1:return[2,n.sent().data.data];case 2:throw t=n.sent(),console.warn("There was a problem fetching own predictions",t),t.response;case 3:return[2]}}))}))},this.getUserPredictions=function(e,t){return r(n,void 0,void 0,(function(){var n,r,s,a,o;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,6,,7]),n=new l.default,t?[4,this.instance.get("/predictions/users/"+e+this.apiSignInUrl+t.constructFilterUrl())]:[3,2];case 1:return s=i.sent(),[3,4];case 2:return[4,this.instance.get("/predictions/users/"+e+this.apiSignInUrl)];case 3:s=i.sent(),i.label=4;case 4:return r=s,n.meta=this.metaRemapper.remapMetaData(r.data.meta),a=n,[4,this.predictionRemapper.remapResponseArrayBody(r.data.data)];case 5:return a.data=i.sent(),[2,n];case 6:throw o=i.sent(),console.warn("There was a problem fetching predictions for user: "+e,o),o.response;case 7:return[2]}}))}))},this.getUserPredictionsNoRemap=function(e,t){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/predictions/users/"+e+this.apiSignInUrl+t.constructFilterUrl())];case 1:return[2,r.sent().data.data];case 2:throw n=r.sent(),console.warn("There was a problem fetching predictions for user: "+e,n),n.response;case 3:return[2]}}))}))},this.getGames=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/games/"+this.apiSignInUrl+e.constructFiltersUrl())];case 1:return t=r.sent(),[2,this.gamesRemapper.remapPaginatedGames(t.data)];case 2:throw n=r.sent(),console.warn("There was a problem fetching the games list",n),n.response;case 3:return[2]}}))}))},this.getGameById=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/games/"+e+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.gamesRemapper.remapGamesListResponse(t.data)];case 2:throw n=r.sent(),console.warn("There was a problem fetching the following game: "+e,n),n.response;case 3:return[2]}}))}))},this.getUserGameEditions=function(e){return r(n,void 0,void 0,(function(){var t,n,r,s=this;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),t=null,[4,this.instance.get("/games/"+this.apiSignInUrl+e.constructFiltersUrl())];case 1:return(n=i.sent()).data.data.forEach((function(e){"TOP_X"===e.type?t=s.gamesRemapper.remapPaginatedUserTopXEditions(n.data):"MATCH_QUIZ"===e.type&&(t=s.gamesRemapper.remapPaginatedUserMathQuizEditions(n.data))})),[2,t];case 2:throw r=i.sent(),console.warn("There was a problem fetching the games list",r),r.response;case 3:return[2]}}))}))},this.getGameResults=function(e,t){return r(n,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,5,,6]),t?[4,this.instance.get("/games/"+e+"/results/"+this.apiSignInUrl+t.constructFiltersUrl())]:[3,2];case 1:return r=i.sent(),[3,4];case 2:return[4,this.instance.get("/games/"+e+"/results/"+this.apiSignInUrl)];case 3:r=i.sent(),i.label=4;case 4:return n=r,[2,this.gamesRemapper.remapPaginatedGameResults(n.data)];case 5:throw s=i.sent(),console.warn("There was a problem fetching the results for the following game: "+e,s),s.response;case 6:return[2]}}))}))};var d=(0,u.setBaseUrl)(e.environment,"predictor");this.apiSignInUrl="?key="+e.apiKey+"&client_id="+e.clientId,this.predictionRemapper=new a.default(e,t),this.matchSummaryRemapper=new o.default(e,t),this.gamesRemapper=new c.default,this.metaRemapper=new h.default,this.instanceAuth=s.default.create({baseURL:d,headers:{Authorization:"Bearer "+e.authProvider.getIdToken(),"Content-Type":"application/json"}}),this.instance=s.default.create({baseURL:d,headers:{"Content-Type":"application/json"}})}},4275:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(9669),a=n(712),o=n(441),u=n(8673),c=n(6277),l=n(1712);t.default=function(e){var t=this;this.instanceAuth=null,this.instance=null,this.apiSignInUrl=null,this.profileRemapper=null,this.followingRemapper=null,this.followersRemapper=null,this.getCountries=function(){return r(t,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.instance.get("/countries"+this.apiSignInUrl)];case 1:return[2,t.sent().data.data];case 2:throw e=t.sent(),console.warn("There was a problem fetching the countries:",e),e.response;case 3:return[2]}}))}))},this.getProfile=function(e){return r(t,void 0,void 0,(function(){var t,n,r,s;return i(this,(function(i){switch(i.label){case 0:if(t="/profile"+this.apiSignInUrl,!e)return[3,5];t="/profiles/"+e+this.apiSignInUrl,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.instance.get(t)];case 2:return r=i.sent(),[2,this.profileRemapper.fullProfileFromResponse(r.data.data)];case 3:throw n=i.sent(),console.warn("There was a problem fetching the following profile: "+e,n),n.response;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.instanceAuth.get(t)];case 6:return r=i.sent(),[2,this.profileRemapper.fullProfileFromResponse(r.data.data)];case 7:throw s=i.sent(),console.warn("There was a problem fetching your profile from API:",s),s.response;case 8:return[2]}}))}))},this.getProfiles=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/profiles"+this.apiSignInUrl+"&profile_ids="+e.join(","))];case 1:return t=r.sent(),[2,this.profileRemapper.profilesFromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem fetching the following profiles: "+e.join(","),n),n.response;case 3:return[2]}}))}))},this.getFollowers=function(e,n){return r(t,void 0,void 0,(function(){var t,r,s,a,o;return i(this,(function(i){switch(i.label){case 0:if(t="/profile/followers"+this.apiSignInUrl,!e||n)return[3,5];t="/profile/followers"+this.apiSignInUrl+e.constructFilterUrl(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.instanceAuth.get(t)];case 2:return a=i.sent(),[2,this.followersRemapper.followersFromResponse(a.data)];case 3:throw r=i.sent(),console.warn("There was a problem fetching the followers for own profile",r),r.response;case 4:return[3,9];case 5:if(e||n)return[3,9];i.label=6;case 6:return i.trys.push([6,8,,9]),[4,this.instanceAuth.get(t)];case 7:return a=i.sent(),[2,this.followersRemapper.followersFromResponse(a.data)];case 8:throw s=i.sent(),console.warn("There was a problem fetching the followers for own profile",s),s.response;case 9:e&&n?t="/profile/"+n+"/followers"+this.apiSignInUrl+e.constructFilterUrl():!e&&n&&(t="/profile/"+n+"/followers"+this.apiSignInUrl),i.label=10;case 10:return i.trys.push([10,12,,13]),[4,this.instance.get(t)];case 11:return a=i.sent(),[2,this.followersRemapper.followersFromResponse(a.data)];case 12:throw o=i.sent(),console.warn("There was a problem fetching the followers for profile: "+n,o),o.response;case 13:return[2]}}))}))},this.getFollowing=function(e,n){return r(t,void 0,void 0,(function(){var t,r,s,a,o;return i(this,(function(i){switch(i.label){case 0:if(t="/profile/following"+this.apiSignInUrl,!e||n)return[3,5];t="/profile/following"+this.apiSignInUrl+e.constructFilterUrl(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.instanceAuth.get(t)];case 2:return a=i.sent(),[2,this.followingRemapper.followingFromResponse(a.data)];case 3:throw r=i.sent(),console.warn("There was a problem fetching the followers of own profile",r),r.response;case 4:return[3,9];case 5:if(e||n)return[3,9];i.label=6;case 6:return i.trys.push([6,8,,9]),[4,this.instanceAuth.get(t)];case 7:return a=i.sent(),[2,this.followingRemapper.followingFromResponse(a.data)];case 8:throw s=i.sent(),console.warn("There was a problem fetching the followers of own profile",s),s.response;case 9:e&&n?t="/profile/"+n+"/following"+this.apiSignInUrl+e.constructFilterUrl():!e&&n&&(t="/profile/"+n+"/following"+this.apiSignInUrl),i.label=10;case 10:return i.trys.push([10,12,,13]),[4,this.instance.get(t)];case 11:return a=i.sent(),[2,this.followingRemapper.followingFromResponse(a.data)];case 12:throw o=i.sent(),console.warn("There was a problem fetching the followers of the following profile: "+n,o),o.response;case 13:return[2]}}))}))},this.follow=function(e){return r(t,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:(t=new l.default).profile_ids=e,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.instanceAuth.post("/profile/follow"+this.apiSignInUrl,JSON.stringify(t))];case 2:return n=i.sent(),[2,this.followingRemapper.followResponse(n.data.data)];case 3:throw r=i.sent(),console.warn("There was a problem with POST request for profiles: "+e.join(",")+" ",r),r.response;case 4:return[2]}}))}))},this.unfollow=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:(t=new l.default).profile_ids=e,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.instanceAuth.delete("/profile/follow"+this.apiSignInUrl,{data:JSON.stringify(t)})];case 2:return r.sent(),[2,!0];case 3:throw n=r.sent(),console.warn("There was a problem with DELETE request for profiles: "+e.join(",")+" ",n),n.response;case 4:return[2]}}))}))},this.updateProfile=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instanceAuth.patch("/profile"+this.apiSignInUrl,e)];case 1:return t=r.sent(),[2,this.profileRemapper.fullProfileFromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem updating the own profile:",n),n.response;case 3:return[2]}}))}))};var n=(0,a.setBaseUrl)(e.environment,"profile");this.apiSignInUrl="?key="+e.apiKey+"&client_id="+e.clientId+"&lang="+e.lang,this.instanceAuth=s.default.create({baseURL:n,headers:{Authorization:"Bearer "+e.authProvider.getIdToken(),"Content-Type":"application/json"}}),this.instanceAuth.interceptors.request.use((function(e){return e}),(function(e){Promise.reject(e)})),this.instanceAuth.interceptors.response.use((function(e){return e}),(function(n){var r=n.config;if((403===n.response.status||401===n.response.status)&&!r._retry){r._retry=!0;var i=e.authProvider.getIdToken();return r.headers.Authorization="Bearer "+i,t.instanceAuth(r)}return Promise.reject(n)})),this.instance=s.default.create({baseURL:n,headers:{"Content-Type":"application/json"}}),this.profileRemapper=new o.default,this.followingRemapper=new u.default,this.followersRemapper=new c.default}},5792:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(5601),a=n(8539),o=n(1260);t.default=function(e){var t=this;this.isBrowser=!1,this.localStorage=null,this.https=null,this.getEntitiesByIds=function(e,n,s){return r(t,void 0,void 0,(function(){var t,r,a,u,c,l;return i(this,(function(i){switch(i.label){case 0:if(!this.isBrowser)return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),t=this.localStorage.checkForExistingIdObjs(e,n),r=this.splitForRequestAndExisting(t),[4,this.https.getEntitiesByIdObjs(r.request,n)];case 2:return a=i.sent(),this.localStorage.addIdMappings(a),[2,this.localStorage.getIdsByType(e,n,s)];case 3:return u=i.sent(),console.warn("There was a problem retrieving the entity ids ",u),[2,Promise.resolve([])];case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.https.getEntitiesByIdObjs(e,n)];case 6:return c=i.sent(),Object.keys(e).forEach((function(t){e[t]=c.filter((function(e){return e.resource===t})).map((function(e){return e[o.ID_TYPES[s]]}))})),[2,e];case 7:return l=i.sent(),console.warn("There was a problem retrieving the entity ids ",l),[2,Promise.resolve([])];case 8:return[2]}}))}))},this.getEntityById=function(e,n,s){return r(t,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(t=this.localStorage.getEntity(e,n,s))?[2,t]:[3,1]:[3,4];case 1:case 4:return[4,this.requestEntity(e,n,s)];case 2:return r=i.sent(),this.localStorage.addIdMappings(r),[2,r];case 3:return[3,6];case 5:return[2,i.sent()];case 6:return[2]}}))}))},this.splitForRequestAndExisting=function(e){var t={},n={};return Object.keys(e).forEach((function(r){t[r]=e[r].filter((function(e){return!e.exists})).map((function(e){return e.id})),n[r]=e[r].filter((function(e){return e.exists})).map((function(e){return e.id}))})),{existing:n,request:t}},this.requestEntity=function(e,n,s){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=Array.isArray(e)?e:[e],[4,this.https.getEntitiesByIds(n,e,s)];case 1:return[2,r.sent()];case 2:return t=r.sent(),console.warn("There was a problem retrieving the requested entity: "+t),[2,null];case 3:return[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=new s.default(e),this.https=new a.default(e)}},8900:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(4946),a=n(5792),o=n(7611),u=n(9052);t.default=function(e){var t=this;this.idSchema="",this.idMappingFacade=null,this.getEntityIdBySchemaId=function(e,n){return t.idMappingFacade.getEntityById(e,n,t.idSchema)},this.remapEntities=function(e,n){return r(t,void 0,void 0,(function(){var t,r,a;return i(this,(function(i){t=JSON.parse(JSON.stringify(e));try{return this.idSchema!==s.IdSchemaEnum.NATIVE?(r=new o.default,a=r.traverse(t,n),[2,this.idMappingFacade.getEntitiesByIds(a,"native",this.idSchema).then((function(e){return(new u.default).traverse(t,n,e)}))]):[2,e]}catch(e){return console.warn("There was a problem remapping entity: "+n+" with inner entity ",e),[2,[]]}return[2]}))}))},this.getEntityIdsBySchemaId=function(e,n,a){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return(t={})[n]=e,this.idSchema===s.IdSchemaEnum.NATIVE?[3,2]:[4,this.idMappingFacade.getEntitiesByIds(t,this.idSchema,a)];case 1:return[2,r.sent()];case 2:return[2,t]}}))}))},this.idSchema=e.idSchema,this.idMappingFacade=new a.default(e)}},3845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.typeConvert=void 0,t.typeConvert=function(e){switch(e){case"competitions":return"competition";case"players":case"relatedPlayer":case"squad":return"player";case"teams":case"participants":case"homeTeam":case"awayTeam":case"timeline":case"teamId":return"team";default:return e}}},7611:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3845);t.default=function(){var e=this;this.extractedObjIds={},this.traverse=function(t,n){return n=(0,r.typeConvert)(n),Array.isArray(t)?e.traverseArrExtract(t,n):t&&"object"==typeof t&&e.traverseObjExtract(t,n),e.extractedObjIds},this.traverseArrExtract=function(t,n){t&&t.length>0&&t.forEach((function(t){e.traverseObjExtract(t,n)}))},this.traverseObjExtract=function(t,n){t&&Object.keys(t).length>0&&Object.keys(t).forEach((function(r){var i=t[r];"id"===r||"teamId"===r?(e.extractedObjIds.hasOwnProperty(n)||(e.extractedObjIds[n]=[]),e.extractedObjIds[n].push(i)):t[r]&&e.traverse(t[r],r)}))}}},9052:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3845);t.default=function(){var e=this;this.replaceObjIdsIndex=null,this.remappedIdsObj={},this.traverse=function(t,n,i){return n=(0,r.typeConvert)(n),null===e.replaceObjIdsIndex&&(e.initReplaceObjIdsIndex(i),e.remappedIdsObj=i),Array.isArray(t)?e.traverseArrReplace(t,n):t&&"object"==typeof t&&e.traverseObjReplace(t,n),t},this.initReplaceObjIdsIndex=function(t){e.replaceObjIdsIndex={},Object.keys(t).forEach((function(t){e.replaceObjIdsIndex[t]=0}))},this.traverseArrReplace=function(t,n){t&&t.length>0&&t.forEach((function(t){e.traverseObjReplace(t,n)}))},this.traverseObjReplace=function(t,n){t&&Object.keys(t).length>0&&Object.keys(t).forEach((function(r){"id"===r||"teamId"===r?(t[r]=e.remappedIdsObj[n][e.replaceObjIdsIndex[n]],e.replaceObjIdsIndex[n]=e.replaceObjIdsIndex[n]+1):t[r]&&e.traverse(t[r],r,e.remappedIdsObj)}))}}},7e3:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(2754);t.default=function(e,t,n){var a=this;this.isBrowser=!1,this.localStorage={},this.https=null,this.idMapping=null,this.getCompetitionsIdMapping=function(e){return r(a,void 0,void 0,(function(){var t,n,r,a,o;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,8,,9]),t=!1,e?(e=new s.default(e)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([""+e.countryId],"country","native")]:[3,2]:[3,5];case 1:0===(n=i.sent()).country.length&&(t=!0),e.countryId=n.country[0],i.label=2;case 2:return e.competitionIds?[4,this.idMapping.getEntityIdsBySchemaId(e.competitionIds,"competition","native")]:[3,4];case 3:0===(r=i.sent()).competition.length&&(t=!0),e.competitionIds=r.competition,i.label=4;case 4:if(t)return[2,[]];i.label=5;case 5:return[4,this.getCompetitions(e)];case 6:return a=i.sent(),[4,this.idMapping.remapEntities(a,"competition")];case 7:return[2,i.sent()];case 8:throw o=i.sent(),console.warn("There was a problem browsing all of the competitions",o),o;case 9:return[2]}}))}))},this.getCompetitions=function(e){return r(a,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(t=this.localStorage.getCompetitions(e))&&t.length>0?[2,t]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.https.getCompetitions(e)];case 2:return n=i.sent(),this.localStorage.setCompetitions(n),[2,this.localStorage.getCompetitions(e)];case 3:throw r=i.sent(),console.warn("There was a problem retrieving all competitions",r),r;case 4:return[3,6];case 5:return[2,this.https.getCompetitions(e)];case 6:return[2]}}))}))},this.getCompetitionByIdIdMapping=function(e){return r(a,void 0,void 0,(function(){var t,n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"competition","native")];case 1:return t=i.sent(),n=t.competition[0],[4,this.getCompetitionById(n)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"competition")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the following competition:"+e,s),s;case 5:return[2]}}))}))},this.getCompetitionById=function(e){return r(a,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getCompetitionById(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the competition with the following id: "+e,t),t;case 3:return[2]}}))}))},this.getTopCompetitionsIdMapping=function(){return r(a,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,this.getTopCompetitions()];case 1:return e=n.sent(),[4,this.idMapping.remapEntities(e,"competition")];case 2:return[2,n.sent()];case 3:throw t=n.sent(),console.warn("There was a problem browsing the top competitions",t),t;case 4:return[2]}}))}))},this.getTopCompetitions=function(){return r(a,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.https.getTopCompetitions()];case 1:return[2,t.sent()];case 2:throw e=t.sent(),console.warn("There was a problem retrieving the top competitions",e),e;case 3:return[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=e,this.idMapping=n,this.https=t}},8350:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t,i){var s=this;this.isBrowser=!1,this.localStorage={},this.https=null,this.idMapping=null,this.getCountriesWithIdMapping=function(){return n(s,void 0,void 0,(function(){var e,t;return r(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getCountries()];case 1:return e=n.sent(),[2,this.idMapping.remapEntities(e,"country")];case 2:throw t=n.sent(),console.warn("There was a problem browsing countries as football entities",t),t;case 3:return[2]}}))}))},this.getCountries=function(){return n(s,void 0,void 0,(function(){var e,t,n;return r(this,(function(r){switch(r.label){case 0:return this.isBrowser?(e=this.localStorage.getFootballCountries())&&e.length>0?[2,e]:[3,1]:[3,5];case 1:return r.trys.push([1,3,,4]),[4,this.https.getCountries()];case 2:return t=r.sent(),this.localStorage.setFootballCountries(t),[2,t];case 3:throw n=r.sent(),console.warn("There was a problem retrieving countries as football entities",n),n;case 4:return[3,6];case 5:return[2,this.https.getCountries()];case 6:return[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=e,this.idMapping=i,this.https=t}},4289:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(8350),a=n(7e3),o=n(9693),u=n(4272),c=n(4545),l=n(2140);t.default=function(e,t,n){var h=this;this.isBrowser=!1,this.localStorage={},this.https=null,this.idMapping=null,this.countriesFacade=null,this.competitionsFacade=null,this.teamsFacade=null,this.playerFacade=null,this.matchFacade=null,this.searchFacade=null,this.getCountries=function(){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.countriesFacade.getCountriesWithIdMapping()]}))}))},this.getCompetitions=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.competitionsFacade.getCompetitionsIdMapping(e)]}))}))},this.getCompetitionById=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.competitionsFacade.getCompetitionByIdIdMapping(e)]}))}))},this.getTopCompetitions=function(){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.competitionsFacade.getTopCompetitionsIdMapping()]}))}))},this.getTeams=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.teamsFacade.getTeamsIdMapping(e)]}))}))},this.getTeamById=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.teamsFacade.getTeamByIdIdMapping(e)]}))}))},this.getTopTeams=function(){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.teamsFacade.getTopTeamsIdMapping()]}))}))},this.getNextMatchForTeam=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.teamsFacade.getNextMatchForTeamIdMapping(e)]}))}))},this.getPrevMatchForTeam=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.teamsFacade.getPrevMatchForTeamIdMapping(e)]}))}))},this.getPlayers=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.playerFacade.getPlayersIdMapping(e)]}))}))},this.getPlayerById=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.playerFacade.getPlayerIdMapping(e)]}))}))},this.getTopPlayers=function(){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.playerFacade.getTopPlayersIdMapping()]}))}))},this.getNextMatchForPlayer=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.playerFacade.getNextMatchForPlayerIdMapping(e)]}))}))},this.getPrevMatchForPlayer=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.playerFacade.getPrevMatchForPlayerIdMapping(e)]}))}))},this.getMatches=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.matchFacade.getMatchesIdMapping(e)]}))}))},this.getMatchById=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.matchFacade.getMatchIdMapping(e)]}))}))},this.search=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.searchFacade.searchIdMapping(e)]}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=e,this.idMapping=n,this.https=t,this.countriesFacade=new s.default(e,t,n),this.competitionsFacade=new a.default(e,t,n),this.teamsFacade=new o.default(t,n),this.playerFacade=new u.default(t,n),this.matchFacade=new c.default(t,n),this.searchFacade=new l.default(t,n)}},4545:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(712),a=n(6134);t.default=function(e,t){var n=this;this.https=null,this.idMapping=null,this.getMatchesIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r,s,o,u,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,11,,12]),e?(e=new a.default(e)).countryIds?[4,this.idMapping.getEntityIdsBySchemaId(e.countryIds,"country","native")]:[3,2]:[3,8];case 1:t=i.sent(),e.countryIds=t.country,i.label=2;case 2:return e.competitionIds?[4,this.idMapping.getEntityIdsBySchemaId(e.competitionIds,"competition","native")]:[3,4];case 3:n=i.sent(),e.competitionIds=n.competition,i.label=4;case 4:return e.matchIds?[4,this.idMapping.getEntityIdsBySchemaId(e.matchIds,"match","native")]:[3,6];case 5:r=i.sent(),e.matchIds=r.match,i.label=6;case 6:return e.teamIds?[4,this.idMapping.getEntityIdsBySchemaId(e.teamIds,"team","native")]:[3,8];case 7:s=i.sent(),e.teamIds=s.team,i.label=8;case 8:return[4,this.getMatches(e)];case 9:return o=i.sent(),u=o,[4,this.idMapping.remapEntities(o.data,"match")];case 10:return u.data=i.sent(),[2,o];case 11:throw c=i.sent(),console.warn("There was a problem browsing the matches",c),c;case 12:return[2]}}))}))},this.getMatchesWithNativeIds=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=new a.default({matchIds:e}),[4,this.getMatches(t)];case 1:return(n=r.sent()).data.sort((function(e,t){return e.id.localeCompare(t.id)})),[4,this.idMapping.remapEntities(n.data,"match")];case 2:return[2,r.sent()]}}))}))},this.getMatchesMapWithNativeIds=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return t={},(n=(0,s.transformIdsToBeUnique)(e)).sort((function(e,t){return e.localeCompare(t)})),[4,this.getMatchesWithNativeIds(n)];case 1:return r=i.sent(),n.forEach((function(e,n){return t[e]=r[n]})),[2,t]}}))}))},this.getMatches=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getMatches(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the matches",t),t;case 3:return[2]}}))}))},this.getMatchIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"match","native")];case 1:return t=i.sent(),[4,this.getMatchById(t.match[0])];case 2:return n=i.sent(),[4,this.idMapping.remapEntities(n,"match")];case 3:return[2,i.sent()];case 4:throw r=i.sent(),console.warn("There was a problem browsing the following match: "+e,r),r;case 5:return[2]}}))}))},this.getMatchById=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getMatchById(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the following match: "+e,t),t;case 3:return[2]}}))}))},this.https=e,this.idMapping=t}},4272:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(6477),a=n(712);t.default=function(e,t){var n=this;this.https=null,this.idMapping=null,this.getPlayersIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r,a,o,u,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,10,,11]),t=!1,e?(e=new s.default(e)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([e.countryId],"country","native")]:[3,2]:[3,7];case 1:0===(n=i.sent()).country.length&&(t=!0),e.countryId=n.country[0],i.label=2;case 2:return e.playerIds?[4,this.idMapping.getEntityIdsBySchemaId(e.playerIds,"player","native")]:[3,4];case 3:0===(r=i.sent()).player.length&&(t=!0),e.playerIds=r.player,i.label=4;case 4:return e.scope?[4,this.idMapping.getEntityIdsBySchemaId(e.scope,"competition","native")]:[3,6];case 5:0===(a=i.sent()).competition.length&&(t=!0),e.scope=a.competition,i.label=6;case 6:if(t)return[2,[]];i.label=7;case 7:return[4,this.getPlayers(e)];case 8:return o=i.sent(),u=o,[4,this.idMapping.remapEntities(o.data,"player")];case 9:return u.data=i.sent(),[2,o];case 10:throw c=i.sent(),console.warn("There was a problem browsing the players",c),c;case 11:return[2]}}))}))},this.getPlayersWithNativeIds=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=new s.default({playerIds:e}),[4,this.getPlayers(t)];case 1:return(n=r.sent()).data.sort((function(e,t){return e.id.localeCompare(t.id)})),[4,this.idMapping.remapEntities(n.data,"player")];case 2:return[2,r.sent()]}}))}))},this.getPlayersMapWithNativeIds=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return t={},(n=(0,a.transformIdsToBeUnique)(e)).sort((function(e,t){return e.localeCompare(t)})),[4,this.getPlayersWithNativeIds(n)];case 1:return r=i.sent(),n.forEach((function(e,n){return t[e]=r[n]})),[2,t]}}))}))},this.getPlayers=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getPlayers(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the players",t),t;case 3:return[2]}}))}))},this.getPlayerIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"player","native")];case 1:return t=i.sent(),[4,this.getPlayerById(t.player[0])];case 2:return n=i.sent(),[4,this.idMapping.remapEntities(n,"player")];case 3:return[2,i.sent()];case 4:throw r=i.sent(),console.warn("There was a problem browsing the following player:"+e,r),r;case 5:return[2]}}))}))},this.getPlayerById=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getPlayerById(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the following player: "+e,t),t;case 3:return[2]}}))}))},this.getTopPlayersIdMapping=function(){return r(n,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,this.getTopPlayers()];case 1:return e=n.sent(),[4,this.idMapping.remapEntities(e,"player")];case 2:return[2,n.sent()];case 3:throw t=n.sent(),console.warn("There was a problem browsing the top players",t),t;case 4:return[2]}}))}))},this.getTopPlayers=function(){return r(n,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.https.getTopPlayers()];case 1:return[2,t.sent()];case 2:throw e=t.sent(),console.warn("There was a problem retrieving the top players",e),e;case 3:return[2]}}))}))},this.getNextMatchForPlayerIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"player","native")];case 1:return t=i.sent(),e=t.player[0],[4,this.getNextMatchForPlayer(e)];case 2:return n=i.sent(),[4,this.idMapping.remapEntities(n,"match")];case 3:return[2,i.sent()];case 4:throw r=i.sent(),console.warn("There was a problem browsing the next match for player:"+e,r),r;case 5:return[2]}}))}))},this.getNextMatchForPlayer=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getNextMatchForPlayer(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the next match for player: "+e,t),t;case 3:return[2]}}))}))},this.getPrevMatchForPlayerIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"player","native")];case 1:return t=i.sent(),e=t.player[0],[4,this.getPrevMatchForPlayer(e)];case 2:return n=i.sent(),[4,this.idMapping.remapEntities(n,"match")];case 3:return[2,i.sent()];case 4:throw r=i.sent(),console.warn("There was a problem browsing the previous match for player:"+e,r),r;case 5:return[2]}}))}))},this.getPrevMatchForPlayer=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getPrevMatchForPlayer(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the previous match for player: "+e,t),t;case 3:return[2]}}))}))},this.idMapping=t,this.https=e}},2140:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(604);t.default=function(e,t){var n=this;this.https=null,this.idMapping=null,this.searchIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r,a,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,10,,11]),(e=new s.default(e)).scope?[4,this.idMapping.getEntityIdsBySchemaId(e.scope,"competition","native")]:[3,2];case 1:t=i.sent(),e.scope=t.competition,i.label=2;case 2:return[4,this.search(e)];case 3:return(n=i.sent()).teams&&n.teams.length>0?[4,this.idMapping.remapEntities(n.teams,"team")]:[3,5];case 4:r=i.sent(),n.teams=r,i.label=5;case 5:return n.players&&n.players.length>0?[4,this.idMapping.remapEntities(n.players,"player")]:[3,7];case 6:a=i.sent(),n.players=a,i.label=7;case 7:return n.competitions&&n.competitions.length>0?[4,this.idMapping.remapEntities(n.competitions,"competition")]:[3,9];case 8:o=i.sent(),n.competitions=o,i.label=9;case 9:return[2,n];case 10:throw u=i.sent(),console.warn("There was a problem with browsing the search result",u),u;case 11:return[2]}}))}))},this.search=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.search(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the search response",t),t;case 3:return[2]}}))}))},this.https=e,this.idMapping=t}},9693:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(9920);t.default=function(e,t){var n=this;this.https=null,this.idMapping=null,this.getTeamsIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r,a,o,u,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,9,,10]),t=!1,e?(e=new s.default(e)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([""+e.countryId],"country","native")]:[3,2]:[3,6];case 1:0===(n=i.sent()).country.length&&(t=!0),e.countryId=n.country[0],i.label=2;case 2:return e.scope?[4,this.idMapping.getEntityIdsBySchemaId(e.scope,"competition","native")]:[3,4];case 3:0===(r=i.sent()).competition.length&&(t=!0),e.scope=r.competition,i.label=4;case 4:return e.teamIds?[4,this.idMapping.getEntityIdsBySchemaId(e.teamIds,"team","native")]:[3,6];case 5:0===(a=i.sent()).team.length&&(t=!0),e.teamIds=a.team,i.label=6;case 6:return t?[2,[]]:[4,this.getTeams(e)];case 7:return o=i.sent(),u=o,[4,this.idMapping.remapEntities(o.data,"team")];case 8:return u.data=i.sent(),[2,o];case 9:throw c=i.sent(),console.warn("There was a problem browsing all teams",c),c;case 10:return[2]}}))}))},this.getTeams=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getTeams(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving all teams",t),t;case 3:return[2]}}))}))},this.getTeamByIdIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"team","native")];case 1:return t=i.sent(),e=t.team[0],[4,this.getTeamById(e)];case 2:return n=i.sent(),[4,this.idMapping.remapEntities(n,"team")];case 3:return[2,i.sent()];case 4:throw r=i.sent(),console.warn("There was a problem browsing the following team:"+e,r),r;case 5:return[2]}}))}))},this.getTeamById=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getTeamById(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the following team: "+e,t),t;case 3:return[2]}}))}))},this.getTopTeamsIdMapping=function(){return r(n,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,this.getTopTeams()];case 1:return e=n.sent(),[4,this.idMapping.remapEntities(e,"team")];case 2:return[2,n.sent()];case 3:throw t=n.sent(),console.warn("There was a problem browsing the top teams",t),t;case 4:return[2]}}))}))},this.getTopTeams=function(){return r(n,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.https.getTopTeams()];case 1:return[2,t.sent()];case 2:throw e=t.sent(),console.warn("There was a problem retrieving the top teams",e),e;case 3:return[2]}}))}))},this.getNextMatchForTeamIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"team","native")];case 1:return t=i.sent(),e=t.team[0],[4,this.getNextMatchForTeam(e)];case 2:return n=i.sent(),[4,this.idMapping.remapEntities(n,"match")];case 3:return[2,i.sent()];case 4:throw r=i.sent(),console.warn("There was a problem browsing the next match for the following team:"+e,r),r;case 5:return[2]}}))}))},this.getNextMatchForTeam=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getNextMatchForTeam(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the next match for the following team: "+e,t),t;case 3:return[2]}}))}))},this.getPrevMatchForTeamIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"team","native")];case 1:return t=i.sent(),e=t.team[0],[4,this.getPrevMatchForTeam(e)];case 2:return n=i.sent(),[4,this.idMapping.remapEntities(n,"match")];case 3:return[2,i.sent()];case 4:throw r=i.sent(),console.warn("There was a problem browsing the previous match for the following team:"+e,r),r;case 5:return[2]}}))}))},this.getPrevMatchForTeam=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getPrevMatchForTeam(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the previous match for the following team: "+e,t),t;case 3:return[2]}}))}))},this.idMapping=t,this.https=e}},8808:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(8900),a=n(5601),o=n(595),u=n(4289);t.default=function(e){var t=this;this.https=null,this.idMapping=null,this.localStorage=null,this.footballFacade=null,this.getCountries=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getCountries()];case 1:return[2,e.sent()]}}))}))},this.getCompetitions=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getCompetitions(e)];case 1:return[2,t.sent()]}}))}))},this.getCompetitionById=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getCompetitionById(e)];case 1:return[2,t.sent()]}}))}))},this.getTopCompetitions=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopCompetitions()];case 1:return[2,e.sent()]}}))}))},this.getTeams=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getTeams(e)];case 1:return[2,t.sent()]}}))}))},this.getTeamById=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getTeamById(e)];case 1:return[2,t.sent()]}}))}))},this.getTopTeams=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopTeams()];case 1:return[2,e.sent()]}}))}))},this.getNextMatchForTeam=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getNextMatchForTeam(e)];case 1:return[2,t.sent()]}}))}))},this.getPrevMatchForTeam=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getPrevMatchForTeam(e)];case 1:return[2,t.sent()]}}))}))},this.getPlayers=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getPlayers(e)];case 1:return[2,t.sent()]}}))}))},this.getPlayerById=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getPlayerById(e)];case 1:return[2,t.sent()]}}))}))},this.getTopPlayers=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopPlayers()];case 1:return[2,e.sent()]}}))}))},this.getNextMatchForPlayer=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getNextMatchForPlayer(e)];case 1:return[2,t.sent()]}}))}))},this.getPrevMatchForPlayer=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getPrevMatchForPlayer(e)];case 1:return[2,t.sent()]}}))}))},this.getMatches=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getMatches(e)];case 1:return[2,t.sent()]}}))}))},this.getMatchById=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getMatchById(e)];case 1:return[2,t.sent()]}}))}))},this.search=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.search(e)];case 1:return[2,t.sent()]}}))}))},this.https=new o.default(e),this.idMapping=new s.default(e),this.localStorage=new a.default(e),this.footballFacade=new u.default(this.localStorage,this.https,this.idMapping)}},6975:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.type="",this.name=""}},2754:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=this;this.countryId=null,this.name=null,this.gender=null,this.type=null,this.sortField=null,this.sortOrder=null,this.competitionIds=null,this.constructFilterUrl=function(){var e="";return t.countryId&&(e=(e+="&")+"country_id="+t.countryId),t.gender&&(e=(e+="&")+"gender="+t.gender),t.type&&(e=(e+="&")+"type="+t.type),t.sortField&&(e=(e+="&")+"sort_field="+t.sortField),t.sortOrder&&(e=(e+="&")+"sort_order="+t.sortOrder),t.name&&(e=(e+="&")+"name="+t.name),t.competitionIds&&(e=(e+="&")+"competition_ids="+t.competitionIds.join(",")),e},this.competitionSearchFilter=function(e){try{var n=t.filter(e);return t.sortField||t.sortOrder?t.sort(n):n}catch(e){return console.warn("There was a problem filtering the local competitions",e),[]}},this.filter=function(e){var n=t.entitiesToSearchWith();return e.filter((function(e){var r=!0;return n.forEach((function(n){"sortOrder"!==n&&"sortField"!==n&&("countryId"===n?r&&(r=e.country.id===t[n]):"name"===n?r&&(r=e.name.toLocaleLowerCase().includes(t[n].toLocaleLowerCase())):"competitionIds"===n?r&&(r=t[n].some((function(t){return e.id===t}))):r&&(r=e[n].toLocaleLowerCase()===t[n].toLocaleLowerCase()))})),r}))},this.entitiesToSearchWith=function(){var e=[];return t.countryId&&e.push("countryId"),t.name&&e.push("name"),t.gender&&e.push("gender"),t.type&&e.push("type"),t.sortField&&e.push("sortField"),t.sortOrder&&e.push("sortOrder"),t.competitionIds&&e.push("competitionIds"),e},this.sort=function(e){var n=[];return"name"===t.sortField?n=e.sort((function(e,n){return t.sortOrder&&"desc"===t.sortOrder?n.name.localeCompare(e.name):e.name.localeCompare(n.name)})):"countryId"===t.sortField?n=e.sort((function(e,n){return t.sortOrder&&"desc"===t.sortOrder?n.country.id.localeCompare(e.country.id):e.country.id.localeCompare(n.country.id)})):"scope"===t.sortField?e.forEach((function(e){return n[t.competitionIds.indexOf(e.id)]=e})):t.sortField||"desc"!==t.sortOrder||(n=e.sort((function(e,t){return t.id.localeCompare(e.id)}))),n},this.countryId=e.countryId?""+e.countryId:null,this.name=e.name?e.name:null,this.gender=e.gender?e.gender:null,this.type=e.type?e.type:null,this.sortField=e.sortField?""+e.sortField:null,this.sortOrder=e.sortOrder?""+e.sortOrder:null,this.competitionIds=e.competitionIds?e.competitionIds:null}},3321:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.type="",this.name="",this.participants=[]}},7316:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6975),i=n(3430),s=function(){function e(){this.countryRemapper=null,this.countryRemapper=new i.default}return e.prototype.fromResponse=function(e){try{var t=new r.default;return t.id=e.id,t.country=this.countryRemapper.countryFromResponse(e.country),t.gender=e.gender,t.assets=e.assets,t.type=e.type,t.name=e.name,t}catch(e){throw console.warn("There was a problem remapping the competition response",e),e}},e}();t.default=s},8758:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3321),i=n(3430),s=n(5827),a=function(){function e(){this.countryRemapper=null,this.teamBasicRemapper=null,this.countryRemapper=new i.default,this.teamBasicRemapper=new s.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new r.default;return n.id=e.id,n.country=this.countryRemapper.countryFromResponse(e.country),n.gender=e.gender,n.assets=e.assets,n.type=e.type,n.name=e.name,n.participants=e.participants.map((function(e){return t.teamBasicRemapper.fromResponse(e)})),n}catch(e){throw console.warn("There was a problem remapping the competition response",e),e}},e}();t.default=a},4427:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.alias="",this.countryCode="",this.assets=null,this.name=""}},3430:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4427);t.default=function(){var e=this;this.countriesFromResponse=function(t){if(t)return t.map((function(t){return e.countryFromResponse(t)}))},this.countryFromResponse=function(e){try{if(e){var t=new r.default;return t.id=e.id,t.alias=e.alias,t.assets=e.assets,t.countryCode=e.country_code,t.name=e.name,t}}catch(e){throw e}return null}}},8470:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.homeTeam={players:[]},this.awayTeam={players:[]}}},3098:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8470),i=n(3550),s=function(){function e(){this.playerRemapper=null,this.playerRemapper=new i.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new r.default;return n.homeTeam.players=e.home_team&&e.home_team.players?e.home_team.players.map((function(e){return t.playerRemapper.fromResponse(e)})):[],n.awayTeam.players=e.away_team&&e.away_team.players?e.away_team.players.map((function(e){return t.playerRemapper.fromResponse(e)})):[],n}catch(e){throw console.warn("There was a problem remapping the lineups",e),e}},e}();t.default=s},2579:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.kickoffAt="",this.finishedAt="",this.updatedAt="",this.homeTeam=null,this.awayTeam=null,this.lineupsConfirmed=!1,this.startedAt="",this.minute="",this.scores=null,this.context={competition:null},this.status={type:null,subType:null}}},6134:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=this;this.countryIds=null,this.competitionIds=null,this.matchIds=null,this.status=null,this.teamIds=null,this.fromDate=null,this.toDate=null,this.limit=null,this.page=null,this.sortField=null,this.sortOrder=null,this.constructFilterUrl=function(){var e="";return t.countryIds&&(e=(e+="&")+"countries="+t.countryIds.join(",")),t.competitionIds&&(e=(e+="&")+"competitions="+t.competitionIds.join(",")),t.matchIds&&(e=(e+="&")+"matches="+t.matchIds.join(",")),t.status&&(e=(e+="&")+"status="+t.status),t.teamIds&&(e=(e+="&")+"teams="+t.teamIds.join(",")),t.fromDate&&(e=(e+="&")+"from_date="+t.fromDate),t.toDate&&(e=(e+="&")+"to_date="+t.toDate),t.limit&&(e=(e+="&")+"limit="+t.limit),t.page&&(e=(e+="&")+"page="+t.page),t.sortField&&(e=(e+="&")+"sort_field="+t.sortField),t.sortOrder&&(e=(e+="&")+"sort_order="+t.sortOrder),e},this.countryIds=e.countryIds?e.countryIds:null,this.competitionIds=e.competitionIds?e.competitionIds:null,this.matchIds=e.matchIds?e.matchIds:null,this.status=e.status?e.status:null,this.teamIds=e.teamIds?e.teamIds:null,this.fromDate=e.fromDate?e.fromDate:null,this.toDate=e.toDate?e.toDate:null,this.limit=e.limit?e.limit:null,this.page=e.page?e.page:null,this.sortField=e.sortField?e.sortField:null,this.sortOrder=e.sortOrder?e.sortOrder:null}},9661:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.kickoffAt="",this.finishedAt="",this.updatedAt="",this.homeTeam=null,this.awayTeam=null,this.lineupsConfirmed=!1,this.startedAt="",this.minute="",this.scores=null,this.stats=null,this.context={competition:null},this.timeline=[],this.status={type:null,subType:null},this.lineups=null}},5284:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2579),i=n(5827),s=n(7316),a=n(3949),o=function(){function e(){this.teamRemapper=null,this.competitionRemapper=null,this.scoresRemapper=null,this.teamRemapper=new i.default,this.competitionRemapper=new s.default,this.scoresRemapper=new a.default}return e.prototype.fromResponse=function(e){try{var t=new r.default;return t.id=e.id,t.kickoffAt=e.kickoff_at,t.finishedAt=e.finished_at,t.updatedAt=e.updated_at,t.homeTeam=this.teamRemapper.fromResponse(e.home_team),t.awayTeam=this.teamRemapper.fromResponse(e.away_team),t.lineupsConfirmed=e.lineups_confirmed,t.startedAt=e.started_at,t.minute=e.minute,t.scores=this.scoresRemapper.fromResponse(e.scores),t.context={competition:e.context.competition?this.competitionRemapper.fromResponse(e.context.competition):null},t.status={type:e.status.type,subType:e.status.sub_type},t}catch(e){throw console.warn("There was a problem remapping the match response",e),e}},e}();t.default=o},9330:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9661),i=n(5827),s=n(7316),a=n(7122),o=n(3949),u=n(3098),c=n(8470),l=n(92),h=function(){function e(){this.teamMapper=null,this.competitionsMapper=null,this.lineupsMapper=null,this.scoresMapper=null,this.statsMapper=null,this.timelineMapper=null,this.teamMapper=new i.default,this.competitionsMapper=new s.default,this.lineupsMapper=new u.default,this.scoresMapper=new o.default,this.statsMapper=new a.default,this.timelineMapper=new l.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new r.default;return n.id=e.id,n.kickoffAt=e.kickoff_at,n.finishedAt=e.finished_at,n.updatedAt=e.updated_at,n.homeTeam=e.home_team?this.teamMapper.fromResponse(e.home_team):null,n.awayTeam=e.away_team?this.teamMapper.fromResponse(e.away_team):null,n.lineupsConfirmed=e.lineups_confirmed,n.startedAt=e.started_at,n.minute=e.minute,n.scores=this.scoresMapper.fromResponse(e.scores),n.stats=this.statsMapper.fromResponse(e.stats),n.context={competition:this.competitionsMapper.fromResponse(e.context.competition)},n.timeline=e.timeline?e.timeline.map((function(e){return t.timelineMapper.fromResponse(e)})):[],n.status={type:e.status.type,subType:e.status.sub_type},n.lineups=e.lineups?this.lineupsMapper.fromResponse(e.lineups):new c.default,n}catch(e){throw console.warn("There was a problem remapping the match response",e),e}},e}();t.default=h},4652:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.ftScore=null,this.htScore=null,this.aetScore=null,this.aggScore=null,this.penScore=null}},3949:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4652),i=function(){function e(){this.statEntityFromResponse=function(e){return{homeGoals:e.home_goals,awayGoals:e.away_goals}}}return e.prototype.fromResponse=function(e){try{var t=new r.default;return t.ftScore=this.statEntityFromResponse(e.ft_score),t.htScore=this.statEntityFromResponse(e.ht_score),t.aetScore=this.statEntityFromResponse(e.aet_score),t.aggScore=this.statEntityFromResponse(e.agg_score),t.penScore=this.statEntityFromResponse(e.pen_score),t}catch(e){throw console.warn("There was a problem remapping the scores",e),e}},e}();t.default=i},7950:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.corners=null,this.crosses=null,this.offside=null,this.shotsOn=null,this.throwIn=null,this.redCards=null,this.shotsOff=null,this.goalKicks=null,this.possession=null,this.treatments=null,this.yellowCards=null,this.shotsBlocked=null,this.substitutions=null,this.counterAttacks=null,this.foulsCommitted=null}},7122:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7950),i=function(){function e(){this.statEntityFromResponse=function(e){return{homeTeam:e?e.home_team:null,awayTeam:e?e.away_team:null}}}return e.prototype.fromResponse=function(e){try{var t=new r.default;return t.corners=this.statEntityFromResponse(e.corners),t.crosses=this.statEntityFromResponse(e.crosses),t.offside=this.statEntityFromResponse(e.offside),t.shotsOn=this.statEntityFromResponse(e.shots_on),t.throwIn=this.statEntityFromResponse(e.throw_in),t.redCards=this.statEntityFromResponse(e.red_cards),t.shotsOff=this.statEntityFromResponse(e.shots_off),t.goalKicks=this.statEntityFromResponse(e.goal_kicks),t.possession=this.statEntityFromResponse(e.possession),t.treatments=this.statEntityFromResponse(e.treatments),t.yellowCards=this.statEntityFromResponse(e.yellow_cards),t.shotsBlocked=this.statEntityFromResponse(e.shots_blocked),t.substitutions=this.statEntityFromResponse(e.substitutions),t.counterAttacks=this.statEntityFromResponse(e.counter_attacks),t.foulsCommitted=this.statEntityFromResponse(e.fouls_committed),t}catch(e){throw console.warn("There was a problem remapping the stats",e),e}},e}();t.default=i},9452:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.minute="",this.type="",this.teamId="",this.player=null,this.relatedPlayer=null,this.updatedAt=""}},92:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9452),i=n(3550),s=function(){function e(){this.playerRemapper=null,this.playerRemapper=new i.default}return e.prototype.fromResponse=function(e){try{var t=new r.default;return t.minute=e.minute,t.type=e.type,t.teamId=e.team_id,t.player=this.playerRemapper.fromResponse(e.player),t.relatedPlayer=e.related_player?this.playerRemapper.fromResponse(e.related_player):null,t.updatedAt=e.updated_at,t}catch(e){throw console.warn("There was a problem remapping timeline",e),e}},e}();t.default=s},753:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3569);t.default=function(){this.meta=new r.default,this.data=[]}},3569:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(155);t.default=function(){this.pagination=new r.default}},155:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.currentPage=null,this.itemsPerPage=null,this.totalItems=null,this.numberOfPages=null}},1925:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3569);t.default=function(){this.remapMetaProp=function(e){var t=new r.default;return t.pagination.currentPage=e.pagination.current_page,t.pagination.itemsPerPage=e.pagination.items_per_page,t.pagination.totalItems=e.pagination.total_items,t.pagination.numberOfPages=e.pagination.number_of_pages,t}}},4426:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null,this.teams=[]}},6477:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=this;this.countryId=null,this.scope=null,this.name=null,this.playerIds=null,this.limit=null,this.page=null,this.sortField=null,this.sortOrder=null,this.constructFilterUrl=function(){var e="";return t.countryId&&(e=(e+="&")+"country_id="+t.countryId),t.scope&&(e=(e+="&")+"scope="+t.scope.join(",")),t.name&&(e=(e+="&")+"name="+t.name),t.playerIds&&(e=(e+="&")+"player_ids="+t.playerIds.join(",")),t.limit&&(e=(e+="&")+"limit="+t.limit),t.page&&(e=(e+="&")+"page="+t.page),t.sortField&&(e=(e+="&")+"sort_field="+t.sortField),t.sortOrder&&(e=(e+="&")+"sort_order="+t.sortOrder),e},this.countryId=e.countryId?e.countryId:null,this.scope=e.scope?e.scope:null,this.name=e.name?e.name:null,this.playerIds=e.playerIds?e.playerIds:null,this.limit=e.limit?e.limit:null,this.page=e.page?e.page:null,this.sortField=e.sortField?e.sortField:null,this.sortOrder=e.sortOrder?e.sortOrder:null}},1837:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null,this.competitions=[],this.teams=[]}},4803:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.name="",this.position="",this.assets=null,this.type=""}},9071:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.startDate="",this.endDate="",this.loan=!1,this.position="",this.country=null,this.name="",this.assets=null,this.birthDate=""}},5157:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3430),i=n(4426),s=n(5827),a=function(){function e(){this.countryRemapper=null,this.teamRemapper=null,this.countryRemapper=new r.default,this.teamRemapper=new s.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new i.default;return n.id=e.id,n.firstName=e.first_name?e.first_name:null,n.lastName=e.last_name?e.last_name:null,n.name=e.name?e.name:null,n.birthDate=e.birth_date,n.country=this.countryRemapper.countryFromResponse(e.country),n.assets=e.assets,n.teams=e.teams?e.teams.map((function(e){return t.teamRemapper.fromResponse(e)})):[],n.position=e.position,n}catch(e){throw console.warn("There was a problem remapping players response",e),e}},e}();t.default=a},7943:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3430),i=n(1837),s=n(5827),a=n(7316),o=function(){function e(){this.countryRemapper=null,this.teamRemapper=null,this.competitionRemapper=null,this.countryRemapper=new r.default,this.teamRemapper=new s.default,this.competitionRemapper=new a.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new i.default;return n.id=e.id,n.firstName=e.first_name?e.first_name:null,n.lastName=e.last_name?e.last_name:null,n.name=e.name?e.name:null,n.birthDate=e.birth_date,n.country=this.countryRemapper.countryFromResponse(e.country),n.assets=e.assets,n.teams=e.teams?e.teams.map((function(e){return t.teamRemapper.fromResponse(e)})):[],n.position=e.position,n.competitions=e.competitions?e.competitions.map((function(e){return t.competitionRemapper.fromResponse(e)})):[],n}catch(e){throw console.warn("There was a problem remapping player response",e),e}},e}();t.default=o},3550:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4803),i=function(){function e(){}return e.prototype.fromResponse=function(e){try{var t=new r.default;return t.id=e.id,t.name=e.name,t.position=e.position,t.shirtNumber=e.shirt_number,t.assets=e.assets,t.type=e.type,t}catch(e){throw console.warn("There was a problem remapping the player from timeline",e),e}},e}();t.default=i},4085:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3430),i=n(9071),s=function(){function e(){this.countryRemapper=null,this.countryRemapper=new r.default}return e.prototype.fromResponse=function(e){try{var t=new i.default;return t.id=e.id,t.startDate=e.start_date,t.endDate=e.end_date,t.shirtNumber=e.shirt_number,t.loan=e.loan,t.position=e.position,t.country=this.countryRemapper.countryFromResponse(e.country),t.name=e.name,t.assets=e.assets,t.birthDate=e.birth_date,t}catch(e){throw console.warn("There was a problem remapping the player from squad",e),e}},e}();t.default=s},4729:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3430),i=n(56),s=function(){function e(){this.countryRemapper=null,this.countryRemapper=new r.default}return e.prototype.fromResponse=function(e){try{var t=new i.default;return t.id=e.id,t.firstName=e.first_name?e.first_name:null,t.lastName=e.last_name?e.last_name:null,t.name=e.name?e.name:null,t.birthDate=e.birth_date,t.country=this.countryRemapper.countryFromResponse(e.country),t.assets=e.assets,t.position=e.position,t}catch(e){throw console.warn("There was a problem remapping top player response",e),e}},e}();t.default=s},56:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null}},604:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=this;this.entities=null,this.query=null,this.scope=null,this.constructFilterUrl=function(){var e="";return t.entities&&(e=(e+="&")+"entities="+t.entities.join(",")),t.query&&(e=(e+="&")+"q="+t.query),t.scope&&(e=(e+="&")+"scope="+t.scope.join(",")),e},this.entities=e.entities?e.entities:null,this.query=e.query?e.query:null,this.scope=e.scope?e.scope:null}},6967:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.teams=null,this.players=null,this.competitions=null}},7287:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5827),i=n(5157),s=n(7316),a=n(6967),o=function(){function e(){this.teamRemapper=null,this.playerRemapper=null,this.competitionremapper=null,this.teamRemapper=new r.default,this.playerRemapper=new i.default,this.competitionremapper=new s.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new a.default;return n.teams=e.teams?e.teams.map((function(e){return t.teamRemapper.fromResponse(e)})):[],n.players=e.players?e.players.map((function(e){return t.playerRemapper.fromResponse(e)})):[],n.competitions=e.competitions?e.competitions.map((function(e){return t.competitionremapper.fromResponse(e)})):[],n}catch(e){throw console.warn("There was a problem remapping search response",e),e}},e}();t.default=o},5827:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3430),i=n(9314),s=function(){function e(){this.countryRemapper=null,this.countryRemapper=new r.default}return e.prototype.fromResponse=function(e){try{var t=new i.default;return t.id=e.id,t.country=this.countryRemapper.countryFromResponse(e.country),t.gender=e.gender,t.assets=e.assets,t.code=e.code,t.national=e.national,t.fullName=e.full_name,t.shortName=e.short_name,t.name=e.name,t}catch(e){throw console.warn("There was a problem remapping teams response",e),e}},e}();t.default=s},7821:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3430),i=n(1986),s=n(4085),a=n(7316),o=function(){function e(){this.countryRemapper=null,this.competitionRemapper=null,this.playerRemapper=null,this.countryRemapper=new r.default,this.competitionRemapper=new a.default,this.playerRemapper=new s.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new i.default;return n.id=e.id,n.country=this.countryRemapper.countryFromResponse(e.country),n.gender=e.gender,n.assets=e.assets,n.code=e.code,n.national=e.national,n.fullName=e.full_name,n.shortName=e.short_name,n.name=e.name,n.competitions=e.competitions?e.competitions.map((function(e){return t.competitionRemapper.fromResponse(e)})):[],n.squad=e.squad?e.squad.map((function(e){return t.playerRemapper.fromResponse(e)})):[],n}catch(e){throw console.warn("There was a problem remapping team response",e),e}},e}();t.default=o},9314:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.name="",this.code="",this.national=!1,this.fullName="",this.shortName=""}},9920:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=this;this.name=null,this.countryId=null,this.national=!1,this.gender=null,this.limit=null,this.page=null,this.scope=null,this.sortField=null,this.sortOrder=null,this.teamIds=null,this.constructFilterUrl=function(){var e="";return t.name&&(e=(e+="&")+"name="+t.name),t.countryId&&(e=(e+="&")+"country_id="+t.countryId),t.national&&(e=(e+="&")+"national="+t.national),t.gender&&(e=(e+="&")+"gender="+t.gender),t.limit&&(e=(e+="&")+"limit="+t.limit),t.scope&&(e=(e+="&")+"scope="+t.scope.join(",")),t.page&&(e=(e+="&")+"page="+t.page),t.sortField&&(e=(e+="&")+"sort_field="+t.sortField),t.sortOrder&&(e=(e+="&")+"sort_order="+t.sortOrder),t.teamIds&&(e=(e+="&")+"team_ids="+t.teamIds.join(",")),e},this.name=e.name?e.name:null,this.countryId=e.countryId?""+e.countryId:null,this.national=!!e.national&&e.national,this.gender=e.gender?e.gender:null,this.limit=e.limit?e.limit:null,this.page=e.page?e.page:null,this.scope=e.scope?e.scope:null,this.sortField=e.sortField?""+e.sortField:null,this.sortOrder=e.sortOrder?""+e.sortOrder:null,this.teamIds=e.teamIds?e.teamIds:null}},1986:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.name="",this.competitions=[],this.code="",this.national=!1,this.fullName="",this.shortName="",this.squad=[]}},3822:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(5025);t.default=function(e){var t=this;this.https=null,this.loyaltyRemapper=null,this.getConfig=function(){return r(t,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.https.getConfig()];case 1:return e=t.sent(),[2,this.loyaltyRemapper.remapLoyaltyResponse(e.loyalty)]}}))}))},this.https=e,this.loyaltyRemapper=new s.default}},2962:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(7686),a=n(3822);t.default=function(e){var t=this;this.https=null,this.loyaltyFacade=null,this.getConfig=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getConfig()];case 1:return[2,e.sent()]}}))}))},this.https=new s.default(e),this.loyaltyFacade=new a.default(this.https)}},8608:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.general=[],this.predictor=[],this.topX=[]}},7605:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.enabled=!1,this.rewards=null}},5025:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8608),i=n(7605),s=n(4187),a=n(4226);t.default=function(){var e=this;this.remapLoyaltyResponse=function(t){var n=new i.default;return n.enabled=t.enabled,n.rewards=e.remapRewards(t.rewards),n},this.remapRewards=function(t){var n=new a.default;return n.points=e.remapPoints(t.points),n.tiers=t.tiers,n.badges=e.remapBadges(t.badges),n},this.remapPoints=function(e){var t=new s.default;return t.general=e.general,t.topX=e.top_x,t.predictor=e.predictor,t},this.remapBadges=function(e){var t=new r.default;return t.general=e.general,t.predictor=e.predictor,t.topX=e.top_x,t}}},4187:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.general=null,this.topX=null,this.predictor=null}},4226:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.points=null,this.tiers=null,this.badges=null}},1859:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(4946),a=n(2793),o=n(8900),u=n(1732),c=n(5013),l=n(853),h=n(7299);t.default=function(e){var t=this;this.predictorHttps=null,this.predictorService=null,this.idMapping=null,this.play=function(e){return r(t,void 0,void 0,(function(){var t,n,r,a,o,c=this;return i(this,(function(i){switch(i.label){case 0:return(t=e.fixtures.map((function(e){return c.predictorService.validateFixture(e.matchId,e.market,e.prediction.value,e.prediction.playerId)})))?this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,4]:(n=[],r=[],t.forEach((function(e){n.push(e.matchId),e instanceof u.default&&r.push(e.prediction.playerId)})),[4,this.predictorService.remapMatchIdToNative(n)]):[3,5];case 1:return a=i.sent(),o={},r&&r.length>0?[4,this.predictorService.remapPlayerIdMapToNative(r)]:[3,3];case 2:o=i.sent(),i.label=3;case 3:t.forEach((function(e,t){e.matchId=a[t],e instanceof u.default&&(e.prediction.playerId=o[e.prediction.playerId])})),i.label=4;case 4:return[3,6];case 5:throw new Error("The prediction is invalid. Please check again have you passed appropriate prediction model");case 6:return e.fixtures=t,[4,this.predictorHttps.makeFootballPrediction(e)];case 7:return[2,i.sent()]}}))}))},this.delete=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(e)];case 1:return[2,t.sent()]}}))}))},this.getGames=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=this.predictorService.initGameFilters("MATCH_QUIZ",e),[4,this.predictorHttps.getGames(t)];case 1:return n=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(n)];case 2:return[2,r.sent()]}}))}))},this.getGameById=function(e){return r(t,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.predictorHttps.getGameById(e)];case 1:return t=n.sent(),[4,this.predictorService.remapMatchIdsFixtures(t)];case 2:return[2,n.sent()]}}))}))},this.getGameResults=function(e,n){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return n&&(n=new h.default(n)),[4,this.predictorHttps.getGameResults(e,n)];case 1:return t=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(t)];case 2:return[2,r.sent()]}}))}))},this.getCurrentGameResults=function(){return r(t,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return e={status:l.GameStatusEnum.OPEN,type:"MATCH_QUIZ"},e=new h.default(e),[4,this.predictorHttps.getGames(e)];case 1:return t=r.sent(),n=this.predictorService.getCurrentGameId(t),[4,this.getGameResults(n)];case 2:return[2,r.sent().data[0]]}}))}))},this.getMyGameEditions=function(e){return r(t,void 0,void 0,(function(){var t,n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return t=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),n=[],[4,this.predictorHttps.getMyPredictionsNoRemap(t)];case 1:return(r=i.sent()).forEach((function(e){e.game_instance_id&&n.push(e.game_instance_id)})),s=this.predictorService.initGameFilters("MATCH_QUIZ",e,n),[4,this.predictorHttps.getUserGameEditions(s)];case 2:return a=i.sent(),[4,this.predictorService.addPredictionProp(r,a)];case 3:return[2,i.sent()]}}))}))},this.getMyGamePrediction=function(e){return r(t,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return t=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),[4,this.predictorHttps.getMyPredictions(t)];case 1:return[2,n.sent().data.filter((function(t){return t.gameInstanceId===e}))[0]]}}))}))},this.getUserGameEditions=function(e,n){return r(t,void 0,void 0,(function(){var t,r,s,a,o;return i(this,(function(i){switch(i.label){case 0:return t=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),r=[],[4,this.predictorHttps.getUserPredictionsNoRemap(e,t)];case 1:return(s=i.sent()).forEach((function(e){e.game_instance_id&&r.push(e.game_instance_id)})),a=this.predictorService.initGameFilters("MATCH_QUIZ",n,r),[4,this.predictorHttps.getUserGameEditions(a)];case 2:return o=i.sent(),[4,this.predictorService.addPredictionProp(s,o)];case 3:return[2,i.sent()]}}))}))},this.getUserGamePrediction=function(e,n){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return t=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),[4,this.predictorHttps.getUserPredictions(e,t)];case 1:return[2,r.sent().data.filter((function(e){return e.gameInstanceId===n}))[0]]}}))}))},this.idMapping=new o.default(e),this.predictorHttps=new a.default(e,this.idMapping),this.predictorService=new c.default(e,this.idMapping)}},267:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(1859);t.default=function(e){var t=this;this.matchQuizFacade=null,this.play=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.play(e)];case 1:return[2,t.sent()]}}))}))},this.delete=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.delete(e)];case 1:return[2,t.sent()]}}))}))},this.getGames=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getGames(e)];case 1:return[2,t.sent()]}}))}))},this.getGameById=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getGameById(e)];case 1:return[2,t.sent()]}}))}))},this.getGameResults=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getGameResults(e,n)];case 1:return[2,t.sent()]}}))}))},this.getCurrentGameResults=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getCurrentGameResults()];case 1:return[2,e.sent()]}}))}))},this.getMyGameEditions=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getMyGameEditions(e)];case 1:return[2,t.sent()]}}))}))},this.getMyGamePrediction=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getMyGamePrediction(e)];case 1:return[2,t.sent()]}}))}))},this.getUserGameEditions=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getUserGameEditions(e,n)];case 1:return[2,t.sent()]}}))}))},this.getUserGamePrediction=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getUserGamePrediction(e,n)];case 1:return[2,t.sent()]}}))}))},this.matchQuizFacade=new s.default(e)}},8410:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8042);t.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.prediction=new r.default}},7243:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.predictionsCutoff=null,this.fixtures=[],this.createdAt=null,this.updatedAt=null}},8042:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null,this.target=null,this.playerId=null,this.playerModel=null,this.result=null}},7974:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.playerMarkets=t.MarketsOverCorners=t.MarketsOverGoals=t.MarketEnum=void 0,function(e){e.FT_1X2="FT_1X2",e.HT_1X2="HT_1X2",e.BOTH_TEAMS_SCORE="BOTH_TEAMS_SCORE",e.DOUBLE_CHANCE="DOUBLE_CHANCE",e.HT_FT="HT_FT",e.PLAYER_SCORE="PLAYER_SCORE",e.PLAYER_YELLOW_CARD="PLAYER_YELLOW_CARD",e.PLAYER_RED_CARD="PLAYER_RED_CARD",e.RED_CARD_MATCH="RED_CARD_MATCH",e.PENALTY_MATCH="PENALTY_MATCH",e.PLAYER_SCORE_FIRST_GOAL="PLAYER_SCORE_FIRST_GOAL",e.CORNERS_MATCH="CORNERS_MATCH",e.CORRECT_SCORE="CORRECT_SCORE",e.PLAYER_SCORE_HATTRICK="PLAYER_SCORE_HATTRICK",e.PLAYER_SCORE_TWICE="PLAYER_SCORE_TWICE",e.OVER_GOALS_0_5="OVER_GOALS_0.5",e.OVER_GOALS_1_5="OVER_GOALS_1.5",e.OVER_GOALS_2_5="OVER_GOALS_2.5",e.OVER_GOALS_3_5="OVER_GOALS_3.5",e.OVER_GOALS_4_5="OVER_GOALS_4.5",e.OVER_GOALS_5_5="OVER_GOALS_5.5",e.OVER_GOALS_6_5="OVER_GOALS_6.5",e.OVER_CORNERS_6_5="OVER_CORNERS_6.5",e.OVER_CORNERS_7_5="OVER_CORNERS_7.5",e.OVER_CORNERS_8_5="OVER_CORNERS_8.5",e.OVER_CORNERS_9_5="OVER_CORNERS_9.5",e.OVER_CORNERS_10_5="OVER_CORNERS_10.5",e.OVER_CORNERS_11_5="OVER_CORNERS_11.5",e.OVER_CORNERS_12_5="OVER_CORNERS_12.5",e.OVER_CORNERS_13_5="OVER_CORNERS_13.5"}(n=t.MarketEnum||(t.MarketEnum={})),t.MarketsOverGoals=[n.OVER_GOALS_0_5,n.OVER_GOALS_1_5,n.OVER_GOALS_2_5,n.OVER_GOALS_3_5,n.OVER_GOALS_4_5,n.OVER_GOALS_5_5,n.OVER_GOALS_6_5],t.MarketsOverCorners=[n.OVER_CORNERS_6_5,n.OVER_CORNERS_7_5,n.OVER_CORNERS_8_5,n.OVER_CORNERS_9_5,n.OVER_CORNERS_10_5,n.OVER_CORNERS_11_5,n.OVER_CORNERS_12_5,n.OVER_CORNERS_13_5],t.playerMarkets=[n.PLAYER_RED_CARD,n.PLAYER_SCORE,n.PLAYER_SCORE_FIRST_GOAL,n.PLAYER_SCORE_HATTRICK,n.PLAYER_SCORE_TWICE,n.PLAYER_YELLOW_CARD]},6147:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.pastStatuses=t.StatusEnum=void 0,function(e){e.ACTIVE="ACTIVE",e.WON="WON",e.LOST="LOST",e.PARTIALLY_WON="PARTIALLY_WON",e.CANCELED="CANCELED"}(n=t.StatusEnum||(t.StatusEnum={})),t.pastStatuses=[n.WON,n.LOST,n.PARTIALLY_WON,n.CANCELED]},1976:(e,t)=>{"use strict";var n,r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.HalfTimeFullTimeEnum=t.DoubleChanceEnum=t.OneXTwoEnum=void 0,(i=t.OneXTwoEnum||(t.OneXTwoEnum={})).ONE="1",i.X="x",i.TWO="2",(r=t.DoubleChanceEnum||(t.DoubleChanceEnum={})).ONE_X="1x",r.X_TWO="x2",r.ONE_TWO="12",(n=t.HalfTimeFullTimeEnum||(t.HalfTimeFullTimeEnum={})).ONE_ONE="1/1",n.ONE_X="1/x",n.ONE_TWO="1/2",n.X_ONE="x/1",n.X_X="x/x",n.X_TWO="x/2",n.TWO_ONE="2/1",n.TWO_X="2/x",n.TWO_TWO="2/2"},2929:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(4946),a=n(3187),o=n(5013),u=n(3950),c=n(1732),l=n(7782),h=n(6147);t.default=function(e,t,n,d){var p=this;this.predictorHttps=null,this.clientHttps=null,this.idMapping=null,this.predictorConfigRemapper=null,this.predictorService=null,this.makeFootballPrediction=function(e,t,n,a){return r(p,void 0,void 0,(function(){var r,o,l,h,d,p,f;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.validateFixture(e,t,n,a),o=new u.default,r?this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,5]:(l=r.matchId,h="",[4,this.predictorService.remapMatchIdToNative([l])]):[3,8];case 1:if(d=i.sent(),r.matchId=d[0],!r.matchId)throw new Error("Match id is invalid!");return r instanceof c.default?(h=r.prediction.playerId,p=r.prediction,[4,this.predictorService.remapPlayerIdToNative([h])]):[3,3];case 2:if(p.playerId=i.sent(),!r.prediction.playerId)throw new Error("Player id is invalid!");i.label=3;case 3:return o.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(o)];case 4:return(f=i.sent()).fixtures.map((function(e){e.prediction.playerId&&(e.prediction.playerId=h),e.matchId=l})),[2,f];case 5:return o.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(o)];case 6:return[2,i.sent()];case 7:return[3,9];case 8:throw new Error("The prediction is invalid. Please check again have you passed appropriate prediction model");case 9:return[2]}}))}))},this.getMatchSummary=function(e){return r(p,void 0,void 0,(function(){var t,n,r,a,o;return i(this,(function(i){switch(i.label){case 0:return this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,4]:[4,this.predictorService.remapMatchIdToNative([e])];case 1:return t=i.sent(),n=t[0],[4,this.predictorHttps.getMatchSummary(n)];case 2:return(r=i.sent()).matchId=e,a=r.predictions,[4,this.predictorService.remapPlayerIdToIdSchema(a)];case 3:return o=i.sent(),r.predictions=o,[2,r];case 4:return[4,this.predictorHttps.getMatchSummary(e)];case 5:return[2,i.sent()]}}))}))},this.getMarketSummary=function(e,t,n){return r(p,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.getMatchSummary(e)];case 1:return r=i.sent(),[2,this.predictorService.getMarketSummary(r,t,n)];case 2:return[2,i.sent().message];case 3:return[2]}}))}))},this.getConfig=function(){return r(p,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.clientHttps.getConfig()];case 1:return e=n.sent(),[4,this.predictorConfigRemapper.remapConfig(e.predictor)];case 2:return t=n.sent(),this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,4]:[4,this.predictorService.remapCompetitionsFromConfig(t)];case 3:return[2,n.sent()];case 4:return[2,t]}}))}))},this.deleteFootballPrediction=function(e){return r(p,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(e)];case 1:return[2,t.sent()]}}))}))},this.getMyPredictions=function(e){return r(p,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return e&&(e=new l.default(e)),[4,this.predictorHttps.getMyPredictions(e)];case 1:return[2,t.sent()]}}))}))},this.getMyCurrentPredictions=function(e){return r(p,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return e?(e.status=[h.StatusEnum.ACTIVE],e=new l.default(e)):(t={status:[h.StatusEnum.ACTIVE]},e=new l.default(t)),[4,this.getMyPredictions(e)];case 1:return[2,n.sent()]}}))}))},this.getMyPastPredictions=function(e){return r(p,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return e?(e.status=h.pastStatuses,e=new l.default(e)):(t={status:h.pastStatuses},e=new l.default(t)),[4,this.getMyPredictions(e)];case 1:return[2,n.sent()]}}))}))},this.getUserPredictions=function(e,t){return r(p,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return t&&(t=new l.default(t)),[4,this.predictorHttps.getUserPredictions(e,t)];case 1:return[2,n.sent()]}}))}))},this.getUserCurrentPredictions=function(e,t){return r(p,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return t?(t.status=[h.StatusEnum.ACTIVE],t=new l.default(t)):(n={status:[h.StatusEnum.ACTIVE]},t=new l.default(n)),[4,this.getUserPredictions(e,t)];case 1:return[2,r.sent()]}}))}))},this.getUserPastPredictions=function(e,t){return r(p,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return t?(t.status=h.pastStatuses,t=new l.default(t)):(n={status:h.pastStatuses},t=new l.default(n)),[4,this.getUserPredictions(e,t)];case 1:return[2,r.sent()]}}))}))},this.predictorHttps=t,this.idMapping=d,this.clientHttps=n,this.predictorConfigRemapper=new a.default,this.predictorService=new o.default(e,d)}},8452:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.fullCoverageCompetitions=null,this.markets=null}},3187:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8452);t.default=function(){this.remapConfig=function(e){var t=new r.default;return t.fullCoverageCompetitions=e.full_coverage_competitions,t.markets=e.markets,t}}},6367:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null,this.playerId=null,this.playerModel=null}},1406:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(2524),a=n(1732),o=n(4119),u=n(1465),c=n(5132),l=n(7344);t.default=function(e,t,n){var h=this;this.matchFacade=null,this.playerFacade=null,this.predictorService=null,this.remapFixturesRequest=function(e){var t={};if(t.match_id=e.matchId,t.match_type="FOOTBALL",e instanceof a.default)t.market=e.market,t.prediction=e.prediction.value,t.player_id=e.prediction.playerId;else if(e instanceof c.default||e instanceof l.default){var n=e.market.split("_");t.market=n[0]+"_"+n[1],t.prediction=e.prediction.value,t.target=Number(n[2])}else if(e instanceof u.default){t.market=e.market;var r=e.prediction.value.split(":");t.goals_home=Number(r[0]),t.goals_away=Number(r[1])}else t.market=e.market,t.prediction=e.prediction.value;return t},this.remapFixturesResponse=function(e){return r(h,void 0,void 0,(function(){var t,n,r,a,o,u,c,l,h,d,p;return i(this,(function(i){switch(i.label){case 0:for(e.length>1&&e.sort((function(e,t){return e.match_id.localeCompare(t.match_id)})),t=[],n=[],r=0,a=e;r<a.length;r++)d=a[r],t.push(d.match_id),d.player_id&&!n.includes(d.player_id)&&n.push(d.player_id);return[4,this.matchFacade.getMatchesMapWithNativeIds(t)];case 1:return o=i.sent(),u=[],n.sort((function(e,t){return e.localeCompare(t)})),n&&n.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(n)]:[3,3];case 2:u=i.sent(),i.label=3;case 3:for(c=[],l=0,h=e;l<h.length;l++)d=h[l],p=new s.default,d.target?p.market=this.predictorService.convertMarketForResponseModel(d.market,d.target):p.market=d.market,p.matchId=o[d.match_id].id,p.matchType=d.match_type,p.matchModel=o?o[d.match_id]:null,void 0!==d.goals_home&&void 0!==d.goals_away?p.prediction.value=d.goals_home.toString()+":"+d.goals_away.toString():p.prediction.value=d.prediction,p.prediction.playerId=d.player_id?d.player_id:null,p.prediction.playerId&&(p.prediction.playerModel=u[d.player_id],p.prediction.playerId=u[d.player_id].id),p.result=this.remapResult(d.result),c.push(p);return[2,c]}}))}))},this.remapResult=function(e){var t=new o.default;return t.settledAt=e.settled_at,t.resettledAt=e.resettled_at,t.status=e.status,t.outcome=e.outcome,t},this.matchFacade=e,this.playerFacade=t,this.predictorService=n}},2524:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6367);t.default=function(){this.market=null,this.matchId=null,this.matchType=null,this.matchModel=null,this.prediction=new r.default,this.result=null}},1206:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(9883);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.BOTH_TEAMS_SCORE,this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},5274:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(8038);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.CORNERS_MATCH,this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},1465:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(3125);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.CORRECT_SCORE,this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},7535:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(6902);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.DOUBLE_CHANCE,this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},3700:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2782),i=n(7974);t.default=function(e,t){this.matchId=null,this.market=i.MarketEnum.FT_1X2,this.prediction=null,this.matchId=e,this.prediction=new r.default,this.prediction.value=t}},7307:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(6642);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.HT_FT,this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},2812:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2782),i=n(7974);t.default=function(e,t){this.matchId=null,this.market=i.MarketEnum.HT_1X2,this.prediction=null,this.matchId=e,this.prediction=new r.default,this.prediction.value=t}},5132:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9883);t.default=function(e,t,n){this.matchId=null,this.market=null,this.prediction=null,this.matchId=e,this.market=t,this.prediction=new r.default,this.prediction.value=n}},7344:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9883);t.default=function(e,t,n){this.matchId=null,this.market=null,this.prediction=null,this.matchId=e,this.market=t,this.prediction=new r.default,this.prediction.value=n}},1855:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(9883);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.PENALTY_MATCH,this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},1732:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7321);t.default=function(e,t,n,i){this.matchId=null,this.market=null,this.prediction=null,this.matchId=e,this.market=t,this.prediction=new r.default,this.prediction.value=n,this.prediction.playerId=i}},5814:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(9883);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.RED_CARD_MATCH,this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},4119:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.settledAt=null,this.resettledAt=null,this.status=null,this.outcome=null}},5908:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.no=0,this.yes=0}},2726:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(1406),a=n(2532),o=n(3792),u=n(5908),c=n(595),l=n(4545),h=n(4272),d=n(2524),p=n(5013),f=n(1399);t.default=function(e,t){var n=this;this.fixturesRemapper=null,this.footballHttps=null,this.matchFacade=null,this.playerFacade=null,this.predictorService=null,this.remapRequestBody=function(e){var t={};return t.game_instance_id=e.gameInstanceId,t.fixtures=e.fixtures.map((function(e){return n.fixturesRemapper.remapFixturesRequest(e)})),e instanceof f.default&&e.tiebreaker&&(t.tiebreaker={},t.tiebreaker.golden_goal=e.tiebreaker.goldenGoal?e.tiebreaker.goldenGoal:null),t},this.remapResponseArrayBody=function(e){return r(n,void 0,void 0,(function(){var t,n,r,s,o,u=this;return i(this,(function(i){switch(i.label){case 0:return t=[],n=[],r={},s=[],e.forEach((function(e){e.fixtures.forEach((function(e){t.push(e.match_id),e.player_id&&n.push(e.player_id)}))})),[4,this.matchFacade.getMatchesMapWithNativeIds(t)];case 1:return o=i.sent(),n.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(n)]:[3,3];case 2:r=i.sent(),i.label=3;case 3:return e.forEach((function(e){var t=new a.default,n=[];t.id=e.id,t.gameInstanceId=e.game_instance_id,t.gameType=e.game_type,t.wager=e.wager,t.totalFixtures=e.total_fixtures,t.settledFixtures=e.settled_fixtures,t.userId=e.user_id,e.fixtures.forEach((function(e){var t=new d.default;e.target?t.market=u.predictorService.convertMarketForResponseModel(e.market,e.target):t.market=e.market,t.matchId=o[e.match_id].id,t.matchType=e.match_type,t.matchModel=o[e.match_id],void 0!==e.goals_home&&void 0!==e.goals_away?t.prediction.value=e.goals_home.toString()+":"+e.goals_away.toString():t.prediction.value=e.prediction,t.prediction.playerId=e.player_id?e.player_id:null,t.prediction.playerId&&(t.prediction.playerModel=r[t.prediction.playerId],t.prediction.playerId=r[t.prediction.playerId].id),t.result=u.fixturesRemapper.remapResult(e.result),n.push(t)})),t.fixtures=n,t.status=e.status,e.tiebreaker?t.tiebreaker.goldenGoal=e.tiebreaker.golden_goal:t.tiebreaker=null,t.points=e.points,t.createdAt=e.created_at,t.updatedAt=e.updated_at,s.push(t)})),[2,s]}}))}))},this.remapResponseObjBody=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return(t=new a.default).id=e.id,t.gameInstanceId=e.game_instance_id,t.gameType=e.game_type,t.wager=e.wager,t.totalFixtures=e.total_fixtures,t.settledFixtures=e.settled_fixtures,t.userId=e.user_id,n=t,[4,this.fixturesRemapper.remapFixturesResponse(e.fixtures)];case 1:return n.fixtures=r.sent(),t.status=e.status,e.tiebreaker?t.tiebreaker.goldenGoal=e.tiebreaker.golden_goal:t.tiebreaker=null,t.points=e.points,t.createdAt=e.created_at,t.updatedAt=e.updated_at,[2,t]}}))}))},this.remapPredictionModel=function(e){var t=new o.default;return t.fullTimeOneXTwo=e.FT_1X2,t.halfTimeOneXTwo=e.HT_1X2,t.bothTeamsScore=e.BOTH_TEAMS_SCORE?e.BOTH_TEAMS_SCORE:new u.default,t.overZeroPointFiveGoals=e.OVER_GOALS["over:0.5"]?e.OVER_GOALS["over:0.5"]:new u.default,t.overOnePointFiveGoals=e.OVER_GOALS["over:1.5"]?e.OVER_GOALS["over:1.5"]:new u.default,t.overTwoPointFiveGoals=e.OVER_GOALS["over:2.5"]?e.OVER_GOALS["over:2.5"]:new u.default,t.overThreePointFiveGoals=e.OVER_GOALS["over:3.5"]?e.OVER_GOALS["over:3.5"]:new u.default,t.overFourPointFiveGoals=e.OVER_GOALS["over:4.5"]?e.OVER_GOALS["over:4.5"]:new u.default,t.overFivePointFiveGoals=e.OVER_GOALS["over:5.5"]?e.OVER_GOALS["over:5.5"]:new u.default,t.overSixPointFiveGoals=e.OVER_GOALS["over:6.5"]?e.OVER_GOALS["over:6.5"]:new u.default,t.overSixPointFiveCorners=e.OVER_CORNERS["over:6.5"]?e.OVER_CORNERS["over:6.5"]:new u.default,t.overSevenPointFiveCorners=e.OVER_CORNERS["over:7.5"]?e.OVER_CORNERS["over:7.5"]:new u.default,t.overEightPointFiveCorners=e.OVER_CORNERS["over:8.5"]?e.OVER_CORNERS["over:8.5"]:new u.default,t.overNinePointFiveCorners=e.OVER_CORNERS["over:9.5"]?e.OVER_CORNERS["over:9.5"]:new u.default,t.overTenPointFiveCorners=e.OVER_CORNERS["over:10.5"]?e.OVER_CORNERS["over:10.5"]:new u.default,t.overElevenPointFiveCorners=e.OVER_CORNERS["over:11.5"]?e.OVER_CORNERS["over:11.5"]:new u.default,t.overTwelvePointFiveCorners=e.OVER_CORNERS["over:12.5"]?e.OVER_CORNERS["over:12.5"]:new u.default,t.overThirteenPointFiveCorners=e.OVER_CORNERS["over:13.5"]?e.OVER_CORNERS["over:13.5"]:new u.default,t.doubleChance=e.DOUBLE_CHANCE,t.halfTimeFullTime=e.HT_FT,t.playerScore=e.PLAYER_SCORE,t.playerYellowCard=e.PLAYER_YELLOW_CARD,t.playerRedCard=e.PLAYER_RED_CARD,t.redCardMatch=e.RED_CARD_MATCH?e.RED_CARD_MATCH:new u.default,t.penaltyMatch=e.PENALTY_MATCH?e.PENALTY_MATCH:new u.default,t.playerScoreFirstGoal=e.PLAYER_SCORE_FIRST_GOAL,t.cornersMatch=e.CORNERS_MATCH,t.correctScore=e.CORRECT_SCORE,t.playerScoreHattrick=e.PLAYER_SCORE_HATTRICK,t.playerScoreTwice=e.PLAYER_SCORE_TWICE,t},this.footballHttps=new c.default(e),this.matchFacade=new l.default(this.footballHttps,t),this.playerFacade=new h.default(this.footballHttps,t),this.predictorService=new p.default(e,t),this.fixturesRemapper=new s.default(this.matchFacade,this.playerFacade,this.predictorService)}},3950:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.gameInstanceId=null,this.fixtures=null}},2532:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7640);t.default=function(){this.id=null,this.gameInstanceId=null,this.gameType=null,this.wager=null,this.totalFixtures=null,this.settledFixtures=null,this.userId=null,this.fixtures=[],this.status=null,this.tiebreaker=new r.default,this.points=null,this.createdAt=null,this.updatedAt=null}},7782:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6147);t.default=function(e){var t=this;this.limit=null,this.startAfter=null,this.status=null,this.type=null,this.constructFilterUrl=function(){var e="",n=!1;return t.status&&(n=Object.values(r.StatusEnum).some((function(e){return t.status.includes(e)}))),t.limit&&(e+="&",e+="limit="+t.limit),t.startAfter&&(e+="&",e+="start_after="+t.startAfter),t.status&&n&&(e+="&",e+="status="+t.status.join(",")),t.type&&(e+="&",e+="game_types="+t.type),e},this.limit=e.limit?e.limit:null,this.startAfter=e.startAfter?e.startAfter:null,this.status=e.status?e.status:null,this.type=e.type?e.type:null}},3792:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5908);t.default=function(){this.fullTimeOneXTwo={},this.halfTimeOneXTwo={},this.bothTeamsScore=new r.default,this.doubleChance={},this.halfTimeFullTime={},this.playerScore={},this.playerYellowCard={},this.playerRedCard={},this.redCardMatch=new r.default,this.penaltyMatch=new r.default,this.playerScoreFirstGoal={},this.cornersMatch={},this.correctScore={},this.playerScoreHattrick={},this.playerScoreTwice={},this.overZeroPointFiveGoals=new r.default,this.overOnePointFiveGoals=new r.default,this.overTwoPointFiveGoals=new r.default,this.overThreePointFiveGoals=new r.default,this.overFourPointFiveGoals=new r.default,this.overFivePointFiveGoals=new r.default,this.overSixPointFiveGoals=new r.default,this.overSixPointFiveCorners=new r.default,this.overSevenPointFiveCorners=new r.default,this.overEightPointFiveCorners=new r.default,this.overNinePointFiveCorners=new r.default,this.overTenPointFiveCorners=new r.default,this.overElevenPointFiveCorners=new r.default,this.overTwelvePointFiveCorners=new r.default,this.overThirteenPointFiveCorners=new r.default}},9378:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.matchId=null,this.matchType=null,this.predictions=null}},9679:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2726),i=n(9378);t.default=function(e,t){var n=this;this.remapPredictions=null,this.remapResponse=function(e){var t=new i.default;return t.matchId=e.match_id,t.matchType=e.match_type,t.predictions=n.remapPredictions.remapPredictionModel(e.predictions),t},this.remapPredictions=new r.default(e,t)}},7321:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=!1,this.playerId=null}},9883:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=!1}},8038:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){}},3125:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null}},6902:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null}},6642:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null}},2782:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null}},1259:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(2793),a=n(8900),o=n(2929),u=n(7686);t.default=function(e){var t=this;this.predictorHttps=null,this.clientHttps=null,this.predictorFacade=null,this.idMapping=null,this.makeFootballPrediction=function(e,n,s,a){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.makeFootballPrediction(e,n,s,a)];case 1:return[2,t.sent()]}}))}))},this.getMatchSummary=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getMatchSummary(e)];case 1:return[2,t.sent()]}}))}))},this.getMarketSummary=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getMarketSummary(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getConfig=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getConfig()];case 1:return[2,e.sent()]}}))}))},this.deleteFootballPrediction=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.deleteFootballPrediction(e)];case 1:return[2,t.sent()]}}))}))},this.getMyPredictions=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getMyPredictions(e)];case 1:return[2,t.sent()]}}))}))},this.getMyCurrentPredictions=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getMyCurrentPredictions(e)];case 1:return[2,t.sent()]}}))}))},this.getMyPastPredictions=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getMyPastPredictions(e)];case 1:return[2,t.sent()]}}))}))},this.getUserPredictions=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getUserPredictions(e,n)];case 1:return[2,t.sent()]}}))}))},this.getUserCurrentPredictions=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getUserCurrentPredictions(e,n)];case 1:return[2,t.sent()]}}))}))},this.getUserPastPredictions=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getUserPastPredictions(e,n)];case 1:return[2,t.sent()]}}))}))},this.idMapping=new a.default(e),this.predictorHttps=new s.default(e,this.idMapping),this.clientHttps=new u.default(e),this.predictorFacade=new o.default(e,this.predictorHttps,this.clientHttps,this.idMapping)}},5013:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(7974),a=n(3792),o=n(1976),u=n(7307),c=n(7535),l=n(3700),h=n(1465),d=n(2812),p=n(5274),f=n(1732),m=n(1206),v=n(5814),y=n(1855),g=n(7344),w=n(5132),b=n(5908),_=n(8950),I=n(6890),E=n(595),R=n(4545),P=n(7782),M=n(7299),S=n(712),O=n(4119),T=n(3751),F=n(7243),A=n(4272);t.default=function(e,t){var n=this;this.footballHttps=null,this.idMapping=null,this.matchFacade=null,this.playerFacade=null,this.remapMatchIdToNative=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.idMapping.getEntityIdsBySchemaId(e,"match","native")];case 1:return t=r.sent(),n=[],t.match.forEach((function(e){return n.push(e)})),[2,n]}}))}))},this.remapPlayerIdToNative=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.idMapping.getEntityIdsBySchemaId(e,"player","native")];case 1:return[2,t.sent().player[0]]}}))}))},this.remapPlayerIdMapToNative=function(e){return r(n,void 0,void 0,(function(){var t,n,r,s;return i(this,(function(i){switch(i.label){case 0:return t={},n=(0,S.transformIdsToBeUnique)(e),[4,this.idMapping.getEntityIdsBySchemaId(n,"player","native")];case 1:return r=i.sent(),s=r.player,n.forEach((function(e,n){return t[e]=s[n]})),[2,t]}}))}))},this.remapPlayerIdToIdSchema=function(e){return r(n,void 0,void 0,(function(){var t,n,r,s,a,o,u,c,l,h,d,p;return i(this,(function(i){switch(i.label){case 0:t=["playerScore","playerYellowCard","playerRedCard","playerScoreFirstGoal","playerScoreHattrick","playerScoreTwice"],n=0,r=Object.entries(e),i.label=1;case 1:if(!(n<r.length))return[3,6];if(s=r[n],a=s[0],o=s[1],!t.includes(a))return[3,5];u=0,c=Object.keys(o),i.label=2;case 2:return u<c.length?(l=c[u],h={player:[l]},[4,this.idMapping.idMappingFacade.getEntitiesByIds(h,"native",this.idMapping.idSchema)]):[3,5];case 3:d=i.sent(),p=d.player[0],o[p]=o[l],delete o[l],i.label=4;case 4:return u++,[3,2];case 5:return n++,[3,1];case 6:return[2,e]}}))}))},this.convertMarket=function(e){for(var t=Object.keys(new a.default),n=Object.values(s.MarketEnum),r=0;r<n.length;r++)e===n[r]&&(e=t[r]);return e},this.convertMarketForResponseModel=function(e,t){return e+"_"+t.toString()},this.validateFixture=function(e,t,n,r){var i=Object.values(o.OneXTwoEnum),a=Object.values(o.HalfTimeFullTimeEnum),b=Object.values(o.DoubleChanceEnum);if(t===s.MarketEnum.FT_1X2){if(i.includes(n))return new l.default(e,n)}else if(t===s.MarketEnum.HT_1X2){if(i.includes(n))return new d.default(e,n)}else if(t===s.MarketEnum.HT_FT){if(a.includes(n))return new u.default(e,n)}else if(t===s.MarketEnum.DOUBLE_CHANCE){if(b.includes(n))return new c.default(e,n)}else if(t===s.MarketEnum.CORRECT_SCORE){if("string"==typeof n&&/\d+:\d+/.test(n))return new h.default(e,n)}else if(t===s.MarketEnum.CORNERS_MATCH){if("number"==typeof n)return new p.default(e,n)}else if(t===s.MarketEnum.BOTH_TEAMS_SCORE){if("boolean"==typeof n)return new m.default(e,n)}else if(t===s.MarketEnum.RED_CARD_MATCH){if("boolean"==typeof n)return new v.default(e,n)}else if(t===s.MarketEnum.PENALTY_MATCH){if("boolean"==typeof n)return new y.default(e,n)}else if(s.playerMarkets.includes(t)){if(r&&"boolean"==typeof n)return new f.default(e,t,n,r)}else if(s.MarketsOverGoals.includes(t)){if("boolean"==typeof n)return new g.default(e,t,n)}else if(s.MarketsOverCorners.includes(t)&&"boolean"==typeof n)return new w.default(e,t,n)},this.getMarketSummary=function(e,t,r){var i=n.convertMarket(t),a={};if(a.matchId=e.matchId,a.matchType=e.matchType,!Object.keys(e.predictions).includes(i))throw new Error("You have passed invalid market");return a[i]=e.predictions[i],s.playerMarkets.includes(t)&&r?(a[i][r]||(a[i][r]=new b.default),a[i][r]):a},this.remapCompetitionsFromConfig=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t={competition:e.fullCoverageCompetitions},[4,this.idMapping.idMappingFacade.getEntitiesByIds(t,"native",this.idMapping.idSchema)];case 1:return n=r.sent(),e.fullCoverageCompetitions=n.competition,[2,e]}}))}))},this.remapMatchIdsFixtures=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return Array.isArray(e.data)?e.data.length>0?(t=[],n=[],e.data.forEach((function(e){e instanceof T.default||e instanceof _.default||e instanceof F.default?(e.fixtures.forEach((function(e){return t.push(e.matchId)})),e instanceof F.default&&e.fixtures.forEach((function(e){e.prediction.playerId&&n.push(e.prediction.playerId)}))):e instanceof I.default&&e.results.forEach((function(e){return t.push(e.matchId)}))})),[4,this.refactorResponseArrModel(e,t,n)]):[3,2]:[3,4];case 1:case 5:return[2,r.sent()];case 2:return[2,e];case 3:return[3,6];case 4:return[4,this.refactorResponseObjModel(e)];case 6:return[2]}}))}))},this.refactorResponseArrModel=function(e,t,s){return r(n,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return n=[],[4,this.matchFacade.getMatchesMapWithNativeIds(t)];case 1:return r=i.sent(),a={},s.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(s)]:[3,3];case 2:a=i.sent(),i.label=3;case 3:return e.data.forEach((function(e){e instanceof T.default||e instanceof _.default||e instanceof F.default?(e.fixtures.forEach((function(t){t.matchModel=r[t.matchId],t.matchId=t.matchModel.id,e instanceof F.default&&t.prediction.playerId&&(t.prediction.playerModel=a[t.prediction.playerId],t.prediction.playerId=a[t.prediction.playerId].id)})),n.push(e)):e instanceof I.default&&(e.results.forEach((function(e){e.matchModel=r[e.matchId],e.matchId=e.matchModel.id})),n.push(e))})),e.data=n,[2,e]}}))}))},this.refactorResponseObjModel=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=[],e.fixtures.forEach((function(e){return t.push(e.matchId)})),[4,this.matchFacade.getMatchesMapWithNativeIds(t)];case 1:return n=r.sent(),e.fixtures.forEach((function(e){e.matchModel=n[e.matchId],e.matchId=n[e.matchId].id})),[2,e]}}))}))},this.getCurrentGameId=function(e){var t=new Date;if(e.data.length>1){var n=[];return e.data.forEach((function(e){return n.push(e.predictionsCutoff)})),e.data.sort((function(e,n){var r=[e.predictionsCutoff,n.predictionsCutoff].map((function(e){return Math.abs(new Date(e)-t)}));return r[0]-r[1]}))[0].id}return e.data[0].id},this.initGameTypePredictions=function(e){var t={type:e};return new P.default(t)},this.initGameFilters=function(e,t,n){if(t&&n)return t.type=e,t.gameIds=n,new M.default(t);if(t&&!n)return t.type=e,new M.default(t);if(!t&&n){var r={type:e,gameIds:n};return new M.default(r)}return r={type:e},new M.default(r)},this.addPredictionProp=function(e,t){return r(n,void 0,void 0,(function(){var n=this;return i(this,(function(r){switch(r.label){case 0:return t.data.forEach((function(t,r){t.id===e[r].game_instance_id&&t.fixtures.forEach((function(t,i){void 0!==e[r].fixtures[i].goals_home&&void 0!==e[r].fixtures[i].goals_away?t.prediction.value=e[r].fixtures[i].goals_home+":"+e[r].fixtures[i].goals_away:t.prediction.value=e[r].fixtures[i].prediction,e[r].fixtures[i].player_id?t.prediction.playerId=e[r].fixtures[i].player_id:e[r].fixtures[i].target&&(t.prediction.target=e[r].fixtures[i].target),t.prediction.result=n.remapResult(e[r].fixtures[i].result)}))})),[4,this.remapMatchIdsFixtures(t)];case 1:return[2,r.sent()]}}))}))},this.remapResult=function(e){var t=new O.default;return t.settledAt=e.settled_at,t.resettledAt=e.resettled_at,t.status=e.status,t.outcome=e.outcome,t},this.footballHttps=new E.default(e),this.idMapping=t,this.matchFacade=new R.default(this.footballHttps,t),this.playerFacade=new A.default(this.footballHttps,t)}},4831:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var a=n(9072),o=n(4289),u=n(7232),c=n(383);t.default=function(e,t,n,l){var h=this;this.profileHttps=null,this.footballHttps=null,this.localStorage=null,this.idMapping=null,this.profileFacade=null,this.footballFacade=null,this.interestsService=null,this.ownProfile=null,this.modified=!1,this.expireAt=0,this.promises=[],this.isFetching=!1,this.getOwnProfile=function(){return r(h,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return this.isFetching?(console.log("Another thread is fetching profile..."),[4,this.delay(100)]):[3,2];case 1:return n.sent(),[3,0];case 2:if(this.modified&&this.ownProfile)return console.log("Timestamp is less than 10 minutes OR profile is modifying "),[2,this.ownProfile];if(e=Math.floor(Date.now()/1e3),this.ownProfile&&!(this.expireAt<e))return[3,7];this.isFetching=!0,this.expireAt=Math.floor(Date.now()/1e3)+600,n.label=3;case 3:return n.trys.push([3,5,,6]),[4,this.profileFacade.getOwn()];case 4:return t=n.sent(),this.setOwnProfile(t),[3,6];case 5:return n.sent(),this.isFetching=!1,[3,6];case 6:return this.modified=!1,this.isFetching=!1,[2,this.ownProfile];case 7:return[2,this.ownProfile]}}))}))},this.delay=function(e){return new Promise((function(t){setTimeout(t,e)}))},this.setOwnProfile=function(e){h.ownProfile=e},this.extractUpdatedProps=function(e,t){var n={};return Object.keys(e).forEach((function(r){"gender"===r&&e[r]!==t[r]?n[r]=t[r]:"birthDate"===r?(null===t[r]||null===e[r]&&t[r]||e[r]!==t[r])&&(n.birth_date=t[r]):"country"===r?null===t[r]?n.country_id=t[r]:(null===e[r]&&t[r]||e[r].id!==t[r].id)&&(n.country_id=t[r].id):"interests"===r&&(e[r].length>0?e[r].filter((function(e){return!t[r].some((function(t){return e.id===t.id&&e.favourite===t.favourite&&e.type===t.type&&e.source===t.source}))})).length>0&&(n[r]=t[r]):n[r]=t[r])})),n},this.getInfo=function(){return r(h,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return e=n.sent(),delete(t=JSON.parse(JSON.stringify(e))).interests,[2,t]}}))}))},this.showInterests=function(){return r(h,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return e=n.sent(),t=e.interests,[4,this.interestsService.inquiryCustomInterests(t)];case 2:return[2,n.sent()]}}))}))},this.showFullInterests=function(){return r(h,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.showInterests()];case 1:return e=t.sent(),[4,this.interestsService.showFullInterests(e)];case 2:return[2,t.sent()]}}))}))},this.getFollowers=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getFollowers(e)];case 1:return[2,t.sent()]}}))}))},this.getFollowing=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getFollowing(e)];case 1:return[2,t.sent()]}}))}))},this.follow=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.follow(e)];case 1:return[2,t.sent()]}}))}))},this.unfollow=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.unfollow(e)];case 1:return[2,t.sent()]}}))}))},this.addInterestPromise=function(e){return r(h,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return r.sent(),t=null,"custom"===e.source?[3,3]:[4,this.interestsService.remapInterestToNative(e)];case 2:return t=r.sent(),[3,4];case 3:t=e,r.label=4;case 4:return n=this.ownProfile.interests.filter((function(e){return e.id!==t.id||e.type!==t.type||e.source!==t.source})),this.ownProfile.interests=s([],n,!0),this.ownProfile.interests.push(t),[2,this]}}))}))},this.addInterest=function(e){return h.promises.push(h.addInterestPromise(e)),h},this.removeInterestPromise=function(e){return r(h,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return n.sent(),t=null,"custom"===e.source?[3,3]:[4,this.interestsService.remapInterestToNative(e)];case 2:return t=n.sent(),[3,4];case 3:t=e,n.label=4;case 4:return this.ownProfile.interests=this.ownProfile.interests.filter((function(e){return e.id!==t.id||e.type!==t.type||e.source!==t.source})),[2,this]}}))}))},this.removeInterest=function(e){return h.promises.push(h.removeInterestPromise(e)),h},this.setBirthdatePromise=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return t.sent(),this.ownProfile.birthDate=e||null,[2,this]}}))}))},this.setBirthdate=function(e){return h.promises.push(h.setBirthdatePromise(e)),h},this.setGenderPromise=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return t.sent(),this.ownProfile.gender="male"===e||"female"===e?e:"unspecified",[2,this]}}))}))},this.setGender=function(e){return h.promises.push(h.setGenderPromise(e)),h},this.setCountryPromise=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return t.sent(),e&&!this.ownProfile.country?(this.ownProfile.country=new a.default,this.ownProfile.country.id=e):e&&this.ownProfile.country?this.ownProfile.country.id=e:this.ownProfile.country=null,[2,this]}}))}))},this.setCountry=function(e){return h.promises.push(h.setCountryPromise(e)),h},this.showFullnessProfile=function(){return r(h,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return e=n.sent(),t=JSON.parse(JSON.stringify(e)),[2,this.profileFacade.showFullnessProfile(t)]}}))}))},this.update=function(){return r(h,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return 0===this.promises.length?[2,this.ownProfile]:[4,Promise.all(this.promises)];case 1:return i.sent(),[4,this.profileFacade.getOwn()];case 2:return e=i.sent(),[4,this.getOwnProfile()];case 3:return t=i.sent(),n=this.extractUpdatedProps(e,t),[4,this.profileHttps.updateProfile(n)];case 4:return r=i.sent(),this.modified=!1,this.expireAt=0,this.localStorage.setOwnProfile(r),delete r.interests,[2,r]}}))}))},this.localStorage=e,this.profileHttps=t,this.footballHttps=l,this.idMapping=n,this.footballFacade=new o.default(e,l,n),this.interestsService=new c.default(n,this.footballFacade),this.profileFacade=new u.default(e,t)}},642:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(7232),a=n(383);t.default=function(e,t,n,o){var u=this;this.profileHttps=null,this.footballFacade=null,this.localStorage=null,this.idMapping=null,this.profileFacade=null,this.interestsService=null,this.profileId="",this.setId=function(e){return u.profileId=e,u},this.getProfile=function(){return r(u,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getById(this.profileId)];case 1:return[2,e.sent()]}}))}))},this.getInfo=function(){return r(u,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.getProfile()];case 1:return delete(e=t.sent()).interests,[2,e]}}))}))},this.showInterests=function(){return r(u,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getProfile()];case 1:return e=n.sent(),t=e.interests,[4,this.interestsService.inquiryCustomInterests(t)];case 2:return[2,n.sent()]}}))}))},this.showFullInterests=function(){return r(u,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.showInterests()];case 1:return e=t.sent(),[4,this.interestsService.showFullInterests(e)];case 2:return[2,t.sent()]}}))}))},this.getFollowers=function(e){return r(u,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getFollowers(e,this.profileId)];case 1:return[2,t.sent()]}}))}))},this.getFollowing=function(e){return r(u,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getFollowing(e,this.profileId)];case 1:return[2,t.sent()]}}))}))},this.showFullnessProfile=function(){return r(u,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.getProfile()];case 1:return e=t.sent(),[2,this.profileFacade.showFullnessProfile(e)]}}))}))},this.localStorage=e,this.profileHttps=t,this.footballFacade=o,this.idMapping=n,this.interestsService=new a.default(n,o),this.profileFacade=new s.default(e,t)}},7232:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(9037),a=n(9523);t.default=function(e,t){var n=this;this.isBrowser=!1,this.localStorage={},this.https=null,this.getOwn=function(){return r(n,void 0,void 0,(function(){var e,t,n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(e=Math.floor(Date.now()/1e3),t=this.localStorage.getExparationProfile(),n=null,t>e&&(n=this.localStorage.getOwnProfile()),n?[2,n]:[3,1]):[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.https.getProfile()];case 2:return s=i.sent(),this.localStorage.setOwnProfile(s),[2,s];case 3:throw r=i.sent(),console.warn("There was a problem retrieving your profile: ",r),r;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.https.getProfile()];case 6:return[2,s=i.sent()];case 7:throw a=i.sent(),console.warn("There was a problem retrieving your profile: ",a),a;case 8:return[2]}}))}))},this.getByIds=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getProfiles(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the selected profiles: "+e.join(",")+" ",t),t;case 3:return[2]}}))}))},this.getById=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getProfile(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the selected profile: "+e+" ",t),t;case 3:return[2]}}))}))},this.getCountries=function(){return r(n,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(e=this.localStorage.getProfileCountries())&&e.length>0?[2,e]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.https.getCountries()];case 2:return t=i.sent(),this.localStorage.setProfileCountries(t),[2,t];case 3:throw n=i.sent(),console.warn("There was a problem retrieving profile countries: ",n),n;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.https.getCountries()];case 6:return[2,i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving profile countries: ",r),r;case 8:return[2]}}))}))},this.getFollowers=function(e,t){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e&&(e=new a.default(e)),[4,this.https.getFollowers(e,t)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving your followers: ",n),n;case 3:return[2]}}))}))},this.getFollowing=function(e,t){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e&&(e=new a.default(e)),[4,this.https.getFollowing(e,t)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving your following profiles: ",n),n;case 3:return[2]}}))}))},this.follow=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.follow(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem following profiles: "+e.join(",")+" ",t),t;case 3:return[2]}}))}))},this.unfollow=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.unfollow(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem unfollowing profiles: "+e.join(",")+" ",t),t;case 3:return[2]}}))}))},this.showFullnessProfile=function(e){var t=new s.default,n=0;return e.avatar&&(t.breakdown.addedAvatar.completed=!0,n+=t.breakdown.addedAvatar.percentage),e.birthDate&&(t.breakdown.addedBirthdate.completed=!0,n+=t.breakdown.addedBirthdate.percentage),e.country&&(t.breakdown.addedCountry.completed=!0,n+=t.breakdown.addedCountry.percentage),e.gender&&(t.breakdown.addedGender.completed=!0,n+=t.breakdown.addedGender.percentage),e.interests&&e.interests.length>0&&(e.interests.find((function(e){return"team"===e.type&&e.favourite}))&&(t.breakdown.teamFavourite.completed=!0,n+=t.breakdown.teamFavourite.percentage),e.interests.find((function(e){return"team"===e.type}))&&(t.breakdown.teamFollowed.completed=!0,n+=t.breakdown.teamFollowed.percentage),e.interests.find((function(e){return"player"===e.type&&e.favourite}))&&(t.breakdown.playerFavourite.completed=!0,n+=t.breakdown.playerFavourite.percentage),e.interests.find((function(e){return"player"===e.type}))&&(t.breakdown.playerFollowed.completed=!0,n+=t.breakdown.playerFollowed.percentage),e.interests.find((function(e){return"competition"===e.type&&e.favourite}))&&(t.breakdown.competitionFavourite.completed=!0,n+=t.breakdown.competitionFavourite.percentage),e.interests.find((function(e){return"competition"===e.type}))&&(t.breakdown.competitionFollowed.completed=!0,n+=t.breakdown.competitionFollowed.percentage)),t.totalPercentage=n,t},this.isBrowser="undefined"!=typeof window,this.localStorage=e,this.https=t}},383:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){var i=this;this.idMapping=null,this.footballFacade=null,this.remapInterestsToIdSchema=function(e){return n(i,void 0,void 0,(function(){var t,n,i,s,a,o,u,c,l,h,d;return r(this,(function(r){switch(r.label){case 0:return"native"===(t=this.idMapping.idSchema)?[3,4]:e.length>0?(n={},i={},e.forEach((function(e){n.hasOwnProperty(e.type)||(n[e.type]=[],i[e.type]=[]),n[e.type].push(e.id),i[e.type].push(e)})),[4,this.idMapping.idMappingFacade.getEntitiesByIds(n,"native",t)]):[3,2];case 1:for(s=r.sent(),a=[],o=function(e,t){t.forEach((function(t,n){t.id=s[e][n],a.push(t)}))},u=0,c=Object.entries(i);u<c.length;u++)l=c[u],h=l[0],d=l[1],o(h,d);return[2,a];case 2:case 4:return[2,e];case 3:return[3,5];case 5:return[2]}}))}))},this.remapInterestToNative=function(e){return n(i,void 0,void 0,(function(){var t,n,i,s,a;return r(this,(function(r){switch(r.label){case 0:return"native"===(t=this.idMapping.idSchema)?[3,2]:(n={},i=e.id,s=e.type,n[s]=[i],[4,this.idMapping.idMappingFacade.getEntitiesByIds(n,t,"native")]);case 1:return a=r.sent(),e.id=a[s][0],[2,e];case 2:return[2,e]}}))}))},this.inquiryCustomInterests=function(e){return n(i,void 0,void 0,(function(){var t,n,i;return r(this,(function(r){switch(r.label){case 0:return t=[],e&&e.length>0&&(t=e.filter((function(e){return"custom"===e.source}))),t&&t.length>0?(n=e.filter((function(e){return"custom"!==e.source})),[4,this.remapInterestsToIdSchema(n)]):[3,2];case 1:return i=r.sent(),t.forEach((function(e){return i.push(e)})),[2,i];case 2:return[4,this.remapInterestsToIdSchema(e)];case 3:return[2,r.sent()]}}))}))},this.showFullInterests=function(e){return n(i,void 0,void 0,(function(){var t,n,i,s,a,o,u,c;return r(this,(function(r){switch(r.label){case 0:if(t=[],!(e&&e.length>0))return[3,10];n=0,i=e,r.label=1;case 1:return n<i.length?"custom"===(s=i[n]).source||"football"!==s.source?[3,8]:(a={},"team"!==s.type?[3,3]:(a.teamIds=[s.id],[4,this.footballFacade.getTeams(a)])):[3,10];case 2:o=r.sent(),s.model=o.data[0],r.label=3;case 3:return"player"!==s.type?[3,5]:(a.playerIds=[s.id],[4,this.footballFacade.getPlayers(a)]);case 4:u=r.sent(),s.model=u.data[0],r.label=5;case 5:return"competition"!==s.type?[3,7]:(a.competitionIds=[s.id],[4,this.footballFacade.getCompetitions(a)]);case 6:c=r.sent(),s.model=c[0],r.label=7;case 7:return void 0===s.model&&(s.model=null),t.push(s),[3,9];case 8:t.push(s),r.label=9;case 9:return n++,[3,1];case 10:return[2,t]}}))}))},this.idMapping=e,this.footballFacade=t}},9523:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=this;this.limit=0,this.startAfter=null,this.constructFilterUrl=function(){var e="";return t.limit&&(e=(e+="&")+"limit="+t.limit),t.startAfter&&(e=(e+="&")+"start_after="+t.startAfter),e},this.limit=e.limit?e.limit:20,this.startAfter=e.startAfter?e.startAfter:null}},4782:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.avatar=null,this.followerId=null,this.name=null,this.profileId=null}},1712:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.profile_ids=[]}},3106:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.avatar=null,this.followingId=null,this.name=null,this.profileId=null}},6620:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7312);t.default=function(){this.teamFollowed=new r.default(10),this.teamFavourite=new r.default(15),this.playerFollowed=new r.default(10),this.playerFavourite=new r.default(10),this.competitionFollowed=new r.default(10),this.competitionFavourite=new r.default(5),this.addedBirthdate=new r.default(10),this.addedGender=new r.default(10),this.addedCountry=new r.default(10),this.addedAvatar=new r.default(10)}},7312:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){this.completed=!1,this.percentage=e}},9037:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6620);t.default=function(){this.breakdown=new r.default}},9072:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id=null,this.name=null,this.assets=null}},3546:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id=null,this.name=null,this.avatar=null,this.gender=null,this.country=null,this.birthDate=null,this.interests=[]}},6277:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1553),i=n(4782);t.default=function(){var e=this;this.followersFromResponse=function(t){var n=new r.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapResponse(t)})),n},this.remapResponse=function(e){var t=new i.default;return t.avatar=e.avatar,t.followerId=e.follower_id,t.name=e.name,t.profileId=e.profile_id,t}}},8673:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1553),i=n(3106);t.default=function(){var e=this;this.followResponse=function(t){return t.map((function(t){return e.remapResponse(t)}))},this.followingFromResponse=function(t){var n=new r.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapResponse(t)})),n},this.remapResponse=function(e){var t=new i.default;return t.avatar=e.avatar,t.followingId=e.following_id,t.name=e.name,t.profileId=e.profile_id,t}}},441:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3546);t.default=function(){var e=this;this.profilesFromResponse=function(t){return t?t.map((function(t){return e.fullProfileFromResponse(t)})):null},this.fullProfileFromResponse=function(e){var t=new r.default;return t.avatar=e.avatar,t.birthDate=e.birth_date,t.country=e.country,t.gender=e.gender,t.id=e.id,t.interests=e.interests,t.name=e.name,t}}},6409:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(4275),a=n(8900),o=n(7232),u=n(5601),c=n(4831),l=n(642),h=n(4289),d=n(595);t.default=function(e){var t=this;this.profileHttps=null,this.footballHttps=null,this.footballFacade=null,this.idMapping=null,this.localStorage=null,this.profileFacade=null,this.ownProfileBuilder=null,this.profileBuilder=null,this.getOwn=function(){return t.ownProfileBuilder},this.getById=function(e){return t.profileBuilder.setId(e)},this.getCountries=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getCountries()];case 1:return[2,e.sent()]}}))}))},this.getByIds=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getByIds(e)];case 1:return[2,t.sent()]}}))}))},this.profileHttps=new s.default(e),this.footballHttps=new d.default(e),this.idMapping=new a.default(e),this.localStorage=new u.default(e),this.footballFacade=new h.default(this.localStorage,this.footballHttps,this.idMapping),this.profileFacade=new o.default(this.localStorage,this.profileHttps),this.ownProfileBuilder=new c.default(this.localStorage,this.profileHttps,this.idMapping,this.footballHttps),this.profileBuilder=new l.default(this.localStorage,this.profileHttps,this.idMapping,this.footballFacade)}},853:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.GameStatusEnum=void 0,(n=t.GameStatusEnum||(t.GameStatusEnum={})).OPEN="OPEN",n.LIVE="LIVE",n.PENDING="PENDING",n.CANCELED="CANCELED",n.CLOSED="CLOSED",n.SETTLED="SETTLED"},9502:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(4946),a=n(2793),o=n(5013),u=n(853),c=n(7299),l=n(1399);t.default=function(e,t){var n=this;this.idMapping=null,this.predictorHttps=null,this.predictorService=null,this.getGames=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=this.predictorService.initGameFilters("TOP_X",e),[4,this.predictorHttps.getGames(t)];case 1:return n=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(n)];case 2:return[2,r.sent()]}}))}))},this.getGameById=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.predictorHttps.getGameById(e)];case 1:return t=n.sent(),[4,this.predictorService.remapMatchIdsFixtures(t)];case 2:return[2,n.sent()]}}))}))},this.getGameResults=function(e,t){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return t&&(t=new c.default(t)),[4,this.predictorHttps.getGameResults(e,t)];case 1:return n=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(n)];case 2:return[2,r.sent()]}}))}))},this.getCurrentGameResults=function(){return r(n,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return e={status:u.GameStatusEnum.OPEN,type:"TOP_X"},e=new c.default(e),[4,this.predictorHttps.getGames(e)];case 1:return t=r.sent(),n=this.predictorService.getCurrentGameId(t),[4,this.getGameResults(n)];case 2:return[2,r.sent().data[0]]}}))}))},this.play=function(e){return r(n,void 0,void 0,(function(){var t,n,r,a;return i(this,(function(i){switch(i.label){case 0:return t=new l.default(e),this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,2]:(n=[],t.fixtures.forEach((function(e){return n.push(e.matchId)})),[4,this.predictorService.remapMatchIdToNative(n)]);case 1:r=i.sent(),t.fixtures.forEach((function(e){return e.matchId=r.shift()})),i.label=2;case 2:return[4,this.predictorHttps.makeFootballPrediction(t)];case 3:return(a=i.sent()).fixtures.forEach((function(e){e.matchId=e.matchModel.id})),[2,a]}}))}))},this.delete=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(e)];case 1:return[2,t.sent()]}}))}))},this.getMyGameEditions=function(e){return r(n,void 0,void 0,(function(){var t,n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return t=this.predictorService.initGameTypePredictions("TOP_X"),n=[],[4,this.predictorHttps.getMyPredictionsNoRemap(t)];case 1:return(r=i.sent()).forEach((function(e){e.game_instance_id&&n.push(e.game_instance_id)})),s=this.predictorService.initGameFilters("TOP_X",e,n),[4,this.predictorHttps.getUserGameEditions(s)];case 2:return a=i.sent(),[4,this.predictorService.addPredictionProp(r,a)];case 3:return[2,i.sent()]}}))}))},this.getMyGamePrediction=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return t=this.predictorService.initGameTypePredictions("TOP_X"),[4,this.predictorHttps.getMyPredictions(t)];case 1:return[2,n.sent().data.filter((function(t){return t.gameInstanceId===e}))[0]]}}))}))},this.getUserGameEditions=function(e,t){return r(n,void 0,void 0,(function(){var n,r,s,a,o;return i(this,(function(i){switch(i.label){case 0:return n=this.predictorService.initGameTypePredictions("TOP_X"),r=[],[4,this.predictorHttps.getUserPredictionsNoRemap(e,n)];case 1:return(s=i.sent()).forEach((function(e){e.game_instance_id&&r.push(e.game_instance_id)})),a=this.predictorService.initGameFilters("TOP_X",t,r),[4,this.predictorHttps.getUserGameEditions(a)];case 2:return o=i.sent(),[4,this.predictorService.addPredictionProp(s,o)];case 3:return[2,i.sent()]}}))}))},this.getUserGamePrediction=function(e,t){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return n=this.predictorService.initGameTypePredictions("TOP_X"),[4,this.predictorHttps.getUserPredictions(e,n)];case 1:return[2,r.sent().data.filter((function(e){return e.gameInstanceId===t}))[0]]}}))}))},this.idMapping=t,this.predictorHttps=new a.default(e,t),this.predictorService=new o.default(e,t)}},7482:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null}},5967:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(3381);t.default=function(){this.matchId=null,this.matchType=null,this.market=r.MarketEnum.CORRECT_SCORE,this.matchModel=null,this.prediction=new i.default}},6890:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.userId=null,this.points=null,this.results=[],this.tiebreaker=null}},6160:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.matchId=null,this.matchModel=null,this.outcome=null}},7299:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(853);t.default=function(e){var t=this;this.limit=null,this.startAfter=null,this.status=null,this.type=null,this.gameIds=null,this.constructFiltersUrl=function(){var e="";return t.limit&&(e+="&",e+="limit="+t.limit),t.startAfter&&(e+="&",e+="start_after="+t.startAfter),t.status&&Object.values(r.GameStatusEnum).includes(t.status)&&(e+="&",e+="status="+t.status),t.type&&(e+="&",e+="type="+t.type),t.gameIds&&t.gameIds.length>0&&(e+="&",e+="game_ids="+t.gameIds.join(",")),e},this.limit=e.limit?e.limit:null,this.startAfter=e.startAfter?e.startAfter:null,this.status=e.status?e.status:null,this.type=e.type?e.type:null,this.gameIds=e.gameIds?e.gameIds:null}},3751:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.predictionsCutoff=null,this.fixtures=[],this.createdAt=null,this.updatedAt=null}},4780:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7482),i=n(8410),s=n(5967),a=n(6890),o=n(6160),u=n(3751),c=n(7243),l=n(8950),h=n(7640),d=n(1553);t.default=function(){var e=this;this.remapPaginatedGames=function(t){var n=new d.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapGamesListResponse(t)})),n},this.remapGamesListResponse=function(t){var n=new u.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.type=t.type,n.status=t.status,n.predictionsCutoff=t.predictions_cutoff,n.fixtures=t.fixtures.map((function(t){return e.remapFixturesResponse(t)})),n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},this.remapFixturesResponse=function(e){var t=new r.default;return t.matchId=e.match_id,t.matchType=e.match_type,t.market=e.market,t},this.remapPaginatedUserTopXEditions=function(t){var n=new d.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapUserTopXEditionsResponse(t)})),n},this.remapUserTopXEditionsResponse=function(t){var n=new l.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.type=t.type,n.status=t.status,n.predictionsCutoff=t.predictions_cutoff,n.fixtures=t.fixtures.map((function(t){return e.remapTopXFixturesResponse(t)})),n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},this.remapTopXFixturesResponse=function(e){var t=new s.default;return t.matchId=e.match_id,t.matchType=e.match_type,t},this.remapPaginatedUserMathQuizEditions=function(t){var n=new d.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapUserMatchQuizEditionsResponse(t)})),n},this.remapUserMatchQuizEditionsResponse=function(t){var n=new c.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.type=t.type,n.status=t.status,n.predictionsCutoff=t.predictions_cutoff,n.fixtures=t.fixtures.map((function(t){return e.remapMatchQuizFixturesResponse(t)})),n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},this.remapMatchQuizFixturesResponse=function(e){var t=new i.default;return t.matchId=e.match_id,t.matchType=e.match_type,t.market=e.market,t},this.remapPaginatedGameResults=function(t){var n=new d.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapGameResults(t)})),n},this.remapGameResults=function(t){var n=new a.default;return n.userId=t.user_id,n.points=t.points?t.points:0,n.results=t.results.map((function(t){return e.remapResults(t)})),n.tiebreaker=t.tiebreaker?e.remapTiebreaker(t.tiebreaker):null,n},this.remapResults=function(e){var t=new o.default;return t.matchId=e.match_id,t.outcome=e.outcome,t},this.remapTiebreaker=function(e){var t=new h.default;return t.goldenGoal=e.golden_goal,t}}},8950:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.predictionsCutoff=null,this.fixtures=[],this.createdAt=null,this.updatedAt=null}},7640:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.goldenGoal=null}},3381:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null,this.result=null}},1399:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1465);t.default=function(e){var t=this;this.gameInstanceId=null,this.fixtures=[],this.tiebreaker=null,this.gameInstanceId=e.gameInstanceId,e.fixtures.forEach((function(e){return t.fixtures.push(new r.default(e.matchId,e.prediction.value))})),this.tiebreaker=e.tiebreaker?e.tiebreaker:null}},9596:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(8900),a=n(9502);t.default=function(e){var t=this;this.topXFacade=null,this.idMapping=null,this.getGames=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getGames(e)];case 1:return[2,t.sent()]}}))}))},this.getGameById=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getGameById(e)];case 1:return[2,t.sent()]}}))}))},this.getGameResults=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getGameResults(e,n)];case 1:return[2,t.sent()]}}))}))},this.getCurrentGameResults=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getCurrentGameResults()];case 1:return[2,e.sent()]}}))}))},this.play=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.play(e)];case 1:return[2,t.sent()]}}))}))},this.delete=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.delete(e)];case 1:return[2,t.sent()]}}))}))},this.getMyGameEditions=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getMyGameEditions(e)];case 1:return[2,t.sent()]}}))}))},this.getMyGamePrediction=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getMyGamePrediction(e)];case 1:return[2,t.sent()]}}))}))},this.getUserGameEditions=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getUserGameEditions(e,n)];case 1:return[2,t.sent()]}}))}))},this.getUserGamePrediction=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getUserGamePrediction(e,n)];case 1:return[2,t.sent()]}}))}))},this.idMapping=new s.default(e),this.topXFacade=new a.default(e,this.idMapping)}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}var r={};return(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.FansUnitedSDK=void 0;var t=n(6409),i=n(6595),s=n(8808),a=n(4946),o=n(1259),u=n(2962),c=n(9627),l=n(2671),h=n(9377),d=n(9596),p=n(267);e.FansUnitedSDK=function(e){var n=(new i.default).validate(e);if(n.idSchema.validation===c.ValidationResponseEnum.MISSING_VALUE&&(console.warn(n.idSchema.message.text),e.idSchema=a.IdSchemaEnum.NATIVE),n.environment.validation===c.ValidationResponseEnum.MISSING_VALUE&&(console.warn(n.environment.message.text),e.environment=l.EnvironmentEnum.PROD),n.lang.validation===c.ValidationResponseEnum.MISSING_VALUE&&(console.warn(n.lang.message.text),e.lang=h.LangEnum.EN),n.isValid)return{profile:new t.default(e),football:new s.default(e),predictor:new o.default(e),loyalty:new u.default(e),topX:new d.default(e),matchQuiz:new p.default(e)};throw new Error("Configuration is not valid")}})(),r})()}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.FansUnitedSDK=t():e.FansUnitedSDK=t()}(self,(function(){return(()=>{var e={9669:(e,t,n)=>{e.exports=n(1609)},5448:(e,t,n)=>{"use strict";var r=n(4867),i=n(6026),s=n(4372),a=n(5327),o=n(4097),u=n(4109),c=n(7985),l=n(5061),h=n(5655),d=n(5263);e.exports=function(e){return new Promise((function(t,n){var p,f=e.data,m=e.headers,v=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}r.isFormData(f)&&delete m["Content-Type"];var g=new XMLHttpRequest;if(e.auth){var w=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(w+":"+b)}var _=o(e.baseURL,e.url);function I(){if(g){var r="getAllResponseHeaders"in g?u(g.getAllResponseHeaders()):null,s={data:v&&"text"!==v&&"json"!==v?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g};i((function(e){t(e),y()}),(function(e){n(e),y()}),s),g=null}}if(g.open(e.method.toUpperCase(),a(_,e.params,e.paramsSerializer),!0),g.timeout=e.timeout,"onloadend"in g?g.onloadend=I:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(I)},g.onabort=function(){g&&(n(l("Request aborted",e,"ECONNABORTED",g)),g=null)},g.onerror=function(){n(l("Network Error",e,null,g)),g=null},g.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||h.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",g)),g=null},r.isStandardBrowserEnv()){var E=(e.withCredentials||c(_))&&e.xsrfCookieName?s.read(e.xsrfCookieName):void 0;E&&(m[e.xsrfHeaderName]=E)}"setRequestHeader"in g&&r.forEach(m,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete m[t]:g.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(g.withCredentials=!!e.withCredentials),v&&"json"!==v&&(g.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&g.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&g.upload&&g.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){g&&(n(!e||e&&e.type?new d("canceled"):e),g.abort(),g=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),f||(f=null),g.send(f)}))}},1609:(e,t,n)=>{"use strict";var r=n(4867),i=n(1849),s=n(321),a=n(7185),o=function e(t){var n=new s(t),o=i(s.prototype.request,n);return r.extend(o,s.prototype,n),r.extend(o,n),o.create=function(n){return e(a(t,n))},o}(n(5655));o.Axios=s,o.Cancel=n(5263),o.CancelToken=n(4972),o.isCancel=n(6502),o.VERSION=n(7288).version,o.all=function(e){return Promise.all(e)},o.spread=n(8713),o.isAxiosError=n(6268),e.exports=o,e.exports.default=o},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,n)=>{"use strict";var r=n(5263);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(4867),i=n(5327),s=n(782),a=n(3572),o=n(7185),u=n(4875),c=u.validators;function l(e){this.defaults=e,this.interceptors={request:new s,response:new s}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=o(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&u.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,s=[];if(this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)})),!r){var l=[a,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(s),i=Promise.resolve(e);l.length;)i=i.then(l.shift(),l.shift());return i}for(var h=e;n.length;){var d=n.shift(),p=n.shift();try{h=d(h)}catch(e){p(e);break}}try{i=a(h)}catch(e){return Promise.reject(e)}for(;s.length;)i=i.then(s.shift(),s.shift());return i},l.prototype.getUri=function(e){return e=o(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(o(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(o(r||{},{method:e,url:t,data:n}))}})),e.exports=l},782:(e,t,n)=>{"use strict";var r=n(4867);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},4097:(e,t,n)=>{"use strict";var r=n(1793),i=n(7303);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},5061:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,i,s){var a=new Error(e);return r(a,t,n,i,s)}},3572:(e,t,n)=>{"use strict";var r=n(4867),i=n(8527),s=n(6502),a=n(5655),o=n(5263);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new o("canceled")}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return u(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return s(t)||(u(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},7185:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function o(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function u(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||s,i=t(e);r.isUndefined(i)&&t!==u||(n[e]=i)})),n}},6026:(e,t,n)=>{"use strict";var r=n(5061);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},8527:(e,t,n)=>{"use strict";var r=n(4867),i=n(5655);e.exports=function(e,t,n){var s=this||i;return r.forEach(n,(function(n){e=n.call(s,e,t)})),e}},5655:(e,t,n)=>{"use strict";var r=n(4867),i=n(6016),s=n(481),a={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=n(5448)),u),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(o(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(0,JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||c.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw s(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(a)})),e.exports=c},7288:e=>{e.exports={version:"0.24.0"}},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},5327:(e,t,n)=>{"use strict";var r=n(4867);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var s;if(n)s=n(t);else if(r.isURLSearchParams(t))s=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),s=a.join("&")}if(s){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,s,a){var o=[];o.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),r.isString(i)&&o.push("path="+i),r.isString(s)&&o.push("domain="+s),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},6268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},7985:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},4109:(e,t,n)=>{"use strict";var r=n(4867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,s,a={};return e?(r.forEach(e.split("\n"),(function(e){if(s=e.indexOf(":"),t=r.trim(e.substr(0,s)).toLowerCase(),n=r.trim(e.substr(s+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4875:(e,t,n)=>{"use strict";var r=n(7288).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var s={};i.transitional=function(e,t,n){function i(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new Error(i(r," has been removed"+(t?" in "+t:"")));return t&&!s[r]&&(s[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var s=r[i],a=t[s];if(a){var o=e[s],u=void 0===o||a(o,s,e);if(!0!==u)throw new TypeError("option "+s+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+s)}},validators:i}},4867:(e,t,n)=>{"use strict";var r=n(1849),i=Object.prototype.toString;function s(e){return"[object Array]"===i.call(e)}function a(e){return void 0===e}function o(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),s(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:s,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:o,isPlainObject:u,isUndefined:a,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return o(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:l,merge:function e(){var t={};function n(n,r){u(t[r])&&u(n)?t[r]=e(t[r],n):u(n)?t[r]=e({},n):s(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return t},extend:function(e,t,n){return l(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},6595:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(682),i=n(2141),s=n(4241),a=n(6391),o=n(1512),u=n(4392),c=n(320),l=n(7631),h=n(6965);t.default=function(){var e=this;this.validate=function(t){var n=e.checkFieldsForValues(t);return n.isValid=e.containsErrorMessage(n),n},this.checkFieldsForValues=function(e){for(var t=new l.default,n={apiKey:new o.default,environment:new a.default,idSchema:new u.default,clientId:new h.default,lang:new s.default,authProvider:new c.default},r=0,i=Object.entries(t);r<i.length;r++){var d=i[r],p=d[0];d[1],"isValid"!==p&&n[p].validate(e)}return Object.keys(n).forEach((function(r){t[r]=n[r].validate(e)})),t},this.containsErrorMessage=function(e){for(var t=!0,n=0,s=Object.entries(e);n<s.length;n++){var a=s[n],o=a[0],u=a[1];if(o!==r.ConfigFieldEnum.authProvider){if("isValid"!==o&&u.message.type===i.LogEnum.ERROR)return!1;if("isValid"!==o&&u.message.type===i.LogEnum.WARNING)return!0}}return t}}},682:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigFieldEnum=void 0,(n=t.ConfigFieldEnum||(t.ConfigFieldEnum={})).apiKey="apiKey",n.environment="environment",n.idSchema="idSchema",n.clientId="clientId",n.lang="lang",n.authProvider="authProvider"},2671:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EnvironmentEnum=void 0,(n=t.EnvironmentEnum||(t.EnvironmentEnum={})).DEV="dev",n.PROD="prod",n.SANDBOX="sandbox"},4946:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.IdSchemaEnum=void 0,(n=t.IdSchemaEnum||(t.IdSchemaEnum={})).NATIVE="native",n.ENETPULSE="enetpulse",n.SPORTRADAR="sportradar",n.SPORTAL_365="sportal365"},9377:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LangEnum=void 0,(n=t.LangEnum||(t.LangEnum={})).EN="en",n.BG="bg",n.RO="ro"},2141:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LogEnum=void 0,(n=t.LogEnum||(t.LogEnum={})).ERROR="error",n.WARNING="warning"},9028:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationMessageEnum=void 0,(n=t.ValidationMessageEnum||(t.ValidationMessageEnum={})).API_KEY="The field apiKey with valid value must be provided to use this SDK",n.CLIENT_ID="The field clientId must be provided to use this SDK",n.LANG_MISSING="If no lang is passed the default one will be set which is: EN",n.LANG_INVALID="This lang value is not supported, the default one will be set which is: EN",n.ID_SCHEMA_MISSING="If no idSchema is passed the default one will be set which is: native",n.ID_SCHEMA_INVALID="This idSchema value is not supported, the default one will be set which is: native",n.ENVIRONMENT_MISSING="If no environment is passed the default one will be set which is: prod",n.ENVIRONMENT_INVALID="This environment value is not supported, the default one will be set which is: prod",n.AUTH_PROVIDER_CONFIG_PROP_MISSING="The following property is missing from the authProvider object:",n.AUTH_PROVIDER_CONFIG_INVALID_PROP="You have passed a property which is not supported for the authentication provider:",n.AUTH_PROVIDER_CONFIG_MISSING="The field authProvider must be provided to use this SDK",n.AUTH_PROVIDER_CONFIG_MISSING_CONFIG="The field authProvider has missing properties"},9627:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationResponseEnum=void 0,(n=t.ValidationResponseEnum||(t.ValidationResponseEnum={})).MISSING_VALUE="missing",n.INVALID_VALUE="invalid",n.VALID_VALUE="valid"},7070:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.getIdToken=null,this.logout=null}},2379:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3220);t.default=function(){this.validation=null,this.message=new r.default,this.getIdToken={validation:null,message:new r.default},this.logout={validation:null,message:new r.default}}},7631:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3074);t.default=function(){this.apiKey=null,this.environment=null,this.idSchema=null,this.clientId=null,this.lang=null,this.authProvider={getIdToken:new r.default,logout:new r.default},this.isValid=!1}},3220:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.text=null,this.type=null}},3074:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){}},1512:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=function(){function e(){this.validateField=function(e){return null!=e&&e.length>0?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(e){var t=null,n=s.LogEnum.ERROR;return e===r.ValidationResponseEnum.MISSING_VALUE&&(t=i.ValidationMessageEnum.API_KEY),e===r.ValidationResponseEnum.VALID_VALUE&&(n=null),{text:t,type:n}}}return e.prototype.validate=function(e){var t=this.validateField(e.apiKey);return{validation:t,message:this.generateMessage(t)}},e}();t.default=a},320:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=n(7070),o=n(2379),u=function(){function e(){this.validateAuthProvider=function(e){var t=Object.keys(new a.default),n=new o.default;if(e){var u=Object.keys(e).filter((function(e){return!t.includes(e)}));u.length>0?(n.validation=r.ValidationResponseEnum.INVALID_VALUE,n.message.type=s.LogEnum.WARNING,n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_INVALID_PROP+" "+u.join(",")):n.validation=r.ValidationResponseEnum.VALID_VALUE}else n.validation=r.ValidationResponseEnum.MISSING_VALUE,n.message.type=s.LogEnum.ERROR,n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING;return n},this.validateAuthProviderConfigFields=function(e,t){return Object.keys(new a.default).forEach((function(n){e[n]?t[n].validation=r.ValidationResponseEnum.VALID_VALUE:t[n].validation=r.ValidationResponseEnum.MISSING_VALUE})),t},this.generateAuthProviderConfigMessages=function(e){return Object.keys(e).filter((function(e){return"validation"!==e&&"message"!==e})).forEach((function(t){var n=e[t];n.validation===r.ValidationResponseEnum.MISSING_VALUE&&(n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_PROP_MISSING+" "+t,n.message.type=s.LogEnum.ERROR)})),e},this.checkAuthProviderConfigMessagesForErrors=function(e){return Object.keys(e).filter((function(e){return"validation"!==e&&"message"!==e})).forEach((function(t){e[t].validation===r.ValidationResponseEnum.MISSING_VALUE&&e.validation===r.ValidationResponseEnum.VALID_VALUE&&(e.validation=r.ValidationResponseEnum.INVALID_VALUE,e.message.type=s.LogEnum.ERROR,e.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING_CONFIG)})),e}}return e.prototype.validate=function(e){var t=this.validateAuthProvider(e.authProvider);return t.validation!==r.ValidationResponseEnum.MISSING_VALUE&&(t=this.validateAuthProviderConfigFields(e.authProvider,t),t=this.generateAuthProviderConfigMessages(t),t=this.checkAuthProviderConfigMessagesForErrors(t)),t},e}();t.default=u},6965:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=function(){function e(){this.validateField=function(e){return null!=e&&e.length>0?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(e){var t=null,n=s.LogEnum.WARNING;return e===r.ValidationResponseEnum.MISSING_VALUE&&(t=i.ValidationMessageEnum.CLIENT_ID),e===r.ValidationResponseEnum.VALID_VALUE&&(t=null,n=null),{text:t,type:n}}}return e.prototype.validate=function(e){var t=this.validateField(e.clientId);return{validation:t,message:this.generateMessage(t)}},e}();t.default=a},6391:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=n(2671),o=function(){function e(){this.validateField=function(e){var t=[a.EnvironmentEnum.DEV,a.EnvironmentEnum.SANDBOX,a.EnvironmentEnum.PROD];return null!=e&&e.length>0?t.includes(e)?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.INVALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(e){var t=null,n=s.LogEnum.WARNING;return e===r.ValidationResponseEnum.MISSING_VALUE&&(t=i.ValidationMessageEnum.ENVIRONMENT_MISSING),e===r.ValidationResponseEnum.INVALID_VALUE&&(t=i.ValidationMessageEnum.ENVIRONMENT_INVALID),e===r.ValidationResponseEnum.VALID_VALUE&&(t=null,n=null),{text:t,type:n}}}return e.prototype.validate=function(e){var t=this.validateField(e.environment);return{validation:t,message:this.generateMessage(t)}},e}();t.default=o},4392:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=n(4946),o=function(){function e(){this.validateField=function(e){var t=[a.IdSchemaEnum.NATIVE,a.IdSchemaEnum.SPORTAL_365,a.IdSchemaEnum.ENETPULSE,a.IdSchemaEnum.SPORTRADAR];return null!=e&&e.length>0?t.includes(e)?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.INVALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(e){var t=null,n=s.LogEnum.WARNING;return e===r.ValidationResponseEnum.MISSING_VALUE&&(t=i.ValidationMessageEnum.ID_SCHEMA_MISSING),e===r.ValidationResponseEnum.INVALID_VALUE&&(t=i.ValidationMessageEnum.ID_SCHEMA_INVALID),e===r.ValidationResponseEnum.VALID_VALUE&&(t=null,n=null),{text:t,type:n}}}return e.prototype.validate=function(e){var t=this.validateField(e.idSchema);return{validation:t,message:this.generateMessage(t)}},e}();t.default=o},4241:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9377),i=n(9627),s=n(9028),a=n(2141);t.default=function(){var e=this;this.validate=function(t){var n=e.validateField(t.lang);return{validation:n,message:e.generateMessage(n)}},this.validateField=function(e){var t=[r.LangEnum.BG,r.LangEnum.RO,r.LangEnum.EN];return null!=e&&e.length>0?t.includes(e)?i.ValidationResponseEnum.VALID_VALUE:i.ValidationResponseEnum.INVALID_VALUE:i.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(e){var t=null,n=a.LogEnum.WARNING;return e===i.ValidationResponseEnum.MISSING_VALUE&&(t=s.ValidationMessageEnum.LANG_MISSING),e===i.ValidationResponseEnum.INVALID_VALUE&&(t=s.ValidationMessageEnum.LANG_INVALID),e===i.ValidationResponseEnum.VALID_VALUE&&(t=null,n=null),{text:t,type:n}}}},1260:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ID_TYPES=void 0,t.ID_TYPES={native:"id",sportradar:"sportradar_id",sportal365:"sportal365_id",enetpulse:"enetpulse_id"}},712:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformIdsToBeUnique=t.setBaseUrl=t.limitIds=t.requestChunkBuild=void 0,t.requestChunkBuild=function(e){var t=[],n=0;return t[n]=[],e.forEach((function(e){t[n].length<=250?t[n].push(e):(n++,t[n]=[e])})),t},t.limitIds=function(e){for(var t=[];e.length>200;){var n=e.splice(0,200);t.push(n)}return t.push(e),t},t.setBaseUrl=function(e,t){return"prod"===e||"sandbox"===e?{profile:"https://profile.fansunitedapi.com/v1",football:"https://football.fansunitedapi.com/v1",idMapping:"https://id-mapping.fansunitedapi.com/v1",predictor:"https://prediction.fansunitedapi.com/v1",client:"https://client.fansunitedapi.com/v1"}[t]:{profile:"http://localhost:8010",football:"http://locahost:8080",idMapping:"http://localhost:8030",predictor:"http://localhost:8040",client:"http://localhost:8080"}[t]},t.transformIdsToBeUnique=function(e){return e.filter((function(e,t,n){return t===n.indexOf(e)}))}},5601:function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1260),s="FansUnited",a={football:{ids:[],countries:[],competitions:[]},profile:{own:{},countries:[],expireAt:0}};t.default=function(e){var t=this;this.idSchema="",this.exparationTimeout=600,this.clearData=function(){t.setData(a)},this.getEntityById=function(e,n){return void 0===e&&(e=""),void 0===n&&(n=""),t.getData().football.ids.find((function(r){var s=i.ID_TYPES[t.idSchema];return r&&""+r[s]===n&&r.resource===e}))},this.getEntity=function(e,n,r){return Array.isArray(e)?t.getData().football.ids.filter((function(t){var s=i.ID_TYPES[r];return t&&e.includes(""+t[s])&&t.resource===n})):t.getData().football.ids.find((function(t){var s=i.ID_TYPES[r];return t&&""+t[s]===e&&t.resource===n}))},this.getEntityByNativeId=function(e,n){return void 0===e&&(e=""),void 0===n&&(n=""),t.getData().football.ids.find((function(t){return t&&""+t.id===n&&t.resource===e}))},this.checkForExistingIdObjs=function(e,n){var r=i.ID_TYPES[n],s={};return Object.keys(e).forEach((function(i){var a=e[i],o=t.getEntity(a,i,n).map((function(e){return e[r]})),u=e[i].filter((function(e){return!o.includes(e)}));s[i]=a.map((function(e){return u.includes(e)?{id:e,exists:!1}:{id:e,exists:!0}}))})),s},this.getIdsByType=function(e,n,r){var s=i.ID_TYPES[r],a=i.ID_TYPES[n],o={};return Object.keys(e).forEach((function(n){var r=e[n],i=[];t.getData().football.ids.forEach((function(e){r.forEach((function(t,r){t===e[a]&&n===e.resource&&(i[r]=e[s])}))})),o[n]=i})),o},this.addIdMapping=function(e){var n=t.getData();n.football.ids.push(e),t.setData(n)},this.addIdMappings=function(e){var n=t.getData(),i=n.football.ids;i=r(r([],i,!0),e,!0),n.football.ids=i,t.setData(n)},this.setOwnProfile=function(e){var n=t.getData();n.profile.own=e,n.profile.expireAt=Math.floor(Date.now()/1e3)+t.exparationTimeout,t.setData(n)},this.getOwnProfile=function(){return t.getData().profile.own},this.getProfileCountries=function(){return t.getData().profile.countries},this.setProfileCountries=function(e){var n=t.getData();n.profile.countries=e,t.setData(n)},this.getFootballCountries=function(){return t.getData().football.countries},this.setFootballCountries=function(e){var n=t.getData();n.football.countries=e,t.setData(n)},this.getCompetitions=function(e){var n=t.getData();return e?e.competitionSearchFilter(n.football.competitions):n.football.competitions},this.setCompetitions=function(e){var n,r=t.getData();(n=r.football.competitions).push.apply(n,e),t.setData(r)},this.getExparationProfile=function(){return t.getData().profile.expireAt},this.getData=function(){return JSON.parse(localStorage.getItem(s))},this.setData=function(e){localStorage.setItem(s,JSON.stringify(e))},this.idSchema=e.idSchema,void 0!==this.getData()&&null!==this.getData()||this.setData(a)}},8872:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8902);t.default=function(){this.pagination=new r.default}},8902:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.nextPageStartsAfter=null,this.itemsPerPage=null}},1553:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8872);t.default=function(){this.meta=new r.default,this.data=[]}},3623:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8872);t.default=function(){this.remapMetaData=function(e){var t=new r.default;return t.pagination.nextPageStartsAfter=e.pagination.next_page_starts_after,t.pagination.itemsPerPage=e.pagination.items_per_page,t}}},7686:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(9669),a=n(712);t.default=function(e){var t=this;this.instance=null,this.apiSignInUrl="",this.getConfig=function(){return r(t,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.instance.get(""+this.apiSignInUrl)];case 1:return[2,t.sent().data.data];case 2:throw e=t.sent(),console.warn("There was a problem fetching configuration from Client API",e),e.response;case 3:return[2]}}))}))};var n=(0,a.setBaseUrl)(e.environment,"client");this.apiSignInUrl="/clients/"+e.clientId+"/features?key="+e.apiKey,this.instance=s.default.create({baseURL:n,headers:{"Content-Type":"application/json"}})}},595:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(9669),a=n(712),o=n(3430),u=n(7316),c=n(8758),l=n(5827),h=n(7821),d=n(5284),p=n(9330),f=n(4729),m=n(5157),v=n(7943),y=n(7287),g=n(753),w=n(1925);t.default=function(e){var t=this;this.instance=null,this.apiSignInUrl="",this.idSchema="",this.limitIds=200,this.countryRemapper=null,this.competitionBasicRemapper=null,this.competitionFullRemapper=null,this.teamBasicRemapper=null,this.teamFullRemapper=null,this.matchBasicRemapper=null,this.matchFullRemapper=null,this.playerBasicRemapper=null,this.playerFullRemapper=null,this.topPlayerRemapper=null,this.searchRemapper=null,this.footballMetaRemapper=null,this.getCountries=function(){return r(t,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.instance.get("/countries"+this.apiSignInUrl)];case 1:return e=n.sent(),[2,this.countryRemapper.countriesFromResponse(e.data.data)];case 2:throw t=n.sent(),console.warn("There was a problem with the football countries request",t),t;case 3:return[2]}}))}))},this.getCompetitions=function(e){return r(t,void 0,void 0,(function(){var t,n,r,s,o,u,c,l,h=this;return i(this,(function(i){switch(i.label){case 0:if(i.trys.push([0,11,,12]),t={},!(e&&e.competitionIds&&e.competitionIds.length>this.limitIds-1))return[3,5];n=[],r=(0,a.limitIds)(e.competitionIds),s=0,o=r,i.label=1;case 1:return s<o.length?(u=o[s],e.competitionIds=u,[4,this.instance.get("/competitions"+this.apiSignInUrl+e.constructFilterUrl())]):[3,4];case 2:t=i.sent(),n.push(t.data.data.map((function(e){return h.competitionBasicRemapper.fromResponse(e)}))),i.label=3;case 3:return s++,[3,1];case 4:return[2,Array.prototype.concat.apply([],n)];case 5:return e?[4,this.instance.get("/competitions"+this.apiSignInUrl+e.constructFilterUrl())]:[3,7];case 6:return c=i.sent(),[3,9];case 7:return[4,this.instance.get("/competitions"+this.apiSignInUrl)];case 8:c=i.sent(),i.label=9;case 9:return[2,(t=c).data.data.map((function(e){return h.competitionBasicRemapper.fromResponse(e)}))];case 10:return[3,12];case 11:throw l=i.sent(),console.warn("There was a problem with getCompetitions request",l),l.response;case 12:return[2]}}))}))},this.getCompetitionById=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/competitions/"+e+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.competitionFullRemapper.fromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem with getCompetitionById request",n),n.response;case 3:return[2]}}))}))},this.getTopCompetitions=function(){return r(t,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.instance.get("/competitions/top"+this.apiSignInUrl)];case 1:return[2,n.sent().data.data.map((function(e){return t.competitionBasicRemapper.fromResponse(e)}))];case 2:throw e=n.sent(),console.warn("There was a problem with getTopCompetitions request",e),e.response;case 3:return[2]}}))}))},this.getTeams=function(e){return r(t,void 0,void 0,(function(){var t,n,r,s,o,u,c,l,h,d=this;return i(this,(function(i){switch(i.label){case 0:if(i.trys.push([0,11,,12]),t={},!(e&&e.teamIds&&e.teamIds.length>this.limitIds))return[3,5];n=[],r=(0,a.limitIds)(e.teamIds),s=0,o=r,i.label=1;case 1:return s<o.length?(u=o[s],e.teamIds=u,[4,this.instance.get("/teams"+this.apiSignInUrl+e.constructFilterUrl())]):[3,4];case 2:t=i.sent(),n.push(t.data.data.map((function(e){return d.teamBasicRemapper.fromResponse(e)}))),i.label=3;case 3:return s++,[3,1];case 4:return[2,Array.prototype.concat.apply([],n)];case 5:return c=new g.default,e?[4,this.instance.get("/teams"+this.apiSignInUrl+e.constructFilterUrl())]:[3,7];case 6:return l=i.sent(),[3,9];case 7:return[4,this.instance.get("/teams"+this.apiSignInUrl)];case 8:l=i.sent(),i.label=9;case 9:return t=l,c.meta=this.footballMetaRemapper.remapMetaProp(t.data.meta),c.data=t.data.data.map((function(e){return d.teamBasicRemapper.fromResponse(e)})),[2,c];case 10:return[3,12];case 11:throw h=i.sent(),console.warn("There was a problem with getTeams request",h),h.response;case 12:return[2]}}))}))},this.getTeamById=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/teams/"+e+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.teamFullRemapper.fromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem with getTeamById request",n),n.response;case 3:return[2]}}))}))},this.getTopTeams=function(){return r(t,void 0,void 0,(function(){var e,t,n=this;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/teams/top"+this.apiSignInUrl)];case 1:return[2,(e=r.sent()).data.data?e.data.data.map((function(e){return n.teamBasicRemapper.fromResponse(e)})):[]];case 2:throw t=r.sent(),console.warn("There was a problem with getTopTeams request",t),t.response;case 3:return[2]}}))}))},this.getNextMatchForTeam=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/teams/"+e+"/next-match"+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.matchFullRemapper.fromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem with getNextMatchForTeam request",n),n.response;case 3:return[2]}}))}))},this.getPrevMatchForTeam=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/teams/"+e+"/previous-match"+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.matchFullRemapper.fromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem with getPrevMatchForTeam request",n),n.response;case 3:return[2]}}))}))},this.getPlayers=function(e){return r(t,void 0,void 0,(function(){var t,n,r,s,o,u,c,l,h,d,p=this;return i(this,(function(i){switch(i.label){case 0:if(i.trys.push([0,11,,12]),t={},!(e&&e.playerIds&&e.playerIds.length>this.limitIds-1))return[3,5];n=[],r=(0,a.limitIds)(e.playerIds),s=0,o=r,i.label=1;case 1:return s<o.length?(u=o[s],e.playerIds=u,[4,this.instance.get("/players"+this.apiSignInUrl+e.constructFilterUrl())]):[3,4];case 2:t=i.sent(),n.push(t.data.data.map((function(e){return p.teamBasicRemapper.fromResponse(e)}))),i.label=3;case 3:return s++,[3,1];case 4:return[2,Array.prototype.concat.apply([],n)];case 5:return c=new g.default,e?[4,this.instance.get("/players"+this.apiSignInUrl+e.constructFilterUrl())]:[3,7];case 6:return h=i.sent(),[3,9];case 7:return[4,this.instance.get("/players"+this.apiSignInUrl)];case 8:h=i.sent(),i.label=9;case 9:return l=h,c.meta=this.footballMetaRemapper.remapMetaProp(l.data.meta),c.data=l.data.data.map((function(e){return p.playerBasicRemapper.fromResponse(e)})),[2,c];case 10:return[3,12];case 11:throw d=i.sent(),console.warn("There was a problem with getPlayers request",d),d.response;case 12:return[2]}}))}))},this.getPlayerById=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/players/"+e+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.playerFullRemapper.fromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem with getPlayerById request",n),n.response;case 3:return[2]}}))}))},this.getTopPlayers=function(){return r(t,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.instance.get("/players/top"+this.apiSignInUrl)];case 1:return[2,n.sent().data.data.map((function(e){return t.topPlayerRemapper.fromResponse(e)}))];case 2:throw e=n.sent(),console.warn("There was a problem with getTopPlayers request",e),e.response;case 3:return[2]}}))}))},this.getNextMatchForPlayer=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/players/"+e+"/next-match"+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.matchFullRemapper.fromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem with getNextMatchForPlayer request",n),n.response;case 3:return[2]}}))}))},this.getPrevMatchForPlayer=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/players/"+e+"/previous-match"+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.matchFullRemapper.fromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem with getPrevMatchForPlayer request",n),n.response;case 3:return[2]}}))}))},this.getMatchById=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/matches/"+e+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.matchFullRemapper.fromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem with getMatchById request",n),n.response;case 3:return[2]}}))}))},this.getMatches=function(e){return r(t,void 0,void 0,(function(){var t,n,r,s,a=this;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,5,,6]),t=new g.default,e?[4,this.instance.get("/matches"+this.apiSignInUrl+e.constructFilterUrl())]:[3,2];case 1:return r=i.sent(),[3,4];case 2:return[4,this.instance.get("/matches"+this.apiSignInUrl)];case 3:r=i.sent(),i.label=4;case 4:return n=r,t.meta=this.footballMetaRemapper.remapMetaProp(n.data.meta),t.data=n.data.data.map((function(e){return a.matchBasicRemapper.fromResponse(e)})),[2,t];case 5:throw s=i.sent(),console.warn("There was a problem with getMatches request",s),s.response;case 6:return[2]}}))}))},this.search=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/search"+this.apiSignInUrl+e.constructFilterUrl())];case 1:return t=r.sent(),[2,this.searchRemapper.fromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem with search request",n),n.response;case 3:return[2]}}))}))};var n=(0,a.setBaseUrl)(e.environment,"football");this.apiSignInUrl="?key="+e.apiKey+"&lang="+e.lang+"&client_id="+e.clientId,this.idSchema=e.idSchema,this.instance=s.default.create({baseURL:n}),this.countryRemapper=new o.default,this.competitionBasicRemapper=new u.default,this.competitionFullRemapper=new c.default,this.teamBasicRemapper=new l.default,this.teamFullRemapper=new h.default,this.matchBasicRemapper=new d.default,this.matchFullRemapper=new p.default,this.playerBasicRemapper=new m.default,this.playerFullRemapper=new v.default,this.topPlayerRemapper=new f.default,this.searchRemapper=new y.default,this.footballMetaRemapper=new w.default}},8539:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(9669),a=n(712),o={player:"players",team:"teams",homeTeam:"teams",awayTeam:"teams",country:"countries",competition:"competitions",match:"matches"};t.default=function(e){var t=this;this.instance=null,this.apiSignInUrl="",this.getEntityById=function(n,r){try{return t.instance.get("/football"+t.apiSignInUrl+"&input_provider="+e.idSchema+"&"+o[n]+"="+r)}catch(e){throw console.warn("There was a problem with id mapping request for the following id:"+r,e),e.response}},this.getEntityByIdAndSchema=function(e,n,r){try{return t.instance.get("/football"+t.apiSignInUrl+"&input_provider="+r+"&"+o[e]+"="+n)}catch(e){throw console.warn("There was a problem with id mapping request for the following id:"+n,e),e.response}},this.getEntityIdsByIdsAndSchema=function(e,n,r){try{return t.instance.get("/football"+t.apiSignInUrl+"&input_provider="+r+"&"+o[e]+"="+n.join(","))}catch(e){throw console.warn("There was a problem with id mapping request for the following ids:"+n.join(","),e),e.response}},this.getEntitiesByIds=function(e,n,r){n.sort((function(e,t){return e.localeCompare(t)}));var i=(0,a.requestChunkBuild)(n).map((function(n){try{return t.instance.get("/football"+t.apiSignInUrl+"&input_provider="+r+"&"+o[e]+"="+n.join(","))}catch(e){throw console.warn("There was a problem with id mapping request for the following ids:"+n.join(","),e),e.response}}));return Promise.all(i).then((function(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.data.data)})),t}))},this.getEntitiesByIdObjs=function(e,n){return r(t,void 0,void 0,(function(){var t,r,s,u,c,l,h,d,p,f;return i(this,(function(m){switch(m.label){case 0:t=[],r={},s=[],Object.keys(e).forEach((function(n){t.push.apply(t,e[n])})),u=(0,a.transformIdsToBeUnique)(t),c=(0,a.requestChunkBuild)(u),l=function(t){var a,u,c;return i(this,(function(i){switch(i.label){case 0:if(a="",Object.keys(e).forEach((function(n){r[n]=[];var i=t.filter((function(t){return e[n].includes(t)}));i&&i.length>0&&(r[n]=i)})),Object.keys(r).forEach((function(e){r[e].length>0&&(r[e].sort((function(e,t){return e.localeCompare(t)})),a+="&",a+=o[e]+"="+r[e].join(","))})),!(a&&a.length>0))return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,h.instance.get("/football"+h.apiSignInUrl+"&input_provider="+(n||"native")+a)];case 2:return u=i.sent(),s.push(u.data.data),[3,4];case 3:throw c=i.sent(),console.warn("There was a problem with id mapping request",c),c.response;case 4:return[3,6];case 5:s.push([]),i.label=6;case 6:return[2]}}))},h=this,d=0,p=c,m.label=1;case 1:return d<p.length?(f=p[d],[5,l(f)]):[3,4];case 2:m.sent(),m.label=3;case 3:return d++,[3,1];case 4:return[2,Array.prototype.concat.apply([],s)]}}))}))};var n=(0,a.setBaseUrl)(e.environment,"idMapping");this.apiSignInUrl="?key="+e.apiKey+"&client_id="+e.clientId,this.instance=s.default.create({baseURL:n})}},2793:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(9669),a=n(2726),o=n(9679),u=n(712),c=n(4780),l=n(1553),h=n(3623);t.default=function(e,t){var n=this;this.instanceAuth=null,this.instance=null,this.apiSignInUrl=null,this.clientApiSignInUrl=null,this.predictionRemapper=null,this.matchSummaryRemapper=null,this.gamesRemapper=null,this.metaRemapper=null,this.makeFootballPrediction=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t=this.predictionRemapper.remapRequestBody(e),[4,this.instanceAuth.post("/predictions"+this.apiSignInUrl,JSON.stringify(t))];case 1:return n=i.sent(),[4,this.predictionRemapper.remapResponseObjBody(n.data)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem making POST request: ",r),r.response;case 4:return[2]}}))}))},this.getMatchSummary=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/predictions/summary/"+e+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.matchSummaryRemapper.remapResponse(t.data)];case 2:throw n=r.sent(),console.warn("There was a problem fetching predictions for match: "+e+" ",n),n.response;case 3:return[2]}}))}))},this.deleteFootballPrediction=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.instanceAuth.delete("/predictions/"+e+this.apiSignInUrl)];case 1:return n.sent(),[2,!0];case 2:throw t=n.sent(),console.warn("There was a problem deleting your prediction: "+e,t),t.response;case 3:return[2]}}))}))},this.getMyPredictions=function(e){return r(n,void 0,void 0,(function(){var t,n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,6,,7]),t=new l.default,e?[4,this.instanceAuth.get("/predictions"+this.apiSignInUrl+e.constructFilterUrl())]:[3,2];case 1:return r=i.sent(),[3,4];case 2:return[4,this.instanceAuth.get("/predictions"+this.apiSignInUrl)];case 3:r=i.sent(),i.label=4;case 4:return n=r,t.meta=this.metaRemapper.remapMetaData(n.data.meta),s=t,[4,this.predictionRemapper.remapResponseArrayBody(n.data.data)];case 5:return s.data=i.sent(),[2,t];case 6:throw a=i.sent(),console.warn("There was a problem fetching own predictions",a),a.response;case 7:return[2]}}))}))},this.getMyPredictionsNoRemap=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.instanceAuth.get("/predictions"+this.apiSignInUrl+e.constructFilterUrl())];case 1:return[2,n.sent().data.data];case 2:throw t=n.sent(),console.warn("There was a problem fetching own predictions",t),t.response;case 3:return[2]}}))}))},this.getUserPredictions=function(e,t){return r(n,void 0,void 0,(function(){var n,r,s,a,o;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,6,,7]),n=new l.default,t?[4,this.instance.get("/predictions/users/"+e+this.apiSignInUrl+t.constructFilterUrl())]:[3,2];case 1:return s=i.sent(),[3,4];case 2:return[4,this.instance.get("/predictions/users/"+e+this.apiSignInUrl)];case 3:s=i.sent(),i.label=4;case 4:return r=s,n.meta=this.metaRemapper.remapMetaData(r.data.meta),a=n,[4,this.predictionRemapper.remapResponseArrayBody(r.data.data)];case 5:return a.data=i.sent(),[2,n];case 6:throw o=i.sent(),console.warn("There was a problem fetching predictions for user: "+e,o),o.response;case 7:return[2]}}))}))},this.getUserPredictionsNoRemap=function(e,t){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/predictions/users/"+e+this.apiSignInUrl+t.constructFilterUrl())];case 1:return[2,r.sent().data.data];case 2:throw n=r.sent(),console.warn("There was a problem fetching predictions for user: "+e,n),n.response;case 3:return[2]}}))}))},this.getGames=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/games/"+this.apiSignInUrl+e.constructFiltersUrl())];case 1:return t=r.sent(),[2,this.gamesRemapper.remapPaginatedGames(t.data)];case 2:throw n=r.sent(),console.warn("There was a problem fetching the games list",n),n.response;case 3:return[2]}}))}))},this.getGameById=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/games/"+e+this.apiSignInUrl)];case 1:return t=r.sent(),[2,this.gamesRemapper.remapGamesListResponse(t.data)];case 2:throw n=r.sent(),console.warn("There was a problem fetching the following game: "+e,n),n.response;case 3:return[2]}}))}))},this.getUserGameEditions=function(e){return r(n,void 0,void 0,(function(){var t,n,r,s=this;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),t=null,[4,this.instance.get("/games/"+this.apiSignInUrl+e.constructFiltersUrl())];case 1:return(n=i.sent()).data.data.forEach((function(e){"TOP_X"===e.type?t=s.gamesRemapper.remapPaginatedUserTopXEditions(n.data):"MATCH_QUIZ"===e.type&&(t=s.gamesRemapper.remapPaginatedUserMathQuizEditions(n.data))})),[2,t];case 2:throw r=i.sent(),console.warn("There was a problem fetching the games list",r),r.response;case 3:return[2]}}))}))},this.getGameResults=function(e,t){return r(n,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,5,,6]),t?[4,this.instance.get("/games/"+e+"/results/"+this.apiSignInUrl+t.constructFiltersUrl())]:[3,2];case 1:return r=i.sent(),[3,4];case 2:return[4,this.instance.get("/games/"+e+"/results/"+this.apiSignInUrl)];case 3:r=i.sent(),i.label=4;case 4:return n=r,[2,this.gamesRemapper.remapPaginatedGameResults(n.data)];case 5:throw s=i.sent(),console.warn("There was a problem fetching the results for the following game: "+e,s),s.response;case 6:return[2]}}))}))};var d=(0,u.setBaseUrl)(e.environment,"predictor");this.apiSignInUrl="?key="+e.apiKey+"&client_id="+e.clientId,this.predictionRemapper=new a.default(e,t),this.matchSummaryRemapper=new o.default(e,t),this.gamesRemapper=new c.default,this.metaRemapper=new h.default,this.instanceAuth=s.default.create({baseURL:d,headers:{Authorization:"Bearer "+e.authProvider.getIdToken(),"Content-Type":"application/json"}}),this.instance=s.default.create({baseURL:d,headers:{"Content-Type":"application/json"}})}},4275:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(9669),a=n(712),o=n(441),u=n(8673),c=n(6277),l=n(1712);t.default=function(e){var t=this;this.instanceAuth=null,this.instance=null,this.apiSignInUrl=null,this.profileRemapper=null,this.followingRemapper=null,this.followersRemapper=null,this.getCountries=function(){return r(t,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.instance.get("/countries"+this.apiSignInUrl)];case 1:return[2,t.sent().data.data];case 2:throw e=t.sent(),console.warn("There was a problem fetching the countries:",e),e.response;case 3:return[2]}}))}))},this.getProfile=function(e){return r(t,void 0,void 0,(function(){var t,n,r,s;return i(this,(function(i){switch(i.label){case 0:if(t="/profile"+this.apiSignInUrl,!e)return[3,5];t="/profiles/"+e+this.apiSignInUrl,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.instance.get(t)];case 2:return r=i.sent(),[2,this.profileRemapper.fullProfileFromResponse(r.data.data)];case 3:throw n=i.sent(),console.warn("There was a problem fetching the following profile: "+e,n),n.response;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.instanceAuth.get(t)];case 6:return r=i.sent(),[2,this.profileRemapper.fullProfileFromResponse(r.data.data)];case 7:throw s=i.sent(),console.warn("There was a problem fetching your profile from API:",s),s.response;case 8:return[2]}}))}))},this.getProfiles=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get("/profiles"+this.apiSignInUrl+"&profile_ids="+e.join(","))];case 1:return t=r.sent(),[2,this.profileRemapper.profilesFromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem fetching the following profiles: "+e.join(","),n),n.response;case 3:return[2]}}))}))},this.getFollowers=function(e,n){return r(t,void 0,void 0,(function(){var t,r,s,a,o;return i(this,(function(i){switch(i.label){case 0:if(t="/profile/followers"+this.apiSignInUrl,!e||n)return[3,5];t="/profile/followers"+this.apiSignInUrl+e.constructFilterUrl(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.instanceAuth.get(t)];case 2:return a=i.sent(),[2,this.followersRemapper.followersFromResponse(a.data)];case 3:throw r=i.sent(),console.warn("There was a problem fetching the followers for own profile",r),r.response;case 4:return[3,9];case 5:if(e||n)return[3,9];i.label=6;case 6:return i.trys.push([6,8,,9]),[4,this.instanceAuth.get(t)];case 7:return a=i.sent(),[2,this.followersRemapper.followersFromResponse(a.data)];case 8:throw s=i.sent(),console.warn("There was a problem fetching the followers for own profile",s),s.response;case 9:e&&n?t="/profile/"+n+"/followers"+this.apiSignInUrl+e.constructFilterUrl():!e&&n&&(t="/profile/"+n+"/followers"+this.apiSignInUrl),i.label=10;case 10:return i.trys.push([10,12,,13]),[4,this.instance.get(t)];case 11:return a=i.sent(),[2,this.followersRemapper.followersFromResponse(a.data)];case 12:throw o=i.sent(),console.warn("There was a problem fetching the followers for profile: "+n,o),o.response;case 13:return[2]}}))}))},this.getFollowing=function(e,n){return r(t,void 0,void 0,(function(){var t,r,s,a,o;return i(this,(function(i){switch(i.label){case 0:if(t="/profile/following"+this.apiSignInUrl,!e||n)return[3,5];t="/profile/following"+this.apiSignInUrl+e.constructFilterUrl(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.instanceAuth.get(t)];case 2:return a=i.sent(),[2,this.followingRemapper.followingFromResponse(a.data)];case 3:throw r=i.sent(),console.warn("There was a problem fetching the followers of own profile",r),r.response;case 4:return[3,9];case 5:if(e||n)return[3,9];i.label=6;case 6:return i.trys.push([6,8,,9]),[4,this.instanceAuth.get(t)];case 7:return a=i.sent(),[2,this.followingRemapper.followingFromResponse(a.data)];case 8:throw s=i.sent(),console.warn("There was a problem fetching the followers of own profile",s),s.response;case 9:e&&n?t="/profile/"+n+"/following"+this.apiSignInUrl+e.constructFilterUrl():!e&&n&&(t="/profile/"+n+"/following"+this.apiSignInUrl),i.label=10;case 10:return i.trys.push([10,12,,13]),[4,this.instance.get(t)];case 11:return a=i.sent(),[2,this.followingRemapper.followingFromResponse(a.data)];case 12:throw o=i.sent(),console.warn("There was a problem fetching the followers of the following profile: "+n,o),o.response;case 13:return[2]}}))}))},this.follow=function(e){return r(t,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:(t=new l.default).profile_ids=e,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.instanceAuth.post("/profile/follow"+this.apiSignInUrl,JSON.stringify(t))];case 2:return n=i.sent(),[2,this.followingRemapper.followResponse(n.data.data)];case 3:throw r=i.sent(),console.warn("There was a problem with POST request for profiles: "+e.join(",")+" ",r),r.response;case 4:return[2]}}))}))},this.unfollow=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:(t=new l.default).profile_ids=e,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.instanceAuth.delete("/profile/follow"+this.apiSignInUrl,{data:JSON.stringify(t)})];case 2:return r.sent(),[2,!0];case 3:throw n=r.sent(),console.warn("There was a problem with DELETE request for profiles: "+e.join(",")+" ",n),n.response;case 4:return[2]}}))}))},this.updateProfile=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instanceAuth.patch("/profile"+this.apiSignInUrl,e)];case 1:return t=r.sent(),[2,this.profileRemapper.fullProfileFromResponse(t.data.data)];case 2:throw n=r.sent(),console.warn("There was a problem updating the own profile:",n),n.response;case 3:return[2]}}))}))};var n=(0,a.setBaseUrl)(e.environment,"profile");this.apiSignInUrl="?key="+e.apiKey+"&client_id="+e.clientId+"&lang="+e.lang,this.instanceAuth=s.default.create({baseURL:n,headers:{Authorization:"Bearer "+e.authProvider.getIdToken(),"Content-Type":"application/json"}}),this.instanceAuth.interceptors.request.use((function(e){return e}),(function(e){Promise.reject(e)})),this.instanceAuth.interceptors.response.use((function(e){return e}),(function(n){var r=n.config;if((403===n.response.status||401===n.response.status)&&!r._retry){r._retry=!0;var i=e.authProvider.getIdToken();return r.headers.Authorization="Bearer "+i,t.instanceAuth(r)}return Promise.reject(n)})),this.instance=s.default.create({baseURL:n,headers:{"Content-Type":"application/json"}}),this.profileRemapper=new o.default,this.followingRemapper=new u.default,this.followersRemapper=new c.default}},5792:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(5601),a=n(8539),o=n(1260);t.default=function(e){var t=this;this.isBrowser=!1,this.localStorage=null,this.https=null,this.getEntitiesByIds=function(e,n,s){return r(t,void 0,void 0,(function(){var t,r,a,u,c,l;return i(this,(function(i){switch(i.label){case 0:if(!this.isBrowser)return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),t=this.localStorage.checkForExistingIdObjs(e,n),r=this.splitForRequestAndExisting(t),[4,this.https.getEntitiesByIdObjs(r.request,n)];case 2:return a=i.sent(),this.localStorage.addIdMappings(a),[2,this.localStorage.getIdsByType(e,n,s)];case 3:return u=i.sent(),console.warn("There was a problem retrieving the entity ids ",u),[2,Promise.resolve([])];case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.https.getEntitiesByIdObjs(e,n)];case 6:return c=i.sent(),Object.keys(e).forEach((function(t){e[t]=c.filter((function(e){return e.resource===t})).map((function(e){return e[o.ID_TYPES[s]]}))})),[2,e];case 7:return l=i.sent(),console.warn("There was a problem retrieving the entity ids ",l),[2,Promise.resolve([])];case 8:return[2]}}))}))},this.getEntityById=function(e,n,s){return r(t,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(t=this.localStorage.getEntity(e,n,s))?[2,t]:[3,1]:[3,4];case 1:case 4:return[4,this.requestEntity(e,n,s)];case 2:return r=i.sent(),this.localStorage.addIdMappings(r),[2,r];case 3:return[3,6];case 5:return[2,i.sent()];case 6:return[2]}}))}))},this.splitForRequestAndExisting=function(e){var t={},n={};return Object.keys(e).forEach((function(r){t[r]=e[r].filter((function(e){return!e.exists})).map((function(e){return e.id})),n[r]=e[r].filter((function(e){return e.exists})).map((function(e){return e.id}))})),{existing:n,request:t}},this.requestEntity=function(e,n,s){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=Array.isArray(e)?e:[e],[4,this.https.getEntitiesByIds(n,e,s)];case 1:return[2,r.sent()];case 2:return t=r.sent(),console.warn("There was a problem retrieving the requested entity: "+t),[2,null];case 3:return[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=new s.default(e),this.https=new a.default(e)}},8900:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(4946),a=n(5792),o=n(7611),u=n(9052);t.default=function(e){var t=this;this.idSchema="",this.idMappingFacade=null,this.getEntityIdBySchemaId=function(e,n){return t.idMappingFacade.getEntityById(e,n,t.idSchema)},this.remapEntities=function(e,n){return r(t,void 0,void 0,(function(){var t,r,a;return i(this,(function(i){t=JSON.parse(JSON.stringify(e));try{return this.idSchema!==s.IdSchemaEnum.NATIVE?(r=new o.default,a=r.traverse(t,n),[2,this.idMappingFacade.getEntitiesByIds(a,"native",this.idSchema).then((function(e){return(new u.default).traverse(t,n,e)}))]):[2,e]}catch(e){return console.warn("There was a problem remapping entity: "+n+" with inner entity ",e),[2,[]]}return[2]}))}))},this.getEntityIdsBySchemaId=function(e,n,a){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return(t={})[n]=e,this.idSchema===s.IdSchemaEnum.NATIVE?[3,2]:[4,this.idMappingFacade.getEntitiesByIds(t,this.idSchema,a)];case 1:return[2,r.sent()];case 2:return[2,t]}}))}))},this.idSchema=e.idSchema,this.idMappingFacade=new a.default(e)}},3845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.typeConvert=void 0,t.typeConvert=function(e){switch(e){case"competitions":return"competition";case"players":case"relatedPlayer":case"squad":return"player";case"teams":case"participants":case"homeTeam":case"awayTeam":case"timeline":case"teamId":return"team";default:return e}}},7611:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3845);t.default=function(){var e=this;this.extractedObjIds={},this.traverse=function(t,n){return n=(0,r.typeConvert)(n),Array.isArray(t)?e.traverseArrExtract(t,n):t&&"object"==typeof t&&e.traverseObjExtract(t,n),e.extractedObjIds},this.traverseArrExtract=function(t,n){t&&t.length>0&&t.forEach((function(t){e.traverseObjExtract(t,n)}))},this.traverseObjExtract=function(t,n){t&&Object.keys(t).length>0&&Object.keys(t).forEach((function(r){var i=t[r];"id"===r||"teamId"===r?(e.extractedObjIds.hasOwnProperty(n)||(e.extractedObjIds[n]=[]),e.extractedObjIds[n].push(i)):t[r]&&e.traverse(t[r],r)}))}}},9052:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3845);t.default=function(){var e=this;this.replaceObjIdsIndex=null,this.remappedIdsObj={},this.traverse=function(t,n,i){return n=(0,r.typeConvert)(n),null===e.replaceObjIdsIndex&&(e.initReplaceObjIdsIndex(i),e.remappedIdsObj=i),Array.isArray(t)?e.traverseArrReplace(t,n):t&&"object"==typeof t&&e.traverseObjReplace(t,n),t},this.initReplaceObjIdsIndex=function(t){e.replaceObjIdsIndex={},Object.keys(t).forEach((function(t){e.replaceObjIdsIndex[t]=0}))},this.traverseArrReplace=function(t,n){t&&t.length>0&&t.forEach((function(t){e.traverseObjReplace(t,n)}))},this.traverseObjReplace=function(t,n){t&&Object.keys(t).length>0&&Object.keys(t).forEach((function(r){"id"===r||"teamId"===r?(t[r]=e.remappedIdsObj[n][e.replaceObjIdsIndex[n]],e.replaceObjIdsIndex[n]=e.replaceObjIdsIndex[n]+1):t[r]&&e.traverse(t[r],r,e.remappedIdsObj)}))}}},7e3:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(2754);t.default=function(e,t,n){var a=this;this.isBrowser=!1,this.localStorage={},this.https=null,this.idMapping=null,this.getCompetitionsIdMapping=function(e){return r(a,void 0,void 0,(function(){var t,n,r,a,o;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,8,,9]),t=!1,e?(e=new s.default(e)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([""+e.countryId],"country","native")]:[3,2]:[3,5];case 1:0===(n=i.sent()).country.length&&(t=!0),e.countryId=n.country[0],i.label=2;case 2:return e.competitionIds?[4,this.idMapping.getEntityIdsBySchemaId(e.competitionIds,"competition","native")]:[3,4];case 3:0===(r=i.sent()).competition.length&&(t=!0),e.competitionIds=r.competition,i.label=4;case 4:if(t)return[2,[]];i.label=5;case 5:return[4,this.getCompetitions(e)];case 6:return a=i.sent(),[4,this.idMapping.remapEntities(a,"competition")];case 7:return[2,i.sent()];case 8:throw o=i.sent(),console.warn("There was a problem browsing all of the competitions",o),o;case 9:return[2]}}))}))},this.getCompetitions=function(e){return r(a,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(t=this.localStorage.getCompetitions(e))&&t.length>0?[2,t]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.https.getCompetitions(e)];case 2:return n=i.sent(),this.localStorage.setCompetitions(n),[2,this.localStorage.getCompetitions(e)];case 3:throw r=i.sent(),console.warn("There was a problem retrieving all competitions",r),r;case 4:return[3,6];case 5:return[2,this.https.getCompetitions(e)];case 6:return[2]}}))}))},this.getCompetitionByIdIdMapping=function(e){return r(a,void 0,void 0,(function(){var t,n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"competition","native")];case 1:return t=i.sent(),n=t.competition[0],[4,this.getCompetitionById(n)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"competition")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the following competition:"+e,s),s;case 5:return[2]}}))}))},this.getCompetitionById=function(e){return r(a,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getCompetitionById(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the competition with the following id: "+e,t),t;case 3:return[2]}}))}))},this.getTopCompetitionsIdMapping=function(){return r(a,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,this.getTopCompetitions()];case 1:return e=n.sent(),[4,this.idMapping.remapEntities(e,"competition")];case 2:return[2,n.sent()];case 3:throw t=n.sent(),console.warn("There was a problem browsing the top competitions",t),t;case 4:return[2]}}))}))},this.getTopCompetitions=function(){return r(a,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.https.getTopCompetitions()];case 1:return[2,t.sent()];case 2:throw e=t.sent(),console.warn("There was a problem retrieving the top competitions",e),e;case 3:return[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=e,this.idMapping=n,this.https=t}},8350:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t,i){var s=this;this.isBrowser=!1,this.localStorage={},this.https=null,this.idMapping=null,this.getCountriesWithIdMapping=function(){return n(s,void 0,void 0,(function(){var e,t;return r(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getCountries()];case 1:return e=n.sent(),[2,this.idMapping.remapEntities(e,"country")];case 2:throw t=n.sent(),console.warn("There was a problem browsing countries as football entities",t),t;case 3:return[2]}}))}))},this.getCountries=function(){return n(s,void 0,void 0,(function(){var e,t,n;return r(this,(function(r){switch(r.label){case 0:return this.isBrowser?(e=this.localStorage.getFootballCountries())&&e.length>0?[2,e]:[3,1]:[3,5];case 1:return r.trys.push([1,3,,4]),[4,this.https.getCountries()];case 2:return t=r.sent(),this.localStorage.setFootballCountries(t),[2,t];case 3:throw n=r.sent(),console.warn("There was a problem retrieving countries as football entities",n),n;case 4:return[3,6];case 5:return[2,this.https.getCountries()];case 6:return[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=e,this.idMapping=i,this.https=t}},4289:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(8350),a=n(7e3),o=n(9693),u=n(4272),c=n(4545),l=n(2140);t.default=function(e,t,n){var h=this;this.isBrowser=!1,this.localStorage={},this.https=null,this.idMapping=null,this.countriesFacade=null,this.competitionsFacade=null,this.teamsFacade=null,this.playerFacade=null,this.matchFacade=null,this.searchFacade=null,this.getCountries=function(){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.countriesFacade.getCountriesWithIdMapping()]}))}))},this.getCompetitions=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.competitionsFacade.getCompetitionsIdMapping(e)]}))}))},this.getCompetitionById=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.competitionsFacade.getCompetitionByIdIdMapping(e)]}))}))},this.getTopCompetitions=function(){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.competitionsFacade.getTopCompetitionsIdMapping()]}))}))},this.getTeams=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.teamsFacade.getTeamsIdMapping(e)]}))}))},this.getTeamById=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.teamsFacade.getTeamByIdIdMapping(e)]}))}))},this.getTopTeams=function(){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.teamsFacade.getTopTeamsIdMapping()]}))}))},this.getNextMatchForTeam=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.teamsFacade.getNextMatchForTeamIdMapping(e)]}))}))},this.getPrevMatchForTeam=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.teamsFacade.getPrevMatchForTeamIdMapping(e)]}))}))},this.getPlayers=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.playerFacade.getPlayersIdMapping(e)]}))}))},this.getPlayerById=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.playerFacade.getPlayerIdMapping(e)]}))}))},this.getTopPlayers=function(){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.playerFacade.getTopPlayersIdMapping()]}))}))},this.getNextMatchForPlayer=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.playerFacade.getNextMatchForPlayerIdMapping(e)]}))}))},this.getPrevMatchForPlayer=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.playerFacade.getPrevMatchForPlayerIdMapping(e)]}))}))},this.getMatches=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.matchFacade.getMatchesIdMapping(e)]}))}))},this.getMatchById=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.matchFacade.getMatchIdMapping(e)]}))}))},this.search=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.searchFacade.searchIdMapping(e)]}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=e,this.idMapping=n,this.https=t,this.countriesFacade=new s.default(e,t,n),this.competitionsFacade=new a.default(e,t,n),this.teamsFacade=new o.default(t,n),this.playerFacade=new u.default(t,n),this.matchFacade=new c.default(t,n),this.searchFacade=new l.default(t,n)}},4545:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(712),a=n(6134);t.default=function(e,t){var n=this;this.https=null,this.idMapping=null,this.getMatchesIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r,s,o,u,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,11,,12]),e?(e=new a.default(e)).countryIds?[4,this.idMapping.getEntityIdsBySchemaId(e.countryIds,"country","native")]:[3,2]:[3,8];case 1:t=i.sent(),e.countryIds=t.country,i.label=2;case 2:return e.competitionIds?[4,this.idMapping.getEntityIdsBySchemaId(e.competitionIds,"competition","native")]:[3,4];case 3:n=i.sent(),e.competitionIds=n.competition,i.label=4;case 4:return e.matchIds?[4,this.idMapping.getEntityIdsBySchemaId(e.matchIds,"match","native")]:[3,6];case 5:r=i.sent(),e.matchIds=r.match,i.label=6;case 6:return e.teamIds?[4,this.idMapping.getEntityIdsBySchemaId(e.teamIds,"team","native")]:[3,8];case 7:s=i.sent(),e.teamIds=s.team,i.label=8;case 8:return[4,this.getMatches(e)];case 9:return o=i.sent(),u=o,[4,this.idMapping.remapEntities(o.data,"match")];case 10:return u.data=i.sent(),[2,o];case 11:throw c=i.sent(),console.warn("There was a problem browsing the matches",c),c;case 12:return[2]}}))}))},this.getMatchesWithNativeIds=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=new a.default({matchIds:e}),[4,this.getMatches(t)];case 1:return(n=r.sent()).data.sort((function(e,t){return e.id.localeCompare(t.id)})),[4,this.idMapping.remapEntities(n.data,"match")];case 2:return[2,r.sent()]}}))}))},this.getMatchesMapWithNativeIds=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return t={},(n=(0,s.transformIdsToBeUnique)(e)).sort((function(e,t){return e.localeCompare(t)})),[4,this.getMatchesWithNativeIds(n)];case 1:return r=i.sent(),n.forEach((function(e,n){return t[e]=r[n]})),[2,t]}}))}))},this.getMatches=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getMatches(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the matches",t),t;case 3:return[2]}}))}))},this.getMatchIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"match","native")];case 1:return t=i.sent(),[4,this.getMatchById(t.match[0])];case 2:return n=i.sent(),[4,this.idMapping.remapEntities(n,"match")];case 3:return[2,i.sent()];case 4:throw r=i.sent(),console.warn("There was a problem browsing the following match: "+e,r),r;case 5:return[2]}}))}))},this.getMatchById=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getMatchById(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the following match: "+e,t),t;case 3:return[2]}}))}))},this.https=e,this.idMapping=t}},4272:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(6477),a=n(712);t.default=function(e,t){var n=this;this.https=null,this.idMapping=null,this.getPlayersIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r,a,o,u,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,10,,11]),t=!1,e?(e=new s.default(e)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([e.countryId],"country","native")]:[3,2]:[3,7];case 1:0===(n=i.sent()).country.length&&(t=!0),e.countryId=n.country[0],i.label=2;case 2:return e.playerIds?[4,this.idMapping.getEntityIdsBySchemaId(e.playerIds,"player","native")]:[3,4];case 3:0===(r=i.sent()).player.length&&(t=!0),e.playerIds=r.player,i.label=4;case 4:return e.scope?[4,this.idMapping.getEntityIdsBySchemaId(e.scope,"competition","native")]:[3,6];case 5:0===(a=i.sent()).competition.length&&(t=!0),e.scope=a.competition,i.label=6;case 6:if(t)return[2,[]];i.label=7;case 7:return[4,this.getPlayers(e)];case 8:return o=i.sent(),u=o,[4,this.idMapping.remapEntities(o.data,"player")];case 9:return u.data=i.sent(),[2,o];case 10:throw c=i.sent(),console.warn("There was a problem browsing the players",c),c;case 11:return[2]}}))}))},this.getPlayersWithNativeIds=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=new s.default({playerIds:e}),[4,this.getPlayers(t)];case 1:return(n=r.sent()).data.sort((function(e,t){return e.id.localeCompare(t.id)})),[4,this.idMapping.remapEntities(n.data,"player")];case 2:return[2,r.sent()]}}))}))},this.getPlayersMapWithNativeIds=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return t={},(n=(0,a.transformIdsToBeUnique)(e)).sort((function(e,t){return e.localeCompare(t)})),[4,this.getPlayersWithNativeIds(n)];case 1:return r=i.sent(),n.forEach((function(e,n){return t[e]=r[n]})),[2,t]}}))}))},this.getPlayers=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getPlayers(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the players",t),t;case 3:return[2]}}))}))},this.getPlayerIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"player","native")];case 1:return t=i.sent(),[4,this.getPlayerById(t.player[0])];case 2:return n=i.sent(),[4,this.idMapping.remapEntities(n,"player")];case 3:return[2,i.sent()];case 4:throw r=i.sent(),console.warn("There was a problem browsing the following player:"+e,r),r;case 5:return[2]}}))}))},this.getPlayerById=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getPlayerById(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the following player: "+e,t),t;case 3:return[2]}}))}))},this.getTopPlayersIdMapping=function(){return r(n,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,this.getTopPlayers()];case 1:return e=n.sent(),[4,this.idMapping.remapEntities(e,"player")];case 2:return[2,n.sent()];case 3:throw t=n.sent(),console.warn("There was a problem browsing the top players",t),t;case 4:return[2]}}))}))},this.getTopPlayers=function(){return r(n,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.https.getTopPlayers()];case 1:return[2,t.sent()];case 2:throw e=t.sent(),console.warn("There was a problem retrieving the top players",e),e;case 3:return[2]}}))}))},this.getNextMatchForPlayerIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"player","native")];case 1:return t=i.sent(),e=t.player[0],[4,this.getNextMatchForPlayer(e)];case 2:return n=i.sent(),[4,this.idMapping.remapEntities(n,"match")];case 3:return[2,i.sent()];case 4:throw r=i.sent(),console.warn("There was a problem browsing the next match for player:"+e,r),r;case 5:return[2]}}))}))},this.getNextMatchForPlayer=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getNextMatchForPlayer(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the next match for player: "+e,t),t;case 3:return[2]}}))}))},this.getPrevMatchForPlayerIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"player","native")];case 1:return t=i.sent(),e=t.player[0],[4,this.getPrevMatchForPlayer(e)];case 2:return n=i.sent(),[4,this.idMapping.remapEntities(n,"match")];case 3:return[2,i.sent()];case 4:throw r=i.sent(),console.warn("There was a problem browsing the previous match for player:"+e,r),r;case 5:return[2]}}))}))},this.getPrevMatchForPlayer=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getPrevMatchForPlayer(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the previous match for player: "+e,t),t;case 3:return[2]}}))}))},this.idMapping=t,this.https=e}},2140:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(604);t.default=function(e,t){var n=this;this.https=null,this.idMapping=null,this.searchIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r,a,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,10,,11]),(e=new s.default(e)).scope?[4,this.idMapping.getEntityIdsBySchemaId(e.scope,"competition","native")]:[3,2];case 1:t=i.sent(),e.scope=t.competition,i.label=2;case 2:return[4,this.search(e)];case 3:return(n=i.sent()).teams&&n.teams.length>0?[4,this.idMapping.remapEntities(n.teams,"team")]:[3,5];case 4:r=i.sent(),n.teams=r,i.label=5;case 5:return n.players&&n.players.length>0?[4,this.idMapping.remapEntities(n.players,"player")]:[3,7];case 6:a=i.sent(),n.players=a,i.label=7;case 7:return n.competitions&&n.competitions.length>0?[4,this.idMapping.remapEntities(n.competitions,"competition")]:[3,9];case 8:o=i.sent(),n.competitions=o,i.label=9;case 9:return[2,n];case 10:throw u=i.sent(),console.warn("There was a problem with browsing the search result",u),u;case 11:return[2]}}))}))},this.search=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.search(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the search response",t),t;case 3:return[2]}}))}))},this.https=e,this.idMapping=t}},9693:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(9920);t.default=function(e,t){var n=this;this.https=null,this.idMapping=null,this.getTeamsIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r,a,o,u,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,9,,10]),t=!1,e?(e=new s.default(e)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([""+e.countryId],"country","native")]:[3,2]:[3,6];case 1:0===(n=i.sent()).country.length&&(t=!0),e.countryId=n.country[0],i.label=2;case 2:return e.scope?[4,this.idMapping.getEntityIdsBySchemaId(e.scope,"competition","native")]:[3,4];case 3:0===(r=i.sent()).competition.length&&(t=!0),e.scope=r.competition,i.label=4;case 4:return e.teamIds?[4,this.idMapping.getEntityIdsBySchemaId(e.teamIds,"team","native")]:[3,6];case 5:0===(a=i.sent()).team.length&&(t=!0),e.teamIds=a.team,i.label=6;case 6:return t?[2,[]]:[4,this.getTeams(e)];case 7:return o=i.sent(),u=o,[4,this.idMapping.remapEntities(o.data,"team")];case 8:return u.data=i.sent(),[2,o];case 9:throw c=i.sent(),console.warn("There was a problem browsing all teams",c),c;case 10:return[2]}}))}))},this.getTeams=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getTeams(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving all teams",t),t;case 3:return[2]}}))}))},this.getTeamByIdIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"team","native")];case 1:return t=i.sent(),e=t.team[0],[4,this.getTeamById(e)];case 2:return n=i.sent(),[4,this.idMapping.remapEntities(n,"team")];case 3:return[2,i.sent()];case 4:throw r=i.sent(),console.warn("There was a problem browsing the following team:"+e,r),r;case 5:return[2]}}))}))},this.getTeamById=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getTeamById(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the following team: "+e,t),t;case 3:return[2]}}))}))},this.getTopTeamsIdMapping=function(){return r(n,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,this.getTopTeams()];case 1:return e=n.sent(),[4,this.idMapping.remapEntities(e,"team")];case 2:return[2,n.sent()];case 3:throw t=n.sent(),console.warn("There was a problem browsing the top teams",t),t;case 4:return[2]}}))}))},this.getTopTeams=function(){return r(n,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.https.getTopTeams()];case 1:return[2,t.sent()];case 2:throw e=t.sent(),console.warn("There was a problem retrieving the top teams",e),e;case 3:return[2]}}))}))},this.getNextMatchForTeamIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"team","native")];case 1:return t=i.sent(),e=t.team[0],[4,this.getNextMatchForTeam(e)];case 2:return n=i.sent(),[4,this.idMapping.remapEntities(n,"match")];case 3:return[2,i.sent()];case 4:throw r=i.sent(),console.warn("There was a problem browsing the next match for the following team:"+e,r),r;case 5:return[2]}}))}))},this.getNextMatchForTeam=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getNextMatchForTeam(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the next match for the following team: "+e,t),t;case 3:return[2]}}))}))},this.getPrevMatchForTeamIdMapping=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"team","native")];case 1:return t=i.sent(),e=t.team[0],[4,this.getPrevMatchForTeam(e)];case 2:return n=i.sent(),[4,this.idMapping.remapEntities(n,"match")];case 3:return[2,i.sent()];case 4:throw r=i.sent(),console.warn("There was a problem browsing the previous match for the following team:"+e,r),r;case 5:return[2]}}))}))},this.getPrevMatchForTeam=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getPrevMatchForTeam(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the previous match for the following team: "+e,t),t;case 3:return[2]}}))}))},this.idMapping=t,this.https=e}},8808:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(8900),a=n(5601),o=n(595),u=n(4289);t.default=function(e){var t=this;this.https=null,this.idMapping=null,this.localStorage=null,this.footballFacade=null,this.getCountries=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getCountries()];case 1:return[2,e.sent()]}}))}))},this.getCompetitions=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getCompetitions(e)];case 1:return[2,t.sent()]}}))}))},this.getCompetitionById=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getCompetitionById(e)];case 1:return[2,t.sent()]}}))}))},this.getTopCompetitions=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopCompetitions()];case 1:return[2,e.sent()]}}))}))},this.getTeams=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getTeams(e)];case 1:return[2,t.sent()]}}))}))},this.getTeamById=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getTeamById(e)];case 1:return[2,t.sent()]}}))}))},this.getTopTeams=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopTeams()];case 1:return[2,e.sent()]}}))}))},this.getNextMatchForTeam=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getNextMatchForTeam(e)];case 1:return[2,t.sent()]}}))}))},this.getPrevMatchForTeam=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getPrevMatchForTeam(e)];case 1:return[2,t.sent()]}}))}))},this.getPlayers=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getPlayers(e)];case 1:return[2,t.sent()]}}))}))},this.getPlayerById=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getPlayerById(e)];case 1:return[2,t.sent()]}}))}))},this.getTopPlayers=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopPlayers()];case 1:return[2,e.sent()]}}))}))},this.getNextMatchForPlayer=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getNextMatchForPlayer(e)];case 1:return[2,t.sent()]}}))}))},this.getPrevMatchForPlayer=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getPrevMatchForPlayer(e)];case 1:return[2,t.sent()]}}))}))},this.getMatches=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getMatches(e)];case 1:return[2,t.sent()]}}))}))},this.getMatchById=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getMatchById(e)];case 1:return[2,t.sent()]}}))}))},this.search=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.search(e)];case 1:return[2,t.sent()]}}))}))},this.https=new o.default(e),this.idMapping=new s.default(e),this.localStorage=new a.default(e),this.footballFacade=new u.default(this.localStorage,this.https,this.idMapping)}},6975:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.type="",this.name=""}},2754:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=this;this.countryId=null,this.name=null,this.gender=null,this.type=null,this.sortField=null,this.sortOrder=null,this.competitionIds=null,this.constructFilterUrl=function(){var e="";return t.countryId&&(e=(e+="&")+"country_id="+t.countryId),t.gender&&(e=(e+="&")+"gender="+t.gender),t.type&&(e=(e+="&")+"type="+t.type),t.sortField&&(e=(e+="&")+"sort_field="+t.sortField),t.sortOrder&&(e=(e+="&")+"sort_order="+t.sortOrder),t.name&&(e=(e+="&")+"name="+t.name),t.competitionIds&&(e=(e+="&")+"competition_ids="+t.competitionIds.join(",")),e},this.competitionSearchFilter=function(e){try{var n=t.filter(e);return t.sortField||t.sortOrder?t.sort(n):n}catch(e){return console.warn("There was a problem filtering the local competitions",e),[]}},this.filter=function(e){var n=t.entitiesToSearchWith();return e.filter((function(e){var r=!0;return n.forEach((function(n){"sortOrder"!==n&&"sortField"!==n&&("countryId"===n?r&&(r=e.country.id===t[n]):"name"===n?r&&(r=e.name.toLocaleLowerCase().includes(t[n].toLocaleLowerCase())):"competitionIds"===n?r&&(r=t[n].some((function(t){return e.id===t}))):r&&(r=e[n].toLocaleLowerCase()===t[n].toLocaleLowerCase()))})),r}))},this.entitiesToSearchWith=function(){var e=[];return t.countryId&&e.push("countryId"),t.name&&e.push("name"),t.gender&&e.push("gender"),t.type&&e.push("type"),t.sortField&&e.push("sortField"),t.sortOrder&&e.push("sortOrder"),t.competitionIds&&e.push("competitionIds"),e},this.sort=function(e){var n=[];return"name"===t.sortField?n=e.sort((function(e,n){return t.sortOrder&&"desc"===t.sortOrder?n.name.localeCompare(e.name):e.name.localeCompare(n.name)})):"countryId"===t.sortField?n=e.sort((function(e,n){return t.sortOrder&&"desc"===t.sortOrder?n.country.id.localeCompare(e.country.id):e.country.id.localeCompare(n.country.id)})):"scope"===t.sortField?e.forEach((function(e){return n[t.competitionIds.indexOf(e.id)]=e})):t.sortField||"desc"!==t.sortOrder||(n=e.sort((function(e,t){return t.id.localeCompare(e.id)}))),n},this.countryId=e.countryId?""+e.countryId:null,this.name=e.name?e.name:null,this.gender=e.gender?e.gender:null,this.type=e.type?e.type:null,this.sortField=e.sortField?""+e.sortField:null,this.sortOrder=e.sortOrder?""+e.sortOrder:null,this.competitionIds=e.competitionIds?e.competitionIds:null}},3321:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.type="",this.name="",this.participants=[]}},7316:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6975),i=n(3430),s=function(){function e(){this.countryRemapper=null,this.countryRemapper=new i.default}return e.prototype.fromResponse=function(e){try{var t=new r.default;return t.id=e.id,t.country=this.countryRemapper.countryFromResponse(e.country),t.gender=e.gender,t.assets=e.assets,t.type=e.type,t.name=e.name,t}catch(e){throw console.warn("There was a problem remapping the competition response",e),e}},e}();t.default=s},8758:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3321),i=n(3430),s=n(5827),a=function(){function e(){this.countryRemapper=null,this.teamBasicRemapper=null,this.countryRemapper=new i.default,this.teamBasicRemapper=new s.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new r.default;return n.id=e.id,n.country=this.countryRemapper.countryFromResponse(e.country),n.gender=e.gender,n.assets=e.assets,n.type=e.type,n.name=e.name,n.participants=e.participants.map((function(e){return t.teamBasicRemapper.fromResponse(e)})),n}catch(e){throw console.warn("There was a problem remapping the competition response",e),e}},e}();t.default=a},4427:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.alias="",this.countryCode="",this.assets=null,this.name=""}},3430:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4427);t.default=function(){var e=this;this.countriesFromResponse=function(t){if(t)return t.map((function(t){return e.countryFromResponse(t)}))},this.countryFromResponse=function(e){try{if(e){var t=new r.default;return t.id=e.id,t.alias=e.alias,t.assets=e.assets,t.countryCode=e.country_code,t.name=e.name,t}}catch(e){throw e}return null}}},8470:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.homeTeam={players:[]},this.awayTeam={players:[]}}},3098:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8470),i=n(3550),s=function(){function e(){this.playerRemapper=null,this.playerRemapper=new i.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new r.default;return n.homeTeam.players=e.home_team&&e.home_team.players?e.home_team.players.map((function(e){return t.playerRemapper.fromResponse(e)})):[],n.awayTeam.players=e.away_team&&e.away_team.players?e.away_team.players.map((function(e){return t.playerRemapper.fromResponse(e)})):[],n}catch(e){throw console.warn("There was a problem remapping the lineups",e),e}},e}();t.default=s},2579:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.kickoffAt="",this.finishedAt="",this.updatedAt="",this.homeTeam=null,this.awayTeam=null,this.lineupsConfirmed=!1,this.startedAt="",this.minute="",this.scores=null,this.context={competition:null},this.status={type:null,subType:null}}},6134:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=this;this.countryIds=null,this.competitionIds=null,this.matchIds=null,this.status=null,this.teamIds=null,this.fromDate=null,this.toDate=null,this.limit=null,this.page=null,this.sortField=null,this.sortOrder=null,this.constructFilterUrl=function(){var e="";return t.countryIds&&(e=(e+="&")+"countries="+t.countryIds.join(",")),t.competitionIds&&(e=(e+="&")+"competitions="+t.competitionIds.join(",")),t.matchIds&&(e=(e+="&")+"matches="+t.matchIds.join(",")),t.status&&(e=(e+="&")+"status="+t.status),t.teamIds&&(e=(e+="&")+"teams="+t.teamIds.join(",")),t.fromDate&&(e=(e+="&")+"from_date="+t.fromDate),t.toDate&&(e=(e+="&")+"to_date="+t.toDate),t.limit&&(e=(e+="&")+"limit="+t.limit),t.page&&(e=(e+="&")+"page="+t.page),t.sortField&&(e=(e+="&")+"sort_field="+t.sortField),t.sortOrder&&(e=(e+="&")+"sort_order="+t.sortOrder),e},this.countryIds=e.countryIds?e.countryIds:null,this.competitionIds=e.competitionIds?e.competitionIds:null,this.matchIds=e.matchIds?e.matchIds:null,this.status=e.status?e.status:null,this.teamIds=e.teamIds?e.teamIds:null,this.fromDate=e.fromDate?e.fromDate:null,this.toDate=e.toDate?e.toDate:null,this.limit=e.limit?e.limit:null,this.page=e.page?e.page:null,this.sortField=e.sortField?e.sortField:null,this.sortOrder=e.sortOrder?e.sortOrder:null}},9661:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.kickoffAt="",this.finishedAt="",this.updatedAt="",this.homeTeam=null,this.awayTeam=null,this.lineupsConfirmed=!1,this.startedAt="",this.minute="",this.scores=null,this.stats=null,this.context={competition:null},this.timeline=[],this.status={type:null,subType:null},this.lineups=null}},5284:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2579),i=n(5827),s=n(7316),a=n(3949),o=function(){function e(){this.teamRemapper=null,this.competitionRemapper=null,this.scoresRemapper=null,this.teamRemapper=new i.default,this.competitionRemapper=new s.default,this.scoresRemapper=new a.default}return e.prototype.fromResponse=function(e){try{var t=new r.default;return t.id=e.id,t.kickoffAt=e.kickoff_at,t.finishedAt=e.finished_at,t.updatedAt=e.updated_at,t.homeTeam=this.teamRemapper.fromResponse(e.home_team),t.awayTeam=this.teamRemapper.fromResponse(e.away_team),t.lineupsConfirmed=e.lineups_confirmed,t.startedAt=e.started_at,t.minute=e.minute,t.scores=this.scoresRemapper.fromResponse(e.scores),t.context={competition:e.context.competition?this.competitionRemapper.fromResponse(e.context.competition):null},t.status={type:e.status.type,subType:e.status.sub_type},t}catch(e){throw console.warn("There was a problem remapping the match response",e),e}},e}();t.default=o},9330:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9661),i=n(5827),s=n(7316),a=n(7122),o=n(3949),u=n(3098),c=n(8470),l=n(92),h=function(){function e(){this.teamMapper=null,this.competitionsMapper=null,this.lineupsMapper=null,this.scoresMapper=null,this.statsMapper=null,this.timelineMapper=null,this.teamMapper=new i.default,this.competitionsMapper=new s.default,this.lineupsMapper=new u.default,this.scoresMapper=new o.default,this.statsMapper=new a.default,this.timelineMapper=new l.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new r.default;return n.id=e.id,n.kickoffAt=e.kickoff_at,n.finishedAt=e.finished_at,n.updatedAt=e.updated_at,n.homeTeam=e.home_team?this.teamMapper.fromResponse(e.home_team):null,n.awayTeam=e.away_team?this.teamMapper.fromResponse(e.away_team):null,n.lineupsConfirmed=e.lineups_confirmed,n.startedAt=e.started_at,n.minute=e.minute,n.scores=this.scoresMapper.fromResponse(e.scores),n.stats=this.statsMapper.fromResponse(e.stats),n.context={competition:this.competitionsMapper.fromResponse(e.context.competition)},n.timeline=e.timeline?e.timeline.map((function(e){return t.timelineMapper.fromResponse(e)})):[],n.status={type:e.status.type,subType:e.status.sub_type},n.lineups=e.lineups?this.lineupsMapper.fromResponse(e.lineups):new c.default,n}catch(e){throw console.warn("There was a problem remapping the match response",e),e}},e}();t.default=h},4652:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.ftScore=null,this.htScore=null,this.aetScore=null,this.aggScore=null,this.penScore=null}},3949:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4652),i=function(){function e(){this.statEntityFromResponse=function(e){return{homeGoals:e.home_goals,awayGoals:e.away_goals}}}return e.prototype.fromResponse=function(e){try{var t=new r.default;return t.ftScore=this.statEntityFromResponse(e.ft_score),t.htScore=this.statEntityFromResponse(e.ht_score),t.aetScore=this.statEntityFromResponse(e.aet_score),t.aggScore=this.statEntityFromResponse(e.agg_score),t.penScore=this.statEntityFromResponse(e.pen_score),t}catch(e){throw console.warn("There was a problem remapping the scores",e),e}},e}();t.default=i},7950:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.corners=null,this.crosses=null,this.offside=null,this.shotsOn=null,this.throwIn=null,this.redCards=null,this.shotsOff=null,this.goalKicks=null,this.possession=null,this.treatments=null,this.yellowCards=null,this.shotsBlocked=null,this.substitutions=null,this.counterAttacks=null,this.foulsCommitted=null}},7122:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7950),i=function(){function e(){this.statEntityFromResponse=function(e){return{homeTeam:e?e.home_team:null,awayTeam:e?e.away_team:null}}}return e.prototype.fromResponse=function(e){try{var t=new r.default;return t.corners=this.statEntityFromResponse(e.corners),t.crosses=this.statEntityFromResponse(e.crosses),t.offside=this.statEntityFromResponse(e.offside),t.shotsOn=this.statEntityFromResponse(e.shots_on),t.throwIn=this.statEntityFromResponse(e.throw_in),t.redCards=this.statEntityFromResponse(e.red_cards),t.shotsOff=this.statEntityFromResponse(e.shots_off),t.goalKicks=this.statEntityFromResponse(e.goal_kicks),t.possession=this.statEntityFromResponse(e.possession),t.treatments=this.statEntityFromResponse(e.treatments),t.yellowCards=this.statEntityFromResponse(e.yellow_cards),t.shotsBlocked=this.statEntityFromResponse(e.shots_blocked),t.substitutions=this.statEntityFromResponse(e.substitutions),t.counterAttacks=this.statEntityFromResponse(e.counter_attacks),t.foulsCommitted=this.statEntityFromResponse(e.fouls_committed),t}catch(e){throw console.warn("There was a problem remapping the stats",e),e}},e}();t.default=i},9452:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.minute="",this.type="",this.teamId="",this.player=null,this.relatedPlayer=null,this.updatedAt=""}},92:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9452),i=n(3550),s=function(){function e(){this.playerRemapper=null,this.playerRemapper=new i.default}return e.prototype.fromResponse=function(e){try{var t=new r.default;return t.minute=e.minute,t.type=e.type,t.teamId=e.team_id,t.player=this.playerRemapper.fromResponse(e.player),t.relatedPlayer=e.related_player?this.playerRemapper.fromResponse(e.related_player):null,t.updatedAt=e.updated_at,t}catch(e){throw console.warn("There was a problem remapping timeline",e),e}},e}();t.default=s},753:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3569);t.default=function(){this.meta=new r.default,this.data=[]}},3569:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(155);t.default=function(){this.pagination=new r.default}},155:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.currentPage=null,this.itemsPerPage=null,this.totalItems=null,this.numberOfPages=null}},1925:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3569);t.default=function(){this.remapMetaProp=function(e){var t=new r.default;return t.pagination.currentPage=e.pagination.current_page,t.pagination.itemsPerPage=e.pagination.items_per_page,t.pagination.totalItems=e.pagination.total_items,t.pagination.numberOfPages=e.pagination.number_of_pages,t}}},4426:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null,this.teams=[]}},6477:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=this;this.countryId=null,this.scope=null,this.name=null,this.playerIds=null,this.limit=null,this.page=null,this.sortField=null,this.sortOrder=null,this.constructFilterUrl=function(){var e="";return t.countryId&&(e=(e+="&")+"country_id="+t.countryId),t.scope&&(e=(e+="&")+"scope="+t.scope.join(",")),t.name&&(e=(e+="&")+"name="+t.name),t.playerIds&&(e=(e+="&")+"player_ids="+t.playerIds.join(",")),t.limit&&(e=(e+="&")+"limit="+t.limit),t.page&&(e=(e+="&")+"page="+t.page),t.sortField&&(e=(e+="&")+"sort_field="+t.sortField),t.sortOrder&&(e=(e+="&")+"sort_order="+t.sortOrder),e},this.countryId=e.countryId?e.countryId:null,this.scope=e.scope?e.scope:null,this.name=e.name?e.name:null,this.playerIds=e.playerIds?e.playerIds:null,this.limit=e.limit?e.limit:null,this.page=e.page?e.page:null,this.sortField=e.sortField?e.sortField:null,this.sortOrder=e.sortOrder?e.sortOrder:null}},1837:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null,this.competitions=[],this.teams=[]}},4803:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.name="",this.position="",this.assets=null,this.type=""}},9071:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.startDate="",this.endDate="",this.loan=!1,this.position="",this.country=null,this.name="",this.assets=null,this.birthDate=""}},5157:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3430),i=n(4426),s=n(5827),a=function(){function e(){this.countryRemapper=null,this.teamRemapper=null,this.countryRemapper=new r.default,this.teamRemapper=new s.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new i.default;return n.id=e.id,n.firstName=e.first_name?e.first_name:null,n.lastName=e.last_name?e.last_name:null,n.name=e.name?e.name:null,n.birthDate=e.birth_date,n.country=this.countryRemapper.countryFromResponse(e.country),n.assets=e.assets,n.teams=e.teams?e.teams.map((function(e){return t.teamRemapper.fromResponse(e)})):[],n.position=e.position,n}catch(e){throw console.warn("There was a problem remapping players response",e),e}},e}();t.default=a},7943:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3430),i=n(1837),s=n(5827),a=n(7316),o=function(){function e(){this.countryRemapper=null,this.teamRemapper=null,this.competitionRemapper=null,this.countryRemapper=new r.default,this.teamRemapper=new s.default,this.competitionRemapper=new a.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new i.default;return n.id=e.id,n.firstName=e.first_name?e.first_name:null,n.lastName=e.last_name?e.last_name:null,n.name=e.name?e.name:null,n.birthDate=e.birth_date,n.country=this.countryRemapper.countryFromResponse(e.country),n.assets=e.assets,n.teams=e.teams?e.teams.map((function(e){return t.teamRemapper.fromResponse(e)})):[],n.position=e.position,n.competitions=e.competitions?e.competitions.map((function(e){return t.competitionRemapper.fromResponse(e)})):[],n}catch(e){throw console.warn("There was a problem remapping player response",e),e}},e}();t.default=o},3550:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4803),i=function(){function e(){}return e.prototype.fromResponse=function(e){try{var t=new r.default;return t.id=e.id,t.name=e.name,t.position=e.position,t.shirtNumber=e.shirt_number,t.assets=e.assets,t.type=e.type,t}catch(e){throw console.warn("There was a problem remapping the player from timeline",e),e}},e}();t.default=i},4085:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3430),i=n(9071),s=function(){function e(){this.countryRemapper=null,this.countryRemapper=new r.default}return e.prototype.fromResponse=function(e){try{var t=new i.default;return t.id=e.id,t.startDate=e.start_date,t.endDate=e.end_date,t.shirtNumber=e.shirt_number,t.loan=e.loan,t.position=e.position,t.country=this.countryRemapper.countryFromResponse(e.country),t.name=e.name,t.assets=e.assets,t.birthDate=e.birth_date,t}catch(e){throw console.warn("There was a problem remapping the player from squad",e),e}},e}();t.default=s},4729:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3430),i=n(56),s=function(){function e(){this.countryRemapper=null,this.countryRemapper=new r.default}return e.prototype.fromResponse=function(e){try{var t=new i.default;return t.id=e.id,t.firstName=e.first_name?e.first_name:null,t.lastName=e.last_name?e.last_name:null,t.name=e.name?e.name:null,t.birthDate=e.birth_date,t.country=this.countryRemapper.countryFromResponse(e.country),t.assets=e.assets,t.position=e.position,t}catch(e){throw console.warn("There was a problem remapping top player response",e),e}},e}();t.default=s},56:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null}},604:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=this;this.entities=null,this.query=null,this.scope=null,this.constructFilterUrl=function(){var e="";return t.entities&&(e=(e+="&")+"entities="+t.entities.join(",")),t.query&&(e=(e+="&")+"q="+t.query),t.scope&&(e=(e+="&")+"scope="+t.scope.join(",")),e},this.entities=e.entities?e.entities:null,this.query=e.query?e.query:null,this.scope=e.scope?e.scope:null}},6967:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.teams=null,this.players=null,this.competitions=null}},7287:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5827),i=n(5157),s=n(7316),a=n(6967),o=function(){function e(){this.teamRemapper=null,this.playerRemapper=null,this.competitionremapper=null,this.teamRemapper=new r.default,this.playerRemapper=new i.default,this.competitionremapper=new s.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new a.default;return n.teams=e.teams?e.teams.map((function(e){return t.teamRemapper.fromResponse(e)})):[],n.players=e.players?e.players.map((function(e){return t.playerRemapper.fromResponse(e)})):[],n.competitions=e.competitions?e.competitions.map((function(e){return t.competitionremapper.fromResponse(e)})):[],n}catch(e){throw console.warn("There was a problem remapping search response",e),e}},e}();t.default=o},5827:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3430),i=n(9314),s=function(){function e(){this.countryRemapper=null,this.countryRemapper=new r.default}return e.prototype.fromResponse=function(e){try{var t=new i.default;return t.id=e.id,t.country=this.countryRemapper.countryFromResponse(e.country),t.gender=e.gender,t.assets=e.assets,t.code=e.code,t.national=e.national,t.fullName=e.full_name,t.shortName=e.short_name,t.name=e.name,t}catch(e){throw console.warn("There was a problem remapping teams response",e),e}},e}();t.default=s},7821:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3430),i=n(1986),s=n(4085),a=n(7316),o=function(){function e(){this.countryRemapper=null,this.competitionRemapper=null,this.playerRemapper=null,this.countryRemapper=new r.default,this.competitionRemapper=new a.default,this.playerRemapper=new s.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new i.default;return n.id=e.id,n.country=this.countryRemapper.countryFromResponse(e.country),n.gender=e.gender,n.assets=e.assets,n.code=e.code,n.national=e.national,n.fullName=e.full_name,n.shortName=e.short_name,n.name=e.name,n.competitions=e.competitions?e.competitions.map((function(e){return t.competitionRemapper.fromResponse(e)})):[],n.squad=e.squad?e.squad.map((function(e){return t.playerRemapper.fromResponse(e)})):[],n}catch(e){throw console.warn("There was a problem remapping team response",e),e}},e}();t.default=o},9314:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.name="",this.code="",this.national=!1,this.fullName="",this.shortName=""}},9920:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=this;this.name=null,this.countryId=null,this.national=!1,this.gender=null,this.limit=null,this.page=null,this.scope=null,this.sortField=null,this.sortOrder=null,this.teamIds=null,this.constructFilterUrl=function(){var e="";return t.name&&(e=(e+="&")+"name="+t.name),t.countryId&&(e=(e+="&")+"country_id="+t.countryId),t.national&&(e=(e+="&")+"national="+t.national),t.gender&&(e=(e+="&")+"gender="+t.gender),t.limit&&(e=(e+="&")+"limit="+t.limit),t.scope&&(e=(e+="&")+"scope="+t.scope.join(",")),t.page&&(e=(e+="&")+"page="+t.page),t.sortField&&(e=(e+="&")+"sort_field="+t.sortField),t.sortOrder&&(e=(e+="&")+"sort_order="+t.sortOrder),t.teamIds&&(e=(e+="&")+"team_ids="+t.teamIds.join(",")),e},this.name=e.name?e.name:null,this.countryId=e.countryId?""+e.countryId:null,this.national=!!e.national&&e.national,this.gender=e.gender?e.gender:null,this.limit=e.limit?e.limit:null,this.page=e.page?e.page:null,this.scope=e.scope?e.scope:null,this.sortField=e.sortField?""+e.sortField:null,this.sortOrder=e.sortOrder?""+e.sortOrder:null,this.teamIds=e.teamIds?e.teamIds:null}},1986:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.name="",this.competitions=[],this.code="",this.national=!1,this.fullName="",this.shortName="",this.squad=[]}},3822:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(5025);t.default=function(e){var t=this;this.https=null,this.loyaltyRemapper=null,this.getConfig=function(){return r(t,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.https.getConfig()];case 1:return e=t.sent(),[2,this.loyaltyRemapper.remapLoyaltyResponse(e.loyalty)]}}))}))},this.https=e,this.loyaltyRemapper=new s.default}},2962:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(7686),a=n(3822);t.default=function(e){var t=this;this.https=null,this.loyaltyFacade=null,this.getConfig=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getConfig()];case 1:return[2,e.sent()]}}))}))},this.https=new s.default(e),this.loyaltyFacade=new a.default(this.https)}},8608:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.general=[],this.predictor=[],this.topX=[]}},7605:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.enabled=!1,this.rewards=null}},5025:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8608),i=n(7605),s=n(4187),a=n(4226);t.default=function(){var e=this;this.remapLoyaltyResponse=function(t){var n=new i.default;return n.enabled=t.enabled,n.rewards=e.remapRewards(t.rewards),n},this.remapRewards=function(t){var n=new a.default;return n.points=e.remapPoints(t.points),n.tiers=t.tiers,n.badges=e.remapBadges(t.badges),n},this.remapPoints=function(e){var t=new s.default;return t.general=e.general,t.topX=e.top_x,t.predictor=e.predictor,t},this.remapBadges=function(e){var t=new r.default;return t.general=e.general,t.predictor=e.predictor,t.topX=e.top_x,t}}},4187:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.general=null,this.topX=null,this.predictor=null}},4226:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.points=null,this.tiers=null,this.badges=null}},1859:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(4946),a=n(1553),o=n(2793),u=n(8900),c=n(1732),l=n(5013),h=n(853),d=n(7299);t.default=function(e){var t=this;this.predictorHttps=null,this.predictorService=null,this.idMapping=null,this.play=function(e){return r(t,void 0,void 0,(function(){var t,n,r,a,o,u=this;return i(this,(function(i){switch(i.label){case 0:return(t=e.fixtures.map((function(e){return u.predictorService.validateFixture(e.matchId,e.market,e.prediction.value,e.prediction.playerId)})))?this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,4]:(n=[],r=[],t.forEach((function(e){n.push(e.matchId),e instanceof c.default&&r.push(e.prediction.playerId)})),[4,this.predictorService.remapMatchIdToNative(n)]):[3,5];case 1:return a=i.sent(),o={},r&&r.length>0?[4,this.predictorService.remapPlayerIdMapToNative(r)]:[3,3];case 2:o=i.sent(),i.label=3;case 3:t.forEach((function(e,t){e.matchId=a[t],e instanceof c.default&&(e.prediction.playerId=o[e.prediction.playerId])})),i.label=4;case 4:return[3,6];case 5:throw new Error("The prediction is invalid. Please check again have you passed appropriate prediction model");case 6:return e.fixtures=t,[4,this.predictorHttps.makeFootballPrediction(e)];case 7:return[2,i.sent()]}}))}))},this.delete=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(e)];case 1:return[2,t.sent()]}}))}))},this.getGames=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=this.predictorService.initGameFilters("MATCH_QUIZ",e),[4,this.predictorHttps.getGames(t)];case 1:return n=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(n)];case 2:return[2,r.sent()]}}))}))},this.getGameById=function(e){return r(t,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.predictorHttps.getGameById(e)];case 1:return t=n.sent(),[4,this.predictorService.remapMatchIdsFixtures(t)];case 2:return[2,n.sent()]}}))}))},this.getGameResults=function(e,n){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return n&&(n=new d.default(n)),[4,this.predictorHttps.getGameResults(e,n)];case 1:return t=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(t)];case 2:return[2,r.sent()]}}))}))},this.getCurrentGameResults=function(){return r(t,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return e={status:h.GameStatusEnum.OPEN,type:"MATCH_QUIZ"},e=new d.default(e),[4,this.predictorHttps.getGames(e)];case 1:return t=r.sent(),n=this.predictorService.getCurrentGameId(t),[4,this.getGameResults(n)];case 2:return[2,r.sent().data[0]]}}))}))},this.getMyGameEditions=function(e){return r(t,void 0,void 0,(function(){var t,n,r,s,o;return i(this,(function(i){switch(i.label){case 0:return t=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),n=[],[4,this.predictorHttps.getMyPredictionsNoRemap(t)];case 1:return(r=i.sent()).length>0?(r.forEach((function(e){e.game_instance_id&&n.push(e.game_instance_id)})),s=this.predictorService.initGameFilters("MATCH_QUIZ",e,n),[4,this.predictorHttps.getUserGameEditions(s)]):[3,4];case 2:return o=i.sent(),[4,this.predictorService.addPredictionProp(r,o)];case 3:return[2,i.sent()];case 4:return[2,new a.default]}}))}))},this.getMyGamePrediction=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),[4,this.predictorHttps.getMyPredictions(t)];case 1:return(n=r.sent()).data.length>0?[2,n.data.filter((function(t){return t.gameInstanceId===e}))[0]]:[2,null]}}))}))},this.getUserGameEditions=function(e,n){return r(t,void 0,void 0,(function(){var t,r,s,o,u;return i(this,(function(i){switch(i.label){case 0:return t=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),r=[],[4,this.predictorHttps.getUserPredictionsNoRemap(e,t)];case 1:return(s=i.sent()).length>0?(s.forEach((function(e){e.game_instance_id&&r.push(e.game_instance_id)})),o=this.predictorService.initGameFilters("MATCH_QUIZ",n,r),[4,this.predictorHttps.getUserGameEditions(o)]):[3,4];case 2:return u=i.sent(),[4,this.predictorService.addPredictionProp(s,u)];case 3:return[2,i.sent()];case 4:return[2,new a.default]}}))}))},this.getUserGamePrediction=function(e,n){return r(t,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:return t=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),[4,this.predictorHttps.getUserPredictions(e,t)];case 1:return(r=i.sent()).data.length>0?[2,r.data.filter((function(e){return e.gameInstanceId===n}))[0]]:[2,null]}}))}))},this.idMapping=new u.default(e),this.predictorHttps=new o.default(e,this.idMapping),this.predictorService=new l.default(e,this.idMapping)}},267:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(1859);t.default=function(e){var t=this;this.matchQuizFacade=null,this.play=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.play(e)];case 1:return[2,t.sent()]}}))}))},this.delete=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.delete(e)];case 1:return[2,t.sent()]}}))}))},this.getGames=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getGames(e)];case 1:return[2,t.sent()]}}))}))},this.getGameById=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getGameById(e)];case 1:return[2,t.sent()]}}))}))},this.getGameResults=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getGameResults(e,n)];case 1:return[2,t.sent()]}}))}))},this.getCurrentGameResults=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getCurrentGameResults()];case 1:return[2,e.sent()]}}))}))},this.getMyGameEditions=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getMyGameEditions(e)];case 1:return[2,t.sent()]}}))}))},this.getMyGamePrediction=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getMyGamePrediction(e)];case 1:return[2,t.sent()]}}))}))},this.getUserGameEditions=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getUserGameEditions(e,n)];case 1:return[2,t.sent()]}}))}))},this.getUserGamePrediction=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getUserGamePrediction(e,n)];case 1:return[2,t.sent()]}}))}))},this.matchQuizFacade=new s.default(e)}},8410:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8042);t.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.prediction=new r.default}},7243:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.predictionsCutoff=null,this.fixtures=[],this.createdAt=null,this.updatedAt=null}},8042:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null,this.target=null,this.playerId=null,this.playerModel=null,this.result=null}},7974:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.playerMarkets=t.MarketsOverCorners=t.MarketsOverGoals=t.MarketEnum=void 0,function(e){e.FT_1X2="FT_1X2",e.HT_1X2="HT_1X2",e.BOTH_TEAMS_SCORE="BOTH_TEAMS_SCORE",e.DOUBLE_CHANCE="DOUBLE_CHANCE",e.HT_FT="HT_FT",e.PLAYER_SCORE="PLAYER_SCORE",e.PLAYER_YELLOW_CARD="PLAYER_YELLOW_CARD",e.PLAYER_RED_CARD="PLAYER_RED_CARD",e.RED_CARD_MATCH="RED_CARD_MATCH",e.PENALTY_MATCH="PENALTY_MATCH",e.PLAYER_SCORE_FIRST_GOAL="PLAYER_SCORE_FIRST_GOAL",e.CORNERS_MATCH="CORNERS_MATCH",e.CORRECT_SCORE="CORRECT_SCORE",e.PLAYER_SCORE_HATTRICK="PLAYER_SCORE_HATTRICK",e.PLAYER_SCORE_TWICE="PLAYER_SCORE_TWICE",e.OVER_GOALS_0_5="OVER_GOALS_0.5",e.OVER_GOALS_1_5="OVER_GOALS_1.5",e.OVER_GOALS_2_5="OVER_GOALS_2.5",e.OVER_GOALS_3_5="OVER_GOALS_3.5",e.OVER_GOALS_4_5="OVER_GOALS_4.5",e.OVER_GOALS_5_5="OVER_GOALS_5.5",e.OVER_GOALS_6_5="OVER_GOALS_6.5",e.OVER_CORNERS_6_5="OVER_CORNERS_6.5",e.OVER_CORNERS_7_5="OVER_CORNERS_7.5",e.OVER_CORNERS_8_5="OVER_CORNERS_8.5",e.OVER_CORNERS_9_5="OVER_CORNERS_9.5",e.OVER_CORNERS_10_5="OVER_CORNERS_10.5",e.OVER_CORNERS_11_5="OVER_CORNERS_11.5",e.OVER_CORNERS_12_5="OVER_CORNERS_12.5",e.OVER_CORNERS_13_5="OVER_CORNERS_13.5"}(n=t.MarketEnum||(t.MarketEnum={})),t.MarketsOverGoals=[n.OVER_GOALS_0_5,n.OVER_GOALS_1_5,n.OVER_GOALS_2_5,n.OVER_GOALS_3_5,n.OVER_GOALS_4_5,n.OVER_GOALS_5_5,n.OVER_GOALS_6_5],t.MarketsOverCorners=[n.OVER_CORNERS_6_5,n.OVER_CORNERS_7_5,n.OVER_CORNERS_8_5,n.OVER_CORNERS_9_5,n.OVER_CORNERS_10_5,n.OVER_CORNERS_11_5,n.OVER_CORNERS_12_5,n.OVER_CORNERS_13_5],t.playerMarkets=[n.PLAYER_RED_CARD,n.PLAYER_SCORE,n.PLAYER_SCORE_FIRST_GOAL,n.PLAYER_SCORE_HATTRICK,n.PLAYER_SCORE_TWICE,n.PLAYER_YELLOW_CARD]},6147:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.pastStatuses=t.StatusEnum=void 0,function(e){e.ACTIVE="ACTIVE",e.WON="WON",e.LOST="LOST",e.PARTIALLY_WON="PARTIALLY_WON",e.CANCELED="CANCELED"}(n=t.StatusEnum||(t.StatusEnum={})),t.pastStatuses=[n.WON,n.LOST,n.PARTIALLY_WON,n.CANCELED]},1976:(e,t)=>{"use strict";var n,r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.HalfTimeFullTimeEnum=t.DoubleChanceEnum=t.OneXTwoEnum=void 0,(i=t.OneXTwoEnum||(t.OneXTwoEnum={})).ONE="1",i.X="x",i.TWO="2",(r=t.DoubleChanceEnum||(t.DoubleChanceEnum={})).ONE_X="1x",r.X_TWO="x2",r.ONE_TWO="12",(n=t.HalfTimeFullTimeEnum||(t.HalfTimeFullTimeEnum={})).ONE_ONE="1/1",n.ONE_X="1/x",n.ONE_TWO="1/2",n.X_ONE="x/1",n.X_X="x/x",n.X_TWO="x/2",n.TWO_ONE="2/1",n.TWO_X="2/x",n.TWO_TWO="2/2"},2929:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(4946),a=n(3187),o=n(5013),u=n(3950),c=n(1732),l=n(7782),h=n(6147);t.default=function(e,t,n,d){var p=this;this.predictorHttps=null,this.clientHttps=null,this.idMapping=null,this.predictorConfigRemapper=null,this.predictorService=null,this.makeFootballPrediction=function(e,t,n,a){return r(p,void 0,void 0,(function(){var r,o,l,h,d,p,f;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.validateFixture(e,t,n,a),o=new u.default,r?this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,5]:(l=r.matchId,h="",[4,this.predictorService.remapMatchIdToNative([l])]):[3,8];case 1:if(d=i.sent(),r.matchId=d[0],!r.matchId)throw new Error("Match id is invalid!");return r instanceof c.default?(h=r.prediction.playerId,p=r.prediction,[4,this.predictorService.remapPlayerIdToNative([h])]):[3,3];case 2:if(p.playerId=i.sent(),!r.prediction.playerId)throw new Error("Player id is invalid!");i.label=3;case 3:return o.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(o)];case 4:return(f=i.sent()).fixtures.map((function(e){e.prediction.playerId&&(e.prediction.playerId=h),e.matchId=l})),[2,f];case 5:return o.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(o)];case 6:return[2,i.sent()];case 7:return[3,9];case 8:throw new Error("The prediction is invalid. Please check again have you passed appropriate prediction model");case 9:return[2]}}))}))},this.getMatchSummary=function(e){return r(p,void 0,void 0,(function(){var t,n,r,a,o;return i(this,(function(i){switch(i.label){case 0:return this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,4]:[4,this.predictorService.remapMatchIdToNative([e])];case 1:return t=i.sent(),n=t[0],[4,this.predictorHttps.getMatchSummary(n)];case 2:return(r=i.sent()).matchId=e,a=r.predictions,[4,this.predictorService.remapPlayerIdToIdSchema(a)];case 3:return o=i.sent(),r.predictions=o,[2,r];case 4:return[4,this.predictorHttps.getMatchSummary(e)];case 5:return[2,i.sent()]}}))}))},this.getMarketSummary=function(e,t,n){return r(p,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.getMatchSummary(e)];case 1:return r=i.sent(),[2,this.predictorService.getMarketSummary(r,t,n)];case 2:return[2,i.sent().message];case 3:return[2]}}))}))},this.getConfig=function(){return r(p,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.clientHttps.getConfig()];case 1:return e=n.sent(),[4,this.predictorConfigRemapper.remapConfig(e.predictor)];case 2:return t=n.sent(),this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,4]:[4,this.predictorService.remapCompetitionsFromConfig(t)];case 3:return[2,n.sent()];case 4:return[2,t]}}))}))},this.deleteFootballPrediction=function(e){return r(p,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(e)];case 1:return[2,t.sent()]}}))}))},this.getMyPredictions=function(e){return r(p,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return e&&(e=new l.default(e)),[4,this.predictorHttps.getMyPredictions(e)];case 1:return[2,t.sent()]}}))}))},this.getMyCurrentPredictions=function(e){return r(p,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return e?(e.status=[h.StatusEnum.ACTIVE],e=new l.default(e)):(t={status:[h.StatusEnum.ACTIVE]},e=new l.default(t)),[4,this.getMyPredictions(e)];case 1:return[2,n.sent()]}}))}))},this.getMyPastPredictions=function(e){return r(p,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return e?(e.status=h.pastStatuses,e=new l.default(e)):(t={status:h.pastStatuses},e=new l.default(t)),[4,this.getMyPredictions(e)];case 1:return[2,n.sent()]}}))}))},this.getUserPredictions=function(e,t){return r(p,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return t&&(t=new l.default(t)),[4,this.predictorHttps.getUserPredictions(e,t)];case 1:return[2,n.sent()]}}))}))},this.getUserCurrentPredictions=function(e,t){return r(p,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return t?(t.status=[h.StatusEnum.ACTIVE],t=new l.default(t)):(n={status:[h.StatusEnum.ACTIVE]},t=new l.default(n)),[4,this.getUserPredictions(e,t)];case 1:return[2,r.sent()]}}))}))},this.getUserPastPredictions=function(e,t){return r(p,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return t?(t.status=h.pastStatuses,t=new l.default(t)):(n={status:h.pastStatuses},t=new l.default(n)),[4,this.getUserPredictions(e,t)];case 1:return[2,r.sent()]}}))}))},this.predictorHttps=t,this.idMapping=d,this.clientHttps=n,this.predictorConfigRemapper=new a.default,this.predictorService=new o.default(e,d)}},8452:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.fullCoverageCompetitions=null,this.markets=null}},3187:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8452);t.default=function(){this.remapConfig=function(e){var t=new r.default;return t.fullCoverageCompetitions=e.full_coverage_competitions,t.markets=e.markets,t}}},6367:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null,this.playerId=null,this.playerModel=null}},1406:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(2524),a=n(1732),o=n(4119),u=n(1465),c=n(5132),l=n(7344);t.default=function(e,t,n){var h=this;this.matchFacade=null,this.playerFacade=null,this.predictorService=null,this.remapFixturesRequest=function(e){var t={};if(t.match_id=e.matchId,t.match_type="FOOTBALL",e instanceof a.default)t.market=e.market,t.prediction=e.prediction.value,t.player_id=e.prediction.playerId;else if(e instanceof c.default||e instanceof l.default){var n=e.market.split("_");t.market=n[0]+"_"+n[1],t.prediction=e.prediction.value,t.target=Number(n[2])}else if(e instanceof u.default){t.market=e.market;var r=e.prediction.value.split(":");t.goals_home=Number(r[0]),t.goals_away=Number(r[1])}else t.market=e.market,t.prediction=e.prediction.value;return t},this.remapFixturesResponse=function(e){return r(h,void 0,void 0,(function(){var t,n,r,a,o,u,c,l,h,d,p;return i(this,(function(i){switch(i.label){case 0:for(e.length>1&&e.sort((function(e,t){return e.match_id.localeCompare(t.match_id)})),t=[],n=[],r=0,a=e;r<a.length;r++)d=a[r],t.push(d.match_id),d.player_id&&!n.includes(d.player_id)&&n.push(d.player_id);return[4,this.matchFacade.getMatchesMapWithNativeIds(t)];case 1:return o=i.sent(),u=[],n.sort((function(e,t){return e.localeCompare(t)})),n&&n.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(n)]:[3,3];case 2:u=i.sent(),i.label=3;case 3:for(c=[],l=0,h=e;l<h.length;l++)d=h[l],p=new s.default,d.target?p.market=this.predictorService.convertMarketForResponseModel(d.market,d.target):p.market=d.market,p.matchId=o[d.match_id].id,p.matchType=d.match_type,p.matchModel=o?o[d.match_id]:null,void 0!==d.goals_home&&void 0!==d.goals_away?p.prediction.value=d.goals_home.toString()+":"+d.goals_away.toString():p.prediction.value=d.prediction,p.prediction.playerId=d.player_id?d.player_id:null,p.prediction.playerId&&(p.prediction.playerModel=u[d.player_id],p.prediction.playerId=u[d.player_id].id),p.result=this.remapResult(d.result),c.push(p);return[2,c]}}))}))},this.remapResult=function(e){var t=new o.default;return t.settledAt=e.settled_at,t.resettledAt=e.resettled_at,t.status=e.status,t.outcome=e.outcome,t},this.matchFacade=e,this.playerFacade=t,this.predictorService=n}},2524:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6367);t.default=function(){this.market=null,this.matchId=null,this.matchType=null,this.matchModel=null,this.prediction=new r.default,this.result=null}},1206:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(9883);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.BOTH_TEAMS_SCORE,this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},5274:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(8038);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.CORNERS_MATCH,this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},1465:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(3125);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.CORRECT_SCORE,this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},7535:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(6902);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.DOUBLE_CHANCE,this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},3700:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2782),i=n(7974);t.default=function(e,t){this.matchId=null,this.market=i.MarketEnum.FT_1X2,this.prediction=null,this.matchId=e,this.prediction=new r.default,this.prediction.value=t}},7307:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(6642);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.HT_FT,this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},2812:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2782),i=n(7974);t.default=function(e,t){this.matchId=null,this.market=i.MarketEnum.HT_1X2,this.prediction=null,this.matchId=e,this.prediction=new r.default,this.prediction.value=t}},5132:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9883);t.default=function(e,t,n){this.matchId=null,this.market=null,this.prediction=null,this.matchId=e,this.market=t,this.prediction=new r.default,this.prediction.value=n}},7344:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9883);t.default=function(e,t,n){this.matchId=null,this.market=null,this.prediction=null,this.matchId=e,this.market=t,this.prediction=new r.default,this.prediction.value=n}},1855:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(9883);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.PENALTY_MATCH,this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},1732:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7321);t.default=function(e,t,n,i){this.matchId=null,this.market=null,this.prediction=null,this.matchId=e,this.market=t,this.prediction=new r.default,this.prediction.value=n,this.prediction.playerId=i}},5814:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(9883);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.RED_CARD_MATCH,this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},4119:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.settledAt=null,this.resettledAt=null,this.status=null,this.outcome=null}},5908:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.no=0,this.yes=0}},2726:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(1406),a=n(2532),o=n(3792),u=n(5908),c=n(595),l=n(4545),h=n(4272),d=n(2524),p=n(5013),f=n(1399);t.default=function(e,t){var n=this;this.fixturesRemapper=null,this.footballHttps=null,this.matchFacade=null,this.playerFacade=null,this.predictorService=null,this.remapRequestBody=function(e){var t={};return t.game_instance_id=e.gameInstanceId,t.fixtures=e.fixtures.map((function(e){return n.fixturesRemapper.remapFixturesRequest(e)})),e instanceof f.default&&e.tiebreaker&&(t.tiebreaker={},t.tiebreaker.golden_goal=e.tiebreaker.goldenGoal?e.tiebreaker.goldenGoal:null),t},this.remapResponseArrayBody=function(e){return r(n,void 0,void 0,(function(){var t,n,r,s,o,u=this;return i(this,(function(i){switch(i.label){case 0:return t=[],n=[],r={},s=[],e.forEach((function(e){e.fixtures.forEach((function(e){t.push(e.match_id),e.player_id&&n.push(e.player_id)}))})),[4,this.matchFacade.getMatchesMapWithNativeIds(t)];case 1:return o=i.sent(),n.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(n)]:[3,3];case 2:r=i.sent(),i.label=3;case 3:return e.forEach((function(e){var t=new a.default,n=[];t.id=e.id,t.gameInstanceId=e.game_instance_id,t.gameType=e.game_type,t.wager=e.wager,t.totalFixtures=e.total_fixtures,t.settledFixtures=e.settled_fixtures,t.userId=e.user_id,e.fixtures.forEach((function(e){var t=new d.default;e.target?t.market=u.predictorService.convertMarketForResponseModel(e.market,e.target):t.market=e.market,t.matchId=o[e.match_id].id,t.matchType=e.match_type,t.matchModel=o[e.match_id],void 0!==e.goals_home&&void 0!==e.goals_away?t.prediction.value=e.goals_home.toString()+":"+e.goals_away.toString():t.prediction.value=e.prediction,t.prediction.playerId=e.player_id?e.player_id:null,t.prediction.playerId&&(t.prediction.playerModel=r[t.prediction.playerId],t.prediction.playerId=r[t.prediction.playerId].id),t.result=u.fixturesRemapper.remapResult(e.result),n.push(t)})),t.fixtures=n,t.status=e.status,e.tiebreaker?t.tiebreaker.goldenGoal=e.tiebreaker.golden_goal:t.tiebreaker=null,t.points=e.points,t.createdAt=e.created_at,t.updatedAt=e.updated_at,s.push(t)})),[2,s]}}))}))},this.remapResponseObjBody=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return(t=new a.default).id=e.id,t.gameInstanceId=e.game_instance_id,t.gameType=e.game_type,t.wager=e.wager,t.totalFixtures=e.total_fixtures,t.settledFixtures=e.settled_fixtures,t.userId=e.user_id,n=t,[4,this.fixturesRemapper.remapFixturesResponse(e.fixtures)];case 1:return n.fixtures=r.sent(),t.status=e.status,e.tiebreaker?t.tiebreaker.goldenGoal=e.tiebreaker.golden_goal:t.tiebreaker=null,t.points=e.points,t.createdAt=e.created_at,t.updatedAt=e.updated_at,[2,t]}}))}))},this.remapPredictionModel=function(e){var t=new o.default;return t.fullTimeOneXTwo=e.FT_1X2,t.halfTimeOneXTwo=e.HT_1X2,t.bothTeamsScore=e.BOTH_TEAMS_SCORE?e.BOTH_TEAMS_SCORE:new u.default,t.overZeroPointFiveGoals=e.OVER_GOALS["over:0.5"]?e.OVER_GOALS["over:0.5"]:new u.default,t.overOnePointFiveGoals=e.OVER_GOALS["over:1.5"]?e.OVER_GOALS["over:1.5"]:new u.default,t.overTwoPointFiveGoals=e.OVER_GOALS["over:2.5"]?e.OVER_GOALS["over:2.5"]:new u.default,t.overThreePointFiveGoals=e.OVER_GOALS["over:3.5"]?e.OVER_GOALS["over:3.5"]:new u.default,t.overFourPointFiveGoals=e.OVER_GOALS["over:4.5"]?e.OVER_GOALS["over:4.5"]:new u.default,t.overFivePointFiveGoals=e.OVER_GOALS["over:5.5"]?e.OVER_GOALS["over:5.5"]:new u.default,t.overSixPointFiveGoals=e.OVER_GOALS["over:6.5"]?e.OVER_GOALS["over:6.5"]:new u.default,t.overSixPointFiveCorners=e.OVER_CORNERS["over:6.5"]?e.OVER_CORNERS["over:6.5"]:new u.default,t.overSevenPointFiveCorners=e.OVER_CORNERS["over:7.5"]?e.OVER_CORNERS["over:7.5"]:new u.default,t.overEightPointFiveCorners=e.OVER_CORNERS["over:8.5"]?e.OVER_CORNERS["over:8.5"]:new u.default,t.overNinePointFiveCorners=e.OVER_CORNERS["over:9.5"]?e.OVER_CORNERS["over:9.5"]:new u.default,t.overTenPointFiveCorners=e.OVER_CORNERS["over:10.5"]?e.OVER_CORNERS["over:10.5"]:new u.default,t.overElevenPointFiveCorners=e.OVER_CORNERS["over:11.5"]?e.OVER_CORNERS["over:11.5"]:new u.default,t.overTwelvePointFiveCorners=e.OVER_CORNERS["over:12.5"]?e.OVER_CORNERS["over:12.5"]:new u.default,t.overThirteenPointFiveCorners=e.OVER_CORNERS["over:13.5"]?e.OVER_CORNERS["over:13.5"]:new u.default,t.doubleChance=e.DOUBLE_CHANCE,t.halfTimeFullTime=e.HT_FT,t.playerScore=e.PLAYER_SCORE,t.playerYellowCard=e.PLAYER_YELLOW_CARD,t.playerRedCard=e.PLAYER_RED_CARD,t.redCardMatch=e.RED_CARD_MATCH?e.RED_CARD_MATCH:new u.default,t.penaltyMatch=e.PENALTY_MATCH?e.PENALTY_MATCH:new u.default,t.playerScoreFirstGoal=e.PLAYER_SCORE_FIRST_GOAL,t.cornersMatch=e.CORNERS_MATCH,t.correctScore=e.CORRECT_SCORE,t.playerScoreHattrick=e.PLAYER_SCORE_HATTRICK,t.playerScoreTwice=e.PLAYER_SCORE_TWICE,t},this.footballHttps=new c.default(e),this.matchFacade=new l.default(this.footballHttps,t),this.playerFacade=new h.default(this.footballHttps,t),this.predictorService=new p.default(e,t),this.fixturesRemapper=new s.default(this.matchFacade,this.playerFacade,this.predictorService)}},3950:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.gameInstanceId=null,this.fixtures=null}},2532:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7640);t.default=function(){this.id=null,this.gameInstanceId=null,this.gameType=null,this.wager=null,this.totalFixtures=null,this.settledFixtures=null,this.userId=null,this.fixtures=[],this.status=null,this.tiebreaker=new r.default,this.points=null,this.createdAt=null,this.updatedAt=null}},7782:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6147);t.default=function(e){var t=this;this.limit=null,this.startAfter=null,this.status=null,this.type=null,this.constructFilterUrl=function(){var e="",n=!1;return t.status&&(n=Object.values(r.StatusEnum).some((function(e){return t.status.includes(e)}))),t.limit&&(e+="&",e+="limit="+t.limit),t.startAfter&&(e+="&",e+="start_after="+t.startAfter),t.status&&n&&(e+="&",e+="status="+t.status.join(",")),t.type&&(e+="&",e+="game_types="+t.type),e},this.limit=e.limit?e.limit:null,this.startAfter=e.startAfter?e.startAfter:null,this.status=e.status?e.status:null,this.type=e.type?e.type:null}},3792:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5908);t.default=function(){this.fullTimeOneXTwo={},this.halfTimeOneXTwo={},this.bothTeamsScore=new r.default,this.doubleChance={},this.halfTimeFullTime={},this.playerScore={},this.playerYellowCard={},this.playerRedCard={},this.redCardMatch=new r.default,this.penaltyMatch=new r.default,this.playerScoreFirstGoal={},this.cornersMatch={},this.correctScore={},this.playerScoreHattrick={},this.playerScoreTwice={},this.overZeroPointFiveGoals=new r.default,this.overOnePointFiveGoals=new r.default,this.overTwoPointFiveGoals=new r.default,this.overThreePointFiveGoals=new r.default,this.overFourPointFiveGoals=new r.default,this.overFivePointFiveGoals=new r.default,this.overSixPointFiveGoals=new r.default,this.overSixPointFiveCorners=new r.default,this.overSevenPointFiveCorners=new r.default,this.overEightPointFiveCorners=new r.default,this.overNinePointFiveCorners=new r.default,this.overTenPointFiveCorners=new r.default,this.overElevenPointFiveCorners=new r.default,this.overTwelvePointFiveCorners=new r.default,this.overThirteenPointFiveCorners=new r.default}},9378:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.matchId=null,this.matchType=null,this.predictions=null}},9679:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2726),i=n(9378);t.default=function(e,t){var n=this;this.remapPredictions=null,this.remapResponse=function(e){var t=new i.default;return t.matchId=e.match_id,t.matchType=e.match_type,t.predictions=n.remapPredictions.remapPredictionModel(e.predictions),t},this.remapPredictions=new r.default(e,t)}},7321:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=!1,this.playerId=null}},9883:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=!1}},8038:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){}},3125:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null}},6902:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null}},6642:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null}},2782:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null}},1259:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(2793),a=n(8900),o=n(2929),u=n(7686);t.default=function(e){var t=this;this.predictorHttps=null,this.clientHttps=null,this.predictorFacade=null,this.idMapping=null,this.makeFootballPrediction=function(e,n,s,a){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.makeFootballPrediction(e,n,s,a)];case 1:return[2,t.sent()]}}))}))},this.getMatchSummary=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getMatchSummary(e)];case 1:return[2,t.sent()]}}))}))},this.getMarketSummary=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getMarketSummary(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getConfig=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getConfig()];case 1:return[2,e.sent()]}}))}))},this.deleteFootballPrediction=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.deleteFootballPrediction(e)];case 1:return[2,t.sent()]}}))}))},this.getMyPredictions=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getMyPredictions(e)];case 1:return[2,t.sent()]}}))}))},this.getMyCurrentPredictions=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getMyCurrentPredictions(e)];case 1:return[2,t.sent()]}}))}))},this.getMyPastPredictions=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getMyPastPredictions(e)];case 1:return[2,t.sent()]}}))}))},this.getUserPredictions=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getUserPredictions(e,n)];case 1:return[2,t.sent()]}}))}))},this.getUserCurrentPredictions=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getUserCurrentPredictions(e,n)];case 1:return[2,t.sent()]}}))}))},this.getUserPastPredictions=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getUserPastPredictions(e,n)];case 1:return[2,t.sent()]}}))}))},this.idMapping=new a.default(e),this.predictorHttps=new s.default(e,this.idMapping),this.clientHttps=new u.default(e),this.predictorFacade=new o.default(e,this.predictorHttps,this.clientHttps,this.idMapping)}},5013:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(7974),a=n(3792),o=n(1976),u=n(7307),c=n(7535),l=n(3700),h=n(1465),d=n(2812),p=n(5274),f=n(1732),m=n(1206),v=n(5814),y=n(1855),g=n(7344),w=n(5132),b=n(5908),_=n(8950),I=n(6890),E=n(595),R=n(4545),P=n(7782),M=n(7299),S=n(712),O=n(4119),T=n(3751),F=n(7243),A=n(4272);t.default=function(e,t){var n=this;this.footballHttps=null,this.idMapping=null,this.matchFacade=null,this.playerFacade=null,this.remapMatchIdToNative=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.idMapping.getEntityIdsBySchemaId(e,"match","native")];case 1:return t=r.sent(),n=[],t.match.forEach((function(e){return n.push(e)})),[2,n]}}))}))},this.remapPlayerIdToNative=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.idMapping.getEntityIdsBySchemaId(e,"player","native")];case 1:return[2,t.sent().player[0]]}}))}))},this.remapPlayerIdMapToNative=function(e){return r(n,void 0,void 0,(function(){var t,n,r,s;return i(this,(function(i){switch(i.label){case 0:return t={},n=(0,S.transformIdsToBeUnique)(e),[4,this.idMapping.getEntityIdsBySchemaId(n,"player","native")];case 1:return r=i.sent(),s=r.player,n.forEach((function(e,n){return t[e]=s[n]})),[2,t]}}))}))},this.remapPlayerIdToIdSchema=function(e){return r(n,void 0,void 0,(function(){var t,n,r,s,a,o,u,c,l,h,d,p;return i(this,(function(i){switch(i.label){case 0:t=["playerScore","playerYellowCard","playerRedCard","playerScoreFirstGoal","playerScoreHattrick","playerScoreTwice"],n=0,r=Object.entries(e),i.label=1;case 1:if(!(n<r.length))return[3,6];if(s=r[n],a=s[0],o=s[1],!t.includes(a))return[3,5];u=0,c=Object.keys(o),i.label=2;case 2:return u<c.length?(l=c[u],h={player:[l]},[4,this.idMapping.idMappingFacade.getEntitiesByIds(h,"native",this.idMapping.idSchema)]):[3,5];case 3:d=i.sent(),p=d.player[0],o[p]=o[l],delete o[l],i.label=4;case 4:return u++,[3,2];case 5:return n++,[3,1];case 6:return[2,e]}}))}))},this.convertMarket=function(e){for(var t=Object.keys(new a.default),n=Object.values(s.MarketEnum),r=0;r<n.length;r++)e===n[r]&&(e=t[r]);return e},this.convertMarketForResponseModel=function(e,t){return e+"_"+t.toString()},this.validateFixture=function(e,t,n,r){var i=Object.values(o.OneXTwoEnum),a=Object.values(o.HalfTimeFullTimeEnum),b=Object.values(o.DoubleChanceEnum);if(t===s.MarketEnum.FT_1X2){if(i.includes(n))return new l.default(e,n)}else if(t===s.MarketEnum.HT_1X2){if(i.includes(n))return new d.default(e,n)}else if(t===s.MarketEnum.HT_FT){if(a.includes(n))return new u.default(e,n)}else if(t===s.MarketEnum.DOUBLE_CHANCE){if(b.includes(n))return new c.default(e,n)}else if(t===s.MarketEnum.CORRECT_SCORE){if("string"==typeof n&&/\d+:\d+/.test(n))return new h.default(e,n)}else if(t===s.MarketEnum.CORNERS_MATCH){if("number"==typeof n)return new p.default(e,n)}else if(t===s.MarketEnum.BOTH_TEAMS_SCORE){if("boolean"==typeof n)return new m.default(e,n)}else if(t===s.MarketEnum.RED_CARD_MATCH){if("boolean"==typeof n)return new v.default(e,n)}else if(t===s.MarketEnum.PENALTY_MATCH){if("boolean"==typeof n)return new y.default(e,n)}else if(s.playerMarkets.includes(t)){if(r&&"boolean"==typeof n)return new f.default(e,t,n,r)}else if(s.MarketsOverGoals.includes(t)){if("boolean"==typeof n)return new g.default(e,t,n)}else if(s.MarketsOverCorners.includes(t)&&"boolean"==typeof n)return new w.default(e,t,n)},this.getMarketSummary=function(e,t,r){var i=n.convertMarket(t),a={};if(a.matchId=e.matchId,a.matchType=e.matchType,!Object.keys(e.predictions).includes(i))throw new Error("You have passed invalid market");return a[i]=e.predictions[i],s.playerMarkets.includes(t)&&r?(a[i][r]||(a[i][r]=new b.default),a[i][r]):a},this.remapCompetitionsFromConfig=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t={competition:e.fullCoverageCompetitions},[4,this.idMapping.idMappingFacade.getEntitiesByIds(t,"native",this.idMapping.idSchema)];case 1:return n=r.sent(),e.fullCoverageCompetitions=n.competition,[2,e]}}))}))},this.remapMatchIdsFixtures=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return Array.isArray(e.data)?e.data.length>0?(t=[],n=[],e.data.forEach((function(e){e instanceof T.default||e instanceof _.default||e instanceof F.default?(e.fixtures.forEach((function(e){return t.push(e.matchId)})),e instanceof F.default&&e.fixtures.forEach((function(e){e.prediction.playerId&&n.push(e.prediction.playerId)}))):e instanceof I.default&&e.results.forEach((function(e){return t.push(e.matchId)}))})),[4,this.refactorResponseArrModel(e,t,n)]):[3,2]:[3,4];case 1:case 5:return[2,r.sent()];case 2:return[2,e];case 3:return[3,6];case 4:return[4,this.refactorResponseObjModel(e)];case 6:return[2]}}))}))},this.refactorResponseArrModel=function(e,t,s){return r(n,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return n=[],[4,this.matchFacade.getMatchesMapWithNativeIds(t)];case 1:return r=i.sent(),a={},s.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(s)]:[3,3];case 2:a=i.sent(),i.label=3;case 3:return e.data.forEach((function(e){e instanceof T.default||e instanceof _.default||e instanceof F.default?(e.fixtures.forEach((function(t){t.matchModel=r[t.matchId],t.matchId=t.matchModel.id,e instanceof F.default&&t.prediction.playerId&&(t.prediction.playerModel=a[t.prediction.playerId],t.prediction.playerId=a[t.prediction.playerId].id)})),n.push(e)):e instanceof I.default&&(e.results.forEach((function(e){e.matchModel=r[e.matchId],e.matchId=e.matchModel.id})),n.push(e))})),e.data=n,[2,e]}}))}))},this.refactorResponseObjModel=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=[],e.fixtures.forEach((function(e){return t.push(e.matchId)})),[4,this.matchFacade.getMatchesMapWithNativeIds(t)];case 1:return n=r.sent(),e.fixtures.forEach((function(e){e.matchModel=n[e.matchId],e.matchId=n[e.matchId].id})),[2,e]}}))}))},this.getCurrentGameId=function(e){var t=new Date;if(e.data.length>1){var n=[];return e.data.forEach((function(e){return n.push(e.predictionsCutoff)})),e.data.sort((function(e,n){var r=[e.predictionsCutoff,n.predictionsCutoff].map((function(e){return Math.abs(new Date(e)-t)}));return r[0]-r[1]}))[0].id}return e.data[0].id},this.initGameTypePredictions=function(e){var t={type:e};return new P.default(t)},this.initGameFilters=function(e,t,n){if(t&&n)return t.type=e,t.gameIds=n,new M.default(t);if(t&&!n)return t.type=e,new M.default(t);if(!t&&n){var r={type:e,gameIds:n};return new M.default(r)}return r={type:e},new M.default(r)},this.addPredictionProp=function(e,t){return r(n,void 0,void 0,(function(){var n=this;return i(this,(function(r){switch(r.label){case 0:return t.data.forEach((function(t,r){t.id===e[r].game_instance_id&&t.fixtures.forEach((function(t,i){void 0!==e[r].fixtures[i].goals_home&&void 0!==e[r].fixtures[i].goals_away?t.prediction.value=e[r].fixtures[i].goals_home+":"+e[r].fixtures[i].goals_away:t.prediction.value=e[r].fixtures[i].prediction,e[r].fixtures[i].player_id?t.prediction.playerId=e[r].fixtures[i].player_id:e[r].fixtures[i].target&&(t.prediction.target=e[r].fixtures[i].target),t.prediction.result=n.remapResult(e[r].fixtures[i].result)}))})),[4,this.remapMatchIdsFixtures(t)];case 1:return[2,r.sent()]}}))}))},this.remapResult=function(e){var t=new O.default;return t.settledAt=e.settled_at,t.resettledAt=e.resettled_at,t.status=e.status,t.outcome=e.outcome,t},this.footballHttps=new E.default(e),this.idMapping=t,this.matchFacade=new R.default(this.footballHttps,t),this.playerFacade=new A.default(this.footballHttps,t)}},4831:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var a=n(9072),o=n(4289),u=n(7232),c=n(383);t.default=function(e,t,n,l){var h=this;this.profileHttps=null,this.footballHttps=null,this.localStorage=null,this.idMapping=null,this.profileFacade=null,this.footballFacade=null,this.interestsService=null,this.ownProfile=null,this.modified=!1,this.expireAt=0,this.promises=[],this.isFetching=!1,this.getOwnProfile=function(){return r(h,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return this.isFetching?(console.log("Another thread is fetching profile..."),[4,this.delay(100)]):[3,2];case 1:return n.sent(),[3,0];case 2:if(this.modified&&this.ownProfile)return console.log("Timestamp is less than 10 minutes OR profile is modifying "),[2,this.ownProfile];if(e=Math.floor(Date.now()/1e3),this.ownProfile&&!(this.expireAt<e))return[3,7];this.isFetching=!0,this.expireAt=Math.floor(Date.now()/1e3)+600,n.label=3;case 3:return n.trys.push([3,5,,6]),[4,this.profileFacade.getOwn()];case 4:return t=n.sent(),this.setOwnProfile(t),[3,6];case 5:return n.sent(),this.isFetching=!1,[3,6];case 6:return this.modified=!1,this.isFetching=!1,[2,this.ownProfile];case 7:return[2,this.ownProfile]}}))}))},this.delay=function(e){return new Promise((function(t){setTimeout(t,e)}))},this.setOwnProfile=function(e){h.ownProfile=e},this.extractUpdatedProps=function(e,t){var n={};return Object.keys(e).forEach((function(r){"gender"===r&&e[r]!==t[r]?n[r]=t[r]:"birthDate"===r?(null===t[r]||null===e[r]&&t[r]||e[r]!==t[r])&&(n.birth_date=t[r]):"country"===r?null===t[r]?n.country_id=t[r]:(null===e[r]&&t[r]||e[r].id!==t[r].id)&&(n.country_id=t[r].id):"interests"===r&&(e[r].length>0?e[r].filter((function(e){return!t[r].some((function(t){return e.id===t.id&&e.favourite===t.favourite&&e.type===t.type&&e.source===t.source}))})).length>0&&(n[r]=t[r]):n[r]=t[r])})),n},this.getInfo=function(){return r(h,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return e=n.sent(),delete(t=JSON.parse(JSON.stringify(e))).interests,[2,t]}}))}))},this.showInterests=function(){return r(h,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return e=n.sent(),t=e.interests,[4,this.interestsService.inquiryCustomInterests(t)];case 2:return[2,n.sent()]}}))}))},this.showFullInterests=function(){return r(h,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.showInterests()];case 1:return e=t.sent(),[4,this.interestsService.showFullInterests(e)];case 2:return[2,t.sent()]}}))}))},this.getFollowers=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getFollowers(e)];case 1:return[2,t.sent()]}}))}))},this.getFollowing=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getFollowing(e)];case 1:return[2,t.sent()]}}))}))},this.follow=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.follow(e)];case 1:return[2,t.sent()]}}))}))},this.unfollow=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.unfollow(e)];case 1:return[2,t.sent()]}}))}))},this.addInterestPromise=function(e){return r(h,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return r.sent(),t=null,"custom"===e.source?[3,3]:[4,this.interestsService.remapInterestToNative(e)];case 2:return t=r.sent(),[3,4];case 3:t=e,r.label=4;case 4:return n=this.ownProfile.interests.filter((function(e){return e.id!==t.id||e.type!==t.type||e.source!==t.source})),this.ownProfile.interests=s([],n,!0),this.ownProfile.interests.push(t),[2,this]}}))}))},this.addInterest=function(e){return h.promises.push(h.addInterestPromise(e)),h},this.removeInterestPromise=function(e){return r(h,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return n.sent(),t=null,"custom"===e.source?[3,3]:[4,this.interestsService.remapInterestToNative(e)];case 2:return t=n.sent(),[3,4];case 3:t=e,n.label=4;case 4:return this.ownProfile.interests=this.ownProfile.interests.filter((function(e){return e.id!==t.id||e.type!==t.type||e.source!==t.source})),[2,this]}}))}))},this.removeInterest=function(e){return h.promises.push(h.removeInterestPromise(e)),h},this.setBirthdatePromise=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return t.sent(),this.ownProfile.birthDate=e||null,[2,this]}}))}))},this.setBirthdate=function(e){return h.promises.push(h.setBirthdatePromise(e)),h},this.setGenderPromise=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return t.sent(),this.ownProfile.gender="male"===e||"female"===e?e:"unspecified",[2,this]}}))}))},this.setGender=function(e){return h.promises.push(h.setGenderPromise(e)),h},this.setCountryPromise=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return t.sent(),e&&!this.ownProfile.country?(this.ownProfile.country=new a.default,this.ownProfile.country.id=e):e&&this.ownProfile.country?this.ownProfile.country.id=e:this.ownProfile.country=null,[2,this]}}))}))},this.setCountry=function(e){return h.promises.push(h.setCountryPromise(e)),h},this.showFullnessProfile=function(){return r(h,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return e=n.sent(),t=JSON.parse(JSON.stringify(e)),[2,this.profileFacade.showFullnessProfile(t)]}}))}))},this.update=function(){return r(h,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return 0===this.promises.length?[2,this.ownProfile]:[4,Promise.all(this.promises)];case 1:return i.sent(),[4,this.profileFacade.getOwn()];case 2:return e=i.sent(),[4,this.getOwnProfile()];case 3:return t=i.sent(),n=this.extractUpdatedProps(e,t),[4,this.profileHttps.updateProfile(n)];case 4:return r=i.sent(),this.modified=!1,this.expireAt=0,this.localStorage.setOwnProfile(r),delete r.interests,[2,r]}}))}))},this.localStorage=e,this.profileHttps=t,this.footballHttps=l,this.idMapping=n,this.footballFacade=new o.default(e,l,n),this.interestsService=new c.default(n,this.footballFacade),this.profileFacade=new u.default(e,t)}},642:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(7232),a=n(383);t.default=function(e,t,n,o){var u=this;this.profileHttps=null,this.footballFacade=null,this.localStorage=null,this.idMapping=null,this.profileFacade=null,this.interestsService=null,this.profileId="",this.setId=function(e){return u.profileId=e,u},this.getProfile=function(){return r(u,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getById(this.profileId)];case 1:return[2,e.sent()]}}))}))},this.getInfo=function(){return r(u,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.getProfile()];case 1:return delete(e=t.sent()).interests,[2,e]}}))}))},this.showInterests=function(){return r(u,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getProfile()];case 1:return e=n.sent(),t=e.interests,[4,this.interestsService.inquiryCustomInterests(t)];case 2:return[2,n.sent()]}}))}))},this.showFullInterests=function(){return r(u,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.showInterests()];case 1:return e=t.sent(),[4,this.interestsService.showFullInterests(e)];case 2:return[2,t.sent()]}}))}))},this.getFollowers=function(e){return r(u,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getFollowers(e,this.profileId)];case 1:return[2,t.sent()]}}))}))},this.getFollowing=function(e){return r(u,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getFollowing(e,this.profileId)];case 1:return[2,t.sent()]}}))}))},this.showFullnessProfile=function(){return r(u,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.getProfile()];case 1:return e=t.sent(),[2,this.profileFacade.showFullnessProfile(e)]}}))}))},this.localStorage=e,this.profileHttps=t,this.footballFacade=o,this.idMapping=n,this.interestsService=new a.default(n,o),this.profileFacade=new s.default(e,t)}},7232:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(9037),a=n(9523);t.default=function(e,t){var n=this;this.isBrowser=!1,this.localStorage={},this.https=null,this.getOwn=function(){return r(n,void 0,void 0,(function(){var e,t,n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(e=Math.floor(Date.now()/1e3),t=this.localStorage.getExparationProfile(),n=null,t>e&&(n=this.localStorage.getOwnProfile()),n?[2,n]:[3,1]):[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.https.getProfile()];case 2:return s=i.sent(),this.localStorage.setOwnProfile(s),[2,s];case 3:throw r=i.sent(),console.warn("There was a problem retrieving your profile: ",r),r;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.https.getProfile()];case 6:return[2,s=i.sent()];case 7:throw a=i.sent(),console.warn("There was a problem retrieving your profile: ",a),a;case 8:return[2]}}))}))},this.getByIds=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getProfiles(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the selected profiles: "+e.join(",")+" ",t),t;case 3:return[2]}}))}))},this.getById=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.getProfile(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the selected profile: "+e+" ",t),t;case 3:return[2]}}))}))},this.getCountries=function(){return r(n,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(e=this.localStorage.getProfileCountries())&&e.length>0?[2,e]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.https.getCountries()];case 2:return t=i.sent(),this.localStorage.setProfileCountries(t),[2,t];case 3:throw n=i.sent(),console.warn("There was a problem retrieving profile countries: ",n),n;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.https.getCountries()];case 6:return[2,i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving profile countries: ",r),r;case 8:return[2]}}))}))},this.getFollowers=function(e,t){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e&&(e=new a.default(e)),[4,this.https.getFollowers(e,t)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving your followers: ",n),n;case 3:return[2]}}))}))},this.getFollowing=function(e,t){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e&&(e=new a.default(e)),[4,this.https.getFollowing(e,t)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving your following profiles: ",n),n;case 3:return[2]}}))}))},this.follow=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.follow(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem following profiles: "+e.join(",")+" ",t),t;case 3:return[2]}}))}))},this.unfollow=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.https.unfollow(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem unfollowing profiles: "+e.join(",")+" ",t),t;case 3:return[2]}}))}))},this.showFullnessProfile=function(e){var t=new s.default,n=0;return e.avatar&&(t.breakdown.addedAvatar.completed=!0,n+=t.breakdown.addedAvatar.percentage),e.birthDate&&(t.breakdown.addedBirthdate.completed=!0,n+=t.breakdown.addedBirthdate.percentage),e.country&&(t.breakdown.addedCountry.completed=!0,n+=t.breakdown.addedCountry.percentage),e.gender&&(t.breakdown.addedGender.completed=!0,n+=t.breakdown.addedGender.percentage),e.interests&&e.interests.length>0&&(e.interests.find((function(e){return"team"===e.type&&e.favourite}))&&(t.breakdown.teamFavourite.completed=!0,n+=t.breakdown.teamFavourite.percentage),e.interests.find((function(e){return"team"===e.type}))&&(t.breakdown.teamFollowed.completed=!0,n+=t.breakdown.teamFollowed.percentage),e.interests.find((function(e){return"player"===e.type&&e.favourite}))&&(t.breakdown.playerFavourite.completed=!0,n+=t.breakdown.playerFavourite.percentage),e.interests.find((function(e){return"player"===e.type}))&&(t.breakdown.playerFollowed.completed=!0,n+=t.breakdown.playerFollowed.percentage),e.interests.find((function(e){return"competition"===e.type&&e.favourite}))&&(t.breakdown.competitionFavourite.completed=!0,n+=t.breakdown.competitionFavourite.percentage),e.interests.find((function(e){return"competition"===e.type}))&&(t.breakdown.competitionFollowed.completed=!0,n+=t.breakdown.competitionFollowed.percentage)),t.totalPercentage=n,t},this.isBrowser="undefined"!=typeof window,this.localStorage=e,this.https=t}},383:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){var i=this;this.idMapping=null,this.footballFacade=null,this.remapInterestsToIdSchema=function(e){return n(i,void 0,void 0,(function(){var t,n,i,s,a,o,u,c,l,h,d;return r(this,(function(r){switch(r.label){case 0:return"native"===(t=this.idMapping.idSchema)?[3,4]:e.length>0?(n={},i={},e.forEach((function(e){n.hasOwnProperty(e.type)||(n[e.type]=[],i[e.type]=[]),n[e.type].push(e.id),i[e.type].push(e)})),[4,this.idMapping.idMappingFacade.getEntitiesByIds(n,"native",t)]):[3,2];case 1:for(s=r.sent(),a=[],o=function(e,t){t.forEach((function(t,n){t.id=s[e][n],a.push(t)}))},u=0,c=Object.entries(i);u<c.length;u++)l=c[u],h=l[0],d=l[1],o(h,d);return[2,a];case 2:case 4:return[2,e];case 3:return[3,5];case 5:return[2]}}))}))},this.remapInterestToNative=function(e){return n(i,void 0,void 0,(function(){var t,n,i,s,a;return r(this,(function(r){switch(r.label){case 0:return"native"===(t=this.idMapping.idSchema)?[3,2]:(n={},i=e.id,s=e.type,n[s]=[i],[4,this.idMapping.idMappingFacade.getEntitiesByIds(n,t,"native")]);case 1:return a=r.sent(),e.id=a[s][0],[2,e];case 2:return[2,e]}}))}))},this.inquiryCustomInterests=function(e){return n(i,void 0,void 0,(function(){var t,n,i;return r(this,(function(r){switch(r.label){case 0:return t=[],e&&e.length>0&&(t=e.filter((function(e){return"custom"===e.source}))),t&&t.length>0?(n=e.filter((function(e){return"custom"!==e.source})),[4,this.remapInterestsToIdSchema(n)]):[3,2];case 1:return i=r.sent(),t.forEach((function(e){return i.push(e)})),[2,i];case 2:return[4,this.remapInterestsToIdSchema(e)];case 3:return[2,r.sent()]}}))}))},this.showFullInterests=function(e){return n(i,void 0,void 0,(function(){var t,n,i,s,a,o,u,c;return r(this,(function(r){switch(r.label){case 0:if(t=[],!(e&&e.length>0))return[3,10];n=0,i=e,r.label=1;case 1:return n<i.length?"custom"===(s=i[n]).source||"football"!==s.source?[3,8]:(a={},"team"!==s.type?[3,3]:(a.teamIds=[s.id],[4,this.footballFacade.getTeams(a)])):[3,10];case 2:o=r.sent(),s.model=o.data[0],r.label=3;case 3:return"player"!==s.type?[3,5]:(a.playerIds=[s.id],[4,this.footballFacade.getPlayers(a)]);case 4:u=r.sent(),s.model=u.data[0],r.label=5;case 5:return"competition"!==s.type?[3,7]:(a.competitionIds=[s.id],[4,this.footballFacade.getCompetitions(a)]);case 6:c=r.sent(),s.model=c[0],r.label=7;case 7:return void 0===s.model&&(s.model=null),t.push(s),[3,9];case 8:t.push(s),r.label=9;case 9:return n++,[3,1];case 10:return[2,t]}}))}))},this.idMapping=e,this.footballFacade=t}},9523:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=this;this.limit=0,this.startAfter=null,this.constructFilterUrl=function(){var e="";return t.limit&&(e=(e+="&")+"limit="+t.limit),t.startAfter&&(e=(e+="&")+"start_after="+t.startAfter),e},this.limit=e.limit?e.limit:20,this.startAfter=e.startAfter?e.startAfter:null}},4782:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.avatar=null,this.followerId=null,this.name=null,this.profileId=null}},1712:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.profile_ids=[]}},3106:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.avatar=null,this.followingId=null,this.name=null,this.profileId=null}},6620:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7312);t.default=function(){this.teamFollowed=new r.default(10),this.teamFavourite=new r.default(15),this.playerFollowed=new r.default(10),this.playerFavourite=new r.default(10),this.competitionFollowed=new r.default(10),this.competitionFavourite=new r.default(5),this.addedBirthdate=new r.default(10),this.addedGender=new r.default(10),this.addedCountry=new r.default(10),this.addedAvatar=new r.default(10)}},7312:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){this.completed=!1,this.percentage=e}},9037:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6620);t.default=function(){this.breakdown=new r.default}},9072:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id=null,this.name=null,this.assets=null}},3546:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id=null,this.name=null,this.avatar=null,this.gender=null,this.country=null,this.birthDate=null,this.interests=[]}},6277:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1553),i=n(4782);t.default=function(){var e=this;this.followersFromResponse=function(t){var n=new r.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapResponse(t)})),n},this.remapResponse=function(e){var t=new i.default;return t.avatar=e.avatar,t.followerId=e.follower_id,t.name=e.name,t.profileId=e.profile_id,t}}},8673:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1553),i=n(3106);t.default=function(){var e=this;this.followResponse=function(t){return t.map((function(t){return e.remapResponse(t)}))},this.followingFromResponse=function(t){var n=new r.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapResponse(t)})),n},this.remapResponse=function(e){var t=new i.default;return t.avatar=e.avatar,t.followingId=e.following_id,t.name=e.name,t.profileId=e.profile_id,t}}},441:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3546);t.default=function(){var e=this;this.profilesFromResponse=function(t){return t?t.map((function(t){return e.fullProfileFromResponse(t)})):null},this.fullProfileFromResponse=function(e){var t=new r.default;return t.avatar=e.avatar,t.birthDate=e.birth_date,t.country=e.country,t.gender=e.gender,t.id=e.id,t.interests=e.interests,t.name=e.name,t}}},6409:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(4275),a=n(8900),o=n(7232),u=n(5601),c=n(4831),l=n(642),h=n(4289),d=n(595);t.default=function(e){var t=this;this.profileHttps=null,this.footballHttps=null,this.footballFacade=null,this.idMapping=null,this.localStorage=null,this.profileFacade=null,this.ownProfileBuilder=null,this.profileBuilder=null,this.getOwn=function(){return t.ownProfileBuilder},this.getById=function(e){return t.profileBuilder.setId(e)},this.getCountries=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getCountries()];case 1:return[2,e.sent()]}}))}))},this.getByIds=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getByIds(e)];case 1:return[2,t.sent()]}}))}))},this.profileHttps=new s.default(e),this.footballHttps=new d.default(e),this.idMapping=new a.default(e),this.localStorage=new u.default(e),this.footballFacade=new h.default(this.localStorage,this.footballHttps,this.idMapping),this.profileFacade=new o.default(this.localStorage,this.profileHttps),this.ownProfileBuilder=new c.default(this.localStorage,this.profileHttps,this.idMapping,this.footballHttps),this.profileBuilder=new l.default(this.localStorage,this.profileHttps,this.idMapping,this.footballFacade)}},853:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.GameStatusEnum=void 0,(n=t.GameStatusEnum||(t.GameStatusEnum={})).OPEN="OPEN",n.LIVE="LIVE",n.PENDING="PENDING",n.CANCELED="CANCELED",n.CLOSED="CLOSED",n.SETTLED="SETTLED"},9502:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(4946),a=n(2793),o=n(5013),u=n(853),c=n(7299),l=n(1553),h=n(1399);t.default=function(e,t){var n=this;this.idMapping=null,this.predictorHttps=null,this.predictorService=null,this.getGames=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=this.predictorService.initGameFilters("TOP_X",e),[4,this.predictorHttps.getGames(t)];case 1:return n=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(n)];case 2:return[2,r.sent()]}}))}))},this.getGameById=function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.predictorHttps.getGameById(e)];case 1:return t=n.sent(),[4,this.predictorService.remapMatchIdsFixtures(t)];case 2:return[2,n.sent()]}}))}))},this.getGameResults=function(e,t){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return t&&(t=new c.default(t)),[4,this.predictorHttps.getGameResults(e,t)];case 1:return n=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(n)];case 2:return[2,r.sent()]}}))}))},this.getCurrentGameResults=function(){return r(n,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return e={status:u.GameStatusEnum.OPEN,type:"TOP_X"},e=new c.default(e),[4,this.predictorHttps.getGames(e)];case 1:return t=r.sent(),n=this.predictorService.getCurrentGameId(t),[4,this.getGameResults(n)];case 2:return[2,r.sent().data[0]]}}))}))},this.play=function(e){return r(n,void 0,void 0,(function(){var t,n,r,a;return i(this,(function(i){switch(i.label){case 0:return t=new h.default(e),this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,2]:(n=[],t.fixtures.forEach((function(e){return n.push(e.matchId)})),[4,this.predictorService.remapMatchIdToNative(n)]);case 1:r=i.sent(),t.fixtures.forEach((function(e){return e.matchId=r.shift()})),i.label=2;case 2:return[4,this.predictorHttps.makeFootballPrediction(t)];case 3:return(a=i.sent()).fixtures.forEach((function(e){e.matchId=e.matchModel.id})),[2,a]}}))}))},this.delete=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(e)];case 1:return[2,t.sent()]}}))}))},this.getMyGameEditions=function(e){return r(n,void 0,void 0,(function(){var t,n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return t=this.predictorService.initGameTypePredictions("TOP_X"),n=[],[4,this.predictorHttps.getMyPredictionsNoRemap(t)];case 1:return(r=i.sent()).length>0?(r.forEach((function(e){e.game_instance_id&&n.push(e.game_instance_id)})),s=this.predictorService.initGameFilters("TOP_X",e,n),[4,this.predictorHttps.getUserGameEditions(s)]):[3,4];case 2:return a=i.sent(),[4,this.predictorService.addPredictionProp(r,a)];case 3:return[2,i.sent()];case 4:return[2,new l.default]}}))}))},this.getMyGamePrediction=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=this.predictorService.initGameTypePredictions("TOP_X"),[4,this.predictorHttps.getMyPredictions(t)];case 1:return(n=r.sent()).data.length>0?[2,n.data.filter((function(t){return t.gameInstanceId===e}))[0]]:[2,null]}}))}))},this.getUserGameEditions=function(e,t){return r(n,void 0,void 0,(function(){var n,r,s,a,o;return i(this,(function(i){switch(i.label){case 0:return n=this.predictorService.initGameTypePredictions("TOP_X"),r=[],[4,this.predictorHttps.getUserPredictionsNoRemap(e,n)];case 1:return(s=i.sent()).length>0?(s.forEach((function(e){e.game_instance_id&&r.push(e.game_instance_id)})),a=this.predictorService.initGameFilters("TOP_X",t,r),[4,this.predictorHttps.getUserGameEditions(a)]):[3,4];case 2:return o=i.sent(),[4,this.predictorService.addPredictionProp(s,o)];case 3:return[2,i.sent()];case 4:return[2,new l.default]}}))}))},this.getUserGamePrediction=function(e,t){return r(n,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return n=this.predictorService.initGameTypePredictions("TOP_X"),[4,this.predictorHttps.getUserPredictions(e,n)];case 1:return(r=i.sent()).data.length>0?[2,r.data.filter((function(e){return e.gameInstanceId===t}))[0]]:[2,null]}}))}))},this.idMapping=t,this.predictorHttps=new a.default(e,t),this.predictorService=new o.default(e,t)}},7482:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null}},5967:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(3381);t.default=function(){this.matchId=null,this.matchType=null,this.market=r.MarketEnum.CORRECT_SCORE,this.matchModel=null,this.prediction=new i.default}},6890:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.userId=null,this.points=null,this.results=[],this.tiebreaker=null}},6160:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.matchId=null,this.matchModel=null,this.outcome=null}},7299:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(853);t.default=function(e){var t=this;this.limit=null,this.startAfter=null,this.status=null,this.type=null,this.gameIds=null,this.constructFiltersUrl=function(){var e="";return t.limit&&(e+="&",e+="limit="+t.limit),t.startAfter&&(e+="&",e+="start_after="+t.startAfter),t.status&&Object.values(r.GameStatusEnum).includes(t.status)&&(e+="&",e+="status="+t.status),t.type&&(e+="&",e+="type="+t.type),t.gameIds&&t.gameIds.length>0&&(e+="&",e+="game_ids="+t.gameIds.join(",")),e},this.limit=e.limit?e.limit:null,this.startAfter=e.startAfter?e.startAfter:null,this.status=e.status?e.status:null,this.type=e.type?e.type:null,this.gameIds=e.gameIds?e.gameIds:null}},3751:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.predictionsCutoff=null,this.fixtures=[],this.createdAt=null,this.updatedAt=null}},4780:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7482),i=n(8410),s=n(5967),a=n(6890),o=n(6160),u=n(3751),c=n(7243),l=n(8950),h=n(7640),d=n(1553);t.default=function(){var e=this;this.remapPaginatedGames=function(t){var n=new d.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapGamesListResponse(t)})),n},this.remapGamesListResponse=function(t){var n=new u.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.type=t.type,n.status=t.status,n.predictionsCutoff=t.predictions_cutoff,n.fixtures=t.fixtures.map((function(t){return e.remapFixturesResponse(t)})),n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},this.remapFixturesResponse=function(e){var t=new r.default;return t.matchId=e.match_id,t.matchType=e.match_type,t.market=e.market,t},this.remapPaginatedUserTopXEditions=function(t){var n=new d.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapUserTopXEditionsResponse(t)})),n},this.remapUserTopXEditionsResponse=function(t){var n=new l.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.type=t.type,n.status=t.status,n.predictionsCutoff=t.predictions_cutoff,n.fixtures=t.fixtures.map((function(t){return e.remapTopXFixturesResponse(t)})),n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},this.remapTopXFixturesResponse=function(e){var t=new s.default;return t.matchId=e.match_id,t.matchType=e.match_type,t},this.remapPaginatedUserMathQuizEditions=function(t){var n=new d.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapUserMatchQuizEditionsResponse(t)})),n},this.remapUserMatchQuizEditionsResponse=function(t){var n=new c.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.type=t.type,n.status=t.status,n.predictionsCutoff=t.predictions_cutoff,n.fixtures=t.fixtures.map((function(t){return e.remapMatchQuizFixturesResponse(t)})),n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},this.remapMatchQuizFixturesResponse=function(e){var t=new i.default;return t.matchId=e.match_id,t.matchType=e.match_type,t.market=e.market,t},this.remapPaginatedGameResults=function(t){var n=new d.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapGameResults(t)})),n},this.remapGameResults=function(t){var n=new a.default;return n.userId=t.user_id,n.points=t.points?t.points:0,n.results=t.results.map((function(t){return e.remapResults(t)})),n.tiebreaker=t.tiebreaker?e.remapTiebreaker(t.tiebreaker):null,n},this.remapResults=function(e){var t=new o.default;return t.matchId=e.match_id,t.outcome=e.outcome,t},this.remapTiebreaker=function(e){var t=new h.default;return t.goldenGoal=e.golden_goal,t}}},8950:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.predictionsCutoff=null,this.fixtures=[],this.createdAt=null,this.updatedAt=null}},7640:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.goldenGoal=null}},3381:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null,this.result=null}},1399:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1465);t.default=function(e){var t=this;this.gameInstanceId=null,this.fixtures=[],this.tiebreaker=null,this.gameInstanceId=e.gameInstanceId,e.fixtures.forEach((function(e){return t.fixtures.push(new r.default(e.matchId,e.prediction.value))})),this.tiebreaker=e.tiebreaker?e.tiebreaker:null}},9596:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(8900),a=n(9502);t.default=function(e){var t=this;this.topXFacade=null,this.idMapping=null,this.getGames=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getGames(e)];case 1:return[2,t.sent()]}}))}))},this.getGameById=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getGameById(e)];case 1:return[2,t.sent()]}}))}))},this.getGameResults=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getGameResults(e,n)];case 1:return[2,t.sent()]}}))}))},this.getCurrentGameResults=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getCurrentGameResults()];case 1:return[2,e.sent()]}}))}))},this.play=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.play(e)];case 1:return[2,t.sent()]}}))}))},this.delete=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.delete(e)];case 1:return[2,t.sent()]}}))}))},this.getMyGameEditions=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getMyGameEditions(e)];case 1:return[2,t.sent()]}}))}))},this.getMyGamePrediction=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getMyGamePrediction(e)];case 1:return[2,t.sent()]}}))}))},this.getUserGameEditions=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getUserGameEditions(e,n)];case 1:return[2,t.sent()]}}))}))},this.getUserGamePrediction=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getUserGamePrediction(e,n)];case 1:return[2,t.sent()]}}))}))},this.idMapping=new s.default(e),this.topXFacade=new a.default(e,this.idMapping)}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}var r={};return(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.FansUnitedSDK=void 0;var t=n(6409),i=n(6595),s=n(8808),a=n(4946),o=n(1259),u=n(2962),c=n(9627),l=n(2671),h=n(9377),d=n(9596),p=n(267);e.FansUnitedSDK=function(e){var n=(new i.default).validate(e);if(n.idSchema.validation===c.ValidationResponseEnum.MISSING_VALUE&&(console.warn(n.idSchema.message.text),e.idSchema=a.IdSchemaEnum.NATIVE),n.environment.validation===c.ValidationResponseEnum.MISSING_VALUE&&(console.warn(n.environment.message.text),e.environment=l.EnvironmentEnum.PROD),n.lang.validation===c.ValidationResponseEnum.MISSING_VALUE&&(console.warn(n.lang.message.text),e.lang=h.LangEnum.EN),n.isValid)return{profile:new t.default(e),football:new s.default(e),predictor:new o.default(e),loyalty:new u.default(e),topX:new d.default(e),matchQuiz:new p.default(e)};throw new Error("Configuration is not valid")}})(),r})()}));
|
|
2
2
|
//# sourceMappingURL=index.js.map
|