@jolibox/implement 1.1.13-beta.9 → 1.1.14-beta.1
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/.rush/temp/package-deps_build.json +6 -6
- package/dist/common/rewards/registers/use-jolicoin.d.ts +2 -1
- package/dist/index.js +3 -3
- package/dist/index.native.js +73 -6
- package/esbuild.config.js +28 -8
- package/implement.build.log +2 -2
- package/package.json +4 -4
- package/src/common/rewards/fetch-reward.ts +20 -14
- package/src/common/rewards/registers/use-jolicoin.ts +12 -2
- package/src/h5/api/ads.ts +1 -1
- package/src/native/api/ads.ts +1 -1
package/dist/index.native.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var ws=Object.create;var Ze=Object.defineProperty,Es=Object.defineProperties,ks=Object.getOwnPropertyDescriptor,xs=Object.getOwnPropertyDescriptors,Ss=Object.getOwnPropertyNames,Xe=Object.getOwnPropertySymbols,Ts=Object.getPrototypeOf,tr=Object.prototype.hasOwnProperty,gn=Object.prototype.propertyIsEnumerable;var _n=(e,t,r)=>t in e?Ze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w=(e,t)=>{for(var r in t||(t={}))tr.call(t,r)&&_n(e,r,t[r]);if(Xe)for(var r of Xe(t))gn.call(t,r)&&_n(e,r,t[r]);return e},O=(e,t)=>Es(e,xs(t));var Z=(e,t)=>{var r={};for(var n in e)tr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Xe)for(var n of Xe(e))t.indexOf(n)<0&&gn.call(e,n)&&(r[n]=e[n]);return r};var x=(e,t)=>()=>(e&&(t=e(e=0)),t);var vn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),yn=(e,t)=>{for(var r in t)Ze(e,r,{get:t[r],enumerable:!0})},Is=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ss(t))!tr.call(e,o)&&o!==r&&Ze(e,o,{get:()=>t[o],enumerable:!(n=ks(t,o))||n.enumerable});return e};var bn=(e,t,r)=>(r=e!=null?ws(Ts(e)):{},Is(t||!e||!e.__esModule?Ze(r,"default",{value:e,enumerable:!0}):r,e));var y=(e,t,r)=>new Promise((n,o)=>{var i=l=>{try{a(r.next(l))}catch(c){o(c)}},s=l=>{try{a(r.throw(l))}catch(c){o(c)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,s);a((r=r.apply(e,t)).next())});function Ns(e){return!!(e!=null&&e.__nativeBuffers__)}function lr(e){if(typeof e=="string")try{e=JSON.parse(e)}catch(r){return{}}if(typeof e!="object"||e===null)return{};if(!Ns(e))return e;let t=e.__nativeBuffers__;if(delete e.__nativeBuffers__,t)for(let r=0;r<t.length;r++){let n=t[r];if(n){let o;n.value?o=n.value:n.base64&&(o=Ds(n.base64)),typeof o!="undefined"&&o instanceof ArrayBuffer&&(e[n.key]=o)}}return e}function Us(e={},t=!1){let r=e,n=[];for(let[o,i]of Object.entries(r))if(i!==void 0&&i instanceof ArrayBuffer&&i.byteLength!==void 0){let s=t?{value:i,key:o}:{base64:Ls(i),key:o};n.push(s),delete r[o]}return n.length>0&&(r.__nativeBuffers__=n),r}function Js(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}function On(e){return typeof e=="string"}function Ue(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function Vs(e){return typeof e=="undefined"}function Gs(e){return Vs(e)||e===null}function Nn(e){return typeof e=="function"}function qs(e){return Ue(e)&&Nn(e.then)}function Dn(e){let t=e,r=null,n=function(...o){return r||(r=new t(...o)),r};return n.prototype=t.prototype,n}function Le(e){return(...t)=>{var r,n;((n=(r=globalThis.VConsole)==null?void 0:r[e])!=null?n:globalThis.console[e])(...t)}}function oa(){try{if(window.__joliboxLocalStorage__)return window.__joliboxLocalStorage__;let e=Object.getOwnPropertyDescriptor(window,"localStorage");if(e&&e.get){let n=e.get.call(window);return window.__joliboxLocalStorage__=n,n}if(e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(window),"localStorage"),e&&e.get)return e.get.call(window);let t=Window.prototype,r=Object.getOwnPropertyDescriptor(t,"localStorage");if(r&&r.get){let n=r.get.call(window);return window.__joliboxLocalStorage__=n,n}return localStorage}catch(e){return console.warn("Failed to get original localStorage, fallback to default implementation",e),localStorage}}function la(e){return new Promise(t=>Ln(e)(t))}function Ln(e){return(t,r=null)=>{let n=!1;return e(o=>{if(!n)return n=!0,t.call(r,o)},null)}}function ca(e,t){return(r=>{let n,o={onWillAddFirstListener(){n=r(i.fire,i)}},i=new je(o);return i.event})((r,n=null)=>e(o=>t(o)&&r.call(n,o),null))}function da(e,t){let r=Math.min(e.length,t.length);for(let n=0;n<r;n++)pa(e[n],t[n])}function pa(e,t){if(On(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(Nn(t)){try{if(e instanceof t)return}catch(r){}if(!Gs(e)&&e.constructor===t||t.length===1&&t.call(void 0,e)===!0)return;throw new Error("[Jolibox SDK]argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function Sn(e,t){return`[${e}]:${t}`}function ga(e,t){Tn||(or=new tt({eventName:"jolibox_invoke",tagNameOrder:["status","method","errNo","errMsg","isForeground"],metricName:"duration",reporter(o){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:o}),-1)}}),ir=new tt({eventName:"jolibox_invoke_js2native",tagNameOrder:["status","method","isForeground"],metricName:"duration",reporter(o){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:o}),-1)}}),sr=new tt({eventName:"jolibox_invoke_native2js",tagNameOrder:["status","method","isForeground"],metricName:"duration",reporter(o){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:o}),-1)}}),t("onJoliboxEnterBackground",()=>{or.flush(),ir.flush(),sr.flush()}),Tn=!0);function r(o){var i,s;let{method:a,args:l,startTime:c,isForeground:d,errMsg:u=`${a}:fail no errMsg`,errNo:p=0,__timing:m={receiveJSInvoke:0,invokeCallback:0}}=o,{receiveJSInvoke:v,invokeCallback:E}=m,h=(s=(i=u.match(/\S:(\S+)\s?/))==null?void 0:i[1])!=null?s:"fail";or.report({status:h,method:n(a,l),errNo:`${p}`,errMsg:u,isForeground:d,duration:Date.now()-c}),c&&v&&E&&(ir.report({status:h,method:a,isForeground:d,duration:Number((v-c).toFixed(3))}),sr.report({status:h,method:a,isForeground:d,duration:Number((Date.now()-E).toFixed(3))}))}function n(o,i){return(o==="callHostMethod"||o==="callHostMethodSync")&&i!=null&&i.method?`${o}-${i.method}`:o}return r}function ya(e,t){let r=0,n=!0,o=new Map,i=ga(e,t);t("onJoliboxEnterBackground",()=>{n=!1}),t("onJoliboxEnterForeground",()=>{n=!0,ar.forEach(l=>fr(this,[l],function*({method:c,args:d,resolve:u}){let p=yield a(c,d);u(p)})),ar.length=0});let s=(l,c)=>{let d=o.get(Number(l));if(!d)return;let u=lr(c);d(u),o.delete(Number(l))},a=(l,c)=>{var d,u;let p=Date.now(),m=`${n}`;r+=1;let v=new Ks;if(o.set(r,v.resolve),!n&&fa.includes(l))return new Promise(A=>{ar.push({method:l,args:c,resolve:A})});let E=Ps(fe({},{method:l,startTime:p,args:c,isForeground:m}),{invokeType:"js-bridge"}),h=!va&&ma.includes(l),_=Us(c,h),b=h?_:JSON.stringify(_),T;if(l.endsWith("Sync")||ha.includes(l)?T=(d=e.call)==null?void 0:d.call(e,l,_,r):typeof b=="string"?T=e.invoke(l,b,r):T=(u=e.call)==null?void 0:u.call(e,l,b,r),T){try{typeof T=="string"&&(T=JSON.parse(T)),T=lr(T)}catch(A){_r.error(A)}return o.delete(r),T.errorCode&&(T.errorCode=Sn(l,T.errorCode)),i(fe(fe({},E),T)),T}return l.endsWith("Sync")&&o.delete(r),v.promise.then(A=>(A.errorCode&&(A.errorCode=Sn(l,A.errorCode)),i(fe(fe({},E),A)),A))};return{invokeNative:a,applyNative:(l,c)=>{let d=a(l,c);return qs(d)?d.then(u=>In(l,u)):In(l,d)},invokeHandler:s}}function In(e,t){if(!Ue(t)){_r.warn(`[Jolibox SDK]${e} no response value`);return}let r=t,{errMsg:n,errNo:o,errorType:i,errorCode:s}=r,a=Os(r,["errMsg","errNo","errorType","errorCode"]);if(n&&n!==`${e}:ok`)throw new Qs(n,o,i,s);return a}function ba(e){let t=new dr,r=new dr,n=new tt({eventName:"jolibox_publish",tagNameOrder:["type","event"],metricName:"duration",reporter(o){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:o}),-1)}});return t.on("onJoliboxEnterBackground",()=>{n.flush()}),{onNative:t.on.bind(t),offNative:t.off.bind(t),subscribe:r.on.bind(r),unsubscribe:r.off.bind(r),subscribeHandler(o,i,s){let a=lr(i),l;if(a.__extra){l=a.params;let{type:c,startTime:d}=a.__extra;n.report({type:c,event:o,duration:Date.now()-d})}else l=a;if(o===Un){l.forEach(c=>{let[d,u]=c;try{r.emit(d.slice(Fe.length),u,s)}catch(p){}});return}if(o.startsWith(Fe)){r.emit(o.slice(Fe.length),l,s);return}t.emit(o,l,s)}}}function wa(e){let t=new Map,r;return(n,o,i,s)=>{if(s){let l=i?[i]:"*";e.publish(`${Fe}${n}`,o,l);return}r||(r=Promise.resolve().then(()=>{t.forEach((l,c)=>{try{let d=c?[c]:"*";e.publish(Un,l,d)}catch(d){}}),r=void 0,t.clear()}));let a=t.get(i);a||(a=[],t.set(i,a)),a.push([`${Fe}${n}`,o])}}function Ea(e){let{subscribeHandler:t,onNative:r,offNative:n,subscribe:o,unsubscribe:i}=ba(e),{invokeNative:s,invokeHandler:a,applyNative:l}=ya(e,r),c=wa(e);return{invokeHandler:a,subscribeHandler:t,applyNative:l,invokeNative:s,onNative:r,offNative:n,publish:c,subscribe:o,unsubscribe:i}}function Fn(e,t){return{params:e,__extra:{startTime:Date.now(),type:t}}}var Rs,As,Cs,rt,An,Cn,wn,fe,Ps,Os,fr,Ds,Ls,hr,Fs,En,js,Ms,kn,Bs,Hs,Pn,$s,Ks,Ws,zs,nt,Ys,Qs,Xs,rr,_r,Zs,ea,ta,ra,na,su,cr,L,ia,sa,et,je,dr,pr,aa,nr,ua,au,mr,xn,lu,Fe,ma,fa,ha,Un,_a,tt,Tn,or,ir,sr,ar,va,gr,ce,jn,Mn,ka,Bn,Rn,Y,N,re,cu,xa,Hn,uu,du,G=x(()=>{"use strict";Rs=Object.defineProperty,As=Object.defineProperties,Cs=Object.getOwnPropertyDescriptors,rt=Object.getOwnPropertySymbols,An=Object.prototype.hasOwnProperty,Cn=Object.prototype.propertyIsEnumerable,wn=(e,t,r)=>t in e?Rs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fe=(e,t)=>{for(var r in t||(t={}))An.call(t,r)&&wn(e,r,t[r]);if(rt)for(var r of rt(t))Cn.call(t,r)&&wn(e,r,t[r]);return e},Ps=(e,t)=>As(e,Cs(t)),Os=(e,t)=>{var r={};for(var n in e)An.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&rt)for(var n of rt(e))t.indexOf(n)<0&&Cn.call(e,n)&&(r[n]=e[n]);return r},fr=(e,t,r)=>new Promise((n,o)=>{var i=l=>{try{a(r.next(l))}catch(c){o(c)}},s=l=>{try{a(r.throw(l))}catch(c){o(c)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,s);a((r=r.apply(e,t)).next())});Ds=e=>{let t=atob(e),r=t.length,n=new Uint8Array(r);for(let o=0;o<r;o++)n[o]=t.charCodeAt(o);return n.buffer};Ls=e=>{let t="",r=new Uint8Array(e),n=r.byteLength;for(let o=0;o<n;o++)t+=String.fromCharCode(r[o]);return btoa(t)};hr=Object.defineProperty,Fs=Object.getOwnPropertyDescriptor,En=Object.getOwnPropertySymbols,js=Object.prototype.hasOwnProperty,Ms=Object.prototype.propertyIsEnumerable,kn=(e,t,r)=>t in e?hr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bs=(e,t)=>{for(var r in t||(t={}))js.call(t,r)&&kn(e,r,t[r]);if(En)for(var r of En(t))Ms.call(t,r)&&kn(e,r,t[r]);return e},Hs=(e,t)=>{for(var r in t)hr(e,r,{get:t[r],enumerable:!0})},Pn=(e,t,r,n)=>{for(var o=n>1?void 0:n?Fs(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&hr(t,r,o),o},$s=(e,t,r)=>new Promise((n,o)=>{var i=l=>{try{a(r.next(l))}catch(c){o(c)}},s=l=>{try{a(r.throw(l))}catch(c){o(c)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,s);a((r=r.apply(e,t)).next())});if(typeof window!="undefined"&&!window.AbortController){let e=function(){this.signal=new t};e.prototype.abort=function(){this.signal._aborted=!0,typeof this.signal.onabort=="function"&&this.signal.onabort(new Event("abort"));let r=new Event("abort");this.signal.dispatchEvent(r)};let t=function(){this._aborted=!1,this.aborted=!1,this.onabort=null,this._eventListeners={}};Object.defineProperty(t.prototype,"aborted",{get:function(){return this._aborted}}),t.prototype.addEventListener=function(r,n){this._eventListeners[r]||(this._eventListeners[r]=[]),this._eventListeners[r].push(n)},t.prototype.removeEventListener=function(r,n){if(!this._eventListeners[r])return;let o=this._eventListeners[r].indexOf(n);o!==-1&&this._eventListeners[r].splice(o,1)},t.prototype.dispatchEvent=function(r){if(this._eventListeners[r.type])for(let n of this._eventListeners[r.type])n.call(this,r)},window.AbortController=e,window.AbortSignal=t}Ks=class{constructor(){this.state="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.state==="pending"&&(this.state="fulfilled",e(r))},this.reject=r=>{this.state==="pending"&&(this.state="rejected",t(r))}})}};Ws=(e=>(e[e.DEVELOPER_FILE_NOT_FOUND=0]="DEVELOPER_FILE_NOT_FOUND",e[e.INTERNAL_IOS_CAN_NOT_FOUND_PKG=1]="INTERNAL_IOS_CAN_NOT_FOUND_PKG",e[e.USER_IOS_LOAD_TIMEOUT=2]="USER_IOS_LOAD_TIMEOUT",e[e.INTERNAL_IOS_PKG_LOAD_ERROR=3]="INTERNAL_IOS_PKG_LOAD_ERROR",e[e.INTERNAL_IOS_PKG_PARSE_FAIL=4]="INTERNAL_IOS_PKG_PARSE_FAIL",e[e.USER_IOS_GET_EMPTY_DATA=5]="USER_IOS_GET_EMPTY_DATA",e[e.USER_ANDROID_GET_PKG_FAIL=6]="USER_ANDROID_GET_PKG_FAIL",e[e.DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE=7]="DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE",e))(Ws||{}),zs=class extends Error{constructor(e){if(typeof e=="string"){super(e),this.priority="P1";return}super(e.message),this.priority="P1",this.stack=e.stack,this.raw=e}},nt=class extends zs{constructor(){super(...arguments),this.kind="INTERNAL_ERROR"}},Ys=class extends nt{constructor(){super(...arguments),this.name="INTERNAL_INVOKE_NATIVE_ERROR"}},Qs=class extends nt{constructor(e,t,r,n){super(e),this.errNo=t,this.name="INTERNAL_APPLY_NATIVE_ERROR",this.errorType=r,this.errorCode=n}},Xs=class extends nt{constructor(){super(...arguments),this.name="INTERNAL_JSCORE_ERROR",this.priority="P0"}},rr=class extends nt{constructor(){super(...arguments),this.name="INTERNAL_METRIC_REPORT_ERROR"}};_r={log:Le("log"),warn:Le("warn"),info:Le("info"),error:Le("error"),debug:Le("debug")};Object.assign(globalThis,{logger:_r});Zs=Symbol.for("Jolibox.canIUseMap"),ea={};globalThis[Zs]=ea;ta=(e=>(e[e.System=1e3]="System",e[e.ErrorTrace=1001]="ErrorTrace",e[e.UserDefined=1002]="UserDefined",e))(ta||{}),ra=(e=>(e.MiniGame="mini-game",e.MiniDrama="mini-drama",e.App="app",e.WebSDK="web-sdk",e.AppSDK="app-sdk",e))(ra||{}),na=(e=>(e[e.App=0]="App",e[e.H5=1]="H5",e[e.Weapp=2]="Weapp",e[e.Alipay=3]="Alipay",e[e.Gcash=4]="Gcash",e[e.Dana=5]="Dana",e[e.Umma=6]="Umma",e[e.WebSDK=1e3]="WebSDK",e[e.AppSDK=1001]="AppSDK",e[e.Other=9999]="Other",e))(na||{});oa();su={isiOS:navigator.userAgent.includes("iPhone")||navigator.userAgent.includes("iPod")||navigator.userAgent.includes("iPad")||navigator.userAgent.includes("iPhone OS"),iosVersion:()=>{let e=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3]||"0",10)]},isAndroid:navigator.userAgent.includes("Android"),isMac:navigator.userAgent.includes("Mac"),isFacebook:navigator.userAgent.includes("FB_IAB"),isPC:!navigator.userAgent.includes("iPhone")&&!navigator.userAgent.includes("Android")},cr=class ur{constructor(t){this.element=t,this.next=ur.Undefined,this.prev=ur.Undefined}};cr.Undefined=new cr(void 0);L=cr,ia=class{constructor(){this._first=L.Undefined,this._last=L.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===L.Undefined}clear(){let e=this._first;for(;e!==L.Undefined;){let t=e.next;e.prev=L.Undefined,e.next=L.Undefined,e=t}this._first=L.Undefined,this._last=L.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new L(e);if(this._first===L.Undefined)this._first=r,this._last=r;else if(t){let o=this._last;this._last=r,r.prev=o,o.next=r}else{let o=this._first;this._first=r,r.next=o,o.prev=r}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(r))}}shift(){if(this._first!==L.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==L.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==L.Undefined&&e.next!==L.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===L.Undefined&&e.next===L.Undefined?(this._first=L.Undefined,this._last=L.Undefined):e.next===L.Undefined?(this._last=this._last.prev,this._last.next=L.Undefined):e.prev===L.Undefined&&(this._first=this._first.next,this._first.prev=L.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==L.Undefined;)yield e.element,e=e.next}},sa=0,et=class{constructor(e){this.value=e,this.id=sa++}},je=class{constructor(e){this.options=e,this._size=0}dispose(e){var t,r;this._disposed||(this._disposed=!0,this._listeners&&(e?(this._listeners instanceof et&&(this._listeners=[this._listeners]),this._listeners=this._listeners.filter(n=>(n==null?void 0:n.value)===e)):(this._listeners=void 0,this._size=0)),(r=(t=this.options)==null?void 0:t.onDidRemoveLastListener)==null||r.call(t))}get event(){var e;return(e=this._event)!=null||(this._event=(t,r)=>{var n,o,i,s,a,l;if(this._disposed)return()=>{console.info("[Jolibox SDK] Emitter is _disposed")};r&&(t=t.bind(r));let c=new et(t);this._listeners?this._listeners instanceof et?this._listeners=[this._listeners,c]:this._listeners.push(c):((o=(n=this.options)==null?void 0:n.onWillAddFirstListener)==null||o.call(n,this),this._listeners=c,(s=(i=this.options)==null?void 0:i.onDidFirstListener)==null||s.call(i,this)),(l=(a=this.options)==null?void 0:a.onDidAddListener)==null||l.call(a,this),this._size++}),this._event}_deliver(e,t){var r;if(!e)return;let n=((r=this.options)==null?void 0:r.onListenerError)||Error.constructor;if(!n){e.value(t);return}try{e.value(t)}catch(o){n(o)}}fire(e){this._listeners&&(this._listeners instanceof et?this._deliver(this._listeners,e):this._listeners.forEach(t=>this._deliver(t,e)))}hasListeners(){return this._size>0}},dr=class{constructor(){this.listeners=new Map,this.listerHandlerMap=new WeakMap,this.cachedEventQueue=new Map}on(e,t){var r;let n=(r=this.listeners.get(e))!=null?r:new je,o=s=>t(...s.args);this.listerHandlerMap.set(t,o),n.event(o),this.listeners.set(e,n);let i=this.cachedEventQueue.get(e);if(i)for(;i.size>0;)n.fire(Bs({event:e},i.shift()))}off(e,t){let r=this.listeners.get(e);if(r){let n=this.listerHandlerMap.get(t);r.dispose(n)}}emit(e,...t){let r=this.listeners.get(e);if(r)r.fire({event:e,args:t});else{let n=this.cachedEventQueue.get(e);n||(n=new ia,this.cachedEventQueue.set(e,n)),n.push({args:t})}}},pr={};Hs(pr,{None:()=>aa,filter:()=>ca,once:()=>Ln,toPromise:()=>la});aa=()=>{console.log("[Jolibox SDK] None Event")};nr=Symbol.for("Jolibox.hostEmitter"),ua=()=>{let e=new dr;return globalThis[nr]||(globalThis[nr]={on:e.on.bind(e),off:e.off.bind(e),emit:e.emit.bind(e)}),globalThis[nr]},au=ua();mr=class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new je,this.onDidRegisterCommand=this._onDidRegisterCommand.event,console.log("[Jolibox SDK] command registry")}registerCommand(e){if(!e)throw new Error("invalid command");if(e.metadata&&Array.isArray(e.metadata.args)){let r=[];for(let o of e.metadata.args)r.push(o.constraint);let n=e.handler;e.handler=function(...o){return da(o,r),n(...o)}}let{id:t}=e;this._commands.get(t)&&console.info(`[Jolibox SDK] duplicated command is registered ${t}`),this._commands.set(t,e),this._onDidRegisterCommand.fire(t)}getCommand(e){return this._commands.get(e)}getCommands(){let e=new Map;for(let t of this._commands.keys()){let r=this.getCommand(t);r&&e.set(t,r)}return e}};mr=Pn([Dn],mr);xn=class{constructor(){this._onWillExecuteCommand=new je,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._onDidExecuteCommand=new je,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this.registry=new mr,this._starActivation=null}_activateStar(){return this._starActivation||(this._starActivation=Js(3e4)),this._starActivation}executeCommand(e,...t){return $s(this,null,function*(){return this.registry.getCommand(e)?this._tryExecuteCommand(e,t):(yield Promise.all([Promise.race([this._activateStar(),pr.toPromise(pr.filter(this.registry.onDidRegisterCommand,r=>r===e))])]),this._tryExecuteCommand(e,t))})}executeCommandThowErr(e,...t){if(!this.registry.getCommand(e))throw new Error(`command '${e}' not found`);let r=this.registry.getCommand(e);this._onWillExecuteCommand.fire({commandId:e,args:t});let n=this.invokeFunction(r.handler,...t);return this._onDidExecuteCommand.fire({commandId:e,args:t}),n}_tryExecuteCommand(e,t){let r=this.registry.getCommand(e);if(!r)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});let n=this.invokeFunction(r.handler,...t);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}invokeFunction(e,...t){let r=!1;try{return e(...t)}finally{r=!0}}};xn=Pn([Dn],xn);lu=Symbol.for("Jolibox.commands");Fe="custom_event_",ma=[],fa=[],ha=["env","createRequestTask","login"],Un="__batch_event__",_a=e=>e==="pv"?e:"default",tt=class{constructor(e){this.interval=30,this.lastReportTime=0,this.cache={};let{reporter:t,interval:r=30,eventName:n,tagNameOrder:o,metricName:i,type:s}=e;this.reporter=t,this.interval=r,this.eventName=n,this.tagNameOrder=o,this.metricName=i,this.type=_a(s)}report(e){this.type==="pv"?this.addPVPoint(e):this.addPoint(e),this.tryReport(!1)}flush(){this.tryReport(!0)}tryReport(e){if(Object.keys(this.cache).length){if(e){this.reporter(this.processPoints(this.cache)),this.clearPoints();return}this.lastReportTime=this.lastReportTime||Date.now(),Date.now()-this.lastReportTime>=this.interval*1e3&&(this.reporter(this.processPoints(this.cache)),this.clearPoints(),this.lastReportTime=Date.now())}}addPoint(e){let t=(r,n,o,i)=>{let s=n.shift();if(s){let a=i[s];r[a]||(r[a]={}),t(r[a],n,o,i)}else r[o]||(r[o]=[]),r[o].push(i[o])};t(this.cache,[...this.tagNameOrder],this.metricName,e)}addPVPoint(e){let t=(n,o,i,s)=>{let a=o.shift();if(!a&&Ue(s))throw new rr(`report value failed to match tagNameOrder, ${JSON.stringify(r)}`);if(a){let l=[];if(Ue(s))l.push(...Object.keys(s));else if(On(s)){if(o.length>0)throw new rr(`report value failed to match tagNameOrder, ${JSON.stringify(r)}`);l.push(s)}else throw new rr(`expected metric value to be a string, but got a(n) ${typeof s}, ${JSON.stringify(r)}`);l.forEach(c=>{n[c]||(n[c]={});let d=Ue(s)?s[c]:s;t(n[c],[...o],i,d)})}else n[i]?n[i]++:n[i]=1},r={point:e,metricName:this.metricName,tagNameOrder:this.tagNameOrder};t(this.cache,[...this.tagNameOrder],this.metricName,e)}processPoints(e){return{eventName:this.eventName,tagNameOrder:this.tagNameOrder,metricName:this.metricName,metricAggregateType:this.type==="pv"?"itoa":"arr",data:e}}clearPoints(){this.cache={}}},Tn=!1;ar=[],va=!1;ce={trigger(){},exit(){return Promise.resolve(!1)},onReady(e){ce.trigger=e},onDoExit(e){ce.exit=e}},jn=e=>{let t=window.prompt("invoke",JSON.stringify({event:"envSync",paramsString:JSON.stringify({})}));if(!t)e.onError(new Ys("native env failed"));else{let{data:r}=JSON.parse(t);return r!=null?r:void 0}};if(window.webkit){let e=window.webkit.messageHandlers,t=(o="")=>{ce.trigger(),e.onDocumentReady.postMessage({path:o})},r=o=>fr(void 0,null,function*(){let i=yield ce.exit();e.doExit.postMessage({uuid:o,shouldInterrupt:i})});gr={onDocumentReady:t,doExit:r,invoke(o,i,s){e.invoke.postMessage({event:o,paramsString:i,callbackId:s})},publish(o,i,s){let a=Fn(i,"joliboxJSCore");window.prompt("publish",JSON.stringify({event:o,paramsString:JSON.stringify(a),webviewIds:s}))},call(o,i,s){let a=window.prompt("invoke",JSON.stringify({event:o,paramsString:JSON.stringify(i),callbackId:s}));if(a)return JSON.parse(a)}};let n={onDocumentReady:t,env:jn,doExit:r};globalThis.joliboxJSCore=fe({},n)}if(window.JoliAndroidSDKBridge){let e=window.JoliAndroidSDKBridge,t=(o="")=>{ce.trigger(),e.onDocumentReady(JSON.stringify({path:o}))},r=o=>fr(void 0,null,function*(){let i=yield ce.exit();e.doExit(JSON.stringify({uuid:o,shouldInterrupt:i}))});gr={onDocumentReady:t,invoke(o,i,s){e.invoke(JSON.stringify({event:o,paramsString:i,callbackId:s}))},doExit:r,publish(o,i,s){let a=Fn(i,"joliboxJSCore");e.publish({event:o,paramsString:JSON.stringify(a),webviewIds:s})},call(o,i,s){let a=window.prompt("invoke",JSON.stringify({event:o,paramsString:JSON.stringify(i),callbackId:s}));if(a)return JSON.parse(a)}};let n={onDocumentReady:t,env:jn,doExit:r};globalThis.joliboxJSCore=fe({},n)}Mn=gr;if(!Mn)throw new Xs("No joliboxJScore is found, native bridge not found.");ka=fe({},Mn),Bn=Ea(ka),{invokeHandler:Rn}=Bn,{applyNative:Y,invokeNative:N,onNative:re,offNative:cu,subscribeHandler:xa,publish:Hn,subscribe:uu,unsubscribe:du}=Bn;globalThis.joliboxJSBridge={callHandler:Rn,invokeHandler:Rn,subscribeHandler:xa}});function Ca(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}function He(e){return typeof e=="string"}function ye(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function qn(e){return typeof e=="object"&&Array.isArray(e)}function $e(e){return e===!0||e===!1}function Pa(e){return typeof e=="undefined"}function Oa(e){return Pa(e)||e===null}function Na(e){return typeof e=="function"}function Wn(e){let t=e,r=null,n=function(...o){return r||(r=new t(...o)),r};return n.prototype=t.prototype,n}function zn(e,t,r){if(typeof r!="function")throw new Error("[Jolibox SDK]Customizer must be a function");function n(o,i){for(let s in i)if(Object.prototype.hasOwnProperty.call(i,s)){let a=o[s],l=i[s],c=r(a,l,s,o,i);c!==void 0?o[s]=c:Kn(l)&&Kn(a)?o[s]=n(Vn({},a),l):Array.isArray(l)&&Array.isArray(a)?o[s]=[...a,...l]:o[s]=l}return o}return n(e,t)}function Kn(e){return e&&typeof e=="object"&&e.constructor===Object}function Yn(e,t){if(Array.isArray(e))return e.concat(t)}function Je(e,t,r={}){let n=null,o,i,s,{leading:a=!1,trailing:l=!0}=r,c=()=>(s=e.apply(i,o),o=void 0,i=void 0,s),d=function(...u){o=u,i=this;let p=a&&!n;if(n&&clearTimeout(n),n=setTimeout(()=>{n=null,l&&!p&&c()},t),p)return c()};return d.cancel=()=>{n&&clearTimeout(n),n=null,o=i=void 0},d.flush=()=>{if(n)return clearTimeout(n),n=null,c()},d}function La(e,t){return(...r)=>t(e,...r)}function at(e){return t=>La(t,function(r,...n){if(typeof r=="function")try{return r.apply(this,n)}catch(o){e(new Ke(`${o}`))}})}function Me(e){return(...t)=>{var r,n;((n=(r=globalThis.VConsole)==null?void 0:r[e])!=null?n:globalThis.console[e])(...t)}}function Cr(){try{if(window.__joliboxLocalStorage__)return window.__joliboxLocalStorage__;let e=Object.getOwnPropertyDescriptor(window,"localStorage");if(e&&e.get){let n=e.get.call(window);return window.__joliboxLocalStorage__=n,n}if(e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(window),"localStorage"),e&&e.get)return e.get.call(window);let t=Window.prototype,r=Object.getOwnPropertyDescriptor(t,"localStorage");if(r&&r.get){let n=r.get.call(window);return window.__joliboxLocalStorage__=n,n}return localStorage}catch(e){return console.warn("Failed to get original localStorage, fallback to default implementation",e),localStorage}}function Wa(e){return new Promise(t=>oo(e)(t))}function oo(e){return(t,r=null)=>{let n=!1;return e(o=>{if(!n)return n=!0,t.call(r,o)},null)}}function za(e,t){return(r=>{let n,o={onWillAddFirstListener(){n=r(i.fire,i)}},i=new Be(o);return i.event})((r,n=null)=>e(o=>t(o)&&r.call(n,o),null))}function Qa(e,t){let r=Math.min(e.length,t.length);for(let n=0;n<r;n++)Xa(e[n],t[n])}function Xa(e,t){if(He(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(Na(t)){try{if(e instanceof t)return}catch(r){}if(!Oa(e)&&e.constructor===t||t.length===1&&t.call(void 0,e)===!0)return;throw new Error("[Jolibox SDK]argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function Za(){return typeof globalThis!="undefined"?globalThis[io]:void 0}function el(e){typeof globalThis!="undefined"&&(globalThis[io]=e)}function j(){let e=Za();if(e)return e;let t=new st,r=new Er,n={registerCommand(o,i,s){t.registerCommand({id:o,handler:i,metadata:s})},executeCommand(o,...i){return r.executeCommand(o,...i)},excuteCommandSync(o,...i){return r.executeCommandThowErr(o,...i)}};return el(n),n}var kr,Sa,$n,Ta,Ia,Jn,Vn,Ra,Gn,Aa,he,Da,xr,Sr,Qn,Xn,Ke,Zn,eo,Ve,Tr,ne,to,Ua,Ir,Fa,Rr,ja,Ar,ot,Ma,Ba,Ha,ro,Pr,$a,Ja,Ka,no,yr,U,Va,Ga,it,Be,oe,wr,qa,vr,Ya,ue,st,Er,io,P=x(()=>{"use strict";kr=Object.defineProperty,Sa=Object.getOwnPropertyDescriptor,$n=Object.getOwnPropertySymbols,Ta=Object.prototype.hasOwnProperty,Ia=Object.prototype.propertyIsEnumerable,Jn=(e,t,r)=>t in e?kr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Vn=(e,t)=>{for(var r in t||(t={}))Ta.call(t,r)&&Jn(e,r,t[r]);if($n)for(var r of $n(t))Ia.call(t,r)&&Jn(e,r,t[r]);return e},Ra=(e,t)=>{for(var r in t)kr(e,r,{get:t[r],enumerable:!0})},Gn=(e,t,r,n)=>{for(var o=n>1?void 0:n?Sa(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&kr(t,r,o),o},Aa=(e,t,r)=>new Promise((n,o)=>{var i=l=>{try{a(r.next(l))}catch(c){o(c)}},s=l=>{try{a(r.throw(l))}catch(c){o(c)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,s);a((r=r.apply(e,t)).next())});if(typeof window!="undefined"&&!window.AbortController){let e=function(){this.signal=new t};e.prototype.abort=function(){this.signal._aborted=!0,typeof this.signal.onabort=="function"&&this.signal.onabort(new Event("abort"));let r=new Event("abort");this.signal.dispatchEvent(r)};let t=function(){this._aborted=!1,this.aborted=!1,this.onabort=null,this._eventListeners={}};Object.defineProperty(t.prototype,"aborted",{get:function(){return this._aborted}}),t.prototype.addEventListener=function(r,n){this._eventListeners[r]||(this._eventListeners[r]=[]),this._eventListeners[r].push(n)},t.prototype.removeEventListener=function(r,n){if(!this._eventListeners[r])return;let o=this._eventListeners[r].indexOf(n);o!==-1&&this._eventListeners[r].splice(o,1)},t.prototype.dispatchEvent=function(r){if(this._eventListeners[r.type])for(let n of this._eventListeners[r.type])n.call(this,r)},window.AbortController=e,window.AbortSignal=t}he=class{constructor(){this.state="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.state==="pending"&&(this.state="fulfilled",e(r))},this.reject=r=>{this.state==="pending"&&(this.state="rejected",t(r))}})}};Da=(e=>(e[e.DEVELOPER_FILE_NOT_FOUND=0]="DEVELOPER_FILE_NOT_FOUND",e[e.INTERNAL_IOS_CAN_NOT_FOUND_PKG=1]="INTERNAL_IOS_CAN_NOT_FOUND_PKG",e[e.USER_IOS_LOAD_TIMEOUT=2]="USER_IOS_LOAD_TIMEOUT",e[e.INTERNAL_IOS_PKG_LOAD_ERROR=3]="INTERNAL_IOS_PKG_LOAD_ERROR",e[e.INTERNAL_IOS_PKG_PARSE_FAIL=4]="INTERNAL_IOS_PKG_PARSE_FAIL",e[e.USER_IOS_GET_EMPTY_DATA=5]="USER_IOS_GET_EMPTY_DATA",e[e.USER_ANDROID_GET_PKG_FAIL=6]="USER_ANDROID_GET_PKG_FAIL",e[e.DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE=7]="DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE",e))(Da||{}),xr=class extends Error{constructor(e){if(typeof e=="string"){super(e),this.priority="P1";return}super(e.message),this.priority="P1",this.stack=e.stack,this.raw=e}},Sr=class extends xr{constructor(){super(...arguments),this.kind="INTERNAL_ERROR"}},Qn=class extends xr{constructor(){super(...arguments),this.kind="USER_ERROR"}},Xn=class extends Qn{constructor(){super(...arguments),this.name="USER_VALIDATE_ERROR"}},Ke=class extends Qn{constructor(e,t,r){super(e),this.message=e,this.errNo=t,this.name="USER_CUSTOM_ERROR",this.errMsg=e,r&&(this.extra=Object.assign({},this.extra,r))}},Zn=class extends Sr{constructor(){super(...arguments),this.name="INTERNAL_SCHEMA_PARSE_ERROR",this.priority="P0"}},eo=class extends Sr{constructor(){super(...arguments),this.name="INTERNAL_GLOBAL_JS_ERROR",this.priority="P1"}},Ve=class extends xr{constructor(e,t,r,n,o){super(e),this.message=e,this.code=t,this.kind="API_ERROR",this.name="API_ERROR",r&&(this.errorType=r),n!==void 0&&(this.stack=n),o&&(this.priority=o)}toJSON(){return{message:this.message,stack:this.stack,name:this.name,code:this.code,errorType:this.errorType}}},Tr=class extends Sr{constructor(){super(...arguments),this.name="INTERNAL_REPORTER_ERROR"}};ne={log:Me("log"),warn:Me("warn"),info:Me("info"),error:Me("error"),debug:Me("debug")};Object.assign(globalThis,{logger:ne});to=Symbol.for("Jolibox.canIUseMap"),Ua={};globalThis[to]=Ua;Ir={get config(){return globalThis[to]}},Fa=(e=>(e[e.System=1e3]="System",e[e.ErrorTrace=1001]="ErrorTrace",e[e.UserDefined=1002]="UserDefined",e))(Fa||{}),Rr=(e=>(e.MiniGame="mini-game",e.MiniDrama="mini-drama",e.App="app",e.WebSDK="web-sdk",e.AppSDK="app-sdk",e))(Rr||{}),ja=(e=>(e[e.App=0]="App",e[e.H5=1]="H5",e[e.Weapp=2]="Weapp",e[e.Alipay=3]="Alipay",e[e.Gcash=4]="Gcash",e[e.Dana=5]="Dana",e[e.Umma=6]="Umma",e[e.WebSDK=1e3]="WebSDK",e[e.AppSDK=1001]="AppSDK",e[e.Other=9999]="Other",e))(ja||{}),Ar=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)});Cr();ot={isiOS:navigator.userAgent.includes("iPhone")||navigator.userAgent.includes("iPod")||navigator.userAgent.includes("iPad")||navigator.userAgent.includes("iPhone OS"),iosVersion:()=>{let e=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3]||"0",10)]},isAndroid:navigator.userAgent.includes("Android"),isMac:navigator.userAgent.includes("Mac"),isFacebook:navigator.userAgent.includes("FB_IAB"),isPC:!navigator.userAgent.includes("iPhone")&&!navigator.userAgent.includes("Android")},Ma=()=>ot.isiOS?"iOS":ot.isAndroid?"Android":ot.isMac?"Mac":ot.isFacebook?"Facebook":"PC",Ba="device_id",Ha="advertising_id",ro=e=>(window.__joliboxLocalStorage__.getItem(e)||window.__joliboxLocalStorage__.setItem(e,Ar()),window.__joliboxLocalStorage__.getItem(e)),Pr=()=>ro(Ba),$a=()=>ro(Ha),Ja=e=>e.charAt(0).toUpperCase()+e.slice(1),Ka=()=>{var e;let t=new URLSearchParams(window.location.search);return Ja((e=t.get("utm_source"))!=null?e:"")||"JoliboxSDK"},no=e=>{let t="JoliboxWebSDK",r=Ma(),n=navigator.language,o=Pr(),i=$a();return`${t} (${Ka()}${r}; UnknownModel; UnknownSystemVersion; ${n}) uuid/${o} adid/${i} version/${e||""}`},yr=class br{constructor(t){this.element=t,this.next=br.Undefined,this.prev=br.Undefined}};yr.Undefined=new yr(void 0);U=yr,Va=class{constructor(){this._first=U.Undefined,this._last=U.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===U.Undefined}clear(){let e=this._first;for(;e!==U.Undefined;){let t=e.next;e.prev=U.Undefined,e.next=U.Undefined,e=t}this._first=U.Undefined,this._last=U.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new U(e);if(this._first===U.Undefined)this._first=r,this._last=r;else if(t){let o=this._last;this._last=r,r.prev=o,o.next=r}else{let o=this._first;this._first=r,r.next=o,o.prev=r}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(r))}}shift(){if(this._first!==U.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==U.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==U.Undefined&&e.next!==U.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===U.Undefined&&e.next===U.Undefined?(this._first=U.Undefined,this._last=U.Undefined):e.next===U.Undefined?(this._last=this._last.prev,this._last.next=U.Undefined):e.prev===U.Undefined&&(this._first=this._first.next,this._first.prev=U.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==U.Undefined;)yield e.element,e=e.next}},Ga=0,it=class{constructor(e){this.value=e,this.id=Ga++}},Be=class{constructor(e){this.options=e,this._size=0}dispose(e){var t,r;this._disposed||(this._disposed=!0,this._listeners&&(e?(this._listeners instanceof it&&(this._listeners=[this._listeners]),this._listeners=this._listeners.filter(n=>(n==null?void 0:n.value)===e)):(this._listeners=void 0,this._size=0)),(r=(t=this.options)==null?void 0:t.onDidRemoveLastListener)==null||r.call(t))}get event(){var e;return(e=this._event)!=null||(this._event=(t,r)=>{var n,o,i,s,a,l;if(this._disposed)return()=>{console.info("[Jolibox SDK] Emitter is _disposed")};r&&(t=t.bind(r));let c=new it(t);this._listeners?this._listeners instanceof it?this._listeners=[this._listeners,c]:this._listeners.push(c):((o=(n=this.options)==null?void 0:n.onWillAddFirstListener)==null||o.call(n,this),this._listeners=c,(s=(i=this.options)==null?void 0:i.onDidFirstListener)==null||s.call(i,this)),(l=(a=this.options)==null?void 0:a.onDidAddListener)==null||l.call(a,this),this._size++}),this._event}_deliver(e,t){var r;if(!e)return;let n=((r=this.options)==null?void 0:r.onListenerError)||Error.constructor;if(!n){e.value(t);return}try{e.value(t)}catch(o){n(o)}}fire(e){this._listeners&&(this._listeners instanceof it?this._deliver(this._listeners,e):this._listeners.forEach(t=>this._deliver(t,e)))}hasListeners(){return this._size>0}},oe=class{constructor(){this.listeners=new Map,this.listerHandlerMap=new WeakMap,this.cachedEventQueue=new Map}on(e,t){var r;let n=(r=this.listeners.get(e))!=null?r:new Be,o=s=>t(...s.args);this.listerHandlerMap.set(t,o),n.event(o),this.listeners.set(e,n);let i=this.cachedEventQueue.get(e);if(i)for(;i.size>0;)n.fire(Vn({event:e},i.shift()))}off(e,t){let r=this.listeners.get(e);if(r){let n=this.listerHandlerMap.get(t);r.dispose(n)}}emit(e,...t){let r=this.listeners.get(e);if(r)r.fire({event:e,args:t});else{let n=this.cachedEventQueue.get(e);n||(n=new Va,this.cachedEventQueue.set(e,n)),n.push({args:t})}}},wr={};Ra(wr,{None:()=>qa,filter:()=>za,once:()=>oo,toPromise:()=>Wa});qa=()=>{console.log("[Jolibox SDK] None Event")};vr=Symbol.for("Jolibox.hostEmitter"),Ya=()=>{let e=new oe;return globalThis[vr]||(globalThis[vr]={on:e.on.bind(e),off:e.off.bind(e),emit:e.emit.bind(e)}),globalThis[vr]},ue=Ya();st=class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Be,this.onDidRegisterCommand=this._onDidRegisterCommand.event,console.log("[Jolibox SDK] command registry")}registerCommand(e){if(!e)throw new Error("invalid command");if(e.metadata&&Array.isArray(e.metadata.args)){let r=[];for(let o of e.metadata.args)r.push(o.constraint);let n=e.handler;e.handler=function(...o){return Qa(o,r),n(...o)}}let{id:t}=e;this._commands.get(t)&&console.info(`[Jolibox SDK] duplicated command is registered ${t}`),this._commands.set(t,e),this._onDidRegisterCommand.fire(t)}getCommand(e){return this._commands.get(e)}getCommands(){let e=new Map;for(let t of this._commands.keys()){let r=this.getCommand(t);r&&e.set(t,r)}return e}};st=Gn([Wn],st);Er=class{constructor(){this._onWillExecuteCommand=new Be,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._onDidExecuteCommand=new Be,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this.registry=new st,this._starActivation=null}_activateStar(){return this._starActivation||(this._starActivation=Ca(3e4)),this._starActivation}executeCommand(e,...t){return Aa(this,null,function*(){return this.registry.getCommand(e)?this._tryExecuteCommand(e,t):(yield Promise.all([Promise.race([this._activateStar(),wr.toPromise(wr.filter(this.registry.onDidRegisterCommand,r=>r===e))])]),this._tryExecuteCommand(e,t))})}executeCommandThowErr(e,...t){if(!this.registry.getCommand(e))throw new Error(`command '${e}' not found`);let r=this.registry.getCommand(e);this._onWillExecuteCommand.fire({commandId:e,args:t});let n=this.invokeFunction(r.handler,...t);return this._onDidExecuteCommand.fire({commandId:e,args:t}),n}_tryExecuteCommand(e,t){let r=this.registry.getCommand(e);if(!r)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});let n=this.invokeFunction(r.handler,...t);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}invokeFunction(e,...t){let r=!1;try{return e(...t)}finally{r=!0}}};Er=Gn([Wn],Er);io=Symbol.for("Jolibox.commands")});function K(e,t={}){Or.emit("ERROR_REPORT",{error:e,options:t})}var Or,be,ie=x(()=>{"use strict";P();P();Or=new oe,be=new oe;K.debounce=Je(K,50,{leading:!0})});var Nr,tl,so,ao,lo=x(()=>{"use strict";P();ie();Nr=e=>{let t=e.replace(/-/g,"+").replace(/_/g,"/"),r=t.length%4===0?"":"=".repeat(4-t.length%4),n=atob(t+r);try{return JSON.parse(n)}catch(o){return{}}},tl=e=>{let t=JSON.stringify(e);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},so=e=>{var t;try{let o=(t=new URL(e).searchParams.get("joliSource"))==null?void 0:t.split(".");if(o!=null&&o.length){let[i,s,a]=o;return{headerJson:Nr(i),payloadJson:Nr(s),signature:Nr(a)}}else throw"joli_source is missing"}catch(r){return K(new Zn(`${e} not a valid schema: ${r}`)),{headerJson:{},payloadJson:{},signature:{}}}},ao=(e,t)=>{let r=t.split(".");if(r&&r.length===3){let n=r[0],o=tl(e),i=r[2];return`${n}.${o}.${i}`}return t}});var rl,lt,co,Dr=x(()=>{"use strict";P();rl="1.1.13-beta.9",lt=()=>rl,co=()=>{let e=lt();return`${no(e)}`}});var nl,uo,Lr,po,V,ol,g,J=x(()=>{"use strict";P();lo();Dr();P();nl={deviceInfo:{brand:"UnknownBrand",model:"UnknownModel",did:Pr(),pixelRatio:window.devicePixelRatio||1,platform:"h5",system:"UnknownSystemVersion",lang:"zh"},sdkInfo:{nativeSDKVersion:"",jssdkVersion:lt()},schema:window.location.href,platform:"h5"},Lr=(uo=globalThis.joliboxJSCore)==null?void 0:uo.env,V=Object.assign({},(po=Lr==null?void 0:Lr())!=null?po:nl),ol=()=>{var p,m,v,E,h,_,b,T,A;let{payloadJson:e,headerJson:t,signature:r}=V.schema.length?so(V.schema):{},n=`${V.deviceInfo.did}-${new Date().getTime()}`,i=new URL(V.schema.length?V.schema:window.location.href).searchParams,s=(v=(m=(p=i.get("mpId"))!=null?p:i.get("appId"))!=null?m:i.get("gameId"))!=null?v:"",a=(_=(h=(E=V.clientSessionId)!=null?E:e==null?void 0:e.sessionId)!=null?h:i.get("sessionId"))!=null?_:n,l=!!((b=e==null?void 0:e.testAdsMode)!=null?b:i.get("testAdsMode")==="true"),c=(A=(T=e==null?void 0:e.joliboxEnv)!=null?T:i.get("joliboxEnv"))!=null?A:"production",d=c==="staging",u=t==null?void 0:t.channel;return{get testMode(){return d},get testAdsMode(){return l},get joliboxEnv(){return c},get joliSource(){var C;return(C=i.get("joliSource"))!=null?C:null},get mpId(){var C;return(C=s!=null?s:e==null?void 0:e.id)!=null?C:""},get mpVersion(){var C;return(C=t==null?void 0:t.ver)!=null?C:lt()},get mpType(){var C,k;return(k=(C=t==null?void 0:t.__mpType)!=null?C:e==null?void 0:e.__mpType)!=null?k:"game"},get platform(){var C;return(C=V.platform)!=null?C:V.deviceInfo.platform},get deviceInfo(){return V.deviceInfo},get sdkInfo(){return V.sdkInfo},get hostInfo(){return V.hostInfo},get hostUserInfo(){return V.hostUserInfo},get sessionId(){var C,k;return(k=(C=V.clientSessionId)!=null?C:a)!=null?k:n},get channel(){return u},get webviewId(){var C;return(C=V.webviewId)!=null?C:-1},get shouldInterupt(){return e==null?void 0:e.__shouldInterupt},get from(){return e==null?void 0:e.__from},get baseApiHost(){return d?"https://stg-api.jolibox.com":"https://api.jolibox.com"},onEnvConfigChanged:C=>{zn(V,C,Yn)},encodeJoliSourceQuery:C=>{var k,$;return t&&r?ao(w(w({},e),C),(k=i.get("joliSource"))!=null?k:""):($=i.get("joliSource"))!=null?$:""}}},g=ol()});var Ur,fo,il,sl,mo,al,ho=x(()=>{"use strict";P();ie();J();P();Ur=!1,fo=(e,t)=>e==null?!1:t in e,il=e=>fo(e,"kind"),sl=e=>{let t=e.toLowerCase().split("_");return t[0]+t.slice(1).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join("")},mo=(e,t={},r)=>{var i,s,a;let n={user_id:(s=(i=g.hostUserInfo)==null?void 0:i.uid)!=null?s:"",device_id:(a=g.deviceInfo.did)!=null?a:"",timestamp:Date.now(),tag:sl(e.name)},o=O(w({},n),{env:t.environment,isFromUser:r});r?be.emit("GLOBAL_USER_ERROR",e,o):be.emit("GLOBAL_ERROR",e,o)},al=e=>fo(e,"kind")&&e.kind==="USER_ERROR";Or.on("ERROR_REPORT",({error:e,options:t})=>{if(Ur)return;Ur=!0;let r=il(e)&&e.raw?e.raw:e;try{let n=al(e);mo(e,t,n)}catch(n){let o=n instanceof Error?n.message:String(n),i=new Tr(`${o}, origin error: ${r.message}`);ne.error(i),mo(new Tr(i.message),{environment:t.environment},!1)}finally{Ur=!1}})});var _e,Fr,Re=x(()=>{"use strict";ie();P();ie();_e=(e,t)=>{var r,n;return new Ve((n=(r=t==null?void 0:t.errMsg)!=null?r:e.msg)!=null?n:"",e.code,e.type)},Fr=e=>new Xn(e)});var _o=x(()=>{"use strict";ho();Re();P();G();be.on("GLOBAL_ERROR",(e,t)=>{var n;let r={message:e.message,stack:(n=e.stack)!=null?n:"",errorType:e.name,source:0};N("trackAsync",{event:"reportJsError",data:r})});be.on("GLOBAL_USER_ERROR",(e,t)=>{ne.log("UserError",e,t)})});var jr=x(()=>{"use strict"});function go(e,t){let r=(n,o,i)=>{let s=O(w({tag:n},t),{extra:w({},o)});n=="globalJsError"?K(new eo(JSON.stringify(s))):e("systemLog",s,i)};return r.debounce=Je(r,500,{leading:!0}),r}function vo(e){let t=(r,n,o)=>{var a;let i=(a=o&&JSON.stringify(o))!=null?a:0,s={speed_value_type:r,total_duration:n};i&&Object.assign(s,{extra:i}),e("joliboxSpeedAnalysis",s)};return t.debounce=Je(t,500,{leading:!0}),t}var yo=x(()=>{"use strict";P();P();ie()});function bo(e,t){let r=go(e,t),n=vo(r);return{track:r,trackPerformance:n}}var wo=x(()=>{"use strict";yo()});var Eo=x(()=>{"use strict";J();P();P()});var ko=x(()=>{"use strict";wo();jr();Eo()});var ct,xo=x(()=>{"use strict";ct=class{constructor(t,r){this.eventEmitter=t;this.lastReportTime=0;this.visible=!0;this.timer=this.createRAFTimer(t=>{this.reporter({event:"PLAY_GAME",params:{duration:t}}),this.tracker("PlayGame",{duration:t})});this.interval=r!=null?r:5*1e3,t.on("visible",n=>{this.visible=n})}start(t){this.reporter({event:"OPEN_GAME",params:{timestamp:Date.now(),duration:t!=null?t:0}}),this.tracker("OpenGame",{duration:t!=null?t:0}),this.timer.start()}close(t){this.reporter({event:"CLOSE_GAME",params:{timestamp:Date.now(),duration:t}}),this.tracker("CloseGame",{duration:t}),this.timer.stop()}createRAFTimer(t){let r=Date.now(),n,o,i=!1,s=0,a=()=>{if(!i)return;let m=Date.now(),v=m-r;v>=this.interval&&(this.visible&&(s+=v,t(s)),r=m),n=requestAnimationFrame(a)},l=()=>{d(),r=Date.now(),o=window.setInterval(()=>{if(!i)return;let m=Date.now();m-r>=this.interval&&(r=m)},this.interval)},c=()=>{u(),r=Date.now(),n=requestAnimationFrame(a)},d=()=>{n&&(cancelAnimationFrame(n),n=0)},u=()=>{o&&(clearInterval(o),o=0)};this.eventEmitter.on("visible",m=>{i&&(console.log("visible",m),m?c():l())});let p=this.visible;return{start(){i||(i=!0,p?c():l())},stop(){i=!1,d(),u()}}}}});var Mr=x(()=>{"use strict"});function To(e,t,r){let{response:n,startTime:o,endTime:i,requestFrom:s}=r,{errMsg:a="",profile:l={}}=n,d={duration:i-o,request_type:e,url:t.split("?")[0],result:r.state,error_msg:r.state==="fail"?a:"",socket_reused:l.socketReused?1:0,request_from:s};(s==="public"&&So<cl||s==="inner")&&(d.joli_request_number=So++,setTimeout(()=>{Q("joliboxNetRequestResult",d)},500))}var So,cl,Io=x(()=>{"use strict";Mr();ge();So=0,cl=10});function ut(e,t,r){var l,c,d;let n=new Map,o=(l=r==null?void 0:r.baseUrl)!=null?l:"https://api.jolibox.com",i=(c=r==null?void 0:r.type)!=null?c:"public",s=(d=r==null?void 0:r.defaultHeaders)!=null?d:{};return re("onRequestTaskStateChange",u=>{if(typeof u.requestTaskId!="string")return;let p=n.get(u.requestTaskId);if(p)if(u.state==="success"){let m=u,{requestTaskId:E,state:h}=m,_=Z(m,["requestTaskId","state"]);u.statusCode===200?p.resolve(_):p.reject(_),n.delete(E)}else if(u.state==="fail"){let v=u,{requestTaskId:E,state:h}=v,_=Z(v,["requestTaskId","state"]);p.reject(_),n.delete(E)}else ne.warn("onRequestTaskStateChange unknown event",u)}),ue.on("onLoginComplete",({isLogin:u,token:p})=>{u&&p&&(s["X-JOLI-TOKEN"]=p)}),(m,...v)=>y(this,[m,...v],function*(u,p={}){let E=Date.now(),h=ul(u,O(w({},p),{baseUrl:o})),{method:_="GET",responseType:b="text",dataType:T="json",timeout:A,enableCache:C=!1,appendHostCookie:k=!0}=p,$=Object.assign({"content-type":"application/json"},s,p.header),z={url:h,method:_,header:$,enableCache:C,responseType:b,appendHostCookie:k};if(_=="POST"||_=="PUT"){let te=pl(p.data,$["content-type"]);z.data=te}A&&Object.assign(z,{timeout:A});let{data:{requestTaskId:ae}}=N(e,z);if(typeof ae!="string")throw _e({code:-1,msg:"requestTaskId is not a string"});let Ie=(te,le)=>{To("request",h,{state:te,startTime:E,endTime:Date.now(),params:z,response:le,requestId:ae,requestFrom:i=="public"?"public":"inner"})},{resolve:X,reject:ve,promise:gs}=new he;n.set(ae,{resolve:X,reject:ve});try{let te=yield gs;Ie("success",te);let{data:le}=te;return T==="json"&&typeof le=="string"&&(le=dl(le)),{url:h,timeout:A,method:_,response:O(w({},te),{data:le})}}catch(te){let le=te;if(ye(le)){let{errMsg:Qe,prefetchDetail:vs,isPrefetch:ys,errNo:bs}=le;He(Qe)&&(Ie("fail",{errMsg:Qe,isPrefetch:ys,prefetchDetail:vs}),K(_e({code:-1,msg:Qe},{errNo:bs,errMsg:Qe})))}throw te}})}function dl(e){try{return JSON.parse(e.trim())}catch(t){return e}}function pl(e,t="application/json"){let r=t.toLowerCase();return e===void 0?"":typeof e=="string"||e instanceof ArrayBuffer?e:r.includes("application/x-www-form-urlencoded")||r.includes("application/json")||typeof e=="object"?JSON.stringify(e):String(e)}var ul,Br=x(()=>{"use strict";P();Io();Mr();G();ie();Re();ul=(e,t)=>{if(/^https?:\/\//.test(e))return e;let r=t==null?void 0:t.query,o=new URLSearchParams(r).toString();return t!=null&&t.baseUrl?`${t.baseUrl}${e}${o?`?${o}`:""}`:`${e}${o?`?${o}`:""}`}});var Hr,Ro,q,Ae=x(()=>{"use strict";Dr();Br();J();Hr={"x-user-agent":co()};(Ro=g.hostUserInfo)!=null&&Ro.token&&(Hr["x-joli-token"]=g.hostUserInfo.token);g.joliSource&&(Hr["x-joli-source"]=g.joliSource);q=ut("createRequestTaskSync","operateRequestTaskSync",{type:"inner",baseUrl:g.testMode?"https://stg-api.jolibox.com":"https://api.jolibox.com",defaultHeaders:Hr})});var dt,Ao=x(()=>{"use strict";J();xo();Ae();G();dt=class extends ct{constructor(t,r,n){super(r,n),this.gameId=g.mpId,this.sessionId=g.sessionId,this.track=t}reporter(t){return y(this,null,function*(){let{event:r,params:n}=t,o=[];o.push(q("/api/base/app-event",{method:"POST",data:{eventType:r,gameInfo:w({gameId:this.gameId,sessionId:this.sessionId},n)}})),yield Promise.all(o)})}reportToNative(t){return y(this,null,function*(){let{event:r,params:n}=t;yield Y("userTrackAsync",{event:r,params:w({},n),gameId:this.gameId})})}tracker(t,r=null){this.track(t,r)}}});var Do={};yn(Do,{nativeTaskEmitter:()=>Ge,taskTracker:()=>W,track:()=>Q,trackPerformance:()=>Oo});var ml,Co,Po,Q,Oo,No,Ge,W,ge=x(()=>{"use strict";_o();P();jr();ko();J();Ao();G();ml=(e,t,r)=>{var s,a;let n=t,o=ye(n.extra)?n.extra:He(n.extra)?JSON.parse(n.extra):{},i=O(w({},o),{mp_id:(s=n.mp_id)!=null?s:"",mp_version:(a=n.mp_version)!=null?a:""});N("trackAsync",{event:e,data:i,webviewId:r})},{track:Q,trackPerformance:Oo}=bo(ml,{type:Rr.AppSDK,platform:"native",jssdk_version:(Po=(Co=g.sdkInfo)==null?void 0:Co.jssdkVersion)!=null?Po:"1.0.0",mp_id:g.mpId,mp_version:g.mpVersion}),No=j();No.registerCommand("ReportSDK.traceSystemTimeline",({event:e,duration:t,extra:r})=>{Oo(e,t,r)});No.registerCommand("ReportSDK.traceSystem",({event:e,info:t})=>{Q(e,t)});Ge=new oe,W=new dt(Q,Ge)});function Lo(){let e=null,t=window.fetch,r=()=>{e=document.createElement("style"),e.setAttribute("data-jolibox-sdk","default-styles");let i=`
|
|
1
|
+
var AS=Object.create;var ln=Object.defineProperty,qS=Object.defineProperties,kS=Object.getOwnPropertyDescriptor,OS=Object.getOwnPropertyDescriptors,PS=Object.getOwnPropertyNames,cn=Object.getOwnPropertySymbols,CS=Object.getPrototypeOf,Ei=Object.prototype.hasOwnProperty,Hu=Object.prototype.propertyIsEnumerable;var $u=(e,r,t)=>r in e?ln(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,I=(e,r)=>{for(var t in r||(r={}))Ei.call(r,t)&&$u(e,t,r[t]);if(cn)for(var t of cn(r))Hu.call(r,t)&&$u(e,t,r[t]);return e},N=(e,r)=>qS(e,OS(r));var Re=(e,r)=>{var t={};for(var n in e)Ei.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&cn)for(var n of cn(e))r.indexOf(n)<0&&Hu.call(e,n)&&(t[n]=e[n]);return t};var T=(e,r)=>()=>(e&&(r=e(e=0)),r);var f=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Ku=(e,r)=>{for(var t in r)ln(e,t,{get:r[t],enumerable:!0})},NS=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of PS(r))!Ei.call(e,o)&&o!==t&&ln(e,o,{get:()=>r[o],enumerable:!(n=kS(r,o))||n.enumerable});return e};var B=(e,r,t)=>(t=e!=null?AS(CS(e)):{},NS(r||!e||!e.__esModule?ln(t,"default",{value:e,enumerable:!0}):t,e));var E=(e,r,t)=>new Promise((n,o)=>{var i=u=>{try{s(t.next(u))}catch(c){o(c)}},a=u=>{try{s(t.throw(u))}catch(c){o(c)}},s=u=>u.done?n(u.value):Promise.resolve(u.value).then(i,a);s((t=t.apply(e,r)).next())});function MS(e){return!!(e!=null&&e.__nativeBuffers__)}function Oi(e){if(typeof e=="string")try{e=JSON.parse(e)}catch(t){return{}}if(typeof e!="object"||e===null)return{};if(!MS(e))return e;let r=e.__nativeBuffers__;if(delete e.__nativeBuffers__,r)for(let t=0;t<r.length;t++){let n=r[t];if(n){let o;n.value?o=n.value:n.base64&&(o=BS(n.base64)),typeof o!="undefined"&&o instanceof ArrayBuffer&&(e[n.key]=o)}}return e}function HS(e={},r=!1){let t=e,n=[];for(let[o,i]of Object.entries(t))if(i!==void 0&&i instanceof ArrayBuffer&&i.byteLength!==void 0){let a=r?{value:i,key:o}:{base64:$S(i),key:o};n.push(a),delete t[o]}return n.length>0&&(t.__nativeBuffers__=n),t}function YS(e){return new Promise(r=>{setTimeout(()=>{r()},e)})}function tc(e){return typeof e=="string"}function lt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function XS(e){return typeof e=="undefined"}function ZS(e){return XS(e)||e===null}function nc(e){return typeof e=="function"}function ex(e){return lt(e)&&nc(e.then)}function oc(e){let r=e,t=null,n=function(...o){return t||(t=new r(...o)),t};return n.prototype=r.prototype,n}function ct(e){return(...r)=>{var t,n;((n=(t=globalThis.VConsole)==null?void 0:t[e])!=null?n:globalThis.console[e])(...r)}}function dx(){try{if(window.__joliboxLocalStorage__)return window.__joliboxLocalStorage__;let e=Object.getOwnPropertyDescriptor(window,"localStorage");if(e&&e.get){let n=e.get.call(window);return window.__joliboxLocalStorage__=n,n}if(e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(window),"localStorage"),e&&e.get)return e.get.call(window);let r=Window.prototype,t=Object.getOwnPropertyDescriptor(r,"localStorage");if(t&&t.get){let n=t.get.call(window);return window.__joliboxLocalStorage__=n,n}return localStorage}catch(e){return console.warn("Failed to get original localStorage, fallback to default implementation",e),localStorage}}function vx(e){return new Promise(r=>ic(e)(r))}function ic(e){return(r,t=null)=>{let n=!1;return e(o=>{if(!n)return n=!0,r.call(t,o)},null)}}function hx(e,r){return(t=>{let n,o={onWillAddFirstListener(){n=t(i.fire,i)}},i=new ft(o);return i.event})((t,n=null)=>e(o=>r(o)&&t.call(n,o),null))}function yx(e,r){let t=Math.min(e.length,r.length);for(let n=0;n<t;n++)_x(e[n],r[n])}function _x(e,r){if(tc(r)){if(typeof e!==r)throw new Error(`argument does not match constraint: typeof ${r}`)}else if(nc(r)){try{if(e instanceof r)return}catch(t){}if(!ZS(e)&&e.constructor===r||r.length===1&&r.call(void 0,e)===!0)return;throw new Error("[Jolibox SDK]argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function zu(e,r){return`[${e}]:${r}`}function Ix(e,r){Yu||(Ri=new fn({eventName:"jolibox_invoke",tagNameOrder:["status","method","errNo","errMsg","isForeground"],metricName:"duration",reporter(o){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:o}),-1)}}),Ai=new fn({eventName:"jolibox_invoke_js2native",tagNameOrder:["status","method","isForeground"],metricName:"duration",reporter(o){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:o}),-1)}}),qi=new fn({eventName:"jolibox_invoke_native2js",tagNameOrder:["status","method","isForeground"],metricName:"duration",reporter(o){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:o}),-1)}}),r("onJoliboxEnterBackground",()=>{Ri.flush(),Ai.flush(),qi.flush()}),Yu=!0);function t(o){var i,a;let{method:s,args:u,startTime:c,isForeground:d,errMsg:l=`${s}:fail no errMsg`,errNo:p=0,__timing:m={receiveJSInvoke:0,invokeCallback:0}}=o,{receiveJSInvoke:v,invokeCallback:y}=m,h=(a=(i=l.match(/\S:(\S+)\s?/))==null?void 0:i[1])!=null?a:"fail";Ri.report({status:h,method:n(s,u),errNo:`${p}`,errMsg:l,isForeground:d,duration:Date.now()-c}),c&&v&&y&&(Ai.report({status:h,method:s,isForeground:d,duration:Number((v-c).toFixed(3))}),qi.report({status:h,method:s,isForeground:d,duration:Number((Date.now()-y).toFixed(3))}))}function n(o,i){return(o==="callHostMethod"||o==="callHostMethodSync")&&i!=null&&i.method?`${o}-${i.method}`:o}return t}function Rx(e,r){let t=0,n=!0,o=new Map,i=Ix(e,r);r("onJoliboxEnterBackground",()=>{n=!1}),r("onJoliboxEnterForeground",()=>{n=!0,ki.forEach(u=>Fi(this,[u],function*({method:c,args:d,resolve:l}){let p=yield s(c,d);l(p)})),ki.length=0});let a=(u,c)=>{let d=o.get(Number(u));if(!d)return;let l=Oi(c);d(l),o.delete(Number(u))},s=(u,c)=>{var d,l;let p=Date.now(),m=`${n}`;t+=1;let v=new QS;if(o.set(t,v.resolve),!n&&Sx.includes(u))return new Promise(A=>{ki.push({method:u,args:c,resolve:A})});let y=jS(tr({},{method:u,startTime:p,args:c,isForeground:m}),{invokeType:"js-bridge"}),h=!Tx&&wx.includes(u),g=HS(c,h),_=h?g:JSON.stringify(g),x;if(u.endsWith("Sync")||xx.includes(u)?x=(d=e.call)==null?void 0:d.call(e,u,g,t):typeof _=="string"?x=e.invoke(u,_,t):x=(l=e.call)==null?void 0:l.call(e,u,_,t),x){try{typeof x=="string"&&(x=JSON.parse(x)),x=Oi(x)}catch(A){Ui.error(A)}return o.delete(t),x.errorCode&&(x.errorCode=zu(u,x.errorCode)),i(tr(tr({},y),x)),x}return u.endsWith("Sync")&&o.delete(t),v.promise.then(A=>(A.errorCode&&(A.errorCode=zu(u,A.errorCode)),i(tr(tr({},y),A)),A))};return{invokeNative:s,applyNative:(u,c)=>{let d=s(u,c);return ex(d)?d.then(l=>Qu(u,l)):Qu(u,d)},invokeHandler:a}}function Qu(e,r){if(!lt(r)){Ui.warn(`[Jolibox SDK]${e} no response value`);return}let t=r,{errMsg:n,errNo:o,errorType:i,errorCode:a}=t,s=US(t,["errMsg","errNo","errorType","errorCode"]);if(n&&n!==`${e}:ok`)throw new ox(n,o,i,a);return s}function Ax(e){let r=new Ni,t=new Ni,n=new fn({eventName:"jolibox_publish",tagNameOrder:["type","event"],metricName:"duration",reporter(o){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:o}),-1)}});return r.on("onJoliboxEnterBackground",()=>{n.flush()}),{onNative:r.on.bind(r),offNative:r.off.bind(r),subscribe:t.on.bind(t),unsubscribe:t.off.bind(t),subscribeHandler(o,i,a){let s=Oi(i),u;if(s.__extra){u=s.params;let{type:c,startTime:d}=s.__extra;n.report({type:c,event:o,duration:Date.now()-d})}else u=s;if(o===ac){u.forEach(c=>{let[d,l]=c;try{t.emit(d.slice(dt.length),l,a)}catch(p){}});return}if(o.startsWith(dt)){t.emit(o.slice(dt.length),u,a);return}r.emit(o,u,a)}}}function qx(e){let r=new Map,t;return(n,o,i,a)=>{if(a){let u=i?[i]:"*";e.publish(`${dt}${n}`,o,u);return}t||(t=Promise.resolve().then(()=>{r.forEach((u,c)=>{try{let d=c?[c]:"*";e.publish(ac,u,d)}catch(d){}}),t=void 0,r.clear()}));let s=r.get(i);s||(s=[],r.set(i,s)),s.push([`${dt}${n}`,o])}}function kx(e){let{subscribeHandler:r,onNative:t,offNative:n,subscribe:o,unsubscribe:i}=Ax(e),{invokeNative:a,invokeHandler:s,applyNative:u}=Rx(e,t),c=qx(e);return{invokeHandler:s,subscribeHandler:r,applyNative:u,invokeNative:a,onNative:t,offNative:n,publish:c,subscribe:o,unsubscribe:i}}function sc(e,r){return{params:e,__extra:{startTime:Date.now(),type:r}}}var DS,LS,FS,pn,Zu,ec,Gu,tr,jS,US,Fi,BS,$S,ji,KS,Vu,GS,VS,Ju,JS,WS,rc,zS,QS,rx,tx,mn,nx,ox,ix,Ii,Ui,ax,sx,ux,cx,lx,jF,Pi,H,fx,px,dn,ft,Ni,Di,mx,Ti,gx,UF,Li,Wu,MF,bx,dt,wx,Sx,xx,ac,Ex,fn,Yu,Ri,Ai,qi,ki,Tx,Mi,Ke,uc,cc,Ox,lc,Xu,be,j,Pe,BF,Px,dc,$F,HF,fe=T(()=>{"use strict";DS=Object.defineProperty,LS=Object.defineProperties,FS=Object.getOwnPropertyDescriptors,pn=Object.getOwnPropertySymbols,Zu=Object.prototype.hasOwnProperty,ec=Object.prototype.propertyIsEnumerable,Gu=(e,r,t)=>r in e?DS(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,tr=(e,r)=>{for(var t in r||(r={}))Zu.call(r,t)&&Gu(e,t,r[t]);if(pn)for(var t of pn(r))ec.call(r,t)&&Gu(e,t,r[t]);return e},jS=(e,r)=>LS(e,FS(r)),US=(e,r)=>{var t={};for(var n in e)Zu.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&pn)for(var n of pn(e))r.indexOf(n)<0&&ec.call(e,n)&&(t[n]=e[n]);return t},Fi=(e,r,t)=>new Promise((n,o)=>{var i=u=>{try{s(t.next(u))}catch(c){o(c)}},a=u=>{try{s(t.throw(u))}catch(c){o(c)}},s=u=>u.done?n(u.value):Promise.resolve(u.value).then(i,a);s((t=t.apply(e,r)).next())});BS=e=>{let r=atob(e),t=r.length,n=new Uint8Array(t);for(let o=0;o<t;o++)n[o]=r.charCodeAt(o);return n.buffer};$S=e=>{let r="",t=new Uint8Array(e),n=t.byteLength;for(let o=0;o<n;o++)r+=String.fromCharCode(t[o]);return btoa(r)};ji=Object.defineProperty,KS=Object.getOwnPropertyDescriptor,Vu=Object.getOwnPropertySymbols,GS=Object.prototype.hasOwnProperty,VS=Object.prototype.propertyIsEnumerable,Ju=(e,r,t)=>r in e?ji(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,JS=(e,r)=>{for(var t in r||(r={}))GS.call(r,t)&&Ju(e,t,r[t]);if(Vu)for(var t of Vu(r))VS.call(r,t)&&Ju(e,t,r[t]);return e},WS=(e,r)=>{for(var t in r)ji(e,t,{get:r[t],enumerable:!0})},rc=(e,r,t,n)=>{for(var o=n>1?void 0:n?KS(r,t):r,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(n?a(r,t,o):a(o))||o);return n&&o&&ji(r,t,o),o},zS=(e,r,t)=>new Promise((n,o)=>{var i=u=>{try{s(t.next(u))}catch(c){o(c)}},a=u=>{try{s(t.throw(u))}catch(c){o(c)}},s=u=>u.done?n(u.value):Promise.resolve(u.value).then(i,a);s((t=t.apply(e,r)).next())});if(typeof window!="undefined"&&!window.AbortController){let e=function(){this.signal=new r};e.prototype.abort=function(){this.signal._aborted=!0,typeof this.signal.onabort=="function"&&this.signal.onabort(new Event("abort"));let t=new Event("abort");this.signal.dispatchEvent(t)};let r=function(){this._aborted=!1,this.aborted=!1,this.onabort=null,this._eventListeners={}};Object.defineProperty(r.prototype,"aborted",{get:function(){return this._aborted}}),r.prototype.addEventListener=function(t,n){this._eventListeners[t]||(this._eventListeners[t]=[]),this._eventListeners[t].push(n)},r.prototype.removeEventListener=function(t,n){if(!this._eventListeners[t])return;let o=this._eventListeners[t].indexOf(n);o!==-1&&this._eventListeners[t].splice(o,1)},r.prototype.dispatchEvent=function(t){if(this._eventListeners[t.type])for(let n of this._eventListeners[t.type])n.call(this,t)},window.AbortController=e,window.AbortSignal=r}QS=class{constructor(){this.state="pending",this.promise=new Promise((e,r)=>{this.resolve=t=>{this.state==="pending"&&(this.state="fulfilled",e(t))},this.reject=t=>{this.state==="pending"&&(this.state="rejected",r(t))}})}};rx=(e=>(e[e.DEVELOPER_FILE_NOT_FOUND=0]="DEVELOPER_FILE_NOT_FOUND",e[e.INTERNAL_IOS_CAN_NOT_FOUND_PKG=1]="INTERNAL_IOS_CAN_NOT_FOUND_PKG",e[e.USER_IOS_LOAD_TIMEOUT=2]="USER_IOS_LOAD_TIMEOUT",e[e.INTERNAL_IOS_PKG_LOAD_ERROR=3]="INTERNAL_IOS_PKG_LOAD_ERROR",e[e.INTERNAL_IOS_PKG_PARSE_FAIL=4]="INTERNAL_IOS_PKG_PARSE_FAIL",e[e.USER_IOS_GET_EMPTY_DATA=5]="USER_IOS_GET_EMPTY_DATA",e[e.USER_ANDROID_GET_PKG_FAIL=6]="USER_ANDROID_GET_PKG_FAIL",e[e.DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE=7]="DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE",e))(rx||{}),tx=class extends Error{constructor(e){if(typeof e=="string"){super(e),this.priority="P1";return}super(e.message),this.priority="P1",this.stack=e.stack,this.raw=e}},mn=class extends tx{constructor(){super(...arguments),this.kind="INTERNAL_ERROR"}},nx=class extends mn{constructor(){super(...arguments),this.name="INTERNAL_INVOKE_NATIVE_ERROR"}},ox=class extends mn{constructor(e,r,t,n){super(e),this.errNo=r,this.name="INTERNAL_APPLY_NATIVE_ERROR",this.errorType=t,this.errorCode=n}},ix=class extends mn{constructor(){super(...arguments),this.name="INTERNAL_JSCORE_ERROR",this.priority="P0"}},Ii=class extends mn{constructor(){super(...arguments),this.name="INTERNAL_METRIC_REPORT_ERROR"}};Ui={log:ct("log"),warn:ct("warn"),info:ct("info"),error:ct("error"),debug:ct("debug")};Object.assign(globalThis,{logger:Ui});ax=Symbol.for("Jolibox.canIUseMap"),sx={};globalThis[ax]=sx;ux=(e=>(e[e.System=1e3]="System",e[e.ErrorTrace=1001]="ErrorTrace",e[e.UserDefined=1002]="UserDefined",e))(ux||{}),cx=(e=>(e.MiniGame="mini-game",e.MiniDrama="mini-drama",e.App="app",e.WebSDK="web-sdk",e.AppSDK="app-sdk",e))(cx||{}),lx=(e=>(e[e.App=0]="App",e[e.H5=1]="H5",e[e.Weapp=2]="Weapp",e[e.Alipay=3]="Alipay",e[e.Gcash=4]="Gcash",e[e.Dana=5]="Dana",e[e.Umma=6]="Umma",e[e.WebSDK=1e3]="WebSDK",e[e.AppSDK=1001]="AppSDK",e[e.Other=9999]="Other",e))(lx||{});dx();jF={isiOS:navigator.userAgent.includes("iPhone")||navigator.userAgent.includes("iPod")||navigator.userAgent.includes("iPad")||navigator.userAgent.includes("iPhone OS"),iosVersion:()=>{let e=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3]||"0",10)]},isAndroid:navigator.userAgent.includes("Android"),isMac:navigator.userAgent.includes("Mac"),isFacebook:navigator.userAgent.includes("FB_IAB"),isPC:!navigator.userAgent.includes("iPhone")&&!navigator.userAgent.includes("Android")},Pi=class Ci{constructor(r){this.element=r,this.next=Ci.Undefined,this.prev=Ci.Undefined}};Pi.Undefined=new Pi(void 0);H=Pi,fx=class{constructor(){this._first=H.Undefined,this._last=H.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===H.Undefined}clear(){let e=this._first;for(;e!==H.Undefined;){let r=e.next;e.prev=H.Undefined,e.next=H.Undefined,e=r}this._first=H.Undefined,this._last=H.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,r){let t=new H(e);if(this._first===H.Undefined)this._first=t,this._last=t;else if(r){let o=this._last;this._last=t,t.prev=o,o.next=t}else{let o=this._first;this._first=t,t.next=o,o.prev=t}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(t))}}shift(){if(this._first!==H.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==H.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==H.Undefined&&e.next!==H.Undefined){let r=e.prev;r.next=e.next,e.next.prev=r}else e.prev===H.Undefined&&e.next===H.Undefined?(this._first=H.Undefined,this._last=H.Undefined):e.next===H.Undefined?(this._last=this._last.prev,this._last.next=H.Undefined):e.prev===H.Undefined&&(this._first=this._first.next,this._first.prev=H.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==H.Undefined;)yield e.element,e=e.next}},px=0,dn=class{constructor(e){this.value=e,this.id=px++}},ft=class{constructor(e){this.options=e,this._size=0}dispose(e){var r,t;this._disposed||(this._disposed=!0,this._listeners&&(e?(this._listeners instanceof dn&&(this._listeners=[this._listeners]),this._listeners=this._listeners.filter(n=>(n==null?void 0:n.value)===e)):(this._listeners=void 0,this._size=0)),(t=(r=this.options)==null?void 0:r.onDidRemoveLastListener)==null||t.call(r))}get event(){var e;return(e=this._event)!=null||(this._event=(r,t)=>{var n,o,i,a,s,u;if(this._disposed)return()=>{console.info("[Jolibox SDK] Emitter is _disposed")};t&&(r=r.bind(t));let c=new dn(r);this._listeners?this._listeners instanceof dn?this._listeners=[this._listeners,c]:this._listeners.push(c):((o=(n=this.options)==null?void 0:n.onWillAddFirstListener)==null||o.call(n,this),this._listeners=c,(a=(i=this.options)==null?void 0:i.onDidFirstListener)==null||a.call(i,this)),(u=(s=this.options)==null?void 0:s.onDidAddListener)==null||u.call(s,this),this._size++}),this._event}_deliver(e,r){var t;if(!e)return;let n=((t=this.options)==null?void 0:t.onListenerError)||Error.constructor;if(!n){e.value(r);return}try{e.value(r)}catch(o){n(o)}}fire(e){this._listeners&&(this._listeners instanceof dn?this._deliver(this._listeners,e):this._listeners.forEach(r=>this._deliver(r,e)))}hasListeners(){return this._size>0}},Ni=class{constructor(){this.listeners=new Map,this.listerHandlerMap=new WeakMap,this.cachedEventQueue=new Map}on(e,r){var t;let n=(t=this.listeners.get(e))!=null?t:new ft,o=a=>r(...a.args);this.listerHandlerMap.set(r,o),n.event(o),this.listeners.set(e,n);let i=this.cachedEventQueue.get(e);if(i)for(;i.size>0;)n.fire(JS({event:e},i.shift()))}off(e,r){let t=this.listeners.get(e);if(t){let n=this.listerHandlerMap.get(r);t.dispose(n)}}emit(e,...r){let t=this.listeners.get(e);if(t)t.fire({event:e,args:r});else{let n=this.cachedEventQueue.get(e);n||(n=new fx,this.cachedEventQueue.set(e,n)),n.push({args:r})}}},Di={};WS(Di,{None:()=>mx,filter:()=>hx,once:()=>ic,toPromise:()=>vx});mx=()=>{console.log("[Jolibox SDK] None Event")};Ti=Symbol.for("Jolibox.hostEmitter"),gx=()=>{let e=new Ni;return globalThis[Ti]||(globalThis[Ti]={on:e.on.bind(e),off:e.off.bind(e),emit:e.emit.bind(e)}),globalThis[Ti]},UF=gx();Li=class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new ft,this.onDidRegisterCommand=this._onDidRegisterCommand.event,console.log("[Jolibox SDK] command registry")}registerCommand(e){if(!e)throw new Error("invalid command");if(e.metadata&&Array.isArray(e.metadata.args)){let t=[];for(let o of e.metadata.args)t.push(o.constraint);let n=e.handler;e.handler=function(...o){return yx(o,t),n(...o)}}let{id:r}=e;this._commands.get(r)&&console.info(`[Jolibox SDK] duplicated command is registered ${r}`),this._commands.set(r,e),this._onDidRegisterCommand.fire(r)}getCommand(e){return this._commands.get(e)}getCommands(){let e=new Map;for(let r of this._commands.keys()){let t=this.getCommand(r);t&&e.set(r,t)}return e}};Li=rc([oc],Li);Wu=class{constructor(){this._onWillExecuteCommand=new ft,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._onDidExecuteCommand=new ft,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this.registry=new Li,this._starActivation=null}_activateStar(){return this._starActivation||(this._starActivation=YS(3e4)),this._starActivation}executeCommand(e,...r){return zS(this,null,function*(){return this.registry.getCommand(e)?this._tryExecuteCommand(e,r):(yield Promise.all([Promise.race([this._activateStar(),Di.toPromise(Di.filter(this.registry.onDidRegisterCommand,t=>t===e))])]),this._tryExecuteCommand(e,r))})}executeCommandThowErr(e,...r){if(!this.registry.getCommand(e))throw new Error(`command '${e}' not found`);let t=this.registry.getCommand(e);this._onWillExecuteCommand.fire({commandId:e,args:r});let n=this.invokeFunction(t.handler,...r);return this._onDidExecuteCommand.fire({commandId:e,args:r}),n}_tryExecuteCommand(e,r){let t=this.registry.getCommand(e);if(!t)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:r});let n=this.invokeFunction(t.handler,...r);return this._onDidExecuteCommand.fire({commandId:e,args:r}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}invokeFunction(e,...r){let t=!1;try{return e(...r)}finally{t=!0}}};Wu=rc([oc],Wu);MF=Symbol.for("Jolibox.commands");bx=()=>!!(navigator.userAgent||"").includes("JoliboxPlatformSDK"),dt="custom_event_",wx=[],Sx=[],xx=["env","createRequestTask","login"],ac="__batch_event__",Ex=e=>e==="pv"?e:"default",fn=class{constructor(e){this.interval=30,this.lastReportTime=0,this.cache={};let{reporter:r,interval:t=30,eventName:n,tagNameOrder:o,metricName:i,type:a}=e;this.reporter=r,this.interval=t,this.eventName=n,this.tagNameOrder=o,this.metricName=i,this.type=Ex(a)}report(e){this.type==="pv"?this.addPVPoint(e):this.addPoint(e),this.tryReport(!1)}flush(){this.tryReport(!0)}tryReport(e){if(Object.keys(this.cache).length){if(e){this.reporter(this.processPoints(this.cache)),this.clearPoints();return}this.lastReportTime=this.lastReportTime||Date.now(),Date.now()-this.lastReportTime>=this.interval*1e3&&(this.reporter(this.processPoints(this.cache)),this.clearPoints(),this.lastReportTime=Date.now())}}addPoint(e){let r=(t,n,o,i)=>{let a=n.shift();if(a){let s=i[a];t[s]||(t[s]={}),r(t[s],n,o,i)}else t[o]||(t[o]=[]),t[o].push(i[o])};r(this.cache,[...this.tagNameOrder],this.metricName,e)}addPVPoint(e){let r=(n,o,i,a)=>{let s=o.shift();if(!s&<(a))throw new Ii(`report value failed to match tagNameOrder, ${JSON.stringify(t)}`);if(s){let u=[];if(lt(a))u.push(...Object.keys(a));else if(tc(a)){if(o.length>0)throw new Ii(`report value failed to match tagNameOrder, ${JSON.stringify(t)}`);u.push(a)}else throw new Ii(`expected metric value to be a string, but got a(n) ${typeof a}, ${JSON.stringify(t)}`);u.forEach(c=>{n[c]||(n[c]={});let d=lt(a)?a[c]:a;r(n[c],[...o],i,d)})}else n[i]?n[i]++:n[i]=1},t={point:e,metricName:this.metricName,tagNameOrder:this.tagNameOrder};r(this.cache,[...this.tagNameOrder],this.metricName,e)}processPoints(e){return{eventName:this.eventName,tagNameOrder:this.tagNameOrder,metricName:this.metricName,metricAggregateType:this.type==="pv"?"itoa":"arr",data:e}}clearPoints(){this.cache={}}},Yu=!1;ki=[],Tx=!1;Ke={trigger(){},exit(){return Promise.resolve(!1)},onReady(e){Ke.trigger=e},onDoExit(e){Ke.exit=e}},uc=e=>{let r=window.prompt("invoke",JSON.stringify({event:"envSync",paramsString:JSON.stringify({})}));if(!r)e.onError(new nx("native env failed"));else{let{data:t}=JSON.parse(r);return t!=null?t:void 0}};if(window.webkit){let e=window.webkit.messageHandlers,r=(o="")=>{Ke.trigger(),e.onDocumentReady.postMessage({path:o})},t=o=>Fi(void 0,null,function*(){let i=yield Ke.exit();e.doExit.postMessage({uuid:o,shouldInterrupt:i})});Mi={onDocumentReady:r,doExit:t,invoke(o,i,a){e.invoke.postMessage({event:o,paramsString:i,callbackId:a})},publish(o,i,a){let s=sc(i,"joliboxJSCore");window.prompt("publish",JSON.stringify({event:o,paramsString:JSON.stringify(s),webviewIds:a}))},call(o,i,a){let s=window.prompt("invoke",JSON.stringify({event:o,paramsString:JSON.stringify(i),callbackId:a}));if(s)return JSON.parse(s)}};let n={onDocumentReady:r,env:uc,doExit:t};globalThis.joliboxJSCore=tr({},n)}if(window.JoliAndroidSDKBridge){let e=window.JoliAndroidSDKBridge,r=(o="")=>{Ke.trigger(),e.onDocumentReady(JSON.stringify({path:o}))},t=o=>Fi(void 0,null,function*(){let i=yield Ke.exit();e.doExit(JSON.stringify({uuid:o,shouldInterrupt:i}))});Mi={onDocumentReady:r,invoke(o,i,a){e.invoke(JSON.stringify({event:o,paramsString:i,callbackId:a}))},doExit:t,publish(o,i,a){let s=sc(i,"joliboxJSCore");e.publish({event:o,paramsString:JSON.stringify(s),webviewIds:a})},call(o,i,a){let s=window.prompt("invoke",JSON.stringify({event:o,paramsString:JSON.stringify(i),callbackId:a}));if(s)return JSON.parse(s)}};let n={onDocumentReady:r,env:uc,doExit:t};globalThis.joliboxJSCore=tr({},n)}cc=Mi;if(!cc&&bx())throw new ix("No joliboxJScore is found, native bridge not found.");Ox=tr({},cc),lc=kx(Ox),{invokeHandler:Xu}=lc,{applyNative:be,invokeNative:j,onNative:Pe,offNative:BF,subscribeHandler:Px,publish:dc,subscribe:$F,unsubscribe:HF}=lc;globalThis.joliboxJSBridge={callHandler:Xu,invokeHandler:Xu,subscribeHandler:Px}});function jx(e){return new Promise(r=>{setTimeout(()=>{r()},e)})}function vt(e){return typeof e=="string"}function yr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function gc(e){return typeof e=="object"&&Array.isArray(e)}function ht(e){return e===!0||e===!1}function Ux(e){return typeof e=="undefined"}function Mx(e){return Ux(e)||e===null}function Bx(e){return typeof e=="function"}function yc(e){let r=e,t=null,n=function(...o){return t||(t=new r(...o)),t};return n.prototype=r.prototype,n}function _c(e,r,t){if(typeof t!="function")throw new Error("[Jolibox SDK]Customizer must be a function");function n(o,i){for(let a in i)if(Object.prototype.hasOwnProperty.call(i,a)){let s=o[a],u=i[a],c=t(s,u,a,o,i);c!==void 0?o[a]=c:mc(u)&&mc(s)?o[a]=n(vc({},s),u):Array.isArray(u)&&Array.isArray(s)?o[a]=[...s,...u]:o[a]=u}return o}return n(e,r)}function mc(e){return e&&typeof e=="object"&&e.constructor===Object}function bc(e,r){if(Array.isArray(e))return e.concat(r)}function gt(e,r,t={}){let n=null,o,i,a,{leading:s=!1,trailing:u=!0}=t,c=()=>(a=e.apply(i,o),o=void 0,i=void 0,a),d=function(...l){o=l,i=this;let p=s&&!n;if(n&&clearTimeout(n),n=setTimeout(()=>{n=null,u&&!p&&c()},r),p)return c()};return d.cancel=()=>{n&&clearTimeout(n),n=null,o=i=void 0},d.flush=()=>{if(n)return clearTimeout(n),n=null,c()},d}function Hx(e,r){return(...t)=>r(e,...t)}function yn(e){return r=>Hx(r,function(t,...n){if(typeof t=="function")try{return t.apply(this,n)}catch(o){e(new yt(`${o}`))}})}function pt(e){return(...r)=>{var t,n;((n=(t=globalThis.VConsole)==null?void 0:t[e])!=null?n:globalThis.console[e])(...r)}}function Zi(){try{if(window.__joliboxLocalStorage__)return window.__joliboxLocalStorage__;let e=Object.getOwnPropertyDescriptor(window,"localStorage");if(e&&e.get){let n=e.get.call(window);return window.__joliboxLocalStorage__=n,n}if(e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(window),"localStorage"),e&&e.get)return e.get.call(window);let r=Window.prototype,t=Object.getOwnPropertyDescriptor(r,"localStorage");if(t&&t.get){let n=t.get.call(window);return window.__joliboxLocalStorage__=n,n}return localStorage}catch(e){return console.warn("Failed to get original localStorage, fallback to default implementation",e),localStorage}}function t0(e){return new Promise(r=>Ac(e)(r))}function Ac(e){return(r,t=null)=>{let n=!1;return e(o=>{if(!n)return n=!0,r.call(t,o)},null)}}function n0(e,r){return(t=>{let n,o={onWillAddFirstListener(){n=t(i.fire,i)}},i=new mt(o);return i.event})((t,n=null)=>e(o=>r(o)&&t.call(n,o),null))}function i0(e,r){let t=Math.min(e.length,r.length);for(let n=0;n<t;n++)a0(e[n],r[n])}function a0(e,r){if(vt(r)){if(typeof e!==r)throw new Error(`argument does not match constraint: typeof ${r}`)}else if(Bx(r)){try{if(e instanceof r)return}catch(t){}if(!Mx(e)&&e.constructor===r||r.length===1&&r.call(void 0,e)===!0)return;throw new Error("[Jolibox SDK]argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function s0(){return typeof globalThis!="undefined"?globalThis[qc]:void 0}function u0(e){typeof globalThis!="undefined"&&(globalThis[qc]=e)}function W(){let e=s0();if(e)return e;let r=new gn,t=new Gi,n={registerCommand(o,i,a){r.registerCommand({id:o,handler:i,metadata:a})},executeCommand(o,...i){return t.executeCommand(o,...i)},excuteCommandSync(o,...i){return t.executeCommandThowErr(o,...i)}};return u0(n),n}var Vi,Cx,fc,Nx,Dx,pc,vc,Lx,hc,Fx,nr,$x,Ji,Wi,wc,Sc,yt,xc,Ec,_t,zi,Ce,Ic,Kx,Yi,Gx,Qi,Vx,Xi,vn,Jx,Wx,zx,Tc,ea,Yx,Qx,Xx,Rc,$i,K,Zx,e0,hn,mt,Ne,Ki,r0,Bi,o0,Ge,gn,Gi,qc,C=T(()=>{"use strict";Vi=Object.defineProperty,Cx=Object.getOwnPropertyDescriptor,fc=Object.getOwnPropertySymbols,Nx=Object.prototype.hasOwnProperty,Dx=Object.prototype.propertyIsEnumerable,pc=(e,r,t)=>r in e?Vi(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,vc=(e,r)=>{for(var t in r||(r={}))Nx.call(r,t)&&pc(e,t,r[t]);if(fc)for(var t of fc(r))Dx.call(r,t)&&pc(e,t,r[t]);return e},Lx=(e,r)=>{for(var t in r)Vi(e,t,{get:r[t],enumerable:!0})},hc=(e,r,t,n)=>{for(var o=n>1?void 0:n?Cx(r,t):r,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(n?a(r,t,o):a(o))||o);return n&&o&&Vi(r,t,o),o},Fx=(e,r,t)=>new Promise((n,o)=>{var i=u=>{try{s(t.next(u))}catch(c){o(c)}},a=u=>{try{s(t.throw(u))}catch(c){o(c)}},s=u=>u.done?n(u.value):Promise.resolve(u.value).then(i,a);s((t=t.apply(e,r)).next())});if(typeof window!="undefined"&&!window.AbortController){let e=function(){this.signal=new r};e.prototype.abort=function(){this.signal._aborted=!0,typeof this.signal.onabort=="function"&&this.signal.onabort(new Event("abort"));let t=new Event("abort");this.signal.dispatchEvent(t)};let r=function(){this._aborted=!1,this.aborted=!1,this.onabort=null,this._eventListeners={}};Object.defineProperty(r.prototype,"aborted",{get:function(){return this._aborted}}),r.prototype.addEventListener=function(t,n){this._eventListeners[t]||(this._eventListeners[t]=[]),this._eventListeners[t].push(n)},r.prototype.removeEventListener=function(t,n){if(!this._eventListeners[t])return;let o=this._eventListeners[t].indexOf(n);o!==-1&&this._eventListeners[t].splice(o,1)},r.prototype.dispatchEvent=function(t){if(this._eventListeners[t.type])for(let n of this._eventListeners[t.type])n.call(this,t)},window.AbortController=e,window.AbortSignal=r}nr=class{constructor(){this.state="pending",this.promise=new Promise((e,r)=>{this.resolve=t=>{this.state==="pending"&&(this.state="fulfilled",e(t))},this.reject=t=>{this.state==="pending"&&(this.state="rejected",r(t))}})}};$x=(e=>(e[e.DEVELOPER_FILE_NOT_FOUND=0]="DEVELOPER_FILE_NOT_FOUND",e[e.INTERNAL_IOS_CAN_NOT_FOUND_PKG=1]="INTERNAL_IOS_CAN_NOT_FOUND_PKG",e[e.USER_IOS_LOAD_TIMEOUT=2]="USER_IOS_LOAD_TIMEOUT",e[e.INTERNAL_IOS_PKG_LOAD_ERROR=3]="INTERNAL_IOS_PKG_LOAD_ERROR",e[e.INTERNAL_IOS_PKG_PARSE_FAIL=4]="INTERNAL_IOS_PKG_PARSE_FAIL",e[e.USER_IOS_GET_EMPTY_DATA=5]="USER_IOS_GET_EMPTY_DATA",e[e.USER_ANDROID_GET_PKG_FAIL=6]="USER_ANDROID_GET_PKG_FAIL",e[e.DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE=7]="DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE",e))($x||{}),Ji=class extends Error{constructor(e){if(typeof e=="string"){super(e),this.priority="P1";return}super(e.message),this.priority="P1",this.stack=e.stack,this.raw=e}},Wi=class extends Ji{constructor(){super(...arguments),this.kind="INTERNAL_ERROR"}},wc=class extends Ji{constructor(){super(...arguments),this.kind="USER_ERROR"}},Sc=class extends wc{constructor(){super(...arguments),this.name="USER_VALIDATE_ERROR"}},yt=class extends wc{constructor(e,r,t){super(e),this.message=e,this.errNo=r,this.name="USER_CUSTOM_ERROR",this.errMsg=e,t&&(this.extra=Object.assign({},this.extra,t))}},xc=class extends Wi{constructor(){super(...arguments),this.name="INTERNAL_SCHEMA_PARSE_ERROR",this.priority="P0"}},Ec=class extends Wi{constructor(){super(...arguments),this.name="INTERNAL_GLOBAL_JS_ERROR",this.priority="P1"}},_t=class extends Ji{constructor(e,r,t,n,o){super(e),this.message=e,this.code=r,this.kind="API_ERROR",this.name="API_ERROR",t&&(this.errorType=t),n!==void 0&&(this.stack=n),o&&(this.priority=o)}toJSON(){return{message:this.message,stack:this.stack,name:this.name,code:this.code,errorType:this.errorType}}},zi=class extends Wi{constructor(){super(...arguments),this.name="INTERNAL_REPORTER_ERROR"}};Ce={log:pt("log"),warn:pt("warn"),info:pt("info"),error:pt("error"),debug:pt("debug")};Object.assign(globalThis,{logger:Ce});Ic=Symbol.for("Jolibox.canIUseMap"),Kx={};globalThis[Ic]=Kx;Yi={get config(){return globalThis[Ic]}},Gx=(e=>(e[e.System=1e3]="System",e[e.ErrorTrace=1001]="ErrorTrace",e[e.UserDefined=1002]="UserDefined",e))(Gx||{}),Qi=(e=>(e.MiniGame="mini-game",e.MiniDrama="mini-drama",e.App="app",e.WebSDK="web-sdk",e.AppSDK="app-sdk",e))(Qi||{}),Vx=(e=>(e[e.App=0]="App",e[e.H5=1]="H5",e[e.Weapp=2]="Weapp",e[e.Alipay=3]="Alipay",e[e.Gcash=4]="Gcash",e[e.Dana=5]="Dana",e[e.Umma=6]="Umma",e[e.WebSDK=1e3]="WebSDK",e[e.AppSDK=1001]="AppSDK",e[e.Other=9999]="Other",e))(Vx||{}),Xi=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let r=Math.random()*16|0;return(e==="x"?r:r&3|8).toString(16)});Zi();vn={isiOS:navigator.userAgent.includes("iPhone")||navigator.userAgent.includes("iPod")||navigator.userAgent.includes("iPad")||navigator.userAgent.includes("iPhone OS"),iosVersion:()=>{let e=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3]||"0",10)]},isAndroid:navigator.userAgent.includes("Android"),isMac:navigator.userAgent.includes("Mac"),isFacebook:navigator.userAgent.includes("FB_IAB"),isPC:!navigator.userAgent.includes("iPhone")&&!navigator.userAgent.includes("Android")},Jx=()=>vn.isiOS?"iOS":vn.isAndroid?"Android":vn.isMac?"Mac":vn.isFacebook?"Facebook":"PC",Wx="device_id",zx="advertising_id",Tc=e=>(window.__joliboxLocalStorage__.getItem(e)||window.__joliboxLocalStorage__.setItem(e,Xi()),window.__joliboxLocalStorage__.getItem(e)),ea=()=>new URLSearchParams(window.location.search).get("deviceId")||Tc(Wx),Yx=()=>Tc(zx),Qx=e=>e.charAt(0).toUpperCase()+e.slice(1),Xx=()=>{var e;let r=new URLSearchParams(window.location.search);return Qx((e=r.get("utm_source"))!=null?e:"")||"JoliboxSDK"},Rc=e=>{let r="JoliboxWebSDK",t=Jx(),n=navigator.language,o=ea(),i=Yx();return`${r} (${Xx()}${t}; UnknownModel; UnknownSystemVersion; ${n}) uuid/${o} adid/${i} version/${e||""}`},$i=class Hi{constructor(r){this.element=r,this.next=Hi.Undefined,this.prev=Hi.Undefined}};$i.Undefined=new $i(void 0);K=$i,Zx=class{constructor(){this._first=K.Undefined,this._last=K.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===K.Undefined}clear(){let e=this._first;for(;e!==K.Undefined;){let r=e.next;e.prev=K.Undefined,e.next=K.Undefined,e=r}this._first=K.Undefined,this._last=K.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,r){let t=new K(e);if(this._first===K.Undefined)this._first=t,this._last=t;else if(r){let o=this._last;this._last=t,t.prev=o,o.next=t}else{let o=this._first;this._first=t,t.next=o,o.prev=t}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(t))}}shift(){if(this._first!==K.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==K.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==K.Undefined&&e.next!==K.Undefined){let r=e.prev;r.next=e.next,e.next.prev=r}else e.prev===K.Undefined&&e.next===K.Undefined?(this._first=K.Undefined,this._last=K.Undefined):e.next===K.Undefined?(this._last=this._last.prev,this._last.next=K.Undefined):e.prev===K.Undefined&&(this._first=this._first.next,this._first.prev=K.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==K.Undefined;)yield e.element,e=e.next}},e0=0,hn=class{constructor(e){this.value=e,this.id=e0++}},mt=class{constructor(e){this.options=e,this._size=0}dispose(e){var r,t;this._disposed||(this._disposed=!0,this._listeners&&(e?(this._listeners instanceof hn&&(this._listeners=[this._listeners]),this._listeners=this._listeners.filter(n=>(n==null?void 0:n.value)===e)):(this._listeners=void 0,this._size=0)),(t=(r=this.options)==null?void 0:r.onDidRemoveLastListener)==null||t.call(r))}get event(){var e;return(e=this._event)!=null||(this._event=(r,t)=>{var n,o,i,a,s,u;if(this._disposed)return()=>{console.info("[Jolibox SDK] Emitter is _disposed")};t&&(r=r.bind(t));let c=new hn(r);this._listeners?this._listeners instanceof hn?this._listeners=[this._listeners,c]:this._listeners.push(c):((o=(n=this.options)==null?void 0:n.onWillAddFirstListener)==null||o.call(n,this),this._listeners=c,(a=(i=this.options)==null?void 0:i.onDidFirstListener)==null||a.call(i,this)),(u=(s=this.options)==null?void 0:s.onDidAddListener)==null||u.call(s,this),this._size++}),this._event}_deliver(e,r){var t;if(!e)return;let n=((t=this.options)==null?void 0:t.onListenerError)||Error.constructor;if(!n){e.value(r);return}try{e.value(r)}catch(o){n(o)}}fire(e){this._listeners&&(this._listeners instanceof hn?this._deliver(this._listeners,e):this._listeners.forEach(r=>this._deliver(r,e)))}hasListeners(){return this._size>0}},Ne=class{constructor(){this.listeners=new Map,this.listerHandlerMap=new WeakMap,this.cachedEventQueue=new Map}on(e,r){var t;let n=(t=this.listeners.get(e))!=null?t:new mt,o=a=>r(...a.args);this.listerHandlerMap.set(r,o),n.event(o),this.listeners.set(e,n);let i=this.cachedEventQueue.get(e);if(i)for(;i.size>0;)n.fire(vc({event:e},i.shift()))}off(e,r){let t=this.listeners.get(e);if(t){let n=this.listerHandlerMap.get(r);t.dispose(n)}}emit(e,...r){let t=this.listeners.get(e);if(t)t.fire({event:e,args:r});else{let n=this.cachedEventQueue.get(e);n||(n=new Zx,this.cachedEventQueue.set(e,n)),n.push({args:r})}}},Ki={};Lx(Ki,{None:()=>r0,filter:()=>n0,once:()=>Ac,toPromise:()=>t0});r0=()=>{console.log("[Jolibox SDK] None Event")};Bi=Symbol.for("Jolibox.hostEmitter"),o0=()=>{let e=new Ne;return globalThis[Bi]||(globalThis[Bi]={on:e.on.bind(e),off:e.off.bind(e),emit:e.emit.bind(e)}),globalThis[Bi]},Ge=o0();gn=class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new mt,this.onDidRegisterCommand=this._onDidRegisterCommand.event,console.log("[Jolibox SDK] command registry")}registerCommand(e){if(!e)throw new Error("invalid command");if(e.metadata&&Array.isArray(e.metadata.args)){let t=[];for(let o of e.metadata.args)t.push(o.constraint);let n=e.handler;e.handler=function(...o){return i0(o,t),n(...o)}}let{id:r}=e;this._commands.get(r)&&console.info(`[Jolibox SDK] duplicated command is registered ${r}`),this._commands.set(r,e),this._onDidRegisterCommand.fire(r)}getCommand(e){return this._commands.get(e)}getCommands(){let e=new Map;for(let r of this._commands.keys()){let t=this.getCommand(r);t&&e.set(r,t)}return e}};gn=hc([yc],gn);Gi=class{constructor(){this._onWillExecuteCommand=new mt,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._onDidExecuteCommand=new mt,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this.registry=new gn,this._starActivation=null}_activateStar(){return this._starActivation||(this._starActivation=jx(3e4)),this._starActivation}executeCommand(e,...r){return Fx(this,null,function*(){return this.registry.getCommand(e)?this._tryExecuteCommand(e,r):(yield Promise.all([Promise.race([this._activateStar(),Ki.toPromise(Ki.filter(this.registry.onDidRegisterCommand,t=>t===e))])]),this._tryExecuteCommand(e,r))})}executeCommandThowErr(e,...r){if(!this.registry.getCommand(e))throw new Error(`command '${e}' not found`);let t=this.registry.getCommand(e);this._onWillExecuteCommand.fire({commandId:e,args:r});let n=this.invokeFunction(t.handler,...r);return this._onDidExecuteCommand.fire({commandId:e,args:r}),n}_tryExecuteCommand(e,r){let t=this.registry.getCommand(e);if(!t)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:r});let n=this.invokeFunction(t.handler,...r);return this._onDidExecuteCommand.fire({commandId:e,args:r}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}invokeFunction(e,...r){let t=!1;try{return e(...r)}finally{t=!0}}};Gi=hc([yc],Gi);qc=Symbol.for("Jolibox.commands")});function ce(e,r={}){ra.emit("ERROR_REPORT",{error:e,options:r})}var ra,_r,De=T(()=>{"use strict";C();C();ra=new Ne,_r=new Ne;ce.debounce=gt(ce,50,{leading:!0})});var ta,c0,kc,Oc,Pc=T(()=>{"use strict";C();De();ta=e=>{let r=e.replace(/-/g,"+").replace(/_/g,"/"),t=r.length%4===0?"":"=".repeat(4-r.length%4),n=atob(r+t);try{return JSON.parse(n)}catch(o){return{}}},c0=e=>{let r=JSON.stringify(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},kc=e=>{var r;try{let o=(r=new URL(e).searchParams.get("joliSource"))==null?void 0:r.split(".");if(o!=null&&o.length){let[i,a,s]=o;return{headerJson:ta(i),payloadJson:ta(a),signature:ta(s)}}else throw"joli_source is missing"}catch(t){return ce(new xc(`${e} not a valid schema: ${t}`)),{headerJson:{},payloadJson:{},signature:{}}}},Oc=(e,r)=>{let t=r.split(".");if(t&&t.length===3){let n=t[0],o=c0(e),i=t[2];return`${n}.${o}.${i}`}return r}});var l0,_n,Cc,na=T(()=>{"use strict";C();l0="1.1.14-beta.1",_n=()=>l0,Cc=()=>{let e=_n();return`${Rc(e)}`}});var d0,Nc,oa,Dc,le,f0,S,ie=T(()=>{"use strict";C();Pc();na();C();d0={deviceInfo:{brand:"UnknownBrand",model:"UnknownModel",did:ea(),pixelRatio:window.devicePixelRatio||1,platform:"h5",system:"UnknownSystemVersion",lang:"zh"},sdkInfo:{nativeSDKVersion:"",jssdkVersion:_n()},schema:window.location.href,platform:"h5"},oa=(Nc=globalThis.joliboxJSCore)==null?void 0:Nc.env,le=Object.assign({},(Dc=oa==null?void 0:oa())!=null?Dc:d0),f0=()=>{var p,m,v,y,h,g,_,x,A;let{payloadJson:e,headerJson:r,signature:t}=le.schema.length?kc(le.schema):{},n=`${le.deviceInfo.did}-${new Date().getTime()}`,i=new URL(le.schema.length?le.schema:window.location.href).searchParams,a=(v=(m=(p=i.get("mpId"))!=null?p:i.get("appId"))!=null?m:i.get("gameId"))!=null?v:"",s=(g=(h=(y=le.clientSessionId)!=null?y:e==null?void 0:e.sessionId)!=null?h:i.get("sessionId"))!=null?g:n,u=!!((_=e==null?void 0:e.testAdsMode)!=null?_:i.get("testAdsMode")==="true"),c=(A=(x=e==null?void 0:e.joliboxEnv)!=null?x:i.get("joliboxEnv"))!=null?A:"production",d=c==="staging",l=r==null?void 0:r.channel;return{get testMode(){return d},get testAdsMode(){return u},get joliboxEnv(){return c},get joliSource(){var q;return(q=i.get("joliSource"))!=null?q:null},get mpId(){var q;return(q=a!=null?a:e==null?void 0:e.id)!=null?q:""},get mpVersion(){var q;return(q=r==null?void 0:r.ver)!=null?q:_n()},get mpType(){var q,w;return(w=(q=r==null?void 0:r.__mpType)!=null?q:e==null?void 0:e.__mpType)!=null?w:"game"},get platform(){var q;return(q=le.platform)!=null?q:le.deviceInfo.platform},get deviceInfo(){return le.deviceInfo},get sdkInfo(){return le.sdkInfo},get hostInfo(){return le.hostInfo},get hostUserInfo(){return le.hostUserInfo},get sessionId(){var q,w;return(w=(q=le.clientSessionId)!=null?q:s)!=null?w:n},get channel(){return l},get webviewId(){var q;return(q=le.webviewId)!=null?q:-1},get shouldInterupt(){return e==null?void 0:e.__shouldInterupt},get from(){return e==null?void 0:e.__from},get baseApiHost(){return d?"https://stg-api.jolibox.com":"https://api.jolibox.com"},onEnvConfigChanged:q=>{_c(le,q,bc)},encodeJoliSourceQuery:q=>{var w,k;return r&&t?Oc(I(I({},e),q),(w=i.get("joliSource"))!=null?w:""):(k=i.get("joliSource"))!=null?k:""}}},S=f0()});var ia,Fc,p0,m0,Lc,v0,jc=T(()=>{"use strict";C();De();ie();C();ia=!1,Fc=(e,r)=>e==null?!1:r in e,p0=e=>Fc(e,"kind"),m0=e=>{let r=e.toLowerCase().split("_");return r[0]+r.slice(1).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join("")},Lc=(e,r={},t)=>{var i,a,s;let n={user_id:(a=(i=S.hostUserInfo)==null?void 0:i.uid)!=null?a:"",device_id:(s=S.deviceInfo.did)!=null?s:"",timestamp:Date.now(),tag:m0(e.name)},o=N(I({},n),{env:r.environment,isFromUser:t});t?_r.emit("GLOBAL_USER_ERROR",e,o):_r.emit("GLOBAL_ERROR",e,o)},v0=e=>Fc(e,"kind")&&e.kind==="USER_ERROR";ra.on("ERROR_REPORT",({error:e,options:r})=>{if(ia)return;ia=!0;let t=p0(e)&&e.raw?e.raw:e;try{let n=v0(e);Lc(e,r,n)}catch(n){let o=n instanceof Error?n.message:String(n),i=new zi(`${o}, origin error: ${t.message}`);Ce.error(i),Lc(new zi(i.message),{environment:r.environment},!1)}finally{ia=!1}})});var or,aa,Nr=T(()=>{"use strict";De();C();De();or=(e,r)=>{var t,n;return new _t((n=(t=r==null?void 0:r.errMsg)!=null?t:e.msg)!=null?n:"",e.code,e.type)},aa=e=>new Sc(e)});var Uc=T(()=>{"use strict";jc();Nr();C();fe();_r.on("GLOBAL_ERROR",(e,r)=>{var n;let t={message:e.message,stack:(n=e.stack)!=null?n:"",errorType:e.name,source:0};j("trackAsync",{event:"reportJsError",data:t})});_r.on("GLOBAL_USER_ERROR",(e,r)=>{Ce.log("UserError",e,r)})});var sa=T(()=>{"use strict"});function Mc(e,r){let t=(n,o,i)=>{let a=N(I({tag:n},r),{extra:I({},o)});n=="globalJsError"?ce(new Ec(JSON.stringify(a))):e("systemLog",a,i)};return t.debounce=gt(t,500,{leading:!0}),t}function Bc(e){let r=(t,n,o)=>{var s;let i=(s=o&&JSON.stringify(o))!=null?s:0,a={speed_value_type:t,total_duration:n};i&&Object.assign(a,{extra:i}),e("joliboxSpeedAnalysis",a)};return r.debounce=gt(r,500,{leading:!0}),r}var $c=T(()=>{"use strict";C();C();De()});function Hc(e,r){let t=Mc(e,r),n=Bc(t);return{track:t,trackPerformance:n}}var Kc=T(()=>{"use strict";$c()});var Gc=T(()=>{"use strict";ie();C();C()});var Vc=T(()=>{"use strict";Kc();sa();Gc()});var bn,Jc=T(()=>{"use strict";bn=class{constructor(r,t){this.eventEmitter=r;this.lastReportTime=0;this.visible=!0;this.timer=this.createRAFTimer(r=>{this.reporter({event:"PLAY_GAME",params:{duration:r}}),this.tracker("PlayGame",{duration:r})});this.interval=t!=null?t:5*1e3,r.on("visible",n=>{this.visible=n})}start(r){this.reporter({event:"OPEN_GAME",params:{timestamp:Date.now(),duration:r!=null?r:0}}),this.tracker("OpenGame",{duration:r!=null?r:0}),this.timer.start()}close(r){this.reporter({event:"CLOSE_GAME",params:{timestamp:Date.now(),duration:r}}),this.tracker("CloseGame",{duration:r}),this.timer.stop()}createRAFTimer(r){let t=Date.now(),n,o,i=!1,a=0,s=()=>{if(!i)return;let m=Date.now(),v=m-t;v>=this.interval&&(this.visible&&(a+=v,r(a)),t=m),n=requestAnimationFrame(s)},u=()=>{d(),t=Date.now(),o=window.setInterval(()=>{if(!i)return;let m=Date.now();m-t>=this.interval&&(t=m)},this.interval)},c=()=>{l(),t=Date.now(),n=requestAnimationFrame(s)},d=()=>{n&&(cancelAnimationFrame(n),n=0)},l=()=>{o&&(clearInterval(o),o=0)};this.eventEmitter.on("visible",m=>{i&&(console.log("visible",m),m?c():u())});let p=this.visible;return{start(){i||(i=!0,p?c():u())},stop(){i=!1,d(),l()}}}}});var ua=T(()=>{"use strict"});function zc(e,r,t){let{response:n,startTime:o,endTime:i,requestFrom:a}=t,{errMsg:s="",profile:u={}}=n,d={duration:i-o,request_type:e,url:r.split("?")[0],result:t.state,error_msg:t.state==="fail"?s:"",socket_reused:u.socketReused?1:0,request_from:a};(a==="public"&&Wc<g0||a==="inner")&&(d.joli_request_number=Wc++,setTimeout(()=>{we("joliboxNetRequestResult",d)},500))}var Wc,g0,Yc=T(()=>{"use strict";ua();ir();Wc=0,g0=10});function wn(e,r,t){var u,c,d;let n=new Map,o=(u=t==null?void 0:t.baseUrl)!=null?u:"https://api.jolibox.com",i=(c=t==null?void 0:t.type)!=null?c:"public",a=(d=t==null?void 0:t.defaultHeaders)!=null?d:{};return Pe("onRequestTaskStateChange",l=>{if(typeof l.requestTaskId!="string")return;let p=n.get(l.requestTaskId);if(p)if(l.state==="success"){let m=l,{requestTaskId:y,state:h}=m,g=Re(m,["requestTaskId","state"]);l.statusCode===200?p.resolve(g):p.reject(g),n.delete(y)}else if(l.state==="fail"){let v=l,{requestTaskId:y,state:h}=v,g=Re(v,["requestTaskId","state"]);p.reject(g),n.delete(y)}else Ce.warn("onRequestTaskStateChange unknown event",l)}),Ge.on("onLoginComplete",({isLogin:l,token:p})=>{l&&p&&(a["X-JOLI-TOKEN"]=p)}),(m,...v)=>E(this,[m,...v],function*(l,p={}){let y=Date.now(),h=y0(l,N(I({},p),{baseUrl:o})),{method:g="GET",responseType:_="text",dataType:x="json",timeout:A,enableCache:q=!1,appendHostCookie:w=!0}=p,k=Object.assign({"content-type":"application/json"},a,p.header),_e={url:h,method:g,header:k,enableCache:q,responseType:_,appendHostCookie:w};if(g=="POST"||g=="PUT"){let Oe=b0(p.data,k["content-type"]);_e.data=Oe}A&&Object.assign(_e,{timeout:A});let{data:{requestTaskId:$e}}=j(e,_e);if(typeof $e!="string")throw or({code:-1,msg:"requestTaskId is not a string"});let Cr=(Oe,He)=>{zc("request",h,{state:Oe,startTime:y,endTime:Date.now(),params:_e,response:He,requestId:$e,requestFrom:i=="public"?"public":"inner"})},{resolve:xe,reject:gr,promise:ES}=new nr;n.set($e,{resolve:xe,reject:gr});try{let Oe=yield ES;Cr("success",Oe);let{data:He}=Oe;return x==="json"&&typeof He=="string"&&(He=_0(He)),{url:h,timeout:A,method:g,response:N(I({},Oe),{data:He})}}catch(Oe){let He=Oe;if(yr(He)){let{errMsg:un,prefetchDetail:IS,isPrefetch:TS,errNo:RS}=He;vt(un)&&(Cr("fail",{errMsg:un,isPrefetch:TS,prefetchDetail:IS}),ce(or({code:-1,msg:un},{errNo:RS,errMsg:un})))}throw Oe}})}function _0(e){try{return JSON.parse(e.trim())}catch(r){return e}}function b0(e,r="application/json"){let t=r.toLowerCase();return e===void 0?"":typeof e=="string"||e instanceof ArrayBuffer?e:t.includes("application/x-www-form-urlencoded")||t.includes("application/json")||typeof e=="object"?JSON.stringify(e):String(e)}var y0,ca=T(()=>{"use strict";C();Yc();ua();fe();De();Nr();y0=(e,r)=>{if(/^https?:\/\//.test(e))return e;let t=r==null?void 0:r.query,o=new URLSearchParams(t).toString();return r!=null&&r.baseUrl?`${r.baseUrl}${e}${o?`?${o}`:""}`:`${e}${o?`?${o}`:""}`}});var la,Qc,pe,Dr=T(()=>{"use strict";na();ca();ie();la={"x-user-agent":Cc()};(Qc=S.hostUserInfo)!=null&&Qc.token&&(la["x-joli-token"]=S.hostUserInfo.token);S.joliSource&&(la["x-joli-source"]=S.joliSource);pe=wn("createRequestTaskSync","operateRequestTaskSync",{type:"inner",baseUrl:S.testMode?"https://stg-api.jolibox.com":"https://api.jolibox.com",defaultHeaders:la})});var Sn,Xc=T(()=>{"use strict";ie();Jc();Dr();fe();Sn=class extends bn{constructor(r,t,n){super(t,n),this.gameId=S.mpId,this.sessionId=S.sessionId,this.track=r}reporter(r){return E(this,null,function*(){let{event:t,params:n}=r,o=[];o.push(pe("/api/base/app-event",{method:"POST",data:{eventType:t,gameInfo:I({gameId:this.gameId,sessionId:this.sessionId},n)}})),yield Promise.all(o)})}reportToNative(r){return E(this,null,function*(){let{event:t,params:n}=r;yield be("userTrackAsync",{event:t,params:I({},n),gameId:this.gameId})})}tracker(r,t=null){this.track(r,t)}}});var nl={};Ku(nl,{nativeTaskEmitter:()=>bt,taskTracker:()=>me,track:()=>we,trackPerformance:()=>rl});var w0,Zc,el,we,rl,tl,bt,me,ir=T(()=>{"use strict";Uc();C();sa();Vc();ie();Xc();fe();w0=(e,r,t)=>{var a,s;let n=r,o=yr(n.extra)?n.extra:vt(n.extra)?JSON.parse(n.extra):{},i=N(I({},o),{mp_id:(a=n.mp_id)!=null?a:"",mp_version:(s=n.mp_version)!=null?s:""});j("trackAsync",{event:e,data:i,webviewId:t})},{track:we,trackPerformance:rl}=Hc(w0,{type:Qi.AppSDK,platform:"native",jssdk_version:(el=(Zc=S.sdkInfo)==null?void 0:Zc.jssdkVersion)!=null?el:"1.0.0",mp_id:S.mpId,mp_version:S.mpVersion}),tl=W();tl.registerCommand("ReportSDK.traceSystemTimeline",({event:e,duration:r,extra:t})=>{rl(e,r,t)});tl.registerCommand("ReportSDK.traceSystem",({event:e,info:r})=>{we(e,r)});bt=new Ne,me=new Sn(we,bt)});function ol(){let e=null,r=window.fetch,t=()=>{e=document.createElement("style"),e.setAttribute("data-jolibox-sdk","default-styles");let i=`
|
|
2
2
|
html[data-jolibox-root] {
|
|
3
3
|
height: 100%;
|
|
4
4
|
margin: 0;
|
|
@@ -16,7 +16,8 @@ var ws=Object.create;var Ze=Object.defineProperty,Es=Object.defineProperties,ks=
|
|
|
16
16
|
min-height: 100dvh;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
`;e.textContent=i;let s=document.head||document.getElementsByTagName("head")[0];s.insertBefore(e,s.firstChild),document.documentElement.setAttribute("data-jolibox-root","")},n=()=>{function i(a){return y(this,null,function*(){let l=a instanceof URL?a.href:a,c=new Promise((d,u)=>{let p=new XMLHttpRequest;p.open("GET",l),p.responseType="arraybuffer",p.addEventListener("load",()=>d(p.response)),p.addEventListener("error",u),p.send()});try{let d=yield c;return new Response(d,{headers:new Headers([["Content-Type","application/wasm"]])}).clone()}catch(d){throw console.error("Failed to load wasm:",d),d}})}let s=window.fetch;window.fetch=(a,l)=>{let c=a instanceof URL?a.href:a.toString();return c.endsWith(".wasm")?i(c):s(a,l)}},o=()=>{e!=null&&e.parentNode&&(e.parentNode.removeChild(e),e=null),document.documentElement.removeAttribute("data-jolibox-root"),window.fetch=t};return r(),n(),o}var Uo=x(()=>{"use strict"});var pt,Fo=x(()=>{"use strict";pt=class{constructor(t){this.track=t;this.adBreakIsShowing=!1;this.reportPageJumpOut=()=>{this.track("AdBreakJumpOut",{context:"AdsActionDetection"})};this.reportPageHide=()=>{this.track("AdBreakHide",{context:"AdsActionDetection"})};window.addEventListener("visibilitychange",()=>{document.hidden&&this.adBreakIsShowing&&this.reportPageHide()}),window.addEventListener("beforeunload",r=>{this.adBreakIsShowing&&this.reportPageJumpOut()})}}});var mt,fl,hl,_l,gl,jo=x(()=>{"use strict";P();Cr();mt=class{constructor(t,r,n,o){this.track=t;this.httpClient=r;this.checkNetwork=n;this.checkAdsDisplayPermission=t=>{if(!this.checkNetwork())return{reason:"NETWORK_NOT_OK"};let r=this.checkShouldBanInitial();if(r)return{reason:r};let n=this.checkShouldBanForSession(t);if(n)return{reason:n};let o=this.checkShouldBanHighFreq(t);if(o)return o;let i=this.checkShouldBanForTime(t);return i?{reason:i}:{reason:"ALLOWED"}};var p,m,v,E,h,_,b;let i=(p=o==null?void 0:o.maxAllowedAdsForTime)!=null?p:8,s=(m=o==null?void 0:o.banForTimeThreshold)!=null?m:6e4,a=(v=o==null?void 0:o.bannedReleaseTime)!=null?v:6e4,l=(E=o==null?void 0:o.maxAllowedAdsForSession)!=null?E:200,c=(h=o==null?void 0:o.banForSessionThreshold)!=null?h:6e5,d=(_=o==null?void 0:o.initialThreshold)!=null?_:2e3,u=(b=o==null?void 0:o.highFreqThreshold)!=null?b:2e3;this.checkShouldBanInitial=_l(d),this.checkShouldBanHighFreq=gl(u),this.checkShouldBanForTime=hl(i,s,a),this.checkShouldBanForSession=fl(l,c)}report(t,r){let n=r?{reason:t,count:r}:{reason:t};this.track("PreventAdsCheating",n),this.httpClient.post("/api/base/app-event",{data:{eventType:"PREVENT_ADS_CHEATING",adsInfo:n}})}},fl=(e,t)=>{let r=!1,n=[];return i=>{if(r)return"BANNED_FOR_SESSION";let s=Date.now();if(n=n.concat({timestamp:s,type:i}),n.length!==1&&(n.length>e&&(n=n.slice(-e)),n.length===e&&s-n[0].timestamp<=t))return r=!0,"BANNED_FOR_SESSION"}},hl=(e,t,r)=>{let n=null,o=d=>{n&&(window.clearTimeout(n),n=null),n=window.setTimeout(()=>{l.value=!1,n=null},d)},i="jolibox-sdk-ads-callbreak-timestamps",s="jolibox-sdk-ads-ban-for-time",a={_records:[],init(){var d;try{let u=JSON.parse((d=window.__joliboxLocalStorage__.getItem(i))!=null?d:"[]");Array.isArray(u)?this._records=u:this._records=[]}catch(u){this._records=[]}},get values(){return this._records},set values(d){try{window.__joliboxLocalStorage__.setItem(i,JSON.stringify(d))}catch(u){}this._records=d}},l={_record:!1,init(){var d;try{let u=JSON.parse((d=window.__joliboxLocalStorage__.getItem(s))!=null?d:"false");typeof u=="boolean"&&(this._record=u)}catch(u){this._record=!1}if(this._record){let u=a.values[a.values.length-1],p=u?Date.now()-u.timestamp:r;p<=r&&p>0?o(p):this._record=!1}},get value(){return this._record},set value(d){try{window.__joliboxLocalStorage__.setItem(s,JSON.stringify(d))}catch(u){}this._record=d}};return a.init(),l.init(),d=>{if(l.value)return"WAITING_BANNED_RELEASE";let u=Date.now();if(a.values=a.values.concat({timestamp:u,type:d}),a.values.length!==1&&(a.values.length>e&&(a.values=a.values.slice(-e)),a.values.length===e&&u-a.values[0].timestamp<=t))return l.value=!0,o(r),"BANNED_FOR_TIME"}},_l=e=>{let t=Date.now();return()=>{if(Date.now()-t<=e)return"BLOCK_INITIAL"}},gl=(e=2e3)=>{let t=0,r=null;return o=>{if(o==="reward"){if(r)return t+=1,{reason:"HOLDING_HIGH_FREQ",info:{count:t}};r=window.setTimeout(()=>{r&&(window.clearTimeout(r),r=0,t=0)},e)}}}});var ft,Mo=x(()=>{"use strict";J();ft=class{constructor(t){this.httpClient=t;this.configs=null;this.firstRun=!0;this.init()}init(){return y(this,null,function*(){try{this.configs=yield this.httpClient.get("/api/fe-configs/js-sdk/ads-channel-config")}catch(t){}})}shouldBypassCallingInterstitial(){var r,n;let t;if(!this.configs)this.init(),t=!this.firstRun;else{let o=(r=g.channel)!=null?r:"",i=this.configs[o],s=(n=i==null?void 0:i.interstitialRate)!=null?n:1;t=Math.random()<s}return this.firstRun=!1,t}}});var Ce,ht,$r=x(()=>{"use strict";Fo();jo();J();Mo();P();Ce=new oe,ht=class{constructor(t,r,n){this.track=t;this.httpClient=r;this.checkNetwork=n;this.configured=!1;this.config={};this.getGameId=()=>g.mpId;this.getTestAdsMode=()=>g.testAdsMode;this.asyncLoad=()=>y(this,null,function*(){var s,a,l,c,d;let t="ca-pub-7171363994453626",r,n,o=window.encodeURIComponent(window.btoa((s=this.getGameId())!=null?s:"")),i=(a=this.getTestAdsMode())!=null?a:!1;try{let u=yield this.httpClient.get("/public/ads",{query:{objectId:o,testAdsMode:`${i}`}});t=(l=u.data)==null?void 0:l.clientId,r=(c=u.data)==null?void 0:c.channelId,n=(d=u.data)==null?void 0:d.unitId}catch(u){console.error("Failed to fetch client info",u)}this.clientId=t,this.channelId=r,this.unitId=n});this.asyncInit=t=>y(this,null,function*(){var o;if(typeof window=="undefined")return;yield this.asyncLoad();let r="google-adsense",n=(o=this.getTestAdsMode())!=null?o:!1;if(!document.getElementById(r)&&this.clientId){let i=document.createElement("script");i.id=r,i.async=!0,i.crossOrigin="anonymous",i.src=`https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=${this.clientId}`,n&&i.setAttribute("data-adbreak-test","on"),this.channelId&&i.setAttribute("data-ad-channel",this.channelId),document.head.appendChild(i),this.track("LoadAdsenseCompleted",null)}});this.push=(t={})=>{window.adsbygoogle.push(t)};this.wrapAdBreakParams=t=>{let r=!1,n=t.adBreakDone,o=s=>{var a;r=!0,this.adsActionDetection.adBreakIsShowing=!1,this.track("CallAdBreakDone",{breakType:s.breakType,breakName:(a=s.breakName)!=null?a:"",breakFormat:s.breakFormat,breakStatus:s.breakStatus}),n&&n(s)};if(t.adBreakDone=o,t.type==="reward"){let s=t.beforeReward,a=c=>()=>{this.track("CallShowAdFn",null),c()},l=c=>{r=!0,s&&s(a(c))};t.beforeReward=l,window.setTimeout(()=>{var c,d;r||(this.track("CallAdBreakTimeout",{type:t.type}),(d=t.adBreakDone)==null||d.call(t,{breakType:t.type,breakName:(c=t.name)!=null?c:"",breakFormat:"reward",breakStatus:"timeout"}))},5e3)}if((s=>s.type==="preroll")(t)){Ce.emit("isAdShowing",!0);let s=t.adBreakDone,a=l=>{Ce.emit("isAdShowing",!1),s&&s(l)};return O(w({},t),{adBreakDone:a})}else{let s=t.beforeAd,a=t.afterAd,l=()=>{var d;r=!0,Ce.emit("isAdShowing",!0),this.track("CallBeforeAd",{type:t.type,name:(d=t.name)!=null?d:""}),s&&s()},c=()=>{var d;r=!0,Ce.emit("isAdShowing",!1),this.track("CallAfterAd",{type:t.type,name:(d=t.name)!=null?d:""}),a&&a()};return O(w({},t),{beforeAd:l,afterAd:c})}};this.adConfig=t=>{let o=t,{onReady:r}=o,n=Z(o,["onReady"]);this.track("CallAdConfig",n),this.configured?console.warn("Ad config already set, skipping"):(this.configured=!0,this.push(t))};this.adBreak=t=>{var a,l,c,d,u,p;if(!this.getGameId()){console.warn("Game ID is not set, skip calling adBreak");return}if(t.type!=="reward"&&!this.channelPolicy.shouldBypassCallingInterstitial()){(a=t.adBreakDone)==null||a.call(t,{breakType:t.type,breakName:"skipInterstitials",breakFormat:"interstitial",breakStatus:"viewed"});return}let{reason:r,info:n}=this.antiCheating.checkAdsDisplayPermission(t.type==="reward"?"reward":"interstitial");switch(r){case"NETWORK_NOT_OK":case"BANNED_FOR_SESSION":(l=t.adBreakDone)==null||l.call(t,{breakType:t.type,breakName:r,breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"}),this.antiCheating.report(r);return;case"BLOCK_INITIAL":case"BANNED_FOR_TIME":case"WAITING_BANNED_RELEASE":(c=t.adBreakDone)==null||c.call(t,{breakType:t.type,breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"frequencyCapped"}),this.antiCheating.report(r);return;case"HOLDING_HIGH_FREQ":(u=t.adBreakDone)==null||u.call(t,{breakFormat:t.type==="reward"?"reward":"interstitial",breakName:"",breakStatus:((d=n==null?void 0:n.count)!=null?d:0)>6?"other":"frequencyCapped",breakType:t.type}),n!=null&&n.count&&n.count!==0&&n.count%3===0&&this.antiCheating.report(r,n==null?void 0:n.count);return;default:break}let o=t.type,i;switch(o){case"preroll":i={type:o};break;case"start":case"pause":case"next":case"browse":case"reward":i={type:o,name:(p=t.name)!=null?p:""};break}this.adsActionDetection.adBreakIsShowing=!0,this.track("CallAdBreak",i);let s=this.wrapAdBreakParams(t);this.push(s),window.JoliTesterBridge&&console.log("joli-fullscreen-ad-show")};this.adUnit=t=>y(this,null,function*(){var p,m,v,E;if(this.track("CallAdUnit",{adFormat:(m=(p=t.adFormat)==null?void 0:p.toString())!=null?m:null,fullWidthResponsive:(v=t.fullWidthResponsive)!=null?v:null}),this.clientId||(yield this.asyncLoad()),document.querySelector("#jolibox-ads")){console.warn("Ad unit already set, skipping");return}let{el:r,slot:n,adFormat:o,fullWidthResponsive:i,style:s}=t,a;if(!r)throw new Error("targeting element is required");if(typeof r=="string"?a=document.querySelector(r):a=r,!a)throw new Error("targeting element not found");let l=n;if(l||(l=this.unitId),!l)throw new Error("slot is required");let c=typeof o=="object"&&Array.isArray(o)?o.join(", "):o,d=document.createElement("ins");if(d.className="adsbygoogle",d.id="jolibox-ads",d.style.display="block",d.setAttribute("data-ad-client",this.clientId),d.setAttribute("data-ad-slot",l),c&&d.setAttribute("data-ad-format",c),i&&d.setAttribute("data-full-width-responsive",i),s&&d.setAttribute("style",s),(E=this.getTestAdsMode())!=null?E:!1){let h=document.createElement("div");h.style.position="absolute",h.style.top="0",h.style.left="0",h.style.width="100%",h.style.height="100%",h.style.display="flex",h.style.justifyContent="center",h.style.alignItems="center",h.style.backgroundColor="rgba(0, 0, 0, 0.5)",h.style.color="white",h.innerHTML="Test Ad",d.style.position="relative",a.appendChild(d),d.appendChild(h)}else a.appendChild(d),new MutationObserver(_=>{_.forEach(b=>{if(b.type==="attributes"&&b.attributeName==="data-ad-status"){let T=d.getAttribute("data-ad-status");this.track("AdSenseUnitStatusChanged",{status:T!=null?T:"null"})}})}).observe(d,{attributes:!0,attributeFilter:["data-ad-status"]}),this.push({})});this.antiCheating=new mt(t,r,n),this.adsActionDetection=new pt(this.track),this.channelPolicy=new ft(r)}init(t){this.track("CallAdsInit",null),typeof window!="undefined"&&(this.config=t!=null?t:{},window.adsbygoogle=window.adsbygoogle||[],this.asyncInit(t))}}});function de(e,t){for(var r in t)e[r]=t[r];return e}function Xr(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ke(e,t,r){var n,o,i,s={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?St.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return vt(e,s,n,o,null)}function vt(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o!=null?o:++si,__i:-1,__u:0};return o==null&&I.vnode!=null&&I.vnode(i),i}function xe(e){return e.children}function pe(e,t){this.props=e,this.context=t}function Pe(e,t){if(t==null)return e.__?Pe(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Pe(e):null}function di(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return di(e)}}function Ho(e){(!e.__d&&(e.__d=!0)&&we.push(e)&&!bt.__r++||Bo!==I.debounceRendering)&&((Bo=I.debounceRendering)||ai)(bt)}function bt(){for(var e,t,r,n,o,i,s,a=1;we.length;)we.length>a&&we.sort(li),e=we.shift(),a=we.length,e.__d&&(r=void 0,o=(n=(t=e).__v).__e,i=[],s=[],t.__P&&((r=de({},n)).__v=n.__v+1,I.vnode&&I.vnode(r),Zr(t.__P,r,n,t.__n,t.__P.namespaceURI,32&n.__u?[o]:null,i,o!=null?o:Pe(n),!!(32&n.__u),s),r.__v=n.__v,r.__.__k[r.__i]=r,fi(i,r,s),r.__e!=o&&di(r)));bt.__r=0}function pi(e,t,r,n,o,i,s,a,l,c,d){var u,p,m,v,E,h,_=n&&n.__k||ui,b=t.length;for(l=yl(r,t,_,l,b),u=0;u<b;u++)(m=r.__k[u])!=null&&(p=m.__i===-1?qe:_[m.__i]||qe,m.__i=u,h=Zr(e,m,p,o,i,s,a,l,c,d),v=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&en(p.ref,null,m),d.push(m.ref,m.__c||v,m)),E==null&&v!=null&&(E=v),4&m.__u||p.__k===m.__k?l=mi(m,l,e):typeof m.type=="function"&&h!==void 0?l=h:v&&(l=v.nextSibling),m.__u&=-7);return r.__e=E,l}function yl(e,t,r,n,o){var i,s,a,l,c,d=r.length,u=d,p=0;for(e.__k=new Array(o),i=0;i<o;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(l=i+p,(s=e.__k[i]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?vt(null,s,null,null,null):Ye(s)?vt(xe,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?vt(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=e,s.__b=e.__b+1,a=null,(c=s.__i=bl(s,r,l,u))!==-1&&(u--,(a=r[c])&&(a.__u|=2)),a==null||a.__v===null?(c==-1&&(o>d?p--:o<d&&p++),typeof s.type!="function"&&(s.__u|=4)):c!=l&&(c==l-1?p--:c==l+1?p++:(c>l?p--:p++,s.__u|=4))):e.__k[i]=null;if(u)for(i=0;i<d;i++)(a=r[i])!=null&&!(2&a.__u)&&(a.__e==n&&(n=Pe(a)),_i(a,a));return n}function mi(e,t,r){var n,o;if(typeof e.type=="function"){for(n=e.__k,o=0;n&&o<n.length;o++)n[o]&&(n[o].__=e,t=mi(n[o],t,r));return t}e.__e!=t&&(t&&e.type&&!r.contains(t)&&(t=Pe(e)),r.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function wt(e,t){return t=t||[],e==null||typeof e=="boolean"||(Ye(e)?e.some(function(r){wt(r,t)}):t.push(e)),t}function bl(e,t,r,n){var o,i,s=e.key,a=e.type,l=t[r];if(l===null&&e.key==null||l&&s==l.key&&a===l.type&&!(2&l.__u))return r;if(n>(l!=null&&!(2&l.__u)?1:0))for(o=r-1,i=r+1;o>=0||i<t.length;){if(o>=0){if((l=t[o])&&!(2&l.__u)&&s==l.key&&a===l.type)return o;o--}if(i<t.length){if((l=t[i])&&!(2&l.__u)&&s==l.key&&a===l.type)return i;i++}}return-1}function $o(e,t,r){t[0]=="-"?e.setProperty(t,r!=null?r:""):e[t]=r==null?"":typeof r!="number"||vl.test(t)?r:r+"px"}function _t(e,t,r,n,o){var i;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||$o(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||$o(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(ci,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n?r.t=n.t:(r.t=Qr,e.addEventListener(t,i?qr:Gr,i)):e.removeEventListener(t,i?qr:Gr,i);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r!=null?r:"";break e}catch(s){}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function Jo(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t.u==null)t.u=Qr++;else if(t.u<r.t)return;return r(I.event?I.event(t):t)}}}function Zr(e,t,r,n,o,i,s,a,l,c){var d,u,p,m,v,E,h,_,b,T,A,C,k,$,z,ae,Ie,X=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(l=!!(32&r.__u),i=[a=t.__e=r.__e]),(d=I.__b)&&d(t);e:if(typeof X=="function")try{if(_=t.props,b="prototype"in X&&X.prototype.render,T=(d=X.contextType)&&n[d.__c],A=d?T?T.props.value:d.__:n,r.__c?h=(u=t.__c=r.__c).__=u.__E:(b?t.__c=u=new X(_,A):(t.__c=u=new pe(_,A),u.constructor=X,u.render=El),T&&T.sub(u),u.props=_,u.state||(u.state={}),u.context=A,u.__n=n,p=u.__d=!0,u.__h=[],u._sb=[]),b&&u.__s==null&&(u.__s=u.state),b&&X.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=de({},u.__s)),de(u.__s,X.getDerivedStateFromProps(_,u.__s))),m=u.props,v=u.state,u.__v=t,p)b&&X.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),b&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(b&&X.getDerivedStateFromProps==null&&_!==m&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(_,A),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(_,u.__s,A)===!1||t.__v==r.__v)){for(t.__v!=r.__v&&(u.props=_,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(ve){ve&&(ve.__=t)}),C=0;C<u._sb.length;C++)u.__h.push(u._sb[C]);u._sb=[],u.__h.length&&s.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(_,u.__s,A),b&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(m,v,E)})}if(u.context=A,u.props=_,u.__P=e,u.__e=!1,k=I.__r,$=0,b){for(u.state=u.__s,u.__d=!1,k&&k(t),d=u.render(u.props,u.state,u.context),z=0;z<u._sb.length;z++)u.__h.push(u._sb[z]);u._sb=[]}else do u.__d=!1,k&&k(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++$<25);u.state=u.__s,u.getChildContext!=null&&(n=de(de({},n),u.getChildContext())),b&&!p&&u.getSnapshotBeforeUpdate!=null&&(E=u.getSnapshotBeforeUpdate(m,v)),ae=d,d!=null&&d.type===xe&&d.key==null&&(ae=hi(d.props.children)),a=pi(e,Ye(ae)?ae:[ae],t,r,n,o,i,s,a,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&s.push(u),h&&(u.__E=u.__=null)}catch(ve){if(t.__v=null,l||i!=null)if(ve.then){for(t.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,t.__e=a}else for(Ie=i.length;Ie--;)Xr(i[Ie]);else t.__e=r.__e,t.__k=r.__k;I.__e(ve,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):a=t.__e=wl(r.__e,t,r,n,o,i,s,l,c);return(d=I.diffed)&&d(t),128&t.__u?void 0:a}function fi(e,t,r){for(var n=0;n<r.length;n++)en(r[n],r[++n],r[++n]);I.__c&&I.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){I.__e(i,o.__v)}})}function hi(e){return typeof e!="object"||e==null?e:Ye(e)?e.map(hi):de({},e)}function wl(e,t,r,n,o,i,s,a,l){var c,d,u,p,m,v,E,h=r.props,_=t.props,b=t.type;if(b=="svg"?o="http://www.w3.org/2000/svg":b=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((m=i[c])&&"setAttribute"in m==!!b&&(b?m.localName==b:m.nodeType==3)){e=m,i[c]=null;break}}if(e==null){if(b==null)return document.createTextNode(_);e=document.createElementNS(o,b,_.is&&_),a&&(I.__m&&I.__m(t,i),a=!1),i=null}if(b===null)h===_||a&&e.data===_||(e.data=_);else{if(i=i&&St.call(e.childNodes),h=r.props||qe,!a&&i!=null)for(h={},c=0;c<e.attributes.length;c++)h[(m=e.attributes[c]).name]=m.value;for(c in h)if(m=h[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=m;else if(!(c in _)){if(c=="value"&&"defaultValue"in _||c=="checked"&&"defaultChecked"in _)continue;_t(e,c,null,m,o)}}for(c in _)m=_[c],c=="children"?p=m:c=="dangerouslySetInnerHTML"?d=m:c=="value"?v=m:c=="checked"?E=m:a&&typeof m!="function"||h[c]===m||_t(e,c,m,h[c],o);if(d)a||u&&(d.__html===u.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),pi(t.type==="template"?e.content:e,Ye(p)?p:[p],t,r,n,b=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:r.__k&&Pe(r,0),a,l),i!=null)for(c=i.length;c--;)Xr(i[c]);a||(c="value",b=="progress"&&v==null?e.removeAttribute("value"):v!==void 0&&(v!==e[c]||b=="progress"&&!v||b=="option"&&v!==h[c])&&_t(e,c,v,h[c],o),c="checked",E!==void 0&&E!==e[c]&&_t(e,c,E,h[c],o))}return e}function en(e,t,r){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&t==null||(e.__u=e(t))}else e.current=t}catch(o){I.__e(o,r)}}function _i(e,t,r){var n,o;if(I.unmount&&I.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||en(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){I.__e(i,t)}n.base=n.__P=null}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&_i(n[o],t,r||typeof e.type!="function");r||Xr(e.__e),e.__c=e.__=e.__e=void 0}function El(e,t,r){return this.constructor(e,r)}function Et(e,t,r){var n,o,i,s;t==document&&(t=document.documentElement),I.__&&I.__(e,t),o=(n=!1)?null:t.__k,i=[],s=[],Zr(t,e=t.__k=ke(xe,null,[e]),o||qe,qe,t.namespaceURI,o?null:t.firstChild?St.call(t.childNodes):null,i,o?o.__e:t.firstChild,n,s),fi(i,e,s)}function tn(e,t){M.__h&&M.__h(F,e,ze||t),ze=0;var r=F.__H||(F.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function kt(e){return ze=1,kl(bi,e)}function kl(e,t,r){var n=tn(We++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):bi(void 0,t),function(a){var l=n.__N?n.__N[0]:n.__[0],c=n.t(l,a);l!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=F,!F.__f)){var o=function(a,l,c){if(!n.__c.__H)return!0;var d=n.__c.__H.__.filter(function(p){return!!p.__c});if(d.every(function(p){return!p.__N}))return!i||i.call(this,a,l,c);var u=n.__c.props!==a;return d.forEach(function(p){if(p.__N){var m=p.__[0];p.__=p.__N,p.__N=void 0,m!==p.__[0]&&(u=!0)}}),i&&i.call(this,a,l,c)||u};F.__f=!0;var i=F.shouldComponentUpdate,s=F.componentWillUpdate;F.componentWillUpdate=function(a,l,c){if(this.__e){var d=i;i=void 0,o(a,l,c),i=d}s&&s.call(this,a,l,c)},F.shouldComponentUpdate=o}return n.__N||n.__}function Ee(e,t){var r=tn(We++,3);!M.__s&&yi(r.__H,t)&&(r.__=e,r.u=t,F.__H.__h.push(r))}function xt(e){return ze=5,vi(function(){return{current:e}},[])}function vi(e,t){var r=tn(We++,7);return yi(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function ee(e,t){return ze=8,vi(function(){return e},t)}function xl(){for(var e;e=gi.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(yt),e.__H.__h.forEach(Wr),e.__H.__h=[]}catch(t){e.__H.__h=[],M.__e(t,e.__v)}}function Sl(e){var t,r=function(){clearTimeout(n),Qo&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Qo&&(t=requestAnimationFrame(r))}function yt(e){var t=F,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),F=t}function Wr(e){var t=F;e.__c=e.__(),F=t}function yi(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function bi(e,t){return typeof t=="function"?t(e):t}function wi(e,t){for(var r in t)e[r]=t[r];return e}function zr(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function Xo(e,t){this.props=e,this.context=t}function Tl(e,t){function r(o){var i=this.props.ref,s=i==o.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!s:zr(this.props,o)}function n(o){return this.shouldComponentUpdate=r,ke(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}function Rl(e){function t(r){var n=wi({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Il,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}function Ei(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=wi({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Ei(n,t,r)})),e}function ki(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return ki(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function Kr(){this.__u=0,this.o=null,this.__b=null}function xi(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function gt(){this.i=null,this.l=null}function Ul(){}function Fl(){return this.cancelBubble}function jl(){return this.defaultPrevented}function S(e,t,r,n,o,i){t||(t={});var s,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?s=t[a]:l[a]=t[a];var c={type:e,props:l,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Bl,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return I.vnode&&I.vnode(c),c}function Wl(a){var l=a,{elementTag:e="Image",src:t="",children:r,handleExposure:n,className:o,imgStyle:i}=l,s=Z(l,["elementTag","src","children","handleExposure","className","imgStyle"]);let c=ql(()=>{t&&n()});return e==="Image"?S("div",{className:o,style:{borderRadius:"8px"},children:ke("img",O(w({},s),{ref:c,src:t!=null?t:"",style:w({display:"block",width:"100%",height:"auto",objectFit:"contain",maxWidth:"100%",maxHeight:"100%",borderRadius:"8px"},i||{})}))}):S("div",O(w({},s),{ref:c,className:o,children:r}))}function zl(e,t){if(!e)return null;let r=Array.isArray(t)?t[0]:t,n=Array.isArray(t)?t[1]:0;return Array.isArray(e)?e.map((o,i)=>o&&typeof o=="object"&&"type"in o?ke(o.type,O(w({},o.props),{style:O(w({},o.props.style||{}),{paddingLeft:r>0?`${r/2}px`:void 0,paddingRight:r>0?`${r/2}px`:void 0,paddingTop:n>0?`${n/2}px`:void 0,paddingBottom:n>0?`${n/2}px`:void 0}),key:o.key||i})):o):e&&typeof e=="object"&&"type"in e?ke(e.type,O(w({},e.props),{style:O(w({},e.props.style||{}),{paddingLeft:r>0?`${r/2}px`:void 0,paddingRight:r>0?`${r/2}px`:void 0,paddingTop:n>0?`${n/2}px`:void 0,paddingBottom:n>0?`${n/2}px`:void 0})})):e}var St,I,si,we,Bo,ai,li,ci,Qr,Gr,qr,qe,ui,vl,Ye,We,F,Jr,Ko,ze,gi,M,Vo,Go,qo,Wo,zo,Yo,Qo,Zo,Il,Al,ei,ti,Cl,Pl,Ol,Nl,Dl,Ll,ri,Ml,ni,oi,ii,Bl,Vr,Hl,$l,Jl,Kl,Vl,Gl,ql,Si,Ti,Yl,Ql,Xl,Zl,Yr,ec,Ii,Ri,Ai,tc,rc,nc,Ci,rn=x(()=>{"use strict";qe={},ui=[],vl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ye=Array.isArray;St=ui.slice,I={__e:function(e,t,r,n){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},si=0,pe.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=de({},this.state),typeof e=="function"&&(e=e(de({},r),this.props)),e&&de(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ho(this))},pe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ho(this))},pe.prototype.render=xe,we=[],ai=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,li=function(e,t){return e.__v.__b-t.__v.__b},bt.__r=0,ci=/(PointerCapture)$|Capture$/i,Qr=0,Gr=Jo(!1),qr=Jo(!0);ze=0,gi=[],M=I,Vo=M.__b,Go=M.__r,qo=M.diffed,Wo=M.__c,zo=M.unmount,Yo=M.__;M.__b=function(e){F=null,Vo&&Vo(e)},M.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Yo&&Yo(e,t)},M.__r=function(e){Go&&Go(e),We=0;var t=(F=e.__c).__H;t&&(Jr===F?(t.__h=[],F.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.forEach(yt),t.__h.forEach(Wr),t.__h=[],We=0)),Jr=F},M.diffed=function(e){qo&&qo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(gi.push(t)!==1&&Ko===M.requestAnimationFrame||((Ko=M.requestAnimationFrame)||Sl)(xl)),t.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Jr=F=null},M.__c=function(e,t){t.some(function(r){try{r.__h.forEach(yt),r.__h=r.__h.filter(function(n){return!n.__||Wr(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],M.__e(n,r.__v)}}),Wo&&Wo(e,t)},M.unmount=function(e){zo&&zo(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{yt(n)}catch(o){t=o}}),r.__H=void 0,t&&M.__e(t,r.__v))};Qo=typeof requestAnimationFrame=="function";(Xo.prototype=new pe).isPureReactComponent=!0,Xo.prototype.shouldComponentUpdate=function(e,t){return zr(this.props,e)||zr(this.state,t)};Zo=I.__b;I.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Zo&&Zo(e)};Il=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;Al=I.__e;I.__e=function(e,t,r,n){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}Al(e,t,r,n)};ei=I.unmount;I.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),ei&&ei(e)},(Kr.prototype=new pe).__c=function(e,t){var r=t.__c,n=this;n.o==null&&(n.o=[]),n.o.push(r);var o=xi(n.__v),i=!1,s=function(){i||(i=!0,r.__R=null,o?o(a):a())};r.__R=s;var a=function(){if(!--n.__u){if(n.state.__a){var l=n.state.__a;n.__v.__k[0]=ki(l,l.__c.__P,l.__c.__O)}var c;for(n.setState({__a:n.__b=null});c=n.o.pop();)c.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(s,s)},Kr.prototype.componentWillUnmount=function(){this.o=[]},Kr.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Ei(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&ke(xe,null,e.fallback);return o&&(o.__u&=-33),[ke(xe,null,t.__a?null:e.children),o]};ti=function(e,t,r){if(++r[1]===r[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.i=r=r[2]}};(gt.prototype=new pe).__a=function(e){var t=this,r=xi(t.__v),n=t.l.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),ti(t,e,n)):o()};r?r(i):i()}},gt.prototype.render=function(e){this.i=null,this.l=new Map;var t=wt(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.l.set(t[r],this.i=[1,0,this.i]);return e.children},gt.prototype.componentDidUpdate=gt.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,r){ti(e,r,t)})};Cl=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Pl=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ol=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Nl=/[A-Z0-9]/g,Dl=typeof document<"u",Ll=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};pe.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(pe.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});ri=I.event;I.event=function(e){return ri&&(e=ri(e)),e.persist=Ul,e.isPropagationStopped=Fl,e.isDefaultPrevented=jl,e.nativeEvent=e};Ml={enumerable:!1,configurable:!0,get:function(){return this.class}},ni=I.vnode;I.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={},i=n.indexOf("-")===-1;for(var s in r){var a=r[s];if(!(s==="value"&&"defaultValue"in r&&a==null||Dl&&s==="children"&&n==="noscript"||s==="class"||s==="className")){var l=s.toLowerCase();s==="defaultValue"&&"value"in r&&r.value==null?s="value":s==="download"&&a===!0?a="":l==="translate"&&a==="no"?a=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?s="ondblclick":l!=="onchange"||n!=="input"&&n!=="textarea"||Ll(r.type)?l==="onfocus"?s="onfocusin":l==="onblur"?s="onfocusout":Ol.test(s)&&(s=l):l=s="oninput":i&&Pl.test(s)?s=s.replace(Nl,"-$&").toLowerCase():a===null&&(a=void 0),l==="oninput"&&o[s=l]&&(s="oninputCapture"),o[s]=a}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=wt(r.children).forEach(function(c){c.props.selected=o.value.indexOf(c.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=wt(r.children).forEach(function(c){c.props.selected=o.multiple?o.defaultValue.indexOf(c.props.value)!=-1:o.defaultValue==c.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",Ml)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=Cl,ni&&ni(e)};oi=I.__r;I.__r=function(e){oi&&oi(e),e.__c};ii=I.diffed;I.diffed=function(e){ii&&ii(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value)};Bl=0;Vr={drawerBackdrop:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",justifyContent:"center",alignItems:"flex-end",zIndex:1e3,overflow:"hidden",touchAction:"none"},drawer:{backgroundColor:"white",borderRadius:"16px 16px 0 0",width:"100%",maxWidth:"100%",overflowY:"auto",position:"relative",boxShadow:"0 -2px 10px rgba(0, 0, 0, 0.1)",display:"flex",flexDirection:"column",margin:"0 auto"},drawerContent:{flex:1,width:"100%",height:"100%",overflow:"auto",margin:"0 auto"}},Hl=`
|
|
19
|
+
`;e.textContent=i;let a=document.head||document.getElementsByTagName("head")[0];a.insertBefore(e,a.firstChild),document.documentElement.setAttribute("data-jolibox-root","")},n=()=>{function i(s){return E(this,null,function*(){let u=s instanceof URL?s.href:s,c=new Promise((d,l)=>{let p=new XMLHttpRequest;p.open("GET",u),p.responseType="arraybuffer",p.addEventListener("load",()=>d(p.response)),p.addEventListener("error",l),p.send()});try{let d=yield c;return new Response(d,{headers:new Headers([["Content-Type","application/wasm"]])}).clone()}catch(d){throw console.error("Failed to load wasm:",d),d}})}let a=window.fetch;window.fetch=(s,u)=>{let c=s instanceof URL?s.href:s.toString();return c.endsWith(".wasm")?i(c):a(s,u)}},o=()=>{e!=null&&e.parentNode&&(e.parentNode.removeChild(e),e=null),document.documentElement.removeAttribute("data-jolibox-root"),window.fetch=r};return t(),n(),o}var il=T(()=>{"use strict"});var xn,al=T(()=>{"use strict";xn=class{constructor(r){this.track=r;this.adBreakIsShowing=!1;this.reportPageJumpOut=()=>{this.track("AdBreakJumpOut",{context:"AdsActionDetection"})};this.reportPageHide=()=>{this.track("AdBreakHide",{context:"AdsActionDetection"})};window.addEventListener("visibilitychange",()=>{document.hidden&&this.adBreakIsShowing&&this.reportPageHide()}),window.addEventListener("beforeunload",t=>{this.adBreakIsShowing&&this.reportPageJumpOut()})}}});var En,S0,x0,E0,I0,sl=T(()=>{"use strict";C();Zi();En=class{constructor(r,t,n,o){this.track=r;this.httpClient=t;this.checkNetwork=n;this.checkAdsDisplayPermission=r=>{if(!this.checkNetwork())return{reason:"NETWORK_NOT_OK"};let t=this.checkShouldBanInitial();if(t)return{reason:t};let n=this.checkShouldBanForSession(r);if(n)return{reason:n};let o=this.checkShouldBanHighFreq(r);if(o)return o;let i=this.checkShouldBanForTime(r);return i?{reason:i}:{reason:"ALLOWED"}};var p,m,v,y,h,g,_;let i=(p=o==null?void 0:o.maxAllowedAdsForTime)!=null?p:8,a=(m=o==null?void 0:o.banForTimeThreshold)!=null?m:6e4,s=(v=o==null?void 0:o.bannedReleaseTime)!=null?v:6e4,u=(y=o==null?void 0:o.maxAllowedAdsForSession)!=null?y:200,c=(h=o==null?void 0:o.banForSessionThreshold)!=null?h:6e5,d=(g=o==null?void 0:o.initialThreshold)!=null?g:2e3,l=(_=o==null?void 0:o.highFreqThreshold)!=null?_:2e3;this.checkShouldBanInitial=E0(d),this.checkShouldBanHighFreq=I0(l),this.checkShouldBanForTime=x0(i,a,s),this.checkShouldBanForSession=S0(u,c)}report(r,t){let n=t?{reason:r,count:t}:{reason:r};this.track("PreventAdsCheating",n),this.httpClient.post("/api/base/app-event",{data:{eventType:"PREVENT_ADS_CHEATING",adsInfo:n}})}},S0=(e,r)=>{let t=!1,n=[];return i=>{if(t)return"BANNED_FOR_SESSION";let a=Date.now();if(n=n.concat({timestamp:a,type:i}),n.length!==1&&(n.length>e&&(n=n.slice(-e)),n.length===e&&a-n[0].timestamp<=r))return t=!0,"BANNED_FOR_SESSION"}},x0=(e,r,t)=>{let n=null,o=d=>{n&&(window.clearTimeout(n),n=null),n=window.setTimeout(()=>{u.value=!1,n=null},d)},i="jolibox-sdk-ads-callbreak-timestamps",a="jolibox-sdk-ads-ban-for-time",s={_records:[],init(){var d;try{let l=JSON.parse((d=window.__joliboxLocalStorage__.getItem(i))!=null?d:"[]");Array.isArray(l)?this._records=l:this._records=[]}catch(l){this._records=[]}},get values(){return this._records},set values(d){try{window.__joliboxLocalStorage__.setItem(i,JSON.stringify(d))}catch(l){}this._records=d}},u={_record:!1,init(){var d;try{let l=JSON.parse((d=window.__joliboxLocalStorage__.getItem(a))!=null?d:"false");typeof l=="boolean"&&(this._record=l)}catch(l){this._record=!1}if(this._record){let l=s.values[s.values.length-1],p=l?Date.now()-l.timestamp:t;p<=t&&p>0?o(p):this._record=!1}},get value(){return this._record},set value(d){try{window.__joliboxLocalStorage__.setItem(a,JSON.stringify(d))}catch(l){}this._record=d}};return s.init(),u.init(),d=>{if(u.value)return"WAITING_BANNED_RELEASE";let l=Date.now();if(s.values=s.values.concat({timestamp:l,type:d}),s.values.length!==1&&(s.values.length>e&&(s.values=s.values.slice(-e)),s.values.length===e&&l-s.values[0].timestamp<=r))return u.value=!0,o(t),"BANNED_FOR_TIME"}},E0=e=>{let r=Date.now();return()=>{if(Date.now()-r<=e)return"BLOCK_INITIAL"}},I0=(e=2e3)=>{let r=0,t=null;return o=>{if(o==="reward"){if(t)return r+=1,{reason:"HOLDING_HIGH_FREQ",info:{count:r}};t=window.setTimeout(()=>{t&&(window.clearTimeout(t),t=0,r=0)},e)}}}});var In,ul=T(()=>{"use strict";ie();In=class{constructor(r){this.httpClient=r;this.configs=null;this.firstRun=!0;this.init()}init(){return E(this,null,function*(){try{this.configs=yield this.httpClient.get("/api/fe-configs/js-sdk/ads-channel-config")}catch(r){}})}shouldBypassCallingInterstitial(){var t,n;let r;if(!this.configs)this.init(),r=!this.firstRun;else{let o=(t=S.channel)!=null?t:"",i=this.configs[o],a=(n=i==null?void 0:i.interstitialRate)!=null?n:1;r=Math.random()<a}return this.firstRun=!1,r}}});var Lr,Tn,da=T(()=>{"use strict";al();sl();ie();ul();C();Lr=new Ne,Tn=class{constructor(r,t,n){this.track=r;this.httpClient=t;this.checkNetwork=n;this.configured=!1;this.config={};this.getGameId=()=>S.mpId;this.getTestAdsMode=()=>S.testAdsMode;this.asyncLoad=()=>E(this,null,function*(){var a,s,u,c,d;let r="ca-pub-7171363994453626",t,n,o=window.encodeURIComponent(window.btoa((a=this.getGameId())!=null?a:"")),i=(s=this.getTestAdsMode())!=null?s:!1;try{let l=yield this.httpClient.get("/public/ads",{query:{objectId:o,testAdsMode:`${i}`}});r=(u=l.data)==null?void 0:u.clientId,t=(c=l.data)==null?void 0:c.channelId,n=(d=l.data)==null?void 0:d.unitId}catch(l){console.error("Failed to fetch client info",l)}this.clientId=r,this.channelId=t,this.unitId=n});this.asyncInit=r=>E(this,null,function*(){var o;if(typeof window=="undefined")return;yield this.asyncLoad();let t="google-adsense",n=(o=this.getTestAdsMode())!=null?o:!1;if(!document.getElementById(t)&&this.clientId){let i=document.createElement("script");i.id=t,i.async=!0,i.crossOrigin="anonymous",i.src=`https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=${this.clientId}`,n&&i.setAttribute("data-adbreak-test","on"),this.channelId&&i.setAttribute("data-ad-channel",this.channelId),document.head.appendChild(i),this.track("LoadAdsenseCompleted",null)}});this.push=(r={})=>{window.adsbygoogle.push(r)};this.wrapAdBreakParams=r=>{let t=!1,n=r.adBreakDone,o=a=>{var s;t=!0,this.adsActionDetection.adBreakIsShowing=!1,this.track("CallAdBreakDone",{breakType:a.breakType,breakName:(s=a.breakName)!=null?s:"",breakFormat:a.breakFormat,breakStatus:a.breakStatus}),n&&n(a)};if(r.adBreakDone=o,r.type==="reward"){let a=r.beforeReward,s=c=>()=>{this.track("CallShowAdFn",null),c()},u=c=>{t=!0,a&&a(s(c))};r.beforeReward=u,window.setTimeout(()=>{var c,d;t||(this.track("CallAdBreakTimeout",{type:r.type}),(d=r.adBreakDone)==null||d.call(r,{breakType:r.type,breakName:(c=r.name)!=null?c:"",breakFormat:"reward",breakStatus:"timeout"}))},5e3)}if((a=>a.type==="preroll")(r)){Lr.emit("isAdShowing",!0);let a=r.adBreakDone,s=u=>{Lr.emit("isAdShowing",!1),a&&a(u)};return N(I({},r),{adBreakDone:s})}else{let a=r.beforeAd,s=r.afterAd,u=()=>{var d;t=!0,Lr.emit("isAdShowing",!0),this.track("CallBeforeAd",{type:r.type,name:(d=r.name)!=null?d:""}),a&&a()},c=()=>{var d;t=!0,Lr.emit("isAdShowing",!1),this.track("CallAfterAd",{type:r.type,name:(d=r.name)!=null?d:""}),s&&s()};return N(I({},r),{beforeAd:u,afterAd:c})}};this.adConfig=r=>{let o=r,{onReady:t}=o,n=Re(o,["onReady"]);this.track("CallAdConfig",n),this.configured?console.warn("Ad config already set, skipping"):(this.configured=!0,this.push(r))};this.adBreak=r=>{var s,u,c,d,l,p;if(!this.getGameId()){console.warn("Game ID is not set, skip calling adBreak");return}if(r.type!=="reward"&&!this.channelPolicy.shouldBypassCallingInterstitial()){(s=r.adBreakDone)==null||s.call(r,{breakType:r.type,breakName:"skipInterstitials",breakFormat:"interstitial",breakStatus:"viewed"});return}let{reason:t,info:n}=this.antiCheating.checkAdsDisplayPermission(r.type==="reward"?"reward":"interstitial");switch(t){case"NETWORK_NOT_OK":case"BANNED_FOR_SESSION":(u=r.adBreakDone)==null||u.call(r,{breakType:r.type,breakName:t,breakFormat:r.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"}),this.antiCheating.report(t);return;case"BLOCK_INITIAL":case"BANNED_FOR_TIME":case"WAITING_BANNED_RELEASE":(c=r.adBreakDone)==null||c.call(r,{breakType:r.type,breakFormat:r.type==="reward"?"reward":"interstitial",breakStatus:"frequencyCapped"}),this.antiCheating.report(t);return;case"HOLDING_HIGH_FREQ":(l=r.adBreakDone)==null||l.call(r,{breakFormat:r.type==="reward"?"reward":"interstitial",breakName:"",breakStatus:((d=n==null?void 0:n.count)!=null?d:0)>6?"other":"frequencyCapped",breakType:r.type}),n!=null&&n.count&&n.count!==0&&n.count%3===0&&this.antiCheating.report(t,n==null?void 0:n.count);return;default:break}let o=r.type,i;switch(o){case"preroll":i={type:o};break;case"start":case"pause":case"next":case"browse":case"reward":i={type:o,name:(p=r.name)!=null?p:""};break}this.adsActionDetection.adBreakIsShowing=!0,this.track("CallAdBreak",i);let a=this.wrapAdBreakParams(r);this.push(a),window.JoliTesterBridge&&console.log("joli-fullscreen-ad-show")};this.adUnit=r=>E(this,null,function*(){var p,m,v,y;if(this.track("CallAdUnit",{adFormat:(m=(p=r.adFormat)==null?void 0:p.toString())!=null?m:null,fullWidthResponsive:(v=r.fullWidthResponsive)!=null?v:null}),this.clientId||(yield this.asyncLoad()),document.querySelector("#jolibox-ads")){console.warn("Ad unit already set, skipping");return}let{el:t,slot:n,adFormat:o,fullWidthResponsive:i,style:a}=r,s;if(!t)throw new Error("targeting element is required");if(typeof t=="string"?s=document.querySelector(t):s=t,!s)throw new Error("targeting element not found");let u=n;if(u||(u=this.unitId),!u)throw new Error("slot is required");let c=typeof o=="object"&&Array.isArray(o)?o.join(", "):o,d=document.createElement("ins");if(d.className="adsbygoogle",d.id="jolibox-ads",d.style.display="block",d.setAttribute("data-ad-client",this.clientId),d.setAttribute("data-ad-slot",u),c&&d.setAttribute("data-ad-format",c),i&&d.setAttribute("data-full-width-responsive",i),a&&d.setAttribute("style",a),(y=this.getTestAdsMode())!=null?y:!1){let h=document.createElement("div");h.style.position="absolute",h.style.top="0",h.style.left="0",h.style.width="100%",h.style.height="100%",h.style.display="flex",h.style.justifyContent="center",h.style.alignItems="center",h.style.backgroundColor="rgba(0, 0, 0, 0.5)",h.style.color="white",h.innerHTML="Test Ad",d.style.position="relative",s.appendChild(d),d.appendChild(h)}else s.appendChild(d),new MutationObserver(g=>{g.forEach(_=>{if(_.type==="attributes"&&_.attributeName==="data-ad-status"){let x=d.getAttribute("data-ad-status");this.track("AdSenseUnitStatusChanged",{status:x!=null?x:"null"})}})}).observe(d,{attributes:!0,attributeFilter:["data-ad-status"]}),this.push({})});this.antiCheating=new En(r,t,n),this.adsActionDetection=new xn(this.track),this.channelPolicy=new In(t)}init(r){this.track("CallAdsInit",null),typeof window!="undefined"&&(this.config=r!=null?r:{},window.adsbygoogle=window.adsbygoogle||[],this.asyncInit(r))}}});function Ve(e,r){for(var t in r)e[t]=r[t];return e}function va(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Je(e,r,t){var n,o,i,a={};for(i in r)i=="key"?n=r[i]:i=="ref"?o=r[i]:a[i]=r[i];if(arguments.length>2&&(a.children=arguments.length>3?kn.call(arguments,2):t),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return An(e,a,n,o,null)}function An(e,r,t,n,o){var i={type:e,props:r,key:t,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o==null?++pl:o,__i:-1,__u:0};return o==null&&O.vnode!=null&&O.vnode(i),i}function ar(e){return e.children}function Le(e,r){this.props=e,this.context=r}function Fr(e,r){if(r==null)return e.__?Fr(e.__,e.__i+1):null;for(var t;r<e.__k.length;r++)if((t=e.__k[r])!=null&&t.__e!=null)return t.__e;return typeof e.type=="function"?Fr(e):null}function yl(e){var r,t;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,r=0;r<e.__k.length;r++)if((t=e.__k[r])!=null&&t.__e!=null){e.__e=e.__c.base=t.__e;break}return yl(e)}}function ll(e){(!e.__d&&(e.__d=!0)&&br.push(e)&&!qn.__r++||cl!==O.debounceRendering)&&((cl=O.debounceRendering)||ml)(qn)}function qn(){for(var e,r,t,n,o,i,a,s=1;br.length;)br.length>s&&br.sort(vl),e=br.shift(),s=br.length,e.__d&&(t=void 0,o=(n=(r=e).__v).__e,i=[],a=[],r.__P&&((t=Ve({},n)).__v=n.__v+1,O.vnode&&O.vnode(t),ha(r.__P,t,n,r.__n,r.__P.namespaceURI,32&n.__u?[o]:null,i,o==null?Fr(n):o,!!(32&n.__u),a),t.__v=n.__v,t.__.__k[t.__i]=t,wl(i,t,a),t.__e!=o&&yl(t)));qn.__r=0}function _l(e,r,t,n,o,i,a,s,u,c,d){var l,p,m,v,y,h,g=n&&n.__k||gl,_=r.length;for(u=q0(t,r,g,u,_),l=0;l<_;l++)(m=t.__k[l])!=null&&(p=m.__i===-1?wt:g[m.__i]||wt,m.__i=l,h=ha(e,m,p,o,i,a,s,u,c,d),v=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&ga(p.ref,null,m),d.push(m.ref,m.__c||v,m)),y==null&&v!=null&&(y=v),4&m.__u||p.__k===m.__k?u=bl(m,u,e):typeof m.type=="function"&&h!==void 0?u=h:v&&(u=v.nextSibling),m.__u&=-7);return t.__e=y,u}function q0(e,r,t,n,o){var i,a,s,u,c,d=t.length,l=d,p=0;for(e.__k=new Array(o),i=0;i<o;i++)(a=r[i])!=null&&typeof a!="boolean"&&typeof a!="function"?(u=i+p,(a=e.__k[i]=typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?An(null,a,null,null,null):St(a)?An(ar,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?An(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,s=null,(c=a.__i=k0(a,t,u,l))!==-1&&(l--,(s=t[c])&&(s.__u|=2)),s==null||s.__v===null?(c==-1&&(o>d?p--:o<d&&p++),typeof a.type!="function"&&(a.__u|=4)):c!=u&&(c==u-1?p--:c==u+1?p++:(c>u?p--:p++,a.__u|=4))):e.__k[i]=null;if(l)for(i=0;i<d;i++)(s=t[i])!=null&&!(2&s.__u)&&(s.__e==n&&(n=Fr(s)),xl(s,s));return n}function bl(e,r,t){var n,o;if(typeof e.type=="function"){for(n=e.__k,o=0;n&&o<n.length;o++)n[o]&&(n[o].__=e,r=bl(n[o],r,t));return r}e.__e!=r&&(r&&e.type&&!t.contains(r)&&(r=Fr(e)),t.insertBefore(e.__e,r||null),r=e.__e);do r=r&&r.nextSibling;while(r!=null&&r.nodeType==8);return r}function xt(e,r){return r=r||[],e==null||typeof e=="boolean"||(St(e)?e.some(function(t){xt(t,r)}):r.push(e)),r}function k0(e,r,t,n){var o,i,a=e.key,s=e.type,u=r[t];if(u===null&&e.key==null||u&&a==u.key&&s===u.type&&!(2&u.__u))return t;if(n>(u!=null&&!(2&u.__u)?1:0))for(o=t-1,i=t+1;o>=0||i<r.length;){if(o>=0){if((u=r[o])&&!(2&u.__u)&&a==u.key&&s===u.type)return o;o--}if(i<r.length){if((u=r[i])&&!(2&u.__u)&&a==u.key&&s===u.type)return i;i++}}return-1}function dl(e,r,t){r[0]=="-"?e.setProperty(r,t==null?"":t):e[r]=t==null?"":typeof t!="number"||A0.test(r)?t:t+"px"}function Rn(e,r,t,n,o){var i;e:if(r=="style")if(typeof t=="string")e.style.cssText=t;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(r in n)t&&r in t||dl(e.style,r,"");if(t)for(r in t)n&&t[r]===n[r]||dl(e.style,r,t[r])}else if(r[0]=="o"&&r[1]=="n")i=r!=(r=r.replace(hl,"$1")),r=r.toLowerCase()in e||r=="onFocusOut"||r=="onFocusIn"?r.toLowerCase().slice(2):r.slice(2),e.l||(e.l={}),e.l[r+i]=t,t?n?t.t=n.t:(t.t=ma,e.addEventListener(r,i?pa:fa,i)):e.removeEventListener(r,i?pa:fa,i);else{if(o=="http://www.w3.org/2000/svg")r=r.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(r!="width"&&r!="height"&&r!="href"&&r!="list"&&r!="form"&&r!="tabIndex"&&r!="download"&&r!="rowSpan"&&r!="colSpan"&&r!="role"&&r!="popover"&&r in e)try{e[r]=t==null?"":t;break e}catch(a){}typeof t=="function"||(t==null||t===!1&&r[4]!="-"?e.removeAttribute(r):e.setAttribute(r,r=="popover"&&t==1?"":t))}}function fl(e){return function(r){if(this.l){var t=this.l[r.type+e];if(r.u==null)r.u=ma++;else if(r.u<t.t)return;return t(O.event?O.event(r):r)}}}function ha(e,r,t,n,o,i,a,s,u,c){var d,l,p,m,v,y,h,g,_,x,A,q,w,k,_e,$e,Cr,xe=r.type;if(r.constructor!==void 0)return null;128&t.__u&&(u=!!(32&t.__u),i=[s=r.__e=t.__e]),(d=O.__b)&&d(r);e:if(typeof xe=="function")try{if(g=r.props,_="prototype"in xe&&xe.prototype.render,x=(d=xe.contextType)&&n[d.__c],A=d?x?x.props.value:d.__:n,t.__c?h=(l=r.__c=t.__c).__=l.__E:(_?r.__c=l=new xe(g,A):(r.__c=l=new Le(g,A),l.constructor=xe,l.render=P0),x&&x.sub(l),l.props=g,l.state||(l.state={}),l.context=A,l.__n=n,p=l.__d=!0,l.__h=[],l._sb=[]),_&&l.__s==null&&(l.__s=l.state),_&&xe.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Ve({},l.__s)),Ve(l.__s,xe.getDerivedStateFromProps(g,l.__s))),m=l.props,v=l.state,l.__v=r,p)_&&xe.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),_&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(_&&xe.getDerivedStateFromProps==null&&g!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(g,A),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(g,l.__s,A)===!1||r.__v==t.__v)){for(r.__v!=t.__v&&(l.props=g,l.state=l.__s,l.__d=!1),r.__e=t.__e,r.__k=t.__k,r.__k.some(function(gr){gr&&(gr.__=r)}),q=0;q<l._sb.length;q++)l.__h.push(l._sb[q]);l._sb=[],l.__h.length&&a.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(g,l.__s,A),_&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,v,y)})}if(l.context=A,l.props=g,l.__P=e,l.__e=!1,w=O.__r,k=0,_){for(l.state=l.__s,l.__d=!1,w&&w(r),d=l.render(l.props,l.state,l.context),_e=0;_e<l._sb.length;_e++)l.__h.push(l._sb[_e]);l._sb=[]}else do l.__d=!1,w&&w(r),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++k<25);l.state=l.__s,l.getChildContext!=null&&(n=Ve(Ve({},n),l.getChildContext())),_&&!p&&l.getSnapshotBeforeUpdate!=null&&(y=l.getSnapshotBeforeUpdate(m,v)),$e=d,d!=null&&d.type===ar&&d.key==null&&($e=Sl(d.props.children)),s=_l(e,St($e)?$e:[$e],r,t,n,o,i,a,s,u,c),l.base=r.__e,r.__u&=-161,l.__h.length&&a.push(l),h&&(l.__E=l.__=null)}catch(gr){if(r.__v=null,u||i!=null)if(gr.then){for(r.__u|=u?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;i[i.indexOf(s)]=null,r.__e=s}else for(Cr=i.length;Cr--;)va(i[Cr]);else r.__e=t.__e,r.__k=t.__k;O.__e(gr,r,t)}else i==null&&r.__v==t.__v?(r.__k=t.__k,r.__e=t.__e):s=r.__e=O0(t.__e,r,t,n,o,i,a,u,c);return(d=O.diffed)&&d(r),128&r.__u?void 0:s}function wl(e,r,t){for(var n=0;n<t.length;n++)ga(t[n],t[++n],t[++n]);O.__c&&O.__c(r,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){O.__e(i,o.__v)}})}function Sl(e){return typeof e!="object"||e==null?e:St(e)?e.map(Sl):Ve({},e)}function O0(e,r,t,n,o,i,a,s,u){var c,d,l,p,m,v,y,h=t.props,g=r.props,_=r.type;if(_=="svg"?o="http://www.w3.org/2000/svg":_=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((m=i[c])&&"setAttribute"in m==!!_&&(_?m.localName==_:m.nodeType==3)){e=m,i[c]=null;break}}if(e==null){if(_==null)return document.createTextNode(g);e=document.createElementNS(o,_,g.is&&g),s&&(O.__m&&O.__m(r,i),s=!1),i=null}if(_===null)h===g||s&&e.data===g||(e.data=g);else{if(i=i&&kn.call(e.childNodes),h=t.props||wt,!s&&i!=null)for(h={},c=0;c<e.attributes.length;c++)h[(m=e.attributes[c]).name]=m.value;for(c in h)if(m=h[c],c!="children"){if(c=="dangerouslySetInnerHTML")l=m;else if(!(c in g)){if(c=="value"&&"defaultValue"in g||c=="checked"&&"defaultChecked"in g)continue;Rn(e,c,null,m,o)}}for(c in g)m=g[c],c=="children"?p=m:c=="dangerouslySetInnerHTML"?d=m:c=="value"?v=m:c=="checked"?y=m:s&&typeof m!="function"||h[c]===m||Rn(e,c,m,h[c],o);if(d)s||l&&(d.__html===l.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),r.__k=[];else if(l&&(e.innerHTML=""),_l(r.type==="template"?e.content:e,St(p)?p:[p],r,t,n,_=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,a,i?i[0]:t.__k&&Fr(t,0),s,u),i!=null)for(c=i.length;c--;)va(i[c]);s||(c="value",_=="progress"&&v==null?e.removeAttribute("value"):v!==void 0&&(v!==e[c]||_=="progress"&&!v||_=="option"&&v!==h[c])&&Rn(e,c,v,h[c],o),c="checked",y!==void 0&&y!==e[c]&&Rn(e,c,y,h[c],o))}return e}function ga(e,r,t){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&r==null||(e.__u=e(r))}else e.current=r}catch(o){O.__e(o,t)}}function xl(e,r,t){var n,o;if(O.unmount&&O.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||ga(n,null,r)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){O.__e(i,r)}n.base=n.__P=null}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&xl(n[o],r,t||typeof e.type!="function");t||va(e.__e),e.__c=e.__=e.__e=void 0}function P0(e,r,t){return this.constructor(e,t)}function Et(e,r,t){var n,o,i,a;r==document&&(r=document.documentElement),O.__&&O.__(e,r),o=(n=typeof t=="function")?null:t&&t.__k||r.__k,i=[],a=[],ha(r,e=(!n&&t||r).__k=Je(ar,null,[e]),o||wt,wt,r.namespaceURI,!n&&t?[t]:o?null:r.firstChild?kn.call(r.childNodes):null,i,!n&&t?t:o?o.__e:r.firstChild,n,a),wl(i,e,a)}var kn,O,pl,T0,br,cl,ml,vl,hl,ma,fa,pa,R0,wt,gl,A0,St,El=T(()=>{wt={},gl=[],A0=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,St=Array.isArray;kn=gl.slice,O={__e:function(e,r,t,n){for(var o,i,a;r=r.__;)if((o=r.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),a=o.__d),a)return o.__E=o}catch(s){e=s}throw e}},pl=0,T0=function(e){return e!=null&&e.constructor==null},Le.prototype.setState=function(e,r){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ve({},this.state),typeof e=="function"&&(e=e(Ve({},t),this.props)),e&&Ve(t,e),e!=null&&this.__v&&(r&&this._sb.push(r),ll(this))},Le.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ll(this))},Le.prototype.render=ar,br=[],ml=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,vl=function(e,r){return e.__v.__b-r.__v.__b},qn.__r=0,hl=/(PointerCapture)$|Capture$/i,ma=0,fa=fl(!1),pa=fl(!0),R0=0});var U=f((_M,Il)=>{"use strict";Il.exports=function(e){try{return!!e()}catch(r){return!0}}});var jr=f((bM,Tl)=>{"use strict";var C0=U();Tl.exports=!C0(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var M=f((wM,ql)=>{"use strict";var Rl=jr(),Al=Function.prototype,ya=Al.call,N0=Rl&&Al.bind.bind(ya,ya);ql.exports=Rl?N0:function(e){return function(){return ya.apply(e,arguments)}}});var re=f((SM,kl)=>{"use strict";var D0=M();kl.exports=D0({}.isPrototypeOf)});var G=f((_a,Ol)=>{"use strict";var It=function(e){return e&&e.Math===Math&&e};Ol.exports=It(typeof globalThis=="object"&&globalThis)||It(typeof window=="object"&&window)||It(typeof self=="object"&&self)||It(typeof global=="object"&&global)||It(typeof _a=="object"&&_a)||function(){return this}()||Function("return this")()});var On=f((xM,Dl)=>{"use strict";var L0=jr(),Nl=Function.prototype,Pl=Nl.apply,Cl=Nl.call;Dl.exports=typeof Reflect=="object"&&Reflect.apply||(L0?Cl.bind(Pl):function(){return Cl.apply(Pl,arguments)})});var Fe=f((EM,Fl)=>{"use strict";var Ll=M(),F0=Ll({}.toString),j0=Ll("".slice);Fl.exports=function(e){return j0(F0(e),8,-1)}});var Tt=f((IM,jl)=>{"use strict";var U0=Fe(),M0=M();jl.exports=function(e){if(U0(e)==="Function")return M0(e)}});var X=f((TM,Ul)=>{"use strict";var ba=typeof document=="object"&&document.all;Ul.exports=typeof ba=="undefined"&&ba!==void 0?function(e){return typeof e=="function"||e===ba}:function(e){return typeof e=="function"}});var te=f((RM,Ml)=>{"use strict";var B0=U();Ml.exports=!B0(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var Ee=f((AM,Bl)=>{"use strict";var $0=jr(),Pn=Function.prototype.call;Bl.exports=$0?Pn.bind(Pn):function(){return Pn.apply(Pn,arguments)}});var Cn=f(Kl=>{"use strict";var $l={}.propertyIsEnumerable,Hl=Object.getOwnPropertyDescriptor,H0=Hl&&!$l.call({1:2},1);Kl.f=H0?function(r){var t=Hl(this,r);return!!t&&t.enumerable}:$l});var Ur=f((kM,Gl)=>{"use strict";Gl.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var Nn=f((OM,Vl)=>{"use strict";var K0=M(),G0=U(),V0=Fe(),wa=Object,J0=K0("".split);Vl.exports=G0(function(){return!wa("z").propertyIsEnumerable(0)})?function(e){return V0(e)==="String"?J0(e,""):wa(e)}:wa});var wr=f((PM,Jl)=>{"use strict";Jl.exports=function(e){return e==null}});var sr=f((CM,Wl)=>{"use strict";var W0=wr(),z0=TypeError;Wl.exports=function(e){if(W0(e))throw new z0("Can't call method on "+e);return e}});var We=f((NM,zl)=>{"use strict";var Y0=Nn(),Q0=sr();zl.exports=function(e){return Y0(Q0(e))}});var Z=f((DM,Yl)=>{"use strict";var X0=X();Yl.exports=function(e){return typeof e=="object"?e!==null:X0(e)}});var ve=f((LM,Ql)=>{"use strict";Ql.exports={}});var je=f((FM,Zl)=>{"use strict";var Sa=ve(),xa=G(),Z0=X(),Xl=function(e){return Z0(e)?e:void 0};Zl.exports=function(e,r){return arguments.length<2?Xl(Sa[e])||Xl(xa[e]):Sa[e]&&Sa[e][r]||xa[e]&&xa[e][r]}});var Dn=f((jM,td)=>{"use strict";var eE=G(),ed=eE.navigator,rd=ed&&ed.userAgent;td.exports=rd?String(rd):""});var Fn=f((UM,ud)=>{"use strict";var sd=G(),Ea=Dn(),nd=sd.process,od=sd.Deno,id=nd&&nd.versions||od&&od.version,ad=id&&id.v8,Ae,Ln;ad&&(Ae=ad.split("."),Ln=Ae[0]>0&&Ae[0]<4?1:+(Ae[0]+Ae[1]));!Ln&&Ea&&(Ae=Ea.match(/Edge\/(\d+)/),(!Ae||Ae[1]>=74)&&(Ae=Ea.match(/Chrome\/(\d+)/),Ae&&(Ln=+Ae[1])));ud.exports=Ln});var Sr=f((MM,ld)=>{"use strict";var cd=Fn(),rE=U(),tE=G(),nE=tE.String;ld.exports=!!Object.getOwnPropertySymbols&&!rE(function(){var e=Symbol("symbol detection");return!nE(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&cd&&cd<41})});var Ia=f((BM,dd)=>{"use strict";var oE=Sr();dd.exports=oE&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Rt=f(($M,fd)=>{"use strict";var iE=je(),aE=X(),sE=re(),uE=Ia(),cE=Object;fd.exports=uE?function(e){return typeof e=="symbol"}:function(e){var r=iE("Symbol");return aE(r)&&sE(r.prototype,cE(e))}});var Mr=f((HM,pd)=>{"use strict";var lE=String;pd.exports=function(e){try{return lE(e)}catch(r){return"Object"}}});var xr=f((KM,md)=>{"use strict";var dE=X(),fE=Mr(),pE=TypeError;md.exports=function(e){if(dE(e))return e;throw new pE(fE(e)+" is not a function")}});var jn=f((GM,vd)=>{"use strict";var mE=xr(),vE=wr();vd.exports=function(e,r){var t=e[r];return vE(t)?void 0:mE(t)}});var gd=f((VM,hd)=>{"use strict";var Ta=Ee(),Ra=X(),Aa=Z(),hE=TypeError;hd.exports=function(e,r){var t,n;if(r==="string"&&Ra(t=e.toString)&&!Aa(n=Ta(t,e))||Ra(t=e.valueOf)&&!Aa(n=Ta(t,e))||r!=="string"&&Ra(t=e.toString)&&!Aa(n=Ta(t,e)))return n;throw new hE("Can't convert object to primitive value")}});var ur=f((JM,yd)=>{"use strict";yd.exports=!0});var wd=f((WM,bd)=>{"use strict";var _d=G(),gE=Object.defineProperty;bd.exports=function(e,r){try{gE(_d,e,{value:r,configurable:!0,writable:!0})}catch(t){_d[e]=r}return r}});var At=f((zM,Ed)=>{"use strict";var yE=ur(),_E=G(),bE=wd(),Sd="__core-js_shared__",xd=Ed.exports=_E[Sd]||bE(Sd,{});(xd.versions||(xd.versions=[])).push({version:"3.41.0",mode:yE?"pure":"global",copyright:"\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var Br=f((YM,Td)=>{"use strict";var Id=At();Td.exports=function(e,r){return Id[e]||(Id[e]=r||{})}});var cr=f((QM,Rd)=>{"use strict";var wE=sr(),SE=Object;Rd.exports=function(e){return SE(wE(e))}});var ae=f((XM,Ad)=>{"use strict";var xE=M(),EE=cr(),IE=xE({}.hasOwnProperty);Ad.exports=Object.hasOwn||function(r,t){return IE(EE(r),t)}});var qt=f((ZM,qd)=>{"use strict";var TE=M(),RE=0,AE=Math.random(),qE=TE(1 .toString);qd.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+qE(++RE+AE,36)}});var ee=f((eB,Od)=>{"use strict";var kE=G(),OE=Br(),kd=ae(),PE=qt(),CE=Sr(),NE=Ia(),$r=kE.Symbol,qa=OE("wks"),DE=NE?$r.for||$r:$r&&$r.withoutSetter||PE;Od.exports=function(e){return kd(qa,e)||(qa[e]=CE&&kd($r,e)?$r[e]:DE("Symbol."+e)),qa[e]}});var Dd=f((rB,Nd)=>{"use strict";var LE=Ee(),Pd=Z(),Cd=Rt(),FE=jn(),jE=gd(),UE=ee(),ME=TypeError,BE=UE("toPrimitive");Nd.exports=function(e,r){if(!Pd(e)||Cd(e))return e;var t=FE(e,BE),n;if(t){if(r===void 0&&(r="default"),n=LE(t,e,r),!Pd(n)||Cd(n))return n;throw new ME("Can't convert object to primitive value")}return r===void 0&&(r="number"),jE(e,r)}});var Un=f((tB,Ld)=>{"use strict";var $E=Dd(),HE=Rt();Ld.exports=function(e){var r=$E(e,"string");return HE(r)?r:r+""}});var Oa=f((nB,jd)=>{"use strict";var KE=G(),Fd=Z(),ka=KE.document,GE=Fd(ka)&&Fd(ka.createElement);jd.exports=function(e){return GE?ka.createElement(e):{}}});var Pa=f((oB,Ud)=>{"use strict";var VE=te(),JE=U(),WE=Oa();Ud.exports=!VE&&!JE(function(){return Object.defineProperty(WE("div"),"a",{get:function(){return 7}}).a!==7})});var Mn=f(Bd=>{"use strict";var zE=te(),YE=Ee(),QE=Cn(),XE=Ur(),ZE=We(),eI=Un(),rI=ae(),tI=Pa(),Md=Object.getOwnPropertyDescriptor;Bd.f=zE?Md:function(r,t){if(r=ZE(r),t=eI(t),tI)try{return Md(r,t)}catch(n){}if(rI(r,t))return XE(!YE(QE.f,r,t),r[t])}});var Hd=f((aB,$d)=>{"use strict";var nI=U(),oI=X(),iI=/#|\.prototype\./,kt=function(e,r){var t=sI[aI(e)];return t===cI?!0:t===uI?!1:oI(r)?nI(r):!!r},aI=kt.normalize=function(e){return String(e).replace(iI,".").toLowerCase()},sI=kt.data={},uI=kt.NATIVE="N",cI=kt.POLYFILL="P";$d.exports=kt});var Ot=f((sB,Gd)=>{"use strict";var Kd=Tt(),lI=xr(),dI=jr(),fI=Kd(Kd.bind);Gd.exports=function(e,r){return lI(e),r===void 0?e:dI?fI(e,r):function(){return e.apply(r,arguments)}}});var Ca=f((uB,Vd)=>{"use strict";var pI=te(),mI=U();Vd.exports=pI&&mI(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var ze=f((cB,Jd)=>{"use strict";var vI=Z(),hI=String,gI=TypeError;Jd.exports=function(e){if(vI(e))return e;throw new gI(hI(e)+" is not an object")}});var Ie=f(zd=>{"use strict";var yI=te(),_I=Pa(),bI=Ca(),Bn=ze(),Wd=Un(),wI=TypeError,Na=Object.defineProperty,SI=Object.getOwnPropertyDescriptor,Da="enumerable",La="configurable",Fa="writable";zd.f=yI?bI?function(r,t,n){if(Bn(r),t=Wd(t),Bn(n),typeof r=="function"&&t==="prototype"&&"value"in n&&Fa in n&&!n[Fa]){var o=SI(r,t);o&&o[Fa]&&(r[t]=n.value,n={configurable:La in n?n[La]:o[La],enumerable:Da in n?n[Da]:o[Da],writable:!1})}return Na(r,t,n)}:Na:function(r,t,n){if(Bn(r),t=Wd(t),Bn(n),_I)try{return Na(r,t,n)}catch(o){}if("get"in n||"set"in n)throw new wI("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var Er=f((dB,Yd)=>{"use strict";var xI=te(),EI=Ie(),II=Ur();Yd.exports=xI?function(e,r,t){return EI.f(e,r,II(1,t))}:function(e,r,t){return e[r]=t,e}});var F=f((fB,Xd)=>{"use strict";var Pt=G(),TI=On(),RI=Tt(),AI=X(),qI=Mn().f,kI=Hd(),Hr=ve(),OI=Ot(),Kr=Er(),Qd=ae();At();var PI=function(e){var r=function(t,n,o){if(this instanceof r){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,o)}return TI(e,this,arguments)};return r.prototype=e.prototype,r};Xd.exports=function(e,r){var t=e.target,n=e.global,o=e.stat,i=e.proto,a=n?Pt:o?Pt[t]:Pt[t]&&Pt[t].prototype,s=n?Hr:Hr[t]||Kr(Hr,t,{})[t],u=s.prototype,c,d,l,p,m,v,y,h,g;for(p in r)c=kI(n?p:t+(o?".":"#")+p,e.forced),d=!c&&a&&Qd(a,p),v=s[p],d&&(e.dontCallGetSet?(g=qI(a,p),y=g&&g.value):y=a[p]),m=d&&y?y:r[p],!(!c&&!i&&typeof v==typeof m)&&(e.bind&&d?h=OI(m,Pt):e.wrap&&d?h=PI(m):i&&AI(m)?h=RI(m):h=m,(e.sham||m&&m.sham||v&&v.sham)&&Kr(h,"sham",!0),Kr(s,p,h),i&&(l=t+"Prototype",Qd(Hr,l)||Kr(Hr,l,{}),Kr(Hr[l],p,m),e.real&&u&&(c||!u[p])&&Kr(u,p,m)))}});var ef=f((pB,Zd)=>{"use strict";var CI=Math.ceil,NI=Math.floor;Zd.exports=Math.trunc||function(r){var t=+r;return(t>0?NI:CI)(t)}});var Ct=f((mB,rf)=>{"use strict";var DI=ef();rf.exports=function(e){var r=+e;return r!==r||r===0?0:DI(r)}});var ja=f((vB,tf)=>{"use strict";var LI=Ct(),FI=Math.min;tf.exports=function(e){var r=LI(e);return r>0?FI(r,9007199254740991):0}});var Ir=f((hB,nf)=>{"use strict";var jI=ja();nf.exports=function(e){return jI(e.length)}});var lr=f((gB,of)=>{"use strict";var UI=Fe();of.exports=Array.isArray||function(r){return UI(r)==="Array"}});var $n=f((yB,sf)=>{"use strict";var MI=ee(),BI=MI("toStringTag"),af={};af[BI]="z";sf.exports=String(af)==="[object z]"});var Gr=f((_B,uf)=>{"use strict";var $I=$n(),HI=X(),Hn=Fe(),KI=ee(),GI=KI("toStringTag"),VI=Object,JI=Hn(function(){return arguments}())==="Arguments",WI=function(e,r){try{return e[r]}catch(t){}};uf.exports=$I?Hn:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=WI(r=VI(e),GI))=="string"?t:JI?Hn(r):(n=Hn(r))==="Object"&&HI(r.callee)?"Arguments":n}});var lf=f((bB,cf)=>{"use strict";var zI=M(),YI=X(),Ua=At(),QI=zI(Function.toString);YI(Ua.inspectSource)||(Ua.inspectSource=function(e){return QI(e)});cf.exports=Ua.inspectSource});var Ba=f((wB,vf)=>{"use strict";var XI=M(),ZI=U(),df=X(),eT=Gr(),rT=je(),tT=lf(),ff=function(){},pf=rT("Reflect","construct"),Ma=/^\s*(?:class|function)\b/,nT=XI(Ma.exec),oT=!Ma.test(ff),Nt=function(r){if(!df(r))return!1;try{return pf(ff,[],r),!0}catch(t){return!1}},mf=function(r){if(!df(r))return!1;switch(eT(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return oT||!!nT(Ma,tT(r))}catch(t){return!0}};mf.sham=!0;vf.exports=!pf||ZI(function(){var e;return Nt(Nt.call)||!Nt(Object)||!Nt(function(){e=!0})||e})?mf:Nt});var _f=f((SB,yf)=>{"use strict";var hf=lr(),iT=Ba(),aT=Z(),sT=ee(),uT=sT("species"),gf=Array;yf.exports=function(e){var r;return hf(e)&&(r=e.constructor,iT(r)&&(r===gf||hf(r.prototype))?r=void 0:aT(r)&&(r=r[uT],r===null&&(r=void 0))),r===void 0?gf:r}});var Kn=f((xB,bf)=>{"use strict";var cT=_f();bf.exports=function(e,r){return new(cT(e))(r===0?0:r)}});var Ye=f((EB,Sf)=>{"use strict";var lT=Ot(),dT=M(),fT=Nn(),pT=cr(),mT=Ir(),vT=Kn(),wf=dT([].push),dr=function(e){var r=e===1,t=e===2,n=e===3,o=e===4,i=e===6,a=e===7,s=e===5||i;return function(u,c,d,l){for(var p=pT(u),m=fT(p),v=mT(m),y=lT(c,d),h=0,g=l||vT,_=r?g(u,v):t||a?g(u,0):void 0,x,A;v>h;h++)if((s||h in m)&&(x=m[h],A=y(x,h,p),e))if(r)_[h]=A;else if(A)switch(e){case 3:return!0;case 5:return x;case 6:return h;case 2:wf(_,x)}else switch(e){case 4:return!1;case 7:wf(_,x)}return i?-1:n||o?o:_}};Sf.exports={forEach:dr(0),map:dr(1),filter:dr(2),some:dr(3),every:dr(4),find:dr(5),findIndex:dr(6),filterReject:dr(7)}});var Vr=f((IB,xf)=>{"use strict";var hT=U(),gT=ee(),yT=Fn(),_T=gT("species");xf.exports=function(e){return yT>=51||!hT(function(){var r=[],t=r.constructor={};return t[_T]=function(){return{foo:1}},r[e](Boolean).foo!==1})}});var Ef=f(()=>{"use strict";var bT=F(),wT=Ye().filter,ST=Vr(),xT=ST("filter");bT({target:"Array",proto:!0,forced:!xT},{filter:function(r){return wT(this,r,arguments.length>1?arguments[1]:void 0)}})});var he=f((AB,If)=>{"use strict";var ET=G(),IT=ve();If.exports=function(e,r){var t=IT[e+"Prototype"],n=t&&t[r];if(n)return n;var o=ET[e],i=o&&o.prototype;return i&&i[r]}});var Rf=f((qB,Tf)=>{"use strict";Ef();var TT=he();Tf.exports=TT("Array","filter")});var qf=f((kB,Af)=>{"use strict";var RT=re(),AT=Rf(),$a=Array.prototype;Af.exports=function(e){var r=e.filter;return e===$a||RT($a,e)&&r===$a.filter?AT:r}});var Of=f((OB,kf)=>{"use strict";var qT=qf();kf.exports=qT});var Cf=f((PB,Pf)=>{Pf.exports=Of()});var Dt=f((CB,Nf)=>{"use strict";var kT=U();Nf.exports=function(e,r){var t=[][e];return!!t&&kT(function(){t.call(null,r||function(){return 1},1)})}});var Df=f(()=>{"use strict";var OT=F(),PT=Ye().every,CT=Dt(),NT=CT("every");OT({target:"Array",proto:!0,forced:!NT},{every:function(r){return PT(this,r,arguments.length>1?arguments[1]:void 0)}})});var Ff=f((LB,Lf)=>{"use strict";Df();var DT=he();Lf.exports=DT("Array","every")});var Uf=f((FB,jf)=>{"use strict";var LT=re(),FT=Ff(),Ha=Array.prototype;jf.exports=function(e){var r=e.every;return e===Ha||LT(Ha,e)&&r===Ha.every?FT:r}});var Bf=f((jB,Mf)=>{"use strict";var jT=Uf();Mf.exports=jT});var Hf=f((UB,$f)=>{$f.exports=Bf()});var Gf=f((MB,Kf)=>{"use strict";var UT=Ye().forEach,MT=Dt(),BT=MT("forEach");Kf.exports=BT?[].forEach:function(r){return UT(this,r,arguments.length>1?arguments[1]:void 0)}});var Jf=f(()=>{"use strict";var $T=F(),Vf=Gf();$T({target:"Array",proto:!0,forced:[].forEach!==Vf},{forEach:Vf})});var zf=f((HB,Wf)=>{"use strict";Jf();var HT=he();Wf.exports=HT("Array","forEach")});var Qf=f((KB,Yf)=>{"use strict";var KT=zf();Yf.exports=KT});var Xf=f(()=>{});var ep=f((JB,Zf)=>{"use strict";var GT=Gr(),VT=ae(),JT=re(),WT=Qf();Xf();var Ka=Array.prototype,zT={DOMTokenList:!0,NodeList:!0};Zf.exports=function(e){var r=e.forEach;return e===Ka||JT(Ka,e)&&r===Ka.forEach||VT(zT,GT(e))?WT:r}});var tp=f((WB,rp)=>{rp.exports=ep()});var Ga=f((zB,np)=>{"use strict";var YT=TypeError,QT=9007199254740991;np.exports=function(e){if(e>QT)throw YT("Maximum allowed index exceeded");return e}});var Gn=f((YB,op)=>{"use strict";var XT=te(),ZT=Ie(),eR=Ur();op.exports=function(e,r,t){XT?ZT.f(e,r,eR(0,t)):e[r]=t}});var Va=f(()=>{"use strict";var rR=F(),tR=U(),nR=lr(),oR=Z(),iR=cr(),aR=Ir(),ip=Ga(),ap=Gn(),sR=Kn(),uR=Vr(),cR=ee(),lR=Fn(),sp=cR("isConcatSpreadable"),dR=lR>=51||!tR(function(){var e=[];return e[sp]=!1,e.concat()[0]!==e}),fR=function(e){if(!oR(e))return!1;var r=e[sp];return r!==void 0?!!r:nR(e)},pR=!dR||!uR("concat");rR({target:"Array",proto:!0,arity:1,forced:pR},{concat:function(r){var t=iR(this),n=sR(t,0),o=0,i,a,s,u,c;for(i=-1,s=arguments.length;i<s;i++)if(c=i===-1?t:arguments[i],fR(c))for(u=aR(c),ip(o+u),a=0;a<u;a++,o++)a in c&&ap(n,o,c[a]);else ip(o+1),ap(n,o++,c);return n.length=o,n}})});var cp=f((ZB,up)=>{"use strict";Va();var mR=he();up.exports=mR("Array","concat")});var dp=f((e$,lp)=>{"use strict";var vR=re(),hR=cp(),Ja=Array.prototype;lp.exports=function(e){var r=e.concat;return e===Ja||vR(Ja,e)&&r===Ja.concat?hR:r}});var pp=f((r$,fp)=>{"use strict";var gR=dp();fp.exports=gR});var vp=f((t$,mp)=>{mp.exports=pp()});var hp=f(()=>{"use strict";var yR=F(),_R=Ye().some,bR=Dt(),wR=bR("some");yR({target:"Array",proto:!0,forced:!wR},{some:function(r){return _R(this,r,arguments.length>1?arguments[1]:void 0)}})});var yp=f((i$,gp)=>{"use strict";hp();var SR=he();gp.exports=SR("Array","some")});var bp=f((a$,_p)=>{"use strict";var xR=re(),ER=yp(),Wa=Array.prototype;_p.exports=function(e){var r=e.some;return e===Wa||xR(Wa,e)&&r===Wa.some?ER:r}});var Sp=f((s$,wp)=>{"use strict";var IR=bp();wp.exports=IR});var Ep=f((u$,xp)=>{xp.exports=Sp()});var Tp=f((c$,Ip)=>{"use strict";var Lt=G(),TR=Dn(),RR=Fe(),Vn=function(e){return TR.slice(0,e.length)===e};Ip.exports=function(){return Vn("Bun/")?"BUN":Vn("Cloudflare-Workers")?"CLOUDFLARE":Vn("Deno/")?"DENO":Vn("Node.js/")?"NODE":Lt.Bun&&typeof Bun.version=="string"?"BUN":Lt.Deno&&typeof Deno.version=="object"?"DENO":RR(Lt.process)==="process"?"NODE":Lt.window&&Lt.document?"BROWSER":"REST"}()});var Jr=f((l$,Rp)=>{"use strict";var AR=M();Rp.exports=AR([].slice)});var qp=f((d$,Ap)=>{"use strict";var qR=TypeError;Ap.exports=function(e,r){if(e<r)throw new qR("Not enough arguments");return e}});var za=f((f$,Op)=>{"use strict";var kp=G(),kR=On(),OR=X(),PR=Tp(),CR=Dn(),NR=Jr(),DR=qp(),LR=kp.Function,FR=/MSIE .\./.test(CR)||PR==="BUN"&&function(){var e=kp.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}();Op.exports=function(e,r){var t=r?2:1;return FR?function(n,o){var i=DR(arguments.length,1)>t,a=OR(n)?n:LR(n),s=i?NR(arguments,t):[],u=i?function(){kR(a,this,s)}:a;return r?e(u,o):e(u)}:e}});var Np=f(()=>{"use strict";var jR=F(),Cp=G(),UR=za(),Pp=UR(Cp.setInterval,!0);jR({global:!0,bind:!0,forced:Cp.setInterval!==Pp},{setInterval:Pp})});var Fp=f(()=>{"use strict";var MR=F(),Lp=G(),BR=za(),Dp=BR(Lp.setTimeout,!0);MR({global:!0,bind:!0,forced:Lp.setTimeout!==Dp},{setTimeout:Dp})});var jp=f(()=>{"use strict";Np();Fp()});var Mp=f((_$,Up)=>{"use strict";jp();var $R=ve();Up.exports=$R.setTimeout});var $p=f((b$,Bp)=>{Bp.exports=Mp()});var Jn=f(()=>{});var fr=f((x$,Hp)=>{"use strict";var HR=Gr(),KR=String;Hp.exports=function(e){if(HR(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return KR(e)}});var Wn=f((E$,Kp)=>{"use strict";var GR=Ct(),VR=Math.max,JR=Math.min;Kp.exports=function(e,r){var t=GR(e);return t<0?VR(t+r,0):JR(t,r)}});var Ya=f((I$,Vp)=>{"use strict";var WR=We(),zR=Wn(),YR=Ir(),Gp=function(e){return function(r,t,n){var o=WR(r),i=YR(o);if(i===0)return!e&&-1;var a=zR(n,i),s;if(e&&t!==t){for(;i>a;)if(s=o[a++],s!==s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===t)return e||a||0;return!e&&-1}};Vp.exports={includes:Gp(!0),indexOf:Gp(!1)}});var Wr=f((T$,Jp)=>{"use strict";Jp.exports={}});var Xa=f((R$,zp)=>{"use strict";var QR=M(),Qa=ae(),XR=We(),ZR=Ya().indexOf,eA=Wr(),Wp=QR([].push);zp.exports=function(e,r){var t=XR(e),n=0,o=[],i;for(i in t)!Qa(eA,i)&&Qa(t,i)&&Wp(o,i);for(;r.length>n;)Qa(t,i=r[n++])&&(~ZR(o,i)||Wp(o,i));return o}});var zn=f((A$,Yp)=>{"use strict";Yp.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Yn=f((q$,Qp)=>{"use strict";var rA=Xa(),tA=zn();Qp.exports=Object.keys||function(r){return rA(r,tA)}});var Za=f(Xp=>{"use strict";var nA=te(),oA=Ca(),iA=Ie(),aA=ze(),sA=We(),uA=Yn();Xp.f=nA&&!oA?Object.defineProperties:function(r,t){aA(r);for(var n=sA(t),o=uA(t),i=o.length,a=0,s;i>a;)iA.f(r,s=o[a++],n[s]);return r}});var em=f((O$,Zp)=>{"use strict";var cA=je();Zp.exports=cA("document","documentElement")});var Ft=f((P$,tm)=>{"use strict";var lA=Br(),dA=qt(),rm=lA("keys");tm.exports=function(e){return rm[e]||(rm[e]=dA(e))}});var zr=f((C$,cm)=>{"use strict";var fA=ze(),pA=Za(),nm=zn(),mA=Wr(),vA=em(),hA=Oa(),gA=Ft(),om=">",im="<",rs="prototype",ts="script",sm=gA("IE_PROTO"),es=function(){},um=function(e){return im+ts+om+e+im+"/"+ts+om},am=function(e){e.write(um("")),e.close();var r=e.parentWindow.Object;return e=null,r},yA=function(){var e=hA("iframe"),r="java"+ts+":",t;return e.style.display="none",vA.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(um("document.F=Object")),t.close(),t.F},Qn,Xn=function(){try{Qn=new ActiveXObject("htmlfile")}catch(r){}Xn=typeof document!="undefined"?document.domain&&Qn?am(Qn):yA():am(Qn);for(var e=nm.length;e--;)delete Xn[rs][nm[e]];return Xn()};mA[sm]=!0;cm.exports=Object.create||function(r,t){var n;return r!==null?(es[rs]=fA(r),n=new es,es[rs]=null,n[sm]=r):n=Xn(),t===void 0?n:pA.f(n,t)}});var Zn=f(lm=>{"use strict";var _A=Xa(),bA=zn(),wA=bA.concat("length","prototype");lm.f=Object.getOwnPropertyNames||function(r){return _A(r,wA)}});var ns=f((D$,pm)=>{"use strict";var SA=Fe(),xA=We(),dm=Zn().f,EA=Jr(),fm=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],IA=function(e){try{return dm(e)}catch(r){return EA(fm)}};pm.exports.f=function(r){return fm&&SA(r)==="Window"?IA(r):dm(xA(r))}});var eo=f(mm=>{"use strict";mm.f=Object.getOwnPropertySymbols});var Yr=f((F$,vm)=>{"use strict";var TA=Er();vm.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:TA(e,r,t),e}});var ro=f((j$,hm)=>{"use strict";var RA=Ie();hm.exports=function(e,r,t){return RA.f(e,r,t)}});var os=f(gm=>{"use strict";var AA=ee();gm.f=AA});var de=f((M$,_m)=>{"use strict";var ym=ve(),qA=ae(),kA=os(),OA=Ie().f;_m.exports=function(e){var r=ym.Symbol||(ym.Symbol={});qA(r,e)||OA(r,e,{value:kA.f(e)})}});var is=f((B$,bm)=>{"use strict";var PA=Ee(),CA=je(),NA=ee(),DA=Yr();bm.exports=function(){var e=CA("Symbol"),r=e&&e.prototype,t=r&&r.valueOf,n=NA("toPrimitive");r&&!r[n]&&DA(r,n,function(o){return PA(t,this)},{arity:1})}});var Sm=f(($$,wm)=>{"use strict";var LA=$n(),FA=Gr();wm.exports=LA?{}.toString:function(){return"[object "+FA(this)+"]"}});var pr=f((H$,Em)=>{"use strict";var jA=$n(),UA=Ie().f,MA=Er(),BA=ae(),$A=Sm(),HA=ee(),xm=HA("toStringTag");Em.exports=function(e,r,t,n){var o=t?e:e&&e.prototype;o&&(BA(o,xm)||UA(o,xm,{configurable:!0,value:r}),n&&!jA&&MA(o,"toString",$A))}});var as=f((K$,Tm)=>{"use strict";var KA=G(),GA=X(),Im=KA.WeakMap;Tm.exports=GA(Im)&&/native code/.test(String(Im))});var mr=f((G$,qm)=>{"use strict";var VA=as(),Am=G(),JA=Z(),WA=Er(),ss=ae(),us=At(),zA=Ft(),YA=Wr(),Rm="Object already initialized",cs=Am.TypeError,QA=Am.WeakMap,to,jt,no,XA=function(e){return no(e)?jt(e):to(e,{})},ZA=function(e){return function(r){var t;if(!JA(r)||(t=jt(r)).type!==e)throw new cs("Incompatible receiver, "+e+" required");return t}};VA||us.state?(qe=us.state||(us.state=new QA),qe.get=qe.get,qe.has=qe.has,qe.set=qe.set,to=function(e,r){if(qe.has(e))throw new cs(Rm);return r.facade=e,qe.set(e,r),r},jt=function(e){return qe.get(e)||{}},no=function(e){return qe.has(e)}):(Tr=zA("state"),YA[Tr]=!0,to=function(e,r){if(ss(e,Tr))throw new cs(Rm);return r.facade=e,WA(e,Tr,r),r},jt=function(e){return ss(e,Tr)?e[Tr]:{}},no=function(e){return ss(e,Tr)});var qe,Tr;qm.exports={set:to,get:jt,has:no,enforce:XA,getterFor:ZA}});var Vm=f(()=>{"use strict";var oo=F(),Bt=G(),ys=Ee(),eq=M(),rq=ur(),Qr=te(),Xr=Sr(),tq=U(),ne=ae(),nq=re(),ps=ze(),io=We(),_s=Un(),oq=fr(),ms=Ur(),Zr=zr(),Pm=Yn(),iq=Zn(),Cm=ns(),aq=eo(),Nm=Mn(),Dm=Ie(),sq=Za(),Lm=Cn(),ls=Yr(),uq=ro(),bs=Br(),cq=Ft(),Fm=Wr(),km=qt(),lq=ee(),dq=os(),fq=de(),pq=is(),mq=pr(),jm=mr(),ao=Ye().forEach,ge=cq("hidden"),so="Symbol",Mt="prototype",vq=jm.set,Om=jm.getterFor(so),Te=Object[Mt],Rr=Bt.Symbol,Ut=Rr&&Rr[Mt],hq=Bt.RangeError,gq=Bt.TypeError,ds=Bt.QObject,Um=Nm.f,Ar=Dm.f,Mm=Cm.f,yq=Lm.f,Bm=eq([].push),Qe=bs("symbols"),$t=bs("op-symbols"),_q=bs("wks"),vs=!ds||!ds[Mt]||!ds[Mt].findChild,$m=function(e,r,t){var n=Um(Te,r);n&&delete Te[r],Ar(e,r,t),n&&e!==Te&&Ar(Te,r,n)},hs=Qr&&tq(function(){return Zr(Ar({},"a",{get:function(){return Ar(this,"a",{value:7}).a}})).a!==7})?$m:Ar,fs=function(e,r){var t=Qe[e]=Zr(Ut);return vq(t,{type:so,tag:e,description:r}),Qr||(t.description=r),t},uo=function(r,t,n){r===Te&&uo($t,t,n),ps(r);var o=_s(t);return ps(n),ne(Qe,o)?(n.enumerable?(ne(r,ge)&&r[ge][o]&&(r[ge][o]=!1),n=Zr(n,{enumerable:ms(0,!1)})):(ne(r,ge)||Ar(r,ge,ms(1,Zr(null))),r[ge][o]=!0),hs(r,o,n)):Ar(r,o,n)},ws=function(r,t){ps(r);var n=io(t),o=Pm(n).concat(Gm(n));return ao(o,function(i){(!Qr||ys(gs,n,i))&&uo(r,i,n[i])}),r},bq=function(r,t){return t===void 0?Zr(r):ws(Zr(r),t)},gs=function(r){var t=_s(r),n=ys(yq,this,t);return this===Te&&ne(Qe,t)&&!ne($t,t)?!1:n||!ne(this,t)||!ne(Qe,t)||ne(this,ge)&&this[ge][t]?n:!0},Hm=function(r,t){var n=io(r),o=_s(t);if(!(n===Te&&ne(Qe,o)&&!ne($t,o))){var i=Um(n,o);return i&&ne(Qe,o)&&!(ne(n,ge)&&n[ge][o])&&(i.enumerable=!0),i}},Km=function(r){var t=Mm(io(r)),n=[];return ao(t,function(o){!ne(Qe,o)&&!ne(Fm,o)&&Bm(n,o)}),n},Gm=function(e){var r=e===Te,t=Mm(r?$t:io(e)),n=[];return ao(t,function(o){ne(Qe,o)&&(!r||ne(Te,o))&&Bm(n,Qe[o])}),n};Xr||(Rr=function(){if(nq(Ut,this))throw new gq("Symbol is not a constructor");var r=!arguments.length||arguments[0]===void 0?void 0:oq(arguments[0]),t=km(r),n=function(o){var i=this===void 0?Bt:this;i===Te&&ys(n,$t,o),ne(i,ge)&&ne(i[ge],t)&&(i[ge][t]=!1);var a=ms(1,o);try{hs(i,t,a)}catch(s){if(!(s instanceof hq))throw s;$m(i,t,a)}};return Qr&&vs&&hs(Te,t,{configurable:!0,set:n}),fs(t,r)},Ut=Rr[Mt],ls(Ut,"toString",function(){return Om(this).tag}),ls(Rr,"withoutSetter",function(e){return fs(km(e),e)}),Lm.f=gs,Dm.f=uo,sq.f=ws,Nm.f=Hm,iq.f=Cm.f=Km,aq.f=Gm,dq.f=function(e){return fs(lq(e),e)},Qr&&(uq(Ut,"description",{configurable:!0,get:function(){return Om(this).description}}),rq||ls(Te,"propertyIsEnumerable",gs,{unsafe:!0})));oo({global:!0,constructor:!0,wrap:!0,forced:!Xr,sham:!Xr},{Symbol:Rr});ao(Pm(_q),function(e){fq(e)});oo({target:so,stat:!0,forced:!Xr},{useSetter:function(){vs=!0},useSimple:function(){vs=!1}});oo({target:"Object",stat:!0,forced:!Xr,sham:!Qr},{create:bq,defineProperty:uo,defineProperties:ws,getOwnPropertyDescriptor:Hm});oo({target:"Object",stat:!0,forced:!Xr},{getOwnPropertyNames:Km});pq();mq(Rr,so);Fm[ge]=!0});var Ss=f((W$,Jm)=>{"use strict";var wq=Sr();Jm.exports=wq&&!!Symbol.for&&!!Symbol.keyFor});var zm=f(()=>{"use strict";var Sq=F(),xq=je(),Eq=ae(),Iq=fr(),Wm=Br(),Tq=Ss(),xs=Wm("string-to-symbol-registry"),Rq=Wm("symbol-to-string-registry");Sq({target:"Symbol",stat:!0,forced:!Tq},{for:function(e){var r=Iq(e);if(Eq(xs,r))return xs[r];var t=xq("Symbol")(r);return xs[r]=t,Rq[t]=r,t}})});var Qm=f(()=>{"use strict";var Aq=F(),qq=ae(),kq=Rt(),Oq=Mr(),Pq=Br(),Cq=Ss(),Ym=Pq("symbol-to-string-registry");Aq({target:"Symbol",stat:!0,forced:!Cq},{keyFor:function(r){if(!kq(r))throw new TypeError(Oq(r)+" is not a symbol");if(qq(Ym,r))return Ym[r]}})});var tv=f((Z$,rv)=>{"use strict";var Nq=M(),Xm=lr(),Dq=X(),Zm=Fe(),Lq=fr(),ev=Nq([].push);rv.exports=function(e){if(Dq(e))return e;if(Xm(e)){for(var r=e.length,t=[],n=0;n<r;n++){var o=e[n];typeof o=="string"?ev(t,o):(typeof o=="number"||Zm(o)==="Number"||Zm(o)==="String")&&ev(t,Lq(o))}var i=t.length,a=!0;return function(s,u){if(a)return a=!1,u;if(Xm(this))return u;for(var c=0;c<i;c++)if(t[c]===s)return u}}}});var mv=f(()=>{"use strict";var Fq=F(),lv=je(),dv=On(),jq=Ee(),Ht=M(),fv=U(),nv=X(),ov=Rt(),pv=Jr(),Uq=tv(),Mq=Sr(),Bq=String,vr=lv("JSON","stringify"),co=Ht(/./.exec),iv=Ht("".charAt),$q=Ht("".charCodeAt),Hq=Ht("".replace),Kq=Ht(1 .toString),Gq=/[\uD800-\uDFFF]/g,av=/^[\uD800-\uDBFF]$/,sv=/^[\uDC00-\uDFFF]$/,uv=!Mq||fv(function(){var e=lv("Symbol")("stringify detection");return vr([e])!=="[null]"||vr({a:e})!=="{}"||vr(Object(e))!=="{}"}),cv=fv(function(){return vr("\uDF06\uD834")!=='"\\udf06\\ud834"'||vr("\uDEAD")!=='"\\udead"'}),Vq=function(e,r){var t=pv(arguments),n=Uq(r);if(!(!nv(n)&&(e===void 0||ov(e))))return t[1]=function(o,i){if(nv(n)&&(i=jq(n,this,Bq(o),i)),!ov(i))return i},dv(vr,null,t)},Jq=function(e,r,t){var n=iv(t,r-1),o=iv(t,r+1);return co(av,e)&&!co(sv,o)||co(sv,e)&&!co(av,n)?"\\u"+Kq($q(e,0),16):e};vr&&Fq({target:"JSON",stat:!0,arity:3,forced:uv||cv},{stringify:function(r,t,n){var o=pv(arguments),i=dv(uv?Vq:vr,null,o);return cv&&typeof i=="string"?Hq(i,Gq,Jq):i}})});var hv=f(()=>{"use strict";var Wq=F(),zq=Sr(),Yq=U(),vv=eo(),Qq=cr(),Xq=!zq||Yq(function(){vv.f(1)});Wq({target:"Object",stat:!0,forced:Xq},{getOwnPropertySymbols:function(r){var t=vv.f;return t?t(Qq(r)):[]}})});var Es=f(()=>{"use strict";Vm();zm();Qm();mv();hv()});var gv=f(()=>{"use strict";var Zq=de();Zq("asyncIterator")});var yv=f(()=>{});var _v=f(()=>{"use strict";var ek=de();ek("hasInstance")});var bv=f(()=>{"use strict";var rk=de();rk("isConcatSpreadable")});var wv=f(()=>{"use strict";var tk=de();tk("iterator")});var Sv=f(()=>{"use strict";var nk=de();nk("match")});var xv=f(()=>{"use strict";var ok=de();ok("matchAll")});var Ev=f(()=>{"use strict";var ik=de();ik("replace")});var Iv=f(()=>{"use strict";var ak=de();ak("search")});var Tv=f(()=>{"use strict";var sk=de();sk("species")});var Rv=f(()=>{"use strict";var uk=de();uk("split")});var Av=f(()=>{"use strict";var ck=de(),lk=is();ck("toPrimitive");lk()});var qv=f(()=>{"use strict";var dk=je(),fk=de(),pk=pr();fk("toStringTag");pk(dk("Symbol"),"Symbol")});var kv=f(()=>{"use strict";var mk=de();mk("unscopables")});var Ov=f(()=>{"use strict";var vk=G(),hk=pr();hk(vk.JSON,"JSON",!0)});var Pv=f(()=>{});var Cv=f(()=>{});var Dv=f((M2,Nv)=>{"use strict";Va();Jn();Es();gv();yv();_v();bv();wv();Sv();xv();Ev();Iv();Tv();Rv();Av();qv();kv();Ov();Pv();Cv();var gk=ve();Nv.exports=gk.Symbol});var Fv=f((B2,Lv)=>{"use strict";Lv.exports=function(){}});var qr=f(($2,jv)=>{"use strict";jv.exports={}});var Rs=f((H2,Mv)=>{"use strict";var Is=te(),yk=ae(),Uv=Function.prototype,_k=Is&&Object.getOwnPropertyDescriptor,Ts=yk(Uv,"name"),bk=Ts&&(function(){}).name==="something",wk=Ts&&(!Is||Is&&_k(Uv,"name").configurable);Mv.exports={EXISTS:Ts,PROPER:bk,CONFIGURABLE:wk}});var $v=f((K2,Bv)=>{"use strict";var Sk=U();Bv.exports=!Sk(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var qs=f((G2,Kv)=>{"use strict";var xk=ae(),Ek=X(),Ik=cr(),Tk=Ft(),Rk=$v(),Hv=Tk("IE_PROTO"),As=Object,Ak=As.prototype;Kv.exports=Rk?As.getPrototypeOf:function(e){var r=Ik(e);if(xk(r,Hv))return r[Hv];var t=r.constructor;return Ek(t)&&r instanceof t?t.prototype:r instanceof As?Ak:null}});var Cs=f((V2,Jv)=>{"use strict";var qk=U(),kk=X(),Ok=Z(),Pk=zr(),Gv=qs(),Ck=Yr(),Nk=ee(),Dk=ur(),Ps=Nk("iterator"),Vv=!1,Xe,ks,Os;[].keys&&(Os=[].keys(),"next"in Os?(ks=Gv(Gv(Os)),ks!==Object.prototype&&(Xe=ks)):Vv=!0);var Lk=!Ok(Xe)||qk(function(){var e={};return Xe[Ps].call(e)!==e});Lk?Xe={}:Dk&&(Xe=Pk(Xe));kk(Xe[Ps])||Ck(Xe,Ps,function(){return this});Jv.exports={IteratorPrototype:Xe,BUGGY_SAFARI_ITERATORS:Vv}});var zv=f((J2,Wv)=>{"use strict";var Fk=Cs().IteratorPrototype,jk=zr(),Uk=Ur(),Mk=pr(),Bk=qr(),$k=function(){return this};Wv.exports=function(e,r,t,n){var o=r+" Iterator";return e.prototype=jk(Fk,{next:Uk(+!n,t)}),Mk(e,o,!1,!0),Bk[o]=$k,e}});var Qv=f((W2,Yv)=>{"use strict";var Hk=M(),Kk=xr();Yv.exports=function(e,r,t){try{return Hk(Kk(Object.getOwnPropertyDescriptor(e,r)[t]))}catch(n){}}});var Zv=f((z2,Xv)=>{"use strict";var Gk=Z();Xv.exports=function(e){return Gk(e)||e===null}});var rh=f((Y2,eh)=>{"use strict";var Vk=Zv(),Jk=String,Wk=TypeError;eh.exports=function(e){if(Vk(e))return e;throw new Wk("Can't set "+Jk(e)+" as a prototype")}});var nh=f((Q2,th)=>{"use strict";var zk=Qv(),Yk=Z(),Qk=sr(),Xk=rh();th.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=zk(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch(n){}return function(o,i){return Qk(o),Xk(i),Yk(o)&&(e?t(o,i):o.__proto__=i),o}}():void 0)});var po=f((X2,ph)=>{"use strict";var Zk=F(),eO=Ee(),lo=ur(),dh=Rs(),rO=X(),tO=zv(),oh=qs(),ih=nh(),nO=pr(),oO=Er(),Ns=Yr(),iO=ee(),ah=qr(),fh=Cs(),aO=dh.PROPER,sO=dh.CONFIGURABLE,sh=fh.IteratorPrototype,fo=fh.BUGGY_SAFARI_ITERATORS,Kt=iO("iterator"),uh="keys",Gt="values",ch="entries",lh=function(){return this};ph.exports=function(e,r,t,n,o,i,a){tO(t,r,n);var s=function(g){if(g===o&&p)return p;if(!fo&&g&&g in d)return d[g];switch(g){case uh:return function(){return new t(this,g)};case Gt:return function(){return new t(this,g)};case ch:return function(){return new t(this,g)}}return function(){return new t(this)}},u=r+" Iterator",c=!1,d=e.prototype,l=d[Kt]||d["@@iterator"]||o&&d[o],p=!fo&&l||s(o),m=r==="Array"&&d.entries||l,v,y,h;if(m&&(v=oh(m.call(new e)),v!==Object.prototype&&v.next&&(!lo&&oh(v)!==sh&&(ih?ih(v,sh):rO(v[Kt])||Ns(v,Kt,lh)),nO(v,u,!0,!0),lo&&(ah[u]=lh))),aO&&o===Gt&&l&&l.name!==Gt&&(!lo&&sO?oO(d,"name",Gt):(c=!0,p=function(){return eO(l,this)})),o)if(y={values:s(Gt),keys:i?p:s(uh),entries:s(ch)},a)for(h in y)(fo||c||!(h in d))&&Ns(d,h,y[h]);else Zk({target:r,proto:!0,forced:fo||c},y);return(!lo||a)&&d[Kt]!==p&&Ns(d,Kt,p,{name:o}),ah[r]=p,y}});var mo=f((Z2,mh)=>{"use strict";mh.exports=function(e,r){return{value:e,done:r}}});var ho=f((eH,_h)=>{"use strict";var uO=We(),Ds=Fv(),vh=qr(),gh=mr(),cO=Ie().f,lO=po(),vo=mo(),dO=ur(),fO=te(),yh="Array Iterator",pO=gh.set,mO=gh.getterFor(yh);_h.exports=lO(Array,"Array",function(e,r){pO(this,{type:yh,target:uO(e),index:0,kind:r})},function(){var e=mO(this),r=e.target,t=e.index++;if(!r||t>=r.length)return e.target=null,vo(void 0,!0);switch(e.kind){case"keys":return vo(t,!1);case"values":return vo(r[t],!1)}return vo([t,r[t]],!1)},"values");var hh=vh.Arguments=vh.Array;Ds("keys");Ds("values");Ds("entries");if(!dO&&fO&&hh.name!=="values")try{cO(hh,"name",{value:"values"})}catch(e){}});var wh=f((rH,bh)=>{"use strict";bh.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}});var yo=f(()=>{"use strict";ho();var vO=wh(),hO=G(),gO=pr(),Sh=qr();for(go in vO)gO(hO[go],go),Sh[go]=Sh.Array;var go});var Eh=f((oH,xh)=>{"use strict";var yO=Dv();yo();xh.exports=yO});var Th=f((iH,Ih)=>{Ih.exports=Eh()});var Ah=f((aH,Rh)=>{"use strict";Es();var _O=ve();Rh.exports=_O.Symbol.for});var kh=f((sH,qh)=>{"use strict";var bO=Ah();qh.exports=bO});var Ph=f((uH,Oh)=>{Oh.exports=kh()});var Ch=f(()=>{"use strict";var wO=F(),SO=Ye().map,xO=Vr(),EO=xO("map");wO({target:"Array",proto:!0,forced:!EO},{map:function(r){return SO(this,r,arguments.length>1?arguments[1]:void 0)}})});var Dh=f((dH,Nh)=>{"use strict";Ch();var IO=he();Nh.exports=IO("Array","map")});var Fh=f((fH,Lh)=>{"use strict";var TO=re(),RO=Dh(),Ls=Array.prototype;Lh.exports=function(e){var r=e.map;return e===Ls||TO(Ls,e)&&r===Ls.map?RO:r}});var Uh=f((pH,jh)=>{"use strict";var AO=Fh();jh.exports=AO});var Bh=f((mH,Mh)=>{Mh.exports=Uh()});var Hh=f((vH,$h)=>{"use strict";var qO=te(),kO=lr(),OO=TypeError,PO=Object.getOwnPropertyDescriptor,CO=qO&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();$h.exports=CO?function(e,r){if(kO(e)&&!PO(e,"length").writable)throw new OO("Cannot set read only .length");return e.length=r}:function(e,r){return e.length=r}});var Vh=f((hH,Gh)=>{"use strict";var Kh=Mr(),NO=TypeError;Gh.exports=function(e,r){if(!delete e[r])throw new NO("Cannot delete property "+Kh(r)+" of "+Kh(e))}});var Jh=f(()=>{"use strict";var DO=F(),LO=cr(),FO=Wn(),jO=Ct(),UO=Ir(),MO=Hh(),BO=Ga(),$O=Kn(),HO=Gn(),Fs=Vh(),KO=Vr(),GO=KO("splice"),VO=Math.max,JO=Math.min;DO({target:"Array",proto:!0,forced:!GO},{splice:function(r,t){var n=LO(this),o=UO(n),i=FO(r,o),a=arguments.length,s,u,c,d,l,p;for(a===0?s=u=0:a===1?(s=0,u=o-i):(s=a-2,u=JO(VO(jO(t),0),o-i)),BO(o+s-u),c=$O(n,u),d=0;d<u;d++)l=i+d,l in n&&HO(c,d,n[l]);if(c.length=u,s<u){for(d=i;d<o-u;d++)l=d+u,p=d+s,l in n?n[p]=n[l]:Fs(n,p);for(d=o;d>o-u+s;d--)Fs(n,d-1)}else if(s>u)for(d=o-u;d>i;d--)l=d+u-1,p=d+s-1,l in n?n[p]=n[l]:Fs(n,p);for(d=0;d<s;d++)n[d+i]=arguments[d+2];return MO(n,o-u+s),c}})});var zh=f((_H,Wh)=>{"use strict";Jh();var WO=he();Wh.exports=WO("Array","splice")});var Qh=f((bH,Yh)=>{"use strict";var zO=re(),YO=zh(),js=Array.prototype;Yh.exports=function(e){var r=e.splice;return e===js||zO(js,e)&&r===js.splice?YO:r}});var Zh=f((wH,Xh)=>{"use strict";var QO=Qh();Xh.exports=QO});var rg=f((SH,eg)=>{eg.exports=Zh()});var ng=f(()=>{"use strict";var XO=F(),ZO=Tt(),eP=Ya().indexOf,rP=Dt(),Us=ZO([].indexOf),tg=!!Us&&1/Us([1],1,-0)<0,tP=tg||!rP("indexOf");XO({target:"Array",proto:!0,forced:tP},{indexOf:function(r){var t=arguments.length>1?arguments[1]:void 0;return tg?Us(this,r,t)||0:eP(this,r,t)}})});var ig=f((IH,og)=>{"use strict";ng();var nP=he();og.exports=nP("Array","indexOf")});var sg=f((TH,ag)=>{"use strict";var oP=re(),iP=ig(),Ms=Array.prototype;ag.exports=function(e){var r=e.indexOf;return e===Ms||oP(Ms,e)&&r===Ms.indexOf?iP:r}});var cg=f((RH,ug)=>{"use strict";var aP=sg();ug.exports=aP});var dg=f((AH,lg)=>{lg.exports=cg()});var pg=f((qH,fg)=>{"use strict";var sP=U();fg.exports=sP(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})});var hg=f((kH,vg)=>{"use strict";var uP=U(),cP=Z(),lP=Fe(),mg=pg(),_o=Object.isExtensible,dP=uP(function(){_o(1)});vg.exports=dP||mg?function(r){return!cP(r)||mg&&lP(r)==="ArrayBuffer"?!1:_o?_o(r):!0}:_o});var Bs=f((OH,gg)=>{"use strict";var fP=U();gg.exports=!fP(function(){return Object.isExtensible(Object.preventExtensions({}))})});var Vt=f((PH,bg)=>{"use strict";var pP=F(),mP=M(),vP=Wr(),hP=Z(),$s=ae(),gP=Ie().f,yg=Zn(),yP=ns(),Hs=hg(),_P=qt(),bP=Bs(),_g=!1,Ze=_P("meta"),wP=0,Ks=function(e){gP(e,Ze,{value:{objectID:"O"+wP++,weakData:{}}})},SP=function(e,r){if(!hP(e))return typeof e=="symbol"?e:(typeof e=="string"?"S":"P")+e;if(!$s(e,Ze)){if(!Hs(e))return"F";if(!r)return"E";Ks(e)}return e[Ze].objectID},xP=function(e,r){if(!$s(e,Ze)){if(!Hs(e))return!0;if(!r)return!1;Ks(e)}return e[Ze].weakData},EP=function(e){return bP&&_g&&Hs(e)&&!$s(e,Ze)&&Ks(e),e},IP=function(){TP.enable=function(){},_g=!0;var e=yg.f,r=mP([].splice),t={};t[Ze]=1,e(t).length&&(yg.f=function(n){for(var o=e(n),i=0,a=o.length;i<a;i++)if(o[i]===Ze){r(o,i,1);break}return o},pP({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:yP.f}))},TP=bg.exports={enable:IP,fastKey:SP,getWeakData:xP,onFreeze:EP};vP[Ze]=!0});var Sg=f((CH,wg)=>{"use strict";var RP=ee(),AP=qr(),qP=RP("iterator"),kP=Array.prototype;wg.exports=function(e){return e!==void 0&&(AP.Array===e||kP[qP]===e)}});var Gs=f((NH,Eg)=>{"use strict";var OP=Gr(),xg=jn(),PP=wr(),CP=qr(),NP=ee(),DP=NP("iterator");Eg.exports=function(e){if(!PP(e))return xg(e,DP)||xg(e,"@@iterator")||CP[OP(e)]}});var Tg=f((DH,Ig)=>{"use strict";var LP=Ee(),FP=xr(),jP=ze(),UP=Mr(),MP=Gs(),BP=TypeError;Ig.exports=function(e,r){var t=arguments.length<2?MP(e):r;if(FP(t))return jP(LP(t,e));throw new BP(UP(e)+" is not iterable")}});var qg=f((LH,Ag)=>{"use strict";var $P=Ee(),Rg=ze(),HP=jn();Ag.exports=function(e,r,t){var n,o;Rg(e);try{if(n=HP(e,"return"),!n){if(r==="throw")throw t;return t}n=$P(n,e)}catch(i){o=!0,n=i}if(r==="throw")throw t;if(o)throw n;return Rg(n),t}});var Jt=f((FH,Cg)=>{"use strict";var KP=Ot(),GP=Ee(),VP=ze(),JP=Mr(),WP=Sg(),zP=Ir(),kg=re(),YP=Tg(),QP=Gs(),Og=qg(),XP=TypeError,bo=function(e,r){this.stopped=e,this.result=r},Pg=bo.prototype;Cg.exports=function(e,r,t){var n=t&&t.that,o=!!(t&&t.AS_ENTRIES),i=!!(t&&t.IS_RECORD),a=!!(t&&t.IS_ITERATOR),s=!!(t&&t.INTERRUPTED),u=KP(r,n),c,d,l,p,m,v,y,h=function(_){return c&&Og(c,"normal",_),new bo(!0,_)},g=function(_){return o?(VP(_),s?u(_[0],_[1],h):u(_[0],_[1])):s?u(_,h):u(_)};if(i)c=e.iterator;else if(a)c=e;else{if(d=QP(e),!d)throw new XP(JP(e)+" is not iterable");if(WP(d)){for(l=0,p=zP(e);p>l;l++)if(m=g(e[l]),m&&kg(Pg,m))return m;return new bo(!1)}c=YP(e,d)}for(v=i?e.next:c.next;!(y=GP(v,c)).done;){try{m=g(y.value)}catch(_){Og(c,"throw",_)}if(typeof m=="object"&&m&&kg(Pg,m))return m}return new bo(!1)}});var wo=f((jH,Ng)=>{"use strict";var ZP=re(),e1=TypeError;Ng.exports=function(e,r){if(ZP(r,e))return e;throw new e1("Incorrect invocation")}});var Vs=f((UH,Lg)=>{"use strict";var r1=F(),t1=G(),n1=Vt(),o1=U(),i1=Er(),a1=Jt(),s1=wo(),u1=X(),c1=Z(),l1=wr(),d1=pr(),f1=Ie().f,p1=Ye().forEach,m1=te(),Dg=mr(),v1=Dg.set,h1=Dg.getterFor;Lg.exports=function(e,r,t){var n=e.indexOf("Map")!==-1,o=e.indexOf("Weak")!==-1,i=n?"set":"add",a=t1[e],s=a&&a.prototype,u={},c;if(!m1||!u1(a)||!(o||s.forEach&&!o1(function(){new a().entries().next()})))c=t.getConstructor(r,e,n,i),n1.enable();else{c=r(function(p,m){v1(s1(p,d),{type:e,collection:new a}),l1(m)||a1(m,p[i],{that:p,AS_ENTRIES:n})});var d=c.prototype,l=h1(e);p1(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(p){var m=p==="add"||p==="set";p in s&&!(o&&p==="clear")&&i1(d,p,function(v,y){var h=l(this).collection;if(!m&&o&&!c1(v))return p==="get"?void 0:!1;var g=h[p](v===0?0:v,y);return m?this:g})}),o||f1(d,"size",{configurable:!0,get:function(){return l(this).collection.size}})}return d1(c,e,!1,!0),u[e]=c,r1({global:!0,forced:!0},u),o||t.setStrong(c,e,n),c}});var So=f((MH,Fg)=>{"use strict";var g1=Yr();Fg.exports=function(e,r,t){for(var n in r)t&&t.unsafe&&e[n]?e[n]=r[n]:g1(e,n,r[n],t);return e}});var Mg=f((BH,Ug)=>{"use strict";var y1=je(),_1=ro(),b1=ee(),w1=te(),jg=b1("species");Ug.exports=function(e){var r=y1(e);w1&&r&&!r[jg]&&_1(r,jg,{configurable:!0,get:function(){return this}})}});var Jg=f(($H,Vg)=>{"use strict";var Bg=zr(),S1=ro(),$g=So(),x1=Ot(),E1=wo(),I1=wr(),T1=Jt(),R1=po(),xo=mo(),A1=Mg(),Wt=te(),Hg=Vt().fastKey,Gg=mr(),Kg=Gg.set,Js=Gg.getterFor;Vg.exports={getConstructor:function(e,r,t,n){var o=e(function(c,d){E1(c,i),Kg(c,{type:r,index:Bg(null),first:null,last:null,size:0}),Wt||(c.size=0),I1(d)||T1(d,c[n],{that:c,AS_ENTRIES:t})}),i=o.prototype,a=Js(r),s=function(c,d,l){var p=a(c),m=u(c,d),v,y;return m?m.value=l:(p.last=m={index:y=Hg(d,!0),key:d,value:l,previous:v=p.last,next:null,removed:!1},p.first||(p.first=m),v&&(v.next=m),Wt?p.size++:c.size++,y!=="F"&&(p.index[y]=m)),c},u=function(c,d){var l=a(c),p=Hg(d),m;if(p!=="F")return l.index[p];for(m=l.first;m;m=m.next)if(m.key===d)return m};return $g(i,{clear:function(){for(var d=this,l=a(d),p=l.first;p;)p.removed=!0,p.previous&&(p.previous=p.previous.next=null),p=p.next;l.first=l.last=null,l.index=Bg(null),Wt?l.size=0:d.size=0},delete:function(c){var d=this,l=a(d),p=u(d,c);if(p){var m=p.next,v=p.previous;delete l.index[p.index],p.removed=!0,v&&(v.next=m),m&&(m.previous=v),l.first===p&&(l.first=m),l.last===p&&(l.last=v),Wt?l.size--:d.size--}return!!p},forEach:function(d){for(var l=a(this),p=x1(d,arguments.length>1?arguments[1]:void 0),m;m=m?m.next:l.first;)for(p(m.value,m.key,this);m&&m.removed;)m=m.previous},has:function(d){return!!u(this,d)}}),$g(i,t?{get:function(d){var l=u(this,d);return l&&l.value},set:function(d,l){return s(this,d===0?0:d,l)}}:{add:function(d){return s(this,d=d===0?0:d,d)}}),Wt&&S1(i,"size",{configurable:!0,get:function(){return a(this).size}}),o},setStrong:function(e,r,t){var n=r+" Iterator",o=Js(r),i=Js(n);R1(e,r,function(a,s){Kg(this,{type:n,target:a,state:o(a),kind:s,last:null})},function(){for(var a=i(this),s=a.kind,u=a.last;u&&u.removed;)u=u.previous;return!a.target||!(a.last=u=u?u.next:a.state.first)?(a.target=null,xo(void 0,!0)):xo(s==="keys"?u.key:s==="values"?u.value:[u.key,u.value],!1)},t?"entries":"values",!t,!0),A1(r)}}});var Wg=f(()=>{"use strict";var q1=Vs(),k1=Jg();q1("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},k1)});var zg=f(()=>{"use strict";Wg()});var Qg=f((JH,Yg)=>{"use strict";Yg.exports=function(e,r){return r===1?function(t,n){return t[e](n)}:function(t,n,o){return t[e](n,o)}}});var ey=f((WH,Zg)=>{"use strict";var O1=je(),Eo=Qg(),Xg=O1("Map");Zg.exports={Map:Xg,set:Eo("set",2),get:Eo("get",1),has:Eo("has",1),remove:Eo("delete",1),proto:Xg.prototype}});var ny=f(()=>{"use strict";var P1=F(),C1=M(),N1=xr(),D1=sr(),L1=Jt(),Io=ey(),ry=ur(),F1=U(),ty=Io.Map,j1=Io.has,U1=Io.get,M1=Io.set,B1=C1([].push),$1=ry||F1(function(){return ty.groupBy("ab",function(e){return e}).get("a").length!==1});P1({target:"Map",stat:!0,forced:ry||$1},{groupBy:function(r,t){D1(r),N1(t);var n=new ty,o=0;return L1(r,function(i){var a=t(i,o++);j1(n,a)?B1(U1(n,a),i):M1(n,a,[i])}),n}})});var sy=f((QH,ay)=>{"use strict";var Ws=M(),H1=Ct(),K1=fr(),G1=sr(),V1=Ws("".charAt),oy=Ws("".charCodeAt),J1=Ws("".slice),iy=function(e){return function(r,t){var n=K1(G1(r)),o=H1(t),i=n.length,a,s;return o<0||o>=i?e?"":void 0:(a=oy(n,o),a<55296||a>56319||o+1===i||(s=oy(n,o+1))<56320||s>57343?e?V1(n,o):a:e?J1(n,o,o+2):(a-55296<<10)+(s-56320)+65536)}};ay.exports={codeAt:iy(!1),charAt:iy(!0)}});var dy=f(()=>{"use strict";var W1=sy().charAt,z1=fr(),cy=mr(),Y1=po(),uy=mo(),ly="String Iterator",Q1=cy.set,X1=cy.getterFor(ly);Y1(String,"String",function(e){Q1(this,{type:ly,string:z1(e),index:0})},function(){var r=X1(this),t=r.string,n=r.index,o;return n>=t.length?uy(void 0,!0):(o=W1(t,n),r.index+=o.length,uy(o,!1))})});var py=f((eK,fy)=>{"use strict";ho();zg();ny();Jn();dy();var Z1=ve();fy.exports=Z1.Map});var vy=f((rK,my)=>{"use strict";var eC=py();yo();my.exports=eC});var gy=f((tK,hy)=>{hy.exports=vy()});var _y=f(()=>{"use strict";var rC=F(),tC=M(),nC=lr(),oC=tC([].reverse),yy=[1,2];rC({target:"Array",proto:!0,forced:String(yy)===String(yy.reverse())},{reverse:function(){return nC(this)&&(this.length=this.length),oC(this)}})});var wy=f((iK,by)=>{"use strict";_y();var iC=he();by.exports=iC("Array","reverse")});var xy=f((aK,Sy)=>{"use strict";var aC=re(),sC=wy(),zs=Array.prototype;Sy.exports=function(e){var r=e.reverse;return e===zs||aC(zs,e)&&r===zs.reverse?sC:r}});var Iy=f((sK,Ey)=>{"use strict";var uC=xy();Ey.exports=uC});var Ry=f((uK,Ty)=>{Ty.exports=Iy()});var qy=f(()=>{"use strict";var cC=F(),lC=te(),Ay=Ie().f;cC({target:"Object",stat:!0,forced:Object.defineProperty!==Ay,sham:!lC},{defineProperty:Ay})});var Py=f((dK,Oy)=>{"use strict";qy();var dC=ve(),ky=dC.Object,fC=Oy.exports=function(r,t,n){return ky.defineProperty(r,t,n)};ky.defineProperty.sham&&(fC.sham=!0)});var Ny=f((fK,Cy)=>{"use strict";var pC=Py();Cy.exports=pC});var Ly=f((pK,Dy)=>{Dy.exports=Ny()});var Fy=f(()=>{"use strict";var mC=F(),vC=lr();mC({target:"Array",stat:!0},{isArray:vC})});var Uy=f((hK,jy)=>{"use strict";Fy();var hC=ve();jy.exports=hC.Array.isArray});var By=f((gK,My)=>{"use strict";var gC=Uy();My.exports=gC});var Hy=f((yK,$y)=>{$y.exports=By()});var Wy=f((_K,Jy)=>{"use strict";var Gy=M(),yC=xr(),_C=Z(),bC=ae(),Ky=Jr(),wC=jr(),Vy=Function,SC=Gy([].concat),xC=Gy([].join),Ys={},EC=function(e,r,t){if(!bC(Ys,r)){for(var n=[],o=0;o<r;o++)n[o]="a["+o+"]";Ys[r]=Vy("C,a","return new C("+xC(n,",")+")")}return Ys[r](e,t)};Jy.exports=wC?Vy.bind:function(r){var t=yC(this),n=t.prototype,o=Ky(arguments,1),i=function(){var s=SC(o,Ky(arguments));return this instanceof i?EC(t,s.length,s):t.apply(r,s)};return _C(n)&&(i.prototype=n),i}});var Yy=f(()=>{"use strict";var IC=F(),zy=Wy();IC({target:"Function",proto:!0,forced:Function.bind!==zy},{bind:zy})});var Xy=f((SK,Qy)=>{"use strict";Yy();var TC=he();Qy.exports=TC("Function","bind")});var e_=f((xK,Zy)=>{"use strict";var RC=re(),AC=Xy(),Qs=Function.prototype;Zy.exports=function(e){var r=e.bind;return e===Qs||RC(Qs,e)&&r===Qs.bind?AC:r}});var t_=f((EK,r_)=>{"use strict";var qC=e_();r_.exports=qC});var o_=f((IK,n_)=>{n_.exports=t_()});var a_=f((TK,i_)=>{"use strict";var kC=Z(),OC=Fe(),PC=ee(),CC=PC("match");i_.exports=function(e){var r;return kC(e)&&((r=e[CC])!==void 0?!!r:OC(e)==="RegExp")}});var u_=f((RK,s_)=>{"use strict";var NC=a_(),DC=TypeError;s_.exports=function(e){if(NC(e))throw new DC("The method doesn't accept regular expressions");return e}});var l_=f((AK,c_)=>{"use strict";var LC=ee(),FC=LC("match");c_.exports=function(e){var r=/./;try{"/./"[e](r)}catch(t){try{return r[FC]=!1,"/./"[e](r)}catch(n){}}return!1}});var p_=f(()=>{"use strict";var jC=F(),UC=Tt(),MC=Mn().f,BC=ja(),d_=fr(),$C=u_(),HC=sr(),KC=l_(),GC=ur(),VC=UC("".slice),JC=Math.min,f_=KC("startsWith"),WC=!GC&&!f_&&!!function(){var e=MC(String.prototype,"startsWith");return e&&!e.writable}();jC({target:"String",proto:!0,forced:!WC&&!f_},{startsWith:function(r){var t=d_(HC(this));$C(r);var n=BC(JC(arguments.length>1?arguments[1]:void 0,t.length)),o=d_(r);return VC(t,n,n+o.length)===o}})});var v_=f((OK,m_)=>{"use strict";p_();var zC=he();m_.exports=zC("String","startsWith")});var g_=f((PK,h_)=>{"use strict";var YC=re(),QC=v_(),Xs=String.prototype;h_.exports=function(e){var r=e.startsWith;return typeof e=="string"||e===Xs||YC(Xs,e)&&r===Xs.startsWith?QC:r}});var __=f((CK,y_)=>{"use strict";var XC=g_();y_.exports=XC});var w_=f((NK,b_)=>{b_.exports=__()});var E_=f(()=>{"use strict";var ZC=F(),S_=lr(),eN=Ba(),rN=Z(),x_=Wn(),tN=Ir(),nN=We(),oN=Gn(),iN=ee(),aN=Vr(),sN=Jr(),uN=aN("slice"),cN=iN("species"),Zs=Array,lN=Math.max;ZC({target:"Array",proto:!0,forced:!uN},{slice:function(r,t){var n=nN(this),o=tN(n),i=x_(r,o),a=x_(t===void 0?o:t,o),s,u,c;if(S_(n)&&(s=n.constructor,eN(s)&&(s===Zs||S_(s.prototype))?s=void 0:rN(s)&&(s=s[cN],s===null&&(s=void 0)),s===Zs||s===void 0))return sN(n,i,a);for(u=new(s===void 0?Zs:s)(lN(a-i,0)),c=0;i<a;i++,c++)i in n&&oN(u,c,n[i]);return u.length=c,u}})});var T_=f((FK,I_)=>{"use strict";E_();var dN=he();I_.exports=dN("Array","slice")});var A_=f((jK,R_)=>{"use strict";var fN=re(),pN=T_(),eu=Array.prototype;R_.exports=function(e){var r=e.slice;return e===eu||fN(eu,e)&&r===eu.slice?pN:r}});var k_=f((UK,q_)=>{"use strict";var mN=A_();q_.exports=mN});var P_=f((MK,O_)=>{O_.exports=k_()});var U_=f((BK,j_)=>{"use strict";var vN=M(),C_=So(),To=Vt().getWeakData,hN=wo(),gN=ze(),yN=wr(),ru=Z(),_N=Jt(),D_=Ye(),N_=ae(),L_=mr(),bN=L_.set,wN=L_.getterFor,SN=D_.find,xN=D_.findIndex,EN=vN([].splice),IN=0,Ro=function(e){return e.frozen||(e.frozen=new F_)},F_=function(){this.entries=[]},tu=function(e,r){return SN(e.entries,function(t){return t[0]===r})};F_.prototype={get:function(e){var r=tu(this,e);if(r)return r[1]},has:function(e){return!!tu(this,e)},set:function(e,r){var t=tu(this,e);t?t[1]=r:this.entries.push([e,r])},delete:function(e){var r=xN(this.entries,function(t){return t[0]===e});return~r&&EN(this.entries,r,1),!!~r}};j_.exports={getConstructor:function(e,r,t,n){var o=e(function(u,c){hN(u,i),bN(u,{type:r,id:IN++,frozen:null}),yN(c)||_N(c,u[n],{that:u,AS_ENTRIES:t})}),i=o.prototype,a=wN(r),s=function(u,c,d){var l=a(u),p=To(gN(c),!0);return p===!0?Ro(l).set(c,d):p[l.id]=d,u};return C_(i,{delete:function(u){var c=a(this);if(!ru(u))return!1;var d=To(u);return d===!0?Ro(c).delete(u):d&&N_(d,c.id)&&delete d[c.id]},has:function(c){var d=a(this);if(!ru(c))return!1;var l=To(c);return l===!0?Ro(d).has(c):l&&N_(l,d.id)}}),C_(i,t?{get:function(c){var d=a(this);if(ru(c)){var l=To(c);if(l===!0)return Ro(d).get(c);if(l)return l[d.id]}},set:function(c,d){return s(this,c,d)}}:{add:function(c){return s(this,c,!0)}}),o}}});var J_=f(()=>{"use strict";var TN=Bs(),M_=G(),Oo=M(),B_=So(),RN=Vt(),AN=Vs(),$_=U_(),Ao=Z(),qo=mr().enforce,qN=U(),kN=as(),Qt=Object,ON=Array.isArray,ko=Qt.isExtensible,H_=Qt.isFrozen,PN=Qt.isSealed,K_=Qt.freeze,CN=Qt.seal,NN=!M_.ActiveXObject&&"ActiveXObject"in M_,zt,G_=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},V_=AN("WeakMap",G_,$_),et=V_.prototype,Po=Oo(et.set),DN=function(){return TN&&qN(function(){var e=K_([]);return Po(new V_,e,1),!H_(e)})};kN&&(NN?(zt=$_.getConstructor(G_,"WeakMap",!0),RN.enable(),nu=Oo(et.delete),Yt=Oo(et.has),ou=Oo(et.get),B_(et,{delete:function(e){if(Ao(e)&&!ko(e)){var r=qo(this);return r.frozen||(r.frozen=new zt),nu(this,e)||r.frozen.delete(e)}return nu(this,e)},has:function(r){if(Ao(r)&&!ko(r)){var t=qo(this);return t.frozen||(t.frozen=new zt),Yt(this,r)||t.frozen.has(r)}return Yt(this,r)},get:function(r){if(Ao(r)&&!ko(r)){var t=qo(this);return t.frozen||(t.frozen=new zt),Yt(this,r)?ou(this,r):t.frozen.get(r)}return ou(this,r)},set:function(r,t){if(Ao(r)&&!ko(r)){var n=qo(this);n.frozen||(n.frozen=new zt),Yt(this,r)?Po(this,r,t):n.frozen.set(r,t)}else Po(this,r,t);return this}})):DN()&&B_(et,{set:function(r,t){var n;return ON(r)&&(H_(r)?n=K_:PN(r)&&(n=CN)),Po(this,r,t),n&&n(r),this}}));var nu,Yt,ou});var W_=f(()=>{"use strict";J_()});var Y_=f((VK,z_)=>{"use strict";ho();Jn();W_();var LN=ve();z_.exports=LN.WeakMap});var X_=f((JK,Q_)=>{"use strict";var FN=Y_();yo();Q_.exports=FN});var eb=f((WK,Z_)=>{Z_.exports=X_()});var rb=f(()=>{"use strict";var jN=F(),UN=te(),MN=zr();jN({target:"Object",stat:!0,sham:!UN},{create:MN})});var nb=f((QK,tb)=>{"use strict";rb();var BN=ve(),$N=BN.Object;tb.exports=function(r,t){return $N.create(r,t)}});var ib=f((XK,ob)=>{"use strict";var HN=nb();ob.exports=HN});var sb=f((ZK,ab)=>{ab.exports=ib()});var db=f((eG,lb)=>{"use strict";var ub=te(),KN=M(),GN=Ee(),VN=U(),iu=Yn(),JN=eo(),WN=Cn(),zN=cr(),YN=Nn(),rt=Object.assign,cb=Object.defineProperty,QN=KN([].concat);lb.exports=!rt||VN(function(){if(ub&&rt({b:1},rt(cb({},"a",{enumerable:!0,get:function(){cb(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},r={},t=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[t]=7,n.split("").forEach(function(o){r[o]=o}),rt({},e)[t]!==7||iu(rt({},r)).join("")!==n})?function(r,t){for(var n=zN(r),o=arguments.length,i=1,a=JN.f,s=WN.f;o>i;)for(var u=YN(arguments[i++]),c=a?QN(iu(u),a(u)):iu(u),d=c.length,l=0,p;d>l;)p=c[l++],(!ub||GN(s,u,p))&&(n[p]=u[p]);return n}:rt});var pb=f(()=>{"use strict";var XN=F(),fb=db();XN({target:"Object",stat:!0,arity:2,forced:Object.assign!==fb},{assign:fb})});var vb=f((nG,mb)=>{"use strict";pb();var ZN=ve();mb.exports=ZN.Object.assign});var gb=f((oG,hb)=>{"use strict";var eD=vb();hb.exports=eD});var _b=f((iG,yb)=>{yb.exports=gb()});var au=f((aG,bb)=>{"use strict";bb.exports=`
|
|
20
|
+
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var xb=f((sG,Sb)=>{"use strict";var rD=M(),tD=sr(),nD=fr(),uu=au(),wb=rD("".replace),oD=RegExp("^["+uu+"]+"),iD=RegExp("(^|[^"+uu+"])["+uu+"]+$"),su=function(e){return function(r){var t=nD(tD(r));return e&1&&(t=wb(t,oD,"")),e&2&&(t=wb(t,iD,"$1")),t}};Sb.exports={start:su(1),end:su(2),trim:su(3)}});var Rb=f((uG,Tb)=>{"use strict";var aD=Rs().PROPER,sD=U(),Eb=au(),Ib="\u200B\x85\u180E";Tb.exports=function(e){return sD(function(){return!!Eb[e]()||Ib[e]()!==Ib||aD&&Eb[e].name!==e})}});var Ab=f(()=>{"use strict";var uD=F(),cD=xb().trim,lD=Rb();uD({target:"String",proto:!0,forced:lD("trim")},{trim:function(){return cD(this)}})});var kb=f((dG,qb)=>{"use strict";Ab();var dD=he();qb.exports=dD("String","trim")});var Pb=f((fG,Ob)=>{"use strict";var fD=re(),pD=kb(),cu=String.prototype;Ob.exports=function(e){var r=e.trim;return typeof e=="string"||e===cu||fD(cu,e)&&r===cu.trim?pD:r}});var Nb=f((pG,Cb)=>{"use strict";var mD=Pb();Cb.exports=mD});var Lb=f((mG,Db)=>{Db.exports=Nb()});function Iu(e,r){z.__h&&z.__h(V,e,nn||r),nn=0;var t=V.__H||(V.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({}),t.__[e]}function Bo(e){return nn=1,vD(_w,e)}function vD(e,r,t){var n=Iu(tn++,2);if(n.t=e,!n.__c&&(n.__=[t?t(r):_w(void 0,r),function(s){var u=n.__N?n.__N[0]:n.__[0],c=n.t(u,s);u!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=V,!V.__f)){var o=function(s,u,c){var d;if(!n.__c.__H)return!0;var l=(0,Eu.default)(d=n.__c.__H.__).call(d,function(m){return!!m.__c});if((0,sw.default)(l).call(l,function(m){return!m.__N}))return!i||i.call(this,s,u,c);var p=n.__c.props!==s;return(0,J.default)(l).call(l,function(m){if(m.__N){var v=m.__[0];m.__=m.__N,m.__N=void 0,v!==m.__[0]&&(p=!0)}}),i&&i.call(this,s,u,c)||p};V.__f=!0;var i=V.shouldComponentUpdate,a=V.componentWillUpdate;V.componentWillUpdate=function(s,u,c){if(this.__e){var d=i;i=void 0,o(s,u,c),i=d}a&&a.call(this,s,u,c)},V.shouldComponentUpdate=o}return n.__N||n.__}function kr(e,r){var t=Iu(tn++,3);!z.__s&&yw(t.__H,r)&&(t.__=e,t.u=r,V.__H.__h.push(t))}function $o(e){return nn=5,gw(function(){return{current:e}},[])}function gw(e,r){var t=Iu(tn++,7);return yw(t.__H,r)&&(t.__=e(),t.__H=r,t.__h=e),t.__}function ke(e,r){return nn=8,gw(function(){return e},r)}function hD(){for(var e;e=hw.shift();)if(e.__P&&e.__H)try{var r,t;(0,J.default)(r=e.__H.__h).call(r,Do),(0,J.default)(t=e.__H.__h).call(t,yu),e.__H.__h=[]}catch(n){e.__H.__h=[],z.__e(n,e.__v)}}function gD(e){var r,t=function(){clearTimeout(n),Kb&&cancelAnimationFrame(r),(0,hu.default)(e)},n=(0,hu.default)(t,100);Kb&&(r=requestAnimationFrame(t))}function Do(e){var r=V,t=e.__c;typeof t=="function"&&(e.__c=void 0,t()),V=r}function yu(e){var r=V;e.__c=e.__(),V=r}function yw(e,r){return!e||e.length!==r.length||(0,Uo.default)(r).call(r,function(t,n){return t!==e[n]})}function _w(e,r){return typeof r=="function"?r(e):r}function bw(e,r){for(var t in r)e[t]=r[t];return e}function _u(e,r){for(var t in e)if(t!=="__source"&&!(t in r))return!0;for(var n in r)if(n!=="__source"&&e[n]!==r[n])return!0;return!1}function Vb(e,r){this.props=e,this.context=r}function yD(e,r){function t(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),r?!r(this.props,o)||!a:_u(this.props,o)}function n(o){return this.shouldComponentUpdate=t,Je(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}function bD(e){function r(t){var n=bw({},t);return delete n.ref,e(n,t.ref||null)}return r.$$typeof=_D,r.render=r,r.prototype.isReactComponent=r.__f=!0,r.displayName="ForwardRef("+(e.displayName||e.name)+")",r}function ww(e,r,t){var n,o;return e&&(e.__c&&e.__c.__H&&((0,J.default)(n=e.__c.__H.__).call(n,function(i){typeof i.__c=="function"&&i.__c()}),e.__c.__H=null),(e=bw({},e)).__c!=null&&(e.__c.__P===t&&(e.__c.__P=r),e.__c=null),e.__k=e.__k&&(0,Go.default)(o=e.__k).call(o,function(i){return ww(i,r,t)})),e}function Sw(e,r,t){var n;return e&&t&&(e.__v=null,e.__k=e.__k&&(0,Go.default)(n=e.__k).call(n,function(o){return Sw(o,r,t)}),e.__c&&e.__c.__P===r&&(e.__e&&t.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=t)),e}function du(){this.__u=0,this.o=null,this.__b=null}function xw(e){var r=e.__.__c;return r&&r.__a&&r.__a(e)}function Co(){this.i=null,this.l=null}function AD(){}function qD(){return this.cancelBubble}function kD(){return this.defaultPrevented}function R(e,r,t,n,o,i){r||(r={});var a,s,u=r;if("ref"in u)for(s in u={},r)s=="ref"?a=r[s]:u[s]=r[s];var c={type:e,props:u,key:t,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--PD,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)u[s]===void 0&&(u[s]=a[s]);return O.vnode&&O.vnode(c),c}function LD(e){if(e.sheet)return e.sheet;for(var r=0;r<document.styleSheets.length;r++)if(document.styleSheets[r].ownerNode===e)return document.styleSheets[r]}function FD(e){var r=document.createElement("style");return r.setAttribute("data-emotion",e.key),e.nonce!==void 0&&r.setAttribute("nonce",e.nonce),r.appendChild(document.createTextNode("")),r.setAttribute("data-s",""),r}function HD(e,r){return se(e,0)^45?(((r<<2^se(e,0))<<2^se(e,1))<<2^se(e,2))<<2^se(e,3):0}function Tw(e){return(0,vw.default)(e).call(e)}function KD(e,r){return(e=r.exec(e))?e[0]:e}function L(e,r,t){return e.replace(r,t)}function bu(e,r){return(0,tt.default)(e).call(e,r)}function se(e,r){return e.charCodeAt(r)|0}function on(e,r,t){return(0,dw.default)(e).call(e,r,t)}function Ue(e){return e.length}function Au(e){return e.length}function No(e,r){return r.push(e),e}function GD(e,r){return(0,Go.default)(e).call(e,r).join("")}function Wo(e,r,t,n,o,i,a){return{value:e,root:r,parent:t,type:n,props:o,children:i,line:Jo,column:ot,length:a,return:""}}function Xt(e,r){return $D(Wo("",null,null,"",null,null,0),e,{length:-e.length},r)}function VD(){return Y}function JD(){return Y=ye>0?se(it,--ye):0,ot--,Y===10&&(ot=1,Jo--),Y}function Se(){return Y=ye<Rw?se(it,ye++):0,ot++,Y===10&&(ot=1,Jo++),Y}function Me(){return se(it,ye)}function Lo(){return ye}function sn(e,r){return on(it,e,r)}function an(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Aw(e){return Jo=ot=1,Rw=Ue(it=e),ye=0,[]}function qw(e){return it="",e}function Fo(e){return Tw(sn(ye-1,wu(e===91?e+2:e===40?e+1:e)))}function WD(e){for(;(Y=Me())&&Y<33;)Se();return an(e)>2||an(Y)>3?"":" "}function zD(e,r){for(;--r&&Se()&&!(Y<48||Y>102||Y>57&&Y<65||Y>70&&Y<97););return sn(e,Lo()+(r<6&&Me()==32&&Se()==32))}function wu(e){for(;Se();)switch(Y){case e:return ye;case 34:case 39:e!==34&&e!==39&&wu(Y);break;case 40:e===41&&wu(e);break;case 92:Se();break}return ye}function YD(e,r){for(;Se()&&e+Y!==57&&!(e+Y===84&&Me()===47););return"/*"+sn(r,ye-1)+"*"+Vo(e===47?e:Se())}function QD(e){for(;!an(Me());)Se();return sn(e,ye)}function XD(e){return qw(jo("",null,null,null,[""],e=Aw(e),0,[0],e))}function jo(e,r,t,n,o,i,a,s,u){for(var c=0,d=0,l=a,p=0,m=0,v=0,y=1,h=1,g=1,_=0,x="",A=o,q=i,w=n,k=x;h;)switch(v=_,_=Se()){case 40:if(v!=108&&se(k,l-1)==58){bu(k+=L(Fo(_),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:k+=Fo(_);break;case 9:case 10:case 13:case 32:k+=WD(v);break;case 92:k+=zD(Lo()-1,7);continue;case 47:switch(Me()){case 42:case 47:No(ZD(YD(Se(),Lo()),r,t),u);break;default:k+="/"}break;case 123*y:s[c++]=Ue(k)*g;case 125*y:case 59:case 0:switch(_){case 0:case 125:h=0;case 59+d:g==-1&&(k=L(k,/\f/g,"")),m>0&&Ue(k)-l&&No(m>32?rw(k+";",n,t,l-1):rw(L(k," ","")+";",n,t,l-2),u);break;case 59:k+=";";default:if(No(w=ew(k,r,t,c,d,o,s,x,A=[],q=[],l),i),_===123)if(d===0)jo(k,r,w,w,A,i,l,s,q);else switch(p===99&&se(k,3)===110?100:p){case 100:case 108:case 109:case 115:jo(e,w,w,n&&No(ew(e,w,w,0,0,o,s,x,o,A=[],l),q),o,q,l,s,n?A:q);break;default:jo(k,w,w,w,[""],q,0,s,q)}}c=d=m=0,y=g=1,x=k="",l=a;break;case 58:l=1+Ue(k),m=v;default:if(y<1){if(_==123)--y;else if(_==125&&y++==0&&JD()==125)continue}switch(k+=Vo(_),_*y){case 38:g=d>0?1:(k+="\f",-1);break;case 44:s[c++]=(Ue(k)-1)*g,g=1;break;case 64:Me()===45&&(k+=Fo(Se())),p=Me(),d=l=Ue(x=k+=QD(Lo())),_++;break;case 45:v===45&&Ue(k)==2&&(y=0)}}return i}function ew(e,r,t,n,o,i,a,s,u,c,d){for(var l=o-1,p=o===0?i:[""],m=Au(p),v=0,y=0,h=0;v<n;++v)for(var g=0,_=on(e,l+1,l=BD(y=a[v])),x=e;g<m;++g)(x=Tw(y>0?p[g]+" "+_:L(_,/&\f/g,p[g])))&&(u[h++]=x);return Wo(e,r,t,o===0?Tu:s,u,c,d)}function ZD(e,r,t){return Wo(e,r,t,Ew,Vo(VD()),on(e,2,-2),0)}function rw(e,r,t,n){return Wo(e,r,t,Ru,on(e,0,n),on(e,n+1,-1),n)}function nt(e,r){for(var t="",n=Au(e),o=0;o<n;o++)t+=r(e[o],o,e,r)||"";return t}function eL(e,r,t,n){switch(e.type){case MD:if(e.children.length)break;case UD:case Ru:return e.return=e.return||e.value;case Ew:return"";case Iw:return e.return=e.value+"{"+nt(e.children,n)+"}";case Tu:e.value=e.props.join(",")}return Ue(t=nt(e.children,n))?e.return=e.value+"{"+t+"}":""}function rL(e){var r=Au(e);return function(t,n,o,i){for(var a="",s=0;s<r;s++)a+=e[s](t,n,o,i)||"";return a}}function tL(e){return function(r){r.root||(r=r.return)&&e(r)}}function nL(e){var r=(0,pw.default)(null);return function(t){return r[t]===void 0&&(r[t]=e(t)),r[t]}}function kw(e,r){switch(HD(e,r)){case 5103:return D+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return D+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return D+e+Ho+e+ue+e+e;case 6828:case 4268:return D+e+ue+e+e;case 6165:return D+e+ue+"flex-"+e+e;case 5187:return D+e+L(e,/(\w+).+(:[^]+)/,D+"box-$1$2"+ue+"flex-$1$2")+e;case 5443:return D+e+ue+"flex-item-"+L(e,/flex-|-self/,"")+e;case 4675:return D+e+ue+"flex-line-pack"+L(e,/align-content|flex-|-self/,"")+e;case 5548:return D+e+ue+L(e,"shrink","negative")+e;case 5292:return D+e+ue+L(e,"basis","preferred-size")+e;case 6060:return D+"box-"+L(e,"-grow","")+D+e+ue+L(e,"grow","positive")+e;case 4554:return D+L(e,/([^-])(transform)/g,"$1"+D+"$2")+e;case 6187:return L(L(L(e,/(zoom-|grab)/,D+"$1"),/(image-set)/,D+"$1"),e,"")+e;case 5495:case 3959:return L(e,/(image-set\([^]*)/,D+"$1$`$1");case 4968:return L(L(e,/(.+:)(flex-)?(.*)/,D+"box-pack:$3"+ue+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+D+e+e;case 4095:case 3583:case 4068:case 2532:return L(e,/(.+)-inline(.+)/,D+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ue(e)-1-r>6)switch(se(e,r+1)){case 109:if(se(e,r+4)!==45)break;case 102:return L(e,/(.+:)(.+)-([^]+)/,"$1"+D+"$2-$3$1"+Ho+(se(e,r+3)==108?"$3":"$2-$3"))+e;case 115:return~bu(e,"stretch")?kw(L(e,"stretch","fill-available"),r)+e:e}break;case 4949:if(se(e,r+1)!==115)break;case 6444:switch(se(e,Ue(e)-3-(~bu(e,"!important")&&10))){case 107:return L(e,":",":"+D)+e;case 101:return L(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+D+(se(e,14)===45?"inline-":"")+"box$3$1"+D+"$2$3$1"+ue+"$2box$3")+e}break;case 5936:switch(se(e,r+11)){case 114:return D+e+ue+L(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return D+e+ue+L(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return D+e+ue+L(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return D+e+ue+e+e}return e}function fL(e){for(var r=0,t,n=0,o=e.length;o>=4;++n,o-=4)t=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,r=(t&65535)*1540483477+((t>>>16)*59797<<16)^(r&65535)*1540483477+((r>>>16)*59797<<16);switch(o){case 3:r^=(e.charCodeAt(n+2)&255)<<16;case 2:r^=(e.charCodeAt(n+1)&255)<<8;case 1:r^=e.charCodeAt(n)&255,r=(r&65535)*1540483477+((r>>>16)*59797<<16)}return r^=r>>>13,r=(r&65535)*1540483477+((r>>>16)*59797<<16),((r^r>>>15)>>>0).toString(36)}function Ko(e,r,t){if(t==null)return"";var n=t;if(n.__emotion_styles!==void 0)return n;switch(typeof t){case"boolean":return"";case"object":{var o=t;if(o.anim===1)return hr={name:o.name,styles:o.styles,next:hr},o.name;var i=t;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)hr={name:a.name,styles:a.styles,next:hr},a=a.next;var s=i.styles+";";return s}return hL(e,r,t)}}var u=t;if(r==null)return u;var c=r[u];return c!==void 0?c:u}function hL(e,r,t){var n="";if((0,rn.default)(t))for(var o=0;o<t.length;o++)n+=Ko(e,r,t[o])+";";else for(var i in t){var a=t[i];if(typeof a!="object"){var s=a;r!=null&&r[s]!==void 0?n+=i+"{"+r[s]+"}":nw(s)&&(n+=pu(i)+":"+ow(i,s)+";")}else if((0,rn.default)(a)&&typeof a[0]=="string"&&(r==null||r[a[0]]===void 0))for(var u=0;u<a.length;u++)nw(a[u])&&(n+=pu(i)+":"+ow(i,a[u])+";");else{var c=Ko(e,r,a);switch(i){case"animation":case"animationName":{n+=pu(i)+":"+c+";";break}default:n+=i+"{"+c+"}"}}}return n}function mu(e,r,t){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";hr=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,o+=Ko(t,r,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=Ko(t,r,e[s]),n){var u=i;o+=u[s]}iw.lastIndex=0;for(var c="",d;(d=iw.exec(o))!==null;)c+="-"+d[1];var l=fL(o)+c;return{name:l,styles:o,next:hr}}function Su(e,r,t){var n,o="";return(0,J.default)(n=t.split(" ")).call(n,function(i){e[i]!==void 0?r.push(e[i]+";"):i&&(o+=i+" ")}),o}function aw(e,r){if(e.inserted[r.name]===void 0)return e.insert("",r,e.sheet,!0)}function vu(e,r,t){var n=[],o=Su(e,n,t);return n.length<2?t:o+r(n)}function TL(s){var u=s,{elementTag:e="Image",src:r="",children:t,handleExposure:n,className:o,imgStyle:i}=u,a=Re(u,["elementTag","src","children","handleExposure","className","imgStyle"]);let c=IL(()=>{r&&n()});return e==="Image"?R("div",{className:o,style:{borderRadius:"8px"},children:Je("img",N(I({},a),{ref:c,src:r!=null?r:"",style:I({display:"block",width:"100%",height:"auto",objectFit:"contain",maxWidth:"100%",maxHeight:"100%",borderRadius:"8px"},i||{})}))}):R("div",N(I({},a),{ref:c,className:o,children:t}))}function RL(e,r){if(!e)return null;let t=Array.isArray(r)?r[0]:r,n=Array.isArray(r)?r[1]:0;return Array.isArray(e)?e.map((o,i)=>o&&typeof o=="object"&&"type"in o?Je(o.type,N(I({},o.props),{style:N(I({},o.props.style||{}),{paddingLeft:t>0?`${t/2}px`:void 0,paddingRight:t>0?`${t/2}px`:void 0,paddingTop:n>0?`${n/2}px`:void 0,paddingBottom:n>0?`${n/2}px`:void 0}),key:o.key||i})):o):e&&typeof e=="object"&&"type"in e?Je(e.type,N(I({},e.props),{style:N(I({},e.props.style||{}),{paddingLeft:t>0?`${t/2}px`:void 0,paddingRight:t>0?`${t/2}px`:void 0,paddingTop:n>0?`${n/2}px`:void 0,paddingBottom:n>0?`${n/2}px`:void 0})})):e}var Eu,sw,J,uw,Uo,hu,Zt,en,Go,hG,tt,cw,lw,Mo,rn,gu,gG,dw,fw,pw,mw,vw,tn,V,lu,Fb,nn,hw,z,jb,Ub,Mb,Bb,$b,Hb,Kb,Gb,Jb,_D,wD,Wb,zb,SD,xD,ED,ID,TD,RD,Yb,OD,Qb,Xb,Zb,PD,fu,CD,ND,DD,jD,ue,Ho,D,Ew,Tu,Ru,UD,Iw,MD,BD,Vo,$D,Jo,ot,Rw,ye,Y,it,oL,iL,aL,tw,sL,uL,cL,lL,dL,pL,mL,vL,Ow,nw,pu,ow,iw,hr,gL,yL,_L,bL,wL,er,SL,xL,EL,IL,Pw,Cw,AL,qL,kL,OL,xu,PL,Nw,Dw,Lw,CL,NL,DL,Fw,qu=T(()=>{"use strict";El();Eu=B(Cf(),1),sw=B(Hf(),1),J=B(tp(),1),uw=B(vp(),1),Uo=B(Ep(),1),hu=B($p(),1),Zt=B(Th(),1),en=B(Ph(),1),Go=B(Bh(),1),hG=B(rg(),1),tt=B(dg(),1),cw=B(gy(),1),lw=B(Ry(),1),Mo=B(Ly(),1),rn=B(Hy(),1),gu=B(o_(),1),gG=B(w_(),1),dw=B(P_(),1),fw=B(eb(),1),pw=B(sb(),1),mw=B(_b(),1),vw=B(Lb(),1),nn=0,hw=[],z=O,jb=z.__b,Ub=z.__r,Mb=z.diffed,Bb=z.__c,$b=z.unmount,Hb=z.__;z.__b=function(e){V=null,jb&&jb(e)},z.__=function(e,r){e&&r.__k&&r.__k.__m&&(e.__m=r.__k.__m),Hb&&Hb(e,r)},z.__r=function(e){var r,t,n;Ub&&Ub(e),tn=0;var o=(V=e.__c).__H;o&&(lu===V?(o.__h=[],V.__h=[],(0,J.default)(r=o.__).call(r,function(i){i.__N&&(i.__=i.__N),i.u=i.__N=void 0})):((0,J.default)(t=o.__h).call(t,Do),(0,J.default)(n=o.__h).call(n,yu),o.__h=[],tn=0)),lu=V},z.diffed=function(e){var r;Mb&&Mb(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(hw.push(t)!==1&&Fb===z.requestAnimationFrame||((Fb=z.requestAnimationFrame)||gD)(hD)),(0,J.default)(r=t.__H.__).call(r,function(n){n.u&&(n.__H=n.u),n.u=void 0})),lu=V=null},z.__c=function(e,r){(0,Uo.default)(r).call(r,function(t){try{var n,o;(0,J.default)(n=t.__h).call(n,Do),t.__h=(0,Eu.default)(o=t.__h).call(o,function(i){return!i.__||yu(i)})}catch(i){(0,Uo.default)(r).call(r,function(a){a.__h&&(a.__h=[])}),r=[],z.__e(i,t.__v)}}),Bb&&Bb(e,r)},z.unmount=function(e){var r;$b&&$b(e);var t,n=e.__c;n&&n.__H&&((0,J.default)(r=n.__H.__).call(r,function(o){try{Do(o)}catch(i){t=i}}),n.__H=void 0,t&&z.__e(t,n.__v))};Kb=typeof requestAnimationFrame=="function";(Vb.prototype=new Le).isPureReactComponent=!0,Vb.prototype.shouldComponentUpdate=function(e,r){return _u(this.props,e)||_u(this.state,r)};Jb=O.__b;O.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Jb&&Jb(e)};_D=typeof Zt.default<"u"&&en.default&&(0,en.default)("react.forward_ref")||3911;wD=O.__e;O.__e=function(e,r,t,n){if(e.then){for(var o,i=r;i=i.__;)if((o=i.__c)&&o.__c)return r.__e==null&&(r.__e=t.__e,r.__k=t.__k),o.__c(e,r)}wD(e,r,t,n)};Wb=O.unmount;O.unmount=function(e){var r=e.__c;r&&r.__R&&r.__R(),r&&32&e.__u&&(e.type=null),Wb&&Wb(e)},(du.prototype=new Le).__c=function(e,r){var t=r.__c,n=this;n.o==null&&(n.o=[]),n.o.push(t);var o=xw(n.__v),i=!1,a=function(){i||(i=!0,t.__R=null,o?o(s):s())};t.__R=a;var s=function(){if(!--n.__u){if(n.state.__a){var u=n.state.__a;n.__v.__k[0]=Sw(u,u.__c.__P,u.__c.__O)}var c;for(n.setState({__a:n.__b=null});c=n.o.pop();)c.forceUpdate()}};n.__u++||32&r.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},du.prototype.componentWillUnmount=function(){this.o=[]},du.prototype.render=function(e,r){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=ww(this.__b,t,n.__O=n.__P)}this.__b=null}var o=r.__a&&Je(ar,null,e.fallback);return o&&(o.__u&=-33),[Je(ar,null,r.__a?null:e.children),o]};zb=function(e,r,t){if(++t[1]===t[0]&&e.l.delete(r),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(t=e.i;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;e.i=t=t[2]}};(Co.prototype=new Le).__a=function(e){var r=this,t=xw(r.__v),n=r.l.get(e);return n[0]++,function(o){var i=function(){r.props.revealOrder?(n.push(o),zb(r,e,n)):o()};t?t(i):i()}},Co.prototype.render=function(e){this.i=null,this.l=new cw.default;var r=xt(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&(0,lw.default)(r).call(r);for(var t=r.length;t--;)this.l.set(r[t],this.i=[1,0,this.i]);return e.children},Co.prototype.componentDidUpdate=Co.prototype.componentDidMount=function(){var e,r=this;(0,J.default)(e=this.l).call(e,function(t,n){zb(r,n,t)})};SD=typeof Zt.default<"u"&&en.default&&(0,en.default)("react.element")||60103,xD=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ED=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ID=/[A-Z0-9]/g,TD=typeof document<"u",RD=function(e){return(typeof Zt.default<"u"&&typeof(0,Zt.default)()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};Le.prototype.isReactComponent={},(0,J.default)(Gb=["componentWillMount","componentWillReceiveProps","componentWillUpdate"]).call(Gb,function(e){(0,Mo.default)(Le.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(r){(0,Mo.default)(this,e,{configurable:!0,writable:!0,value:r})}})});Yb=O.event;O.event=function(e){return Yb&&(e=Yb(e)),e.persist=AD,e.isPropagationStopped=qD,e.isDefaultPrevented=kD,e.nativeEvent=e};OD={enumerable:!1,configurable:!0,get:function(){return this.class}},Qb=O.vnode;O.vnode=function(e){typeof e.type=="string"&&function(r,t,n){var o=r.props,i=r.type,a={},s=(0,tt.default)(i).call(i,"-")===-1;for(var u in o){var c=o[u];if(!(u==="value"&&"defaultValue"in o&&c==null||TD&&u==="children"&&i==="noscript"||u==="class"||u==="className")){var d=u.toLowerCase();u==="defaultValue"&&"value"in o&&o.value==null?u="value":u==="download"&&c===!0?c="":d==="translate"&&c==="no"?c=!1:d[0]==="o"&&d[1]==="n"?d==="ondoubleclick"?u="ondblclick":d!=="onchange"||i!=="input"&&i!=="textarea"||RD(o.type)?d==="onfocus"?u="onfocusin":d==="onblur"?u="onfocusout":ED.test(u)&&(u=d):d=u="oninput":s&&xD.test(u)?u=u.replace(ID,"-$&").toLowerCase():c===null&&(c=void 0),d==="oninput"&&a[u=d]&&(u="oninputCapture"),a[u]=c}}i=="select"&&a.multiple&&(0,rn.default)(a.value)&&(a.value=(0,J.default)(t=xt(o.children)).call(t,function(l){var p;l.props.selected=(0,tt.default)(p=a.value).call(p,l.props.value)!=-1})),i=="select"&&a.defaultValue!=null&&(a.value=(0,J.default)(n=xt(o.children)).call(n,function(l){var p;l.props.selected=a.multiple?(0,tt.default)(p=a.defaultValue).call(p,l.props.value)!=-1:a.defaultValue==l.props.value})),o.class&&!o.className?(a.class=o.class,(0,Mo.default)(a,"className",OD)):(o.className&&!o.class||o.class&&o.className)&&(a.class=a.className=o.className),r.props=a}(e),e.$$typeof=SD,Qb&&Qb(e)};Xb=O.__r;O.__r=function(e){Xb&&Xb(e),e.__c};Zb=O.diffed;O.diffed=function(e){Zb&&Zb(e);var r=e.props,t=e.__e;t!=null&&e.type==="textarea"&&"value"in r&&r.value!==t.value&&(t.value=r.value==null?"":r.value)};PD=0;fu={drawerBackdrop:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",justifyContent:"center",alignItems:"flex-end",zIndex:1e3,overflow:"hidden",touchAction:"none"},drawer:{backgroundColor:"white",borderRadius:"16px 16px 0 0",width:"100%",maxWidth:"100%",overflowY:"auto",position:"relative",boxShadow:"0 -2px 10px rgba(0, 0, 0, 0.1)",display:"flex",flexDirection:"column",margin:"0 auto"},drawerContent:{flex:1,width:"100%",height:"100%",overflow:"auto",margin:"0 auto"}},CD=`
|
|
20
21
|
@keyframes fadeIn {
|
|
21
22
|
from { opacity: 0; }
|
|
22
23
|
to { opacity: 1; }
|
|
@@ -52,7 +53,44 @@ var ws=Object.create;var Ze=Object.defineProperty,Es=Object.defineProperties,ks=
|
|
|
52
53
|
.drawer-leave {
|
|
53
54
|
animation: slideDown 0.3s ease forwards;
|
|
54
55
|
}
|
|
55
|
-
|
|
56
|
+
`,ND=({children:e,isOpen:r=!1,onClose:t,height:n="50%",className:o="",backdropColor:i},a)=>{let[s,u]=Bo(r),[c,d]=Bo(null),l=$o(null),p=$o(!1);kr(()=>{let w=document.createElement("style");return w.innerHTML=CD,document.head.appendChild(w),()=>{document.head.removeChild(w)}},[]),kr(()=>{r!==s&&!p.current&&(u(r),d(r?"enter":"leave"),r?(document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%"):!r&&!p.current&&(document.body.style.overflow="",document.body.style.position="",document.body.style.width=""))},[r,s]),kr(()=>()=>{document.body.style.overflow="",document.body.style.position="",document.body.style.width=""},[]);let m=ke(()=>{c==="leave"&&(d(null),u(!1),p.current=!1)},[c]),v=ke(w=>{w.preventDefault(),w.stopPropagation(),w.target===l.current&&h()},[]),y=ke(()=>{p.current=!1,u(!0),d("enter")},[]),h=ke(()=>{p.current=!0,d("leave"),document.body.style.overflow="",document.body.style.position="",document.body.style.width="",t&&t()},[t]),g=ke(()=>s&&!p.current,[s]);if(kr(()=>{if(a){let w={show:y,hide:h,isOpen:g};typeof a=="function"?a(w):a&&(a.current=w)}},[y,h,g,a]),!s&&!c)return null;let _=N(I({},fu.drawer),{height:typeof n=="number"?`${n}px`:n,backgroundColor:i||"rgba(255, 255, 255, 1)"}),x=N(I({},fu.drawerBackdrop),{pointerEvents:"auto"}),A=c?`drawer-${c}`:"",q=c?`backdrop-${c}`:"";return R("div",{ref:l,style:x,className:q,onClick:v,onTouchMove:w=>w.preventDefault(),onTouchStart:w=>w.stopPropagation(),onTouchEnd:w=>w.stopPropagation(),children:R("div",{style:_,className:`${A} ${o}`,onAnimationEnd:m,onClick:w=>w.stopPropagation(),onTouchMove:w=>{w.stopPropagation()},onTouchStart:w=>w.stopPropagation(),onTouchEnd:w=>w.stopPropagation(),children:R("div",{style:N(I({},fu.drawerContent),{pointerEvents:"auto"}),onTouchMove:w=>w.stopPropagation(),onClick:w=>w.stopPropagation(),children:e})})})},DD=bD(ND);jD=function(){function e(t){var n=this;this._insertTag=function(o){var i;n.tags.length===0?n.insertionPoint?i=n.insertionPoint.nextSibling:n.prepend?i=n.container.firstChild:i=n.before:i=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(o,i),n.tags.push(o)},this.isSpeedy=t.speedy===void 0?!0:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var r=e.prototype;return r.hydrate=function(t){(0,J.default)(t).call(t,this._insertTag)},r.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(FD(this));var n=this.tags[this.tags.length-1];if(this.isSpeedy){var o=LD(n);try{o.insertRule(t,o.cssRules.length)}catch(i){}}else n.appendChild(document.createTextNode(t));this.ctr++},r.flush=function(){var t;(0,J.default)(t=this.tags).call(t,function(n){var o;return(o=n.parentNode)==null?void 0:o.removeChild(n)}),this.tags=[],this.ctr=0},e}(),ue="-ms-",Ho="-moz-",D="-webkit-",Ew="comm",Tu="rule",Ru="decl",UD="@import",Iw="@keyframes",MD="@layer",BD=Math.abs,Vo=String.fromCharCode,$D=mw.default;Jo=1,ot=1,Rw=0,ye=0,Y=0,it="";oL=function(e,r,t){for(var n=0,o=0;n=o,o=Me(),n===38&&o===12&&(r[t]=1),!an(o);)Se();return sn(e,ye)},iL=function(e,r){var t=-1,n=44;do switch(an(n)){case 0:n===38&&Me()===12&&(r[t]=1),e[t]+=oL(ye-1,r,t);break;case 2:e[t]+=Fo(n);break;case 4:if(n===44){e[++t]=Me()===58?"&\f":"",r[t]=e[t].length;break}default:e[t]+=Vo(n)}while(n=Se());return e},aL=function(e,r){return qw(iL(Aw(e),r))},tw=new fw.default,sL=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var r=e.value,t=e.parent,n=e.column===t.column&&e.line===t.line;t.type!=="rule";)if(t=t.parent,!t)return;if(!(e.props.length===1&&r.charCodeAt(0)!==58&&!tw.get(t))&&!n){tw.set(e,!0);for(var o=[],i=aL(r,o),a=t.props,s=0,u=0;s<i.length;s++)for(var c=0;c<a.length;c++,u++)e.props[u]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},uL=function(e){if(e.type==="decl"){var r=e.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(e.return="",e.value="")}};cL=function(e,r,t,n){if(e.length>-1&&!e.return)switch(e.type){case Ru:e.return=kw(e.value,e.length);break;case Iw:return nt([Xt(e,{value:L(e.value,"@","@"+D)})],n);case Tu:if(e.length)return GD(e.props,function(o){switch(KD(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return nt([Xt(e,{props:[L(o,/:(read-\w+)/,":"+Ho+"$1")]})],n);case"::placeholder":return nt([Xt(e,{props:[L(o,/:(plac\w+)/,":"+D+"input-$1")]}),Xt(e,{props:[L(o,/:(plac\w+)/,":"+Ho+"$1")]}),Xt(e,{props:[L(o,/:(plac\w+)/,ue+"input-$1")]})],n)}return""})}},lL=[cL],dL=function(e){var r=e.key;if(r==="css"){var t=document.querySelectorAll("style[data-emotion]:not([data-s])");(0,J.default)(Array.prototype).call(t,function(v){var y=v.getAttribute("data-emotion");(0,tt.default)(y).call(y," ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var n=e.stylisPlugins||lL,o={},i,a=[];i=e.container||document.head,(0,J.default)(Array.prototype).call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(v){for(var y=v.getAttribute("data-emotion").split(" "),h=1;h<y.length;h++)o[y[h]]=!0;a.push(v)});var s,u=[sL,uL];{var c,d=[eL,tL(function(v){c.insert(v)})],l=rL((0,uw.default)(u).call(u,n,d)),p=function(v){return nt(XD(v),l)};s=function(v,y,h,g){c=h,p(v?v+"{"+y.styles+"}":y.styles),g&&(m.inserted[y.name]=!0)}}var m={key:r,sheet:new jD({key:r,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:s};return m.sheet.hydrate(a),m};pL={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},mL=/[A-Z]|^ms/g,vL=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ow=function(e){return e.charCodeAt(1)===45},nw=function(e){return e!=null&&typeof e!="boolean"},pu=nL(function(e){return Ow(e)?e:e.replace(mL,"-$&").toLowerCase()}),ow=function(e,r){switch(e){case"animation":case"animationName":if(typeof r=="string")return r.replace(vL,function(t,n,o){return hr={name:n,styles:o,next:hr},n})}return pL[e]!==1&&!Ow(e)&&typeof r=="number"&&r!==0?r+"px":r};iw=/label:\s*([^\s;{]+)\s*(;|$)/g;gL=function(e,r,t){var n=e.key+"-"+r.name;e.registered[n]===void 0&&(e.registered[n]=r.styles)},yL=function(e,r,t){gL(e,r);var n=e.key+"-"+r.name;if(e.inserted[r.name]===void 0){var o=r;do e.insert(r===o?"."+n:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};_L=function(e){var r=dL(e);r.sheet.speedy=function(a){this.isSpeedy=a},r.compat=!0;var t=function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];var c=mu(s,r.registered,void 0);return yL(r,c),r.key+"-"+c.name},n=function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];var c=mu(s,r.registered),d="animation-"+c.name;return aw(r,{name:c.name,styles:"@keyframes "+d+"{"+c.styles+"}"}),d},o=function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];var c=mu(s,r.registered);aw(r,c)},i=function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];return vu(r.registered,t,bL(s))};return{css:t,cx:i,injectGlobal:o,keyframes:n,hydrate:function(a){(0,J.default)(a).call(a,function(s){r.inserted[s]=!0})},flush:function(){r.registered={},r.inserted={},r.sheet.flush()},sheet:r.sheet,cache:r,getRegisteredStyles:(0,gu.default)(Su).call(Su,null,r.registered),merge:(0,gu.default)(vu).call(vu,null,r.registered,t)}},bL=function e(r){for(var t="",n=0;n<r.length;n++){var o=r[n];if(o!=null){var i=void 0;switch(typeof o){case"boolean":break;case"object":{if((0,rn.default)(o))i=e(o);else{i="";for(var a in o)o[a]&&a&&(i&&(i+=" "),i+=a)}break}default:i=o}i&&(t&&(t+=" "),t+=i)}}return t},wL=_L({key:"css"}),er=wL.css,SL=({title:e,content:r,noHeader:t,padding:n="16px",footerButtons:o,onClose:i})=>{let a={container:er`
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
height: 100%;
|
|
60
|
+
width: 100%;
|
|
61
|
+
max-width: 440px;
|
|
62
|
+
margin: 0 auto;
|
|
63
|
+
`,header:er`
|
|
64
|
+
padding: 16px;
|
|
65
|
+
border-bottom: 1px solid #eee;
|
|
66
|
+
display: flex;
|
|
67
|
+
justify-content: space-between;
|
|
68
|
+
align-items: center;
|
|
69
|
+
`,content:er`
|
|
70
|
+
padding: ${n};
|
|
71
|
+
flex: 1;
|
|
72
|
+
overflow: auto;
|
|
73
|
+
`,footer:er`
|
|
74
|
+
padding: 16px;
|
|
75
|
+
border-top: 1px solid #eee;
|
|
76
|
+
display: flex;
|
|
77
|
+
justify-content: flex-end;
|
|
78
|
+
gap: 8px;
|
|
79
|
+
`,closeButton:er`
|
|
80
|
+
background: none;
|
|
81
|
+
border: none;
|
|
82
|
+
cursor: pointer;
|
|
83
|
+
font-size: 20px;
|
|
84
|
+
`,button:er`
|
|
85
|
+
padding: 8px 16px;
|
|
86
|
+
border-radius: 4px;
|
|
87
|
+
border: 1px solid #ddd;
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
`};return R("div",{className:a.container,children:[!t&&R("div",{className:a.header,children:[R("h3",{children:e}),R("button",{className:a.closeButton,onClick:i,children:"\xD7"})]}),R("div",{className:a.content,children:r}),o&&o.length>0&&R("div",{className:a.footer,children:o.map((s,u)=>R("button",{className:er`
|
|
90
|
+
${a.button}
|
|
91
|
+
background-color: ${s.variant==="primary"?"#1677ff":"#fff"};
|
|
92
|
+
color: ${s.variant==="primary"?"#fff":"#333"};
|
|
93
|
+
`,onClick:c=>{var d;return(d=s.onClick)==null?void 0:d.call(s,c,{hide:i})},children:s.text},u))})]})},xL=(()=>{let e=null;return()=>(e||(e=document.createElement("div"),e.id=`jolibox-ui-modal-container-${Math.random().toString(36).substring(2,15)}`,document.body.appendChild(e)),e)})(),EL=e=>{let r=xL(),t=null,n=!1,o=!1,i=()=>{o||(n=!1,e.onClose&&e.onClose(),s())},a=()=>window.innerWidth>window.innerHeight,s=()=>{Et(R(DD,{ref:c=>{t=c},isOpen:n,onClose:i,height:a()?"90vh":"50vh",backdropColor:e.backdropColor,children:R(SL,N(I({},e),{onClose:i}))}),r)},u=()=>{!o&&n&&s()};return window.addEventListener("resize",u),s(),{show:()=>{o||(n=!0,s(),setTimeout(()=>{t&&(t.show(),e.onOpen&&e.onOpen())},0))},hide:()=>{o||t&&t.hide()},isOpen:()=>n,destroy:()=>{o=!0,window.removeEventListener("resize",u),t&&t.hide(),setTimeout(()=>{Et(null,r)},300)}}},IL=(e,r={threshold:.6})=>{let t=$o(null),n=$o(!1),o=ke(i=>{let[a]=i;a.isIntersecting&&!n.current?(n.current=!0,e()):a.isIntersecting||(n.current=!1)},[e]);return kr(()=>{if(t.current){let i=new IntersectionObserver(o,r);return i.observe(t.current),()=>{t.current&&i.unobserve(t.current)}}},[o,r]),t};Pw=i=>{var a=i,{children:e,fluid:r=!1,className:t="",style:n={}}=a,o=Re(a,["children","fluid","className","style"]);let s=I({width:"100%",marginLeft:"auto",marginRight:"auto",paddingLeft:"15px",paddingRight:"15px",boxSizing:"border-box",maxWidth:r?"100%":void 0},n);return R("div",N(I({className:t,style:s},o),{children:e}))},Cw=s=>{var u=s,{children:e,gutter:r=0,justify:t="start",align:n="top",className:o="",style:i={}}=u,a=Re(u,["children","gutter","justify","align","className","style"]);let c={start:"flex-start",end:"flex-end",center:"center","space-around":"space-around","space-between":"space-between"},d={top:"flex-start",middle:"center",bottom:"flex-end"},l=I({display:"flex",flexWrap:"wrap",boxSizing:"border-box",justifyContent:c[t],alignItems:d[n]},i);if(r){let m=Array.isArray(r)?r[0]:r,v=Array.isArray(r)?r[1]:0;m>0&&(l.marginLeft=`-${m/2}px`,l.marginRight=`-${m/2}px`),v>0&&(l.marginTop=`-${v/2}px`,l.marginBottom=`-${v/2}px`)}let p=r?RL(e,r):e;return R("div",N(I({className:o,style:l},a),{children:p}))};AL=l=>{var p=l,{children:e,span:r,offset:t,xs:n,sm:o,md:i,lg:a,xl:s,className:u="",style:c={}}=p,d=Re(p,["children","span","offset","xs","sm","md","lg","xl","className","style"]);let m=I({position:"relative",width:"100%",paddingLeft:"15px",paddingRight:"15px",boxSizing:"border-box"},c);if(r!==void 0){let v=r/24*100;m.flex=`0 0 ${v}%`,m.maxWidth=`${v}%`}return t!==void 0&&(m.marginLeft=`${t/24*100}%`),R("div",N(I({className:u,style:m},d),{children:e}))},qL=({game:e,layerName:r,routeMode:t,onGameClick:n})=>{var a,s;let o=ke(u=>{u.preventDefault(),n==null||n(e)},[n,e]),i=ke(()=>{},[e,r]);return R(AL,{span:8,className:"relative px-[4px] box-border mb-[8px]",style:{marginBottom:"8px"},onClick:o,role:"button",tabIndex:0,onTouchEnd:o,children:[R("div",{className:"relative w-full mb-[2px] ion-no-margin",children:R(TL,{src:(s=(a=e.logo)!=null?a:e.cover)!=null?s:"",className:"w-full h-full absolute top-0 left-0 aspect-square rounded-[8px] object-cover",style:{display:"block",objectFit:"cover"},handleExposure:i})}),R("div",{className:"block text-white max-w-full text-[15px] leading-[1.2] overflow-hidden whitespace-nowrap text-ellipsis font-normal break-words",style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",wordBreak:"break-word",color:"white",maxWidth:"100%",fontSize:"15px",lineHeight:1.2,fontWeight:"normal"},children:e.name})]},e.gameId)},kL=i=>{var a=i,{list:e,routeMode:r,layerName:t,onGameClick:n}=a,o=Re(a,["list","routeMode","layerName","onGameClick"]);return R(Pw,{className:"w-full max-w-[440px] mx-auto flex-grow overflow-y-auto",children:R(Cw,{gutter:8,className:"flex-wrap",children:e==null?void 0:e.map(s=>R(qL,{game:s,routeMode:r,layerName:t,onGameClick:n},s.gameId))})})},OL=yD(kL),xu=(e=>(e.Dismiss="DISMISS",e.Quit="QUIT",e))(xu||{}),PL=e=>{let{games:r,title:t,buttons:n,onClose:o}=e,[i,a]=Bo(null),s=ke(d=>{o==null||o({type:d.type===xu.Quit?"quit":"dismiss"})},[o]),u=ke(d=>{o==null||o({type:"navigate",data:{game:d}})},[o]);if(!r.length)return R(ar,{});let c=ke(d=>{if(d!==null&&!d.shadowRoot){let l=d.attachShadow({mode:"open"}),p=document.createElement("style");p.textContent=`
|
|
56
94
|
.recommend-panel {
|
|
57
95
|
background-color: #1a1a1a;
|
|
58
96
|
width: 100%;
|
|
@@ -143,6 +181,35 @@ var ws=Object.create;var Ze=Object.defineProperty,Es=Object.defineProperties,ks=
|
|
|
143
181
|
background-color: #7817FF;
|
|
144
182
|
color: #fff;
|
|
145
183
|
}
|
|
146
|
-
`;let m=document.createElement("div");m.id="recommend-panel-content",u.appendChild(p),u.appendChild(m),s(u)}},[]);return Ee(()=>{if(i){let d=i.getElementById("recommend-panel-content");d&&Et(S("div",{className:"recommend-panel",children:S("div",{className:"container",children:[S("p",{className:"title",children:r}),S("div",{className:"games-container",children:S(Zl,{list:t||[],routeMode:"REDIRECT",layerName:"RecommendedGuide",onGameClick:l})}),S("div",{className:"buttons-container",children:S(Si,{children:S(Ti,{gutter:10,children:(n!=null?n:[]).map((u,p)=>S("div",{className:"button-wrapper",children:S("button",{className:`button ${u.type===Yr.Quit?"quit-button":"action-button"}`,onClick:()=>a(u),children:u.text})},p))})})})]})}),d)}},[i,t,r,n,a,l]),S("div",{ref:c})},Ii=e=>{let t=Gl({title:e.title,content:S(ec,{games:e.games,title:e.title,buttons:e.buttons,onClose:e.onClose}),backdropColor:"#1a1a1a",placement:"bottom",noHeader:!0,padding:"0px",onClose:()=>{console.log("onClose")},onOpen:e.onOpen});return t.show(),t},Ri=new Map,Ai=(e,t)=>{Ri.set(e,t)};Ai(/^\{slot-checkmark\}/,(e,t)=>{var n,o;let r=(o=(n=t==null?void 0:t.customStyle)==null?void 0:n.mark)!=null?o:{};return S("div",{style:r,children:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",style:{height:"24px",verticalAlign:"middle"},children:[S("g",{clipPath:"url(#clip0_2247_16523)",children:S("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM9.29 16.29L5.7 12.7C5.31 12.31 5.31 11.68 5.7 11.29C6.09 10.9 6.72 10.9 7.11 11.29L10 14.17L16.88 7.29C17.27 6.9 17.9 6.9 18.29 7.29C18.68 7.68 18.68 8.31 18.29 8.7L10.7 16.29C10.32 16.68 9.68 16.68 9.29 16.29Z",fill:"white"})}),S("defs",{children:S("clipPath",{id:"clip0_2247_16523",children:S("rect",{width:"24",height:"24",fill:"white"})})})]})})});tc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAUNSURBVHgBfVRZbFRlFP7+e+/cmc5MO22ntGALLZUWhoZFqBgaNUYJMUYehBgwJLw0wRd9MJr4AokvJibG6JtLoompkhgNBoNbERQqVEQLtdu0dN9nptPOcvft98xU3Kje5Cb3vzn/d77zfeccYO1HaG9vr0xlZz+ZvZXJ955TeO8XKh+5oPPRzrR29Uz8fbwCoRC31mW2FuB8PD3HRH/N2Od5NnDLQlmlH9x1sZhU4CvT0XpfEyyf4/GqTOqRp+tr6Y77X6BsfHz8QHip5ht3SBDKDwiYHbQQLpOQHxfBZA5XNFBRK8BeAT58bxg1tTvRtMPlXek32k69fOqnu0B7+3sfb9m+7bx+1hOVqAl3yYcQcei6MIW6xghEDvR0p7Dl3iiEsAxFtTD0M0PN1nUQxGXPt6N7z+HDh3v/DirM3VBc55KDymN+5PtcDAzE8djx3XCzXlE4z2LwvMILXO25DTvZBCE4jdR4GOLmEASW4kdfbBAplBdAhZFLWmLg41TVpr0yMotBhFsW0bprM7jDiyG8AOYUkAFSsnieT2ZIZwm2yjCbTmDDjgYEfcmRpoc3biu6l9fNyn2H6jC27IfujGJPbDOSoyZuXluEp5KGGgETU9ddBeREtyZajuu/TkLnLuoq6sCSDi686TbvPblXYjMzM+96c5UnHVPAwqCKfY9WgOc8pKYNhJqDEKW/1P/t8gx2xkhoKoARHRYETGaB2wJk2YNBMSNfxl+XskOR45lrHkp2SwhIGsxUhKI5bINDDgGDXy9CEFYZlkBG3/AcYg21xSSFfKGN1BkhAT7dh2Alw9Jk2QnJy/lDuXwWK/E8ttaFYemFeBGGSZnzHpqbN8AwXALlxI6kiLq48tU09u/ftCrFBCWv4bDggAUEuitVS4oKqNxACQsjq5oIqqVgzINJcuiaAEnhxUScSvZJDEYYUHQLhu5B9gRqJwZlhr6DHD5iHAoxJhTa5PbCFKrqXSTTBlRFgKLQiJDTjEpU6VujxJrGoVGCPJ0tGzDIQEsDsgs2cssckiPDyJFptUEIkai+MpdLY2XGT2DlyOXpIhnlwY9vO4Yhl7sINJqQa03och66IlEXEGPLo0TUOUmRxPJhflQl5jI+PZ9YYmN9I+8MXYk8m56S4VAvVkU8lAZLCwZT03P0x+NY11QB26YhIOrD8TEcanuoOAQyja2VJMbkvEjv8KSB7qvZV9nBgwdDR9o+U3p+nMATR6sR7wqhdbefSmZ/DpxEujHGV0eP9BbpHPSTniRVzpeCoMtY5AHc6Erwt75rEIXOzk7t0Ak+8dSx9ei+GMa2+1V0/7JEa0eH4VAHkLia5cIkpjZVYpMHkuRBT3m4nUlDTwcQ8PlQKjmIrlevFxMXZvWexsiWvFXGo5V9uPy9g/rmABYWJCgJEs01yWEKpHaSRAvqgo7pcR0TpgJTlxCRAmAxGRNZlZ/+qOXBAt6dJetVxfr2BNe1eEeeCSE1S5O0IYNl0tRwbFgKga3k4IvYsAMGFnUBAY+qipZAaKUBcDRvaPDMxjt79R9LuqPj7K6y/JM3t8dclpnIwsuEyXWvKENqDAhUu3Amy4uxWTuLTW1+XP9B8+T6K43PvXRkCv+z+cXBc4nemepALBD2CzHLQSBMeiYljI66uNjnoIbkMSYs9M+b/W93VO9EcRusvfnv+p9L5V6Dydt7LktRTSFzdMFzBCWRdCc/eP6FB07/Ecv/ffl3auuKkJv2jm0AAAAASUVORK5CYII=";Ai(/^\{slot-coin\}/,(e,t)=>{var n;let r=(n=t==null?void 0:t.coinImage)!=null?n:tc;return S("img",{src:r,alt:"\u{1FA99}",style:{height:"1em",verticalAlign:"middle"}})});rc=(e,t)=>{if(!e.includes("{slot-"))return e;let r=[],n=0;for(;n<e.length;){let o=null,i=1/0,s=null;for(let[a,l]of Ri.entries()){let c=a.source.startsWith("^")?a.source.slice(1):a.source,d=new RegExp(c,"g");d.lastIndex=n;let u=d.exec(e);u&&u.index<i&&(o=u,i=u.index,s=l)}if(o&&s)i>n&&r.push(e.substring(n,i)),r.push(s(o,t)),n=i+o[0].length;else{r.push(e.substring(n));break}}return r.length===1?r[0]:S("div",{style:{display:"flex",alignItems:"center",gap:"4px",color:"#FFF",fontFamily:'"PingFang SC"',fontSize:"16px",fontStyle:"normal",fontWeight:600,lineHeight:"18px",width:"max-content"},children:r})},nc=({message:e,type:t="info",duration:r=3e3,onClose:n})=>{let[o,i]=kt(!0);return Ee(()=>{let s=setTimeout(()=>{i(!1),setTimeout(()=>{n==null||n()},300)},r);return()=>clearTimeout(s)},[r,n]),S("div",{className:`toast toast-${t} ${o?"toast-visible":"toast-hidden"}`,style:{position:"fixed",top:"max(20px, env(safe-area-inset-top))",left:"50%",padding:"8px 12px",maxWidth:"min(85vw, 400px)",minWidth:"200px",width:"auto",background:t==="success"?"#4caf50":t==="error"?"#f44336":t==="warning"?"#ff9800":"#2F2F3B",color:"white",borderRadius:"8px",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.2)",zIndex:9999,transition:"opacity 0.3s, transform 0.3s",opacity:o?1:0,transform:o?"translate(-50%, 0)":"translate(-50%, -20px)",textAlign:"center",wordWrap:"break-word"},children:e})},Ci=(e,t)=>{let r=document.createElement("div");document.body.appendChild(r);let n=()=>{document.body.removeChild(r)},o=rc(e,t);Et(S(nc,{message:o,type:t==null?void 0:t.type,duration:t==null?void 0:t.duration,onClose:n}),r)}});function Pi(){return y(this,null,function*(){if(nn)return nn;let t=`${g.testMode?"https://stg-game.jolibox.com":"https://game.jolibox.com"}/api/user-retention/exit-recommendations?objectId=${g.mpId}&from=GAME_DETAIL`,{response:{data:r}}=yield q(t);return nn=r,r})}function Oi(){return y(this,null,function*(){let e=new he;if(g.mpType!=="game")return e.resolve(!1),e.promise;let t=yield Pi();if(t.code!=="SUCCESS")return e.resolve(!1),e.promise;let{gameListInfo:r,title:n,buttons:o}=t.data,i=Ii({games:r.games,title:n,buttons:o,onClose:s=>{var a;switch(s.type){case"quit":e.resolve(!1);break;case"dismiss":e.resolve(!0),i.hide();break;case"navigate":(a=s.data)!=null&&a.game?oc(s.data.game):e.resolve(!0),i.hide();break;default:e.resolve(!0);break}}});return e.promise})}var nn,oc,Ni=x(()=>{"use strict";J();G();P();rn();Ae();nn=null;Pi();oc=e=>{var a;let{data:t}=N("envSync"),r=new URL(t.schema),n=r.pathname,o=new URLSearchParams(r.search);o.set("gameId",g.mpId),o.set("joliSource",g.encodeJoliSourceQuery({__mpType:"game",__orientation:(a=e.orientation)!=null?a:"VERTICAL"}));let s=`${`https://${e.gameId}.content.jolibox.com/`}${n}?${o.toString()}`;N("openSchemaSync",{schema:s})}});var Di={};yn(Di,{config:()=>dc});function ic(){Ce.on("isAdShowing",e=>{It=e,$e(It)&&N("updateContainerConfigSync",{displayCapsuleButton:!It,webviewId:g.webviewId})})}function sc(){ue.on("onDocumentReady",()=>{var e;(e=globalThis.joliboxJSCore)==null||e.onDocumentReady(window.location.href),Q("onDocumentReady",{start_timestamp:At,timestamp:Date.now()})})}function ac(e){g.mpType==="game"&&W.start(e)}function lc(){re("onJoliboxServiceReady",({runtimeInfo:e,loadDuration:t})=>{e&&g.onEnvConfigChanged({hostUserInfo:e}),ue.emit("LifecycleEvent.onReady",w({},g.hostUserInfo?g.hostUserInfo:{isLogin:!1})),Q("joliboxServiceReady",{start_timestamp:At,timestamp:Date.now()}),ac(t)}),re("onBeforeExit",({uuid:e})=>{var t;(t=globalThis.joliboxJSCore)==null||t.doExit(e)})}function cc(){let e=()=>{Q("onBeforeExit",{timestamp:Date.now()}),Tt==null||Tt(),W.close(Date.now()-At)};ce.onDoExit(()=>y(this,null,function*(){return It?!0:$e(g.shouldInterupt)?(g.shouldInterupt||e(),g.shouldInterupt):Rt!=null&&Rt.canShowRecommended&&(yield Oi())?!0:(e(),!1)}))}function uc(){return y(this,null,function*(){let e=`${g.baseApiHost}/api/fe-configs/js-sdk/basic-meta`,{response:{data:t}}=yield q(e);t&&(Rt=t)})}function dc(){At=Date.now(),lc(),ic(),cc(),sc(),uc(),Tt=Lo()}var Tt,At,It,Rt,Li=x(()=>{"use strict";G();J();P();ge();Uo();$r();Ni();Ae();It=!1,Rt=null;ce.onReady(()=>{})});function Ui(e){let t=Ir.config[e];return t||(t={},Ir.config[e]=t),(r,n)=>{if(t[r]){ne.warn(`[can i use] ${r} already registered`);return}t[r]=w({},n)}}var Fi=x(()=>{"use strict";P()});function on(e){ji=e}function Ct(e){return e===null||typeof e!="object"?e:Array.isArray(e)?e.map(t=>Ct(t)):Object.keys(e).reduce((t,r)=>(t[r]=Ct(e[r]),t),{})}function me(e){return typeof e=="number"}function sn(e){let t=an(e);switch(t){case"string":return`"${e}"`;case"number":case"boolean":case"null":case"undefined":return String(e);default:return`a(n) ${t}`}}function an(e){return typeof e=="function"?"function":Object.prototype.toString.call(e).slice(8).slice(0,-1).toLowerCase()}var ji,B,Pt,Ot,Nt,Dt,Oe,Lt,Ut,Ft,jt,Mt,Bt,Ht,$t,Jt,Kt,Vt,Gt,ln=x(()=>{"use strict";ji=!1;B=class{constructor(){this.errors=[];this.hasFallback=!1;this.hasDefault=!1;this._optional=!1}fail(t){if(ji)if(typeof t=="string")this.errors.push(t);else{let r=`${this.path} should be ${t.expect}`;this._optional&&t.expect!=="undefined"?r+=" or undefined, ":r+=", ",r+=`but got ${sn(t.actual)}`,this.errors.push(r)}return!1}fallback(t){return this.hasFallback=!0,this._fallback=t,this}get fallbackValue(){return Ct(this._fallback)}default(t){return this.hasDefault=!0,this._default=t,this}get defaultValue(){return typeof this._default=="function"?this._default:Ct(this._default)}optional(){return this._optional=!0,this}};Pt=class extends B{validate(t){return this._optional&&t===void 0?!0:me(t)?me(this._min)&&t<this._min?this.fail(`the value of ${this.path} should be greater than or equal to ${this._min}`):me(this._max)&&t>this._max?this.fail(`the value of ${this.path} should be less than or equal to ${this._max}`):me(this._greater)&&t<=this._greater?this.fail(`the value of ${this.path} should be greater than ${this._greater}`):this._isInt&&t!==Math.floor(t)?this.fail(`the value of ${this.path} should be integer but got ${t}`):!0:this.fail({expect:"number",actual:t})}min(t){return this._min=t,this}max(t){return this._max=t,this}isInt(t){return this._isInt=t,this}greater(t){return this._greater=t,this}},Ot=class extends B{validate(t){return this._optional&&t===void 0?!0:typeof t!="boolean"?this.fail({expect:"boolean",actual:t}):!0}},Nt=class extends B{validate(t){if(this._optional&&t===void 0)return!0;if(typeof t!="string")return this.fail({expect:"string",actual:t});if(me(this._maxLength)&&t.length>this._maxLength)return this.fail(`the length of ${this.path} should be less than or equal to ${this._maxLength}`);if(me(this._minLength)&&t.length<this._minLength)return this.fail(`the length of ${this.path} should be greater than or equal to ${this._minLength}`);if(typeof this._pattern=="string"){if(!new RegExp(this._pattern).test(t))return this.fail(`${this.path} should match pattern "${this._pattern}"`)}else if(this._pattern&&!this._pattern.test(t))return this.fail(`${this.path} should match pattern "${this._pattern.toString()}"`);return!0}minLength(t){return this._minLength=t,this}maxLength(t){return this._maxLength=t,this}pattern(t){return this._pattern=t,this}},Dt=class extends B{validate(t){return this._optional&&t===void 0?!0:typeof t!="symbol"?this.fail({expect:"symbol",actual:t}):!0}},Oe=class extends B{validate(t){return!0}},Lt=class extends B{validate(t){return t!==void 0?this.fail({expect:"undefined",actual:t}):!0}},Ut=class extends B{validate(t){return this._optional&&t===void 0?!0:t!==null?this.fail({expect:"null",actual:t}):!0}},Ft=class extends B{validate(t){return this._optional&&t===void 0?!0:typeof t!="function"?this.fail({expect:"function",actual:t}):!0}},jt=class extends B{constructor(...t){super(),this._items=t}validate(t){if(this._optional&&t===void 0)return!0;if(!this._items.includes(t)){let r=this._items.map(n=>JSON.stringify(n)).join(", ");return this.fail(`expect ${this.path} to be one of ${r}, but got ${sn(t)}`)}return!0}},Mt=class extends B{constructor(r){super();this._item=r}validate(r){if(this._optional&&r===void 0)return!0;if(!Array.isArray(r))return this.fail({expect:"array",actual:r});if(me(this._minItems)&&r.length<this._minItems)return this.fail(`the length of ${this.path} should be greater than or equal to ${this._minItems}`);if(me(this._maxItems)&&r.length>this._maxItems)return this.fail(`the length of ${this.path} should be less than or equal to ${this._maxItems}`);if(me(this._length)&&r.length!==this._length)return this.fail(`the length of ${this.path} should be equal to ${this._length}`);let n=this._item;if(!n)return!0;let o=!0;if(r.forEach((i,s)=>{if(n.path=`${this.path}[${s}]`,n.errors=this.errors,i===void 0&&n.hasDefault){r[s]=n.defaultValue;return}n.validate(i)||(n.hasFallback?r[s]=n.fallbackValue:o=!1)}),this._uniqueItems){let i=new Map;for(let s in r)i.has(r[s])?o=this.fail(`${this.path} should NOT have duplicate items (${this.path}[${i.get(r[s])}] and ${this.path}[${s}] are identical)`):i.set(r[s],s)}return o}minItems(r){return this._minItems=r,this}maxItems(r){return this._maxItems=r,this}uniqueItems(){return this._uniqueItems=!0,this}length(r){return this._length=r,this}},Bt=class extends B{constructor(r){super();this._value=r}validate(r){if(this._optional&&r===void 0)return!0;if(an(r)!=="object")return this.fail({expect:"object",actual:r});let o=r,i=this._value;i.errors=this.errors;let s=!0;for(let a in o){let l=o[a];if(/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/.test(a)?i.path=`${this.path}.${a}`:i.path=`${this.path}["${a}"]`,!(l===void 0&&i._optional)){if(l===void 0&&i.hasDefault){o[a]=i.defaultValue;continue}i.validate(l)||(i.hasFallback?o[a]=i.fallbackValue:s=!1)}}return s}},Ht=class extends B{constructor(r={}){super();this._object=r}validate(r){if(this._optional&&r===void 0)return!0;if(an(r)!=="object")return this.fail({expect:"object",actual:r});let n=r,o=!0;for(let i in this._object){let s=n[i],a=this._object[i];if(a.errors=this.errors,/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/.test(i)?a.path=`${this.path}.${i}`:a.path=`${this.path}["${i}"]`,!(a._optional&&s===void 0)){if(s===void 0&&a.hasDefault){n[i]=a.defaultValue;continue}a.validate(s)||(a.hasFallback?n[i]=a.fallbackValue:o=!1)}}return o}},$t=class extends B{constructor(r){super();this.value=r}validate(r){return r===void 0&&this._optional?!0:r!==this.value?this.fail({expect:sn(this.value),actual:r}):!0}},Jt=class extends B{constructor(...t){super(),this._items=t}validate(t){if(t===void 0&&this._optional)return!0;let r=[],n=!1,o=this._items.length;for(let i=0;i<o;i++){let s=this._items[i];if(s.errors=[],s.path=this.path,!s.validate(t))r.push(s.errors.join("; "));else if(!n){n=!0;break}}if(!n){let i=r.join(`
|
|
147
|
-
|
|
148
|
-
`);throw e.errors.length=0,on(!1),new TypeError(n)}}var f,un=x(()=>{"use strict";ln();ln();f={object(e){return new Ht(e)},array(e){return new Mt(e)},tuple(...e){return new Kt(...e)},literal(e){return new $t(e)},or(...e){return new Jt(...e)},symbol(){return new Dt},record(e){return new Bt(e)},function(){return new Ft},boolean(){return new Ot},string(){return new Nt},number(){return new Pt},undefined(){return new Lt},null(){return new Ut},unknown(){return new Oe},any(){return new Oe},as(){return new Oe},arraybuffer(){return new Vt},enum(...e){return new jt(...e)},typedarray(e){return new Gt(e)}}});var qt,Mi,Bi=x(()=>{"use strict";P();ie();un();Re();qt=1,Mi=e=>{function t(n,o){return(...i)=>{var u,p,m,v;let s=Date.now(),a={method:n,trace_id:qt};qt+=1;let l="SUCCESS",c=`${n}:ok`,d=0;try{if(o.paramsSchema)try{cn(o.paramsSchema,i,"params")}catch(b){throw Fr(`${n}:fail ${b.message}`)}let E=o.implement(...i),h=E,_=`${n}:ok`;if(E&&"code"in E){let{code:b,data:T,message:A}=E;l=b,h=T,_=A}return{code:l,message:_,data:h}}catch(E){let h=E;d=(p=(u=h.code)!=null?u:h.errNo)!=null?p:2e3,l="FAILURE";let _=(v=(m=h.message)!=null?m:h.errMsg)!=null?v:`${E}`;return c=`${n}:${l} ${_.replace(/^\S+:(fail|cancel)\s?/,"")}`,K(new Ve(c,d)),{code:l,message:c}}finally{let E=Date.now()-s;e("apiInvoked",O(w({},a),{duration:E,status:l}))}}}function r(n,o){return(...i)=>y(this,null,function*(){var p,m,v,E;let s=qn(i)?i:[i],a=Date.now(),l={method:n,trace_id:qt};qt+=1;let c=`${n}:ok`,d="SUCCESS",u={code:d,message:c};try{if(o.paramsSchema)try{cn(o.paramsSchema,s,"params")}catch(b){throw Fr(b.message)}let _=yield o.implement(...s);if(_&&"code"in _){let{code:b,data:T,message:A}=_;d=b,c=A,_=T}return Object.assign(u,{code:d,message:c,data:_}),u}catch(h){let _=h,b=(m=(p=_.code)!=null?p:_.errNo)!=null?m:2e3;d="FAILURE";let T=(E=(v=_.message)!=null?v:_.errMsg)!=null?E:`${h}`,A=`${n}:${d} ${T.replace(/^\S+:(fail|cancel)\s?/,"")}`;return Object.assign(u,{code:d,message:A}),K(new Ve(A,b)),u}finally{let h=Date.now()-a;e("apiInvoked",O(w({},l),{duration:h,status:d}))}})}return{createAPI:r,createSyncAPI:t}}});var H,D,R,se=x(()=>{"use strict";Fi();ge();Bi();un();({createAPI:H,createSyncAPI:D}=Mi(Q)),R=Ui("native")});var Hi,mc,fc,hc,_c,$i=x(()=>{"use strict";P();se();G();Hi=j(),mc="env",fc="getSystemInfoSync",hc=D(fc,{implement:()=>{var r;let e=N("envSync"),{data:t}=e;return{system:t.deviceInfo.system,platform:t.deviceInfo.platform.toLowerCase(),version:t.sdkInfo.jssdkVersion,pixelRatio:t.deviceInfo.pixelRatio,language:t.deviceInfo.lang,brand:t.deviceInfo.brand,appName:(r=t.hostInfo)==null?void 0:r.appName,SDKVersion:t.sdkInfo.jssdkVersion}}}),_c=D(mc,{implement:()=>{var t;let e=N("envSync");return(t=e==null?void 0:e.data)!=null?t:void 0}});Hi.registerCommand("API.getSystemInfoSync",hc);Hi.registerCommand("API.env",_c);R("env",{version:"1.0.0"});R("getSystemInfoSync",{version:"1.0.0"})});var Ji=vn(dn=>{"use strict";P();se();ie();G();ge();J();var gc="exitGame",vc="onReady",yc="onJoliboxShow",bc="onJoliboxHide",Wt=j(),zt=at(K),wc=H(gc,{paramsSchema:f.tuple(f.function(),f.boolean().optional().default(!1)),implement:(e,t=!1)=>y(dn,null,function*(){zt(e).call(dn),$e(g.shouldInterupt)&&!g.shouldInterupt&&g.from&&Hn("onRetentionResult",{shouldStay:t},g.from,!0),yield Y("exitAppAsync")})}),Ec=D(yc,{paramsSchema:f.tuple(f.function()),implement(e){let t=zt(e);re("onJoliboxEnterForeground",()=>{t.call(this),Ge.emit("visible",!0)})}}),kc=D(bc,{paramsSchema:f.tuple(f.function()),implement(e){let t=zt(e);re("onJoliboxEnterBackground",()=>{t.call(this),Ge.emit("visible",!1)})}}),xc=D(vc,{paramsSchema:f.tuple(f.function()),implement(e){let t=zt(e);ue.on("LifecycleEvent.onReady",r=>{t(r)})}});Wt.registerCommand("LifecycleSDK.exit",wc);Wt.registerCommand("LifecycleSDK.onReady",xc);Wt.registerCommand("LifecycleSDK.onJoliboxShow",Ec);Wt.registerCommand("LifecycleSDK.onJoliboxHide",kc);R("lifeCycle.exit",{version:"1.0.0"});R("lifeCycle.onReady",{version:"1.0.0"});R("lifeCycle.onJoliboxShow",{version:"1.0.0"});R("lifeCycle.onJoliboxHide",{version:"1.0.0"})});function Ki(e){let t={};if(!ye(e))return t;for(let[r,n]of Object.entries(e)){let o=r.toLocaleLowerCase();n?typeof n=="object"?t[o]=Object.prototype.toString.call(n):t[o]=String(n):t[o]=""}return t}function Vi(e="GET"){if(e==="")return"POST";let t=e.toUpperCase();return["GET","OPTIONS","HEAD","POST","PUT","DELETE","TRACE","CONNECT","PATCH"].includes(t)?t:"GET"}function Gi(e,t=!1){if(e)return t||e>0&&e<=6e4?Math.ceil(e):6e4}function qi(e,t,r){if(["POST","PUT","PATCH"].includes(t)||!ye(r))return e;let[n,o=""]=e.split("?"),i=new URLSearchParams(o);for(let[a,l]of Object.entries(r))l!=null&&i.append(a,String(l));let s=i.toString();return s?`${n}?${s}`:n}var Wi=x(()=>{"use strict";P()});var Sc,Tc,pn,mn,zi,Ic,Rc,Ac,Yi=x(()=>{"use strict";Re();Br();se();Wi();P();ie();J();Sc=15,Tc=ut("createRequestTaskSync","operateRequestTaskSync",{type:"public",baseUrl:g.baseApiHost}),pn=0,mn=[],zi=at(K),Ic=(e,t)=>{let r=e.filter(t),n=e.filter(o=>!t(o));return e.length=0,e.push(...n),r},Rc=e=>{let t=new he,r=()=>{};return D("request",{paramsSchema:f.tuple(f.object({url:f.string(),method:f.string(),headers:f.object(),data:f.object().optional(),query:f.object().optional(),dataType:f.string().default("json"),responseType:f.string().default("text"),enableCache:f.boolean().default(!1),appendHostCookie:f.boolean().default(!0),timeout:f.number().default(3e4),success:f.function(),fail:f.function()})),implement(o){let i=()=>y(this,null,function*(){var a,l;let s=zi(o.fail);try{if(pn+=1,t.state!=="pending")return;let{data:c,dataType:d,responseType:u,enableCache:p,appendHostCookie:m}=o,v=Ki(o.headers),E=Vi(o.method),h=Gi(o.timeout),_=qi(o.url,E,c),b=zi(o.success),T=Object.assign({},o,{method:E,header:v,data:E==="GET"||E==="HEAD"?void 0:c,enableCache:p,query:(a=o.query)!=null?a:{},dataType:d,responseType:u,appendHostCookie:m});h&&(T.timeout=h);let A=Tc(_,T);{let{response:C}=yield A,{code:k,data:$,message:z}=C;if($&&typeof $=="object"&&"status"in $&&$.status!==200)throw _e({code:$.status||-1,msg:`request:fail status ${$.status}`});t.resolve({code:k!=null?k:"SUCCESS",data:$,message:z!=null?z:"request:ok"}),b({code:"SUCCESS",message:"request:ok",data:$})}}catch(c){t.reject(c),s({code:"FAILURE",message:"httpRequst: failed"})}finally{pn-=1,(l=mn.shift())==null||l()}});return pn>=Sc?(r=()=>{Ic(mn,s=>s===i)},mn.push(i)):i(),t.promise}})(e),{abort(){t.reject(_e({code:-1,msg:"request:fail abort"})),r()}}},Ac=j();Ac.registerCommand("HttpSDK.request",Rc);R("request",{version:"1.0.0"})});function Lc(e){let t=Object.prototype.toString.call(e).split(" ")[1].split("]")[0].toLocaleLowerCase();return Dc.includes(t)?t:""}function Uc(e,t){try{switch(t){case"string":return e;case"object":return JSON.parse(e);case"number":return parseFloat(e);case"boolean":return e==="true";default:return""}}catch(r){return""}}function Fc(e,t){try{switch(t){case"string":case"number":case"boolean":return`${e}`;case"object":return JSON.stringify(e);default:return""}}catch(r){return""}}var Yt,Cc,Pc,Oc,Nc,rf,nf,Dc,Qi=x(()=>{"use strict";se();G();P();Ae();J();Yt=j(),Cc=H("getLocalStorage",{paramsSchema:f.tuple(f.string()),implement(e){return y(this,null,function*(){let{response:t}=yield q(`/api/games/user-storage/${g.mpId}`,{method:"GET",responseType:"json",appendHostCookie:!0,query:{key:e}}),{data:{code:r,message:n,data:o}}=yield t;if(r==="SUCCESS")return{code:r,message:n,data:o==null?void 0:o.value};try{let{data:{data:i,dataType:s}}=yield Y("getLocalStorageAsync",{key:e}),a=Uc(i,s);return{code:r,message:`${n}. fallback to native`,data:a}}catch(i){return{code:"INTERNAL_ERROR",message:"[Jolibox SDK] get local storage failed",data:null}}})}});Yt.registerCommand("StorageSDK.getItem",Cc);R("storage.getItem",{version:"1.0.0",properties:{key:"1.0.0",value:"1.0.0"}});Pc=H("setStorage",{paramsSchema:f.tuple(f.string(),f.or(f.string(),f.boolean(),f.number())),implement(e,t){return y(this,null,function*(){let r=g.mpId,n=typeof t=="string"?t:String(t),{response:o}=yield q(`/api/games/user-storage/${r}`,{method:"POST",responseType:"json",appendHostCookie:!0,data:{key:e,value:n}}),{data:{code:i,message:s}}=o,a=Lc(t),l=Fc(t,a);return yield Y("setLocalStorageAsync",{key:e,data:l,dataType:a}),i=="SUCCESS"?{code:i,message:s}:{code:i,message:`${s}. fallback to native`}})}});Yt.registerCommand("StorageSDK.setItem",Pc);R("storage.setItem",{version:"1.0.0",properties:{key:"1.0.0",value:"1.0.0"}});Oc=H("removeStorage",{paramsSchema:f.tuple(f.string()),implement(e){return y(this,null,function*(){let t=g.mpId,{response:r}=yield q(`/api/games/user-storage/${t}/remove`,{method:"POST",responseType:"json",appendHostCookie:!0,data:{key:e}}),{data:{code:n,message:o}}=r;return yield Y("removeLocalStorageAsync",{key:e}),n==="SUCCESS"?{code:n,message:o}:{code:n,message:"[Jolibox SDK] remove item succ"}})}});Yt.registerCommand("StorageSDK.removeItem",Oc);R("storage.removeItem",{version:"1.0.0",properties:{key:"1.0.0"}});Nc=H("clearStorage",{implement(){return y(this,null,function*(){let e=g.mpId,{response:t}=yield q(`/api/games/user-storage/${e}/clear`,{method:"POST",appendHostCookie:!0});Y("clearLocalStorageAsync");let{data:{code:r,message:n}}=t;return r==="SUCCESS"?{code:r,message:n}:{code:r,message:`${n}.fallback to native`}})}});Yt.registerCommand("StorageSDK.clear",Nc);R("storage.clear",{version:"1.0.0"});rf=H("getStorageInfo",{implement(){return y(this,null,function*(){let{data:e}=yield Y("getStorageInfoAsync");return e})}});R("getStorageInfo",{version:"1.0.0",success:{keys:"1.0.0",currentSize:"1.0.0",limitSize:"1.0.0"}});nf=D("getStorageInfoSync",{implement(){return N("getStorageInfoSync")}}),Dc=["string","number","boolean","object",""]});var jc,Mc,Bc,fn,Xi=x(()=>{"use strict";P();G();se();jc=D("showKeyboard",{paramsSchema:f.tuple(f.object({defaultValue:f.string().optional().default(""),multiple:f.boolean().optional().default(!1),maxLength:f.unknown().optional().default(1e5)})),implement(e){var n;let t=Math.floor((n=Number(e.maxLength))!=null?n:1e5),{defaultValue:r}=e;r&&t&&(r=r.slice(0,t)),N("showKeyboardSync",O(w({},e),{defaultValue:r,maxLength:t}))}});R("keyboard.showKeyboard",{version:"1.0.0",properties:{params:{defaultValue:"1.0.0",multiple:"1.0.0",confirmHold:"1.0.0",confirmType:"1.0.0",maxLength:"1.0.0"}},success:{errMsg:"1.0.0"}});Mc=D("updateKeyboard",{paramsSchema:f.tuple(f.object({value:f.string()})),implement(e){N("updateKeyboardSync",e)}});R("keyboard.updateKeyboard",{version:"1.0.0",properties:{params:{value:"1.0.0"}}});Bc=D("hideKeyboard",{implement(){N("hideKeyboardSync")}});R("keyboard.hideKeyboard",{version:"1.0.0"});fn=j();fn.registerCommand("KeyboardSDK.showKeyboard",jc);fn.registerCommand("KeyboardSDK.updateKeyboard",Mc);fn.registerCommand("KeyboardSDK.hideKeyboard",Bc)});var Zi=vn(Se=>{"use strict";P();se();ge();var Ne=j(),Hc=H("levelFinished",{paramsSchema:f.tuple(f.string(),f.object({result:f.boolean(),duration:f.number()})),implement:(e,t)=>y(Se,null,function*(){let{result:r,duration:n}=t,o=[];o.push(W.tracker("LevelFinished",{levelId:e,result:r,duration:n})),o.push(W.reporter({event:"COMPLETE_GAME_LEVEL"})),yield Promise.all(o)})}),$c=H("taskFinished",{paramsSchema:f.tuple(f.string(),f.object({duration:f.number()})),implement:(e,t)=>y(Se,null,function*(){let{duration:r}=t;return yield W.reportToNative({event:"TaskFinished",params:{duration:r,taskId:e}})})}),Jc=H("levelUpgrade",{paramsSchema:f.tuple(f.string(),f.string()),implement:(e,t)=>y(Se,null,function*(){let r=[];r.push(W.reportToNative({event:"LevelUpgrade",params:{name:t,levelId:e}})),yield Promise.all(r)})}),Kc=H("onHistoryUserLevel",{paramsSchema:f.tuple(f.number()),implement:e=>y(Se,null,function*(){return yield W.reportToNative({event:"HistoryUserLevel",params:{level:e}})})}),Vc=H("onHistoryUserScore",{paramsSchema:f.tuple(f.number()),implement:e=>y(Se,null,function*(){return yield W.reportToNative({event:"HistoryUserScore",params:{score:e}})})}),Gc=H("taskEvent",{paramsSchema:f.tuple(f.string(),f.object({tools:f.array(f.object({id:f.string(),name:f.string(),count:f.number(),description:f.string().optional(),price:f.object({amount:f.number(),unit:f.string()}).optional()})).optional(),awards:f.array(f.object({id:f.string(),name:f.string()})).optional()})),implement:(e,t)=>y(Se,null,function*(){var n,o;let r=[];r.push(W.reportToNative({event:"TaskEvent",params:w({taskId:e},t)})),(o=(n=t.tools)==null?void 0:n.length)!=null&&o&&(r.push(W.reporter({event:"USE_GAME_ITEM"})),r.push(W.reportToNative({event:"UseGameItem",params:w({taskId:e},t)}))),yield Promise.all(r)})});Ne.registerCommand("TaskTrackerSDK.levelFinished",Hc);Ne.registerCommand("TaskTrackerSDK.taskFinished",$c);Ne.registerCommand("TaskTrackerSDK.levelUpgrade",Jc);Ne.registerCommand("TaskTrackerSDK.historyUserLevel",Kc);Ne.registerCommand("TaskTrackerSDK.historyUserScore",Vc);Ne.registerCommand("TaskTrackerSDK.taskEvent",Gc);R("TaskTrackerSDK.onLevelFinished",{version:"1.0.0",properties:{levelId:"1.0.0",params:{result:"1.0.0",duration:"1.0.0"}}});R("TaskTrackerSDK.onTaskFinished",{version:"1.0.0",properties:{taskId:"1.0.0",duration:"1.0.0"}});R("TaskTrackerSDK.onLevelUpgrade",{version:"1.0.0",properties:{levelId:"1.0.0",name:"1.0.0"}});R("TaskTrackerSDK.onHistoryUserLevel",{version:"1.0.0",properties:{level:"1.0.0"}});R("TaskTrackerSDK.onHistoryUserScore",{version:"1.0.0",properties:{score:"1.0.0"}});R("TaskTrackerSDK.onTaskEvent",{version:"1.0.0",properties:{taskId:"1.0.0",params:{tools:{id:"1.0.0",name:"1.0.0",count:"1.0.0",description:"1.0.0",price:{amount:"1.0.0",unit:"1.0.0"}},awards:{id:"1.0.0",name:"1.0.0"}}}})});var qc,Wc,es,ts=x(()=>{"use strict";J();G();se();P();Re();R("login",{version:"1.0.0",properties:{force:"1.0.0"},success:{errMsg:"1.0.0",code:"1.0.0",token:"1.0.0",isLogin:"1.0.0"}});R("checkSession",{version:"1.0.0",success:{errMsg:"1.0.0"}});qc=H("login",{implement(){return y(this,null,function*(){var s;let{data:{isLogin:e}}=yield Y("checkLoginAsync");if(e)return{isLogin:!0,token:(s=g.hostUserInfo)==null?void 0:s.token};re("onLoginStateChange",({isLogin:a,token:l,uuid:c})=>{c==r&&o({isLogin:a,token:l})});let t=N("loginSync"),{data:{uuid:r}}=t;if(!r)throw _e({code:-1,msg:"login failed"});let{promise:n,resolve:o}=new he,i=yield n;return g.onEnvConfigChanged({hostUserInfo:i}),ue.emit("onLoginComplete",i),i})}}),Wc=H("checkSession",{implement(){return y(this,null,function*(){let{data:{isLogin:e}}=yield Y("checkLoginAsync");return{isLogin:e}})}}),es=j();es.registerCommand("API.login",qc);es.registerCommand("API.checkSession",Wc)});function ns(){let e=new Map,t;return{registerRewardHandler(n,o){e.set(n,o)},handleReward(n,...o){return y(this,null,function*(){return yield n.reduce((s,a)=>y(this,null,function*(){let l=yield s;if(l===!0)return!0;rs&&console.log(`handleReward ${a}`);let c=e.get(a),d=c?yield c(...o):l;return rs&&console.log(`handleReward ${a} ${d}`),d}),Promise.resolve(!1))})},registerRewardsFetcher(n){return y(this,null,function*(){t=(...o)=>y(this,null,function*(){try{return yield n(...o)}catch(i){return console.error("getRewardOptions error:",i),["ADS"]}})})},getRewardsTypes(...n){return y(this,null,function*(){return t?yield t(...n):["ADS"]})}}}var rs,os=x(()=>{"use strict";J();rs=g.testMode});var zc,is,ss=x(()=>{"use strict";Zt();zc=()=>(e,t)=>e==="JOLI_COIN"&&t==="ADS"?-1:e==="ADS"&&t==="JOLI_COIN"?1:0,is=e=>{e.registerRewardsFetcher(t=>y(void 0,null,function*(){var i,s,a,l;let r=[],n=yield t.post("/api/games/unlock-options",{});return n.code!=="SUCCESS"?r:(Xt.emit(Qt,{options:((i=n.data)==null?void 0:i.unlockOptions)||[],userJoliCoin:((s=n.extra)==null?void 0:s.joliCoin)||{balance:0,enableAutoDeduct:!1}}),(((l=(a=n.data)==null?void 0:a.unlockOptions)==null?void 0:l.map(c=>c.type))||Array.from(r)).sort(zc()))}))}});var as,ls=x(()=>{"use strict";as=e=>t=>y(void 0,null,function*(){return e.adBreak(t),!0})});var cs,us=x(()=>{"use strict";cs=(e,t)=>e.some(r=>r.type==="JOLI_COIN"&&r.joliCoinChoices.some(n=>{var o;return n.joliCoinQuantity<=((o=t==null?void 0:t.balance)!=null?o:0)&&!!(t!=null&&t.enableAutoDeduct)}))});var ds,ps=x(()=>{"use strict";J();P();us();Zt();ds=(e,{onUnlockSuccess:t,onUnlockFailed:r})=>{let n=null,o=null,i=null,s=()=>{if(i){n=Promise.resolve(i);return}n=new Promise(a=>{o=a})};return s(),Xt.on(Qt,a=>{i=a,o&&(o(a),o=null)}),()=>y(void 0,null,function*(){try{n||s();let a=yield n;if(!cs((a==null?void 0:a.options)||[],a==null?void 0:a.userJoliCoin))return r==null||r(),!1;let l=yield e.post("/api/joli-coin/unlock",{data:{type:"GAME_REWARD",reqId:`${Ar()}-${g.mpType}-${Date.now()}`,gameInfo:{gameId:g.mpId}}});return l.code=="SUCCESS"?(t==null||t({quantity:l.data.quantity,balance:l.data.balance}),!0):(r==null||r(),!1)}catch(a){return console.error("JolicoinRewardHandler error:",a),r==null||r(),!1}})}});var De,Qt,Xt,Zt=x(()=>{"use strict";os();ss();P();ls();ps();De=ns();is(De);Qt="UNLOCK_OPTIONS_CHANGED",Xt=new oe});var er,Yc,Te,Qc,Xc,Zc,eu,ms=x(()=>{"use strict";P();se();rn();$r();ge();Ae();G();Zt();er=j(),Yc=()=>{let{data:e}=N("getNetworkStatusSync");return!!(e!=null&&e.isConnected)},Te=new ht(Q,{get:(e,t)=>q(e,w({method:"GET",responseType:"json",appendHostCookie:!0},t)).then(r=>r.response.data),post:(e,t,r)=>q(e,w({method:"POST",responseType:"json",appendHostCookie:!0},r)).then(n=>n.response.data)},Yc);De.registerRewardHandler("ADS",as(Te));De.registerRewardHandler("JOLI_COIN",ds(Te.httpClient,{onUnlockSuccess:e=>{let{quantity:t,balance:r}=e,n=r>=1e3?"999+":r;Ci(`{slot-checkmark} \u2212${t} {slot-coin} | Balance: ${n} {slot-coin}`,{customStyle:{mark:{marginRight:"8px"}}})},onUnlockFailed:()=>{console.log("onUnlockFailed")}}));Qc=D("adInit",{implement:e=>{Te.init(e)}}),Xc=D("adConfig",{implement:e=>{Te.adConfig(e)}}),Zc=D("adBreak",{implement:e=>{e.type==="reward"?De.getRewardsTypes(Te.httpClient).then(t=>{De.handleReward(t,e)}):Te.adBreak(e)}}),eu=D("adUnit",{implement:e=>{Te.adUnit(e)}});er.registerCommand("AdsSDK.init",Qc);er.registerCommand("AdsSDK.adConfig",Xc);er.registerCommand("AdsSDK.adBreak",Zc);er.registerCommand("AdsSDK.adUnit",eu);R("AdsSDK.init",{version:"1.0.0"});R("AdsSDK.adConfig",{version:"1.0.0"});R("AdsSDK.adBreak",{version:"1.0.0"});R("AdsSDK.adUnit",{version:"1.0.0"})});var hn,tu,ru,nu,fs=x(()=>{"use strict";P();G();se();J();hn=j(),tu=D("openSchemaSync",{paramsSchema:f.tuple(f.string()),implement:e=>{let t=e;e.match(/^https?:\/\//)||(t=`https://${g.mpId}.app.jolibox.com${e.startsWith("/")?"":"/"}${e}`);let r=N("openSchemaSync",{schema:t});if(r.errNo!==0)throw new Ke(r.errMsg,r.errNo)}}),ru=D("openPageSync",{paramsSchema:f.tuple(f.string()),implement:e=>{let{errNo:t,errMsg:r,data:n}=N("openPageSync",{url:e});if(t!==0||!n)throw new Ke(r,t);return{webviewId:n.webviewId}}}),nu=D("closePageSync",{paramsSchema:f.tuple(f.number()),implement:e=>{let{errNo:t,errMsg:r}=N("closePageSync",{webviewId:e});if(t!==0)throw new Ke(r,t)}});hn.registerCommand("RouterSDK.openSchema",tu);hn.registerCommand("RouterSDK.openPage",ru);hn.registerCommand("RouterSDK.closePage",nu);R("router.openSchema",{version:"1.1.10"});R("router.openPage",{version:"1.1.10"});R("router.closePage",{version:"1.1.10"})});var ou={};var uh,fh,hs=x(()=>{"use strict";$i();uh=bn(Ji());Yi();Qi();Xi();fh=bn(Zi());ts();ms();fs()});var _s=Symbol.for("JOLIBOX_IMPLEMENT_INIT");if(window[_s])throw console.info("Jolibox Implement Already Initialized"),new Error("Jolibox Implement Already Initialized");window[_s]=!0;y(void 0,null,function*(){let[{config:e}]=yield Promise.all([Promise.resolve().then(()=>(Li(),Di)),Promise.resolve().then(()=>(hs(),ou)),Promise.resolve().then(()=>(ge(),Do))]);e()});
|
|
184
|
+
`;let m=document.createElement("div");m.id="recommend-panel-content",l.appendChild(p),l.appendChild(m),a(l)}},[]);return kr(()=>{if(i){let d=i.getElementById("recommend-panel-content");d&&Et(R("div",{className:"recommend-panel",children:R("div",{className:"container",children:[R("p",{className:"title",children:t}),R("div",{className:"games-container",children:R(OL,{list:r||[],routeMode:"REDIRECT",layerName:"RecommendedGuide",onGameClick:u})}),R("div",{className:"buttons-container",children:R(Pw,{children:R(Cw,{gutter:10,children:(n!=null?n:[]).map((l,p)=>R("div",{className:"button-wrapper",children:R("button",{className:`button ${l.type===xu.Quit?"quit-button":"action-button"}`,onClick:()=>s(l),children:l.text})},p))})})})]})}),d)}},[i,r,t,n,s,u]),R("div",{ref:c})},Nw=e=>{let r=EL({title:e.title,content:R(PL,{games:e.games,title:e.title,buttons:e.buttons,onClose:e.onClose}),backdropColor:"#1a1a1a",placement:"bottom",noHeader:!0,padding:"0px",onClose:()=>{console.log("onClose")},onOpen:e.onOpen});return r.show(),r},Dw=new Map,Lw=(e,r)=>{Dw.set(e,r)};Lw(/^\{slot-checkmark\}/,(e,r)=>{var n,o;let t=(o=(n=r==null?void 0:r.customStyle)==null?void 0:n.mark)!=null?o:{};return R("div",{style:t,children:R("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",style:{height:"24px",verticalAlign:"middle"},children:[R("g",{clipPath:"url(#clip0_2247_16523)",children:R("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM9.29 16.29L5.7 12.7C5.31 12.31 5.31 11.68 5.7 11.29C6.09 10.9 6.72 10.9 7.11 11.29L10 14.17L16.88 7.29C17.27 6.9 17.9 6.9 18.29 7.29C18.68 7.68 18.68 8.31 18.29 8.7L10.7 16.29C10.32 16.68 9.68 16.68 9.29 16.29Z",fill:"white"})}),R("defs",{children:R("clipPath",{id:"clip0_2247_16523",children:R("rect",{width:"24",height:"24",fill:"white"})})})]})})});CL="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAUNSURBVHgBfVRZbFRlFP7+e+/cmc5MO22ntGALLZUWhoZFqBgaNUYJMUYehBgwJLw0wRd9MJr4AokvJibG6JtLoompkhgNBoNbERQqVEQLtdu0dN9nptPOcvft98xU3Kje5Cb3vzn/d77zfeccYO1HaG9vr0xlZz+ZvZXJ955TeO8XKh+5oPPRzrR29Uz8fbwCoRC31mW2FuB8PD3HRH/N2Od5NnDLQlmlH9x1sZhU4CvT0XpfEyyf4/GqTOqRp+tr6Y77X6BsfHz8QHip5ht3SBDKDwiYHbQQLpOQHxfBZA5XNFBRK8BeAT58bxg1tTvRtMPlXek32k69fOqnu0B7+3sfb9m+7bx+1hOVqAl3yYcQcei6MIW6xghEDvR0p7Dl3iiEsAxFtTD0M0PN1nUQxGXPt6N7z+HDh3v/DirM3VBc55KDymN+5PtcDAzE8djx3XCzXlE4z2LwvMILXO25DTvZBCE4jdR4GOLmEASW4kdfbBAplBdAhZFLWmLg41TVpr0yMotBhFsW0bprM7jDiyG8AOYUkAFSsnieT2ZIZwm2yjCbTmDDjgYEfcmRpoc3biu6l9fNyn2H6jC27IfujGJPbDOSoyZuXluEp5KGGgETU9ddBeREtyZajuu/TkLnLuoq6sCSDi686TbvPblXYjMzM+96c5UnHVPAwqCKfY9WgOc8pKYNhJqDEKW/1P/t8gx2xkhoKoARHRYETGaB2wJk2YNBMSNfxl+XskOR45lrHkp2SwhIGsxUhKI5bINDDgGDXy9CEFYZlkBG3/AcYg21xSSFfKGN1BkhAT7dh2Alw9Jk2QnJy/lDuXwWK/E8ttaFYemFeBGGSZnzHpqbN8AwXALlxI6kiLq48tU09u/ftCrFBCWv4bDggAUEuitVS4oKqNxACQsjq5oIqqVgzINJcuiaAEnhxUScSvZJDEYYUHQLhu5B9gRqJwZlhr6DHD5iHAoxJhTa5PbCFKrqXSTTBlRFgKLQiJDTjEpU6VujxJrGoVGCPJ0tGzDIQEsDsgs2cssckiPDyJFptUEIkai+MpdLY2XGT2DlyOXpIhnlwY9vO4Yhl7sINJqQa03och66IlEXEGPLo0TUOUmRxPJhflQl5jI+PZ9YYmN9I+8MXYk8m56S4VAvVkU8lAZLCwZT03P0x+NY11QB26YhIOrD8TEcanuoOAQyja2VJMbkvEjv8KSB7qvZV9nBgwdDR9o+U3p+nMATR6sR7wqhdbefSmZ/DpxEujHGV0eP9BbpHPSTniRVzpeCoMtY5AHc6Erwt75rEIXOzk7t0Ak+8dSx9ei+GMa2+1V0/7JEa0eH4VAHkLia5cIkpjZVYpMHkuRBT3m4nUlDTwcQ8PlQKjmIrlevFxMXZvWexsiWvFXGo5V9uPy9g/rmABYWJCgJEs01yWEKpHaSRAvqgo7pcR0TpgJTlxCRAmAxGRNZlZ/+qOXBAt6dJetVxfr2BNe1eEeeCSE1S5O0IYNl0tRwbFgKga3k4IvYsAMGFnUBAY+qipZAaKUBcDRvaPDMxjt79R9LuqPj7K6y/JM3t8dclpnIwsuEyXWvKENqDAhUu3Amy4uxWTuLTW1+XP9B8+T6K43PvXRkCv+z+cXBc4nemepALBD2CzHLQSBMeiYljI66uNjnoIbkMSYs9M+b/W93VO9EcRusvfnv+p9L5V6Dydt7LktRTSFzdMFzBCWRdCc/eP6FB07/Ecv/ffl3auuKkJv2jm0AAAAASUVORK5CYII=";Lw(/^\{slot-coin\}/,(e,r)=>{var n;let t=(n=r==null?void 0:r.coinImage)!=null?n:CL;return R("img",{src:t,alt:"\u{1FA99}",style:{height:"1em",verticalAlign:"middle"}})});NL=(e,r)=>{if(!e.includes("{slot-"))return e;let t=[],n=0;for(;n<e.length;){let i=null,a=1/0,s=null;for(let[u,c]of Dw.entries()){let d=u.source.startsWith("^")?u.source.slice(1):u.source,l=new RegExp(d,"g");l.lastIndex=n;let p=l.exec(e);p&&p.index<a&&(i=p,a=p.index,s=c)}if(i&&s)a>n&&t.push(e.substring(n,a)),t.push(s(i,r)),n=a+i[0].length;else{t.push(e.substring(n));break}}let o=er`
|
|
185
|
+
display: 'flex',
|
|
186
|
+
alignItems: 'center',
|
|
187
|
+
gap: '4px',
|
|
188
|
+
color: '#FFF',
|
|
189
|
+
fontFamily: '"PingFang SC"',
|
|
190
|
+
fontSize: '16px',
|
|
191
|
+
fontStyle: 'normal',
|
|
192
|
+
fontWeight: 600,
|
|
193
|
+
lineHeight: '18px',
|
|
194
|
+
width: 'max-content'
|
|
195
|
+
`;return t.length===1?t[0]:R("div",{className:o,children:t})},DL=({message:e,type:r="info",duration:t=3e3,onClose:n})=>{let[o,i]=Bo(!0);kr(()=>{let s=setTimeout(()=>{i(!1),setTimeout(()=>{n==null||n()},300)},t);return()=>clearTimeout(s)},[t,n]);let a=er`
|
|
196
|
+
position: fixed;
|
|
197
|
+
top: max(20px, env(safe-area-inset-top));
|
|
198
|
+
left: 50%;
|
|
199
|
+
padding: 8px 12px;
|
|
200
|
+
max-width: min(85vw, 400px);
|
|
201
|
+
min-width: 200px;
|
|
202
|
+
width: auto;
|
|
203
|
+
background: ${r==="success"?"#4caf50":r==="error"?"#f44336":r==="warning"?"#ff9800":"#2F2F3B"};
|
|
204
|
+
color: white;
|
|
205
|
+
border-radius: 8px;
|
|
206
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
207
|
+
z-index: 9999;
|
|
208
|
+
transition: opacity 0.3s, transform 0.3s;
|
|
209
|
+
opacity: ${o?1:0};
|
|
210
|
+
transform: ${o?"translate(-50%, 0)":"translate(-50%, -20px)"};
|
|
211
|
+
text-align: center;
|
|
212
|
+
word-wrap: break-word;
|
|
213
|
+
`;return R("div",{className:`toast toast-${r} ${o?"toast-visible":"toast-hidden"} ${a}`,children:e})},Fw=(e,r)=>{let t=document.createElement("div");document.body.appendChild(t);let n=()=>{document.body.removeChild(t)},o=NL(e,r);Et(R(DL,{message:o,type:r==null?void 0:r.type,duration:r==null?void 0:r.duration,onClose:n}),t)}});function jw(){return E(this,null,function*(){if(ku)return ku;let r=`${S.testMode?"https://stg-game.jolibox.com":"https://game.jolibox.com"}/api/user-retention/exit-recommendations?objectId=${S.mpId}&from=GAME_DETAIL`,{response:{data:t}}=yield pe(r);return ku=t,t})}function Uw(){return E(this,null,function*(){let e=new nr;if(S.mpType!=="game")return e.resolve(!1),e.promise;let r=yield jw();if(r.code!=="SUCCESS")return e.resolve(!1),e.promise;let{gameListInfo:t,title:n,buttons:o}=r.data,i=Nw({games:t.games,title:n,buttons:o,onClose:a=>{var s;switch(a.type){case"quit":e.resolve(!1);break;case"dismiss":e.resolve(!0),i.hide();break;case"navigate":(s=a.data)!=null&&s.game?LL(a.data.game):e.resolve(!0),i.hide();break;default:e.resolve(!0);break}}});return e.promise})}var ku,LL,Mw=T(()=>{"use strict";ie();fe();C();qu();Dr();ku=null;jw();LL=e=>{var s;let{data:r}=j("envSync"),t=new URL(r.schema),n=t.pathname,o=new URLSearchParams(t.search);o.set("gameId",S.mpId),o.set("joliSource",S.encodeJoliSourceQuery({__mpType:"game",__orientation:(s=e.orientation)!=null?s:"VERTICAL"}));let a=`${`https://${e.gameId}.content.jolibox.com/`}${n}?${o.toString()}`;j("openSchemaSync",{schema:a})}});var Bw={};Ku(Bw,{config:()=>HL});function FL(){Lr.on("isAdShowing",e=>{Yo=e,ht(Yo)&&j("updateContainerConfigSync",{displayCapsuleButton:!Yo,webviewId:S.webviewId})})}function jL(){Ge.on("onDocumentReady",()=>{var e;(e=globalThis.joliboxJSCore)==null||e.onDocumentReady(window.location.href),we("onDocumentReady",{start_timestamp:Xo,timestamp:Date.now()})})}function UL(e){S.mpType==="game"&&me.start(e)}function ML(){Pe("onJoliboxServiceReady",({runtimeInfo:e,loadDuration:r})=>{e&&S.onEnvConfigChanged({hostUserInfo:e}),Ge.emit("LifecycleEvent.onReady",I({},S.hostUserInfo?S.hostUserInfo:{isLogin:!1})),we("joliboxServiceReady",{start_timestamp:Xo,timestamp:Date.now()}),UL(r)}),Pe("onBeforeExit",({uuid:e})=>{var r;(r=globalThis.joliboxJSCore)==null||r.doExit(e)})}function BL(){let e=()=>{we("onBeforeExit",{timestamp:Date.now()}),zo==null||zo(),me.close(Date.now()-Xo)};Ke.onDoExit(()=>E(this,null,function*(){return Yo?!0:ht(S.shouldInterupt)?(S.shouldInterupt||e(),S.shouldInterupt):Qo!=null&&Qo.canShowRecommended&&(yield Uw())?!0:(e(),!1)}))}function $L(){return E(this,null,function*(){let e=`${S.baseApiHost}/api/fe-configs/js-sdk/basic-meta`,{response:{data:r}}=yield pe(e);r&&(Qo=r)})}function HL(){Xo=Date.now(),ML(),FL(),BL(),jL(),$L(),zo=ol()}var zo,Xo,Yo,Qo,$w=T(()=>{"use strict";fe();ie();C();ir();il();da();Mw();Dr();Yo=!1,Qo=null;Ke.onReady(()=>{})});function Hw(e){let r=Yi.config[e];return r||(r={},Yi.config[e]=r),(t,n)=>{if(r[t]){Ce.warn(`[can i use] ${t} already registered`);return}r[t]=I({},n)}}var Kw=T(()=>{"use strict";C()});function Ou(e){Gw=e}function Zo(e){return e===null||typeof e!="object"?e:Array.isArray(e)?e.map(r=>Zo(r)):Object.keys(e).reduce((r,t)=>(r[t]=Zo(e[t]),r),{})}function rr(e){return typeof e=="number"}function Pu(e){let r=Cu(e);switch(r){case"string":return`"${e}"`;case"number":case"boolean":case"null":case"undefined":return String(e);default:return`a(n) ${r}`}}function Cu(e){return typeof e=="function"?"function":Object.prototype.toString.call(e).slice(8).slice(0,-1).toLowerCase()}var Gw,Q,ei,ri,ti,ni,at,oi,ii,ai,si,ui,ci,li,di,fi,pi,mi,vi,Nu=T(()=>{"use strict";Gw=!1;Q=class{constructor(){this.errors=[];this.hasFallback=!1;this.hasDefault=!1;this._optional=!1}fail(r){if(Gw)if(typeof r=="string")this.errors.push(r);else{let t=`${this.path} should be ${r.expect}`;this._optional&&r.expect!=="undefined"?t+=" or undefined, ":t+=", ",t+=`but got ${Pu(r.actual)}`,this.errors.push(t)}return!1}fallback(r){return this.hasFallback=!0,this._fallback=r,this}get fallbackValue(){return Zo(this._fallback)}default(r){return this.hasDefault=!0,this._default=r,this}get defaultValue(){return typeof this._default=="function"?this._default:Zo(this._default)}optional(){return this._optional=!0,this}};ei=class extends Q{validate(r){return this._optional&&r===void 0?!0:rr(r)?rr(this._min)&&r<this._min?this.fail(`the value of ${this.path} should be greater than or equal to ${this._min}`):rr(this._max)&&r>this._max?this.fail(`the value of ${this.path} should be less than or equal to ${this._max}`):rr(this._greater)&&r<=this._greater?this.fail(`the value of ${this.path} should be greater than ${this._greater}`):this._isInt&&r!==Math.floor(r)?this.fail(`the value of ${this.path} should be integer but got ${r}`):!0:this.fail({expect:"number",actual:r})}min(r){return this._min=r,this}max(r){return this._max=r,this}isInt(r){return this._isInt=r,this}greater(r){return this._greater=r,this}},ri=class extends Q{validate(r){return this._optional&&r===void 0?!0:typeof r!="boolean"?this.fail({expect:"boolean",actual:r}):!0}},ti=class extends Q{validate(r){if(this._optional&&r===void 0)return!0;if(typeof r!="string")return this.fail({expect:"string",actual:r});if(rr(this._maxLength)&&r.length>this._maxLength)return this.fail(`the length of ${this.path} should be less than or equal to ${this._maxLength}`);if(rr(this._minLength)&&r.length<this._minLength)return this.fail(`the length of ${this.path} should be greater than or equal to ${this._minLength}`);if(typeof this._pattern=="string"){if(!new RegExp(this._pattern).test(r))return this.fail(`${this.path} should match pattern "${this._pattern}"`)}else if(this._pattern&&!this._pattern.test(r))return this.fail(`${this.path} should match pattern "${this._pattern.toString()}"`);return!0}minLength(r){return this._minLength=r,this}maxLength(r){return this._maxLength=r,this}pattern(r){return this._pattern=r,this}},ni=class extends Q{validate(r){return this._optional&&r===void 0?!0:typeof r!="symbol"?this.fail({expect:"symbol",actual:r}):!0}},at=class extends Q{validate(r){return!0}},oi=class extends Q{validate(r){return r!==void 0?this.fail({expect:"undefined",actual:r}):!0}},ii=class extends Q{validate(r){return this._optional&&r===void 0?!0:r!==null?this.fail({expect:"null",actual:r}):!0}},ai=class extends Q{validate(r){return this._optional&&r===void 0?!0:typeof r!="function"?this.fail({expect:"function",actual:r}):!0}},si=class extends Q{constructor(...r){super(),this._items=r}validate(r){if(this._optional&&r===void 0)return!0;if(!this._items.includes(r)){let t=this._items.map(n=>JSON.stringify(n)).join(", ");return this.fail(`expect ${this.path} to be one of ${t}, but got ${Pu(r)}`)}return!0}},ui=class extends Q{constructor(t){super();this._item=t}validate(t){if(this._optional&&t===void 0)return!0;if(!Array.isArray(t))return this.fail({expect:"array",actual:t});if(rr(this._minItems)&&t.length<this._minItems)return this.fail(`the length of ${this.path} should be greater than or equal to ${this._minItems}`);if(rr(this._maxItems)&&t.length>this._maxItems)return this.fail(`the length of ${this.path} should be less than or equal to ${this._maxItems}`);if(rr(this._length)&&t.length!==this._length)return this.fail(`the length of ${this.path} should be equal to ${this._length}`);let n=this._item;if(!n)return!0;let o=!0;if(t.forEach((i,a)=>{if(n.path=`${this.path}[${a}]`,n.errors=this.errors,i===void 0&&n.hasDefault){t[a]=n.defaultValue;return}n.validate(i)||(n.hasFallback?t[a]=n.fallbackValue:o=!1)}),this._uniqueItems){let i=new Map;for(let a in t)i.has(t[a])?o=this.fail(`${this.path} should NOT have duplicate items (${this.path}[${i.get(t[a])}] and ${this.path}[${a}] are identical)`):i.set(t[a],a)}return o}minItems(t){return this._minItems=t,this}maxItems(t){return this._maxItems=t,this}uniqueItems(){return this._uniqueItems=!0,this}length(t){return this._length=t,this}},ci=class extends Q{constructor(t){super();this._value=t}validate(t){if(this._optional&&t===void 0)return!0;if(Cu(t)!=="object")return this.fail({expect:"object",actual:t});let o=t,i=this._value;i.errors=this.errors;let a=!0;for(let s in o){let u=o[s];if(/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/.test(s)?i.path=`${this.path}.${s}`:i.path=`${this.path}["${s}"]`,!(u===void 0&&i._optional)){if(u===void 0&&i.hasDefault){o[s]=i.defaultValue;continue}i.validate(u)||(i.hasFallback?o[s]=i.fallbackValue:a=!1)}}return a}},li=class extends Q{constructor(t={}){super();this._object=t}validate(t){if(this._optional&&t===void 0)return!0;if(Cu(t)!=="object")return this.fail({expect:"object",actual:t});let n=t,o=!0;for(let i in this._object){let a=n[i],s=this._object[i];if(s.errors=this.errors,/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/.test(i)?s.path=`${this.path}.${i}`:s.path=`${this.path}["${i}"]`,!(s._optional&&a===void 0)){if(a===void 0&&s.hasDefault){n[i]=s.defaultValue;continue}s.validate(a)||(s.hasFallback?n[i]=s.fallbackValue:o=!1)}}return o}},di=class extends Q{constructor(t){super();this.value=t}validate(t){return t===void 0&&this._optional?!0:t!==this.value?this.fail({expect:Pu(this.value),actual:t}):!0}},fi=class extends Q{constructor(...r){super(),this._items=r}validate(r){if(r===void 0&&this._optional)return!0;let t=[],n=!1,o=this._items.length;for(let i=0;i<o;i++){let a=this._items[i];if(a.errors=[],a.path=this.path,!a.validate(r))t.push(a.errors.join("; "));else if(!n){n=!0;break}}if(!n){let i=t.join(`
|
|
214
|
+
or `);this.errors.push(i)}return n}},pi=class extends Q{constructor(...r){super(),this._items=r;let t=0,n=r.length-1;for(;n>=0;n--){let o=r[n];if(o._optional||o.hasDefault)t+=1;else break}this._minItems=r.length-t}validate(r){if(r===void 0&&this._optional)return!0;if(!Array.isArray(r))return this.fail({expect:"array",actual:r});if(r.length<this._minItems)return this.fail(`the length of ${this.path} should be greater than or equal to ${this._minItems}`);let t=!0;return this._items.forEach((n,o)=>{if(n.path=`${this.path}[${o}]`,n.errors=this.errors,r[o]===void 0&&n.hasDefault){r[o]=n.defaultValue;return}n.validate(r[o])||(n.hasFallback?r[o]=n._fallback:t=!1)}),t}},mi=class extends Q{validate(r){return r===void 0&&this._optional||r instanceof ArrayBuffer?!0:this.fail({expect:"arraybuffer",actual:r})}},vi=class extends Q{constructor(r){super(),this._ctor=r}validate(r){return r===void 0&&this._optional||r instanceof this._ctor?!0:this.fail({expect:`typedarray of ${this._ctor.name}`,actual:r})}}});function Du(e,r,t="param"){if(e.errors=[],e.path=t,Ou(!0),!e.validate(r)){let n=e.errors.join(`
|
|
215
|
+
`);throw e.errors.length=0,Ou(!1),new TypeError(n)}}var b,Lu=T(()=>{"use strict";Nu();Nu();b={object(e){return new li(e)},array(e){return new ui(e)},tuple(...e){return new pi(...e)},literal(e){return new di(e)},or(...e){return new fi(...e)},symbol(){return new ni},record(e){return new ci(e)},function(){return new ai},boolean(){return new ri},string(){return new ti},number(){return new ei},undefined(){return new oi},null(){return new ii},unknown(){return new at},any(){return new at},as(){return new at},arraybuffer(){return new mi},enum(...e){return new si(...e)},typedarray(e){return new vi(e)}}});var hi,Vw,Jw=T(()=>{"use strict";C();De();Lu();Nr();hi=1,Vw=e=>{function r(n,o){return(...i)=>{var l,p,m,v;let a=Date.now(),s={method:n,trace_id:hi};hi+=1;let u="SUCCESS",c=`${n}:ok`,d=0;try{if(o.paramsSchema)try{Du(o.paramsSchema,i,"params")}catch(_){throw aa(`${n}:fail ${_.message}`)}let y=o.implement(...i),h=y,g=`${n}:ok`;if(y&&"code"in y){let{code:_,data:x,message:A}=y;u=_,h=x,g=A}return{code:u,message:g,data:h}}catch(y){let h=y;d=(p=(l=h.code)!=null?l:h.errNo)!=null?p:2e3,u="FAILURE";let g=(v=(m=h.message)!=null?m:h.errMsg)!=null?v:`${y}`;return c=`${n}:${u} ${g.replace(/^\S+:(fail|cancel)\s?/,"")}`,ce(new _t(c,d)),{code:u,message:c}}finally{let y=Date.now()-a;e("apiInvoked",N(I({},s),{duration:y,status:u}))}}}function t(n,o){return(...i)=>E(this,null,function*(){var p,m,v,y;let a=gc(i)?i:[i],s=Date.now(),u={method:n,trace_id:hi};hi+=1;let c=`${n}:ok`,d="SUCCESS",l={code:d,message:c};try{if(o.paramsSchema)try{Du(o.paramsSchema,a,"params")}catch(_){throw aa(_.message)}let g=yield o.implement(...a);if(g&&"code"in g){let{code:_,data:x,message:A}=g;d=_,c=A,g=x}return Object.assign(l,{code:d,message:c,data:g}),l}catch(h){let g=h,_=(m=(p=g.code)!=null?p:g.errNo)!=null?m:2e3;d="FAILURE";let x=(y=(v=g.message)!=null?v:g.errMsg)!=null?y:`${h}`,A=`${n}:${d} ${x.replace(/^\S+:(fail|cancel)\s?/,"")}`;return Object.assign(l,{code:d,message:A}),ce(new _t(A,_)),l}finally{let h=Date.now()-s;e("apiInvoked",N(I({},u),{duration:h,status:d}))}})}return{createAPI:t,createSyncAPI:r}}});var oe,$,P,Be=T(()=>{"use strict";Kw();ir();Jw();Lu();({createAPI:oe,createSyncAPI:$}=Vw(we)),P=Hw("native")});var Ww,GL,VL,JL,WL,zw=T(()=>{"use strict";C();Be();fe();Ww=W(),GL="env",VL="getSystemInfoSync",JL=$(VL,{implement:()=>{var t;let e=j("envSync"),{data:r}=e;return{system:r.deviceInfo.system,platform:r.deviceInfo.platform.toLowerCase(),version:r.sdkInfo.jssdkVersion,pixelRatio:r.deviceInfo.pixelRatio,language:r.deviceInfo.lang,brand:r.deviceInfo.brand,appName:(t=r.hostInfo)==null?void 0:t.appName,SDKVersion:r.sdkInfo.jssdkVersion}}}),WL=$(GL,{implement:()=>{var r;let e=j("envSync");return(r=e==null?void 0:e.data)!=null?r:void 0}});Ww.registerCommand("API.getSystemInfoSync",JL);Ww.registerCommand("API.env",WL);P("env",{version:"1.0.0"});P("getSystemInfoSync",{version:"1.0.0"})});var Yw=f(Fu=>{"use strict";C();Be();De();fe();ir();ie();var zL="exitGame",YL="onReady",QL="onJoliboxShow",XL="onJoliboxHide",gi=W(),yi=yn(ce),ZL=oe(zL,{paramsSchema:b.tuple(b.function(),b.boolean().optional().default(!1)),implement:(e,r=!1)=>E(Fu,null,function*(){yi(e).call(Fu),ht(S.shouldInterupt)&&!S.shouldInterupt&&S.from&&dc("onRetentionResult",{shouldStay:r},S.from,!0),yield be("exitAppAsync")})}),eF=$(QL,{paramsSchema:b.tuple(b.function()),implement(e){let r=yi(e);Pe("onJoliboxEnterForeground",()=>{r.call(this),bt.emit("visible",!0)})}}),rF=$(XL,{paramsSchema:b.tuple(b.function()),implement(e){let r=yi(e);Pe("onJoliboxEnterBackground",()=>{r.call(this),bt.emit("visible",!1)})}}),tF=$(YL,{paramsSchema:b.tuple(b.function()),implement(e){let r=yi(e);Ge.on("LifecycleEvent.onReady",t=>{r(t)})}});gi.registerCommand("LifecycleSDK.exit",ZL);gi.registerCommand("LifecycleSDK.onReady",tF);gi.registerCommand("LifecycleSDK.onJoliboxShow",eF);gi.registerCommand("LifecycleSDK.onJoliboxHide",rF);P("lifeCycle.exit",{version:"1.0.0"});P("lifeCycle.onReady",{version:"1.0.0"});P("lifeCycle.onJoliboxShow",{version:"1.0.0"});P("lifeCycle.onJoliboxHide",{version:"1.0.0"})});function Qw(e){let r={};if(!yr(e))return r;for(let[t,n]of Object.entries(e)){let o=t.toLocaleLowerCase();n?typeof n=="object"?r[o]=Object.prototype.toString.call(n):r[o]=String(n):r[o]=""}return r}function Xw(e="GET"){if(e==="")return"POST";let r=e.toUpperCase();return["GET","OPTIONS","HEAD","POST","PUT","DELETE","TRACE","CONNECT","PATCH"].includes(r)?r:"GET"}function Zw(e,r=!1){if(e)return r||e>0&&e<=6e4?Math.ceil(e):6e4}function eS(e,r,t){if(["POST","PUT","PATCH"].includes(r)||!yr(t))return e;let[n,o=""]=e.split("?"),i=new URLSearchParams(o);for(let[s,u]of Object.entries(t))u!=null&&i.append(s,String(u));let a=i.toString();return a?`${n}?${a}`:n}var rS=T(()=>{"use strict";C()});var nF,oF,ju,Uu,tS,iF,aF,sF,nS=T(()=>{"use strict";Nr();ca();Be();rS();C();De();ie();nF=15,oF=wn("createRequestTaskSync","operateRequestTaskSync",{type:"public",baseUrl:S.baseApiHost}),ju=0,Uu=[],tS=yn(ce),iF=(e,r)=>{let t=e.filter(r),n=e.filter(o=>!r(o));return e.length=0,e.push(...n),t},aF=e=>{let r=new nr,t=()=>{};return $("request",{paramsSchema:b.tuple(b.object({url:b.string(),method:b.string(),headers:b.object(),data:b.object().optional(),query:b.object().optional(),dataType:b.string().default("json"),responseType:b.string().default("text"),enableCache:b.boolean().default(!1),appendHostCookie:b.boolean().default(!0),timeout:b.number().default(3e4),success:b.function(),fail:b.function()})),implement(o){let i=()=>E(this,null,function*(){var s,u;let a=tS(o.fail);try{if(ju+=1,r.state!=="pending")return;let{data:c,dataType:d,responseType:l,enableCache:p,appendHostCookie:m}=o,v=Qw(o.headers),y=Xw(o.method),h=Zw(o.timeout),g=eS(o.url,y,c),_=tS(o.success),x=Object.assign({},o,{method:y,header:v,data:y==="GET"||y==="HEAD"?void 0:c,enableCache:p,query:(s=o.query)!=null?s:{},dataType:d,responseType:l,appendHostCookie:m});h&&(x.timeout=h);let A=oF(g,x);{let{response:q}=yield A,{code:w,data:k,message:_e}=q;if(k&&typeof k=="object"&&"status"in k&&k.status!==200)throw or({code:k.status||-1,msg:`request:fail status ${k.status}`});r.resolve({code:w!=null?w:"SUCCESS",data:k,message:_e!=null?_e:"request:ok"}),_({code:"SUCCESS",message:"request:ok",data:k})}}catch(c){r.reject(c),a({code:"FAILURE",message:"httpRequst: failed"})}finally{ju-=1,(u=Uu.shift())==null||u()}});return ju>=nF?(t=()=>{iF(Uu,a=>a===i)},Uu.push(i)):i(),r.promise}})(e),{abort(){r.reject(or({code:-1,msg:"request:fail abort"})),t()}}},sF=W();sF.registerCommand("HttpSDK.request",aF);P("request",{version:"1.0.0"})});function pF(e){let r=Object.prototype.toString.call(e).split(" ")[1].split("]")[0].toLocaleLowerCase();return fF.includes(r)?r:""}function mF(e,r){try{switch(r){case"string":return e;case"object":return JSON.parse(e);case"number":return parseFloat(e);case"boolean":return e==="true";default:return""}}catch(t){return""}}function vF(e,r){try{switch(r){case"string":case"number":case"boolean":return`${e}`;case"object":return JSON.stringify(e);default:return""}}catch(t){return""}}var _i,uF,cF,lF,dF,N5,D5,fF,oS=T(()=>{"use strict";Be();fe();C();Dr();ie();_i=W(),uF=oe("getLocalStorage",{paramsSchema:b.tuple(b.string()),implement(e){return E(this,null,function*(){let{response:r}=yield pe(`/api/games/user-storage/${S.mpId}`,{method:"GET",responseType:"json",appendHostCookie:!0,query:{key:e}}),{data:{code:t,message:n,data:o}}=yield r;if(t==="SUCCESS")return{code:t,message:n,data:o==null?void 0:o.value};try{let{data:{data:i,dataType:a}}=yield be("getLocalStorageAsync",{key:e}),s=mF(i,a);return{code:t,message:`${n}. fallback to native`,data:s}}catch(i){return{code:"INTERNAL_ERROR",message:"[Jolibox SDK] get local storage failed",data:null}}})}});_i.registerCommand("StorageSDK.getItem",uF);P("storage.getItem",{version:"1.0.0",properties:{key:"1.0.0",value:"1.0.0"}});cF=oe("setStorage",{paramsSchema:b.tuple(b.string(),b.or(b.string(),b.boolean(),b.number())),implement(e,r){return E(this,null,function*(){let t=S.mpId,n=typeof r=="string"?r:String(r),{response:o}=yield pe(`/api/games/user-storage/${t}`,{method:"POST",responseType:"json",appendHostCookie:!0,data:{key:e,value:n}}),{data:{code:i,message:a}}=o,s=pF(r),u=vF(r,s);return yield be("setLocalStorageAsync",{key:e,data:u,dataType:s}),i=="SUCCESS"?{code:i,message:a}:{code:i,message:`${a}. fallback to native`}})}});_i.registerCommand("StorageSDK.setItem",cF);P("storage.setItem",{version:"1.0.0",properties:{key:"1.0.0",value:"1.0.0"}});lF=oe("removeStorage",{paramsSchema:b.tuple(b.string()),implement(e){return E(this,null,function*(){let r=S.mpId,{response:t}=yield pe(`/api/games/user-storage/${r}/remove`,{method:"POST",responseType:"json",appendHostCookie:!0,data:{key:e}}),{data:{code:n,message:o}}=t;return yield be("removeLocalStorageAsync",{key:e}),n==="SUCCESS"?{code:n,message:o}:{code:n,message:"[Jolibox SDK] remove item succ"}})}});_i.registerCommand("StorageSDK.removeItem",lF);P("storage.removeItem",{version:"1.0.0",properties:{key:"1.0.0"}});dF=oe("clearStorage",{implement(){return E(this,null,function*(){let e=S.mpId,{response:r}=yield pe(`/api/games/user-storage/${e}/clear`,{method:"POST",appendHostCookie:!0});be("clearLocalStorageAsync");let{data:{code:t,message:n}}=r;return t==="SUCCESS"?{code:t,message:n}:{code:t,message:`${n}.fallback to native`}})}});_i.registerCommand("StorageSDK.clear",dF);P("storage.clear",{version:"1.0.0"});N5=oe("getStorageInfo",{implement(){return E(this,null,function*(){let{data:e}=yield be("getStorageInfoAsync");return e})}});P("getStorageInfo",{version:"1.0.0",success:{keys:"1.0.0",currentSize:"1.0.0",limitSize:"1.0.0"}});D5=$("getStorageInfoSync",{implement(){return j("getStorageInfoSync")}}),fF=["string","number","boolean","object",""]});var hF,gF,yF,Mu,iS=T(()=>{"use strict";C();fe();Be();hF=$("showKeyboard",{paramsSchema:b.tuple(b.object({defaultValue:b.string().optional().default(""),multiple:b.boolean().optional().default(!1),maxLength:b.unknown().optional().default(1e5)})),implement(e){var n;let r=Math.floor((n=Number(e.maxLength))!=null?n:1e5),{defaultValue:t}=e;t&&r&&(t=t.slice(0,r)),j("showKeyboardSync",N(I({},e),{defaultValue:t,maxLength:r}))}});P("keyboard.showKeyboard",{version:"1.0.0",properties:{params:{defaultValue:"1.0.0",multiple:"1.0.0",confirmHold:"1.0.0",confirmType:"1.0.0",maxLength:"1.0.0"}},success:{errMsg:"1.0.0"}});gF=$("updateKeyboard",{paramsSchema:b.tuple(b.object({value:b.string()})),implement(e){j("updateKeyboardSync",e)}});P("keyboard.updateKeyboard",{version:"1.0.0",properties:{params:{value:"1.0.0"}}});yF=$("hideKeyboard",{implement(){j("hideKeyboardSync")}});P("keyboard.hideKeyboard",{version:"1.0.0"});Mu=W();Mu.registerCommand("KeyboardSDK.showKeyboard",hF);Mu.registerCommand("KeyboardSDK.updateKeyboard",gF);Mu.registerCommand("KeyboardSDK.hideKeyboard",yF)});var aS=f(Or=>{"use strict";C();Be();ir();var st=W(),_F=oe("levelFinished",{paramsSchema:b.tuple(b.string(),b.object({result:b.boolean(),duration:b.number()})),implement:(e,r)=>E(Or,null,function*(){let{result:t,duration:n}=r,o=[];o.push(me.tracker("LevelFinished",{levelId:e,result:t,duration:n})),o.push(me.reporter({event:"COMPLETE_GAME_LEVEL"})),yield Promise.all(o)})}),bF=oe("taskFinished",{paramsSchema:b.tuple(b.string(),b.object({duration:b.number()})),implement:(e,r)=>E(Or,null,function*(){let{duration:t}=r;return yield me.reportToNative({event:"TaskFinished",params:{duration:t,taskId:e}})})}),wF=oe("levelUpgrade",{paramsSchema:b.tuple(b.string(),b.string()),implement:(e,r)=>E(Or,null,function*(){let t=[];t.push(me.reportToNative({event:"LevelUpgrade",params:{name:r,levelId:e}})),yield Promise.all(t)})}),SF=oe("onHistoryUserLevel",{paramsSchema:b.tuple(b.number()),implement:e=>E(Or,null,function*(){return yield me.reportToNative({event:"HistoryUserLevel",params:{level:e}})})}),xF=oe("onHistoryUserScore",{paramsSchema:b.tuple(b.number()),implement:e=>E(Or,null,function*(){return yield me.reportToNative({event:"HistoryUserScore",params:{score:e}})})}),EF=oe("taskEvent",{paramsSchema:b.tuple(b.string(),b.object({tools:b.array(b.object({id:b.string(),name:b.string(),count:b.number(),description:b.string().optional(),price:b.object({amount:b.number(),unit:b.string()}).optional()})).optional(),awards:b.array(b.object({id:b.string(),name:b.string()})).optional()})),implement:(e,r)=>E(Or,null,function*(){var n,o;let t=[];t.push(me.reportToNative({event:"TaskEvent",params:I({taskId:e},r)})),(o=(n=r.tools)==null?void 0:n.length)!=null&&o&&(t.push(me.reporter({event:"USE_GAME_ITEM"})),t.push(me.reportToNative({event:"UseGameItem",params:I({taskId:e},r)}))),yield Promise.all(t)})});st.registerCommand("TaskTrackerSDK.levelFinished",_F);st.registerCommand("TaskTrackerSDK.taskFinished",bF);st.registerCommand("TaskTrackerSDK.levelUpgrade",wF);st.registerCommand("TaskTrackerSDK.historyUserLevel",SF);st.registerCommand("TaskTrackerSDK.historyUserScore",xF);st.registerCommand("TaskTrackerSDK.taskEvent",EF);P("TaskTrackerSDK.onLevelFinished",{version:"1.0.0",properties:{levelId:"1.0.0",params:{result:"1.0.0",duration:"1.0.0"}}});P("TaskTrackerSDK.onTaskFinished",{version:"1.0.0",properties:{taskId:"1.0.0",duration:"1.0.0"}});P("TaskTrackerSDK.onLevelUpgrade",{version:"1.0.0",properties:{levelId:"1.0.0",name:"1.0.0"}});P("TaskTrackerSDK.onHistoryUserLevel",{version:"1.0.0",properties:{level:"1.0.0"}});P("TaskTrackerSDK.onHistoryUserScore",{version:"1.0.0",properties:{score:"1.0.0"}});P("TaskTrackerSDK.onTaskEvent",{version:"1.0.0",properties:{taskId:"1.0.0",params:{tools:{id:"1.0.0",name:"1.0.0",count:"1.0.0",description:"1.0.0",price:{amount:"1.0.0",unit:"1.0.0"}},awards:{id:"1.0.0",name:"1.0.0"}}}})});var IF,TF,sS,uS=T(()=>{"use strict";ie();fe();Be();C();Nr();P("login",{version:"1.0.0",properties:{force:"1.0.0"},success:{errMsg:"1.0.0",code:"1.0.0",token:"1.0.0",isLogin:"1.0.0"}});P("checkSession",{version:"1.0.0",success:{errMsg:"1.0.0"}});IF=oe("login",{implement(){return E(this,null,function*(){var a;let{data:{isLogin:e}}=yield be("checkLoginAsync");if(e)return{isLogin:!0,token:(a=S.hostUserInfo)==null?void 0:a.token};Pe("onLoginStateChange",({isLogin:s,token:u,uuid:c})=>{c==t&&o({isLogin:s,token:u})});let r=j("loginSync"),{data:{uuid:t}}=r;if(!t)throw or({code:-1,msg:"login failed"});let{promise:n,resolve:o}=new nr,i=yield n;return S.onEnvConfigChanged({hostUserInfo:i}),Ge.emit("onLoginComplete",i),i})}}),TF=oe("checkSession",{implement(){return E(this,null,function*(){let{data:{isLogin:e}}=yield be("checkLoginAsync");return{isLogin:e}})}}),sS=W();sS.registerCommand("API.login",IF);sS.registerCommand("API.checkSession",TF)});function lS(){let e=new Map,r;return{registerRewardHandler(n,o){e.set(n,o)},handleReward(n,...o){return E(this,null,function*(){return yield n.reduce((a,s)=>E(this,null,function*(){let u=yield a;if(u===!0)return!0;cS&&console.log(`handleReward ${s}`);let c=e.get(s),d=c?yield c(...o):u;return cS&&console.log(`handleReward ${s} ${d}`),d}),Promise.resolve(!1))})},registerRewardsFetcher(n){return E(this,null,function*(){r=(...o)=>E(this,null,function*(){try{return yield n(...o)}catch(i){return console.error("getRewardOptions error:",i),["ADS"]}})})},getRewardsTypes(...n){return E(this,null,function*(){return r?yield r(...n):["ADS"]})}}}var cS,dS=T(()=>{"use strict";ie();cS=S.testMode});var RF,fS,pS=T(()=>{"use strict";Si();RF=()=>(e,r)=>e==="JOLI_COIN"&&r==="ADS"?-1:e==="ADS"&&r==="JOLI_COIN"?1:0,fS=e=>{e.registerRewardsFetcher(r=>E(void 0,null,function*(){var n,o,i,a;let t=["ADS"];try{let s=yield r.post("/api/games/unlock-options",{});return s.code!=="SUCCESS"?t:(wi.emit(bi,{options:((n=s.data)==null?void 0:n.unlockOptions)||[],userJoliCoin:((o=s.extra)==null?void 0:o.joliCoin)||{balance:0,enableAutoDeduct:!1}}),(((a=(i=s.data)==null?void 0:i.unlockOptions)==null?void 0:a.map(c=>c.type))||Array.from(t)).sort(RF()))}catch(s){return console.error("getRewardOptions error:",s),t}}))}});var mS,vS=T(()=>{"use strict";mS=e=>r=>E(void 0,null,function*(){return e.adBreak(r),!0})});var hS,gS=T(()=>{"use strict";hS=(e,r)=>e.some(t=>t.type==="JOLI_COIN"&&t.joliCoinChoices.some(n=>{var o;return n.joliCoinQuantity<=((o=r==null?void 0:r.balance)!=null?o:0)&&!!(r!=null&&r.enableAutoDeduct)}))});var yS,_S=T(()=>{"use strict";ie();C();gS();Si();yS=(e,{onUnlockSuccess:r,onUnlockFailed:t})=>{let n=null,o=null,i=null,a=()=>{if(i){n=Promise.resolve(i);return}n=new Promise(s=>{o=s})};return a(),wi.on(bi,s=>{i=s,o&&(o(s),o=null)}),s=>E(void 0,null,function*(){var u,c,d;try{n||a();let l=yield n;if(!hS((l==null?void 0:l.options)||[],l==null?void 0:l.userJoliCoin))return t==null||t(),!1;let p=yield e.post("/api/joli-coin/unlock",{data:{type:"GAME_REWARD",reqId:`${Xi()}-${S.mpType}-${Date.now()}`,gameInfo:{gameId:S.mpId}}});return p.code=="SUCCESS"?((c=s.adBreakDone)==null||c.call(s,{breakType:s.type,breakName:"name"in s&&(u=s.name)!=null?u:"",breakFormat:"reward",breakStatus:"viewed"}),"adViewed"in s&&((d=s.adViewed)==null||d.call(s)),r==null||r({quantity:p.data.quantity,balance:p.data.balance}),!0):(t==null||t(),!1)}catch(l){return console.error("JolicoinRewardHandler error:",l),t==null||t(),!1}})}});var ut,bi,wi,Si=T(()=>{"use strict";dS();pS();C();vS();_S();ut=lS();fS(ut);bi="UNLOCK_OPTIONS_CHANGED",wi=new Ne});var xi,AF,Pr,qF,kF,OF,PF,bS=T(()=>{"use strict";C();Be();qu();da();ir();Dr();fe();Si();xi=W(),AF=()=>{let{data:e}=j("getNetworkStatusSync");return!!(e!=null&&e.isConnected)},Pr=new Tn(we,{get:(e,r)=>pe(e,I({method:"GET",responseType:"json",appendHostCookie:!0},r)).then(t=>t.response.data),post:(e,r,t)=>pe(e,I({method:"POST",responseType:"json",appendHostCookie:!0},t)).then(n=>n.response.data)},AF);ut.registerRewardHandler("ADS",mS(Pr));ut.registerRewardHandler("JOLI_COIN",yS(Pr.httpClient,{onUnlockSuccess:e=>{let{quantity:r,balance:t}=e,n=t>=1e3?"999+":t;Fw(`{slot-checkmark} \u2212${r} {slot-coin} | Balance: ${n} {slot-coin}`,{customStyle:{mark:{marginRight:"8px"}}})},onUnlockFailed:()=>{console.log("onUnlockFailed")}}));qF=$("adInit",{implement:e=>{Pr.init(e)}}),kF=$("adConfig",{implement:e=>{Pr.adConfig(e)}}),OF=$("adBreak",{implement:e=>{e.type==="reward"?ut.getRewardsTypes(Pr.httpClient).then(r=>{ut.handleReward(r,e)}):Pr.adBreak(e)}}),PF=$("adUnit",{implement:e=>{Pr.adUnit(e)}});xi.registerCommand("AdsSDK.init",qF);xi.registerCommand("AdsSDK.adConfig",kF);xi.registerCommand("AdsSDK.adBreak",OF);xi.registerCommand("AdsSDK.adUnit",PF);P("AdsSDK.init",{version:"1.0.0"});P("AdsSDK.adConfig",{version:"1.0.0"});P("AdsSDK.adBreak",{version:"1.0.0"});P("AdsSDK.adUnit",{version:"1.0.0"})});var Bu,CF,NF,DF,wS=T(()=>{"use strict";C();fe();Be();ie();Bu=W(),CF=$("openSchemaSync",{paramsSchema:b.tuple(b.string()),implement:e=>{let r=e;e.match(/^https?:\/\//)||(r=`https://${S.mpId}.app.jolibox.com${e.startsWith("/")?"":"/"}${e}`);let t=j("openSchemaSync",{schema:r});if(t.errNo!==0)throw new yt(t.errMsg,t.errNo)}}),NF=$("openPageSync",{paramsSchema:b.tuple(b.string()),implement:e=>{let{errNo:r,errMsg:t,data:n}=j("openPageSync",{url:e});if(r!==0||!n)throw new yt(t,r);return{webviewId:n.webviewId}}}),DF=$("closePageSync",{paramsSchema:b.tuple(b.number()),implement:e=>{let{errNo:r,errMsg:t}=j("closePageSync",{webviewId:e});if(r!==0)throw new yt(t,r)}});Bu.registerCommand("RouterSDK.openSchema",CF);Bu.registerCommand("RouterSDK.openPage",NF);Bu.registerCommand("RouterSDK.closePage",DF);P("router.openSchema",{version:"1.1.10"});P("router.openPage",{version:"1.1.10"});P("router.closePage",{version:"1.1.10"})});var LF={};var BV,GV,SS=T(()=>{"use strict";zw();BV=B(Yw());nS();oS();iS();GV=B(aS());uS();bS();wS()});var xS=Symbol.for("JOLIBOX_IMPLEMENT_INIT");if(window[xS])throw console.info("Jolibox Implement Already Initialized"),new Error("Jolibox Implement Already Initialized");window[xS]=!0;E(void 0,null,function*(){let[{config:e}]=yield Promise.all([Promise.resolve().then(()=>($w(),Bw)),Promise.resolve().then(()=>(SS(),LF)),Promise.resolve().then(()=>(ir(),nl))]);e()});
|