fansunited-sdk-umd 1.26.2 → 1.27.0

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 CHANGED
@@ -1,3 +1,2 @@
1
- /*! For license information please see index.js.LICENSE.txt */
2
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.FansUnitedSDK=e():t.FansUnitedSDK=e()}(self,(function(){return(()=>{var t={9669:(t,e,n)=>{t.exports=n(1609)},5448:(t,e,n)=>{"use strict";var r=n(4867),i=n(6026),a=n(4372),s=n(5327),o=n(4097),u=n(4109),c=n(7985),l=n(5061),h=n(5655),f=n(5263);t.exports=function(t){return new Promise((function(e,n){var d,p=t.data,m=t.headers,v=t.responseType;function g(){t.cancelToken&&t.cancelToken.unsubscribe(d),t.signal&&t.signal.removeEventListener("abort",d)}r.isFormData(p)&&delete m["Content-Type"];var y=new XMLHttpRequest;if(t.auth){var _=t.auth.username||"",w=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";m.Authorization="Basic "+btoa(_+":"+w)}var b=o(t.baseURL,t.url);function E(){if(y){var r="getAllResponseHeaders"in y?u(y.getAllResponseHeaders()):null,a={data:v&&"text"!==v&&"json"!==v?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:r,config:t,request:y};i((function(t){e(t),g()}),(function(t){n(t),g()}),a),y=null}}if(y.open(t.method.toUpperCase(),s(b,t.params,t.paramsSerializer),!0),y.timeout=t.timeout,"onloadend"in y?y.onloadend=E:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(E)},y.onabort=function(){y&&(n(l("Request aborted",t,"ECONNABORTED",y)),y=null)},y.onerror=function(){n(l("Network Error",t,null,y)),y=null},y.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",r=t.transitional||h.transitional;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(l(e,t,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",y)),y=null},r.isStandardBrowserEnv()){var I=(t.withCredentials||c(b))&&t.xsrfCookieName?a.read(t.xsrfCookieName):void 0;I&&(m[t.xsrfHeaderName]=I)}"setRequestHeader"in y&&r.forEach(m,(function(t,e){void 0===p&&"content-type"===e.toLowerCase()?delete m[e]:y.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(y.withCredentials=!!t.withCredentials),v&&"json"!==v&&(y.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&y.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(d=function(t){y&&(n(!t||t&&t.type?new f("canceled"):t),y.abort(),y=null)},t.cancelToken&&t.cancelToken.subscribe(d),t.signal&&(t.signal.aborted?d():t.signal.addEventListener("abort",d))),p||(p=null),y.send(p)}))}},1609:(t,e,n)=>{"use strict";var r=n(4867),i=n(1849),a=n(321),s=n(7185),o=function t(e){var n=new a(e),o=i(a.prototype.request,n);return r.extend(o,a.prototype,n),r.extend(o,n),o.create=function(n){return t(s(e,n))},o}(n(5655));o.Axios=a,o.Cancel=n(5263),o.CancelToken=n(4972),o.isCancel=n(6502),o.VERSION=n(7288).version,o.all=function(t){return Promise.all(t)},o.spread=n(8713),o.isAxiosError=n(6268),t.exports=o,t.exports.default=o},5263:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},4972:(t,e,n)=>{"use strict";var r=n(5263);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;this.promise.then((function(t){if(n._listeners){var e,r=n._listeners.length;for(e=0;e<r;e++)n._listeners[e](t);n._listeners=null}})),this.promise.then=function(t){var e,r=new Promise((function(t){n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},i.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},6502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,n)=>{"use strict";var r=n(4867),i=n(5327),a=n(782),s=n(3572),o=n(7185),u=n(4875),c=u.validators;function l(t){this.defaults=t,this.interceptors={request:new a,response:new a}}l.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=o(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=t.transitional;void 0!==e&&u.assertOptions(e,{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(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,a=[];if(this.interceptors.response.forEach((function(t){a.push(t.fulfilled,t.rejected)})),!r){var l=[s,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(a),i=Promise.resolve(t);l.length;)i=i.then(l.shift(),l.shift());return i}for(var h=t;n.length;){var f=n.shift(),d=n.shift();try{h=f(h)}catch(t){d(t);break}}try{i=s(h)}catch(t){return Promise.reject(t)}for(;a.length;)i=i.then(a.shift(),a.shift());return i},l.prototype.getUri=function(t){return t=o(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){l.prototype[t]=function(e,n){return this.request(o(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){l.prototype[t]=function(e,n,r){return this.request(o(r||{},{method:t,url:e,data:n}))}})),t.exports=l},782:(t,e,n)=>{"use strict";var r=n(4867);function i(){this.handlers=[]}i.prototype.use=function(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},4097:(t,e,n)=>{"use strict";var r=n(1793),i=n(7303);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},5061:(t,e,n)=>{"use strict";var r=n(481);t.exports=function(t,e,n,i,a){var s=new Error(t);return r(s,e,n,i,a)}},3572:(t,e,n)=>{"use strict";var r=n(4867),i=n(8527),a=n(6502),s=n(5655),o=n(5263);function u(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new o("canceled")}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=i.call(t,t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||s.adapter)(t).then((function(e){return u(t),e.data=i.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return a(e)||(u(t),e&&e.response&&(e.response.data=i.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},481:t=>{"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.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}},t}},7185:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t,e){e=e||{};var n={};function i(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function a(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(t[n],e[n])}function s(t){if(!r.isUndefined(e[t]))return i(void 0,e[t])}function o(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(void 0,e[n])}function u(n){return n in e?i(t[n],e[n]):n in t?i(void 0,t[n]):void 0}var c={url:s,method:s,data:s,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(t).concat(Object.keys(e)),(function(t){var e=c[t]||a,i=e(t);r.isUndefined(i)&&e!==u||(n[t]=i)})),n}},6026:(t,e,n)=>{"use strict";var r=n(5061);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},8527:(t,e,n)=>{"use strict";var r=n(4867),i=n(5655);t.exports=function(t,e,n){var a=this||i;return r.forEach(n,(function(n){t=n.call(a,t,e)})),t}},5655:(t,e,n)=>{"use strict";var r=n(4867),i=n(6016),a=n(481),s={"Content-Type":"application/x-www-form-urlencoded"};function o(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}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(t,e){return i(e,"Accept"),i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(o(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)||e&&"application/json"===e["Content-Type"]?(o(e,"application/json"),function(t,e,n){if(r.isString(t))try{return(0,JSON.parse)(t),r.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||c.transitional,n=e&&e.silentJSONParsing,i=e&&e.forcedJSONParsing,s=!n&&"json"===this.responseType;if(s||i&&r.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(s){if("SyntaxError"===t.name)throw a(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){c.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){c.headers[t]=r.merge(s)})),t.exports=c},7288:t=>{t.exports={version:"0.24.0"}},1849:t=>{"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},5327:(t,e,n)=>{"use strict";var r=n(4867);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var a;if(n)a=n(e);else if(r.isURLSearchParams(e))a=e.toString();else{var s=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),s.push(i(e)+"="+i(t))})))})),a=s.join("&")}if(a){var o=t.indexOf("#");-1!==o&&(t=t.slice(0,o)),t+=(-1===t.indexOf("?")?"?":"&")+a}return t}},7303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},4372:(t,e,n)=>{"use strict";var r=n(4867);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,a,s){var o=[];o.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),r.isString(i)&&o.push("path="+i),r.isString(a)&&o.push("domain="+a),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},6268:t=>{"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},7985:(t,e,n)=>{"use strict";var r=n(4867);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(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 t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},6016:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},4109:(t,e,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"];t.exports=function(t){var e,n,a,s={};return t?(r.forEach(t.split("\n"),(function(t){if(a=t.indexOf(":"),e=r.trim(t.substr(0,a)).toLowerCase(),n=r.trim(t.substr(a+1)),e){if(s[e]&&i.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([n]):s[e]?s[e]+", "+n:n}})),s):s}},8713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},4875:(t,e,n)=>{"use strict";var r=n(7288).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){i[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));var a={};i.transitional=function(t,e,n){function i(t,e){return"[Axios v"+r+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,r,s){if(!1===t)throw new Error(i(r," has been removed"+(e?" in "+e:"")));return e&&!a[r]&&(a[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,s)}},t.exports={assertOptions:function(t,e,n){if("object"!=typeof t)throw new TypeError("options must be an object");for(var r=Object.keys(t),i=r.length;i-- >0;){var a=r[i],s=e[a];if(s){var o=t[a],u=void 0===o||s(o,a,t);if(!0!==u)throw new TypeError("option "+a+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+a)}},validators:i}},4867:(t,e,n)=>{"use strict";var r=n(1849),i=Object.prototype.toString;function a(t){return"[object Array]"===i.call(t)}function s(t){return void 0===t}function o(t){return null!==t&&"object"==typeof t}function u(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),a(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:a,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!s(t)&&null!==t.constructor&&!s(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:o,isPlainObject:u,isUndefined:s,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:c,isStream:function(t){return o(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t 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 t(){var e={};function n(n,r){u(e[r])&&u(n)?e[r]=t(e[r],n):u(n)?e[r]=t({},n):a(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return e},extend:function(t,e,n){return l(e,(function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},6245:(t,e,n)=>{"use strict";function r(t){this.message=t}n.r(e),n.d(e,{default:()=>o,InvalidTokenError:()=>s}),r.prototype=new Error,r.prototype.name="InvalidCharacterError";var i="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,i,a=0,s=0,o="";i=e.charAt(s++);~i&&(n=a%4?64*n+i:i,a++%4)?o+=String.fromCharCode(255&n>>(-2*a&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};function a(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(i(t).replace(/(.)/g,(function(t,e){var n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(e)}catch(t){return i(e)}}function s(t){this.message=t}s.prototype=new Error,s.prototype.name="InvalidTokenError";const o=function(t,e){if("string"!=typeof t)throw new s("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(a(t.split(".")[n]))}catch(t){throw new s("Invalid token specified: "+t.message)}}},6486:function(t,e,n){var r;t=n.nmd(t),function(){var i,a="Expected a function",s="__lodash_hash_undefined__",o="__lodash_placeholder__",u=32,c=128,l=1/0,h=9007199254740991,f=NaN,d=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],m="[object Arguments]",v="[object Array]",g="[object Boolean]",y="[object Date]",_="[object Error]",w="[object Function]",b="[object GeneratorFunction]",E="[object Map]",I="[object Number]",M="[object Object]",O="[object Promise]",R="[object RegExp]",S="[object Set]",T="[object String]",P="[object Symbol]",A="[object WeakMap]",F="[object ArrayBuffer]",x="[object DataView]",C="[object Float32Array]",k="[object Float64Array]",N="[object Int8Array]",j="[object Int16Array]",D="[object Int32Array]",L="[object Uint8Array]",U="[object Uint8ClampedArray]",H="[object Uint16Array]",B="[object Uint32Array]",G=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,X=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,z=RegExp(X.source),Y=RegExp(q.source),J=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,it=/\s/,at=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,ot=/,? & /,ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,lt=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ft=/\w*$/,dt=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,mt=/^\[object .+?Constructor\]$/,vt=/^0o[0-7]+$/i,gt=/^(?:0|[1-9]\d*)$/,yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_t=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,bt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Et="a-z\\xdf-\\xf6\\xf8-\\xff",It="A-Z\\xc0-\\xd6\\xd8-\\xde",Mt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ot="["+Mt+"]",Rt="["+bt+"]",St="\\d+",Tt="["+Et+"]",Pt="[^\\ud800-\\udfff"+Mt+St+"\\u2700-\\u27bf"+Et+It+"]",At="\\ud83c[\\udffb-\\udfff]",Ft="[^\\ud800-\\udfff]",xt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ct="[\\ud800-\\udbff][\\udc00-\\udfff]",kt="["+It+"]",Nt="(?:"+Tt+"|"+Pt+")",jt="(?:"+kt+"|"+Pt+")",Dt="(?:['’](?:d|ll|m|re|s|t|ve))?",Lt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ut="(?:"+Rt+"|"+At+")?",Ht="[\\ufe0e\\ufe0f]?",Bt=Ht+Ut+"(?:\\u200d(?:"+[Ft,xt,Ct].join("|")+")"+Ht+Ut+")*",Gt="(?:"+["[\\u2700-\\u27bf]",xt,Ct].join("|")+")"+Bt,Vt="(?:"+[Ft+Rt+"?",Rt,xt,Ct,"[\\ud800-\\udfff]"].join("|")+")",Wt=RegExp("['’]","g"),Xt=RegExp(Rt,"g"),qt=RegExp(At+"(?="+At+")|"+Vt+Bt,"g"),zt=RegExp([kt+"?"+Tt+"+"+Dt+"(?="+[Ot,kt,"$"].join("|")+")",jt+"+"+Lt+"(?="+[Ot,kt+Nt,"$"].join("|")+")",kt+"?"+Nt+"+"+Dt,kt+"+"+Lt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",St,Gt].join("|"),"g"),Yt=RegExp("[\\u200d\\ud800-\\udfff"+bt+"\\ufe0e\\ufe0f]"),Jt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Kt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Qt=-1,Zt={};Zt[C]=Zt[k]=Zt[N]=Zt[j]=Zt[D]=Zt[L]=Zt[U]=Zt[H]=Zt[B]=!0,Zt[m]=Zt[v]=Zt[F]=Zt[g]=Zt[x]=Zt[y]=Zt[_]=Zt[w]=Zt[E]=Zt[I]=Zt[M]=Zt[R]=Zt[S]=Zt[T]=Zt[A]=!1;var $t={};$t[m]=$t[v]=$t[F]=$t[x]=$t[g]=$t[y]=$t[C]=$t[k]=$t[N]=$t[j]=$t[D]=$t[E]=$t[I]=$t[M]=$t[R]=$t[S]=$t[T]=$t[P]=$t[L]=$t[U]=$t[H]=$t[B]=!0,$t[_]=$t[w]=$t[A]=!1;var te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ee=parseFloat,ne=parseInt,re="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ie="object"==typeof self&&self&&self.Object===Object&&self,ae=re||ie||Function("return this")(),se=e&&!e.nodeType&&e,oe=se&&t&&!t.nodeType&&t,ue=oe&&oe.exports===se,ce=ue&&re.process,le=function(){try{return oe&&oe.require&&oe.require("util").types||ce&&ce.binding&&ce.binding("util")}catch(t){}}(),he=le&&le.isArrayBuffer,fe=le&&le.isDate,de=le&&le.isMap,pe=le&&le.isRegExp,me=le&&le.isSet,ve=le&&le.isTypedArray;function ge(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function ye(t,e,n,r){for(var i=-1,a=null==t?0:t.length;++i<a;){var s=t[i];e(r,s,n(s),t)}return r}function _e(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function we(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function be(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Ee(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var s=t[n];e(s,n,t)&&(a[i++]=s)}return a}function Ie(t,e){return!(null==t||!t.length)&&Ce(t,e,0)>-1}function Me(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Oe(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function Re(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Se(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}function Te(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Pe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Ae=De("length");function Fe(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function xe(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}function Ce(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):xe(t,Ne,n)}function ke(t,e,n,r){for(var i=n-1,a=t.length;++i<a;)if(r(t[i],e))return i;return-1}function Ne(t){return t!=t}function je(t,e){var n=null==t?0:t.length;return n?He(t,e)/n:f}function De(t){return function(e){return null==e?i:e[t]}}function Le(t){return function(e){return null==t?i:t[e]}}function Ue(t,e,n,r,i){return i(t,(function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)})),n}function He(t,e){for(var n,r=-1,a=t.length;++r<a;){var s=e(t[r]);s!==i&&(n=n===i?s:n+s)}return n}function Be(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ge(t){return t?t.slice(0,on(t)+1).replace(rt,""):t}function Ve(t){return function(e){return t(e)}}function We(t,e){return Oe(e,(function(e){return t[e]}))}function Xe(t,e){return t.has(e)}function qe(t,e){for(var n=-1,r=t.length;++n<r&&Ce(e,t[n],0)>-1;);return n}function ze(t,e){for(var n=t.length;n--&&Ce(e,t[n],0)>-1;);return n}function Ye(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var Je=Le({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Ke=Le({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Qe(t){return"\\"+te[t]}function Ze(t){return Yt.test(t)}function $e(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function tn(t,e){return function(n){return t(e(n))}}function en(t,e){for(var n=-1,r=t.length,i=0,a=[];++n<r;){var s=t[n];s!==e&&s!==o||(t[n]=o,a[i++]=n)}return a}function nn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function rn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function an(t){return Ze(t)?function(t){for(var e=qt.lastIndex=0;qt.test(t);)++e;return e}(t):Ae(t)}function sn(t){return Ze(t)?function(t){return t.match(qt)||[]}(t):function(t){return t.split("")}(t)}function on(t){for(var e=t.length;e--&&it.test(t.charAt(e)););return e}var un=Le({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),cn=function t(e){var n,r=(e=null==e?ae:cn.defaults(ae.Object(),e,cn.pick(ae,Kt))).Array,it=e.Date,bt=e.Error,Et=e.Function,It=e.Math,Mt=e.Object,Ot=e.RegExp,Rt=e.String,St=e.TypeError,Tt=r.prototype,Pt=Et.prototype,At=Mt.prototype,Ft=e["__core-js_shared__"],xt=Pt.toString,Ct=At.hasOwnProperty,kt=0,Nt=(n=/[^.]+$/.exec(Ft&&Ft.keys&&Ft.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",jt=At.toString,Dt=xt.call(Mt),Lt=ae._,Ut=Ot("^"+xt.call(Ct).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ht=ue?e.Buffer:i,Bt=e.Symbol,Gt=e.Uint8Array,Vt=Ht?Ht.allocUnsafe:i,qt=tn(Mt.getPrototypeOf,Mt),Yt=Mt.create,te=At.propertyIsEnumerable,re=Tt.splice,ie=Bt?Bt.isConcatSpreadable:i,se=Bt?Bt.iterator:i,oe=Bt?Bt.toStringTag:i,ce=function(){try{var t=ca(Mt,"defineProperty");return t({},"",{}),t}catch(t){}}(),le=e.clearTimeout!==ae.clearTimeout&&e.clearTimeout,Ae=it&&it.now!==ae.Date.now&&it.now,Le=e.setTimeout!==ae.setTimeout&&e.setTimeout,ln=It.ceil,hn=It.floor,fn=Mt.getOwnPropertySymbols,dn=Ht?Ht.isBuffer:i,pn=e.isFinite,mn=Tt.join,vn=tn(Mt.keys,Mt),gn=It.max,yn=It.min,_n=it.now,wn=e.parseInt,bn=It.random,En=Tt.reverse,In=ca(e,"DataView"),Mn=ca(e,"Map"),On=ca(e,"Promise"),Rn=ca(e,"Set"),Sn=ca(e,"WeakMap"),Tn=ca(Mt,"create"),Pn=Sn&&new Sn,An={},Fn=La(In),xn=La(Mn),Cn=La(On),kn=La(Rn),Nn=La(Sn),jn=Bt?Bt.prototype:i,Dn=jn?jn.valueOf:i,Ln=jn?jn.toString:i;function Un(t){if(eo(t)&&!Ws(t)&&!(t instanceof Vn)){if(t instanceof Gn)return t;if(Ct.call(t,"__wrapped__"))return Ua(t)}return new Gn(t)}var Hn=function(){function t(){}return function(e){if(!to(e))return{};if(Yt)return Yt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function Bn(){}function Gn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Vn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Wn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Xn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function qn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function zn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new qn;++e<n;)this.add(t[e])}function Yn(t){var e=this.__data__=new Xn(t);this.size=e.size}function Jn(t,e){var n=Ws(t),r=!n&&Vs(t),i=!n&&!r&&Ys(t),a=!n&&!r&&!i&&co(t),s=n||r||i||a,o=s?Be(t.length,Rt):[],u=o.length;for(var c in t)!e&&!Ct.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||va(c,u))||o.push(c);return o}function Kn(t){var e=t.length;return e?t[qr(0,e-1)]:i}function Qn(t,e){return Ca(Si(t),sr(e,0,t.length))}function Zn(t){return Ca(Si(t))}function $n(t,e,n){(n!==i&&!Hs(t[e],n)||n===i&&!(e in t))&&ir(t,e,n)}function tr(t,e,n){var r=t[e];Ct.call(t,e)&&Hs(r,n)&&(n!==i||e in t)||ir(t,e,n)}function er(t,e){for(var n=t.length;n--;)if(Hs(t[n][0],e))return n;return-1}function nr(t,e,n,r){return hr(t,(function(t,i,a){e(r,t,n(t),a)})),r}function rr(t,e){return t&&Ti(e,xo(e),t)}function ir(t,e,n){"__proto__"==e&&ce?ce(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ar(t,e){for(var n=-1,a=e.length,s=r(a),o=null==t;++n<a;)s[n]=o?i:So(t,e[n]);return s}function sr(t,e,n){return t==t&&(n!==i&&(t=t<=n?t:n),e!==i&&(t=t>=e?t:e)),t}function or(t,e,n,r,a,s){var o,u=1&e,c=2&e,l=4&e;if(n&&(o=a?n(t,r,a,s):n(t)),o!==i)return o;if(!to(t))return t;var h=Ws(t);if(h){if(o=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Ct.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return Si(t,o)}else{var f=fa(t),d=f==w||f==b;if(Ys(t))return bi(t,u);if(f==M||f==m||d&&!a){if(o=c||d?{}:pa(t),!u)return c?function(t,e){return Ti(t,ha(t),e)}(t,function(t,e){return t&&Ti(e,Co(e),t)}(o,t)):function(t,e){return Ti(t,la(t),e)}(t,rr(o,t))}else{if(!$t[f])return a?t:{};o=function(t,e,n){var r,i=t.constructor;switch(e){case F:return Ei(t);case g:case y:return new i(+t);case x:return function(t,e){var n=e?Ei(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case C:case k:case N:case j:case D:case L:case U:case H:case B:return Ii(t,n);case E:case S:return new i;case I:case T:return new i(t);case R:return function(t){var e=new t.constructor(t.source,ft.exec(t));return e.lastIndex=t.lastIndex,e}(t);case P:return r=t,Dn?Mt(Dn.call(r)):{}}}(t,f,u)}}s||(s=new Yn);var p=s.get(t);if(p)return p;s.set(t,o),so(t)?t.forEach((function(r){o.add(or(r,e,n,r,t,s))})):no(t)&&t.forEach((function(r,i){o.set(i,or(r,e,n,i,t,s))}));var v=h?i:(l?c?na:ea:c?Co:xo)(t);return _e(v||t,(function(r,i){v&&(r=t[i=r]),tr(o,i,or(r,e,n,i,t,s))})),o}function ur(t,e,n){var r=n.length;if(null==t)return!r;for(t=Mt(t);r--;){var a=n[r],s=e[a],o=t[a];if(o===i&&!(a in t)||!s(o))return!1}return!0}function cr(t,e,n){if("function"!=typeof t)throw new St(a);return Pa((function(){t.apply(i,n)}),e)}function lr(t,e,n,r){var i=-1,a=Ie,s=!0,o=t.length,u=[],c=e.length;if(!o)return u;n&&(e=Oe(e,Ve(n))),r?(a=Me,s=!1):e.length>=200&&(a=Xe,s=!1,e=new zn(e));t:for(;++i<o;){var l=t[i],h=null==n?l:n(l);if(l=r||0!==l?l:0,s&&h==h){for(var f=c;f--;)if(e[f]===h)continue t;u.push(l)}else a(e,h,r)||u.push(l)}return u}Un.templateSettings={escape:J,evaluate:K,interpolate:Q,variable:"",imports:{_:Un}},Un.prototype=Bn.prototype,Un.prototype.constructor=Un,Gn.prototype=Hn(Bn.prototype),Gn.prototype.constructor=Gn,Vn.prototype=Hn(Bn.prototype),Vn.prototype.constructor=Vn,Wn.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},Wn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Wn.prototype.get=function(t){var e=this.__data__;if(Tn){var n=e[t];return n===s?i:n}return Ct.call(e,t)?e[t]:i},Wn.prototype.has=function(t){var e=this.__data__;return Tn?e[t]!==i:Ct.call(e,t)},Wn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Tn&&e===i?s:e,this},Xn.prototype.clear=function(){this.__data__=[],this.size=0},Xn.prototype.delete=function(t){var e=this.__data__,n=er(e,t);return!(n<0||(n==e.length-1?e.pop():re.call(e,n,1),--this.size,0))},Xn.prototype.get=function(t){var e=this.__data__,n=er(e,t);return n<0?i:e[n][1]},Xn.prototype.has=function(t){return er(this.__data__,t)>-1},Xn.prototype.set=function(t,e){var n=this.__data__,r=er(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(Mn||Xn),string:new Wn}},qn.prototype.delete=function(t){var e=oa(this,t).delete(t);return this.size-=e?1:0,e},qn.prototype.get=function(t){return oa(this,t).get(t)},qn.prototype.has=function(t){return oa(this,t).has(t)},qn.prototype.set=function(t,e){var n=oa(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},zn.prototype.add=zn.prototype.push=function(t){return this.__data__.set(t,s),this},zn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.clear=function(){this.__data__=new Xn,this.size=0},Yn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Yn.prototype.get=function(t){return this.__data__.get(t)},Yn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Xn){var r=n.__data__;if(!Mn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new qn(r)}return n.set(t,e),this.size=n.size,this};var hr=Fi(_r),fr=Fi(wr,!0);function dr(t,e){var n=!0;return hr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function pr(t,e,n){for(var r=-1,a=t.length;++r<a;){var s=t[r],o=e(s);if(null!=o&&(u===i?o==o&&!uo(o):n(o,u)))var u=o,c=s}return c}function mr(t,e){var n=[];return hr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function vr(t,e,n,r,i){var a=-1,s=t.length;for(n||(n=ma),i||(i=[]);++a<s;){var o=t[a];e>0&&n(o)?e>1?vr(o,e-1,n,r,i):Re(i,o):r||(i[i.length]=o)}return i}var gr=xi(),yr=xi(!0);function _r(t,e){return t&&gr(t,e,xo)}function wr(t,e){return t&&yr(t,e,xo)}function br(t,e){return Ee(e,(function(e){return Qs(t[e])}))}function Er(t,e){for(var n=0,r=(e=gi(e,t)).length;null!=t&&n<r;)t=t[Da(e[n++])];return n&&n==r?t:i}function Ir(t,e,n){var r=e(t);return Ws(t)?r:Re(r,n(t))}function Mr(t){return null==t?t===i?"[object Undefined]":"[object Null]":oe&&oe in Mt(t)?function(t){var e=Ct.call(t,oe),n=t[oe];try{t[oe]=i;var r=!0}catch(t){}var a=jt.call(t);return r&&(e?t[oe]=n:delete t[oe]),a}(t):function(t){return jt.call(t)}(t)}function Or(t,e){return t>e}function Rr(t,e){return null!=t&&Ct.call(t,e)}function Sr(t,e){return null!=t&&e in Mt(t)}function Tr(t,e,n){for(var a=n?Me:Ie,s=t[0].length,o=t.length,u=o,c=r(o),l=1/0,h=[];u--;){var f=t[u];u&&e&&(f=Oe(f,Ve(e))),l=yn(f.length,l),c[u]=!n&&(e||s>=120&&f.length>=120)?new zn(u&&f):i}f=t[0];var d=-1,p=c[0];t:for(;++d<s&&h.length<l;){var m=f[d],v=e?e(m):m;if(m=n||0!==m?m:0,!(p?Xe(p,v):a(h,v,n))){for(u=o;--u;){var g=c[u];if(!(g?Xe(g,v):a(t[u],v,n)))continue t}p&&p.push(v),h.push(m)}}return h}function Pr(t,e,n){var r=null==(t=Oa(t,e=gi(e,t)))?t:t[Da(Ka(e))];return null==r?i:ge(r,t,n)}function Ar(t){return eo(t)&&Mr(t)==m}function Fr(t,e,n,r,a){return t===e||(null==t||null==e||!eo(t)&&!eo(e)?t!=t&&e!=e:function(t,e,n,r,a,s){var o=Ws(t),u=Ws(e),c=o?v:fa(t),l=u?v:fa(e),h=(c=c==m?M:c)==M,f=(l=l==m?M:l)==M,d=c==l;if(d&&Ys(t)){if(!Ys(e))return!1;o=!0,h=!1}if(d&&!h)return s||(s=new Yn),o||co(t)?$i(t,e,n,r,a,s):function(t,e,n,r,i,a,s){switch(n){case x:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case F:return!(t.byteLength!=e.byteLength||!a(new Gt(t),new Gt(e)));case g:case y:case I:return Hs(+t,+e);case _:return t.name==e.name&&t.message==e.message;case R:case T:return t==e+"";case E:var o=$e;case S:var u=1&r;if(o||(o=nn),t.size!=e.size&&!u)return!1;var c=s.get(t);if(c)return c==e;r|=2,s.set(t,e);var l=$i(o(t),o(e),r,i,a,s);return s.delete(t),l;case P:if(Dn)return Dn.call(t)==Dn.call(e)}return!1}(t,e,c,n,r,a,s);if(!(1&n)){var p=h&&Ct.call(t,"__wrapped__"),w=f&&Ct.call(e,"__wrapped__");if(p||w){var b=p?t.value():t,O=w?e.value():e;return s||(s=new Yn),a(b,O,n,r,s)}}return!!d&&(s||(s=new Yn),function(t,e,n,r,a,s){var o=1&n,u=ea(t),c=u.length;if(c!=ea(e).length&&!o)return!1;for(var l=c;l--;){var h=u[l];if(!(o?h in e:Ct.call(e,h)))return!1}var f=s.get(t),d=s.get(e);if(f&&d)return f==e&&d==t;var p=!0;s.set(t,e),s.set(e,t);for(var m=o;++l<c;){var v=t[h=u[l]],g=e[h];if(r)var y=o?r(g,v,h,e,t,s):r(v,g,h,t,e,s);if(!(y===i?v===g||a(v,g,n,r,s):y)){p=!1;break}m||(m="constructor"==h)}if(p&&!m){var _=t.constructor,w=e.constructor;_==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w||(p=!1)}return s.delete(t),s.delete(e),p}(t,e,n,r,a,s))}(t,e,n,r,Fr,a))}function xr(t,e,n,r){var a=n.length,s=a,o=!r;if(null==t)return!s;for(t=Mt(t);a--;){var u=n[a];if(o&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++a<s;){var c=(u=n[a])[0],l=t[c],h=u[1];if(o&&u[2]){if(l===i&&!(c in t))return!1}else{var f=new Yn;if(r)var d=r(l,h,c,t,e,f);if(!(d===i?Fr(h,l,3,r,f):d))return!1}}return!0}function Cr(t){return!(!to(t)||(e=t,Nt&&Nt in e))&&(Qs(t)?Ut:mt).test(La(t));var e}function kr(t){return"function"==typeof t?t:null==t?iu:"object"==typeof t?Ws(t)?Ur(t[0],t[1]):Lr(t):du(t)}function Nr(t){if(!ba(t))return vn(t);var e=[];for(var n in Mt(t))Ct.call(t,n)&&"constructor"!=n&&e.push(n);return e}function jr(t,e){return t<e}function Dr(t,e){var n=-1,i=qs(t)?r(t.length):[];return hr(t,(function(t,r,a){i[++n]=e(t,r,a)})),i}function Lr(t){var e=ua(t);return 1==e.length&&e[0][2]?Ia(e[0][0],e[0][1]):function(n){return n===t||xr(n,t,e)}}function Ur(t,e){return ya(t)&&Ea(e)?Ia(Da(t),e):function(n){var r=So(n,t);return r===i&&r===e?To(n,t):Fr(e,r,3)}}function Hr(t,e,n,r,a){t!==e&&gr(e,(function(s,o){if(a||(a=new Yn),to(s))!function(t,e,n,r,a,s,o){var u=Sa(t,n),c=Sa(e,n),l=o.get(c);if(l)$n(t,n,l);else{var h=s?s(u,c,n+"",t,e,o):i,f=h===i;if(f){var d=Ws(c),p=!d&&Ys(c),m=!d&&!p&&co(c);h=c,d||p||m?Ws(u)?h=u:zs(u)?h=Si(u):p?(f=!1,h=bi(c,!0)):m?(f=!1,h=Ii(c,!0)):h=[]:io(c)||Vs(c)?(h=u,Vs(u)?h=yo(u):to(u)&&!Qs(u)||(h=pa(c))):f=!1}f&&(o.set(c,h),a(h,c,r,s,o),o.delete(c)),$n(t,n,h)}}(t,e,o,n,Hr,r,a);else{var u=r?r(Sa(t,o),s,o+"",t,e,a):i;u===i&&(u=s),$n(t,o,u)}}),Co)}function Br(t,e){var n=t.length;if(n)return va(e+=e<0?n:0,n)?t[e]:i}function Gr(t,e,n){e=e.length?Oe(e,(function(t){return Ws(t)?function(e){return Er(e,1===t.length?t[0]:t)}:t})):[iu];var r=-1;e=Oe(e,Ve(sa()));var i=Dr(t,(function(t,n,i){var a=Oe(e,(function(e){return e(t)}));return{criteria:a,index:++r,value:t}}));return function(t,e){var r=t.length;for(t.sort((function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,a=e.criteria,s=i.length,o=n.length;++r<s;){var u=Mi(i[r],a[r]);if(u)return r>=o?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(i)}function Vr(t,e,n){for(var r=-1,i=e.length,a={};++r<i;){var s=e[r],o=Er(t,s);n(o,s)&&Qr(a,gi(s,t),o)}return a}function Wr(t,e,n,r){var i=r?ke:Ce,a=-1,s=e.length,o=t;for(t===e&&(e=Si(e)),n&&(o=Oe(t,Ve(n)));++a<s;)for(var u=0,c=e[a],l=n?n(c):c;(u=i(o,l,u,r))>-1;)o!==t&&re.call(o,u,1),re.call(t,u,1);return t}function Xr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==a){var a=i;va(i)?re.call(t,i,1):ci(t,i)}}return t}function qr(t,e){return t+hn(bn()*(e-t+1))}function zr(t,e){var n="";if(!t||e<1||e>h)return n;do{e%2&&(n+=t),(e=hn(e/2))&&(t+=t)}while(e);return n}function Yr(t,e){return Aa(Ma(t,e,iu),t+"")}function Jr(t){return Kn(Bo(t))}function Kr(t,e){var n=Bo(t);return Ca(n,sr(e,0,n.length))}function Qr(t,e,n,r){if(!to(t))return t;for(var a=-1,s=(e=gi(e,t)).length,o=s-1,u=t;null!=u&&++a<s;){var c=Da(e[a]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(a!=o){var h=u[c];(l=r?r(h,c,u):i)===i&&(l=to(h)?h:va(e[a+1])?[]:{})}tr(u,c,l),u=u[c]}return t}var Zr=Pn?function(t,e){return Pn.set(t,e),t}:iu,$r=ce?function(t,e){return ce(t,"toString",{configurable:!0,enumerable:!1,value:eu(e),writable:!0})}:iu;function ti(t){return Ca(Bo(t))}function ei(t,e,n){var i=-1,a=t.length;e<0&&(e=-e>a?0:a+e),(n=n>a?a:n)<0&&(n+=a),a=e>n?0:n-e>>>0,e>>>=0;for(var s=r(a);++i<a;)s[i]=t[i+e];return s}function ni(t,e){var n;return hr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function ri(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var a=r+i>>>1,s=t[a];null!==s&&!uo(s)&&(n?s<=e:s<e)?r=a+1:i=a}return i}return ii(t,e,iu,n)}function ii(t,e,n,r){var a=0,s=null==t?0:t.length;if(0===s)return 0;for(var o=(e=n(e))!=e,u=null===e,c=uo(e),l=e===i;a<s;){var h=hn((a+s)/2),f=n(t[h]),d=f!==i,p=null===f,m=f==f,v=uo(f);if(o)var g=r||m;else g=l?m&&(r||d):u?m&&d&&(r||!p):c?m&&d&&!p&&(r||!v):!p&&!v&&(r?f<=e:f<e);g?a=h+1:s=h}return yn(s,4294967294)}function ai(t,e){for(var n=-1,r=t.length,i=0,a=[];++n<r;){var s=t[n],o=e?e(s):s;if(!n||!Hs(o,u)){var u=o;a[i++]=0===s?0:s}}return a}function si(t){return"number"==typeof t?t:uo(t)?f:+t}function oi(t){if("string"==typeof t)return t;if(Ws(t))return Oe(t,oi)+"";if(uo(t))return Ln?Ln.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ui(t,e,n){var r=-1,i=Ie,a=t.length,s=!0,o=[],u=o;if(n)s=!1,i=Me;else if(a>=200){var c=e?null:zi(t);if(c)return nn(c);s=!1,i=Xe,u=new zn}else u=e?[]:o;t:for(;++r<a;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,s&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),o.push(l)}else i(u,h,n)||(u!==o&&u.push(h),o.push(l))}return o}function ci(t,e){return null==(t=Oa(t,e=gi(e,t)))||delete t[Da(Ka(e))]}function li(t,e,n,r){return Qr(t,e,n(Er(t,e)),r)}function hi(t,e,n,r){for(var i=t.length,a=r?i:-1;(r?a--:++a<i)&&e(t[a],a,t););return n?ei(t,r?0:a,r?a+1:i):ei(t,r?a+1:0,r?i:a)}function fi(t,e){var n=t;return n instanceof Vn&&(n=n.value()),Se(e,(function(t,e){return e.func.apply(e.thisArg,Re([t],e.args))}),n)}function di(t,e,n){var i=t.length;if(i<2)return i?ui(t[0]):[];for(var a=-1,s=r(i);++a<i;)for(var o=t[a],u=-1;++u<i;)u!=a&&(s[a]=lr(s[a]||o,t[u],e,n));return ui(vr(s,1),e,n)}function pi(t,e,n){for(var r=-1,a=t.length,s=e.length,o={};++r<a;){var u=r<s?e[r]:i;n(o,t[r],u)}return o}function mi(t){return zs(t)?t:[]}function vi(t){return"function"==typeof t?t:iu}function gi(t,e){return Ws(t)?t:ya(t,e)?[t]:ja(_o(t))}var yi=Yr;function _i(t,e,n){var r=t.length;return n=n===i?r:n,!e&&n>=r?t:ei(t,e,n)}var wi=le||function(t){return ae.clearTimeout(t)};function bi(t,e){if(e)return t.slice();var n=t.length,r=Vt?Vt(n):new t.constructor(n);return t.copy(r),r}function Ei(t){var e=new t.constructor(t.byteLength);return new Gt(e).set(new Gt(t)),e}function Ii(t,e){var n=e?Ei(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Mi(t,e){if(t!==e){var n=t!==i,r=null===t,a=t==t,s=uo(t),o=e!==i,u=null===e,c=e==e,l=uo(e);if(!u&&!l&&!s&&t>e||s&&o&&c&&!u&&!l||r&&o&&c||!n&&c||!a)return 1;if(!r&&!s&&!l&&t<e||l&&n&&a&&!r&&!s||u&&n&&a||!o&&a||!c)return-1}return 0}function Oi(t,e,n,i){for(var a=-1,s=t.length,o=n.length,u=-1,c=e.length,l=gn(s-o,0),h=r(c+l),f=!i;++u<c;)h[u]=e[u];for(;++a<o;)(f||a<s)&&(h[n[a]]=t[a]);for(;l--;)h[u++]=t[a++];return h}function Ri(t,e,n,i){for(var a=-1,s=t.length,o=-1,u=n.length,c=-1,l=e.length,h=gn(s-u,0),f=r(h+l),d=!i;++a<h;)f[a]=t[a];for(var p=a;++c<l;)f[p+c]=e[c];for(;++o<u;)(d||a<s)&&(f[p+n[o]]=t[a++]);return f}function Si(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function Ti(t,e,n,r){var a=!n;n||(n={});for(var s=-1,o=e.length;++s<o;){var u=e[s],c=r?r(n[u],t[u],u,n,t):i;c===i&&(c=t[u]),a?ir(n,u,c):tr(n,u,c)}return n}function Pi(t,e){return function(n,r){var i=Ws(n)?ye:nr,a=e?e():{};return i(n,t,sa(r,2),a)}}function Ai(t){return Yr((function(e,n){var r=-1,a=n.length,s=a>1?n[a-1]:i,o=a>2?n[2]:i;for(s=t.length>3&&"function"==typeof s?(a--,s):i,o&&ga(n[0],n[1],o)&&(s=a<3?i:s,a=1),e=Mt(e);++r<a;){var u=n[r];u&&t(e,u,r,s)}return e}))}function Fi(t,e){return function(n,r){if(null==n)return n;if(!qs(n))return t(n,r);for(var i=n.length,a=e?i:-1,s=Mt(n);(e?a--:++a<i)&&!1!==r(s[a],a,s););return n}}function xi(t){return function(e,n,r){for(var i=-1,a=Mt(e),s=r(e),o=s.length;o--;){var u=s[t?o:++i];if(!1===n(a[u],u,a))break}return e}}function Ci(t){return function(e){var n=Ze(e=_o(e))?sn(e):i,r=n?n[0]:e.charAt(0),a=n?_i(n,1).join(""):e.slice(1);return r[t]()+a}}function ki(t){return function(e){return Se(Zo(Wo(e).replace(Wt,"")),t,"")}}function Ni(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Hn(t.prototype),r=t.apply(n,e);return to(r)?r:n}}function ji(t){return function(e,n,r){var a=Mt(e);if(!qs(e)){var s=sa(n,3);e=xo(e),n=function(t){return s(a[t],t,a)}}var o=t(e,n,r);return o>-1?a[s?e[o]:o]:i}}function Di(t){return ta((function(e){var n=e.length,r=n,s=Gn.prototype.thru;for(t&&e.reverse();r--;){var o=e[r];if("function"!=typeof o)throw new St(a);if(s&&!u&&"wrapper"==ia(o))var u=new Gn([],!0)}for(r=u?r:n;++r<n;){var c=ia(o=e[r]),l="wrapper"==c?ra(o):i;u=l&&_a(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[ia(l[0])].apply(u,l[3]):1==o.length&&_a(o)?u[c]():u.thru(o)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Ws(r))return u.plant(r).value();for(var i=0,a=n?e[i].apply(this,t):r;++i<n;)a=e[i].call(this,a);return a}}))}function Li(t,e,n,a,s,o,u,l,h,f){var d=e&c,p=1&e,m=2&e,v=24&e,g=512&e,y=m?i:Ni(t);return function i(){for(var c=arguments.length,_=r(c),w=c;w--;)_[w]=arguments[w];if(v)var b=aa(i),E=Ye(_,b);if(a&&(_=Oi(_,a,s,v)),o&&(_=Ri(_,o,u,v)),c-=E,v&&c<f){var I=en(_,b);return Xi(t,e,Li,i.placeholder,n,_,I,l,h,f-c)}var M=p?n:this,O=m?M[t]:t;return c=_.length,l?_=Ra(_,l):g&&c>1&&_.reverse(),d&&h<c&&(_.length=h),this&&this!==ae&&this instanceof i&&(O=y||Ni(O)),O.apply(M,_)}}function Ui(t,e){return function(n,r){return function(t,e,n,r){return _r(t,(function(t,i,a){e(r,n(t),i,a)})),r}(n,t,e(r),{})}}function Hi(t,e){return function(n,r){var a;if(n===i&&r===i)return e;if(n!==i&&(a=n),r!==i){if(a===i)return r;"string"==typeof n||"string"==typeof r?(n=oi(n),r=oi(r)):(n=si(n),r=si(r)),a=t(n,r)}return a}}function Bi(t){return ta((function(e){return e=Oe(e,Ve(sa())),Yr((function(n){var r=this;return t(e,(function(t){return ge(t,r,n)}))}))}))}function Gi(t,e){var n=(e=e===i?" ":oi(e)).length;if(n<2)return n?zr(e,t):e;var r=zr(e,ln(t/an(e)));return Ze(e)?_i(sn(r),0,t).join(""):r.slice(0,t)}function Vi(t){return function(e,n,a){return a&&"number"!=typeof a&&ga(e,n,a)&&(n=a=i),e=po(e),n===i?(n=e,e=0):n=po(n),function(t,e,n,i){for(var a=-1,s=gn(ln((e-t)/(n||1)),0),o=r(s);s--;)o[i?s:++a]=t,t+=n;return o}(e,n,a=a===i?e<n?1:-1:po(a),t)}}function Wi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=go(e),n=go(n)),t(e,n)}}function Xi(t,e,n,r,a,s,o,c,l,h){var f=8&e;e|=f?u:64,4&(e&=~(f?64:u))||(e&=-4);var d=[t,e,a,f?s:i,f?o:i,f?i:s,f?i:o,c,l,h],p=n.apply(i,d);return _a(t)&&Ta(p,d),p.placeholder=r,Fa(p,t,e)}function qi(t){var e=It[t];return function(t,n){if(t=go(t),(n=null==n?0:yn(mo(n),292))&&pn(t)){var r=(_o(t)+"e").split("e");return+((r=(_o(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var zi=Rn&&1/nn(new Rn([,-0]))[1]==l?function(t){return new Rn(t)}:cu;function Yi(t){return function(e){var n=fa(e);return n==E?$e(e):n==S?rn(e):function(t,e){return Oe(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Ji(t,e,n,s,l,h,f,d){var p=2&e;if(!p&&"function"!=typeof t)throw new St(a);var m=s?s.length:0;if(m||(e&=-97,s=l=i),f=f===i?f:gn(mo(f),0),d=d===i?d:mo(d),m-=l?l.length:0,64&e){var v=s,g=l;s=l=i}var y=p?i:ra(t),_=[t,e,n,s,l,v,g,h,f,d];if(y&&function(t,e){var n=t[1],r=e[1],i=n|r,a=i<131,s=r==c&&8==n||r==c&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!a&&!s)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var u=e[3];if(u){var l=t[3];t[3]=l?Oi(l,u,e[4]):u,t[4]=l?en(t[3],o):e[4]}(u=e[5])&&(l=t[5],t[5]=l?Ri(l,u,e[6]):u,t[6]=l?en(t[5],o):e[6]),(u=e[7])&&(t[7]=u),r&c&&(t[8]=null==t[8]?e[8]:yn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(_,y),t=_[0],e=_[1],n=_[2],s=_[3],l=_[4],!(d=_[9]=_[9]===i?p?0:t.length:gn(_[9]-m,0))&&24&e&&(e&=-25),e&&1!=e)w=8==e||16==e?function(t,e,n){var a=Ni(t);return function s(){for(var o=arguments.length,u=r(o),c=o,l=aa(s);c--;)u[c]=arguments[c];var h=o<3&&u[0]!==l&&u[o-1]!==l?[]:en(u,l);return(o-=h.length)<n?Xi(t,e,Li,s.placeholder,i,u,h,i,i,n-o):ge(this&&this!==ae&&this instanceof s?a:t,this,u)}}(t,e,d):e!=u&&33!=e||l.length?Li.apply(i,_):function(t,e,n,i){var a=1&e,s=Ni(t);return function e(){for(var o=-1,u=arguments.length,c=-1,l=i.length,h=r(l+u),f=this&&this!==ae&&this instanceof e?s:t;++c<l;)h[c]=i[c];for(;u--;)h[c++]=arguments[++o];return ge(f,a?n:this,h)}}(t,e,n,s);else var w=function(t,e,n){var r=1&e,i=Ni(t);return function e(){return(this&&this!==ae&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return Fa((y?Zr:Ta)(w,_),t,e)}function Ki(t,e,n,r){return t===i||Hs(t,At[n])&&!Ct.call(r,n)?e:t}function Qi(t,e,n,r,a,s){return to(t)&&to(e)&&(s.set(e,t),Hr(t,e,i,Qi,s),s.delete(e)),t}function Zi(t){return io(t)?i:t}function $i(t,e,n,r,a,s){var o=1&n,u=t.length,c=e.length;if(u!=c&&!(o&&c>u))return!1;var l=s.get(t),h=s.get(e);if(l&&h)return l==e&&h==t;var f=-1,d=!0,p=2&n?new zn:i;for(s.set(t,e),s.set(e,t);++f<u;){var m=t[f],v=e[f];if(r)var g=o?r(v,m,f,e,t,s):r(m,v,f,t,e,s);if(g!==i){if(g)continue;d=!1;break}if(p){if(!Pe(e,(function(t,e){if(!Xe(p,e)&&(m===t||a(m,t,n,r,s)))return p.push(e)}))){d=!1;break}}else if(m!==v&&!a(m,v,n,r,s)){d=!1;break}}return s.delete(t),s.delete(e),d}function ta(t){return Aa(Ma(t,i,Xa),t+"")}function ea(t){return Ir(t,xo,la)}function na(t){return Ir(t,Co,ha)}var ra=Pn?function(t){return Pn.get(t)}:cu;function ia(t){for(var e=t.name+"",n=An[e],r=Ct.call(An,e)?n.length:0;r--;){var i=n[r],a=i.func;if(null==a||a==t)return i.name}return e}function aa(t){return(Ct.call(Un,"placeholder")?Un:t).placeholder}function sa(){var t=Un.iteratee||au;return t=t===au?kr:t,arguments.length?t(arguments[0],arguments[1]):t}function oa(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function ua(t){for(var e=xo(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Ea(i)]}return e}function ca(t,e){var n=function(t,e){return null==t?i:t[e]}(t,e);return Cr(n)?n:i}var la=fn?function(t){return null==t?[]:(t=Mt(t),Ee(fn(t),(function(e){return te.call(t,e)})))}:vu,ha=fn?function(t){for(var e=[];t;)Re(e,la(t)),t=qt(t);return e}:vu,fa=Mr;function da(t,e,n){for(var r=-1,i=(e=gi(e,t)).length,a=!1;++r<i;){var s=Da(e[r]);if(!(a=null!=t&&n(t,s)))break;t=t[s]}return a||++r!=i?a:!!(i=null==t?0:t.length)&&$s(i)&&va(s,i)&&(Ws(t)||Vs(t))}function pa(t){return"function"!=typeof t.constructor||ba(t)?{}:Hn(qt(t))}function ma(t){return Ws(t)||Vs(t)||!!(ie&&t&&t[ie])}function va(t,e){var n=typeof t;return!!(e=null==e?h:e)&&("number"==n||"symbol"!=n&&gt.test(t))&&t>-1&&t%1==0&&t<e}function ga(t,e,n){if(!to(n))return!1;var r=typeof e;return!!("number"==r?qs(n)&&va(e,n.length):"string"==r&&e in n)&&Hs(n[e],t)}function ya(t,e){if(Ws(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!uo(t))||$.test(t)||!Z.test(t)||null!=e&&t in Mt(e)}function _a(t){var e=ia(t),n=Un[e];if("function"!=typeof n||!(e in Vn.prototype))return!1;if(t===n)return!0;var r=ra(n);return!!r&&t===r[0]}(In&&fa(new In(new ArrayBuffer(1)))!=x||Mn&&fa(new Mn)!=E||On&&fa(On.resolve())!=O||Rn&&fa(new Rn)!=S||Sn&&fa(new Sn)!=A)&&(fa=function(t){var e=Mr(t),n=e==M?t.constructor:i,r=n?La(n):"";if(r)switch(r){case Fn:return x;case xn:return E;case Cn:return O;case kn:return S;case Nn:return A}return e});var wa=Ft?Qs:gu;function ba(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||At)}function Ea(t){return t==t&&!to(t)}function Ia(t,e){return function(n){return null!=n&&n[t]===e&&(e!==i||t in Mt(n))}}function Ma(t,e,n){return e=gn(e===i?t.length-1:e,0),function(){for(var i=arguments,a=-1,s=gn(i.length-e,0),o=r(s);++a<s;)o[a]=i[e+a];a=-1;for(var u=r(e+1);++a<e;)u[a]=i[a];return u[e]=n(o),ge(t,this,u)}}function Oa(t,e){return e.length<2?t:Er(t,ei(e,0,-1))}function Ra(t,e){for(var n=t.length,r=yn(e.length,n),a=Si(t);r--;){var s=e[r];t[r]=va(s,n)?a[s]:i}return t}function Sa(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ta=xa(Zr),Pa=Le||function(t,e){return ae.setTimeout(t,e)},Aa=xa($r);function Fa(t,e,n){var r=e+"";return Aa(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(at,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return _e(p,(function(n){var r="_."+n[0];e&n[1]&&!Ie(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(ot):[]}(r),n)))}function xa(t){var e=0,n=0;return function(){var r=_n(),a=16-(r-n);if(n=r,a>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Ca(t,e){var n=-1,r=t.length,a=r-1;for(e=e===i?r:e;++n<e;){var s=qr(n,a),o=t[s];t[s]=t[n],t[n]=o}return t.length=e,t}var ka,Na,ja=(ka=ks((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,n,r,i){e.push(r?i.replace(lt,"$1"):n||t)})),e}),(function(t){return 500===Na.size&&Na.clear(),t})),Na=ka.cache,ka);function Da(t){if("string"==typeof t||uo(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function La(t){if(null!=t){try{return xt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ua(t){if(t instanceof Vn)return t.clone();var e=new Gn(t.__wrapped__,t.__chain__);return e.__actions__=Si(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Ha=Yr((function(t,e){return zs(t)?lr(t,vr(e,1,zs,!0)):[]})),Ba=Yr((function(t,e){var n=Ka(e);return zs(n)&&(n=i),zs(t)?lr(t,vr(e,1,zs,!0),sa(n,2)):[]})),Ga=Yr((function(t,e){var n=Ka(e);return zs(n)&&(n=i),zs(t)?lr(t,vr(e,1,zs,!0),i,n):[]}));function Va(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:mo(n);return i<0&&(i=gn(r+i,0)),xe(t,sa(e,3),i)}function Wa(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var a=r-1;return n!==i&&(a=mo(n),a=n<0?gn(r+a,0):yn(a,r-1)),xe(t,sa(e,3),a,!0)}function Xa(t){return null!=t&&t.length?vr(t,1):[]}function qa(t){return t&&t.length?t[0]:i}var za=Yr((function(t){var e=Oe(t,mi);return e.length&&e[0]===t[0]?Tr(e):[]})),Ya=Yr((function(t){var e=Ka(t),n=Oe(t,mi);return e===Ka(n)?e=i:n.pop(),n.length&&n[0]===t[0]?Tr(n,sa(e,2)):[]})),Ja=Yr((function(t){var e=Ka(t),n=Oe(t,mi);return(e="function"==typeof e?e:i)&&n.pop(),n.length&&n[0]===t[0]?Tr(n,i,e):[]}));function Ka(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Qa=Yr(Za);function Za(t,e){return t&&t.length&&e&&e.length?Wr(t,e):t}var $a=ta((function(t,e){var n=null==t?0:t.length,r=ar(t,e);return Xr(t,Oe(e,(function(t){return va(t,n)?+t:t})).sort(Mi)),r}));function ts(t){return null==t?t:En.call(t)}var es=Yr((function(t){return ui(vr(t,1,zs,!0))})),ns=Yr((function(t){var e=Ka(t);return zs(e)&&(e=i),ui(vr(t,1,zs,!0),sa(e,2))})),rs=Yr((function(t){var e=Ka(t);return e="function"==typeof e?e:i,ui(vr(t,1,zs,!0),i,e)}));function is(t){if(!t||!t.length)return[];var e=0;return t=Ee(t,(function(t){if(zs(t))return e=gn(t.length,e),!0})),Be(e,(function(e){return Oe(t,De(e))}))}function as(t,e){if(!t||!t.length)return[];var n=is(t);return null==e?n:Oe(n,(function(t){return ge(e,i,t)}))}var ss=Yr((function(t,e){return zs(t)?lr(t,e):[]})),os=Yr((function(t){return di(Ee(t,zs))})),us=Yr((function(t){var e=Ka(t);return zs(e)&&(e=i),di(Ee(t,zs),sa(e,2))})),cs=Yr((function(t){var e=Ka(t);return e="function"==typeof e?e:i,di(Ee(t,zs),i,e)})),ls=Yr(is),hs=Yr((function(t){var e=t.length,n=e>1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,as(t,n)}));function fs(t){var e=Un(t);return e.__chain__=!0,e}function ds(t,e){return e(t)}var ps=ta((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,a=function(e){return ar(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Vn&&va(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:ds,args:[a],thisArg:i}),new Gn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(a)})),ms=Pi((function(t,e,n){Ct.call(t,n)?++t[n]:ir(t,n,1)})),vs=ji(Va),gs=ji(Wa);function ys(t,e){return(Ws(t)?_e:hr)(t,sa(e,3))}function _s(t,e){return(Ws(t)?we:fr)(t,sa(e,3))}var ws=Pi((function(t,e,n){Ct.call(t,n)?t[n].push(e):ir(t,n,[e])})),bs=Yr((function(t,e,n){var i=-1,a="function"==typeof e,s=qs(t)?r(t.length):[];return hr(t,(function(t){s[++i]=a?ge(e,t,n):Pr(t,e,n)})),s})),Es=Pi((function(t,e,n){ir(t,n,e)}));function Is(t,e){return(Ws(t)?Oe:Dr)(t,sa(e,3))}var Ms=Pi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Os=Yr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&ga(t,e[0],e[1])?e=[]:n>2&&ga(e[0],e[1],e[2])&&(e=[e[0]]),Gr(t,vr(e,1),[])})),Rs=Ae||function(){return ae.Date.now()};function Ss(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,Ji(t,c,i,i,i,i,e)}function Ts(t,e){var n;if("function"!=typeof e)throw new St(a);return t=mo(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Ps=Yr((function(t,e,n){var r=1;if(n.length){var i=en(n,aa(Ps));r|=u}return Ji(t,r,e,n,i)})),As=Yr((function(t,e,n){var r=3;if(n.length){var i=en(n,aa(As));r|=u}return Ji(e,r,t,n,i)}));function Fs(t,e,n){var r,s,o,u,c,l,h=0,f=!1,d=!1,p=!0;if("function"!=typeof t)throw new St(a);function m(e){var n=r,a=s;return r=s=i,h=e,u=t.apply(a,n)}function v(t){return h=t,c=Pa(y,e),f?m(t):u}function g(t){var n=t-l;return l===i||n>=e||n<0||d&&t-h>=o}function y(){var t=Rs();if(g(t))return _(t);c=Pa(y,function(t){var n=e-(t-l);return d?yn(n,o-(t-h)):n}(t))}function _(t){return c=i,p&&r?m(t):(r=s=i,u)}function w(){var t=Rs(),n=g(t);if(r=arguments,s=this,l=t,n){if(c===i)return v(l);if(d)return wi(c),c=Pa(y,e),m(l)}return c===i&&(c=Pa(y,e)),u}return e=go(e)||0,to(n)&&(f=!!n.leading,o=(d="maxWait"in n)?gn(go(n.maxWait)||0,e):o,p="trailing"in n?!!n.trailing:p),w.cancel=function(){c!==i&&wi(c),h=0,r=l=s=c=i},w.flush=function(){return c===i?u:_(Rs())},w}var xs=Yr((function(t,e){return cr(t,1,e)})),Cs=Yr((function(t,e,n){return cr(t,go(e)||0,n)}));function ks(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new St(a);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var s=t.apply(this,r);return n.cache=a.set(i,s)||a,s};return n.cache=new(ks.Cache||qn),n}function Ns(t){if("function"!=typeof t)throw new St(a);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ks.Cache=qn;var js=yi((function(t,e){var n=(e=1==e.length&&Ws(e[0])?Oe(e[0],Ve(sa())):Oe(vr(e,1),Ve(sa()))).length;return Yr((function(r){for(var i=-1,a=yn(r.length,n);++i<a;)r[i]=e[i].call(this,r[i]);return ge(t,this,r)}))})),Ds=Yr((function(t,e){var n=en(e,aa(Ds));return Ji(t,u,i,e,n)})),Ls=Yr((function(t,e){var n=en(e,aa(Ls));return Ji(t,64,i,e,n)})),Us=ta((function(t,e){return Ji(t,256,i,i,i,e)}));function Hs(t,e){return t===e||t!=t&&e!=e}var Bs=Wi(Or),Gs=Wi((function(t,e){return t>=e})),Vs=Ar(function(){return arguments}())?Ar:function(t){return eo(t)&&Ct.call(t,"callee")&&!te.call(t,"callee")},Ws=r.isArray,Xs=he?Ve(he):function(t){return eo(t)&&Mr(t)==F};function qs(t){return null!=t&&$s(t.length)&&!Qs(t)}function zs(t){return eo(t)&&qs(t)}var Ys=dn||gu,Js=fe?Ve(fe):function(t){return eo(t)&&Mr(t)==y};function Ks(t){if(!eo(t))return!1;var e=Mr(t);return e==_||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!io(t)}function Qs(t){if(!to(t))return!1;var e=Mr(t);return e==w||e==b||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Zs(t){return"number"==typeof t&&t==mo(t)}function $s(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function to(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function eo(t){return null!=t&&"object"==typeof t}var no=de?Ve(de):function(t){return eo(t)&&fa(t)==E};function ro(t){return"number"==typeof t||eo(t)&&Mr(t)==I}function io(t){if(!eo(t)||Mr(t)!=M)return!1;var e=qt(t);if(null===e)return!0;var n=Ct.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&xt.call(n)==Dt}var ao=pe?Ve(pe):function(t){return eo(t)&&Mr(t)==R},so=me?Ve(me):function(t){return eo(t)&&fa(t)==S};function oo(t){return"string"==typeof t||!Ws(t)&&eo(t)&&Mr(t)==T}function uo(t){return"symbol"==typeof t||eo(t)&&Mr(t)==P}var co=ve?Ve(ve):function(t){return eo(t)&&$s(t.length)&&!!Zt[Mr(t)]},lo=Wi(jr),ho=Wi((function(t,e){return t<=e}));function fo(t){if(!t)return[];if(qs(t))return oo(t)?sn(t):Si(t);if(se&&t[se])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[se]());var e=fa(t);return(e==E?$e:e==S?nn:Bo)(t)}function po(t){return t?(t=go(t))===l||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function mo(t){var e=po(t),n=e%1;return e==e?n?e-n:e:0}function vo(t){return t?sr(mo(t),0,d):0}function go(t){if("number"==typeof t)return t;if(uo(t))return f;if(to(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=to(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ge(t);var n=pt.test(t);return n||vt.test(t)?ne(t.slice(2),n?2:8):dt.test(t)?f:+t}function yo(t){return Ti(t,Co(t))}function _o(t){return null==t?"":oi(t)}var wo=Ai((function(t,e){if(ba(e)||qs(e))Ti(e,xo(e),t);else for(var n in e)Ct.call(e,n)&&tr(t,n,e[n])})),bo=Ai((function(t,e){Ti(e,Co(e),t)})),Eo=Ai((function(t,e,n,r){Ti(e,Co(e),t,r)})),Io=Ai((function(t,e,n,r){Ti(e,xo(e),t,r)})),Mo=ta(ar),Oo=Yr((function(t,e){t=Mt(t);var n=-1,r=e.length,a=r>2?e[2]:i;for(a&&ga(e[0],e[1],a)&&(r=1);++n<r;)for(var s=e[n],o=Co(s),u=-1,c=o.length;++u<c;){var l=o[u],h=t[l];(h===i||Hs(h,At[l])&&!Ct.call(t,l))&&(t[l]=s[l])}return t})),Ro=Yr((function(t){return t.push(i,Qi),ge(No,i,t)}));function So(t,e,n){var r=null==t?i:Er(t,e);return r===i?n:r}function To(t,e){return null!=t&&da(t,e,Sr)}var Po=Ui((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),t[e]=n}),eu(iu)),Ao=Ui((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),Ct.call(t,e)?t[e].push(n):t[e]=[n]}),sa),Fo=Yr(Pr);function xo(t){return qs(t)?Jn(t):Nr(t)}function Co(t){return qs(t)?Jn(t,!0):function(t){if(!to(t))return function(t){var e=[];if(null!=t)for(var n in Mt(t))e.push(n);return e}(t);var e=ba(t),n=[];for(var r in t)("constructor"!=r||!e&&Ct.call(t,r))&&n.push(r);return n}(t)}var ko=Ai((function(t,e,n){Hr(t,e,n)})),No=Ai((function(t,e,n,r){Hr(t,e,n,r)})),jo=ta((function(t,e){var n={};if(null==t)return n;var r=!1;e=Oe(e,(function(e){return e=gi(e,t),r||(r=e.length>1),e})),Ti(t,na(t),n),r&&(n=or(n,7,Zi));for(var i=e.length;i--;)ci(n,e[i]);return n})),Do=ta((function(t,e){return null==t?{}:function(t,e){return Vr(t,e,(function(e,n){return To(t,n)}))}(t,e)}));function Lo(t,e){if(null==t)return{};var n=Oe(na(t),(function(t){return[t]}));return e=sa(e),Vr(t,n,(function(t,n){return e(t,n[0])}))}var Uo=Yi(xo),Ho=Yi(Co);function Bo(t){return null==t?[]:We(t,xo(t))}var Go=ki((function(t,e,n){return e=e.toLowerCase(),t+(n?Vo(e):e)}));function Vo(t){return Qo(_o(t).toLowerCase())}function Wo(t){return(t=_o(t))&&t.replace(yt,Je).replace(Xt,"")}var Xo=ki((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),qo=ki((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),zo=Ci("toLowerCase"),Yo=ki((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Jo=ki((function(t,e,n){return t+(n?" ":"")+Qo(e)})),Ko=ki((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Qo=Ci("toUpperCase");function Zo(t,e,n){return t=_o(t),(e=n?i:e)===i?function(t){return Jt.test(t)}(t)?function(t){return t.match(zt)||[]}(t):function(t){return t.match(ut)||[]}(t):t.match(e)||[]}var $o=Yr((function(t,e){try{return ge(t,i,e)}catch(t){return Ks(t)?t:new bt(t)}})),tu=ta((function(t,e){return _e(e,(function(e){e=Da(e),ir(t,e,Ps(t[e],t))})),t}));function eu(t){return function(){return t}}var nu=Di(),ru=Di(!0);function iu(t){return t}function au(t){return kr("function"==typeof t?t:or(t,1))}var su=Yr((function(t,e){return function(n){return Pr(n,t,e)}})),ou=Yr((function(t,e){return function(n){return Pr(t,n,e)}}));function uu(t,e,n){var r=xo(e),i=br(e,r);null!=n||to(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=br(e,xo(e)));var a=!(to(n)&&"chain"in n&&!n.chain),s=Qs(t);return _e(i,(function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(a||e){var n=t(this.__wrapped__),i=n.__actions__=Si(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Re([this.value()],arguments))})})),t}function cu(){}var lu=Bi(Oe),hu=Bi(be),fu=Bi(Pe);function du(t){return ya(t)?De(Da(t)):function(t){return function(e){return Er(e,t)}}(t)}var pu=Vi(),mu=Vi(!0);function vu(){return[]}function gu(){return!1}var yu,_u=Hi((function(t,e){return t+e}),0),wu=qi("ceil"),bu=Hi((function(t,e){return t/e}),1),Eu=qi("floor"),Iu=Hi((function(t,e){return t*e}),1),Mu=qi("round"),Ou=Hi((function(t,e){return t-e}),0);return Un.after=function(t,e){if("function"!=typeof e)throw new St(a);return t=mo(t),function(){if(--t<1)return e.apply(this,arguments)}},Un.ary=Ss,Un.assign=wo,Un.assignIn=bo,Un.assignInWith=Eo,Un.assignWith=Io,Un.at=Mo,Un.before=Ts,Un.bind=Ps,Un.bindAll=tu,Un.bindKey=As,Un.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ws(t)?t:[t]},Un.chain=fs,Un.chunk=function(t,e,n){e=(n?ga(t,e,n):e===i)?1:gn(mo(e),0);var a=null==t?0:t.length;if(!a||e<1)return[];for(var s=0,o=0,u=r(ln(a/e));s<a;)u[o++]=ei(t,s,s+=e);return u},Un.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var a=t[e];a&&(i[r++]=a)}return i},Un.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return Re(Ws(n)?Si(n):[n],vr(e,1))},Un.cond=function(t){var e=null==t?0:t.length,n=sa();return t=e?Oe(t,(function(t){if("function"!=typeof t[1])throw new St(a);return[n(t[0]),t[1]]})):[],Yr((function(n){for(var r=-1;++r<e;){var i=t[r];if(ge(i[0],this,n))return ge(i[1],this,n)}}))},Un.conforms=function(t){return function(t){var e=xo(t);return function(n){return ur(n,t,e)}}(or(t,1))},Un.constant=eu,Un.countBy=ms,Un.create=function(t,e){var n=Hn(t);return null==e?n:rr(n,e)},Un.curry=function t(e,n,r){var a=Ji(e,8,i,i,i,i,i,n=r?i:n);return a.placeholder=t.placeholder,a},Un.curryRight=function t(e,n,r){var a=Ji(e,16,i,i,i,i,i,n=r?i:n);return a.placeholder=t.placeholder,a},Un.debounce=Fs,Un.defaults=Oo,Un.defaultsDeep=Ro,Un.defer=xs,Un.delay=Cs,Un.difference=Ha,Un.differenceBy=Ba,Un.differenceWith=Ga,Un.drop=function(t,e,n){var r=null==t?0:t.length;return r?ei(t,(e=n||e===i?1:mo(e))<0?0:e,r):[]},Un.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?ei(t,0,(e=r-(e=n||e===i?1:mo(e)))<0?0:e):[]},Un.dropRightWhile=function(t,e){return t&&t.length?hi(t,sa(e,3),!0,!0):[]},Un.dropWhile=function(t,e){return t&&t.length?hi(t,sa(e,3),!0):[]},Un.fill=function(t,e,n,r){var a=null==t?0:t.length;return a?(n&&"number"!=typeof n&&ga(t,e,n)&&(n=0,r=a),function(t,e,n,r){var a=t.length;for((n=mo(n))<0&&(n=-n>a?0:a+n),(r=r===i||r>a?a:mo(r))<0&&(r+=a),r=n>r?0:vo(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Un.filter=function(t,e){return(Ws(t)?Ee:mr)(t,sa(e,3))},Un.flatMap=function(t,e){return vr(Is(t,e),1)},Un.flatMapDeep=function(t,e){return vr(Is(t,e),l)},Un.flatMapDepth=function(t,e,n){return n=n===i?1:mo(n),vr(Is(t,e),n)},Un.flatten=Xa,Un.flattenDeep=function(t){return null!=t&&t.length?vr(t,l):[]},Un.flattenDepth=function(t,e){return null!=t&&t.length?vr(t,e=e===i?1:mo(e)):[]},Un.flip=function(t){return Ji(t,512)},Un.flow=nu,Un.flowRight=ru,Un.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},Un.functions=function(t){return null==t?[]:br(t,xo(t))},Un.functionsIn=function(t){return null==t?[]:br(t,Co(t))},Un.groupBy=ws,Un.initial=function(t){return null!=t&&t.length?ei(t,0,-1):[]},Un.intersection=za,Un.intersectionBy=Ya,Un.intersectionWith=Ja,Un.invert=Po,Un.invertBy=Ao,Un.invokeMap=bs,Un.iteratee=au,Un.keyBy=Es,Un.keys=xo,Un.keysIn=Co,Un.map=Is,Un.mapKeys=function(t,e){var n={};return e=sa(e,3),_r(t,(function(t,r,i){ir(n,e(t,r,i),t)})),n},Un.mapValues=function(t,e){var n={};return e=sa(e,3),_r(t,(function(t,r,i){ir(n,r,e(t,r,i))})),n},Un.matches=function(t){return Lr(or(t,1))},Un.matchesProperty=function(t,e){return Ur(t,or(e,1))},Un.memoize=ks,Un.merge=ko,Un.mergeWith=No,Un.method=su,Un.methodOf=ou,Un.mixin=uu,Un.negate=Ns,Un.nthArg=function(t){return t=mo(t),Yr((function(e){return Br(e,t)}))},Un.omit=jo,Un.omitBy=function(t,e){return Lo(t,Ns(sa(e)))},Un.once=function(t){return Ts(2,t)},Un.orderBy=function(t,e,n,r){return null==t?[]:(Ws(e)||(e=null==e?[]:[e]),Ws(n=r?i:n)||(n=null==n?[]:[n]),Gr(t,e,n))},Un.over=lu,Un.overArgs=js,Un.overEvery=hu,Un.overSome=fu,Un.partial=Ds,Un.partialRight=Ls,Un.partition=Ms,Un.pick=Do,Un.pickBy=Lo,Un.property=du,Un.propertyOf=function(t){return function(e){return null==t?i:Er(t,e)}},Un.pull=Qa,Un.pullAll=Za,Un.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Wr(t,e,sa(n,2)):t},Un.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Wr(t,e,i,n):t},Un.pullAt=$a,Un.range=pu,Un.rangeRight=mu,Un.rearg=Us,Un.reject=function(t,e){return(Ws(t)?Ee:mr)(t,Ns(sa(e,3)))},Un.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],a=t.length;for(e=sa(e,3);++r<a;){var s=t[r];e(s,r,t)&&(n.push(s),i.push(r))}return Xr(t,i),n},Un.rest=function(t,e){if("function"!=typeof t)throw new St(a);return Yr(t,e=e===i?e:mo(e))},Un.reverse=ts,Un.sampleSize=function(t,e,n){return e=(n?ga(t,e,n):e===i)?1:mo(e),(Ws(t)?Qn:Kr)(t,e)},Un.set=function(t,e,n){return null==t?t:Qr(t,e,n)},Un.setWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:Qr(t,e,n,r)},Un.shuffle=function(t){return(Ws(t)?Zn:ti)(t)},Un.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&ga(t,e,n)?(e=0,n=r):(e=null==e?0:mo(e),n=n===i?r:mo(n)),ei(t,e,n)):[]},Un.sortBy=Os,Un.sortedUniq=function(t){return t&&t.length?ai(t):[]},Un.sortedUniqBy=function(t,e){return t&&t.length?ai(t,sa(e,2)):[]},Un.split=function(t,e,n){return n&&"number"!=typeof n&&ga(t,e,n)&&(e=n=i),(n=n===i?d:n>>>0)?(t=_o(t))&&("string"==typeof e||null!=e&&!ao(e))&&!(e=oi(e))&&Ze(t)?_i(sn(t),0,n):t.split(e,n):[]},Un.spread=function(t,e){if("function"!=typeof t)throw new St(a);return e=null==e?0:gn(mo(e),0),Yr((function(n){var r=n[e],i=_i(n,0,e);return r&&Re(i,r),ge(t,this,i)}))},Un.tail=function(t){var e=null==t?0:t.length;return e?ei(t,1,e):[]},Un.take=function(t,e,n){return t&&t.length?ei(t,0,(e=n||e===i?1:mo(e))<0?0:e):[]},Un.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ei(t,(e=r-(e=n||e===i?1:mo(e)))<0?0:e,r):[]},Un.takeRightWhile=function(t,e){return t&&t.length?hi(t,sa(e,3),!1,!0):[]},Un.takeWhile=function(t,e){return t&&t.length?hi(t,sa(e,3)):[]},Un.tap=function(t,e){return e(t),t},Un.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new St(a);return to(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Fs(t,e,{leading:r,maxWait:e,trailing:i})},Un.thru=ds,Un.toArray=fo,Un.toPairs=Uo,Un.toPairsIn=Ho,Un.toPath=function(t){return Ws(t)?Oe(t,Da):uo(t)?[t]:Si(ja(_o(t)))},Un.toPlainObject=yo,Un.transform=function(t,e,n){var r=Ws(t),i=r||Ys(t)||co(t);if(e=sa(e,4),null==n){var a=t&&t.constructor;n=i?r?new a:[]:to(t)&&Qs(a)?Hn(qt(t)):{}}return(i?_e:_r)(t,(function(t,r,i){return e(n,t,r,i)})),n},Un.unary=function(t){return Ss(t,1)},Un.union=es,Un.unionBy=ns,Un.unionWith=rs,Un.uniq=function(t){return t&&t.length?ui(t):[]},Un.uniqBy=function(t,e){return t&&t.length?ui(t,sa(e,2)):[]},Un.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?ui(t,i,e):[]},Un.unset=function(t,e){return null==t||ci(t,e)},Un.unzip=is,Un.unzipWith=as,Un.update=function(t,e,n){return null==t?t:li(t,e,vi(n))},Un.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:li(t,e,vi(n),r)},Un.values=Bo,Un.valuesIn=function(t){return null==t?[]:We(t,Co(t))},Un.without=ss,Un.words=Zo,Un.wrap=function(t,e){return Ds(vi(e),t)},Un.xor=os,Un.xorBy=us,Un.xorWith=cs,Un.zip=ls,Un.zipObject=function(t,e){return pi(t||[],e||[],tr)},Un.zipObjectDeep=function(t,e){return pi(t||[],e||[],Qr)},Un.zipWith=hs,Un.entries=Uo,Un.entriesIn=Ho,Un.extend=bo,Un.extendWith=Eo,uu(Un,Un),Un.add=_u,Un.attempt=$o,Un.camelCase=Go,Un.capitalize=Vo,Un.ceil=wu,Un.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=go(n))==n?n:0),e!==i&&(e=(e=go(e))==e?e:0),sr(go(t),e,n)},Un.clone=function(t){return or(t,4)},Un.cloneDeep=function(t){return or(t,5)},Un.cloneDeepWith=function(t,e){return or(t,5,e="function"==typeof e?e:i)},Un.cloneWith=function(t,e){return or(t,4,e="function"==typeof e?e:i)},Un.conformsTo=function(t,e){return null==e||ur(t,e,xo(e))},Un.deburr=Wo,Un.defaultTo=function(t,e){return null==t||t!=t?e:t},Un.divide=bu,Un.endsWith=function(t,e,n){t=_o(t),e=oi(e);var r=t.length,a=n=n===i?r:sr(mo(n),0,r);return(n-=e.length)>=0&&t.slice(n,a)==e},Un.eq=Hs,Un.escape=function(t){return(t=_o(t))&&Y.test(t)?t.replace(q,Ke):t},Un.escapeRegExp=function(t){return(t=_o(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Un.every=function(t,e,n){var r=Ws(t)?be:dr;return n&&ga(t,e,n)&&(e=i),r(t,sa(e,3))},Un.find=vs,Un.findIndex=Va,Un.findKey=function(t,e){return Fe(t,sa(e,3),_r)},Un.findLast=gs,Un.findLastIndex=Wa,Un.findLastKey=function(t,e){return Fe(t,sa(e,3),wr)},Un.floor=Eu,Un.forEach=ys,Un.forEachRight=_s,Un.forIn=function(t,e){return null==t?t:gr(t,sa(e,3),Co)},Un.forInRight=function(t,e){return null==t?t:yr(t,sa(e,3),Co)},Un.forOwn=function(t,e){return t&&_r(t,sa(e,3))},Un.forOwnRight=function(t,e){return t&&wr(t,sa(e,3))},Un.get=So,Un.gt=Bs,Un.gte=Gs,Un.has=function(t,e){return null!=t&&da(t,e,Rr)},Un.hasIn=To,Un.head=qa,Un.identity=iu,Un.includes=function(t,e,n,r){t=qs(t)?t:Bo(t),n=n&&!r?mo(n):0;var i=t.length;return n<0&&(n=gn(i+n,0)),oo(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Ce(t,e,n)>-1},Un.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:mo(n);return i<0&&(i=gn(r+i,0)),Ce(t,e,i)},Un.inRange=function(t,e,n){return e=po(e),n===i?(n=e,e=0):n=po(n),function(t,e,n){return t>=yn(e,n)&&t<gn(e,n)}(t=go(t),e,n)},Un.invoke=Fo,Un.isArguments=Vs,Un.isArray=Ws,Un.isArrayBuffer=Xs,Un.isArrayLike=qs,Un.isArrayLikeObject=zs,Un.isBoolean=function(t){return!0===t||!1===t||eo(t)&&Mr(t)==g},Un.isBuffer=Ys,Un.isDate=Js,Un.isElement=function(t){return eo(t)&&1===t.nodeType&&!io(t)},Un.isEmpty=function(t){if(null==t)return!0;if(qs(t)&&(Ws(t)||"string"==typeof t||"function"==typeof t.splice||Ys(t)||co(t)||Vs(t)))return!t.length;var e=fa(t);if(e==E||e==S)return!t.size;if(ba(t))return!Nr(t).length;for(var n in t)if(Ct.call(t,n))return!1;return!0},Un.isEqual=function(t,e){return Fr(t,e)},Un.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:i)?n(t,e):i;return r===i?Fr(t,e,i,n):!!r},Un.isError=Ks,Un.isFinite=function(t){return"number"==typeof t&&pn(t)},Un.isFunction=Qs,Un.isInteger=Zs,Un.isLength=$s,Un.isMap=no,Un.isMatch=function(t,e){return t===e||xr(t,e,ua(e))},Un.isMatchWith=function(t,e,n){return n="function"==typeof n?n:i,xr(t,e,ua(e),n)},Un.isNaN=function(t){return ro(t)&&t!=+t},Un.isNative=function(t){if(wa(t))throw new bt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Cr(t)},Un.isNil=function(t){return null==t},Un.isNull=function(t){return null===t},Un.isNumber=ro,Un.isObject=to,Un.isObjectLike=eo,Un.isPlainObject=io,Un.isRegExp=ao,Un.isSafeInteger=function(t){return Zs(t)&&t>=-9007199254740991&&t<=h},Un.isSet=so,Un.isString=oo,Un.isSymbol=uo,Un.isTypedArray=co,Un.isUndefined=function(t){return t===i},Un.isWeakMap=function(t){return eo(t)&&fa(t)==A},Un.isWeakSet=function(t){return eo(t)&&"[object WeakSet]"==Mr(t)},Un.join=function(t,e){return null==t?"":mn.call(t,e)},Un.kebabCase=Xo,Un.last=Ka,Un.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var a=r;return n!==i&&(a=(a=mo(n))<0?gn(r+a,0):yn(a,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,a):xe(t,Ne,a,!0)},Un.lowerCase=qo,Un.lowerFirst=zo,Un.lt=lo,Un.lte=ho,Un.max=function(t){return t&&t.length?pr(t,iu,Or):i},Un.maxBy=function(t,e){return t&&t.length?pr(t,sa(e,2),Or):i},Un.mean=function(t){return je(t,iu)},Un.meanBy=function(t,e){return je(t,sa(e,2))},Un.min=function(t){return t&&t.length?pr(t,iu,jr):i},Un.minBy=function(t,e){return t&&t.length?pr(t,sa(e,2),jr):i},Un.stubArray=vu,Un.stubFalse=gu,Un.stubObject=function(){return{}},Un.stubString=function(){return""},Un.stubTrue=function(){return!0},Un.multiply=Iu,Un.nth=function(t,e){return t&&t.length?Br(t,mo(e)):i},Un.noConflict=function(){return ae._===this&&(ae._=Lt),this},Un.noop=cu,Un.now=Rs,Un.pad=function(t,e,n){t=_o(t);var r=(e=mo(e))?an(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Gi(hn(i),n)+t+Gi(ln(i),n)},Un.padEnd=function(t,e,n){t=_o(t);var r=(e=mo(e))?an(t):0;return e&&r<e?t+Gi(e-r,n):t},Un.padStart=function(t,e,n){t=_o(t);var r=(e=mo(e))?an(t):0;return e&&r<e?Gi(e-r,n)+t:t},Un.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),wn(_o(t).replace(rt,""),e||0)},Un.random=function(t,e,n){if(n&&"boolean"!=typeof n&&ga(t,e,n)&&(e=n=i),n===i&&("boolean"==typeof e?(n=e,e=i):"boolean"==typeof t&&(n=t,t=i)),t===i&&e===i?(t=0,e=1):(t=po(t),e===i?(e=t,t=0):e=po(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var a=bn();return yn(t+a*(e-t+ee("1e-"+((a+"").length-1))),e)}return qr(t,e)},Un.reduce=function(t,e,n){var r=Ws(t)?Se:Ue,i=arguments.length<3;return r(t,sa(e,4),n,i,hr)},Un.reduceRight=function(t,e,n){var r=Ws(t)?Te:Ue,i=arguments.length<3;return r(t,sa(e,4),n,i,fr)},Un.repeat=function(t,e,n){return e=(n?ga(t,e,n):e===i)?1:mo(e),zr(_o(t),e)},Un.replace=function(){var t=arguments,e=_o(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Un.result=function(t,e,n){var r=-1,a=(e=gi(e,t)).length;for(a||(a=1,t=i);++r<a;){var s=null==t?i:t[Da(e[r])];s===i&&(r=a,s=n),t=Qs(s)?s.call(t):s}return t},Un.round=Mu,Un.runInContext=t,Un.sample=function(t){return(Ws(t)?Kn:Jr)(t)},Un.size=function(t){if(null==t)return 0;if(qs(t))return oo(t)?an(t):t.length;var e=fa(t);return e==E||e==S?t.size:Nr(t).length},Un.snakeCase=Yo,Un.some=function(t,e,n){var r=Ws(t)?Pe:ni;return n&&ga(t,e,n)&&(e=i),r(t,sa(e,3))},Un.sortedIndex=function(t,e){return ri(t,e)},Un.sortedIndexBy=function(t,e,n){return ii(t,e,sa(n,2))},Un.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ri(t,e);if(r<n&&Hs(t[r],e))return r}return-1},Un.sortedLastIndex=function(t,e){return ri(t,e,!0)},Un.sortedLastIndexBy=function(t,e,n){return ii(t,e,sa(n,2),!0)},Un.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=ri(t,e,!0)-1;if(Hs(t[n],e))return n}return-1},Un.startCase=Jo,Un.startsWith=function(t,e,n){return t=_o(t),n=null==n?0:sr(mo(n),0,t.length),e=oi(e),t.slice(n,n+e.length)==e},Un.subtract=Ou,Un.sum=function(t){return t&&t.length?He(t,iu):0},Un.sumBy=function(t,e){return t&&t.length?He(t,sa(e,2)):0},Un.template=function(t,e,n){var r=Un.templateSettings;n&&ga(t,e,n)&&(e=i),t=_o(t),e=Eo({},e,r,Ki);var a,s,o=Eo({},e.imports,r.imports,Ki),u=xo(o),c=We(o,u),l=0,h=e.interpolate||_t,f="__p += '",d=Ot((e.escape||_t).source+"|"+h.source+"|"+(h===Q?ht:_t).source+"|"+(e.evaluate||_t).source+"|$","g"),p="//# sourceURL="+(Ct.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Qt+"]")+"\n";t.replace(d,(function(e,n,r,i,o,u){return r||(r=i),f+=t.slice(l,u).replace(wt,Qe),n&&(a=!0,f+="' +\n__e("+n+") +\n'"),o&&(s=!0,f+="';\n"+o+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e})),f+="';\n";var m=Ct.call(e,"variable")&&e.variable;if(m){if(ct.test(m))throw new bt("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(s?f.replace(G,""):f).replace(V,"$1").replace(W,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var v=$o((function(){return Et(u,p+"return "+f).apply(i,c)}));if(v.source=f,Ks(v))throw v;return v},Un.times=function(t,e){if((t=mo(t))<1||t>h)return[];var n=d,r=yn(t,d);e=sa(e),t-=d;for(var i=Be(r,e);++n<t;)e(n);return i},Un.toFinite=po,Un.toInteger=mo,Un.toLength=vo,Un.toLower=function(t){return _o(t).toLowerCase()},Un.toNumber=go,Un.toSafeInteger=function(t){return t?sr(mo(t),-9007199254740991,h):0===t?t:0},Un.toString=_o,Un.toUpper=function(t){return _o(t).toUpperCase()},Un.trim=function(t,e,n){if((t=_o(t))&&(n||e===i))return Ge(t);if(!t||!(e=oi(e)))return t;var r=sn(t),a=sn(e);return _i(r,qe(r,a),ze(r,a)+1).join("")},Un.trimEnd=function(t,e,n){if((t=_o(t))&&(n||e===i))return t.slice(0,on(t)+1);if(!t||!(e=oi(e)))return t;var r=sn(t);return _i(r,0,ze(r,sn(e))+1).join("")},Un.trimStart=function(t,e,n){if((t=_o(t))&&(n||e===i))return t.replace(rt,"");if(!t||!(e=oi(e)))return t;var r=sn(t);return _i(r,qe(r,sn(e))).join("")},Un.truncate=function(t,e){var n=30,r="...";if(to(e)){var a="separator"in e?e.separator:a;n="length"in e?mo(e.length):n,r="omission"in e?oi(e.omission):r}var s=(t=_o(t)).length;if(Ze(t)){var o=sn(t);s=o.length}if(n>=s)return t;var u=n-an(r);if(u<1)return r;var c=o?_i(o,0,u).join(""):t.slice(0,u);if(a===i)return c+r;if(o&&(u+=c.length-u),ao(a)){if(t.slice(u).search(a)){var l,h=c;for(a.global||(a=Ot(a.source,_o(ft.exec(a))+"g")),a.lastIndex=0;l=a.exec(h);)var f=l.index;c=c.slice(0,f===i?u:f)}}else if(t.indexOf(oi(a),u)!=u){var d=c.lastIndexOf(a);d>-1&&(c=c.slice(0,d))}return c+r},Un.unescape=function(t){return(t=_o(t))&&z.test(t)?t.replace(X,un):t},Un.uniqueId=function(t){var e=++kt;return _o(t)+e},Un.upperCase=Ko,Un.upperFirst=Qo,Un.each=ys,Un.eachRight=_s,Un.first=qa,uu(Un,(yu={},_r(Un,(function(t,e){Ct.call(Un.prototype,e)||(yu[e]=t)})),yu),{chain:!1}),Un.VERSION="4.17.21",_e(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Un[t].placeholder=Un})),_e(["drop","take"],(function(t,e){Vn.prototype[t]=function(n){n=n===i?1:gn(mo(n),0);var r=this.__filtered__&&!e?new Vn(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,d),type:t+(r.__dir__<0?"Right":"")}),r},Vn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),_e(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Vn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:sa(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),_e(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Vn.prototype[t]=function(){return this[n](1).value()[0]}})),_e(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Vn.prototype[t]=function(){return this.__filtered__?new Vn(this):this[n](1)}})),Vn.prototype.compact=function(){return this.filter(iu)},Vn.prototype.find=function(t){return this.filter(t).head()},Vn.prototype.findLast=function(t){return this.reverse().find(t)},Vn.prototype.invokeMap=Yr((function(t,e){return"function"==typeof t?new Vn(this):this.map((function(n){return Pr(n,t,e)}))})),Vn.prototype.reject=function(t){return this.filter(Ns(sa(t)))},Vn.prototype.slice=function(t,e){t=mo(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Vn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=mo(e))<0?n.dropRight(-e):n.take(e-t)),n)},Vn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Vn.prototype.toArray=function(){return this.take(d)},_r(Vn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),a=Un[r?"take"+("last"==e?"Right":""):e],s=r||/^find/.test(e);a&&(Un.prototype[e]=function(){var e=this.__wrapped__,o=r?[1]:arguments,u=e instanceof Vn,c=o[0],l=u||Ws(e),h=function(t){var e=a.apply(Un,Re([t],o));return r&&f?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var f=this.__chain__,d=!!this.__actions__.length,p=s&&!f,m=u&&!d;if(!s&&l){e=m?e:new Vn(this);var v=t.apply(e,o);return v.__actions__.push({func:ds,args:[h],thisArg:i}),new Gn(v,f)}return p&&m?t.apply(this,o):(v=this.thru(h),p?r?v.value()[0]:v.value():v)})})),_e(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Tt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Un.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ws(i)?i:[],t)}return this[n]((function(n){return e.apply(Ws(n)?n:[],t)}))}})),_r(Vn.prototype,(function(t,e){var n=Un[e];if(n){var r=n.name+"";Ct.call(An,r)||(An[r]=[]),An[r].push({name:e,func:n})}})),An[Li(i,2).name]=[{name:"wrapper",func:i}],Vn.prototype.clone=function(){var t=new Vn(this.__wrapped__);return t.__actions__=Si(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Si(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Si(this.__views__),t},Vn.prototype.reverse=function(){if(this.__filtered__){var t=new Vn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Vn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ws(t),r=e<0,i=n?t.length:0,a=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var a=n[r],s=a.size;switch(a.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=yn(e,t+s);break;case"takeRight":t=gn(t,e-s)}}return{start:t,end:e}}(0,i,this.__views__),s=a.start,o=a.end,u=o-s,c=r?o:s-1,l=this.__iteratees__,h=l.length,f=0,d=yn(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return fi(t,this.__actions__);var p=[];t:for(;u--&&f<d;){for(var m=-1,v=t[c+=e];++m<h;){var g=l[m],y=g.iteratee,_=g.type,w=y(v);if(2==_)v=w;else if(!w){if(1==_)continue t;break t}}p[f++]=v}return p},Un.prototype.at=ps,Un.prototype.chain=function(){return fs(this)},Un.prototype.commit=function(){return new Gn(this.value(),this.__chain__)},Un.prototype.next=function(){this.__values__===i&&(this.__values__=fo(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Un.prototype.plant=function(t){for(var e,n=this;n instanceof Bn;){var r=Ua(n);r.__index__=0,r.__values__=i,e?a.__wrapped__=r:e=r;var a=r;n=n.__wrapped__}return a.__wrapped__=t,e},Un.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Vn){var e=t;return this.__actions__.length&&(e=new Vn(this)),(e=e.reverse()).__actions__.push({func:ds,args:[ts],thisArg:i}),new Gn(e,this.__chain__)}return this.thru(ts)},Un.prototype.toJSON=Un.prototype.valueOf=Un.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Un.prototype.first=Un.prototype.head,se&&(Un.prototype[se]=function(){return this}),Un}();ae._=cn,(r=function(){return cn}.call(e,n,e,t))===i||(t.exports=r)}.call(this)},6595:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(682),i=n(2141),a=n(4241),s=n(6391),o=n(1512),u=n(4392),c=n(320),l=n(7631),h=n(6965),f=n(9158);e.default=function(){var t=this;this.validate=function(e){var n=t.checkFieldsForValues(e);return n.isValid=t.containsErrorMessage(n),n},this.checkFieldsForValues=function(t){for(var e=new l.default,n={apiKey:new o.default,environment:new s.default,idSchema:new u.default,clientId:new h.default,lang:new a.default,errorHandlingMode:new f.default,authProvider:new c.default},r=0,i=Object.entries(e);r<i.length;r++){var d=i[r],p=d[0];d[1],"isValid"!==p&&n[p].validate(t)}return Object.keys(n).forEach((function(r){e[r]=n[r].validate(t)})),e},this.containsErrorMessage=function(t){for(var e=!0,n=0,a=Object.entries(t);n<a.length;n++){var s=a[n],o=s[0],u=s[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}else if(u.message.type===i.LogEnum.ERROR)return!1}return e}}},682:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigFieldEnum=void 0,(n=e.ConfigFieldEnum||(e.ConfigFieldEnum={})).apiKey="apiKey",n.environment="environment",n.idSchema="idSchema",n.clientId="clientId",n.lang="lang",n.authProvider="authProvider"},2671:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentEnum=void 0,(n=e.EnvironmentEnum||(e.EnvironmentEnum={})).DEV="dev",n.PROD="prod",n.STAGING="staging"},9580:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorHandlingModeEnum=void 0,(n=e.ErrorHandlingModeEnum||(e.ErrorHandlingModeEnum={})).DEFAULT="default",n.STANDARD="standard"},4946:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.IdSchemaEnum=void 0,(n=e.IdSchemaEnum||(e.IdSchemaEnum={})).NATIVE="native",n.ENETPULSE="enetpulse",n.SPORTRADAR="sportradar",n.SPORTAL_365="sportal365"},9377:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.LangEnum=void 0,(n=e.LangEnum||(e.LangEnum={})).EN="en",n.BG="bg",n.RO="ro",n.EL="el"},2141:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.LogEnum=void 0,(n=e.LogEnum||(e.LogEnum={})).ERROR="error",n.WARNING="warning"},9028:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ValidationMessageEnum=void 0,(n=e.ValidationMessageEnum||(e.ValidationMessageEnum={})).API_KEY="The field apiKey with valid value must be provided to use Fans United JS SDK",n.CLIENT_ID="The field clientId must be provided to use Fans United JS 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.ERROR_HANDLING_MODE_MISSING="If no errorHandlingMode is passed the default one will be set which is: default",n.ERROR_HANDLING_MODE_INVALID="This errorHandlingMode value is not supported, the default one will be set which is: default",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:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ValidationResponseEnum=void 0,(n=e.ValidationResponseEnum||(e.ValidationResponseEnum={})).MISSING_VALUE="missing",n.INVALID_VALUE="invalid",n.VALID_VALUE="valid"},7070:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.getIdToken=null,this.logout=null}},2379:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3220);e.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:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3074);e.default=function(){this.apiKey=null,this.environment=null,this.idSchema=null,this.clientId=null,this.lang=null,this.errorHandlingMode=null,this.authProvider={getIdToken:new r.default,logout:new r.default},this.isValid=!1}},3220:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.text=null,this.type=null}},3074:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},1512:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),a=n(2141),s=function(){function t(){this.validateField=function(t){return null!=t&&t.length>0?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=a.LogEnum.ERROR;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.API_KEY),t===r.ValidationResponseEnum.VALID_VALUE&&(n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.apiKey);return{validation:e,message:this.generateMessage(e)}},t}();e.default=s},320:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),a=n(2141),s=n(7070),o=n(2379),u=function(){function t(){this.validateAuthProvider=function(t){var e=Object.keys(new s.default),n=new o.default;if(t){var u=Object.keys(t).filter((function(t){return!e.includes(t)}));u.length>0?(n.validation=r.ValidationResponseEnum.INVALID_VALUE,n.message.type=a.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=a.LogEnum.ERROR,n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING;return n},this.validateAuthProviderConfigFields=function(t,e){return Object.keys(new s.default).forEach((function(n){t[n]?e[n].validation=r.ValidationResponseEnum.VALID_VALUE:e[n].validation=r.ValidationResponseEnum.MISSING_VALUE})),e},this.generateAuthProviderConfigMessages=function(t){return Object.keys(t).filter((function(t){return"validation"!==t&&"message"!==t})).forEach((function(e){var n=t[e];n.validation===r.ValidationResponseEnum.MISSING_VALUE&&(n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_PROP_MISSING+" "+e,n.message.type=a.LogEnum.ERROR)})),t},this.checkAuthProviderConfigMessagesForErrors=function(t){return Object.keys(t).filter((function(t){return"validation"!==t&&"message"!==t})).forEach((function(e){t[e].validation===r.ValidationResponseEnum.MISSING_VALUE&&t.validation===r.ValidationResponseEnum.VALID_VALUE&&(t.validation=r.ValidationResponseEnum.INVALID_VALUE,t.message.type=a.LogEnum.ERROR,t.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING_CONFIG)})),t}}return t.prototype.validate=function(t){var e=this.validateAuthProvider(t.authProvider);return e.validation!==r.ValidationResponseEnum.MISSING_VALUE&&(e=this.validateAuthProviderConfigFields(t.authProvider,e),e=this.generateAuthProviderConfigMessages(e),e=this.checkAuthProviderConfigMessagesForErrors(e)),e},t}();e.default=u},6965:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),a=n(2141),s=function(){function t(){this.validateField=function(t){return null!=t&&t.length>0?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=a.LogEnum.ERROR;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.CLIENT_ID),t===r.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.clientId);return{validation:e,message:this.generateMessage(e)}},t}();e.default=s},6391:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),a=n(2141),s=n(2671),o=function(){function t(){this.validateField=function(t){var e=[s.EnvironmentEnum.DEV,s.EnvironmentEnum.STAGING,s.EnvironmentEnum.PROD];return null!=t&&t.length>0?e.includes(t)?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.INVALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=a.LogEnum.WARNING;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.ENVIRONMENT_MISSING),t===r.ValidationResponseEnum.INVALID_VALUE&&(e=i.ValidationMessageEnum.ENVIRONMENT_INVALID),t===r.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.environment);return{validation:e,message:this.generateMessage(e)}},t}();e.default=o},9158:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9580),i=n(2141),a=n(9028),s=n(9627);e.default=function(){var t=this;this.validate=function(e){var n=t.validateField(e.errorHandlingMode);return{validation:n,message:t.generateMessage(n)}},this.validateField=function(t){var e=[r.ErrorHandlingModeEnum.DEFAULT,r.ErrorHandlingModeEnum.STANDARD];return t?e.includes(t)?s.ValidationResponseEnum.VALID_VALUE:s.ValidationResponseEnum.INVALID_VALUE:s.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=i.LogEnum.WARNING;return t===s.ValidationResponseEnum.MISSING_VALUE&&(e=a.ValidationMessageEnum.ERROR_HANDLING_MODE_MISSING),t===s.ValidationResponseEnum.INVALID_VALUE&&(e=a.ValidationMessageEnum.ERROR_HANDLING_MODE_INVALID),t===s.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}},4392:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),a=n(2141),s=n(4946),o=function(){function t(){this.validateField=function(t){var e=[s.IdSchemaEnum.NATIVE,s.IdSchemaEnum.SPORTAL_365,s.IdSchemaEnum.ENETPULSE,s.IdSchemaEnum.SPORTRADAR];return null!=t&&t.length>0?e.includes(t)?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.INVALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=a.LogEnum.WARNING;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.ID_SCHEMA_MISSING),t===r.ValidationResponseEnum.INVALID_VALUE&&(e=i.ValidationMessageEnum.ID_SCHEMA_INVALID),t===r.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.idSchema);return{validation:e,message:this.generateMessage(e)}},t}();e.default=o},4241:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9377),i=n(9627),a=n(9028),s=n(2141);e.default=function(){var t=this;this.validate=function(e){var n=t.validateField(e.lang);return{validation:n,message:t.generateMessage(n)}},this.validateField=function(t){var e=[r.LangEnum.BG,r.LangEnum.RO,r.LangEnum.EN,r.LangEnum.EL];return null!=t&&t.length>0?e.includes(t)?i.ValidationResponseEnum.VALID_VALUE:i.ValidationResponseEnum.INVALID_VALUE:i.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=s.LogEnum.WARNING;return t===i.ValidationResponseEnum.MISSING_VALUE&&(e=a.ValidationMessageEnum.LANG_MISSING),t===i.ValidationResponseEnum.INVALID_VALUE&&(e=a.ValidationMessageEnum.LANG_INVALID),t===i.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}},4021:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorCodes=void 0,(n=e.ErrorCodes||(e.ErrorCodes={}))[n.BAD_METHOD_CALL=400]="BAD_METHOD_CALL",n[n.UNAUTHORIZED=401]="UNAUTHORIZED"},4904:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorStatuses=void 0,(n=e.ErrorStatuses||(e.ErrorStatuses={})).INVALID_TEMPLATE="INVALID_TEMPLATE",n.INVALID_PREDICTION="INVALID_PREDICTION",n.INVALID_MARKET="INVALID_MARKET",n.INVALID_FIELD="INVALID_FIELD",n.INVALID_TYPE="INVALID_TYPE",n.EXCEEDED_LENGTH="EXCEEDED_LENGTH",n.INVALID_TOKEN="invalid_token",n.UNAUTHORIZED="unauthorized"},8097:function(t,e){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e,n,r){var i=t.call(this)||this;return i.code=0,i.status=null,i.message=null,i.errorMessage=function(){return i.message},i.code=e,i.status=n,i.message=r,i}return r(e,t),e}(Error);e.default=i},2535:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t,e,n){this.response={error:{code:0,status:"",message:""}},this.response.error.code=t,this.response.error.status=e,this.response.error.message=n}},1260:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validFixtureFields=e.documentationLinks=e.ID_TYPES=void 0,e.ID_TYPES={native:"id",sportradar:"sportradar_id",sportal365:"sportal365_id",enetpulse:"enetpulse_id"},e.documentationLinks={PREDICTOR_USER_RELATED_OPERATION:"https://docs.fansunitedmedia.com/docs/predictor-operations#user-related-operations"},e.validFixtureFields=["matchId","matchType","market","prediction"]},712:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.constructStringArrayWithProvidedLength=e.sortArrayInAscOrder=e.initDisableCache=e.isDisabledCache=e.remapKeysToCamelCase=e.transformIdsToBeUnique=e.setBaseUrl=e.limitIds=e.requestChunkBuild=void 0;var i=n(6486),a=n(2671);e.requestChunkBuild=function(t){var e=[],n=0;return e[n]=[],t.forEach((function(t){e[n].length<=199?e[n].push(t):(n++,e[n]=[t])})),e},e.limitIds=function(t,e){for(var n=[];t.length>e;){var r=t.splice(0,e);n.push(r)}return n.push(t),n},e.setBaseUrl=function(t,e){return t===a.EnvironmentEnum.PROD?{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",loyalty:"https://loyalty.fansunitedapi.com/v1"}[e]:t===a.EnvironmentEnum.DEV?{profile:"http://localhost:8010/v1",football:"http://localhost:8080/v1",idMapping:"http://localhost:8030/v1",predictor:"http://localhost:8040/v1",client:"http://localhost:8070/v1",loyalty:"http://localhost:8060/v1"}[e]:{profile:"https://profile.fansunitedstagingapi.com/v1",football:"https://football.fansunitedstagingapi.com/v1",idMapping:"https://id-mapping.fansunitedstagingapi.com/v1",predictor:"https://prediction.fansunitedstagingapi.com/v1",client:"https://client.fansunitedstagingapi.com/v1",loyalty:"https://loyalty.fansunitedstagingapi.com/v1"}[e]},e.transformIdsToBeUnique=function(t){return t.filter((function(t,e,n){return e===n.indexOf(t)}))},e.remapKeysToCamelCase=function(t){return Array.isArray(t)?t.map((function(t){return(0,e.remapKeysToCamelCase)(t)})):null!=t&&t.constructor===Object?Object.keys(t).reduce((function(n,a){var s;return r(r({},n),((s={})[(0,i.camelCase)(a)]=(0,e.remapKeysToCamelCase)(t[a]),s))}),{}):t},e.isDisabledCache=function(t){return t||!1},e.initDisableCache=function(){return"&disable_cache="+Date.now()},e.sortArrayInAscOrder=function(t){return t.sort((function(t,e){return t.localeCompare(e)}))},e.constructStringArrayWithProvidedLength=function(t,e){for(var n=[],r=0;r<e;r++)n[r]=t;return n}},5601:function(t,e,n){"use strict";var r=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var i=n(1260),a="FansUnited",s={football:{ids:[],countries:[],competitions:[],expirations:{ids:0}},profile:{info:{},statistics:{},badges:null,countries:[],expirations:{profile:0,statistics:0,badges:0}},client:{features:{},expirations:{features:0}}};e.default=function(t){var e=this;this.idSchema="",this.expirationProfileTimeout=600,this.expirationBadgesTimeout=3600,this.expirationClientFeaturesTimeout=14400,this.expirationFootballIdsTimeout=604800,this.clearData=function(){e.setData(s)},this.getEntityById=function(t,n){return void 0===t&&(t=""),void 0===n&&(n=""),e.getData().football.ids.find((function(r){var a=i.ID_TYPES[e.idSchema];return r&&""+r[a]===n&&r.resource===t}))},this.getEntity=function(t,n,r){return Array.isArray(t)?e.getData().football.ids.filter((function(e){var a=i.ID_TYPES[r];return e&&t.includes(""+e[a])&&e.resource===n})):e.getData().football.ids.find((function(e){var a=i.ID_TYPES[r];return e&&""+e[a]===t&&e.resource===n}))},this.getEntityByNativeId=function(t,n){return void 0===t&&(t=""),void 0===n&&(n=""),e.getData().football.ids.find((function(e){return e&&""+e.id===n&&e.resource===t}))},this.checkForExistingIdObjs=function(t,n){var r=i.ID_TYPES[n],a={};return Object.keys(t).forEach((function(i){var s=t[i],o=e.getEntity(s,i,n).map((function(t){return t[r]})),u=t[i].filter((function(t){return!o.includes(t)}));a[i]=s.map((function(t){return u.includes(t)?{id:t,exists:!1}:{id:t,exists:!0}}))})),a},this.getIdsByType=function(t,n,r){var a=i.ID_TYPES[r],s=i.ID_TYPES[n],o={};return Object.keys(t).forEach((function(n){var r=t[n],i=[];e.getData().football.ids.forEach((function(t){r.forEach((function(e,r){e===t[s]&&n===t.resource&&(i[r]=t[a])}))})),o[n]=i})),o},this.addIdMapping=function(t){var n=e.getData();n.football.ids.push(t),e.setData(n)},this.addIdMappings=function(t){var n=e.getData(),i=n.football.ids;i=r(r([],i,!0),t,!0),n.football.ids=i,e.setData(n)},this.addTopIdMappings=function(t){var n=e.getData();if(n.football.ids.length){var i=JSON.parse(JSON.stringify(n.football.ids));i=i.filter((function(t){return"match"!==t.resource})),t=t.filter((function(t){return"match"===t.resource})),i=r(r([],i,!0),t,!0),n.football.ids=i}else n.football.ids=t;n.football.expirations.ids=Math.floor(Date.now()/1e3)+e.expirationFootballIdsTimeout,e.setData(n)},this.setOwnProfile=function(t){var n=e.getData();n.profile.info=t,n.profile.expirations.profile=Math.floor(Date.now()/1e3)+e.expirationProfileTimeout,e.setData(n)},this.getOwnProfile=function(){return e.getData().profile.info},this.getProfileCountries=function(){return e.getData().profile.countries},this.setProfileCountries=function(t){var n=e.getData();n.profile.countries=t,e.setData(n)},this.getProfileStats=function(){return e.getData().profile.statistics},this.setProfileStats=function(t){var n=e.getData();n.profile.statistics=t,n.profile.expirations.statistics=Math.floor(Date.now()/1e3)+e.expirationProfileTimeout,e.setData(n)},this.getProfileBadges=function(){return e.getData().profile.badges},this.setProfileBadges=function(t){var n=e.getData();n.profile.badges=t,n.profile.expirations.badges=Math.floor(Date.now()/1e3)+e.expirationBadgesTimeout,e.setData(n)},this.getFootballCountries=function(){return e.getData().football.countries},this.setFootballCountries=function(t){var n=e.getData();n.football.countries=t,e.setData(n)},this.getCompetitions=function(t){var n=e.getData();return t?t.competitionSearchFilter(n.football.competitions):n.football.competitions},this.setCompetitions=function(t){var n=e.getData(),i=r([],n.football.competitions,!0);i.push.apply(i,t),n.football.competitions=e.makeCompetitionsUnique(i),e.setData(n)},this.getCompetitionsLength=function(){return e.getData().football.competitions.length},this.getClientFeatures=function(){return e.getData().client.features},this.setClientFeatures=function(t){var n=e.getData(),r=JSON.parse(JSON.stringify(t));n.client.expirations.features=Math.floor(Date.now()/1e3)+e.expirationClientFeaturesTimeout,n.client.features=r,e.setData(n)},this.getExpiration=function(t,n){e.initialNewSchema(t,"expirations");var r=e.getData();switch(n){case"profile":return r.profile.expirations.profile;case"statistics":return r.profile.expirations.statistics;case"badges":return r.profile.expirations.badges;case"features":return r.client.expirations.features;case"ids":return r.football.expirations.ids}},this.makeCompetitionsUnique=function(t){var e=new Set;return t.filter((function(t){var n=!e.has(t.id);return e.add(t.id),n}))},this.getData=function(){return JSON.parse(localStorage.getItem(a))},this.setData=function(t){localStorage.setItem(a,JSON.stringify(t))},this.initialNewSchema=function(t,n){var r=e.getData();r&&r[t]&&r[t][n]||e.setData(s)},this.idSchema=t.idSchema,void 0!==this.getData()&&null!==this.getData()||this.setData(s)}},5318:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.invalidTypeMessage=e.missingFieldsMessage=e.invalidFieldMessage=e.invalidMarketTopXMessage=e.invalidMarketMessage=e.invalidPredictionMessage=e.WarningMessages=e.ErrorMessages=void 0;var r,i=n(1260);(r=e.ErrorMessages||(e.ErrorMessages={})).LOYALTY_INVALID_TEMPLATE_ID="Provided template ID does NOT exist! Try again with existing template ID.",r.INVALID_MATCH_ID="Match id is invalid!",r.INVALID_PLAYER_ID="Player id is invalid!",r.QUERY_PARAM_MATCH_IDS_EXCEEDED="Maximum matchIds in PredictionFilters should be 10 or less.",r.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED="Maximum limit for filtering games is 50 or less.",r.INVALID_PREDICTION_FIELD="Prediction field is invalid. For more information please visit our documentation",r.INVALID_TOKEN="Invalid JWT token is provided",r.EXPIRED_TOKEN="The provided JWT token is expired",e.WarningMessages={UNEXPECTED_STATUS_PROP:"Unexpected provided property 'status'. You can NOT use this property for this method. For more information visit our documentation: \n "+i.documentationLinks.PREDICTOR_USER_RELATED_OPERATION,UNEXPECTED_TYPE_PROP:"Unexpected provided property 'type'. You can NOT use this property for this method. For more information visit our documentation: \n "+i.documentationLinks.PREDICTOR_USER_RELATED_OPERATION},e.invalidPredictionMessage=function(t,e){return"The prediction '"+t+"' is invalid for market '"+e+"'. Please check again have you passed appropriate prediction model. For more information please visit our documentation: https://docs.fansunitedmedia.com/sdks/js/match.quiz#gamerelatedoperations"},e.invalidMarketMessage=function(t){return"The market '"+t+"' is not supported from Fans United. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/predictor-operations#make-football-prediction"},e.invalidMarketTopXMessage=function(t){return"The market '"+t+"' is not valid for Top X game. The only available market is CORRECT_SCORE."},e.invalidFieldMessage=function(t){return"The field/s '"+(t.length>1?t.join(", "):t[0])+"' is/are invalid. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/javascript-sdk"},e.missingFieldsMessage=function(t,e){return"The following field/s is/are missing from "+t+": '"+(e.length>1?e.join(", "):e[0])+"'. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/predictor-operations#make-football-prediction"},e.invalidTypeMessage=function(t,e){return"The field "+t+" has incorrect type. The correct type is "+e}},4800:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.limit=t.limit?t.limit:null,this.startAfter=t.startAfter?t.startAfter:null}return t.prototype.constructMainFiltersUrl=function(){var t="";return this.limit&&(t+="&",t+="limit="+this.limit),this.startAfter&&(t+="&",t+="start_after="+this.startAfter),t},t}();e.default=n},439:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.main=null,this.cover=null,this.mobile=null}},8872:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8902);e.default=function(){this.pagination=new r.default}},8902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.nextPageStartsAfter=null,this.itemsPerPage=null}},1553:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8872);e.default=function(){this.meta=new r.default,this.data=[]}},3623:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8872);e.default=function(){this.remapMetaData=function(t){var e=new r.default;return e.pagination.nextPageStartsAfter=t.pagination.next_page_starts_after,e.pagination.itemsPerPage=t.pagination.items_per_page,e}}},3483:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.entityId=null,this.entityType=null}},6208:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.axiosError=void 0,e.axiosError=function(t,e,n){var r={data:t.data,status:e,statusText:n,headers:t.headers,config:t};return{code:String(e),config:t,isAxiosError:!0,toJSON:function(){return{}},name:"Unauthorized",message:n,response:r}}},1022:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(2453),c=function(t){function e(e){var n=t.call(this,e,(0,o.setBaseUrl)(e.environment,"loyalty"))||this;return n.activityRemapper=null,n.createActivity=function(t){return a(n,void 0,void 0,(function(){var e,n,r,i;return s(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e="/activities"+this.apiSignInUrl,[4,this.instanceAuth.post(e,JSON.stringify(t))];case 1:return n=a.sent(),[2,this.activityRemapper.remapSingleResponse(n.data)];case 2:throw r=a.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with creating activity for user",i),i.response;case 3:return[2]}}))}))},n.deleteActivity=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),e="/activities/"+t+this.apiSignInUrl,[4,this.instanceAuth.delete(e)];case 1:return i.sent(),[2,!0];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem deleting the following activity: "+t,r),r.response;case 3:return[2]}}))}))},n.getOwnActivities=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n="/activities"+this.apiSignInUrl,r=Date.now(),t&&(n+=""+t.constructFilterUrl()),e&&(n+="disable_cache="+r),[4,this.instanceAuth.get(n)];case 1:return i=s.sent(),[2,this.activityRemapper.remapActivitiesResponse(i.data)];case 2:throw a=s.sent(),o=this.transformAxiosErrorToFansUnitedException(a),console.warn("There was a problem with fetching own activities",o),o.response;case 3:return[2]}}))}))},n.getActivitiesForUser=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o,u;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n="/users/"+t+"/activities"+this.apiSignInUrl,i=Date.now(),e&&(n+=""+e.constructFilterUrl()),r&&(n+="disable_cache="+i),[4,this.instance.get(n)];case 1:return a=s.sent(),[2,this.activityRemapper.remapActivitiesResponse(a.data)];case 2:throw o=s.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem with fetching activities for user "+t,u),u.response;case 3:return[2]}}))}))},n.getStats=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,5,,6]),n="",r=null,t?(n+=(0,o.isDisabledCache)(e)?"/users/"+t+"/statistics"+this.apiSignInUrl+(0,o.initDisableCache)():"/users/"+t+"/statistics"+this.apiSignInUrl,[4,this.instance.get(n)]):[3,2];case 1:return r=s.sent(),[3,4];case 2:return n+="/statistics"+this.apiSignInUrl,[4,this.instanceAuth.get(n)];case 3:r=s.sent(),s.label=4;case 4:return[2,this.activityRemapper.remapStatsReponse(r.data.data)];case 5:throw i=s.sent(),a=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching profile`s statistics:",a),a.response;case 6:return[2]}}))}))},n.activityRemapper=new u.default,n}return i(e,t),e}(n(7724).default);e.default=c},7686:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureConfigType=void 0;var o,u=n(712),c=n(704),l=n(7724),h=n(5601);(o=e.FeatureConfigType||(e.FeatureConfigType={})).PREDICTOR="predictor",o.TOP_X="topX",o.MATCH_QUIZ="matchQuiz",o.LOYALTY="loyalty";var f=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"client"))||this;return n.featureConfigRemapper=null,n.localStorage=null,n.clientId=null,n.getConfig=function(t){return a(n,void 0,void 0,(function(){var e,n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),(e=this.getCachedFeatures())?[3,2]:(n="/clients/"+this.clientId+"/features",r=this.apiSignInUrl.split("&")[0],[4,this.instance.get(""+n+r)]);case 1:i=s.sent(),e=i.data.data,this.localStorage.setClientFeatures(e),s.label=2;case 2:switch(t){case"predictor":return[2,this.featureConfigRemapper.remapPredictorConfig(e.predictor)];case"topX":return[2,this.featureConfigRemapper.remapTopXConfig(e.top_x)];case"matchQuiz":return[2,this.featureConfigRemapper.remapMatchQuizConfig(e.match_quiz)];case"loyalty":return[2,this.featureConfigRemapper.remapLoyaltyConfig(e.loyalty)]}return[3,4];case 3:throw a=s.sent(),o=this.transformAxiosErrorToFansUnitedException(a),console.warn("There was a problem fetching configuration from Client API",o),o.response;case 4:return[2]}}))}))},n.getCachedFeatures=function(){var t=n.getLocalStorageData();if(t&&Object.keys(t).length)return t},n.getLocalStorageData=function(){var t=Math.floor(Date.now()/1e3);return n.localStorage.getExpiration("client","features")>t?n.localStorage.getClientFeatures():null},n.clientId=e.clientId,n.localStorage=new h.default(e),n.featureConfigRemapper=new c.default,n}return i(e,t),e}(l.default);e.default=f},595:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(3430),c=n(7316),l=n(8758),h=n(5827),f=n(7821),d=n(5284),p=n(9330),m=n(4729),v=n(5157),g=n(7943),y=n(7287),_=n(753),w=n(1925),b=function(t){function e(e){var n=t.call(this,e,(0,o.setBaseUrl)(e.environment,"football"))||this;return n.limitIds=200,n.countryRemapper=null,n.competitionBasicRemapper=null,n.competitionFullRemapper=null,n.teamBasicRemapper=null,n.teamFullRemapper=null,n.matchBasicRemapper=null,n.matchFullRemapper=null,n.playerBasicRemapper=null,n.playerFullRemapper=null,n.topPlayerRemapper=null,n.searchRemapper=null,n.footballMetaRemapper=null,n.getCountries=function(t){return a(n,void 0,void 0,(function(){var e,n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),e="/countries"+this.apiSignInUrl,n=Date.now(),t&&(e+="&disable_cache="+n),[4,this.instance.get(e)];case 1:return r=s.sent(),[2,this.countryRemapper.countriesFromResponse(r.data.data)];case 2:throw i=s.sent(),a=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem with the football countries request",a),a.response;case 3:return[2]}}))}))},n.getCompetitions=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,u,c,l,h,f,d,p=this;return s(this,(function(s){switch(s.label){case 0:if(s.trys.push([0,8,,9]),n={},r=Date.now(),e=e||!1,!(t&&t.competitionIds&&t.competitionIds.length>this.limitIds-1))return[3,5];i=[],a=(0,o.limitIds)(t.competitionIds,this.limitIds),u=0,c=a,s.label=1;case 1:return u<c.length?(l=c[u],t.competitionIds=l,h="/competitions"+this.apiSignInUrl+t.constructFilterUrl(),e&&(h+="&disable_cache="+r),[4,this.instance.get(h)]):[3,4];case 2:n=s.sent(),i.push(n.data.data.map((function(t){return p.competitionBasicRemapper.fromResponse(t)}))),s.label=3;case 3:return u++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return h="/competitions"+this.apiSignInUrl,t&&(h+=""+t.constructFilterUrl()),e&&(h+="&disable_cache="+r),[4,this.instance.get(h)];case 6:return[2,(n=s.sent()).data.data.map((function(t){return p.competitionBasicRemapper.fromResponse(t)}))];case 7:return[3,9];case 8:throw f=s.sent(),d=this.transformAxiosErrorToFansUnitedException(f),console.warn("There was a problem with getCompetitions request",d),d.response;case 9:return[2]}}))}))},n.getCompetitionById=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n="/competitions/"+t+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=s.sent(),[2,this.competitionFullRemapper.fromResponse(i.data.data)];case 2:throw a=s.sent(),o=this.transformAxiosErrorToFansUnitedException(a),console.warn("There was a problem with getCompetitionById request",o),o.response;case 3:return[2]}}))}))},n.getTopCompetitions=function(t){return a(n,void 0,void 0,(function(){var e,n,r,i,a=this;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),e="/competitions/top"+this.apiSignInUrl,n=Date.now(),t&&(e+="&disable_cache="+n),[4,this.instance.get(e)];case 1:return[2,s.sent().data.data.map((function(t){return a.competitionBasicRemapper.fromResponse(t)}))];case 2:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with getTopCompetitions request",i),i.response;case 3:return[2]}}))}))},n.getTeams=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,u,c,l,h,f,d,p,m=this;return s(this,(function(s){switch(s.label){case 0:if(s.trys.push([0,8,,9]),n={},r=Date.now(),!(t&&t.teamIds&&t.teamIds.length>this.limitIds))return[3,5];i=[],a=(0,o.limitIds)(t.teamIds,this.limitIds),u=0,c=a,s.label=1;case 1:return u<c.length?(l=c[u],t.teamIds=l,f="/teams"+this.apiSignInUrl+t.constructFilterUrl(),e&&(f+="disable_cache="+r),[4,this.instance.get(f)]):[3,4];case 2:n=s.sent(),i.push(n.data.data.map((function(t){return m.teamBasicRemapper.fromResponse(t)}))),s.label=3;case 3:return u++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return h=new _.default,f="/teams"+this.apiSignInUrl,t&&(f+=""+t.constructFilterUrl()),e&&(f+="&disable_cache="+r),[4,this.instance.get(f)];case 6:return n=s.sent(),h.meta=this.footballMetaRemapper.remapMetaProp(n.data.meta),h.data=n.data.data.map((function(t){return m.teamBasicRemapper.fromResponse(t)})),[2,h];case 7:return[3,9];case 8:throw d=s.sent(),p=this.transformAxiosErrorToFansUnitedException(d),console.warn("There was a problem with getTeams request",p),p.response;case 9:return[2]}}))}))},n.getTeamById=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n="/teams/"+t+this.apiSignInUrl,r=Date.now(),e&&(n+="disable_cache="+r),[4,this.instance.get(n)];case 1:return i=s.sent(),[2,this.teamFullRemapper.fromResponse(i.data.data)];case 2:throw a=s.sent(),o=this.transformAxiosErrorToFansUnitedException(a),console.warn("There was a problem with getTeamById request",o),o.response;case 3:return[2]}}))}))},n.getTopTeams=function(t){return a(n,void 0,void 0,(function(){var e,n,r,i,a,o=this;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),e="/teams/top"+this.apiSignInUrl,n=Date.now(),t&&(e+="$disable_cache="+n),[4,this.instance.get(e)];case 1:return[2,(r=s.sent()).data.data?r.data.data.map((function(t){return o.teamBasicRemapper.fromResponse(t)})):[]];case 2:throw i=s.sent(),a=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem with getTopTeams request",a),a.response;case 3:return[2]}}))}))},n.getNextMatchForTeam=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n="/teams/"+t+"/next-match"+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=s.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw a=s.sent(),o=this.transformAxiosErrorToFansUnitedException(a),console.warn("There was a problem with getNextMatchForTeam request",o),o.response;case 3:return[2]}}))}))},n.getPrevMatchForTeam=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n="/teams/"+t+"/previous-match"+this.apiSignInUrl,r=Date.now(),e&&(n+="disable_cache="+r),[4,this.instance.get(n)];case 1:return i=s.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw a=s.sent(),o=this.transformAxiosErrorToFansUnitedException(a),console.warn("There was a problem with getPrevMatchForTeam request",o),o.response;case 3:return[2]}}))}))},n.getPlayers=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,u,c,l,h,f,d,p,m=this;return s(this,(function(s){switch(s.label){case 0:if(s.trys.push([0,8,,9]),n={},r=Date.now(),!(t&&t.playerIds&&t.playerIds.length>this.limitIds-1))return[3,5];i=[],a=(0,o.limitIds)(t.playerIds,this.limitIds),u=0,c=a,s.label=1;case 1:return u<c.length?(l=c[u],t.playerIds=l,f="/players"+this.apiSignInUrl+t.constructFilterUrl(),e&&(f+="&disable_cache="+r),[4,this.instance.get(f)]):[3,4];case 2:n=s.sent(),i.push(n.data.data.map((function(t){return m.teamBasicRemapper.fromResponse(t)}))),s.label=3;case 3:return u++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return h=new _.default,f="/players"+this.apiSignInUrl,t&&(f+=""+t.constructFilterUrl()),e&&(f+="&disable_cache="+r),[4,this.instance.get(f)];case 6:return n=s.sent(),h.meta=this.footballMetaRemapper.remapMetaProp(n.data.meta),h.data=n.data.data.map((function(t){return m.playerBasicRemapper.fromResponse(t)})),[2,h];case 7:return[3,9];case 8:throw d=s.sent(),p=this.transformAxiosErrorToFansUnitedException(d),console.warn("There was a problem with getPlayers request",p),p.response;case 9:return[2]}}))}))},n.getPlayerById=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n="/players/"+t+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=s.sent(),[2,this.playerFullRemapper.fromResponse(i.data.data)];case 2:throw a=s.sent(),o=this.transformAxiosErrorToFansUnitedException(a),console.warn("There was a problem with getPlayerById request",o),o.response;case 3:return[2]}}))}))},n.getTopPlayers=function(t){return a(n,void 0,void 0,(function(){var e,n,r,i,a=this;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),e="/players/top"+this.apiSignInUrl,n=Date.now(),t&&(e+="&disable_cache="+n),[4,this.instance.get(e)];case 1:return[2,s.sent().data.data.map((function(t){return a.topPlayerRemapper.fromResponse(t)}))];case 2:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with getTopPlayers request",i),i.response;case 3:return[2]}}))}))},n.getNextMatchForPlayer=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n="/players/"+t+"/next-match"+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=s.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw a=s.sent(),o=this.transformAxiosErrorToFansUnitedException(a),console.warn("There was a problem with getNextMatchForPlayer request",o),o.response;case 3:return[2]}}))}))},n.getPrevMatchForPlayer=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n="/players/"+t+"/previous-match"+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=s.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw a=s.sent(),o=this.transformAxiosErrorToFansUnitedException(a),console.warn("There was a problem with getPrevMatchForPlayer request",o),o.response;case 3:return[2]}}))}))},n.getMatchById=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n="/matches/"+t+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=s.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw a=s.sent(),o=this.transformAxiosErrorToFansUnitedException(a),console.warn("There was a problem with getMatchById request",o),o.response;case 3:return[2]}}))}))},n.getMatches=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,o,u,c=this;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n=new _.default,r="/matches"+this.apiSignInUrl,i=Date.now(),t&&(r+=""+t.constructFilterUrl()),e&&(r+="&disable_cache="+i),[4,this.instance.get(r)];case 1:return a=s.sent(),n.meta=this.footballMetaRemapper.remapMetaProp(a.data.meta),n.data=a.data.data.map((function(t){return c.matchBasicRemapper.fromResponse(t)})),[2,n];case 2:throw o=s.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem with getMatches request",u),u.response;case 3:return[2]}}))}))},n.search=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n="/search"+this.apiSignInUrl+t.constructFilterUrl(),r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=s.sent(),[2,this.searchRemapper.fromResponse(i.data.data)];case 2:throw a=s.sent(),o=this.transformAxiosErrorToFansUnitedException(a),console.warn("There was a problem with search request",o),o.response;case 3:return[2]}}))}))},n.apiSignInUrl="en"!==e.lang?n.apiSignInUrl+"&lang="+e.lang:n.apiSignInUrl,n.countryRemapper=new u.default,n.competitionBasicRemapper=new c.default,n.competitionFullRemapper=new l.default,n.teamBasicRemapper=new h.default,n.teamFullRemapper=new f.default,n.matchBasicRemapper=new d.default,n.matchFullRemapper=new p.default,n.playerBasicRemapper=new v.default,n.playerFullRemapper=new g.default,n.topPlayerRemapper=new m.default,n.searchRemapper=new y.default,n.footballMetaRemapper=new w.default,n}return i(e,t),e}(n(7724).default);e.default=b},7724:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9669),i=n(6245),a=n(4021),s=n(4904),o=n(2535),u=n(6208),c=n(5318);e.default=function(t,e){var n=this;this.apiSignInUrl=null,this.instanceAuth=null,this.instance=null,this.errorHandlingMode=null,this.transformAxiosErrorToFansUnitedException=function(t){if("standard"===n.errorHandlingMode&&t.response&&t.response.data&&t.response.data.error){var e=t.response.data.error,r=e.code,i=e.status,a=e.message;return new o.default(r,i,a)}return t},this.apiSignInUrl="?key="+t.apiKey+"&client_id="+t.clientId,this.errorHandlingMode=t.errorHandlingMode,this.instanceAuth=r.default.create({baseURL:e,headers:{Authorization:"Bearer "+t.authProvider.getIdToken(),"Content-Type":"application/json"}}),this.instanceAuth.interceptors.request.use((function(e){var l=null;try{l=(0,i.default)(t.authProvider.getIdToken())}catch(t){if("default"===n.errorHandlingMode)throw(0,u.axiosError)(e,401,t.message);if("standard"===n.errorHandlingMode)throw new o.default(a.ErrorCodes.UNAUTHORIZED,s.ErrorStatuses.INVALID_TOKEN,c.ErrorMessages.INVALID_TOKEN)}return Date.now()>l.exp?(r.default.defaults.headers.common.Authorization="Bearer "+t.authProvider.getIdToken(),e.headers.Authorization="Bearer "+t.authProvider.getIdToken(),e):e}),(function(t){Promise.reject(t)})),this.instanceAuth.interceptors.response.use((function(t){return t}),(function(e){var r,i,u,l=e.config;if((403===(null===(r=e.response)||void 0===r?void 0:r.status)||401===(null===(i=e.response)||void 0===i?void 0:i.status))&&!l._retry){l._retry=!0;var h=t.authProvider.getIdToken();return l.headers.Authorization="Bearer "+h,n.instanceAuth(l)}if("standard"===n.errorHandlingMode&&401===(null===(u=e.response)||void 0===u?void 0:u.status)){var f=new o.default(a.ErrorCodes.UNAUTHORIZED,s.ErrorStatuses.UNAUTHORIZED,c.ErrorMessages.EXPIRED_TOKEN);return Promise.reject(f)}return Promise.reject(e)})),this.instance=r.default.create({baseURL:e,headers:{"Content-Type":"application/json"}})}},8539:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(7724),c={player:"players",team:"teams",homeTeam:"teams",awayTeam:"teams",country:"countries",competition:"competitions",match:"matches"},l=function(t){function e(e){var n=t.call(this,e,(0,o.setBaseUrl)(e.environment,"idMapping"))||this;return n.getEntityById=function(t,r){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+e.idSchema+"&"+c[t]+"="+r)}catch(t){throw console.warn("There was a problem with id mapping request for the following id:"+r,t),t.response}},n.getEntityByIdAndSchema=function(t,e,r){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+r+"&"+c[t]+"="+e)}catch(t){throw console.warn("There was a problem with id mapping request for the following id:"+e,t),t.response}},n.getEntityIdsByIdsAndSchema=function(t,e,r){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+r+"&"+c[t]+"="+e.join(","))}catch(t){throw console.warn("There was a problem with id mapping request for the following ids:"+e.join(","),t),t.response}},n.getEntitiesByIds=function(t,e,r){e.sort((function(t,e){return t.localeCompare(e)}));var i=(0,o.requestChunkBuild)(e).map((function(e){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+r+"&"+c[t]+"="+e.join(","))}catch(t){var i=n.transformAxiosErrorToFansUnitedException(t);throw console.warn("There was a problem with id mapping request for the following ids:"+e.join(","),i),i.response}}));return Promise.all(i).then((function(t){var e=[];return t.forEach((function(t){e.push.apply(e,t.data.data)})),e}))},n.getEntitiesByIdObjs=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,u,l,h,f,d,p;return s(this,(function(m){switch(m.label){case 0:n=[],r={},i=[],Object.keys(t).forEach((function(e){n.push.apply(n,t[e])})),a=(0,o.transformIdsToBeUnique)(n),u=(0,o.requestChunkBuild)(a),l=function(n){var a,o,u,l;return s(this,(function(s){switch(s.label){case 0:if(a="",Object.keys(t).forEach((function(e){r[e]=[];var i=n.filter((function(n){return t[e].includes(n)}));i&&i.length>0&&(r[e]=i)})),Object.keys(r).forEach((function(t){r[t].length>0&&(r[t].sort((function(t,e){return t.localeCompare(e)})),a+="&",a+=c[t]+"="+r[t].join(","))})),!(a&&a.length>0))return[3,5];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,h.instance.get("/football"+h.apiSignInUrl+"&input_provider="+(e||"native")+a)];case 2:return o=s.sent(),i.push(o.data.data),[3,4];case 3:throw u=s.sent(),l=h.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem with id mapping request",l),l.response;case 4:return[3,6];case 5:i.push([]),s.label=6;case 6:return[2]}}))},h=this,f=0,d=u,m.label=1;case 1:return f<d.length?(p=d[f],[5,l(p)]):[3,4];case 2:m.sent(),m.label=3;case 3:return f++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)]}}))}))},n.getTopEntities=function(){return a(n,void 0,void 0,(function(){var t,e;return s(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.instance.get("/football/top"+this.apiSignInUrl)];case 1:return[2,n.sent().data.data];case 2:throw t=n.sent(),e=this.transformAxiosErrorToFansUnitedException(t),console.warn("There was a problem with top id mappings request",e),e.response;case 3:return[2]}}))}))},n.apiSignInUrl=n.apiSignInUrl.split("&")[0],n}return i(e,t),e}(u.default);e.default=l},7059:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(7419),c=n(4533),l=n(8899),h=n(7746),f=function(t){function e(e){var n=t.call(this,e,(0,o.setBaseUrl)(e.environment,"loyalty"))||this;return n.templateRemapper=null,n.leaderboardRemapper=null,n.rankingsRemapper=null,n.highestSuccessRateRemapper=null,n.getTemplates=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,u;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(t)?"/leaderboard/templates/"+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/templates/"+this.apiSignInUrl,[4,this.instance.get(n)];case 1:return r=s.sent(),e?((i=JSON.parse(JSON.stringify(r.data))).meta=this.templateRemapper.remapMeta(r.data.meta),i.data=this.templateRemapper.remapResponse(r.data.data),[2,i]):[2,this.templateRemapper.remapResponse(r.data.data)];case 2:throw a=s.sent(),u=this.transformAxiosErrorToFansUnitedException(a),console.warn("There was a problem fetching the list of templates",u),u.response;case 3:return[2]}}))}))},n.getTemplateById=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(e)?"/leaderboard/templates/"+t+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/templates/"+t+this.apiSignInUrl,[4,this.instance.get(n)];case 1:return r=s.sent(),[2,this.templateRemapper.remapResponse([r.data.data])[0]];case 2:throw i=s.sent(),a=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem requesting the following template: "+t,a),a.response;case 3:return[2]}}))}))},n.getLeaderboard=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,u,c;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(e)?"/leaderboard/"+t+"/"+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/"+t+"/"+this.apiSignInUrl,r&&(n+=""+r.constructFiltersUrl()),[4,this.instance.get(n)];case 1:return i=s.sent(),a=JSON.parse(JSON.stringify(i.data)),[2,this.leaderboardRemapper.remapResponse(a)];case 2:throw u=s.sent(),c=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching the leaderboard for the following template: "+t,c),c.response;case 3:return[2]}}))}))},n.getLeaderboardForGame=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,u,c;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(e)?"/leaderboard/games/"+t+"/"+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/games/"+t+"/"+this.apiSignInUrl,r&&(n+=""+r.constructFiltersUrl()),[4,this.instance.get(n)];case 1:return i=s.sent(),a=JSON.parse(JSON.stringify(i.data)),[2,(0,o.remapKeysToCamelCase)(a)];case 2:throw u=s.sent(),c=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching the leaderboard for the following game: "+t,c),c.response;case 3:return[2]}}))}))},n.getUserRankings=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,u;return s(this,(function(s){switch(s.label){case 0:n="/leaderboard/users/"+t+"/rankings/"+this.apiSignInUrl,e&&(n+=""+e.constructFiltersUrl()),(0,o.isDisabledCache)(r)&&(n+=""+(0,o.initDisableCache)()),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return i=s.sent(),[2,this.rankingsRemapper.remapRankings(i.data)];case 3:throw a=s.sent(),u=this.transformAxiosErrorToFansUnitedException(a),console.warn("There was a problem fetching the rankings for the following user: "+t,u),u.response;case 4:return[2]}}))}))},n.getHighestSuccessRate=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a;return s(this,(function(s){switch(s.label){case 0:n=(0,o.isDisabledCache)(e)?"/statistics/top"+this.apiSignInUrl+(0,o.initDisableCache)():"/statistics/top"+this.apiSignInUrl,t&&(n+="&market="+t),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return r=s.sent(),[2,this.highestSuccessRateRemapper.remapHighestSuccessRate(r.data.data)];case 3:throw i=s.sent(),a=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching highest success rate",a),a.response;case 4:return[2]}}))}))},n.templateRemapper=new l.default,n.leaderboardRemapper=new u.default,n.rankingsRemapper=new c.default,n.highestSuccessRateRemapper=new h.default,n}return i(e,t),e}(n(7724).default);e.default=f},2793:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(2726),u=n(9679),c=n(712),l=n(4780),h=n(1553),f=n(3623),d=function(t){function e(e,n){var r=t.call(this,e,(0,c.setBaseUrl)(e.environment,"predictor"))||this;return r.predictionRemapper=null,r.matchSummaryRemapper=null,r.gamesRemapper=null,r.metaRemapper=null,r.makeFootballPrediction=function(t){return a(r,void 0,void 0,(function(){var e,n,r,i;return s(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),e=this.predictionRemapper.remapRequestBody(t),[4,this.instanceAuth.post("/predictions"+this.apiSignInUrl,JSON.stringify(e))];case 1:return n=a.sent(),[4,this.predictionRemapper.remapResponseObjBody(n.data)];case 2:return[2,a.sent()];case 3:throw r=a.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem making POST request: ",i),i.response;case 4:return[2]}}))}))},r.getMatchSummary=function(t,e){return a(r,void 0,void 0,(function(){var n,r,i,a;return s(this,(function(s){switch(s.label){case 0:n=(0,c.isDisabledCache)(e)?"/predictions/summary/"+t+this.apiSignInUrl+(0,c.initDisableCache)():"/predictions/summary/"+t+this.apiSignInUrl,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return r=s.sent(),[2,this.matchSummaryRemapper.remapResponse(r.data)];case 3:throw i=s.sent(),a=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching predictions for match: "+t+" ",a),a.response;case 4:return[2]}}))}))},r.deleteFootballPrediction=function(t){return a(r,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instanceAuth.delete("/predictions/"+t+this.apiSignInUrl)];case 1:return r.sent(),[2,!0];case 2:throw e=r.sent(),n=this.transformAxiosErrorToFansUnitedException(e),console.warn("There was a problem deleting your prediction: "+t,n),n.response;case 3:return[2]}}))}))},r.getMyPredictions=function(t){return a(r,void 0,void 0,(function(){var e,n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),e=new h.default,n="/predictions"+this.apiSignInUrl,t&&(n+=""+t.constructFiltersUrl()),[4,this.instanceAuth.get(n)];case 1:return r=s.sent(),e.meta=this.metaRemapper.remapMetaData(r.data.meta),i=e,[4,this.predictionRemapper.remapResponseArrayBody(r.data.data)];case 2:return i.data=s.sent(),[2,e];case 3:throw a=s.sent(),o=this.transformAxiosErrorToFansUnitedException(a),console.warn("There was a problem fetching own predictions",o),o.response;case 4:return[2]}}))}))},r.getMyPredictionsNoRemap=function(t){return a(r,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instanceAuth.get("/predictions"+this.apiSignInUrl+t.constructFiltersUrl())];case 1:return[2,r.sent().data];case 2:throw e=r.sent(),n=this.transformAxiosErrorToFansUnitedException(e),console.warn("There was a problem fetching own predictions",n),n.response;case 3:return[2]}}))}))},r.getUserPredictions=function(t,e,n){return a(r,void 0,void 0,(function(){var r,i,a,o,u,l;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),r=new h.default,i=(0,c.isDisabledCache)(e)?"/predictions/users/"+t+this.apiSignInUrl+(0,c.initDisableCache)():"/predictions/users/"+t+this.apiSignInUrl,n&&(i+=""+n.constructFiltersUrl()),[4,this.instance.get(i)];case 1:return a=s.sent(),r.meta=this.metaRemapper.remapMetaData(a.data.meta),o=r,[4,this.predictionRemapper.remapResponseArrayBody(a.data.data)];case 2:return o.data=s.sent(),[2,r];case 3:throw u=s.sent(),l=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching predictions for user: "+t,l),l.response;case 4:return[2]}}))}))},r.getUserPredictionsNoRemap=function(t,e){return a(r,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.instance.get("/predictions/users/"+t+this.apiSignInUrl+e.constructFiltersUrl())];case 1:return[2,i.sent().data];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem fetching predictions for user: "+t,r),r.response;case 3:return[2]}}))}))},r.getGames=function(t,e){return a(r,void 0,void 0,(function(){var n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n=(0,c.isDisabledCache)(e)?"/games/"+this.apiSignInUrl+t.constructFiltersUrl()+(0,c.initDisableCache)():"/games/"+this.apiSignInUrl+t.constructFiltersUrl(),[4,this.instance.get(n)];case 1:return r=s.sent(),[2,this.gamesRemapper.remapPaginatedGames(r.data)];case 2:throw i=s.sent(),a=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the games list",a),a.response;case 3:return[2]}}))}))},r.getGameById=function(t,e){return a(r,void 0,void 0,(function(){var n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n=(0,c.isDisabledCache)(e)?"/games/"+t+this.apiSignInUrl+(0,c.initDisableCache)():"/games/"+t+this.apiSignInUrl,[4,this.instance.get(n)];case 1:return r=s.sent(),[2,this.gamesRemapper.remapGamesListResponse(r.data)];case 2:throw i=s.sent(),a=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the following game: "+t,a),a.response;case 3:return[2]}}))}))},r.getGamePredictions=function(t,e,n){return a(r,void 0,void 0,(function(){var r,i,a,o,u,l;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),r=new h.default,i=(0,c.isDisabledCache)(e)?"/games/"+t+"/predictions"+this.apiSignInUrl+(0,c.initDisableCache)():"/games/"+t+"/predictions"+this.apiSignInUrl,n&&(i+=""+n.constructFiltersUrl()),[4,this.instance.get(i)];case 1:return a=s.sent(),r.meta=this.metaRemapper.remapMetaData(a.data.meta),o=r,[4,this.predictionRemapper.remapResponseArrayBody(a.data.data)];case 2:return o.data=s.sent(),[2,r];case 3:throw u=s.sent(),l=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching the predictions for game: "+t,l),l.response;case 4:return[2]}}))}))},r.getUserGameEditions=function(t,e){return a(r,void 0,void 0,(function(){var n,r,i,a,o,u=this;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n=null,r=(0,c.isDisabledCache)(e)?"/games/"+this.apiSignInUrl+t.constructFiltersUrl()+(0,c.initDisableCache)():"/games/"+this.apiSignInUrl+t.constructFiltersUrl(),[4,this.instance.get(r)];case 1:return(i=s.sent()).data.data.forEach((function(t){"TOP_X"===t.type?n=u.gamesRemapper.remapPaginatedUserTopXEditions(i.data):"MATCH_QUIZ"===t.type&&(n=u.gamesRemapper.remapPaginatedUserMathQuizEditions(i.data))})),[2,n];case 2:throw a=s.sent(),o=this.transformAxiosErrorToFansUnitedException(a),console.warn("There was a problem fetching the games list",o),o.response;case 3:return[2]}}))}))},r.getGameResults=function(t,e,n){return a(r,void 0,void 0,(function(){var r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),r=(0,c.isDisabledCache)(e)?"/games/"+t+"/results/"+this.apiSignInUrl+(0,c.initDisableCache)():"/games/"+t+"/results/"+this.apiSignInUrl,n&&(r+=""+n.constructMainFiltersUrl()),[4,this.instance.get(r)];case 1:return i=s.sent(),[2,this.gamesRemapper.remapPaginatedGameResults(i.data)];case 2:throw a=s.sent(),o=this.transformAxiosErrorToFansUnitedException(a),console.warn("There was a problem fetching the results for the following game: "+t,o),o.response;case 3:return[2]}}))}))},r.getMarketResultsForGame=function(t,e){return a(r,void 0,void 0,(function(){var n,r,i,a;return s(this,(function(s){switch(s.label){case 0:n="/games/"+t+"/correct-results/"+this.apiSignInUrl,(0,c.isDisabledCache)(e)&&(n+=""+(0,c.initDisableCache)()),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return r=s.sent(),[2,this.gamesRemapper.remapGameMarketsResults(r.data.data)];case 3:throw i=s.sent(),a=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the markets correct results for the following game: "+t,a),a.response;case 4:return[2]}}))}))},r.getContestWinners=function(t){return a(r,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.instance.get("/winners/"+this.apiSignInUrl+"&contest_id="+t)];case 1:return e=i.sent(),[2,this.gamesRemapper.remapContestWinners(e.data)];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem fetching winners for the following game: "+t,r),r.response;case 3:return[2]}}))}))},r.getPredictionById=function(t){return a(r,void 0,void 0,(function(){var e,n,r,i;return s(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),e="/predictions/"+t+this.apiSignInUrl,[4,this.instanceAuth.get(e)];case 1:return n=a.sent(),[4,this.predictionRemapper.remapResponseArrayBody([n.data.data])];case 2:return[2,a.sent()[0]];case 3:throw r=a.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching info for the following prediction: "+t,i),i.response;case 4:return[2]}}))}))},r.predictionRemapper=new o.default(e,n),r.matchSummaryRemapper=new u.default(e,n),r.gamesRemapper=new l.default,r.metaRemapper=new f.default,r}return i(e,t),e}(n(7724).default);e.default=d},4275:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(441),c=n(8673),l=n(6277),h=n(1712),f=function(t){function e(e){var n=t.call(this,e,(0,o.setBaseUrl)(e.environment,"profile"))||this;return n.profileRemapper=null,n.followingRemapper=null,n.followersRemapper=null,n.lang=null,n.limitIds=100,n.getCountries=function(t){return a(n,void 0,void 0,(function(){var e,n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),e="&lang="+this.lang,n="/countries"+this.apiSignInUrl+e,r=Date.now(),t&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return[2,s.sent().data.data];case 2:throw i=s.sent(),a=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the countries:",a),a.response;case 3:return[2]}}))}))},n.getProfile=function(t){return a(n,void 0,void 0,(function(){var e,n,r,i,a;return s(this,(function(s){switch(s.label){case 0:if(e="/profile"+this.apiSignInUrl,!t)return[3,5];e="/profiles/"+t+this.apiSignInUrl,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instance.get(e)];case 2:return r=s.sent(),[2,this.profileRemapper.fullProfileFromResponse(r.data.data)];case 3:throw n=s.sent(),a=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem fetching the following profile: "+t,a),a.response;case 4:return[3,8];case 5:return s.trys.push([5,7,,8]),[4,this.instanceAuth.get(e)];case 6:return r=s.sent(),[2,this.profileRemapper.fullProfileFromResponse(r.data.data)];case 7:throw i=s.sent(),a=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching your profile from API:",a),a.response;case 8:return[2]}}))}))},n.getProfiles=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,u,c,l,h,f,d,p,m;return s(this,(function(s){switch(s.label){case 0:if(s.trys.push([0,7,,8]),n=Date.now(),!(t.length>this.limitIds))return[3,5];r=[],i=(0,o.limitIds)(t,this.limitIds),a=0,u=i,s.label=1;case 1:return a<u.length?(c=u[a],l="/profiles"+this.apiSignInUrl+"&profile_ids="+c.join(","),e&&(l+="&disable_cache="+n),[4,this.instance.get(l)]):[3,4];case 2:h=s.sent(),r.push.apply(r,this.profileRemapper.profilesFromResponse(h.data.data)),s.label=3;case 3:return a++,[3,1];case 4:return[2,r];case 5:return f="/profiles"+this.apiSignInUrl+"&profile_ids="+t.join(","),e&&(f+="&disable_cache="+n),[4,this.instance.get(f)];case 6:return d=s.sent(),[2,this.profileRemapper.profilesFromResponse(d.data.data)];case 7:throw p=s.sent(),m=this.transformAxiosErrorToFansUnitedException(p),console.warn("There was a problem fetching the following profiles: "+t.join(","),m),m.response;case 8:return[2]}}))}))},n.getFollowers=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,o,u;return s(this,(function(s){switch(s.label){case 0:if(n="/profile/followers"+this.apiSignInUrl,!t||e)return[3,5];n="/profile/followers"+this.apiSignInUrl+t.constructFilterUrl(),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instanceAuth.get(n)];case 2:return a=s.sent(),[2,this.followersRemapper.followersFromResponse(a.data)];case 3:throw r=s.sent(),u=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching the followers for own profile",u),u.response;case 4:return[3,9];case 5:if(t||e)return[3,9];s.label=6;case 6:return s.trys.push([6,8,,9]),[4,this.instanceAuth.get(n)];case 7:return a=s.sent(),[2,this.followersRemapper.followersFromResponse(a.data)];case 8:throw i=s.sent(),u=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the followers for own profile",u),u.response;case 9:t&&e?n="/profile/"+e+"/followers"+this.apiSignInUrl+t.constructFilterUrl():!t&&e&&(n="/profile/"+e+"/followers"+this.apiSignInUrl),s.label=10;case 10:return s.trys.push([10,12,,13]),[4,this.instance.get(n)];case 11:return a=s.sent(),[2,this.followersRemapper.followersFromResponse(a.data)];case 12:throw o=s.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem fetching the followers for profile: "+e,u),u.response;case 13:return[2]}}))}))},n.getFollowing=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,o,u;return s(this,(function(s){switch(s.label){case 0:if(n="/profile/following"+this.apiSignInUrl,!t||e)return[3,5];n="/profile/following"+this.apiSignInUrl+t.constructFilterUrl(),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instanceAuth.get(n)];case 2:return a=s.sent(),[2,this.followingRemapper.followingFromResponse(a.data)];case 3:throw r=s.sent(),u=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching the followers of own profile",u),u.response;case 4:return[3,9];case 5:if(t||e)return[3,9];s.label=6;case 6:return s.trys.push([6,8,,9]),[4,this.instanceAuth.get(n)];case 7:return a=s.sent(),[2,this.followingRemapper.followingFromResponse(a.data)];case 8:throw i=s.sent(),u=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the followers of own profile",u),u.response;case 9:t&&e?n="/profile/"+e+"/following"+this.apiSignInUrl+t.constructFilterUrl():!t&&e&&(n="/profile/"+e+"/following"+this.apiSignInUrl),s.label=10;case 10:return s.trys.push([10,12,,13]),[4,this.instance.get(n)];case 11:return a=s.sent(),[2,this.followingRemapper.followingFromResponse(a.data)];case 12:throw o=s.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem fetching the followers of the following profile: "+e,u),u.response;case 13:return[2]}}))}))},n.follow=function(t){return a(n,void 0,void 0,(function(){var e,n,r,i;return s(this,(function(a){switch(a.label){case 0:(e=new h.default).profile_ids=t,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instanceAuth.post("/profile/follow"+this.apiSignInUrl,JSON.stringify(e))];case 2:return n=a.sent(),[2,this.followingRemapper.followResponse(n.data.data)];case 3:throw r=a.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with POST request for profiles: "+t.join(",")+" ",i),i.response;case 4:return[2]}}))}))},n.unfollow=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:(e=new h.default).profile_ids=t,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.instanceAuth.delete("/profile/follow"+this.apiSignInUrl,{data:JSON.stringify(e)})];case 2:return i.sent(),[2,!0];case 3:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem with DELETE request for profiles: "+t.join(",")+" ",r),r.response;case 4:return[2]}}))}))},n.getBadges=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:e="/profile/badges"+this.apiSignInUrl,i.label=1;case 1:return i.trys.push([1,5,,6]),t?(e="/profile/"+t+"/badges"+this.apiSignInUrl,[4,this.instance.get(e)]):[3,3];case 2:return[2,i.sent().data.data];case 3:return[4,this.instanceAuth.get(e)];case 4:return[2,i.sent().data.data];case 5:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem with fetching the badges",r),r.response;case 6:return[2]}}))}))},n.updateProfile=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.instanceAuth.patch("/profile"+this.apiSignInUrl,t)];case 1:return e=i.sent(),[2,this.profileRemapper.fullProfileFromResponse(e.data.data)];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem updating the own profile:",r),r.response;case 3:return[2]}}))}))},n.lang=e.lang,n.profileRemapper=new u.default,n.followingRemapper=new c.default,n.followersRemapper=new l.default,n}return i(e,t),e}(n(7724).default);e.default=f},5792:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(5601),s=n(8539),o=n(1260);e.default=function(t){var e=this;this.isBrowser=!1,this.localStorage=null,this.https=null,this.getEntitiesByIds=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,s,u,c,l;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?[4,this.setTopIdMappings()]:[3,6];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,5]),e=this.localStorage.checkForExistingIdObjs(t,n),r=this.splitForRequestAndExisting(e),[4,this.https.getEntitiesByIdObjs(r.request,n)];case 3:return s=i.sent(),this.localStorage.addIdMappings(s),[2,this.localStorage.getIdsByType(t,n,a)];case 4:return u=i.sent(),console.warn("There was a problem retrieving the entity ids ",u),[2,Promise.resolve([])];case 5:return[3,9];case 6:return i.trys.push([6,8,,9]),[4,this.https.getEntitiesByIdObjs(t,n)];case 7:return c=i.sent(),Object.keys(t).forEach((function(e){t[e]=c.filter((function(t){return t.resource===e})).map((function(t){return t[o.ID_TYPES[a]]}))})),[2,t];case 8:return l=i.sent(),console.warn("There was a problem retrieving the entity ids ",l),[2,Promise.resolve([])];case 9:return[2]}}))}))},this.getEntityById=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(e=this.localStorage.getEntity(t,n,a))?[2,e]:[3,1]:[3,4];case 1:case 4:return[4,this.requestEntity(t,n,a)];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(t){var e={},n={};return Object.keys(t).forEach((function(r){e[r]=t[r].filter((function(t){return!t.exists})).map((function(t){return t.id})),n[r]=t[r].filter((function(t){return t.exists})).map((function(t){return t.id}))})),{existing:n,request:e}},this.requestEntity=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=Array.isArray(t)?t:[t],[4,this.https.getEntitiesByIds(n,t,a)];case 1:return[2,r.sent()];case 2:return e=r.sent(),console.warn("There was a problem retrieving the requested entity: "+e),[2,null];case 3:return[2]}}))}))},this.setTopIdMappings=function(){return r(e,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return t=Math.floor(Date.now()/1e3),this.localStorage.getExpiration("football","ids")>t?[2,Promise.resolve()]:[4,this.https.getTopEntities()];case 1:return e=n.sent(),this.localStorage.addTopIdMappings(e),[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=new a.default(t),this.https=new s.default(t)}},8900:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(4946),s=n(5792),o=n(7611),u=n(9052);e.default=function(t){var e=this;this.idSchema="",this.idMappingFacade=null,this.getEntityIdBySchemaId=function(t,n){return e.idMappingFacade.getEntityById(t,n,e.idSchema)},this.remapEntities=function(t,n){return r(e,void 0,void 0,(function(){var e,r,s;return i(this,(function(i){e=JSON.parse(JSON.stringify(t));try{return this.idSchema!==a.IdSchemaEnum.NATIVE?(r=new o.default,s=r.traverse(e,n),[2,this.idMappingFacade.getEntitiesByIds(s,"native",this.idSchema).then((function(t){return(new u.default).traverse(e,n,t)}))]):[2,t]}catch(t){return console.warn("There was a problem remapping entity: "+n+" with inner entity ",t),[2,[]]}return[2]}))}))},this.getEntityIdsBySchemaId=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return(e={})[n]=t,this.idSchema===a.IdSchemaEnum.NATIVE?[3,2]:[4,this.idMappingFacade.getEntitiesByIds(e,this.idSchema,s)];case 1:return[2,r.sent()];case 2:return[2,e]}}))}))},this.idSchema=t.idSchema,this.idMappingFacade=new s.default(t)}},3845:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.typeConvert=void 0,e.typeConvert=function(t){switch(t){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 t}}},7611:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3845);e.default=function(){var t=this;this.extractedObjIds={},this.traverse=function(e,n){return n=(0,r.typeConvert)(n),Array.isArray(e)?t.traverseArrExtract(e,n):e&&"object"==typeof e&&t.traverseObjExtract(e,n),t.extractedObjIds},this.traverseArrExtract=function(e,n){e&&e.length>0&&e.forEach((function(e){t.traverseObjExtract(e,n)}))},this.traverseObjExtract=function(e,n){e&&Object.keys(e).length>0&&Object.keys(e).forEach((function(r){var i=e[r];"id"===r||"teamId"===r?(t.extractedObjIds.hasOwnProperty(n)||(t.extractedObjIds[n]=[]),i&&t.extractedObjIds[n].push(i)):e[r]&&t.traverse(e[r],r)}))}}},9052:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3845);e.default=function(){var t=this;this.replaceObjIdsIndex=null,this.remappedIdsObj={},this.traverse=function(e,n,i){return n=(0,r.typeConvert)(n),null===t.replaceObjIdsIndex&&(t.initReplaceObjIdsIndex(i),t.remappedIdsObj=i),Array.isArray(e)?t.traverseArrReplace(e,n):e&&"object"==typeof e&&t.traverseObjReplace(e,n),e},this.initReplaceObjIdsIndex=function(e){t.replaceObjIdsIndex={},Object.keys(e).forEach((function(e){t.replaceObjIdsIndex[e]=0}))},this.traverseArrReplace=function(e,n){e&&e.length>0&&e.forEach((function(e){t.traverseObjReplace(e,n)}))},this.traverseObjReplace=function(e,n){e&&Object.keys(e).length>0&&Object.keys(e).forEach((function(r){"id"===r||"teamId"===r?e[r]&&(e[r]=t.remappedIdsObj[n][t.replaceObjIdsIndex[n]],t.replaceObjIdsIndex[n]=t.replaceObjIdsIndex[n]+1):e[r]&&t.traverse(e[r],r,t.remappedIdsObj)}))}}},7302:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(5936);e.default=function(t){var e=this;this.add=function(t,n,a,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.add(t,n,a,s)];case 1:return[2,e.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.like=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.like(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.dislike=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.dislike(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.addPageview=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addPageview(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.addContentConsumed=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addContentConsumed(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.addShare=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addShare(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.addComment=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addComment(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.addClickAd=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addClickAd(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.addConversion=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addConversion(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getOwn=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.getOwn(t,n)];case 1:return[2,e.sent()]}}))}))},this.getForUser=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.getForUser(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.activityFacade=new a.default(t)}},1491:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ActionsEnum=void 0,(n=e.ActionsEnum||(e.ActionsEnum={})).LIKE="like",n.DISLIKE="dislike",n.PAGE_VIEW="page_view",n.CONTENT_CONSUMED="content_consumed",n.SHARE="share",n.COMMENT="comment",n.CLICK_AD="click_ad",n.CONVERSION="conversion"},5936:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(4946),s=n(1022),o=n(1491),u=n(3255),c=n(4630),l=n(8261);e.default=function(t){var e=this;this.add=function(t,n,s,o){return r(e,void 0,void 0,(function(){var e,r,u,l,h;return i(this,(function(i){switch(i.label){case 0:return this.idSchema==a.IdSchemaEnum.NATIVE?[3,3]:(e=JSON.parse(JSON.stringify(n)),[4,this.activityService.remapTagsIds(n,this.idSchema,a.IdSchemaEnum.NATIVE)]);case 1:return r=i.sent(),u=new c.default(t,r,s,o),[4,this.activityHttps.createActivity(u)];case 2:return(l=i.sent()).context.tags=e,[2,l];case 3:return h=new c.default(t,n,s,o),[2,this.activityHttps.createActivity(h)]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityHttps.deleteActivity(t)];case 1:return[2,e.sent()]}}))}))},this.like=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.LIKE,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.dislike=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.DISLIKE,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.addPageview=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.PAGE_VIEW,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.addContentConsumed=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.CONTENT_CONSUMED,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.addShare=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.SHARE,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.addComment=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.COMMENT,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.addClickAd=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.CLICK_AD,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.addConversion=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.CONVERSION,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.getOwn=function(t,n){return r(e,void 0,void 0,(function(){var e,r,s,o;return i(this,(function(i){switch(i.label){case 0:return n=n||!1,t&&(t=new u.default(t)),this.idSchema==a.IdSchemaEnum.NATIVE?[3,6]:[4,this.activityHttps.getOwnActivities(t,n)];case 1:e=i.sent(),r=0,s=e.data,i.label=2;case 2:return r<s.length?(o=s[r],[4,this.activityService.remapTagsIds(o.context.tags,a.IdSchemaEnum.NATIVE,this.idSchema)]):[3,5];case 3:i.sent(),i.label=4;case 4:return r++,[3,2];case 5:return[2,e];case 6:return[4,this.activityHttps.getOwnActivities(t,n)];case 7:return[2,i.sent()]}}))}))},this.getForUser=function(t,n,s){return r(e,void 0,void 0,(function(){var e,r,o,c;return i(this,(function(i){switch(i.label){case 0:return s=s||!1,n&&(n=new u.default(n)),this.idSchema==a.IdSchemaEnum.NATIVE?[3,6]:[4,this.activityHttps.getActivitiesForUser(t,n,s)];case 1:e=i.sent(),r=0,o=e.data,i.label=2;case 2:return r<o.length?(c=o[r],[4,this.activityService.remapTagsIds(c.context.tags,a.IdSchemaEnum.NATIVE,this.idSchema)]):[3,5];case 3:i.sent(),i.label=4;case 4:return r++,[3,2];case 5:return[2,e];case 6:return[4,this.activityHttps.getActivitiesForUser(t,n,s)];case 7:return[2,i.sent()]}}))}))},this.idSchema=t.idSchema,this.activityHttps=new s.default(t),this.activityService=new l.default(t)}},3255:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.action=null,this.page=null,this.limit=null,this.constructFilterUrl=function(){var t="";return e.action&&(t+="&",t+="action="+e.action),e.page&&(t+="&",t+="page="+e.page),e.limit&&(t+="&",t+="limit="+e.limit),t},this.action=t.action?t.action:null,this.page=t.page?t.page:null,this.limit=t.limit?t.limit:null}},1517:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2820);e.default=function(){this.id=null,this.profileId=null,this.action=null,this.context=new r.default,this.points=0}},6021:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3569),i=n(1517);e.default=function(){this.meta=new r.default,this.data=[new i.default]}},2820:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.content=null,this.tags=[],this.campaign=null}},4630:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2820);e.default=function(t,e,n,i){this.action=null,this.context=new r.default,this.action=t,this.context.tags=e,n&&(this.context.content=n),i&&(this.context.campaign=i)}},2453:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(7974),a=n(1316),s=n(9826),o=n(1517),u=n(6021);e.default=function(){var t=this;this.remapSingleResponse=function(t){var e=new o.default;return e.id=t.id,e.profileId=t.profile_id,e.action=t.action,e.context.content=t.context.content,e.context.tags=t.context.tags,e.context.campaign=t.context.campaign,e.points=t.points,e},this.remapActivitiesResponse=function(e){var n=new u.default;return n.meta.pagination.currentPage=e.meta.pagination.current_page,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.numberOfPages=e.meta.pagination.number_of_pages,n.meta.pagination.totalItems=e.meta.pagination.total_items,n.data=e.data.map((function(e){return t.remapSingleResponse(e)})),n},this.remapStatsReponse=function(e){var n=new a.default;return n.profileId=e.profile_id,n.tier=e.tier,n.points=e.points,n.successRates.overallPercent=e.success_rates.overall_percent,n.successRates.byFootballCompetition=t.constructNewRecord(e.success_rates.by_competition),n.successRates.byFootballTeam=t.constructNewRecord(e.success_rates.by_team),n.successRates.byFootballMarket=t.constructNewRecord(e.success_rates.by_market),n},this.constructNewRecord=function(e){var n;return Object.entries(e).length?(Object.entries(e).forEach((function(e){var a,s=e[0],o=e[1];n=r(r({},n),((a={})[s]=t.remapSuccessRatePercent(o),a)),i.MarketEnum[s]&&delete n[s].model})),n):e},this.remapSuccessRatePercent=function(t){var e=new s.default;return e.successRatePercent=t.success_rate_percent,e}}},8261:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(8900);e.default=function(t){var e=this;this.remapTagsIds=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,s,o,u,c,l,h,f,d;return i(this,(function(i){switch(i.label){case 0:return t&&t.length?(e={},r={},s=[],t.forEach((function(t){e.hasOwnProperty(t.type)||(e[t.type]=[],r[t.type]=[]),e[t.type].push(t.id),r[t.type].push(t)})),[4,this.idMapping.idMappingFacade.getEntitiesByIds(e,n,a)]):[2,t];case 1:for(o=i.sent(),u=function(t,e){e.forEach((function(e,n){e.id=o[t][n],s.push(e)}))},c=0,l=Object.entries(r);c<l.length;c++)h=l[c],f=h[0],d=h[1],u(f,d);return[2,s]}}))}))},this.idSchema=t.idSchema,this.idMapping=new a.default(t)}},7e3:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(2754);e.default=function(t,e,n){var s=this;this.isBrowser=!1,this.localStorage={},this.https=null,this.idMapping=null,this.getCompetitionsIdMapping=function(t,e){return r(s,void 0,void 0,(function(){var n,r,s,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,8,,9]),n=!1,t?(t=new a.default(t)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([""+t.countryId],"country","native")]:[3,2]:[3,5];case 1:0===(r=i.sent()).country.length&&(n=!0),t.countryId=r.country[0],i.label=2;case 2:return t.competitionIds?[4,this.idMapping.getEntityIdsBySchemaId(t.competitionIds,"competition","native")]:[3,4];case 3:0===(s=i.sent()).competition.length&&(n=!0),t.competitionIds=s.competition,i.label=4;case 4:if(n)return[2,[]];i.label=5;case 5:return[4,this.getCompetitions(t,e)];case 6:return o=i.sent(),[4,this.idMapping.remapEntities(o,"competition")];case 7:return[2,i.sent()];case 8:throw u=i.sent(),console.warn("There was a problem browsing all of the competitions",u),u;case 9:return[2]}}))}))},this.getCompetitionsMapWithNativeIds=function(t){return r(s,void 0,void 0,(function(){var e,n,r,s,o;return i(this,(function(i){switch(i.label){case 0:return e=new Map,n=t.length,r=new a.default({competitionIds:t,limit:n}),[4,this.getCompetitions(r)];case 1:return(s=i.sent()).sort((function(t,e){return t.id.localeCompare(e.id)})),[4,this.idMapping.remapEntities(s,"competition")];case 2:return o=i.sent(),t.forEach((function(t,n){return e.set(t,o[n])})),[2,e]}}))}))},this.getCompetitions=function(t,e){return r(s,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:if(n=null,e=e||!1,!this.isBrowser)return[3,6];if(this.localStorage.getCompetitionsLength())return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.https.getCompetitions()];case 2:return n=i.sent(),[3,4];case 3:throw r=i.sent(),console.warn("There was a problem retrieving all competitions",r),r;case 4:this.localStorage.setCompetitions(n),i.label=5;case 5:return[2,this.localStorage.getCompetitions(t)];case 6:return[2,this.https.getCompetitions(t,e)]}}))}))},this.getCompetitionByIdIdMapping=function(t,e){return r(s,void 0,void 0,(function(){var n,r,a,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"competition","native")];case 1:return n=i.sent(),r=n.competition[0],[4,this.getCompetitionById(r,e)];case 2:return a=i.sent(),[4,this.idMapping.remapEntities(a,"competition")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the following competition:"+t,s),s;case 5:return[2]}}))}))},this.getCompetitionById=function(t,e){return r(s,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||!1,[4,this.https.getCompetitionById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the competition with the following id: "+t,n),n;case 3:return[2]}}))}))},this.getTopCompetitionsIdMapping=function(t){return r(s,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopCompetitions(t)];case 1:return e=r.sent(),[4,this.idMapping.remapEntities(e,"competition")];case 2:return[2,r.sent()];case 3:throw n=r.sent(),console.warn("There was a problem browsing the top competitions",n),n;case 4:return[2]}}))}))},this.getTopCompetitions=function(t){return r(s,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=t||!1,[4,this.https.getTopCompetitions(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the top competitions",e),e;case 3:return[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=t,this.idMapping=n,this.https=e}},8350:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t,e,i){var a=this;this.isBrowser=!1,this.localStorage={},this.https=null,this.idMapping=null,this.getCountriesWithIdMapping=function(t){return n(a,void 0,void 0,(function(){var e,n;return r(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getCountries(t)];case 1:return e=r.sent(),[2,this.idMapping.remapEntities(e,"country")];case 2:throw n=r.sent(),console.warn("There was a problem browsing countries as football entities",n),n;case 3:return[2]}}))}))},this.getCountries=function(t){return n(a,void 0,void 0,(function(){var e,n,i;return r(this,(function(r){switch(r.label){case 0:return t=t||!1,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(t)];case 2:return n=r.sent(),this.localStorage.setFootballCountries(n),[2,n];case 3:throw i=r.sent(),console.warn("There was a problem retrieving countries as football entities",i),i;case 4:return[3,6];case 5:return[2,this.https.getCountries(t)];case 6:return[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=t,this.idMapping=i,this.https=e}},4289:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(8350),s=n(7e3),o=n(9693),u=n(4272),c=n(4545),l=n(2140);e.default=function(t,e,n,h){var f=this;this.countriesFacade=null,this.competitionsFacade=null,this.teamsFacade=null,this.playerFacade=null,this.matchFacade=null,this.searchFacade=null,this.getCountries=function(t){return r(f,void 0,void 0,(function(){return i(this,(function(e){return[2,this.countriesFacade.getCountriesWithIdMapping(t)]}))}))},this.getCompetitions=function(t,e){return r(f,void 0,void 0,(function(){return i(this,(function(n){return[2,this.competitionsFacade.getCompetitionsIdMapping(t,e)]}))}))},this.getCompetitionById=function(t,e){return r(f,void 0,void 0,(function(){return i(this,(function(n){return[2,this.competitionsFacade.getCompetitionByIdIdMapping(t,e)]}))}))},this.getTopCompetitions=function(t){return r(f,void 0,void 0,(function(){return i(this,(function(e){return[2,this.competitionsFacade.getTopCompetitionsIdMapping(t)]}))}))},this.getCompetitionsMapWithNativeIds=function(t){return r(f,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.competitionsFacade.getCompetitionsMapWithNativeIds(t)];case 1:return[2,e.sent()]}}))}))},this.getTeams=function(t,e){return r(f,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getTeamsIdMapping(t,e)]}))}))},this.getTeamById=function(t,e){return r(f,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getTeamByIdIdMapping(t,e)]}))}))},this.getTopTeams=function(t){return r(f,void 0,void 0,(function(){return i(this,(function(e){return[2,this.teamsFacade.getTopTeamsIdMapping(t)]}))}))},this.getNextMatchForTeam=function(t,e){return r(f,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getNextMatchForTeamIdMapping(t,e)]}))}))},this.getPrevMatchForTeam=function(t,e){return r(f,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getPrevMatchForTeamIdMapping(t,e)]}))}))},this.getTeamsMapWithNativeIds=function(t){return r(f,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.teamsFacade.getTeamsMapWithNativeIds(t)];case 1:return[2,e.sent()]}}))}))},this.getPlayers=function(t,e){return r(f,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPlayersIdMapping(t,e)]}))}))},this.getPlayerById=function(t,e){return r(f,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPlayerIdMapping(t,e)]}))}))},this.getTopPlayers=function(t){return r(f,void 0,void 0,(function(){return i(this,(function(e){return[2,this.playerFacade.getTopPlayersIdMapping(t)]}))}))},this.getNextMatchForPlayer=function(t,e){return r(f,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getNextMatchForPlayerIdMapping(t,e)]}))}))},this.getPrevMatchForPlayer=function(t,e){return r(f,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPrevMatchForPlayerIdMapping(t,e)]}))}))},this.getPlayersMapWithNativeIds=function(t){return r(f,void 0,void 0,(function(){return i(this,(function(e){return[2,this.playerFacade.getPlayersMapWithNativeIds(t)]}))}))},this.getMatches=function(t,e){return r(f,void 0,void 0,(function(){return i(this,(function(n){return[2,this.matchFacade.getMatchesIdMapping(t,e)]}))}))},this.getMatchById=function(t,e){return r(f,void 0,void 0,(function(){return i(this,(function(n){return[2,this.matchFacade.getMatchIdMapping(t,e)]}))}))},this.search=function(t,e){return r(f,void 0,void 0,(function(){return i(this,(function(n){return[2,this.searchFacade.searchIdMapping(t,e)]}))}))},this.countriesFacade=new a.default(e,n,h),this.competitionsFacade=new s.default(e,n,h),this.teamsFacade=new o.default(t,n,h),this.playerFacade=new u.default(t,n,h),this.matchFacade=new c.default(t,n,h),this.searchFacade=new l.default(n,h)}},4545:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var s=n(712),o=n(6134),u=n(9582);e.default=function(t,e,n){var c=this;this.https=null,this.idMapping=null,this.footballService=null,this.getMatchesIdMapping=function(t,e){return r(c,void 0,void 0,(function(){var n,r,s,u,c,l,h,f;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,12,,13]),t?(t=new o.default(t)).countryIds?[4,this.idMapping.getEntityIdsBySchemaId(t.countryIds,"country","native")]:[3,2]:[3,8];case 1:n=i.sent(),t.countryIds=n.country,i.label=2;case 2:return t.competitionIds?[4,this.idMapping.getEntityIdsBySchemaId(t.competitionIds,"competition","native")]:[3,4];case 3:r=i.sent(),t.competitionIds=r.competition,i.label=4;case 4:return t.matchIds?[4,this.idMapping.getEntityIdsBySchemaId(t.matchIds,"match","native")]:[3,6];case 5:s=i.sent(),t.matchIds=s.match,i.label=6;case 6:return t.teamIds?[4,this.idMapping.getEntityIdsBySchemaId(t.teamIds,"team","native")]:[3,8];case 7:u=i.sent(),t.teamIds=u.team,i.label=8;case 8:return[4,this.getMatches(t,e)];case 9:return c=i.sent(),l=c,[4,this.footballService.setAvailableMarketsForMatch(a([],c.data,!0))];case 10:return l.data=i.sent(),h=c,[4,this.idMapping.remapEntities(c.data,"match")];case 11:return h.data=i.sent(),[2,c];case 12:throw f=i.sent(),console.warn("There was a problem browsing the matches",f),f;case 13:return[2]}}))}))},this.getMatchesWithNativeIds=function(t){return r(c,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=t.length,n=new o.default({matchIds:t,limit:e}),[4,this.getMatches(n)];case 1:return(r=i.sent()).data.sort((function(t,e){return t.id.localeCompare(e.id)})),[4,this.idMapping.remapEntities(r.data,"match")];case 2:return[2,i.sent()]}}))}))},this.getMatchesMapWithNativeIds=function(t){return r(c,void 0,void 0,(function(){var e,n,r,a,u,c;return i(this,(function(i){switch(i.label){case 0:return e={},(n=(0,s.transformIdsToBeUnique)(t)).sort((function(t,e){return t.localeCompare(e)})),[4,this.getMatchesWithNativeIds(n)];case 1:return r=i.sent(),n.length===r.length?[3,3]:(a=new o.default({matchIds:n,limit:n.length}),[4,this.getMatches(a)]);case 2:u=i.sent(),c=n.filter((function(t){if(u.data.every((function(e){return e.id!==t})))return t})),n=n.filter((function(t){if(!c.includes(t))return t})),i.label=3;case 3:return n.forEach((function(t,n){return e[t]=r[n]})),[2,e]}}))}))},this.getMatches=function(t,e){return r(c,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||!1,[4,this.https.getMatches(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the matches",n),n;case 3:return[2]}}))}))},this.getMatchIdMapping=function(t,e){return r(c,void 0,void 0,(function(){var n,r,a,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,5,,6]),[4,this.idMapping.getEntityIdsBySchemaId([t],"match","native")];case 1:return n=i.sent(),[4,this.getMatchById(n.match[0],e)];case 2:return r=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(r)];case 3:return a=i.sent(),[4,this.idMapping.remapEntities(a,"match")];case 4:return[2,i.sent()];case 5:throw s=i.sent(),console.warn("There was a problem browsing the following match: "+t,s),s;case 6:return[2]}}))}))},this.getMatchById=function(t,e){return r(c,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||!1,[4,this.https.getMatchById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following match: "+t,n),n;case 3:return[2]}}))}))},this.https=e,this.idMapping=n,this.footballService=new u.default(t)}},4272:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(6477),s=n(712),o=n(9582);e.default=function(t,e,n){var u=this;this.https=null,this.footballService=null,this.idMapping=null,this.getPlayersIdMapping=function(t,e){return r(u,void 0,void 0,(function(){var n,r,s,o,u,c,l;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,10,,11]),n=!1,t?(t=new a.default(t)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([t.countryId],"country","native")]:[3,2]:[3,7];case 1:0===(r=i.sent()).country.length&&(n=!0),t.countryId=r.country[0],i.label=2;case 2:return t.playerIds?[4,this.idMapping.getEntityIdsBySchemaId(t.playerIds,"player","native")]:[3,4];case 3:0===(s=i.sent()).player.length&&(n=!0),t.playerIds=s.player,i.label=4;case 4:return t.scope?[4,this.idMapping.getEntityIdsBySchemaId(t.scope,"competition","native")]:[3,6];case 5:0===(o=i.sent()).competition.length&&(n=!0),t.scope=o.competition,i.label=6;case 6:if(n)return[2,[]];i.label=7;case 7:return[4,this.getPlayers(t,e)];case 8:return u=i.sent(),c=u,[4,this.idMapping.remapEntities(u.data,"player")];case 9:return c.data=i.sent(),[2,u];case 10:throw l=i.sent(),console.warn("There was a problem browsing the players",l),l;case 11:return[2]}}))}))},this.getPlayersWithNativeIds=function(t){return r(u,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=t.length,n=new a.default({playerIds:t,limit:e}),[4,this.getPlayers(n)];case 1:return(r=i.sent()).data.sort((function(t,e){return t.id.localeCompare(e.id)})),[4,this.idMapping.remapEntities(r.data,"player")];case 2:return[2,i.sent()]}}))}))},this.getPlayersMapWithNativeIds=function(t){return r(u,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e={},(n=(0,s.transformIdsToBeUnique)(t)).sort((function(t,e){return t.localeCompare(e)})),[4,this.getPlayersWithNativeIds(n)];case 1:return r=i.sent(),n.forEach((function(t,n){return e[t]=r[n]})),[2,e]}}))}))},this.getPlayers=function(t,e){return r(u,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||!1,[4,this.https.getPlayers(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the players",n),n;case 3:return[2]}}))}))},this.getPlayerIdMapping=function(t,e){return r(u,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"player","native")];case 1:return n=i.sent(),[4,this.getPlayerById(n.player[0],e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"player")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the following player:"+t,a),a;case 5:return[2]}}))}))},this.getPlayerById=function(t,e){return r(u,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||!1,[4,this.https.getPlayerById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following player: "+t,n),n;case 3:return[2]}}))}))},this.getTopPlayersIdMapping=function(t){return r(u,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopPlayers(t)];case 1:return e=r.sent(),[4,this.idMapping.remapEntities(e,"player")];case 2:return[2,r.sent()];case 3:throw n=r.sent(),console.warn("There was a problem browsing the top players",n),n;case 4:return[2]}}))}))},this.getTopPlayers=function(t){return r(u,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=t||!1,[4,this.https.getTopPlayers(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the top players",e),e;case 3:return[2]}}))}))},this.getNextMatchForPlayerIdMapping=function(t,e){return r(u,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"player","native")];case 1:return n=i.sent(),t=n.player[0],[4,this.getNextMatchForPlayer(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the next match for player:"+t,a),a;case 5:return[2]}}))}))},this.getNextMatchForPlayer=function(t,e){return r(u,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getNextMatchForPlayer(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the next match for player: "+t,r),r;case 4:return[2]}}))}))},this.getPrevMatchForPlayerIdMapping=function(t,e){return r(u,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"player","native")];case 1:return n=i.sent(),t=n.player[0],[4,this.getPrevMatchForPlayer(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the previous match for player:"+t,a),a;case 5:return[2]}}))}))},this.getPrevMatchForPlayer=function(t,e){return r(u,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getPrevMatchForPlayer(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the previous match for player: "+t,r),r;case 4:return[2]}}))}))},this.idMapping=n,this.https=e,this.footballService=new o.default(t)}},2140:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(604);e.default=function(t,e){var n=this;this.https=null,this.idMapping=null,this.searchIdMapping=function(t,e){return r(n,void 0,void 0,(function(){var n,r,s,o,u,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,10,,11]),(t=new a.default(t)).scope?[4,this.idMapping.getEntityIdsBySchemaId(t.scope,"competition","native")]:[3,2];case 1:n=i.sent(),t.scope=n.competition,i.label=2;case 2:return[4,this.search(t,e)];case 3:return(r=i.sent()).teams&&r.teams.length>0?[4,this.idMapping.remapEntities(r.teams,"team")]:[3,5];case 4:s=i.sent(),r.teams=s,i.label=5;case 5:return r.players&&r.players.length>0?[4,this.idMapping.remapEntities(r.players,"player")]:[3,7];case 6:o=i.sent(),r.players=o,i.label=7;case 7:return r.competitions&&r.competitions.length>0?[4,this.idMapping.remapEntities(r.competitions,"competition")]:[3,9];case 8:u=i.sent(),r.competitions=u,i.label=9;case 9:return[2,r];case 10:throw c=i.sent(),console.warn("There was a problem with browsing the search result",c),c;case 11:return[2]}}))}))},this.search=function(t,e){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.https.search(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the search response",n),n;case 3:return[2]}}))}))},this.https=t,this.idMapping=e}},9693:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(9920),s=n(9582);e.default=function(t,e,n){var o=this;this.footballService=null,this.https=null,this.idMapping=null,this.getTeamsIdMapping=function(t,e){return r(o,void 0,void 0,(function(){var n,r,s,o,u,c,l;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,9,,10]),n=!1,t?(t=new a.default(t)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([""+t.countryId],"country","native")]:[3,2]:[3,6];case 1:0===(r=i.sent()).country.length&&(n=!0),t.countryId=r.country[0],i.label=2;case 2:return t.scope?[4,this.idMapping.getEntityIdsBySchemaId(t.scope,"competition","native")]:[3,4];case 3:0===(s=i.sent()).competition.length&&(n=!0),t.scope=s.competition,i.label=4;case 4:return t.teamIds?[4,this.idMapping.getEntityIdsBySchemaId(t.teamIds,"team","native")]:[3,6];case 5:0===(o=i.sent()).team.length&&(n=!0),t.teamIds=o.team,i.label=6;case 6:return n?[2,[]]:[4,this.getTeams(t,e)];case 7:return u=i.sent(),c=u,[4,this.idMapping.remapEntities(u.data,"team")];case 8:return c.data=i.sent(),[2,u];case 9:throw l=i.sent(),console.warn("There was a problem browsing all teams",l),l;case 10:return[2]}}))}))},this.getTeamsMapWithNativeIds=function(t){return r(o,void 0,void 0,(function(){var e,n,r,s,o;return i(this,(function(i){switch(i.label){case 0:return e=new Map,n=t.length,r=new a.default({teamIds:t,limit:n}),[4,this.getTeams(r)];case 1:return(s=i.sent().data).sort((function(t,e){return t.id.localeCompare(e.id)})),[4,this.idMapping.remapEntities(s,"team")];case 2:return o=i.sent(),t.forEach((function(t,n){return e.set(t,o[n])})),[2,e]}}))}))},this.getTeams=function(t,e){return r(o,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||!1,[4,this.https.getTeams(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving all teams",n),n;case 3:return[2]}}))}))},this.getTeamByIdIdMapping=function(t,e){return r(o,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"team","native")];case 1:return n=i.sent(),t=n.team[0],[4,this.getTeamById(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"team")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the following team:"+t,a),a;case 5:return[2]}}))}))},this.getTeamById=function(t,e){return r(o,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||!1,[4,this.https.getTeamById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following team: "+t,n),n;case 3:return[2]}}))}))},this.getTopTeamsIdMapping=function(t){return r(o,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopTeams(t)];case 1:return e=r.sent(),[4,this.idMapping.remapEntities(e,"team")];case 2:return[2,r.sent()];case 3:throw n=r.sent(),console.warn("There was a problem browsing the top teams",n),n;case 4:return[2]}}))}))},this.getTopTeams=function(t){return r(o,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=t||!1,[4,this.https.getTopTeams(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the top teams",e),e;case 3:return[2]}}))}))},this.getNextMatchForTeamIdMapping=function(t,e){return r(o,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"team","native")];case 1:return n=i.sent(),t=n.team[0],[4,this.getNextMatchForTeam(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the next match for the following team:"+t,a),a;case 5:return[2]}}))}))},this.getNextMatchForTeam=function(t,e){return r(o,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getNextMatchForTeam(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the next match for the following team: "+t,r),r;case 4:return[2]}}))}))},this.getPrevMatchForTeamIdMapping=function(t,e){return r(o,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"team","native")];case 1:return n=i.sent(),t=n.team[0],[4,this.getPrevMatchForTeam(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the previous match for the following team:"+t,a),a;case 5:return[2]}}))}))},this.getPrevMatchForTeam=function(t,e){return r(o,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getPrevMatchForTeam(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the previous match for the following team: "+t,r),r;case 4:return[2]}}))}))},this.idMapping=n,this.https=e,this.footballService=new s.default(t)}},8808:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(8900),s=n(5601),o=n(595),u=n(4289);e.default=function(t){var e=this;this.https=null,this.idMapping=null,this.localStorage=null,this.footballFacade=null,this.getCountries=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getCountries(t)];case 1:return[2,e.sent()]}}))}))},this.getCompetitions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getCompetitions(t,n)];case 1:return[2,e.sent()]}}))}))},this.getCompetitionById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getCompetitionById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTopCompetitions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopCompetitions(t)];case 1:return[2,e.sent()]}}))}))},this.getTeams=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTeams(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTeamById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTeamById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTopTeams=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopTeams(t)];case 1:return[2,e.sent()]}}))}))},this.getNextMatchForTeam=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getNextMatchForTeam(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPrevMatchForTeam=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPrevMatchForTeam(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPlayers=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPlayers(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPlayerById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPlayerById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTopPlayers=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopPlayers(t)];case 1:return[2,e.sent()]}}))}))},this.getNextMatchForPlayer=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getNextMatchForPlayer(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPrevMatchForPlayer=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPrevMatchForPlayer(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMatches=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getMatches(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMatchById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getMatchById(t,n)];case 1:return[2,e.sent()]}}))}))},this.search=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.search(t,n)];case 1:return[2,e.sent()]}}))}))},this.https=new o.default(t),this.idMapping=new a.default(t),this.localStorage=new s.default(t),this.footballFacade=new u.default(t,this.localStorage,this.https,this.idMapping)}},6975:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.type="",this.name=""}},2754:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=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 t="";return e.countryId&&(t=(t+="&")+"country_id="+e.countryId),e.gender&&(t=(t+="&")+"gender="+e.gender),e.type&&(t=(t+="&")+"type="+e.type),e.sortField&&(t=(t+="&")+"sort_field="+e.sortField),e.sortOrder&&(t=(t+="&")+"sort_order="+e.sortOrder),e.name&&(t=(t+="&")+"name="+e.name),e.competitionIds&&(t=(t+="&")+"competition_ids="+e.competitionIds.join(",")),t},this.competitionSearchFilter=function(t){try{var n=e.filter(t);return e.sortField||e.sortOrder?e.sort(n):n}catch(t){return console.warn("There was a problem filtering the local competitions",t),[]}},this.filter=function(t){var n=e.entitiesToSearchWith();return t.filter((function(t){var r=!0;return n.forEach((function(n){"sortOrder"!==n&&"sortField"!==n&&("countryId"===n?r&&(r=t.country.id===e[n]):"name"===n?r&&(r=t.name.toLocaleLowerCase().includes(e[n].toLocaleLowerCase())):"competitionIds"===n?r&&(r=e[n].some((function(e){return t.id===e}))):r&&(r=t[n].toLocaleLowerCase()===e[n].toLocaleLowerCase()))})),r}))},this.entitiesToSearchWith=function(){var t=[];return e.countryId&&t.push("countryId"),e.name&&t.push("name"),e.gender&&t.push("gender"),e.type&&t.push("type"),e.sortField&&t.push("sortField"),e.sortOrder&&t.push("sortOrder"),e.competitionIds&&t.push("competitionIds"),t},this.sort=function(t){var n=[];return"name"===e.sortField?n=t.sort((function(t,n){return e.sortOrder&&"desc"===e.sortOrder?n.name.localeCompare(t.name):t.name.localeCompare(n.name)})):"country"===e.sortField?n=t.sort((function(t,n){return e.sortOrder&&"desc"===e.sortOrder?n.country.name.localeCompare(t.country.name):t.country.name.localeCompare(n.country.name)})):"scope"===e.sortField?t.forEach((function(t){return n[e.competitionIds.indexOf(t.id)]=t})):e.sortField||"desc"!==e.sortOrder||(n=t.sort((function(t,e){return e.id.localeCompare(t.id)}))),n},this.countryId=t.countryId?""+t.countryId:null,this.name=t.name?t.name:null,this.gender=t.gender?t.gender:null,this.type=t.type?t.type:null,this.sortField=t.sortField?""+t.sortField:null,this.sortOrder=t.sortOrder?""+t.sortOrder:null,this.competitionIds=t.competitionIds?t.competitionIds:null}},3321:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.type="",this.name="",this.participants=[]}},7316:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6975),i=n(3430),a=function(){function t(){this.countryRemapper=null,this.countryRemapper=new i.default}return t.prototype.fromResponse=function(t){try{var e=new r.default;return e.id=t.id,e.country=this.countryRemapper.countryFromResponse(t.country),e.gender=t.gender,e.assets=t.assets,e.type=t.type,e.name=t.name,e}catch(t){throw console.warn("There was a problem remapping the competition response",t),t}},t}();e.default=a},8758:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3321),i=n(3430),a=n(5827),s=function(){function t(){this.countryRemapper=null,this.teamBasicRemapper=null,this.countryRemapper=new i.default,this.teamBasicRemapper=new a.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new r.default;return n.id=t.id,n.country=this.countryRemapper.countryFromResponse(t.country),n.gender=t.gender,n.assets=t.assets,n.type=t.type,n.name=t.name,n.participants=t.participants.map((function(t){return e.teamBasicRemapper.fromResponse(t)})),n}catch(t){throw console.warn("There was a problem remapping the competition response",t),t}},t}();e.default=s},4427:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.alias="",this.countryCode="",this.assets=null,this.name=""}},3430:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4427);e.default=function(){var t=this;this.countriesFromResponse=function(e){if(e)return e.map((function(e){return t.countryFromResponse(e)}))},this.countryFromResponse=function(t){try{if(t){var e=new r.default;return e.id=t.id,e.alias=t.alias,e.assets=t.assets,e.countryCode=t.country_code,e.name=t.name,e}}catch(t){throw t}return null}}},8470:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.homeTeam={players:[]},this.awayTeam={players:[]}}},3098:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8470),i=n(3550),a=function(){function t(){this.playerRemapper=null,this.playerRemapper=new i.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new r.default;return n.homeTeam.players=t.home_team&&t.home_team.players?t.home_team.players.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n.awayTeam.players=t.away_team&&t.away_team.players?t.away_team.players.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping the lineups",t),t}},t}();e.default=a},2579:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.kickoffAt="",this.finishedAt="",this.updatedAt="",this.availableMarkets=null,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:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=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 t="";return e.countryIds&&(t=(t+="&")+"countries="+e.countryIds.join(",")),e.competitionIds&&(t=(t+="&")+"competitions="+e.competitionIds.join(",")),e.matchIds&&(t=(t+="&")+"matches="+e.matchIds.join(",")),e.status&&(t=(t+="&")+"status="+e.status),e.teamIds&&(t=(t+="&")+"teams="+e.teamIds.join(",")),e.fromDate&&(t=(t+="&")+"from_date="+e.fromDate),e.toDate&&(t=(t+="&")+"to_date="+e.toDate),e.limit&&(t=(t+="&")+"limit="+e.limit),e.page&&(t=(t+="&")+"page="+e.page),e.sortField&&(t=(t+="&")+"sort_field="+e.sortField),e.sortOrder&&(t=(t+="&")+"sort_order="+e.sortOrder),t},this.countryIds=t.countryIds?t.countryIds:null,this.competitionIds=t.competitionIds?t.competitionIds:null,this.matchIds=t.matchIds?t.matchIds:null,this.status=t.status?t.status:null,this.teamIds=t.teamIds?t.teamIds:null,this.fromDate=t.fromDate?t.fromDate:null,this.toDate=t.toDate?t.toDate:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null,this.sortField=t.sortField?t.sortField:null,this.sortOrder=t.sortOrder?t.sortOrder:null}},9661:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6899);e.default=function(){this.id="",this.kickoffAt="",this.finishedAt="",this.updatedAt="",this.availableMarkets=null,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=new r.default,this.lineups=null}},5284:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2579),i=n(5827),a=n(7316),s=n(3949),o=function(){function t(){this.teamRemapper=null,this.competitionRemapper=null,this.scoresRemapper=null,this.teamRemapper=new i.default,this.competitionRemapper=new a.default,this.scoresRemapper=new s.default}return t.prototype.fromResponse=function(t){try{var e=new r.default;return e.id=t.id,e.kickoffAt=t.kickoff_at,e.finishedAt=t.finished_at,e.updatedAt=t.updated_at,e.homeTeam=this.teamRemapper.fromResponse(t.home_team),e.awayTeam=this.teamRemapper.fromResponse(t.away_team),e.lineupsConfirmed=t.lineups_confirmed,e.startedAt=t.started_at,e.minute=t.minute,e.scores=this.scoresRemapper.fromResponse(t.scores),e.context={competition:t.context.competition?this.competitionRemapper.fromResponse(t.context.competition):null},e.status={type:t.status.type,subType:t.status.sub_type},e}catch(t){throw console.warn("There was a problem remapping the match response",t),t}},t}();e.default=o},9330:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9661),i=n(5827),a=n(7316),s=n(7122),o=n(3949),u=n(3098),c=n(8470),l=n(92),h=function(){function t(){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 a.default,this.lineupsMapper=new u.default,this.scoresMapper=new o.default,this.statsMapper=new s.default,this.timelineMapper=new l.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new r.default;return n.id=t.id,n.kickoffAt=t.kickoff_at,n.finishedAt=t.finished_at,n.updatedAt=t.updated_at,n.homeTeam=t.home_team?this.teamMapper.fromResponse(t.home_team):null,n.awayTeam=t.away_team?this.teamMapper.fromResponse(t.away_team):null,n.lineupsConfirmed=t.lineups_confirmed,n.startedAt=t.started_at,n.minute=t.minute,n.scores=this.scoresMapper.fromResponse(t.scores),n.stats=this.statsMapper.fromResponse(t.stats),n.context={competition:this.competitionsMapper.fromResponse(t.context.competition)},n.timeline=t.timeline?t.timeline.map((function(t){return e.timelineMapper.fromResponse(t)})):[],n.status={type:t.status.type,subType:t.status.sub_type},n.lineups=t.lineups?this.lineupsMapper.fromResponse(t.lineups):new c.default,n}catch(t){throw console.warn("There was a problem remapping the match response",t),t}},t}();e.default=h},4652:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.ftScore=null,this.htScore=null,this.aetScore=null,this.aggScore=null,this.penScore=null}},3949:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4652),i=function(){function t(){this.statEntityFromResponse=function(t){return{homeGoals:t.home_goals,awayGoals:t.away_goals}}}return t.prototype.fromResponse=function(t){try{var e=new r.default;return e.ftScore=this.statEntityFromResponse(t.ft_score),e.htScore=this.statEntityFromResponse(t.ht_score),e.aetScore=this.statEntityFromResponse(t.aet_score),e.aggScore=this.statEntityFromResponse(t.agg_score),e.penScore=this.statEntityFromResponse(t.pen_score),e}catch(t){throw console.warn("There was a problem remapping the scores",t),t}},t}();e.default=i},7950:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.corners=null,this.cornersFirstHalf=null,this.cornersSecondHalf=null,this.cornersExtraTime=null,this.crosses=null,this.crossesFirstHalf=null,this.crossesSecondHalf=null,this.crossesExtraTime=null,this.offside=null,this.offsideFirstHalf=null,this.offsideSecondHalf=null,this.offsideExtraTime=null,this.shotsOn=null,this.shotsOnFirstHalf=null,this.shotsOnSecondHalf=null,this.shotsOnExtraTime=null,this.throwIn=null,this.throwInFirstHalf=null,this.throwInSecondHalf=null,this.throwInExtraTime=null,this.redCards=null,this.redCardsFirstHalf=null,this.redCardsSecondHalf=null,this.redCardsExtraTime=null,this.shotsOff=null,this.shotsOffFirstHalf=null,this.shotsOffSecondHalf=null,this.shotsOffExtraTime=null,this.goalKicks=null,this.goalKicksFirstHalf=null,this.goalKicksSecondHalf=null,this.goalKicksExtraTime=null,this.possession=null,this.possessionFirstHalf=null,this.possessionSecondHalf=null,this.possessionExtraTime=null,this.treatments=null,this.treatmentsFirstHalf=null,this.treatmentsSecondHalf=null,this.treatmentsExtraTime=null,this.yellowCards=null,this.yellowCardsFirstHalf=null,this.yellowCardsSecondHalf=null,this.yellowCardsExtraTime=null,this.shotsBlocked=null,this.shotsBlockedFirstHalf=null,this.shotsBlockedSecondHalf=null,this.shotsBlockedExtraTime=null,this.substitutions=null,this.substitutionsFirstHalf=null,this.substitutionsSecondHalf=null,this.substitutionsExtraTime=null,this.counterAttacks=null,this.counterAttacksFirstHalf=null,this.counterAttacksSecondHalf=null,this.counterAttacksExtraTime=null,this.foulsCommitted=null,this.foulsCommittedFirstHalf=null,this.foulsCommittedSecondHalf=null,this.foulsCommittedExtraTime=null}},7122:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7950),i=function(){function t(){this.statEntityFromResponse=function(t){return{homeTeam:t?t.home_team:null,awayTeam:t?t.away_team:null}}}return t.prototype.fromResponse=function(t){try{var e=new r.default;return e.corners=this.statEntityFromResponse(t.corners),e.cornersFirstHalf=this.statEntityFromResponse(t.corners_1h),e.cornersSecondHalf=this.statEntityFromResponse(t.corners_2h),e.cornersExtraTime=this.statEntityFromResponse(t.corners_et),e.crosses=this.statEntityFromResponse(t.crosses),e.crossesFirstHalf=this.statEntityFromResponse(t.crosses_1h),e.crossesSecondHalf=this.statEntityFromResponse(t.crosses_2h),e.crossesExtraTime=this.statEntityFromResponse(t.crosses_et),e.offside=this.statEntityFromResponse(t.offside),e.offsideFirstHalf=this.statEntityFromResponse(t.offside_1h),e.offsideSecondHalf=this.statEntityFromResponse(t.offside_2h),e.offsideExtraTime=this.statEntityFromResponse(t.offside_et),e.shotsOn=this.statEntityFromResponse(t.shots_on),e.shotsOnFirstHalf=this.statEntityFromResponse(t.shots_on_1h),e.shotsOnSecondHalf=this.statEntityFromResponse(t.shots_on_2h),e.shotsOnExtraTime=this.statEntityFromResponse(t.shots_on_et),e.throwIn=this.statEntityFromResponse(t.throw_in),e.throwInFirstHalf=this.statEntityFromResponse(t.throw_in_1h),e.throwInSecondHalf=this.statEntityFromResponse(t.throw_in_2h),e.throwInExtraTime=this.statEntityFromResponse(t.throw_in_et),e.redCards=this.statEntityFromResponse(t.red_cards),e.redCardsFirstHalf=this.statEntityFromResponse(t.red_cards_1h),e.redCardsSecondHalf=this.statEntityFromResponse(t.red_cards_2h),e.redCardsExtraTime=this.statEntityFromResponse(t.red_cards_et),e.shotsOff=this.statEntityFromResponse(t.shots_off),e.shotsOffFirstHalf=this.statEntityFromResponse(t.shots_off_1h),e.shotsOffSecondHalf=this.statEntityFromResponse(t.shots_off_2h),e.shotsOffExtraTime=this.statEntityFromResponse(t.shots_off_et),e.goalKicks=this.statEntityFromResponse(t.goal_kicks),e.goalKicksFirstHalf=this.statEntityFromResponse(t.goal_kicks_1h),e.goalKicksSecondHalf=this.statEntityFromResponse(t.goal_kicks_2h),e.goalKicksExtraTime=this.statEntityFromResponse(t.goal_kicks_et),e.possession=this.statEntityFromResponse(t.possession),e.possessionFirstHalf=this.statEntityFromResponse(t.possession_1h),e.possessionSecondHalf=this.statEntityFromResponse(t.possession_2h),e.possessionExtraTime=this.statEntityFromResponse(t.possession_et),e.treatments=this.statEntityFromResponse(t.treatments),e.treatmentsFirstHalf=this.statEntityFromResponse(t.treatments_1h),e.treatmentsSecondHalf=this.statEntityFromResponse(t.treatments_2h),e.treatmentsExtraTime=this.statEntityFromResponse(t.treatments_et),e.yellowCards=this.statEntityFromResponse(t.yellow_cards),e.yellowCardsFirstHalf=this.statEntityFromResponse(t.yellow_cards_1h),e.yellowCardsSecondHalf=this.statEntityFromResponse(t.yellow_cards_2h),e.yellowCardsExtraTime=this.statEntityFromResponse(t.yellow_cards_et),e.shotsBlocked=this.statEntityFromResponse(t.shots_blocked),e.shotsBlockedFirstHalf=this.statEntityFromResponse(t.shots_blocked_1h),e.shotsBlockedSecondHalf=this.statEntityFromResponse(t.shots_blocked_2h),e.shotsBlockedExtraTime=this.statEntityFromResponse(t.shots_blocked_et),e.substitutions=this.statEntityFromResponse(t.substitutions),e.substitutionsFirstHalf=this.statEntityFromResponse(t.substitutions_1h),e.substitutionsSecondHalf=this.statEntityFromResponse(t.substitutions_2h),e.substitutionsExtraTime=this.statEntityFromResponse(t.substitutions_et),e.counterAttacks=this.statEntityFromResponse(t.counter_attacks),e.counterAttacksFirstHalf=this.statEntityFromResponse(t.counter_attacks_1h),e.counterAttacksSecondHalf=this.statEntityFromResponse(t.counter_attacks_2h),e.counterAttacksExtraTime=this.statEntityFromResponse(t.counter_attacks_et),e.foulsCommitted=this.statEntityFromResponse(t.fouls_committed),e.foulsCommittedFirstHalf=this.statEntityFromResponse(t.fouls_committed_1h),e.foulsCommittedSecondHalf=this.statEntityFromResponse(t.fouls_committed_2h),e.foulsCommittedExtraTime=this.statEntityFromResponse(t.fouls_committed_et),e}catch(t){throw console.warn("There was a problem remapping the stats",t),t}},t}();e.default=i},6899:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.type=null,this.subType=null}},9452:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.minute="",this.type="",this.teamId="",this.player=null,this.relatedPlayer=null,this.updatedAt=""}},92:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9452),i=n(3550),a=function(){function t(){this.playerRemapper=null,this.playerRemapper=new i.default}return t.prototype.fromResponse=function(t){try{var e=new r.default;return e.minute=t.minute,e.type=t.type,e.teamId=t.team_id,e.player=this.playerRemapper.fromResponse(t.player),e.relatedPlayer=t.related_player?this.playerRemapper.fromResponse(t.related_player):null,e.updatedAt=t.updated_at,e}catch(t){throw console.warn("There was a problem remapping timeline",t),t}},t}();e.default=a},753:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3569);e.default=function(){this.meta=new r.default,this.data=[]}},3569:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(155);e.default=function(){this.pagination=new r.default}},155:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.currentPage=null,this.itemsPerPage=null,this.totalItems=null,this.numberOfPages=null}},1925:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3569);e.default=function(){this.remapMetaProp=function(t){var e=new r.default;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e}}},4426:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null,this.teams=[]}},6477:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=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 t="";return e.countryId&&(t=(t+="&")+"country_id="+e.countryId),e.scope&&(t=(t+="&")+"scope="+e.scope.join(",")),e.name&&(t=(t+="&")+"name="+e.name),e.playerIds&&(t=(t+="&")+"player_ids="+e.playerIds.join(",")),e.limit&&(t=(t+="&")+"limit="+e.limit),e.page&&(t=(t+="&")+"page="+e.page),e.sortField&&(t=(t+="&")+"sort_field="+e.sortField),e.sortOrder&&(t=(t+="&")+"sort_order="+e.sortOrder),t},this.countryId=t.countryId?t.countryId:null,this.scope=t.scope?t.scope:null,this.name=t.name?t.name:null,this.playerIds=t.playerIds?t.playerIds:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null,this.sortField=t.sortField?t.sortField:null,this.sortOrder=t.sortOrder?t.sortOrder:null}},1837:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.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:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.name="",this.position="",this.assets=null,this.type=""}},9071:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.startDate="",this.endDate="",this.loan=!1,this.position="",this.country=null,this.name="",this.assets=null,this.birthDate=""}},5157:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(4426),a=n(5827),s=function(){function t(){this.countryRemapper=null,this.teamRemapper=null,this.countryRemapper=new r.default,this.teamRemapper=new a.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new i.default;return n.id=t.id,n.firstName=t.first_name?t.first_name:null,n.lastName=t.last_name?t.last_name:null,n.name=t.name?t.name:null,n.birthDate=t.birth_date,n.country=this.countryRemapper.countryFromResponse(t.country),n.assets=t.assets,n.teams=t.teams?t.teams.map((function(t){return e.teamRemapper.fromResponse(t)})):[],n.position=t.position,n}catch(t){throw console.warn("There was a problem remapping players response",t),t}},t}();e.default=s},7943:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(1837),a=n(5827),s=n(7316),o=function(){function t(){this.countryRemapper=null,this.teamRemapper=null,this.competitionRemapper=null,this.countryRemapper=new r.default,this.teamRemapper=new a.default,this.competitionRemapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new i.default;return n.id=t.id,n.firstName=t.first_name?t.first_name:null,n.lastName=t.last_name?t.last_name:null,n.name=t.name?t.name:null,n.birthDate=t.birth_date,n.country=this.countryRemapper.countryFromResponse(t.country),n.assets=t.assets,n.teams=t.teams?t.teams.map((function(t){return e.teamRemapper.fromResponse(t)})):[],n.position=t.position,n.competitions=t.competitions?t.competitions.map((function(t){return e.competitionRemapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping player response",t),t}},t}();e.default=o},3550:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4803),i=function(){function t(){}return t.prototype.fromResponse=function(t){try{var e=new r.default;return e.id=t.id,e.name=t.name,e.position=t.position,e.shirtNumber=t.shirt_number,e.assets=t.assets,e.type=t.type,e}catch(t){throw console.warn("There was a problem remapping the player from timeline",t),t}},t}();e.default=i},4085:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(9071),a=function(){function t(){this.countryRemapper=null,this.countryRemapper=new r.default}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.id=t.id,e.startDate=t.start_date,e.endDate=t.end_date,e.shirtNumber=t.shirt_number,e.loan=t.loan,e.position=t.position,e.country=this.countryRemapper.countryFromResponse(t.country),e.name=t.name,e.assets=t.assets,e.birthDate=t.birth_date,e}catch(t){throw console.warn("There was a problem remapping the player from squad",t),t}},t}();e.default=a},4729:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(56),a=function(){function t(){this.countryRemapper=null,this.countryRemapper=new r.default}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.id=t.id,e.firstName=t.first_name?t.first_name:null,e.lastName=t.last_name?t.last_name:null,e.name=t.name?t.name:null,e.birthDate=t.birth_date,e.country=this.countryRemapper.countryFromResponse(t.country),e.assets=t.assets,e.position=t.position,e}catch(t){throw console.warn("There was a problem remapping top player response",t),t}},t}();e.default=a},56:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null}},604:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.entities=null,this.query=null,this.scope=null,this.constructFilterUrl=function(){var t="";return e.entities&&(t=(t+="&")+"entities="+e.entities.join(",")),e.query&&(t=(t+="&")+"q="+e.query),e.scope&&(t=(t+="&")+"scope="+e.scope.join(",")),t},this.entities=t.entities?t.entities:null,this.query=t.query?t.query:null,this.scope=t.scope?t.scope:null}},6967:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.teams=null,this.players=null,this.competitions=null}},7287:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5827),i=n(5157),a=n(7316),s=n(6967),o=function(){function t(){this.teamRemapper=null,this.playerRemapper=null,this.competitionremapper=null,this.teamRemapper=new r.default,this.playerRemapper=new i.default,this.competitionremapper=new a.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new s.default;return n.teams=t.teams?t.teams.map((function(t){return e.teamRemapper.fromResponse(t)})):[],n.players=t.players?t.players.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n.competitions=t.competitions?t.competitions.map((function(t){return e.competitionremapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping search response",t),t}},t}();e.default=o},5827:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(9314),a=function(){function t(){this.countryRemapper=null,this.countryRemapper=new r.default}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.id=t.id,e.country=this.countryRemapper.countryFromResponse(t.country),e.gender=t.gender,e.assets=t.assets,e.code=t.code,e.national=t.national,e.fullName=t.full_name,e.shortName=t.short_name,e.name=t.name,e}catch(t){throw console.warn("There was a problem remapping teams response",t),t}},t}();e.default=a},7821:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(1986),a=n(4085),s=n(7316),o=function(){function t(){this.countryRemapper=null,this.competitionRemapper=null,this.playerRemapper=null,this.countryRemapper=new r.default,this.competitionRemapper=new s.default,this.playerRemapper=new a.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new i.default;return n.id=t.id,n.country=this.countryRemapper.countryFromResponse(t.country),n.gender=t.gender,n.assets=t.assets,n.code=t.code,n.national=t.national,n.fullName=t.full_name,n.shortName=t.short_name,n.name=t.name,n.competitions=t.competitions?t.competitions.map((function(t){return e.competitionRemapper.fromResponse(t)})):[],n.colors=t.colors?t.colors:n.colors,n.squad=t.squad?t.squad.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping team response",t),t}},t}();e.default=o},9314:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.name="",this.code="",this.national=!1,this.fullName="",this.shortName=""}},3773:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.primary=null,this.secondary=null,this.tertiary=null}},9920:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=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 t="";return e.name&&(t=(t+="&")+"name="+e.name),e.countryId&&(t=(t+="&")+"country_id="+e.countryId),e.national&&(t=(t+="&")+"national="+e.national),e.gender&&(t=(t+="&")+"gender="+e.gender),e.limit&&(t=(t+="&")+"limit="+e.limit),e.scope&&(t=(t+="&")+"scope="+e.scope.join(",")),e.page&&(t=(t+="&")+"page="+e.page),e.sortField&&(t=(t+="&")+"sort_field="+e.sortField),e.sortOrder&&(t=(t+="&")+"sort_order="+e.sortOrder),e.teamIds&&(t=(t+="&")+"team_ids="+e.teamIds.join(",")),t},this.name=t.name?t.name:null,this.countryId=t.countryId?""+t.countryId:null,this.national=!!t.national&&t.national,this.gender=t.gender?t.gender:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null,this.scope=t.scope?t.scope:null,this.sortField=t.sortField?""+t.sortField:null,this.sortOrder=t.sortOrder?""+t.sortOrder:null,this.teamIds=t.teamIds?t.teamIds:null}},1986:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3773);e.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.colors=new r.default,this.squad=[]}},9582:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(7686);e.default=function(t){var e=this;this.clientHttps=null,this.setAvailableMarketsForMatch=function(t){return r(e,void 0,void 0,(function(){var e,n,r,s=this;return i(this,(function(i){switch(i.label){case 0:return[4,this.clientHttps.getConfig(a.FeatureConfigType.PREDICTOR)];case 1:return e=i.sent(),n=e.fullCoverageCompetitions,r=e.markets,Array.isArray(t)?[2,t.map((function(t){return s.setAvailableMarkets(t,n,r)}))]:"object"==typeof t&&Object.keys(t).length?[2,this.setAvailableMarkets(t,n,r)]:[2]}}))}))},this.setAvailableMarkets=function(t,n,r){var i,a=null===(i=t.context.competition)||void 0===i?void 0:i.id;return a&&e.isMatchInCoverageCompetition(a,n)?(t.availableMarkets=r.all,t):(t.availableMarkets=r.main,t)},this.isMatchInCoverageCompetition=function(t,e){var n=!1;return e.includes(t)?n=!0:n},this.clientHttps=new a.default(t)}},3822:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4946),o=n(7686),u=n(3142),c=n(7232),l=n(1139),h=n(9502),f=n(8900),d=n(1859),p=n(2793);e.default=function(t,e,n,m,v){var g=this;this.config=null,this.clientHttps=null,this.loyaltyHttps=null,this.loyaltyService=null,this.profileFacade=null,this.loyaltyValidator=null,this.idMapping=null,this.topXFacade=null,this.matchQuizFacade=null,this.predictorHttps=null,this.errorHandlingMode=null,this.getConfig=function(){return r(g,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.clientHttps.getConfig(o.FeatureConfigType.LOYALTY)];case 1:return[2,t.sent()]}}))}))},this.getClientBadges=function(){return r(g,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.getConfig()];case 1:return t=e.sent(),[2,this.loyaltyService.buildClientBadges(t.rewards.badges)]}}))}))},this.getTemplates=function(t){return r(g,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=!0,this.config.idSchema!==s.IdSchemaEnum.NATIVE?[3,2]:[4,this.loyaltyHttps.getTemplates(t,e)];case 1:return[2,i.sent()];case 2:return[4,this.loyaltyHttps.getTemplates(t,e)];case 3:return n=i.sent(),r=n,[4,this.loyaltyService.remapTemplatesIds(a([],n.data,!0))];case 4:return r.data=i.sent(),[2,n]}}))}))},this.getTemplateById=function(t,e){return r(g,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.loyaltyHttps.getTemplateById(t,e)];case 1:return n=r.sent(),this.config.idSchema===s.IdSchemaEnum.NATIVE?[2,n]:[4,this.loyaltyService.remapTemplatesIds([n])];case 2:return[2,r.sent()[0]]}}))}))},this.getLeaderboard=function(t,e,n){return r(g,void 0,void 0,(function(){var r,a;return i(this,(function(i){switch(i.label){case 0:return e=this.loyaltyService.initFilters(e,"loyalty"),[4,this.loyaltyHttps.getLeaderboard(t,n,e)];case 1:return r=i.sent(),a=r,[4,this.loyaltyService.addProfileModelToLeaderboad(r.data)];case 2:return a.data=i.sent(),[2,r]}}))}))},this.getLeaderboardForGame=function(t,e,n){return r(g,void 0,void 0,(function(){var r,a;return i(this,(function(i){switch(i.label){case 0:return e=this.loyaltyService.initFilters(e,"loyalty"),[4,this.loyaltyHttps.getLeaderboardForGame(t,n,e)];case 1:return r=i.sent(),a=r,[4,this.loyaltyService.addProfileModelToLeaderboad(r.data)];case 2:return a.data=i.sent(),[2,r]}}))}))},this.getOwnRankings=function(t,e){return r(g,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.getOwn()];case 1:return n=r.sent().id,[2,this.getUserRankings(n,t,e)]}}))}))},this.getUserRankings=function(t,e,n){return r(g,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return e=this.loyaltyService.initFilters(e,"rankings"),[4,this.loyaltyHttps.getUserRankings(t,e,n)];case 1:return r=i.sent(),[4,this.getModelsForUserRankings(r)];case 2:return[2,i.sent()]}}))}))},this.getHighestSuccessRate=function(t,e){return r(g,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return t&&this.loyaltyValidator.validateMarket(this.errorHandlingMode,t),[4,this.loyaltyHttps.getHighestSuccessRate(t,e)];case 1:return n=r.sent(),[2,this.loyaltyService.addProfileModelToHighestSuccessRate(n)]}}))}))},this.getTemplateWinners=function(t){return r(g,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getContestWinners(t)];case 1:return e=r.sent(),[4,this.getTemplateById(t)];case 2:return n=r.sent(),e.contestModel=n,[2,this.loyaltyService.completeContestWinners(e)]}}))}))},this.getModelsForUserRankings=function(t){return r(g,void 0,void 0,(function(){var e,n,r,a,s,o,u,c,l,h,f,d;return i(this,(function(i){switch(i.label){case 0:return e=null,n=null,r=null,a=this.loyaltyService.extractRankingsIdsMap(t.data),s=a[0],o=a[1],(u=a[2]).length?[4,this.getTemplates()]:[3,2];case 1:c=i.sent(),e=c.data.filter((function(t){return u.includes(t.id)})),i.label=2;case 2:return s.length?(l={gameIds:s},[4,this.topXFacade.getGames(l)]):[3,4];case 3:h=i.sent(),n=h.data,i.label=4;case 4:return o.length?(f={gameIds:o},[4,this.matchQuizFacade.getGames(f)]):[3,6];case 5:d=i.sent(),r=d.data,i.label=6;case 6:return[2,this.loyaltyService.setModelsForUserRankings(n,r,e,t)]}}))}))},this.config=t,this.clientHttps=e,this.loyaltyHttps=n,this.profileFacade=new c.default(v,m),this.loyaltyService=new u.default(this.config),this.loyaltyValidator=new l.default,this.idMapping=new f.default(t),this.topXFacade=new h.default(t,this.idMapping),this.matchQuizFacade=new d.default(t),this.predictorHttps=new p.default(t,this.idMapping),this.errorHandlingMode=t.errorHandlingMode}},2962:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(7686),s=n(7059),o=n(3822),u=n(4275),c=n(5601);e.default=function(t){var e=this;this.clientHttps=null,this.profileHttps=null,this.loyaltyHttps=null,this.loyaltyFacade=null,this.localStorage=null,this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.getClientBadges=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getClientBadges()];case 1:return[2,t.sent()]}}))}))},this.getTemplates=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getTemplates(t)];case 1:return[2,e.sent()]}}))}))},this.getTemplateById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getTemplateById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getLeaderboard=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getLeaderboard(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getLeaderboardForGame=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getLeaderboardForGame(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getOwnRankings=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getOwnRankings(t,n)];case 1:return[2,e.sent()]}}))}))},this.getUserRankings=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getUserRankings(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getHighestSuccessRate=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getHighestSuccessRate(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTemplateWinners=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getTemplateWinners(t)];case 1:return[2,e.sent()]}}))}))},this.clientHttps=new a.default(t),this.profileHttps=new u.default(t),this.loyaltyHttps=new s.default(t),this.localStorage=new c.default(t),this.loyaltyFacade=new o.default(t,this.clientHttps,this.loyaltyHttps,this.profileHttps,this.localStorage)}},8153:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},5111:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8153);e.default=function(){this.value=[new r.default]}},8608:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.general=[],this.predictor=[],this.topX=[],this.matchQuiz=[]}},246:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1429);e.default=function(){this.requirements=new r.default}},8687:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},1429:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.points=null,this.gameParticipationCount=null,this.entityId=null,this.entityType=null,this.predictionsMade=null,this.correctPredictions=null}},515:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5111),i=n(4226);e.default=function(){this.enabled=!1,this.conditions={list:null},this.actions=new r.default,this.rewards=new i.default}},7910:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.limit=null,this.page=null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null}return t.prototype.constructFiltersUrl=function(){var t="";return this.limit&&(t+="&",t+="limit="+this.limit),this.page&&(t+="&",t+="page="+this.page),t},t}();e.default=n},4996:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(e){var n=t.call(this,e)||this;return n.sortOrder=null,n.rankType=null,n.leaderboardIds=null,n.gameType=null,n.constructFiltersUrl=function(){var e=t.prototype.constructFiltersUrl.call(n);return n.sortOrder&&(e+="&",e+="sort_order="+n.sortOrder),n.rankType&&(e+="&",e+="rank_type="+n.rankType),n.leaderboardIds&&(e+="&",e+="type_ids="+n.leaderboardIds.join(",")),n.gameType&&(e+="&",e+="game_type="+n.gameType),e},n.sortOrder=e.sortOrder,n.rankType=e.rankType,n.leaderboardIds=e.leaderboardIds,n.gameType=e.type&&"game"===e.type.toLowerCase()?e.gameType:null,n}return i(e,t),e}(n(7910).default);e.default=a},6507:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position=null,this.points=null,this.predictionsMade=null,this.profileId=null,this.profileModel=null,this.successRatePercent=null}},7746:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6507);e.default=function(){this.remapHighestSuccessRate=function(t){return t.map((function(t){var e=new r.default;return e.position=t.position,e.points=t.points,e.predictionsMade=t.predictions_made,e.profileId=t.profile_id,e.successRatePercent=t.success_rate_percent,e}))}}},9642:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position=null,this.profileId=null,this.profileModel=null,this.points=null,this.predictionsMade=null}},7419:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5828),i=n(9642);e.default=function(){var t=this;this.remapResponse=function(e){return e.meta=t.remapMeta(e.meta),e.data=t.remapData(e.data),e},this.remapMeta=function(t){var e=new r.default;return e.rankType=t.rank_type,e.fromDate=t.from_date,e.toDate=t.to_date,e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e},this.remapData=function(t){var e=[];return t.forEach((function(t){var n=new i.default;n.position=t.position,n.profileId=t.profile_id,n.points=t.points,n.predictionsMade=t.predictions_made,e.push(n)})),e}}},5828:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(155);e.default=function(){this.rankType=null,this.fromDate=null,this.toDate=null,this.pagination=new r.default}},4187:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.general=null,this.comments=null,this.predictor=null,this.activity=null,this.topX=null,this.matchQuiz=null}},9013:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.id=null,e.rankType=null,e.model=null,e.gameType=null,e}return i(e,t),e}(n(9642).default);e.default=a},4533:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3569),i=n(9013),a=function(){function t(){var t=this;this.remapRankings=function(e){return e.meta=t.remapMeta(e.meta),e.data=t.remapData(e.data),e},this.remapMeta=function(t){var e=new r.default;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.numberOfPages=t.pagination.number_of_pages,e.pagination.totalItems=t.pagination.total_items,e}}return t.prototype.remapData=function(t){var e=[];return t.forEach((function(t){var n=new i.default;n.id=t.id,n.rankType=t.rank_type,n.position=t.position,n.points=t.points,n.gameType=t.game_type,delete n.profileId,delete n.profileModel,delete n.predictionsMade,e.push(n)})),e},t}();e.default=a},4226:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.points=null,this.tiers=null,this.badges=null}},194:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(439);e.default=function(){this.id=null,this.name=null,this.description=null,this.type=null,this.fromDate=null,this.toDate=null,this.markets=[],this.teamIds=[],this.matchIds=[],this.gameIds=[],this.gameTypes=[],this.competitionIds=[],this.excludedProfileIds=[],this.rules=null,this.flags=null,this.images=new r.default,this.status=null,this.automaticallyChangeStatus=!0,this.createdAt=null,this.updatedAt=null,this.related=null}},8899:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3483),i=n(194);e.default=function(){var t=this;this.remapResponse=function(e){var n=[];return e.forEach((function(e){var r=new i.default;r.id=e.id,r.name=e.name,r.description=e.description,r.type=e.type,r.fromDate=e.from_date,r.toDate=e.to_date,r.markets=e.markets?e.markets:null,r.teamIds=e.team_ids?e.team_ids:null,r.matchIds=e.match_ids?e.match_ids:null,r.gameIds=e.game_ids?e.game_ids:null,r.gameTypes=e.game_types?e.game_types:null,r.competitionIds=e.competition_ids?e.competition_ids:null,r.excludedProfileIds=e.excluded_profile_ids?e.excluded_profile_ids:null,r.rules=e.rules?e.rules:null,r.flags=e.flags?e.flags:null,r.images=e.images?e.images:null,r.status=e.status?e.status:null,r.automaticallyChangeStatus=e.automatically_change_status,r.createdAt=e.created_at,r.updatedAt=e.updated_at,r.related=e.related?t.remapRelated(e.related):null,n.push(r)})),n},this.remapMeta=function(t){var e={};return e.totalItems=t.pagination.total_items,e},this.remapRelated=function(t){return t.map((function(t){var e=new r.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e}))}}},3142:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var s=n(8900),o=n(6409),u=n(8687),c=n(7910),l=n(4996);e.default=function(t){var e=this;this.idMappingService=null,this.profileNamespace=null,this.remapTemplatesIds=function(t){return r(e,void 0,void 0,(function(){var e,n,r,s,o;return i(this,(function(i){switch(i.label){case 0:return t.length>0?(e=[],n=[],r=[],t.forEach((function(t){t.teamIds&&t.teamIds.length>0?e=a(a([],e,!0),t.teamIds,!0):t.matchIds&&t.matchIds.length>0?n=a(a([],n,!0),t.matchIds,!0):t.competitionIds&&t.competitionIds.length>0&&(r=a(a([],r,!0),t.competitionIds,!0))})),s={team:e,match:n,competition:r},[4,this.idMappingService.idMappingFacade.getEntitiesByIds(s,"native",this.idMappingService.idSchema)]):[3,2];case 1:return o=i.sent(),a([],o.team,!0),a([],o.match,!0),a([],o.competition,!0),t.forEach((function(t){t.teamIds&&t.teamIds.length>0?t.teamIds=t.teamIds.map((function(t){return o.team.shift()})):t.matchIds&&t.matchIds.length>0?t.matchIds=t.matchIds.map((function(t){return o.match.shift()})):t.competitionIds&&t.competitionIds.length>0&&(t.competitionIds=t.competitionIds.map((function(t){return o.competition.shift()})))})),[2,t];case 2:return[2,t]}}))}))},this.addProfileModelToLeaderboad=function(t){return r(e,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return t.length>0?(e=[],(n=t.map((function(t){return t.profileId}))).length?[4,this.profileNamespace.getByIds(n)]:[2,t]):[3,2];case 1:return r=i.sent(),t.forEach((function(t){r.forEach((function(e){e.id===t.profileId&&(delete e.interests,t.profileModel=e)})),t.profileModel||(t.profileModel=null),e.push(t)})),[2,e];case 2:return[2,t]}}))}))},this.buildClientBadges=function(t){var n=new u.default;return n.general=e.extractEnabledBadgesId(t.general),n.predictor=e.extractEnabledBadgesId(t.predictor),n.topX=e.extractEnabledBadgesId(t.topX),n.matchQuiz=e.extractEnabledBadgesId(t.matchQuiz),n},this.initFilters=function(t,e){switch(e){case"loyalty":t&&(t=new c.default(t));break;case"rankings":t&&(t=new l.default(t))}return t},this.addProfileModelToHighestSuccessRate=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return(e=t.map((function(t){return t.profileId}))).length?[4,this.profileNamespace.getByIds(e)]:[2,t];case 1:return n=r.sent(),[2,t.map((function(t){return n.forEach((function(e){e.id===t.profileId&&(delete e.interests,t.profileModel=e)})),t}))]}}))}))},this.extractRankingsIdsMap=function(t){var e=[],n=[],r=[];return t.forEach((function(t){"GAME"===t.rankType&&"TOP_X"===t.gameType?e.push(t.id):"GAME"===t.rankType&&"MATCH_QUIZ"===t.gameType?n.push(t.id):"TEMPLATE"===t.rankType&&r.push(t.id)})),[e,n,r]},this.setModelsForUserRankings=function(t,e,n,r){return r.data.forEach((function(r){"MATCH_QUIZ"===r.gameType&&e?r.model=e.filter((function(t){return t.id===r.id}))[0]:"TOP_X"===r.gameType&&t?r.model=t.filter((function(t){return t.id===r.id}))[0]:"TEMPLATE"===r.rankType&&n&&(r.model=n.filter((function(t){return t.id===r.id}))[0])})),r},this.completeContestWinners=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=t.userList.map((function(t){return t.profileId})),[4,this.profileNamespace.getByIds(e)];case 1:return n=r.sent(),t.userList.forEach((function(t){var e=n.filter((function(e){return e.id===t.profileId}))[0];delete e.interests,t.profileModel=e})),[2,t]}}))}))},this.extractEnabledBadgesId=function(t){var e=[];return t.forEach((function(t){t.enabled&&e.push(t.id)})),e},this.idMappingService=new s.default(t),this.profileNamespace=new o.default(t)}},1139:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4021),i=n(4904),a=n(8097),s=n(2535),o=n(5318),u=n(7974);e.default=function(){this.validateMarket=function(t,e){if(!Object.keys(u.MarketEnum).includes(e)){var n=(0,o.invalidMarketMessage)(e);if("default"===t)throw new a.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_MARKET,n);throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_MARKET,n).response}}}},1859:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(4946),s=n(1553),o=n(7686),u=n(2793),c=n(8900),l=n(1732),h=n(7782),f=n(5013),d=n(853),p=n(7299),m=n(2310),v=n(4800),g=n(8097),y=n(4021),_=n(4904),w=n(5318),b=n(2535);e.default=function(t){var e=this;this.predictorHttps=null,this.predictorService=null,this.idMapping=null,this.clientHttps=null,this.predictorValidator=null,this.errorHandlingMode=null,this.getConfig=function(){return r(e,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(o.FeatureConfigType.MATCH_QUIZ)];case 1:return t=e.sent(),this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(t)];case 2:return[2,e.sent()];case 3:return[2,t]}}))}))},this.play=function(t){return r(e,void 0,void 0,(function(){var e,n,r,s,o,u=this;return i(this,(function(i){switch(i.label){case 0:return t=this.predictorValidator.validateBodyFields("MATCH_QUIZ",t),(e=t.fixtures.map((function(t){return u.predictorValidator.validateFixture(t.matchId,t.market,t.prediction.value,t.prediction.playerId)})))&&e.length?this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,4]:(n=[],r=[],e.forEach((function(t){n.push(t.matchId),t instanceof l.default&&t.prediction.playerId&&"OWN_GOAL"!==t.prediction.playerId&&r.push(t.prediction.playerId)})),[4,this.predictorService.remapMatchIdToNative(n)]):[3,4];case 1:return s=i.sent(),o={},r&&r.length>0?[4,this.predictorService.remapPlayerIdMapToNative(r)]:[3,3];case 2:o=i.sent(),i.label=3;case 3:e.forEach((function(t,e){t.matchId=s[e],t instanceof l.default&&"OWN_GOAL"!==t.prediction.playerId&&(t.prediction.playerId=o[t.prediction.playerId])})),i.label=4;case 4:return t.fixtures=e,[4,this.predictorHttps.makeFootballPrediction(t)];case 5:return[2,i.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getGames=function(t,n){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return n=n||!1,e=this.predictorService.initGameFilters("MATCH_QUIZ",t),[4,this.predictorHttps.getGames(e,n)];case 1:return r=i.sent(),[4,this.predictorService.remapMatchIdsFixtures(r)];case 2:return[2,i.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return n=n||!1,[4,this.predictorHttps.getGameById(t,n)];case 1:return e=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(e)];case 2:return[2,r.sent()]}}))}))},this.getGamePredictions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return a=a||!1,n&&(n.type&&delete n.type,n.status&&delete n.status,n=new h.default(n)),[4,this.predictorHttps.getGamePredictions(t,a,n)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return a=a||!1,n&&(n=new v.default(n)),[4,this.predictorHttps.getGameResults(t,a,n)];case 1:return e=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(e)];case 2:return[2,r.sent()]}}))}))},this.getCurrentGameResults=function(t){return r(e,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return t=t||!1,e={status:d.GameStatusEnum.OPEN,type:"MATCH_QUIZ"},e=new p.default(e),[4,this.predictorHttps.getGames(e,t)];case 1:return n=i.sent(),r=this.predictorService.getCurrentGameId(n),[4,this.getGameResults(r,null,t)];case 2:return[2,i.sent().data[0]]}}))}))},this.getMyGameEditions=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a,o,u;return i(this,(function(i){switch(i.label){case 0:return t&&t.limit&&this.validateLimitFilterOnGames(t.limit),n=n||!1,e=this.predictorService.initGameTypePredictions("MATCH_QUIZ",t),r=[],[4,this.predictorHttps.getMyPredictionsNoRemap(e)];case 1:return(a=i.sent()).data.length>0?(a.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),o=this.predictorService.initGameFilters("MATCH_QUIZ",null,r),[4,this.predictorHttps.getUserGameEditions(o,n)]):[3,4];case 2:return u=i.sent(),[4,this.predictorService.addPredictionProp(a,u)];case 3:return[2,i.sent()];case 4:return[2,new s.default]}}))}))},this.getMyGamePrediction=function(t){return r(e,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return(n=i.sent()).data.length>0?[2,(r=n.data.filter((function(e){return e.gameInstanceId===t}))).length?r[0]:null]:[2,null]}}))}))},this.getUserGameEditions=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,o,u,c;return i(this,(function(i){switch(i.label){case 0:return n&&n.limit&&this.validateLimitFilterOnGames(n.limit),a=a||!1,e=this.predictorService.initGameTypePredictions("MATCH_QUIZ",n),r=[],[4,this.predictorHttps.getUserPredictionsNoRemap(t,e)];case 1:return(o=i.sent()).data.length>0?(o.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),u=this.predictorService.initGameFilters("MATCH_QUIZ",null,r),[4,this.predictorHttps.getUserGameEditions(u,a)]):[3,4];case 2:return c=i.sent(),[4,this.predictorService.addPredictionProp(o,c)];case 3:return[2,i.sent()];case 4:return[2,new s.default]}}))}))},this.getUserGamePrediction=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,s;return i(this,(function(i){switch(i.label){case 0:return a=a||!1,e=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),[4,this.predictorHttps.getUserPredictions(t,a,e)];case 1:return(r=i.sent()).data.length>0?[2,(s=r.data.filter((function(t){return t.gameInstanceId===n}))).length?s[0]:null]:[2,null]}}))}))},this.getMarketsResultsForGame=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getMarketResultsForGame(t,n)];case 1:return e=r.sent(),[4,this.predictorService.completeGameMarketResults(e,"MATCH_QUIZ")];case 2:return[2,r.sent()]}}))}))},this.getGameWinners=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getContestWinners(t)];case 1:return e=r.sent(),[4,this.getGameById(t)];case 2:return n=r.sent(),e.contestModel=n,[2,this.predictorService.completeContestWinners(e)]}}))}))},this.validateLimitFilterOnGames=function(t){if("default"===e.errorHandlingMode&&t>50)throw new g.default(y.ErrorCodes.BAD_METHOD_CALL,_.ErrorStatuses.EXCEEDED_LENGTH,w.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED);if("standard"===e.errorHandlingMode&&t>50)throw new b.default(y.ErrorCodes.BAD_METHOD_CALL,_.ErrorStatuses.EXCEEDED_LENGTH,w.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED).response},this.predictorValidator=new m.default(t.errorHandlingMode),this.idMapping=new c.default(t),this.predictorHttps=new u.default(t,this.idMapping),this.predictorService=new f.default(t,this.idMapping),this.clientHttps=new o.default(t),this.errorHandlingMode=t.errorHandlingMode}},267:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(1859);e.default=function(t){var e=this;this.matchQuizFacade=null,this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.play=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.play(t)];case 1:return[2,e.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGamePredictions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGameResults(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getCurrentGameResults=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getCurrentGameResults(t)];case 1:return[2,e.sent()]}}))}))},this.getMyGameEditions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getMyGameEditions(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMyGamePrediction=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getMyGamePrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getUserGameEditions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getUserGameEditions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getUserGamePrediction=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getUserGamePrediction(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getMarketsResultsForGame=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getMarketsResultsForGame(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameWinners=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGameWinners(t)];case 1:return[2,e.sent()]}}))}))},this.matchQuizFacade=new a.default(t)}},5765:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.enabled=!1,this.defaultMarkets=null,this.competitionsWhitelist=null}},8410:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6899),i=n(8042);e.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new r.default,this.prediction=new i.default}},670:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.gameId=null,this.results=null,this.tieBreakers=null}},7243:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4916);e.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.outcome=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new r.default,this.predictionId=null,this.participantsCount=0,this.related=null,this.excludedProfileIds=null,this.rules=null,this.flags=null,this.points=null,this.createdAt=null,this.updatedAt=null,this.predictionsMadeAt=null,this.images=null,this.scheduleOpenAt=null}},8042:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null,this.target=null,this.playerId=null,this.playerModel=null,this.result=null}},7974:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.playerMarketNobodyPrediction=e.endMarkMarkets=e.playerMarkets=e.MarketsOverCorners=e.MarketsOverGoals=e.MarketEnum=void 0,function(t){t.FT_1X2="FT_1X2",t.HT_1X2="HT_1X2",t.BOTH_TEAMS_SCORE="BOTH_TEAMS_SCORE",t.DOUBLE_CHANCE="DOUBLE_CHANCE",t.HT_FT="HT_FT",t.PLAYER_SCORE="PLAYER_SCORE",t.PLAYER_YELLOW_CARD="PLAYER_YELLOW_CARD",t.PLAYER_RED_CARD="PLAYER_RED_CARD",t.RED_CARD_MATCH="RED_CARD_MATCH",t.PENALTY_MATCH="PENALTY_MATCH",t.PLAYER_SCORE_FIRST_GOAL="PLAYER_SCORE_FIRST_GOAL",t.CORNERS_MATCH="CORNERS_MATCH",t.CORRECT_SCORE="CORRECT_SCORE",t.CORRECT_SCORE_ADVANCED="CORRECT_SCORE_ADVANCED",t.CORRECT_SCORE_HT="CORRECT_SCORE_HT",t.PLAYER_SCORE_HATTRICK="PLAYER_SCORE_HATTRICK",t.PLAYER_SCORE_TWICE="PLAYER_SCORE_TWICE",t.OVER_GOALS_0_5="OVER_GOALS_0_5",t.OVER_GOALS_1_5="OVER_GOALS_1_5",t.OVER_GOALS_2_5="OVER_GOALS_2_5",t.OVER_GOALS_3_5="OVER_GOALS_3_5",t.OVER_GOALS_4_5="OVER_GOALS_4_5",t.OVER_GOALS_5_5="OVER_GOALS_5_5",t.OVER_GOALS_6_5="OVER_GOALS_6_5",t.OVER_CORNERS_6_5="OVER_CORNERS_6_5",t.OVER_CORNERS_7_5="OVER_CORNERS_7_5",t.OVER_CORNERS_8_5="OVER_CORNERS_8_5",t.OVER_CORNERS_9_5="OVER_CORNERS_9_5",t.OVER_CORNERS_10_5="OVER_CORNERS_10_5",t.OVER_CORNERS_11_5="OVER_CORNERS_11_5",t.OVER_CORNERS_12_5="OVER_CORNERS_12_5",t.OVER_CORNERS_13_5="OVER_CORNERS_13_5"}(n=e.MarketEnum||(e.MarketEnum={})),e.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],e.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],e.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],e.endMarkMarkets=[n.FT_1X2,n.HT_1X2,n.HT_FT,n.DOUBLE_CHANCE,n.CORNERS_MATCH,n.CORRECT_SCORE,n.CORRECT_SCORE_HT,n.CORRECT_SCORE_ADVANCED],e.playerMarketNobodyPrediction=n.PLAYER_SCORE_FIRST_GOAL},6147:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.pastStatuses=e.StatusEnum=void 0,function(t){t.ACTIVE="ACTIVE",t.WON="WON",t.LOST="LOST",t.PARTIALLY_WON="PARTIALLY_WON",t.CANCELED="CANCELED"}(n=e.StatusEnum||(e.StatusEnum={})),e.pastStatuses=[n.WON,n.LOST,n.PARTIALLY_WON,n.CANCELED]},1976:(t,e)=>{"use strict";var n,r,i;Object.defineProperty(e,"__esModule",{value:!0}),e.HalfTimeFullTimeEnum=e.DoubleChanceEnum=e.OneXTwoEnum=void 0,(i=e.OneXTwoEnum||(e.OneXTwoEnum={})).ONE="1",i.X="x",i.TWO="2",(r=e.DoubleChanceEnum||(e.DoubleChanceEnum={})).ONE_X="1x",r.X_TWO="x2",r.ONE_TWO="12",(n=e.HalfTimeFullTimeEnum||(e.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(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4946),o=n(7974),u=n(7686),c=n(5013),l=n(3950),h=n(1732),f=n(2310),d=n(8097),p=n(4021),m=n(4904),v=n(5318),g=n(2535);e.default=function(t,e,n,y){var _=this;this.predictorHttps=null,this.clientHttps=null,this.idMapping=null,this.predictorService=null,this.predictorValidator=null,this.errorHandlingMode=null,this.makeFootballPrediction=function(t,e,n,a){return r(_,void 0,void 0,(function(){var r,u,c,f,y,_,w;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorValidator.validateFixture(t,e,n,a),u=new l.default,this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,6]:(c=r.matchId,f="",[4,this.predictorService.remapMatchIdToNative([c])]);case 1:if(y=i.sent(),r.matchId=y[0],"default"===this.errorHandlingMode&&!r.matchId)throw new d.default(p.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_MATCH_ID).errorMessage();if("standard"===this.errorHandlingMode&&!r.matchId)throw new g.default(p.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_MATCH_ID).response;return r instanceof h.default&&"OWN_GOAL"!==r.prediction.playerId?r.prediction.playerId?(f=r.prediction.playerId,_=r.prediction,[4,this.predictorService.remapPlayerIdToNative([f])]):[3,3]:[3,4];case 2:_.playerId=i.sent(),i.label=3;case 3:if("default"===this.errorHandlingMode&&r.market!==o.playerMarketNobodyPrediction&&!r.prediction.playerId)throw new d.default(p.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_PLAYER_ID).errorMessage();if("standard"===this.errorHandlingMode&&r.market!==o.playerMarketNobodyPrediction&&!r.prediction.playerId)throw new g.default(p.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_PLAYER_ID).response;i.label=4;case 4:return u.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(u)];case 5:return(w=i.sent()).fixtures.forEach((function(t){t.prediction.playerId&&"OWN_GOAL"!==t.prediction.playerId&&(t.prediction.playerId=f),t.matchId=c})),[2,w];case 6:return u.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(u)];case 7:return[2,i.sent()]}}))}))},this.getMatchSummary=function(t,e){return r(_,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return[4,this.getMatchSummaryBase(t,e)];case 1:return n=i.sent(),r=JSON.parse(JSON.stringify(n.predictions)),[4,this.predictorService.remapPlayerIdToIdSchema(r)];case 2:return a=i.sent(),n.predictions=a,[2,n]}}))}))},this.getMarketSummary=function(t,e,n,a){return r(_,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.getMatchSummaryBase(t,a)];case 1:return r=i.sent(),[4,this.predictorService.getMarketSummary(r,e,n)];case 2:return[2,i.sent()];case 3:throw i.sent();case 4:return[2]}}))}))},this.getMatchSummaryBase=function(t,e){return r(_,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapMatchIdToNative([t])];case 1:return n=i.sent(),r=n[0],[4,this.predictorHttps.getMatchSummary(r,e)];case 2:return(a=i.sent()).matchId=t,[2,a];case 3:return[4,this.predictorHttps.getMatchSummary(t,e)];case 4:return[2,i.sent()]}}))}))},this.getConfig=function(){return r(_,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(u.FeatureConfigType.PREDICTOR)];case 1:return t=e.sent(),this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(t)];case 2:return[2,e.sent()];case 3:return[2,t]}}))}))},this.deleteFootballPrediction=function(t){return r(_,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPredictions=function(t){return r(_,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.predictorService.initPredictionsFilters(t,"user"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return[2,n.sent()]}}))}))},this.getMyPredictionsForMatches=function(t,e){return r(_,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:if("default"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(t))throw new d.default(p.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).errorMessage();if("standard"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(t))throw new g.default(p.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).response;return this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,2]:[4,this.predictorService.remapMatchIdToNative(a([],t,!0))];case 1:t=r.sent(),r.label=2;case 2:return n=this.predictorService.initPredictionsFilters(e,"matches",t),[4,this.predictorHttps.getMyPredictions(n)];case 3:return[2,r.sent()]}}))}))},this.getMyCurrentPredictions=function(t){return r(_,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.predictorService.initPredictionsFilters(t,"current"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return[2,n.sent()]}}))}))},this.getMyPastPredictions=function(t){return r(_,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.predictorService.initPredictionsFilters(t,"past"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return[2,n.sent()]}}))}))},this.getUserPredictions=function(t,e,n){return r(_,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(e,"user"),[4,this.predictorHttps.getUserPredictions(t,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserCurrentPredictions=function(t,e,n){return r(_,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(e,"current"),[4,this.predictorHttps.getUserPredictions(t,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserPastPredictions=function(t,e,n){return r(_,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(e,"past"),[4,this.predictorHttps.getUserPredictions(t,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserPredictionsForMatches=function(t,e,n,o){return r(_,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:if("default"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(e))throw new d.default(p.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).errorMessage();if("standard"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(e))throw new g.default(p.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).response;return this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,2]:[4,this.predictorService.remapMatchIdToNative(a([],e,!0))];case 1:e=i.sent(),i.label=2;case 2:return r=this.predictorService.initPredictionsFilters(n,"matches",e),[4,this.predictorHttps.getUserPredictions(t,o,r)];case 3:return[2,i.sent()]}}))}))},this.getPredictionById=function(t){return r(_,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.getPredictionById(t)];case 1:return[2,e.sent()]}}))}))},this.predictorHttps=e,this.idMapping=y,this.clientHttps=n,this.errorHandlingMode=t.errorHandlingMode,this.predictorValidator=new f.default(t.errorHandlingMode),this.predictorService=new c.default(t,y)}},704:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8608),i=n(246),a=n(1429),s=n(515),o=n(4187),u=n(4226),c=n(5765),l=n(1180),h=n(8452);e.default=function(){var t=this;this.remapPredictorConfig=function(t){var e=new h.default;return e.enabled=t.enabled,e.fullCoverageCompetitions=t.full_coverage_competitions,e.markets=t.markets,e.successRateScopes=t.success_rate_scopes,e},this.remapTopXConfig=function(t){var e=new l.default;return e.enabled=t.enabled,e.minFixtures=t.min_fixtures,e.maxFixtures=t.max_fixtures,e.competitionsWhitelist=t.competitions_whitelist,e},this.remapMatchQuizConfig=function(t){var e=new c.default;return e.enabled=t.enabled,e.defaultMarkets=t.default_markets,e.competitionsWhitelist=t.competitions_whitelist,e},this.remapLoyaltyConfig=function(e){var n=new s.default;return n.enabled=e.enabled,n.conditions.list=e.conditions.list,n.actions.value=e.actions.value,n.rewards=t.remapRewards(e.rewards),n},this.remapRewards=function(e){var n=new u.default;return n.points=t.remapPoints(e.points),n.tiers=e.tiers,n.badges=t.remapBadges(e.badges),n},this.remapPoints=function(t){var e=new o.default;return e.general=t.general,e.comments=t.comments,e.predictor=t.predictor,e.activity=t.activity,e.topX=t.top_x,e.matchQuiz=t.match_quiz,e},this.remapBadges=function(e){var n=new r.default;return n.general=e.general,n.predictor=t.remapBadgeValues(e.predictor),n.topX=t.remapBadgeValues(e.top_x),n.matchQuiz=t.remapBadgeValues(e.match_quiz),n},this.remapBadgeValues=function(e){return e.map((function(e){var n=new i.default;return n.id=e.id,n.enabled=e.enabled,n.requirements=t.remapRequirements(e.requirements),n}))},this.remapRequirements=function(t){var e=new a.default;return e.points=t.points,e.gameParticipationCount=t.game_participation_count,e.entityId=t.entity_id,e.entityType=t.entity_type,e.predictionsMade=t.predictions_made,e.correctPredictions=t.correct_predictions,e}}},8452:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(442);e.default=function(){this.enabled=!1,this.fullCoverageCompetitions=null,this.markets=null,this.successRateScopes=new r.default}},442:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.competitions=[],this.teams=[],this.markets=[]}},6367:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null,this.playerId=null,this.playerModel=null}},1406:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(2524),s=n(1732),o=n(4119),u=n(1465),c=n(5132),l=n(7344);e.default=function(t,e,n){var h=this;this.matchFacade=null,this.playerFacade=null,this.predictorService=null,this.remapFixturesRequest=function(t){var e={};if(e.match_id=t.matchId,e.match_type="FOOTBALL",t instanceof s.default)e.market=t.market,e.prediction=t.prediction.value,e.player_id=t.prediction.playerId;else if(t instanceof c.default||t instanceof l.default)e.market=t.market,e.prediction=t.prediction.value;else if(t instanceof u.default){e.market=t.market;var n=t.prediction.value.split(":");e.goals_home=Number(n[0]),e.goals_away=Number(n[1])}else e.market=t.market,e.prediction=t.prediction.value;return e},this.remapFixturesResponse=function(t){return r(h,void 0,void 0,(function(){var e,n,r,s,o,u,c,l,h,f,d,p;return i(this,(function(i){switch(i.label){case 0:for(e="OWN_GOAL",n=[],r=[],s=null,o=[],t.length>1&&t.sort((function(t,e){return t.match_id.localeCompare(e.match_id)})),u=0,c=t;u<c.length;u++)d=c[u],n.push(d.match_id),d.player_id&&!r.includes(d.player_id)&&r.push(d.player_id);return[4,this.matchFacade.getMatchesMapWithNativeIds(n)];case 1:return l=i.sent(),r.sort((function(t,e){return t.localeCompare(e)})),r&&r.length>0&&!r.includes(e)?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:s=i.sent(),i.label=3;case 3:for(h=0,f=t;h<f.length;h++)d=f[h],p=new a.default,d.target?p.market=this.predictorService.convertMarketForResponseModel(d.market,d.target):p.market=d.market,p.matchId=l[d.match_id].id,p.matchType=d.match_type,p.matchModel=l?l[d.match_id]:null,delete p.matchModel.availableMarkets,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.playerId!==e&&(p.prediction.playerModel=s[d.player_id],p.prediction.playerId=s[d.player_id].id),p.result=this.remapResult(d.result),o.push(p);return[2,o]}}))}))},this.remapResult=function(t){var e=new o.default;return e.settledAt=t.settled_at,e.resettledAt=t.resettled_at,e.status=t.status,e.outcome=t.outcome,e.points=t.points,e},this.matchFacade=t,this.playerFacade=e,this.predictorService=n}},2524:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6367);e.default=function(){this.market=null,this.matchId=null,this.matchType=null,this.matchModel=null,this.prediction=new r.default,this.result=null}},1206:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(9883);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.BOTH_TEAMS_SCORE,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},5274:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(8038);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.CORNERS_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},1465:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3125);e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new r.default,this.prediction.value=n}},7535:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(6902);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.DOUBLE_CHANCE,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},7307:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(6642);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.HT_FT,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},1718:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2782);e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new r.default,this.prediction.value=n}},5132:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9883);e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new r.default,this.prediction.value=n}},7344:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9883);e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new r.default,this.prediction.value=n}},1855:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(9883);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.PENALTY_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},1732:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7321);e.default=function(t,e,n,i){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new r.default,this.prediction.value=n,this.prediction.playerId=i}},5814:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(9883);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.RED_CARD_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},4119:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.settledAt=null,this.resettledAt=null,this.status=null,this.outcome=null,this.points=0}},5908:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.no=0,this.yes=0}},2726:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(1406),s=n(2532),o=n(3792),u=n(595),c=n(4545),l=n(4272),h=n(2524),f=n(5013),d=n(1399);e.default=function(t,e){var n=this;this.fixturesRemapper=null,this.footballHttps=null,this.matchFacade=null,this.playerFacade=null,this.predictorService=null,this.remapRequestBody=function(t){var e={};return e.game_instance_id=t.gameInstanceId,e.fixtures=t.fixtures.map((function(t){return n.fixturesRemapper.remapFixturesRequest(t)})),t instanceof d.default&&t.tiebreaker&&(e.tiebreaker={},e.tiebreaker.golden_goal=t.tiebreaker.goldenGoal?t.tiebreaker.goldenGoal:null),e},this.remapResponseArrayBody=function(t){return r(n,void 0,void 0,(function(){var e,n,r,a,o,u,c=this;return i(this,(function(i){switch(i.label){case 0:return t.length?(e="OWN_GOAL",n=[],r=[],a={},o=[],t.forEach((function(t){t.fixtures.forEach((function(t){n.push(t.match_id),t.player_id&&t.player_id!==e&&r.push(t.player_id)}))})),[4,this.matchFacade.getMatchesMapWithNativeIds(n)]):[3,4];case 1:return u=i.sent(),r.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:a=i.sent(),i.label=3;case 3:return t.forEach((function(t){var n=new s.default,r=[];n.id=t.id,n.gameInstanceId=t.game_instance_id,n.gameType=t.game_type,n.wager=t.wager,n.totalFixtures=t.total_fixtures,n.settledFixtures=t.settled_fixtures,n.userId=t.user_id,t.fixtures.forEach((function(t){var n=new h.default;t.target?n.market=c.predictorService.convertMarketForResponseModel(t.market,t.target):n.market=t.market,n.matchId=u[t.match_id].id,n.matchType=t.match_type,n.matchModel=u[t.match_id],delete n.matchModel.availableMarkets,void 0!==t.goals_home&&void 0!==t.goals_away?n.prediction.value=t.goals_home.toString()+":"+t.goals_away.toString():n.prediction.value=t.prediction,n.prediction.playerId=t.player_id?t.player_id:null,n.prediction.playerId&&n.prediction.playerId!==e&&(n.prediction.playerModel=a[n.prediction.playerId],n.prediction.playerId=a[n.prediction.playerId].id),n.result=c.fixturesRemapper.remapResult(t.result),r.push(n)})),n.fixtures=r,n.status=t.status,t.tiebreaker?n.tiebreaker.goldenGoal=t.tiebreaker.golden_goal:n.tiebreaker=null,n.points=t.points,n.createdAt=t.created_at,n.updatedAt=t.updated_at,o.push(n)})),[2,o];case 4:return[2,t]}}))}))},this.remapResponseObjBody=function(t){return r(n,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return(e=new s.default).id=t.id,e.gameInstanceId=t.game_instance_id,e.gameType=t.game_type,e.wager=t.wager,e.totalFixtures=t.total_fixtures,e.settledFixtures=t.settled_fixtures,e.userId=t.user_id,n=e,[4,this.fixturesRemapper.remapFixturesResponse(t.fixtures)];case 1:return n.fixtures=r.sent(),e.status=t.status,t.tiebreaker?e.tiebreaker.goldenGoal=t.tiebreaker.golden_goal:e.tiebreaker=null,e.points=t.points,e.createdAt=t.created_at,e.updatedAt=t.updated_at,[2,e]}}))}))},this.remapPredictionModel=function(t){var e=new o.default;return e.fullTimeOneXTwo=t.FT_1X2,e.halfTimeOneXTwo=t.HT_1X2,e.bothTeamsScore=t.BOTH_TEAMS_SCORE,e.overZeroPointFiveGoals=t.OVER_GOALS_0_5,e.overOnePointFiveGoals=t.OVER_GOALS_1_5,e.overTwoPointFiveGoals=t.OVER_GOALS_2_5,e.overThreePointFiveGoals=t.OVER_GOALS_3_5,e.overFourPointFiveGoals=t.OVER_GOALS_4_5,e.overFivePointFiveGoals=t.OVER_GOALS_5_5,e.overSixPointFiveGoals=t.OVER_GOALS_6_5,e.overSixPointFiveCorners=t.OVER_CORNERS_6_5,e.overSevenPointFiveCorners=t.OVER_CORNERS_7_5,e.overEightPointFiveCorners=t.OVER_CORNERS_8_5,e.overNinePointFiveCorners=t.OVER_CORNERS_9_5,e.overTenPointFiveCorners=t.OVER_CORNERS_10_5,e.overElevenPointFiveCorners=t.OVER_CORNERS_11_5,e.overTwelvePointFiveCorners=t.OVER_CORNERS_12_5,e.overThirteenPointFiveCorners=t.OVER_CORNERS_13_5,e.doubleChance=t.DOUBLE_CHANCE,e.halfTimeFullTime=t.HT_FT,e.playerScore=t.PLAYER_SCORE,e.playerYellowCard=t.PLAYER_YELLOW_CARD,e.playerRedCard=t.PLAYER_RED_CARD,e.redCardMatch=t.RED_CARD_MATCH,e.penaltyMatch=t.PENALTY_MATCH,e.playerScoreFirstGoal=t.PLAYER_SCORE_FIRST_GOAL,e.cornersMatch=t.CORNERS_MATCH,e.correctScore=t.CORRECT_SCORE,e.correctScoreHalfTime=t.CORRECT_SCORE_HT,e.correctScoreAdvanced=t.CORRECT_SCORE_ADVANCED,e.playerScoreHattrick=t.PLAYER_SCORE_HATTRICK,e.playerScoreTwice=t.PLAYER_SCORE_TWICE,e},this.footballHttps=new u.default(t),this.matchFacade=new c.default(t,this.footballHttps,e),this.playerFacade=new l.default(t,this.footballHttps,e),this.predictorService=new f.default(t,e),this.fixturesRemapper=new a.default(this.matchFacade,this.playerFacade,this.predictorService)}},3950:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.gameInstanceId=null,this.fixtures=null}},2532:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7640);e.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:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6147);e.default=function(t){var e=this;this.limit=null,this.startAfter=null,this.status=null,this.type=null,this.matchIds=null,this.constructFiltersUrl=function(){var t="",n=!1;return e.status&&(n=Object.values(r.StatusEnum).some((function(t){return e.status.includes(t)}))),e.limit&&(t+="&",t+="limit="+e.limit),e.startAfter&&(t+="&",t+="start_after="+e.startAfter),e.status&&n&&(t+="&",t+="status="+e.status.join(",")),e.type&&(t+="&",t+="game_types="+e.type),e.matchIds&&(t+="&",t+="match_ids="+e.matchIds.join(",")),t},this.limit=t.limit?t.limit:null,this.startAfter=t.startAfter?t.startAfter:null,this.status=t.status?t.status:null,this.type=t.type?t.type:null,this.matchIds=t.matchIds?t.matchIds:null}},3792:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5908);e.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.correctScoreHalfTime={},this.correctScoreAdvanced={},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:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.matchId=null,this.matchType=null,this.predictions=null}},9679:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2726),i=n(9378);e.default=function(t,e){var n=this;this.remapPredictions=null,this.remapResponse=function(t){var e=new i.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.predictions=n.remapPredictions.remapPredictionModel(t.predictions),e},this.remapPredictions=new r.default(t,e)}},7321:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=!1,this.playerId=null}},9883:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=!1}},8038:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},3125:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},6902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},6642:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},2782:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},1259:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(2793),s=n(8900),o=n(2929),u=n(7686);e.default=function(t){var e=this;this.predictorHttps=null,this.clientHttps=null,this.predictorFacade=null,this.idMapping=null,this.makeFootballPrediction=function(t,n,a,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.makeFootballPrediction(t,n,a,s)];case 1:return[2,e.sent()]}}))}))},this.getMatchSummary=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMatchSummary(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMarketSummary=function(t,n,a,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMarketSummary(t,n,a,s)];case 1:return[2,e.sent()]}}))}))},this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.deleteFootballPrediction=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPredictions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyPredictions(t)];case 1:return[2,e.sent()]}}))}))},this.getMyCurrentPredictions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyCurrentPredictions(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPastPredictions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyPastPredictions(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPredictionsForMatches=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyPredictionsForMatches(t,n)];case 1:return[2,e.sent()]}}))}))},this.getUserPredictions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserPredictions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getUserCurrentPredictions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserCurrentPredictions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getUserPastPredictions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserPastPredictions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getUserPredictionsForMatches=function(t,n,a,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserPredictionsForMatches(t,n,a,s)];case 1:return[2,e.sent()]}}))}))},this.getPredictionById=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getPredictionById(t)];case 1:return[2,e.sent()]}}))}))},this.idMapping=new s.default(t),this.predictorHttps=new a.default(t,this.idMapping),this.clientHttps=new u.default(t),this.predictorFacade=new o.default(t,this.predictorHttps,this.clientHttps,this.idMapping)}},5013:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var o=n(7974),u=n(3792),c=n(8452),l=n(5908),h=n(8950),f=n(6890),d=n(595),p=n(4545),m=n(7782),v=n(7299),g=n(712),y=n(4119),_=n(3751),w=n(7243),b=n(4272),E=n(1180),I=n(5765),M=n(6147),O=n(5318),R=n(4946),S=n(6409),T=n(1260);e.default=function(t,e){var n=this;this.footballHttps=null,this.idMapping=null,this.matchFacade=null,this.playerFacade=null,this.profileNamespace=null,this.remapMatchIdToNative=function(t){return i(n,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.idMapping.getEntityIdsBySchemaId(t,"match","native")];case 1:return[2,e.sent().match]}}))}))},this.remapPlayerIdToNative=function(t){return i(n,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.idMapping.getEntityIdsBySchemaId(t,"player","native")];case 1:return[2,e.sent().player[0]]}}))}))},this.remapPlayerIdMapToNative=function(t){return i(n,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(a){switch(a.label){case 0:return e={},n=(0,g.transformIdsToBeUnique)(t),[4,this.idMapping.getEntityIdsBySchemaId(n,"player","native")];case 1:return r=a.sent(),i=r.player,n.forEach((function(t,n){return e[t]=i[n]})),[2,e]}}))}))},this.remapPlayerIdToIdSchema=function(t){return i(n,void 0,void 0,(function(){var e,n,r,i,s,o,u,c,l,h,f,d,p,m,v,g,y,_,w;return a(this,(function(a){switch(a.label){case 0:for(e=["playerScore","playerYellowCard","playerRedCard","playerScoreFirstGoal","playerScoreHattrick","playerScoreTwice"],n=[],r=0,i=Object.entries(t);r<i.length;r++)if(s=i[r],o=s[0],u=s[1],e.includes(o))for(c=0,l=Object.keys(u);c<l.length;c++)"NOBODY"!==(h=l[c])&&"OWN_GOAL"!==h&&n.push(h);return n.length?[4,this.playerFacade.getPlayersMapWithNativeIds(n)]:[2,t];case 1:for(f=a.sent(),d=0,p=Object.entries(t);d<p.length;d++)if(m=p[d],v=m[0],g=m[1],e.includes(v))for(y=0,_=Object.keys(g);y<_.length;y++)"NOBODY"!==(w=_[y])&&"OWN_GOAL"!==w&&(g[f[w].id]=g[w],g[f[w].id].model=f[w],this.idMapping.idSchema!==R.IdSchemaEnum.NATIVE&&delete g[w]);return[2,t]}}))}))},this.convertMarket=function(t){for(var e=Object.keys(new u.default),n=Object.values(o.MarketEnum),r=0;r<n.length;r++)t===n[r]&&(t=e[r]);return t},this.convertMarketForResponseModel=function(t,e){return t+"_"+e.toString()},this.getMarketSummary=function(t,e,r){return i(n,void 0,void 0,(function(){var n,i,s,u,c,h,f,d,p=this;return a(this,(function(a){switch(a.label){case 0:if(n=this.convertMarket(e),(i={}).matchId=t.matchId,i.matchType=t.matchType,!Object.keys(t.predictions).includes(n))throw new Error("You have passed invalid market");return i[n]=t.predictions[n],o.playerMarkets.includes(e)&&r?(s="","OWN_GOAL"===r||"NOBODY"===r?[3,2]:[4,this.idMapping.idMappingFacade.getEntitiesByIds({player:[r]},this.idMapping.idSchema,"native")]):[3,6];case 1:u=a.sent(),s=u.player[0],a.label=2;case 2:return s&&i[n][s]?[4,this.playerFacade.getPlayersMapWithNativeIds([s])]:[3,4];case 3:return c=a.sent(),i[n][s].model=c[s],[2,i[n][s]];case 4:return s?(i[n][s]=new l.default,[2,i[n][s]]):[2,i[n][r]];case 5:return[3,10];case 6:return!o.playerMarkets.includes(e)||r?[3,10]:(h=Object.keys(i[n]).filter((function(t){return"NOBODY"!==t&&"OWN_GOAL"!==t}))).length?[4,this.playerFacade.getPlayersMapWithNativeIds(h)]:[3,8];case 7:return d=a.sent(),[3,9];case 8:d={},a.label=9;case 9:f=d,Object.keys(f).length&&Object.keys(i[n]).forEach((function(t){"NOBODY"!==t&&"OWN_GOAL"!==t&&(i[n][f[t].id]=i[n][t],i[n][f[t].id].model=f[t],p.idMapping.idSchema!==R.IdSchemaEnum.NATIVE&&delete i[n][t])})),a.label=10;case 10:return[2,i]}}))}))},this.remapCompetitionsFromConfig=function(t){return i(n,void 0,void 0,(function(){var e,n,r,i,s,o,u,l;return a(this,(function(a){switch(a.label){case 0:return t instanceof c.default?(e={competition:t.fullCoverageCompetitions},n={competition:t.successRateScopes.competitions},r={team:t.successRateScopes.teams},[4,this.idMapping.idMappingFacade.getEntitiesByIds(e,"native",this.idMapping.idSchema)]):[3,4];case 1:return i=a.sent(),[4,this.idMapping.idMappingFacade.getEntitiesByIds(n,"native",this.idMapping.idSchema)];case 2:return s=a.sent(),[4,this.idMapping.idMappingFacade.getEntitiesByIds(r,"native",this.idMapping.idSchema)];case 3:return o=a.sent(),t.fullCoverageCompetitions=i.competition,t.successRateScopes.competitions=s.competition,t.successRateScopes.teams=o.team,[2,t];case 4:return t instanceof E.default||t instanceof I.default?(u={competition:t.competitionsWhitelist},[4,this.idMapping.idMappingFacade.getEntitiesByIds(u,"native",this.idMapping.idSchema)]):[3,6];case 5:return l=a.sent(),t.competitionsWhitelist=l.competition,[2,t];case 6:return[2]}}))}))},this.remapMatchIdsFixtures=function(t){return i(n,void 0,void 0,(function(){var e,n;return a(this,(function(r){switch(r.label){case 0:return Array.isArray(t.data)?t.data.length>0?(e=[],n=[],t.data.forEach((function(t){t instanceof _.default||t instanceof h.default||t instanceof w.default?(t.fixtures.forEach((function(t){return e.push(t.matchId)})),t instanceof w.default&&t.fixtures.forEach((function(t){t.prediction.playerId&&"OWN_GOAL"!==t.prediction.playerId&&n.push(t.prediction.playerId)}))):t instanceof f.default&&t.results.forEach((function(t){return e.push(t.matchId)}))})),[4,this.refactorResponseArrModel(t,e,n)]):[3,2]:[3,4];case 1:case 5:return[2,r.sent()];case 2:return[2,t];case 3:return[3,6];case 4:return[4,this.refactorResponseObjModel(t)];case 6:return[2]}}))}))},this.refactorResponseArrModel=function(t,e,r){return i(n,void 0,void 0,(function(){var n,i,s,o=this;return a(this,(function(a){switch(a.label){case 0:return n=[],[4,this.matchFacade.getMatchesMapWithNativeIds(e)];case 1:return i=a.sent(),s={},r.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:s=a.sent(),a.label=3;case 3:return t.data.forEach((function(t){t instanceof _.default||t instanceof h.default||t instanceof w.default?(t.fixtures.forEach((function(e){o.handleMatchModel(i,e),t instanceof w.default&&e.prediction.playerId&&"OWN_GOAL"!==e.prediction.playerId&&(e.prediction.playerModel=s[e.prediction.playerId],e.prediction.playerId=s[e.prediction.playerId].id)})),n.push(t)):t instanceof f.default&&(t.results.forEach((function(t){t.matchModel=i[t.matchId],delete t.matchModel.availableMarkets,t.matchId=t.matchModel.id})),n.push(t))})),t.data=n,[2,t]}}))}))},this.refactorResponseObjModel=function(t){return i(n,void 0,void 0,(function(){var e,n,r=this;return a(this,(function(i){switch(i.label){case 0:return e=[],t.fixtures.forEach((function(t){return e.push(t.matchId)})),[4,this.matchFacade.getMatchesMapWithNativeIds(e)];case 1:return n=i.sent(),t.fixtures.forEach((function(t){return r.handleMatchModel(n,t)})),[2,t]}}))}))},this.getCurrentGameId=function(t){var e=new Date;if(t.data.length>1){var n=[];return t.data.forEach((function(t){return n.push(t.predictionsCutoff)})),t.data.sort((function(t,n){var r=[t.predictionsCutoff,n.predictionsCutoff].map((function(t){return Math.abs(new Date(t)-e)}));return r[0]-r[1]}))[0].id}return t.data[0].id},this.initGameTypePredictions=function(t,e){var n={type:t,limit:null,startAfter:null};return e&&(n=r(r({},n),{limit:e.limit,startAfter:e.startAfter})),new m.default(n)},this.initGameFilters=function(t,e,n){if(e&&n)return e.type=t,e.gameIds=n,new v.default(e);if(e&&!n)return e.type=t,new v.default(e);if(!e&&n){var r={type:t,gameIds:n};return new v.default(r)}return r={type:t},new v.default(r)},this.addPredictionProp=function(t,e){return i(n,void 0,void 0,(function(){var n=this;return a(this,(function(r){switch(r.label){case 0:return e.data.forEach((function(e){t.data.forEach((function(t){e.id===t.game_instance_id&&(e.predictionId=t.id,e.outcome=t.status,e.fixtures.forEach((function(e,r){void 0!==t.fixtures[r].goals_home&&void 0!==t.fixtures[r].goals_away?e.prediction.value=t.fixtures[r].goals_home+":"+t.fixtures[r].goals_away:e.prediction.value=t.fixtures[r].prediction,t.fixtures[r].player_id?e.prediction.playerId=t.fixtures[r].player_id:t.fixtures[r].target&&(e.prediction.target=t.fixtures[r].target),e.prediction.result=n.remapResult(t.fixtures[r].result)})),e.predictionsMadeAt=t.created_at,e.points=t.points)}))})),e.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,[4,this.remapMatchIdsFixtures(e)];case 1:return[2,r.sent()]}}))}))},this.remapResult=function(t){var e=new y.default;return e.settledAt=t.settled_at,e.resettledAt=t.resettled_at,e.status=t.status,e.outcome=t.outcome,e.points=t.points,e},this.areIdsExceeded=function(t){return t.length>10},this.initPredictionsFilters=function(t,e,r){switch(e){case"user":t&&(t=new m.default(t));break;case"current":if(t)n.deleteUnexpectedProperties(t),t.status=[M.StatusEnum.ACTIVE],t=new m.default(t);else{var i={status:[M.StatusEnum.ACTIVE]};t=new m.default(i)}break;case"past":t?(n.deleteUnexpectedProperties(t),t.status=M.pastStatuses,t=new m.default(t)):(i={status:M.pastStatuses},t=new m.default(i));break;case"matches":t?(n.deleteUnexpectedProperties(t),t.matchIds=r,t=new m.default(t)):(i={matchIds:r},t=new m.default(i))}return t},this.completeGameMarketResults=function(t,e){return i(n,void 0,void 0,(function(){var n,r,i,u,c,l,h,f,d=this;return a(this,(function(a){switch(a.label){case 0:switch(e){case"MATCH_QUIZ":return[3,1];case"TOP_X":return[3,5]}return[3,9];case 1:return n={},r=t.results[0].matchId,i=t.results.map((function(t){return o.playerMarkets.includes(t.market)&&!t.result.includes("OWN_GOAL")?s([],t.result,!0):[]})).flat(),[4,this.matchFacade.getMatchesMapWithNativeIds([r])];case 2:return u=a.sent(),i.length?[4,this.playerFacade.getPlayersMapWithNativeIds(i)]:[3,4];case 3:n=a.sent(),a.label=4;case 4:return t.results=t.results.map((function(t){if(t.matchModel=u[t.matchId]?u[t.matchId]:null,t.playerModels&&Object.keys(n).length&&(e=t.result).forEach((function(e){var r=n[e];t.playerModels.push(r)})),d.idMapping.idSchema!==R.IdSchemaEnum.NATIVE&&(d.remapMatchIdForResultsMarkets(u,t),t.playerModels&&Object.keys(n).length)){var e=t.result;t.result=e.map((function(t){return n[t].id}))}return t})),[2,t];case 5:return c=t.results.map((function(t){return t.matchId})),[4,this.matchFacade.getMatchesMapWithNativeIds(c)];case 6:return l=a.sent(),t.results=t.results.map((function(t){return t.matchModel=l[t.matchId]?l[t.matchId]:null,d.idMapping.idSchema!==R.IdSchemaEnum.NATIVE&&d.remapMatchIdForResultsMarkets(l,t),t})),t.tieBreakers.goldenGoals.length?(h=t.tieBreakers.goldenGoals.map((function(t){return t.playerId})),[4,this.playerFacade.getPlayersMapWithNativeIds(h)]):[3,8];case 7:f=a.sent(),t.tieBreakers.goldenGoals=t.tieBreakers.goldenGoals.map((function(t){return t.matchModel=l[t.matchId],t.playerModel=f[t.playerId],d.idMapping.idSchema!==R.IdSchemaEnum.NATIVE&&(t.matchId=l[t.matchId].id,t.playerId=f[t.playerId].id),t})),a.label=8;case 8:return[2,t];case 9:return[2]}}))}))},this.completeContestWinners=function(t){return i(n,void 0,void 0,(function(){var e,n;return a(this,(function(r){switch(r.label){case 0:return e=t.userList.map((function(t){return t.profileId})),[4,this.profileNamespace.getByIds(e)];case 1:return n=r.sent(),t.userList.forEach((function(t){var e=n.filter((function(e){return e.id===t.profileId}))[0];delete e.interests,t.profileModel=e})),[2,t]}}))}))},this.handleMatchModel=function(t,e){t[e.matchId]?(e.matchModel=t[e.matchId],delete e.matchModel.availableMarkets,e.matchId=e.matchModel.id):(e.matchModel=null,n.idMapping.idSchema!==R.IdSchemaEnum.NATIVE&&n.idMapping.idMappingFacade.getEntityById(e.matchId,"match","native").then((function(t){e.matchId=t[T.ID_TYPES[n.idMapping.idSchema]]})))},this.remapMatchIdForResultsMarkets=function(t,e){t[e.matchId]?e.matchId=t[e.matchId].id:n.idMapping.idMappingFacade.getEntityById(e.matchId,"match","native").then((function(t){e.matchId=t[T.ID_TYPES[n.idMapping.idSchema]]}))},this.deleteUnexpectedProperties=function(t){return t.status&&(console.warn(O.WarningMessages.UNEXPECTED_STATUS_PROP),delete t.status),t.type&&(console.warn(O.WarningMessages.UNEXPECTED_TYPE_PROP),delete t.type),t},this.footballHttps=new d.default(t),this.idMapping=e,this.matchFacade=new p.default(t,this.footballHttps,e),this.playerFacade=new b.default(t,this.footballHttps,e),this.profileNamespace=new S.default(t)}},2310:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4021),i=n(4904),a=n(8097),s=n(5318),o=n(7974),u=n(1976),c=n(1206),l=n(5274),h=n(1465),f=n(7535),d=n(1718),p=n(7307),m=n(5132),v=n(7344),g=n(1855),y=n(1732),_=n(5814),w=n(3950),b=n(1260),E=n(7640),I=n(2535);e.default=function(t){var e=this;this.errorHandlingMode=null,this.validateBodyFields=function(t,n){var r=Object.keys(n),i=Object.keys(new w.default);switch(t){case"MATCH_QUIZ":r.forEach((function(t){i.includes(t)||e.throwInvalidParamException([t])}));break;case"TOP_X":var a=n;a.fixtures.forEach((function(t){return e.validateMarketTopX(t.market)})),r.includes("tiebreaker")&&a.tiebreaker&&e.validateTiebreaker(a.tiebreaker),r.forEach((function(t){"tiebreaker"===t||i.includes(t)||e.throwInvalidParamException([t])}))}var s=i.filter((function(t){return!r.includes(t)}));return s.length&&e.throwMissingFieldsException("game prediction body",s),n.fixtures.forEach((function(t){e.validateFixtureFields(t)})),n},this.validateFixture=function(t,n,r,i){e.validateMarket(n);var a=Object.values(u.OneXTwoEnum),s=Object.values(u.HalfTimeFullTimeEnum),w=Object.values(u.DoubleChanceEnum);if(n===o.MarketEnum.FT_1X2||n===o.MarketEnum.HT_1X2){if(a.includes(r))return new d.default(t,n,r)}else if(n===o.MarketEnum.HT_FT){if(s.includes(r))return new p.default(t,r)}else if(n===o.MarketEnum.DOUBLE_CHANCE){if(w.includes(r))return new f.default(t,r)}else if(n===o.MarketEnum.CORRECT_SCORE||n===o.MarketEnum.CORRECT_SCORE_ADVANCED||n===o.MarketEnum.CORRECT_SCORE_HT){if("string"==typeof r&&/\d+:\d+/.test(r))return new h.default(t,n,r)}else if(n===o.MarketEnum.CORNERS_MATCH){if("number"==typeof r)return new l.default(t,r)}else if(n===o.MarketEnum.BOTH_TEAMS_SCORE){if(e.isPredictionBoolean(r))return new c.default(t,r)}else if(n===o.MarketEnum.RED_CARD_MATCH){if(e.isPredictionBoolean(r))return new _.default(t,r)}else if(n===o.MarketEnum.PENALTY_MATCH){if(e.isPredictionBoolean(r))return new g.default(t,r)}else if(o.playerMarkets.includes(n)){var b="OWN_GOAL";if(e.validatePlayerId(n,i),n===o.playerMarketNobodyPrediction&&e.isPredictionBoolean(r)){var E=i&&i===b?b:i;return new y.default(t,n,r,E)}if(i&&e.isPredictionBoolean(r))return new y.default(t,n,r,i)}else if(o.MarketsOverGoals.includes(n)){if(e.isPredictionBoolean(r))return new v.default(t,n,r)}else if(o.MarketsOverCorners.includes(n)&&e.isPredictionBoolean(r))return new m.default(t,n,r);e.throwInvalidPredictionException(r,n)},this.validateFixtureFields=function(t){var n=Object.keys(t);n.forEach((function(t){b.validFixtureFields.includes(t)||e.throwInvalidParamException([t])}));var r=b.validFixtureFields.filter((function(t){if("matchType"!==t&&!n.includes(t))return t}));r.length&&e.throwMissingFieldsException("fixtures",r),e.validatePredictionKey(t.market,t.prediction)},this.validateTiebreaker=function(t){var n=Object.keys(t);n.length&&"object"==typeof t||e.throwInvalidType("tiebreaker","object");var r=Object.keys(new E.default)[0];n.forEach((function(t){r!==t&&e.throwInvalidParamException([t])})),n.includes(r)||e.throwMissingFieldsException("tiebreaker",[r]),"number"!=typeof t.goldenGoal&&e.throwInvalidType("goldenGoal","number")},this.validatePredictionKey=function(t,n){if("object"==typeof n){var r=Object.keys(n),i=["value"];if(r.length||e.throwMissingFieldsException("prediction",i),1!==r.length||r.includes(i[0])||e.throwInvalidParamException(r),r.length>1){o.playerMarkets.includes(t)&&i.push("playerId");var a=r.filter((function(t){return!i.includes(t)}));a.length&&e.throwInvalidParamException(a)}}else e.throwInvalidType("prediction","object")},this.validatePlayerId=function(t,n){var r="playerId";t!==o.playerMarketNobodyPrediction&&(n||e.throwInvalidParamException([r]),"string"!=typeof n&&e.throwInvalidType(r,"string"))},this.validateMarket=function(t){Object.values(o.MarketEnum).includes(t)||e.throwInvalidMarketException(t)},this.validateMarketTopX=function(t){t!==o.MarketEnum.CORRECT_SCORE&&t!==o.MarketEnum.CORRECT_SCORE_ADVANCED&&e.throwInvalidMarketException(t,"TOP_X")},this.isPredictionBoolean=function(t){return"boolean"==typeof t},this.throwInvalidPredictionException=function(t,n){var o=(0,s.invalidPredictionMessage)(t,n);if("default"===e.errorHandlingMode)throw new a.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_PREDICTION,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.throwInvalidMarketException=function(t,n){var o;if(o=n&&"TOP_X"===n?(0,s.invalidMarketTopXMessage)(t):(0,s.invalidMarketMessage)(t),"default"===e.errorHandlingMode)throw new a.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_MARKET,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.throwInvalidParamException=function(t){var n=(0,s.invalidFieldMessage)(t);if("default"===e.errorHandlingMode)throw new a.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_FIELD,n);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,n).response},this.throwMissingFieldsException=function(t,n){var o=(0,s.missingFieldsMessage)(t,n);if("default"===e.errorHandlingMode)throw new a.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_FIELD,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.throwInvalidType=function(t,n){var o=(0,s.invalidTypeMessage)(t,n);if("default"===e.errorHandlingMode)throw new a.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.errorHandlingMode=t}},4831:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var s=n(9072),o=n(7232),u=n(4268);e.default=function(t,e,n,c,l,h){var f=this;this.idsRemapper=null,this.profileHttps=null,this.profileService=null,this.localStorage=null,this.profileFacade=null,this.ownProfile=null,this.modified=!1,this.expireAt=0,this.promises=[],this.isFetching=!1,this.getOwnProfile=function(){return r(f,void 0,void 0,(function(){var t,e,n;return i(this,(function(r){switch(r.label){case 0:return this.isFetching?(console.log("Another thread is fetching profile..."),[4,this.delay(100)]):[3,2];case 1:return r.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(t=Math.floor(Date.now()/1e3),this.ownProfile&&!(this.expireAt<t))return[3,7];this.isFetching=!0,this.expireAt=Math.floor(Date.now()/1e3)+600,r.label=3;case 3:return r.trys.push([3,5,,6]),[4,this.profileFacade.getOwn()];case 4:return e=r.sent(),this.setOwnProfile(e),[3,6];case 5:throw n=r.sent(),this.isFetching=!1,n;case 6:return this.modified=!1,this.isFetching=!1,[2,this.ownProfile];case 7:return[2,this.ownProfile]}}))}))},this.delay=function(t){return new Promise((function(e){setTimeout(e,t)}))},this.setOwnProfile=function(t){f.ownProfile=t},this.getInfo=function(){return r(f,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),delete(e=JSON.parse(JSON.stringify(t))).interests,[2,e]}}))}))},this.showInterests=function(){return r(f,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.remapInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.showFullInterests=function(){return r(f,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.showFullInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.getFollowers=function(t){return r(f,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowers(t)];case 1:return[2,e.sent()]}}))}))},this.getFollowing=function(t){return r(f,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowing(t)];case 1:return[2,e.sent()]}}))}))},this.follow=function(t){return r(f,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.follow(t)];case 1:return e=r.sent(),[4,this.profileFacade.updateOwnProfile()];case 2:return n=r.sent(),this.setOwnProfile(n),[2,e]}}))}))},this.unfollow=function(t){return r(f,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.unfollow(t)];case 1:return e=r.sent(),[4,this.profileFacade.updateOwnProfile()];case 2:return n=r.sent(),this.setOwnProfile(n),[2,e]}}))}))},this.getStats=function(){return r(f,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getStats()];case 1:return t=e.sent(),[4,this.idsRemapper.remapSuccessRatesEntities(t)];case 2:return[2,e.sent()]}}))}))},this.getBadges=function(){return r(f,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getBadges()];case 1:return[2,t.sent()]}}))}))},this.addInterestPromise=function(t){return r(f,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return r.sent(),e=null,"custom"===t.source?[3,3]:[4,this.idsRemapper.remapInterestToNative(t)];case 2:return e=r.sent(),[3,4];case 3:e=t,r.label=4;case 4:return n=this.ownProfile.interests.filter((function(t){return t.id!==e.id||t.type!==e.type||t.source!==e.source})),this.ownProfile.interests=a([],n,!0),this.ownProfile.interests.push(e),[2,this]}}))}))},this.addInterest=function(t){return f.promises.push(f.addInterestPromise(t)),f},this.removeInterestPromise=function(t){return r(f,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return n.sent(),e=null,"custom"===t.source?[3,3]:[4,this.idsRemapper.remapInterestToNative(t)];case 2:return e=n.sent(),[3,4];case 3:e=t,n.label=4;case 4:return this.ownProfile.interests=this.ownProfile.interests.filter((function(t){return t.id!==e.id||t.type!==e.type||t.source!==e.source})),[2,this]}}))}))},this.removeInterest=function(t){return f.promises.push(f.removeInterestPromise(t)),f},this.setBirthdatePromise=function(t){return r(f,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.birthDate=t||null,[2,this]}}))}))},this.setBirthdate=function(t){return f.promises.push(f.setBirthdatePromise(t)),f},this.setGenderPromise=function(t){return r(f,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.gender="male"===t||"female"===t?t:"unspecified",[2,this]}}))}))},this.setGender=function(t){return f.promises.push(f.setGenderPromise(t)),f},this.setNicknamePromise=function(t){return r(f,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.nickname=t,[2,this]}}))}))},this.setNickname=function(t){return f.promises.push(f.setNicknamePromise(t)),f},this.setNamePromise=function(t){return r(f,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.name=t,[2,this]}}))}))},this.setName=function(t){return f.promises.push(f.setNamePromise(t)),f},this.setCountryPromise=function(t){return r(f,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),t&&!this.ownProfile.country?(this.ownProfile.country=new s.default,this.ownProfile.country.id=t):t&&this.ownProfile.country?this.ownProfile.country.id=t:this.ownProfile.country=null,[2,this]}}))}))},this.setCountry=function(t){return f.promises.push(f.setCountryPromise(t)),f},this.showFullnessProfile=function(){return r(f,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[2,this.profileFacade.showFullnessProfile(e)]}}))}))},this.update=function(){return r(f,void 0,void 0,(function(){var t,e,n,r,a,s;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 t=i.sent(),[4,this.getOwnProfile()];case 3:return e=i.sent(),n=this.profileService.extractUpdatedProps(t,e),this.modified=!1,this.expireAt=0,Object.keys(n).length?[4,this.profileHttps.updateProfile(n)]:[3,5];case 4:return r=i.sent(),a=JSON.parse(JSON.stringify(r)),this.setOwnProfile(a),this.localStorage.setOwnProfile(a),delete r.interests,[2,r];case 5:return delete(s=JSON.parse(JSON.stringify(this.ownProfile))).interests,[2,s]}}))}))},this.idsRemapper=t,this.localStorage=e,this.profileHttps=n,this.profileService=new u.default,this.profileFacade=new o.default(e,n,c)}},642:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(7232);e.default=function(t,e,n,s){var o=this;this.idsRemapper=null,this.profileHttps=null,this.activityHttps=null,this.profileFacade=null,this.profileId="",this.setId=function(t){return o.profileId=t,o},this.getProfile=function(){return r(o,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getById(this.profileId)];case 1:return[2,t.sent()]}}))}))},this.getInfo=function(){return r(o,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.getProfile()];case 1:return delete(t=e.sent()).interests,[2,t]}}))}))},this.showInterests=function(){return r(o,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.remapInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.showFullInterests=function(){return r(o,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.showFullInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.getFollowers=function(t){return r(o,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowers(t,this.profileId)];case 1:return[2,e.sent()]}}))}))},this.getFollowing=function(t){return r(o,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowing(t,this.profileId)];case 1:return[2,e.sent()]}}))}))},this.showFullnessProfile=function(){return r(o,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.getProfile()];case 1:return t=e.sent(),[2,this.profileFacade.showFullnessProfile(t)]}}))}))},this.getStats=function(t){return r(o,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.activityHttps.getStats(this.profileId,t)];case 1:return e=n.sent(),[4,this.idsRemapper.remapSuccessRatesEntities(e)];case 2:return[2,n.sent()]}}))}))},this.getBadges=function(){return r(o,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileHttps.getBadges(this.profileId)];case 1:return[2,t.sent()]}}))}))},this.idsRemapper=t,this.profileHttps=n,this.activityHttps=s,this.profileFacade=new a.default(e,n,s)}},7232:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(9037),s=n(9523);e.default=function(t,e,n){var o=this;this.isBrowser=!1,this.localStorage={},this.profileHttps=null,this.activityHttps=null,this.getOwn=function(){return r(o,void 0,void 0,(function(){var t,e,n,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(t=this.getLocalStorageData("profile"))?[2,JSON.parse(JSON.stringify(t))]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getProfile()];case 2:return n=i.sent(),this.localStorage.setOwnProfile(n),[2,n];case 3:throw e=i.sent(),console.warn("There was a problem retrieving your profile: ",e),e;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.profileHttps.getProfile()];case 6:return[2,n=i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving your profile: ",r),r;case 8:return[2]}}))}))},this.updateOwnProfile=function(){return r(o,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.getProfile()];case 1:return t=n.sent(),this.localStorage.setOwnProfile(t),[2,t];case 2:throw e=n.sent(),console.warn("There was a problem retrieving your profile: ",e),e;case 3:return[2]}}))}))},this.getByIds=function(t,e){return r(o,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||!1,[4,this.profileHttps.getProfiles(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the selected profiles: "+t.join(",")+" ",n),n;case 3:return[2]}}))}))},this.getById=function(t){return r(o,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.getProfile(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the selected profile: "+t+" ",e),e;case 3:return[2]}}))}))},this.getCountries=function(t){return r(o,void 0,void 0,(function(){var e,n,r,a;return i(this,(function(i){switch(i.label){case 0:return t=t||!1,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.profileHttps.getCountries(t)];case 2:return n=i.sent(),this.localStorage.setProfileCountries(n),[2,n];case 3:throw r=i.sent(),console.warn("There was a problem retrieving profile countries: ",r),r;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.profileHttps.getCountries(t)];case 6:return[2,i.sent()];case 7:throw a=i.sent(),console.warn("There was a problem retrieving profile countries: ",a),a;case 8:return[2]}}))}))},this.getFollowers=function(t,e){return r(o,void 0,void 0,(function(){var n,r,a,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),t&&(t=new s.default(t)),[4,this.profileHttps.getFollowers(t,e)];case 1:return n=i.sent(),(r=n.data.map((function(t){return t.followerId}))).length?[4,this.getByIds(r)]:[3,3];case 2:return a=i.sent(),o=n.data.map((function(t){return a.forEach((function(e){t.followerId===e.id&&(t.name=e.name,t.nickname=e.nickname,t.avatar=e.avatar)})),t})),n.data=o,[2,n];case 3:return[2,n];case 4:throw u=i.sent(),console.warn("There was a problem retrieving your followers: ",u),u;case 5:return[2]}}))}))},this.getFollowing=function(t,e){return r(o,void 0,void 0,(function(){var n,r,a,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),t&&(t=new s.default(t)),[4,this.profileHttps.getFollowing(t,e)];case 1:return n=i.sent(),(r=n.data.map((function(t){return t.followingId}))).length?[4,this.getByIds(r)]:[3,3];case 2:return a=i.sent(),o=n.data.map((function(t){return a.forEach((function(e){t.followingId===e.id&&(t.name=e.name,t.nickname=e.nickname,t.avatar=e.avatar)})),t})),n.data=o,[2,n];case 3:return[2,n];case 4:throw u=i.sent(),console.warn("There was a problem retrieving your following profiles: ",u),u;case 5:return[2]}}))}))},this.follow=function(t){return r(o,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.follow(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem following profiles: "+t.join(",")+" ",e),e;case 3:return[2]}}))}))},this.unfollow=function(t){return r(o,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.unfollow(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem unfollowing profiles: "+t.join(",")+" ",e),e;case 3:return[2]}}))}))},this.showFullnessProfile=function(t){var e=new a.default,n=0;return t.avatar&&(e.breakdown.addedAvatar.completed=!0,n+=e.breakdown.addedAvatar.percentage),t.birthDate&&(e.breakdown.addedBirthdate.completed=!0,n+=e.breakdown.addedBirthdate.percentage),t.country&&(e.breakdown.addedCountry.completed=!0,n+=e.breakdown.addedCountry.percentage),t.gender&&(e.breakdown.addedGender.completed=!0,n+=e.breakdown.addedGender.percentage),t.interests&&t.interests.length>0&&(t.interests.find((function(t){return"team"===t.type&&t.favourite}))&&(e.breakdown.teamFavourite.completed=!0,n+=e.breakdown.teamFavourite.percentage),t.interests.find((function(t){return"team"===t.type}))&&(e.breakdown.teamFollowed.completed=!0,n+=e.breakdown.teamFollowed.percentage),t.interests.find((function(t){return"player"===t.type&&t.favourite}))&&(e.breakdown.playerFavourite.completed=!0,n+=e.breakdown.playerFavourite.percentage),t.interests.find((function(t){return"player"===t.type}))&&(e.breakdown.playerFollowed.completed=!0,n+=e.breakdown.playerFollowed.percentage),t.interests.find((function(t){return"competition"===t.type&&t.favourite}))&&(e.breakdown.competitionFavourite.completed=!0,n+=e.breakdown.competitionFavourite.percentage),t.interests.find((function(t){return"competition"===t.type}))&&(e.breakdown.competitionFollowed.completed=!0,n+=e.breakdown.competitionFollowed.percentage)),e.totalPercentage=n,e},this.getStats=function(){return r(o,void 0,void 0,(function(){var t,e,n,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(t=this.getLocalStorageData("statistics"))&&Object.keys(t).length?[2,JSON.parse(JSON.stringify(t))]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.activityHttps.getStats()];case 2:return e=i.sent(),this.localStorage.setProfileStats(e),[2,e];case 3:throw n=i.sent(),console.warn("There was a problem retrieving own profile statistics: ",n),n;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.activityHttps.getStats()];case 6:return[2,i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving own profile statistics: ",r),r;case 8:return[2]}}))}))},this.getBadges=function(){return r(o,void 0,void 0,(function(){var t,e,n,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(t=this.getLocalStorageData("badges"))?[2,t]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getBadges()];case 2:return e=i.sent(),this.localStorage.setProfileBadges(e),[2,e];case 3:throw n=i.sent(),console.warn("There was a problem retrieving own profile badges: ",n),n;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.profileHttps.getBadges()];case 6:return[2,i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving own profile badges: ",r),r;case 8:return[2]}}))}))},this.getLocalStorageData=function(t){var e=Math.floor(Date.now()/1e3),n=o.localStorage.getExpiration("profile",t);switch(t){case"profile":if(n>e)return o.localStorage.getOwnProfile();case"statistics":if(n>e)return o.localStorage.getProfileStats();case"badges":if(n>e)return o.localStorage.getProfileBadges();default:return null}},this.isBrowser="undefined"!=typeof window,this.localStorage=t,this.profileHttps=e,this.activityHttps=n}},9523:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.limit=0,this.startAfter=null,this.constructFilterUrl=function(){var t="";return e.limit&&(t=(t+="&")+"limit="+e.limit),e.startAfter&&(t=(t+="&")+"start_after="+e.startAfter),t},this.limit=t.limit?t.limit:20,this.startAfter=t.startAfter?t.startAfter:null}},4782:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.avatar=null,this.followerId=null,this.name=null,this.nickname=null,this.profileId=null}},1712:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.profile_ids=[]}},3106:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.avatar=null,this.followingId=null,this.name=null,this.nickname=null,this.profileId=null}},6620:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7312);e.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:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){this.completed=!1,this.percentage=t}},9037:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6620);e.default=function(){this.breakdown=new r.default}},9072:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.assets=null}},3546:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.nickname=null,this.avatar=null,this.gender=null,this.country=null,this.birthDate=null,this.interests=[],this.followingCount=0,this.followersCount=0}},6277:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1553),i=n(4782);e.default=function(){var t=this;this.followersFromResponse=function(e){var n=new r.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapResponse(e)})),n},this.remapResponse=function(t){var e=new i.default;return e.avatar=t.avatar,e.followerId=t.follower_id,e.name=t.name,e.profileId=t.profile_id,e}}},8673:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1553),i=n(3106);e.default=function(){var t=this;this.followResponse=function(e){return e.map((function(e){return t.remapResponse(e)}))},this.followingFromResponse=function(e){var n=new r.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapResponse(e)})),n},this.remapResponse=function(t){var e=new i.default;return e.avatar=t.avatar,e.followingId=t.following_id,e.name=t.name,e.profileId=t.profile_id,e.nickname=t.nickname,e}}},441:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3546);e.default=function(){var t=this;this.profilesFromResponse=function(e){return e?e.map((function(e){return t.fullProfileFromResponse(e)})):null},this.fullProfileFromResponse=function(t){var e=new r.default;return e.id=t.id,e.name=t.name,e.nickname=t.nickname,e.avatar=t.avatar,e.gender=t.gender,e.country=t.country,e.birthDate=t.birth_date,e.interests=t.interests?t.interests:[],e.followingCount=t.following_count,e.followersCount=t.followers_count,e}}},1316:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5123);e.default=function(){this.successRates=new r.default}},9826:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.model=null}},5123:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},6409:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(4275),s=n(8900),o=n(7232),u=n(5601),c=n(4831),l=n(642),h=n(4289),f=n(595),d=n(1022),p=n(4912);e.default=function(t){var e=this;this.idsRemapper=null,this.profileHttps=null,this.activityHttps=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 e.ownProfileBuilder},this.getById=function(t){return e.profileBuilder.setId(t)},this.getCountries=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getCountries(t)];case 1:return[2,e.sent()]}}))}))},this.getByIds=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getByIds(t,n)];case 1:return[2,e.sent()]}}))}))},this.profileHttps=new a.default(t),this.activityHttps=new d.default(t),this.footballHttps=new f.default(t),this.idMapping=new s.default(t),this.localStorage=new u.default(t),this.footballFacade=new h.default(t,this.localStorage,this.footballHttps,this.idMapping),this.profileFacade=new o.default(this.localStorage,this.profileHttps,this.activityHttps),this.idsRemapper=new p.default(t,this.footballFacade),this.ownProfileBuilder=new c.default(this.idsRemapper,this.localStorage,this.profileHttps,this.activityHttps,this.idMapping,this.footballFacade),this.profileBuilder=new l.default(this.idsRemapper,this.localStorage,this.profileHttps,this.activityHttps)}},4268:function(t,e){"use strict";var n=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){var t=this;this.extractUpdatedProps=function(e,n){var r=["name","nickname","gender"],i={};return Object.keys(e).forEach((function(a){if(r.includes(a)&&e[a]!==n[a])i[a]=n[a];else if("birthDate"===a)(null===n[a]||null===e[a]&&n[a]||e[a]!==n[a])&&(i.birth_date=n[a]);else if("country"===a)null===n[a]?i.country_id=n[a]:(null===e[a]&&n[a]||e[a].id!==n[a].id)&&(i.country_id=n[a].id);else if("interests"===a){var s=e[a],o=n[a];o.length&&t.isNewInterest(s,o)?i[a]=t.updateInterests(s,o):!o.length&&s.length?i[a]=o:s.length===o.length||t.isNewInterest(s,o)||(i[a]=o)}})),i},this.updateInterests=function(e,r){if(e.length===r.length){var i=t.extractSameAndNewInterests(e,r),a=i[0],s=i[1];return n(n([],s,!0),a,!0)}return r},this.isNewInterest=function(e,n){var r=!1;return t.extractSameAndNewInterests(e,n)[0].length?r=!0:r},this.extractSameAndNewInterests=function(t,e){var n=e.filter((function(e){return t.some((function(t){return e.id===t.id&&e.type===t.type&&e.source===t.source&&e.favourite===t.favourite}))}));return[e.filter((function(e){return!t.some((function(t){return e.id===t.id&&e.type===t.type&&e.source===t.source&&e.favourite===t.favourite}))})),n]}}},853:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.GameStatusEnum=void 0,(n=e.GameStatusEnum||(e.GameStatusEnum={})).OPEN="OPEN",n.LIVE="LIVE",n.PENDING="PENDING",n.CANCELED="CANCELED",n.CLOSED="CLOSED",n.SETTLED="SETTLED"},9502:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(4946),s=n(2793),o=n(5013),u=n(853),c=n(7299),l=n(1553),h=n(1399),f=n(7782),d=n(7686),p=n(2310),m=n(8097),v=n(4904),g=n(5318),y=n(4021),_=n(2535);e.default=function(t,e){var n=this;this.idMapping=null,this.predictorHttps=null,this.predictorService=null,this.predictorValidator=null,this.clientHttps=null,this.errorHandlingMode=null,this.getConfig=function(){return r(n,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(d.FeatureConfigType.TOP_X)];case 1:return t=e.sent(),this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(t)];case 2:return[2,e.sent()];case 3:return[2,t]}}))}))},this.getGames=function(t,e){return r(n,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return e=e||!1,n=this.predictorService.initGameFilters("TOP_X",t),[4,this.predictorHttps.getGames(n,e)];case 1:return r=i.sent(),[4,this.predictorService.remapMatchIdsFixtures(r)];case 2:return[2,i.sent()]}}))}))},this.getGameById=function(t,e){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return e=e||!1,[4,this.predictorHttps.getGameById(t,e)];case 1:return n=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(n)];case 2:return[2,r.sent()]}}))}))},this.getGamePredictions=function(t,e,a){return r(n,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return a=a||!1,e&&(e.type&&delete e.type,e.status&&delete e.status,e=new f.default(e)),[4,this.predictorHttps.getGamePredictions(t,a,e)];case 1:return[2,n.sent()]}}))}))},this.getGameResults=function(t,e,a){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return a=a||!1,e&&(e=new c.default(e)),[4,this.predictorHttps.getGameResults(t,a,e)];case 1:return n=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(n)];case 2:return[2,r.sent()]}}))}))},this.getCurrentGameResults=function(t){return r(n,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return t=t||!1,e={status:u.GameStatusEnum.OPEN,type:"TOP_X"},e=new c.default(e),[4,this.predictorHttps.getGames(e,t)];case 1:return n=i.sent(),r=this.predictorService.getCurrentGameId(n),[4,this.getGameResults(r,null,t)];case 2:return[2,i.sent().data[0]]}}))}))},this.play=function(t){return r(n,void 0,void 0,(function(){var e,n,r,s,o=this;return i(this,(function(i){switch(i.label){case 0:return e=new h.default(t),(e=this.predictorValidator.validateBodyFields("TOP_X",e)).fixtures=e.fixtures.map((function(t){return o.predictorValidator.validateFixture(t.matchId,t.market,t.prediction.value)})),this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,2]:(n=[],e.fixtures.forEach((function(t){return n.push(t.matchId)})),[4,this.predictorService.remapMatchIdToNative(n)]);case 1:r=i.sent(),e.fixtures.forEach((function(t){return t.matchId=r.shift()})),i.label=2;case 2:return[4,this.predictorHttps.makeFootballPrediction(e)];case 3:return(s=i.sent()).fixtures.forEach((function(t){t.matchId=t.matchModel.id})),[2,s]}}))}))},this.delete=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getMyGameEditions=function(t,e){return r(n,void 0,void 0,(function(){var n,r,a,s,o;return i(this,(function(i){switch(i.label){case 0:return t&&t.limit&&this.validateLimitFilterOnGames(t.limit),e=e||!1,n=this.predictorService.initGameTypePredictions("TOP_X",t),r=[],[4,this.predictorHttps.getMyPredictionsNoRemap(n)];case 1:return(a=i.sent()).data.length>0?(a.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),s=this.predictorService.initGameFilters("TOP_X",null,r),[4,this.predictorHttps.getUserGameEditions(s,e)]):[3,4];case 2:return o=i.sent(),[4,this.predictorService.addPredictionProp(a,o)];case 3:return[2,i.sent()];case 4:return[2,new l.default]}}))}))},this.getMyGamePrediction=function(t){return r(n,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=this.predictorService.initGameTypePredictions("TOP_X"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return(n=i.sent()).data.length>0?[2,(r=n.data.filter((function(e){return e.gameInstanceId===t}))).length?r[0]:null]:[2,null]}}))}))},this.getUserGameEditions=function(t,e,a){return r(n,void 0,void 0,(function(){var n,r,s,o,u;return i(this,(function(i){switch(i.label){case 0:return e&&e.limit&&this.validateLimitFilterOnGames(e.limit),a=a||!1,n=this.predictorService.initGameTypePredictions("TOP_X",e),r=[],[4,this.predictorHttps.getUserPredictionsNoRemap(t,n)];case 1:return(s=i.sent()).data.length>0?(s.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),o=this.predictorService.initGameFilters("TOP_X",null,r),[4,this.predictorHttps.getUserGameEditions(o,a)]):[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 l.default]}}))}))},this.getUserGamePrediction=function(t,e,a){return r(n,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return a=a||!1,n=this.predictorService.initGameTypePredictions("TOP_X"),[4,this.predictorHttps.getUserPredictions(t,a,n)];case 1:return(r=i.sent()).data.length>0?[2,(s=r.data.filter((function(t){return t.gameInstanceId===e}))).length?s[0]:null]:[2,null]}}))}))},this.getMarketsResultsForGame=function(t,e){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getMarketResultsForGame(t,e)];case 1:return n=r.sent(),[4,this.predictorService.completeGameMarketResults(n,"TOP_X")];case 2:return[2,r.sent()]}}))}))},this.getGameWinners=function(t){return r(n,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getContestWinners(t)];case 1:return e=r.sent(),[4,this.getGameById(t)];case 2:return n=r.sent(),e.contestModel=n,[2,this.predictorService.completeContestWinners(e)]}}))}))},this.validateLimitFilterOnGames=function(t){if("default"===n.errorHandlingMode&&t>50)throw new m.default(y.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,g.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED);if("standard"===n.errorHandlingMode&&t>50)throw new _.default(y.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,g.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED).response},this.idMapping=e,this.errorHandlingMode=t.errorHandlingMode,this.predictorValidator=new p.default(t.errorHandlingMode),this.predictorHttps=new s.default(t,e),this.predictorService=new o.default(t,e),this.clientHttps=new d.default(t)}},1180:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.enabled=!1,this.minFixtures=null,this.maxFixtures=null,this.competitionsWhitelist=null}},7482:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6899);e.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new r.default}},5967:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6899),i=n(3381);e.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new r.default,this.prediction=new i.default}},6890:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.userId=null,this.points=null,this.results=[],this.tiebreaker=null}},6160:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.matchId=null,this.matchModel=null,this.outcome=null}},7299:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var a=n(4800),s=n(853),o=function(t){function e(e){var n=t.call(this,e)||this;return n.status=null,n.type=null,n.gameIds=null,n.sortOrder=null,n.constructFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(n);return n.status&&Object.values(s.GameStatusEnum).includes(n.status)&&(e+="&",e+="status="+n.status),n.type&&(e+="&",e+="type="+n.type),n.gameIds&&n.gameIds.length>0&&(e+="&",e+="game_ids="+n.gameIds.join(",")),n.sortOrder&&(e+="&",e+="sort_order="+n.sortOrder),e},n.status=e.status?e.status:null,n.type=e.type?e.type:null,n.gameIds=e.gameIds?e.gameIds:null,n.sortOrder=e.sortOrder?e.sortOrder:null,n}return i(e,t),e}(a.default);e.default=o},3751:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(439),i=n(4916);e.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.scheduleOpenAt=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new i.default,this.participantsCount=0,this.related=null,this.excludedProfileIds=null,this.rules=null,this.flags=null,this.images=new r.default,this.createdAt=null,this.updatedAt=null}},4780:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7482),i=n(8410),a=n(5967),s=n(6890),o=n(6160),u=n(3751),c=n(7243),l=n(8950),h=n(7640),f=n(1553),d=n(670),p=n(7974),m=n(4916),v=n(3483),g=n(1784),y=n(824),_=n(6899);e.default=function(){var t=this;this.remapPaginatedGames=function(e){var n=new f.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapGamesListResponse(e)})),n},this.remapGamesListResponse=function(e){var n=new u.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.type=e.type,n.status=e.status,n.scheduleOpenAt=e.schedule_open_at,n.predictionsCutoff=e.predictions_cutoff,n.fixtures=e.fixtures.map((function(e){return t.remapFixturesResponse(e)})),n.tiebreaker=e.tiebreaker?t.remapTimeTiebreaker(e.tiebreaker.time_tiebreaker):null,n.participantsCount=e.participants_count,n.related=e.related?t.remapRelated(e.related):null,n.excludedProfileIds=e.excluded_profile_ids,n.rules=e.rules,n.flags=e.flags,n.images=e.images,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapFixturesResponse=function(t){var e=new r.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status.type,e.matchStatus.subType=t.match_status.sub_type,e},this.remapPaginatedUserTopXEditions=function(e){var n=new f.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapUserTopXEditionsResponse(e)})),n},this.remapUserTopXEditionsResponse=function(e){var n=new l.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.type=e.type,n.status=e.status,n.predictionsCutoff=e.predictions_cutoff,n.scheduleOpenAt=e.schedule_open_at,n.fixtures=e.fixtures.map((function(e){return t.remapTopXFixturesResponse(e)})),n.tiebreaker=e.tiebreaker?t.remapTimeTiebreaker(e.tiebreaker.time_tiebreaker):null,n.participantsCount=e.participants_count,n.related=e.related?t.remapRelated(e.related):null,n.excludedProfileIds=e.excluded_profile_ids,n.rules=e.rules,n.flags=e.flags,n.images=e.images,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapTopXFixturesResponse=function(t){var e=new a.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status.type,e.matchStatus.subType=t.match_status.sub_type,e},this.remapPaginatedUserMathQuizEditions=function(e){var n=new f.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapUserMatchQuizEditionsResponse(e)})),n},this.remapUserMatchQuizEditionsResponse=function(e){var n=new c.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.type=e.type,n.status=e.status,n.predictionsCutoff=e.predictions_cutoff,n.scheduleOpenAt=e.schedule_open_at,n.fixtures=e.fixtures.map((function(e){return t.remapMatchQuizFixturesResponse(e)})),n.tiebreaker=e.tiebreaker?t.remapTimeTiebreaker(e.tiebreaker.time_tiebreaker):null,n.participantsCount=e.participants_count,n.related=e.related?t.remapRelated(e.related):null,n.excludedProfileIds=e.excluded_profile_ids,n.rules=e.rules,n.flags=e.flags,n.images=e.images,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapMatchQuizFixturesResponse=function(t){var e=new i.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status.type,e.matchStatus.subType=t.match_status.sub_type,e},this.remapPaginatedGameResults=function(e){var n=new f.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapGameResults(e)})),n},this.remapGameResults=function(e){var n=new s.default;return n.userId=e.user_id,n.points=e.points?e.points:0,n.results=e.results.map((function(e){return t.remapResults(e)})),n.tiebreaker=e.tiebreaker?t.remapTiebreaker(e.tiebreaker):null,n},this.remapGameMarketsResults=function(e){var n=new d.default;return n.gameId=e.game_id,n.results=t.remapMarketsResults(e.results),n.tieBreakers=e.tie_breakers?t.remapTieBreakers(e.tie_breakers):null,n},this.remapContestWinners=function(e){var n=new g.default;return n.contestId=e.contest_id,n.contestType=e.contest_type,n.description=e.description,n.userList=e.user_list.map((function(e){return t.remapUserListWinners(e)})),n},this.remapUserListWinners=function(t){var e=new y.default;return e.position=t.position,e.profileId=t.profile_id,e.note=t.note,e.tags=t.tags,e},this.remapTieBreakers=function(t){var e={goldenGoals:[]};return e.goldenGoals=t.golden_goals.map((function(t){return{minute:t.minute,matchId:t.match_id,matchModel:null,playerId:t.player_id,playerModel:null,goalType:t.goal_type}})),e},this.remapMarketsResults=function(e){var n=[];return e.forEach((function(e){var r={matchId:e.match_id,market:e.market,result:t.remapMarketResult(e.market,e.result),matchModel:null,playerModels:[],matchStatus:t.remapMarketsResultsMatchStatus(e.match_status)};n.push(t.deleteUnusefulField(r))})),n},this.remapMarketsResultsMatchStatus=function(t){var e=new _.default;return e.type=t.type,e.subType=t.sub_type,e},this.remapMarketResult=function(t,e){return p.endMarkMarkets.includes(t)?e[0]:p.playerMarkets.includes(t)?e:"true"===e[0]||"false"!==e[0]&&void 0},this.deleteUnusefulField=function(e){return p.playerMarkets.includes(e.market)&&!t.isPlayerMarketWithNoResult(e.market,e.result)||delete e.playerModels,e},this.isPlayerMarketWithNoResult=function(t,e){return p.playerMarkets.includes(t)&&0===e.length},this.remapResults=function(t){var e=new o.default;return e.matchId=t.match_id,e.outcome=t.outcome,e},this.remapTiebreaker=function(t){var e=new h.default;return e.goldenGoal=t.golden_goal,e},this.remapTimeTiebreaker=function(t){var e=new m.default;return e.timeTiebreaker=t,e},this.remapRelated=function(t){return t.map((function(t){var e=new v.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e}))}}},8950:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4916);e.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.outcome=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new r.default,this.predictionId=null,this.participantsCount=0,this.related=null,this.excludedProfileIds=null,this.rules=null,this.flags=null,this.points=null,this.createdAt=null,this.updatedAt=null,this.predictionsMadeAt=null,this.scheduleOpenAt=null,this.images=null}},7640:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.goldenGoal=null}},4916:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.timeTiebreaker=!1}},1784:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.contestId="",this.contestType="GAME",this.contestModel=null,this.description="",this.userList=[]}},824:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position="",this.profileId="",this.profileModel=null,this.note="",this.tags=[]}},3381:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null,this.result=null}},1399:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1465);e.default=function(t){var e=this;this.gameInstanceId=null,this.fixtures=[],this.tiebreaker=null,this.gameInstanceId=t.gameInstanceId,t.fixtures.forEach((function(t){return e.fixtures.push(new r.default(t.matchId,t.market,t.prediction.value))})),this.tiebreaker=t.tiebreaker?t.tiebreaker:null}},9596:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(8900),s=n(9502);e.default=function(t){var e=this;this.topXFacade=null,this.idMapping=null,this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGamePredictions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGameResults(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getCurrentGameResults=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getCurrentGameResults(t)];case 1:return[2,e.sent()]}}))}))},this.play=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.play(t)];case 1:return[2,e.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.getMyGameEditions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getMyGameEditions(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMyGamePrediction=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getMyGamePrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getUserGameEditions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getUserGameEditions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getUserGamePrediction=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getUserGamePrediction(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getMarketsResultsForGame=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getMarketsResultsForGame(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameWinners=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGameWinners(t)];case 1:return[2,e.sent()]}}))}))},this.idMapping=new a.default(t),this.topXFacade=new s.default(t,this.idMapping)}},4806:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4946),o=n(712);e.default=function(t,e,n){var u=this;this.idMapping=null,this.idSchema=null,this.native=s.IdSchemaEnum.NATIVE,this.footballFacade=null,this.remapSuccessRatesEntities=function(t){return i(u,void 0,void 0,(function(){var e,n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return e=t.successRates,n={competition:this.getIdsKeys(e.byFootballCompetition),team:this.getIdsKeys(e.byFootballTeam)},Object.values(n.competition).length?(r=t.successRates.byFootballCompetition,i=t.successRates,[4,this.setModels(r,n.competition,"competition")]):[3,2];case 1:i.byFootballCompetition=a.sent(),a.label=2;case 2:return Object.values(n.team).length?(s=t.successRates.byFootballTeam,o=t.successRates,[4,this.setModels(s,n.team,"team")]):[3,4];case 3:o.byFootballTeam=a.sent(),a.label=4;case 4:return[2,t]}}))}))},this.setModels=function(t,e,n){return i(u,void 0,void 0,(function(){var i,s;return a(this,(function(a){switch(a.label){case 0:switch(i=null,e=(0,o.sortArrayInAscOrder)(e),n){case"competition":return[3,1];case"team":return[3,3]}return[3,5];case 1:return[4,this.footballFacade.getCompetitionsMapWithNativeIds(e)];case 2:case 4:return i=a.sent(),[3,5];case 3:return[4,this.footballFacade.getTeamsMapWithNativeIds(e)];case 5:return Object.keys(t).forEach((function(e){var n,a=i.get(e);(s=r(r({},s),((n={})[a.id]=t[e],n)))[a.id].model=a})),[2,s]}}))}))},this.getIdsKeys=function(t){var e=JSON.parse(JSON.stringify(t));return Object.keys(e)},this.remapInterestsToIdSchema=function(t){return i(u,void 0,void 0,(function(){var e,n,r,i,s,o,u,c,l,h;return a(this,(function(a){switch(a.label){case 0:return this.idSchema===this.native?[3,3]:t&&t.length>0?(e={},n={},t.forEach((function(t){e.hasOwnProperty(t.type)||(e[t.type]=[],n[t.type]=[]),e[t.type].push(t.id),n[t.type].push(t)})),[4,this.remapIdsObj(e,this.native,this.idSchema)]):[3,2];case 1:for(r=a.sent(),i=[],s=function(t,e){e.forEach((function(e,n){e.id=r[t][n],i.push(e)}))},o=0,u=Object.entries(n);o<u.length;o++)c=u[o],l=c[0],h=c[1],s(l,h);return[2,i];case 2:case 3:return[2,t]}}))}))},this.remapInterestToNative=function(t){return i(u,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(a){switch(a.label){case 0:return this.idSchema===this.native?[3,2]:(e={},n=t.id,r=t.type,e[r]=[n],[4,this.remapIdsObj(e,this.idSchema,this.native)]);case 1:return i=a.sent(),t.id=i[r][0],[2,t];case 2:return[2,t]}}))}))},this.inquiryCustomInterests=function(t){var e=[];return t&&t.length>0&&(e=t.filter((function(t){return"CUSTOM"===t.source.toLocaleUpperCase()}))),e},this.remapInterests=function(t){return i(u,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:return(e=this.inquiryCustomInterests(t))&&e.length>0?(n=t.filter((function(t){return"CUSTOM"!==t.source.toLocaleUpperCase()})),[4,this.remapInterestsToIdSchema(n)]):[3,2];case 1:return r=i.sent(),e.forEach((function(t){return r.push(t)})),[2,r];case 2:return[4,this.remapInterestsToIdSchema(t)];case 3:return[2,i.sent()]}}))}))},this.showFullInterests=function(t){return i(u,void 0,void 0,(function(){var e,n,r,i,s,o,u,c;return a(this,(function(a){switch(a.label){case 0:return e=[],t&&t.length>0?(n=this.inquiryCustomInterests(t),e.push(n),r=t.filter((function(t){return"CUSTOM"!==t.source.toLocaleUpperCase()})),[4,this.getInterestsEntitiesMap(r)]):[3,2];case 1:return i=a.sent(),s=i.competitionsMap,o=i.teamsMap,u=i.playersMap,c=r.map((function(t){var e=null;return"competition"===t.type?((e=s.get(t.id))&&(t.id=e.id),t.model=e,t):"team"===t.type?((e=o.get(t.id))&&(t.id=e.id),t.model=e,t):"player"===t.type?(u?(t.model=u[t.id],t.id=u[t.id].id):t.model=e,t):void 0})),e.push(c),[2,e.flat()];case 2:return[2,e]}}))}))},this.getInterestsEntitiesMap=function(t){return i(u,void 0,void 0,(function(){var e,n,r,i,s,u,c;return a(this,(function(a){switch(a.label){case 0:return e=[],n=[],r=[],i=new Map,s=new Map,u=null,t.forEach((function(t){"competition"===t.type?e.push(t.id):"team"===t.type?n.push(t.id):"player"===t.type&&r.push(t.id)})),e.length?(c=(0,o.sortArrayInAscOrder)(e),[4,this.footballFacade.getCompetitionsMapWithNativeIds(c)]):[3,2];case 1:i=a.sent(),a.label=2;case 2:return n.length?(c=(0,o.sortArrayInAscOrder)(n),[4,this.footballFacade.getTeamsMapWithNativeIds(c)]):[3,4];case 3:s=a.sent(),a.label=4;case 4:return r.length?(c=(0,o.sortArrayInAscOrder)(r),[4,this.footballFacade.getPlayersMapWithNativeIds(c)]):[3,6];case 5:u=a.sent(),a.label=6;case 6:return[2,{competitionsMap:i,teamsMap:s,playersMap:u}]}}))}))},this.remapIdsObj=function(t,e,n){return i(u,void 0,void 0,(function(){return a(this,(function(r){switch(r.label){case 0:return[4,this.idMapping.idMappingFacade.getEntitiesByIds(t,e,n)];case 1:return[2,r.sent()]}}))}))},this.idMapping=n,this.idSchema=t.idSchema,this.footballFacade=e}},4912:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(8900),s=n(4806);e.default=function(t,e){var n=this;this.idMapping=null,this.profileOperations=null,this.remapSuccessRatesEntities=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.remapSuccessRatesEntities(t)];case 1:return[2,e.sent()]}}))}))},this.remapInterestToNative=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.remapInterestToNative(t)];case 1:return[2,e.sent()]}}))}))},this.remapInterests=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.remapInterests(t)];case 1:return[2,e.sent()]}}))}))},this.showFullInterests=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.showFullInterests(t)];case 1:return[2,e.sent()]}}))}))},this.idMapping=new a.default(t),this.profileOperations=new s.default(t,e,this.idMapping)}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var a=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r={};return(()=>{"use strict";var t=r;Object.defineProperty(t,"__esModule",{value:!0}),t.FansUnitedSDK=void 0;var e=n(6409),i=n(6595),a=n(8808),s=n(4946),o=n(1259),u=n(2962),c=n(9627),l=n(2671),h=n(9377),f=n(9596),d=n(267),p=n(7302),m=n(2141),v=n(7070),g=n(9580);t.FansUnitedSDK=function(t){var n=(new i.default).validate(t);if(n.idSchema.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.idSchema.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.idSchema.message.text),t.idSchema=s.IdSchemaEnum.NATIVE),n.environment.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.environment.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.environment.message.text),t.environment=l.EnvironmentEnum.PROD),n.lang.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.lang.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.lang.message.text),t.lang=h.LangEnum.EN),n.errorHandlingMode.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.errorHandlingMode.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.errorHandlingMode.message.text),t.errorHandlingMode=g.ErrorHandlingModeEnum.DEFAULT),n.authProvider.validation===c.ValidationResponseEnum.INVALID_VALUE&&console.warn(n.authProvider.message.text),n.isValid)return{profile:new e.default(t),football:new a.default(t),predictor:new o.default(t),loyalty:new u.default(t),topX:new f.default(t),matchQuiz:new d.default(t),activity:new p.default(t)};y(n)};var y=function(t){var e="authProvider",n="isValid";Object.keys(t).forEach((function(r){var i=t[r];if(r!==n&&r!==e){if(i.message.type===m.LogEnum.ERROR)throw new Error(i.message.text)}else r!==n&&r===e&&Object.keys(new v.default).forEach((function(t){if(i[t].message.type===m.LogEnum.ERROR)throw new Error(i[t].message.text)}))}))}})(),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),d=n(5655),h=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 E(){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=E:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(E)},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||d.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",g)),g=null},r.isStandardBrowserEnv()){var I=(e.withCredentials||c(_))&&e.xsrfCookieName?s.read(e.xsrfCookieName):void 0;I&&(m[e.xsrfHeaderName]=I)}"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 h("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 d=e;n.length;){var h=n.shift(),p=n.shift();try{d=h(d)}catch(e){p(e);break}}try{i=a(d)}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}}},6245:(e,t,n)=>{"use strict";function r(e){this.message=e}n.r(t),n.d(t,{default:()=>o,InvalidTokenError:()=>a}),r.prototype=new Error,r.prototype.name="InvalidCharacterError";var i="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,i,s=0,a=0,o="";i=t.charAt(a++);~i&&(n=s%4?64*n+i:i,s++%4)?o+=String.fromCharCode(255&n>>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};function s(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(i(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return i(t)}}function a(e){this.message=e}a.prototype=new Error,a.prototype.name="InvalidTokenError";const o=function(e,t){if("string"!=typeof e)throw new a("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(s(e.split(".")[n]))}catch(e){throw new a("Invalid token specified: "+e.message)}}},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),d=n(6965),h=n(9158);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 d.default,lang:new s.default,errorHandlingMode:new h.default,authProvider:new c.default},r=0,i=Object.entries(t);r<i.length;r++){var p=i[r],f=p[0];p[1],"isValid"!==f&&n[f].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}else if(u.message.type===i.LogEnum.ERROR)return!1}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.STAGING="staging"},9580:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorHandlingModeEnum=void 0,(n=t.ErrorHandlingModeEnum||(t.ErrorHandlingModeEnum={})).DEFAULT="default",n.STANDARD="standard"},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",n.EL="el"},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 Fans United JS SDK",n.CLIENT_ID="The field clientId must be provided to use Fans United JS 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.ERROR_HANDLING_MODE_MISSING="If no errorHandlingMode is passed the default one will be set which is: default",n.ERROR_HANDLING_MODE_INVALID="This errorHandlingMode value is not supported, the default one will be set which is: default",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.errorHandlingMode=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.ERROR;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.STAGING,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},9158:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9580),i=n(2141),s=n(9028),a=n(9627);t.default=function(){var e=this;this.validate=function(t){var n=e.validateField(t.errorHandlingMode);return{validation:n,message:e.generateMessage(n)}},this.validateField=function(e){var t=[r.ErrorHandlingModeEnum.DEFAULT,r.ErrorHandlingModeEnum.STANDARD];return e?t.includes(e)?a.ValidationResponseEnum.VALID_VALUE:a.ValidationResponseEnum.INVALID_VALUE:a.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(e){var t=null,n=i.LogEnum.WARNING;return e===a.ValidationResponseEnum.MISSING_VALUE&&(t=s.ValidationMessageEnum.ERROR_HANDLING_MODE_MISSING),e===a.ValidationResponseEnum.INVALID_VALUE&&(t=s.ValidationMessageEnum.ERROR_HANDLING_MODE_INVALID),e===a.ValidationResponseEnum.VALID_VALUE&&(t=null,n=null),{text:t,type:n}}}},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,r.LangEnum.EL];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}}}},4021:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCodes=void 0,(n=t.ErrorCodes||(t.ErrorCodes={}))[n.BAD_METHOD_CALL=400]="BAD_METHOD_CALL",n[n.UNAUTHORIZED=401]="UNAUTHORIZED"},4904:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorStatuses=void 0,(n=t.ErrorStatuses||(t.ErrorStatuses={})).INVALID_TEMPLATE="INVALID_TEMPLATE",n.INVALID_PREDICTION="INVALID_PREDICTION",n.INVALID_MARKET="INVALID_MARKET",n.INVALID_FIELD="INVALID_FIELD",n.INVALID_TYPE="INVALID_TYPE",n.EXCEEDED_LENGTH="EXCEEDED_LENGTH",n.INVALID_TOKEN="invalid_token",n.UNAUTHORIZED="unauthorized",n.INVALID_FILTERS="invalid_filters"},8097:function(e,t){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n,r){var i=e.call(this)||this;return i.code=0,i.status=null,i.message=null,i.errorMessage=function(){return i.message},i.code=t,i.status=n,i.message=r,i}return r(t,e),t}(Error);t.default=i},2535:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t,n){this.response={error:{code:0,status:"",message:""}},this.response.error.code=e,this.response.error.status=t,this.response.error.message=n}},1260:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validFixtureFields=t.documentationLinks=t.ID_TYPES=void 0,t.ID_TYPES={native:"id",sportradar:"sportradar_id",sportal365:"sportal365_id",enetpulse:"enetpulse_id"},t.documentationLinks={PREDICTOR_USER_RELATED_OPERATION:"https://docs.fansunitedmedia.com/docs/predictor-operations#user-related-operations"},t.validFixtureFields=["matchId","matchType","market","prediction"]},712:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.constructStringArrayWithProvidedLength=t.sortArrayInAscOrder=t.initDisableCache=t.isDisabledCache=t.transformIdsToBeUnique=t.setBaseUrl=t.limitIds=t.requestChunkBuild=void 0;var r=n(2671);t.requestChunkBuild=function(e){var t=[],n=0;return t[n]=[],e.forEach((function(e){t[n].length<=199?t[n].push(e):(n++,t[n]=[e])})),t},t.limitIds=function(e,t){for(var n=[];e.length>t;){var r=e.splice(0,t);n.push(r)}return n.push(e),n},t.setBaseUrl=function(e,t){return e===r.EnvironmentEnum.PROD?{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",loyalty:"https://loyalty.fansunitedapi.com/v1"}[t]:e===r.EnvironmentEnum.DEV?{profile:"http://localhost:8010/v1",football:"http://localhost:8080/v1",idMapping:"http://localhost:8030/v1",predictor:"http://localhost:8040/v1",client:"http://localhost:8070/v1",loyalty:"http://localhost:8060/v1"}[t]:{profile:"https://profile.fansunitedstagingapi.com/v1",football:"https://football.fansunitedstagingapi.com/v1",idMapping:"https://id-mapping.fansunitedstagingapi.com/v1",predictor:"https://prediction.fansunitedstagingapi.com/v1",client:"https://client.fansunitedstagingapi.com/v1",loyalty:"https://loyalty.fansunitedstagingapi.com/v1"}[t]},t.transformIdsToBeUnique=function(e){return e.filter((function(e,t,n){return t===n.indexOf(e)}))},t.isDisabledCache=function(e){return e||!1},t.initDisableCache=function(){return"&disable_cache="+Date.now()},t.sortArrayInAscOrder=function(e){return e.sort((function(e,t){return e.localeCompare(t)}))},t.constructStringArrayWithProvidedLength=function(e,t){for(var n=[],r=0;r<t;r++)n[r]=e;return n}},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:[],expirations:{ids:0}},profile:{info:{},statistics:{},badges:null,countries:[],expirations:{profile:0,statistics:0,badges:0}},client:{features:{},expirations:{features:0}}};t.default=function(e){var t=this;this.idSchema="",this.expirationProfileTimeout=600,this.expirationBadgesTimeout=3600,this.expirationClientFeaturesTimeout=14400,this.expirationFootballIdsTimeout=604800,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.addTopIdMappings=function(e){var n=t.getData();if(n.football.ids.length){var i=JSON.parse(JSON.stringify(n.football.ids));i=i.filter((function(e){return"match"!==e.resource})),e=e.filter((function(e){return"match"===e.resource})),i=r(r([],i,!0),e,!0),n.football.ids=i}else n.football.ids=e;n.football.expirations.ids=Math.floor(Date.now()/1e3)+t.expirationFootballIdsTimeout,t.setData(n)},this.setOwnProfile=function(e){var n=t.getData();n.profile.info=e,n.profile.expirations.profile=Math.floor(Date.now()/1e3)+t.expirationProfileTimeout,t.setData(n)},this.getOwnProfile=function(){return t.getData().profile.info},this.getProfileCountries=function(){return t.getData().profile.countries},this.setProfileCountries=function(e){var n=t.getData();n.profile.countries=e,t.setData(n)},this.getProfileStats=function(){return t.getData().profile.statistics},this.setProfileStats=function(e){var n=t.getData();n.profile.statistics=e,n.profile.expirations.statistics=Math.floor(Date.now()/1e3)+t.expirationProfileTimeout,t.setData(n)},this.getProfileBadges=function(){return t.getData().profile.badges},this.setProfileBadges=function(e){var n=t.getData();n.profile.badges=e,n.profile.expirations.badges=Math.floor(Date.now()/1e3)+t.expirationBadgesTimeout,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=t.getData(),i=r([],n.football.competitions,!0);i.push.apply(i,e),n.football.competitions=t.makeCompetitionsUnique(i),t.setData(n)},this.getCompetitionsLength=function(){return t.getData().football.competitions.length},this.getClientFeatures=function(){return t.getData().client.features},this.setClientFeatures=function(e){var n=t.getData(),r=JSON.parse(JSON.stringify(e));n.client.expirations.features=Math.floor(Date.now()/1e3)+t.expirationClientFeaturesTimeout,n.client.features=r,t.setData(n)},this.getExpiration=function(e,n){t.initialNewSchema(e,"expirations");var r=t.getData();switch(n){case"profile":return r.profile.expirations.profile;case"statistics":return r.profile.expirations.statistics;case"badges":return r.profile.expirations.badges;case"features":return r.client.expirations.features;case"ids":return r.football.expirations.ids}},this.makeCompetitionsUnique=function(e){var t=new Set;return e.filter((function(e){var n=!t.has(e.id);return t.add(e.id),n}))},this.getData=function(){return JSON.parse(localStorage.getItem(s))},this.setData=function(e){localStorage.setItem(s,JSON.stringify(e))},this.initialNewSchema=function(e,n){var r=t.getData();r&&r[e]&&r[e][n]||t.setData(a)},this.idSchema=e.idSchema,void 0!==this.getData()&&null!==this.getData()||this.setData(a)}},5318:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.invalidTypeMessage=t.missingFieldsMessage=t.invalidFieldMessage=t.invalidMarketTopXMessage=t.invalidMarketMessage=t.invalidPredictionMessage=t.WarningMessages=t.ErrorMessages=void 0;var r,i=n(1260);(r=t.ErrorMessages||(t.ErrorMessages={})).LOYALTY_INVALID_TEMPLATE_ID="Provided template ID does NOT exist! Try again with existing template ID.",r.INVALID_MATCH_ID="Match id is invalid!",r.INVALID_PLAYER_ID="Player id is invalid!",r.QUERY_PARAM_MATCH_IDS_EXCEEDED="Maximum matchIds in PredictionFilters should be 10 or less.",r.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED="Maximum limit for filtering games is 50 or less.",r.INVALID_PREDICTION_FIELD="Prediction field is invalid. For more information please visit our documentation",r.INVALID_TOKEN="Invalid JWT token is provided",r.EXPIRED_TOKEN="The provided JWT token is expired",r.ENTITIES_NEEDED="At least one of footballCompetitions, footballTeams or footballPlayers properties should be provided for filters.",r.ENTITIES_FOLLOWS_FILTERS_EXCEEDED="Maximum length per entity should be 10 or less.",t.WarningMessages={UNEXPECTED_STATUS_PROP:"Unexpected provided property 'status'. You can NOT use this property for this method. For more information visit our documentation: \n "+i.documentationLinks.PREDICTOR_USER_RELATED_OPERATION,UNEXPECTED_TYPE_PROP:"Unexpected provided property 'type'. You can NOT use this property for this method. For more information visit our documentation: \n "+i.documentationLinks.PREDICTOR_USER_RELATED_OPERATION},t.invalidPredictionMessage=function(e,t){return"The prediction '"+e+"' is invalid for market '"+t+"'. Please check again have you passed appropriate prediction model. For more information please visit our documentation: https://docs.fansunitedmedia.com/sdks/js/match.quiz#gamerelatedoperations"},t.invalidMarketMessage=function(e){return"The market '"+e+"' is not supported from Fans United. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/predictor-operations#make-football-prediction"},t.invalidMarketTopXMessage=function(e){return"The market '"+e+"' is not valid for Top X game. The only available market is CORRECT_SCORE."},t.invalidFieldMessage=function(e){return"The field/s '"+(e.length>1?e.join(", "):e[0])+"' is/are invalid. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/javascript-sdk"},t.missingFieldsMessage=function(e,t){return"The following field/s is/are missing from "+e+": '"+(t.length>1?t.join(", "):t[0])+"'. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/predictor-operations#make-football-prediction"},t.invalidTypeMessage=function(e,t){return"The field "+e+" has incorrect type. The correct type is "+t}},4800:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.limit=e.limit?e.limit:null,this.startAfter=e.startAfter?e.startAfter:null}return e.prototype.constructMainFiltersUrl=function(){var e="";return this.limit&&(e+="&",e+="limit="+this.limit),this.startAfter&&(e+="&",e+="start_after="+this.startAfter),e},e}();t.default=n},439:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.main=null,this.cover=null,this.mobile=null}},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}}},3483:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.entityId=null,this.entityType=null}},6208:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.axiosError=void 0,t.axiosError=function(e,t,n){var r={data:e.data,status:t,statusText:n,headers:e.headers,config:e};return{code:String(t),config:e,isAxiosError:!0,toJSON:function(){return{}},name:"Unauthorized",message:n,response:r}}},1022:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=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())}))},a=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 o=n(712),u=n(2453),c=function(e){function t(t){var n=e.call(this,t,(0,o.setBaseUrl)(t.environment,"loyalty"))||this;return n.activityRemapper=null,n.createActivity=function(e){return s(n,void 0,void 0,(function(){var t,n,r,i;return a(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),t="/activities"+this.apiSignInUrl,[4,this.instanceAuth.post(t,JSON.stringify(e))];case 1:return n=s.sent(),[2,this.activityRemapper.remapSingleResponse(n.data)];case 2:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with creating activity for user",i),i.response;case 3:return[2]}}))}))},n.deleteActivity=function(e){return s(n,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),t="/activities/"+e+this.apiSignInUrl,[4,this.instanceAuth.delete(t)];case 1:return i.sent(),[2,!0];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem deleting the following activity: "+e,r),r.response;case 3:return[2]}}))}))},n.getOwnActivities=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/activities"+this.apiSignInUrl,r=Date.now(),e&&(n+=""+e.constructFilterUrl()),t&&(n+="disable_cache="+r),[4,this.instanceAuth.get(n)];case 1:return i=a.sent(),[2,this.activityRemapper.remapActivitiesResponse(i.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with fetching own activities",o),o.response;case 3:return[2]}}))}))},n.getActivitiesForUser=function(e,t,r){return s(n,void 0,void 0,(function(){var n,i,s,o,u;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/users/"+e+"/activities"+this.apiSignInUrl,i=Date.now(),t&&(n+=""+t.constructFilterUrl()),r&&(n+="disable_cache="+i),[4,this.instance.get(n)];case 1:return s=a.sent(),[2,this.activityRemapper.remapActivitiesResponse(s.data)];case 2:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem with fetching activities for user "+e,u),u.response;case 3:return[2]}}))}))},n.getStats=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,5,,6]),n="",r=null,e?(n+=(0,o.isDisabledCache)(t)?"/users/"+e+"/statistics"+this.apiSignInUrl+(0,o.initDisableCache)():"/users/"+e+"/statistics"+this.apiSignInUrl,[4,this.instance.get(n)]):[3,2];case 1:return r=a.sent(),[3,4];case 2:return n+="/statistics"+this.apiSignInUrl,[4,this.instanceAuth.get(n)];case 3:r=a.sent(),a.label=4;case 4:return[2,this.activityRemapper.remapStatsReponse(r.data.data)];case 5:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching profile`s statistics:",s),s.response;case 6:return[2]}}))}))},n.activityRemapper=new u.default,n}return i(t,e),t}(n(7724).default);t.default=c},7686:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=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())}))},a=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.FeatureConfigType=void 0;var o,u=n(712),c=n(704),l=n(7724),d=n(5601);(o=t.FeatureConfigType||(t.FeatureConfigType={})).PREDICTOR="predictor",o.TOP_X="topX",o.MATCH_QUIZ="matchQuiz",o.LOYALTY="loyalty";var h=function(e){function t(t){var n=e.call(this,t,(0,u.setBaseUrl)(t.environment,"client"))||this;return n.featureConfigRemapper=null,n.localStorage=null,n.clientId=null,n.getConfig=function(e){return s(n,void 0,void 0,(function(){var t,n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),(t=this.getCachedFeatures())?[3,2]:(n="/clients/"+this.clientId+"/features",r=this.apiSignInUrl.split("&")[0],[4,this.instance.get(""+n+r)]);case 1:i=a.sent(),t=i.data.data,this.localStorage.setClientFeatures(t),a.label=2;case 2:switch(e){case"predictor":return[2,this.featureConfigRemapper.remapPredictorConfig(t.predictor)];case"topX":return[2,this.featureConfigRemapper.remapTopXConfig(t.top_x)];case"matchQuiz":return[2,this.featureConfigRemapper.remapMatchQuizConfig(t.match_quiz)];case"loyalty":return[2,this.featureConfigRemapper.remapLoyaltyConfig(t.loyalty)]}return[3,4];case 3:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching configuration from Client API",o),o.response;case 4:return[2]}}))}))},n.getCachedFeatures=function(){var e=n.getLocalStorageData();if(e&&Object.keys(e).length)return e},n.getLocalStorageData=function(){var e=Math.floor(Date.now()/1e3);return n.localStorage.getExpiration("client","features")>e?n.localStorage.getClientFeatures():null},n.clientId=t.clientId,n.localStorage=new d.default(t),n.featureConfigRemapper=new c.default,n}return i(t,e),t}(l.default);t.default=h},595:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=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())}))},a=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 o=n(712),u=n(3430),c=n(7316),l=n(8758),d=n(5827),h=n(7821),p=n(5284),f=n(9330),m=n(4729),v=n(5157),y=n(7943),g=n(7287),w=n(753),b=n(1925),_=function(e){function t(t){var n=e.call(this,t,(0,o.setBaseUrl)(t.environment,"football"))||this;return n.limitIds=200,n.countryRemapper=null,n.competitionBasicRemapper=null,n.competitionFullRemapper=null,n.teamBasicRemapper=null,n.teamFullRemapper=null,n.matchBasicRemapper=null,n.matchFullRemapper=null,n.playerBasicRemapper=null,n.playerFullRemapper=null,n.topPlayerRemapper=null,n.searchRemapper=null,n.footballMetaRemapper=null,n.getCountries=function(e){return s(n,void 0,void 0,(function(){var t,n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t="/countries"+this.apiSignInUrl,n=Date.now(),e&&(t+="&disable_cache="+n),[4,this.instance.get(t)];case 1:return r=a.sent(),[2,this.countryRemapper.countriesFromResponse(r.data.data)];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem with the football countries request",s),s.response;case 3:return[2]}}))}))},n.getCompetitions=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f=this;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,8,,9]),n={},r=Date.now(),t=t||!1,!(e&&e.competitionIds&&e.competitionIds.length>this.limitIds-1))return[3,5];i=[],s=(0,o.limitIds)(e.competitionIds,this.limitIds),u=0,c=s,a.label=1;case 1:return u<c.length?(l=c[u],e.competitionIds=l,d="/competitions"+this.apiSignInUrl+e.constructFilterUrl(),t&&(d+="&disable_cache="+r),[4,this.instance.get(d)]):[3,4];case 2:n=a.sent(),i.push(n.data.data.map((function(e){return f.competitionBasicRemapper.fromResponse(e)}))),a.label=3;case 3:return u++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return d="/competitions"+this.apiSignInUrl,e&&(d+=""+e.constructFilterUrl()),t&&(d+="&disable_cache="+r),[4,this.instance.get(d)];case 6:return[2,(n=a.sent()).data.data.map((function(e){return f.competitionBasicRemapper.fromResponse(e)}))];case 7:return[3,9];case 8:throw h=a.sent(),p=this.transformAxiosErrorToFansUnitedException(h),console.warn("There was a problem with getCompetitions request",p),p.response;case 9:return[2]}}))}))},n.getCompetitionById=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/competitions/"+e+this.apiSignInUrl,r=Date.now(),t&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.competitionFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getCompetitionById request",o),o.response;case 3:return[2]}}))}))},n.getTopCompetitions=function(e){return s(n,void 0,void 0,(function(){var t,n,r,i,s=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t="/competitions/top"+this.apiSignInUrl,n=Date.now(),e&&(t+="&disable_cache="+n),[4,this.instance.get(t)];case 1:return[2,a.sent().data.data.map((function(e){return s.competitionBasicRemapper.fromResponse(e)}))];case 2:throw r=a.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with getTopCompetitions request",i),i.response;case 3:return[2]}}))}))},n.getTeams=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f,m=this;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,8,,9]),n={},r=Date.now(),!(e&&e.teamIds&&e.teamIds.length>this.limitIds))return[3,5];i=[],s=(0,o.limitIds)(e.teamIds,this.limitIds),u=0,c=s,a.label=1;case 1:return u<c.length?(l=c[u],e.teamIds=l,h="/teams"+this.apiSignInUrl+e.constructFilterUrl(),t&&(h+="disable_cache="+r),[4,this.instance.get(h)]):[3,4];case 2:n=a.sent(),i.push(n.data.data.map((function(e){return m.teamBasicRemapper.fromResponse(e)}))),a.label=3;case 3:return u++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return d=new w.default,h="/teams"+this.apiSignInUrl,e&&(h+=""+e.constructFilterUrl()),t&&(h+="&disable_cache="+r),[4,this.instance.get(h)];case 6:return n=a.sent(),d.meta=this.footballMetaRemapper.remapMetaProp(n.data.meta),d.data=n.data.data.map((function(e){return m.teamBasicRemapper.fromResponse(e)})),[2,d];case 7:return[3,9];case 8:throw p=a.sent(),f=this.transformAxiosErrorToFansUnitedException(p),console.warn("There was a problem with getTeams request",f),f.response;case 9:return[2]}}))}))},n.getTeamById=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/teams/"+e+this.apiSignInUrl,r=Date.now(),t&&(n+="disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.teamFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getTeamById request",o),o.response;case 3:return[2]}}))}))},n.getTopTeams=function(e){return s(n,void 0,void 0,(function(){var t,n,r,i,s,o=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t="/teams/top"+this.apiSignInUrl,n=Date.now(),e&&(t+="$disable_cache="+n),[4,this.instance.get(t)];case 1:return[2,(r=a.sent()).data.data?r.data.data.map((function(e){return o.teamBasicRemapper.fromResponse(e)})):[]];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem with getTopTeams request",s),s.response;case 3:return[2]}}))}))},n.getNextMatchForTeam=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/teams/"+e+"/next-match"+this.apiSignInUrl,r=Date.now(),t&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getNextMatchForTeam request",o),o.response;case 3:return[2]}}))}))},n.getPrevMatchForTeam=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/teams/"+e+"/previous-match"+this.apiSignInUrl,r=Date.now(),t&&(n+="disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getPrevMatchForTeam request",o),o.response;case 3:return[2]}}))}))},n.getPlayers=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f,m=this;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,8,,9]),n={},r=Date.now(),!(e&&e.playerIds&&e.playerIds.length>this.limitIds-1))return[3,5];i=[],s=(0,o.limitIds)(e.playerIds,this.limitIds),u=0,c=s,a.label=1;case 1:return u<c.length?(l=c[u],e.playerIds=l,h="/players"+this.apiSignInUrl+e.constructFilterUrl(),t&&(h+="&disable_cache="+r),[4,this.instance.get(h)]):[3,4];case 2:n=a.sent(),i.push(n.data.data.map((function(e){return m.teamBasicRemapper.fromResponse(e)}))),a.label=3;case 3:return u++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return d=new w.default,h="/players"+this.apiSignInUrl,e&&(h+=""+e.constructFilterUrl()),t&&(h+="&disable_cache="+r),[4,this.instance.get(h)];case 6:return n=a.sent(),d.meta=this.footballMetaRemapper.remapMetaProp(n.data.meta),d.data=n.data.data.map((function(e){return m.playerBasicRemapper.fromResponse(e)})),[2,d];case 7:return[3,9];case 8:throw p=a.sent(),f=this.transformAxiosErrorToFansUnitedException(p),console.warn("There was a problem with getPlayers request",f),f.response;case 9:return[2]}}))}))},n.getPlayerById=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/players/"+e+this.apiSignInUrl,r=Date.now(),t&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.playerFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getPlayerById request",o),o.response;case 3:return[2]}}))}))},n.getTopPlayers=function(e){return s(n,void 0,void 0,(function(){var t,n,r,i,s=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t="/players/top"+this.apiSignInUrl,n=Date.now(),e&&(t+="&disable_cache="+n),[4,this.instance.get(t)];case 1:return[2,a.sent().data.data.map((function(e){return s.topPlayerRemapper.fromResponse(e)}))];case 2:throw r=a.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with getTopPlayers request",i),i.response;case 3:return[2]}}))}))},n.getNextMatchForPlayer=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/players/"+e+"/next-match"+this.apiSignInUrl,r=Date.now(),t&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getNextMatchForPlayer request",o),o.response;case 3:return[2]}}))}))},n.getPrevMatchForPlayer=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/players/"+e+"/previous-match"+this.apiSignInUrl,r=Date.now(),t&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getPrevMatchForPlayer request",o),o.response;case 3:return[2]}}))}))},n.getMatchById=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/matches/"+e+this.apiSignInUrl,r=Date.now(),t&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getMatchById request",o),o.response;case 3:return[2]}}))}))},n.getMatches=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o,u,c=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=new w.default,r="/matches"+this.apiSignInUrl,i=Date.now(),e&&(r+=""+e.constructFilterUrl()),t&&(r+="&disable_cache="+i),[4,this.instance.get(r)];case 1:return s=a.sent(),n.meta=this.footballMetaRemapper.remapMetaProp(s.data.meta),n.data=s.data.data.map((function(e){return c.matchBasicRemapper.fromResponse(e)})),[2,n];case 2:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem with getMatches request",u),u.response;case 3:return[2]}}))}))},n.search=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/search"+this.apiSignInUrl+e.constructFilterUrl(),r=Date.now(),t&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.searchRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with search request",o),o.response;case 3:return[2]}}))}))},n.apiSignInUrl="en"!==t.lang?n.apiSignInUrl+"&lang="+t.lang:n.apiSignInUrl,n.countryRemapper=new u.default,n.competitionBasicRemapper=new c.default,n.competitionFullRemapper=new l.default,n.teamBasicRemapper=new d.default,n.teamFullRemapper=new h.default,n.matchBasicRemapper=new p.default,n.matchFullRemapper=new f.default,n.playerBasicRemapper=new v.default,n.playerFullRemapper=new y.default,n.topPlayerRemapper=new m.default,n.searchRemapper=new g.default,n.footballMetaRemapper=new b.default,n}return i(t,e),t}(n(7724).default);t.default=_},7724:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9669),i=n(6245),s=n(4021),a=n(4904),o=n(2535),u=n(6208),c=n(5318);t.default=function(e,t){var n=this;this.apiSignInUrl=null,this.instanceAuth=null,this.instance=null,this.errorHandlingMode=null,this.transformAxiosErrorToFansUnitedException=function(e){if("standard"===n.errorHandlingMode&&e.response&&e.response.data&&e.response.data.error){var t=e.response.data.error,r=t.code,i=t.status,s=t.message;return new o.default(r,i,s)}return e},this.apiSignInUrl="?key="+e.apiKey+"&client_id="+e.clientId,this.errorHandlingMode=e.errorHandlingMode,this.instanceAuth=r.default.create({baseURL:t,headers:{Authorization:"Bearer "+e.authProvider.getIdToken(),"Content-Type":"application/json"}}),this.instanceAuth.interceptors.request.use((function(t){var l=null;try{l=(0,i.default)(e.authProvider.getIdToken())}catch(e){if("default"===n.errorHandlingMode)throw(0,u.axiosError)(t,401,e.message);if("standard"===n.errorHandlingMode)throw new o.default(s.ErrorCodes.UNAUTHORIZED,a.ErrorStatuses.INVALID_TOKEN,c.ErrorMessages.INVALID_TOKEN)}return Date.now()>l.exp?(r.default.defaults.headers.common.Authorization="Bearer "+e.authProvider.getIdToken(),t.headers.Authorization="Bearer "+e.authProvider.getIdToken(),t):t}),(function(e){Promise.reject(e)})),this.instanceAuth.interceptors.response.use((function(e){return e}),(function(t){var r,i,u,l=t.config;if((403===(null===(r=t.response)||void 0===r?void 0:r.status)||401===(null===(i=t.response)||void 0===i?void 0:i.status))&&!l._retry){l._retry=!0;var d=e.authProvider.getIdToken();return l.headers.Authorization="Bearer "+d,n.instanceAuth(l)}if("standard"===n.errorHandlingMode&&401===(null===(u=t.response)||void 0===u?void 0:u.status)){var h=new o.default(s.ErrorCodes.UNAUTHORIZED,a.ErrorStatuses.UNAUTHORIZED,c.ErrorMessages.EXPIRED_TOKEN);return Promise.reject(h)}return Promise.reject(t)})),this.instance=r.default.create({baseURL:t,headers:{"Content-Type":"application/json"}})}},8539:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=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())}))},a=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 o=n(712),u=n(7724),c={player:"players",team:"teams",homeTeam:"teams",awayTeam:"teams",country:"countries",competition:"competitions",match:"matches"},l=function(e){function t(t){var n=e.call(this,t,(0,o.setBaseUrl)(t.environment,"idMapping"))||this;return n.getEntityById=function(e,r){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+t.idSchema+"&"+c[e]+"="+r)}catch(e){throw console.warn("There was a problem with id mapping request for the following id:"+r,e),e.response}},n.getEntityByIdAndSchema=function(e,t,r){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+r+"&"+c[e]+"="+t)}catch(e){throw console.warn("There was a problem with id mapping request for the following id:"+t,e),e.response}},n.getEntityIdsByIdsAndSchema=function(e,t,r){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+r+"&"+c[e]+"="+t.join(","))}catch(e){throw console.warn("There was a problem with id mapping request for the following ids:"+t.join(","),e),e.response}},n.getEntitiesByIds=function(e,t,r){t.sort((function(e,t){return e.localeCompare(t)}));var i=(0,o.requestChunkBuild)(t).map((function(t){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+r+"&"+c[e]+"="+t.join(","))}catch(e){var i=n.transformAxiosErrorToFansUnitedException(e);throw console.warn("There was a problem with id mapping request for the following ids:"+t.join(","),i),i.response}}));return Promise.all(i).then((function(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.data.data)})),t}))},n.getEntitiesByIdObjs=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,u,l,d,h,p,f;return a(this,(function(m){switch(m.label){case 0:n=[],r={},i=[],Object.keys(e).forEach((function(t){n.push.apply(n,e[t])})),s=(0,o.transformIdsToBeUnique)(n),u=(0,o.requestChunkBuild)(s),l=function(n){var s,o,u,l;return a(this,(function(a){switch(a.label){case 0:if(s="",Object.keys(e).forEach((function(t){r[t]=[];var i=n.filter((function(n){return e[t].includes(n)}));i&&i.length>0&&(r[t]=i)})),Object.keys(r).forEach((function(e){r[e].length>0&&(r[e].sort((function(e,t){return e.localeCompare(t)})),s+="&",s+=c[e]+"="+r[e].join(","))})),!(s&&s.length>0))return[3,5];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,d.instance.get("/football"+d.apiSignInUrl+"&input_provider="+(t||"native")+s)];case 2:return o=a.sent(),i.push(o.data.data),[3,4];case 3:throw u=a.sent(),l=d.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem with id mapping request",l),l.response;case 4:return[3,6];case 5:i.push([]),a.label=6;case 6:return[2]}}))},d=this,h=0,p=u,m.label=1;case 1:return h<p.length?(f=p[h],[5,l(f)]):[3,4];case 2:m.sent(),m.label=3;case 3:return h++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)]}}))}))},n.getTopEntities=function(){return s(n,void 0,void 0,(function(){var e,t;return a(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.instance.get("/football/top"+this.apiSignInUrl)];case 1:return[2,n.sent().data.data];case 2:throw e=n.sent(),t=this.transformAxiosErrorToFansUnitedException(e),console.warn("There was a problem with top id mappings request",t),t.response;case 3:return[2]}}))}))},n.apiSignInUrl=n.apiSignInUrl.split("&")[0],n}return i(t,e),t}(u.default);t.default=l},7059:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=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())}))},a=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 o=n(712),u=n(7419),c=n(4533),l=n(8899),d=n(7746),h=function(e){function t(t){var n=e.call(this,t,(0,o.setBaseUrl)(t.environment,"loyalty"))||this;return n.templateRemapper=null,n.leaderboardRemapper=null,n.rankingsRemapper=null,n.highestSuccessRateRemapper=null,n.getTemplates=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,u;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(e)?"/leaderboard/templates/"+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/templates/"+this.apiSignInUrl,[4,this.instance.get(n)];case 1:return r=a.sent(),t?((i=JSON.parse(JSON.stringify(r.data))).meta=this.templateRemapper.remapMeta(r.data.meta),i.data=this.templateRemapper.remapResponse(r.data.data),[2,i]):[2,this.templateRemapper.remapResponse(r.data.data)];case 2:throw s=a.sent(),u=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the list of templates",u),u.response;case 3:return[2]}}))}))},n.getTemplateById=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(t)?"/leaderboard/templates/"+e+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/templates/"+e+this.apiSignInUrl,[4,this.instance.get(n)];case 1:return r=a.sent(),[2,this.templateRemapper.remapResponse([r.data.data])[0]];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem requesting the following template: "+e,s),s.response;case 3:return[2]}}))}))},n.getLeaderboard=function(e,t,r){return s(n,void 0,void 0,(function(){var n,i,s,u,c;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(t)?"/leaderboard/"+e+"/"+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/"+e+"/"+this.apiSignInUrl,r&&(n+=""+r.constructFiltersUrl()),[4,this.instance.get(n)];case 1:return i=a.sent(),s=JSON.parse(JSON.stringify(i.data)),[2,this.leaderboardRemapper.remapResponse(s)];case 2:throw u=a.sent(),c=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching the leaderboard for the following template: "+e,c),c.response;case 3:return[2]}}))}))},n.getLeaderboardForGame=function(e,t,r){return s(n,void 0,void 0,(function(){var n,i,s,u,c;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(t)?"/leaderboard/games/"+e+"/"+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/games/"+e+"/"+this.apiSignInUrl,r&&(n+=""+r.constructFiltersUrl()),[4,this.instance.get(n)];case 1:return i=a.sent(),s=JSON.parse(JSON.stringify(i.data)),[2,this.leaderboardRemapper.remapResponse(s)];case 2:throw u=a.sent(),c=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching the leaderboard for the following game: "+e,c),c.response;case 3:return[2]}}))}))},n.getUserRankings=function(e,t,r){return s(n,void 0,void 0,(function(){var n,i,s,u;return a(this,(function(a){switch(a.label){case 0:n="/leaderboard/users/"+e+"/rankings/"+this.apiSignInUrl,t&&(n+=""+t.constructFiltersUrl()),(0,o.isDisabledCache)(r)&&(n+=""+(0,o.initDisableCache)()),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return i=a.sent(),[2,this.rankingsRemapper.remapRankings(i.data)];case 3:throw s=a.sent(),u=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the rankings for the following user: "+e,u),u.response;case 4:return[2]}}))}))},n.getHighestSuccessRate=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:n=(0,o.isDisabledCache)(t)?"/statistics/top"+this.apiSignInUrl+(0,o.initDisableCache)():"/statistics/top"+this.apiSignInUrl,e&&(n+="&market="+e),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return r=a.sent(),[2,this.highestSuccessRateRemapper.remapHighestSuccessRate(r.data.data)];case 3:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching highest success rate",s),s.response;case 4:return[2]}}))}))},n.getEntitiesFollows=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i;return a(this,(function(s){switch(s.label){case 0:n=(0,o.isDisabledCache)(t)?"/statistics/follows"+this.apiSignInUrl+(0,o.initDisableCache)():"/statistics/follows"+this.apiSignInUrl,e.footballCompetitions&&(n+="&competitions="+e.footballCompetitions.join(",")),e.footballTeams&&(n+="&teams="+e.footballTeams.join(",")),e.footballPlayers&&(n+="&players="+e.footballPlayers.join(",")),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return[2,s.sent().data.data];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching follows for entities",i),i.response;case 4:return[2]}}))}))},n.templateRemapper=new l.default,n.leaderboardRemapper=new u.default,n.rankingsRemapper=new c.default,n.highestSuccessRateRemapper=new d.default,n}return i(t,e),t}(n(7724).default);t.default=h},2793:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=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())}))},a=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 o=n(2726),u=n(9679),c=n(712),l=n(4780),d=n(1553),h=n(3623),p=function(e){function t(t,n){var r=e.call(this,t,(0,c.setBaseUrl)(t.environment,"predictor"))||this;return r.predictionRemapper=null,r.matchSummaryRemapper=null,r.gamesRemapper=null,r.metaRemapper=null,r.makeFootballPrediction=function(e){return s(r,void 0,void 0,(function(){var t,n,r,i;return a(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),t=this.predictionRemapper.remapRequestBody(e),[4,this.instanceAuth.post("/predictions"+this.apiSignInUrl,JSON.stringify(t))];case 1:return n=s.sent(),[4,this.predictionRemapper.remapResponseObjBody(n.data)];case 2:return[2,s.sent()];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem making POST request: ",i),i.response;case 4:return[2]}}))}))},r.getMatchSummary=function(e,t){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:n=(0,c.isDisabledCache)(t)?"/predictions/summary/"+e+this.apiSignInUrl+(0,c.initDisableCache)():"/predictions/summary/"+e+this.apiSignInUrl,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return r=a.sent(),[2,this.matchSummaryRemapper.remapResponse(r.data)];case 3:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching predictions for match: "+e+" ",s),s.response;case 4:return[2]}}))}))},r.deleteFootballPrediction=function(e){return s(r,void 0,void 0,(function(){var t,n;return a(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instanceAuth.delete("/predictions/"+e+this.apiSignInUrl)];case 1:return r.sent(),[2,!0];case 2:throw t=r.sent(),n=this.transformAxiosErrorToFansUnitedException(t),console.warn("There was a problem deleting your prediction: "+e,n),n.response;case 3:return[2]}}))}))},r.getMyPredictions=function(e){return s(r,void 0,void 0,(function(){var t,n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),t=new d.default,n="/predictions"+this.apiSignInUrl,e&&(n+=""+e.constructFiltersUrl()),[4,this.instanceAuth.get(n)];case 1:return r=a.sent(),t.meta=this.metaRemapper.remapMetaData(r.data.meta),i=t,[4,this.predictionRemapper.remapResponseArrayBody(r.data.data)];case 2:return i.data=a.sent(),[2,t];case 3:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching own predictions",o),o.response;case 4:return[2]}}))}))},r.getMyPredictionsNoRemap=function(e){return s(r,void 0,void 0,(function(){var t,n;return a(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instanceAuth.get("/predictions"+this.apiSignInUrl+e.constructFiltersUrl())];case 1:return[2,r.sent().data];case 2:throw t=r.sent(),n=this.transformAxiosErrorToFansUnitedException(t),console.warn("There was a problem fetching own predictions",n),n.response;case 3:return[2]}}))}))},r.getUserPredictions=function(e,t,n){return s(r,void 0,void 0,(function(){var r,i,s,o,u,l;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),r=new d.default,i=(0,c.isDisabledCache)(t)?"/predictions/users/"+e+this.apiSignInUrl+(0,c.initDisableCache)():"/predictions/users/"+e+this.apiSignInUrl,n&&(i+=""+n.constructFiltersUrl()),[4,this.instance.get(i)];case 1:return s=a.sent(),r.meta=this.metaRemapper.remapMetaData(s.data.meta),o=r,[4,this.predictionRemapper.remapResponseArrayBody(s.data.data)];case 2:return o.data=a.sent(),[2,r];case 3:throw u=a.sent(),l=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching predictions for user: "+e,l),l.response;case 4:return[2]}}))}))},r.getUserPredictionsNoRemap=function(e,t){return s(r,void 0,void 0,(function(){var n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.instance.get("/predictions/users/"+e+this.apiSignInUrl+t.constructFiltersUrl())];case 1:return[2,i.sent().data];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem fetching predictions for user: "+e,r),r.response;case 3:return[2]}}))}))},r.getGames=function(e,t){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,c.isDisabledCache)(t)?"/games/"+this.apiSignInUrl+e.constructFiltersUrl()+(0,c.initDisableCache)():"/games/"+this.apiSignInUrl+e.constructFiltersUrl(),[4,this.instance.get(n)];case 1:return r=a.sent(),[2,this.gamesRemapper.remapPaginatedGames(r.data)];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the games list",s),s.response;case 3:return[2]}}))}))},r.getGameById=function(e,t){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,c.isDisabledCache)(t)?"/games/"+e+this.apiSignInUrl+(0,c.initDisableCache)():"/games/"+e+this.apiSignInUrl,[4,this.instance.get(n)];case 1:return r=a.sent(),[2,this.gamesRemapper.remapGameByIdResponse(r.data)];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the following game: "+e,s),s.response;case 3:return[2]}}))}))},r.getGamePredictions=function(e,t,n){return s(r,void 0,void 0,(function(){var r,i,s,o,u,l;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),r=new d.default,i=(0,c.isDisabledCache)(t)?"/games/"+e+"/predictions"+this.apiSignInUrl+(0,c.initDisableCache)():"/games/"+e+"/predictions"+this.apiSignInUrl,n&&(i+=""+n.constructFiltersUrl()),[4,this.instance.get(i)];case 1:return s=a.sent(),r.meta=this.metaRemapper.remapMetaData(s.data.meta),o=r,[4,this.predictionRemapper.remapResponseArrayBody(s.data.data)];case 2:return o.data=a.sent(),[2,r];case 3:throw u=a.sent(),l=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching the predictions for game: "+e,l),l.response;case 4:return[2]}}))}))},r.getUserGameEditions=function(e,t){return s(r,void 0,void 0,(function(){var n,r,i,s,o,u=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=null,r=(0,c.isDisabledCache)(t)?"/games/"+this.apiSignInUrl+e.constructFiltersUrl()+(0,c.initDisableCache)():"/games/"+this.apiSignInUrl+e.constructFiltersUrl(),[4,this.instance.get(r)];case 1:return(i=a.sent()).data.data.forEach((function(e){"TOP_X"===e.type?n=u.gamesRemapper.remapPaginatedUserTopXEditions(i.data):"MATCH_QUIZ"===e.type&&(n=u.gamesRemapper.remapPaginatedUserMathQuizEditions(i.data))})),[2,n];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the games list",o),o.response;case 3:return[2]}}))}))},r.getGameResults=function(e,t,n){return s(r,void 0,void 0,(function(){var r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),r=(0,c.isDisabledCache)(t)?"/games/"+e+"/results/"+this.apiSignInUrl+(0,c.initDisableCache)():"/games/"+e+"/results/"+this.apiSignInUrl,n&&(r+=""+n.constructMainFiltersUrl()),[4,this.instance.get(r)];case 1:return i=a.sent(),[2,this.gamesRemapper.remapPaginatedGameResults(i.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the results for the following game: "+e,o),o.response;case 3:return[2]}}))}))},r.getMarketResultsForGame=function(e,t){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:n="/games/"+e+"/correct-results/"+this.apiSignInUrl,(0,c.isDisabledCache)(t)&&(n+=""+(0,c.initDisableCache)()),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return r=a.sent(),[2,this.gamesRemapper.remapGameMarketsResults(r.data.data)];case 3:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the markets correct results for the following game: "+e,s),s.response;case 4:return[2]}}))}))},r.getContestWinners=function(e){return s(r,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.instance.get("/winners/"+this.apiSignInUrl+"&contest_id="+e)];case 1:return t=i.sent(),[2,this.gamesRemapper.remapContestWinners(t.data)];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem fetching winners for the following game: "+e,r),r.response;case 3:return[2]}}))}))},r.getPredictionById=function(e){return s(r,void 0,void 0,(function(){var t,n,r,i;return a(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),t="/predictions/"+e+this.apiSignInUrl,[4,this.instanceAuth.get(t)];case 1:return n=s.sent(),[4,this.predictionRemapper.remapResponseArrayBody([n.data.data])];case 2:return[2,s.sent()[0]];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching info for the following prediction: "+e,i),i.response;case 4:return[2]}}))}))},r.predictionRemapper=new o.default(t,n),r.matchSummaryRemapper=new u.default(t,n),r.gamesRemapper=new l.default,r.metaRemapper=new h.default,r}return i(t,e),t}(n(7724).default);t.default=p},4275:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=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())}))},a=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 o=n(712),u=n(441),c=n(8673),l=n(6277),d=n(1712),h=function(e){function t(t){var n=e.call(this,t,(0,o.setBaseUrl)(t.environment,"profile"))||this;return n.profileRemapper=null,n.followingRemapper=null,n.followersRemapper=null,n.lang=null,n.limitIds=100,n.getCountries=function(e){return s(n,void 0,void 0,(function(){var t,n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t="&lang="+this.lang,n="/countries"+this.apiSignInUrl+t,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return[2,a.sent().data.data];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the countries:",s),s.response;case 3:return[2]}}))}))},n.getProfile=function(e){return s(n,void 0,void 0,(function(){var t,n,r,i,s;return a(this,(function(a){switch(a.label){case 0:if(t="/profile"+this.apiSignInUrl,!e)return[3,5];t="/profiles/"+e+this.apiSignInUrl,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(t)];case 2:return r=a.sent(),[2,this.profileRemapper.fullProfileFromResponse(r.data.data)];case 3:throw n=a.sent(),s=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem fetching the following profile: "+e,s),s.response;case 4:return[3,8];case 5:return a.trys.push([5,7,,8]),[4,this.instanceAuth.get(t)];case 6:return r=a.sent(),[2,this.profileRemapper.fullProfileFromResponse(r.data.data)];case 7:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching your profile from API:",s),s.response;case 8:return[2]}}))}))},n.getProfiles=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f,m;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,7,,8]),n=Date.now(),!(e.length>this.limitIds))return[3,5];r=[],i=(0,o.limitIds)(e,this.limitIds),s=0,u=i,a.label=1;case 1:return s<u.length?(c=u[s],l="/profiles"+this.apiSignInUrl+"&profile_ids="+c.join(","),t&&(l+="&disable_cache="+n),[4,this.instance.get(l)]):[3,4];case 2:d=a.sent(),r.push.apply(r,this.profileRemapper.profilesFromResponse(d.data.data)),a.label=3;case 3:return s++,[3,1];case 4:return[2,r];case 5:return h="/profiles"+this.apiSignInUrl+"&profile_ids="+e.join(","),t&&(h+="&disable_cache="+n),[4,this.instance.get(h)];case 6:return p=a.sent(),[2,this.profileRemapper.profilesFromResponse(p.data.data)];case 7:throw f=a.sent(),m=this.transformAxiosErrorToFansUnitedException(f),console.warn("There was a problem fetching the following profiles: "+e.join(","),m),m.response;case 8:return[2]}}))}))},n.getFollowers=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o,u;return a(this,(function(a){switch(a.label){case 0:if(n="/profile/followers"+this.apiSignInUrl,!e||t)return[3,5];n="/profile/followers"+this.apiSignInUrl+e.constructFilterUrl(),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instanceAuth.get(n)];case 2:return s=a.sent(),[2,this.followersRemapper.followersFromResponse(s.data)];case 3:throw r=a.sent(),u=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching the followers for own profile",u),u.response;case 4:return[3,9];case 5:if(e||t)return[3,9];a.label=6;case 6:return a.trys.push([6,8,,9]),[4,this.instanceAuth.get(n)];case 7:return s=a.sent(),[2,this.followersRemapper.followersFromResponse(s.data)];case 8:throw i=a.sent(),u=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the followers for own profile",u),u.response;case 9:e&&t?n="/profile/"+t+"/followers"+this.apiSignInUrl+e.constructFilterUrl():!e&&t&&(n="/profile/"+t+"/followers"+this.apiSignInUrl),a.label=10;case 10:return a.trys.push([10,12,,13]),[4,this.instance.get(n)];case 11:return s=a.sent(),[2,this.followersRemapper.followersFromResponse(s.data)];case 12:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem fetching the followers for profile: "+t,u),u.response;case 13:return[2]}}))}))},n.getFollowing=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o,u;return a(this,(function(a){switch(a.label){case 0:if(n="/profile/following"+this.apiSignInUrl,!e||t)return[3,5];n="/profile/following"+this.apiSignInUrl+e.constructFilterUrl(),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instanceAuth.get(n)];case 2:return s=a.sent(),[2,this.followingRemapper.followingFromResponse(s.data)];case 3:throw r=a.sent(),u=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching the followers of own profile",u),u.response;case 4:return[3,9];case 5:if(e||t)return[3,9];a.label=6;case 6:return a.trys.push([6,8,,9]),[4,this.instanceAuth.get(n)];case 7:return s=a.sent(),[2,this.followingRemapper.followingFromResponse(s.data)];case 8:throw i=a.sent(),u=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the followers of own profile",u),u.response;case 9:e&&t?n="/profile/"+t+"/following"+this.apiSignInUrl+e.constructFilterUrl():!e&&t&&(n="/profile/"+t+"/following"+this.apiSignInUrl),a.label=10;case 10:return a.trys.push([10,12,,13]),[4,this.instance.get(n)];case 11:return s=a.sent(),[2,this.followingRemapper.followingFromResponse(s.data)];case 12:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem fetching the followers of the following profile: "+t,u),u.response;case 13:return[2]}}))}))},n.follow=function(e){return s(n,void 0,void 0,(function(){var t,n,r,i;return a(this,(function(s){switch(s.label){case 0:(t=new d.default).profile_ids=e,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instanceAuth.post("/profile/follow"+this.apiSignInUrl,JSON.stringify(t))];case 2:return n=s.sent(),[2,this.followingRemapper.followResponse(n.data.data)];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with POST request for profiles: "+e.join(",")+" ",i),i.response;case 4:return[2]}}))}))},n.unfollow=function(e){return s(n,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:(t=new d.default).profile_ids=e,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.instanceAuth.delete("/profile/follow"+this.apiSignInUrl,{data:JSON.stringify(t)})];case 2:return i.sent(),[2,!0];case 3:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem with DELETE request for profiles: "+e.join(",")+" ",r),r.response;case 4:return[2]}}))}))},n.getBadges=function(e){return s(n,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:t="/profile/badges"+this.apiSignInUrl,i.label=1;case 1:return i.trys.push([1,5,,6]),e?(t="/profile/"+e+"/badges"+this.apiSignInUrl,[4,this.instance.get(t)]):[3,3];case 2:return[2,i.sent().data.data];case 3:return[4,this.instanceAuth.get(t)];case 4:return[2,i.sent().data.data];case 5:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem with fetching the badges",r),r.response;case 6:return[2]}}))}))},n.updateProfile=function(e){return s(n,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.instanceAuth.patch("/profile"+this.apiSignInUrl,e)];case 1:return t=i.sent(),[2,this.profileRemapper.fullProfileFromResponse(t.data.data)];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem updating the own profile:",r),r.response;case 3:return[2]}}))}))},n.lang=t.lang,n.profileRemapper=new u.default,n.followingRemapper=new c.default,n.followersRemapper=new l.default,n}return i(t,e),t}(n(7724).default);t.default=h},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:return this.isBrowser?[4,this.setTopIdMappings()]:[3,6];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,5]),t=this.localStorage.checkForExistingIdObjs(e,n),r=this.splitForRequestAndExisting(t),[4,this.https.getEntitiesByIdObjs(r.request,n)];case 3:return a=i.sent(),this.localStorage.addIdMappings(a),[2,this.localStorage.getIdsByType(e,n,s)];case 4:return u=i.sent(),console.warn("There was a problem retrieving the entity ids ",u),[2,Promise.resolve([])];case 5:return[3,9];case 6:return i.trys.push([6,8,,9]),[4,this.https.getEntitiesByIdObjs(e,n)];case 7: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 8:return l=i.sent(),console.warn("There was a problem retrieving the entity ids ",l),[2,Promise.resolve([])];case 9: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.setTopIdMappings=function(){return r(t,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return e=Math.floor(Date.now()/1e3),this.localStorage.getExpiration("football","ids")>e?[2,Promise.resolve()]:[4,this.https.getTopEntities()];case 1:return t=n.sent(),this.localStorage.addTopIdMappings(t),[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]=[]),i&&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]&&(t[r]=e.remappedIdsObj[n][e.replaceObjIdsIndex[n]],e.replaceObjIdsIndex[n]=e.replaceObjIdsIndex[n]+1):t[r]&&e.traverse(t[r],r,e.remappedIdsObj)}))}}},7302: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(5936);t.default=function(e){var t=this;this.add=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.activityFacade.add(e,n,s,a)];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.activityFacade.delete(e)];case 1:return[2,t.sent()]}}))}))},this.like=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.activityFacade.like(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.dislike=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.activityFacade.dislike(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.addPageview=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.activityFacade.addPageview(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.addContentConsumed=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.activityFacade.addContentConsumed(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.addShare=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.activityFacade.addShare(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.addComment=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.activityFacade.addComment(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.addClickAd=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.activityFacade.addClickAd(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.addConversion=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.activityFacade.addConversion(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getOwn=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.activityFacade.getOwn(e,n)];case 1:return[2,t.sent()]}}))}))},this.getForUser=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.activityFacade.getForUser(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.activityFacade=new s.default(e)}},1491:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ActionsEnum=void 0,(n=t.ActionsEnum||(t.ActionsEnum={})).LIKE="like",n.DISLIKE="dislike",n.PAGE_VIEW="page_view",n.CONTENT_CONSUMED="content_consumed",n.SHARE="share",n.COMMENT="comment",n.CLICK_AD="click_ad",n.CONVERSION="conversion"},5936: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(1022),o=n(1491),u=n(3255),c=n(4630),l=n(8261);t.default=function(e){var t=this;this.add=function(e,n,a,o){return r(t,void 0,void 0,(function(){var t,r,u,l,d;return i(this,(function(i){switch(i.label){case 0:return this.idSchema==s.IdSchemaEnum.NATIVE?[3,3]:(t=JSON.parse(JSON.stringify(n)),[4,this.activityService.remapTagsIds(n,this.idSchema,s.IdSchemaEnum.NATIVE)]);case 1:return r=i.sent(),u=new c.default(e,r,a,o),[4,this.activityHttps.createActivity(u)];case 2:return(l=i.sent()).context.tags=t,[2,l];case 3:return d=new c.default(e,n,a,o),[2,this.activityHttps.createActivity(d)]}}))}))},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.activityHttps.deleteActivity(e)];case 1:return[2,t.sent()]}}))}))},this.like=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 t=o.ActionsEnum.LIKE,[4,this.add(t,e,n,s)];case 1:return[2,r.sent()]}}))}))},this.dislike=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 t=o.ActionsEnum.DISLIKE,[4,this.add(t,e,n,s)];case 1:return[2,r.sent()]}}))}))},this.addPageview=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 t=o.ActionsEnum.PAGE_VIEW,[4,this.add(t,e,n,s)];case 1:return[2,r.sent()]}}))}))},this.addContentConsumed=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 t=o.ActionsEnum.CONTENT_CONSUMED,[4,this.add(t,e,n,s)];case 1:return[2,r.sent()]}}))}))},this.addShare=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 t=o.ActionsEnum.SHARE,[4,this.add(t,e,n,s)];case 1:return[2,r.sent()]}}))}))},this.addComment=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 t=o.ActionsEnum.COMMENT,[4,this.add(t,e,n,s)];case 1:return[2,r.sent()]}}))}))},this.addClickAd=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 t=o.ActionsEnum.CLICK_AD,[4,this.add(t,e,n,s)];case 1:return[2,r.sent()]}}))}))},this.addConversion=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 t=o.ActionsEnum.CONVERSION,[4,this.add(t,e,n,s)];case 1:return[2,r.sent()]}}))}))},this.getOwn=function(e,n){return r(t,void 0,void 0,(function(){var t,r,a,o;return i(this,(function(i){switch(i.label){case 0:return n=n||!1,e&&(e=new u.default(e)),this.idSchema==s.IdSchemaEnum.NATIVE?[3,6]:[4,this.activityHttps.getOwnActivities(e,n)];case 1:t=i.sent(),r=0,a=t.data,i.label=2;case 2:return r<a.length?(o=a[r],[4,this.activityService.remapTagsIds(o.context.tags,s.IdSchemaEnum.NATIVE,this.idSchema)]):[3,5];case 3:i.sent(),i.label=4;case 4:return r++,[3,2];case 5:return[2,t];case 6:return[4,this.activityHttps.getOwnActivities(e,n)];case 7:return[2,i.sent()]}}))}))},this.getForUser=function(e,n,a){return r(t,void 0,void 0,(function(){var t,r,o,c;return i(this,(function(i){switch(i.label){case 0:return a=a||!1,n&&(n=new u.default(n)),this.idSchema==s.IdSchemaEnum.NATIVE?[3,6]:[4,this.activityHttps.getActivitiesForUser(e,n,a)];case 1:t=i.sent(),r=0,o=t.data,i.label=2;case 2:return r<o.length?(c=o[r],[4,this.activityService.remapTagsIds(c.context.tags,s.IdSchemaEnum.NATIVE,this.idSchema)]):[3,5];case 3:i.sent(),i.label=4;case 4:return r++,[3,2];case 5:return[2,t];case 6:return[4,this.activityHttps.getActivitiesForUser(e,n,a)];case 7:return[2,i.sent()]}}))}))},this.idSchema=e.idSchema,this.activityHttps=new a.default(e),this.activityService=new l.default(e)}},3255:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=this;this.action=null,this.page=null,this.limit=null,this.constructFilterUrl=function(){var e="";return t.action&&(e+="&",e+="action="+t.action),t.page&&(e+="&",e+="page="+t.page),t.limit&&(e+="&",e+="limit="+t.limit),e},this.action=e.action?e.action:null,this.page=e.page?e.page:null,this.limit=e.limit?e.limit:null}},1517:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2820);t.default=function(){this.id=null,this.profileId=null,this.action=null,this.context=new r.default,this.points=0}},6021:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3569),i=n(1517);t.default=function(){this.meta=new r.default,this.data=[new i.default]}},2820:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.content=null,this.tags=[],this.campaign=null}},4630:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2820);t.default=function(e,t,n,i){this.action=null,this.context=new r.default,this.action=e,this.context.tags=t,n&&(this.context.content=n),i&&(this.context.campaign=i)}},2453:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(7974),s=n(1316),a=n(9826),o=n(1517),u=n(6021);t.default=function(){var e=this;this.remapSingleResponse=function(e){var t=new o.default;return t.id=e.id,t.profileId=e.profile_id,t.action=e.action,t.context.content=e.context.content,t.context.tags=e.context.tags,t.context.campaign=e.context.campaign,t.points=e.points,t},this.remapActivitiesResponse=function(t){var n=new u.default;return n.meta.pagination.currentPage=t.meta.pagination.current_page,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.meta.pagination.numberOfPages=t.meta.pagination.number_of_pages,n.meta.pagination.totalItems=t.meta.pagination.total_items,n.data=t.data.map((function(t){return e.remapSingleResponse(t)})),n},this.remapStatsReponse=function(t){var n=new s.default;return n.profileId=t.profile_id,n.tier=t.tier,n.points=t.points,n.successRates.overallPercent=t.success_rates.overall_percent,n.successRates.byFootballCompetition=e.constructNewRecord(t.success_rates.by_competition),n.successRates.byFootballTeam=e.constructNewRecord(t.success_rates.by_team),n.successRates.byFootballMarket=e.constructNewRecord(t.success_rates.by_market),n},this.constructNewRecord=function(t){var n;return Object.entries(t).length?(Object.entries(t).forEach((function(t){var s,a=t[0],o=t[1];n=r(r({},n),((s={})[a]=e.remapSuccessRatePercent(o),s)),i.MarketEnum[a]&&delete n[a].model})),n):t},this.remapSuccessRatePercent=function(e){var t=new a.default;return t.successRatePercent=e.success_rate_percent,t}}},8261: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);t.default=function(e){var t=this;this.remapTagsIds=function(e,n,s){return r(t,void 0,void 0,(function(){var t,r,a,o,u,c,l,d,h,p;return i(this,(function(i){switch(i.label){case 0:return e&&e.length?(t={},r={},a=[],e.forEach((function(e){t.hasOwnProperty(e.type)||(t[e.type]=[],r[e.type]=[]),t[e.type].push(e.id),r[e.type].push(e)})),[4,this.idMapping.idMappingFacade.getEntitiesByIds(t,n,s)]):[2,e];case 1:for(o=i.sent(),u=function(e,t){t.forEach((function(t,n){t.id=o[e][n],a.push(t)}))},c=0,l=Object.entries(r);c<l.length;c++)d=l[c],h=d[0],p=d[1],u(h,p);return[2,a]}}))}))},this.idSchema=e.idSchema,this.idMapping=new s.default(e)}},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,t){return r(a,void 0,void 0,(function(){var n,r,a,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,8,,9]),n=!1,e?(e=new s.default(e)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([""+e.countryId],"country","native")]:[3,2]:[3,5];case 1:0===(r=i.sent()).country.length&&(n=!0),e.countryId=r.country[0],i.label=2;case 2:return e.competitionIds?[4,this.idMapping.getEntityIdsBySchemaId(e.competitionIds,"competition","native")]:[3,4];case 3:0===(a=i.sent()).competition.length&&(n=!0),e.competitionIds=a.competition,i.label=4;case 4:if(n)return[2,[]];i.label=5;case 5:return[4,this.getCompetitions(e,t)];case 6:return o=i.sent(),[4,this.idMapping.remapEntities(o,"competition")];case 7:return[2,i.sent()];case 8:throw u=i.sent(),console.warn("There was a problem browsing all of the competitions",u),u;case 9:return[2]}}))}))},this.getCompetitionsMapWithNativeIds=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 t=new Map,n=e.length,r=new s.default({competitionIds:e,limit:n}),[4,this.getCompetitions(r)];case 1:return(a=i.sent()).sort((function(e,t){return e.id.localeCompare(t.id)})),[4,this.idMapping.remapEntities(a,"competition")];case 2:return o=i.sent(),e.forEach((function(e,n){return t.set(e,o[n])})),[2,t]}}))}))},this.getCompetitions=function(e,t){return r(a,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:if(n=null,t=t||!1,!this.isBrowser)return[3,6];if(this.localStorage.getCompetitionsLength())return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.https.getCompetitions()];case 2:return n=i.sent(),[3,4];case 3:throw r=i.sent(),console.warn("There was a problem retrieving all competitions",r),r;case 4:this.localStorage.setCompetitions(n),i.label=5;case 5:return[2,this.localStorage.getCompetitions(e)];case 6:return[2,this.https.getCompetitions(e,t)]}}))}))},this.getCompetitionByIdIdMapping=function(e,t){return r(a,void 0,void 0,(function(){var n,r,s,a;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 n=i.sent(),r=n.competition[0],[4,this.getCompetitionById(r,t)];case 2:return s=i.sent(),[4,this.idMapping.remapEntities(s,"competition")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the following competition:"+e,a),a;case 5:return[2]}}))}))},this.getCompetitionById=function(e,t){return r(a,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=t||!1,[4,this.https.getCompetitionById(e,t)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the competition with the following id: "+e,n),n;case 3:return[2]}}))}))},this.getTopCompetitionsIdMapping=function(e){return r(a,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopCompetitions(e)];case 1:return t=r.sent(),[4,this.idMapping.remapEntities(t,"competition")];case 2:return[2,r.sent()];case 3:throw n=r.sent(),console.warn("There was a problem browsing the top competitions",n),n;case 4:return[2]}}))}))},this.getTopCompetitions=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]),e=e||!1,[4,this.https.getTopCompetitions(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the top competitions",t),t;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(e){return n(s,void 0,void 0,(function(){var t,n;return r(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getCountries(e)];case 1:return t=r.sent(),[2,this.idMapping.remapEntities(t,"country")];case 2:throw n=r.sent(),console.warn("There was a problem browsing countries as football entities",n),n;case 3:return[2]}}))}))},this.getCountries=function(e){return n(s,void 0,void 0,(function(){var t,n,i;return r(this,(function(r){switch(r.label){case 0:return e=e||!1,this.isBrowser?(t=this.localStorage.getFootballCountries())&&t.length>0?[2,t]:[3,1]:[3,5];case 1:return r.trys.push([1,3,,4]),[4,this.https.getCountries(e)];case 2:return n=r.sent(),this.localStorage.setFootballCountries(n),[2,n];case 3:throw i=r.sent(),console.warn("There was a problem retrieving countries as football entities",i),i;case 4:return[3,6];case 5:return[2,this.https.getCountries(e)];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,d){var h=this;this.countriesFacade=null,this.competitionsFacade=null,this.teamsFacade=null,this.playerFacade=null,this.matchFacade=null,this.searchFacade=null,this.getCountries=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.countriesFacade.getCountriesWithIdMapping(e)]}))}))},this.getCompetitions=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.competitionsFacade.getCompetitionsIdMapping(e,t)]}))}))},this.getCompetitionById=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.competitionsFacade.getCompetitionByIdIdMapping(e,t)]}))}))},this.getTopCompetitions=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.competitionsFacade.getTopCompetitionsIdMapping(e)]}))}))},this.getCompetitionsMapWithNativeIds=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.competitionsFacade.getCompetitionsMapWithNativeIds(e)];case 1:return[2,t.sent()]}}))}))},this.getTeams=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getTeamsIdMapping(e,t)]}))}))},this.getTeamById=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getTeamByIdIdMapping(e,t)]}))}))},this.getTopTeams=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.teamsFacade.getTopTeamsIdMapping(e)]}))}))},this.getNextMatchForTeam=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getNextMatchForTeamIdMapping(e,t)]}))}))},this.getPrevMatchForTeam=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getPrevMatchForTeamIdMapping(e,t)]}))}))},this.getTeamsMapWithNativeIds=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.teamsFacade.getTeamsMapWithNativeIds(e)];case 1:return[2,t.sent()]}}))}))},this.getPlayers=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPlayersIdMapping(e,t)]}))}))},this.getPlayerById=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPlayerIdMapping(e,t)]}))}))},this.getTopPlayers=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.playerFacade.getTopPlayersIdMapping(e)]}))}))},this.getNextMatchForPlayer=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getNextMatchForPlayerIdMapping(e,t)]}))}))},this.getPrevMatchForPlayer=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPrevMatchForPlayerIdMapping(e,t)]}))}))},this.getPlayersMapWithNativeIds=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.playerFacade.getPlayersMapWithNativeIds(e)]}))}))},this.getMatches=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.matchFacade.getMatchesIdMapping(e,t)]}))}))},this.getMatchById=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.matchFacade.getMatchIdMapping(e,t)]}))}))},this.search=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.searchFacade.searchIdMapping(e,t)]}))}))},this.countriesFacade=new s.default(t,n,d),this.competitionsFacade=new a.default(t,n,d),this.teamsFacade=new o.default(e,n,d),this.playerFacade=new u.default(e,n,d),this.matchFacade=new c.default(e,n,d),this.searchFacade=new l.default(n,d)}},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])}}},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(712),o=n(6134),u=n(9582);t.default=function(e,t,n){var c=this;this.https=null,this.idMapping=null,this.footballService=null,this.getMatchesIdMapping=function(e,t){return r(c,void 0,void 0,(function(){var n,r,a,u,c,l,d,h;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,12,,13]),e?(e=new o.default(e)).countryIds?[4,this.idMapping.getEntityIdsBySchemaId(e.countryIds,"country","native")]:[3,2]:[3,8];case 1:n=i.sent(),e.countryIds=n.country,i.label=2;case 2:return e.competitionIds?[4,this.idMapping.getEntityIdsBySchemaId(e.competitionIds,"competition","native")]:[3,4];case 3:r=i.sent(),e.competitionIds=r.competition,i.label=4;case 4:return e.matchIds?[4,this.idMapping.getEntityIdsBySchemaId(e.matchIds,"match","native")]:[3,6];case 5:a=i.sent(),e.matchIds=a.match,i.label=6;case 6:return e.teamIds?[4,this.idMapping.getEntityIdsBySchemaId(e.teamIds,"team","native")]:[3,8];case 7:u=i.sent(),e.teamIds=u.team,i.label=8;case 8:return[4,this.getMatches(e,t)];case 9:return c=i.sent(),l=c,[4,this.footballService.setAvailableMarketsForMatch(s([],c.data,!0))];case 10:return l.data=i.sent(),d=c,[4,this.idMapping.remapEntities(c.data,"match")];case 11:return d.data=i.sent(),[2,c];case 12:throw h=i.sent(),console.warn("There was a problem browsing the matches",h),h;case 13:return[2]}}))}))},this.getMatchesWithNativeIds=function(e){return r(c,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return t=e.length,n=new o.default({matchIds:e,limit:t}),[4,this.getMatches(n)];case 1:return(r=i.sent()).data.sort((function(e,t){return e.id.localeCompare(t.id)})),[4,this.idMapping.remapEntities(r.data,"match")];case 2:return[2,i.sent()]}}))}))},this.getMatchesMapWithNativeIds=function(e){return r(c,void 0,void 0,(function(){var t,n,r,s,u,c;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.getMatchesWithNativeIds(n)];case 1:return r=i.sent(),n.length===r.length?[3,3]:(s=new o.default({matchIds:n,limit:n.length}),[4,this.getMatches(s)]);case 2:u=i.sent(),c=n.filter((function(e){if(u.data.every((function(t){return t.id!==e})))return e})),n=n.filter((function(e){if(!c.includes(e))return e})),i.label=3;case 3:return n.forEach((function(e,n){return t[e]=r[n]})),[2,t]}}))}))},this.getMatches=function(e,t){return r(c,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=t||!1,[4,this.https.getMatches(e,t)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the matches",n),n;case 3:return[2]}}))}))},this.getMatchIdMapping=function(e,t){return r(c,void 0,void 0,(function(){var n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,5,,6]),[4,this.idMapping.getEntityIdsBySchemaId([e],"match","native")];case 1:return n=i.sent(),[4,this.getMatchById(n.match[0],t)];case 2:return r=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(r)];case 3:return s=i.sent(),[4,this.idMapping.remapEntities(s,"match")];case 4:return[2,i.sent()];case 5:throw a=i.sent(),console.warn("There was a problem browsing the following match: "+e,a),a;case 6:return[2]}}))}))},this.getMatchById=function(e,t){return r(c,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=t||!1,[4,this.https.getMatchById(e,t)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following match: "+e,n),n;case 3:return[2]}}))}))},this.https=t,this.idMapping=n,this.footballService=new u.default(e)}},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),o=n(9582);t.default=function(e,t,n){var u=this;this.https=null,this.footballService=null,this.idMapping=null,this.getPlayersIdMapping=function(e,t){return r(u,void 0,void 0,(function(){var n,r,a,o,u,c,l;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,10,,11]),n=!1,e?(e=new s.default(e)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([e.countryId],"country","native")]:[3,2]:[3,7];case 1:0===(r=i.sent()).country.length&&(n=!0),e.countryId=r.country[0],i.label=2;case 2:return e.playerIds?[4,this.idMapping.getEntityIdsBySchemaId(e.playerIds,"player","native")]:[3,4];case 3:0===(a=i.sent()).player.length&&(n=!0),e.playerIds=a.player,i.label=4;case 4:return e.scope?[4,this.idMapping.getEntityIdsBySchemaId(e.scope,"competition","native")]:[3,6];case 5:0===(o=i.sent()).competition.length&&(n=!0),e.scope=o.competition,i.label=6;case 6:if(n)return[2,[]];i.label=7;case 7:return[4,this.getPlayers(e,t)];case 8:return u=i.sent(),c=u,[4,this.idMapping.remapEntities(u.data,"player")];case 9:return c.data=i.sent(),[2,u];case 10:throw l=i.sent(),console.warn("There was a problem browsing the players",l),l;case 11:return[2]}}))}))},this.getPlayersWithNativeIds=function(e){return r(u,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return t=e.length,n=new s.default({playerIds:e,limit:t}),[4,this.getPlayers(n)];case 1:return(r=i.sent()).data.sort((function(e,t){return e.id.localeCompare(t.id)})),[4,this.idMapping.remapEntities(r.data,"player")];case 2:return[2,i.sent()]}}))}))},this.getPlayersMapWithNativeIds=function(e){return r(u,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,t){return r(u,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=t||!1,[4,this.https.getPlayers(e,t)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the players",n),n;case 3:return[2]}}))}))},this.getPlayerIdMapping=function(e,t){return r(u,void 0,void 0,(function(){var 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],"player","native")];case 1:return n=i.sent(),[4,this.getPlayerById(n.player[0],t)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"player")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the following player:"+e,s),s;case 5:return[2]}}))}))},this.getPlayerById=function(e,t){return r(u,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=t||!1,[4,this.https.getPlayerById(e,t)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following player: "+e,n),n;case 3:return[2]}}))}))},this.getTopPlayersIdMapping=function(e){return r(u,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopPlayers(e)];case 1:return t=r.sent(),[4,this.idMapping.remapEntities(t,"player")];case 2:return[2,r.sent()];case 3:throw n=r.sent(),console.warn("There was a problem browsing the top players",n),n;case 4:return[2]}}))}))},this.getTopPlayers=function(e){return r(u,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),e=e||!1,[4,this.https.getTopPlayers(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the top players",t),t;case 3:return[2]}}))}))},this.getNextMatchForPlayerIdMapping=function(e,t){return r(u,void 0,void 0,(function(){var 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],"player","native")];case 1:return n=i.sent(),e=n.player[0],[4,this.getNextMatchForPlayer(e,t)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the next match for player:"+e,s),s;case 5:return[2]}}))}))},this.getNextMatchForPlayer=function(e,t){return r(u,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t=t||!1,[4,this.https.getNextMatchForPlayer(e,t)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the next match for player: "+e,r),r;case 4:return[2]}}))}))},this.getPrevMatchForPlayerIdMapping=function(e,t){return r(u,void 0,void 0,(function(){var 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],"player","native")];case 1:return n=i.sent(),e=n.player[0],[4,this.getPrevMatchForPlayer(e,t)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the previous match for player:"+e,s),s;case 5:return[2]}}))}))},this.getPrevMatchForPlayer=function(e,t){return r(u,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t=t||!1,[4,this.https.getPrevMatchForPlayer(e,t)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the previous match for player: "+e,r),r;case 4:return[2]}}))}))},this.idMapping=n,this.https=t,this.footballService=new o.default(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,t){return r(n,void 0,void 0,(function(){var n,r,a,o,u,c;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:n=i.sent(),e.scope=n.competition,i.label=2;case 2:return[4,this.search(e,t)];case 3:return(r=i.sent()).teams&&r.teams.length>0?[4,this.idMapping.remapEntities(r.teams,"team")]:[3,5];case 4:a=i.sent(),r.teams=a,i.label=5;case 5:return r.players&&r.players.length>0?[4,this.idMapping.remapEntities(r.players,"player")]:[3,7];case 6:o=i.sent(),r.players=o,i.label=7;case 7:return r.competitions&&r.competitions.length>0?[4,this.idMapping.remapEntities(r.competitions,"competition")]:[3,9];case 8:u=i.sent(),r.competitions=u,i.label=9;case 9:return[2,r];case 10:throw c=i.sent(),console.warn("There was a problem with browsing the search result",c),c;case 11:return[2]}}))}))},this.search=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.https.search(e,t)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the search response",n),n;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),a=n(9582);t.default=function(e,t,n){var o=this;this.footballService=null,this.https=null,this.idMapping=null,this.getTeamsIdMapping=function(e,t){return r(o,void 0,void 0,(function(){var n,r,a,o,u,c,l;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,9,,10]),n=!1,e?(e=new s.default(e)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([""+e.countryId],"country","native")]:[3,2]:[3,6];case 1:0===(r=i.sent()).country.length&&(n=!0),e.countryId=r.country[0],i.label=2;case 2:return e.scope?[4,this.idMapping.getEntityIdsBySchemaId(e.scope,"competition","native")]:[3,4];case 3:0===(a=i.sent()).competition.length&&(n=!0),e.scope=a.competition,i.label=4;case 4:return e.teamIds?[4,this.idMapping.getEntityIdsBySchemaId(e.teamIds,"team","native")]:[3,6];case 5:0===(o=i.sent()).team.length&&(n=!0),e.teamIds=o.team,i.label=6;case 6:return n?[2,[]]:[4,this.getTeams(e,t)];case 7:return u=i.sent(),c=u,[4,this.idMapping.remapEntities(u.data,"team")];case 8:return c.data=i.sent(),[2,u];case 9:throw l=i.sent(),console.warn("There was a problem browsing all teams",l),l;case 10:return[2]}}))}))},this.getTeamsMapWithNativeIds=function(e){return r(o,void 0,void 0,(function(){var t,n,r,a,o;return i(this,(function(i){switch(i.label){case 0:return t=new Map,n=e.length,r=new s.default({teamIds:e,limit:n}),[4,this.getTeams(r)];case 1:return(a=i.sent().data).sort((function(e,t){return e.id.localeCompare(t.id)})),[4,this.idMapping.remapEntities(a,"team")];case 2:return o=i.sent(),e.forEach((function(e,n){return t.set(e,o[n])})),[2,t]}}))}))},this.getTeams=function(e,t){return r(o,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=t||!1,[4,this.https.getTeams(e,t)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving all teams",n),n;case 3:return[2]}}))}))},this.getTeamByIdIdMapping=function(e,t){return r(o,void 0,void 0,(function(){var 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],"team","native")];case 1:return n=i.sent(),e=n.team[0],[4,this.getTeamById(e,t)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"team")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the following team:"+e,s),s;case 5:return[2]}}))}))},this.getTeamById=function(e,t){return r(o,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=t||!1,[4,this.https.getTeamById(e,t)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following team: "+e,n),n;case 3:return[2]}}))}))},this.getTopTeamsIdMapping=function(e){return r(o,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopTeams(e)];case 1:return t=r.sent(),[4,this.idMapping.remapEntities(t,"team")];case 2:return[2,r.sent()];case 3:throw n=r.sent(),console.warn("There was a problem browsing the top teams",n),n;case 4:return[2]}}))}))},this.getTopTeams=function(e){return r(o,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),e=e||!1,[4,this.https.getTopTeams(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the top teams",t),t;case 3:return[2]}}))}))},this.getNextMatchForTeamIdMapping=function(e,t){return r(o,void 0,void 0,(function(){var 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],"team","native")];case 1:return n=i.sent(),e=n.team[0],[4,this.getNextMatchForTeam(e,t)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the next match for the following team:"+e,s),s;case 5:return[2]}}))}))},this.getNextMatchForTeam=function(e,t){return r(o,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t=t||!1,[4,this.https.getNextMatchForTeam(e,t)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the next match for the following team: "+e,r),r;case 4:return[2]}}))}))},this.getPrevMatchForTeamIdMapping=function(e,t){return r(o,void 0,void 0,(function(){var 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],"team","native")];case 1:return n=i.sent(),e=n.team[0],[4,this.getPrevMatchForTeam(e,t)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the previous match for the following team:"+e,s),s;case 5:return[2]}}))}))},this.getPrevMatchForTeam=function(e,t){return r(o,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t=t||!1,[4,this.https.getPrevMatchForTeam(e,t)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the previous match for the following team: "+e,r),r;case 4:return[2]}}))}))},this.idMapping=n,this.https=t,this.footballService=new a.default(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(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getCountries(e)];case 1:return[2,t.sent()]}}))}))},this.getCompetitions=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getCompetitions(e,n)];case 1:return[2,t.sent()]}}))}))},this.getCompetitionById=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getCompetitionById(e,n)];case 1:return[2,t.sent()]}}))}))},this.getTopCompetitions=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getTopCompetitions(e)];case 1:return[2,t.sent()]}}))}))},this.getTeams=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getTeams(e,n)];case 1:return[2,t.sent()]}}))}))},this.getTeamById=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getTeamById(e,n)];case 1:return[2,t.sent()]}}))}))},this.getTopTeams=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getTopTeams(e)];case 1:return[2,t.sent()]}}))}))},this.getNextMatchForTeam=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getNextMatchForTeam(e,n)];case 1:return[2,t.sent()]}}))}))},this.getPrevMatchForTeam=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getPrevMatchForTeam(e,n)];case 1:return[2,t.sent()]}}))}))},this.getPlayers=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getPlayers(e,n)];case 1:return[2,t.sent()]}}))}))},this.getPlayerById=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getPlayerById(e,n)];case 1:return[2,t.sent()]}}))}))},this.getTopPlayers=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getTopPlayers(e)];case 1:return[2,t.sent()]}}))}))},this.getNextMatchForPlayer=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getNextMatchForPlayer(e,n)];case 1:return[2,t.sent()]}}))}))},this.getPrevMatchForPlayer=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getPrevMatchForPlayer(e,n)];case 1:return[2,t.sent()]}}))}))},this.getMatches=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getMatches(e,n)];case 1:return[2,t.sent()]}}))}))},this.getMatchById=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getMatchById(e,n)];case 1:return[2,t.sent()]}}))}))},this.search=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.search(e,n)];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(e,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)})):"country"===t.sortField?n=e.sort((function(e,n){return t.sortOrder&&"desc"===t.sortOrder?n.country.name.localeCompare(e.country.name):e.country.name.localeCompare(n.country.name)})):"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.availableMarkets=null,this.homeTeam=null,this.awayTeam=null,this.isDeleted=!1,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,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6899);t.default=function(){this.id="",this.kickoffAt="",this.finishedAt="",this.updatedAt="",this.availableMarkets=null,this.isDeleted=!1,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=new r.default,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.isDeleted=e.is_deleted,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),d=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.isDeleted=e.is_deleted,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=d},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.cornersFirstHalf=null,this.cornersSecondHalf=null,this.cornersExtraTime=null,this.crosses=null,this.crossesFirstHalf=null,this.crossesSecondHalf=null,this.crossesExtraTime=null,this.offside=null,this.offsideFirstHalf=null,this.offsideSecondHalf=null,this.offsideExtraTime=null,this.shotsOn=null,this.shotsOnFirstHalf=null,this.shotsOnSecondHalf=null,this.shotsOnExtraTime=null,this.throwIn=null,this.throwInFirstHalf=null,this.throwInSecondHalf=null,this.throwInExtraTime=null,this.redCards=null,this.redCardsFirstHalf=null,this.redCardsSecondHalf=null,this.redCardsExtraTime=null,this.shotsOff=null,this.shotsOffFirstHalf=null,this.shotsOffSecondHalf=null,this.shotsOffExtraTime=null,this.goalKicks=null,this.goalKicksFirstHalf=null,this.goalKicksSecondHalf=null,this.goalKicksExtraTime=null,this.possession=null,this.possessionFirstHalf=null,this.possessionSecondHalf=null,this.possessionExtraTime=null,this.treatments=null,this.treatmentsFirstHalf=null,this.treatmentsSecondHalf=null,this.treatmentsExtraTime=null,this.yellowCards=null,this.yellowCardsFirstHalf=null,this.yellowCardsSecondHalf=null,this.yellowCardsExtraTime=null,this.shotsBlocked=null,this.shotsBlockedFirstHalf=null,this.shotsBlockedSecondHalf=null,this.shotsBlockedExtraTime=null,this.substitutions=null,this.substitutionsFirstHalf=null,this.substitutionsSecondHalf=null,this.substitutionsExtraTime=null,this.counterAttacks=null,this.counterAttacksFirstHalf=null,this.counterAttacksSecondHalf=null,this.counterAttacksExtraTime=null,this.foulsCommitted=null,this.foulsCommittedFirstHalf=null,this.foulsCommittedSecondHalf=null,this.foulsCommittedExtraTime=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.cornersFirstHalf=this.statEntityFromResponse(e.corners_1h),t.cornersSecondHalf=this.statEntityFromResponse(e.corners_2h),t.cornersExtraTime=this.statEntityFromResponse(e.corners_et),t.crosses=this.statEntityFromResponse(e.crosses),t.crossesFirstHalf=this.statEntityFromResponse(e.crosses_1h),t.crossesSecondHalf=this.statEntityFromResponse(e.crosses_2h),t.crossesExtraTime=this.statEntityFromResponse(e.crosses_et),t.offside=this.statEntityFromResponse(e.offside),t.offsideFirstHalf=this.statEntityFromResponse(e.offside_1h),t.offsideSecondHalf=this.statEntityFromResponse(e.offside_2h),t.offsideExtraTime=this.statEntityFromResponse(e.offside_et),t.shotsOn=this.statEntityFromResponse(e.shots_on),t.shotsOnFirstHalf=this.statEntityFromResponse(e.shots_on_1h),t.shotsOnSecondHalf=this.statEntityFromResponse(e.shots_on_2h),t.shotsOnExtraTime=this.statEntityFromResponse(e.shots_on_et),t.throwIn=this.statEntityFromResponse(e.throw_in),t.throwInFirstHalf=this.statEntityFromResponse(e.throw_in_1h),t.throwInSecondHalf=this.statEntityFromResponse(e.throw_in_2h),t.throwInExtraTime=this.statEntityFromResponse(e.throw_in_et),t.redCards=this.statEntityFromResponse(e.red_cards),t.redCardsFirstHalf=this.statEntityFromResponse(e.red_cards_1h),t.redCardsSecondHalf=this.statEntityFromResponse(e.red_cards_2h),t.redCardsExtraTime=this.statEntityFromResponse(e.red_cards_et),t.shotsOff=this.statEntityFromResponse(e.shots_off),t.shotsOffFirstHalf=this.statEntityFromResponse(e.shots_off_1h),t.shotsOffSecondHalf=this.statEntityFromResponse(e.shots_off_2h),t.shotsOffExtraTime=this.statEntityFromResponse(e.shots_off_et),t.goalKicks=this.statEntityFromResponse(e.goal_kicks),t.goalKicksFirstHalf=this.statEntityFromResponse(e.goal_kicks_1h),t.goalKicksSecondHalf=this.statEntityFromResponse(e.goal_kicks_2h),t.goalKicksExtraTime=this.statEntityFromResponse(e.goal_kicks_et),t.possession=this.statEntityFromResponse(e.possession),t.possessionFirstHalf=this.statEntityFromResponse(e.possession_1h),t.possessionSecondHalf=this.statEntityFromResponse(e.possession_2h),t.possessionExtraTime=this.statEntityFromResponse(e.possession_et),t.treatments=this.statEntityFromResponse(e.treatments),t.treatmentsFirstHalf=this.statEntityFromResponse(e.treatments_1h),t.treatmentsSecondHalf=this.statEntityFromResponse(e.treatments_2h),t.treatmentsExtraTime=this.statEntityFromResponse(e.treatments_et),t.yellowCards=this.statEntityFromResponse(e.yellow_cards),t.yellowCardsFirstHalf=this.statEntityFromResponse(e.yellow_cards_1h),t.yellowCardsSecondHalf=this.statEntityFromResponse(e.yellow_cards_2h),t.yellowCardsExtraTime=this.statEntityFromResponse(e.yellow_cards_et),t.shotsBlocked=this.statEntityFromResponse(e.shots_blocked),t.shotsBlockedFirstHalf=this.statEntityFromResponse(e.shots_blocked_1h),t.shotsBlockedSecondHalf=this.statEntityFromResponse(e.shots_blocked_2h),t.shotsBlockedExtraTime=this.statEntityFromResponse(e.shots_blocked_et),t.substitutions=this.statEntityFromResponse(e.substitutions),t.substitutionsFirstHalf=this.statEntityFromResponse(e.substitutions_1h),t.substitutionsSecondHalf=this.statEntityFromResponse(e.substitutions_2h),t.substitutionsExtraTime=this.statEntityFromResponse(e.substitutions_et),t.counterAttacks=this.statEntityFromResponse(e.counter_attacks),t.counterAttacksFirstHalf=this.statEntityFromResponse(e.counter_attacks_1h),t.counterAttacksSecondHalf=this.statEntityFromResponse(e.counter_attacks_2h),t.counterAttacksExtraTime=this.statEntityFromResponse(e.counter_attacks_et),t.foulsCommitted=this.statEntityFromResponse(e.fouls_committed),t.foulsCommittedFirstHalf=this.statEntityFromResponse(e.fouls_committed_1h),t.foulsCommittedSecondHalf=this.statEntityFromResponse(e.fouls_committed_2h),t.foulsCommittedExtraTime=this.statEntityFromResponse(e.fouls_committed_et),t}catch(e){throw console.warn("There was a problem remapping the stats",e),e}},e}();t.default=i},6899:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.type=null,this.subType=null}},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.isDeleted=!1,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.isDeleted=!1,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.isDeleted=e.is_deleted,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.isDeleted=e.is_deleted,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.isDeleted=e.is_deleted,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.isDeleted=e.is_deleted,n.competitions=e.competitions?e.competitions.map((function(e){return t.competitionRemapper.fromResponse(e)})):[],n.colors=e.colors?e.colors:n.colors,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="",this.isDeleted=!1}},3773:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.primary=null,this.secondary=null,this.tertiary=null}},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,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3773);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.isDeleted=!1,this.colors=new r.default,this.squad=[]}},9582: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);t.default=function(e){var t=this;this.clientHttps=null,this.setAvailableMarketsForMatch=function(e){return r(t,void 0,void 0,(function(){var t,n,r,a=this;return i(this,(function(i){switch(i.label){case 0:return[4,this.clientHttps.getConfig(s.FeatureConfigType.PREDICTOR)];case 1:return t=i.sent(),n=t.fullCoverageCompetitions,r=t.markets,Array.isArray(e)?[2,e.map((function(e){return a.setAvailableMarkets(e,n,r)}))]:"object"==typeof e&&Object.keys(e).length?[2,this.setAvailableMarkets(e,n,r)]:[2]}}))}))},this.setAvailableMarkets=function(e,n,r){var i,s=null===(i=e.context.competition)||void 0===i?void 0:i.id;return s&&t.isMatchInCoverageCompetition(s,n)?(e.availableMarkets=r.all,e):(e.availableMarkets=r.main,e)},this.isMatchInCoverageCompetition=function(e,t){var n=!1;return t.includes(e)?n=!0:n},this.clientHttps=new s.default(e)}},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])}}},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(4946),o=n(7686),u=n(3142),c=n(7232),l=n(1139),d=n(9502),h=n(8900),p=n(1859),f=n(2793);t.default=function(e,t,n,m,v){var y=this;this.config=null,this.clientHttps=null,this.loyaltyHttps=null,this.loyaltyService=null,this.profileFacade=null,this.loyaltyValidator=null,this.idMapping=null,this.topXFacade=null,this.matchQuizFacade=null,this.predictorHttps=null,this.errorHandlingMode=null,this.getConfig=function(){return r(y,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(o.FeatureConfigType.LOYALTY)];case 1:return[2,e.sent()]}}))}))},this.getClientBadges=function(){return r(y,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.getConfig()];case 1:return e=t.sent(),[2,this.loyaltyService.buildClientBadges(e.rewards.badges)]}}))}))},this.getTemplates=function(e){return r(y,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return t=!0,this.config.idSchema!==a.IdSchemaEnum.NATIVE?[3,2]:[4,this.loyaltyHttps.getTemplates(e,t)];case 1:return[2,i.sent()];case 2:return[4,this.loyaltyHttps.getTemplates(e,t)];case 3:return n=i.sent(),r=n,[4,this.loyaltyService.remapTemplatesIds(s([],n.data,!0))];case 4:return r.data=i.sent(),[2,n]}}))}))},this.getTemplateById=function(e,t){return r(y,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.loyaltyHttps.getTemplateById(e,t)];case 1:return n=r.sent(),this.config.idSchema===a.IdSchemaEnum.NATIVE?[2,n]:[4,this.loyaltyService.remapTemplatesIds([n])];case 2:return[2,r.sent()[0]]}}))}))},this.getLeaderboard=function(e,t,n){return r(y,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return t=this.loyaltyService.initFilters(t,"loyalty"),[4,this.loyaltyHttps.getLeaderboard(e,n,t)];case 1:return r=i.sent(),s=r,[4,this.loyaltyService.addProfileModelToLeaderboad(r.data)];case 2:return s.data=i.sent(),[2,r]}}))}))},this.getLeaderboardForGame=function(e,t,n){return r(y,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return t=this.loyaltyService.initFilters(t,"loyalty"),[4,this.loyaltyHttps.getLeaderboardForGame(e,n,t)];case 1:return r=i.sent(),s=r,[4,this.loyaltyService.addProfileModelToLeaderboad(r.data)];case 2:return s.data=i.sent(),[2,r]}}))}))},this.getOwnRankings=function(e,t){return r(y,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.getOwn()];case 1:return n=r.sent().id,[2,this.getUserRankings(n,e,t)]}}))}))},this.getUserRankings=function(e,t,n){return r(y,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return t=this.loyaltyService.initFilters(t,"rankings"),[4,this.loyaltyHttps.getUserRankings(e,t,n)];case 1:return r=i.sent(),[4,this.getModelsForUserRankings(r)];case 2:return[2,i.sent()]}}))}))},this.getHighestSuccessRate=function(e,t){return r(y,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return e&&this.loyaltyValidator.validateMarket(this.errorHandlingMode,e),[4,this.loyaltyHttps.getHighestSuccessRate(e,t)];case 1:return n=r.sent(),[2,this.loyaltyService.addProfileModelToHighestSuccessRate(n)]}}))}))},this.getTemplateWinners=function(e){return r(y,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getContestWinners(e)];case 1:return t=r.sent(),[4,this.getTemplateById(e)];case 2:return n=r.sent(),t.contestModel=n,[2,this.loyaltyService.completeContestWinners(t)]}}))}))},this.getEntitiesFollows=function(e,t){return r(y,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return this.loyaltyService.validateEntitiesFollowsFilters(e),this.config.idSchema===a.IdSchemaEnum.NATIVE?[3,2]:[4,this.loyaltyService.remapEntitiesFollowsFilters(e)];case 1:e=r.sent(),r.label=2;case 2:return[4,this.loyaltyHttps.getEntitiesFollows(e,t)];case 3:return n=r.sent(),[4,this.loyaltyService.addModelsToEntitiesFollows(n)];case 4:return[2,r.sent()]}}))}))},this.getModelsForUserRankings=function(e){return r(y,void 0,void 0,(function(){var t,n,r,s,a,o,u,c,l,d,h,p;return i(this,(function(i){switch(i.label){case 0:return t=null,n=null,r=null,s=this.loyaltyService.extractRankingsIdsMap(e.data),a=s[0],o=s[1],(u=s[2]).length?[4,this.getTemplates()]:[3,2];case 1:c=i.sent(),t=c.data.filter((function(e){return u.includes(e.id)})),i.label=2;case 2:return a.length?(l={gameIds:a},[4,this.topXFacade.getGames(l)]):[3,4];case 3:d=i.sent(),n=d.data,i.label=4;case 4:return o.length?(h={gameIds:o},[4,this.matchQuizFacade.getGames(h)]):[3,6];case 5:p=i.sent(),r=p.data,i.label=6;case 6:return[2,this.loyaltyService.setModelsForUserRankings(n,r,t,e)]}}))}))},this.config=e,this.clientHttps=t,this.loyaltyHttps=n,this.profileFacade=new c.default(v,m),this.loyaltyService=new u.default(this.config),this.loyaltyValidator=new l.default,this.idMapping=new h.default(e),this.topXFacade=new d.default(e,this.idMapping),this.matchQuizFacade=new p.default(e),this.predictorHttps=new f.default(e,this.idMapping),this.errorHandlingMode=e.errorHandlingMode}},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(7059),o=n(3822),u=n(4275),c=n(5601);t.default=function(e){var t=this;this.clientHttps=null,this.profileHttps=null,this.loyaltyHttps=null,this.loyaltyFacade=null,this.localStorage=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.getClientBadges=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getClientBadges()];case 1:return[2,e.sent()]}}))}))},this.getTemplates=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getTemplates(e)];case 1:return[2,t.sent()]}}))}))},this.getTemplateById=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getTemplateById(e,n)];case 1:return[2,t.sent()]}}))}))},this.getLeaderboard=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.loyaltyFacade.getLeaderboard(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getLeaderboardForGame=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.loyaltyFacade.getLeaderboardForGame(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getOwnRankings=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getOwnRankings(e,n)];case 1:return[2,t.sent()]}}))}))},this.getUserRankings=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.loyaltyFacade.getUserRankings(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getHighestSuccessRate=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getHighestSuccessRate(e,n)];case 1:return[2,t.sent()]}}))}))},this.getTemplateWinners=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getTemplateWinners(e)];case 1:return[2,t.sent()]}}))}))},this.getEntitiesFollows=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getEntitiesFollows(e,n)];case 1:return[2,t.sent()]}}))}))},this.clientHttps=new s.default(e),this.profileHttps=new u.default(e),this.loyaltyHttps=new a.default(e),this.localStorage=new c.default(e),this.loyaltyFacade=new o.default(e,this.clientHttps,this.loyaltyHttps,this.profileHttps,this.localStorage)}},8153:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){}},5111:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8153);t.default=function(){this.value=[new r.default]}},8608:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.general=[],this.predictor=[],this.topX=[],this.matchQuiz=[]}},246:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1429);t.default=function(){this.requirements=new r.default}},8687:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){}},1429:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.points=null,this.gameParticipationCount=null,this.entityId=null,this.entityType=null,this.predictionsMade=null,this.correctPredictions=null}},515:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5111),i=n(4226);t.default=function(){this.enabled=!1,this.conditions={list:null},this.actions=new r.default,this.rewards=new i.default}},7910:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.limit=null,this.page=null,this.limit=e.limit?e.limit:null,this.page=e.page?e.page:null}return e.prototype.constructFiltersUrl=function(){var e="";return this.limit&&(e+="&",e+="limit="+this.limit),this.page&&(e+="&",e+="page="+this.page),e},e}();t.default=n},4996:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t){var n=e.call(this,t)||this;return n.sortOrder=null,n.rankType=null,n.leaderboardIds=null,n.gameType=null,n.constructFiltersUrl=function(){var t=e.prototype.constructFiltersUrl.call(n);return n.sortOrder&&(t+="&",t+="sort_order="+n.sortOrder),n.rankType&&(t+="&",t+="rank_type="+n.rankType),n.leaderboardIds&&(t+="&",t+="type_ids="+n.leaderboardIds.join(",")),n.gameType&&(t+="&",t+="game_type="+n.gameType),t},n.sortOrder=t.sortOrder,n.rankType=t.rankType,n.leaderboardIds=t.leaderboardIds,n.gameType=t.type&&"game"===t.type.toLowerCase()?t.gameType:null,n}return i(t,e),t}(n(7910).default);t.default=s},6507:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.position=null,this.points=null,this.predictionsMade=null,this.profileId=null,this.profileModel=null,this.successRatePercent=null}},7746:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6507);t.default=function(){this.remapHighestSuccessRate=function(e){return e.map((function(e){var t=new r.default;return t.position=e.position,t.points=e.points,t.predictionsMade=e.predictions_made,t.profileId=e.profile_id,t.successRatePercent=e.success_rate_percent,t}))}}},9642:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.position=null,this.profileId=null,this.profileModel=null,this.points=null,this.predictionsMade=null}},7419:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5828),i=n(9642);t.default=function(){var e=this;this.remapResponse=function(t){return t.meta=e.remapMeta(t.meta),t.data=e.remapData(t.data),t},this.remapMeta=function(e){var t=new r.default;return t.rankType=e.rank_type,t.fromDate=e.from_date,t.toDate=e.to_date,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},this.remapData=function(e){var t=[];return e.forEach((function(e){var n=new i.default;n.position=e.position,n.profileId=e.profile_id,n.points=e.points,n.predictionsMade=e.predictions_made,t.push(n)})),t}}},5828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(155);t.default=function(){this.rankType=null,this.fromDate=null,this.toDate=null,this.pagination=new r.default}},4187:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.general=null,this.comments=null,this.predictor=null,this.activity=null,this.topX=null,this.matchQuiz=null}},9013:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.id=null,t.rankType=null,t.model=null,t.gameType=null,t}return i(t,e),t}(n(9642).default);t.default=s},4533:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3569),i=n(9013),s=function(){function e(){var e=this;this.remapRankings=function(t){return t.meta=e.remapMeta(t.meta),t.data=e.remapData(t.data),t},this.remapMeta=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.numberOfPages=e.pagination.number_of_pages,t.pagination.totalItems=e.pagination.total_items,t}}return e.prototype.remapData=function(e){var t=[];return e.forEach((function(e){var n=new i.default;n.id=e.id,n.rankType=e.rank_type,n.position=e.position,n.points=e.points,n.gameType=e.game_type,delete n.profileId,delete n.profileModel,delete n.predictionsMade,t.push(n)})),t},e}();t.default=s},4226:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.points=null,this.tiers=null,this.badges=null}},194:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(439);t.default=function(){this.id=null,this.name=null,this.description=null,this.type=null,this.fromDate=null,this.toDate=null,this.markets=[],this.teamIds=[],this.matchIds=[],this.gameIds=[],this.gameTypes=[],this.competitionIds=[],this.excludedProfileIds=[],this.rules=null,this.flags=null,this.images=new r.default,this.status=null,this.automaticallyChangeStatus=!0,this.createdAt=null,this.updatedAt=null,this.related=null}},8899:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3483),i=n(194);t.default=function(){var e=this;this.remapResponse=function(t){var n=[];return t.forEach((function(t){var r=new i.default;r.id=t.id,r.name=t.name,r.description=t.description,r.type=t.type,r.fromDate=t.from_date,r.toDate=t.to_date,r.markets=t.markets?t.markets:null,r.teamIds=t.team_ids?t.team_ids:null,r.matchIds=t.match_ids?t.match_ids:null,r.gameIds=t.game_ids?t.game_ids:null,r.gameTypes=t.game_types?t.game_types:null,r.competitionIds=t.competition_ids?t.competition_ids:null,r.excludedProfileIds=t.excluded_profile_ids?t.excluded_profile_ids:null,r.rules=t.rules?t.rules:null,r.flags=t.flags?t.flags:null,r.images=t.images?t.images:null,r.status=t.status?t.status:null,r.automaticallyChangeStatus=t.automatically_change_status,r.createdAt=t.created_at,r.updatedAt=t.updated_at,r.related=t.related?e.remapRelated(t.related):null,n.push(r)})),n},this.remapMeta=function(e){var t={};return t.totalItems=e.pagination.total_items,t},this.remapRelated=function(e){return e.map((function(e){var t=new r.default;return t.entityId=e.entity_id,t.entityType=e.entity_type,t}))}}},3142: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(4946),o=n(4021),u=n(4904),c=n(8097),l=n(2535),d=n(5318),h=n(8900),p=n(8808),f=n(6409),m=n(8687),v=n(7910),y=n(4996);t.default=function(e){var t=this;this.idMappingService=null,this.profileNamespace=null,this.footballNamespace=null,this.errorHandlingMode=null,this.remapTemplatesIds=function(e){return r(t,void 0,void 0,(function(){var t,n,r,a,o;return i(this,(function(i){switch(i.label){case 0:return e.length>0?(t=[],n=[],r=[],e.forEach((function(e){e.teamIds&&e.teamIds.length>0?t=s(s([],t,!0),e.teamIds,!0):e.matchIds&&e.matchIds.length>0?n=s(s([],n,!0),e.matchIds,!0):e.competitionIds&&e.competitionIds.length>0&&(r=s(s([],r,!0),e.competitionIds,!0))})),a={team:t,match:n,competition:r},[4,this.idMappingService.idMappingFacade.getEntitiesByIds(a,"native",this.idMappingService.idSchema)]):[3,2];case 1:return o=i.sent(),s([],o.team,!0),s([],o.match,!0),s([],o.competition,!0),e.forEach((function(e){e.teamIds&&e.teamIds.length>0?e.teamIds=e.teamIds.map((function(e){return o.team.shift()})):e.matchIds&&e.matchIds.length>0?e.matchIds=e.matchIds.map((function(e){return o.match.shift()})):e.competitionIds&&e.competitionIds.length>0&&(e.competitionIds=e.competitionIds.map((function(e){return o.competition.shift()})))})),[2,e];case 2:return[2,e]}}))}))},this.addProfileModelToLeaderboad=function(e){return r(t,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return e.length>0?(t=[],(n=e.map((function(e){return e.profileId}))).length?[4,this.profileNamespace.getByIds(n)]:[2,e]):[3,2];case 1:return r=i.sent(),e.forEach((function(e){r.forEach((function(t){t.id===e.profileId&&(delete t.interests,e.profileModel=t)})),e.profileModel||(e.profileModel=null),t.push(e)})),[2,t];case 2:return[2,e]}}))}))},this.buildClientBadges=function(e){var n=new m.default;return n.general=t.extractEnabledBadgesId(e.general),n.predictor=t.extractEnabledBadgesId(e.predictor),n.topX=t.extractEnabledBadgesId(e.topX),n.matchQuiz=t.extractEnabledBadgesId(e.matchQuiz),n},this.initFilters=function(e,t){switch(t){case"loyalty":e&&(e=new v.default(e));break;case"rankings":e&&(e=new y.default(e))}return e},this.addProfileModelToHighestSuccessRate=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=e.map((function(e){return e.profileId}))).length?[4,this.profileNamespace.getByIds(t)]:[2,e];case 1:return n=r.sent(),[2,e.map((function(e){return n.forEach((function(t){t.id===e.profileId&&(delete t.interests,e.profileModel=t)})),e}))]}}))}))},this.extractRankingsIdsMap=function(e){var t=[],n=[],r=[];return e.forEach((function(e){"GAME"===e.rankType&&"TOP_X"===e.gameType?t.push(e.id):"GAME"===e.rankType&&"MATCH_QUIZ"===e.gameType?n.push(e.id):"TEMPLATE"===e.rankType&&r.push(e.id)})),[t,n,r]},this.setModelsForUserRankings=function(e,t,n,r){return r.data.forEach((function(r){"MATCH_QUIZ"===r.gameType&&t?r.model=t.filter((function(e){return e.id===r.id}))[0]:"TOP_X"===r.gameType&&e?r.model=e.filter((function(e){return e.id===r.id}))[0]:"TEMPLATE"===r.rankType&&n&&(r.model=n.filter((function(e){return e.id===r.id}))[0])})),r},this.completeContestWinners=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=e.userList.map((function(e){return e.profileId})),[4,this.profileNamespace.getByIds(t)];case 1:return n=r.sent(),e.userList.forEach((function(e){var t=n.filter((function(t){return t.id===e.profileId}))[0];delete t.interests,e.profileModel=t})),[2,e]}}))}))},this.validateEntitiesFollowsFilters=function(e){if(!e||!(e.footballCompetitions&&e.footballCompetitions.length||e.footballTeams&&e.footballTeams.length||e.footballPlayers&&e.footballPlayers.length)){if("default"===t.errorHandlingMode)throw new c.default(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_FILTERS,d.ErrorMessages.ENTITIES_NEEDED);throw new l.default(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_FILTERS,d.ErrorMessages.ENTITIES_NEEDED).response}if(e.footballCompetitions&&e.footballCompetitions.length>10||e.footballTeams&&e.footballTeams.length>10||e.footballPlayers&&e.footballPlayers.length>10){if("default"===t.errorHandlingMode)throw new c.default(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.EXCEEDED_LENGTH,d.ErrorMessages.ENTITIES_FOLLOWS_FILTERS_EXCEEDED);throw new l.default(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.EXCEEDED_LENGTH,d.ErrorMessages.ENTITIES_FOLLOWS_FILTERS_EXCEEDED).response}},this.remapEntitiesFollowsFilters=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:return t=JSON.parse(JSON.stringify(e)),n={},r={},t.footballCompetitions&&t.footballCompetitions.length&&(r.competition=t.footballCompetitions),t.footballTeams&&t.footballTeams.length&&(r.team=t.footballTeams),t.footballPlayers&&t.footballPlayers.length&&(r.player=t.footballPlayers),[4,this.idMappingService.idMappingFacade.getEntitiesByIds(r,this.idMappingService.idSchema,a.IdSchemaEnum.NATIVE)];case 1:return s=i.sent(),Object.keys(s).forEach((function(e){"competition"===e?n.footballCompetitions=s[e]:"team"===e?n.footballTeams=s[e]:"player"===e&&(n.footballPlayers=s[e])})),[2,n]}}))}))},this.addModelsToEntitiesFollows=function(e){return r(t,void 0,void 0,(function(){var t,n,r,s,a,o,u,c,l;return i(this,(function(i){switch(i.label){case 0:return t=[],n="fb:c:",r=new Map,s=[],a="fb:t:",o=new Map,u=[],c="fb:p:",l=null,e.breakdown.forEach((function(e){e.id.includes(n)?t.push(e.id):e.id.includes(a)?s.push(e.id):e.id.includes(c)&&u.push(e.id)})),t.length?[4,this.footballNamespace.footballFacade.competitionsFacade.getCompetitionsMapWithNativeIds(t)]:[3,2];case 1:r=i.sent(),i.label=2;case 2:return s.length?[4,this.footballNamespace.footballFacade.teamsFacade.getTeamsMapWithNativeIds(s)]:[3,4];case 3:o=i.sent(),i.label=4;case 4:return u.length?[4,this.footballNamespace.footballFacade.playerFacade.getPlayersMapWithNativeIds(u)]:[3,6];case 5:l=i.sent(),i.label=6;case 6:return e.breakdown.forEach((function(e){e.id.includes(n)?(e.model=r.get(e.id),e.id=e.model.id):e.id.includes(a)?(e.model=o.get(e.id),e.id=e.model.id):e.id.includes(c)&&(e.model=l[e.id],e.id=e.model.id)})),[2,e]}}))}))},this.extractEnabledBadgesId=function(e){var t=[];return e.forEach((function(e){e.enabled&&t.push(e.id)})),t},this.idMappingService=new h.default(e),this.profileNamespace=new f.default(e),this.footballNamespace=new p.default(e),this.errorHandlingMode=e.errorHandlingMode}},1139:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4021),i=n(4904),s=n(8097),a=n(2535),o=n(5318),u=n(7974);t.default=function(){this.validateMarket=function(e,t){if(!Object.keys(u.MarketEnum).includes(t)){var n=(0,o.invalidMarketMessage)(t);if("default"===e)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_MARKET,n);throw new a.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_MARKET,n).response}}}},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(7686),u=n(2793),c=n(8900),l=n(1732),d=n(7782),h=n(5013),p=n(853),f=n(7299),m=n(2310),v=n(4800),y=n(8097),g=n(4021),w=n(4904),b=n(5318),_=n(2535);t.default=function(e){var t=this;this.predictorHttps=null,this.predictorService=null,this.idMapping=null,this.clientHttps=null,this.predictorValidator=null,this.errorHandlingMode=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.clientHttps.getConfig(o.FeatureConfigType.MATCH_QUIZ)];case 1:return e=t.sent(),this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(e)];case 2:return[2,t.sent()];case 3:return[2,e]}}))}))},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 e=this.predictorValidator.validateBodyFields("MATCH_QUIZ",e),(t=e.fixtures.map((function(e){return u.predictorValidator.validateFixture(e.matchId,e.market,e.prediction.value,e.prediction.playerId)})))&&t.length?this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,4]:(n=[],r=[],t.forEach((function(e){n.push(e.matchId),e instanceof l.default&&e.prediction.playerId&&"OWN_GOAL"!==e.prediction.playerId&&r.push(e.prediction.playerId)})),[4,this.predictorService.remapMatchIdToNative(n)]):[3,4];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 l.default&&"OWN_GOAL"!==e.prediction.playerId&&(e.prediction.playerId=o[e.prediction.playerId])})),i.label=4;case 4:return e.fixtures=t,[4,this.predictorHttps.makeFootballPrediction(e)];case 5: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,n){return r(t,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:return n=n||!1,t=this.predictorService.initGameFilters("MATCH_QUIZ",e),[4,this.predictorHttps.getGames(t,n)];case 1:return r=i.sent(),[4,this.predictorService.remapMatchIdsFixtures(r)];case 2:return[2,i.sent()]}}))}))},this.getGameById=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||!1,[4,this.predictorHttps.getGameById(e,n)];case 1:return t=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(t)];case 2:return[2,r.sent()]}}))}))},this.getGamePredictions=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return s=s||!1,n&&(n.type&&delete n.type,n.status&&delete n.status,n=new d.default(n)),[4,this.predictorHttps.getGamePredictions(e,s,n)];case 1:return[2,t.sent()]}}))}))},this.getGameResults=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 s=s||!1,n&&(n=new v.default(n)),[4,this.predictorHttps.getGameResults(e,s,n)];case 1:return t=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(t)];case 2:return[2,r.sent()]}}))}))},this.getCurrentGameResults=function(e){return r(t,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return e=e||!1,t={status:p.GameStatusEnum.OPEN,type:"MATCH_QUIZ"},t=new f.default(t),[4,this.predictorHttps.getGames(t,e)];case 1:return n=i.sent(),r=this.predictorService.getCurrentGameId(n),[4,this.getGameResults(r,null,e)];case 2:return[2,i.sent().data[0]]}}))}))},this.getMyGameEditions=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 e&&e.limit&&this.validateLimitFilterOnGames(e.limit),n=n||!1,t=this.predictorService.initGameTypePredictions("MATCH_QUIZ",e),r=[],[4,this.predictorHttps.getMyPredictionsNoRemap(t)];case 1:return(s=i.sent()).data.length>0?(s.data.forEach((function(e){e.game_instance_id&&r.push(e.game_instance_id)})),o=this.predictorService.initGameFilters("MATCH_QUIZ",null,r),[4,this.predictorHttps.getUserGameEditions(o,n)]):[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.getMyGamePrediction=function(e){return r(t,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return t=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),[4,this.predictorHttps.getMyPredictions(t)];case 1:return(n=i.sent()).data.length>0?[2,(r=n.data.filter((function(t){return t.gameInstanceId===e}))).length?r[0]:null]:[2,null]}}))}))},this.getUserGameEditions=function(e,n,s){return r(t,void 0,void 0,(function(){var t,r,o,u,c;return i(this,(function(i){switch(i.label){case 0:return n&&n.limit&&this.validateLimitFilterOnGames(n.limit),s=s||!1,t=this.predictorService.initGameTypePredictions("MATCH_QUIZ",n),r=[],[4,this.predictorHttps.getUserPredictionsNoRemap(e,t)];case 1:return(o=i.sent()).data.length>0?(o.data.forEach((function(e){e.game_instance_id&&r.push(e.game_instance_id)})),u=this.predictorService.initGameFilters("MATCH_QUIZ",null,r),[4,this.predictorHttps.getUserGameEditions(u,s)]):[3,4];case 2:return c=i.sent(),[4,this.predictorService.addPredictionProp(o,c)];case 3:return[2,i.sent()];case 4:return[2,new a.default]}}))}))},this.getUserGamePrediction=function(e,n,s){return r(t,void 0,void 0,(function(){var t,r,a;return i(this,(function(i){switch(i.label){case 0:return s=s||!1,t=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),[4,this.predictorHttps.getUserPredictions(e,s,t)];case 1:return(r=i.sent()).data.length>0?[2,(a=r.data.filter((function(e){return e.gameInstanceId===n}))).length?a[0]:null]:[2,null]}}))}))},this.getMarketsResultsForGame=function(e,n){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getMarketResultsForGame(e,n)];case 1:return t=r.sent(),[4,this.predictorService.completeGameMarketResults(t,"MATCH_QUIZ")];case 2:return[2,r.sent()]}}))}))},this.getGameWinners=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getContestWinners(e)];case 1:return t=r.sent(),[4,this.getGameById(e)];case 2:return n=r.sent(),t.contestModel=n,[2,this.predictorService.completeContestWinners(t)]}}))}))},this.validateLimitFilterOnGames=function(e){if("default"===t.errorHandlingMode&&e>50)throw new y.default(g.ErrorCodes.BAD_METHOD_CALL,w.ErrorStatuses.EXCEEDED_LENGTH,b.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED);if("standard"===t.errorHandlingMode&&e>50)throw new _.default(g.ErrorCodes.BAD_METHOD_CALL,w.ErrorStatuses.EXCEEDED_LENGTH,b.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED).response},this.predictorValidator=new m.default(e.errorHandlingMode),this.idMapping=new c.default(e),this.predictorHttps=new u.default(e,this.idMapping),this.predictorService=new h.default(e,this.idMapping),this.clientHttps=new o.default(e),this.errorHandlingMode=e.errorHandlingMode}},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.getConfig=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getConfig()];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.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,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getGames(e,n)];case 1:return[2,t.sent()]}}))}))},this.getGameById=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.getGameById(e,n)];case 1:return[2,t.sent()]}}))}))},this.getGamePredictions=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.matchQuizFacade.getGamePredictions(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getGameResults=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.matchQuizFacade.getGameResults(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getCurrentGameResults=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getCurrentGameResults(e)];case 1:return[2,t.sent()]}}))}))},this.getMyGameEditions=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.getMyGameEditions(e,n)];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,s){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,s)];case 1:return[2,t.sent()]}}))}))},this.getUserGamePrediction=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.matchQuizFacade.getUserGamePrediction(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getMarketsResultsForGame=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.getMarketsResultsForGame(e,n)];case 1:return[2,t.sent()]}}))}))},this.getGameWinners=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getGameWinners(e)];case 1:return[2,t.sent()]}}))}))},this.matchQuizFacade=new s.default(e)}},5765:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.enabled=!1,this.defaultMarkets=null,this.competitionsWhitelist=null}},8410:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6899),i=n(8042);t.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new r.default,this.prediction=new i.default}},670:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.gameId=null,this.results=null,this.tieBreakers=null}},7243:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4916);t.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.outcome=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new r.default,this.predictionId=null,this.participantsCount=0,this.related=null,this.excludedProfileIds=null,this.rules=null,this.flags=null,this.points=null,this.createdAt=null,this.updatedAt=null,this.predictionsMadeAt=null,this.images=null,this.scheduleOpenAt=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.playerMarketNobodyPrediction=t.endMarkMarkets=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.CORRECT_SCORE_ADVANCED="CORRECT_SCORE_ADVANCED",e.CORRECT_SCORE_HT="CORRECT_SCORE_HT",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],t.endMarkMarkets=[n.FT_1X2,n.HT_1X2,n.HT_FT,n.DOUBLE_CHANCE,n.CORNERS_MATCH,n.CORRECT_SCORE,n.CORRECT_SCORE_HT,n.CORRECT_SCORE_ADVANCED],t.playerMarketNobodyPrediction=n.PLAYER_SCORE_FIRST_GOAL},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])}}},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(4946),o=n(7974),u=n(7686),c=n(5013),l=n(3950),d=n(1732),h=n(2310),p=n(8097),f=n(4021),m=n(4904),v=n(5318),y=n(2535);t.default=function(e,t,n,g){var w=this;this.predictorHttps=null,this.clientHttps=null,this.idMapping=null,this.predictorService=null,this.predictorValidator=null,this.errorHandlingMode=null,this.makeFootballPrediction=function(e,t,n,s){return r(w,void 0,void 0,(function(){var r,u,c,h,g,w,b;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorValidator.validateFixture(e,t,n,s),u=new l.default,this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,6]:(c=r.matchId,h="",[4,this.predictorService.remapMatchIdToNative([c])]);case 1:if(g=i.sent(),r.matchId=g[0],"default"===this.errorHandlingMode&&!r.matchId)throw new p.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_MATCH_ID).errorMessage();if("standard"===this.errorHandlingMode&&!r.matchId)throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_MATCH_ID).response;return r instanceof d.default&&"OWN_GOAL"!==r.prediction.playerId?r.prediction.playerId?(h=r.prediction.playerId,w=r.prediction,[4,this.predictorService.remapPlayerIdToNative([h])]):[3,3]:[3,4];case 2:w.playerId=i.sent(),i.label=3;case 3:if("default"===this.errorHandlingMode&&r.market!==o.playerMarketNobodyPrediction&&!r.prediction.playerId)throw new p.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_PLAYER_ID).errorMessage();if("standard"===this.errorHandlingMode&&r.market!==o.playerMarketNobodyPrediction&&!r.prediction.playerId)throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_PLAYER_ID).response;i.label=4;case 4:return u.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(u)];case 5:return(b=i.sent()).fixtures.forEach((function(e){e.prediction.playerId&&"OWN_GOAL"!==e.prediction.playerId&&(e.prediction.playerId=h),e.matchId=c})),[2,b];case 6:return u.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(u)];case 7:return[2,i.sent()]}}))}))},this.getMatchSummary=function(e,t){return r(w,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return[4,this.getMatchSummaryBase(e,t)];case 1:return n=i.sent(),r=JSON.parse(JSON.stringify(n.predictions)),[4,this.predictorService.remapPlayerIdToIdSchema(r)];case 2:return s=i.sent(),n.predictions=s,[2,n]}}))}))},this.getMarketSummary=function(e,t,n,s){return r(w,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.getMatchSummaryBase(e,s)];case 1:return r=i.sent(),[4,this.predictorService.getMarketSummary(r,t,n)];case 2:return[2,i.sent()];case 3:throw i.sent();case 4:return[2]}}))}))},this.getMatchSummaryBase=function(e,t){return r(w,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapMatchIdToNative([e])];case 1:return n=i.sent(),r=n[0],[4,this.predictorHttps.getMatchSummary(r,t)];case 2:return(s=i.sent()).matchId=e,[2,s];case 3:return[4,this.predictorHttps.getMatchSummary(e,t)];case 4:return[2,i.sent()]}}))}))},this.getConfig=function(){return r(w,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.clientHttps.getConfig(u.FeatureConfigType.PREDICTOR)];case 1:return e=t.sent(),this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(e)];case 2:return[2,t.sent()];case 3:return[2,e]}}))}))},this.deleteFootballPrediction=function(e){return r(w,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(w,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return t=this.predictorService.initPredictionsFilters(e,"user"),[4,this.predictorHttps.getMyPredictions(t)];case 1:return[2,n.sent()]}}))}))},this.getMyPredictionsForMatches=function(e,t){return r(w,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:if("default"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(e))throw new p.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).errorMessage();if("standard"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(e))throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).response;return this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,2]:[4,this.predictorService.remapMatchIdToNative(s([],e,!0))];case 1:e=r.sent(),r.label=2;case 2:return n=this.predictorService.initPredictionsFilters(t,"matches",e),[4,this.predictorHttps.getMyPredictions(n)];case 3:return[2,r.sent()]}}))}))},this.getMyCurrentPredictions=function(e){return r(w,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return t=this.predictorService.initPredictionsFilters(e,"current"),[4,this.predictorHttps.getMyPredictions(t)];case 1:return[2,n.sent()]}}))}))},this.getMyPastPredictions=function(e){return r(w,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return t=this.predictorService.initPredictionsFilters(e,"past"),[4,this.predictorHttps.getMyPredictions(t)];case 1:return[2,n.sent()]}}))}))},this.getUserPredictions=function(e,t,n){return r(w,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(t,"user"),[4,this.predictorHttps.getUserPredictions(e,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserCurrentPredictions=function(e,t,n){return r(w,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(t,"current"),[4,this.predictorHttps.getUserPredictions(e,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserPastPredictions=function(e,t,n){return r(w,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(t,"past"),[4,this.predictorHttps.getUserPredictions(e,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserPredictionsForMatches=function(e,t,n,o){return r(w,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:if("default"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(t))throw new p.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).errorMessage();if("standard"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(t))throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).response;return this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,2]:[4,this.predictorService.remapMatchIdToNative(s([],t,!0))];case 1:t=i.sent(),i.label=2;case 2:return r=this.predictorService.initPredictionsFilters(n,"matches",t),[4,this.predictorHttps.getUserPredictions(e,o,r)];case 3:return[2,i.sent()]}}))}))},this.getPredictionById=function(e){return r(w,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorHttps.getPredictionById(e)];case 1:return[2,t.sent()]}}))}))},this.predictorHttps=t,this.idMapping=g,this.clientHttps=n,this.errorHandlingMode=e.errorHandlingMode,this.predictorValidator=new h.default(e.errorHandlingMode),this.predictorService=new c.default(e,g)}},704:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8608),i=n(246),s=n(1429),a=n(515),o=n(4187),u=n(4226),c=n(5765),l=n(1180),d=n(8452);t.default=function(){var e=this;this.remapPredictorConfig=function(e){var t=new d.default;return t.enabled=e.enabled,t.fullCoverageCompetitions=e.full_coverage_competitions,t.markets=e.markets,t.successRateScopes=e.success_rate_scopes,t},this.remapTopXConfig=function(e){var t=new l.default;return t.enabled=e.enabled,t.minFixtures=e.min_fixtures,t.maxFixtures=e.max_fixtures,t.competitionsWhitelist=e.competitions_whitelist,t},this.remapMatchQuizConfig=function(e){var t=new c.default;return t.enabled=e.enabled,t.defaultMarkets=e.default_markets,t.competitionsWhitelist=e.competitions_whitelist,t},this.remapLoyaltyConfig=function(t){var n=new a.default;return n.enabled=t.enabled,n.conditions.list=t.conditions.list,n.actions.value=t.actions.value,n.rewards=e.remapRewards(t.rewards),n},this.remapRewards=function(t){var n=new u.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 o.default;return t.general=e.general,t.comments=e.comments,t.predictor=e.predictor,t.activity=e.activity,t.topX=e.top_x,t.matchQuiz=e.match_quiz,t},this.remapBadges=function(t){var n=new r.default;return n.general=t.general,n.predictor=e.remapBadgeValues(t.predictor),n.topX=e.remapBadgeValues(t.top_x),n.matchQuiz=e.remapBadgeValues(t.match_quiz),n},this.remapBadgeValues=function(t){return t.map((function(t){var n=new i.default;return n.id=t.id,n.enabled=t.enabled,n.requirements=e.remapRequirements(t.requirements),n}))},this.remapRequirements=function(e){var t=new s.default;return t.points=e.points,t.gameParticipationCount=e.game_participation_count,t.entityId=e.entity_id,t.entityType=e.entity_type,t.predictionsMade=e.predictions_made,t.correctPredictions=e.correct_predictions,t}}},8452:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(442);t.default=function(){this.enabled=!1,this.fullCoverageCompetitions=null,this.markets=null,this.successRateScopes=new r.default}},442:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.competitions=[],this.teams=[],this.markets=[]}},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 d=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)t.market=e.market,t.prediction=e.prediction.value;else if(e instanceof u.default){t.market=e.market;var n=e.prediction.value.split(":");t.goals_home=Number(n[0]),t.goals_away=Number(n[1])}else t.market=e.market,t.prediction=e.prediction.value;return t},this.remapFixturesResponse=function(e){return r(d,void 0,void 0,(function(){var t,n,r,a,o,u,c,l,d,h,p,f;return i(this,(function(i){switch(i.label){case 0:for(t="OWN_GOAL",n=[],r=[],a=null,o=[],e.length>1&&e.sort((function(e,t){return e.match_id.localeCompare(t.match_id)})),u=0,c=e;u<c.length;u++)p=c[u],n.push(p.match_id),p.player_id&&!r.includes(p.player_id)&&r.push(p.player_id);return[4,this.matchFacade.getMatchesMapWithNativeIds(n)];case 1:return l=i.sent(),r.sort((function(e,t){return e.localeCompare(t)})),r&&r.length>0&&!r.includes(t)?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:a=i.sent(),i.label=3;case 3:for(d=0,h=e;d<h.length;d++)p=h[d],f=new s.default,p.target?f.market=this.predictorService.convertMarketForResponseModel(p.market,p.target):f.market=p.market,f.matchId=l[p.match_id].id,f.matchType=p.match_type,f.matchModel=l?l[p.match_id]:null,delete f.matchModel.availableMarkets,void 0!==p.goals_home&&void 0!==p.goals_away?f.prediction.value=p.goals_home.toString()+":"+p.goals_away.toString():f.prediction.value=p.prediction,f.prediction.playerId=p.player_id?p.player_id:null,f.prediction.playerId&&f.prediction.playerId!==t&&(f.prediction.playerModel=a[p.player_id],f.prediction.playerId=a[p.player_id].id),f.result=this.remapResult(p.result),o.push(f);return[2,o]}}))}))},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.points=e.points,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.matchType="FOOTBALL",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.matchType="FOOTBALL",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(3125);t.default=function(e,t,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=e,this.market=t,this.prediction=new r.default,this.prediction.value=n}},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.matchType="FOOTBALL",this.prediction=null,this.matchId=e,this.prediction=new i.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.matchType="FOOTBALL",this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},1718:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2782);t.default=function(e,t,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=e,this.market=t,this.prediction=new r.default,this.prediction.value=n}},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.matchType="FOOTBALL",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.matchType="FOOTBALL",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.matchType="FOOTBALL",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.matchType="FOOTBALL",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.matchType="FOOTBALL",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,this.points=0}},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(595),c=n(4545),l=n(4272),d=n(2524),h=n(5013),p=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 p.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,c=this;return i(this,(function(i){switch(i.label){case 0:return e.length?(t="OWN_GOAL",n=[],r=[],s={},o=[],e.forEach((function(e){e.fixtures.forEach((function(e){n.push(e.match_id),e.player_id&&e.player_id!==t&&r.push(e.player_id)}))})),[4,this.matchFacade.getMatchesMapWithNativeIds(n)]):[3,4];case 1:return u=i.sent(),r.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:s=i.sent(),i.label=3;case 3:return e.forEach((function(e){var n=new a.default,r=[];n.id=e.id,n.gameInstanceId=e.game_instance_id,n.gameType=e.game_type,n.wager=e.wager,n.totalFixtures=e.total_fixtures,n.settledFixtures=e.settled_fixtures,n.userId=e.user_id,e.fixtures.forEach((function(e){var n=new d.default;e.target?n.market=c.predictorService.convertMarketForResponseModel(e.market,e.target):n.market=e.market,n.matchId=u[e.match_id].id,n.matchType=e.match_type,n.matchModel=u[e.match_id],delete n.matchModel.availableMarkets,void 0!==e.goals_home&&void 0!==e.goals_away?n.prediction.value=e.goals_home.toString()+":"+e.goals_away.toString():n.prediction.value=e.prediction,n.prediction.playerId=e.player_id?e.player_id:null,n.prediction.playerId&&n.prediction.playerId!==t&&(n.prediction.playerModel=s[n.prediction.playerId],n.prediction.playerId=s[n.prediction.playerId].id),n.result=c.fixturesRemapper.remapResult(e.result),r.push(n)})),n.fixtures=r,n.status=e.status,e.tiebreaker?n.tiebreaker.goldenGoal=e.tiebreaker.golden_goal:n.tiebreaker=null,n.points=e.points,n.createdAt=e.created_at,n.updatedAt=e.updated_at,o.push(n)})),[2,o];case 4:return[2,e]}}))}))},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,t.overZeroPointFiveGoals=e.OVER_GOALS_0_5,t.overOnePointFiveGoals=e.OVER_GOALS_1_5,t.overTwoPointFiveGoals=e.OVER_GOALS_2_5,t.overThreePointFiveGoals=e.OVER_GOALS_3_5,t.overFourPointFiveGoals=e.OVER_GOALS_4_5,t.overFivePointFiveGoals=e.OVER_GOALS_5_5,t.overSixPointFiveGoals=e.OVER_GOALS_6_5,t.overSixPointFiveCorners=e.OVER_CORNERS_6_5,t.overSevenPointFiveCorners=e.OVER_CORNERS_7_5,t.overEightPointFiveCorners=e.OVER_CORNERS_8_5,t.overNinePointFiveCorners=e.OVER_CORNERS_9_5,t.overTenPointFiveCorners=e.OVER_CORNERS_10_5,t.overElevenPointFiveCorners=e.OVER_CORNERS_11_5,t.overTwelvePointFiveCorners=e.OVER_CORNERS_12_5,t.overThirteenPointFiveCorners=e.OVER_CORNERS_13_5,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,t.penaltyMatch=e.PENALTY_MATCH,t.playerScoreFirstGoal=e.PLAYER_SCORE_FIRST_GOAL,t.cornersMatch=e.CORNERS_MATCH,t.correctScore=e.CORRECT_SCORE,t.correctScoreHalfTime=e.CORRECT_SCORE_HT,t.correctScoreAdvanced=e.CORRECT_SCORE_ADVANCED,t.playerScoreHattrick=e.PLAYER_SCORE_HATTRICK,t.playerScoreTwice=e.PLAYER_SCORE_TWICE,t},this.footballHttps=new u.default(e),this.matchFacade=new c.default(e,this.footballHttps,t),this.playerFacade=new l.default(e,this.footballHttps,t),this.predictorService=new h.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.matchIds=null,this.constructFiltersUrl=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),t.matchIds&&(e+="&",e+="match_ids="+t.matchIds.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.matchIds=e.matchIds?e.matchIds: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.correctScoreHalfTime={},this.correctScoreAdvanced={},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,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getMatchSummary(e,n)];case 1:return[2,t.sent()]}}))}))},this.getMarketSummary=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.getMarketSummary(e,n,s,a)];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.getMyPredictionsForMatches=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.getMyPredictionsForMatches(e,n)];case 1:return[2,t.sent()]}}))}))},this.getUserPredictions=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.getUserPredictions(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getUserCurrentPredictions=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.getUserCurrentPredictions(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getUserPastPredictions=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.getUserPastPredictions(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getUserPredictionsForMatches=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.getUserPredictionsForMatches(e,n,s,a)];case 1:return[2,t.sent()]}}))}))},this.getPredictionById=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getPredictionById(e)];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.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=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())}))},s=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])}}},a=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 o=n(7974),u=n(3792),c=n(8452),l=n(5908),d=n(8950),h=n(6890),p=n(595),f=n(4545),m=n(7782),v=n(7299),y=n(712),g=n(4119),w=n(3751),b=n(7243),_=n(4272),E=n(1180),I=n(5765),M=n(6147),O=n(5318),T=n(4946),R=n(6409),S=n(1260),P=n(6247);t.default=function(e,t){var n=this;this.footballHttps=null,this.idMapping=null,this.matchFacade=null,this.playerFacade=null,this.profileNamespace=null,this.remapMatchIdToNative=function(e){return i(n,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.idMapping.getEntityIdsBySchemaId(e,"match","native")];case 1:return[2,t.sent().match]}}))}))},this.remapPlayerIdToNative=function(e){return i(n,void 0,void 0,(function(){return s(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 i(n,void 0,void 0,(function(){var t,n,r,i;return s(this,(function(s){switch(s.label){case 0:return t={},n=(0,y.transformIdsToBeUnique)(e),[4,this.idMapping.getEntityIdsBySchemaId(n,"player","native")];case 1:return r=s.sent(),i=r.player,n.forEach((function(e,n){return t[e]=i[n]})),[2,t]}}))}))},this.remapPlayerIdToIdSchema=function(e){return i(n,void 0,void 0,(function(){var t,n,r,i,a,o,u,c,l,d,h,p,f,m,v,y,g,w,b;return s(this,(function(s){switch(s.label){case 0:for(t=["playerScore","playerYellowCard","playerRedCard","playerScoreFirstGoal","playerScoreHattrick","playerScoreTwice"],n=[],r=0,i=Object.entries(e);r<i.length;r++)if(a=i[r],o=a[0],u=a[1],t.includes(o))for(c=0,l=Object.keys(u);c<l.length;c++)"NOBODY"!==(d=l[c])&&"OWN_GOAL"!==d&&n.push(d);return n.length?[4,this.playerFacade.getPlayersMapWithNativeIds(n)]:[2,e];case 1:for(h=s.sent(),p=0,f=Object.entries(e);p<f.length;p++)if(m=f[p],v=m[0],y=m[1],t.includes(v))for(g=0,w=Object.keys(y);g<w.length;g++)"NOBODY"!==(b=w[g])&&"OWN_GOAL"!==b&&(y[h[b].id]=y[b],y[h[b].id].model=h[b],this.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&delete y[b]);return[2,e]}}))}))},this.convertMarket=function(e){for(var t=Object.keys(new u.default),n=Object.values(o.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.getMarketSummary=function(e,t,r){return i(n,void 0,void 0,(function(){var n,i,a,u,c,d,h,p,f=this;return s(this,(function(s){switch(s.label){case 0:if(n=this.convertMarket(t),(i={}).matchId=e.matchId,i.matchType=e.matchType,!Object.keys(e.predictions).includes(n))throw new Error("You have passed invalid market");return i[n]=e.predictions[n],o.playerMarkets.includes(t)&&r?(a="","OWN_GOAL"===r||"NOBODY"===r?[3,2]:[4,this.idMapping.idMappingFacade.getEntitiesByIds({player:[r]},this.idMapping.idSchema,"native")]):[3,6];case 1:u=s.sent(),a=u.player[0],s.label=2;case 2:return a&&i[n][a]?[4,this.playerFacade.getPlayersMapWithNativeIds([a])]:[3,4];case 3:return c=s.sent(),i[n][a].model=c[a],[2,i[n][a]];case 4:return a?(i[n][a]=new l.default,[2,i[n][a]]):[2,i[n][r]];case 5:return[3,10];case 6:return!o.playerMarkets.includes(t)||r?[3,10]:(d=Object.keys(i[n]).filter((function(e){return"NOBODY"!==e&&"OWN_GOAL"!==e}))).length?[4,this.playerFacade.getPlayersMapWithNativeIds(d)]:[3,8];case 7:return p=s.sent(),[3,9];case 8:p={},s.label=9;case 9:h=p,Object.keys(h).length&&Object.keys(i[n]).forEach((function(e){"NOBODY"!==e&&"OWN_GOAL"!==e&&(i[n][h[e].id]=i[n][e],i[n][h[e].id].model=h[e],f.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&delete i[n][e])})),s.label=10;case 10:return[2,i]}}))}))},this.remapCompetitionsFromConfig=function(e){return i(n,void 0,void 0,(function(){var t,n,r,i,a,o,u,l;return s(this,(function(s){switch(s.label){case 0:return e instanceof c.default?(t={competition:e.fullCoverageCompetitions},n={competition:e.successRateScopes.competitions},r={team:e.successRateScopes.teams},[4,this.idMapping.idMappingFacade.getEntitiesByIds(t,"native",this.idMapping.idSchema)]):[3,4];case 1:return i=s.sent(),[4,this.idMapping.idMappingFacade.getEntitiesByIds(n,"native",this.idMapping.idSchema)];case 2:return a=s.sent(),[4,this.idMapping.idMappingFacade.getEntitiesByIds(r,"native",this.idMapping.idSchema)];case 3:return o=s.sent(),e.fullCoverageCompetitions=i.competition,e.successRateScopes.competitions=a.competition,e.successRateScopes.teams=o.team,[2,e];case 4:return e instanceof E.default||e instanceof I.default?(u={competition:e.competitionsWhitelist},[4,this.idMapping.idMappingFacade.getEntitiesByIds(u,"native",this.idMapping.idSchema)]):[3,6];case 5:return l=s.sent(),e.competitionsWhitelist=l.competition,[2,e];case 6:return[2]}}))}))},this.remapMatchIdsFixtures=function(e){return i(n,void 0,void 0,(function(){var t,n;return s(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 w.default||e instanceof d.default||e instanceof b.default||e instanceof P.default?(e.fixtures.forEach((function(e){return t.push(e.matchId)})),e instanceof b.default&&e.fixtures.forEach((function(e){e.prediction.playerId&&"OWN_GOAL"!==e.prediction.playerId&&n.push(e.prediction.playerId)}))):e instanceof h.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,r){return i(n,void 0,void 0,(function(){var n,i,a,o=this;return s(this,(function(s){switch(s.label){case 0:return n=[],[4,this.matchFacade.getMatchesMapWithNativeIds(t)];case 1:return i=s.sent(),a={},r.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:a=s.sent(),s.label=3;case 3:return e.data.forEach((function(e){e instanceof w.default||e instanceof d.default||e instanceof b.default?(e.fixtures.forEach((function(t){o.handleMatchModel(i,t),e instanceof b.default&&t.prediction.playerId&&"OWN_GOAL"!==t.prediction.playerId&&(t.prediction.playerModel=a[t.prediction.playerId],t.prediction.playerId=a[t.prediction.playerId].id)})),n.push(e)):e instanceof h.default&&(e.results.forEach((function(e){e.matchModel=i[e.matchId],delete e.matchModel.availableMarkets,e.matchId=e.matchModel.id})),n.push(e))})),e.data=n,[2,e]}}))}))},this.refactorResponseObjModel=function(e){return i(n,void 0,void 0,(function(){var t,n,r=this;return s(this,(function(i){switch(i.label){case 0:return t=[],e.fixtures.forEach((function(e){return t.push(e.matchId)})),[4,this.matchFacade.getMatchesMapWithNativeIds(t)];case 1:return n=i.sent(),e.fixtures.forEach((function(e){return r.handleMatchModel(n,e)})),[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,t){var n={type:e,limit:null,startAfter:null};return t&&(n=r(r({},n),{limit:t.limit,startAfter:t.startAfter})),new m.default(n)},this.initGameFilters=function(e,t,n){if(t&&n)return t.type=e,t.gameIds=n,new v.default(t);if(t&&!n)return t.type=e,new v.default(t);if(!t&&n){var r={type:e,gameIds:n};return new v.default(r)}return r={type:e},new v.default(r)},this.addPredictionProp=function(e,t){return i(n,void 0,void 0,(function(){var n=this;return s(this,(function(r){switch(r.label){case 0:return t.data.forEach((function(t){e.data.forEach((function(e){t.id===e.game_instance_id&&(t.predictionId=e.id,t.outcome=e.status,t.fixtures.forEach((function(t,r){void 0!==e.fixtures[r].goals_home&&void 0!==e.fixtures[r].goals_away?t.prediction.value=e.fixtures[r].goals_home+":"+e.fixtures[r].goals_away:t.prediction.value=e.fixtures[r].prediction,e.fixtures[r].player_id?t.prediction.playerId=e.fixtures[r].player_id:e.fixtures[r].target&&(t.prediction.target=e.fixtures[r].target),t.prediction.result=n.remapResult(e.fixtures[r].result)})),t.predictionsMadeAt=e.created_at,t.points=e.points)}))})),t.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,[4,this.remapMatchIdsFixtures(t)];case 1:return[2,r.sent()]}}))}))},this.remapResult=function(e){var t=new g.default;return t.settledAt=e.settled_at,t.resettledAt=e.resettled_at,t.status=e.status,t.outcome=e.outcome,t.points=e.points,t},this.areIdsExceeded=function(e){return e.length>10},this.initPredictionsFilters=function(e,t,r){switch(t){case"user":e&&(e=new m.default(e));break;case"current":if(e)n.deleteUnexpectedProperties(e),e.status=[M.StatusEnum.ACTIVE],e=new m.default(e);else{var i={status:[M.StatusEnum.ACTIVE]};e=new m.default(i)}break;case"past":e?(n.deleteUnexpectedProperties(e),e.status=M.pastStatuses,e=new m.default(e)):(i={status:M.pastStatuses},e=new m.default(i));break;case"matches":e?(n.deleteUnexpectedProperties(e),e.matchIds=r,e=new m.default(e)):(i={matchIds:r},e=new m.default(i))}return e},this.completeGameMarketResults=function(e,t){return i(n,void 0,void 0,(function(){var n,r,i,u,c,l,d,h,p=this;return s(this,(function(s){switch(s.label){case 0:switch(t){case"MATCH_QUIZ":return[3,1];case"TOP_X":return[3,5]}return[3,9];case 1:return n={},r=e.results[0].matchId,i=e.results.map((function(e){return o.playerMarkets.includes(e.market)&&!e.result.includes("OWN_GOAL")?a([],e.result,!0):[]})).flat(),[4,this.matchFacade.getMatchesMapWithNativeIds([r])];case 2:return u=s.sent(),i.length?[4,this.playerFacade.getPlayersMapWithNativeIds(i)]:[3,4];case 3:n=s.sent(),s.label=4;case 4:return e.results=e.results.map((function(e){if(e.matchModel=u[e.matchId]?u[e.matchId]:null,e.playerModels&&Object.keys(n).length&&(t=e.result).forEach((function(t){var r=n[t];e.playerModels.push(r)})),p.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&(p.remapMatchIdForResultsMarkets(u,e),e.playerModels&&Object.keys(n).length)){var t=e.result;e.result=t.map((function(e){return n[e].id}))}return e})),[2,e];case 5:return c=e.results.map((function(e){return e.matchId})),[4,this.matchFacade.getMatchesMapWithNativeIds(c)];case 6:return l=s.sent(),e.results=e.results.map((function(e){return e.matchModel=l[e.matchId]?l[e.matchId]:null,p.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&p.remapMatchIdForResultsMarkets(l,e),e})),e.tieBreakers.goldenGoals.length?(d=e.tieBreakers.goldenGoals.map((function(e){return e.playerId})),[4,this.playerFacade.getPlayersMapWithNativeIds(d)]):[3,8];case 7:h=s.sent(),e.tieBreakers.goldenGoals=e.tieBreakers.goldenGoals.map((function(e){return e.matchModel=l[e.matchId],e.playerModel=h[e.playerId],p.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&(e.matchId=l[e.matchId].id,e.playerId=h[e.playerId].id),e})),s.label=8;case 8:return[2,e];case 9:return[2]}}))}))},this.completeContestWinners=function(e){return i(n,void 0,void 0,(function(){var t,n;return s(this,(function(r){switch(r.label){case 0:return t=e.userList.map((function(e){return e.profileId})),[4,this.profileNamespace.getByIds(t)];case 1:return n=r.sent(),e.userList.forEach((function(e){var t=n.filter((function(t){return t.id===e.profileId}))[0];delete t.interests,e.profileModel=t})),[2,e]}}))}))},this.handleMatchModel=function(e,t){e[t.matchId]?(t.matchModel=e[t.matchId],delete t.matchModel.availableMarkets,t.matchId=t.matchModel.id):(t.matchModel=null,n.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&n.idMapping.idMappingFacade.getEntityById(t.matchId,"match","native").then((function(e){t.matchId=e[S.ID_TYPES[n.idMapping.idSchema]]})))},this.remapMatchIdForResultsMarkets=function(e,t){e[t.matchId]?t.matchId=e[t.matchId].id:n.idMapping.idMappingFacade.getEntityById(t.matchId,"match","native").then((function(e){t.matchId=e[S.ID_TYPES[n.idMapping.idSchema]]}))},this.deleteUnexpectedProperties=function(e){return e.status&&(console.warn(O.WarningMessages.UNEXPECTED_STATUS_PROP),delete e.status),e.type&&(console.warn(O.WarningMessages.UNEXPECTED_TYPE_PROP),delete e.type),e},this.footballHttps=new p.default(e),this.idMapping=t,this.matchFacade=new f.default(e,this.footballHttps,t),this.playerFacade=new _.default(e,this.footballHttps,t),this.profileNamespace=new R.default(e)}},2310:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4021),i=n(4904),s=n(8097),a=n(5318),o=n(7974),u=n(1976),c=n(1206),l=n(5274),d=n(1465),h=n(7535),p=n(1718),f=n(7307),m=n(5132),v=n(7344),y=n(1855),g=n(1732),w=n(5814),b=n(3950),_=n(1260),E=n(7640),I=n(2535);t.default=function(e){var t=this;this.errorHandlingMode=null,this.validateBodyFields=function(e,n){var r=Object.keys(n),i=Object.keys(new b.default);switch(e){case"MATCH_QUIZ":r.forEach((function(e){i.includes(e)||t.throwInvalidParamException([e])}));break;case"TOP_X":var s=n;s.fixtures.forEach((function(e){return t.validateMarketTopX(e.market)})),r.includes("tiebreaker")&&s.tiebreaker&&t.validateTiebreaker(s.tiebreaker),r.forEach((function(e){"tiebreaker"===e||i.includes(e)||t.throwInvalidParamException([e])}))}var a=i.filter((function(e){return!r.includes(e)}));return a.length&&t.throwMissingFieldsException("game prediction body",a),n.fixtures.forEach((function(e){t.validateFixtureFields(e)})),n},this.validateFixture=function(e,n,r,i){t.validateMarket(n);var s=Object.values(u.OneXTwoEnum),a=Object.values(u.HalfTimeFullTimeEnum),b=Object.values(u.DoubleChanceEnum);if(n===o.MarketEnum.FT_1X2||n===o.MarketEnum.HT_1X2){if(s.includes(r))return new p.default(e,n,r)}else if(n===o.MarketEnum.HT_FT){if(a.includes(r))return new f.default(e,r)}else if(n===o.MarketEnum.DOUBLE_CHANCE){if(b.includes(r))return new h.default(e,r)}else if(n===o.MarketEnum.CORRECT_SCORE||n===o.MarketEnum.CORRECT_SCORE_ADVANCED||n===o.MarketEnum.CORRECT_SCORE_HT){if("string"==typeof r&&/\d+:\d+/.test(r))return new d.default(e,n,r)}else if(n===o.MarketEnum.CORNERS_MATCH){if("number"==typeof r)return new l.default(e,r)}else if(n===o.MarketEnum.BOTH_TEAMS_SCORE){if(t.isPredictionBoolean(r))return new c.default(e,r)}else if(n===o.MarketEnum.RED_CARD_MATCH){if(t.isPredictionBoolean(r))return new w.default(e,r)}else if(n===o.MarketEnum.PENALTY_MATCH){if(t.isPredictionBoolean(r))return new y.default(e,r)}else if(o.playerMarkets.includes(n)){var _="OWN_GOAL";if(t.validatePlayerId(n,i),n===o.playerMarketNobodyPrediction&&t.isPredictionBoolean(r)){var E=i&&i===_?_:i;return new g.default(e,n,r,E)}if(i&&t.isPredictionBoolean(r))return new g.default(e,n,r,i)}else if(o.MarketsOverGoals.includes(n)){if(t.isPredictionBoolean(r))return new v.default(e,n,r)}else if(o.MarketsOverCorners.includes(n)&&t.isPredictionBoolean(r))return new m.default(e,n,r);t.throwInvalidPredictionException(r,n)},this.validateFixtureFields=function(e){var n=Object.keys(e);n.forEach((function(e){_.validFixtureFields.includes(e)||t.throwInvalidParamException([e])}));var r=_.validFixtureFields.filter((function(e){if("matchType"!==e&&!n.includes(e))return e}));r.length&&t.throwMissingFieldsException("fixtures",r),t.validatePredictionKey(e.market,e.prediction)},this.validateTiebreaker=function(e){var n=Object.keys(e);n.length&&"object"==typeof e||t.throwInvalidType("tiebreaker","object");var r=Object.keys(new E.default)[0];n.forEach((function(e){r!==e&&t.throwInvalidParamException([e])})),n.includes(r)||t.throwMissingFieldsException("tiebreaker",[r]),"number"!=typeof e.goldenGoal&&t.throwInvalidType("goldenGoal","number")},this.validatePredictionKey=function(e,n){if("object"==typeof n){var r=Object.keys(n),i=["value"];if(r.length||t.throwMissingFieldsException("prediction",i),1!==r.length||r.includes(i[0])||t.throwInvalidParamException(r),r.length>1){o.playerMarkets.includes(e)&&i.push("playerId");var s=r.filter((function(e){return!i.includes(e)}));s.length&&t.throwInvalidParamException(s)}}else t.throwInvalidType("prediction","object")},this.validatePlayerId=function(e,n){var r="playerId";e!==o.playerMarketNobodyPrediction&&(n||t.throwInvalidParamException([r]),"string"!=typeof n&&t.throwInvalidType(r,"string"))},this.validateMarket=function(e){Object.values(o.MarketEnum).includes(e)||t.throwInvalidMarketException(e)},this.validateMarketTopX=function(e){e!==o.MarketEnum.CORRECT_SCORE&&e!==o.MarketEnum.CORRECT_SCORE_ADVANCED&&t.throwInvalidMarketException(e,"TOP_X")},this.isPredictionBoolean=function(e){return"boolean"==typeof e},this.throwInvalidPredictionException=function(e,n){var o=(0,a.invalidPredictionMessage)(e,n);if("default"===t.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_PREDICTION,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.throwInvalidMarketException=function(e,n){var o;if(o=n&&"TOP_X"===n?(0,a.invalidMarketTopXMessage)(e):(0,a.invalidMarketMessage)(e),"default"===t.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_MARKET,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.throwInvalidParamException=function(e){var n=(0,a.invalidFieldMessage)(e);if("default"===t.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_FIELD,n);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,n).response},this.throwMissingFieldsException=function(e,n){var o=(0,a.missingFieldsMessage)(e,n);if("default"===t.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_FIELD,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.throwInvalidType=function(e,n){var o=(0,a.invalidTypeMessage)(e,n);if("default"===t.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.errorHandlingMode=e}},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(7232),u=n(4268);t.default=function(e,t,n,c,l,d){var h=this;this.idsRemapper=null,this.profileHttps=null,this.profileService=null,this.localStorage=null,this.profileFacade=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,n;return i(this,(function(r){switch(r.label){case 0:return this.isFetching?(console.log("Another thread is fetching profile..."),[4,this.delay(100)]):[3,2];case 1:return r.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,r.label=3;case 3:return r.trys.push([3,5,,6]),[4,this.profileFacade.getOwn()];case 4:return t=r.sent(),this.setOwnProfile(t),[3,6];case 5:throw n=r.sent(),this.isFetching=!1,n;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.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=JSON.parse(JSON.stringify(e)),[4,this.idsRemapper.remapInterests(t.interests)];case 2:return[2,n.sent()]}}))}))},this.showFullInterests=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)),[4,this.idsRemapper.showFullInterests(t.interests)];case 2:return[2,n.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(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.follow(e)];case 1:return t=r.sent(),[4,this.profileFacade.updateOwnProfile()];case 2:return n=r.sent(),this.setOwnProfile(n),[2,t]}}))}))},this.unfollow=function(e){return r(h,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.unfollow(e)];case 1:return t=r.sent(),[4,this.profileFacade.updateOwnProfile()];case 2:return n=r.sent(),this.setOwnProfile(n),[2,t]}}))}))},this.getStats=function(){return r(h,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getStats()];case 1:return e=t.sent(),[4,this.idsRemapper.remapSuccessRatesEntities(e)];case 2:return[2,t.sent()]}}))}))},this.getBadges=function(){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getBadges()];case 1:return[2,e.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.idsRemapper.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.idsRemapper.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.setNicknamePromise=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.nickname=e,[2,this]}}))}))},this.setNickname=function(e){return h.promises.push(h.setNicknamePromise(e)),h},this.setNamePromise=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.name=e,[2,this]}}))}))},this.setName=function(e){return h.promises.push(h.setNamePromise(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,s,a;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.profileService.extractUpdatedProps(e,t),this.modified=!1,this.expireAt=0,Object.keys(n).length?[4,this.profileHttps.updateProfile(n)]:[3,5];case 4:return r=i.sent(),s=JSON.parse(JSON.stringify(r)),this.setOwnProfile(s),this.localStorage.setOwnProfile(s),delete r.interests,[2,r];case 5:return delete(a=JSON.parse(JSON.stringify(this.ownProfile))).interests,[2,a]}}))}))},this.idsRemapper=e,this.localStorage=t,this.profileHttps=n,this.profileService=new u.default,this.profileFacade=new o.default(t,n,c)}},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);t.default=function(e,t,n,a){var o=this;this.idsRemapper=null,this.profileHttps=null,this.activityHttps=null,this.profileFacade=null,this.profileId="",this.setId=function(e){return o.profileId=e,o},this.getProfile=function(){return r(o,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(o,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(o,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=JSON.parse(JSON.stringify(e)),[4,this.idsRemapper.remapInterests(t.interests)];case 2:return[2,n.sent()]}}))}))},this.showFullInterests=function(){return r(o,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=JSON.parse(JSON.stringify(e)),[4,this.idsRemapper.showFullInterests(t.interests)];case 2:return[2,n.sent()]}}))}))},this.getFollowers=function(e){return r(o,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(o,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(o,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.getStats=function(e){return r(o,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.activityHttps.getStats(this.profileId,e)];case 1:return t=n.sent(),[4,this.idsRemapper.remapSuccessRatesEntities(t)];case 2:return[2,n.sent()]}}))}))},this.getBadges=function(){return r(o,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileHttps.getBadges(this.profileId)];case 1:return[2,e.sent()]}}))}))},this.idsRemapper=e,this.profileHttps=n,this.activityHttps=a,this.profileFacade=new s.default(t,n,a)}},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,n){var o=this;this.isBrowser=!1,this.localStorage={},this.profileHttps=null,this.activityHttps=null,this.getOwn=function(){return r(o,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.getLocalStorageData("profile"))?[2,JSON.parse(JSON.stringify(e))]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getProfile()];case 2:return n=i.sent(),this.localStorage.setOwnProfile(n),[2,n];case 3:throw t=i.sent(),console.warn("There was a problem retrieving your profile: ",t),t;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.profileHttps.getProfile()];case 6:return[2,n=i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving your profile: ",r),r;case 8:return[2]}}))}))},this.updateOwnProfile=function(){return r(o,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.profileHttps.getProfile()];case 1:return e=n.sent(),this.localStorage.setOwnProfile(e),[2,e];case 2:throw t=n.sent(),console.warn("There was a problem retrieving your profile: ",t),t;case 3:return[2]}}))}))},this.getByIds=function(e,t){return r(o,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=t||!1,[4,this.profileHttps.getProfiles(e,t)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the selected profiles: "+e.join(",")+" ",n),n;case 3:return[2]}}))}))},this.getById=function(e){return r(o,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.profileHttps.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(e){return r(o,void 0,void 0,(function(){var t,n,r,s;return i(this,(function(i){switch(i.label){case 0:return e=e||!1,this.isBrowser?(t=this.localStorage.getProfileCountries())&&t.length>0?[2,t]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getCountries(e)];case 2:return n=i.sent(),this.localStorage.setProfileCountries(n),[2,n];case 3:throw r=i.sent(),console.warn("There was a problem retrieving profile countries: ",r),r;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.profileHttps.getCountries(e)];case 6:return[2,i.sent()];case 7:throw s=i.sent(),console.warn("There was a problem retrieving profile countries: ",s),s;case 8:return[2]}}))}))},this.getFollowers=function(e,t){return r(o,void 0,void 0,(function(){var n,r,s,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),e&&(e=new a.default(e)),[4,this.profileHttps.getFollowers(e,t)];case 1:return n=i.sent(),(r=n.data.map((function(e){return e.followerId}))).length?[4,this.getByIds(r)]:[3,3];case 2:return s=i.sent(),o=n.data.map((function(e){return s.forEach((function(t){e.followerId===t.id&&(e.name=t.name,e.nickname=t.nickname,e.avatar=t.avatar)})),e})),n.data=o,[2,n];case 3:return[2,n];case 4:throw u=i.sent(),console.warn("There was a problem retrieving your followers: ",u),u;case 5:return[2]}}))}))},this.getFollowing=function(e,t){return r(o,void 0,void 0,(function(){var n,r,s,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),e&&(e=new a.default(e)),[4,this.profileHttps.getFollowing(e,t)];case 1:return n=i.sent(),(r=n.data.map((function(e){return e.followingId}))).length?[4,this.getByIds(r)]:[3,3];case 2:return s=i.sent(),o=n.data.map((function(e){return s.forEach((function(t){e.followingId===t.id&&(e.name=t.name,e.nickname=t.nickname,e.avatar=t.avatar)})),e})),n.data=o,[2,n];case 3:return[2,n];case 4:throw u=i.sent(),console.warn("There was a problem retrieving your following profiles: ",u),u;case 5:return[2]}}))}))},this.follow=function(e){return r(o,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.profileHttps.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(o,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.profileHttps.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.getStats=function(){return r(o,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.getLocalStorageData("statistics"))&&Object.keys(e).length?[2,JSON.parse(JSON.stringify(e))]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.activityHttps.getStats()];case 2:return t=i.sent(),this.localStorage.setProfileStats(t),[2,t];case 3:throw n=i.sent(),console.warn("There was a problem retrieving own profile statistics: ",n),n;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.activityHttps.getStats()];case 6:return[2,i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving own profile statistics: ",r),r;case 8:return[2]}}))}))},this.getBadges=function(){return r(o,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.getLocalStorageData("badges"))?[2,e]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getBadges()];case 2:return t=i.sent(),this.localStorage.setProfileBadges(t),[2,t];case 3:throw n=i.sent(),console.warn("There was a problem retrieving own profile badges: ",n),n;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.profileHttps.getBadges()];case 6:return[2,i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving own profile badges: ",r),r;case 8:return[2]}}))}))},this.getLocalStorageData=function(e){var t=Math.floor(Date.now()/1e3),n=o.localStorage.getExpiration("profile",e);switch(e){case"profile":if(n>t)return o.localStorage.getOwnProfile();case"statistics":if(n>t)return o.localStorage.getProfileStats();case"badges":if(n>t)return o.localStorage.getProfileBadges();default:return null}},this.isBrowser="undefined"!=typeof window,this.localStorage=e,this.profileHttps=t,this.activityHttps=n}},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.nickname=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.nickname=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.nickname=null,this.avatar=null,this.gender=null,this.country=null,this.birthDate=null,this.interests=[],this.followingCount=0,this.followersCount=0}},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.nickname=e.nickname,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.id=e.id,t.name=e.name,t.nickname=e.nickname,t.avatar=e.avatar,t.gender=e.gender,t.country=e.country,t.birthDate=e.birth_date,t.interests=e.interests?e.interests:[],t.followingCount=e.following_count,t.followersCount=e.followers_count,t}}},1316:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5123);t.default=function(){this.successRates=new r.default}},9826:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.model=null}},5123:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){}},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),d=n(4289),h=n(595),p=n(1022),f=n(4912);t.default=function(e){var t=this;this.idsRemapper=null,this.profileHttps=null,this.activityHttps=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(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getCountries(e)];case 1:return[2,t.sent()]}}))}))},this.getByIds=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getByIds(e,n)];case 1:return[2,t.sent()]}}))}))},this.profileHttps=new s.default(e),this.activityHttps=new p.default(e),this.footballHttps=new h.default(e),this.idMapping=new a.default(e),this.localStorage=new u.default(e),this.footballFacade=new d.default(e,this.localStorage,this.footballHttps,this.idMapping),this.profileFacade=new o.default(this.localStorage,this.profileHttps,this.activityHttps),this.idsRemapper=new f.default(e,this.footballFacade),this.ownProfileBuilder=new c.default(this.idsRemapper,this.localStorage,this.profileHttps,this.activityHttps,this.idMapping,this.footballFacade),this.profileBuilder=new l.default(this.idsRemapper,this.localStorage,this.profileHttps,this.activityHttps)}},4268:function(e,t){"use strict";var n=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});t.default=function(){var e=this;this.extractUpdatedProps=function(t,n){var r=["name","nickname","gender"],i={};return Object.keys(t).forEach((function(s){if(r.includes(s)&&t[s]!==n[s])i[s]=n[s];else if("birthDate"===s)(null===n[s]||null===t[s]&&n[s]||t[s]!==n[s])&&(i.birth_date=n[s]);else if("country"===s)null===n[s]?i.country_id=n[s]:(null===t[s]&&n[s]||t[s].id!==n[s].id)&&(i.country_id=n[s].id);else if("interests"===s){var a=t[s],o=n[s];o.length&&e.isNewInterest(a,o)?i[s]=e.updateInterests(a,o):!o.length&&a.length?i[s]=o:a.length===o.length||e.isNewInterest(a,o)||(i[s]=o)}})),i},this.updateInterests=function(t,r){if(t.length===r.length){var i=e.extractSameAndNewInterests(t,r),s=i[0],a=i[1];return n(n([],a,!0),s,!0)}return r},this.isNewInterest=function(t,n){var r=!1;return e.extractSameAndNewInterests(t,n)[0].length?r=!0:r},this.extractSameAndNewInterests=function(e,t){var n=t.filter((function(t){return e.some((function(e){return t.id===e.id&&t.type===e.type&&t.source===e.source&&t.favourite===e.favourite}))}));return[t.filter((function(t){return!e.some((function(e){return t.id===e.id&&t.type===e.type&&t.source===e.source&&t.favourite===e.favourite}))})),n]}}},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),d=n(1399),h=n(7782),p=n(7686),f=n(2310),m=n(8097),v=n(4904),y=n(5318),g=n(4021),w=n(2535);t.default=function(e,t){var n=this;this.idMapping=null,this.predictorHttps=null,this.predictorService=null,this.predictorValidator=null,this.clientHttps=null,this.errorHandlingMode=null,this.getConfig=function(){return r(n,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.clientHttps.getConfig(p.FeatureConfigType.TOP_X)];case 1:return e=t.sent(),this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(e)];case 2:return[2,t.sent()];case 3:return[2,e]}}))}))},this.getGames=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 t=t||!1,n=this.predictorService.initGameFilters("TOP_X",e),[4,this.predictorHttps.getGames(n,t)];case 1:return r=i.sent(),[4,this.predictorService.remapMatchIdsFixtures(r)];case 2:return[2,i.sent()]}}))}))},this.getGameById=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||!1,[4,this.predictorHttps.getGameById(e,t)];case 1:return n=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(n)];case 2:return[2,r.sent()]}}))}))},this.getGamePredictions=function(e,t,s){return r(n,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return s=s||!1,t&&(t.type&&delete t.type,t.status&&delete t.status,t=new h.default(t)),[4,this.predictorHttps.getGamePredictions(e,s,t)];case 1:return[2,n.sent()]}}))}))},this.getGameResults=function(e,t,s){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return s=s||!1,t&&(t=new c.default(t)),[4,this.predictorHttps.getGameResults(e,s,t)];case 1:return n=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(n)];case 2:return[2,r.sent()]}}))}))},this.getCurrentGameResults=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 e=e||!1,t={status:u.GameStatusEnum.OPEN,type:"TOP_X"},t=new c.default(t),[4,this.predictorHttps.getGames(t,e)];case 1:return n=i.sent(),r=this.predictorService.getCurrentGameId(n),[4,this.getGameResults(r,null,e)];case 2:return[2,i.sent().data[0]]}}))}))},this.play=function(e){return r(n,void 0,void 0,(function(){var t,n,r,a,o=this;return i(this,(function(i){switch(i.label){case 0:return t=new d.default(e),(t=this.predictorValidator.validateBodyFields("TOP_X",t)).fixtures=t.fixtures.map((function(e){return o.predictorValidator.validateFixture(e.matchId,e.market,e.prediction.value)})),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,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 e&&e.limit&&this.validateLimitFilterOnGames(e.limit),t=t||!1,n=this.predictorService.initGameTypePredictions("TOP_X",e),r=[],[4,this.predictorHttps.getMyPredictionsNoRemap(n)];case 1:return(s=i.sent()).data.length>0?(s.data.forEach((function(e){e.game_instance_id&&r.push(e.game_instance_id)})),a=this.predictorService.initGameFilters("TOP_X",null,r),[4,this.predictorHttps.getUserGameEditions(a,t)]):[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.getMyGamePrediction=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=this.predictorService.initGameTypePredictions("TOP_X"),[4,this.predictorHttps.getMyPredictions(t)];case 1:return(n=i.sent()).data.length>0?[2,(r=n.data.filter((function(t){return t.gameInstanceId===e}))).length?r[0]:null]:[2,null]}}))}))},this.getUserGameEditions=function(e,t,s){return r(n,void 0,void 0,(function(){var n,r,a,o,u;return i(this,(function(i){switch(i.label){case 0:return t&&t.limit&&this.validateLimitFilterOnGames(t.limit),s=s||!1,n=this.predictorService.initGameTypePredictions("TOP_X",t),r=[],[4,this.predictorHttps.getUserPredictionsNoRemap(e,n)];case 1:return(a=i.sent()).data.length>0?(a.data.forEach((function(e){e.game_instance_id&&r.push(e.game_instance_id)})),o=this.predictorService.initGameFilters("TOP_X",null,r),[4,this.predictorHttps.getUserGameEditions(o,s)]):[3,4];case 2:return u=i.sent(),[4,this.predictorService.addPredictionProp(a,u)];case 3:return[2,i.sent()];case 4:return[2,new l.default]}}))}))},this.getUserGamePrediction=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 s=s||!1,n=this.predictorService.initGameTypePredictions("TOP_X"),[4,this.predictorHttps.getUserPredictions(e,s,n)];case 1:return(r=i.sent()).data.length>0?[2,(a=r.data.filter((function(e){return e.gameInstanceId===t}))).length?a[0]:null]:[2,null]}}))}))},this.getMarketsResultsForGame=function(e,t){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getMarketResultsForGame(e,t)];case 1:return n=r.sent(),[4,this.predictorService.completeGameMarketResults(n,"TOP_X")];case 2:return[2,r.sent()]}}))}))},this.getGameWinners=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.predictorHttps.getContestWinners(e)];case 1:return t=r.sent(),[4,this.getGameById(e)];case 2:return n=r.sent(),t.contestModel=n,[2,this.predictorService.completeContestWinners(t)]}}))}))},this.validateLimitFilterOnGames=function(e){if("default"===n.errorHandlingMode&&e>50)throw new m.default(g.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,y.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED);if("standard"===n.errorHandlingMode&&e>50)throw new w.default(g.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,y.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED).response},this.idMapping=t,this.errorHandlingMode=e.errorHandlingMode,this.predictorValidator=new f.default(e.errorHandlingMode),this.predictorHttps=new a.default(e,t),this.predictorService=new o.default(e,t),this.clientHttps=new p.default(e)}},1180:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.enabled=!1,this.minFixtures=null,this.maxFixtures=null,this.competitionsWhitelist=null}},7482:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6899);t.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new r.default}},5967:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6899),i=n(3381);t.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new r.default,this.prediction=new i.default}},6247:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.adContent=null,t}return i(t,e),t}(n(3751).default);t.default=s},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:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=n(4800),a=n(853),o=function(e){function t(t){var n=e.call(this,t)||this;return n.status=null,n.type=null,n.gameIds=null,n.sortOrder=null,n.constructFiltersUrl=function(){var t=e.prototype.constructMainFiltersUrl.call(n);return n.status&&Object.values(a.GameStatusEnum).includes(n.status)&&(t+="&",t+="status="+n.status),n.type&&(t+="&",t+="type="+n.type),n.gameIds&&n.gameIds.length>0&&(t+="&",t+="game_ids="+n.gameIds.join(",")),n.sortOrder&&(t+="&",t+="sort_order="+n.sortOrder),t},n.status=t.status?t.status:null,n.type=t.type?t.type:null,n.gameIds=t.gameIds?t.gameIds:null,n.sortOrder=t.sortOrder?t.sortOrder:null,n}return i(t,e),t}(s.default);t.default=o},3751:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(439),i=n(4916);t.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.scheduleOpenAt=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new i.default,this.participantsCount=0,this.related=null,this.excludedProfileIds=null,this.rules=null,this.flags=null,this.images=new r.default,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),d=n(7640),h=n(1553),p=n(670),f=n(7974),m=n(4916),v=n(3483),y=n(1784),g=n(824),w=n(6899),b=n(6247);t.default=function(){var e=this;this.remapPaginatedGames=function(t){var n=new h.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.scheduleOpenAt=t.schedule_open_at,n.predictionsCutoff=t.predictions_cutoff,n.fixtures=t.fixtures.map((function(t){return e.remapFixturesResponse(t)})),n.tiebreaker=t.tiebreaker?e.remapTimeTiebreaker(t.tiebreaker.time_tiebreaker):null,n.participantsCount=t.participants_count,n.related=t.related?e.remapRelated(t.related):null,n.excludedProfileIds=t.excluded_profile_ids,n.rules=t.rules,n.flags=t.flags,n.images=t.images,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},this.remapGameByIdResponse=function(t){var n=new b.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.type=t.type,n.status=t.status,n.scheduleOpenAt=t.schedule_open_at,n.predictionsCutoff=t.predictions_cutoff,n.fixtures=t.fixtures.map((function(t){return e.remapFixturesResponse(t)})),n.tiebreaker=t.tiebreaker?e.remapTimeTiebreaker(t.tiebreaker.time_tiebreaker):null,n.participantsCount=t.participants_count,n.related=t.related?e.remapRelated(t.related):null,n.excludedProfileIds=t.excluded_profile_ids,n.rules=t.rules,n.flags=t.flags,n.adContent=t.ad_content,n.images=t.images,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.matchStatus.type=e.match_status.type,t.matchStatus.subType=e.match_status.sub_type,t},this.remapPaginatedUserTopXEditions=function(t){var n=new h.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.scheduleOpenAt=t.schedule_open_at,n.fixtures=t.fixtures.map((function(t){return e.remapTopXFixturesResponse(t)})),n.tiebreaker=t.tiebreaker?e.remapTimeTiebreaker(t.tiebreaker.time_tiebreaker):null,n.participantsCount=t.participants_count,n.related=t.related?e.remapRelated(t.related):null,n.excludedProfileIds=t.excluded_profile_ids,n.rules=t.rules,n.flags=t.flags,n.images=t.images,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.market=e.market,t.matchStatus.type=e.match_status.type,t.matchStatus.subType=e.match_status.sub_type,t},this.remapPaginatedUserMathQuizEditions=function(t){var n=new h.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.scheduleOpenAt=t.schedule_open_at,n.fixtures=t.fixtures.map((function(t){return e.remapMatchQuizFixturesResponse(t)})),n.tiebreaker=t.tiebreaker?e.remapTimeTiebreaker(t.tiebreaker.time_tiebreaker):null,n.participantsCount=t.participants_count,n.related=t.related?e.remapRelated(t.related):null,n.excludedProfileIds=t.excluded_profile_ids,n.rules=t.rules,n.flags=t.flags,n.images=t.images,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.matchStatus.type=e.match_status.type,t.matchStatus.subType=e.match_status.sub_type,t},this.remapPaginatedGameResults=function(t){var n=new h.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.remapGameMarketsResults=function(t){var n=new p.default;return n.gameId=t.game_id,n.results=e.remapMarketsResults(t.results),n.tieBreakers=t.tie_breakers?e.remapTieBreakers(t.tie_breakers):null,n},this.remapContestWinners=function(t){var n=new y.default;return n.contestId=t.contest_id,n.contestType=t.contest_type,n.description=t.description,n.userList=t.user_list.map((function(t){return e.remapUserListWinners(t)})),n},this.remapUserListWinners=function(e){var t=new g.default;return t.position=e.position,t.profileId=e.profile_id,t.note=e.note,t.tags=e.tags,t},this.remapTieBreakers=function(e){var t={goldenGoals:[]};return t.goldenGoals=e.golden_goals.map((function(e){return{minute:e.minute,matchId:e.match_id,matchModel:null,playerId:e.player_id,playerModel:null,goalType:e.goal_type}})),t},this.remapMarketsResults=function(t){var n=[];return t.forEach((function(t){var r={matchId:t.match_id,market:t.market,result:e.remapMarketResult(t.market,t.result),matchModel:null,playerModels:[],matchStatus:e.remapMarketsResultsMatchStatus(t.match_status)};n.push(e.deleteUnusefulField(r))})),n},this.remapMarketsResultsMatchStatus=function(e){var t=new w.default;return t.type=e.type,t.subType=e.sub_type,t},this.remapMarketResult=function(e,t){return f.endMarkMarkets.includes(e)?t[0]:f.playerMarkets.includes(e)?t:"true"===t[0]||"false"!==t[0]&&void 0},this.deleteUnusefulField=function(t){return f.playerMarkets.includes(t.market)&&!e.isPlayerMarketWithNoResult(t.market,t.result)||delete t.playerModels,t},this.isPlayerMarketWithNoResult=function(e,t){return f.playerMarkets.includes(e)&&0===t.length},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 d.default;return t.goldenGoal=e.golden_goal,t},this.remapTimeTiebreaker=function(e){var t=new m.default;return t.timeTiebreaker=e,t},this.remapRelated=function(e){return e.map((function(e){var t=new v.default;return t.entityId=e.entity_id,t.entityType=e.entity_type,t}))}}},8950:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4916);t.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.outcome=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new r.default,this.predictionId=null,this.participantsCount=0,this.related=null,this.excludedProfileIds=null,this.rules=null,this.flags=null,this.points=null,this.createdAt=null,this.updatedAt=null,this.predictionsMadeAt=null,this.scheduleOpenAt=null,this.images=null}},7640:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.goldenGoal=null}},4916:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.timeTiebreaker=!1}},1784:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.contestId="",this.contestType="GAME",this.contestModel=null,this.description="",this.userList=[]}},824:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.position="",this.profileId="",this.profileModel=null,this.note="",this.tags=[]}},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.market,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.getConfig=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getConfig()];case 1:return[2,e.sent()]}}))}))},this.getGames=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.getGames(e,n)];case 1:return[2,t.sent()]}}))}))},this.getGameById=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.getGameById(e,n)];case 1:return[2,t.sent()]}}))}))},this.getGamePredictions=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.topXFacade.getGamePredictions(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getGameResults=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.topXFacade.getGameResults(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getCurrentGameResults=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getCurrentGameResults(e)];case 1:return[2,t.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,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getMyGameEditions(e,n)];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,s){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,s)];case 1:return[2,t.sent()]}}))}))},this.getUserGamePrediction=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.topXFacade.getUserGamePrediction(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getMarketsResultsForGame=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.getMarketsResultsForGame(e,n)];case 1:return[2,t.sent()]}}))}))},this.getGameWinners=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getGameWinners(e)];case 1:return[2,t.sent()]}}))}))},this.idMapping=new s.default(e),this.topXFacade=new a.default(e,this.idMapping)}},4806:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=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())}))},s=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 a=n(4946),o=n(712);t.default=function(e,t,n){var u=this;this.idMapping=null,this.idSchema=null,this.native=a.IdSchemaEnum.NATIVE,this.footballFacade=null,this.remapSuccessRatesEntities=function(e){return i(u,void 0,void 0,(function(){var t,n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return t=e.successRates,n={competition:this.getIdsKeys(t.byFootballCompetition),team:this.getIdsKeys(t.byFootballTeam)},Object.values(n.competition).length?(r=e.successRates.byFootballCompetition,i=e.successRates,[4,this.setModels(r,n.competition,"competition")]):[3,2];case 1:i.byFootballCompetition=s.sent(),s.label=2;case 2:return Object.values(n.team).length?(a=e.successRates.byFootballTeam,o=e.successRates,[4,this.setModels(a,n.team,"team")]):[3,4];case 3:o.byFootballTeam=s.sent(),s.label=4;case 4:return[2,e]}}))}))},this.setModels=function(e,t,n){return i(u,void 0,void 0,(function(){var i,a;return s(this,(function(s){switch(s.label){case 0:switch(i=null,t=(0,o.sortArrayInAscOrder)(t),n){case"competition":return[3,1];case"team":return[3,3]}return[3,5];case 1:return[4,this.footballFacade.getCompetitionsMapWithNativeIds(t)];case 2:case 4:return i=s.sent(),[3,5];case 3:return[4,this.footballFacade.getTeamsMapWithNativeIds(t)];case 5:return Object.keys(e).forEach((function(t){var n,s=i.get(t);(a=r(r({},a),((n={})[s.id]=e[t],n)))[s.id].model=s})),[2,a]}}))}))},this.getIdsKeys=function(e){var t=JSON.parse(JSON.stringify(e));return Object.keys(t)},this.remapInterestsToIdSchema=function(e){return i(u,void 0,void 0,(function(){var t,n,r,i,a,o,u,c,l,d;return s(this,(function(s){switch(s.label){case 0:return this.idSchema===this.native?[3,3]:e&&e.length>0?(t={},n={},e.forEach((function(e){t.hasOwnProperty(e.type)||(t[e.type]=[],n[e.type]=[]),t[e.type].push(e.id),n[e.type].push(e)})),[4,this.remapIdsObj(t,this.native,this.idSchema)]):[3,2];case 1:for(r=s.sent(),i=[],a=function(e,t){t.forEach((function(t,n){t.id=r[e][n],i.push(t)}))},o=0,u=Object.entries(n);o<u.length;o++)c=u[o],l=c[0],d=c[1],a(l,d);return[2,i];case 2:case 3:return[2,e]}}))}))},this.remapInterestToNative=function(e){return i(u,void 0,void 0,(function(){var t,n,r,i;return s(this,(function(s){switch(s.label){case 0:return this.idSchema===this.native?[3,2]:(t={},n=e.id,r=e.type,t[r]=[n],[4,this.remapIdsObj(t,this.idSchema,this.native)]);case 1:return i=s.sent(),e.id=i[r][0],[2,e];case 2:return[2,e]}}))}))},this.inquiryCustomInterests=function(e){var t=[];return e&&e.length>0&&(t=e.filter((function(e){return"CUSTOM"===e.source.toLocaleUpperCase()}))),t},this.remapInterests=function(e){return i(u,void 0,void 0,(function(){var t,n,r;return s(this,(function(i){switch(i.label){case 0:return(t=this.inquiryCustomInterests(e))&&t.length>0?(n=e.filter((function(e){return"CUSTOM"!==e.source.toLocaleUpperCase()})),[4,this.remapInterestsToIdSchema(n)]):[3,2];case 1:return r=i.sent(),t.forEach((function(e){return r.push(e)})),[2,r];case 2:return[4,this.remapInterestsToIdSchema(e)];case 3:return[2,i.sent()]}}))}))},this.showFullInterests=function(e){return i(u,void 0,void 0,(function(){var t,n,r,i,a,o,u,c;return s(this,(function(s){switch(s.label){case 0:return t=[],e&&e.length>0?(n=this.inquiryCustomInterests(e),t.push(n),r=e.filter((function(e){return"CUSTOM"!==e.source.toLocaleUpperCase()})),[4,this.getInterestsEntitiesMap(r)]):[3,2];case 1:return i=s.sent(),a=i.competitionsMap,o=i.teamsMap,u=i.playersMap,c=r.map((function(e){var t=null;return"competition"===e.type?((t=a.get(e.id))&&(e.id=t.id),e.model=t,e):"team"===e.type?((t=o.get(e.id))&&(e.id=t.id),e.model=t,e):"player"===e.type?(u?(e.model=u[e.id],e.id=u[e.id].id):e.model=t,e):void 0})),t.push(c),[2,t.flat()];case 2:return[2,t]}}))}))},this.getInterestsEntitiesMap=function(e){return i(u,void 0,void 0,(function(){var t,n,r,i,a,u,c;return s(this,(function(s){switch(s.label){case 0:return t=[],n=[],r=[],i=new Map,a=new Map,u=null,e.forEach((function(e){"competition"===e.type?t.push(e.id):"team"===e.type?n.push(e.id):"player"===e.type&&r.push(e.id)})),t.length?(c=(0,o.sortArrayInAscOrder)(t),[4,this.footballFacade.getCompetitionsMapWithNativeIds(c)]):[3,2];case 1:i=s.sent(),s.label=2;case 2:return n.length?(c=(0,o.sortArrayInAscOrder)(n),[4,this.footballFacade.getTeamsMapWithNativeIds(c)]):[3,4];case 3:a=s.sent(),s.label=4;case 4:return r.length?(c=(0,o.sortArrayInAscOrder)(r),[4,this.footballFacade.getPlayersMapWithNativeIds(c)]):[3,6];case 5:u=s.sent(),s.label=6;case 6:return[2,{competitionsMap:i,teamsMap:a,playersMap:u}]}}))}))},this.remapIdsObj=function(e,t,n){return i(u,void 0,void 0,(function(){return s(this,(function(r){switch(r.label){case 0:return[4,this.idMapping.idMappingFacade.getEntitiesByIds(e,t,n)];case 1:return[2,r.sent()]}}))}))},this.idMapping=n,this.idSchema=e.idSchema,this.footballFacade=t}},4912: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(4806);t.default=function(e,t){var n=this;this.idMapping=null,this.profileOperations=null,this.remapSuccessRatesEntities=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileOperations.remapSuccessRatesEntities(e)];case 1:return[2,t.sent()]}}))}))},this.remapInterestToNative=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileOperations.remapInterestToNative(e)];case 1:return[2,t.sent()]}}))}))},this.remapInterests=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileOperations.remapInterests(e)];case 1:return[2,t.sent()]}}))}))},this.showFullInterests=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileOperations.showFullInterests(e)];case 1:return[2,t.sent()]}}))}))},this.idMapping=new s.default(e),this.profileOperations=new a.default(e,t,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}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};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),d=n(9377),h=n(9596),p=n(267),f=n(7302),m=n(2141),v=n(7070),y=n(9580);e.FansUnitedSDK=function(e){var n=(new i.default).validate(e);if(n.idSchema.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.idSchema.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.idSchema.message.text),e.idSchema=a.IdSchemaEnum.NATIVE),n.environment.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.environment.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.environment.message.text),e.environment=l.EnvironmentEnum.PROD),n.lang.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.lang.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.lang.message.text),e.lang=d.LangEnum.EN),n.errorHandlingMode.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.errorHandlingMode.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.errorHandlingMode.message.text),e.errorHandlingMode=y.ErrorHandlingModeEnum.DEFAULT),n.authProvider.validation===c.ValidationResponseEnum.INVALID_VALUE&&console.warn(n.authProvider.message.text),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 h.default(e),matchQuiz:new p.default(e),activity:new f.default(e)};g(n)};var g=function(e){var t="authProvider",n="isValid";Object.keys(e).forEach((function(r){var i=e[r];if(r!==n&&r!==t){if(i.message.type===m.LogEnum.ERROR)throw new Error(i.message.text)}else r!==n&&r===t&&Object.keys(new v.default).forEach((function(e){if(i[e].message.type===m.LogEnum.ERROR)throw new Error(i[e].message.text)}))}))}})(),r})()}));
3
2
  //# sourceMappingURL=index.js.map