fansunited-sdk-umd 1.25.0 → 1.26.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,3 @@
1
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),f=n(5655),h=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||f.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 h("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 f=t;n.length;){var h=n.shift(),d=n.shift();try{f=h(f)}catch(t){d(t);break}}try{i=s(f)}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,f=9007199254740991,h=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]",T="[object Set]",S="[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,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ht=/\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+"]",Tt="\\d+",St="["+Et+"]",Pt="[^\\ud800-\\udfff"+Mt+Tt+"\\u2700-\\u27bf"+Et+It+"]",At="\\ud83c[\\udffb-\\udfff]",Ft="[^\\ud800-\\udfff]",xt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ct="[\\ud800-\\udbff][\\udc00-\\udfff]",kt="["+It+"]",Nt="(?:"+St+"|"+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+"?"+St+"+"+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_])",Tt,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[T]=Zt[S]=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[T]=$t[S]=$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){}}(),fe=le&&le.isArrayBuffer,he=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 Te(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 Se(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:h}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,Tt=e.TypeError,St=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=St.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,fn=It.floor,hn=Mt.getOwnPropertySymbols,dn=Ht?Ht.isBuffer:i,pn=e.isFinite,mn=St.join,vn=tn(Mt.keys,Mt),gn=It.max,yn=It.min,_n=it.now,wn=e.parseInt,bn=It.random,En=St.reverse,In=ca(e,"DataView"),Mn=ca(e,"Map"),On=ca(e,"Promise"),Rn=ca(e,"Set"),Tn=ca(e,"WeakMap"),Sn=ca(Mt,"create"),Pn=Tn&&new Tn,An={},Fn=La(In),xn=La(Mn),Cn=La(On),kn=La(Rn),Nn=La(Tn),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(Ti(t),sr(e,0,t.length))}function Zn(t){return Ca(Ti(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 fr(t,(function(t,i,a){e(r,t,n(t),a)})),r}function rr(t,e){return t&&Si(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:To(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 f=Ws(t);if(f){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 Ti(t,o)}else{var h=ha(t),d=h==w||h==b;if(Ys(t))return bi(t,u);if(h==M||h==m||d&&!a){if(o=c||d?{}:pa(t),!u)return c?function(t,e){return Si(t,fa(t),e)}(t,function(t,e){return t&&Si(e,Co(e),t)}(o,t)):function(t,e){return Si(t,la(t),e)}(t,rr(o,t))}else{if(!$t[h])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 T:return new i;case I:case S:return new i(t);case R:return function(t){var e=new t.constructor(t.source,ht.exec(t));return e.lastIndex=t.lastIndex,e}(t);case P:return r=t,Dn?Mt(Dn.call(r)):{}}}(t,h,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=f?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 Tt(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],f=null==n?l:n(l);if(l=r||0!==l?l:0,s&&f==f){for(var h=c;h--;)if(e[h]===f)continue t;u.push(l)}else a(e,f,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__=Sn?Sn(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(Sn){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 Sn?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]=Sn&&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 fr=Fi(_r),hr=Fi(wr,!0);function dr(t,e){var n=!0;return fr(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 fr(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 Tr(t,e){return null!=t&&e in Mt(t)}function Sr(t,e,n){for(var a=n?Me:Ie,s=t[0].length,o=t.length,u=o,c=r(o),l=1/0,f=[];u--;){var h=t[u];u&&e&&(h=Oe(h,Ve(e))),l=yn(h.length,l),c[u]=!n&&(e||s>=120&&h.length>=120)?new zn(u&&h):i}h=t[0];var d=-1,p=c[0];t:for(;++d<s&&f.length<l;){var m=h[d],v=e?e(m):m;if(m=n||0!==m?m:0,!(p?Xe(p,v):a(f,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),f.push(m)}}return f}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:ha(t),l=u?v:ha(e),f=(c=c==m?M:c)==M,h=(l=l==m?M:l)==M,d=c==l;if(d&&Ys(t)){if(!Ys(e))return!1;o=!0,f=!1}if(d&&!f)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 S:return t==e+"";case E:var o=$e;case T: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=f&&Ct.call(t,"__wrapped__"),w=h&&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 f=u[l];if(!(o?f in e:Ct.call(e,f)))return!1}var h=s.get(t),d=s.get(e);if(h&&d)return h==e&&d==t;var p=!0;s.set(t,e),s.set(e,t);for(var m=o;++l<c;){var v=t[f=u[l]],g=e[f];if(r)var y=o?r(g,v,f,e,t,s):r(v,g,f,t,e,s);if(!(y===i?v===g||a(v,g,n,r,s):y)){p=!1;break}m||(m="constructor"==f)}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],f=u[1];if(o&&u[2]){if(l===i&&!(c in t))return!1}else{var h=new Yn;if(r)var d=r(l,f,c,t,e,h);if(!(d===i?Fr(f,l,3,r,h):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 fr(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=To(n,t);return r===i&&r===e?So(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=Ta(t,n),c=Ta(e,n),l=o.get(c);if(l)$n(t,n,l);else{var f=s?s(u,c,n+"",t,e,o):i,h=f===i;if(h){var d=Ws(c),p=!d&&Ys(c),m=!d&&!p&&co(c);f=c,d||p||m?Ws(u)?f=u:zs(u)?f=Ti(u):p?(h=!1,f=bi(c,!0)):m?(h=!1,f=Ii(c,!0)):f=[]:io(c)||Vs(c)?(f=u,Vs(u)?f=yo(u):to(u)&&!Qs(u)||(f=pa(c))):h=!1}h&&(o.set(c,f),a(f,c,r,s,o),o.delete(c)),$n(t,n,f)}}(t,e,o,n,Hr,r,a);else{var u=r?r(Ta(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=Ti(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+fn(bn()*(e-t+1))}function zr(t,e){var n="";if(!t||e<1||e>f)return n;do{e%2&&(n+=t),(e=fn(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 f=u[c];(l=r?r(f,c,u):i)===i&&(l=to(f)?f: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 fr(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 f=fn((a+s)/2),h=n(t[f]),d=h!==i,p=null===h,m=h==h,v=uo(h);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?h<=e:h<e);g?a=f+1:s=f}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)?h:+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],f=e?e(l):l;if(l=n||0!==l?l:0,s&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue t;e&&u.push(f),o.push(l)}else i(u,f,n)||(u!==o&&u.push(f),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 fi(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 hi(t,e){var n=t;return n instanceof Vn&&(n=n.value()),Te(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),f=r(c+l),h=!i;++u<c;)f[u]=e[u];for(;++a<o;)(h||a<s)&&(f[n[a]]=t[a]);for(;l--;)f[u++]=t[a++];return f}function Ri(t,e,n,i){for(var a=-1,s=t.length,o=-1,u=n.length,c=-1,l=e.length,f=gn(s-u,0),h=r(f+l),d=!i;++a<f;)h[a]=t[a];for(var p=a;++c<l;)h[p+c]=e[c];for(;++o<u;)(d||a<s)&&(h[p+n[o]]=t[a++]);return h}function Ti(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function Si(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 Te(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 Tt(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,f,h){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<h){var I=en(_,b);return Xi(t,e,Li,i.placeholder,n,_,I,l,f,h-c)}var M=p?n:this,O=m?M[t]:t;return c=_.length,l?_=Ra(_,l):g&&c>1&&_.reverse(),d&&f<c&&(_.length=f),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,f){var h=8&e;e|=h?u:64,4&(e&=~(h?64:u))||(e&=-4);var d=[t,e,a,h?s:i,h?o:i,h?i:s,h?i:o,c,l,f],p=n.apply(i,d);return _a(t)&&Sa(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=ha(e);return n==E?$e(e):n==T?rn(e):function(t,e){return Oe(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Ji(t,e,n,s,l,f,h,d){var p=2&e;if(!p&&"function"!=typeof t)throw new Tt(a);var m=s?s.length:0;if(m||(e&=-97,s=l=i),h=h===i?h:gn(mo(h),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,f,h,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 f=o<3&&u[0]!==l&&u[o-1]!==l?[]:en(u,l);return(o-=f.length)<n?Xi(t,e,Li,s.placeholder,i,u,f,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,f=r(l+u),h=this&&this!==ae&&this instanceof e?s:t;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++o];return ge(h,a?n:this,f)}}(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:Sa)(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),f=s.get(e);if(l&&f)return l==e&&f==t;var h=-1,d=!0,p=2&n?new zn:i;for(s.set(t,e),s.set(e,t);++h<u;){var m=t[h],v=e[h];if(r)var g=o?r(v,m,h,e,t,s):r(m,v,h,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,fa)}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=hn?function(t){return null==t?[]:(t=Mt(t),Ee(hn(t),(function(e){return te.call(t,e)})))}:vu,fa=hn?function(t){for(var e=[];t;)Re(e,la(t)),t=qt(t);return e}:vu,ha=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?f: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&&ha(new In(new ArrayBuffer(1)))!=x||Mn&&ha(new Mn)!=E||On&&ha(On.resolve())!=O||Rn&&ha(new Rn)!=T||Tn&&ha(new Tn)!=A)&&(ha=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 T;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=Ti(t);r--;){var s=e[r];t[r]=va(s,n)?a[s]:i}return t}function Ta(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Sa=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__=Ti(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]?Sr(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]?Sr(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]?Sr(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),fs=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 hs(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:fr)(t,sa(e,3))}function _s(t,e){return(Ws(t)?we:hr)(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 fr(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 Ts(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,Ji(t,c,i,i,i,i,e)}function Ss(t,e){var n;if("function"!=typeof e)throw new Tt(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,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new Tt(a);function m(e){var n=r,a=s;return r=s=i,f=e,u=t.apply(a,n)}function v(t){return f=t,c=Pa(y,e),h?m(t):u}function g(t){var n=t-l;return l===i||n>=e||n<0||d&&t-f>=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-f)):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)&&(h=!!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),f=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 Tt(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 Tt(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=fe?Ve(fe):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=he?Ve(he):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<=f}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)&&ha(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)&&ha(t)==T};function oo(t){return"string"==typeof t||!Ws(t)&&eo(t)&&Mr(t)==S}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),fo=Wi((function(t,e){return t<=e}));function ho(t){if(!t)return[];if(qs(t))return oo(t)?sn(t):Ti(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=ha(t);return(e==E?$e:e==T?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 h;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)?h:+t}function yo(t){return Si(t,Co(t))}function _o(t){return null==t?"":oi(t)}var wo=Ai((function(t,e){if(ba(e)||qs(e))Si(e,xo(e),t);else for(var n in e)Ct.call(e,n)&&tr(t,n,e[n])})),bo=Ai((function(t,e){Si(e,Co(e),t)})),Eo=Ai((function(t,e,n,r){Si(e,Co(e),t,r)})),Io=Ai((function(t,e,n,r){Si(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],f=t[l];(f===i||Hs(f,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 To(t,e,n){var r=null==t?i:Er(t,e);return r===i?n:r}function So(t,e){return null!=t&&da(t,e,Tr)}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})),Si(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 So(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__=Ti(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),fu=Bi(be),hu=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 Tt(a);return t=mo(t),function(){if(--t<1)return e.apply(this,arguments)}},Un.ary=Ts,Un.assign=wo,Un.assignIn=bo,Un.assignInWith=Eo,Un.assignWith=Io,Un.at=Mo,Un.before=Ss,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=hs,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)?Ti(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 Tt(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?fi(t,sa(e,3),!0,!0):[]},Un.dropWhile=function(t,e){return t&&t.length?fi(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 Ss(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=fu,Un.overSome=hu,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 Tt(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 Tt(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?fi(t,sa(e,3),!1,!0):[]},Un.takeWhile=function(t,e){return t&&t.length?fi(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 Tt(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=ho,Un.toPairs=Uo,Un.toPairsIn=Ho,Un.toPath=function(t){return Ws(t)?Oe(t,Da):uo(t)?[t]:Ti(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 Ts(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=fs,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=To,Un.gt=Bs,Un.gte=Gs,Un.has=function(t,e){return null!=t&&da(t,e,Rr)},Un.hasIn=So,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=ha(t);if(e==E||e==T)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<=f},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)&&ha(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=fo,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(fn(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)?Te:Ue,i=arguments.length<3;return r(t,sa(e,4),n,i,fr)},Un.reduceRight=function(t,e,n){var r=Ws(t)?Se:Ue,i=arguments.length<3;return r(t,sa(e,4),n,i,hr)},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=ha(t);return e==E||e==T?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,f=e.interpolate||_t,h="__p += '",d=Ot((e.escape||_t).source+"|"+f.source+"|"+(f===Q?ft:_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),h+=t.slice(l,u).replace(wt,Qe),n&&(a=!0,h+="' +\n__e("+n+") +\n'"),o&&(s=!0,h+="';\n"+o+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e})),h+="';\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 h="with (obj) {\n"+h+"\n}\n";h=(s?h.replace(G,""):h).replace(V,"$1").replace(W,"$1;"),h="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")+h+"return __p\n}";var v=$o((function(){return Et(u,p+"return "+h).apply(i,c)}));if(v.source=h,Ks(v))throw v;return v},Un.times=function(t,e){if((t=mo(t))<1||t>f)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,f):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,f=c;for(a.global||(a=Ot(a.source,_o(ht.exec(a))+"g")),a.lastIndex=0;l=a.exec(f);)var h=l.index;c=c.slice(0,h===i?u:h)}}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),f=function(t){var e=a.apply(Un,Re([t],o));return r&&h?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=s&&!h,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:[f],thisArg:i}),new Gn(v,h)}return p&&m?t.apply(this,o):(v=this.thru(f),p?r?v.value()[0]:v.value():v)})})),_e(["pop","push","shift","sort","splice","unshift"],(function(t){var e=St[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__=Ti(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ti(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ti(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__,f=l.length,h=0,d=yn(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return hi(t,this.__actions__);var p=[];t:for(;u--&&h<d;){for(var m=-1,v=t[c+=e];++m<f;){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[h++]=v}return p},Un.prototype.at=ps,Un.prototype.chain=function(){return hs(this)},Un.prototype.commit=function(){return new Gn(this.value(),this.__chain__)},Un.prototype.next=function(){this.__values__===i&&(this.__values__=ho(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 hi(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),f=n(6965),h=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 f.default,lang:new a.default,errorHandlingMode:new h.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),f=n(5601);(o=e.FeatureConfigType||(e.FeatureConfigType={})).PREDICTOR="predictor",o.TOP_X="topX",o.MATCH_QUIZ="matchQuiz",o.LOYALTY="loyalty";var h=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 f.default(e),n.featureConfigRemapper=new c.default,n}return i(e,t),e}(l.default);e.default=h},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),f=n(5827),h=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,f,h,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,f="/competitions"+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 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 f="/competitions"+this.apiSignInUrl,t&&(f+=""+t.constructFilterUrl()),e&&(f+="&disable_cache="+r),[4,this.instance.get(f)];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 h=s.sent(),d=this.transformAxiosErrorToFansUnitedException(h),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,f,h,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,h="/teams"+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 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 f=new _.default,h="/teams"+this.apiSignInUrl,t&&(h+=""+t.constructFilterUrl()),e&&(h+="&disable_cache="+r),[4,this.instance.get(h)];case 6:return n=s.sent(),f.meta=this.footballMetaRemapper.remapMetaProp(n.data.meta),f.data=n.data.data.map((function(t){return m.teamBasicRemapper.fromResponse(t)})),[2,f];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,f,h,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,h="/players"+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 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 f=new _.default,h="/players"+this.apiSignInUrl,t&&(h+=""+t.constructFilterUrl()),e&&(h+="&disable_cache="+r),[4,this.instance.get(h)];case 6:return n=s.sent(),f.meta=this.footballMetaRemapper.remapMetaProp(n.data.meta),f.data=n.data.data.map((function(t){return m.playerBasicRemapper.fromResponse(t)})),[2,f];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 f.default,n.teamFullRemapper=new h.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 f=t.authProvider.getIdToken();return l.headers.Authorization="Bearer "+f,n.instanceAuth(l)}if("standard"===n.errorHandlingMode&&401===(null===(u=e.response)||void 0===u?void 0:u.status)){var h=new o.default(a.ErrorCodes.UNAUTHORIZED,s.ErrorStatuses.UNAUTHORIZED,c.ErrorMessages.EXPIRED_TOKEN);return Promise.reject(h)}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,f,h,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,f.instance.get("/football"+f.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=f.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]}}))},f=this,h=0,d=u,m.label=1;case 1:return h<d.length?(p=d[h],[5,l(p)]):[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 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),f=n(7746),h=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 f.default,n}return i(e,t),e}(n(7724).default);e.default=h},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),f=n(1553),h=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 f.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 f.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 f.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 h.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),f=n(1712),h=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,f,h,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:f=s.sent(),r.push.apply(r,this.profileRemapper.profilesFromResponse(f.data.data)),s.label=3;case 3:return a++,[3,1];case 4:return[2,r];case 5:return h="/profiles"+this.apiSignInUrl+"&profile_ids="+t.join(","),e&&(h+="&disable_cache="+n),[4,this.instance.get(h)];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 f.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 f.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=h},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,f;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 f=new c.default(t,n,s,o),[2,this.activityHttps.createActivity(f)]}}))}))},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}},316:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.totalItems=0}},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(316),i=n(1517);e.default=function(){this.meta=new r.default,this.data=[new i.default]}},1382:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.label=null}},7976:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.type=null,this.id=null,this.label=null}},2820:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1382),i=n(7976);e.default=function(){this.content=new i.default,this.tags=[],this.campaign=new r.default}},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,n,r=new o.default;return r.id=t.id,r.profileId=t.profile_id,r.action=t.action,r.context.content=null!==(e=t.context.content)&&void 0!==e?e:r.context.content,r.context.tags=t.context.tags,r.context.campaign=null!==(n=t.context.campaign)&&void 0!==n?n:r.context.campaign,r.points=t.points,r},this.remapActivitiesResponse=function(e){var n=new u.default;return n.meta.totalItems=e.meta.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,f,h,d;return i(this,(function(i){switch(i.label){case 0:return 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)];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++)f=l[c],h=f[0],d=f[1],u(h,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,f){var h=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(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.countriesFacade.getCountriesWithIdMapping(t)]}))}))},this.getCompetitions=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.competitionsFacade.getCompetitionsIdMapping(t,e)]}))}))},this.getCompetitionById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.competitionsFacade.getCompetitionByIdIdMapping(t,e)]}))}))},this.getTopCompetitions=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.competitionsFacade.getTopCompetitionsIdMapping(t)]}))}))},this.getCompetitionsMapWithNativeIds=function(t){return r(h,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(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getTeamsIdMapping(t,e)]}))}))},this.getTeamById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getTeamByIdIdMapping(t,e)]}))}))},this.getTopTeams=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.teamsFacade.getTopTeamsIdMapping(t)]}))}))},this.getNextMatchForTeam=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getNextMatchForTeamIdMapping(t,e)]}))}))},this.getPrevMatchForTeam=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getPrevMatchForTeamIdMapping(t,e)]}))}))},this.getTeamsMapWithNativeIds=function(t){return r(h,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(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPlayersIdMapping(t,e)]}))}))},this.getPlayerById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPlayerIdMapping(t,e)]}))}))},this.getTopPlayers=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.playerFacade.getTopPlayersIdMapping(t)]}))}))},this.getNextMatchForPlayer=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getNextMatchForPlayerIdMapping(t,e)]}))}))},this.getPrevMatchForPlayer=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPrevMatchForPlayerIdMapping(t,e)]}))}))},this.getPlayersMapWithNativeIds=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.playerFacade.getPlayersMapWithNativeIds(t)]}))}))},this.getMatches=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.matchFacade.getMatchesIdMapping(t,e)]}))}))},this.getMatchById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.matchFacade.getMatchIdMapping(t,e)]}))}))},this.search=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.searchFacade.searchIdMapping(t,e)]}))}))},this.countriesFacade=new a.default(e,n,f),this.competitionsFacade=new s.default(e,n,f),this.teamsFacade=new o.default(t,n,f),this.playerFacade=new u.default(t,n,f),this.matchFacade=new c.default(t,n,f),this.searchFacade=new l.default(n,f)}},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,f,h;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(),f=c,[4,this.idMapping.remapEntities(c.data,"match")];case 11:return f.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(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),f=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=f},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.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=""}},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)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});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.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),f=n(9502),h=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,f,h,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:f=i.sent(),n=f.data,i.label=4;case 4:return o.length?(h={gameIds:o},[4,this.matchQuizFacade.getGames(h)]):[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 h.default(t),this.topXFacade=new f.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),f=n(7782),h=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 f.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 h.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),f=n(1732),h=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,h,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,h="",[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 f.default&&"OWN_GOAL"!==r.prediction.playerId?r.prediction.playerId?(h=r.prediction.playerId,_=r.prediction,[4,this.predictorService.remapPlayerIdToNative([h])]):[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=h),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 h.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),f=n(8452);e.default=function(){var t=this;this.remapPredictorConfig=function(t){var e=new f.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 f=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(f,void 0,void 0,(function(){var e,n,r,s,o,u,c,l,f,h,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(f=0,h=t;f<h.length;f++)d=h[f],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),f=n(2524),h=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 f.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 h.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),f=n(8950),h=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),T=n(6409),S=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,f,h,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"!==(f=l[c])&&"OWN_GOAL"!==f&&n.push(f);return n.length?[4,this.playerFacade.getPlayersMapWithNativeIds(n)]:[2,t];case 1:for(h=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[h[w].id]=g[w],g[h[w].id].model=h[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,f,h,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]:(f=Object.keys(i[n]).filter((function(t){return"NOBODY"!==t&&"OWN_GOAL"!==t}))).length?[4,this.playerFacade.getPlayersMapWithNativeIds(f)]:[3,8];case 7:return d=a.sent(),[3,9];case 8:d={},a.label=9;case 9:h=d,Object.keys(h).length&&Object.keys(i[n]).forEach((function(t){"NOBODY"!==t&&"OWN_GOAL"!==t&&(i[n][h[t].id]=i[n][t],i[n][h[t].id].model=h[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 f.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 h.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 f.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 h.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,f,h,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?(f=t.tieBreakers.goldenGoals.map((function(t){return t.playerId})),[4,this.playerFacade.getPlayersMapWithNativeIds(f)]):[3,8];case 7:h=a.sent(),t.tieBreakers.goldenGoals=t.tieBreakers.goldenGoals.map((function(t){return t.matchModel=l[t.matchId],t.playerModel=h[t.playerId],d.idMapping.idSchema!==R.IdSchemaEnum.NATIVE&&(t.matchId=l[t.matchId].id,t.playerId=h[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[S.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[S.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 T.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),f=n(1465),h=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 h.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 f.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,f){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 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){h.ownProfile=t},this.getInfo=function(){return r(h,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(h,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(h,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(h,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(h,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(h,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(h,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(h,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(h,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(h,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 h.promises.push(h.addInterestPromise(t)),h},this.removeInterestPromise=function(t){return r(h,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 h.promises.push(h.removeInterestPromise(t)),h},this.setBirthdatePromise=function(t){return r(h,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 h.promises.push(h.setBirthdatePromise(t)),h},this.setGenderPromise=function(t){return r(h,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 h.promises.push(h.setGenderPromise(t)),h},this.setNicknamePromise=function(t){return r(h,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 h.promises.push(h.setNicknamePromise(t)),h},this.setNamePromise=function(t){return r(h,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 h.promises.push(h.setNamePromise(t)),h},this.setCountryPromise=function(t){return r(h,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 h.promises.push(h.setCountryPromise(t)),h},this.showFullnessProfile=function(){return r(h,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(h,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),f=n(4289),h=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 h.default(t),this.idMapping=new s.default(t),this.localStorage=new u.default(t),this.footballFacade=new f.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),f=n(1399),h=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 h.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 f.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),f=n(7640),h=n(1553),d=n(670),p=n(7974),m=n(4916),v=n(3483),g=n(1784),y=n(824);e.default=function(){var t=this;this.remapPaginatedGames=function(e){var n=new h.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 h.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 h.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 h.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:[]};n.push(t.deleteUnusefulField(r))})),n},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 f.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,f;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],f=c[1],s(l,f);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),f=n(9377),h=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=f.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 h.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})()}));
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),f=n(5655),h=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||f.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 h("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 f=t;n.length;){var h=n.shift(),d=n.shift();try{f=h(f)}catch(t){d(t);break}}try{i=s(f)}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,f=9007199254740991,h=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]",T="[object Set]",S="[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,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ht=/\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+"]",Tt="\\d+",St="["+Et+"]",Pt="[^\\ud800-\\udfff"+Mt+Tt+"\\u2700-\\u27bf"+Et+It+"]",At="\\ud83c[\\udffb-\\udfff]",Ft="[^\\ud800-\\udfff]",xt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ct="[\\ud800-\\udbff][\\udc00-\\udfff]",kt="["+It+"]",Nt="(?:"+St+"|"+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+"?"+St+"+"+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_])",Tt,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[T]=Zt[S]=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[T]=$t[S]=$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){}}(),fe=le&&le.isArrayBuffer,he=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 Te(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 Se(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:h}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,Tt=e.TypeError,St=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=St.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,fn=It.floor,hn=Mt.getOwnPropertySymbols,dn=Ht?Ht.isBuffer:i,pn=e.isFinite,mn=St.join,vn=tn(Mt.keys,Mt),gn=It.max,yn=It.min,_n=it.now,wn=e.parseInt,bn=It.random,En=St.reverse,In=ca(e,"DataView"),Mn=ca(e,"Map"),On=ca(e,"Promise"),Rn=ca(e,"Set"),Tn=ca(e,"WeakMap"),Sn=ca(Mt,"create"),Pn=Tn&&new Tn,An={},Fn=La(In),xn=La(Mn),Cn=La(On),kn=La(Rn),Nn=La(Tn),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(Ti(t),sr(e,0,t.length))}function Zn(t){return Ca(Ti(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 fr(t,(function(t,i,a){e(r,t,n(t),a)})),r}function rr(t,e){return t&&Si(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:To(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 f=Ws(t);if(f){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 Ti(t,o)}else{var h=ha(t),d=h==w||h==b;if(Ys(t))return bi(t,u);if(h==M||h==m||d&&!a){if(o=c||d?{}:pa(t),!u)return c?function(t,e){return Si(t,fa(t),e)}(t,function(t,e){return t&&Si(e,Co(e),t)}(o,t)):function(t,e){return Si(t,la(t),e)}(t,rr(o,t))}else{if(!$t[h])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 T:return new i;case I:case S:return new i(t);case R:return function(t){var e=new t.constructor(t.source,ht.exec(t));return e.lastIndex=t.lastIndex,e}(t);case P:return r=t,Dn?Mt(Dn.call(r)):{}}}(t,h,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=f?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 Tt(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],f=null==n?l:n(l);if(l=r||0!==l?l:0,s&&f==f){for(var h=c;h--;)if(e[h]===f)continue t;u.push(l)}else a(e,f,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__=Sn?Sn(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(Sn){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 Sn?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]=Sn&&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 fr=Fi(_r),hr=Fi(wr,!0);function dr(t,e){var n=!0;return fr(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 fr(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 Tr(t,e){return null!=t&&e in Mt(t)}function Sr(t,e,n){for(var a=n?Me:Ie,s=t[0].length,o=t.length,u=o,c=r(o),l=1/0,f=[];u--;){var h=t[u];u&&e&&(h=Oe(h,Ve(e))),l=yn(h.length,l),c[u]=!n&&(e||s>=120&&h.length>=120)?new zn(u&&h):i}h=t[0];var d=-1,p=c[0];t:for(;++d<s&&f.length<l;){var m=h[d],v=e?e(m):m;if(m=n||0!==m?m:0,!(p?Xe(p,v):a(f,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),f.push(m)}}return f}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:ha(t),l=u?v:ha(e),f=(c=c==m?M:c)==M,h=(l=l==m?M:l)==M,d=c==l;if(d&&Ys(t)){if(!Ys(e))return!1;o=!0,f=!1}if(d&&!f)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 S:return t==e+"";case E:var o=$e;case T: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=f&&Ct.call(t,"__wrapped__"),w=h&&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 f=u[l];if(!(o?f in e:Ct.call(e,f)))return!1}var h=s.get(t),d=s.get(e);if(h&&d)return h==e&&d==t;var p=!0;s.set(t,e),s.set(e,t);for(var m=o;++l<c;){var v=t[f=u[l]],g=e[f];if(r)var y=o?r(g,v,f,e,t,s):r(v,g,f,t,e,s);if(!(y===i?v===g||a(v,g,n,r,s):y)){p=!1;break}m||(m="constructor"==f)}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],f=u[1];if(o&&u[2]){if(l===i&&!(c in t))return!1}else{var h=new Yn;if(r)var d=r(l,f,c,t,e,h);if(!(d===i?Fr(f,l,3,r,h):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 fr(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=To(n,t);return r===i&&r===e?So(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=Ta(t,n),c=Ta(e,n),l=o.get(c);if(l)$n(t,n,l);else{var f=s?s(u,c,n+"",t,e,o):i,h=f===i;if(h){var d=Ws(c),p=!d&&Ys(c),m=!d&&!p&&co(c);f=c,d||p||m?Ws(u)?f=u:zs(u)?f=Ti(u):p?(h=!1,f=bi(c,!0)):m?(h=!1,f=Ii(c,!0)):f=[]:io(c)||Vs(c)?(f=u,Vs(u)?f=yo(u):to(u)&&!Qs(u)||(f=pa(c))):h=!1}h&&(o.set(c,f),a(f,c,r,s,o),o.delete(c)),$n(t,n,f)}}(t,e,o,n,Hr,r,a);else{var u=r?r(Ta(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=Ti(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+fn(bn()*(e-t+1))}function zr(t,e){var n="";if(!t||e<1||e>f)return n;do{e%2&&(n+=t),(e=fn(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 f=u[c];(l=r?r(f,c,u):i)===i&&(l=to(f)?f: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 fr(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 f=fn((a+s)/2),h=n(t[f]),d=h!==i,p=null===h,m=h==h,v=uo(h);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?h<=e:h<e);g?a=f+1:s=f}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)?h:+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],f=e?e(l):l;if(l=n||0!==l?l:0,s&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue t;e&&u.push(f),o.push(l)}else i(u,f,n)||(u!==o&&u.push(f),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 fi(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 hi(t,e){var n=t;return n instanceof Vn&&(n=n.value()),Te(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),f=r(c+l),h=!i;++u<c;)f[u]=e[u];for(;++a<o;)(h||a<s)&&(f[n[a]]=t[a]);for(;l--;)f[u++]=t[a++];return f}function Ri(t,e,n,i){for(var a=-1,s=t.length,o=-1,u=n.length,c=-1,l=e.length,f=gn(s-u,0),h=r(f+l),d=!i;++a<f;)h[a]=t[a];for(var p=a;++c<l;)h[p+c]=e[c];for(;++o<u;)(d||a<s)&&(h[p+n[o]]=t[a++]);return h}function Ti(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function Si(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 Te(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 Tt(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,f,h){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<h){var I=en(_,b);return Xi(t,e,Li,i.placeholder,n,_,I,l,f,h-c)}var M=p?n:this,O=m?M[t]:t;return c=_.length,l?_=Ra(_,l):g&&c>1&&_.reverse(),d&&f<c&&(_.length=f),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,f){var h=8&e;e|=h?u:64,4&(e&=~(h?64:u))||(e&=-4);var d=[t,e,a,h?s:i,h?o:i,h?i:s,h?i:o,c,l,f],p=n.apply(i,d);return _a(t)&&Sa(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=ha(e);return n==E?$e(e):n==T?rn(e):function(t,e){return Oe(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Ji(t,e,n,s,l,f,h,d){var p=2&e;if(!p&&"function"!=typeof t)throw new Tt(a);var m=s?s.length:0;if(m||(e&=-97,s=l=i),h=h===i?h:gn(mo(h),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,f,h,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 f=o<3&&u[0]!==l&&u[o-1]!==l?[]:en(u,l);return(o-=f.length)<n?Xi(t,e,Li,s.placeholder,i,u,f,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,f=r(l+u),h=this&&this!==ae&&this instanceof e?s:t;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++o];return ge(h,a?n:this,f)}}(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:Sa)(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),f=s.get(e);if(l&&f)return l==e&&f==t;var h=-1,d=!0,p=2&n?new zn:i;for(s.set(t,e),s.set(e,t);++h<u;){var m=t[h],v=e[h];if(r)var g=o?r(v,m,h,e,t,s):r(m,v,h,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,fa)}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=hn?function(t){return null==t?[]:(t=Mt(t),Ee(hn(t),(function(e){return te.call(t,e)})))}:vu,fa=hn?function(t){for(var e=[];t;)Re(e,la(t)),t=qt(t);return e}:vu,ha=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?f: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&&ha(new In(new ArrayBuffer(1)))!=x||Mn&&ha(new Mn)!=E||On&&ha(On.resolve())!=O||Rn&&ha(new Rn)!=T||Tn&&ha(new Tn)!=A)&&(ha=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 T;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=Ti(t);r--;){var s=e[r];t[r]=va(s,n)?a[s]:i}return t}function Ta(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Sa=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__=Ti(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]?Sr(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]?Sr(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]?Sr(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),fs=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 hs(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:fr)(t,sa(e,3))}function _s(t,e){return(Ws(t)?we:hr)(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 fr(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 Ts(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,Ji(t,c,i,i,i,i,e)}function Ss(t,e){var n;if("function"!=typeof e)throw new Tt(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,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new Tt(a);function m(e){var n=r,a=s;return r=s=i,f=e,u=t.apply(a,n)}function v(t){return f=t,c=Pa(y,e),h?m(t):u}function g(t){var n=t-l;return l===i||n>=e||n<0||d&&t-f>=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-f)):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)&&(h=!!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),f=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 Tt(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 Tt(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=fe?Ve(fe):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=he?Ve(he):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<=f}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)&&ha(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)&&ha(t)==T};function oo(t){return"string"==typeof t||!Ws(t)&&eo(t)&&Mr(t)==S}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),fo=Wi((function(t,e){return t<=e}));function ho(t){if(!t)return[];if(qs(t))return oo(t)?sn(t):Ti(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=ha(t);return(e==E?$e:e==T?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 h;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)?h:+t}function yo(t){return Si(t,Co(t))}function _o(t){return null==t?"":oi(t)}var wo=Ai((function(t,e){if(ba(e)||qs(e))Si(e,xo(e),t);else for(var n in e)Ct.call(e,n)&&tr(t,n,e[n])})),bo=Ai((function(t,e){Si(e,Co(e),t)})),Eo=Ai((function(t,e,n,r){Si(e,Co(e),t,r)})),Io=Ai((function(t,e,n,r){Si(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],f=t[l];(f===i||Hs(f,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 To(t,e,n){var r=null==t?i:Er(t,e);return r===i?n:r}function So(t,e){return null!=t&&da(t,e,Tr)}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})),Si(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 So(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__=Ti(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),fu=Bi(be),hu=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 Tt(a);return t=mo(t),function(){if(--t<1)return e.apply(this,arguments)}},Un.ary=Ts,Un.assign=wo,Un.assignIn=bo,Un.assignInWith=Eo,Un.assignWith=Io,Un.at=Mo,Un.before=Ss,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=hs,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)?Ti(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 Tt(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?fi(t,sa(e,3),!0,!0):[]},Un.dropWhile=function(t,e){return t&&t.length?fi(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 Ss(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=fu,Un.overSome=hu,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 Tt(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 Tt(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?fi(t,sa(e,3),!1,!0):[]},Un.takeWhile=function(t,e){return t&&t.length?fi(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 Tt(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=ho,Un.toPairs=Uo,Un.toPairsIn=Ho,Un.toPath=function(t){return Ws(t)?Oe(t,Da):uo(t)?[t]:Ti(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 Ts(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=fs,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=To,Un.gt=Bs,Un.gte=Gs,Un.has=function(t,e){return null!=t&&da(t,e,Rr)},Un.hasIn=So,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=ha(t);if(e==E||e==T)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<=f},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)&&ha(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=fo,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(fn(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)?Te:Ue,i=arguments.length<3;return r(t,sa(e,4),n,i,fr)},Un.reduceRight=function(t,e,n){var r=Ws(t)?Se:Ue,i=arguments.length<3;return r(t,sa(e,4),n,i,hr)},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=ha(t);return e==E||e==T?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,f=e.interpolate||_t,h="__p += '",d=Ot((e.escape||_t).source+"|"+f.source+"|"+(f===Q?ft:_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),h+=t.slice(l,u).replace(wt,Qe),n&&(a=!0,h+="' +\n__e("+n+") +\n'"),o&&(s=!0,h+="';\n"+o+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e})),h+="';\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 h="with (obj) {\n"+h+"\n}\n";h=(s?h.replace(G,""):h).replace(V,"$1").replace(W,"$1;"),h="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")+h+"return __p\n}";var v=$o((function(){return Et(u,p+"return "+h).apply(i,c)}));if(v.source=h,Ks(v))throw v;return v},Un.times=function(t,e){if((t=mo(t))<1||t>f)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,f):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,f=c;for(a.global||(a=Ot(a.source,_o(ht.exec(a))+"g")),a.lastIndex=0;l=a.exec(f);)var h=l.index;c=c.slice(0,h===i?u:h)}}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),f=function(t){var e=a.apply(Un,Re([t],o));return r&&h?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=s&&!h,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:[f],thisArg:i}),new Gn(v,h)}return p&&m?t.apply(this,o):(v=this.thru(f),p?r?v.value()[0]:v.value():v)})})),_e(["pop","push","shift","sort","splice","unshift"],(function(t){var e=St[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__=Ti(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ti(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ti(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__,f=l.length,h=0,d=yn(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return hi(t,this.__actions__);var p=[];t:for(;u--&&h<d;){for(var m=-1,v=t[c+=e];++m<f;){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[h++]=v}return p},Un.prototype.at=ps,Un.prototype.chain=function(){return hs(this)},Un.prototype.commit=function(){return new Gn(this.value(),this.__chain__)},Un.prototype.next=function(){this.__values__===i&&(this.__values__=ho(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 hi(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),f=n(6965),h=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 f.default,lang:new a.default,errorHandlingMode:new h.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),f=n(5601);(o=e.FeatureConfigType||(e.FeatureConfigType={})).PREDICTOR="predictor",o.TOP_X="topX",o.MATCH_QUIZ="matchQuiz",o.LOYALTY="loyalty";var h=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 f.default(e),n.featureConfigRemapper=new c.default,n}return i(e,t),e}(l.default);e.default=h},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),f=n(5827),h=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,f,h,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,f="/competitions"+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 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 f="/competitions"+this.apiSignInUrl,t&&(f+=""+t.constructFilterUrl()),e&&(f+="&disable_cache="+r),[4,this.instance.get(f)];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 h=s.sent(),d=this.transformAxiosErrorToFansUnitedException(h),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,f,h,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,h="/teams"+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 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 f=new _.default,h="/teams"+this.apiSignInUrl,t&&(h+=""+t.constructFilterUrl()),e&&(h+="&disable_cache="+r),[4,this.instance.get(h)];case 6:return n=s.sent(),f.meta=this.footballMetaRemapper.remapMetaProp(n.data.meta),f.data=n.data.data.map((function(t){return m.teamBasicRemapper.fromResponse(t)})),[2,f];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,f,h,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,h="/players"+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 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 f=new _.default,h="/players"+this.apiSignInUrl,t&&(h+=""+t.constructFilterUrl()),e&&(h+="&disable_cache="+r),[4,this.instance.get(h)];case 6:return n=s.sent(),f.meta=this.footballMetaRemapper.remapMetaProp(n.data.meta),f.data=n.data.data.map((function(t){return m.playerBasicRemapper.fromResponse(t)})),[2,f];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 f.default,n.teamFullRemapper=new h.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 f=t.authProvider.getIdToken();return l.headers.Authorization="Bearer "+f,n.instanceAuth(l)}if("standard"===n.errorHandlingMode&&401===(null===(u=e.response)||void 0===u?void 0:u.status)){var h=new o.default(a.ErrorCodes.UNAUTHORIZED,s.ErrorStatuses.UNAUTHORIZED,c.ErrorMessages.EXPIRED_TOKEN);return Promise.reject(h)}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,f,h,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,f.instance.get("/football"+f.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=f.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]}}))},f=this,h=0,d=u,m.label=1;case 1:return h<d.length?(p=d[h],[5,l(p)]):[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 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),f=n(7746),h=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 f.default,n}return i(e,t),e}(n(7724).default);e.default=h},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),f=n(1553),h=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 f.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 f.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 f.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 h.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),f=n(1712),h=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,f,h,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:f=s.sent(),r.push.apply(r,this.profileRemapper.profilesFromResponse(f.data.data)),s.label=3;case 3:return a++,[3,1];case 4:return[2,r];case 5:return h="/profiles"+this.apiSignInUrl+"&profile_ids="+t.join(","),e&&(h+="&disable_cache="+n),[4,this.instance.get(h)];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 f.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 f.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=h},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,f;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 f=new c.default(t,n,s,o),[2,this.activityHttps.createActivity(f)]}}))}))},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}},316:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.totalItems=0}},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(316),i=n(1517);e.default=function(){this.meta=new r.default,this.data=[new i.default]}},1382:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.label=null}},7976:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.type=null,this.id=null,this.label=null}},2820:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1382),i=n(7976);e.default=function(){this.content=new i.default,this.tags=[],this.campaign=new r.default}},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,n,r=new o.default;return r.id=t.id,r.profileId=t.profile_id,r.action=t.action,r.context.content=null!==(e=t.context.content)&&void 0!==e?e:r.context.content,r.context.tags=t.context.tags,r.context.campaign=null!==(n=t.context.campaign)&&void 0!==n?n:r.context.campaign,r.points=t.points,r},this.remapActivitiesResponse=function(e){var n=new u.default;return n.meta.totalItems=e.meta.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,f,h,d;return i(this,(function(i){switch(i.label){case 0:return 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)];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++)f=l[c],h=f[0],d=f[1],u(h,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,f){var h=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(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.countriesFacade.getCountriesWithIdMapping(t)]}))}))},this.getCompetitions=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.competitionsFacade.getCompetitionsIdMapping(t,e)]}))}))},this.getCompetitionById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.competitionsFacade.getCompetitionByIdIdMapping(t,e)]}))}))},this.getTopCompetitions=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.competitionsFacade.getTopCompetitionsIdMapping(t)]}))}))},this.getCompetitionsMapWithNativeIds=function(t){return r(h,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(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getTeamsIdMapping(t,e)]}))}))},this.getTeamById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getTeamByIdIdMapping(t,e)]}))}))},this.getTopTeams=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.teamsFacade.getTopTeamsIdMapping(t)]}))}))},this.getNextMatchForTeam=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getNextMatchForTeamIdMapping(t,e)]}))}))},this.getPrevMatchForTeam=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getPrevMatchForTeamIdMapping(t,e)]}))}))},this.getTeamsMapWithNativeIds=function(t){return r(h,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(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPlayersIdMapping(t,e)]}))}))},this.getPlayerById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPlayerIdMapping(t,e)]}))}))},this.getTopPlayers=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.playerFacade.getTopPlayersIdMapping(t)]}))}))},this.getNextMatchForPlayer=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getNextMatchForPlayerIdMapping(t,e)]}))}))},this.getPrevMatchForPlayer=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPrevMatchForPlayerIdMapping(t,e)]}))}))},this.getPlayersMapWithNativeIds=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.playerFacade.getPlayersMapWithNativeIds(t)]}))}))},this.getMatches=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.matchFacade.getMatchesIdMapping(t,e)]}))}))},this.getMatchById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.matchFacade.getMatchIdMapping(t,e)]}))}))},this.search=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.searchFacade.searchIdMapping(t,e)]}))}))},this.countriesFacade=new a.default(e,n,f),this.competitionsFacade=new s.default(e,n,f),this.teamsFacade=new o.default(t,n,f),this.playerFacade=new u.default(t,n,f),this.matchFacade=new c.default(t,n,f),this.searchFacade=new l.default(n,f)}},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,f,h;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(),f=c,[4,this.idMapping.remapEntities(c.data,"match")];case 11:return f.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(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),f=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=f},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),f=n(9502),h=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,f,h,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:f=i.sent(),n=f.data,i.label=4;case 4:return o.length?(h={gameIds:o},[4,this.matchQuizFacade.getGames(h)]):[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 h.default(t),this.topXFacade=new f.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),f=n(7782),h=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 f.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 h.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),f=n(1732),h=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,h,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,h="",[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 f.default&&"OWN_GOAL"!==r.prediction.playerId?r.prediction.playerId?(h=r.prediction.playerId,_=r.prediction,[4,this.predictorService.remapPlayerIdToNative([h])]):[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=h),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 h.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),f=n(8452);e.default=function(){var t=this;this.remapPredictorConfig=function(t){var e=new f.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 f=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(f,void 0,void 0,(function(){var e,n,r,s,o,u,c,l,f,h,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(f=0,h=t;f<h.length;f++)d=h[f],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),f=n(2524),h=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 f.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 h.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),f=n(8950),h=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),T=n(6409),S=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,f,h,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"!==(f=l[c])&&"OWN_GOAL"!==f&&n.push(f);return n.length?[4,this.playerFacade.getPlayersMapWithNativeIds(n)]:[2,t];case 1:for(h=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[h[w].id]=g[w],g[h[w].id].model=h[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,f,h,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]:(f=Object.keys(i[n]).filter((function(t){return"NOBODY"!==t&&"OWN_GOAL"!==t}))).length?[4,this.playerFacade.getPlayersMapWithNativeIds(f)]:[3,8];case 7:return d=a.sent(),[3,9];case 8:d={},a.label=9;case 9:h=d,Object.keys(h).length&&Object.keys(i[n]).forEach((function(t){"NOBODY"!==t&&"OWN_GOAL"!==t&&(i[n][h[t].id]=i[n][t],i[n][h[t].id].model=h[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 f.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 h.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 f.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 h.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,f,h,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?(f=t.tieBreakers.goldenGoals.map((function(t){return t.playerId})),[4,this.playerFacade.getPlayersMapWithNativeIds(f)]):[3,8];case 7:h=a.sent(),t.tieBreakers.goldenGoals=t.tieBreakers.goldenGoals.map((function(t){return t.matchModel=l[t.matchId],t.playerModel=h[t.playerId],d.idMapping.idSchema!==R.IdSchemaEnum.NATIVE&&(t.matchId=l[t.matchId].id,t.playerId=h[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[S.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[S.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 T.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),f=n(1465),h=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 h.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 f.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,f){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 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){h.ownProfile=t},this.getInfo=function(){return r(h,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(h,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(h,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(h,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(h,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(h,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(h,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(h,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(h,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(h,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 h.promises.push(h.addInterestPromise(t)),h},this.removeInterestPromise=function(t){return r(h,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 h.promises.push(h.removeInterestPromise(t)),h},this.setBirthdatePromise=function(t){return r(h,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 h.promises.push(h.setBirthdatePromise(t)),h},this.setGenderPromise=function(t){return r(h,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 h.promises.push(h.setGenderPromise(t)),h},this.setNicknamePromise=function(t){return r(h,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 h.promises.push(h.setNicknamePromise(t)),h},this.setNamePromise=function(t){return r(h,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 h.promises.push(h.setNamePromise(t)),h},this.setCountryPromise=function(t){return r(h,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 h.promises.push(h.setCountryPromise(t)),h},this.showFullnessProfile=function(){return r(h,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(h,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),f=n(4289),h=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 h.default(t),this.idMapping=new s.default(t),this.localStorage=new u.default(t),this.footballFacade=new f.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),f=n(1399),h=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 h.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 f.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),f=n(7640),h=n(1553),d=n(670),p=n(7974),m=n(4916),v=n(3483),g=n(1784),y=n(824);e.default=function(){var t=this;this.remapPaginatedGames=function(e){var n=new h.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 h.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 h.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 h.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:[]};n.push(t.deleteUnusefulField(r))})),n},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 f.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,f;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],f=c[1],s(l,f);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),f=n(9377),h=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=f.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 h.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})()}));
3
3
  //# sourceMappingURL=index.js.map