@notix.games/react-bridge 4.2.0 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
package/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
(()=>{"use strict";var e={781:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(632),t),o(r(448),t),o(r(732),t)},473:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.createIFrame=function(e){var t=e.eventHandler,r=e.context,a=e.React,i=e.src,u=e.gameId,s=e.style,c=e.customProps,l=a.createRef(),d=a.createElement("iframe",n({src:i,id:(0,o.createIFrameId)(u),style:s,ref:l},c)),f=function(e){var n;e.source===(null===(n=l.current)||void 0===n?void 0:n.contentWindow)&&(null==t||t(e,r))};return window.addEventListener("message",f,!1),{iframe:d,destructor:function(){window.removeEventListener("message",f,!1),function(){var e;try{(null===(e=null==r?void 0:r.getMetadata())||void 0===e?void 0:e.prevWindowTitle)?window.top.document.title=r.getMetadata().prevWindowTitle:window.localStorage.getItem("prevWindowTitle")?window.top.document.title=window.localStorage.getItem("prevWindowTitle"):window.top.document.title=""}catch(e){}}()},meta:{iframeRef:l}}};var o=r(598)},105:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(473),t)},953:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createIFrame=function(e){var t=e.src,r=e.gameId,o=e.style,a=e.eventHandler,i=e.context,u=e.customProps,s=document.createElement("iframe");for(var c in s.src=t,s.id=(0,n.createIFrameId)(r),o)if(c in s.style){var l=o[c];try{s.style.setProperty(c,"number"==typeof l?"".concat(l,"px"):l)}catch(e){console.error("Error setting style for ".concat(c,": "),e)}}for(var c in Object.keys(Object(u)))s.setAttribute(c,u[c]);var d=function(e){e.source===s.contentWindow&&(null==a||a(e,i))};return window.addEventListener("message",d,!1),{iframe:s,destructor:function(){window.removeEventListener("message",d,!1),function(){var e;try{(null===(e=null==i?void 0:i.getMetadata())||void 0===e?void 0:e.prevWindowTitle)?window.top.document.title=i.getMetadata().prevWindowTitle:window.localStorage.getItem("prevWindowTitle")?window.top.document.title=window.localStorage.getItem("prevWindowTitle"):window.top.document.title=""}catch(e){}}()},meta:{}}};var n=r(598)},441:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(953),t)},981:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.config=void 0,t.config={IFRAME_GAME_ID_PREFIX:"notix_embedded_",backendBaseUrls:{prod:"https://game-aggregator.notix.games/external/api/v1",stage:"https://game-aggregator.stage.notix.games/external/api/v1",dev:"https://game-aggregator.main.notix.games/external/api/v1"},authUrls:{prod:"https://auth-service.notix.games/external/api/v1",stage:"https://auth-service.stage.notix.games/external/api/v1",dev:"https://auth-service.main.notix.games/external/api/v1"}}},874:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}s((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},i=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.iFrameCreators=void 0,t.initNotixBridge=function(e){var r,d,f,y,b,g,w=this,m=!1,_=e,P="prod",I=null,O=function(){return o(w,void 0,void 0,(function(){var e,t,n,o,i,u;return a(this,(function(a){switch(a.label){case 0:if(!b)throw new Error("Refresh token is not available.");return e=y||(0,h.default)(P,"auth"),t="".concat(e,"/partners/auth/refresh"),[4,fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Bearer ".concat(r)},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:b})})];case 1:if(!(n=a.sent()).ok)throw new Error("Failed to refresh access token.");return[4,n.json()];case 2:return o=a.sent(),i=o.access_token,u=(0,s.jwtDecode)(i),r=i,g=1e3*u.exp,b=o.refresh_token,k(),[2]}}))}))},j=function(e){var t=e.token,n=e.refreshToken,o=e.environment,a=e.setting,i=e.url,u=e.authUrl;if(!t)throw new Error("Token is not provided on Notix Bridge configuration.");var c=(0,s.jwtDecode)(t);r=t,b=n||"",g=1e3*c.exp,o&&(P=o),"lobby"===a&&(d=!0),i&&(f=i),u&&(y=u),m=!0,k()},M=function(){return o(w,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:if(t=Date.now(),!(g<=t))return[2];if(!b)throw new Error("Access token is expired and no refresh token is available.");if(function(){var e=(0,s.jwtDecode)(b);if(!e.exp)throw new Error("Token does not contain an expiration date");return 1e3*e.exp<=Date.now()}())throw new Error("Due to long inactivity both refresh and auth tokens are expired. Probably you should reload page or reinitialize to obtain a new pair.");return[4,O()];case 1:return e.sent(),[2]}var t}))}))},k=function(){if(b){var e=Date.now(),t=g-e-18e4;I&&clearTimeout(I),I=setTimeout((function(){return o(w,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,O()];case 1:return t.sent(),[3,3];case 2:return e=t.sent(),console.error("Error refreshing token:",e),[3,3];case 3:return[2]}}))}))}),t)}};return{createIFrame:function(e){return function(e){return o(this,void 0,void 0,(function(){var o,i,s,l,h,y,b,g,w,I,O,j,k,S,x,A,E,T,U,G,R,W,L,F,D,N,B,q,C,H,Z;return a(this,(function(a){switch(a.label){case 0:return[4,M()];case 1:if(a.sent(),o=e.gameId,i=e.nodeId,s=e.player,l=e.browserSession,h=e.balance,y=e.eventHandler,b=e.customProps,g=e.style,w=e.sessionId,I=s.id,O=s.country,j=l.viewType,k=l.language,S=l.timeZone,x=l.ip,A=h.currency,E=h.amount,!m)throw new Error("Notix Bridge is not configured. Please call the configure method first.");a.label=2;case 2:return a.trys.push([2,4,,5]),T=(0,u.v4)(),[4,(0,c.startGame)({gameId:o,nodeId:i,requestId:T,player:{id:I,country:O},browserSession:{language:k,viewType:j,timeZone:S,ip:x},balance:{currency:A,amount:E},partnerToken:r,env:P,isLobby:d,sessionId:w,providedURL:f})];case 3:if(U=a.sent(),G=U.iFrameURI,R=U.token,!G)throw new Error("No iFrame URI provided by the server.");if(!R)throw new Error("No player token provided by the server.");if(W={_playerToken:R,_iframe:null,_metadata:{},updateMetadata:function(e){this._metadata=Object.assign(this._metadata,e)},addPropertyToMetadata:function(e,t){this._metadata[e]=t},getMetadata:function(){return this._metadata},getPlayerToken:function(){return this._playerToken},getIframe:function(){return this._iframe},updatePlayerToken:function(e){this._playerToken=e},updateIframe:function(e){this._iframe=e}},L=(0,p.createEventMiddleware)(v.handleGPWebAppInit,v.handleGPWebAppSetPageLoaded,v.handleGPWebAppSetPageTitle,v.handleGPWebAppShowAuthenticationFailed,v.handleGPWebAppShowGameState)(y),F=null,"react"===_){if(!(D=e.React))throw new Error("React instance is not provided.");N={eventHandler:L,context:W,React:D,customProps:b,src:G,gameId:o,style:g},F=t.iFrameCreators.react(N)}else"vanilla"===_&&(B={eventHandler:L,customProps:b,context:W,src:G,gameId:o,style:g},F=t.iFrameCreators.vanilla(B));if(!F)throw new Error("No iFrame creator result.");return q=F.iframe,C=F.destructor,H=F.meta,W.updateIframe(q),W.updateMetadata(Object.assign(H,{framework:_})),[2,n({iframe:q,destructor:C},H)];case 4:return[2,{error:Z=a.sent(),status:Z.status,message:Z.message}];case 5:return[2]}}))}))}(e)},configure:j,configureAsync:function(e){return o(w,void 0,void 0,(function(){return a(this,(function(t){return[2,new Promise((function(t,r){try{j(e),t()}catch(e){r(e)}}))]}))}))},getGames:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(w,i([],e,!0),void 0,(function(e){var t,n=void 0===e?{}:e,o=n.offset,i=n.limit,u=n.providers,s=n.categories;return a(this,(function(e){switch(e.label){case 0:return[4,M()];case 1:e.sent(),e.label=2;case 2:if(e.trys.push([2,4,,5]),!m)throw new Error("Notix Bridge is not configured. Please call the configure method first.");return[4,(0,l.getGamesList)({token:r,env:P,isLobby:d,providedURL:f,offset:o,limit:i,providers:u,categories:s})];case 3:return[2,e.sent()];case 4:return[2,{error:t=e.sent(),status:t.status,message:t.message}];case 5:return[2]}}))}))},getIFrameURI:function(e){return o(this,void 0,void 0,(function(){var t,n,o,i,s,l,p,v,h,y,b,g,w,_,I,O,j,k,S;return a(this,(function(a){switch(a.label){case 0:return[4,M()];case 1:if(a.sent(),t=e.gameId,n=e.nodeId,o=e.player,i=e.browserSession,s=e.balance,l=e.sessionId,p=o.id,v=o.country,h=i.viewType,y=i.language,b=i.timeZone,g=i.ip,w=s.currency,_=s.amount,!m)throw new Error("Notix Bridge is not configured. Please call the configure method first.");a.label=2;case 2:return a.trys.push([2,4,,5]),I=(0,u.v4)(),[4,(0,c.startGame)({gameId:t,nodeId:n,requestId:I,player:{id:p,country:v},browserSession:{language:y,viewType:h,timeZone:b,ip:g},balance:{currency:w,amount:_},partnerToken:r,env:P,sessionId:l,isLobby:d,providedURL:f})];case 3:if(O=a.sent(),j=O.iFrameURI,k=O.token,!j)throw new Error("No iFrame URI provided by the server.");if(!k)throw new Error("No player token provided by the server.");return[2,j];case 4:return[2,{error:S=a.sent(),status:S.status,message:S.message}];case 5:return[2]}}))}))},configured:m}};var u=r(935),s=r(63),c=r(597),l=r(148),d=r(105),f=r(441),p=r(598),v=r(155),h=r(710);t.iFrameCreators={react:d.createIFrame,vanilla:f.createIFrame}},155:(e,t)=>{function r(e){var t,r=e.getIframe(),n=e.getMetadata();return"react"===n.framework?null===(t=null==n?void 0:n.iframeRef)||void 0===t?void 0:t.current:r}Object.defineProperty(t,"__esModule",{value:!0}),t.handleGPWebAppShowGameState=t.handleGPWebAppShowAuthenticationFailed=t.handleGPWebAppSetPageTitle=t.handleGPWebAppSetPageLoaded=t.handleGPWebAppInit=void 0;t.handleGPWebAppInit=function(e,t,n){var o,a,i;if("GPWebAppInit"===e.data.type){var u=r(t);null===(o=null==u?void 0:u.contentWindow)||void 0===o||o.postMessage({type:"GPWebAppInitResult",data:{result:!0,requestId:null===(i=null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.data)||void 0===i?void 0:i.requestId}},"*")}n()};t.handleGPWebAppSetPageLoaded=function(e,t,n){"GPWebAppSetPageLoaded"===e.data.type&&r(t).contentWindow.postMessage({type:"GPWebAppSetPageLoadedResult",data:{result:!0,requestId:e.data.data.requestId}},"*");n()};t.handleGPWebAppSetPageTitle=function(e,t,n){try{var o=r(t);if("GPWebAppSetPageTitle"===e.data.type){var a=window.top.document.title;window.top.document.title=e.data.data.title,t.addPropertyToMetadata("prevWindowTitle",a),window.localStorage.setItem("prevWindowTitle",a),o.contentWindow.postMessage({type:"GPWebAppSetPageTitleResult",data:{result:!0,requestId:e.data.data.requestId}},"*")}}catch(e){}n()};t.handleGPWebAppShowAuthenticationFailed=function(e,t,n){var o=r(t);"GPWebAppShowAuthenticationFailed"===e.data.type&&o.contentWindow.postMessage({type:"GPWebAppShowAuthenticationFailedResult",data:{result:!0,requestId:e.data.data.requestId,token:"NEW_TOKEN_WILL_BE_HERE"}},"*"),n()};t.handleGPWebAppShowGameState=function(e,t,n){var o=r(t);"GPWebAppShowGameState"===e.data.type&&o.contentWindow.postMessage({type:"GPWebAppShowGameStateResult",data:{result:!0,requestId:e.data.data.requestId}},"*"),n()}},632:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(874),t),o(r(850),t)},148:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}s((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.getGamesList=void 0;var a=r(710),i=function(e){return n(void 0,[e],void 0,(function(e){var t,r,n,i,u,s,c=e.token,l=e.env,d=e.isLobby,f=e.providedURL,p=e.limit,v=e.offset,h=e.providers,y=e.categories;return o(this,(function(e){switch(e.label){case 0:return t=f||(0,a.default)(l),r="".concat(t,d?"/partners/lobby/games/list":"/partners/games/list"),n=new URLSearchParams,p&&n.append("limit",p.toString()),v&&n.append("offset",v.toString()),h&&h.length>0&&h.forEach((function(e){return n.append("providers",e)})),y&&y.length>0&&y.forEach((function(e){return n.append("categories",e)})),i=n.size?"".concat(r,"?").concat(n.toString()):r,[4,fetch(i,{method:"GET",headers:{Authorization:"Bearer ".concat(c)}})];case 1:if(!(u=e.sent()).ok)throw(s=new Error("Failed to fetch games list: Server responded with status ".concat(u.status))).status=u.status,s;return[2,u.json()]}}))}))};t.getGamesList=function(e){return n(void 0,[e],void 0,(function(e){var t,r=e.token,n=e.env,a=e.isLobby,u=e.providedURL,s=e.limit,c=e.offset,l=e.providers,d=e.categories;return o(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,i({token:r,env:n,isLobby:a,providedURL:u,limit:s,offset:c,providers:l,categories:d})];case 1:return[2,e.sent()];case 2:throw{message:(t=e.sent()).message,status:t.status||null};case 3:return[2]}}))}))}},597:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}s((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.startGame=void 0;var a=r(710);t.startGame=function(e){return n(void 0,void 0,void 0,(function(){var t,r,n,i,u,s,c,l;return o(this,(function(o){switch(o.label){case 0:t=e.providedURL||(0,a.default)(e.env),r=e.isLobby?"".concat(t,"/partners/lobby/games/start"):"".concat(t,"/partners/games/start"),n=function(e){var t=e.gameId,r=e.nodeId,n=e.requestId,o=e.player,a=e.browserSession,i=e.balance,u=e.sessionId;return{requestId:n,gameId:t,nodeId:r,isTest:!0,player:{id:o.id,country:o.country},browserSession:{language:a.language,viewType:a.viewType,timeZone:a.timeZone,ip:a.ip},balance:{currency:i.currency,amount:i.amount},sessionId:u}}(e),i={method:"POST",headers:{Authorization:"Bearer ".concat(e.partnerToken),"Content-Type":"application/json"},body:JSON.stringify(n)},o.label=1;case 1:return o.trys.push([1,4,,5]),[4,fetch(r,i)];case 2:if(!(u=o.sent()).ok)throw(s=new Error("Failed to start game: Server responded with status ".concat(u.status))).status=u.status,s;return[4,u.json()];case 3:return c=o.sent(),[2,{iFrameURI:decodeURI(null==c?void 0:c.uri),token:null==c?void 0:c.sessionId}];case 4:throw{message:(l=o.sent()).message,status:l.status||null};case 5:return[2]}}))}))}},850:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},568:function(e,t){var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}s((n=n.apply(e,t||[])).next())}))},n=this&&this.__generator||function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.createEventMiddleware=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var o=this;return function(a,i){return r(o,void 0,void 0,(function(){var o,u=this;return n(this,(function(s){switch(s.label){case 0:o=function(s){return r(u,void 0,void 0,(function(){var u=this;return n(this,(function(c){switch(c.label){case 0:return s<e.length?[4,e[s](a,i,(function(){return r(u,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,o(s+1)];case 1:return e.sent(),[2]}}))}))}))]:[3,2];case 1:return c.sent(),[3,4];case 2:return[4,t(a)];case 3:c.sent(),c.label=4;case 4:return[2]}}))}))},s.label=1;case 1:return s.trys.push([1,3,,4]),[4,o(0)];case 2:return[2,s.sent()];case 3:throw s.sent();case 4:return[2]}}))}))}}}},710:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===t&&(t="games");var r=("games"===t?n.config.backendBaseUrls:n.config.authUrls)[e];if(r)return r;throw new Error("Incorrect env identifier passed in getBaseURL in Bridge backend request. Could not find matching base url")};var n=r(981)},598:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createIFrameId=function(e){return"".concat(a).concat(e)};var a=r(981).config.IFRAME_GAME_ID_PREFIX;o(r(568),t)},448:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NotixBridge=void 0;var n=(0,r(781).initNotixBridge)("react");t.NotixBridge=n},732:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VanillaNotixBridge=void 0;var n=(0,r(632).initNotixBridge)("vanilla");t.VanillaNotixBridge=n},935:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return s.default}});var n=f(r(766)),o=f(r(532)),a=f(r(521)),i=f(r(10)),u=f(r(688)),s=f(r(687)),c=f(r(893)),l=f(r(750)),d=f(r(512));function f(e){return e&&e.__esModule?e:{default:e}}},391:(e,t)=>{function r(e){return 14+(e+64>>>9<<4)+1}function n(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function o(e,t,r,o,a,i){return n((u=n(n(t,e),n(o,i)))<<(s=a)|u>>>32-s,r);var u,s}function a(e,t,r,n,a,i,u){return o(t&r|~t&n,e,t,a,i,u)}function i(e,t,r,n,a,i,u){return o(t&n|r&~n,e,t,a,i,u)}function u(e,t,r,n,a,i,u){return o(t^r^n,e,t,a,i,u)}function s(e,t,r,n,a,i,u){return o(r^(t|~n),e,t,a,i,u)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var c=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}return function(e){const t=[],r=32*e.length,n="0123456789abcdef";for(let o=0;o<r;o+=8){const r=e[o>>5]>>>o%32&255,a=parseInt(n.charAt(r>>>4&15)+n.charAt(15&r),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[r(t)-1]=t;let o=1732584193,c=-271733879,l=-1732584194,d=271733878;for(let t=0;t<e.length;t+=16){const r=o,f=c,p=l,v=d;o=a(o,c,l,d,e[t],7,-680876936),d=a(d,o,c,l,e[t+1],12,-389564586),l=a(l,d,o,c,e[t+2],17,606105819),c=a(c,l,d,o,e[t+3],22,-1044525330),o=a(o,c,l,d,e[t+4],7,-176418897),d=a(d,o,c,l,e[t+5],12,1200080426),l=a(l,d,o,c,e[t+6],17,-1473231341),c=a(c,l,d,o,e[t+7],22,-45705983),o=a(o,c,l,d,e[t+8],7,1770035416),d=a(d,o,c,l,e[t+9],12,-1958414417),l=a(l,d,o,c,e[t+10],17,-42063),c=a(c,l,d,o,e[t+11],22,-1990404162),o=a(o,c,l,d,e[t+12],7,1804603682),d=a(d,o,c,l,e[t+13],12,-40341101),l=a(l,d,o,c,e[t+14],17,-1502002290),c=a(c,l,d,o,e[t+15],22,1236535329),o=i(o,c,l,d,e[t+1],5,-165796510),d=i(d,o,c,l,e[t+6],9,-1069501632),l=i(l,d,o,c,e[t+11],14,643717713),c=i(c,l,d,o,e[t],20,-373897302),o=i(o,c,l,d,e[t+5],5,-701558691),d=i(d,o,c,l,e[t+10],9,38016083),l=i(l,d,o,c,e[t+15],14,-660478335),c=i(c,l,d,o,e[t+4],20,-405537848),o=i(o,c,l,d,e[t+9],5,568446438),d=i(d,o,c,l,e[t+14],9,-1019803690),l=i(l,d,o,c,e[t+3],14,-187363961),c=i(c,l,d,o,e[t+8],20,1163531501),o=i(o,c,l,d,e[t+13],5,-1444681467),d=i(d,o,c,l,e[t+2],9,-51403784),l=i(l,d,o,c,e[t+7],14,1735328473),c=i(c,l,d,o,e[t+12],20,-1926607734),o=u(o,c,l,d,e[t+5],4,-378558),d=u(d,o,c,l,e[t+8],11,-2022574463),l=u(l,d,o,c,e[t+11],16,1839030562),c=u(c,l,d,o,e[t+14],23,-35309556),o=u(o,c,l,d,e[t+1],4,-1530992060),d=u(d,o,c,l,e[t+4],11,1272893353),l=u(l,d,o,c,e[t+7],16,-155497632),c=u(c,l,d,o,e[t+10],23,-1094730640),o=u(o,c,l,d,e[t+13],4,681279174),d=u(d,o,c,l,e[t],11,-358537222),l=u(l,d,o,c,e[t+3],16,-722521979),c=u(c,l,d,o,e[t+6],23,76029189),o=u(o,c,l,d,e[t+9],4,-640364487),d=u(d,o,c,l,e[t+12],11,-421815835),l=u(l,d,o,c,e[t+15],16,530742520),c=u(c,l,d,o,e[t+2],23,-995338651),o=s(o,c,l,d,e[t],6,-198630844),d=s(d,o,c,l,e[t+7],10,1126891415),l=s(l,d,o,c,e[t+14],15,-1416354905),c=s(c,l,d,o,e[t+5],21,-57434055),o=s(o,c,l,d,e[t+12],6,1700485571),d=s(d,o,c,l,e[t+3],10,-1894986606),l=s(l,d,o,c,e[t+10],15,-1051523),c=s(c,l,d,o,e[t+1],21,-2054922799),o=s(o,c,l,d,e[t+8],6,1873313359),d=s(d,o,c,l,e[t+15],10,-30611744),l=s(l,d,o,c,e[t+6],15,-1560198380),c=s(c,l,d,o,e[t+13],21,1309151649),o=s(o,c,l,d,e[t+4],6,-145523070),d=s(d,o,c,l,e[t+11],10,-1120210379),l=s(l,d,o,c,e[t+2],15,718787259),c=s(c,l,d,o,e[t+9],21,-343485551),o=n(o,r),c=n(c,f),l=n(l,p),d=n(d,v)}return[o,c,l,d]}(function(e){if(0===e.length)return[];const t=8*e.length,n=new Uint32Array(r(t));for(let r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))};t.default=c},460:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};t.default=r},688:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default="00000000-0000-0000-0000-000000000000"},512:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=r(893))&&n.__esModule?n:{default:n};var a=function(e){if(!(0,o.default)(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r};t.default=a},264:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},722:(e,t)=>{let r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)};const n=new Uint8Array(16)},210:(e,t)=>{function r(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function n(e,t){return e<<t|e>>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e){const t=[1518500249,1859775393,2400959708,3395469782],o=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const a=e.length/4+2,i=Math.ceil(a/16),u=new Array(i);for(let t=0;t<i;++t){const r=new Uint32Array(16);for(let n=0;n<16;++n)r[n]=e[64*t+4*n]<<24|e[64*t+4*n+1]<<16|e[64*t+4*n+2]<<8|e[64*t+4*n+3];u[t]=r}u[i-1][14]=8*(e.length-1)/Math.pow(2,32),u[i-1][14]=Math.floor(u[i-1][14]),u[i-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<i;++e){const a=new Uint32Array(80);for(let t=0;t<16;++t)a[t]=u[e][t];for(let e=16;e<80;++e)a[e]=n(a[e-3]^a[e-8]^a[e-14]^a[e-16],1);let i=o[0],s=o[1],c=o[2],l=o[3],d=o[4];for(let e=0;e<80;++e){const o=Math.floor(e/20),u=n(i,5)+r(o,s,c,l)+d+t[o]+a[e]>>>0;d=l,l=c,c=n(s,30)>>>0,s=i,i=u}o[0]=o[0]+i>>>0,o[1]=o[1]+s>>>0,o[2]=o[2]+c>>>0,o[3]=o[3]+l>>>0,o[4]=o[4]+d>>>0}return[o[0]>>24&255,o[0]>>16&255,o[0]>>8&255,255&o[0],o[1]>>24&255,o[1]>>16&255,o[1]>>8&255,255&o[1],o[2]>>24&255,o[2]>>16&255,o[2]>>8&255,255&o[2],o[3]>>24&255,o[3]>>16&255,o[3]>>8&255,255&o[3],o[4]>>24&255,o[4]>>16&255,o[4]>>8&255,255&o[4]]};t.default=o},750:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=i;var n,o=(n=r(893))&&n.__esModule?n:{default:n};const a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));function i(e,t=0){return a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]}var u=function(e,t=0){const r=i(e,t);if(!(0,o.default)(r))throw TypeError("Stringified UUID is invalid");return r};t.default=u},766:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=r(722))&&n.__esModule?n:{default:n},a=r(750);let i,u,s=0,c=0;var l=function(e,t,r){let n=t&&r||0;const l=t||new Array(16);let d=(e=e||{}).node||i,f=void 0!==e.clockseq?e.clockseq:u;if(null==d||null==f){const t=e.random||(e.rng||o.default)();null==d&&(d=i=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==f&&(f=u=16383&(t[6]<<8|t[7]))}let p=void 0!==e.msecs?e.msecs:Date.now(),v=void 0!==e.nsecs?e.nsecs:c+1;const h=p-s+(v-c)/1e4;if(h<0&&void 0===e.clockseq&&(f=f+1&16383),(h<0||p>s)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,c=v,u=f,p+=122192928e5;const y=(1e4*(268435455&p)+v)%4294967296;l[n++]=y>>>24&255,l[n++]=y>>>16&255,l[n++]=y>>>8&255,l[n++]=255&y;const b=p/4294967296*1e4&268435455;l[n++]=b>>>8&255,l[n++]=255&b,l[n++]=b>>>24&15|16,l[n++]=b>>>16&255,l[n++]=f>>>8|128,l[n++]=255&f;for(let e=0;e<6;++e)l[n+e]=d[e];return t||(0,a.unsafeStringify)(l)};t.default=l},532:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(449)),o=a(r(391));function a(e){return e&&e.__esModule?e:{default:e}}var i=(0,n.default)("v3",48,o.default);t.default=i},449:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,r){function n(e,n,i,u){var s;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof n&&(n=(0,a.default)(n)),16!==(null===(s=n)||void 0===s?void 0:s.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+e.length);if(c.set(n),c.set(e,n.length),c=r(c),c[6]=15&c[6]|t,c[8]=63&c[8]|128,i){u=u||0;for(let e=0;e<16;++e)i[u+e]=c[e];return i}return(0,o.unsafeStringify)(c)}try{n.name=e}catch(e){}return n.DNS=i,n.URL=u,n};var n,o=r(750),a=(n=r(512))&&n.__esModule?n:{default:n};const i="6ba7b810-9dad-11d1-80b4-00c04fd430c8";t.DNS=i;const u="6ba7b811-9dad-11d1-80b4-00c04fd430c8";t.URL=u},521:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(460)),o=i(r(722)),a=r(750);function i(e){return e&&e.__esModule?e:{default:e}}var u=function(e,t,r){if(n.default.randomUUID&&!t&&!e)return n.default.randomUUID();const i=(e=e||{}).random||(e.rng||o.default)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=i[e];return t}return(0,a.unsafeStringify)(i)};t.default=u},10:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(449)),o=a(r(210));function a(e){return e&&e.__esModule?e:{default:e}}var i=(0,n.default)("v5",80,o.default);t.default=i},893:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=r(264))&&n.__esModule?n:{default:n};var a=function(e){return"string"==typeof e&&o.default.test(e)};t.default=a},687:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=r(893))&&n.__esModule?n:{default:n};var a=function(e){if(!(0,o.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)};t.default=a},63:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.jwtDecode=t.InvalidTokenError=void 0;class r extends Error{}function n(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,((e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(t)}catch(e){return atob(t)}}t.InvalidTokenError=r,r.prototype.name="InvalidTokenError",t.jwtDecode=function(e,t){if("string"!=typeof e)throw new r("Invalid token specified: must be a string");t||(t={});const o=!0===t.header?0:1,a=e.split(".")[o];if("string"!=typeof a)throw new r(`Invalid token specified: missing part #${o+1}`);let i;try{i=n(a)}catch(e){throw new r(`Invalid token specified: invalid base64 for part #${o+1} (${e.message})`)}try{return JSON.parse(i)}catch(e){throw new r(`Invalid token specified: invalid json for part #${o+1} (${e.message})`)}}}},t={};var r=function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}(448);module.exports=r})();
|
1
|
+
(()=>{"use strict";var e={781:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(632),t),o(r(448),t),o(r(732),t)},473:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.createIFrame=function(e){var t=e.eventHandler,r=e.context,a=e.React,i=e.src,u=e.gameId,s=e.style,c=e.customProps,l=a.createRef(),d=a.createElement("iframe",n({src:i,id:(0,o.createIFrameId)(u),style:s,ref:l},c)),f=function(e){var n;e.source===(null===(n=l.current)||void 0===n?void 0:n.contentWindow)&&(null==t||t(e,r))};return window.addEventListener("message",f,!1),{iframe:d,destructor:function(){window.removeEventListener("message",f,!1),function(){var e;try{if(null===(e=null==r?void 0:r.getMetadata())||void 0===e?void 0:e.prevWindowTitle)return window.top.document.title=r.getMetadata().prevWindowTitle;if(window.localStorage.getItem("prevWindowTitle"))return window.top.document.title=window.localStorage.getItem("prevWindowTitle");window.top.document.title=""}catch(e){}}()},meta:{iframeRef:l}}};var o=r(598)},105:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(473),t)},953:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createIFrame=function(e){var t=e.src,r=e.gameId,o=e.style,a=e.eventHandler,i=e.context,u=e.customProps,s=document.createElement("iframe");for(var c in s.src=t,s.id=(0,n.createIFrameId)(r),o)if(c in s.style){var l=o[c];try{s.style.setProperty(c,"number"==typeof l?"".concat(l,"px"):l)}catch(e){console.error("Error setting style for ".concat(c,": "),e)}}for(var c in Object.keys(Object(u)))s.setAttribute(c,u[c]);var d=function(e){e.source===s.contentWindow&&(null==a||a(e,i))};return window.addEventListener("message",d,!1),{iframe:s,destructor:function(){window.removeEventListener("message",d,!1),function(){var e;try{(null===(e=null==i?void 0:i.getMetadata())||void 0===e?void 0:e.prevWindowTitle)?window.top.document.title=i.getMetadata().prevWindowTitle:window.localStorage.getItem("prevWindowTitle")?window.top.document.title=window.localStorage.getItem("prevWindowTitle"):window.top.document.title=""}catch(e){}}()},meta:{}}};var n=r(598)},441:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(953),t)},981:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.config=void 0,t.config={IFRAME_GAME_ID_PREFIX:"notix_embedded_",backendBaseUrls:{prod:"https://game-aggregator.notix.games/external/api/v1",stage:"https://game-aggregator.stage.notix.games/external/api/v1",dev:"https://game-aggregator.main.notix.games/external/api/v1"},authUrls:{prod:"https://auth-service.notix.games/external/api/v1",stage:"https://auth-service.stage.notix.games/external/api/v1",dev:"https://auth-service.main.notix.games/external/api/v1"}}},874:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}s((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},i=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.iFrameCreators=void 0,t.initNotixBridge=function(e){var r,d,f,b,y,g,w=this,m=!1,_=e,P="prod",I=null,O=function(){return o(w,void 0,void 0,(function(){var e,t,n,o,i,u;return a(this,(function(a){switch(a.label){case 0:if(!y)throw new Error("Refresh token is not available.");return e=b||(0,h.default)(P,"auth"),t="".concat(e,"/partners/auth/refresh"),[4,fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Bearer ".concat(r)},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:y})})];case 1:if(!(n=a.sent()).ok)throw new Error("Failed to refresh access token.");return[4,n.json()];case 2:return o=a.sent(),i=o.access_token,u=(0,s.jwtDecode)(i),r=i,g=1e3*u.exp,y=o.refresh_token,S(),[2]}}))}))},j=function(e){var t=e.token,n=e.refreshToken,o=e.environment,a=e.setting,i=e.url,u=e.authUrl;if(!t)throw new Error("Token is not provided on Notix Bridge configuration.");var c=(0,s.jwtDecode)(t);r=t,y=n||"",g=1e3*c.exp,o&&(P=o),"lobby"===a&&(d=!0),i&&(f=i),u&&(b=u),m=!0,S()},M=function(){return o(w,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:if(t=Date.now(),!(g<=t))return[2];if(!y)throw new Error("Access token is expired and no refresh token is available.");if(function(){var e=(0,s.jwtDecode)(y);if(!e.exp)throw new Error("Token does not contain an expiration date");return 1e3*e.exp<=Date.now()}())throw new Error("Due to long inactivity both refresh and auth tokens are expired. Probably you should reload page or reinitialize to obtain a new pair.");return[4,O()];case 1:return e.sent(),[2]}var t}))}))},S=function(){if(y){var e=Date.now(),t=g-e-18e4;I&&clearTimeout(I),I=setTimeout((function(){return o(w,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,O()];case 1:return t.sent(),[3,3];case 2:return e=t.sent(),console.error("Error refreshing token:",e),[3,3];case 3:return[2]}}))}))}),t)}};return{createIFrame:function(e){return function(e){return o(this,void 0,void 0,(function(){var o,i,s,l,h,b,y,g,w,I,O,j,S,k,x,A,E,T,U,G,R,W,L,F,D,B,N,q,C,H,Z;return a(this,(function(a){switch(a.label){case 0:return[4,M()];case 1:if(a.sent(),o=e.gameId,i=e.nodeId,s=e.player,l=e.browserSession,h=e.balance,b=e.eventHandler,y=e.customProps,g=e.style,w=e.sessionId,I=s.id,O=s.country,j=l.viewType,S=l.language,k=l.timeZone,x=l.ip,A=h.currency,E=h.amount,!m)throw new Error("Notix Bridge is not configured. Please call the configure method first.");a.label=2;case 2:return a.trys.push([2,4,,5]),T=(0,u.v4)(),[4,(0,c.startGame)({gameId:o.toString(),nodeId:i,requestId:T,player:{id:I,country:O},browserSession:{language:S,viewType:j,timeZone:k,ip:x},balance:{currency:A,amount:E},partnerToken:r,env:P,isLobby:d,sessionId:w,providedURL:f})];case 3:if(U=a.sent(),G=U.iFrameURI,R=U.token,!G)throw new Error("No iFrame URI provided by the server.");if(!R)throw new Error("No player token provided by the server.");if(W={_playerToken:R,_iframe:null,_metadata:{},updateMetadata:function(e){this._metadata=Object.assign(this._metadata,e)},addPropertyToMetadata:function(e,t){this._metadata[e]=t},getMetadata:function(){return this._metadata},getPlayerToken:function(){return this._playerToken},getIframe:function(){return this._iframe},updatePlayerToken:function(e){this._playerToken=e},updateIframe:function(e){this._iframe=e}},L=(0,p.createEventMiddleware)(v.handleGPWebAppInit,v.handleGPWebAppSetPageLoaded,v.handleGPWebAppSetPageTitle,v.handleGPWebAppShowAuthenticationFailed,v.handleGPWebAppShowGameState)(b),F=null,"react"===_){if(!(D=e.React))throw new Error("React instance is not provided.");B={eventHandler:L,context:W,React:D,customProps:y,src:G,gameId:o,style:g},F=t.iFrameCreators.react(B)}else"vanilla"===_&&(N={eventHandler:L,customProps:y,context:W,src:G,gameId:o,style:g},F=t.iFrameCreators.vanilla(N));if(!F)throw new Error("No iFrame creator result.");return q=F.iframe,C=F.destructor,H=F.meta,W.updateIframe(q),W.updateMetadata(Object.assign(H,{framework:_})),[2,n({iframe:q,destructor:C},H)];case 4:return[2,{error:Z=a.sent(),status:Z.status,message:Z.message}];case 5:return[2]}}))}))}(e)},configure:j,configureAsync:function(e){return o(w,void 0,void 0,(function(){return a(this,(function(t){return[2,new Promise((function(t,r){try{j(e),t()}catch(e){r(e)}}))]}))}))},getGames:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(w,i([],e,!0),void 0,(function(e){var t,n=void 0===e?{}:e,o=n.offset,i=n.limit,u=n.providers,s=n.categories;return a(this,(function(e){switch(e.label){case 0:return[4,M()];case 1:e.sent(),e.label=2;case 2:if(e.trys.push([2,4,,5]),!m)throw new Error("Notix Bridge is not configured. Please call the configure method first.");return[4,(0,l.getGamesList)({token:r,env:P,isLobby:d,providedURL:f,offset:o,limit:i,providers:u,categories:s})];case 3:return[2,e.sent()];case 4:return[2,{error:t=e.sent(),status:t.status,message:t.message}];case 5:return[2]}}))}))},getIFrameURI:function(e){return o(this,void 0,void 0,(function(){var t,n,o,i,s,l,p,v,h,b,y,g,w,_,I,O,j,S,k;return a(this,(function(a){switch(a.label){case 0:return[4,M()];case 1:if(a.sent(),t=e.gameId,n=e.nodeId,o=e.player,i=e.browserSession,s=e.balance,l=e.sessionId,p=o.id,v=o.country,h=i.viewType,b=i.language,y=i.timeZone,g=i.ip,w=s.currency,_=s.amount,!m)throw new Error("Notix Bridge is not configured. Please call the configure method first.");a.label=2;case 2:return a.trys.push([2,4,,5]),I=(0,u.v4)(),[4,(0,c.startGame)({gameId:t.toString(),nodeId:n,requestId:I,player:{id:p,country:v},browserSession:{language:b,viewType:h,timeZone:y,ip:g},balance:{currency:w,amount:_},partnerToken:r,env:P,sessionId:l,isLobby:d,providedURL:f})];case 3:if(O=a.sent(),j=O.iFrameURI,S=O.token,!j)throw new Error("No iFrame URI provided by the server.");if(!S)throw new Error("No player token provided by the server.");return[2,j];case 4:return[2,{error:k=a.sent(),status:k.status,message:k.message}];case 5:return[2]}}))}))},configured:m}};var u=r(935),s=r(63),c=r(597),l=r(148),d=r(105),f=r(441),p=r(598),v=r(155),h=r(710);t.iFrameCreators={react:d.createIFrame,vanilla:f.createIFrame}},155:(e,t)=>{function r(e){var t,r=e.getIframe(),n=e.getMetadata();return"react"===n.framework?null===(t=null==n?void 0:n.iframeRef)||void 0===t?void 0:t.current:r}Object.defineProperty(t,"__esModule",{value:!0}),t.handleGPWebAppShowGameState=t.handleGPWebAppShowAuthenticationFailed=t.handleGPWebAppSetPageTitle=t.handleGPWebAppSetPageLoaded=t.handleGPWebAppInit=void 0;t.handleGPWebAppInit=function(e,t,n){var o,a,i;if("GPWebAppInit"===e.data.type){var u=r(t);null===(o=null==u?void 0:u.contentWindow)||void 0===o||o.postMessage({type:"GPWebAppInitResult",data:{result:!0,requestId:null===(i=null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.data)||void 0===i?void 0:i.requestId}},"*")}n()};t.handleGPWebAppSetPageLoaded=function(e,t,n){"GPWebAppSetPageLoaded"===e.data.type&&r(t).contentWindow.postMessage({type:"GPWebAppSetPageLoadedResult",data:{result:!0,requestId:e.data.data.requestId}},"*");n()};t.handleGPWebAppSetPageTitle=function(e,t,n){try{var o=r(t);if("GPWebAppSetPageTitle"===e.data.type){var a=window.top.document.title;window.top.document.title=e.data.data.title,t.addPropertyToMetadata("prevWindowTitle",a),window.localStorage.setItem("prevWindowTitle",a),o.contentWindow.postMessage({type:"GPWebAppSetPageTitleResult",data:{result:!0,requestId:e.data.data.requestId}},"*")}}catch(e){}n()};t.handleGPWebAppShowAuthenticationFailed=function(e,t,n){var o=r(t);"GPWebAppShowAuthenticationFailed"===e.data.type&&o.contentWindow.postMessage({type:"GPWebAppShowAuthenticationFailedResult",data:{result:!0,requestId:e.data.data.requestId,token:"NEW_TOKEN_WILL_BE_HERE"}},"*"),n()};t.handleGPWebAppShowGameState=function(e,t,n){var o=r(t);"GPWebAppShowGameState"===e.data.type&&o.contentWindow.postMessage({type:"GPWebAppShowGameStateResult",data:{result:!0,requestId:e.data.data.requestId}},"*"),n()}},632:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(874),t),o(r(850),t)},148:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}s((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.getGamesList=void 0;var a=r(710),i=function(e){return n(void 0,[e],void 0,(function(e){var t,r,n,i,u,s,c=e.token,l=e.env,d=e.isLobby,f=e.providedURL,p=e.limit,v=e.offset,h=e.providers,b=e.categories;return o(this,(function(e){switch(e.label){case 0:return t=f||(0,a.default)(l),r="".concat(t,d?"/partners/lobby/games/list":"/partners/games/list"),n=new URLSearchParams,p&&n.append("limit",p.toString()),v&&n.append("offset",v.toString()),h&&h.length>0&&h.forEach((function(e){return n.append("providers",e)})),b&&b.length>0&&b.forEach((function(e){return n.append("categories",e)})),i=n.size?"".concat(r,"?").concat(n.toString()):r,[4,fetch(i,{method:"GET",headers:{Authorization:"Bearer ".concat(c)}})];case 1:if(!(u=e.sent()).ok)throw(s=new Error("Failed to fetch games list: Server responded with status ".concat(u.status))).status=u.status,s;return[2,u.json()]}}))}))};t.getGamesList=function(e){return n(void 0,[e],void 0,(function(e){var t,r=e.token,n=e.env,a=e.isLobby,u=e.providedURL,s=e.limit,c=e.offset,l=e.providers,d=e.categories;return o(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,i({token:r,env:n,isLobby:a,providedURL:u,limit:s,offset:c,providers:l,categories:d})];case 1:return[2,e.sent()];case 2:throw{message:(t=e.sent()).message,status:t.status||null};case 3:return[2]}}))}))}},597:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}s((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.startGame=void 0;var a=r(710);t.startGame=function(e){return n(void 0,void 0,void 0,(function(){var t,r,n,i,u,s,c,l;return o(this,(function(o){switch(o.label){case 0:t=e.providedURL||(0,a.default)(e.env),r=e.isLobby?"".concat(t,"/partners/lobby/games/start"):"".concat(t,"/partners/games/start"),n=function(e){var t=e.gameId,r=e.nodeId,n=e.requestId,o=e.player,a=e.browserSession,i=e.balance,u=e.sessionId;return{requestId:n,gameId:t,nodeId:r,isTest:!0,player:{id:o.id,country:o.country},browserSession:{language:a.language,viewType:a.viewType,timeZone:a.timeZone,ip:a.ip},balance:{currency:i.currency,amount:i.amount},sessionId:u}}(e),i={method:"POST",headers:{Authorization:"Bearer ".concat(e.partnerToken),"Content-Type":"application/json"},body:JSON.stringify(n)},o.label=1;case 1:return o.trys.push([1,4,,5]),[4,fetch(r,i)];case 2:if(!(u=o.sent()).ok)throw(s=new Error("Failed to start game: Server responded with status ".concat(u.status))).status=u.status,s;return[4,u.json()];case 3:return c=o.sent(),[2,{iFrameURI:decodeURI(null==c?void 0:c.uri),token:null==c?void 0:c.sessionId}];case 4:throw{message:(l=o.sent()).message,status:l.status||null};case 5:return[2]}}))}))}},546:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},850:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(546),t)},568:function(e,t){var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}s((n=n.apply(e,t||[])).next())}))},n=this&&this.__generator||function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.createEventMiddleware=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var o=this;return function(a,i){return r(o,void 0,void 0,(function(){var o,u=this;return n(this,(function(s){switch(s.label){case 0:o=function(s){return r(u,void 0,void 0,(function(){var u=this;return n(this,(function(c){switch(c.label){case 0:return s<e.length?[4,e[s](a,i,(function(){return r(u,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,o(s+1)];case 1:return e.sent(),[2]}}))}))}))]:[3,2];case 1:return c.sent(),[3,4];case 2:return[4,t(a)];case 3:c.sent(),c.label=4;case 4:return[2]}}))}))},s.label=1;case 1:return s.trys.push([1,3,,4]),[4,o(0)];case 2:return[2,s.sent()];case 3:throw s.sent();case 4:return[2]}}))}))}}}},710:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===t&&(t="games");var r=("games"===t?n.config.backendBaseUrls:n.config.authUrls)[e];if(r)return r;throw new Error("Incorrect env identifier passed in getBaseURL in Bridge backend request. Could not find matching base url")};var n=r(981)},598:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createIFrameId=function(e){return"".concat(a).concat(e)};var a=r(981).config.IFRAME_GAME_ID_PREFIX;o(r(568),t)},448:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NotixBridge=void 0;var n=(0,r(781).initNotixBridge)("react");t.NotixBridge=n},732:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VanillaNotixBridge=void 0;var n=(0,r(632).initNotixBridge)("vanilla");t.VanillaNotixBridge=n},935:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return s.default}});var n=f(r(766)),o=f(r(532)),a=f(r(521)),i=f(r(10)),u=f(r(688)),s=f(r(687)),c=f(r(893)),l=f(r(750)),d=f(r(512));function f(e){return e&&e.__esModule?e:{default:e}}},391:(e,t)=>{function r(e){return 14+(e+64>>>9<<4)+1}function n(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function o(e,t,r,o,a,i){return n((u=n(n(t,e),n(o,i)))<<(s=a)|u>>>32-s,r);var u,s}function a(e,t,r,n,a,i,u){return o(t&r|~t&n,e,t,a,i,u)}function i(e,t,r,n,a,i,u){return o(t&n|r&~n,e,t,a,i,u)}function u(e,t,r,n,a,i,u){return o(t^r^n,e,t,a,i,u)}function s(e,t,r,n,a,i,u){return o(r^(t|~n),e,t,a,i,u)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var c=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}return function(e){const t=[],r=32*e.length,n="0123456789abcdef";for(let o=0;o<r;o+=8){const r=e[o>>5]>>>o%32&255,a=parseInt(n.charAt(r>>>4&15)+n.charAt(15&r),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[r(t)-1]=t;let o=1732584193,c=-271733879,l=-1732584194,d=271733878;for(let t=0;t<e.length;t+=16){const r=o,f=c,p=l,v=d;o=a(o,c,l,d,e[t],7,-680876936),d=a(d,o,c,l,e[t+1],12,-389564586),l=a(l,d,o,c,e[t+2],17,606105819),c=a(c,l,d,o,e[t+3],22,-1044525330),o=a(o,c,l,d,e[t+4],7,-176418897),d=a(d,o,c,l,e[t+5],12,1200080426),l=a(l,d,o,c,e[t+6],17,-1473231341),c=a(c,l,d,o,e[t+7],22,-45705983),o=a(o,c,l,d,e[t+8],7,1770035416),d=a(d,o,c,l,e[t+9],12,-1958414417),l=a(l,d,o,c,e[t+10],17,-42063),c=a(c,l,d,o,e[t+11],22,-1990404162),o=a(o,c,l,d,e[t+12],7,1804603682),d=a(d,o,c,l,e[t+13],12,-40341101),l=a(l,d,o,c,e[t+14],17,-1502002290),c=a(c,l,d,o,e[t+15],22,1236535329),o=i(o,c,l,d,e[t+1],5,-165796510),d=i(d,o,c,l,e[t+6],9,-1069501632),l=i(l,d,o,c,e[t+11],14,643717713),c=i(c,l,d,o,e[t],20,-373897302),o=i(o,c,l,d,e[t+5],5,-701558691),d=i(d,o,c,l,e[t+10],9,38016083),l=i(l,d,o,c,e[t+15],14,-660478335),c=i(c,l,d,o,e[t+4],20,-405537848),o=i(o,c,l,d,e[t+9],5,568446438),d=i(d,o,c,l,e[t+14],9,-1019803690),l=i(l,d,o,c,e[t+3],14,-187363961),c=i(c,l,d,o,e[t+8],20,1163531501),o=i(o,c,l,d,e[t+13],5,-1444681467),d=i(d,o,c,l,e[t+2],9,-51403784),l=i(l,d,o,c,e[t+7],14,1735328473),c=i(c,l,d,o,e[t+12],20,-1926607734),o=u(o,c,l,d,e[t+5],4,-378558),d=u(d,o,c,l,e[t+8],11,-2022574463),l=u(l,d,o,c,e[t+11],16,1839030562),c=u(c,l,d,o,e[t+14],23,-35309556),o=u(o,c,l,d,e[t+1],4,-1530992060),d=u(d,o,c,l,e[t+4],11,1272893353),l=u(l,d,o,c,e[t+7],16,-155497632),c=u(c,l,d,o,e[t+10],23,-1094730640),o=u(o,c,l,d,e[t+13],4,681279174),d=u(d,o,c,l,e[t],11,-358537222),l=u(l,d,o,c,e[t+3],16,-722521979),c=u(c,l,d,o,e[t+6],23,76029189),o=u(o,c,l,d,e[t+9],4,-640364487),d=u(d,o,c,l,e[t+12],11,-421815835),l=u(l,d,o,c,e[t+15],16,530742520),c=u(c,l,d,o,e[t+2],23,-995338651),o=s(o,c,l,d,e[t],6,-198630844),d=s(d,o,c,l,e[t+7],10,1126891415),l=s(l,d,o,c,e[t+14],15,-1416354905),c=s(c,l,d,o,e[t+5],21,-57434055),o=s(o,c,l,d,e[t+12],6,1700485571),d=s(d,o,c,l,e[t+3],10,-1894986606),l=s(l,d,o,c,e[t+10],15,-1051523),c=s(c,l,d,o,e[t+1],21,-2054922799),o=s(o,c,l,d,e[t+8],6,1873313359),d=s(d,o,c,l,e[t+15],10,-30611744),l=s(l,d,o,c,e[t+6],15,-1560198380),c=s(c,l,d,o,e[t+13],21,1309151649),o=s(o,c,l,d,e[t+4],6,-145523070),d=s(d,o,c,l,e[t+11],10,-1120210379),l=s(l,d,o,c,e[t+2],15,718787259),c=s(c,l,d,o,e[t+9],21,-343485551),o=n(o,r),c=n(c,f),l=n(l,p),d=n(d,v)}return[o,c,l,d]}(function(e){if(0===e.length)return[];const t=8*e.length,n=new Uint32Array(r(t));for(let r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))};t.default=c},460:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};t.default=r},688:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default="00000000-0000-0000-0000-000000000000"},512:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=r(893))&&n.__esModule?n:{default:n};var a=function(e){if(!(0,o.default)(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r};t.default=a},264:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},722:(e,t)=>{let r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)};const n=new Uint8Array(16)},210:(e,t)=>{function r(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function n(e,t){return e<<t|e>>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e){const t=[1518500249,1859775393,2400959708,3395469782],o=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const a=e.length/4+2,i=Math.ceil(a/16),u=new Array(i);for(let t=0;t<i;++t){const r=new Uint32Array(16);for(let n=0;n<16;++n)r[n]=e[64*t+4*n]<<24|e[64*t+4*n+1]<<16|e[64*t+4*n+2]<<8|e[64*t+4*n+3];u[t]=r}u[i-1][14]=8*(e.length-1)/Math.pow(2,32),u[i-1][14]=Math.floor(u[i-1][14]),u[i-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<i;++e){const a=new Uint32Array(80);for(let t=0;t<16;++t)a[t]=u[e][t];for(let e=16;e<80;++e)a[e]=n(a[e-3]^a[e-8]^a[e-14]^a[e-16],1);let i=o[0],s=o[1],c=o[2],l=o[3],d=o[4];for(let e=0;e<80;++e){const o=Math.floor(e/20),u=n(i,5)+r(o,s,c,l)+d+t[o]+a[e]>>>0;d=l,l=c,c=n(s,30)>>>0,s=i,i=u}o[0]=o[0]+i>>>0,o[1]=o[1]+s>>>0,o[2]=o[2]+c>>>0,o[3]=o[3]+l>>>0,o[4]=o[4]+d>>>0}return[o[0]>>24&255,o[0]>>16&255,o[0]>>8&255,255&o[0],o[1]>>24&255,o[1]>>16&255,o[1]>>8&255,255&o[1],o[2]>>24&255,o[2]>>16&255,o[2]>>8&255,255&o[2],o[3]>>24&255,o[3]>>16&255,o[3]>>8&255,255&o[3],o[4]>>24&255,o[4]>>16&255,o[4]>>8&255,255&o[4]]};t.default=o},750:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=i;var n,o=(n=r(893))&&n.__esModule?n:{default:n};const a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));function i(e,t=0){return a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]}var u=function(e,t=0){const r=i(e,t);if(!(0,o.default)(r))throw TypeError("Stringified UUID is invalid");return r};t.default=u},766:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=r(722))&&n.__esModule?n:{default:n},a=r(750);let i,u,s=0,c=0;var l=function(e,t,r){let n=t&&r||0;const l=t||new Array(16);let d=(e=e||{}).node||i,f=void 0!==e.clockseq?e.clockseq:u;if(null==d||null==f){const t=e.random||(e.rng||o.default)();null==d&&(d=i=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==f&&(f=u=16383&(t[6]<<8|t[7]))}let p=void 0!==e.msecs?e.msecs:Date.now(),v=void 0!==e.nsecs?e.nsecs:c+1;const h=p-s+(v-c)/1e4;if(h<0&&void 0===e.clockseq&&(f=f+1&16383),(h<0||p>s)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,c=v,u=f,p+=122192928e5;const b=(1e4*(268435455&p)+v)%4294967296;l[n++]=b>>>24&255,l[n++]=b>>>16&255,l[n++]=b>>>8&255,l[n++]=255&b;const y=p/4294967296*1e4&268435455;l[n++]=y>>>8&255,l[n++]=255&y,l[n++]=y>>>24&15|16,l[n++]=y>>>16&255,l[n++]=f>>>8|128,l[n++]=255&f;for(let e=0;e<6;++e)l[n+e]=d[e];return t||(0,a.unsafeStringify)(l)};t.default=l},532:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(449)),o=a(r(391));function a(e){return e&&e.__esModule?e:{default:e}}var i=(0,n.default)("v3",48,o.default);t.default=i},449:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,r){function n(e,n,i,u){var s;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof n&&(n=(0,a.default)(n)),16!==(null===(s=n)||void 0===s?void 0:s.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+e.length);if(c.set(n),c.set(e,n.length),c=r(c),c[6]=15&c[6]|t,c[8]=63&c[8]|128,i){u=u||0;for(let e=0;e<16;++e)i[u+e]=c[e];return i}return(0,o.unsafeStringify)(c)}try{n.name=e}catch(e){}return n.DNS=i,n.URL=u,n};var n,o=r(750),a=(n=r(512))&&n.__esModule?n:{default:n};const i="6ba7b810-9dad-11d1-80b4-00c04fd430c8";t.DNS=i;const u="6ba7b811-9dad-11d1-80b4-00c04fd430c8";t.URL=u},521:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r(460)),o=i(r(722)),a=r(750);function i(e){return e&&e.__esModule?e:{default:e}}var u=function(e,t,r){if(n.default.randomUUID&&!t&&!e)return n.default.randomUUID();const i=(e=e||{}).random||(e.rng||o.default)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=i[e];return t}return(0,a.unsafeStringify)(i)};t.default=u},10:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(449)),o=a(r(210));function a(e){return e&&e.__esModule?e:{default:e}}var i=(0,n.default)("v5",80,o.default);t.default=i},893:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=r(264))&&n.__esModule?n:{default:n};var a=function(e){return"string"==typeof e&&o.default.test(e)};t.default=a},687:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,o=(n=r(893))&&n.__esModule?n:{default:n};var a=function(e){if(!(0,o.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)};t.default=a},63:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.jwtDecode=t.InvalidTokenError=void 0;class r extends Error{}function n(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,((e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(t)}catch(e){return atob(t)}}t.InvalidTokenError=r,r.prototype.name="InvalidTokenError",t.jwtDecode=function(e,t){if("string"!=typeof e)throw new r("Invalid token specified: must be a string");t||(t={});const o=!0===t.header?0:1,a=e.split(".")[o];if("string"!=typeof a)throw new r(`Invalid token specified: missing part #${o+1}`);let i;try{i=n(a)}catch(e){throw new r(`Invalid token specified: invalid base64 for part #${o+1} (${e.message})`)}try{return JSON.parse(i)}catch(e){throw new r(`Invalid token specified: invalid json for part #${o+1} (${e.message})`)}}}},t={};var r=function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}(448);module.exports=r})();
|
package/package.json
CHANGED
@@ -1,13 +1,9 @@
|
|
1
|
-
import { GamesResponse, env } from '../types';
|
2
|
-
interface GetGamesListProps {
|
1
|
+
import { GamesResponse, env, V1GameListSearchQuery } from '../types';
|
2
|
+
interface GetGamesListProps extends V1GameListSearchQuery {
|
3
3
|
token: string;
|
4
4
|
env: env;
|
5
5
|
isLobby: boolean;
|
6
6
|
providedURL?: string;
|
7
|
-
limit?: number;
|
8
|
-
offset?: number;
|
9
|
-
providers?: string[];
|
10
|
-
categories?: string[];
|
11
7
|
}
|
12
8
|
export declare const getGamesList: ({ token, env, isLobby, providedURL, limit, offset, providers, categories, }: GetGamesListProps) => Promise<GamesResponse>;
|
13
9
|
export {};
|
@@ -1,28 +1,7 @@
|
|
1
|
-
import {
|
2
|
-
interface
|
3
|
-
id: PlayerId;
|
4
|
-
country: PlayerCountry;
|
5
|
-
}
|
6
|
-
interface BrowserSession {
|
7
|
-
language: Language;
|
8
|
-
viewType: ViewType;
|
9
|
-
timeZone: number;
|
10
|
-
ip: string;
|
11
|
-
}
|
12
|
-
interface Balance {
|
13
|
-
currency: Currency;
|
14
|
-
amount: number;
|
15
|
-
}
|
16
|
-
interface StartGameProps {
|
17
|
-
gameId: GameId;
|
18
|
-
nodeId: NodeId;
|
19
|
-
requestId: RequestId;
|
20
|
-
player: Player;
|
21
|
-
browserSession: BrowserSession;
|
22
|
-
balance: Balance;
|
1
|
+
import { env, V1GameStartQuery } from '../types';
|
2
|
+
interface StartGameProps extends V1GameStartQuery {
|
23
3
|
partnerToken: string;
|
24
4
|
env: env;
|
25
|
-
sessionId?: string;
|
26
5
|
isLobby?: boolean;
|
27
6
|
providedURL?: string;
|
28
7
|
}
|
@@ -0,0 +1,133 @@
|
|
1
|
+
export interface V1GameItemResponse {
|
2
|
+
categories?: string[];
|
3
|
+
currencies?: string[];
|
4
|
+
description?: string;
|
5
|
+
id?: number;
|
6
|
+
image_url?: string;
|
7
|
+
languages?: string[];
|
8
|
+
mobile_horizontal?: boolean;
|
9
|
+
provider_name?: string;
|
10
|
+
title?: string;
|
11
|
+
}
|
12
|
+
export interface V1GameListResponse {
|
13
|
+
games?: V1GameItemResponse[];
|
14
|
+
limit?: number;
|
15
|
+
offset?: number;
|
16
|
+
total?: number;
|
17
|
+
}
|
18
|
+
export interface V1GameListSearchQuery {
|
19
|
+
/** start number */
|
20
|
+
offset?: number;
|
21
|
+
/** number of items */
|
22
|
+
limit?: number;
|
23
|
+
/** list of provider names */
|
24
|
+
providers?: string[];
|
25
|
+
/** list of categories names */
|
26
|
+
categories?: string[];
|
27
|
+
}
|
28
|
+
export interface V1GameStartQuery {
|
29
|
+
balance: {
|
30
|
+
/** @min 0 */
|
31
|
+
amount?: number;
|
32
|
+
currency: string;
|
33
|
+
};
|
34
|
+
browserSession: {
|
35
|
+
ip: string;
|
36
|
+
language: string;
|
37
|
+
/**
|
38
|
+
* @min -12
|
39
|
+
* @max 14
|
40
|
+
*/
|
41
|
+
timeZone?: number;
|
42
|
+
viewType: 'desktop' | 'mobile';
|
43
|
+
};
|
44
|
+
/** @maxLength 100 */
|
45
|
+
gameId: string;
|
46
|
+
nodeId: number;
|
47
|
+
partnerID?: string;
|
48
|
+
player: {
|
49
|
+
country: string;
|
50
|
+
/**
|
51
|
+
* @minLength 2
|
52
|
+
* @maxLength 100
|
53
|
+
*/
|
54
|
+
id: string;
|
55
|
+
};
|
56
|
+
/** @maxLength 100 */
|
57
|
+
requestId: string;
|
58
|
+
sessionId?: string;
|
59
|
+
}
|
60
|
+
export interface V1GameStartResponse {
|
61
|
+
sessionId?: string;
|
62
|
+
uri?: string;
|
63
|
+
}
|
64
|
+
export interface V1LobbyCategoryItemResponse {
|
65
|
+
id?: number;
|
66
|
+
label_en?: string;
|
67
|
+
name?: string;
|
68
|
+
}
|
69
|
+
export interface V1LobbyGameItemResponse {
|
70
|
+
categories?: number[];
|
71
|
+
currencies?: string[];
|
72
|
+
description?: string;
|
73
|
+
id?: number;
|
74
|
+
image_url?: string;
|
75
|
+
languages?: string[];
|
76
|
+
mobile_horizontal?: boolean;
|
77
|
+
priority?: number;
|
78
|
+
provider_id?: number;
|
79
|
+
title?: string;
|
80
|
+
}
|
81
|
+
export interface V1LobbyGameListResponse {
|
82
|
+
categories?: V1LobbyCategoryItemResponse[];
|
83
|
+
games?: V1LobbyGameItemResponse[];
|
84
|
+
limit?: number;
|
85
|
+
offset?: number;
|
86
|
+
providers?: V1LobbyProviderItemResponse[];
|
87
|
+
total?: number;
|
88
|
+
}
|
89
|
+
export interface V1LobbyGameListSearchQuery {
|
90
|
+
/** start number */
|
91
|
+
offset?: number;
|
92
|
+
/** number of items */
|
93
|
+
limit?: number;
|
94
|
+
/** list of provider ids */
|
95
|
+
providers?: number[];
|
96
|
+
/** list of categories ids */
|
97
|
+
categories?: number[];
|
98
|
+
}
|
99
|
+
export interface V1LobbyProviderItemResponse {
|
100
|
+
id?: number;
|
101
|
+
name?: string;
|
102
|
+
}
|
103
|
+
export interface V1LobbyStartQuery {
|
104
|
+
authToken?: string;
|
105
|
+
balance: {
|
106
|
+
/** @min 0 */
|
107
|
+
amount?: number;
|
108
|
+
currency: string;
|
109
|
+
};
|
110
|
+
browserSession: {
|
111
|
+
ip: string;
|
112
|
+
language: string;
|
113
|
+
/**
|
114
|
+
* @min -12
|
115
|
+
* @max 14
|
116
|
+
*/
|
117
|
+
timeZone?: number;
|
118
|
+
viewType: string;
|
119
|
+
};
|
120
|
+
nodeId: number;
|
121
|
+
player: {
|
122
|
+
country: string;
|
123
|
+
/**
|
124
|
+
* @minLength 0
|
125
|
+
* @maxLength 100
|
126
|
+
*/
|
127
|
+
id: string;
|
128
|
+
};
|
129
|
+
requestId: string;
|
130
|
+
}
|
131
|
+
export interface V1LobbyStartResponse {
|
132
|
+
uri?: string;
|
133
|
+
}
|
@@ -1,8 +1,8 @@
|
|
1
|
+
import { V1GameItemResponse, V1GameListResponse } from './contracts';
|
2
|
+
export * from './contracts';
|
1
3
|
export type GameId = number;
|
2
|
-
export type PartnerId = string;
|
3
4
|
export type PlayerId = string;
|
4
5
|
export type NodeId = number;
|
5
|
-
export type RequestId = string;
|
6
6
|
export type PlayerCountry = string;
|
7
7
|
export type Language = string;
|
8
8
|
export type ViewType = 'desktop' | 'mobile';
|
@@ -27,11 +27,7 @@ export interface MiddlewareContext {
|
|
27
27
|
updatePlayerToken: (token: string) => void;
|
28
28
|
updateIframe: (iframe: React.ReactElement | HTMLElement) => void;
|
29
29
|
}
|
30
|
-
export interface GamesResponse {
|
31
|
-
total: number;
|
32
|
-
limit: number;
|
33
|
-
offset: number;
|
34
|
-
games: Game[];
|
30
|
+
export interface GamesResponse extends V1GameListResponse {
|
35
31
|
categories: Category[];
|
36
32
|
providers: Provider[];
|
37
33
|
}
|
@@ -44,14 +40,7 @@ export interface Category {
|
|
44
40
|
name: string;
|
45
41
|
label_en: string;
|
46
42
|
}
|
47
|
-
export interface Game {
|
48
|
-
id: GameId;
|
49
|
-
title: string;
|
50
|
-
description: string;
|
43
|
+
export interface Game extends V1GameItemResponse {
|
51
44
|
provider_id: number;
|
52
|
-
image_url: string;
|
53
45
|
priority: number;
|
54
|
-
categories: number[];
|
55
|
-
currencies: string[];
|
56
|
-
languages: string[];
|
57
46
|
}
|