gearboxdownloadmodal 6.0.61 → 6.0.62
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/dist/index.umd.js
CHANGED
|
@@ -47,7 +47,7 @@ Valid keys: `+JSON.stringify(Object.keys(Z),null," "));var j=le(P,S,D,U,B+"."+S
|
|
|
47
47
|
`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&gl[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Bi=Symbol("internals");function Yt(e){return e&&String(e).trim().toLowerCase()}function hn(e){return e===!1||e==null?e:w.isArray(e)?e.map(hn):String(e)}function ql(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const vl=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function rr(e,t,n,r,i){if(w.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!w.isString(t)){if(w.isString(r))return t.indexOf(r)!==-1;if(w.isRegExp(r))return r.test(t)}}function bl(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Cl(e,t){const n=w.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}class gn{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(s,A,u){const l=Yt(A);if(!l)throw new Error("header name must be a non-empty string");const d=w.findKey(i,l);(!d||i[d]===void 0||u===!0||u===void 0&&i[d]!==!1)&&(i[d||A]=hn(s))}const a=(s,A)=>w.forEach(s,(u,l)=>o(u,l,A));return w.isPlainObject(t)||t instanceof this.constructor?a(t,n):w.isString(t)&&(t=t.trim())&&!vl(t)?a(yl(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=Yt(t),t){const r=w.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return ql(i);if(w.isFunction(n))return n.call(this,i,r);if(w.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Yt(t),t){const r=w.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||rr(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=Yt(a),a){const s=w.findKey(r,a);s&&(!n||rr(r,r[s],s,n))&&(delete r[s],i=!0)}}return w.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||rr(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return w.forEach(this,(i,o)=>{const a=w.findKey(r,o);if(a){n[a]=hn(i),delete n[o];return}const s=t?bl(o):String(o).trim();s!==o&&delete n[o],n[s]=hn(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return w.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&w.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
48
48
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Bi]=this[Bi]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=Yt(a);r[s]||(Cl(i,a),r[s]=!0)}return w.isArray(t)?t.forEach(o):o(t),this}}gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),w.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),w.freezeMethods(gn);const Be=gn;function ir(e,t){const n=this||nr,r=t||n,i=Be.from(r.headers);let o=r.data;return w.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Ui(e){return!!(e&&e.__CANCEL__)}function Nt(e,t,n){ue.call(this,e??"canceled",ue.ERR_CANCELED,t,n),this.name="CanceledError"}w.inherits(Nt,ue,{__CANCEL__:!0});function Zl(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ue("Request failed with status code "+n.status,[ue.ERR_BAD_REQUEST,ue.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const xl=Ve.isStandardBrowserEnv?function(){return{write:function(n,r,i,o,a,s){const A=[];A.push(n+"="+encodeURIComponent(r)),w.isNumber(i)&&A.push("expires="+new Date(i).toGMTString()),w.isString(o)&&A.push("path="+o),w.isString(a)&&A.push("domain="+a),s===!0&&A.push("secure"),document.cookie=A.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function wl(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Il(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Fi(e,t){return e&&!wl(t)?Il(e,t):t}const Sl=Ve.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let a=o;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{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 r=i(window.location.href),function(a){const s=w.isString(a)?i(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function Ll(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Kl(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(A){const u=Date.now(),l=r[o];a||(a=u),n[i]=A,r[i]=u;let d=o,m=0;for(;d!==i;)m+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-a<t)return;const g=l&&u-l;return g?Math.round(m*1e3/g):void 0}}function _i(e,t){let n=0;const r=Kl(50,250);return i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,s=o-n,A=r(s),u=o<=a;n=o;const l={loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:A||void 0,estimated:A&&a&&u?(a-o)/A:void 0,event:i};l[t?"download":"upload"]=!0,e(l)}}const or={http:rl,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const o=Be.from(e.headers).normalize(),a=e.responseType;let s;function A(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}let u;w.isFormData(i)&&(Ve.isStandardBrowserEnv||Ve.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.getContentType(/^\s*multipart\/form-data/)?w.isString(u=o.getContentType())&&o.setContentType(u.replace(/^\s*(multipart\/form-data);+/,"$1")):o.setContentType("multipart/form-data"));let l=new XMLHttpRequest;if(e.auth){const y=e.auth.username||"",p=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(y+":"+p))}const d=Fi(e.baseURL,e.url);l.open(e.method.toUpperCase(),Pi(d,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function m(){if(!l)return;const y=Be.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),h={data:!a||a==="text"||a==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:y,config:e,request:l};Zl(function(C){n(C),A()},function(C){r(C),A()},h),l=null}if("onloadend"in l?l.onloadend=m:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(m)},l.onabort=function(){l&&(r(new ue("Request aborted",ue.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new ue("Network Error",ue.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let p=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const h=e.transitional||Vi;e.timeoutErrorMessage&&(p=e.timeoutErrorMessage),r(new ue(p,h.clarifyTimeoutError?ue.ETIMEDOUT:ue.ECONNABORTED,e,l)),l=null},Ve.isStandardBrowserEnv){const y=Sl(d)&&e.xsrfCookieName&&xl.read(e.xsrfCookieName);y&&o.set(e.xsrfHeaderName,y)}i===void 0&&o.setContentType(null),"setRequestHeader"in l&&w.forEach(o.toJSON(),function(p,h){l.setRequestHeader(h,p)}),w.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&a!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",_i(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",_i(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=y=>{l&&(r(!y||y.type?new Nt(null,e,l):y),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const g=Ll(d);if(g&&Ve.protocols.indexOf(g)===-1){r(new ue("Unsupported protocol "+g+":",ue.ERR_BAD_REQUEST,e));return}l.send(i||null)})}};w.forEach(or,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const $i=e=>`- ${e}`,Ol=e=>w.isFunction(e)||e===null||e===!1,eo={getAdapter:e=>{e=w.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o<t;o++){n=e[o];let a;if(r=n,!Ol(n)&&(r=or[(a=String(n)).toLowerCase()],r===void 0))throw new ue(`Unknown adapter '${a}'`);if(r)break;i[a||"#"+o]=r}if(!r){const o=Object.entries(i).map(([s,A])=>`adapter ${s} `+(A===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since :
|
|
49
49
|
`+o.map($i).join(`
|
|
50
|
-
`):" "+$i(o[0]):"as no adapter specified";throw new ue("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:or};function ar(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Nt(null,e)}function to(e){return ar(e),e.headers=Be.from(e.headers),e.data=ir.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),eo.getAdapter(e.adapter||nr.adapter)(e).then(function(r){return ar(e),r.data=ir.call(e,e.transformResponse,r),r.headers=Be.from(r.headers),r},function(r){return Ui(r)||(ar(e),r&&r.response&&(r.response.data=ir.call(e,e.transformResponse,r.response),r.response.headers=Be.from(r.response.headers))),Promise.reject(r)})}const no=e=>e instanceof Be?e.toJSON():e;function yt(e,t){t=t||{};const n={};function r(u,l,d){return w.isPlainObject(u)&&w.isPlainObject(l)?w.merge.call({caseless:d},u,l):w.isPlainObject(l)?w.merge({},l):w.isArray(l)?l.slice():l}function i(u,l,d){if(w.isUndefined(l)){if(!w.isUndefined(u))return r(void 0,u,d)}else return r(u,l,d)}function o(u,l){if(!w.isUndefined(l))return r(void 0,l)}function a(u,l){if(w.isUndefined(l)){if(!w.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function s(u,l,d){if(d in t)return r(u,l);if(d in e)return r(void 0,u)}const A={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(u,l)=>i(no(u),no(l),!0)};return w.forEach(Object.keys(Object.assign({},e,t)),function(l){const d=A[l]||i,m=d(e[l],t[l],l);w.isUndefined(m)&&d!==s||(n[l]=m)}),n}const ro="1.6.0",sr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{sr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const io={};sr.transitional=function(t,n,r){function i(o,a){return"[Axios v"+ro+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new ue(i(a," has been removed"+(n?" in "+n:"")),ue.ERR_DEPRECATED);return n&&!io[a]&&(io[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}};function Ml(e,t,n){if(typeof e!="object")throw new ue("options must be an object",ue.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const s=e[o],A=s===void 0||a(s,o,e);if(A!==!0)throw new ue("option "+o+" must be "+A,ue.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ue("Unknown option "+o,ue.ERR_BAD_OPTION)}}const lr={assertOptions:Ml,validators:sr},tt=lr.validators;class yn{constructor(t){this.defaults=t,this.interceptors={request:new Xi,response:new Xi}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=yt(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&lr.assertOptions(r,{silentJSONParsing:tt.transitional(tt.boolean),forcedJSONParsing:tt.transitional(tt.boolean),clarifyTimeoutError:tt.transitional(tt.boolean)},!1),i!=null&&(w.isFunction(i)?n.paramsSerializer={serialize:i}:lr.assertOptions(i,{encode:tt.function,serialize:tt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&w.merge(o.common,o[n.method]);o&&w.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Be.concat(a,o);const s=[];let A=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(A=A&&p.synchronous,s.unshift(p.fulfilled,p.rejected))});const u=[];this.interceptors.response.forEach(function(p){u.push(p.fulfilled,p.rejected)});let l,d=0,m;if(!A){const y=[to.bind(this),void 0];for(y.unshift.apply(y,s),y.push.apply(y,u),m=y.length,l=Promise.resolve(n);d<m;)l=l.then(y[d++],y[d++]);return l}m=s.length;let g=n;for(d=0;d<m;){const y=s[d++],p=s[d++];try{g=y(g)}catch(h){p.call(this,h);break}}try{l=to.call(this,g)}catch(y){return Promise.reject(y)}for(d=0,m=u.length;d<m;)l=l.then(u[d++],u[d++]);return l}getUri(t){t=yt(this.defaults,t);const n=Fi(t.baseURL,t.url);return Pi(n,t.params,t.paramsSerializer)}}w.forEach(["delete","get","head","options"],function(t){yn.prototype[t]=function(n,r){return this.request(yt(r||{},{method:t,url:n,data:(r||{}).data}))}}),w.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(yt(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}yn.prototype[t]=n(),yn.prototype[t+"Form"]=n(!0)});const qn=yn;class Ar{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new Nt(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Ar(function(i){t=i}),cancel:t}}}const El=Ar;function kl(e){return function(n){return e.apply(null,n)}}function Wl(e){return w.isObject(e)&&e.isAxiosError===!0}const ur={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ur).forEach(([e,t])=>{ur[t]=e});const jl=ur;function oo(e){const t=new qn(e),n=Ki(qn.prototype.request,t);return w.extend(n,qn.prototype,t,{allOwnKeys:!0}),w.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return oo(yt(e,i))},n}const ve=oo(nr);ve.Axios=qn,ve.CanceledError=Nt,ve.CancelToken=El,ve.isCancel=Ui,ve.VERSION=ro,ve.toFormData=fn,ve.AxiosError=ue,ve.Cancel=ve.CanceledError,ve.all=function(t){return Promise.all(t)},ve.spread=kl,ve.isAxiosError=Wl,ve.mergeConfig=yt,ve.AxiosHeaders=Be,ve.formToJSON=e=>Qi(w.isHTMLForm(e)?new FormData(e):e),ve.getAdapter=eo.getAdapter,ve.HttpStatusCode=jl,ve.default=ve;const zl=ve;/*! typescript-cookie v1.0.6 | MIT */const ao=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),so=e=>encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent),cr=decodeURIComponent,dr=e=>(e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent));function Yl(e){return e=Object.assign({},e),typeof e.expires=="number"&&(e.expires=new Date(Date.now()+e.expires*864e5)),e.expires!=null&&(e.expires=e.expires.toUTCString()),Object.entries(e).filter(([t,n])=>n!=null&&n!==!1).map(([t,n])=>n===!0?`; ${t}`:`; ${t}=${n.split(";")[0]}`).join("")}function lo(e,t,n){const r=/(?:^|; )([^=]*)=([^;]*)/g,i={};let o;for(;(o=r.exec(document.cookie))!=null;)try{const a=n(o[1]);if(i[a]=t(o[2],a),e===a)break}catch{}return e!=null?i[e]:i}const Ao=Object.freeze({decodeName:cr,decodeValue:dr,encodeName:ao,encodeValue:so}),mr=Object.freeze({path:"/"});function uo(e,t,n=mr,{encodeValue:r=so,encodeName:i=ao}={}){return document.cookie=`${i(e)}=${r(t,e)}${Yl(n)}`}function co(e,{decodeValue:t=dr,decodeName:n=cr}={}){return lo(e,t,n)}function Nl({decodeValue:e=dr,decodeName:t=cr}={}){return lo(void 0,e,t)}function Rl(e,t=mr){uo(e,"",Object.assign({},t,{expires:-1}))}function pr(e,t){const n={set:function(i,o,a){return uo(i,o,Object.assign({},this.attributes,a),{encodeValue:this.converter.write})},get:function(i){if(arguments.length===0)return Nl(this.converter.read);if(i!=null)return co(i,this.converter.read)},remove:function(i,o){Rl(i,Object.assign({},this.attributes,o))},withAttributes:function(i){return pr(this.converter,Object.assign({},this.attributes,i))},withConverter:function(i){return pr(Object.assign({},this.converter,i),this.attributes)}},r={attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}};return Object.create(n,r)}pr({read:Ao.decodeValue,write:Ao.encodeValue},mr);let mo;typeof window<"u"&&(mo=co("token"));const ge=zl.create({headers:{Authorization:mo}});async function Jl(e,t,n){return(await ge.post(n+"/createFlexVersionLinkMulti",{_id:e,networks:t})).data}async function Dl(e,t){return e.network=="fb"&&(e.zip=1),(await ge.post(t+"/createFlexVersionLink",e||{})).data}async function Tl(e,t,n){return(await ge.post(e+"/createImportedVersionLink",{_id:t,network:n})).data}async function Gl(e,t,n,r,i){return(await ge.post(e+"/createPlayableVersionLink",{_id:t,network:n,isPfTest:r,extras:i})).data}async function Hl(e,t,n){return(await ge.post(n+"/createPlayableVersionLinkMulti",{_id:e,networks:t})).data}async function Pl(e,t,n,r,i){return(await ge.post(e+"/createReadyVersionLink",{_id:t,network:n,isPfTest:r,extras:i})).data}async function Xl(e,t,n){return(await ge.post(n+"/createReadyVersionLinkMulti",{_id:e,networks:t})).data}async function Vl(e,t,n,r,i,o,a,s){return(await ge.post(e+"/createFusionVersionLink",{_id:t,network:n,fusionData:r,isPfTest:i,extras:o,androidLink:a,iosLink:s})).data}async function Ql(e,t){return(await ge.post(t+"/updateFusionUrl",e||{})).data}async function Bl(e,t){return(await ge.post(t+"/getCdnExportName",e||{})).data}async function Ul(e,t){return(await ge.post(t+"/updateFlexUrl",e||{})).data}async function po(e,t,n){return(await ge.post(n+"/updatePlayableVersion",{...t,_id:e})).data}function qt(e){const t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select();try{return document.execCommand("copy")?(document.body.removeChild(t),!0):(document.body.removeChild(t),!1)}catch{return document.body.removeChild(t),!1}}function fo(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=fo(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function nt(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=fo(e))&&(r&&(r+=" "),r+=t);return r}const Rt=e=>typeof e=="number"&&!isNaN(e),at=e=>typeof e=="string",Se=e=>typeof e=="function",vn=e=>at(e)||Se(e)?e:null,fr=e=>x.isValidElement(e)||at(e)||Se(e)||Rt(e);function Fl(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)})})}function bn(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:o=300}=e;return function(a){let{children:s,position:A,preventExitTransition:u,done:l,nodeRef:d,isIn:m}=a;const g=r?`${t}--${A}`:t,y=r?`${n}--${A}`:n,p=x.useRef(0);return x.useLayoutEffect(()=>{const h=d.current,b=g.split(" "),C=L=>{L.target===d.current&&(h.dispatchEvent(new Event("d")),h.removeEventListener("animationend",C),h.removeEventListener("animationcancel",C),p.current===0&&L.type!=="animationcancel"&&h.classList.remove(...b))};h.classList.add(...b),h.addEventListener("animationend",C),h.addEventListener("animationcancel",C)},[]),x.useEffect(()=>{const h=d.current,b=()=>{h.removeEventListener("animationend",b),i?Fl(h,l,o):l()};m||(u?b():(p.current=1,h.className+=` ${y}`,h.addEventListener("animationend",b)))},[m]),x.createElement(x.Fragment,null,s)}}function ho(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const We={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const n=this.list.get(e).filter(r=>r!==t);return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{const n=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(n)})}},Cn=e=>{let{theme:t,type:n,...r}=e;return x.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...r})},hr={info:function(e){return x.createElement(Cn,{...e},x.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return x.createElement(Cn,{...e},x.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return x.createElement(Cn,{...e},x.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return x.createElement(Cn,{...e},x.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return x.createElement("div",{className:"Toastify__spinner"})}};function _l(e){const[,t]=x.useReducer(g=>g+1,0),[n,r]=x.useState([]),i=x.useRef(null),o=x.useRef(new Map).current,a=g=>n.indexOf(g)!==-1,s=x.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:a,getToast:g=>o.get(g)}).current;function A(g){let{containerId:y}=g;const{limit:p}=s.props;!p||y&&s.containerId!==y||(s.count-=s.queue.length,s.queue=[])}function u(g){r(y=>g==null?[]:y.filter(p=>p!==g))}function l(){const{toastContent:g,toastProps:y,staleId:p}=s.queue.shift();m(g,y,p)}function d(g,y){let{delay:p,staleId:h,...b}=y;if(!fr(g)||function(V){return!i.current||s.props.enableMultiContainer&&V.containerId!==s.props.containerId||o.has(V.toastId)&&V.updateId==null}(b))return;const{toastId:C,updateId:L,data:I}=b,{props:q}=s,N=()=>u(C),Y=L==null;Y&&s.count++;const E={...q,style:q.toastStyle,key:s.toastKey++,...Object.fromEntries(Object.entries(b).filter(V=>{let[ae,M]=V;return M!=null})),toastId:C,updateId:L,data:I,closeToast:N,isIn:!1,className:vn(b.className||q.toastClassName),bodyClassName:vn(b.bodyClassName||q.bodyClassName),progressClassName:vn(b.progressClassName||q.progressClassName),autoClose:!b.isLoading&&(X=b.autoClose,H=q.autoClose,X===!1||Rt(X)&&X>0?X:H),deleteToast(){const V=ho(o.get(C),"removed");o.delete(C),We.emit(4,V);const ae=s.queue.length;if(s.count=C==null?s.count-s.displayedToast:s.count-1,s.count<0&&(s.count=0),ae>0){const M=C==null?s.props.limit:1;if(ae===1||M===1)s.displayedToast++,l();else{const W=M>ae?ae:M;s.displayedToast=W;for(let R=0;R<W;R++)l()}}else t()}};var X,H;E.iconOut=function(V){let{theme:ae,type:M,isLoading:W,icon:R}=V,v=null;const k={theme:ae,type:M};return R===!1||(Se(R)?v=R(k):x.isValidElement(R)?v=x.cloneElement(R,k):at(R)||Rt(R)?v=R:W?v=hr.spinner():(Q=>Q in hr)(M)&&(v=hr[M](k))),v}(E),Se(b.onOpen)&&(E.onOpen=b.onOpen),Se(b.onClose)&&(E.onClose=b.onClose),E.closeButton=q.closeButton,b.closeButton===!1||fr(b.closeButton)?E.closeButton=b.closeButton:b.closeButton===!0&&(E.closeButton=!fr(q.closeButton)||q.closeButton);let ne=g;x.isValidElement(g)&&!at(g.type)?ne=x.cloneElement(g,{closeToast:N,toastProps:E,data:I}):Se(g)&&(ne=g({closeToast:N,toastProps:E,data:I})),q.limit&&q.limit>0&&s.count>q.limit&&Y?s.queue.push({toastContent:ne,toastProps:E,staleId:h}):Rt(p)?setTimeout(()=>{m(ne,E,h)},p):m(ne,E,h)}function m(g,y,p){const{toastId:h}=y;p&&o.delete(p);const b={content:g,props:y};o.set(h,b),r(C=>[...C,h].filter(L=>L!==p)),We.emit(4,ho(b,b.props.updateId==null?"added":"updated"))}return x.useEffect(()=>(s.containerId=e.containerId,We.cancelEmit(3).on(0,d).on(1,g=>i.current&&u(g)).on(5,A).emit(2,s),()=>{o.clear(),We.emit(3,s)}),[]),x.useEffect(()=>{s.props=e,s.isToastActive=a,s.displayedToast=n.length}),{getToastToRender:function(g){const y=new Map,p=Array.from(o.values());return e.newestOnTop&&p.reverse(),p.forEach(h=>{const{position:b}=h.props;y.has(b)||y.set(b,[]),y.get(b).push(h)}),Array.from(y,h=>g(h[0],h[1]))},containerRef:i,isToastActive:a}}function go(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function yo(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function $l(e){const[t,n]=x.useState(!1),[r,i]=x.useState(!1),o=x.useRef(null),a=x.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,s=x.useRef(e),{autoClose:A,pauseOnHover:u,closeToast:l,onClick:d,closeOnClick:m}=e;function g(I){if(e.draggable){I.nativeEvent.type==="touchstart"&&I.nativeEvent.preventDefault(),a.didMove=!1,document.addEventListener("mousemove",b),document.addEventListener("mouseup",C),document.addEventListener("touchmove",b),document.addEventListener("touchend",C);const q=o.current;a.canCloseOnClick=!0,a.canDrag=!0,a.boundingRect=q.getBoundingClientRect(),q.style.transition="",a.x=go(I.nativeEvent),a.y=yo(I.nativeEvent),e.draggableDirection==="x"?(a.start=a.x,a.removalDistance=q.offsetWidth*(e.draggablePercent/100)):(a.start=a.y,a.removalDistance=q.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function y(I){if(a.boundingRect){const{top:q,bottom:N,left:Y,right:E}=a.boundingRect;I.nativeEvent.type!=="touchend"&&e.pauseOnHover&&a.x>=Y&&a.x<=E&&a.y>=q&&a.y<=N?h():p()}}function p(){n(!0)}function h(){n(!1)}function b(I){const q=o.current;a.canDrag&&q&&(a.didMove=!0,t&&h(),a.x=go(I),a.y=yo(I),a.delta=e.draggableDirection==="x"?a.x-a.start:a.y-a.start,a.start!==a.x&&(a.canCloseOnClick=!1),q.style.transform=`translate${e.draggableDirection}(${a.delta}px)`,q.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function C(){document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",C),document.removeEventListener("touchmove",b),document.removeEventListener("touchend",C);const I=o.current;if(a.canDrag&&a.didMove&&I){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return i(!0),void e.closeToast();I.style.transition="transform 0.2s, opacity 0.2s",I.style.transform=`translate${e.draggableDirection}(0)`,I.style.opacity="1"}}x.useEffect(()=>{s.current=e}),x.useEffect(()=>(o.current&&o.current.addEventListener("d",p,{once:!0}),Se(e.onOpen)&&e.onOpen(x.isValidElement(e.children)&&e.children.props),()=>{const I=s.current;Se(I.onClose)&&I.onClose(x.isValidElement(I.children)&&I.children.props)}),[]),x.useEffect(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||h(),window.addEventListener("focus",p),window.addEventListener("blur",h)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",p),window.removeEventListener("blur",h))}),[e.pauseOnFocusLoss]);const L={onMouseDown:g,onTouchStart:g,onMouseUp:y,onTouchEnd:y};return A&&u&&(L.onMouseEnter=h,L.onMouseLeave=p),m&&(L.onClick=I=>{d&&d(I),a.canCloseOnClick&&l()}),{playToast:p,pauseToast:h,isRunning:t,preventExitTransition:r,toastRef:o,eventHandlers:L}}function qo(e){let{closeToast:t,theme:n,ariaLabel:r="close"}=e;return x.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:i=>{i.stopPropagation(),t(i)},"aria-label":r},x.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},x.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function eA(e){let{delay:t,isRunning:n,closeToast:r,type:i="default",hide:o,className:a,style:s,controlledProgress:A,progress:u,rtl:l,isIn:d,theme:m}=e;const g=o||A&&u===0,y={...s,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused",opacity:g?0:1};A&&(y.transform=`scaleX(${u})`);const p=nt("Toastify__progress-bar",A?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${m}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":l}),h=Se(a)?a({rtl:l,type:i,defaultClassName:p}):nt(p,a);return x.createElement("div",{role:"progressbar","aria-hidden":g?"true":"false","aria-label":"notification timer",className:h,style:y,[A&&u>=1?"onTransitionEnd":"onAnimationEnd"]:A&&u<1?null:()=>{d&&r()}})}const tA=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:i}=$l(e),{closeButton:o,children:a,autoClose:s,onClick:A,type:u,hideProgressBar:l,closeToast:d,transition:m,position:g,className:y,style:p,bodyClassName:h,bodyStyle:b,progressClassName:C,progressStyle:L,updateId:I,role:q,progress:N,rtl:Y,toastId:E,deleteToast:X,isIn:H,isLoading:ne,iconOut:V,closeOnClick:ae,theme:M}=e,W=nt("Toastify__toast",`Toastify__toast-theme--${M}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":Y},{"Toastify__toast--close-on-click":ae}),R=Se(y)?y({rtl:Y,position:g,type:u,defaultClassName:W}):nt(W,y),v=!!N||!s,k={closeToast:d,type:u,theme:M};let Q=null;return o===!1||(Q=Se(o)?o(k):x.isValidElement(o)?x.cloneElement(o,k):qo(k)),x.createElement(m,{isIn:H,done:X,position:g,preventExitTransition:n,nodeRef:r},x.createElement("div",{id:E,onClick:A,className:R,...i,style:p,ref:r},x.createElement("div",{...H&&{role:q},className:Se(h)?h({type:u}):nt("Toastify__toast-body",h),style:b},V!=null&&x.createElement("div",{className:nt("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!ne})},V),x.createElement("div",null,a)),Q,x.createElement(eA,{...I&&!v?{key:`pb-${I}`}:{},rtl:Y,theme:M,delay:s,isRunning:t,isIn:H,closeToast:d,hide:l,type:u,style:L,className:C,controlledProgress:v,progress:N||0})))},Zn=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},nA=bn(Zn("bounce",!0));bn(Zn("slide",!0)),bn(Zn("zoom")),bn(Zn("flip"));const gr=x.forwardRef((e,t)=>{const{getToastToRender:n,containerRef:r,isToastActive:i}=_l(e),{className:o,style:a,rtl:s,containerId:A}=e;function u(l){const d=nt("Toastify__toast-container",`Toastify__toast-container--${l}`,{"Toastify__toast-container--rtl":s});return Se(o)?o({position:l,rtl:s,defaultClassName:d}):nt(d,vn(o))}return x.useEffect(()=>{t&&(t.current=r.current)},[]),x.createElement("div",{ref:r,className:"Toastify",id:A},n((l,d)=>{const m=d.length?{...a}:{...a,pointerEvents:"none"};return x.createElement("div",{className:u(l),style:m,key:`container-${l}`},d.map((g,y)=>{let{content:p,props:h}=g;return x.createElement(tA,{...h,isIn:i(h.toastId),style:{...h.style,"--nth":y+1,"--len":d.length},key:`toast-${h.key}`},p)}))}))});gr.displayName="ToastContainer",gr.defaultProps={position:"top-right",transition:nA,autoClose:5e3,closeButton:qo,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let yr,st=new Map,Jt=[],rA=1;function vo(){return""+rA++}function iA(e){return e&&(at(e.toastId)||Rt(e.toastId))?e.toastId:vo()}function Dt(e,t){return st.size>0?We.emit(0,e,t):Jt.push({content:e,options:t}),t.toastId}function xn(e,t){return{...t,type:t&&t.type||e,toastId:iA(t)}}function wn(e){return(t,n)=>Dt(t,xn(e,n))}function he(e,t){return Dt(e,xn("default",t))}he.loading=(e,t)=>Dt(e,xn("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),he.promise=function(e,t,n){let r,{pending:i,error:o,success:a}=t;i&&(r=at(i)?he.loading(i,n):he.loading(i.render,{...n,...i}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},A=(l,d,m)=>{if(d==null)return void he.dismiss(r);const g={type:l,...s,...n,data:m},y=at(d)?{render:d}:d;return r?he.update(r,{...g,...y}):he(y.render,{...g,...y}),m},u=Se(e)?e():e;return u.then(l=>A("success",a,l)).catch(l=>A("error",o,l)),u},he.success=wn("success"),he.info=wn("info"),he.error=wn("error"),he.warning=wn("warning"),he.warn=he.warning,he.dark=(e,t)=>Dt(e,xn("default",{theme:"dark",...t})),he.dismiss=e=>{st.size>0?We.emit(1,e):Jt=Jt.filter(t=>e!=null&&t.options.toastId!==e)},he.clearWaitingQueue=function(e){return e===void 0&&(e={}),We.emit(5,e)},he.isActive=e=>{let t=!1;return st.forEach(n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t},he.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{const n=function(r,i){let{containerId:o}=i;const a=st.get(o||yr);return a&&a.getToast(r)}(e,t);if(n){const{props:r,content:i}=n,o={delay:100,...r,...t,toastId:t.toastId||e,updateId:vo()};o.toastId!==e&&(o.staleId=e);const a=o.render||i;delete o.render,Dt(a,o)}},0)},he.done=e=>{he.update(e,{progress:1})},he.onChange=e=>(We.on(4,e),()=>{We.off(4,e)}),he.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},he.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},We.on(2,e=>{yr=e.containerId||e,st.set(yr,e),Jt.forEach(t=>{We.emit(0,t.content,t.options)}),Jt=[]}).on(3,e=>{st.delete(e.containerId||e),st.size===0&&We.off(0).off(1).off(5)});function lt(e){he.success(e,{position:"top-center",autoClose:650,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"light"})}let qr="",je="Playable",Le=null,bo=null,Tt;const vr=async(e,t,n)=>{je==="Playable"?t&&t.iosUrl!=="Loading..."&&t.googleUrl!=="Loading..."&&await po(e,{iosLink:t==null?void 0:t.iosUrl,androidLink:t==null?void 0:t.googleUrl},Le):je==="Flex"?t&&t.iosUrl!=="Loading..."&&t.googleUrl!=="Loading..."&&await Ul({_id:e,iosLink:t==null?void 0:t.iosUrl,androidLink:t==null?void 0:t.googleUrl},Le):je==="Ready"?t&&t.iosUrl!=="Loading..."&&t.googleUrl!=="Loading..."&&((n==null?void 0:n.urlType)==="single"&&(t.googleUrl=t.iosUrl),await po(e,{iosLink:t==null?void 0:t.iosUrl,androidLink:t==null?void 0:t.googleUrl},Le)):je==="Fusion"&&t&&t.iosUrl!=="Loading..."&&t.googleUrl!=="Loading..."&&await Ql({_id:Tt==null?void 0:Tt.fusionId,iosLink:t==null?void 0:t.iosUrl,androidLink:t==null?void 0:t.googleUrl},Le)},In=async e=>{let t=qr+"/"+e,n=e;fetch(t).then(r=>r.blob()).then(r=>{const i=window.URL.createObjectURL(r),o=document.createElement("a");o.href=i,o.download=n.split("/").reduce((a,s)=>s,""),document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(i),lt("Download successfully")}).catch(r=>{console.error("File error:",r)})},oA=(e,t,n)=>{let r=qr+"/"+e;n==="adikteev"&&(r=e),qt(r)?lt(se.t("common:link_copied")):t(r)};async function Gt(e,t,n,r="download",i=!1,o=null){return new Promise(async(a,s)=>{let A=async u=>{r==="download"?await In(u):r==="copy"&&oA(u,bo,t)};try{await vr(e,n,o)}catch(u){console.log("updateUrls error",u)}je==="Playable"?Gl(Le,e,t,i,o).then(async u=>{let{url:l}=u;await A(l),a(u)}).catch(u=>{let l=u.response.data.error.msg;s({message:l})}):je==="Flex"?Dl({_id:e,network:t,extras:o},Le).then(async u=>{if(u.message){s(u);return}let{url:l}=u;await A(l),a(u)}).catch(u=>{let l=u.response.data.error.msg;s({message:l})}):je==="Import"?Tl(Le,e,t).then(async u=>{let l=u.url;await A(l),a(u)}).catch(u=>{let l=u.response.data.error.msg;s({message:l})}):je==="Ready"?Pl(Le,e,t,i,o).then(async u=>{if(u.message){s(u);return}let l=u.url;await A(l),a(u)}).catch(u=>{let l=u.response.data.error.msg;s({message:l})}):je==="Fusion"&&Vl(Le,e,t,Tt,i,o,n==null?void 0:n.googleUrl,n==null?void 0:n.iosUrl).then(async u=>{let l=u.url;await A(l),a(u)}).catch(u=>{let l=u.response.data.error.msg;s({message:l})})})}async function aA(e,t,n,r=null){return new Promise(async(i,o)=>{await vr(e,t,r),je==="Flex"?Jl(e,n,Le).then(async a=>{if(a.message){o(a);return}await In(a.url),i(a.url)}).catch(a=>{let s=a.response.data.error.msg;o({message:s})}):je==="Ready"?Xl(e,n,Le).then(async a=>{if(a.message){o(a);return}await In(a.url),i(a.url)}).catch(a=>{console.log("err",a);let s=a.response.data.error.msg;o({message:s})}):Hl(e,n,Le).then(async a=>{await In(a.url),i(a.url)}).catch(a=>{let s=a.response.data.error.msg;o({message:s})})})}function sA(e,t,n,r,i){je=e,Le=t,bo=n,qr=r,Tt=i}async function lA(e){try{return await Bl({versionId:e,checkExistance:!0},Le)}catch{return null}}async function br(e,t){return(await ge.post(t+"/findPlayable",{_id:e})).data}const AA=({versionId:e,playableId:t,typeOfProduct:n,api:r,copyLinkUrl:i,setSafariCopyLink:o,qrUrl:a,iosLink:s,androidLink:A,urlType:u})=>{const[l,d]=x.useState(!1),m=async()=>{d(!0),Gt(e,"default",{iosUrl:s,googleUrl:A},null,!1,{urlType:u}).then(async g=>{var b,C,L,I;let y="";if(t&&(n==="Playable"||n==="Ready")){const q=await br(t,r),N=(C=(b=q==null?void 0:q.data)==null?void 0:b.globalProps)==null?void 0:C.defaultLandscape,Y=(I=(L=q==null?void 0:q.data)==null?void 0:L.globalProps)==null?void 0:I.defaultPhoneIndex;N&&(y+="&landscape=true"),Y!==void 0&&(y+=`&phoneIndex=${Y}`)}br(t,r),d(!1);let p;n==="Flex"?p=`${i}/preview?versionId=${e}`:n==="Import"?p=`${i}/preview?versionId=${e}`:n==="Ready"?p=`${i}/preview?versionId=${e}&ready=true`:n==="Fusion"?p=`${i}/preview?versionId=${e}`:p=`${i}/preview?versionId=${e}`,p+=y,qt(p)?lt(se.t("common:link_copied")):o(p),d(!1)}).catch(g=>{d(!1)})};return c.jsxs("div",{style:{display:"flex",height:"125px",width:"100%",borderRadius:"10px",backgroundColor:"#000000",padding:"10px"},children:[c.jsx("div",{style:{marginRight:"0.75rem",width:"50%",display:"flex",justifyContent:"center",alignItems:"center"},children:a?c.jsx(_a,{bgColor:"#0F0F1E",fgColor:"#ffffff",style:{height:"auto",maxWidth:"100%",width:"100%"},value:a}):c.jsx("img",{style:{width:"50px",height:"50px"},src:He,alt:"pf-logo-gif"})}),c.jsxs("div",{children:[c.jsx("div",{style:{marginBottom:"0.25rem",fontSize:"0.875rem",fontWeight:"bold",color:"white"},children:se.t("common:mobile_testing")}),c.jsx("div",{style:{marginBottom:"1rem",fontSize:"0.75rem",color:"gray"},children:se.t("common:scan_qr_code_to_test_in_any_browser")}),c.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"0.375rem",backgroundColor:"#00a3ff57",color:"secondary-blue",cursor:"pointer"},onClick:()=>{l||m()},children:c.jsxs(c.Fragment,{children:[c.jsx(pi,{style:{height:"1.5rem",width:"1.5rem",stroke:"secondary-blue",color:"white"}}),c.jsx("div",{style:{height:"24px",display:"flex",alignItems:"center",justifyContent:"center",width:"80px"},children:l?c.jsx("img",{style:{height:"90%"},src:He,alt:"loading"}):c.jsx("button",{style:{fontSize:"1rem",color:"white",background:"rgba(0, 163, 255, 0)"},children:se.t("common:copy_link")})})]})})]})]})},uA=({versionName:e,versionId:t,playableId:n,typeOfProduct:r,api:i,iframeUrl:o,fetchFileUrl:a,copyLinkUrl:s,setSafariCopyLink:A,iosLink:u,androidLink:l,urlType:d})=>{const[m,g]=x.useState(window.innerWidth);console.log("iosLink",u),x.useEffect(()=>{console.log("re add event listener");function p(h){console.log(h),h.data==="cta"&&(console.log("Received 'cta' message from iframe"),u&&window.open(u,"_blank"))}return window.addEventListener("message",p,!1),()=>{window.removeEventListener("message",p)}},[u,l]),x.useEffect(()=>{const p=()=>{g(window.innerWidth)};return window.addEventListener("resize",p),()=>{window.removeEventListener("resize",p)}},[]);const y=(e==null?void 0:e.length)>25?e.slice(0,25)+"...":e;return c.jsxs("div",{style:{display:"flex",width:"300px",flexDirection:"column",justifyContent:"space-between",padding:"5px",height:m>1440?"680px":"620px",borderRadius:"0px 0px 0px 16px",marginTop:"20px"},children:[c.jsx(ha,{iframeUrl:o}),c.jsx(ga,{name:y}),c.jsx(AA,{versionId:t,playableId:n,typeOfProduct:r,api:i,copyLinkUrl:s,setSafariCopyLink:A,qrUrl:o,iosLink:u,androidLink:l,urlType:d})]})};var Ce=(e=>(e.Flex="#7101FF",e.Playable="#F9830B",e.Import="#00a3ff",e.Ready="#0060A5",e.Fusion="#171717",e))(Ce||{});const Co=({checked:e,typeOfProduct:t,id:n})=>{const[r,i]=x.useState(e);x.useEffect(()=>{i(e)},[e]);const o=()=>{i(!r)};return c.jsx("div",{style:{display:"inline-flex",alignItems:"center"},children:c.jsxs("label",{onClick:o,style:{position:"relative",display:"flex",cursor:"pointer",alignItems:"center"},htmlFor:n,children:[c.jsx("input",{type:"checkbox",style:{position:"relative",height:"20px",width:"20px",cursor:"pointer",appearance:"none",borderRadius:"0.25rem",transition:"all ease-in-out",border:"1px solid lightgray",opacity:1},id:n,checked:r,onChange:o}),c.jsxs("div",{style:{pointerEvents:"none",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:"white",opacity:r?1:0,transition:"opacity ease-in-out"},children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",style:{height:"14px",width:"14px"},viewBox:"0 0 20 20",fill:Ce[t],stroke:Ce[t],strokeWidth:"1",children:c.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})," "]})]})})},cA=({typeOfProduct:e,allNetworksSelected:t,setAllNetworksSelected:n})=>c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",marginBottom:"0.5rem"},children:[c.jsxs("div",{style:{fontSize:"2xl",fontWeight:"bold",display:"flex"},children:[c.jsx("span",{style:{color:Ce[e]},className:"mr-2",children:se.t("common:select_network")}),c.jsx("span",{style:{whiteSpace:"pre"},children:se.t("common:from_list")})]}),c.jsxs("div",{onClick:()=>{n(!t)},style:{marginLeft:"auto",marginRight:"2rem",display:"flex",height:"24px",alignItems:"center",justifyContent:"flex-end",fontSize:"0.875rem",width:110},children:[c.jsx(Co,{checked:t,typeOfProduct:e,id:"asd"}),c.jsx("span",{style:{marginLeft:"0.5rem",fontSize:"16px",fontWeight:"bold"},children:se.t("common:select_all")})]})]});async function dA(e,t){return(await ge.post(t+"/buyRequest",{requestType:e})).data}const mA=()=>c.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c.jsxs("g",{"clip-path":"url(#clip0_518_12094)",children:[c.jsx("path",{d:"M4.50977 11.99L19.4898 11.99",stroke:"#7101FF","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),c.jsx("path",{d:"M13.5068 17.977L19.4828 12L13.5068 6.02299",stroke:"#7101FF","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]}),c.jsx("defs",{children:c.jsx("clipPath",{id:"clip0_518_12094",children:c.jsx("rect",{width:"24",height:"24",fill:"white",transform:"translate(0 24) rotate(-90)"})})})]}),pA=({creditDownload:e,api:t})=>c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{marginTop:"0.5rem",paddingLeft:"1.5rem",paddingRight:"1.5rem",fontWeight:100},children:"If you continue to export, you will spend 1 credit."}),c.jsxs("div",{style:{display:"flex",alignItems:"center",width:"100%",paddingLeft:"1.5rem",paddingRight:"1.5rem",paddingTop:"0.25rem",fontSize:"12px",fontWeight:100},children:["You have"," ",c.jsx("span",{style:{paddingLeft:"0.25rem",paddingRight:"0.25rem",fontWeight:"bold",color:"#yourColorHere"},children:(e==null?void 0:e.downloadLimit)-(e==null?void 0:e.downloadLimitUsed)<0?0:(e==null?void 0:e.downloadLimit)-(e==null?void 0:e.downloadLimitUsed)})," ","credits remaining.",c.jsxs("button",{style:{marginLeft:"0.5rem",display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",textDecoration:"underline",color:"#yourColorHere"},onClick:()=>dA("Flex Credit",t).then(n=>lt("You will be contacted regarding your request.")),children:["Get more",c.jsx(mA,{})]})]})]}),Zo=({typeOfProduct:e,urls:t,handleIosChange:n,handleGoogleChange:r,disabled:i})=>{const o=s=>{n(s.target.value)},a=s=>{r(s.target.value)};return c.jsxs(c.Fragment,{children:[c.jsxs("div",{style:{display:"flex",height:"2rem",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"200"},children:[c.jsx("span",{style:{width:"5rem",fontWeight:"bold",flexShrink:0},children:se.t("common:app_store")}),c.jsx("input",{style:{marginLeft:"1.25rem",display:"flex",height:"100%",width:"100%",alignItems:"center",borderRadius:"0.375rem",border:t.iosUrl?"1px solid lightgray":"1px solid red",paddingLeft:"0.5rem",color:"#000000",borderColor:Ce[e],marginRight:"2rem"},type:"text",value:t.iosUrl,onChange:o,placeholder:"Ios Url",disabled:i})]}),c.jsxs("div",{style:{marginTop:"0.5rem",display:"flex",height:"2rem",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"100"},children:[c.jsxs("span",{style:{width:"5rem",fontWeight:"bold",flexShrink:0},children:[se.t("common:google_play"),":"]}),c.jsx("input",{style:{marginLeft:"1.25rem",display:"flex",height:"100%",width:"100%",alignItems:"center",borderRadius:"0.375rem",border:t.googleUrl?"1px solid lightgray":"1px solid red",paddingLeft:"0.5rem",color:"#000000",borderColor:Ce[e],marginRight:"2rem"},type:"text",value:t.googleUrl,onChange:a,placeholder:"Google Url",disabled:i})]})]})},fA=({typeOfProduct:e,urls:t,handleIosChange:n,handleGoogleChange:r,disabled:i})=>{const o=a=>{n(a.target.value)};return c.jsx(c.Fragment,{children:c.jsxs("div",{style:{display:"flex",height:"2rem",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"200"},children:[c.jsx("span",{style:{width:"5rem",fontWeight:"bold",flexShrink:0},children:"Redirection URL:"}),c.jsx("input",{style:{marginLeft:"1.25rem",display:"flex",height:"100%",width:"100%",alignItems:"center",borderRadius:"0.375rem",border:t.iosUrl?"1px solid lightgray":"1px solid red",paddingLeft:"0.5rem",color:"#000000",borderColor:Ce[e],marginRight:"2rem"},type:"text",value:t.iosUrl,onChange:o,placeholder:"Ios Url",disabled:i})]})})},hA=({typeOfProduct:e,fileSize:t,urls:n,handleIosChange:r,handleGoogleChange:i,disabled:o,api:a,creditDownload:s,user:A,isTest:u,setIsTest:l,urlType:d,setUrlType:m})=>{const g=()=>c.jsxs("div",{style:{display:"flex",height:"24px",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"100"},children:[c.jsxs("span",{style:{width:"5rem",fontWeight:"bold"},children:["Enable Test:"," "]}),c.jsx("input",{style:{marginLeft:"1.25rem",display:"flex",height:"100%",width:"20px",alignItems:"center",borderRadius:"0.375rem",border:n.googleUrl?"1px solid lightgray":"1px solid red",paddingLeft:"0.5rem",color:"#000000",borderColor:Ce[e]},type:"checkbox",checked:u,onChange:()=>{l(!u)},placeholder:"Google Url",disabled:o})]}),y=()=>c.jsx(c.Fragment,{children:c.jsxs("div",{style:{display:"flex",width:"400px",height:"30px",flexDirection:"row",justifyContent:"space-between",alignItems:"center",borderBottom:"1px solid #eaeaec",marginBottom:"10px",position:"relative"},className:"tab-switch",children:[c.jsx("div",{style:{position:"absolute",bottom:"-3px",left:d==="single"?"50%":"0%",width:"50%",height:"3px",borderRadius:"2px",backgroundColor:"#12a9fe",transition:"all 0.2s ease-in-out"},id:"tab-switch-background"}),c.jsx("div",{style:{width:"50%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",position:"relative"},onClick:()=>{document.getElementById("tab-switch-background").style.left="0%",document.getElementById("single-tab").style.color="#a3a3a3",document.getElementById("game-tab").style.color="#000",document.getElementById("single-tab").style.fontWeight="normal",document.getElementById("game-tab").style.fontWeight="bold",setTimeout(()=>{m("game")},200)},children:c.jsx("span",{style:{position:"relative",color:d==="game"?"#000":"#a3a3a3",fontWeight:d==="game"?"bold":"normal",transition:"all 0.2s ease-in-out"},id:"game-tab",children:"App"})},"gameTab"),c.jsx("div",{style:{width:"50%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",position:"relative"},onClick:()=>{document.getElementById("tab-switch-background").style.left="50%",document.getElementById("single-tab").style.color="#000",document.getElementById("game-tab").style.color="#a3a3a3",document.getElementById("single-tab").style.fontWeight="bold",document.getElementById("game-tab").style.fontWeight="normal",setTimeout(()=>{m("single")},200)},children:c.jsx("span",{style:{position:"relative",color:d==="single"?"#000":"#a3a3a3",fontWeight:d==="single"?"bold":"normal",transition:"all 0.2s ease-in-out"},id:"single-tab",children:"Website"})},"singleTab")]})});return c.jsx(c.Fragment,{children:e!=="Import"&&c.jsxs("div",{style:{display:"flex",width:"100%",flexDirection:"column"},children:[A.customer=="playableFactoryInternal"&&e==="Playable"&&c.jsx(g,{}),e==="Ready"?c.jsxs(c.Fragment,{children:[c.jsx(y,{}),d==="game"&&c.jsx(Zo,{typeOfProduct:e,urls:n,handleIosChange:r,handleGoogleChange:i,disabled:o}),d==="single"&&c.jsx(fA,{typeOfProduct:e,urls:n,handleIosChange:r,handleGoogleChange:i,disabled:o})]}):c.jsx(c.Fragment,{children:c.jsx(Zo,{typeOfProduct:e,urls:n,handleIosChange:r,handleGoogleChange:i,disabled:o})}),(s==null?void 0:s.willSpendCredit)&&c.jsx(pA,{creditDownload:s,api:a})]})})},gA=({typeOfProduct:e,title:t,fileSize:n})=>c.jsxs("div",{style:{fontSize:"1.5rem",fontWeight:"bold",paddingTop:"20px"},children:[c.jsx("span",{style:{color:Ce[e]},children:t}),n&&c.jsxs("span",{style:{fontSize:"14px",fontWeight:"bold",marginLeft:"30px",color:"#87878E"},children:[se.t("common:file_size")," : ",parseFloat(n).toFixed(2)," mb"]})]}),yA=({typeOfProduct:e,fileSize:t,urls:n,title:r,handleIosChange:i,handleGoogleChange:o,disabled:a,creditDownload:s,api:A,user:u,isTest:l,setIsTest:d,urlType:m,setUrlType:g,allNetworksSelected:y,setAllNetworksSelected:p})=>c.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100%",justifyContent:"space-between",alignItems:"flex-start",borderBottom:"1px solid #D1D5DB",paddingLeft:"1.25rem",paddingRight:"1.25rem",gap:"0.5rem"},children:[c.jsx(gA,{typeOfProduct:e,title:r,fileSize:t}),c.jsx(hA,{typeOfProduct:e,fileSize:t,urls:n,handleIosChange:i,handleGoogleChange:o,disabled:a,creditDownload:s,api:A,user:u,isTest:l,setIsTest:d,urlType:m,setUrlType:g}),c.jsx(cA,{typeOfProduct:e,allNetworksSelected:y,setAllNetworksSelected:p})]}),Cr=({children:e,className:t,onClickDonwload:n,downloading:r,disabled:i})=>c.jsx("button",{onClick:n,className:t,style:{display:"flex",height:"40px",alignItems:"center",justifyContent:"center",borderRadius:"0.375rem",border:"1px solid lightgray",padding:"0.25rem",fontSize:"0.875rem",width:200,backgroundColor:"#FFFFFF"},disabled:r||i,children:e}),vd="",qA=({typeOfProduct:e})=>c.jsx("div",{style:{backgroundColor:"transparent",display:"flex",alignItems:"center",flexDirection:"column"},children:c.jsxs("div",{style:{position:"relative",width:"64px",height:"16px",marginTop:"8px"},children:[c.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:Ce[e]}}),c.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:Ce[e]}}),c.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:Ce[e]}}),c.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:Ce[e]}})]})}),Ht=({isNetworksLoading:e=!1})=>c.jsx("div",{style:{display:"flex",height:"100%",width:"90px",alignItems:"center",justifyContent:"center"},children:c.jsx("img",{width:e?"100px":"25px",height:e?"100px":"25px",src:He,alt:"pf-logo-gif"})}),Zr=({title:e,titleId:t,...n})=>c.jsxs("svg",{viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em","aria-labelledby":t,...n,children:[e?c.jsx("title",{id:t,children:e}):null,c.jsx("path",{stroke:"currentColor",d:"m15.985 11.111-3.556 3.556-3.556-3.556M12.429 4v10.667M20.429 16.444A3.556 3.556 0 0 1 16.873 20H7.985a3.556 3.556 0 0 1-3.556-3.556",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})]}),vA=({onClose:e,iosLink:t,googleLink:n,buttonType:r,handleCopyLink:i,download:o,typeOfProduct:a,urlType:s})=>{let A="";return a==="Ready"&&s==="single"?A=se.t("common:redirection_url_is_empty_are_you_sure_want_to_continue"):!t&&!n?A=se.t("common:both_links_are_empty_are_you_sure_want_to_continue"):t?n||(A=se.t("common:google_link_is_empty_are_you_sure_want_to_continue")):A=se.t("common:ios_link_is_empty_are_you_sure_want_to_continue"),c.jsxs("div",{style:{position:"fixed",top:0,left:0,zIndex:50,display:"flex",height:"120%",width:"130%",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.2)"},children:[c.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),c.jsxs("div",{style:{position:"absolute",zIndex:50,display:"flex",flexDirection:"column",gap:"5px",maxWidth:"350px",borderRadius:"0.375rem",backgroundColor:"white",padding:"1rem",pointerEvents:"auto"},children:[c.jsx("h1",{style:{textAlign:"center",fontSize:"18px",lineHeight:"24px"},children:A}),c.jsxs("div",{style:{display:"flex",gap:"5px"},children:[c.jsx("button",{onClick:()=>{e(!1)},style:{flex:1,cursor:"pointer",borderRadius:"0.375rem",border:"1px solid #666666",padding:"0.5rem",fontWeight:"bold",transition:"all 0.15s ease-linear"},children:se.t("common:no")}),c.jsx("button",{onClick:async u=>{r==="download"?await o():r==="copyLink"&&await i(),e()},style:{flex:1,cursor:"pointer",borderRadius:"0.375rem",border:"1px solid red",backgroundColor:"darkorange",padding:"0.5rem",fontWeight:"bold",color:"white",transition:"all 0.15s ease-linear"},children:se.t("common:yes")})]})]})]})},xr=({onClose:e,handleCopyLink:t,download:n,creditConfirmType:r,getDownloadCount:i,width:o="130%",height:a="120%"})=>c.jsxs("div",{style:{position:"fixed",top:0,left:0,zIndex:50,display:"flex",height:a,width:o,alignItems:"center",justifyContent:"center",backgroundColor:"#00000080"},children:[c.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%"}}),c.jsxs("div",{style:{position:"absolute",zIndex:50,display:"flex",height:"max-content",width:350,flexDirection:"column",gap:"5px",borderRadius:"8px",backgroundColor:"white",padding:"20px"},children:[c.jsx("h1",{style:{textAlign:"center",fontSize:"18px",lineHeight:"24px"},children:"You are going to spend 1 credit for this download, do you want to continue?"}),c.jsxs("div",{style:{display:"flex",gap:"5px"},children:[c.jsx("button",{onClick:e,style:{flex:1,cursor:"pointer",borderRadius:"4px",borderWidth:"1px",borderColor:"dark-50",padding:"2px",fontWeight:"bold"},children:"No"}),c.jsx("button",{style:{flex:1,cursor:"pointer",borderRadius:"4px",borderWidth:"1px",borderColor:"#F9830B",backgroundColor:"#F9830B",padding:"2px",fontWeight:"bold",color:"white"},onClick:async s=>{s.preventDefault(),s.stopPropagation(),r==="download"?(await n(),await i()):r==="copy"&&(await t(),await i()),e()},children:"Yes"})]})]})]}),bA=({onClose:e,handleDownload:t,handleDownloadMolocoTest:n,downloadingMoloco:r,downloadingMolocoTest:i,downloadingMolocoHtml:o})=>c.jsxs("div",{style:{position:"fixed",top:0,left:0,zIndex:50,display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.2)"},onClick:e,children:[c.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),c.jsx("div",{style:{position:"absolute",zIndex:50,display:"flex",flexDirection:"column",gap:"5px",minWidth:"500px",borderRadius:"0.375rem",backgroundColor:"white",padding:"1rem",pointerEvents:"auto"},onClick:a=>{a.stopPropagation()},children:c.jsxs("div",{style:{display:"flex",gap:"5px",flexDirection:"column"},children:[c.jsxs("div",{style:{display:"flex",justifyContent:"center"},children:[r?c.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear",width:"200px",marginRight:"10px"},children:c.jsx("img",{width:"25px",height:"25px",src:He,alt:"pf-logo-gif"})}):c.jsx("button",{onClick:()=>{t(!1)},style:{cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear",width:"200px",marginRight:"10px"},children:"Download"}),o?c.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear",width:"200px",marginLeft:"10px"},children:c.jsx("img",{width:"25px",height:"25px",src:He,alt:"pf-logo-gif"})}):c.jsx("button",{onClick:()=>{t(!0)},style:{cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear",width:"200px",marginLeft:"10px"},children:"Download HTML"})]}),c.jsx("div",{style:{display:"flex",justifyContent:"center"},children:i?c.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear",width:"200px"},children:c.jsx("img",{width:"25px",height:"25px",src:He,alt:"pf-logo-gif"})}):c.jsx("button",{onClick:n,style:{cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear",width:"200px"},children:"Download Moloco Test"})})]})})]});async function CA(e,t,n,r){return(await ge.post(e+"/createMolocoTestPage",{_id:t,network:n,typeOfProduct:r})).data}const ZA=({id:e,imageUrl:t,handleCardClick:n,selected:r,name:i,networkVersionSize:o,fileSizeLoading:a,showCheckBox:s,typeOfProduct:A,versionId:u,api:l,handleDownloadError:d,fetchFileUrl:m,urls:g,game:y,setIsConfirmActive:p,creditDownload:h,getDownloadCount:b,disabled:C,user:L,setSafariCopyLink:I,isTest:q,urlType:N,setCdnModal:Y,generateCDN:E,cdnUrl:X})=>{const[H,ne]=x.useState(!1),[V,ae]=x.useState(""),[M,W]=x.useState(!1),[R,v]=x.useState(!1),[k,Q]=x.useState(!1),[Z,K]=x.useState("download"),[G,J]=x.useState(!1),[D,U]=x.useState(!1),[B,P]=x.useState(!1);let F={aarki:"html,copy",adcolony:"copy,html",adjoe:"copy,html",applovin:"copy,html",appreciate:"zip",chartboost:"copy,html",criteo:"zip",crossinstall:"copy,html",default:"copy",fb:"zip",fyber:"copy,html",google:"zip",google360:"zip",ironsource:"copy,html",kayzen:"apikey",kaden:"html",kidoz:"html",lifestreet:"copy,html",liftoff:"copy,zip",mobvista:"html",moloco:"html,molocotest",molocoV2:"html,molocotest",nucleo:"copy,html",oceanengine:"copy,zip",pointblank:"html",smadex:"zip",snapchat:"zip",tapjoy:"copy,html",tencent:"zip",toutiao:"copy,zip",toutiao_cn:"copy,zip",unity:"copy,html",vungle:"html",web:"copy,html",yandex:"zip",zucks:"copy,html",luna:"zip",inmobi:"copy,html,",nend:"html",adikteev:"html",jammp:"copy,html",mraid:"copy,html"};const re={cdn:"Generate Link",adikteev:"Copy CDN"},S=()=>{n(e)},le=async(T,oe)=>{const ye={molocoGenerateHtml:!1,urlType:N};if($&&(oe==="copy"?(U(!0),oe="download",ye.molocoGenerateHtml=!0):J(!0)),console.log("getVersion",T,oe,ye),T==="cdn"){Y(!0),await E(!0);return}return T==="adikteev"&&(oe="copy"),ne(!0),new Promise((wt,it)=>{Gt(u,T,g,oe,q,ye).then(Ue=>{ne(!1),wt(Ue),U(!1),J(!1)}).catch(Ue=>{ne(!1),d(Ue.message,Ue),it(Ue),U(!1),J(!1)})})},j=async(T=!1)=>{T?U(!0):J(!0);const oe={molocoGenerateHtml:!1};T&&(oe.molocoGenerateHtml=!0),Gt(u,i,g,"download",q,oe).then(ye=>{T?U(!1):J(!1),Q(!1)}).catch(ye=>{d(ye.message,ye)})},ie=async()=>{P(!0);const T=await CA(l,u,i,A);let oe=`${m}/${T==null?void 0:T.url}`;qt(oe)?(lt(se.t("common:link_copied")),P(!1)):I(oe)},$=i==="moloco"||i==="molocoV2";return c.jsxs(c.Fragment,{children:[c.jsxs("div",{style:{position:"relative",display:"flex",flexDirection:"column",gap:"20px",padding:"16px",borderColor:r?Ce[A]:"lightgray",borderWidth:"1px",borderStyle:"solid",backgroundColor:"white",width:"100%",height:"175px",borderRadius:"8px",cursor:"pointer"},className:"border-hover-"+A,onClick:S,children:[c.jsxs("div",{style:{marginTop:i=="web"?"10px":"40px",display:"flex",justifyContent:"center"},children:[c.jsx("div",{style:{position:"absolute",right:"0",top:"0",padding:"8px"},children:c.jsx("div",{children:o&&o.map(T=>T.network).includes(i)?a?c.jsx("div",{style:{position:"absolute",right:"0",top:"0.5rem",padding:"0.5rem",height:"1.5rem",display:"flex",justifyContent:"center",alignItems:"center",marginRight:"2rem"},children:c.jsx(qA,{typeOfProduct:A})}):o.map(T=>c.jsx("div",{style:{position:"absolute",right:"0",top:"0.5rem",padding:"0.5rem",marginRight:"2rem",fontSize:"1rem",height:"1.5rem",display:"flex",justifyContent:"center",alignItems:"center"},children:T.network===i?T.size.toString().slice(0,5)+"Mb":""},T.network)):null})}),c.jsx("div",{style:{position:"absolute",top:"0",left:"0",padding:"0.5rem"},children:(A==="Playable"||A==="Ready"||A==="Flex")&&s&&c.jsx(Co,{checked:r,typeOfProduct:A,id:e})}),c.jsx("img",{onClick:S,style:{width:"30rem",height:i=="web"?"80px":"50px",objectFit:"contain"},src:t})]}),c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"0.25rem"},children:[c.jsx(Cr,{className:`${$?"w-1/2":"w-2/3"} border-hover-`+A,downloading:H,onClickDonwload:async T=>{if(T.stopPropagation(),$&&L.customer==="playableFactoryInternal"){Q(!0);return}else{ae("download");const oe=g.iosUrl,ye=g.googleUrl;i==="cdn"&&h&&h.willSpendCredit&&!X||i!=="cdn"&&h&&h.willSpendCredit?(p(!0),K("download"),W(!0)):["Playable","Flex"].includes(A)&&(!oe||!ye)||A==="Ready"&&N==="single"&&!oe||A==="Ready"&&N==="multi"&&(!oe||!ye)?(p(!0),v(!0)):(v(!1),W(!1),await le(i,"download"))}},children:$?c.jsxs(c.Fragment,{children:[!G&&c.jsxs(c.Fragment,{children:[c.jsx(Zr,{style:{marginRight:"0.5rem",height:"1.5rem",width:"1rem",stroke:"dark-full"}}),L.customer!=="playableFactoryInternal"?se.t("common:txt"):se.t("common:download")]}),G&&c.jsx(Ht,{})]}):c.jsxs(c.Fragment,{children:[!H&&c.jsxs(c.Fragment,{children:[c.jsx(Zr,{style:{marginRight:"0.5rem",height:"1.5rem",width:"1rem",stroke:"dark-full"}}),re[i]||se.t("common:download")]}),H&&c.jsx(Ht,{})]})}),F[i]&&F[i].includes("copy")&&c.jsx(Cr,{className:"w-1/3 border-hover-"+A,onClickDonwload:async T=>{T.stopPropagation(),ae("copyLink");const oe=g.iosUrl,ye=g.googleUrl;h&&(h!=null&&h.willSpendCredit)?(K("copy"),p(!0),W(!0)):A!=="Import"&&(!oe||!ye)?(p(!0),v(!0)):(W(!1),v(!1),await le(i,"copy"))},disabled:C,children:c.jsx(pi,{className:"h-6 w-6 stroke-dark-full"})}),$&&L.customer!=="playableFactoryInternal"&&c.jsxs(Cr,{className:"w-1/2 border-hover-"+A,onClickDonwload:async T=>{T.stopPropagation(),ae("copyLink");const oe=g.iosUrl,ye=g.googleUrl;h&&(h!=null&&h.willSpendCredit)?(K("download"),p(!0),W(!0)):A!=="Import"&&(!oe||!ye)?(p(!0),v(!0)):(W(!1),v(!1),await j(!0))},disabled:C,children:[!D&&c.jsxs(c.Fragment,{children:[c.jsx(Zr,{style:{marginRight:"0.5rem",height:"1.5rem",width:"1rem",stroke:"dark-full"}}),se.t("common:html")]}),D&&c.jsx(Ht,{})]})]}),$&&c.jsx("img",{style:{position:"absolute",width:"135px",right:"0",top:"18px"},src:"https://home.playablefactory.app/recommended_badge.png"})]}),M&&c.jsx(xr,{creditConfirmType:Z,handleCopyLink:async()=>{v(!1),p(!1),await le(i,"copy")},download:async()=>{v(!1),p(!1),await le(i,"download")},onClose:()=>{W(!1),p(!1)},getDownloadCount:b}),R&&c.jsx(vA,{onClose:()=>{v(!1),p(!1)},iosLink:g.iosUrl,googleLink:g.googleUrl,buttonType:V,handleCopyLink:async()=>{v(!1),p(!1),await le(i,"copy")},download:async()=>{v(!1),p(!1),await le(i,"download")},typeOfProduct:A,urlType:N}),k&&L.customer==="playableFactoryInternal"&&c.jsx(bA,{onClose:()=>{Q(!1)},handleDownload:j,handleDownloadMolocoTest:ie,downloadingMoloco:G,donwloadintMolocoTest:B,downloadingMolocoHtml:D})]})},Sn=[{id:"22",name:"moloco",imageSrc:"https://home.playablefactory.com/moloco.png"},{id:"44",name:"molocoV2",imageSrc:"https://home.playablefactory.com/molocoV2.png"},{id:"33",name:"web",imageSrc:"https://home.playablefactory.com/files/network_icons/web.png"},{id:"1",name:"unity",imageSrc:"https://home.playablefactory.com/unity.png"},{id:"2",name:"applovin",imageSrc:"https://home.playablefactory.com/applovin.png"},{id:"3",name:"ironsource",imageSrc:"https://home.playablefactory.com/ironsource.png"},{id:"4",name:"vungle",imageSrc:"https://home.playablefactory.com/vungle.png"},{id:"5",name:"mobvista",imageSrc:"https://home.playablefactory.com/mobvista.png"},{id:"6",name:"fb",imageSrc:"https://home.playablefactory.com/fb.png"},{id:"7",name:"toutiao",imageSrc:"https://home.playablefactory.com/toutiao.png"},{id:"8",name:"toutiao_cn",imageSrc:"https://home.playablefactory.com/toutiao_cn.png"},{id:"9",name:"adcolony",imageSrc:"https://home.playablefactory.com/adcolony.png"},{id:"10",name:"criteo",imageSrc:"https://home.playablefactory.com/criteo.png"},{id:"11",name:"chartboost",imageSrc:"https://home.playablefactory.com/chartboost.png"},{id:"12",name:"kayzen",imageSrc:"https://home.playablefactory.com/kayzen.png"},{id:"13",name:"crossinstall",imageSrc:"https://home.playablefactory.com/crossinstall.png"},{id:"14",name:"default",imageSrc:"https://home.playablefactory.com/default.png"},{id:"15",name:"fyber",imageSrc:"https://home.playablefactory.com/fyber.png"},{id:"16",name:"appreciate",imageSrc:"https://home.playablefactory.com/appreciate.png"},{id:"17",name:"google360",imageSrc:"https://home.playablefactory.com/google360.png"},{id:"18",name:"kaden",imageSrc:"https://home.playablefactory.com/kaden.png"},{id:"19",name:"kidoz",imageSrc:"https://home.playablefactory.com/kidoz.png"},{id:"20",name:"lifestreet",imageSrc:"https://home.playablefactory.com/lifestreet.png"},{id:"21",name:"liftoff",imageSrc:"https://home.playablefactory.com/liftoff.png"},{id:"23",name:"nucleo",imageSrc:"https://home.playablefactory.com/nucleo.png"},{id:"24",name:"oceanengine",imageSrc:"https://home.playablefactory.com/oceanengine.png"},{id:"25",name:"pointblank",imageSrc:"https://home.playablefactory.com/pointblank.png"},{id:"26",name:"snapchat",imageSrc:"https://home.playablefactory.com/snapchat.png"},{id:"27",name:"tapjoy",imageSrc:"https://home.playablefactory.com/tapjoy.png"},{id:"28",name:"tencent",imageSrc:"https://home.playablefactory.com/tencent.png"},{id:"31",name:"aarki",imageSrc:"https://home.playablefactory.com/aarki.png"},{id:"32",name:"yandex",imageSrc:"https://home.playablefactory.com/yandex.png"},{id:"34",name:"zucks",imageSrc:"https://home.playablefactory.com/zucks.png"},{id:"35",name:"google",imageSrc:"https://home.playablefactory.com/google.png"},{id:"36",name:"inmobi",imageSrc:"https://home.playablefactory.com/inmobi.png"},{id:"38",name:"smadex",imageSrc:"https://home.playablefactory.com/smadex.png"},{id:"39",name:"instantGame",imageSrc:"https://home.playablefactory.com/instantGame.png"},{id:"40",name:"luna",imageSrc:"https://home.playablefactory.com/luna.png"},{id:"41",name:"nend",imageSrc:"https://home.playablefactory.com/nend.png"},{id:"42",name:"jammp",imageSrc:"https://home.playablefactory.com/nend.png"},{id:"43",name:"adjoe",imageSrc:"https://home.playablefactory.com/adjoe.png"},{id:"45",name:"adikteev",imageSrc:"https://home.playablefactory.com/adikteev.png"},{id:"46",name:"appier",imageSrc:"https://home.playablefactory.com/appier.png"},{id:"47",name:"remerge",imageSrc:"https://home.playablefactory.com/remerge.png"},{id:"48",name:"persona",imageSrc:"https://home.playablefactory.com/persona.png"},{id:"49",name:"bidease",imageSrc:"https://home.playablefactory.com/bidease.png"},{id:"50",name:"mraid",imageSrc:"https://home.playablefactory.com/mraid.png"},{id:"51",name:"zynga",imageSrc:"https://home.playablefactory.com/zynga.png"},{id:"52",name:"youappi",imageSrc:"https://home.playablefactory.com/youappi.png"},{id:"53",name:"cdn",imageSrc:"https://home.playablefactory.com/cdn.png"}],xA=({children:e,typeOfProduct:t,className:n,onClick:r})=>{const i={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"0.5rem",width:"12rem",height:"2.5rem",backgroundColor:Ce[t],color:"white",fontSize:"0.875rem",borderRadius:"0.875rem"};return c.jsx("button",{onClick:r,className:n,style:i,children:e})},wA=({networksVersionTotalSize:e,typeOfProduct:t,onClickMultiDownload:n,multiDownloading:r})=>c.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"8px"},children:r?c.jsx("div",{style:{display:"flex",width:"12rem",height:"2.5rem",borderRadius:"0.875rem",alignItems:"center",justifyContent:"center",backgroundColor:Ce[t]},children:c.jsx(Ht,{})}):c.jsx(xA,{typeOfProduct:t,onClick:n,children:c.jsx("span",{style:{fontSize:"1.25rem",padding:"0.5rem",color:"#fff"},children:"Download All"})})}),xo=({title:e,titleId:t})=>c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),c.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]}),IA=({onClose:e,cdnUrl:t,generateCDN:n,cdnUploading:r})=>c.jsxs("div",{style:{position:"fixed",top:0,left:0,zIndex:50,display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.2)"},onClick:e,children:[c.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),c.jsx("div",{style:{position:"absolute",zIndex:50,display:"flex",flexDirection:"column",gap:"5px",minWidth:"500px",maxWidth:"728px",width:"90%",minHeight:"150px",borderRadius:"10px",backgroundColor:"white",padding:"40px 30px 50px",pointerEvents:"auto"},onClick:i=>{i.stopPropagation()},children:c.jsxs("div",{style:{display:"flex",gap:"5px",flexDirection:"column"},children:[c.jsxs("p",{style:{fontSize:"1.1rem",fontWeight:500,textAlign:"left",marginBottom:"10px",color:"#00a3ff",textDecoration:"underline",cursor:"pointer",width:"150px",display:"flex",gap:"10px",alignItems:"center",height:"28px"},onClick:()=>{r||n()},children:["Update Link",r&&c.jsx("img",{width:"30px",src:He,alt:"pf-logo-gif"})]}),c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f6f6f6",height:"60px",color:"#737373"},children:[c.jsx("div",{style:{width:"66px",height:"100%",borderRight:"1px solid #e1e1e1",display:"flex",justifyContent:"center",alignItems:"center",flexShrink:0},children:c.jsx(xo,{})}),c.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",position:"relative",maxWidth:"68%"},children:c.jsx("a",{style:{textAlign:"center",overflow:"hidden",textOverflow:"ellipsis"},href:t,target:"_blank",children:t||"No CDN link generated"})}),c.jsx("button",{onClick:()=>{if(!t)return;qt(t)&<(se.t("common:link_copied"))},style:{cursor:"pointer",borderRadius:"0.375rem",backgroundColor:t?"darkorange":"lightgray",color:"white",transition:"all 0.15s ease-linear",width:"100px",height:"46px",marginRight:"10px",flexShrink:0},children:"Copy"})]})]})})]});let SA=0;function wo(e,t){const n=`atom${++SA}`,r={toString(){return n}};return typeof e=="function"?r.read=e:(r.init=e,r.read=LA,r.write=KA),t&&(r.write=t),r}function LA(e){return e(this)}function KA(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}const Io=(e,t)=>e.unstable_is?e.unstable_is(t):t===e,So=e=>"init"in e,Lo=e=>!!e.write,Pt=Symbol(""),wr="pending",OA="fulfilled",MA="rejected",EA=e=>typeof e=="object"&&e!==null&&Pt in e,Ln=new WeakMap,kA=(e,t,n)=>{if(!Ln.has(e)){let r;const i=new Promise((o,a)=>{let s=e;const A=l=>d=>{s===l&&(i.status=OA,i.value=d,o(d),n())},u=l=>d=>{s===l&&(i.status=MA,i.reason=d,a(d),n())};e.then(A(e),u(e)),r=(l,d)=>{l&&(Ln.set(l,i),s=l,l.then(A(l),u(l)),t(),t=d)}});i.status=wr,i[Pt]=r,Ln.set(e,i)}return Ln.get(e)},WA=e=>typeof(e==null?void 0:e.then)=="function",Ko=e=>"v"in e||"e"in e,Kn=e=>{if("e"in e)throw e.e;return e.v},On=e=>{const t=e.v;return EA(t)&&t.status===wr?t:null},Oo=(e,t,n)=>{n.p.has(e)||(n.p.add(e),t.then(()=>{n.p.delete(e)},()=>{n.p.delete(e)}))},Xt=()=>[new Map,new Map,new Set],Mo=(e,t,n)=>{e[0].has(t)||e[0].set(t,new Set),e[1].set(t,n)},jA=(e,t,n)=>{const r=e[0].get(t);r&&r.add(n)},zA=(e,t)=>e[0].get(t),Eo=(e,t)=>{e[2].add(t)},vt=e=>{for(;e[1].size||e[2].size;){e[0].clear();const t=new Set(e[1].values());e[1].clear();const n=new Set(e[2]);e[2].clear(),t.forEach(r=>{var i;return(i=r.m)==null?void 0:i.l.forEach(o=>o())}),n.forEach(r=>r())}},YA=()=>{const e=new WeakMap;let t;const n=p=>{let h=e.get(p);return h||(h={d:new Map,p:new Set,n:0},e.set(p,h)),h},r=(p,h,b,C=()=>{},L=()=>{})=>{const I="v"in h,q=h.v,N=On(h);if(WA(b))if(N)N!==b&&(N[Pt](b,C),++h.n);else{const Y=kA(b,C,L);if(Y.status===wr)for(const E of h.d.keys()){const X=n(E);Oo(p,Y,X)}h.v=Y,delete h.e}else N&&N[Pt](Promise.resolve(b),C),h.v=b,delete h.e;(!I||!Object.is(q,h.v))&&++h.n},i=(p,h,b,C)=>{var L;const I=n(h);I.d.set(b,C.n);const q=On(I);q&&Oo(h,q,C),(L=C.m)==null||L.t.add(h),p&&jA(p,b,h)},o=(p,h,b)=>{const C=n(h);if(!(b!=null&&b(h))&&Ko(C)&&(C.m||Array.from(C.d).every(([E,X])=>o(p,E,b).n===X)))return C;C.d.clear();let L=!0;const I=E=>{if(Io(h,E)){const H=n(E);if(!Ko(H))if(So(E))r(E,H,E.init);else throw new Error("no atom init");return Kn(H)}const X=o(p,E,b);if(L)i(p,h,E,X);else{const H=Xt();i(H,h,E,X),l(H,h,C),vt(H)}return Kn(X)};let q,N;const Y={get signal(){return q||(q=new AbortController),q.signal},get setSelf(){return!N&&Lo(h)&&(N=(...E)=>{if(!L)return u(h,...E)}),N}};try{const E=h.read(I,Y);return r(h,C,E,()=>q==null?void 0:q.abort(),()=>{if(C.m){const X=Xt();l(X,h,C),vt(X)}}),C}catch(E){return delete C.v,C.e=E,++C.n,C}finally{L=!1}},a=p=>Kn(o(void 0,p)),s=(p,h)=>{const b=Y=>{var E,X;const H=n(Y),ne=new Set((E=H.m)==null?void 0:E.t);for(const V of H.p)ne.add(V);return(X=zA(p,Y))==null||X.forEach(V=>{ne.add(V)}),ne},C=[],L=new Set,I=Y=>{if(!L.has(Y)){L.add(Y);for(const E of b(Y))Y!==E&&I(E);C.push(Y)}};I(h);const q=new Set([h]),N=Y=>L.has(Y);for(let Y=C.length-1;Y>=0;--Y){const E=C[Y],X=n(E),H=X.n;let ne=!1;for(const V of X.d.keys())if(V!==E&&q.has(V)){ne=!0;break}ne&&(o(p,E,N),l(p,E,X),H!==X.n&&(Mo(p,E,X),q.add(E))),L.delete(E)}},A=(p,h,...b)=>{const C=q=>Kn(o(p,q)),L=(q,...N)=>{let Y;if(Io(h,q)){if(!So(q))throw new Error("atom not writable");const E=n(q),X="v"in E,H=E.v,ne=N[0];r(q,E,ne),l(p,q,E),(!X||!Object.is(H,E.v))&&(Mo(p,q,E),s(p,q))}else Y=A(p,q,...N);return vt(p),Y};return h.write(C,L,...b)},u=(p,...h)=>{const b=Xt(),C=A(b,p,...h);return vt(b),C},l=(p,h,b)=>{if(b.m&&!On(b)){for(const C of b.d.keys())b.m.d.has(C)||(d(p,C).t.add(h),b.m.d.add(C));for(const C of b.m.d||[])if(!b.d.has(C)){b.m.d.delete(C);const L=m(p,C);L==null||L.t.delete(h)}}},d=(p,h)=>{const b=n(h);if(!b.m){o(p,h);for(const C of b.d.keys())d(p,C).t.add(h);if(b.m={l:new Set,d:new Set(b.d.keys()),t:new Set},Lo(h)&&h.onMount){const C=b.m,{onMount:L}=h;Eo(p,()=>{const I=L((...q)=>A(p,h,...q));I&&(C.u=I)})}}return b.m},m=(p,h)=>{const b=n(h);if(b.m&&!b.m.l.size&&!Array.from(b.m.t).some(C=>{var L;return(L=n(C).m)==null?void 0:L.d.has(h)})){const C=b.m.u;C&&Eo(p,C),delete b.m;for(const I of b.d.keys()){const q=m(p,I);q==null||q.t.delete(h)}const L=On(b);L&&L[Pt](void 0,()=>{});return}return b.m};return{get:a,set:u,sub:(p,h)=>{const b=Xt(),C=d(b,p);vt(b);const L=C.l;return L.add(h),()=>{L.delete(h);const I=Xt();m(I,p),vt(I)}}}};let Ir;const NA=()=>(Ir||(Ir=YA()),Ir),RA=x.createContext(void 0),ko=e=>{const t=x.useContext(RA);return(e==null?void 0:e.store)||t||NA()},JA=e=>typeof(e==null?void 0:e.then)=="function",DA=x.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)});function TA(e,t){const n=ko(t),[[r,i,o],a]=x.useReducer(u=>{const l=n.get(e);return Object.is(u[0],l)&&u[1]===n&&u[2]===e?u:[l,n,e]},void 0,()=>[n.get(e),n,e]);let s=r;(i!==n||o!==e)&&(a(),s=n.get(e));const A=t==null?void 0:t.delay;return x.useEffect(()=>{const u=n.sub(e,()=>{if(typeof A=="number"){setTimeout(a,A);return}a()});return a(),u},[n,e,A]),x.useDebugValue(s),JA(s)?DA(s):s}function GA(e,t){const n=ko(t);return x.useCallback((...i)=>n.set(e,...i),[n,e])}function Mn(e,t){return[TA(e,t),GA(e,t)]}const Wo=wo(""),jo=wo(!1),HA=({onClose:e,url:t})=>c.jsxs("div",{style:{position:"fixed",top:0,left:0,zIndex:50,display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.2)"},onClick:e,children:[c.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),c.jsx("div",{style:{position:"absolute",zIndex:50,display:"flex",flexDirection:"column",gap:"5px",minWidth:"500px",maxWidth:"728px",width:"90%",minHeight:"150px",borderRadius:"10px",backgroundColor:"white",padding:"40px 30px 50px",pointerEvents:"auto"},onClick:n=>{n.stopPropagation()},children:c.jsx("div",{style:{display:"flex",gap:"5px",flexDirection:"column"},children:c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f6f6f6",height:"60px",color:"#737373"},children:[c.jsx("div",{style:{width:"66px",height:"100%",borderRight:"1px solid #e1e1e1",display:"flex",justifyContent:"center",alignItems:"center",flexShrink:0},children:c.jsx(xo,{})}),c.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",position:"relative",maxWidth:"68%"},children:c.jsx("a",{style:{textAlign:"center",overflow:"hidden",textOverflow:"ellipsis"},href:t,target:"_blank",children:t||c.jsx("img",{width:"30px",src:He,alt:"pf-logo-gif"})})}),c.jsx("button",{onClick:()=>{if(!t)return;qt(t)&<(se.t("common:link_copied"))},style:{cursor:"pointer",borderRadius:"0.375rem",backgroundColor:t?"darkorange":"lightgray",color:"white",transition:"all 0.15s ease-linear",width:"100px",height:"46px",marginRight:"10px",flexShrink:0},children:"Copy"})]})})})]}),PA=({playable:e,creditDownload:t,visible:n,versionId:r,typeOfProduct:i,api:o,user:a,handleDownloadError:s,fetchFileUrl:A,urls:u,game:l,getDownloadCount:d,disabled:m,setSafariCopyLink:g,isTest:y,urlType:p,allNetworksSelected:h,cdnModal:b,setCdnModal:C,cdnUrl:L,setCdnUrl:I})=>{const[q,N]=x.useState([]),[Y,E]=x.useState([]),[X,H]=x.useState(!1),[ne,V]=x.useState(""),[ae,M]=x.useState(!1),[W,R]=x.useState(!1),[v,k]=x.useState("download"),[Q,Z]=x.useState(!1),[K,G]=x.useState(!1),[J,D]=x.useState(!1),[U,B]=Mn(Wo),[P,F]=Mn(jo),re=async(ie=!1)=>{ie&&L||J||(D(!0),Gt(r,"cdn",u,null,!1,{}).then($=>{I($.url),D(!1)}).catch($=>{s($.message,$),D(!1)}))},S=async ie=>{const $=[...q];if(q.includes(ie)){const T=$.findIndex(oe=>oe===ie);$.splice(T,1),N($)}else $.push(ie),N([...q,ie]);Sn.filter(T=>[...$].includes(T.id)).map(T=>T.name)},le=async()=>new Promise(async(ie,$)=>{const T=Sn.filter(oe=>[...q].includes(oe.id)).map(oe=>oe.name);M(!0),aA(r,u,T,{urlType:p}).then(oe=>{M(!1),ie(oe)}).catch(oe=>{console.log("get multi download err"),M(!1),s(oe.message,oe),$(oe)})}),j=async()=>{u.iosUrl,u.googleUrl,t&&t.willSpendCredit?(R(!0),k("download"),Z(!0)):(Z(!1),await le())};return x.useEffect(()=>{const ie=Sn.filter($=>{var T;return t&&((T=t==null?void 0:t.networks)==null?void 0:T.length)>0?t==null?void 0:t.networks.includes($.name):i==="Import"?e==null?void 0:e.networks.filter(oe=>oe.status==="paid").some(oe=>oe.name===$.name):(e==null?void 0:e.networks.includes($.name))||(l==null?void 0:l.networks.includes($.name))}).filter($=>$.name==="voodoo"?a.customer==="customer:20":!0).map($=>$.id);N(h?ie:[])},[h]),c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{position:"relative",flex:1,overflowY:W?"hidden":"auto",padding:"1.5rem",paddingTop:"0"},children:c.jsx("div",{style:{display:"grid",gridTemplateColumns:"180px 180px 180px",gap:"1rem",overflowY:"auto",padding:"0.75rem"},children:n&&Sn.filter(ie=>{var $;return t&&(($=t==null?void 0:t.networks)==null?void 0:$.length)>0?t==null?void 0:t.networks.includes(ie.name):i==="Import"?e==null?void 0:e.networks.filter(T=>T.status==="paid").some(T=>T.name===ie.name):(e==null?void 0:e.networks.includes(ie.name))||(l==null?void 0:l.networks.includes(ie.name))}).filter(ie=>ie.name==="voodoo"?a.customer==="customer:20":!0).map(ie=>{let $=ie.imageSrc;if(ie.name==="web"){let T="web_"+i.toLowerCase()+".png";$=$.replace("web.png",T)}return c.jsx(ZA,{id:ie.id,name:ie.name,imageUrl:$,selected:q.includes(ie.id),handleCardClick:S,networkVersionSize:Y,fileSizeLoading:X,showCheckBox:!0,typeOfProduct:i,versionId:r,api:o,handleDownloadError:s,fetchFileUrl:A,urls:u,game:l,creditDownload:t,setIsConfirmActive:R,getDownloadCount:d,disabled:m,user:a,setSafariCopyLink:g,isTest:y,urlType:p,setCdnModal:C,generateCDN:re,cdnUrl:L},ie.id)})})}),q.length>1&&(i==="Playable"||i==="Ready"||i==="Flex")&&c.jsx("div",{style:{position:"fixed",bottom:"0",left:"65%",zIndex:20,transform:"translateX(-50%)",display:"flex",flexDirection:"column",paddingTop:"5px"},children:c.jsx(wA,{onClickMultiDownload:j,networksVersionTotalSize:ne,typeOfProduct:i,multiDownloading:ae})}),b&&c.jsx(IA,{onClose:()=>{C(!1),d()},versionId:r,urls:u,handleDownloadError:s,cdnUrl:L,setCdnUrl:I,generateCDN:async()=>{if(!J){if(a.customer==="playableFactoryInternal"){re();return}G(!0)}},cdnUploading:J}),P&&c.jsx(HA,{onClose:()=>{F(!1)},url:U}),K&&c.jsx(xr,{width:"100%",height:"100%",creditConfirmType:v,handleCopyLink:async()=>{},download:async()=>{Z(!1),G(!1),re()},onClose:()=>{Z(!1),G(!1),D(!1)},getDownloadCount:d}),Q&&c.jsx(xr,{creditConfirmType:v,handleCopyLink:async()=>{},download:async()=>{Z(!1),R(!1),await le()},onClose:()=>{Z(!1),R(!1)},getDownloadCount:d})]})};async function XA(e,t){return(await ge.post(t+"/getFlexDownloadCount",e)).data}async function VA(e,t){try{return(await ge.post(t+"/findGame",{_id:e})).data}catch{}}async function QA(e,t){return(await ge.post(t+"/getPlayableVersionMarketLink",{_id:e})).data}async function BA(e,t){return(await ge.post(t+"/getFlexData",{_id:e})).data}async function UA(e,t){return(await ge.post(t+"/getImportedPlayable",{id:e})).data}async function FA(e,t){return(await ge.post(t+"/getReadyDownloadCount",e)).data}const _A=["adcolony","ironsource","applovin","unity","mobvista","criteo","kayzen","vungle","moloco","inmobi"],Sr=["web","adcolony","applovin","chartboost","crossinstall","fb","google","google360","ironsource","lifestreet","liftoff","mobvista","nucleo","tapjoy","toutiao","unity","vungle","moloco","cdn"];let zo=null;const $A=({playableId:e,versionId:t,gameId:n,typeOfProduct:r,visible:i,api:o,user:a,title:s,handleDownloadError:A,fetchFileUrl:u,fileSize:l,setFileSize:d,setSafariCopyLink:m,iosLink:g,androidLink:y,setIosLink:p,setAndroidLink:h,urlType:b,setUrlType:C})=>{const[L,I]=x.useState(null),[q,N]=x.useState(null),[Y,E]=x.useState(null),[X,H]=x.useState(!1),[ne,V]=x.useState(!0),[ae,M]=x.useState(window.innerWidth),[W,R]=x.useState(!1),[v,k]=x.useState(!1),[Q,Z]=x.useState("");Mn(Wo),Mn(jo),x.useEffect(()=>{!Q&&r!=="Fusion"&&lA(t).then(S=>{S!=null&&S.exist&&Z(S.uploadPath)})},[Q]),console.log("download modal version: 6.0.45");const[K,G]=x.useState(!1);x.useEffect(()=>{},[K]),x.useEffect(()=>{const S=()=>{M(window.innerWidth)};return window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S)}},[]);const J=async()=>{H(!0);const S=await br(e,o);return S!=null&&S.networks||(S.networks=_A),I(S),S},D=(S,le)=>{clearTimeout(zo),zo=setTimeout(()=>{vr(t,{iosUrl:S,googleUrl:le},{urlType:b})},1e3)},U=S=>{p(S),D(S,y)},B=S=>{h(S),D(g,S)},P=async(S,le)=>{var j,ie;try{let $;if(r==="Playable"||r==="Ready"){const T=await QA(t,o);if(T){p(T.iosLink),h(T.androidLink),H(!1);return}if(S&&(S.iosUrl||S.googleUrl)){p(S.iosUrl),h(S.googleUrl),H(!1);return}if(le&&le.html){const oe=`${u}/${le.html}?t=${Date.now()}`;let ye=await fetch(oe).then(Ue=>Ue.text());const wt=((j=ye.match(/var\s+iosLink\s*=\s*['|"](https?[\w\d;,/?:@&=+$\-_.!~*'()#]+)['|"]/))==null?void 0:j.at(1))||"";p(wt);const it=((ie=ye.match(/var\s+androidLink\s*=\s*['|"](https?[\w\d;,/?:@&=+$\-_.!~*'()#]+)['|"]/))==null?void 0:ie.at(1))||"";h(it),H(!1)}else h(""),p(""),H(!1)}else if(r==="Flex"){const T=await BA(t,o);if(T.googleUrl||T.iosUrl){h(T.googleUrl),p(T.iosUrl),H(!1);return}S&&(S.iosUrl||S.googleUrl)?(p(S.iosUrl),h(S.googleUrl),H(!1)):(h(""),p(""),H(!1))}else r==="Fusion"&&(S&&(S.iosUrl||S.googleUrl)?(p(S.iosUrl),h(S.googleUrl),H(!1)):(h(""),p(""),H(!1)))}catch($){A($.response.data.error.msg)}},F=async()=>{H(!0);let S;r==="Flex"?S=await XA({_id:t},o):r==="Ready"&&(S=await FA({_id:t},o)),S&&(["admin","pm","tester","sales"].includes(a.role)?E({...S,networks:Sr}):r==="Ready"&&!S.canDownload?E({...S,networks:Sr}):E(S)),H(!1)},re=async()=>await VA(n,o);return x.useEffect(()=>{i||(I(null),N(null),E(null),d(null)),i&&(r==="Playable"?(J().then(S=>{P(null,S)}),V(!1)):r==="Ready"?F().then(S=>{J().then(le=>{P(null,le),V(!1)})}):r==="Flex"?F().then(S=>{V(!1),re().then(le=>{i&&(P(le,null),V(!1),N(le))})}):r==="Import"?UA(t,o).then(S=>{I(S),p(S.iosUrl||""),h(S.googleUrl||""),H(!1),V(!1)}):r==="Fusion"&&(V(!1),re().then(S=>{i&&(P(S,null),V(!1),S.networks=Sr.filter(le=>le!=="cdn"),N(S))})))},[n,e,t,i]),c.jsxs("div",{style:{display:"flex",height:ae>1440?"700px":"650px",width:ae>1440?"675px":"680px",flexDirection:"column",borderRadius:"rounded",backgroundColor:"#F7F7F8",paddingTop:"0px"},children:[c.jsx(yA,{title:s,typeOfProduct:r,fileSize:l,urls:{iosUrl:g,googleUrl:y},handleIosChange:U,handleGoogleChange:B,disabled:ne,api:o,creditDownload:Y,user:a,isTest:W,setIsTest:R,urlType:b,setUrlType:C,allNetworksSelected:K,setAllNetworksSelected:G}),X?c.jsx("div",{style:{height:"100%",width:"100%",display:"flex",justifyContent:"center"},children:c.jsx(Ht,{isNetworksLoading:!0})}):(L||Y||r==="Fusion")&&(r==="Flex"?q:!0)&&!X&&g!=="Loading..."&&y!=="Loading..."&&c.jsx(PA,{playable:L,creditDownload:Y,visible:i,versionId:t,typeOfProduct:r,api:o,user:a,handleDownloadError:A,fetchFileUrl:u,urls:{iosUrl:g,googleUrl:y},game:q,getDownloadCount:F,disabled:ne,setSafariCopyLink:m,isTest:W,urlType:b,allNetworksSelected:K,cdnModal:v,setCdnModal:k,cdnUrl:Q,setCdnUrl:Z})]})},bd="";var Lr={exports:{}},At={},Kr={exports:{}},Ne={},Or={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;/*!
|
|
50
|
+
`):" "+$i(o[0]):"as no adapter specified";throw new ue("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:or};function ar(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Nt(null,e)}function to(e){return ar(e),e.headers=Be.from(e.headers),e.data=ir.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),eo.getAdapter(e.adapter||nr.adapter)(e).then(function(r){return ar(e),r.data=ir.call(e,e.transformResponse,r),r.headers=Be.from(r.headers),r},function(r){return Ui(r)||(ar(e),r&&r.response&&(r.response.data=ir.call(e,e.transformResponse,r.response),r.response.headers=Be.from(r.response.headers))),Promise.reject(r)})}const no=e=>e instanceof Be?e.toJSON():e;function yt(e,t){t=t||{};const n={};function r(u,l,d){return w.isPlainObject(u)&&w.isPlainObject(l)?w.merge.call({caseless:d},u,l):w.isPlainObject(l)?w.merge({},l):w.isArray(l)?l.slice():l}function i(u,l,d){if(w.isUndefined(l)){if(!w.isUndefined(u))return r(void 0,u,d)}else return r(u,l,d)}function o(u,l){if(!w.isUndefined(l))return r(void 0,l)}function a(u,l){if(w.isUndefined(l)){if(!w.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function s(u,l,d){if(d in t)return r(u,l);if(d in e)return r(void 0,u)}const A={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(u,l)=>i(no(u),no(l),!0)};return w.forEach(Object.keys(Object.assign({},e,t)),function(l){const d=A[l]||i,m=d(e[l],t[l],l);w.isUndefined(m)&&d!==s||(n[l]=m)}),n}const ro="1.6.0",sr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{sr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const io={};sr.transitional=function(t,n,r){function i(o,a){return"[Axios v"+ro+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new ue(i(a," has been removed"+(n?" in "+n:"")),ue.ERR_DEPRECATED);return n&&!io[a]&&(io[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}};function Ml(e,t,n){if(typeof e!="object")throw new ue("options must be an object",ue.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const s=e[o],A=s===void 0||a(s,o,e);if(A!==!0)throw new ue("option "+o+" must be "+A,ue.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ue("Unknown option "+o,ue.ERR_BAD_OPTION)}}const lr={assertOptions:Ml,validators:sr},tt=lr.validators;class yn{constructor(t){this.defaults=t,this.interceptors={request:new Xi,response:new Xi}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=yt(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&lr.assertOptions(r,{silentJSONParsing:tt.transitional(tt.boolean),forcedJSONParsing:tt.transitional(tt.boolean),clarifyTimeoutError:tt.transitional(tt.boolean)},!1),i!=null&&(w.isFunction(i)?n.paramsSerializer={serialize:i}:lr.assertOptions(i,{encode:tt.function,serialize:tt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&w.merge(o.common,o[n.method]);o&&w.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Be.concat(a,o);const s=[];let A=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(A=A&&p.synchronous,s.unshift(p.fulfilled,p.rejected))});const u=[];this.interceptors.response.forEach(function(p){u.push(p.fulfilled,p.rejected)});let l,d=0,m;if(!A){const y=[to.bind(this),void 0];for(y.unshift.apply(y,s),y.push.apply(y,u),m=y.length,l=Promise.resolve(n);d<m;)l=l.then(y[d++],y[d++]);return l}m=s.length;let g=n;for(d=0;d<m;){const y=s[d++],p=s[d++];try{g=y(g)}catch(h){p.call(this,h);break}}try{l=to.call(this,g)}catch(y){return Promise.reject(y)}for(d=0,m=u.length;d<m;)l=l.then(u[d++],u[d++]);return l}getUri(t){t=yt(this.defaults,t);const n=Fi(t.baseURL,t.url);return Pi(n,t.params,t.paramsSerializer)}}w.forEach(["delete","get","head","options"],function(t){yn.prototype[t]=function(n,r){return this.request(yt(r||{},{method:t,url:n,data:(r||{}).data}))}}),w.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(yt(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}yn.prototype[t]=n(),yn.prototype[t+"Form"]=n(!0)});const qn=yn;class Ar{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new Nt(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Ar(function(i){t=i}),cancel:t}}}const El=Ar;function kl(e){return function(n){return e.apply(null,n)}}function Wl(e){return w.isObject(e)&&e.isAxiosError===!0}const ur={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ur).forEach(([e,t])=>{ur[t]=e});const jl=ur;function oo(e){const t=new qn(e),n=Ki(qn.prototype.request,t);return w.extend(n,qn.prototype,t,{allOwnKeys:!0}),w.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return oo(yt(e,i))},n}const ve=oo(nr);ve.Axios=qn,ve.CanceledError=Nt,ve.CancelToken=El,ve.isCancel=Ui,ve.VERSION=ro,ve.toFormData=fn,ve.AxiosError=ue,ve.Cancel=ve.CanceledError,ve.all=function(t){return Promise.all(t)},ve.spread=kl,ve.isAxiosError=Wl,ve.mergeConfig=yt,ve.AxiosHeaders=Be,ve.formToJSON=e=>Qi(w.isHTMLForm(e)?new FormData(e):e),ve.getAdapter=eo.getAdapter,ve.HttpStatusCode=jl,ve.default=ve;const zl=ve;/*! typescript-cookie v1.0.6 | MIT */const ao=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),so=e=>encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent),cr=decodeURIComponent,dr=e=>(e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent));function Yl(e){return e=Object.assign({},e),typeof e.expires=="number"&&(e.expires=new Date(Date.now()+e.expires*864e5)),e.expires!=null&&(e.expires=e.expires.toUTCString()),Object.entries(e).filter(([t,n])=>n!=null&&n!==!1).map(([t,n])=>n===!0?`; ${t}`:`; ${t}=${n.split(";")[0]}`).join("")}function lo(e,t,n){const r=/(?:^|; )([^=]*)=([^;]*)/g,i={};let o;for(;(o=r.exec(document.cookie))!=null;)try{const a=n(o[1]);if(i[a]=t(o[2],a),e===a)break}catch{}return e!=null?i[e]:i}const Ao=Object.freeze({decodeName:cr,decodeValue:dr,encodeName:ao,encodeValue:so}),mr=Object.freeze({path:"/"});function uo(e,t,n=mr,{encodeValue:r=so,encodeName:i=ao}={}){return document.cookie=`${i(e)}=${r(t,e)}${Yl(n)}`}function co(e,{decodeValue:t=dr,decodeName:n=cr}={}){return lo(e,t,n)}function Nl({decodeValue:e=dr,decodeName:t=cr}={}){return lo(void 0,e,t)}function Rl(e,t=mr){uo(e,"",Object.assign({},t,{expires:-1}))}function pr(e,t){const n={set:function(i,o,a){return uo(i,o,Object.assign({},this.attributes,a),{encodeValue:this.converter.write})},get:function(i){if(arguments.length===0)return Nl(this.converter.read);if(i!=null)return co(i,this.converter.read)},remove:function(i,o){Rl(i,Object.assign({},this.attributes,o))},withAttributes:function(i){return pr(this.converter,Object.assign({},this.attributes,i))},withConverter:function(i){return pr(Object.assign({},this.converter,i),this.attributes)}},r={attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}};return Object.create(n,r)}pr({read:Ao.decodeValue,write:Ao.encodeValue},mr);let mo;typeof window<"u"&&(mo=co("token"));const ge=zl.create({headers:{Authorization:mo}});async function Jl(e,t,n){return(await ge.post(n+"/createFlexVersionLinkMulti",{_id:e,networks:t})).data}async function Dl(e,t){return e.network=="fb"&&(e.zip=1),(await ge.post(t+"/createFlexVersionLink",e||{})).data}async function Tl(e,t,n){return(await ge.post(e+"/createImportedVersionLink",{_id:t,network:n})).data}async function Gl(e,t,n,r,i){return(await ge.post(e+"/createPlayableVersionLink",{_id:t,network:n,isPfTest:r,extras:i})).data}async function Hl(e,t,n){return(await ge.post(n+"/createPlayableVersionLinkMulti",{_id:e,networks:t})).data}async function Pl(e,t,n,r,i){return(await ge.post(e+"/createReadyVersionLink",{_id:t,network:n,isPfTest:r,extras:i})).data}async function Xl(e,t,n){return(await ge.post(n+"/createReadyVersionLinkMulti",{_id:e,networks:t})).data}async function Vl(e,t,n,r,i,o,a,s){return(await ge.post(e+"/createFusionVersionLink",{_id:t,network:n,fusionData:r,isPfTest:i,extras:o,androidLink:a,iosLink:s})).data}async function Ql(e,t){return(await ge.post(t+"/updateFusionUrl",e||{})).data}async function Bl(e,t){return(await ge.post(t+"/getCdnExportName",e||{})).data}async function Ul(e,t){return(await ge.post(t+"/updateFlexUrl",e||{})).data}async function po(e,t,n){return(await ge.post(n+"/updatePlayableVersion",{...t,_id:e})).data}function qt(e){const t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select();try{return document.execCommand("copy")?(document.body.removeChild(t),!0):(document.body.removeChild(t),!1)}catch{return document.body.removeChild(t),!1}}function fo(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=fo(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function nt(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=fo(e))&&(r&&(r+=" "),r+=t);return r}const Rt=e=>typeof e=="number"&&!isNaN(e),at=e=>typeof e=="string",Se=e=>typeof e=="function",vn=e=>at(e)||Se(e)?e:null,fr=e=>x.isValidElement(e)||at(e)||Se(e)||Rt(e);function Fl(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)})})}function bn(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:o=300}=e;return function(a){let{children:s,position:A,preventExitTransition:u,done:l,nodeRef:d,isIn:m}=a;const g=r?`${t}--${A}`:t,y=r?`${n}--${A}`:n,p=x.useRef(0);return x.useLayoutEffect(()=>{const h=d.current,b=g.split(" "),C=L=>{L.target===d.current&&(h.dispatchEvent(new Event("d")),h.removeEventListener("animationend",C),h.removeEventListener("animationcancel",C),p.current===0&&L.type!=="animationcancel"&&h.classList.remove(...b))};h.classList.add(...b),h.addEventListener("animationend",C),h.addEventListener("animationcancel",C)},[]),x.useEffect(()=>{const h=d.current,b=()=>{h.removeEventListener("animationend",b),i?Fl(h,l,o):l()};m||(u?b():(p.current=1,h.className+=` ${y}`,h.addEventListener("animationend",b)))},[m]),x.createElement(x.Fragment,null,s)}}function ho(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const We={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const n=this.list.get(e).filter(r=>r!==t);return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{const n=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(n)})}},Cn=e=>{let{theme:t,type:n,...r}=e;return x.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...r})},hr={info:function(e){return x.createElement(Cn,{...e},x.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return x.createElement(Cn,{...e},x.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return x.createElement(Cn,{...e},x.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return x.createElement(Cn,{...e},x.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return x.createElement("div",{className:"Toastify__spinner"})}};function _l(e){const[,t]=x.useReducer(g=>g+1,0),[n,r]=x.useState([]),i=x.useRef(null),o=x.useRef(new Map).current,a=g=>n.indexOf(g)!==-1,s=x.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:a,getToast:g=>o.get(g)}).current;function A(g){let{containerId:y}=g;const{limit:p}=s.props;!p||y&&s.containerId!==y||(s.count-=s.queue.length,s.queue=[])}function u(g){r(y=>g==null?[]:y.filter(p=>p!==g))}function l(){const{toastContent:g,toastProps:y,staleId:p}=s.queue.shift();m(g,y,p)}function d(g,y){let{delay:p,staleId:h,...b}=y;if(!fr(g)||function(V){return!i.current||s.props.enableMultiContainer&&V.containerId!==s.props.containerId||o.has(V.toastId)&&V.updateId==null}(b))return;const{toastId:C,updateId:L,data:I}=b,{props:q}=s,N=()=>u(C),Y=L==null;Y&&s.count++;const E={...q,style:q.toastStyle,key:s.toastKey++,...Object.fromEntries(Object.entries(b).filter(V=>{let[ae,M]=V;return M!=null})),toastId:C,updateId:L,data:I,closeToast:N,isIn:!1,className:vn(b.className||q.toastClassName),bodyClassName:vn(b.bodyClassName||q.bodyClassName),progressClassName:vn(b.progressClassName||q.progressClassName),autoClose:!b.isLoading&&(X=b.autoClose,H=q.autoClose,X===!1||Rt(X)&&X>0?X:H),deleteToast(){const V=ho(o.get(C),"removed");o.delete(C),We.emit(4,V);const ae=s.queue.length;if(s.count=C==null?s.count-s.displayedToast:s.count-1,s.count<0&&(s.count=0),ae>0){const M=C==null?s.props.limit:1;if(ae===1||M===1)s.displayedToast++,l();else{const W=M>ae?ae:M;s.displayedToast=W;for(let R=0;R<W;R++)l()}}else t()}};var X,H;E.iconOut=function(V){let{theme:ae,type:M,isLoading:W,icon:R}=V,v=null;const k={theme:ae,type:M};return R===!1||(Se(R)?v=R(k):x.isValidElement(R)?v=x.cloneElement(R,k):at(R)||Rt(R)?v=R:W?v=hr.spinner():(Q=>Q in hr)(M)&&(v=hr[M](k))),v}(E),Se(b.onOpen)&&(E.onOpen=b.onOpen),Se(b.onClose)&&(E.onClose=b.onClose),E.closeButton=q.closeButton,b.closeButton===!1||fr(b.closeButton)?E.closeButton=b.closeButton:b.closeButton===!0&&(E.closeButton=!fr(q.closeButton)||q.closeButton);let ne=g;x.isValidElement(g)&&!at(g.type)?ne=x.cloneElement(g,{closeToast:N,toastProps:E,data:I}):Se(g)&&(ne=g({closeToast:N,toastProps:E,data:I})),q.limit&&q.limit>0&&s.count>q.limit&&Y?s.queue.push({toastContent:ne,toastProps:E,staleId:h}):Rt(p)?setTimeout(()=>{m(ne,E,h)},p):m(ne,E,h)}function m(g,y,p){const{toastId:h}=y;p&&o.delete(p);const b={content:g,props:y};o.set(h,b),r(C=>[...C,h].filter(L=>L!==p)),We.emit(4,ho(b,b.props.updateId==null?"added":"updated"))}return x.useEffect(()=>(s.containerId=e.containerId,We.cancelEmit(3).on(0,d).on(1,g=>i.current&&u(g)).on(5,A).emit(2,s),()=>{o.clear(),We.emit(3,s)}),[]),x.useEffect(()=>{s.props=e,s.isToastActive=a,s.displayedToast=n.length}),{getToastToRender:function(g){const y=new Map,p=Array.from(o.values());return e.newestOnTop&&p.reverse(),p.forEach(h=>{const{position:b}=h.props;y.has(b)||y.set(b,[]),y.get(b).push(h)}),Array.from(y,h=>g(h[0],h[1]))},containerRef:i,isToastActive:a}}function go(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function yo(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function $l(e){const[t,n]=x.useState(!1),[r,i]=x.useState(!1),o=x.useRef(null),a=x.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,s=x.useRef(e),{autoClose:A,pauseOnHover:u,closeToast:l,onClick:d,closeOnClick:m}=e;function g(I){if(e.draggable){I.nativeEvent.type==="touchstart"&&I.nativeEvent.preventDefault(),a.didMove=!1,document.addEventListener("mousemove",b),document.addEventListener("mouseup",C),document.addEventListener("touchmove",b),document.addEventListener("touchend",C);const q=o.current;a.canCloseOnClick=!0,a.canDrag=!0,a.boundingRect=q.getBoundingClientRect(),q.style.transition="",a.x=go(I.nativeEvent),a.y=yo(I.nativeEvent),e.draggableDirection==="x"?(a.start=a.x,a.removalDistance=q.offsetWidth*(e.draggablePercent/100)):(a.start=a.y,a.removalDistance=q.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function y(I){if(a.boundingRect){const{top:q,bottom:N,left:Y,right:E}=a.boundingRect;I.nativeEvent.type!=="touchend"&&e.pauseOnHover&&a.x>=Y&&a.x<=E&&a.y>=q&&a.y<=N?h():p()}}function p(){n(!0)}function h(){n(!1)}function b(I){const q=o.current;a.canDrag&&q&&(a.didMove=!0,t&&h(),a.x=go(I),a.y=yo(I),a.delta=e.draggableDirection==="x"?a.x-a.start:a.y-a.start,a.start!==a.x&&(a.canCloseOnClick=!1),q.style.transform=`translate${e.draggableDirection}(${a.delta}px)`,q.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function C(){document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",C),document.removeEventListener("touchmove",b),document.removeEventListener("touchend",C);const I=o.current;if(a.canDrag&&a.didMove&&I){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return i(!0),void e.closeToast();I.style.transition="transform 0.2s, opacity 0.2s",I.style.transform=`translate${e.draggableDirection}(0)`,I.style.opacity="1"}}x.useEffect(()=>{s.current=e}),x.useEffect(()=>(o.current&&o.current.addEventListener("d",p,{once:!0}),Se(e.onOpen)&&e.onOpen(x.isValidElement(e.children)&&e.children.props),()=>{const I=s.current;Se(I.onClose)&&I.onClose(x.isValidElement(I.children)&&I.children.props)}),[]),x.useEffect(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||h(),window.addEventListener("focus",p),window.addEventListener("blur",h)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",p),window.removeEventListener("blur",h))}),[e.pauseOnFocusLoss]);const L={onMouseDown:g,onTouchStart:g,onMouseUp:y,onTouchEnd:y};return A&&u&&(L.onMouseEnter=h,L.onMouseLeave=p),m&&(L.onClick=I=>{d&&d(I),a.canCloseOnClick&&l()}),{playToast:p,pauseToast:h,isRunning:t,preventExitTransition:r,toastRef:o,eventHandlers:L}}function qo(e){let{closeToast:t,theme:n,ariaLabel:r="close"}=e;return x.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:i=>{i.stopPropagation(),t(i)},"aria-label":r},x.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},x.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function eA(e){let{delay:t,isRunning:n,closeToast:r,type:i="default",hide:o,className:a,style:s,controlledProgress:A,progress:u,rtl:l,isIn:d,theme:m}=e;const g=o||A&&u===0,y={...s,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused",opacity:g?0:1};A&&(y.transform=`scaleX(${u})`);const p=nt("Toastify__progress-bar",A?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${m}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":l}),h=Se(a)?a({rtl:l,type:i,defaultClassName:p}):nt(p,a);return x.createElement("div",{role:"progressbar","aria-hidden":g?"true":"false","aria-label":"notification timer",className:h,style:y,[A&&u>=1?"onTransitionEnd":"onAnimationEnd"]:A&&u<1?null:()=>{d&&r()}})}const tA=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:i}=$l(e),{closeButton:o,children:a,autoClose:s,onClick:A,type:u,hideProgressBar:l,closeToast:d,transition:m,position:g,className:y,style:p,bodyClassName:h,bodyStyle:b,progressClassName:C,progressStyle:L,updateId:I,role:q,progress:N,rtl:Y,toastId:E,deleteToast:X,isIn:H,isLoading:ne,iconOut:V,closeOnClick:ae,theme:M}=e,W=nt("Toastify__toast",`Toastify__toast-theme--${M}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":Y},{"Toastify__toast--close-on-click":ae}),R=Se(y)?y({rtl:Y,position:g,type:u,defaultClassName:W}):nt(W,y),v=!!N||!s,k={closeToast:d,type:u,theme:M};let Q=null;return o===!1||(Q=Se(o)?o(k):x.isValidElement(o)?x.cloneElement(o,k):qo(k)),x.createElement(m,{isIn:H,done:X,position:g,preventExitTransition:n,nodeRef:r},x.createElement("div",{id:E,onClick:A,className:R,...i,style:p,ref:r},x.createElement("div",{...H&&{role:q},className:Se(h)?h({type:u}):nt("Toastify__toast-body",h),style:b},V!=null&&x.createElement("div",{className:nt("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!ne})},V),x.createElement("div",null,a)),Q,x.createElement(eA,{...I&&!v?{key:`pb-${I}`}:{},rtl:Y,theme:M,delay:s,isRunning:t,isIn:H,closeToast:d,hide:l,type:u,style:L,className:C,controlledProgress:v,progress:N||0})))},Zn=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},nA=bn(Zn("bounce",!0));bn(Zn("slide",!0)),bn(Zn("zoom")),bn(Zn("flip"));const gr=x.forwardRef((e,t)=>{const{getToastToRender:n,containerRef:r,isToastActive:i}=_l(e),{className:o,style:a,rtl:s,containerId:A}=e;function u(l){const d=nt("Toastify__toast-container",`Toastify__toast-container--${l}`,{"Toastify__toast-container--rtl":s});return Se(o)?o({position:l,rtl:s,defaultClassName:d}):nt(d,vn(o))}return x.useEffect(()=>{t&&(t.current=r.current)},[]),x.createElement("div",{ref:r,className:"Toastify",id:A},n((l,d)=>{const m=d.length?{...a}:{...a,pointerEvents:"none"};return x.createElement("div",{className:u(l),style:m,key:`container-${l}`},d.map((g,y)=>{let{content:p,props:h}=g;return x.createElement(tA,{...h,isIn:i(h.toastId),style:{...h.style,"--nth":y+1,"--len":d.length},key:`toast-${h.key}`},p)}))}))});gr.displayName="ToastContainer",gr.defaultProps={position:"top-right",transition:nA,autoClose:5e3,closeButton:qo,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let yr,st=new Map,Jt=[],rA=1;function vo(){return""+rA++}function iA(e){return e&&(at(e.toastId)||Rt(e.toastId))?e.toastId:vo()}function Dt(e,t){return st.size>0?We.emit(0,e,t):Jt.push({content:e,options:t}),t.toastId}function xn(e,t){return{...t,type:t&&t.type||e,toastId:iA(t)}}function wn(e){return(t,n)=>Dt(t,xn(e,n))}function he(e,t){return Dt(e,xn("default",t))}he.loading=(e,t)=>Dt(e,xn("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),he.promise=function(e,t,n){let r,{pending:i,error:o,success:a}=t;i&&(r=at(i)?he.loading(i,n):he.loading(i.render,{...n,...i}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},A=(l,d,m)=>{if(d==null)return void he.dismiss(r);const g={type:l,...s,...n,data:m},y=at(d)?{render:d}:d;return r?he.update(r,{...g,...y}):he(y.render,{...g,...y}),m},u=Se(e)?e():e;return u.then(l=>A("success",a,l)).catch(l=>A("error",o,l)),u},he.success=wn("success"),he.info=wn("info"),he.error=wn("error"),he.warning=wn("warning"),he.warn=he.warning,he.dark=(e,t)=>Dt(e,xn("default",{theme:"dark",...t})),he.dismiss=e=>{st.size>0?We.emit(1,e):Jt=Jt.filter(t=>e!=null&&t.options.toastId!==e)},he.clearWaitingQueue=function(e){return e===void 0&&(e={}),We.emit(5,e)},he.isActive=e=>{let t=!1;return st.forEach(n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t},he.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{const n=function(r,i){let{containerId:o}=i;const a=st.get(o||yr);return a&&a.getToast(r)}(e,t);if(n){const{props:r,content:i}=n,o={delay:100,...r,...t,toastId:t.toastId||e,updateId:vo()};o.toastId!==e&&(o.staleId=e);const a=o.render||i;delete o.render,Dt(a,o)}},0)},he.done=e=>{he.update(e,{progress:1})},he.onChange=e=>(We.on(4,e),()=>{We.off(4,e)}),he.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},he.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},We.on(2,e=>{yr=e.containerId||e,st.set(yr,e),Jt.forEach(t=>{We.emit(0,t.content,t.options)}),Jt=[]}).on(3,e=>{st.delete(e.containerId||e),st.size===0&&We.off(0).off(1).off(5)});function lt(e){he.success(e,{position:"top-center",autoClose:650,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"light"})}let qr="",je="Playable",Le=null,bo=null,Tt;const vr=async(e,t,n)=>{je==="Playable"?t&&t.iosUrl!=="Loading..."&&t.googleUrl!=="Loading..."&&await po(e,{iosLink:t==null?void 0:t.iosUrl,androidLink:t==null?void 0:t.googleUrl},Le):je==="Flex"?t&&t.iosUrl!=="Loading..."&&t.googleUrl!=="Loading..."&&await Ul({_id:e,iosLink:t==null?void 0:t.iosUrl,androidLink:t==null?void 0:t.googleUrl},Le):je==="Ready"?t&&t.iosUrl!=="Loading..."&&t.googleUrl!=="Loading..."&&((n==null?void 0:n.urlType)==="single"&&(t.googleUrl=t.iosUrl),await po(e,{iosLink:t==null?void 0:t.iosUrl,androidLink:t==null?void 0:t.googleUrl},Le)):je==="Fusion"&&t&&t.iosUrl!=="Loading..."&&t.googleUrl!=="Loading..."&&await Ql({_id:Tt==null?void 0:Tt.fusionId,iosLink:t==null?void 0:t.iosUrl,androidLink:t==null?void 0:t.googleUrl},Le)},In=async e=>{let t=qr+"/"+e,n=e;fetch(t).then(r=>r.blob()).then(r=>{const i=window.URL.createObjectURL(r),o=document.createElement("a");o.href=i,o.download=n.split("/").reduce((a,s)=>s,""),document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(i),lt("Download successfully")}).catch(r=>{console.error("File error:",r)})},oA=(e,t,n)=>{let r=qr+"/"+e;n==="adikteev"&&(r=e),qt(r)?lt(se.t("common:link_copied")):t(r)};async function Gt(e,t,n,r="download",i=!1,o=null){return new Promise(async(a,s)=>{let A=async u=>{r==="download"?await In(u):r==="copy"&&oA(u,bo,t)};try{await vr(e,n,o)}catch(u){console.log("updateUrls error",u)}je==="Playable"?Gl(Le,e,t,i,o).then(async u=>{let{url:l}=u;await A(l),a(u)}).catch(u=>{let l=u.response.data.error.msg;s({message:l})}):je==="Flex"?Dl({_id:e,network:t,extras:o},Le).then(async u=>{if(u.message){s(u);return}let{url:l}=u;await A(l),a(u)}).catch(u=>{let l=u.response.data.error.msg;s({message:l})}):je==="Import"?Tl(Le,e,t).then(async u=>{let l=u.url;await A(l),a(u)}).catch(u=>{let l=u.response.data.error.msg;s({message:l})}):je==="Ready"?Pl(Le,e,t,i,o).then(async u=>{if(u.message){s(u);return}let l=u.url;await A(l),a(u)}).catch(u=>{let l=u.response.data.error.msg;s({message:l})}):je==="Fusion"&&Vl(Le,e,t,Tt,i,o,n==null?void 0:n.googleUrl,n==null?void 0:n.iosUrl).then(async u=>{let l=u.url;await A(l),a(u)}).catch(u=>{let l=u.response.data.error.msg;s({message:l})})})}async function aA(e,t,n,r=null){return new Promise(async(i,o)=>{await vr(e,t,r),je==="Flex"?Jl(e,n,Le).then(async a=>{if(a.message){o(a);return}await In(a.url),i(a.url)}).catch(a=>{let s=a.response.data.error.msg;o({message:s})}):je==="Ready"?Xl(e,n,Le).then(async a=>{if(a.message){o(a);return}await In(a.url),i(a.url)}).catch(a=>{console.log("err",a);let s=a.response.data.error.msg;o({message:s})}):Hl(e,n,Le).then(async a=>{await In(a.url),i(a.url)}).catch(a=>{let s=a.response.data.error.msg;o({message:s})})})}function sA(e,t,n,r,i){je=e,Le=t,bo=n,qr=r,Tt=i}async function lA(e){try{return await Bl({versionId:e,checkExistance:!0},Le)}catch{return null}}async function br(e,t){return(await ge.post(t+"/findPlayable",{_id:e})).data}const AA=({versionId:e,playableId:t,typeOfProduct:n,api:r,copyLinkUrl:i,setSafariCopyLink:o,qrUrl:a,iosLink:s,androidLink:A,urlType:u})=>{const[l,d]=x.useState(!1),m=async()=>{d(!0),Gt(e,"default",{iosUrl:s,googleUrl:A},null,!1,{urlType:u}).then(async g=>{var b,C,L,I;let y="";if(t&&(n==="Playable"||n==="Ready")){const q=await br(t,r),N=(C=(b=q==null?void 0:q.data)==null?void 0:b.globalProps)==null?void 0:C.defaultLandscape,Y=(I=(L=q==null?void 0:q.data)==null?void 0:L.globalProps)==null?void 0:I.defaultPhoneIndex;N&&(y+="&landscape=true"),Y!==void 0&&(y+=`&phoneIndex=${Y}`)}br(t,r),d(!1);let p;n==="Flex"?p=`${i}/preview?versionId=${e}`:n==="Import"?p=`${i}/preview?versionId=${e}`:n==="Ready"?p=`${i}/preview?versionId=${e}&ready=true`:n==="Fusion"?p=`${i}/preview?versionId=${e}`:p=`${i}/preview?versionId=${e}`,p+=y,qt(p)?lt(se.t("common:link_copied")):o(p),d(!1)}).catch(g=>{d(!1)})};return c.jsxs("div",{style:{display:"flex",height:"125px",width:"100%",borderRadius:"10px",backgroundColor:"#000000",padding:"10px"},children:[c.jsx("div",{style:{marginRight:"0.75rem",width:"50%",display:"flex",justifyContent:"center",alignItems:"center"},children:a?c.jsx(_a,{bgColor:"#0F0F1E",fgColor:"#ffffff",style:{height:"auto",maxWidth:"100%",width:"100%"},value:a}):c.jsx("img",{style:{width:"50px",height:"50px"},src:He,alt:"pf-logo-gif"})}),c.jsxs("div",{children:[c.jsx("div",{style:{marginBottom:"0.25rem",fontSize:"0.875rem",fontWeight:"bold",color:"white"},children:se.t("common:mobile_testing")}),c.jsx("div",{style:{marginBottom:"1rem",fontSize:"0.75rem",color:"gray"},children:se.t("common:scan_qr_code_to_test_in_any_browser")}),c.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"0.375rem",backgroundColor:"#00a3ff57",color:"secondary-blue",cursor:"pointer"},onClick:()=>{l||m()},children:c.jsxs(c.Fragment,{children:[c.jsx(pi,{style:{height:"1.5rem",width:"1.5rem",stroke:"secondary-blue",color:"white"}}),c.jsx("div",{style:{height:"24px",display:"flex",alignItems:"center",justifyContent:"center",width:"80px"},children:l?c.jsx("img",{style:{height:"90%"},src:He,alt:"loading"}):c.jsx("button",{style:{fontSize:"1rem",color:"white",background:"rgba(0, 163, 255, 0)"},children:se.t("common:copy_link")})})]})})]})]})},uA=({versionName:e,versionId:t,playableId:n,typeOfProduct:r,api:i,iframeUrl:o,fetchFileUrl:a,copyLinkUrl:s,setSafariCopyLink:A,iosLink:u,androidLink:l,urlType:d})=>{const[m,g]=x.useState(window.innerWidth);console.log("iosLink",u),x.useEffect(()=>{console.log("re add event listener");function p(h){console.log(h),h.data==="cta"&&(console.log("Received 'cta' message from iframe"),u&&window.open(u,"_blank"))}return window.addEventListener("message",p,!1),()=>{window.removeEventListener("message",p)}},[u,l]),x.useEffect(()=>{const p=()=>{g(window.innerWidth)};return window.addEventListener("resize",p),()=>{window.removeEventListener("resize",p)}},[]);const y=(e==null?void 0:e.length)>25?e.slice(0,25)+"...":e;return c.jsxs("div",{style:{display:"flex",width:"300px",flexDirection:"column",justifyContent:"space-between",padding:"5px",height:m>1440?"680px":"620px",borderRadius:"0px 0px 0px 16px",marginTop:"20px"},children:[c.jsx(ha,{iframeUrl:o}),c.jsx(ga,{name:y}),c.jsx(AA,{versionId:t,playableId:n,typeOfProduct:r,api:i,copyLinkUrl:s,setSafariCopyLink:A,qrUrl:o,iosLink:u,androidLink:l,urlType:d})]})};var Ce=(e=>(e.Flex="#7101FF",e.Playable="#F9830B",e.Import="#00a3ff",e.Ready="#0060A5",e.Fusion="#171717",e))(Ce||{});const Co=({checked:e,typeOfProduct:t,id:n})=>{const[r,i]=x.useState(e);x.useEffect(()=>{i(e)},[e]);const o=()=>{i(!r)};return c.jsx("div",{style:{display:"inline-flex",alignItems:"center"},children:c.jsxs("label",{onClick:o,style:{position:"relative",display:"flex",cursor:"pointer",alignItems:"center"},htmlFor:n,children:[c.jsx("input",{type:"checkbox",style:{position:"relative",height:"20px",width:"20px",cursor:"pointer",appearance:"none",borderRadius:"0.25rem",transition:"all ease-in-out",border:"1px solid lightgray",opacity:1},id:n,checked:r,onChange:o}),c.jsxs("div",{style:{pointerEvents:"none",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:"white",opacity:r?1:0,transition:"opacity ease-in-out"},children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",style:{height:"14px",width:"14px"},viewBox:"0 0 20 20",fill:Ce[t],stroke:Ce[t],strokeWidth:"1",children:c.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})," "]})]})})},cA=({typeOfProduct:e,allNetworksSelected:t,setAllNetworksSelected:n})=>c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",marginBottom:"0.5rem"},children:[c.jsxs("div",{style:{fontSize:"2xl",fontWeight:"bold",display:"flex"},children:[c.jsx("span",{style:{color:Ce[e]},className:"mr-2",children:se.t("common:select_network")}),c.jsx("span",{style:{whiteSpace:"pre"},children:se.t("common:from_list")})]}),c.jsxs("div",{onClick:()=>{n(!t)},style:{marginLeft:"auto",marginRight:"2rem",display:"flex",height:"24px",alignItems:"center",justifyContent:"flex-end",fontSize:"0.875rem",width:110},children:[c.jsx(Co,{checked:t,typeOfProduct:e,id:"asd"}),c.jsx("span",{style:{marginLeft:"0.5rem",fontSize:"16px",fontWeight:"bold"},children:se.t("common:select_all")})]})]});async function dA(e,t){return(await ge.post(t+"/buyRequest",{requestType:e})).data}const mA=()=>c.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c.jsxs("g",{"clip-path":"url(#clip0_518_12094)",children:[c.jsx("path",{d:"M4.50977 11.99L19.4898 11.99",stroke:"#7101FF","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),c.jsx("path",{d:"M13.5068 17.977L19.4828 12L13.5068 6.02299",stroke:"#7101FF","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]}),c.jsx("defs",{children:c.jsx("clipPath",{id:"clip0_518_12094",children:c.jsx("rect",{width:"24",height:"24",fill:"white",transform:"translate(0 24) rotate(-90)"})})})]}),pA=({creditDownload:e,api:t})=>c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{marginTop:"0.5rem",paddingLeft:"1.5rem",paddingRight:"1.5rem",fontWeight:100},children:"If you continue to export, you will spend 1 credit."}),c.jsxs("div",{style:{display:"flex",alignItems:"center",width:"100%",paddingLeft:"1.5rem",paddingRight:"1.5rem",paddingTop:"0.25rem",fontSize:"12px",fontWeight:100},children:["You have"," ",c.jsx("span",{style:{paddingLeft:"0.25rem",paddingRight:"0.25rem",fontWeight:"bold",color:"#yourColorHere"},children:(e==null?void 0:e.downloadLimit)-(e==null?void 0:e.downloadLimitUsed)<0?0:(e==null?void 0:e.downloadLimit)-(e==null?void 0:e.downloadLimitUsed)})," ","credits remaining.",c.jsxs("button",{style:{marginLeft:"0.5rem",display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",textDecoration:"underline",color:"#yourColorHere"},onClick:()=>dA("Flex Credit",t).then(n=>lt("You will be contacted regarding your request.")),children:["Get more",c.jsx(mA,{})]})]})]}),Zo=({typeOfProduct:e,urls:t,handleIosChange:n,handleGoogleChange:r,disabled:i})=>{const o=s=>{n(s.target.value)},a=s=>{r(s.target.value)};return c.jsxs(c.Fragment,{children:[c.jsxs("div",{style:{display:"flex",height:"2rem",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"200"},children:[c.jsx("span",{style:{width:"5rem",fontWeight:"bold",flexShrink:0},children:se.t("common:app_store")}),c.jsx("input",{style:{marginLeft:"1.25rem",display:"flex",height:"100%",width:"100%",alignItems:"center",borderRadius:"0.375rem",border:t.iosUrl?"1px solid lightgray":"1px solid red",paddingLeft:"0.5rem",color:"#000000",borderColor:Ce[e],marginRight:"2rem"},type:"text",value:t.iosUrl,onChange:o,placeholder:"Ios Url",disabled:i})]}),c.jsxs("div",{style:{marginTop:"0.5rem",display:"flex",height:"2rem",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"100"},children:[c.jsxs("span",{style:{width:"5rem",fontWeight:"bold",flexShrink:0},children:[se.t("common:google_play"),":"]}),c.jsx("input",{style:{marginLeft:"1.25rem",display:"flex",height:"100%",width:"100%",alignItems:"center",borderRadius:"0.375rem",border:t.googleUrl?"1px solid lightgray":"1px solid red",paddingLeft:"0.5rem",color:"#000000",borderColor:Ce[e],marginRight:"2rem"},type:"text",value:t.googleUrl,onChange:a,placeholder:"Google Url",disabled:i})]})]})},fA=({typeOfProduct:e,urls:t,handleIosChange:n,handleGoogleChange:r,disabled:i})=>{const o=a=>{n(a.target.value)};return c.jsx(c.Fragment,{children:c.jsxs("div",{style:{display:"flex",height:"2rem",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"200"},children:[c.jsx("span",{style:{width:"5rem",fontWeight:"bold",flexShrink:0},children:"Redirection URL:"}),c.jsx("input",{style:{marginLeft:"1.25rem",display:"flex",height:"100%",width:"100%",alignItems:"center",borderRadius:"0.375rem",border:t.iosUrl?"1px solid lightgray":"1px solid red",paddingLeft:"0.5rem",color:"#000000",borderColor:Ce[e],marginRight:"2rem"},type:"text",value:t.iosUrl,onChange:o,placeholder:"Ios Url",disabled:i})]})})},hA=({typeOfProduct:e,fileSize:t,urls:n,handleIosChange:r,handleGoogleChange:i,disabled:o,api:a,creditDownload:s,user:A,isTest:u,setIsTest:l,urlType:d,setUrlType:m})=>{const g=()=>c.jsxs("div",{style:{display:"flex",height:"24px",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"100"},children:[c.jsxs("span",{style:{width:"5rem",fontWeight:"bold"},children:["Enable Test:"," "]}),c.jsx("input",{style:{marginLeft:"1.25rem",display:"flex",height:"100%",width:"20px",alignItems:"center",borderRadius:"0.375rem",border:n.googleUrl?"1px solid lightgray":"1px solid red",paddingLeft:"0.5rem",color:"#000000",borderColor:Ce[e]},type:"checkbox",checked:u,onChange:()=>{l(!u)},placeholder:"Google Url",disabled:o})]}),y=()=>c.jsx(c.Fragment,{children:c.jsxs("div",{style:{display:"flex",width:"400px",height:"30px",flexDirection:"row",justifyContent:"space-between",alignItems:"center",borderBottom:"1px solid #eaeaec",marginBottom:"10px",position:"relative"},className:"tab-switch",children:[c.jsx("div",{style:{position:"absolute",bottom:"-3px",left:d==="single"?"50%":"0%",width:"50%",height:"3px",borderRadius:"2px",backgroundColor:"#12a9fe",transition:"all 0.2s ease-in-out"},id:"tab-switch-background"}),c.jsx("div",{style:{width:"50%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",position:"relative"},onClick:()=>{document.getElementById("tab-switch-background").style.left="0%",document.getElementById("single-tab").style.color="#a3a3a3",document.getElementById("game-tab").style.color="#000",document.getElementById("single-tab").style.fontWeight="normal",document.getElementById("game-tab").style.fontWeight="bold",setTimeout(()=>{m("game")},200)},children:c.jsx("span",{style:{position:"relative",color:d==="game"?"#000":"#a3a3a3",fontWeight:d==="game"?"bold":"normal",transition:"all 0.2s ease-in-out"},id:"game-tab",children:"App"})},"gameTab"),c.jsx("div",{style:{width:"50%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",position:"relative"},onClick:()=>{document.getElementById("tab-switch-background").style.left="50%",document.getElementById("single-tab").style.color="#000",document.getElementById("game-tab").style.color="#a3a3a3",document.getElementById("single-tab").style.fontWeight="bold",document.getElementById("game-tab").style.fontWeight="normal",setTimeout(()=>{m("single")},200)},children:c.jsx("span",{style:{position:"relative",color:d==="single"?"#000":"#a3a3a3",fontWeight:d==="single"?"bold":"normal",transition:"all 0.2s ease-in-out"},id:"single-tab",children:"Website"})},"singleTab")]})});return c.jsx(c.Fragment,{children:e!=="Import"&&c.jsxs("div",{style:{display:"flex",width:"100%",flexDirection:"column"},children:[A.customer=="playableFactoryInternal"&&e==="Playable"&&c.jsx(g,{}),e==="Ready"?c.jsxs(c.Fragment,{children:[c.jsx(y,{}),d==="game"&&c.jsx(Zo,{typeOfProduct:e,urls:n,handleIosChange:r,handleGoogleChange:i,disabled:o}),d==="single"&&c.jsx(fA,{typeOfProduct:e,urls:n,handleIosChange:r,handleGoogleChange:i,disabled:o})]}):c.jsx(c.Fragment,{children:c.jsx(Zo,{typeOfProduct:e,urls:n,handleIosChange:r,handleGoogleChange:i,disabled:o})}),(s==null?void 0:s.willSpendCredit)&&c.jsx(pA,{creditDownload:s,api:a})]})})},gA=({typeOfProduct:e,title:t,fileSize:n})=>c.jsxs("div",{style:{fontSize:"1.5rem",fontWeight:"bold",paddingTop:"20px"},children:[c.jsx("span",{style:{color:Ce[e]},children:t}),n&&c.jsxs("span",{style:{fontSize:"14px",fontWeight:"bold",marginLeft:"30px",color:"#87878E"},children:[se.t("common:file_size")," : ",parseFloat(n).toFixed(2)," mb"]})]}),yA=({typeOfProduct:e,fileSize:t,urls:n,title:r,handleIosChange:i,handleGoogleChange:o,disabled:a,creditDownload:s,api:A,user:u,isTest:l,setIsTest:d,urlType:m,setUrlType:g,allNetworksSelected:y,setAllNetworksSelected:p})=>c.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100%",justifyContent:"space-between",alignItems:"flex-start",borderBottom:"1px solid #D1D5DB",paddingLeft:"1.25rem",paddingRight:"1.25rem",gap:"0.5rem"},children:[c.jsx(gA,{typeOfProduct:e,title:r,fileSize:t}),c.jsx(hA,{typeOfProduct:e,fileSize:t,urls:n,handleIosChange:i,handleGoogleChange:o,disabled:a,creditDownload:s,api:A,user:u,isTest:l,setIsTest:d,urlType:m,setUrlType:g}),c.jsx(cA,{typeOfProduct:e,allNetworksSelected:y,setAllNetworksSelected:p})]}),Cr=({children:e,className:t,onClickDonwload:n,downloading:r,disabled:i})=>c.jsx("button",{onClick:n,className:t,style:{display:"flex",height:"40px",alignItems:"center",justifyContent:"center",borderRadius:"0.375rem",border:"1px solid lightgray",padding:"0.25rem",fontSize:"0.875rem",width:200,backgroundColor:"#FFFFFF"},disabled:r||i,children:e}),vd="",qA=({typeOfProduct:e})=>c.jsx("div",{style:{backgroundColor:"transparent",display:"flex",alignItems:"center",flexDirection:"column"},children:c.jsxs("div",{style:{position:"relative",width:"64px",height:"16px",marginTop:"8px"},children:[c.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:Ce[e]}}),c.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:Ce[e]}}),c.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:Ce[e]}}),c.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:Ce[e]}})]})}),Ht=({isNetworksLoading:e=!1})=>c.jsx("div",{style:{display:"flex",height:"100%",width:"90px",alignItems:"center",justifyContent:"center"},children:c.jsx("img",{width:e?"100px":"25px",height:e?"100px":"25px",src:He,alt:"pf-logo-gif"})}),Zr=({title:e,titleId:t,...n})=>c.jsxs("svg",{viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em","aria-labelledby":t,...n,children:[e?c.jsx("title",{id:t,children:e}):null,c.jsx("path",{stroke:"currentColor",d:"m15.985 11.111-3.556 3.556-3.556-3.556M12.429 4v10.667M20.429 16.444A3.556 3.556 0 0 1 16.873 20H7.985a3.556 3.556 0 0 1-3.556-3.556",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})]}),vA=({onClose:e,iosLink:t,googleLink:n,buttonType:r,handleCopyLink:i,download:o,typeOfProduct:a,urlType:s})=>{let A="";return a==="Ready"&&s==="single"?A=se.t("common:redirection_url_is_empty_are_you_sure_want_to_continue"):!t&&!n?A=se.t("common:both_links_are_empty_are_you_sure_want_to_continue"):t?n||(A=se.t("common:google_link_is_empty_are_you_sure_want_to_continue")):A=se.t("common:ios_link_is_empty_are_you_sure_want_to_continue"),c.jsxs("div",{style:{position:"fixed",top:0,left:0,zIndex:50,display:"flex",height:"120%",width:"130%",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.2)"},children:[c.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),c.jsxs("div",{style:{position:"absolute",zIndex:50,display:"flex",flexDirection:"column",gap:"5px",maxWidth:"350px",borderRadius:"0.375rem",backgroundColor:"white",padding:"1rem",pointerEvents:"auto"},children:[c.jsx("h1",{style:{textAlign:"center",fontSize:"18px",lineHeight:"24px"},children:A}),c.jsxs("div",{style:{display:"flex",gap:"5px"},children:[c.jsx("button",{onClick:()=>{e(!1)},style:{flex:1,cursor:"pointer",borderRadius:"0.375rem",border:"1px solid #666666",padding:"0.5rem",fontWeight:"bold",transition:"all 0.15s ease-linear"},children:se.t("common:no")}),c.jsx("button",{onClick:async u=>{r==="download"?await o():r==="copyLink"&&await i(),e()},style:{flex:1,cursor:"pointer",borderRadius:"0.375rem",border:"1px solid red",backgroundColor:"darkorange",padding:"0.5rem",fontWeight:"bold",color:"white",transition:"all 0.15s ease-linear"},children:se.t("common:yes")})]})]})]})},xr=({onClose:e,handleCopyLink:t,download:n,creditConfirmType:r,getDownloadCount:i,width:o="130%",height:a="120%"})=>c.jsxs("div",{style:{position:"fixed",top:0,left:0,zIndex:50,display:"flex",height:a,width:o,alignItems:"center",justifyContent:"center",backgroundColor:"#00000080"},children:[c.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%"}}),c.jsxs("div",{style:{position:"absolute",zIndex:50,display:"flex",height:"max-content",width:350,flexDirection:"column",gap:"5px",borderRadius:"8px",backgroundColor:"white",padding:"20px"},children:[c.jsx("h1",{style:{textAlign:"center",fontSize:"18px",lineHeight:"24px"},children:"You are going to spend 1 credit for this download, do you want to continue?"}),c.jsxs("div",{style:{display:"flex",gap:"5px"},children:[c.jsx("button",{onClick:e,style:{flex:1,cursor:"pointer",borderRadius:"4px",borderWidth:"1px",borderColor:"dark-50",padding:"2px",fontWeight:"bold"},children:"No"}),c.jsx("button",{style:{flex:1,cursor:"pointer",borderRadius:"4px",borderWidth:"1px",borderColor:"#F9830B",backgroundColor:"#F9830B",padding:"2px",fontWeight:"bold",color:"white"},onClick:async s=>{s.preventDefault(),s.stopPropagation(),r==="download"?(await n(),await i()):r==="copy"&&(await t(),await i()),e()},children:"Yes"})]})]})]}),bA=({onClose:e,handleDownload:t,handleDownloadMolocoTest:n,downloadingMoloco:r,downloadingMolocoTest:i,downloadingMolocoHtml:o})=>c.jsxs("div",{style:{position:"fixed",top:0,left:0,zIndex:50,display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.2)"},onClick:e,children:[c.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),c.jsx("div",{style:{position:"absolute",zIndex:50,display:"flex",flexDirection:"column",gap:"5px",minWidth:"500px",borderRadius:"0.375rem",backgroundColor:"white",padding:"1rem",pointerEvents:"auto"},onClick:a=>{a.stopPropagation()},children:c.jsxs("div",{style:{display:"flex",gap:"5px",flexDirection:"column"},children:[c.jsxs("div",{style:{display:"flex",justifyContent:"center"},children:[r?c.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear",width:"200px",marginRight:"10px"},children:c.jsx("img",{width:"25px",height:"25px",src:He,alt:"pf-logo-gif"})}):c.jsx("button",{onClick:()=>{t(!1)},style:{cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear",width:"200px",marginRight:"10px"},children:"Download"}),o?c.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear",width:"200px",marginLeft:"10px"},children:c.jsx("img",{width:"25px",height:"25px",src:He,alt:"pf-logo-gif"})}):c.jsx("button",{onClick:()=>{t(!0)},style:{cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear",width:"200px",marginLeft:"10px"},children:"Download HTML"})]}),c.jsx("div",{style:{display:"flex",justifyContent:"center"},children:i?c.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear",width:"200px"},children:c.jsx("img",{width:"25px",height:"25px",src:He,alt:"pf-logo-gif"})}):c.jsx("button",{onClick:n,style:{cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear",width:"200px"},children:"Download Moloco Test"})})]})})]});async function CA(e,t,n,r){return(await ge.post(e+"/createMolocoTestPage",{_id:t,network:n,typeOfProduct:r})).data}const ZA=({id:e,imageUrl:t,handleCardClick:n,selected:r,name:i,networkVersionSize:o,fileSizeLoading:a,showCheckBox:s,typeOfProduct:A,versionId:u,api:l,handleDownloadError:d,fetchFileUrl:m,urls:g,game:y,setIsConfirmActive:p,creditDownload:h,getDownloadCount:b,disabled:C,user:L,setSafariCopyLink:I,isTest:q,urlType:N,setCdnModal:Y,generateCDN:E,cdnUrl:X})=>{const[H,ne]=x.useState(!1),[V,ae]=x.useState(""),[M,W]=x.useState(!1),[R,v]=x.useState(!1),[k,Q]=x.useState(!1),[Z,K]=x.useState("download"),[G,J]=x.useState(!1),[D,U]=x.useState(!1),[B,P]=x.useState(!1);let F={aarki:"html,copy",adcolony:"copy,html",adjoe:"copy,html",applovin:"copy,html",appreciate:"zip",chartboost:"copy,html",criteo:"zip",crossinstall:"copy,html",default:"copy",fb:"zip",fyber:"copy,html",google:"zip",google360:"zip",ironsource:"copy,html",kayzen:"apikey",kaden:"html",kidoz:"html",lifestreet:"copy,html",liftoff:"copy,zip",mobvista:"html",moloco:"html,molocotest",molocoV2:"html,molocotest",nucleo:"copy,html",oceanengine:"copy,zip",pointblank:"html",smadex:"zip",snapchat:"zip",tapjoy:"copy,html",tencent:"zip",toutiao:"copy,zip",toutiao_cn:"copy,zip",unity:"copy,html",vungle:"html",web:"copy,html",yandex:"zip",zucks:"copy,html",luna:"zip",inmobi:"copy,html,",nend:"html",adikteev:"html",jammp:"copy,html",mraid:"copy,html"};const re={cdn:"Generate Link",adikteev:"Copy CDN"},S=()=>{n(e)},le=async(T,oe)=>{const ye={molocoGenerateHtml:!1,urlType:N};if($&&(oe==="copy"?(U(!0),oe="download",ye.molocoGenerateHtml=!0):J(!0)),console.log("getVersion",T,oe,ye),T==="cdn"){Y(!0),await E(!0);return}return T==="adikteev"&&(oe="copy"),ne(!0),new Promise((wt,it)=>{Gt(u,T,g,oe,q,ye).then(Ue=>{ne(!1),wt(Ue),U(!1),J(!1)}).catch(Ue=>{ne(!1),d(Ue.message,Ue),it(Ue),U(!1),J(!1)})})},j=async(T=!1)=>{T?U(!0):J(!0);const oe={molocoGenerateHtml:!1};T&&(oe.molocoGenerateHtml=!0),Gt(u,i,g,"download",q,oe).then(ye=>{T?U(!1):J(!1),Q(!1)}).catch(ye=>{d(ye.message,ye)})},ie=async()=>{P(!0);const T=await CA(l,u,i,A);let oe=`${m}/${T==null?void 0:T.url}`;qt(oe)?(lt(se.t("common:link_copied")),P(!1)):I(oe)},$=i==="moloco"||i==="molocoV2";return c.jsxs(c.Fragment,{children:[c.jsxs("div",{style:{position:"relative",display:"flex",flexDirection:"column",gap:"20px",padding:"16px",borderColor:r?Ce[A]:"lightgray",borderWidth:"1px",borderStyle:"solid",backgroundColor:"white",width:"100%",height:"175px",borderRadius:"8px",cursor:"pointer"},className:"border-hover-"+A,onClick:S,children:[c.jsxs("div",{style:{marginTop:i=="web"?"10px":"40px",display:"flex",justifyContent:"center"},children:[c.jsx("div",{style:{position:"absolute",right:"0",top:"0",padding:"8px"},children:c.jsx("div",{children:o&&o.map(T=>T.network).includes(i)?a?c.jsx("div",{style:{position:"absolute",right:"0",top:"0.5rem",padding:"0.5rem",height:"1.5rem",display:"flex",justifyContent:"center",alignItems:"center",marginRight:"2rem"},children:c.jsx(qA,{typeOfProduct:A})}):o.map(T=>c.jsx("div",{style:{position:"absolute",right:"0",top:"0.5rem",padding:"0.5rem",marginRight:"2rem",fontSize:"1rem",height:"1.5rem",display:"flex",justifyContent:"center",alignItems:"center"},children:T.network===i?T.size.toString().slice(0,5)+"Mb":""},T.network)):null})}),c.jsx("div",{style:{position:"absolute",top:"0",left:"0",padding:"0.5rem"},children:(A==="Playable"||A==="Ready"||A==="Flex")&&s&&c.jsx(Co,{checked:r,typeOfProduct:A,id:e})}),c.jsx("img",{onClick:S,style:{width:"30rem",height:i=="web"?"80px":"50px",objectFit:"contain"},src:t})]}),c.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"0.25rem"},children:[c.jsx(Cr,{className:`${$?"w-1/2":"w-2/3"} border-hover-`+A,downloading:H,onClickDonwload:async T=>{if(T.stopPropagation(),$&&L.customer==="playableFactoryInternal"){Q(!0);return}else{ae("download");const oe=g.iosUrl,ye=g.googleUrl;i==="cdn"&&h&&h.willSpendCredit&&!X||i!=="cdn"&&h&&h.willSpendCredit?(p(!0),K("download"),W(!0)):["Playable","Flex"].includes(A)&&(!oe||!ye)||A==="Ready"&&N==="single"&&!oe||A==="Ready"&&N==="multi"&&(!oe||!ye)?(p(!0),v(!0)):(v(!1),W(!1),await le(i,"download"))}},children:$?c.jsxs(c.Fragment,{children:[!G&&c.jsxs(c.Fragment,{children:[c.jsx(Zr,{style:{marginRight:"0.5rem",height:"1.5rem",width:"1rem",stroke:"dark-full"}}),L.customer!=="playableFactoryInternal"?se.t("common:txt"):se.t("common:download")]}),G&&c.jsx(Ht,{})]}):c.jsxs(c.Fragment,{children:[!H&&c.jsxs(c.Fragment,{children:[c.jsx(Zr,{style:{marginRight:"0.5rem",height:"1.5rem",width:"1rem",stroke:"dark-full"}}),re[i]||se.t("common:download")]}),H&&c.jsx(Ht,{})]})}),F[i]&&F[i].includes("copy")&&c.jsx(Cr,{className:"w-1/3 border-hover-"+A,onClickDonwload:async T=>{T.stopPropagation(),ae("copyLink");const oe=g.iosUrl,ye=g.googleUrl;h&&(h!=null&&h.willSpendCredit)?(K("copy"),p(!0),W(!0)):A!=="Import"&&(!oe||!ye)?(p(!0),v(!0)):(W(!1),v(!1),await le(i,"copy"))},disabled:C,children:c.jsx(pi,{className:"h-6 w-6 stroke-dark-full"})}),$&&L.customer!=="playableFactoryInternal"&&c.jsxs(Cr,{className:"w-1/2 border-hover-"+A,onClickDonwload:async T=>{T.stopPropagation(),ae("copyLink");const oe=g.iosUrl,ye=g.googleUrl;h&&(h!=null&&h.willSpendCredit)?(K("download"),p(!0),W(!0)):A!=="Import"&&(!oe||!ye)?(p(!0),v(!0)):(W(!1),v(!1),await j(!0))},disabled:C,children:[!D&&c.jsxs(c.Fragment,{children:[c.jsx(Zr,{style:{marginRight:"0.5rem",height:"1.5rem",width:"1rem",stroke:"dark-full"}}),se.t("common:html")]}),D&&c.jsx(Ht,{})]})]}),$&&c.jsx("img",{style:{position:"absolute",width:"135px",right:"0",top:"18px"},src:"https://home.playablefactory.app/recommended_badge.png"})]}),M&&c.jsx(xr,{creditConfirmType:Z,handleCopyLink:async()=>{v(!1),p(!1),await le(i,"copy")},download:async()=>{v(!1),p(!1),await le(i,"download")},onClose:()=>{W(!1),p(!1)},getDownloadCount:b}),R&&c.jsx(vA,{onClose:()=>{v(!1),p(!1)},iosLink:g.iosUrl,googleLink:g.googleUrl,buttonType:V,handleCopyLink:async()=>{v(!1),p(!1),await le(i,"copy")},download:async()=>{v(!1),p(!1),await le(i,"download")},typeOfProduct:A,urlType:N}),k&&L.customer==="playableFactoryInternal"&&c.jsx(bA,{onClose:()=>{Q(!1)},handleDownload:j,handleDownloadMolocoTest:ie,downloadingMoloco:G,donwloadintMolocoTest:B,downloadingMolocoHtml:D})]})},Sn=[{id:"22",name:"moloco",imageSrc:"https://home.playablefactory.com/moloco.png"},{id:"44",name:"molocoV2",imageSrc:"https://home.playablefactory.com/molocoV2.png"},{id:"33",name:"web",imageSrc:"https://home.playablefactory.com/files/network_icons/web.png"},{id:"1",name:"unity",imageSrc:"https://home.playablefactory.com/unity.png"},{id:"2",name:"applovin",imageSrc:"https://home.playablefactory.com/applovin.png"},{id:"3",name:"ironsource",imageSrc:"https://home.playablefactory.com/ironsource.png"},{id:"4",name:"vungle",imageSrc:"https://home.playablefactory.com/vungle.png"},{id:"5",name:"mobvista",imageSrc:"https://home.playablefactory.com/mobvista.png"},{id:"6",name:"fb",imageSrc:"https://home.playablefactory.com/fb.png"},{id:"7",name:"toutiao",imageSrc:"https://home.playablefactory.com/toutiao.png"},{id:"8",name:"toutiao_cn",imageSrc:"https://home.playablefactory.com/toutiao_cn.png"},{id:"9",name:"adcolony",imageSrc:"https://home.playablefactory.com/adcolony.png"},{id:"10",name:"criteo",imageSrc:"https://home.playablefactory.com/criteo.png"},{id:"11",name:"chartboost",imageSrc:"https://home.playablefactory.com/chartboost.png"},{id:"12",name:"kayzen",imageSrc:"https://home.playablefactory.com/kayzen.png"},{id:"13",name:"crossinstall",imageSrc:"https://home.playablefactory.com/crossinstall.png"},{id:"14",name:"default",imageSrc:"https://home.playablefactory.com/default.png"},{id:"15",name:"fyber",imageSrc:"https://home.playablefactory.com/fyber.png"},{id:"16",name:"appreciate",imageSrc:"https://home.playablefactory.com/appreciate.png"},{id:"17",name:"google360",imageSrc:"https://home.playablefactory.com/google360.png"},{id:"18",name:"kaden",imageSrc:"https://home.playablefactory.com/kaden.png"},{id:"19",name:"kidoz",imageSrc:"https://home.playablefactory.com/kidoz.png"},{id:"20",name:"lifestreet",imageSrc:"https://home.playablefactory.com/lifestreet.png"},{id:"21",name:"liftoff",imageSrc:"https://home.playablefactory.com/liftoff.png"},{id:"23",name:"nucleo",imageSrc:"https://home.playablefactory.com/nucleo.png"},{id:"24",name:"oceanengine",imageSrc:"https://home.playablefactory.com/oceanengine.png"},{id:"25",name:"pointblank",imageSrc:"https://home.playablefactory.com/pointblank.png"},{id:"26",name:"snapchat",imageSrc:"https://home.playablefactory.com/snapchat.png"},{id:"27",name:"tapjoy",imageSrc:"https://home.playablefactory.com/tapjoy.png"},{id:"28",name:"tencent",imageSrc:"https://home.playablefactory.com/tencent.png"},{id:"31",name:"aarki",imageSrc:"https://home.playablefactory.com/aarki.png"},{id:"32",name:"yandex",imageSrc:"https://home.playablefactory.com/yandex.png"},{id:"34",name:"zucks",imageSrc:"https://home.playablefactory.com/zucks.png"},{id:"35",name:"google",imageSrc:"https://home.playablefactory.com/google.png"},{id:"36",name:"inmobi",imageSrc:"https://home.playablefactory.com/inmobi.png"},{id:"38",name:"smadex",imageSrc:"https://home.playablefactory.com/smadex.png"},{id:"39",name:"instantGame",imageSrc:"https://home.playablefactory.com/instantGame.png"},{id:"40",name:"luna",imageSrc:"https://home.playablefactory.com/luna.png"},{id:"41",name:"nend",imageSrc:"https://home.playablefactory.com/nend.png"},{id:"42",name:"jammp",imageSrc:"https://home.playablefactory.com/nend.png"},{id:"43",name:"adjoe",imageSrc:"https://home.playablefactory.com/adjoe.png"},{id:"45",name:"adikteev",imageSrc:"https://home.playablefactory.com/adikteev.png"},{id:"46",name:"appier",imageSrc:"https://home.playablefactory.com/appier.png"},{id:"47",name:"remerge",imageSrc:"https://home.playablefactory.com/remerge.png"},{id:"48",name:"persona",imageSrc:"https://home.playablefactory.com/persona.png"},{id:"49",name:"bidease",imageSrc:"https://home.playablefactory.com/bidease.png"},{id:"50",name:"mraid",imageSrc:"https://home.playablefactory.com/mraid.png"},{id:"51",name:"zynga",imageSrc:"https://home.playablefactory.com/zynga.png"},{id:"52",name:"youappi",imageSrc:"https://home.playablefactory.com/youappi.png"},{id:"52",name:"revx",imageSrc:"https://home.playablefactory.com/revx.png"},{id:"53",name:"cdn",imageSrc:"https://home.playablefactory.com/cdn.png"}],xA=({children:e,typeOfProduct:t,className:n,onClick:r})=>{const i={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"0.5rem",width:"12rem",height:"2.5rem",backgroundColor:Ce[t],color:"white",fontSize:"0.875rem",borderRadius:"0.875rem"};return c.jsx("button",{onClick:r,className:n,style:i,children:e})},wA=({networksVersionTotalSize:e,typeOfProduct:t,onClickMultiDownload:n,multiDownloading:r})=>c.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"8px"},children:r?c.jsx("div",{style:{display:"flex",width:"12rem",height:"2.5rem",borderRadius:"0.875rem",alignItems:"center",justifyContent:"center",backgroundColor:Ce[t]},children:c.jsx(Ht,{})}):c.jsx(xA,{typeOfProduct:t,onClick:n,children:c.jsx("span",{style:{fontSize:"1.25rem",padding:"0.5rem",color:"#fff"},children:"Download All"})})}),xo=({title:e,titleId:t})=>c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),c.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]}),IA=({onClose:e,cdnUrl:t,generateCDN:n,cdnUploading:r})=>c.jsxs("div",{style:{position:"fixed",top:0,left:0,zIndex:50,display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.2)"},onClick:e,children:[c.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),c.jsx("div",{style:{position:"absolute",zIndex:50,display:"flex",flexDirection:"column",gap:"5px",minWidth:"500px",maxWidth:"728px",width:"90%",minHeight:"150px",borderRadius:"10px",backgroundColor:"white",padding:"40px 30px 50px",pointerEvents:"auto"},onClick:i=>{i.stopPropagation()},children:c.jsxs("div",{style:{display:"flex",gap:"5px",flexDirection:"column"},children:[c.jsxs("p",{style:{fontSize:"1.1rem",fontWeight:500,textAlign:"left",marginBottom:"10px",color:"#00a3ff",textDecoration:"underline",cursor:"pointer",width:"150px",display:"flex",gap:"10px",alignItems:"center",height:"28px"},onClick:()=>{r||n()},children:["Update Link",r&&c.jsx("img",{width:"30px",src:He,alt:"pf-logo-gif"})]}),c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f6f6f6",height:"60px",color:"#737373"},children:[c.jsx("div",{style:{width:"66px",height:"100%",borderRight:"1px solid #e1e1e1",display:"flex",justifyContent:"center",alignItems:"center",flexShrink:0},children:c.jsx(xo,{})}),c.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",position:"relative",maxWidth:"68%"},children:c.jsx("a",{style:{textAlign:"center",overflow:"hidden",textOverflow:"ellipsis"},href:t,target:"_blank",children:t||"No CDN link generated"})}),c.jsx("button",{onClick:()=>{if(!t)return;qt(t)&<(se.t("common:link_copied"))},style:{cursor:"pointer",borderRadius:"0.375rem",backgroundColor:t?"darkorange":"lightgray",color:"white",transition:"all 0.15s ease-linear",width:"100px",height:"46px",marginRight:"10px",flexShrink:0},children:"Copy"})]})]})})]});let SA=0;function wo(e,t){const n=`atom${++SA}`,r={toString(){return n}};return typeof e=="function"?r.read=e:(r.init=e,r.read=LA,r.write=KA),t&&(r.write=t),r}function LA(e){return e(this)}function KA(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}const Io=(e,t)=>e.unstable_is?e.unstable_is(t):t===e,So=e=>"init"in e,Lo=e=>!!e.write,Pt=Symbol(""),wr="pending",OA="fulfilled",MA="rejected",EA=e=>typeof e=="object"&&e!==null&&Pt in e,Ln=new WeakMap,kA=(e,t,n)=>{if(!Ln.has(e)){let r;const i=new Promise((o,a)=>{let s=e;const A=l=>d=>{s===l&&(i.status=OA,i.value=d,o(d),n())},u=l=>d=>{s===l&&(i.status=MA,i.reason=d,a(d),n())};e.then(A(e),u(e)),r=(l,d)=>{l&&(Ln.set(l,i),s=l,l.then(A(l),u(l)),t(),t=d)}});i.status=wr,i[Pt]=r,Ln.set(e,i)}return Ln.get(e)},WA=e=>typeof(e==null?void 0:e.then)=="function",Ko=e=>"v"in e||"e"in e,Kn=e=>{if("e"in e)throw e.e;return e.v},On=e=>{const t=e.v;return EA(t)&&t.status===wr?t:null},Oo=(e,t,n)=>{n.p.has(e)||(n.p.add(e),t.then(()=>{n.p.delete(e)},()=>{n.p.delete(e)}))},Xt=()=>[new Map,new Map,new Set],Mo=(e,t,n)=>{e[0].has(t)||e[0].set(t,new Set),e[1].set(t,n)},jA=(e,t,n)=>{const r=e[0].get(t);r&&r.add(n)},zA=(e,t)=>e[0].get(t),Eo=(e,t)=>{e[2].add(t)},vt=e=>{for(;e[1].size||e[2].size;){e[0].clear();const t=new Set(e[1].values());e[1].clear();const n=new Set(e[2]);e[2].clear(),t.forEach(r=>{var i;return(i=r.m)==null?void 0:i.l.forEach(o=>o())}),n.forEach(r=>r())}},YA=()=>{const e=new WeakMap;let t;const n=p=>{let h=e.get(p);return h||(h={d:new Map,p:new Set,n:0},e.set(p,h)),h},r=(p,h,b,C=()=>{},L=()=>{})=>{const I="v"in h,q=h.v,N=On(h);if(WA(b))if(N)N!==b&&(N[Pt](b,C),++h.n);else{const Y=kA(b,C,L);if(Y.status===wr)for(const E of h.d.keys()){const X=n(E);Oo(p,Y,X)}h.v=Y,delete h.e}else N&&N[Pt](Promise.resolve(b),C),h.v=b,delete h.e;(!I||!Object.is(q,h.v))&&++h.n},i=(p,h,b,C)=>{var L;const I=n(h);I.d.set(b,C.n);const q=On(I);q&&Oo(h,q,C),(L=C.m)==null||L.t.add(h),p&&jA(p,b,h)},o=(p,h,b)=>{const C=n(h);if(!(b!=null&&b(h))&&Ko(C)&&(C.m||Array.from(C.d).every(([E,X])=>o(p,E,b).n===X)))return C;C.d.clear();let L=!0;const I=E=>{if(Io(h,E)){const H=n(E);if(!Ko(H))if(So(E))r(E,H,E.init);else throw new Error("no atom init");return Kn(H)}const X=o(p,E,b);if(L)i(p,h,E,X);else{const H=Xt();i(H,h,E,X),l(H,h,C),vt(H)}return Kn(X)};let q,N;const Y={get signal(){return q||(q=new AbortController),q.signal},get setSelf(){return!N&&Lo(h)&&(N=(...E)=>{if(!L)return u(h,...E)}),N}};try{const E=h.read(I,Y);return r(h,C,E,()=>q==null?void 0:q.abort(),()=>{if(C.m){const X=Xt();l(X,h,C),vt(X)}}),C}catch(E){return delete C.v,C.e=E,++C.n,C}finally{L=!1}},a=p=>Kn(o(void 0,p)),s=(p,h)=>{const b=Y=>{var E,X;const H=n(Y),ne=new Set((E=H.m)==null?void 0:E.t);for(const V of H.p)ne.add(V);return(X=zA(p,Y))==null||X.forEach(V=>{ne.add(V)}),ne},C=[],L=new Set,I=Y=>{if(!L.has(Y)){L.add(Y);for(const E of b(Y))Y!==E&&I(E);C.push(Y)}};I(h);const q=new Set([h]),N=Y=>L.has(Y);for(let Y=C.length-1;Y>=0;--Y){const E=C[Y],X=n(E),H=X.n;let ne=!1;for(const V of X.d.keys())if(V!==E&&q.has(V)){ne=!0;break}ne&&(o(p,E,N),l(p,E,X),H!==X.n&&(Mo(p,E,X),q.add(E))),L.delete(E)}},A=(p,h,...b)=>{const C=q=>Kn(o(p,q)),L=(q,...N)=>{let Y;if(Io(h,q)){if(!So(q))throw new Error("atom not writable");const E=n(q),X="v"in E,H=E.v,ne=N[0];r(q,E,ne),l(p,q,E),(!X||!Object.is(H,E.v))&&(Mo(p,q,E),s(p,q))}else Y=A(p,q,...N);return vt(p),Y};return h.write(C,L,...b)},u=(p,...h)=>{const b=Xt(),C=A(b,p,...h);return vt(b),C},l=(p,h,b)=>{if(b.m&&!On(b)){for(const C of b.d.keys())b.m.d.has(C)||(d(p,C).t.add(h),b.m.d.add(C));for(const C of b.m.d||[])if(!b.d.has(C)){b.m.d.delete(C);const L=m(p,C);L==null||L.t.delete(h)}}},d=(p,h)=>{const b=n(h);if(!b.m){o(p,h);for(const C of b.d.keys())d(p,C).t.add(h);if(b.m={l:new Set,d:new Set(b.d.keys()),t:new Set},Lo(h)&&h.onMount){const C=b.m,{onMount:L}=h;Eo(p,()=>{const I=L((...q)=>A(p,h,...q));I&&(C.u=I)})}}return b.m},m=(p,h)=>{const b=n(h);if(b.m&&!b.m.l.size&&!Array.from(b.m.t).some(C=>{var L;return(L=n(C).m)==null?void 0:L.d.has(h)})){const C=b.m.u;C&&Eo(p,C),delete b.m;for(const I of b.d.keys()){const q=m(p,I);q==null||q.t.delete(h)}const L=On(b);L&&L[Pt](void 0,()=>{});return}return b.m};return{get:a,set:u,sub:(p,h)=>{const b=Xt(),C=d(b,p);vt(b);const L=C.l;return L.add(h),()=>{L.delete(h);const I=Xt();m(I,p),vt(I)}}}};let Ir;const NA=()=>(Ir||(Ir=YA()),Ir),RA=x.createContext(void 0),ko=e=>{const t=x.useContext(RA);return(e==null?void 0:e.store)||t||NA()},JA=e=>typeof(e==null?void 0:e.then)=="function",DA=x.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)});function TA(e,t){const n=ko(t),[[r,i,o],a]=x.useReducer(u=>{const l=n.get(e);return Object.is(u[0],l)&&u[1]===n&&u[2]===e?u:[l,n,e]},void 0,()=>[n.get(e),n,e]);let s=r;(i!==n||o!==e)&&(a(),s=n.get(e));const A=t==null?void 0:t.delay;return x.useEffect(()=>{const u=n.sub(e,()=>{if(typeof A=="number"){setTimeout(a,A);return}a()});return a(),u},[n,e,A]),x.useDebugValue(s),JA(s)?DA(s):s}function GA(e,t){const n=ko(t);return x.useCallback((...i)=>n.set(e,...i),[n,e])}function Mn(e,t){return[TA(e,t),GA(e,t)]}const Wo=wo(""),jo=wo(!1),HA=({onClose:e,url:t})=>c.jsxs("div",{style:{position:"fixed",top:0,left:0,zIndex:50,display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.2)"},onClick:e,children:[c.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),c.jsx("div",{style:{position:"absolute",zIndex:50,display:"flex",flexDirection:"column",gap:"5px",minWidth:"500px",maxWidth:"728px",width:"90%",minHeight:"150px",borderRadius:"10px",backgroundColor:"white",padding:"40px 30px 50px",pointerEvents:"auto"},onClick:n=>{n.stopPropagation()},children:c.jsx("div",{style:{display:"flex",gap:"5px",flexDirection:"column"},children:c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f6f6f6",height:"60px",color:"#737373"},children:[c.jsx("div",{style:{width:"66px",height:"100%",borderRight:"1px solid #e1e1e1",display:"flex",justifyContent:"center",alignItems:"center",flexShrink:0},children:c.jsx(xo,{})}),c.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",position:"relative",maxWidth:"68%"},children:c.jsx("a",{style:{textAlign:"center",overflow:"hidden",textOverflow:"ellipsis"},href:t,target:"_blank",children:t||c.jsx("img",{width:"30px",src:He,alt:"pf-logo-gif"})})}),c.jsx("button",{onClick:()=>{if(!t)return;qt(t)&<(se.t("common:link_copied"))},style:{cursor:"pointer",borderRadius:"0.375rem",backgroundColor:t?"darkorange":"lightgray",color:"white",transition:"all 0.15s ease-linear",width:"100px",height:"46px",marginRight:"10px",flexShrink:0},children:"Copy"})]})})})]}),PA=({playable:e,creditDownload:t,visible:n,versionId:r,typeOfProduct:i,api:o,user:a,handleDownloadError:s,fetchFileUrl:A,urls:u,game:l,getDownloadCount:d,disabled:m,setSafariCopyLink:g,isTest:y,urlType:p,allNetworksSelected:h,cdnModal:b,setCdnModal:C,cdnUrl:L,setCdnUrl:I})=>{const[q,N]=x.useState([]),[Y,E]=x.useState([]),[X,H]=x.useState(!1),[ne,V]=x.useState(""),[ae,M]=x.useState(!1),[W,R]=x.useState(!1),[v,k]=x.useState("download"),[Q,Z]=x.useState(!1),[K,G]=x.useState(!1),[J,D]=x.useState(!1),[U,B]=Mn(Wo),[P,F]=Mn(jo),re=async(ie=!1)=>{ie&&L||J||(D(!0),Gt(r,"cdn",u,null,!1,{}).then($=>{I($.url),D(!1)}).catch($=>{s($.message,$),D(!1)}))},S=async ie=>{const $=[...q];if(q.includes(ie)){const T=$.findIndex(oe=>oe===ie);$.splice(T,1),N($)}else $.push(ie),N([...q,ie]);Sn.filter(T=>[...$].includes(T.id)).map(T=>T.name)},le=async()=>new Promise(async(ie,$)=>{const T=Sn.filter(oe=>[...q].includes(oe.id)).map(oe=>oe.name);M(!0),aA(r,u,T,{urlType:p}).then(oe=>{M(!1),ie(oe)}).catch(oe=>{console.log("get multi download err"),M(!1),s(oe.message,oe),$(oe)})}),j=async()=>{u.iosUrl,u.googleUrl,t&&t.willSpendCredit?(R(!0),k("download"),Z(!0)):(Z(!1),await le())};return x.useEffect(()=>{const ie=Sn.filter($=>{var T;return t&&((T=t==null?void 0:t.networks)==null?void 0:T.length)>0?t==null?void 0:t.networks.includes($.name):i==="Import"?e==null?void 0:e.networks.filter(oe=>oe.status==="paid").some(oe=>oe.name===$.name):(e==null?void 0:e.networks.includes($.name))||(l==null?void 0:l.networks.includes($.name))}).filter($=>$.name==="voodoo"?a.customer==="customer:20":!0).map($=>$.id);N(h?ie:[])},[h]),c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{position:"relative",flex:1,overflowY:W?"hidden":"auto",padding:"1.5rem",paddingTop:"0"},children:c.jsx("div",{style:{display:"grid",gridTemplateColumns:"180px 180px 180px",gap:"1rem",overflowY:"auto",padding:"0.75rem"},children:n&&Sn.filter(ie=>{var $;return t&&(($=t==null?void 0:t.networks)==null?void 0:$.length)>0?t==null?void 0:t.networks.includes(ie.name):i==="Import"?e==null?void 0:e.networks.filter(T=>T.status==="paid").some(T=>T.name===ie.name):(e==null?void 0:e.networks.includes(ie.name))||(l==null?void 0:l.networks.includes(ie.name))}).filter(ie=>ie.name==="voodoo"?a.customer==="customer:20":!0).map(ie=>{let $=ie.imageSrc;if(ie.name==="web"){let T="web_"+i.toLowerCase()+".png";$=$.replace("web.png",T)}return c.jsx(ZA,{id:ie.id,name:ie.name,imageUrl:$,selected:q.includes(ie.id),handleCardClick:S,networkVersionSize:Y,fileSizeLoading:X,showCheckBox:!0,typeOfProduct:i,versionId:r,api:o,handleDownloadError:s,fetchFileUrl:A,urls:u,game:l,creditDownload:t,setIsConfirmActive:R,getDownloadCount:d,disabled:m,user:a,setSafariCopyLink:g,isTest:y,urlType:p,setCdnModal:C,generateCDN:re,cdnUrl:L},ie.id)})})}),q.length>1&&(i==="Playable"||i==="Ready"||i==="Flex")&&c.jsx("div",{style:{position:"fixed",bottom:"0",left:"65%",zIndex:20,transform:"translateX(-50%)",display:"flex",flexDirection:"column",paddingTop:"5px"},children:c.jsx(wA,{onClickMultiDownload:j,networksVersionTotalSize:ne,typeOfProduct:i,multiDownloading:ae})}),b&&c.jsx(IA,{onClose:()=>{C(!1),d()},versionId:r,urls:u,handleDownloadError:s,cdnUrl:L,setCdnUrl:I,generateCDN:async()=>{if(!J){if(a.customer==="playableFactoryInternal"){re();return}G(!0)}},cdnUploading:J}),P&&c.jsx(HA,{onClose:()=>{F(!1)},url:U}),K&&c.jsx(xr,{width:"100%",height:"100%",creditConfirmType:v,handleCopyLink:async()=>{},download:async()=>{Z(!1),G(!1),re()},onClose:()=>{Z(!1),G(!1),D(!1)},getDownloadCount:d}),Q&&c.jsx(xr,{creditConfirmType:v,handleCopyLink:async()=>{},download:async()=>{Z(!1),R(!1),await le()},onClose:()=>{Z(!1),R(!1)},getDownloadCount:d})]})};async function XA(e,t){return(await ge.post(t+"/getFlexDownloadCount",e)).data}async function VA(e,t){try{return(await ge.post(t+"/findGame",{_id:e})).data}catch{}}async function QA(e,t){return(await ge.post(t+"/getPlayableVersionMarketLink",{_id:e})).data}async function BA(e,t){return(await ge.post(t+"/getFlexData",{_id:e})).data}async function UA(e,t){return(await ge.post(t+"/getImportedPlayable",{id:e})).data}async function FA(e,t){return(await ge.post(t+"/getReadyDownloadCount",e)).data}const _A=["adcolony","ironsource","applovin","unity","mobvista","criteo","kayzen","vungle","moloco","inmobi"],Sr=["web","adcolony","applovin","chartboost","crossinstall","fb","google","google360","ironsource","lifestreet","liftoff","mobvista","nucleo","tapjoy","toutiao","unity","vungle","moloco","cdn"];let zo=null;const $A=({playableId:e,versionId:t,gameId:n,typeOfProduct:r,visible:i,api:o,user:a,title:s,handleDownloadError:A,fetchFileUrl:u,fileSize:l,setFileSize:d,setSafariCopyLink:m,iosLink:g,androidLink:y,setIosLink:p,setAndroidLink:h,urlType:b,setUrlType:C})=>{const[L,I]=x.useState(null),[q,N]=x.useState(null),[Y,E]=x.useState(null),[X,H]=x.useState(!1),[ne,V]=x.useState(!0),[ae,M]=x.useState(window.innerWidth),[W,R]=x.useState(!1),[v,k]=x.useState(!1),[Q,Z]=x.useState("");Mn(Wo),Mn(jo),x.useEffect(()=>{!Q&&r!=="Fusion"&&lA(t).then(S=>{S!=null&&S.exist&&Z(S.uploadPath)})},[Q]),console.log("download modal version: 6.0.45");const[K,G]=x.useState(!1);x.useEffect(()=>{},[K]),x.useEffect(()=>{const S=()=>{M(window.innerWidth)};return window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S)}},[]);const J=async()=>{H(!0);const S=await br(e,o);return S!=null&&S.networks||(S.networks=_A),I(S),S},D=(S,le)=>{clearTimeout(zo),zo=setTimeout(()=>{vr(t,{iosUrl:S,googleUrl:le},{urlType:b})},1e3)},U=S=>{p(S),D(S,y)},B=S=>{h(S),D(g,S)},P=async(S,le)=>{var j,ie;try{let $;if(r==="Playable"||r==="Ready"){const T=await QA(t,o);if(T){p(T.iosLink),h(T.androidLink),H(!1);return}if(S&&(S.iosUrl||S.googleUrl)){p(S.iosUrl),h(S.googleUrl),H(!1);return}if(le&&le.html){const oe=`${u}/${le.html}?t=${Date.now()}`;let ye=await fetch(oe).then(Ue=>Ue.text());const wt=((j=ye.match(/var\s+iosLink\s*=\s*['|"](https?[\w\d;,/?:@&=+$\-_.!~*'()#]+)['|"]/))==null?void 0:j.at(1))||"";p(wt);const it=((ie=ye.match(/var\s+androidLink\s*=\s*['|"](https?[\w\d;,/?:@&=+$\-_.!~*'()#]+)['|"]/))==null?void 0:ie.at(1))||"";h(it),H(!1)}else h(""),p(""),H(!1)}else if(r==="Flex"){const T=await BA(t,o);if(T.googleUrl||T.iosUrl){h(T.googleUrl),p(T.iosUrl),H(!1);return}S&&(S.iosUrl||S.googleUrl)?(p(S.iosUrl),h(S.googleUrl),H(!1)):(h(""),p(""),H(!1))}else r==="Fusion"&&(S&&(S.iosUrl||S.googleUrl)?(p(S.iosUrl),h(S.googleUrl),H(!1)):(h(""),p(""),H(!1)))}catch($){A($.response.data.error.msg)}},F=async()=>{H(!0);let S;r==="Flex"?S=await XA({_id:t},o):r==="Ready"&&(S=await FA({_id:t},o)),S&&(["admin","pm","tester","sales"].includes(a.role)?E({...S,networks:Sr}):r==="Ready"&&!S.canDownload?E({...S,networks:Sr}):E(S)),H(!1)},re=async()=>await VA(n,o);return x.useEffect(()=>{i||(I(null),N(null),E(null),d(null)),i&&(r==="Playable"?(J().then(S=>{P(null,S)}),V(!1)):r==="Ready"?F().then(S=>{J().then(le=>{P(null,le),V(!1)})}):r==="Flex"?F().then(S=>{V(!1),re().then(le=>{i&&(P(le,null),V(!1),N(le))})}):r==="Import"?UA(t,o).then(S=>{I(S),p(S.iosUrl||""),h(S.googleUrl||""),H(!1),V(!1)}):r==="Fusion"&&(V(!1),re().then(S=>{i&&(P(S,null),V(!1),S.networks=Sr.filter(le=>le!=="cdn"),N(S))})))},[n,e,t,i]),c.jsxs("div",{style:{display:"flex",height:ae>1440?"700px":"650px",width:ae>1440?"675px":"680px",flexDirection:"column",borderRadius:"rounded",backgroundColor:"#F7F7F8",paddingTop:"0px"},children:[c.jsx(yA,{title:s,typeOfProduct:r,fileSize:l,urls:{iosUrl:g,googleUrl:y},handleIosChange:U,handleGoogleChange:B,disabled:ne,api:o,creditDownload:Y,user:a,isTest:W,setIsTest:R,urlType:b,setUrlType:C,allNetworksSelected:K,setAllNetworksSelected:G}),X?c.jsx("div",{style:{height:"100%",width:"100%",display:"flex",justifyContent:"center"},children:c.jsx(Ht,{isNetworksLoading:!0})}):(L||Y||r==="Fusion")&&(r==="Flex"?q:!0)&&!X&&g!=="Loading..."&&y!=="Loading..."&&c.jsx(PA,{playable:L,creditDownload:Y,visible:i,versionId:t,typeOfProduct:r,api:o,user:a,handleDownloadError:A,fetchFileUrl:u,urls:{iosUrl:g,googleUrl:y},game:q,getDownloadCount:F,disabled:ne,setSafariCopyLink:m,isTest:W,urlType:b,allNetworksSelected:K,cdnModal:v,setCdnModal:k,cdnUrl:Q,setCdnUrl:Z})]})},bd="";var Lr={exports:{}},At={},Kr={exports:{}},Ne={},Or={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;/*!
|
|
51
51
|
* Adapted from jQuery UI core
|
|
52
52
|
*
|
|
53
53
|
* http://jqueryui.com
|