gearboxdownloadmodal 6.0.49 → 6.0.50

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(b),null," "));var O=ae(H,x,N,B,P+"."+x
47
47
  `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&fA[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},qo=Symbol("internals");function Mt(e){return e&&String(e).trim().toLowerCase()}function en(e){return e===!1||e==null?e:w.isArray(e)?e.map(en):String(e)}function gA(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 qA=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Nn(e,t,n,r,o){if(w.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!w.isString(t)){if(w.isString(r))return t.indexOf(r)!==-1;if(w.isRegExp(r))return r.test(t)}}function yA(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function vA(e,t){const n=w.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class tn{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(A,d,u){const s=Mt(d);if(!s)throw new Error("header name must be a non-empty string");const p=w.findKey(o,s);(!p||o[p]===void 0||u===!0||u===void 0&&o[p]!==!1)&&(o[p||d]=en(A))}const a=(A,d)=>w.forEach(A,(u,s)=>i(u,s,d));return w.isPlainObject(t)||t instanceof this.constructor?a(t,n):w.isString(t)&&(t=t.trim())&&!qA(t)?a(hA(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=Mt(t),t){const r=w.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return gA(o);if(w.isFunction(n))return n.call(this,o,r);if(w.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Mt(t),t){const r=w.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Nn(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=Mt(a),a){const A=w.findKey(r,a);A&&(!n||Nn(r,r[A],A,n))&&(delete r[A],o=!0)}}return w.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||Nn(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return w.forEach(this,(o,i)=>{const a=w.findKey(r,i);if(a){n[a]=en(o),delete n[i];return}const A=t?yA(i):String(i).trim();A!==i&&delete n[i],n[A]=en(o),r[A]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return w.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=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(o=>r.set(o)),r}static accessor(t){const r=(this[qo]=this[qo]={accessors:{}}).accessors,o=this.prototype;function i(a){const A=Mt(a);r[A]||(vA(o,a),r[A]=!0)}return w.isArray(t)?t.forEach(i):i(t),this}}tn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),w.reduceDescriptors(tn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),w.freezeMethods(tn);const Qe=tn;function Dn(e,t){const n=this||Jn,r=t||n,o=Qe.from(r.headers);let i=r.data;return w.forEach(e,function(A){i=A.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function yo(e){return!!(e&&e.__CANCEL__)}function Wt(e,t,n){se.call(this,e??"canceled",se.ERR_CANCELED,t,n),this.name="CanceledError"}w.inherits(Wt,se,{__CANCEL__:!0});function bA(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new se("Request failed with status code "+n.status,[se.ERR_BAD_REQUEST,se.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const CA=He.isStandardBrowserEnv?function(){return{write:function(n,r,o,i,a,A){const d=[];d.push(n+"="+encodeURIComponent(r)),w.isNumber(o)&&d.push("expires="+new Date(o).toGMTString()),w.isString(i)&&d.push("path="+i),w.isString(a)&&d.push("domain="+a),A===!0&&d.push("secure"),document.cookie=d.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 ZA(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function IA(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function vo(e,t){return e&&!ZA(t)?IA(e,t):t}const wA=He.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let a=i;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=o(window.location.href),function(a){const A=w.isString(a)?o(a):a;return A.protocol===r.protocol&&A.host===r.host}}():function(){return function(){return!0}}();function xA(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function KA(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(d){const u=Date.now(),s=r[i];a||(a=u),n[o]=d,r[o]=u;let p=i,Z=0;for(;p!==o;)Z+=n[p++],p=p%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-a<t)return;const v=s&&u-s;return v?Math.round(Z*1e3/v):void 0}}function bo(e,t){let n=0;const r=KA(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,A=i-n,d=r(A),u=i<=a;n=i;const s={loaded:i,total:a,progress:a?i/a:void 0,bytes:A,rate:d||void 0,estimated:d&&a&&u?(a-i)/d:void 0,event:o};s[t?"download":"upload"]=!0,e(s)}}const Rn={http:tA,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let o=e.data;const i=Qe.from(e.headers).normalize(),a=e.responseType;let A;function d(){e.cancelToken&&e.cancelToken.unsubscribe(A),e.signal&&e.signal.removeEventListener("abort",A)}let u;w.isFormData(o)&&(He.isStandardBrowserEnv||He.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.getContentType(/^\s*multipart\/form-data/)?w.isString(u=i.getContentType())&&i.setContentType(u.replace(/^\s*(multipart\/form-data);+/,"$1")):i.setContentType("multipart/form-data"));let s=new XMLHttpRequest;if(e.auth){const q=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(q+":"+m))}const p=vo(e.baseURL,e.url);s.open(e.method.toUpperCase(),po(p,e.params,e.paramsSerializer),!0),s.timeout=e.timeout;function Z(){if(!s)return;const q=Qe.from("getAllResponseHeaders"in s&&s.getAllResponseHeaders()),f={data:!a||a==="text"||a==="json"?s.responseText:s.response,status:s.status,statusText:s.statusText,headers:q,config:e,request:s};bA(function(I){n(I),d()},function(I){r(I),d()},f),s=null}if("onloadend"in s?s.onloadend=Z:s.onreadystatechange=function(){!s||s.readyState!==4||s.status===0&&!(s.responseURL&&s.responseURL.indexOf("file:")===0)||setTimeout(Z)},s.onabort=function(){s&&(r(new se("Request aborted",se.ECONNABORTED,e,s)),s=null)},s.onerror=function(){r(new se("Network Error",se.ERR_NETWORK,e,s)),s=null},s.ontimeout=function(){let m=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const f=e.transitional||ho;e.timeoutErrorMessage&&(m=e.timeoutErrorMessage),r(new se(m,f.clarifyTimeoutError?se.ETIMEDOUT:se.ECONNABORTED,e,s)),s=null},He.isStandardBrowserEnv){const q=wA(p)&&e.xsrfCookieName&&CA.read(e.xsrfCookieName);q&&i.set(e.xsrfHeaderName,q)}o===void 0&&i.setContentType(null),"setRequestHeader"in s&&w.forEach(i.toJSON(),function(m,f){s.setRequestHeader(f,m)}),w.isUndefined(e.withCredentials)||(s.withCredentials=!!e.withCredentials),a&&a!=="json"&&(s.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&s.addEventListener("progress",bo(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&s.upload&&s.upload.addEventListener("progress",bo(e.onUploadProgress)),(e.cancelToken||e.signal)&&(A=q=>{s&&(r(!q||q.type?new Wt(null,e,s):q),s.abort(),s=null)},e.cancelToken&&e.cancelToken.subscribe(A),e.signal&&(e.signal.aborted?A():e.signal.addEventListener("abort",A)));const v=xA(p);if(v&&He.protocols.indexOf(v)===-1){r(new se("Unsupported protocol "+v+":",se.ERR_BAD_REQUEST,e));return}s.send(o||null)})}};w.forEach(Rn,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Co=e=>`- ${e}`,SA=e=>w.isFunction(e)||e===null||e===!1,Zo={getAdapter:e=>{e=w.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let a;if(r=n,!SA(n)&&(r=Rn[(a=String(n)).toLowerCase()],r===void 0))throw new se(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+i]=r}if(!r){const i=Object.entries(o).map(([A,d])=>`adapter ${A} `+(d===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since :
49
49
  `+i.map(Co).join(`
50
- `):" "+Co(i[0]):"as no adapter specified";throw new se("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Rn};function Gn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Wt(null,e)}function Io(e){return Gn(e),e.headers=Qe.from(e.headers),e.data=Dn.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Zo.getAdapter(e.adapter||Jn.adapter)(e).then(function(r){return Gn(e),r.data=Dn.call(e,e.transformResponse,r),r.headers=Qe.from(r.headers),r},function(r){return yo(r)||(Gn(e),r&&r.response&&(r.response.data=Dn.call(e,e.transformResponse,r.response),r.response.headers=Qe.from(r.response.headers))),Promise.reject(r)})}const wo=e=>e instanceof Qe?e.toJSON():e;function mt(e,t){t=t||{};const n={};function r(u,s,p){return w.isPlainObject(u)&&w.isPlainObject(s)?w.merge.call({caseless:p},u,s):w.isPlainObject(s)?w.merge({},s):w.isArray(s)?s.slice():s}function o(u,s,p){if(w.isUndefined(s)){if(!w.isUndefined(u))return r(void 0,u,p)}else return r(u,s,p)}function i(u,s){if(!w.isUndefined(s))return r(void 0,s)}function a(u,s){if(w.isUndefined(s)){if(!w.isUndefined(u))return r(void 0,u)}else return r(void 0,s)}function A(u,s,p){if(p in t)return r(u,s);if(p in e)return r(void 0,u)}const d={url:i,method:i,data:i,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:A,headers:(u,s)=>o(wo(u),wo(s),!0)};return w.forEach(Object.keys(Object.assign({},e,t)),function(s){const p=d[s]||o,Z=p(e[s],t[s],s);w.isUndefined(Z)&&p!==A||(n[s]=Z)}),n}const xo="1.6.0",Tn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Tn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ko={};Tn.transitional=function(t,n,r){function o(i,a){return"[Axios v"+xo+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,A)=>{if(t===!1)throw new se(o(a," has been removed"+(n?" in "+n:"")),se.ERR_DEPRECATED);return n&&!Ko[a]&&(Ko[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,A):!0}};function MA(e,t,n){if(typeof e!="object")throw new se("options must be an object",se.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const A=e[i],d=A===void 0||a(A,i,e);if(d!==!0)throw new se("option "+i+" must be "+d,se.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new se("Unknown option "+i,se.ERR_BAD_OPTION)}}const Hn={assertOptions:MA,validators:Tn},Fe=Hn.validators;class nn{constructor(t){this.defaults=t,this.interceptors={request:new fo,response:new fo}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=mt(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Hn.assertOptions(r,{silentJSONParsing:Fe.transitional(Fe.boolean),forcedJSONParsing:Fe.transitional(Fe.boolean),clarifyTimeoutError:Fe.transitional(Fe.boolean)},!1),o!=null&&(w.isFunction(o)?n.paramsSerializer={serialize:o}:Hn.assertOptions(o,{encode:Fe.function,serialize:Fe.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&w.merge(i.common,i[n.method]);i&&w.forEach(["delete","get","head","post","put","patch","common"],q=>{delete i[q]}),n.headers=Qe.concat(a,i);const A=[];let d=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(d=d&&m.synchronous,A.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let s,p=0,Z;if(!d){const q=[Io.bind(this),void 0];for(q.unshift.apply(q,A),q.push.apply(q,u),Z=q.length,s=Promise.resolve(n);p<Z;)s=s.then(q[p++],q[p++]);return s}Z=A.length;let v=n;for(p=0;p<Z;){const q=A[p++],m=A[p++];try{v=q(v)}catch(f){m.call(this,f);break}}try{s=Io.call(this,v)}catch(q){return Promise.reject(q)}for(p=0,Z=u.length;p<Z;)s=s.then(u[p++],u[p++]);return s}getUri(t){t=mt(this.defaults,t);const n=vo(t.baseURL,t.url);return po(n,t.params,t.paramsSerializer)}}w.forEach(["delete","get","head","options"],function(t){nn.prototype[t]=function(n,r){return this.request(mt(r||{},{method:t,url:n,data:(r||{}).data}))}}),w.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,A){return this.request(mt(A||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}nn.prototype[t]=n(),nn.prototype[t+"Form"]=n(!0)});const rn=nn;class Xn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(A=>{r.subscribe(A),i=A}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,A){r.reason||(r.reason=new Wt(i,a,A),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 Xn(function(o){t=o}),cancel:t}}}const WA=Xn;function EA(e){return function(n){return e.apply(null,n)}}function LA(e){return w.isObject(e)&&e.isAxiosError===!0}const Qn={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(Qn).forEach(([e,t])=>{Qn[t]=e});const OA=Qn;function So(e){const t=new rn(e),n=Fr(rn.prototype.request,t);return w.extend(n,rn.prototype,t,{allOwnKeys:!0}),w.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return So(mt(e,o))},n}const he=So(Jn);he.Axios=rn,he.CanceledError=Wt,he.CancelToken=WA,he.isCancel=yo,he.VERSION=xo,he.toFormData=$t,he.AxiosError=se,he.Cancel=he.CanceledError,he.all=function(t){return Promise.all(t)},he.spread=EA,he.isAxiosError=LA,he.mergeConfig=mt,he.AxiosHeaders=Qe,he.formToJSON=e=>go(w.isHTMLForm(e)?new FormData(e):e),he.getAdapter=Zo.getAdapter,he.HttpStatusCode=OA,he.default=he;const kA=he;/*! typescript-cookie v1.0.6 | MIT */const Mo=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Wo=e=>encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent),Pn=decodeURIComponent,Vn=e=>(e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent));function jA(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 Eo(e,t,n){const r=/(?:^|; )([^=]*)=([^;]*)/g,o={};let i;for(;(i=r.exec(document.cookie))!=null;)try{const a=n(i[1]);if(o[a]=t(i[2],a),e===a)break}catch{}return e!=null?o[e]:o}const Lo=Object.freeze({decodeName:Pn,decodeValue:Vn,encodeName:Mo,encodeValue:Wo}),Bn=Object.freeze({path:"/"});function Oo(e,t,n=Bn,{encodeValue:r=Wo,encodeName:o=Mo}={}){return document.cookie=`${o(e)}=${r(t,e)}${jA(n)}`}function ko(e,{decodeValue:t=Vn,decodeName:n=Pn}={}){return Eo(e,t,n)}function zA({decodeValue:e=Vn,decodeName:t=Pn}={}){return Eo(void 0,e,t)}function YA(e,t=Bn){Oo(e,"",Object.assign({},t,{expires:-1}))}function Un(e,t){const n={set:function(o,i,a){return Oo(o,i,Object.assign({},this.attributes,a),{encodeValue:this.converter.write})},get:function(o){if(arguments.length===0)return zA(this.converter.read);if(o!=null)return ko(o,this.converter.read)},remove:function(o,i){YA(o,Object.assign({},this.attributes,i))},withAttributes:function(o){return Un(this.converter,Object.assign({},this.attributes,o))},withConverter:function(o){return Un(Object.assign({},this.converter,o),this.attributes)}},r={attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}};return Object.create(n,r)}Un({read:Lo.decodeValue,write:Lo.encodeValue},Bn);let jo;typeof window<"u"&&(jo=ko("token"));const ge=kA.create({headers:{Authorization:jo}});async function JA(e,t,n){return(await ge.post(n+"/createFlexVersionLinkMulti",{_id:e,networks:t})).data}async function NA(e,t){return e.network=="fb"&&(e.zip=1),(await ge.post(t+"/createFlexVersionLink",e||{})).data}async function DA(e,t,n){return(await ge.post(e+"/createImportedVersionLink",{_id:t,network:n})).data}async function RA(e,t,n,r,o){return(await ge.post(e+"/createPlayableVersionLink",{_id:t,network:n,isPfTest:r,extras:o})).data}async function GA(e,t,n){return(await ge.post(n+"/createPlayableVersionLinkMulti",{_id:e,networks:t})).data}async function TA(e,t,n,r,o){return(await ge.post(e+"/createReadyVersionLink",{_id:t,network:n,isPfTest:r,extras:o})).data}async function HA(e,t,n){return(await ge.post(n+"/createReadyVersionLinkMulti",{_id:e,networks:t})).data}async function XA(e,t,n,r,o,i){return(await ge.post(e+"/createFusionVersionLink",{_id:t,network:n,fusionData:r,isPfTest:o,extras:i})).data}async function QA(e,t){return(await ge.post(t+"/getCdnExportName",e||{})).data}async function PA(e,t){return(await ge.post(t+"/updateFlexUrl",e||{})).data}async function zo(e,t,n){return(await ge.post(n+"/updatePlayableVersion",{...t,_id:e})).data}function pt(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 Yo(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=Yo(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function _e(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Yo(e))&&(r&&(r+=" "),r+=t);return r}const Et=e=>typeof e=="number"&&!isNaN(e),nt=e=>typeof e=="string",we=e=>typeof e=="function",on=e=>nt(e)||we(e)?e:null,Fn=e=>C.isValidElement(e)||nt(e)||we(e)||Et(e);function VA(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function an(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:i=300}=e;return function(a){let{children:A,position:d,preventExitTransition:u,done:s,nodeRef:p,isIn:Z}=a;const v=r?`${t}--${d}`:t,q=r?`${n}--${d}`:n,m=C.useRef(0);return C.useLayoutEffect(()=>{const f=p.current,y=v.split(" "),I=M=>{M.target===p.current&&(f.dispatchEvent(new Event("d")),f.removeEventListener("animationend",I),f.removeEventListener("animationcancel",I),m.current===0&&M.type!=="animationcancel"&&f.classList.remove(...y))};f.classList.add(...y),f.addEventListener("animationend",I),f.addEventListener("animationcancel",I)},[]),C.useEffect(()=>{const f=p.current,y=()=>{f.removeEventListener("animationend",y),o?VA(f,s,i):s()};Z||(u?y():(m.current=1,f.className+=` ${q}`,f.addEventListener("animationend",y)))},[Z]),C.createElement(C.Fragment,null,A)}}function Jo(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 Le={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)})}},An=e=>{let{theme:t,type:n,...r}=e;return C.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...r})},_n={info:function(e){return C.createElement(An,{...e},C.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 C.createElement(An,{...e},C.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 C.createElement(An,{...e},C.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 C.createElement(An,{...e},C.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 C.createElement("div",{className:"Toastify__spinner"})}};function BA(e){const[,t]=C.useReducer(v=>v+1,0),[n,r]=C.useState([]),o=C.useRef(null),i=C.useRef(new Map).current,a=v=>n.indexOf(v)!==-1,A=C.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:a,getToast:v=>i.get(v)}).current;function d(v){let{containerId:q}=v;const{limit:m}=A.props;!m||q&&A.containerId!==q||(A.count-=A.queue.length,A.queue=[])}function u(v){r(q=>v==null?[]:q.filter(m=>m!==v))}function s(){const{toastContent:v,toastProps:q,staleId:m}=A.queue.shift();Z(v,q,m)}function p(v,q){let{delay:m,staleId:f,...y}=q;if(!Fn(v)||function(V){return!o.current||A.props.enableMultiContainer&&V.containerId!==A.props.containerId||i.has(V.toastId)&&V.updateId==null}(y))return;const{toastId:I,updateId:M,data:W}=y,{props:g}=A,R=()=>u(I),T=M==null;T&&A.count++;const E={...g,style:g.toastStyle,key:A.toastKey++,...Object.fromEntries(Object.entries(y).filter(V=>{let[oe,L]=V;return L!=null})),toastId:I,updateId:M,data:W,closeToast:R,isIn:!1,className:on(y.className||g.toastClassName),bodyClassName:on(y.bodyClassName||g.bodyClassName),progressClassName:on(y.progressClassName||g.progressClassName),autoClose:!y.isLoading&&(Q=y.autoClose,X=g.autoClose,Q===!1||Et(Q)&&Q>0?Q:X),deleteToast(){const V=Jo(i.get(I),"removed");i.delete(I),Le.emit(4,V);const oe=A.queue.length;if(A.count=I==null?A.count-A.displayedToast:A.count-1,A.count<0&&(A.count=0),oe>0){const L=I==null?A.props.limit:1;if(oe===1||L===1)A.displayedToast++,s();else{const k=L>oe?oe:L;A.displayedToast=k;for(let J=0;J<k;J++)s()}}else t()}};var Q,X;E.iconOut=function(V){let{theme:oe,type:L,isLoading:k,icon:J}=V,h=null;const z={theme:oe,type:L};return J===!1||(we(J)?h=J(z):C.isValidElement(J)?h=C.cloneElement(J,z):nt(J)||Et(J)?h=J:k?h=_n.spinner():(re=>re in _n)(L)&&(h=_n[L](z))),h}(E),we(y.onOpen)&&(E.onOpen=y.onOpen),we(y.onClose)&&(E.onClose=y.onClose),E.closeButton=g.closeButton,y.closeButton===!1||Fn(y.closeButton)?E.closeButton=y.closeButton:y.closeButton===!0&&(E.closeButton=!Fn(g.closeButton)||g.closeButton);let ie=v;C.isValidElement(v)&&!nt(v.type)?ie=C.cloneElement(v,{closeToast:R,toastProps:E,data:W}):we(v)&&(ie=v({closeToast:R,toastProps:E,data:W})),g.limit&&g.limit>0&&A.count>g.limit&&T?A.queue.push({toastContent:ie,toastProps:E,staleId:f}):Et(m)?setTimeout(()=>{Z(ie,E,f)},m):Z(ie,E,f)}function Z(v,q,m){const{toastId:f}=q;m&&i.delete(m);const y={content:v,props:q};i.set(f,y),r(I=>[...I,f].filter(M=>M!==m)),Le.emit(4,Jo(y,y.props.updateId==null?"added":"updated"))}return C.useEffect(()=>(A.containerId=e.containerId,Le.cancelEmit(3).on(0,p).on(1,v=>o.current&&u(v)).on(5,d).emit(2,A),()=>{i.clear(),Le.emit(3,A)}),[]),C.useEffect(()=>{A.props=e,A.isToastActive=a,A.displayedToast=n.length}),{getToastToRender:function(v){const q=new Map,m=Array.from(i.values());return e.newestOnTop&&m.reverse(),m.forEach(f=>{const{position:y}=f.props;q.has(y)||q.set(y,[]),q.get(y).push(f)}),Array.from(q,f=>v(f[0],f[1]))},containerRef:o,isToastActive:a}}function No(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function Do(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function UA(e){const[t,n]=C.useState(!1),[r,o]=C.useState(!1),i=C.useRef(null),a=C.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,A=C.useRef(e),{autoClose:d,pauseOnHover:u,closeToast:s,onClick:p,closeOnClick:Z}=e;function v(W){if(e.draggable){W.nativeEvent.type==="touchstart"&&W.nativeEvent.preventDefault(),a.didMove=!1,document.addEventListener("mousemove",y),document.addEventListener("mouseup",I),document.addEventListener("touchmove",y),document.addEventListener("touchend",I);const g=i.current;a.canCloseOnClick=!0,a.canDrag=!0,a.boundingRect=g.getBoundingClientRect(),g.style.transition="",a.x=No(W.nativeEvent),a.y=Do(W.nativeEvent),e.draggableDirection==="x"?(a.start=a.x,a.removalDistance=g.offsetWidth*(e.draggablePercent/100)):(a.start=a.y,a.removalDistance=g.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function q(W){if(a.boundingRect){const{top:g,bottom:R,left:T,right:E}=a.boundingRect;W.nativeEvent.type!=="touchend"&&e.pauseOnHover&&a.x>=T&&a.x<=E&&a.y>=g&&a.y<=R?f():m()}}function m(){n(!0)}function f(){n(!1)}function y(W){const g=i.current;a.canDrag&&g&&(a.didMove=!0,t&&f(),a.x=No(W),a.y=Do(W),a.delta=e.draggableDirection==="x"?a.x-a.start:a.y-a.start,a.start!==a.x&&(a.canCloseOnClick=!1),g.style.transform=`translate${e.draggableDirection}(${a.delta}px)`,g.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function I(){document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",I),document.removeEventListener("touchmove",y),document.removeEventListener("touchend",I);const W=i.current;if(a.canDrag&&a.didMove&&W){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),void e.closeToast();W.style.transition="transform 0.2s, opacity 0.2s",W.style.transform=`translate${e.draggableDirection}(0)`,W.style.opacity="1"}}C.useEffect(()=>{A.current=e}),C.useEffect(()=>(i.current&&i.current.addEventListener("d",m,{once:!0}),we(e.onOpen)&&e.onOpen(C.isValidElement(e.children)&&e.children.props),()=>{const W=A.current;we(W.onClose)&&W.onClose(C.isValidElement(W.children)&&W.children.props)}),[]),C.useEffect(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||f(),window.addEventListener("focus",m),window.addEventListener("blur",f)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",m),window.removeEventListener("blur",f))}),[e.pauseOnFocusLoss]);const M={onMouseDown:v,onTouchStart:v,onMouseUp:q,onTouchEnd:q};return d&&u&&(M.onMouseEnter=f,M.onMouseLeave=m),Z&&(M.onClick=W=>{p&&p(W),a.canCloseOnClick&&s()}),{playToast:m,pauseToast:f,isRunning:t,preventExitTransition:r,toastRef:i,eventHandlers:M}}function Ro(e){let{closeToast:t,theme:n,ariaLabel:r="close"}=e;return C.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:o=>{o.stopPropagation(),t(o)},"aria-label":r},C.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},C.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 FA(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:i,className:a,style:A,controlledProgress:d,progress:u,rtl:s,isIn:p,theme:Z}=e;const v=i||d&&u===0,q={...A,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused",opacity:v?0:1};d&&(q.transform=`scaleX(${u})`);const m=_e("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${Z}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":s}),f=we(a)?a({rtl:s,type:o,defaultClassName:m}):_e(m,a);return C.createElement("div",{role:"progressbar","aria-hidden":v?"true":"false","aria-label":"notification timer",className:f,style:q,[d&&u>=1?"onTransitionEnd":"onAnimationEnd"]:d&&u<1?null:()=>{p&&r()}})}const _A=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o}=UA(e),{closeButton:i,children:a,autoClose:A,onClick:d,type:u,hideProgressBar:s,closeToast:p,transition:Z,position:v,className:q,style:m,bodyClassName:f,bodyStyle:y,progressClassName:I,progressStyle:M,updateId:W,role:g,progress:R,rtl:T,toastId:E,deleteToast:Q,isIn:X,isLoading:ie,iconOut:V,closeOnClick:oe,theme:L}=e,k=_e("Toastify__toast",`Toastify__toast-theme--${L}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":T},{"Toastify__toast--close-on-click":oe}),J=we(q)?q({rtl:T,position:v,type:u,defaultClassName:k}):_e(k,q),h=!!R||!A,z={closeToast:p,type:u,theme:L};let re=null;return i===!1||(re=we(i)?i(z):C.isValidElement(i)?C.cloneElement(i,z):Ro(z)),C.createElement(Z,{isIn:X,done:Q,position:v,preventExitTransition:n,nodeRef:r},C.createElement("div",{id:E,onClick:d,className:J,...o,style:m,ref:r},C.createElement("div",{...X&&{role:g},className:we(f)?f({type:u}):_e("Toastify__toast-body",f),style:y},V!=null&&C.createElement("div",{className:_e("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!ie})},V),C.createElement("div",null,a)),re,C.createElement(FA,{...W&&!h?{key:`pb-${W}`}:{},rtl:T,theme:L,delay:A,isRunning:t,isIn:X,closeToast:p,hide:s,type:u,style:M,className:I,controlledProgress:h,progress:R||0})))},sn=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},$A=an(sn("bounce",!0));an(sn("slide",!0)),an(sn("zoom")),an(sn("flip"));const $n=C.forwardRef((e,t)=>{const{getToastToRender:n,containerRef:r,isToastActive:o}=BA(e),{className:i,style:a,rtl:A,containerId:d}=e;function u(s){const p=_e("Toastify__toast-container",`Toastify__toast-container--${s}`,{"Toastify__toast-container--rtl":A});return we(i)?i({position:s,rtl:A,defaultClassName:p}):_e(p,on(i))}return C.useEffect(()=>{t&&(t.current=r.current)},[]),C.createElement("div",{ref:r,className:"Toastify",id:d},n((s,p)=>{const Z=p.length?{...a}:{...a,pointerEvents:"none"};return C.createElement("div",{className:u(s),style:Z,key:`container-${s}`},p.map((v,q)=>{let{content:m,props:f}=v;return C.createElement(_A,{...f,isIn:o(f.toastId),style:{...f.style,"--nth":q+1,"--len":p.length},key:`toast-${f.key}`},m)}))}))});$n.displayName="ToastContainer",$n.defaultProps={position:"top-right",transition:$A,autoClose:5e3,closeButton:Ro,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let er,rt=new Map,Lt=[],es=1;function Go(){return""+es++}function ts(e){return e&&(nt(e.toastId)||Et(e.toastId))?e.toastId:Go()}function Ot(e,t){return rt.size>0?Le.emit(0,e,t):Lt.push({content:e,options:t}),t.toastId}function ln(e,t){return{...t,type:t&&t.type||e,toastId:ts(t)}}function un(e){return(t,n)=>Ot(t,ln(e,n))}function pe(e,t){return Ot(e,ln("default",t))}pe.loading=(e,t)=>Ot(e,ln("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),pe.promise=function(e,t,n){let r,{pending:o,error:i,success:a}=t;o&&(r=nt(o)?pe.loading(o,n):pe.loading(o.render,{...n,...o}));const A={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},d=(s,p,Z)=>{if(p==null)return void pe.dismiss(r);const v={type:s,...A,...n,data:Z},q=nt(p)?{render:p}:p;return r?pe.update(r,{...v,...q}):pe(q.render,{...v,...q}),Z},u=we(e)?e():e;return u.then(s=>d("success",a,s)).catch(s=>d("error",i,s)),u},pe.success=un("success"),pe.info=un("info"),pe.error=un("error"),pe.warning=un("warning"),pe.warn=pe.warning,pe.dark=(e,t)=>Ot(e,ln("default",{theme:"dark",...t})),pe.dismiss=e=>{rt.size>0?Le.emit(1,e):Lt=Lt.filter(t=>e!=null&&t.options.toastId!==e)},pe.clearWaitingQueue=function(e){return e===void 0&&(e={}),Le.emit(5,e)},pe.isActive=e=>{let t=!1;return rt.forEach(n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t},pe.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{const n=function(r,o){let{containerId:i}=o;const a=rt.get(i||er);return a&&a.getToast(r)}(e,t);if(n){const{props:r,content:o}=n,i={delay:100,...r,...t,toastId:t.toastId||e,updateId:Go()};i.toastId!==e&&(i.staleId=e);const a=i.render||o;delete i.render,Ot(a,i)}},0)},pe.done=e=>{pe.update(e,{progress:1})},pe.onChange=e=>(Le.on(4,e),()=>{Le.off(4,e)}),pe.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"},pe.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},Le.on(2,e=>{er=e.containerId||e,rt.set(er,e),Lt.forEach(t=>{Le.emit(0,t.content,t.options)}),Lt=[]}).on(3,e=>{rt.delete(e.containerId||e),rt.size===0&&Le.off(0).off(1).off(5)});function ot(e){pe.success(e,{position:"top-center",autoClose:650,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"light"})}let tr="",je="Playable",Ke=null,To=null,Ho;const nr=async(e,t,n)=>{je==="Playable"?t&&t.iosUrl!=="Loading..."&&t.googleUrl!=="Loading..."&&await zo(e,{iosLink:t==null?void 0:t.iosUrl,androidLink:t==null?void 0:t.googleUrl},Ke):je==="Flex"?t&&t.iosUrl!=="Loading..."&&t.googleUrl!=="Loading..."&&await PA({_id:e,iosLink:t==null?void 0:t.iosUrl,androidLink:t==null?void 0:t.googleUrl},Ke):je==="Ready"&&t&&t.iosUrl!=="Loading..."&&t.googleUrl!=="Loading..."&&((n==null?void 0:n.urlType)==="single"&&(t.googleUrl=t.iosUrl),await zo(e,{iosLink:t==null?void 0:t.iosUrl,androidLink:t==null?void 0:t.googleUrl},Ke))},cn=async e=>{let t=tr+"/"+e,n=e;fetch(t).then(r=>r.blob()).then(r=>{const o=window.URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=n.split("/").reduce((a,A)=>A,""),document.body.appendChild(i),i.click(),window.URL.revokeObjectURL(o),ot("Download successfully")}).catch(r=>{console.error("File error:",r)})},ns=(e,t)=>{let n=tr+"/"+e;pt(n)?ot("Link Copied"):t(n)};async function kt(e,t,n,r="download",o=!1,i=null){return new Promise(async(a,A)=>{let d=async u=>{r==="download"?await cn(u):r==="copy"&&ns(u,To)};try{await nr(e,n,i)}catch(u){console.log("updateUrls error",u)}je==="Playable"?RA(Ke,e,t,o,i).then(async u=>{let{url:s}=u;await d(s),a(u)}).catch(u=>{let s=u.response.data.error.msg;A({message:s})}):je==="Flex"?NA({_id:e,network:t,extras:i},Ke).then(async u=>{if(u.message){A(u);return}let{url:s}=u;await d(s),a(u)}).catch(u=>{let s=u.response.data.error.msg;A({message:s})}):je==="Import"?DA(Ke,e,t).then(async u=>{let s=u.url;await d(s),a(u)}).catch(u=>{let s=u.response.data.error.msg;A({message:s})}):je==="Ready"?TA(Ke,e,t,o,i).then(async u=>{if(u.message){A(u);return}let s=u.url;await d(s),a(u)}).catch(u=>{let s=u.response.data.error.msg;A({message:s})}):je==="Fusion"&&XA(Ke,e,t,Ho,o,i).then(async u=>{let s=u.url;await d(s),a(u)}).catch(u=>{let s=u.response.data.error.msg;A({message:s})})})}async function rs(e,t,n,r=null){return new Promise(async(o,i)=>{await nr(e,t,r),je==="Flex"?JA(e,n,Ke).then(async a=>{if(a.message){i(a);return}await cn(a.url),o(a.url)}).catch(a=>{let A=a.response.data.error.msg;i({message:A})}):je==="Ready"?HA(e,n,Ke).then(async a=>{if(a.message){i(a);return}await cn(a.url),o(a.url)}).catch(a=>{console.log("err",a);let A=a.response.data.error.msg;i({message:A})}):GA(e,n,Ke).then(async a=>{await cn(a.url),o(a.url)}).catch(a=>{let A=a.response.data.error.msg;i({message:A})})})}function os(e,t,n,r,o){je=e,Ke=t,To=n,tr=r,Ho=o}async function is(e){try{return await QA({versionId:e,checkExistance:!0},Ke)}catch{return null}}async function rr(e,t){return(await ge.post(t+"/findPlayable",{_id:e})).data}const as=({versionId:e,playableId:t,typeOfProduct:n,api:r,copyLinkUrl:o,setSafariCopyLink:i,qrUrl:a,iosLink:A,androidLink:d,urlType:u})=>{const[s,p]=C.useState(!1),Z=async()=>{p(!0),kt(e,"default",{iosUrl:A,googleUrl:d},null,!1,{urlType:u}).then(async v=>{var y,I,M,W;let q="";if(t&&(n==="Playable"||n==="Ready")){const g=await rr(t,r),R=(I=(y=g==null?void 0:g.data)==null?void 0:y.globalProps)==null?void 0:I.defaultLandscape,T=(W=(M=g==null?void 0:g.data)==null?void 0:M.globalProps)==null?void 0:W.defaultPhoneIndex;R&&(q+="&landscape=true"),T!==void 0&&(q+=`&phoneIndex=${T}`)}rr(t,r),p(!1);let m;n==="Flex"?m=`${o}/preview?versionId=${e}`:n==="Import"?m=`${o}/preview?versionId=${e}_`:n==="Ready"?m=`${o}/preview?versionId=${e}_&ready=true`:m=`${o}/preview?versionId=${e}_`,m+=q,pt(m)?ot("Link copied"):i(m),p(!1)}).catch(v=>{p(!1)})};return l.jsxs("div",{style:{display:"flex",height:"125px",width:"100%",borderRadius:"10px",backgroundColor:"#000000",padding:"10px"},children:[l.jsx("div",{style:{marginRight:"0.75rem",width:"50%",display:"flex",justifyContent:"center",alignItems:"center"},children:a?l.jsx(ba,{bgColor:"#0F0F1E",fgColor:"#ffffff",style:{height:"auto",maxWidth:"100%",width:"100%"},value:a}):l.jsx("img",{style:{width:"50px",height:"50px"},src:Ge,alt:"pf-logo-gif"})}),l.jsxs("div",{children:[l.jsx("div",{style:{marginBottom:"0.25rem",fontSize:"0.875rem",fontWeight:"bold",color:"white"},children:"Mobile testing"}),l.jsx("div",{style:{marginBottom:"1rem",fontSize:"0.75rem",color:"gray"},children:"Scan QR Code to test in any browser"}),l.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"0.375rem",backgroundColor:"#00a3ff57",color:"secondary-blue",cursor:"pointer"},onClick:()=>{s||Z()},children:l.jsxs(l.Fragment,{children:[l.jsx(Ur,{style:{height:"1.5rem",width:"1.5rem",stroke:"secondary-blue",color:"white"}}),l.jsx("div",{style:{height:"24px",display:"flex",alignItems:"center",justifyContent:"center",width:"80px"},children:s?l.jsx("img",{style:{height:"90%"},src:Ge,alt:"loading"}):l.jsx("button",{style:{fontSize:"1rem",color:"white",background:"rgba(0, 163, 255, 0)"},children:"Copy Link"})})]})})]})]})},As=({versionName:e,versionId:t,playableId:n,typeOfProduct:r,api:o,iframeUrl:i,fetchFileUrl:a,copyLinkUrl:A,setSafariCopyLink:d,iosLink:u,androidLink:s,urlType:p})=>{const[Z,v]=C.useState(window.innerWidth);console.log("iosLink",u),C.useEffect(()=>{console.log("re add event listener");function m(f){console.log(f),f.data==="cta"&&(console.log("Received 'cta' message from iframe"),u&&window.open(u,"_blank"))}return window.addEventListener("message",m,!1),()=>{window.removeEventListener("message",m)}},[u,s]),C.useEffect(()=>{const m=()=>{v(window.innerWidth)};return window.addEventListener("resize",m),()=>{window.removeEventListener("resize",m)}},[]);const q=(e==null?void 0:e.length)>25?e.slice(0,25)+"...":e;return l.jsxs("div",{style:{display:"flex",width:"300px",flexDirection:"column",justifyContent:"space-between",padding:"5px",height:Z>1440?"680px":"620px",borderRadius:"0px 0px 0px 16px",marginTop:"20px"},children:[l.jsx(Ni,{iframeUrl:i}),l.jsx(Di,{name:q}),l.jsx(as,{versionId:t,playableId:n,typeOfProduct:r,api:o,copyLinkUrl:A,setSafariCopyLink:d,qrUrl:i,iosLink:u,androidLink:s,urlType:p})]})};var ve=(e=>(e.Flex="#7101FF",e.Playable="#F9830B",e.Import="#00a3ff",e.Ready="#0060A5",e.Fusion="#171717",e))(ve||{});const Xo=({checked:e,typeOfProduct:t,id:n})=>{const[r,o]=C.useState(e);C.useEffect(()=>{o(e)},[e]);const i=()=>{o(!r)};return l.jsx("div",{style:{display:"inline-flex",alignItems:"center"},children:l.jsxs("label",{onClick:i,style:{position:"relative",display:"flex",cursor:"pointer",alignItems:"center"},htmlFor:n,children:[l.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:i}),l.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:[l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",style:{height:"14px",width:"14px"},viewBox:"0 0 20 20",fill:ve[t],stroke:ve[t],strokeWidth:"1",children:l.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"})})," "]})]})})},ss=({typeOfProduct:e,allNetworksSelected:t,setAllNetworksSelected:n})=>l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",marginBottom:"0.5rem"},children:[l.jsxs("div",{style:{fontSize:"2xl",fontWeight:"bold",display:"flex"},children:[l.jsx("span",{style:{color:ve[e]},children:"Select Network"}),l.jsx("span",{style:{whiteSpace:"pre"},children:" From List"})]}),l.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:[l.jsx(Xo,{checked:t,typeOfProduct:e,id:"asd"}),l.jsx("span",{style:{marginLeft:"0.5rem",fontSize:"16px",fontWeight:"bold"},children:"Select All"})]})]});async function ls(e,t){return(await ge.post(t+"/buyRequest",{requestType:e})).data}const us=()=>l.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsxs("g",{"clip-path":"url(#clip0_518_12094)",children:[l.jsx("path",{d:"M4.50977 11.99L19.4898 11.99",stroke:"#7101FF","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),l.jsx("path",{d:"M13.5068 17.977L19.4828 12L13.5068 6.02299",stroke:"#7101FF","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_518_12094",children:l.jsx("rect",{width:"24",height:"24",fill:"white",transform:"translate(0 24) rotate(-90)"})})})]}),cs=({creditDownload:e,api:t})=>l.jsxs(l.Fragment,{children:[l.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."}),l.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"," ",l.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.",l.jsxs("button",{style:{marginLeft:"0.5rem",display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",textDecoration:"underline",color:"#yourColorHere"},onClick:()=>ls("Flex Credit",t).then(n=>ot("You will be contacted regarding your request.")),children:["Get more",l.jsx(us,{})]})]})]}),Qo=({typeOfProduct:e,urls:t,handleIosChange:n,handleGoogleChange:r,disabled:o})=>{const i=A=>{n(A.target.value)},a=A=>{r(A.target.value)};return l.jsxs(l.Fragment,{children:[l.jsxs("div",{style:{display:"flex",height:"2rem",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"200"},children:[l.jsx("span",{style:{width:"5rem",fontWeight:"bold",flexShrink:0},children:"App Store:"}),l.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:ve[e],marginRight:"2rem"},type:"text",value:t.iosUrl,onChange:i,placeholder:"Ios Url",disabled:o})]}),l.jsxs("div",{style:{marginTop:"0.5rem",display:"flex",height:"2rem",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"100"},children:[l.jsxs("span",{style:{width:"5rem",fontWeight:"bold",flexShrink:0},children:["Google Play:"," "]}),l.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:ve[e],marginRight:"2rem"},type:"text",value:t.googleUrl,onChange:a,placeholder:"Google Url",disabled:o})]})]})},ds=({typeOfProduct:e,urls:t,handleIosChange:n,handleGoogleChange:r,disabled:o})=>{const i=a=>{n(a.target.value)};return l.jsx(l.Fragment,{children:l.jsxs("div",{style:{display:"flex",height:"2rem",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"200"},children:[l.jsx("span",{style:{width:"5rem",fontWeight:"bold",flexShrink:0},children:"Redirection URL:"}),l.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:ve[e],marginRight:"2rem"},type:"text",value:t.iosUrl,onChange:i,placeholder:"Ios Url",disabled:o})]})})},ms=({typeOfProduct:e,fileSize:t,urls:n,handleIosChange:r,handleGoogleChange:o,disabled:i,api:a,creditDownload:A,user:d,isTest:u,setIsTest:s,urlType:p,setUrlType:Z})=>{const v=()=>l.jsxs("div",{style:{display:"flex",height:"24px",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"100"},children:[l.jsxs("span",{style:{width:"5rem",fontWeight:"bold"},children:["Enable Test:"," "]}),l.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:ve[e]},type:"checkbox",checked:u,onChange:()=>{s(!u)},placeholder:"Google Url",disabled:i})]}),q=()=>l.jsx(l.Fragment,{children:l.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:[l.jsx("div",{style:{position:"absolute",bottom:"-3px",left:p==="single"?"50%":"0%",width:"50%",height:"3px",borderRadius:"2px",backgroundColor:"#12a9fe",transition:"all 0.2s ease-in-out"},id:"tab-switch-background"}),l.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(()=>{Z("game")},200)},children:l.jsx("span",{style:{position:"relative",color:p==="game"?"#000":"#a3a3a3",fontWeight:p==="game"?"bold":"normal",transition:"all 0.2s ease-in-out"},id:"game-tab",children:"App"})},"gameTab"),l.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(()=>{Z("single")},200)},children:l.jsx("span",{style:{position:"relative",color:p==="single"?"#000":"#a3a3a3",fontWeight:p==="single"?"bold":"normal",transition:"all 0.2s ease-in-out"},id:"single-tab",children:"Website"})},"singleTab")]})});return l.jsx(l.Fragment,{children:e!=="Import"&&l.jsxs("div",{style:{display:"flex",width:"100%",flexDirection:"column"},children:[d.customer=="playableFactoryInternal"&&e==="Playable"&&l.jsx(v,{}),e==="Ready"?l.jsxs(l.Fragment,{children:[l.jsx(q,{}),p==="game"&&l.jsx(Qo,{typeOfProduct:e,urls:n,handleIosChange:r,handleGoogleChange:o,disabled:i}),p==="single"&&l.jsx(ds,{typeOfProduct:e,urls:n,handleIosChange:r,handleGoogleChange:o,disabled:i})]}):l.jsx(l.Fragment,{children:l.jsx(Qo,{typeOfProduct:e,urls:n,handleIosChange:r,handleGoogleChange:o,disabled:i})}),(A==null?void 0:A.willSpendCredit)&&l.jsx(cs,{creditDownload:A,api:a})]})})},ps=({typeOfProduct:e,title:t,fileSize:n})=>l.jsxs("div",{style:{fontSize:"1.5rem",fontWeight:"bold",paddingTop:"20px"},children:[l.jsx("span",{style:{color:ve[e]},children:t}),n&&l.jsxs("span",{style:{fontSize:"14px",fontWeight:"bold",marginLeft:"30px",color:"#87878E"},children:["File size: ",parseFloat(n).toFixed(2)," mb"]})]}),fs=({typeOfProduct:e,fileSize:t,urls:n,title:r,handleIosChange:o,handleGoogleChange:i,disabled:a,creditDownload:A,api:d,user:u,isTest:s,setIsTest:p,urlType:Z,setUrlType:v,allNetworksSelected:q,setAllNetworksSelected:m})=>l.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:[l.jsx(ps,{typeOfProduct:e,title:r,fileSize:t}),l.jsx(ms,{typeOfProduct:e,fileSize:t,urls:n,handleIosChange:o,handleGoogleChange:i,disabled:a,creditDownload:A,api:d,user:u,isTest:s,setIsTest:p,urlType:Z,setUrlType:v}),l.jsx(ss,{typeOfProduct:e,allNetworksSelected:q,setAllNetworksSelected:m})]}),or=({children:e,className:t,onClickDonwload:n,downloading:r,disabled:o})=>l.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||o,children:e}),Mu="",hs=({typeOfProduct:e})=>l.jsx("div",{style:{backgroundColor:"transparent",display:"flex",alignItems:"center",flexDirection:"column"},children:l.jsxs("div",{style:{position:"relative",width:"64px",height:"16px",marginTop:"8px"},children:[l.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:ve[e]}}),l.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:ve[e]}}),l.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:ve[e]}}),l.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:ve[e]}})]})}),jt=({isNetworksLoading:e=!1})=>l.jsx("div",{style:{display:"flex",height:"100%",width:"90px",alignItems:"center",justifyContent:"center"},children:l.jsx("img",{width:e?"100px":"25px",height:e?"100px":"25px",src:Ge,alt:"pf-logo-gif"})}),ir=({title:e,titleId:t,...n})=>l.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?l.jsx("title",{id:t,children:e}):null,l.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"})]}),gs=({onClose:e,iosLink:t,googleLink:n,buttonType:r,handleCopyLink:o,download:i,typeOfProduct:a,urlType:A})=>{let d="";return a==="Ready"&&A==="single"?d="Redirection url is empty. Are you sure you want to continue?":!t&&!n?d="Both links are empty. Are you sure you want to continue?":t?n||(d="Google link is empty. Are you sure you want to continue?"):d="iOS link is empty. Are you sure you want to continue?",l.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:[l.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),l.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:[l.jsx("h1",{style:{textAlign:"center",fontSize:"18px",lineHeight:"24px"},children:d}),l.jsxs("div",{style:{display:"flex",gap:"5px"},children:[l.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:"No"}),l.jsx("button",{onClick:async u=>{r==="download"?await i():r==="copyLink"&&await o(),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:"Yes"})]})]})]})},ar=({onClose:e,handleCopyLink:t,download:n,creditConfirmType:r,getDownloadCount:o,width:i="130%",height:a="120%"})=>l.jsxs("div",{style:{position:"fixed",top:0,left:0,zIndex:50,display:"flex",height:a,width:i,alignItems:"center",justifyContent:"center",backgroundColor:"#00000080"},children:[l.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%"}}),l.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:[l.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?"}),l.jsxs("div",{style:{display:"flex",gap:"5px"},children:[l.jsx("button",{onClick:e,style:{flex:1,cursor:"pointer",borderRadius:"4px",borderWidth:"1px",borderColor:"dark-50",padding:"2px",fontWeight:"bold"},children:"No"}),l.jsx("button",{style:{flex:1,cursor:"pointer",borderRadius:"4px",borderWidth:"1px",borderColor:"#F9830B",backgroundColor:"#F9830B",padding:"2px",fontWeight:"bold",color:"white"},onClick:async A=>{A.preventDefault(),A.stopPropagation(),r==="download"?(await n(),await o()):r==="copy"&&(await t(),await o()),e()},children:"Yes"})]})]})]}),qs=({onClose:e,handleDownload:t,handleDownloadMolocoTest:n,downloadingMoloco:r,downloadingMolocoTest:o,downloadingMolocoHtml:i})=>l.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:[l.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),l.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:l.jsxs("div",{style:{display:"flex",gap:"5px",flexDirection:"column"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"center"},children:[r?l.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:l.jsx("img",{width:"25px",height:"25px",src:Ge,alt:"pf-logo-gif"})}):l.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"}),i?l.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:l.jsx("img",{width:"25px",height:"25px",src:Ge,alt:"pf-logo-gif"})}):l.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"})]}),l.jsx("div",{style:{display:"flex",justifyContent:"center"},children:o?l.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:l.jsx("img",{width:"25px",height:"25px",src:Ge,alt:"pf-logo-gif"})}):l.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 ys(e,t,n,r){return(await ge.post(e+"/createMolocoTestPage",{_id:t,network:n,typeOfProduct:r})).data}const vs=({id:e,imageUrl:t,handleCardClick:n,selected:r,name:o,networkVersionSize:i,fileSizeLoading:a,showCheckBox:A,typeOfProduct:d,versionId:u,api:s,handleDownloadError:p,fetchFileUrl:Z,urls:v,game:q,setIsConfirmActive:m,creditDownload:f,getDownloadCount:y,disabled:I,user:M,setSafariCopyLink:W,isTest:g,urlType:R,setCdnModal:T,generateCDN:E,cdnUrl:Q})=>{const[X,ie]=C.useState(!1),[V,oe]=C.useState(""),[L,k]=C.useState(!1),[J,h]=C.useState(!1),[z,re]=C.useState(!1),[b,S]=C.useState("download"),[G,Y]=C.useState(!1),[N,B]=C.useState(!1),[P,H]=C.useState(!1);let U={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 te={cdn:"Generate Link",adikteev:"Copy CDN"},x=()=>{n(e)},ae=async(D,ee)=>{const qe={molocoGenerateHtml:!1,urlType:R};if(_&&(ee==="copy"?(B(!0),ee="download",qe.molocoGenerateHtml=!0):Y(!0)),console.log("getVersion",D,ee,qe),D==="cdn"){T(!0),await E(!0);return}return D==="adikteev"&&(ee="copy"),ie(!0),new Promise((vt,et)=>{kt(u,D,v,ee,g,qe).then(ct=>{ie(!1),vt(ct),B(!1),Y(!1)}).catch(ct=>{ie(!1),p(ct.message,ct),et(ct),B(!1),Y(!1)})})},O=async(D=!1)=>{D?B(!0):Y(!0);const ee={molocoGenerateHtml:!1};D&&(ee.molocoGenerateHtml=!0),kt(u,o,v,"download",g,ee).then(qe=>{D?B(!1):Y(!1),re(!1)}).catch(qe=>{p(qe.message,qe)})},ne=async()=>{H(!0);const D=await ys(s,u,o,d);let ee=`${Z}/${D==null?void 0:D.url}`;pt(ee)?(ot("Link Copied"),H(!1)):W(ee)},_=o==="moloco"||o==="molocoV2";return l.jsxs(l.Fragment,{children:[l.jsxs("div",{style:{position:"relative",display:"flex",flexDirection:"column",gap:"20px",padding:"16px",borderColor:r?ve[d]:"lightgray",borderWidth:"1px",borderStyle:"solid",backgroundColor:"white",width:"100%",height:"175px",borderRadius:"8px",cursor:"pointer"},className:"border-hover-"+d,onClick:x,children:[l.jsxs("div",{style:{marginTop:o=="web"?"10px":"40px",display:"flex",justifyContent:"center"},children:[l.jsx("div",{style:{position:"absolute",right:"0",top:"0",padding:"8px"},children:l.jsx("div",{children:i&&i.map(D=>D.network).includes(o)?a?l.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:l.jsx(hs,{typeOfProduct:d})}):i.map(D=>l.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:D.network===o?D.size.toString().slice(0,5)+"Mb":""},D.network)):null})}),l.jsx("div",{style:{position:"absolute",top:"0",left:"0",padding:"0.5rem"},children:(d==="Playable"||d==="Ready"||d==="Flex")&&A&&l.jsx(Xo,{checked:r,typeOfProduct:d,id:e})}),l.jsx("img",{onClick:x,style:{width:"30rem",height:o=="web"?"80px":"50px",objectFit:"contain"},src:t})]}),l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"0.25rem"},children:[l.jsx(or,{className:`${_?"w-1/2":"w-2/3"} border-hover-`+d,downloading:X,onClickDonwload:async D=>{if(D.stopPropagation(),_&&M.customer==="playableFactoryInternal"){re(!0);return}else{oe("download");const ee=v.iosUrl,qe=v.googleUrl;o==="cdn"&&f&&f.willSpendCredit&&!Q||o!=="cdn"&&f&&f.willSpendCredit?(m(!0),S("download"),k(!0)):["Playable","Flex"].includes(d)&&(!ee||!qe)||d==="Ready"&&R==="single"&&!ee||d==="Ready"&&R==="multi"&&(!ee||!qe)?(m(!0),h(!0)):(h(!1),k(!1),await ae(o,"download"))}},children:_?l.jsxs(l.Fragment,{children:[!G&&l.jsxs(l.Fragment,{children:[l.jsx(ir,{style:{marginRight:"0.5rem",height:"1.5rem",width:"1rem",stroke:"dark-full"}}),M.customer!=="playableFactoryInternal"?"TXT":"Download"]}),G&&l.jsx(jt,{})]}):l.jsxs(l.Fragment,{children:[!X&&l.jsxs(l.Fragment,{children:[l.jsx(ir,{style:{marginRight:"0.5rem",height:"1.5rem",width:"1rem",stroke:"dark-full"}}),te[o]||"Download"]}),X&&l.jsx(jt,{})]})}),U[o]&&U[o].includes("copy")&&l.jsx(or,{className:"w-1/3 border-hover-"+d,onClickDonwload:async D=>{D.stopPropagation(),oe("copyLink");const ee=v.iosUrl,qe=v.googleUrl;f&&(f!=null&&f.willSpendCredit)?(S("copy"),m(!0),k(!0)):d!=="Import"&&(!ee||!qe)?(m(!0),h(!0)):(k(!1),h(!1),await ae(o,"copy"))},disabled:I,children:l.jsx(Ur,{className:"h-6 w-6 stroke-dark-full"})}),_&&M.customer!=="playableFactoryInternal"&&l.jsxs(or,{className:"w-1/2 border-hover-"+d,onClickDonwload:async D=>{D.stopPropagation(),oe("copyLink");const ee=v.iosUrl,qe=v.googleUrl;f&&(f!=null&&f.willSpendCredit)?(S("download"),m(!0),k(!0)):d!=="Import"&&(!ee||!qe)?(m(!0),h(!0)):(k(!1),h(!1),await O(!0))},disabled:I,children:[!N&&l.jsxs(l.Fragment,{children:[l.jsx(ir,{style:{marginRight:"0.5rem",height:"1.5rem",width:"1rem",stroke:"dark-full"}}),"HTML"]}),N&&l.jsx(jt,{})]})]}),_&&l.jsx("img",{style:{position:"absolute",width:"135px",right:"0",top:"18px"},src:"https://home.playablefactory.app/recommended_badge.png"})]}),L&&l.jsx(ar,{creditConfirmType:b,handleCopyLink:async()=>{h(!1),m(!1),await ae(o,"copy")},download:async()=>{h(!1),m(!1),await ae(o,"download")},onClose:()=>{k(!1),m(!1)},getDownloadCount:y}),J&&l.jsx(gs,{onClose:()=>{h(!1),m(!1)},iosLink:v.iosUrl,googleLink:v.googleUrl,buttonType:V,handleCopyLink:async()=>{h(!1),m(!1),await ae(o,"copy")},download:async()=>{h(!1),m(!1),await ae(o,"download")},typeOfProduct:d,urlType:R}),z&&M.customer==="playableFactoryInternal"&&l.jsx(qs,{onClose:()=>{re(!1)},handleDownload:O,handleDownloadMolocoTest:ne,downloadingMoloco:G,donwloadintMolocoTest:P,downloadingMolocoHtml:N})]})},dn=[{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"}],bs=({children:e,typeOfProduct:t,className:n,onClick:r})=>{const o={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"0.5rem",width:"12rem",height:"2.5rem",backgroundColor:ve[t],color:"white",fontSize:"0.875rem",borderRadius:"0.875rem"};return l.jsx("button",{onClick:r,className:n,style:o,children:e})},Cs=({networksVersionTotalSize:e,typeOfProduct:t,onClickMultiDownload:n,multiDownloading:r})=>l.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"8px"},children:r?l.jsx("div",{style:{display:"flex",width:"12rem",height:"2.5rem",borderRadius:"0.875rem",alignItems:"center",justifyContent:"center",backgroundColor:ve[t]},children:l.jsx(jt,{})}):l.jsx(bs,{typeOfProduct:t,onClick:n,children:l.jsx("span",{style:{fontSize:"1.25rem",padding:"0.5rem",color:"#fff"},children:"Download All"})})}),Po=({title:e,titleId:t})=>l.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:[l.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"}),l.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"})]}),Zs=({onClose:e,cdnUrl:t,generateCDN:n,cdnUploading:r})=>l.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:[l.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),l.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:o=>{o.stopPropagation()},children:l.jsxs("div",{style:{display:"flex",gap:"5px",flexDirection:"column"},children:[l.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&&l.jsx("img",{width:"30px",src:Ge,alt:"pf-logo-gif"})]}),l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f6f6f6",height:"60px",color:"#737373"},children:[l.jsx("div",{style:{width:"66px",height:"100%",borderRight:"1px solid #e1e1e1",display:"flex",justifyContent:"center",alignItems:"center",flexShrink:0},children:l.jsx(Po,{})}),l.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",position:"relative",maxWidth:"68%"},children:l.jsx("a",{style:{textAlign:"center",overflow:"hidden",textOverflow:"ellipsis"},href:t,target:"_blank",children:t||"No CDN link generated"})}),l.jsx("button",{onClick:()=>{if(!t)return;pt(t)&&ot("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 Is=0;function Vo(e,t){const n=`atom${++Is}`,r={toString(){return n}};return typeof e=="function"?r.read=e:(r.init=e,r.read=ws,r.write=xs),t&&(r.write=t),r}function ws(e){return e(this)}function xs(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}const Bo=(e,t)=>e.unstable_is?e.unstable_is(t):t===e,Uo=e=>"init"in e,Fo=e=>!!e.write,zt=Symbol(""),Ar="pending",Ks="fulfilled",Ss="rejected",Ms=e=>typeof e=="object"&&e!==null&&zt in e,mn=new WeakMap,Ws=(e,t,n)=>{if(!mn.has(e)){let r;const o=new Promise((i,a)=>{let A=e;const d=s=>p=>{A===s&&(o.status=Ks,o.value=p,i(p),n())},u=s=>p=>{A===s&&(o.status=Ss,o.reason=p,a(p),n())};e.then(d(e),u(e)),r=(s,p)=>{s&&(mn.set(s,o),A=s,s.then(d(s),u(s)),t(),t=p)}});o.status=Ar,o[zt]=r,mn.set(e,o)}return mn.get(e)},Es=e=>typeof(e==null?void 0:e.then)=="function",_o=e=>"v"in e||"e"in e,pn=e=>{if("e"in e)throw e.e;return e.v},fn=e=>{const t=e.v;return Ms(t)&&t.status===Ar?t:null},$o=(e,t,n)=>{n.p.has(e)||(n.p.add(e),t.then(()=>{n.p.delete(e)},()=>{n.p.delete(e)}))},Yt=()=>[new Map,new Map,new Set],ei=(e,t,n)=>{e[0].has(t)||e[0].set(t,new Set),e[1].set(t,n)},Ls=(e,t,n)=>{const r=e[0].get(t);r&&r.add(n)},Os=(e,t)=>e[0].get(t),ti=(e,t)=>{e[2].add(t)},ft=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 o;return(o=r.m)==null?void 0:o.l.forEach(i=>i())}),n.forEach(r=>r())}},ks=()=>{const e=new WeakMap;let t;const n=m=>{let f=e.get(m);return f||(f={d:new Map,p:new Set,n:0},e.set(m,f)),f},r=(m,f,y,I=()=>{},M=()=>{})=>{const W="v"in f,g=f.v,R=fn(f);if(Es(y))if(R)R!==y&&(R[zt](y,I),++f.n);else{const T=Ws(y,I,M);if(T.status===Ar)for(const E of f.d.keys()){const Q=n(E);$o(m,T,Q)}f.v=T,delete f.e}else R&&R[zt](Promise.resolve(y),I),f.v=y,delete f.e;(!W||!Object.is(g,f.v))&&++f.n},o=(m,f,y,I)=>{var M;const W=n(f);W.d.set(y,I.n);const g=fn(W);g&&$o(f,g,I),(M=I.m)==null||M.t.add(f),m&&Ls(m,y,f)},i=(m,f,y)=>{const I=n(f);if(!(y!=null&&y(f))&&_o(I)&&(I.m||Array.from(I.d).every(([E,Q])=>i(m,E,y).n===Q)))return I;I.d.clear();let M=!0;const W=E=>{if(Bo(f,E)){const X=n(E);if(!_o(X))if(Uo(E))r(E,X,E.init);else throw new Error("no atom init");return pn(X)}const Q=i(m,E,y);if(M)o(m,f,E,Q);else{const X=Yt();o(X,f,E,Q),s(X,f,I),ft(X)}return pn(Q)};let g,R;const T={get signal(){return g||(g=new AbortController),g.signal},get setSelf(){return!R&&Fo(f)&&(R=(...E)=>{if(!M)return u(f,...E)}),R}};try{const E=f.read(W,T);return r(f,I,E,()=>g==null?void 0:g.abort(),()=>{if(I.m){const Q=Yt();s(Q,f,I),ft(Q)}}),I}catch(E){return delete I.v,I.e=E,++I.n,I}finally{M=!1}},a=m=>pn(i(void 0,m)),A=(m,f)=>{const y=T=>{var E,Q;const X=n(T),ie=new Set((E=X.m)==null?void 0:E.t);for(const V of X.p)ie.add(V);return(Q=Os(m,T))==null||Q.forEach(V=>{ie.add(V)}),ie},I=[],M=new Set,W=T=>{if(!M.has(T)){M.add(T);for(const E of y(T))T!==E&&W(E);I.push(T)}};W(f);const g=new Set([f]),R=T=>M.has(T);for(let T=I.length-1;T>=0;--T){const E=I[T],Q=n(E),X=Q.n;let ie=!1;for(const V of Q.d.keys())if(V!==E&&g.has(V)){ie=!0;break}ie&&(i(m,E,R),s(m,E,Q),X!==Q.n&&(ei(m,E,Q),g.add(E))),M.delete(E)}},d=(m,f,...y)=>{const I=g=>pn(i(m,g)),M=(g,...R)=>{let T;if(Bo(f,g)){if(!Uo(g))throw new Error("atom not writable");const E=n(g),Q="v"in E,X=E.v,ie=R[0];r(g,E,ie),s(m,g,E),(!Q||!Object.is(X,E.v))&&(ei(m,g,E),A(m,g))}else T=d(m,g,...R);return ft(m),T};return f.write(I,M,...y)},u=(m,...f)=>{const y=Yt(),I=d(y,m,...f);return ft(y),I},s=(m,f,y)=>{if(y.m&&!fn(y)){for(const I of y.d.keys())y.m.d.has(I)||(p(m,I).t.add(f),y.m.d.add(I));for(const I of y.m.d||[])if(!y.d.has(I)){y.m.d.delete(I);const M=Z(m,I);M==null||M.t.delete(f)}}},p=(m,f)=>{const y=n(f);if(!y.m){i(m,f);for(const I of y.d.keys())p(m,I).t.add(f);if(y.m={l:new Set,d:new Set(y.d.keys()),t:new Set},Fo(f)&&f.onMount){const I=y.m,{onMount:M}=f;ti(m,()=>{const W=M((...g)=>d(m,f,...g));W&&(I.u=W)})}}return y.m},Z=(m,f)=>{const y=n(f);if(y.m&&!y.m.l.size&&!Array.from(y.m.t).some(I=>{var M;return(M=n(I).m)==null?void 0:M.d.has(f)})){const I=y.m.u;I&&ti(m,I),delete y.m;for(const W of y.d.keys()){const g=Z(m,W);g==null||g.t.delete(f)}const M=fn(y);M&&M[zt](void 0,()=>{});return}return y.m};return{get:a,set:u,sub:(m,f)=>{const y=Yt(),I=p(y,m);ft(y);const M=I.l;return M.add(f),()=>{M.delete(f);const W=Yt();Z(W,m),ft(W)}}}};let sr;const js=()=>(sr||(sr=ks()),sr),zs=C.createContext(void 0),ni=e=>{const t=C.useContext(zs);return(e==null?void 0:e.store)||t||js()},Ys=e=>typeof(e==null?void 0:e.then)=="function",Js=C.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 Ns(e,t){const n=ni(t),[[r,o,i],a]=C.useReducer(u=>{const s=n.get(e);return Object.is(u[0],s)&&u[1]===n&&u[2]===e?u:[s,n,e]},void 0,()=>[n.get(e),n,e]);let A=r;(o!==n||i!==e)&&(a(),A=n.get(e));const d=t==null?void 0:t.delay;return C.useEffect(()=>{const u=n.sub(e,()=>{if(typeof d=="number"){setTimeout(a,d);return}a()});return a(),u},[n,e,d]),C.useDebugValue(A),Ys(A)?Js(A):A}function Ds(e,t){const n=ni(t);return C.useCallback((...o)=>n.set(e,...o),[n,e])}function hn(e,t){return[Ns(e,t),Ds(e,t)]}const ri=Vo(""),oi=Vo(!1),Rs=({onClose:e,url:t})=>l.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:[l.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),l.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:l.jsx("div",{style:{display:"flex",gap:"5px",flexDirection:"column"},children:l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f6f6f6",height:"60px",color:"#737373"},children:[l.jsx("div",{style:{width:"66px",height:"100%",borderRight:"1px solid #e1e1e1",display:"flex",justifyContent:"center",alignItems:"center",flexShrink:0},children:l.jsx(Po,{})}),l.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",position:"relative",maxWidth:"68%"},children:l.jsx("a",{style:{textAlign:"center",overflow:"hidden",textOverflow:"ellipsis"},href:t,target:"_blank",children:t||l.jsx("img",{width:"30px",src:Ge,alt:"pf-logo-gif"})})}),l.jsx("button",{onClick:()=>{if(!t)return;pt(t)&&ot("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"})]})})})]}),Gs=({playable:e,creditDownload:t,visible:n,versionId:r,typeOfProduct:o,api:i,user:a,handleDownloadError:A,fetchFileUrl:d,urls:u,game:s,getDownloadCount:p,disabled:Z,setSafariCopyLink:v,isTest:q,urlType:m,allNetworksSelected:f,cdnModal:y,setCdnModal:I,cdnUrl:M,setCdnUrl:W})=>{const[g,R]=C.useState([]),[T,E]=C.useState([]),[Q,X]=C.useState(!1),[ie,V]=C.useState(""),[oe,L]=C.useState(!1),[k,J]=C.useState(!1),[h,z]=C.useState("download"),[re,b]=C.useState(!1),[S,G]=C.useState(!1),[Y,N]=C.useState(!1),[B,P]=hn(ri),[H,U]=hn(oi),te=async(ne=!1)=>{ne&&M||Y||(N(!0),kt(r,"cdn",u,null,!1,{}).then(_=>{W(_.url),N(!1)}).catch(_=>{A(_.message,_),N(!1)}))},x=async ne=>{const _=[...g];if(g.includes(ne)){const D=_.findIndex(ee=>ee===ne);_.splice(D,1),R(_)}else _.push(ne),R([...g,ne]);dn.filter(D=>[..._].includes(D.id)).map(D=>D.name)},ae=async()=>new Promise(async(ne,_)=>{const D=dn.filter(ee=>[...g].includes(ee.id)).map(ee=>ee.name);L(!0),rs(r,u,D,{urlType:m}).then(ee=>{L(!1),ne(ee)}).catch(ee=>{console.log("get multi download err"),L(!1),A(ee.message,ee),_(ee)})}),O=async()=>{u.iosUrl,u.googleUrl,t&&t.willSpendCredit?(J(!0),z("download"),b(!0)):(b(!1),await ae())};return C.useEffect(()=>{const ne=dn.filter(_=>{var D;return t&&((D=t==null?void 0:t.networks)==null?void 0:D.length)>0?t==null?void 0:t.networks.includes(_.name):o==="Import"?e==null?void 0:e.networks.filter(ee=>ee.status==="paid").some(ee=>ee.name===_.name):(e==null?void 0:e.networks.includes(_.name))||(s==null?void 0:s.networks.includes(_.name))}).filter(_=>_.name==="voodoo"?a.customer==="customer:20":!0).map(_=>_.id);R(f?ne:[])},[f]),l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{position:"relative",flex:1,overflowY:k?"hidden":"auto",padding:"1.5rem",paddingTop:"0"},children:l.jsx("div",{style:{display:"grid",gridTemplateColumns:"180px 180px 180px",gap:"1rem",overflowY:"auto",padding:"0.75rem"},children:n&&dn.filter(ne=>{var _;return t&&((_=t==null?void 0:t.networks)==null?void 0:_.length)>0?t==null?void 0:t.networks.includes(ne.name):o==="Import"?e==null?void 0:e.networks.filter(D=>D.status==="paid").some(D=>D.name===ne.name):(e==null?void 0:e.networks.includes(ne.name))||(s==null?void 0:s.networks.includes(ne.name))}).filter(ne=>ne.name==="voodoo"?a.customer==="customer:20":!0).map(ne=>{let _=ne.imageSrc;if(ne.name==="web"){let D="web_"+o.toLowerCase()+".png";_=_.replace("web.png",D)}return l.jsx(vs,{id:ne.id,name:ne.name,imageUrl:_,selected:g.includes(ne.id),handleCardClick:x,networkVersionSize:T,fileSizeLoading:Q,showCheckBox:!0,typeOfProduct:o,versionId:r,api:i,handleDownloadError:A,fetchFileUrl:d,urls:u,game:s,creditDownload:t,setIsConfirmActive:J,getDownloadCount:p,disabled:Z,user:a,setSafariCopyLink:v,isTest:q,urlType:m,setCdnModal:I,generateCDN:te,cdnUrl:M},ne.id)})})}),g.length>1&&(o==="Playable"||o==="Ready"||o==="Flex")&&l.jsx("div",{style:{position:"fixed",bottom:"0",left:"65%",zIndex:20,transform:"translateX(-50%)",display:"flex",flexDirection:"column",paddingTop:"5px"},children:l.jsx(Cs,{onClickMultiDownload:O,networksVersionTotalSize:ie,typeOfProduct:o,multiDownloading:oe})}),y&&l.jsx(Zs,{onClose:()=>{I(!1),p()},versionId:r,urls:u,handleDownloadError:A,cdnUrl:M,setCdnUrl:W,generateCDN:async()=>{if(!Y){if(a.customer==="playableFactoryInternal"){te();return}G(!0)}},cdnUploading:Y}),H&&l.jsx(Rs,{onClose:()=>{U(!1)},url:B}),S&&l.jsx(ar,{width:"100%",height:"100%",creditConfirmType:h,handleCopyLink:async()=>{},download:async()=>{b(!1),G(!1),te()},onClose:()=>{b(!1),G(!1),N(!1)},getDownloadCount:p}),re&&l.jsx(ar,{creditConfirmType:h,handleCopyLink:async()=>{},download:async()=>{b(!1),J(!1),await ae()},onClose:()=>{b(!1),J(!1)},getDownloadCount:p})]})};async function Ts(e,t){return(await ge.post(t+"/getFlexDownloadCount",e)).data}async function Hs(e,t){try{return(await ge.post(t+"/findGame",{_id:e})).data}catch{}}async function Xs(e,t){return(await ge.post(t+"/getPlayableVersionMarketLink",{_id:e})).data}async function Qs(e,t){return(await ge.post(t+"/getFlexData",{_id:e})).data}async function Ps(e,t){return(await ge.post(t+"/getImportedPlayable",{id:e})).data}async function Vs(e,t){return(await ge.post(t+"/getReadyDownloadCount",e)).data}const Bs=["adcolony","ironsource","applovin","unity","mobvista","criteo","kayzen","vungle","moloco","inmobi"],lr=["web","adcolony","applovin","chartboost","crossinstall","fb","google","ironsource","lifestreet","liftoff","mobvista","nucleo","tapjoy","toutiao","unity","vungle","moloco","cdn"];let ii=null;const Us=({playableId:e,versionId:t,gameId:n,typeOfProduct:r,visible:o,api:i,user:a,title:A,handleDownloadError:d,fetchFileUrl:u,fileSize:s,setFileSize:p,setSafariCopyLink:Z,iosLink:v,androidLink:q,setIosLink:m,setAndroidLink:f,urlType:y,setUrlType:I})=>{const[M,W]=C.useState(null),[g,R]=C.useState(null),[T,E]=C.useState(null),[Q,X]=C.useState(!1),[ie,V]=C.useState(!0),[oe,L]=C.useState(window.innerWidth),[k,J]=C.useState(!1),[h,z]=C.useState(!1),[re,b]=C.useState("");hn(ri),hn(oi),C.useEffect(()=>{!re&&r!=="Fusion"&&is(t).then(x=>{x!=null&&x.exist&&b(x.uploadPath)})},[re]),console.log("download modal version: 6.0.45");const[S,G]=C.useState(!1);C.useEffect(()=>{},[S]),C.useEffect(()=>{const x=()=>{L(window.innerWidth)};return window.addEventListener("resize",x),()=>{window.removeEventListener("resize",x)}},[]);const Y=async()=>{X(!0);const x=await rr(e,i);return x!=null&&x.networks||(x.networks=Bs),W(x),x},N=(x,ae)=>{clearTimeout(ii),ii=setTimeout(()=>{nr(t,{iosUrl:x,googleUrl:ae},{urlType:y})},1e3)},B=x=>{m(x),N(x,q)},P=x=>{f(x),N(v,x)},H=async(x,ae)=>{var O,ne;try{let _;if(r==="Playable"||r==="Ready"){const D=await Xs(t,i);if(D){m(D.iosLink),f(D.androidLink),X(!1);return}if(x&&(x.iosUrl||x.googleUrl)){m(x.iosUrl),f(x.googleUrl),X(!1);return}if(ae&&ae.html){let ee=await fetch(u+"/"+ae.html).then(et=>et.text());const qe=((O=ee.match(/var\s+iosLink\s*=\s*['|"](https?[\w\d;,/?:@&=+$\-_.!~*'()#]+)['|"]/))==null?void 0:O.at(1))||"";m(qe);const vt=((ne=ee.match(/var\s+androidLink\s*=\s*['|"](https?[\w\d;,/?:@&=+$\-_.!~*'()#]+)['|"]/))==null?void 0:ne.at(1))||"";f(vt),X(!1)}else f(""),m(""),X(!1)}else if(r==="Flex"){const D=await Qs(t,i);if(D.googleUrl||D.iosUrl){f(D.googleUrl),m(D.iosUrl),X(!1);return}x&&(x.iosUrl||x.googleUrl)?(m(x.iosUrl),f(x.googleUrl),X(!1)):(f(""),m(""),X(!1))}else r==="Fusion"&&(x&&(x.iosUrl||x.googleUrl)?(m(x.iosUrl),f(x.googleUrl),X(!1)):(f(""),m(""),X(!1)))}catch(_){d(_.response.data.error.msg)}},U=async()=>{X(!0);let x;r==="Flex"?x=await Ts({_id:t},i):r==="Ready"&&(x=await Vs({_id:t},i)),x&&(["admin","pm","tester","sales"].includes(a.role)?E({...x,networks:lr}):r==="Ready"&&!x.canDownload?E({...x,networks:lr}):E(x)),X(!1)},te=async()=>await Hs(n,i);return C.useEffect(()=>{o||(W(null),R(null),E(null),p(null)),o&&(r==="Playable"?(Y().then(x=>{H(null,x)}),V(!1)):r==="Ready"?U().then(x=>{Y().then(ae=>{H(null,ae),V(!1)})}):r==="Flex"?U().then(x=>{V(!1),te().then(ae=>{o&&(H(ae,null),V(!1),R(ae))})}):r==="Import"?Ps(t,i).then(x=>{W(x),m(x.iosUrl||""),f(x.googleUrl||""),X(!1),V(!1)}):r==="Fusion"&&(V(!1),te().then(x=>{o&&(H(x,null),V(!1),x.networks=lr,R(x))})))},[n,e,t,o]),l.jsxs("div",{style:{display:"flex",height:oe>1440?"700px":"650px",width:oe>1440?"675px":"680px",flexDirection:"column",borderRadius:"rounded",backgroundColor:"#F7F7F8",paddingTop:"0px"},children:[l.jsx(fs,{title:A,typeOfProduct:r,fileSize:s,urls:{iosUrl:v,googleUrl:q},handleIosChange:B,handleGoogleChange:P,disabled:ie,api:i,creditDownload:T,user:a,isTest:k,setIsTest:J,urlType:y,setUrlType:I,allNetworksSelected:S,setAllNetworksSelected:G}),Q?l.jsx("div",{style:{height:"100%",width:"100%",display:"flex",justifyContent:"center"},children:l.jsx(jt,{isNetworksLoading:!0})}):(M||T||r==="Fusion")&&(r==="Flex"?g:!0)&&!Q&&v!=="Loading..."&&q!=="Loading..."&&l.jsx(Gs,{playable:M,creditDownload:T,visible:o,versionId:t,typeOfProduct:r,api:i,user:a,handleDownloadError:d,fetchFileUrl:u,urls:{iosUrl:v,googleUrl:q},game:g,getDownloadCount:U,disabled:ie,setSafariCopyLink:Z,isTest:k,urlType:y,allNetworksSelected:S,cdnModal:h,setCdnModal:z,cdnUrl:re,setCdnUrl:b})]})},Wu="";var ur={exports:{}},it={},cr={exports:{}},ze={},dr={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;/*!
50
+ `):" "+Co(i[0]):"as no adapter specified";throw new se("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Rn};function Gn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Wt(null,e)}function Io(e){return Gn(e),e.headers=Qe.from(e.headers),e.data=Dn.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Zo.getAdapter(e.adapter||Jn.adapter)(e).then(function(r){return Gn(e),r.data=Dn.call(e,e.transformResponse,r),r.headers=Qe.from(r.headers),r},function(r){return yo(r)||(Gn(e),r&&r.response&&(r.response.data=Dn.call(e,e.transformResponse,r.response),r.response.headers=Qe.from(r.response.headers))),Promise.reject(r)})}const wo=e=>e instanceof Qe?e.toJSON():e;function mt(e,t){t=t||{};const n={};function r(u,s,p){return w.isPlainObject(u)&&w.isPlainObject(s)?w.merge.call({caseless:p},u,s):w.isPlainObject(s)?w.merge({},s):w.isArray(s)?s.slice():s}function o(u,s,p){if(w.isUndefined(s)){if(!w.isUndefined(u))return r(void 0,u,p)}else return r(u,s,p)}function i(u,s){if(!w.isUndefined(s))return r(void 0,s)}function a(u,s){if(w.isUndefined(s)){if(!w.isUndefined(u))return r(void 0,u)}else return r(void 0,s)}function A(u,s,p){if(p in t)return r(u,s);if(p in e)return r(void 0,u)}const d={url:i,method:i,data:i,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:A,headers:(u,s)=>o(wo(u),wo(s),!0)};return w.forEach(Object.keys(Object.assign({},e,t)),function(s){const p=d[s]||o,Z=p(e[s],t[s],s);w.isUndefined(Z)&&p!==A||(n[s]=Z)}),n}const xo="1.6.0",Tn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Tn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ko={};Tn.transitional=function(t,n,r){function o(i,a){return"[Axios v"+xo+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,A)=>{if(t===!1)throw new se(o(a," has been removed"+(n?" in "+n:"")),se.ERR_DEPRECATED);return n&&!Ko[a]&&(Ko[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,A):!0}};function MA(e,t,n){if(typeof e!="object")throw new se("options must be an object",se.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const A=e[i],d=A===void 0||a(A,i,e);if(d!==!0)throw new se("option "+i+" must be "+d,se.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new se("Unknown option "+i,se.ERR_BAD_OPTION)}}const Hn={assertOptions:MA,validators:Tn},Fe=Hn.validators;class nn{constructor(t){this.defaults=t,this.interceptors={request:new fo,response:new fo}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=mt(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Hn.assertOptions(r,{silentJSONParsing:Fe.transitional(Fe.boolean),forcedJSONParsing:Fe.transitional(Fe.boolean),clarifyTimeoutError:Fe.transitional(Fe.boolean)},!1),o!=null&&(w.isFunction(o)?n.paramsSerializer={serialize:o}:Hn.assertOptions(o,{encode:Fe.function,serialize:Fe.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&w.merge(i.common,i[n.method]);i&&w.forEach(["delete","get","head","post","put","patch","common"],q=>{delete i[q]}),n.headers=Qe.concat(a,i);const A=[];let d=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(d=d&&m.synchronous,A.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let s,p=0,Z;if(!d){const q=[Io.bind(this),void 0];for(q.unshift.apply(q,A),q.push.apply(q,u),Z=q.length,s=Promise.resolve(n);p<Z;)s=s.then(q[p++],q[p++]);return s}Z=A.length;let v=n;for(p=0;p<Z;){const q=A[p++],m=A[p++];try{v=q(v)}catch(f){m.call(this,f);break}}try{s=Io.call(this,v)}catch(q){return Promise.reject(q)}for(p=0,Z=u.length;p<Z;)s=s.then(u[p++],u[p++]);return s}getUri(t){t=mt(this.defaults,t);const n=vo(t.baseURL,t.url);return po(n,t.params,t.paramsSerializer)}}w.forEach(["delete","get","head","options"],function(t){nn.prototype[t]=function(n,r){return this.request(mt(r||{},{method:t,url:n,data:(r||{}).data}))}}),w.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,A){return this.request(mt(A||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}nn.prototype[t]=n(),nn.prototype[t+"Form"]=n(!0)});const rn=nn;class Xn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(A=>{r.subscribe(A),i=A}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,A){r.reason||(r.reason=new Wt(i,a,A),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 Xn(function(o){t=o}),cancel:t}}}const WA=Xn;function EA(e){return function(n){return e.apply(null,n)}}function LA(e){return w.isObject(e)&&e.isAxiosError===!0}const Qn={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(Qn).forEach(([e,t])=>{Qn[t]=e});const OA=Qn;function So(e){const t=new rn(e),n=Fr(rn.prototype.request,t);return w.extend(n,rn.prototype,t,{allOwnKeys:!0}),w.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return So(mt(e,o))},n}const he=So(Jn);he.Axios=rn,he.CanceledError=Wt,he.CancelToken=WA,he.isCancel=yo,he.VERSION=xo,he.toFormData=$t,he.AxiosError=se,he.Cancel=he.CanceledError,he.all=function(t){return Promise.all(t)},he.spread=EA,he.isAxiosError=LA,he.mergeConfig=mt,he.AxiosHeaders=Qe,he.formToJSON=e=>go(w.isHTMLForm(e)?new FormData(e):e),he.getAdapter=Zo.getAdapter,he.HttpStatusCode=OA,he.default=he;const kA=he;/*! typescript-cookie v1.0.6 | MIT */const Mo=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Wo=e=>encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent),Pn=decodeURIComponent,Vn=e=>(e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent));function jA(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 Eo(e,t,n){const r=/(?:^|; )([^=]*)=([^;]*)/g,o={};let i;for(;(i=r.exec(document.cookie))!=null;)try{const a=n(i[1]);if(o[a]=t(i[2],a),e===a)break}catch{}return e!=null?o[e]:o}const Lo=Object.freeze({decodeName:Pn,decodeValue:Vn,encodeName:Mo,encodeValue:Wo}),Bn=Object.freeze({path:"/"});function Oo(e,t,n=Bn,{encodeValue:r=Wo,encodeName:o=Mo}={}){return document.cookie=`${o(e)}=${r(t,e)}${jA(n)}`}function ko(e,{decodeValue:t=Vn,decodeName:n=Pn}={}){return Eo(e,t,n)}function zA({decodeValue:e=Vn,decodeName:t=Pn}={}){return Eo(void 0,e,t)}function YA(e,t=Bn){Oo(e,"",Object.assign({},t,{expires:-1}))}function Un(e,t){const n={set:function(o,i,a){return Oo(o,i,Object.assign({},this.attributes,a),{encodeValue:this.converter.write})},get:function(o){if(arguments.length===0)return zA(this.converter.read);if(o!=null)return ko(o,this.converter.read)},remove:function(o,i){YA(o,Object.assign({},this.attributes,i))},withAttributes:function(o){return Un(this.converter,Object.assign({},this.attributes,o))},withConverter:function(o){return Un(Object.assign({},this.converter,o),this.attributes)}},r={attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}};return Object.create(n,r)}Un({read:Lo.decodeValue,write:Lo.encodeValue},Bn);let jo;typeof window<"u"&&(jo=ko("token"));const ge=kA.create({headers:{Authorization:jo}});async function JA(e,t,n){return(await ge.post(n+"/createFlexVersionLinkMulti",{_id:e,networks:t})).data}async function NA(e,t){return e.network=="fb"&&(e.zip=1),(await ge.post(t+"/createFlexVersionLink",e||{})).data}async function DA(e,t,n){return(await ge.post(e+"/createImportedVersionLink",{_id:t,network:n})).data}async function RA(e,t,n,r,o){return(await ge.post(e+"/createPlayableVersionLink",{_id:t,network:n,isPfTest:r,extras:o})).data}async function GA(e,t,n){return(await ge.post(n+"/createPlayableVersionLinkMulti",{_id:e,networks:t})).data}async function TA(e,t,n,r,o){return(await ge.post(e+"/createReadyVersionLink",{_id:t,network:n,isPfTest:r,extras:o})).data}async function HA(e,t,n){return(await ge.post(n+"/createReadyVersionLinkMulti",{_id:e,networks:t})).data}async function XA(e,t,n,r,o,i,a,A){return(await ge.post(e+"/createFusionVersionLink",{_id:t,network:n,fusionData:r,isPfTest:o,extras:i,androidLink:a,iosLink:A})).data}async function QA(e,t){return(await ge.post(t+"/getCdnExportName",e||{})).data}async function PA(e,t){return(await ge.post(t+"/updateFlexUrl",e||{})).data}async function zo(e,t,n){return(await ge.post(n+"/updatePlayableVersion",{...t,_id:e})).data}function pt(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 Yo(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=Yo(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function _e(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Yo(e))&&(r&&(r+=" "),r+=t);return r}const Et=e=>typeof e=="number"&&!isNaN(e),nt=e=>typeof e=="string",we=e=>typeof e=="function",on=e=>nt(e)||we(e)?e:null,Fn=e=>C.isValidElement(e)||nt(e)||we(e)||Et(e);function VA(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function an(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:i=300}=e;return function(a){let{children:A,position:d,preventExitTransition:u,done:s,nodeRef:p,isIn:Z}=a;const v=r?`${t}--${d}`:t,q=r?`${n}--${d}`:n,m=C.useRef(0);return C.useLayoutEffect(()=>{const f=p.current,y=v.split(" "),I=M=>{M.target===p.current&&(f.dispatchEvent(new Event("d")),f.removeEventListener("animationend",I),f.removeEventListener("animationcancel",I),m.current===0&&M.type!=="animationcancel"&&f.classList.remove(...y))};f.classList.add(...y),f.addEventListener("animationend",I),f.addEventListener("animationcancel",I)},[]),C.useEffect(()=>{const f=p.current,y=()=>{f.removeEventListener("animationend",y),o?VA(f,s,i):s()};Z||(u?y():(m.current=1,f.className+=` ${q}`,f.addEventListener("animationend",y)))},[Z]),C.createElement(C.Fragment,null,A)}}function Jo(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 Le={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)})}},An=e=>{let{theme:t,type:n,...r}=e;return C.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...r})},_n={info:function(e){return C.createElement(An,{...e},C.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 C.createElement(An,{...e},C.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 C.createElement(An,{...e},C.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 C.createElement(An,{...e},C.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 C.createElement("div",{className:"Toastify__spinner"})}};function BA(e){const[,t]=C.useReducer(v=>v+1,0),[n,r]=C.useState([]),o=C.useRef(null),i=C.useRef(new Map).current,a=v=>n.indexOf(v)!==-1,A=C.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:a,getToast:v=>i.get(v)}).current;function d(v){let{containerId:q}=v;const{limit:m}=A.props;!m||q&&A.containerId!==q||(A.count-=A.queue.length,A.queue=[])}function u(v){r(q=>v==null?[]:q.filter(m=>m!==v))}function s(){const{toastContent:v,toastProps:q,staleId:m}=A.queue.shift();Z(v,q,m)}function p(v,q){let{delay:m,staleId:f,...y}=q;if(!Fn(v)||function(V){return!o.current||A.props.enableMultiContainer&&V.containerId!==A.props.containerId||i.has(V.toastId)&&V.updateId==null}(y))return;const{toastId:I,updateId:M,data:W}=y,{props:g}=A,R=()=>u(I),T=M==null;T&&A.count++;const E={...g,style:g.toastStyle,key:A.toastKey++,...Object.fromEntries(Object.entries(y).filter(V=>{let[oe,L]=V;return L!=null})),toastId:I,updateId:M,data:W,closeToast:R,isIn:!1,className:on(y.className||g.toastClassName),bodyClassName:on(y.bodyClassName||g.bodyClassName),progressClassName:on(y.progressClassName||g.progressClassName),autoClose:!y.isLoading&&(Q=y.autoClose,X=g.autoClose,Q===!1||Et(Q)&&Q>0?Q:X),deleteToast(){const V=Jo(i.get(I),"removed");i.delete(I),Le.emit(4,V);const oe=A.queue.length;if(A.count=I==null?A.count-A.displayedToast:A.count-1,A.count<0&&(A.count=0),oe>0){const L=I==null?A.props.limit:1;if(oe===1||L===1)A.displayedToast++,s();else{const k=L>oe?oe:L;A.displayedToast=k;for(let J=0;J<k;J++)s()}}else t()}};var Q,X;E.iconOut=function(V){let{theme:oe,type:L,isLoading:k,icon:J}=V,h=null;const z={theme:oe,type:L};return J===!1||(we(J)?h=J(z):C.isValidElement(J)?h=C.cloneElement(J,z):nt(J)||Et(J)?h=J:k?h=_n.spinner():(re=>re in _n)(L)&&(h=_n[L](z))),h}(E),we(y.onOpen)&&(E.onOpen=y.onOpen),we(y.onClose)&&(E.onClose=y.onClose),E.closeButton=g.closeButton,y.closeButton===!1||Fn(y.closeButton)?E.closeButton=y.closeButton:y.closeButton===!0&&(E.closeButton=!Fn(g.closeButton)||g.closeButton);let ie=v;C.isValidElement(v)&&!nt(v.type)?ie=C.cloneElement(v,{closeToast:R,toastProps:E,data:W}):we(v)&&(ie=v({closeToast:R,toastProps:E,data:W})),g.limit&&g.limit>0&&A.count>g.limit&&T?A.queue.push({toastContent:ie,toastProps:E,staleId:f}):Et(m)?setTimeout(()=>{Z(ie,E,f)},m):Z(ie,E,f)}function Z(v,q,m){const{toastId:f}=q;m&&i.delete(m);const y={content:v,props:q};i.set(f,y),r(I=>[...I,f].filter(M=>M!==m)),Le.emit(4,Jo(y,y.props.updateId==null?"added":"updated"))}return C.useEffect(()=>(A.containerId=e.containerId,Le.cancelEmit(3).on(0,p).on(1,v=>o.current&&u(v)).on(5,d).emit(2,A),()=>{i.clear(),Le.emit(3,A)}),[]),C.useEffect(()=>{A.props=e,A.isToastActive=a,A.displayedToast=n.length}),{getToastToRender:function(v){const q=new Map,m=Array.from(i.values());return e.newestOnTop&&m.reverse(),m.forEach(f=>{const{position:y}=f.props;q.has(y)||q.set(y,[]),q.get(y).push(f)}),Array.from(q,f=>v(f[0],f[1]))},containerRef:o,isToastActive:a}}function No(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function Do(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function UA(e){const[t,n]=C.useState(!1),[r,o]=C.useState(!1),i=C.useRef(null),a=C.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,A=C.useRef(e),{autoClose:d,pauseOnHover:u,closeToast:s,onClick:p,closeOnClick:Z}=e;function v(W){if(e.draggable){W.nativeEvent.type==="touchstart"&&W.nativeEvent.preventDefault(),a.didMove=!1,document.addEventListener("mousemove",y),document.addEventListener("mouseup",I),document.addEventListener("touchmove",y),document.addEventListener("touchend",I);const g=i.current;a.canCloseOnClick=!0,a.canDrag=!0,a.boundingRect=g.getBoundingClientRect(),g.style.transition="",a.x=No(W.nativeEvent),a.y=Do(W.nativeEvent),e.draggableDirection==="x"?(a.start=a.x,a.removalDistance=g.offsetWidth*(e.draggablePercent/100)):(a.start=a.y,a.removalDistance=g.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function q(W){if(a.boundingRect){const{top:g,bottom:R,left:T,right:E}=a.boundingRect;W.nativeEvent.type!=="touchend"&&e.pauseOnHover&&a.x>=T&&a.x<=E&&a.y>=g&&a.y<=R?f():m()}}function m(){n(!0)}function f(){n(!1)}function y(W){const g=i.current;a.canDrag&&g&&(a.didMove=!0,t&&f(),a.x=No(W),a.y=Do(W),a.delta=e.draggableDirection==="x"?a.x-a.start:a.y-a.start,a.start!==a.x&&(a.canCloseOnClick=!1),g.style.transform=`translate${e.draggableDirection}(${a.delta}px)`,g.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function I(){document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",I),document.removeEventListener("touchmove",y),document.removeEventListener("touchend",I);const W=i.current;if(a.canDrag&&a.didMove&&W){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),void e.closeToast();W.style.transition="transform 0.2s, opacity 0.2s",W.style.transform=`translate${e.draggableDirection}(0)`,W.style.opacity="1"}}C.useEffect(()=>{A.current=e}),C.useEffect(()=>(i.current&&i.current.addEventListener("d",m,{once:!0}),we(e.onOpen)&&e.onOpen(C.isValidElement(e.children)&&e.children.props),()=>{const W=A.current;we(W.onClose)&&W.onClose(C.isValidElement(W.children)&&W.children.props)}),[]),C.useEffect(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||f(),window.addEventListener("focus",m),window.addEventListener("blur",f)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",m),window.removeEventListener("blur",f))}),[e.pauseOnFocusLoss]);const M={onMouseDown:v,onTouchStart:v,onMouseUp:q,onTouchEnd:q};return d&&u&&(M.onMouseEnter=f,M.onMouseLeave=m),Z&&(M.onClick=W=>{p&&p(W),a.canCloseOnClick&&s()}),{playToast:m,pauseToast:f,isRunning:t,preventExitTransition:r,toastRef:i,eventHandlers:M}}function Ro(e){let{closeToast:t,theme:n,ariaLabel:r="close"}=e;return C.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:o=>{o.stopPropagation(),t(o)},"aria-label":r},C.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},C.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 FA(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:i,className:a,style:A,controlledProgress:d,progress:u,rtl:s,isIn:p,theme:Z}=e;const v=i||d&&u===0,q={...A,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused",opacity:v?0:1};d&&(q.transform=`scaleX(${u})`);const m=_e("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${Z}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":s}),f=we(a)?a({rtl:s,type:o,defaultClassName:m}):_e(m,a);return C.createElement("div",{role:"progressbar","aria-hidden":v?"true":"false","aria-label":"notification timer",className:f,style:q,[d&&u>=1?"onTransitionEnd":"onAnimationEnd"]:d&&u<1?null:()=>{p&&r()}})}const _A=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o}=UA(e),{closeButton:i,children:a,autoClose:A,onClick:d,type:u,hideProgressBar:s,closeToast:p,transition:Z,position:v,className:q,style:m,bodyClassName:f,bodyStyle:y,progressClassName:I,progressStyle:M,updateId:W,role:g,progress:R,rtl:T,toastId:E,deleteToast:Q,isIn:X,isLoading:ie,iconOut:V,closeOnClick:oe,theme:L}=e,k=_e("Toastify__toast",`Toastify__toast-theme--${L}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":T},{"Toastify__toast--close-on-click":oe}),J=we(q)?q({rtl:T,position:v,type:u,defaultClassName:k}):_e(k,q),h=!!R||!A,z={closeToast:p,type:u,theme:L};let re=null;return i===!1||(re=we(i)?i(z):C.isValidElement(i)?C.cloneElement(i,z):Ro(z)),C.createElement(Z,{isIn:X,done:Q,position:v,preventExitTransition:n,nodeRef:r},C.createElement("div",{id:E,onClick:d,className:J,...o,style:m,ref:r},C.createElement("div",{...X&&{role:g},className:we(f)?f({type:u}):_e("Toastify__toast-body",f),style:y},V!=null&&C.createElement("div",{className:_e("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!ie})},V),C.createElement("div",null,a)),re,C.createElement(FA,{...W&&!h?{key:`pb-${W}`}:{},rtl:T,theme:L,delay:A,isRunning:t,isIn:X,closeToast:p,hide:s,type:u,style:M,className:I,controlledProgress:h,progress:R||0})))},sn=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},$A=an(sn("bounce",!0));an(sn("slide",!0)),an(sn("zoom")),an(sn("flip"));const $n=C.forwardRef((e,t)=>{const{getToastToRender:n,containerRef:r,isToastActive:o}=BA(e),{className:i,style:a,rtl:A,containerId:d}=e;function u(s){const p=_e("Toastify__toast-container",`Toastify__toast-container--${s}`,{"Toastify__toast-container--rtl":A});return we(i)?i({position:s,rtl:A,defaultClassName:p}):_e(p,on(i))}return C.useEffect(()=>{t&&(t.current=r.current)},[]),C.createElement("div",{ref:r,className:"Toastify",id:d},n((s,p)=>{const Z=p.length?{...a}:{...a,pointerEvents:"none"};return C.createElement("div",{className:u(s),style:Z,key:`container-${s}`},p.map((v,q)=>{let{content:m,props:f}=v;return C.createElement(_A,{...f,isIn:o(f.toastId),style:{...f.style,"--nth":q+1,"--len":p.length},key:`toast-${f.key}`},m)}))}))});$n.displayName="ToastContainer",$n.defaultProps={position:"top-right",transition:$A,autoClose:5e3,closeButton:Ro,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let er,rt=new Map,Lt=[],es=1;function Go(){return""+es++}function ts(e){return e&&(nt(e.toastId)||Et(e.toastId))?e.toastId:Go()}function Ot(e,t){return rt.size>0?Le.emit(0,e,t):Lt.push({content:e,options:t}),t.toastId}function ln(e,t){return{...t,type:t&&t.type||e,toastId:ts(t)}}function un(e){return(t,n)=>Ot(t,ln(e,n))}function pe(e,t){return Ot(e,ln("default",t))}pe.loading=(e,t)=>Ot(e,ln("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),pe.promise=function(e,t,n){let r,{pending:o,error:i,success:a}=t;o&&(r=nt(o)?pe.loading(o,n):pe.loading(o.render,{...n,...o}));const A={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},d=(s,p,Z)=>{if(p==null)return void pe.dismiss(r);const v={type:s,...A,...n,data:Z},q=nt(p)?{render:p}:p;return r?pe.update(r,{...v,...q}):pe(q.render,{...v,...q}),Z},u=we(e)?e():e;return u.then(s=>d("success",a,s)).catch(s=>d("error",i,s)),u},pe.success=un("success"),pe.info=un("info"),pe.error=un("error"),pe.warning=un("warning"),pe.warn=pe.warning,pe.dark=(e,t)=>Ot(e,ln("default",{theme:"dark",...t})),pe.dismiss=e=>{rt.size>0?Le.emit(1,e):Lt=Lt.filter(t=>e!=null&&t.options.toastId!==e)},pe.clearWaitingQueue=function(e){return e===void 0&&(e={}),Le.emit(5,e)},pe.isActive=e=>{let t=!1;return rt.forEach(n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t},pe.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{const n=function(r,o){let{containerId:i}=o;const a=rt.get(i||er);return a&&a.getToast(r)}(e,t);if(n){const{props:r,content:o}=n,i={delay:100,...r,...t,toastId:t.toastId||e,updateId:Go()};i.toastId!==e&&(i.staleId=e);const a=i.render||o;delete i.render,Ot(a,i)}},0)},pe.done=e=>{pe.update(e,{progress:1})},pe.onChange=e=>(Le.on(4,e),()=>{Le.off(4,e)}),pe.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"},pe.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},Le.on(2,e=>{er=e.containerId||e,rt.set(er,e),Lt.forEach(t=>{Le.emit(0,t.content,t.options)}),Lt=[]}).on(3,e=>{rt.delete(e.containerId||e),rt.size===0&&Le.off(0).off(1).off(5)});function ot(e){pe.success(e,{position:"top-center",autoClose:650,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"light"})}let tr="",je="Playable",Ke=null,To=null,Ho;const nr=async(e,t,n)=>{je==="Playable"?t&&t.iosUrl!=="Loading..."&&t.googleUrl!=="Loading..."&&await zo(e,{iosLink:t==null?void 0:t.iosUrl,androidLink:t==null?void 0:t.googleUrl},Ke):je==="Flex"?t&&t.iosUrl!=="Loading..."&&t.googleUrl!=="Loading..."&&await PA({_id:e,iosLink:t==null?void 0:t.iosUrl,androidLink:t==null?void 0:t.googleUrl},Ke):je==="Ready"&&t&&t.iosUrl!=="Loading..."&&t.googleUrl!=="Loading..."&&((n==null?void 0:n.urlType)==="single"&&(t.googleUrl=t.iosUrl),await zo(e,{iosLink:t==null?void 0:t.iosUrl,androidLink:t==null?void 0:t.googleUrl},Ke))},cn=async e=>{let t=tr+"/"+e,n=e;fetch(t).then(r=>r.blob()).then(r=>{const o=window.URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=n.split("/").reduce((a,A)=>A,""),document.body.appendChild(i),i.click(),window.URL.revokeObjectURL(o),ot("Download successfully")}).catch(r=>{console.error("File error:",r)})},ns=(e,t)=>{let n=tr+"/"+e;pt(n)?ot("Link Copied"):t(n)};async function kt(e,t,n,r="download",o=!1,i=null){return new Promise(async(a,A)=>{let d=async u=>{r==="download"?await cn(u):r==="copy"&&ns(u,To)};try{await nr(e,n,i)}catch(u){console.log("updateUrls error",u)}je==="Playable"?RA(Ke,e,t,o,i).then(async u=>{let{url:s}=u;await d(s),a(u)}).catch(u=>{let s=u.response.data.error.msg;A({message:s})}):je==="Flex"?NA({_id:e,network:t,extras:i},Ke).then(async u=>{if(u.message){A(u);return}let{url:s}=u;await d(s),a(u)}).catch(u=>{let s=u.response.data.error.msg;A({message:s})}):je==="Import"?DA(Ke,e,t).then(async u=>{let s=u.url;await d(s),a(u)}).catch(u=>{let s=u.response.data.error.msg;A({message:s})}):je==="Ready"?TA(Ke,e,t,o,i).then(async u=>{if(u.message){A(u);return}let s=u.url;await d(s),a(u)}).catch(u=>{let s=u.response.data.error.msg;A({message:s})}):je==="Fusion"&&XA(Ke,e,t,Ho,o,i,n==null?void 0:n.googleUrl,n==null?void 0:n.iosUrl).then(async u=>{let s=u.url;await d(s),a(u)}).catch(u=>{let s=u.response.data.error.msg;A({message:s})})})}async function rs(e,t,n,r=null){return new Promise(async(o,i)=>{await nr(e,t,r),je==="Flex"?JA(e,n,Ke).then(async a=>{if(a.message){i(a);return}await cn(a.url),o(a.url)}).catch(a=>{let A=a.response.data.error.msg;i({message:A})}):je==="Ready"?HA(e,n,Ke).then(async a=>{if(a.message){i(a);return}await cn(a.url),o(a.url)}).catch(a=>{console.log("err",a);let A=a.response.data.error.msg;i({message:A})}):GA(e,n,Ke).then(async a=>{await cn(a.url),o(a.url)}).catch(a=>{let A=a.response.data.error.msg;i({message:A})})})}function os(e,t,n,r,o){je=e,Ke=t,To=n,tr=r,Ho=o}async function is(e){try{return await QA({versionId:e,checkExistance:!0},Ke)}catch{return null}}async function rr(e,t){return(await ge.post(t+"/findPlayable",{_id:e})).data}const as=({versionId:e,playableId:t,typeOfProduct:n,api:r,copyLinkUrl:o,setSafariCopyLink:i,qrUrl:a,iosLink:A,androidLink:d,urlType:u})=>{const[s,p]=C.useState(!1),Z=async()=>{p(!0),kt(e,"default",{iosUrl:A,googleUrl:d},null,!1,{urlType:u}).then(async v=>{var y,I,M,W;let q="";if(t&&(n==="Playable"||n==="Ready")){const g=await rr(t,r),R=(I=(y=g==null?void 0:g.data)==null?void 0:y.globalProps)==null?void 0:I.defaultLandscape,T=(W=(M=g==null?void 0:g.data)==null?void 0:M.globalProps)==null?void 0:W.defaultPhoneIndex;R&&(q+="&landscape=true"),T!==void 0&&(q+=`&phoneIndex=${T}`)}rr(t,r),p(!1);let m;n==="Flex"?m=`${o}/preview?versionId=${e}`:n==="Import"?m=`${o}/preview?versionId=${e}_`:n==="Ready"?m=`${o}/preview?versionId=${e}_&ready=true`:m=`${o}/preview?versionId=${e}_`,m+=q,pt(m)?ot("Link copied"):i(m),p(!1)}).catch(v=>{p(!1)})};return l.jsxs("div",{style:{display:"flex",height:"125px",width:"100%",borderRadius:"10px",backgroundColor:"#000000",padding:"10px"},children:[l.jsx("div",{style:{marginRight:"0.75rem",width:"50%",display:"flex",justifyContent:"center",alignItems:"center"},children:a?l.jsx(ba,{bgColor:"#0F0F1E",fgColor:"#ffffff",style:{height:"auto",maxWidth:"100%",width:"100%"},value:a}):l.jsx("img",{style:{width:"50px",height:"50px"},src:Ge,alt:"pf-logo-gif"})}),l.jsxs("div",{children:[l.jsx("div",{style:{marginBottom:"0.25rem",fontSize:"0.875rem",fontWeight:"bold",color:"white"},children:"Mobile testing"}),l.jsx("div",{style:{marginBottom:"1rem",fontSize:"0.75rem",color:"gray"},children:"Scan QR Code to test in any browser"}),l.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"0.375rem",backgroundColor:"#00a3ff57",color:"secondary-blue",cursor:"pointer"},onClick:()=>{s||Z()},children:l.jsxs(l.Fragment,{children:[l.jsx(Ur,{style:{height:"1.5rem",width:"1.5rem",stroke:"secondary-blue",color:"white"}}),l.jsx("div",{style:{height:"24px",display:"flex",alignItems:"center",justifyContent:"center",width:"80px"},children:s?l.jsx("img",{style:{height:"90%"},src:Ge,alt:"loading"}):l.jsx("button",{style:{fontSize:"1rem",color:"white",background:"rgba(0, 163, 255, 0)"},children:"Copy Link"})})]})})]})]})},As=({versionName:e,versionId:t,playableId:n,typeOfProduct:r,api:o,iframeUrl:i,fetchFileUrl:a,copyLinkUrl:A,setSafariCopyLink:d,iosLink:u,androidLink:s,urlType:p})=>{const[Z,v]=C.useState(window.innerWidth);console.log("iosLink",u),C.useEffect(()=>{console.log("re add event listener");function m(f){console.log(f),f.data==="cta"&&(console.log("Received 'cta' message from iframe"),u&&window.open(u,"_blank"))}return window.addEventListener("message",m,!1),()=>{window.removeEventListener("message",m)}},[u,s]),C.useEffect(()=>{const m=()=>{v(window.innerWidth)};return window.addEventListener("resize",m),()=>{window.removeEventListener("resize",m)}},[]);const q=(e==null?void 0:e.length)>25?e.slice(0,25)+"...":e;return l.jsxs("div",{style:{display:"flex",width:"300px",flexDirection:"column",justifyContent:"space-between",padding:"5px",height:Z>1440?"680px":"620px",borderRadius:"0px 0px 0px 16px",marginTop:"20px"},children:[l.jsx(Ni,{iframeUrl:i}),l.jsx(Di,{name:q}),l.jsx(as,{versionId:t,playableId:n,typeOfProduct:r,api:o,copyLinkUrl:A,setSafariCopyLink:d,qrUrl:i,iosLink:u,androidLink:s,urlType:p})]})};var ve=(e=>(e.Flex="#7101FF",e.Playable="#F9830B",e.Import="#00a3ff",e.Ready="#0060A5",e.Fusion="#171717",e))(ve||{});const Xo=({checked:e,typeOfProduct:t,id:n})=>{const[r,o]=C.useState(e);C.useEffect(()=>{o(e)},[e]);const i=()=>{o(!r)};return l.jsx("div",{style:{display:"inline-flex",alignItems:"center"},children:l.jsxs("label",{onClick:i,style:{position:"relative",display:"flex",cursor:"pointer",alignItems:"center"},htmlFor:n,children:[l.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:i}),l.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:[l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",style:{height:"14px",width:"14px"},viewBox:"0 0 20 20",fill:ve[t],stroke:ve[t],strokeWidth:"1",children:l.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"})})," "]})]})})},ss=({typeOfProduct:e,allNetworksSelected:t,setAllNetworksSelected:n})=>l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",marginBottom:"0.5rem"},children:[l.jsxs("div",{style:{fontSize:"2xl",fontWeight:"bold",display:"flex"},children:[l.jsx("span",{style:{color:ve[e]},children:"Select Network"}),l.jsx("span",{style:{whiteSpace:"pre"},children:" From List"})]}),l.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:[l.jsx(Xo,{checked:t,typeOfProduct:e,id:"asd"}),l.jsx("span",{style:{marginLeft:"0.5rem",fontSize:"16px",fontWeight:"bold"},children:"Select All"})]})]});async function ls(e,t){return(await ge.post(t+"/buyRequest",{requestType:e})).data}const us=()=>l.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsxs("g",{"clip-path":"url(#clip0_518_12094)",children:[l.jsx("path",{d:"M4.50977 11.99L19.4898 11.99",stroke:"#7101FF","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),l.jsx("path",{d:"M13.5068 17.977L19.4828 12L13.5068 6.02299",stroke:"#7101FF","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_518_12094",children:l.jsx("rect",{width:"24",height:"24",fill:"white",transform:"translate(0 24) rotate(-90)"})})})]}),cs=({creditDownload:e,api:t})=>l.jsxs(l.Fragment,{children:[l.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."}),l.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"," ",l.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.",l.jsxs("button",{style:{marginLeft:"0.5rem",display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",textDecoration:"underline",color:"#yourColorHere"},onClick:()=>ls("Flex Credit",t).then(n=>ot("You will be contacted regarding your request.")),children:["Get more",l.jsx(us,{})]})]})]}),Qo=({typeOfProduct:e,urls:t,handleIosChange:n,handleGoogleChange:r,disabled:o})=>{const i=A=>{n(A.target.value)},a=A=>{r(A.target.value)};return l.jsxs(l.Fragment,{children:[l.jsxs("div",{style:{display:"flex",height:"2rem",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"200"},children:[l.jsx("span",{style:{width:"5rem",fontWeight:"bold",flexShrink:0},children:"App Store:"}),l.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:ve[e],marginRight:"2rem"},type:"text",value:t.iosUrl,onChange:i,placeholder:"Ios Url",disabled:o})]}),l.jsxs("div",{style:{marginTop:"0.5rem",display:"flex",height:"2rem",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"100"},children:[l.jsxs("span",{style:{width:"5rem",fontWeight:"bold",flexShrink:0},children:["Google Play:"," "]}),l.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:ve[e],marginRight:"2rem"},type:"text",value:t.googleUrl,onChange:a,placeholder:"Google Url",disabled:o})]})]})},ds=({typeOfProduct:e,urls:t,handleIosChange:n,handleGoogleChange:r,disabled:o})=>{const i=a=>{n(a.target.value)};return l.jsx(l.Fragment,{children:l.jsxs("div",{style:{display:"flex",height:"2rem",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"200"},children:[l.jsx("span",{style:{width:"5rem",fontWeight:"bold",flexShrink:0},children:"Redirection URL:"}),l.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:ve[e],marginRight:"2rem"},type:"text",value:t.iosUrl,onChange:i,placeholder:"Ios Url",disabled:o})]})})},ms=({typeOfProduct:e,fileSize:t,urls:n,handleIosChange:r,handleGoogleChange:o,disabled:i,api:a,creditDownload:A,user:d,isTest:u,setIsTest:s,urlType:p,setUrlType:Z})=>{const v=()=>l.jsxs("div",{style:{display:"flex",height:"24px",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"100"},children:[l.jsxs("span",{style:{width:"5rem",fontWeight:"bold"},children:["Enable Test:"," "]}),l.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:ve[e]},type:"checkbox",checked:u,onChange:()=>{s(!u)},placeholder:"Google Url",disabled:i})]}),q=()=>l.jsx(l.Fragment,{children:l.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:[l.jsx("div",{style:{position:"absolute",bottom:"-3px",left:p==="single"?"50%":"0%",width:"50%",height:"3px",borderRadius:"2px",backgroundColor:"#12a9fe",transition:"all 0.2s ease-in-out"},id:"tab-switch-background"}),l.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(()=>{Z("game")},200)},children:l.jsx("span",{style:{position:"relative",color:p==="game"?"#000":"#a3a3a3",fontWeight:p==="game"?"bold":"normal",transition:"all 0.2s ease-in-out"},id:"game-tab",children:"App"})},"gameTab"),l.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(()=>{Z("single")},200)},children:l.jsx("span",{style:{position:"relative",color:p==="single"?"#000":"#a3a3a3",fontWeight:p==="single"?"bold":"normal",transition:"all 0.2s ease-in-out"},id:"single-tab",children:"Website"})},"singleTab")]})});return l.jsx(l.Fragment,{children:e!=="Import"&&l.jsxs("div",{style:{display:"flex",width:"100%",flexDirection:"column"},children:[d.customer=="playableFactoryInternal"&&e==="Playable"&&l.jsx(v,{}),e==="Ready"?l.jsxs(l.Fragment,{children:[l.jsx(q,{}),p==="game"&&l.jsx(Qo,{typeOfProduct:e,urls:n,handleIosChange:r,handleGoogleChange:o,disabled:i}),p==="single"&&l.jsx(ds,{typeOfProduct:e,urls:n,handleIosChange:r,handleGoogleChange:o,disabled:i})]}):l.jsx(l.Fragment,{children:l.jsx(Qo,{typeOfProduct:e,urls:n,handleIosChange:r,handleGoogleChange:o,disabled:i})}),(A==null?void 0:A.willSpendCredit)&&l.jsx(cs,{creditDownload:A,api:a})]})})},ps=({typeOfProduct:e,title:t,fileSize:n})=>l.jsxs("div",{style:{fontSize:"1.5rem",fontWeight:"bold",paddingTop:"20px"},children:[l.jsx("span",{style:{color:ve[e]},children:t}),n&&l.jsxs("span",{style:{fontSize:"14px",fontWeight:"bold",marginLeft:"30px",color:"#87878E"},children:["File size: ",parseFloat(n).toFixed(2)," mb"]})]}),fs=({typeOfProduct:e,fileSize:t,urls:n,title:r,handleIosChange:o,handleGoogleChange:i,disabled:a,creditDownload:A,api:d,user:u,isTest:s,setIsTest:p,urlType:Z,setUrlType:v,allNetworksSelected:q,setAllNetworksSelected:m})=>l.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:[l.jsx(ps,{typeOfProduct:e,title:r,fileSize:t}),l.jsx(ms,{typeOfProduct:e,fileSize:t,urls:n,handleIosChange:o,handleGoogleChange:i,disabled:a,creditDownload:A,api:d,user:u,isTest:s,setIsTest:p,urlType:Z,setUrlType:v}),l.jsx(ss,{typeOfProduct:e,allNetworksSelected:q,setAllNetworksSelected:m})]}),or=({children:e,className:t,onClickDonwload:n,downloading:r,disabled:o})=>l.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||o,children:e}),Mu="",hs=({typeOfProduct:e})=>l.jsx("div",{style:{backgroundColor:"transparent",display:"flex",alignItems:"center",flexDirection:"column"},children:l.jsxs("div",{style:{position:"relative",width:"64px",height:"16px",marginTop:"8px"},children:[l.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:ve[e]}}),l.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:ve[e]}}),l.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:ve[e]}}),l.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:ve[e]}})]})}),jt=({isNetworksLoading:e=!1})=>l.jsx("div",{style:{display:"flex",height:"100%",width:"90px",alignItems:"center",justifyContent:"center"},children:l.jsx("img",{width:e?"100px":"25px",height:e?"100px":"25px",src:Ge,alt:"pf-logo-gif"})}),ir=({title:e,titleId:t,...n})=>l.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?l.jsx("title",{id:t,children:e}):null,l.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"})]}),gs=({onClose:e,iosLink:t,googleLink:n,buttonType:r,handleCopyLink:o,download:i,typeOfProduct:a,urlType:A})=>{let d="";return a==="Ready"&&A==="single"?d="Redirection url is empty. Are you sure you want to continue?":!t&&!n?d="Both links are empty. Are you sure you want to continue?":t?n||(d="Google link is empty. Are you sure you want to continue?"):d="iOS link is empty. Are you sure you want to continue?",l.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:[l.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),l.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:[l.jsx("h1",{style:{textAlign:"center",fontSize:"18px",lineHeight:"24px"},children:d}),l.jsxs("div",{style:{display:"flex",gap:"5px"},children:[l.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:"No"}),l.jsx("button",{onClick:async u=>{r==="download"?await i():r==="copyLink"&&await o(),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:"Yes"})]})]})]})},ar=({onClose:e,handleCopyLink:t,download:n,creditConfirmType:r,getDownloadCount:o,width:i="130%",height:a="120%"})=>l.jsxs("div",{style:{position:"fixed",top:0,left:0,zIndex:50,display:"flex",height:a,width:i,alignItems:"center",justifyContent:"center",backgroundColor:"#00000080"},children:[l.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%"}}),l.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:[l.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?"}),l.jsxs("div",{style:{display:"flex",gap:"5px"},children:[l.jsx("button",{onClick:e,style:{flex:1,cursor:"pointer",borderRadius:"4px",borderWidth:"1px",borderColor:"dark-50",padding:"2px",fontWeight:"bold"},children:"No"}),l.jsx("button",{style:{flex:1,cursor:"pointer",borderRadius:"4px",borderWidth:"1px",borderColor:"#F9830B",backgroundColor:"#F9830B",padding:"2px",fontWeight:"bold",color:"white"},onClick:async A=>{A.preventDefault(),A.stopPropagation(),r==="download"?(await n(),await o()):r==="copy"&&(await t(),await o()),e()},children:"Yes"})]})]})]}),qs=({onClose:e,handleDownload:t,handleDownloadMolocoTest:n,downloadingMoloco:r,downloadingMolocoTest:o,downloadingMolocoHtml:i})=>l.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:[l.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),l.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:l.jsxs("div",{style:{display:"flex",gap:"5px",flexDirection:"column"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"center"},children:[r?l.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:l.jsx("img",{width:"25px",height:"25px",src:Ge,alt:"pf-logo-gif"})}):l.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"}),i?l.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:l.jsx("img",{width:"25px",height:"25px",src:Ge,alt:"pf-logo-gif"})}):l.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"})]}),l.jsx("div",{style:{display:"flex",justifyContent:"center"},children:o?l.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:l.jsx("img",{width:"25px",height:"25px",src:Ge,alt:"pf-logo-gif"})}):l.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 ys(e,t,n,r){return(await ge.post(e+"/createMolocoTestPage",{_id:t,network:n,typeOfProduct:r})).data}const vs=({id:e,imageUrl:t,handleCardClick:n,selected:r,name:o,networkVersionSize:i,fileSizeLoading:a,showCheckBox:A,typeOfProduct:d,versionId:u,api:s,handleDownloadError:p,fetchFileUrl:Z,urls:v,game:q,setIsConfirmActive:m,creditDownload:f,getDownloadCount:y,disabled:I,user:M,setSafariCopyLink:W,isTest:g,urlType:R,setCdnModal:T,generateCDN:E,cdnUrl:Q})=>{const[X,ie]=C.useState(!1),[V,oe]=C.useState(""),[L,k]=C.useState(!1),[J,h]=C.useState(!1),[z,re]=C.useState(!1),[b,S]=C.useState("download"),[G,Y]=C.useState(!1),[N,B]=C.useState(!1),[P,H]=C.useState(!1);let U={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 te={cdn:"Generate Link",adikteev:"Copy CDN"},x=()=>{n(e)},ae=async(D,ee)=>{const qe={molocoGenerateHtml:!1,urlType:R};if(_&&(ee==="copy"?(B(!0),ee="download",qe.molocoGenerateHtml=!0):Y(!0)),console.log("getVersion",D,ee,qe),D==="cdn"){T(!0),await E(!0);return}return D==="adikteev"&&(ee="copy"),ie(!0),new Promise((vt,et)=>{kt(u,D,v,ee,g,qe).then(ct=>{ie(!1),vt(ct),B(!1),Y(!1)}).catch(ct=>{ie(!1),p(ct.message,ct),et(ct),B(!1),Y(!1)})})},O=async(D=!1)=>{D?B(!0):Y(!0);const ee={molocoGenerateHtml:!1};D&&(ee.molocoGenerateHtml=!0),kt(u,o,v,"download",g,ee).then(qe=>{D?B(!1):Y(!1),re(!1)}).catch(qe=>{p(qe.message,qe)})},ne=async()=>{H(!0);const D=await ys(s,u,o,d);let ee=`${Z}/${D==null?void 0:D.url}`;pt(ee)?(ot("Link Copied"),H(!1)):W(ee)},_=o==="moloco"||o==="molocoV2";return l.jsxs(l.Fragment,{children:[l.jsxs("div",{style:{position:"relative",display:"flex",flexDirection:"column",gap:"20px",padding:"16px",borderColor:r?ve[d]:"lightgray",borderWidth:"1px",borderStyle:"solid",backgroundColor:"white",width:"100%",height:"175px",borderRadius:"8px",cursor:"pointer"},className:"border-hover-"+d,onClick:x,children:[l.jsxs("div",{style:{marginTop:o=="web"?"10px":"40px",display:"flex",justifyContent:"center"},children:[l.jsx("div",{style:{position:"absolute",right:"0",top:"0",padding:"8px"},children:l.jsx("div",{children:i&&i.map(D=>D.network).includes(o)?a?l.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:l.jsx(hs,{typeOfProduct:d})}):i.map(D=>l.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:D.network===o?D.size.toString().slice(0,5)+"Mb":""},D.network)):null})}),l.jsx("div",{style:{position:"absolute",top:"0",left:"0",padding:"0.5rem"},children:(d==="Playable"||d==="Ready"||d==="Flex")&&A&&l.jsx(Xo,{checked:r,typeOfProduct:d,id:e})}),l.jsx("img",{onClick:x,style:{width:"30rem",height:o=="web"?"80px":"50px",objectFit:"contain"},src:t})]}),l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"0.25rem"},children:[l.jsx(or,{className:`${_?"w-1/2":"w-2/3"} border-hover-`+d,downloading:X,onClickDonwload:async D=>{if(D.stopPropagation(),_&&M.customer==="playableFactoryInternal"){re(!0);return}else{oe("download");const ee=v.iosUrl,qe=v.googleUrl;o==="cdn"&&f&&f.willSpendCredit&&!Q||o!=="cdn"&&f&&f.willSpendCredit?(m(!0),S("download"),k(!0)):["Playable","Flex"].includes(d)&&(!ee||!qe)||d==="Ready"&&R==="single"&&!ee||d==="Ready"&&R==="multi"&&(!ee||!qe)?(m(!0),h(!0)):(h(!1),k(!1),await ae(o,"download"))}},children:_?l.jsxs(l.Fragment,{children:[!G&&l.jsxs(l.Fragment,{children:[l.jsx(ir,{style:{marginRight:"0.5rem",height:"1.5rem",width:"1rem",stroke:"dark-full"}}),M.customer!=="playableFactoryInternal"?"TXT":"Download"]}),G&&l.jsx(jt,{})]}):l.jsxs(l.Fragment,{children:[!X&&l.jsxs(l.Fragment,{children:[l.jsx(ir,{style:{marginRight:"0.5rem",height:"1.5rem",width:"1rem",stroke:"dark-full"}}),te[o]||"Download"]}),X&&l.jsx(jt,{})]})}),U[o]&&U[o].includes("copy")&&l.jsx(or,{className:"w-1/3 border-hover-"+d,onClickDonwload:async D=>{D.stopPropagation(),oe("copyLink");const ee=v.iosUrl,qe=v.googleUrl;f&&(f!=null&&f.willSpendCredit)?(S("copy"),m(!0),k(!0)):d!=="Import"&&(!ee||!qe)?(m(!0),h(!0)):(k(!1),h(!1),await ae(o,"copy"))},disabled:I,children:l.jsx(Ur,{className:"h-6 w-6 stroke-dark-full"})}),_&&M.customer!=="playableFactoryInternal"&&l.jsxs(or,{className:"w-1/2 border-hover-"+d,onClickDonwload:async D=>{D.stopPropagation(),oe("copyLink");const ee=v.iosUrl,qe=v.googleUrl;f&&(f!=null&&f.willSpendCredit)?(S("download"),m(!0),k(!0)):d!=="Import"&&(!ee||!qe)?(m(!0),h(!0)):(k(!1),h(!1),await O(!0))},disabled:I,children:[!N&&l.jsxs(l.Fragment,{children:[l.jsx(ir,{style:{marginRight:"0.5rem",height:"1.5rem",width:"1rem",stroke:"dark-full"}}),"HTML"]}),N&&l.jsx(jt,{})]})]}),_&&l.jsx("img",{style:{position:"absolute",width:"135px",right:"0",top:"18px"},src:"https://home.playablefactory.app/recommended_badge.png"})]}),L&&l.jsx(ar,{creditConfirmType:b,handleCopyLink:async()=>{h(!1),m(!1),await ae(o,"copy")},download:async()=>{h(!1),m(!1),await ae(o,"download")},onClose:()=>{k(!1),m(!1)},getDownloadCount:y}),J&&l.jsx(gs,{onClose:()=>{h(!1),m(!1)},iosLink:v.iosUrl,googleLink:v.googleUrl,buttonType:V,handleCopyLink:async()=>{h(!1),m(!1),await ae(o,"copy")},download:async()=>{h(!1),m(!1),await ae(o,"download")},typeOfProduct:d,urlType:R}),z&&M.customer==="playableFactoryInternal"&&l.jsx(qs,{onClose:()=>{re(!1)},handleDownload:O,handleDownloadMolocoTest:ne,downloadingMoloco:G,donwloadintMolocoTest:P,downloadingMolocoHtml:N})]})},dn=[{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"}],bs=({children:e,typeOfProduct:t,className:n,onClick:r})=>{const o={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"0.5rem",width:"12rem",height:"2.5rem",backgroundColor:ve[t],color:"white",fontSize:"0.875rem",borderRadius:"0.875rem"};return l.jsx("button",{onClick:r,className:n,style:o,children:e})},Cs=({networksVersionTotalSize:e,typeOfProduct:t,onClickMultiDownload:n,multiDownloading:r})=>l.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"8px"},children:r?l.jsx("div",{style:{display:"flex",width:"12rem",height:"2.5rem",borderRadius:"0.875rem",alignItems:"center",justifyContent:"center",backgroundColor:ve[t]},children:l.jsx(jt,{})}):l.jsx(bs,{typeOfProduct:t,onClick:n,children:l.jsx("span",{style:{fontSize:"1.25rem",padding:"0.5rem",color:"#fff"},children:"Download All"})})}),Po=({title:e,titleId:t})=>l.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:[l.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"}),l.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"})]}),Zs=({onClose:e,cdnUrl:t,generateCDN:n,cdnUploading:r})=>l.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:[l.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),l.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:o=>{o.stopPropagation()},children:l.jsxs("div",{style:{display:"flex",gap:"5px",flexDirection:"column"},children:[l.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&&l.jsx("img",{width:"30px",src:Ge,alt:"pf-logo-gif"})]}),l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f6f6f6",height:"60px",color:"#737373"},children:[l.jsx("div",{style:{width:"66px",height:"100%",borderRight:"1px solid #e1e1e1",display:"flex",justifyContent:"center",alignItems:"center",flexShrink:0},children:l.jsx(Po,{})}),l.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",position:"relative",maxWidth:"68%"},children:l.jsx("a",{style:{textAlign:"center",overflow:"hidden",textOverflow:"ellipsis"},href:t,target:"_blank",children:t||"No CDN link generated"})}),l.jsx("button",{onClick:()=>{if(!t)return;pt(t)&&ot("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 Is=0;function Vo(e,t){const n=`atom${++Is}`,r={toString(){return n}};return typeof e=="function"?r.read=e:(r.init=e,r.read=ws,r.write=xs),t&&(r.write=t),r}function ws(e){return e(this)}function xs(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}const Bo=(e,t)=>e.unstable_is?e.unstable_is(t):t===e,Uo=e=>"init"in e,Fo=e=>!!e.write,zt=Symbol(""),Ar="pending",Ks="fulfilled",Ss="rejected",Ms=e=>typeof e=="object"&&e!==null&&zt in e,mn=new WeakMap,Ws=(e,t,n)=>{if(!mn.has(e)){let r;const o=new Promise((i,a)=>{let A=e;const d=s=>p=>{A===s&&(o.status=Ks,o.value=p,i(p),n())},u=s=>p=>{A===s&&(o.status=Ss,o.reason=p,a(p),n())};e.then(d(e),u(e)),r=(s,p)=>{s&&(mn.set(s,o),A=s,s.then(d(s),u(s)),t(),t=p)}});o.status=Ar,o[zt]=r,mn.set(e,o)}return mn.get(e)},Es=e=>typeof(e==null?void 0:e.then)=="function",_o=e=>"v"in e||"e"in e,pn=e=>{if("e"in e)throw e.e;return e.v},fn=e=>{const t=e.v;return Ms(t)&&t.status===Ar?t:null},$o=(e,t,n)=>{n.p.has(e)||(n.p.add(e),t.then(()=>{n.p.delete(e)},()=>{n.p.delete(e)}))},Yt=()=>[new Map,new Map,new Set],ei=(e,t,n)=>{e[0].has(t)||e[0].set(t,new Set),e[1].set(t,n)},Ls=(e,t,n)=>{const r=e[0].get(t);r&&r.add(n)},Os=(e,t)=>e[0].get(t),ti=(e,t)=>{e[2].add(t)},ft=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 o;return(o=r.m)==null?void 0:o.l.forEach(i=>i())}),n.forEach(r=>r())}},ks=()=>{const e=new WeakMap;let t;const n=m=>{let f=e.get(m);return f||(f={d:new Map,p:new Set,n:0},e.set(m,f)),f},r=(m,f,y,I=()=>{},M=()=>{})=>{const W="v"in f,g=f.v,R=fn(f);if(Es(y))if(R)R!==y&&(R[zt](y,I),++f.n);else{const T=Ws(y,I,M);if(T.status===Ar)for(const E of f.d.keys()){const Q=n(E);$o(m,T,Q)}f.v=T,delete f.e}else R&&R[zt](Promise.resolve(y),I),f.v=y,delete f.e;(!W||!Object.is(g,f.v))&&++f.n},o=(m,f,y,I)=>{var M;const W=n(f);W.d.set(y,I.n);const g=fn(W);g&&$o(f,g,I),(M=I.m)==null||M.t.add(f),m&&Ls(m,y,f)},i=(m,f,y)=>{const I=n(f);if(!(y!=null&&y(f))&&_o(I)&&(I.m||Array.from(I.d).every(([E,Q])=>i(m,E,y).n===Q)))return I;I.d.clear();let M=!0;const W=E=>{if(Bo(f,E)){const X=n(E);if(!_o(X))if(Uo(E))r(E,X,E.init);else throw new Error("no atom init");return pn(X)}const Q=i(m,E,y);if(M)o(m,f,E,Q);else{const X=Yt();o(X,f,E,Q),s(X,f,I),ft(X)}return pn(Q)};let g,R;const T={get signal(){return g||(g=new AbortController),g.signal},get setSelf(){return!R&&Fo(f)&&(R=(...E)=>{if(!M)return u(f,...E)}),R}};try{const E=f.read(W,T);return r(f,I,E,()=>g==null?void 0:g.abort(),()=>{if(I.m){const Q=Yt();s(Q,f,I),ft(Q)}}),I}catch(E){return delete I.v,I.e=E,++I.n,I}finally{M=!1}},a=m=>pn(i(void 0,m)),A=(m,f)=>{const y=T=>{var E,Q;const X=n(T),ie=new Set((E=X.m)==null?void 0:E.t);for(const V of X.p)ie.add(V);return(Q=Os(m,T))==null||Q.forEach(V=>{ie.add(V)}),ie},I=[],M=new Set,W=T=>{if(!M.has(T)){M.add(T);for(const E of y(T))T!==E&&W(E);I.push(T)}};W(f);const g=new Set([f]),R=T=>M.has(T);for(let T=I.length-1;T>=0;--T){const E=I[T],Q=n(E),X=Q.n;let ie=!1;for(const V of Q.d.keys())if(V!==E&&g.has(V)){ie=!0;break}ie&&(i(m,E,R),s(m,E,Q),X!==Q.n&&(ei(m,E,Q),g.add(E))),M.delete(E)}},d=(m,f,...y)=>{const I=g=>pn(i(m,g)),M=(g,...R)=>{let T;if(Bo(f,g)){if(!Uo(g))throw new Error("atom not writable");const E=n(g),Q="v"in E,X=E.v,ie=R[0];r(g,E,ie),s(m,g,E),(!Q||!Object.is(X,E.v))&&(ei(m,g,E),A(m,g))}else T=d(m,g,...R);return ft(m),T};return f.write(I,M,...y)},u=(m,...f)=>{const y=Yt(),I=d(y,m,...f);return ft(y),I},s=(m,f,y)=>{if(y.m&&!fn(y)){for(const I of y.d.keys())y.m.d.has(I)||(p(m,I).t.add(f),y.m.d.add(I));for(const I of y.m.d||[])if(!y.d.has(I)){y.m.d.delete(I);const M=Z(m,I);M==null||M.t.delete(f)}}},p=(m,f)=>{const y=n(f);if(!y.m){i(m,f);for(const I of y.d.keys())p(m,I).t.add(f);if(y.m={l:new Set,d:new Set(y.d.keys()),t:new Set},Fo(f)&&f.onMount){const I=y.m,{onMount:M}=f;ti(m,()=>{const W=M((...g)=>d(m,f,...g));W&&(I.u=W)})}}return y.m},Z=(m,f)=>{const y=n(f);if(y.m&&!y.m.l.size&&!Array.from(y.m.t).some(I=>{var M;return(M=n(I).m)==null?void 0:M.d.has(f)})){const I=y.m.u;I&&ti(m,I),delete y.m;for(const W of y.d.keys()){const g=Z(m,W);g==null||g.t.delete(f)}const M=fn(y);M&&M[zt](void 0,()=>{});return}return y.m};return{get:a,set:u,sub:(m,f)=>{const y=Yt(),I=p(y,m);ft(y);const M=I.l;return M.add(f),()=>{M.delete(f);const W=Yt();Z(W,m),ft(W)}}}};let sr;const js=()=>(sr||(sr=ks()),sr),zs=C.createContext(void 0),ni=e=>{const t=C.useContext(zs);return(e==null?void 0:e.store)||t||js()},Ys=e=>typeof(e==null?void 0:e.then)=="function",Js=C.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 Ns(e,t){const n=ni(t),[[r,o,i],a]=C.useReducer(u=>{const s=n.get(e);return Object.is(u[0],s)&&u[1]===n&&u[2]===e?u:[s,n,e]},void 0,()=>[n.get(e),n,e]);let A=r;(o!==n||i!==e)&&(a(),A=n.get(e));const d=t==null?void 0:t.delay;return C.useEffect(()=>{const u=n.sub(e,()=>{if(typeof d=="number"){setTimeout(a,d);return}a()});return a(),u},[n,e,d]),C.useDebugValue(A),Ys(A)?Js(A):A}function Ds(e,t){const n=ni(t);return C.useCallback((...o)=>n.set(e,...o),[n,e])}function hn(e,t){return[Ns(e,t),Ds(e,t)]}const ri=Vo(""),oi=Vo(!1),Rs=({onClose:e,url:t})=>l.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:[l.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),l.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:l.jsx("div",{style:{display:"flex",gap:"5px",flexDirection:"column"},children:l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f6f6f6",height:"60px",color:"#737373"},children:[l.jsx("div",{style:{width:"66px",height:"100%",borderRight:"1px solid #e1e1e1",display:"flex",justifyContent:"center",alignItems:"center",flexShrink:0},children:l.jsx(Po,{})}),l.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",position:"relative",maxWidth:"68%"},children:l.jsx("a",{style:{textAlign:"center",overflow:"hidden",textOverflow:"ellipsis"},href:t,target:"_blank",children:t||l.jsx("img",{width:"30px",src:Ge,alt:"pf-logo-gif"})})}),l.jsx("button",{onClick:()=>{if(!t)return;pt(t)&&ot("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"})]})})})]}),Gs=({playable:e,creditDownload:t,visible:n,versionId:r,typeOfProduct:o,api:i,user:a,handleDownloadError:A,fetchFileUrl:d,urls:u,game:s,getDownloadCount:p,disabled:Z,setSafariCopyLink:v,isTest:q,urlType:m,allNetworksSelected:f,cdnModal:y,setCdnModal:I,cdnUrl:M,setCdnUrl:W})=>{const[g,R]=C.useState([]),[T,E]=C.useState([]),[Q,X]=C.useState(!1),[ie,V]=C.useState(""),[oe,L]=C.useState(!1),[k,J]=C.useState(!1),[h,z]=C.useState("download"),[re,b]=C.useState(!1),[S,G]=C.useState(!1),[Y,N]=C.useState(!1),[B,P]=hn(ri),[H,U]=hn(oi),te=async(ne=!1)=>{ne&&M||Y||(N(!0),kt(r,"cdn",u,null,!1,{}).then(_=>{W(_.url),N(!1)}).catch(_=>{A(_.message,_),N(!1)}))},x=async ne=>{const _=[...g];if(g.includes(ne)){const D=_.findIndex(ee=>ee===ne);_.splice(D,1),R(_)}else _.push(ne),R([...g,ne]);dn.filter(D=>[..._].includes(D.id)).map(D=>D.name)},ae=async()=>new Promise(async(ne,_)=>{const D=dn.filter(ee=>[...g].includes(ee.id)).map(ee=>ee.name);L(!0),rs(r,u,D,{urlType:m}).then(ee=>{L(!1),ne(ee)}).catch(ee=>{console.log("get multi download err"),L(!1),A(ee.message,ee),_(ee)})}),O=async()=>{u.iosUrl,u.googleUrl,t&&t.willSpendCredit?(J(!0),z("download"),b(!0)):(b(!1),await ae())};return C.useEffect(()=>{const ne=dn.filter(_=>{var D;return t&&((D=t==null?void 0:t.networks)==null?void 0:D.length)>0?t==null?void 0:t.networks.includes(_.name):o==="Import"?e==null?void 0:e.networks.filter(ee=>ee.status==="paid").some(ee=>ee.name===_.name):(e==null?void 0:e.networks.includes(_.name))||(s==null?void 0:s.networks.includes(_.name))}).filter(_=>_.name==="voodoo"?a.customer==="customer:20":!0).map(_=>_.id);R(f?ne:[])},[f]),l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{position:"relative",flex:1,overflowY:k?"hidden":"auto",padding:"1.5rem",paddingTop:"0"},children:l.jsx("div",{style:{display:"grid",gridTemplateColumns:"180px 180px 180px",gap:"1rem",overflowY:"auto",padding:"0.75rem"},children:n&&dn.filter(ne=>{var _;return t&&((_=t==null?void 0:t.networks)==null?void 0:_.length)>0?t==null?void 0:t.networks.includes(ne.name):o==="Import"?e==null?void 0:e.networks.filter(D=>D.status==="paid").some(D=>D.name===ne.name):(e==null?void 0:e.networks.includes(ne.name))||(s==null?void 0:s.networks.includes(ne.name))}).filter(ne=>ne.name==="voodoo"?a.customer==="customer:20":!0).map(ne=>{let _=ne.imageSrc;if(ne.name==="web"){let D="web_"+o.toLowerCase()+".png";_=_.replace("web.png",D)}return l.jsx(vs,{id:ne.id,name:ne.name,imageUrl:_,selected:g.includes(ne.id),handleCardClick:x,networkVersionSize:T,fileSizeLoading:Q,showCheckBox:!0,typeOfProduct:o,versionId:r,api:i,handleDownloadError:A,fetchFileUrl:d,urls:u,game:s,creditDownload:t,setIsConfirmActive:J,getDownloadCount:p,disabled:Z,user:a,setSafariCopyLink:v,isTest:q,urlType:m,setCdnModal:I,generateCDN:te,cdnUrl:M},ne.id)})})}),g.length>1&&(o==="Playable"||o==="Ready"||o==="Flex")&&l.jsx("div",{style:{position:"fixed",bottom:"0",left:"65%",zIndex:20,transform:"translateX(-50%)",display:"flex",flexDirection:"column",paddingTop:"5px"},children:l.jsx(Cs,{onClickMultiDownload:O,networksVersionTotalSize:ie,typeOfProduct:o,multiDownloading:oe})}),y&&l.jsx(Zs,{onClose:()=>{I(!1),p()},versionId:r,urls:u,handleDownloadError:A,cdnUrl:M,setCdnUrl:W,generateCDN:async()=>{if(!Y){if(a.customer==="playableFactoryInternal"){te();return}G(!0)}},cdnUploading:Y}),H&&l.jsx(Rs,{onClose:()=>{U(!1)},url:B}),S&&l.jsx(ar,{width:"100%",height:"100%",creditConfirmType:h,handleCopyLink:async()=>{},download:async()=>{b(!1),G(!1),te()},onClose:()=>{b(!1),G(!1),N(!1)},getDownloadCount:p}),re&&l.jsx(ar,{creditConfirmType:h,handleCopyLink:async()=>{},download:async()=>{b(!1),J(!1),await ae()},onClose:()=>{b(!1),J(!1)},getDownloadCount:p})]})};async function Ts(e,t){return(await ge.post(t+"/getFlexDownloadCount",e)).data}async function Hs(e,t){try{return(await ge.post(t+"/findGame",{_id:e})).data}catch{}}async function Xs(e,t){return(await ge.post(t+"/getPlayableVersionMarketLink",{_id:e})).data}async function Qs(e,t){return(await ge.post(t+"/getFlexData",{_id:e})).data}async function Ps(e,t){return(await ge.post(t+"/getImportedPlayable",{id:e})).data}async function Vs(e,t){return(await ge.post(t+"/getReadyDownloadCount",e)).data}const Bs=["adcolony","ironsource","applovin","unity","mobvista","criteo","kayzen","vungle","moloco","inmobi"],lr=["web","adcolony","applovin","chartboost","crossinstall","fb","google","ironsource","lifestreet","liftoff","mobvista","nucleo","tapjoy","toutiao","unity","vungle","moloco","cdn"];let ii=null;const Us=({playableId:e,versionId:t,gameId:n,typeOfProduct:r,visible:o,api:i,user:a,title:A,handleDownloadError:d,fetchFileUrl:u,fileSize:s,setFileSize:p,setSafariCopyLink:Z,iosLink:v,androidLink:q,setIosLink:m,setAndroidLink:f,urlType:y,setUrlType:I})=>{const[M,W]=C.useState(null),[g,R]=C.useState(null),[T,E]=C.useState(null),[Q,X]=C.useState(!1),[ie,V]=C.useState(!0),[oe,L]=C.useState(window.innerWidth),[k,J]=C.useState(!1),[h,z]=C.useState(!1),[re,b]=C.useState("");hn(ri),hn(oi),C.useEffect(()=>{!re&&r!=="Fusion"&&is(t).then(x=>{x!=null&&x.exist&&b(x.uploadPath)})},[re]),console.log("download modal version: 6.0.45");const[S,G]=C.useState(!1);C.useEffect(()=>{},[S]),C.useEffect(()=>{const x=()=>{L(window.innerWidth)};return window.addEventListener("resize",x),()=>{window.removeEventListener("resize",x)}},[]);const Y=async()=>{X(!0);const x=await rr(e,i);return x!=null&&x.networks||(x.networks=Bs),W(x),x},N=(x,ae)=>{clearTimeout(ii),ii=setTimeout(()=>{nr(t,{iosUrl:x,googleUrl:ae},{urlType:y})},1e3)},B=x=>{m(x),N(x,q)},P=x=>{f(x),N(v,x)},H=async(x,ae)=>{var O,ne;try{let _;if(r==="Playable"||r==="Ready"){const D=await Xs(t,i);if(D){m(D.iosLink),f(D.androidLink),X(!1);return}if(x&&(x.iosUrl||x.googleUrl)){m(x.iosUrl),f(x.googleUrl),X(!1);return}if(ae&&ae.html){let ee=await fetch(u+"/"+ae.html).then(et=>et.text());const qe=((O=ee.match(/var\s+iosLink\s*=\s*['|"](https?[\w\d;,/?:@&=+$\-_.!~*'()#]+)['|"]/))==null?void 0:O.at(1))||"";m(qe);const vt=((ne=ee.match(/var\s+androidLink\s*=\s*['|"](https?[\w\d;,/?:@&=+$\-_.!~*'()#]+)['|"]/))==null?void 0:ne.at(1))||"";f(vt),X(!1)}else f(""),m(""),X(!1)}else if(r==="Flex"){const D=await Qs(t,i);if(D.googleUrl||D.iosUrl){f(D.googleUrl),m(D.iosUrl),X(!1);return}x&&(x.iosUrl||x.googleUrl)?(m(x.iosUrl),f(x.googleUrl),X(!1)):(f(""),m(""),X(!1))}else r==="Fusion"&&(x&&(x.iosUrl||x.googleUrl)?(m(x.iosUrl),f(x.googleUrl),X(!1)):(f(""),m(""),X(!1)))}catch(_){d(_.response.data.error.msg)}},U=async()=>{X(!0);let x;r==="Flex"?x=await Ts({_id:t},i):r==="Ready"&&(x=await Vs({_id:t},i)),x&&(["admin","pm","tester","sales"].includes(a.role)?E({...x,networks:lr}):r==="Ready"&&!x.canDownload?E({...x,networks:lr}):E(x)),X(!1)},te=async()=>await Hs(n,i);return C.useEffect(()=>{o||(W(null),R(null),E(null),p(null)),o&&(r==="Playable"?(Y().then(x=>{H(null,x)}),V(!1)):r==="Ready"?U().then(x=>{Y().then(ae=>{H(null,ae),V(!1)})}):r==="Flex"?U().then(x=>{V(!1),te().then(ae=>{o&&(H(ae,null),V(!1),R(ae))})}):r==="Import"?Ps(t,i).then(x=>{W(x),m(x.iosUrl||""),f(x.googleUrl||""),X(!1),V(!1)}):r==="Fusion"&&(V(!1),te().then(x=>{o&&(H(x,null),V(!1),x.networks=lr,R(x))})))},[n,e,t,o]),l.jsxs("div",{style:{display:"flex",height:oe>1440?"700px":"650px",width:oe>1440?"675px":"680px",flexDirection:"column",borderRadius:"rounded",backgroundColor:"#F7F7F8",paddingTop:"0px"},children:[l.jsx(fs,{title:A,typeOfProduct:r,fileSize:s,urls:{iosUrl:v,googleUrl:q},handleIosChange:B,handleGoogleChange:P,disabled:ie,api:i,creditDownload:T,user:a,isTest:k,setIsTest:J,urlType:y,setUrlType:I,allNetworksSelected:S,setAllNetworksSelected:G}),Q?l.jsx("div",{style:{height:"100%",width:"100%",display:"flex",justifyContent:"center"},children:l.jsx(jt,{isNetworksLoading:!0})}):(M||T||r==="Fusion")&&(r==="Flex"?g:!0)&&!Q&&v!=="Loading..."&&q!=="Loading..."&&l.jsx(Gs,{playable:M,creditDownload:T,visible:o,versionId:t,typeOfProduct:r,api:i,user:a,handleDownloadError:d,fetchFileUrl:u,urls:{iosUrl:v,googleUrl:q},game:g,getDownloadCount:U,disabled:ie,setSafariCopyLink:Z,isTest:k,urlType:y,allNetworksSelected:S,cdnModal:h,setCdnModal:z,cdnUrl:re,setCdnUrl:b})]})},Wu="";var ur={exports:{}},it={},cr={exports:{}},ze={},dr={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;/*!
51
51
  * Adapted from jQuery UI core
52
52
  *
53
53
  * http://jqueryui.com