@jolibox/implement 1.1.21 → 1.1.22

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.
@@ -1,4 +1,4 @@
1
- var Zw=Object.create;var Vn=Object.defineProperty,eE=Object.defineProperties,tE=Object.getOwnPropertyDescriptor,rE=Object.getOwnPropertyDescriptors,nE=Object.getOwnPropertyNames,Jn=Object.getOwnPropertySymbols,oE=Object.getPrototypeOf,la=Object.prototype.hasOwnProperty,du=Object.prototype.propertyIsEnumerable;var uu=(e,t,r)=>t in e?Vn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,R=(e,t)=>{for(var r in t||(t={}))la.call(t,r)&&uu(e,r,t[r]);if(Jn)for(var r of Jn(t))du.call(t,r)&&uu(e,r,t[r]);return e},q=(e,t)=>eE(e,rE(t));var Ze=(e,t)=>{var r={};for(var n in e)la.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Jn)for(var n of Jn(e))t.indexOf(n)<0&&du.call(e,n)&&(r[n]=e[n]);return r};var T=(e,t)=>()=>(e&&(t=e(e=0)),t);var f=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fu=(e,t)=>{for(var r in t)Vn(e,r,{get:t[r],enumerable:!0})},iE=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of nE(t))!la.call(e,o)&&o!==r&&Vn(e,o,{get:()=>t[o],enumerable:!(n=tE(t,o))||n.enumerable});return e};var ue=(e,t,r)=>(r=e!=null?Zw(oE(e)):{},iE(t||!e||!e.__esModule?Vn(r,"default",{value:e,enumerable:!0}):r,e));var x=(e,t,r)=>new Promise((n,o)=>{var i=l=>{try{s(r.next(l))}catch(c){o(c)}},a=l=>{try{s(r.throw(l))}catch(c){o(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,a);s((r=r.apply(e,t)).next())});function dE(e){return!!(e!=null&&e.__nativeBuffers__)}function ma(e){if(typeof e=="string")try{e=JSON.parse(e)}catch(r){return{}}if(typeof e!="object"||e===null)return{};if(!dE(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=fE(n.base64)),typeof o!="undefined"&&o instanceof ArrayBuffer&&(e[n.key]=o)}}return e}function hE(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 a=t?{value:i,key:o}:{base64:pE(i),key:o};n.push(a),delete r[o]}return n.length>0&&(r.__nativeBuffers__=n),r}function _E(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}function Au(e){return typeof e=="string"}function qr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function bE(e){return typeof e=="undefined"}function wE(e){return bE(e)||e===null}function Su(e){return typeof e=="function"}function EE(e){return qr(e)&&Su(e.then)}function Iu(e){let t=e,r=null,n=function(...o){return r||(r=new t(...o)),r};return n.prototype=t.prototype,n}function Nr(e){return(...t)=>{var r,n;((n=(r=globalThis.VConsole)==null?void 0:r[e])!=null?n:globalThis.console[e])(...t)}}function PE(){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 UE(e){return new Promise(t=>Tu(e)(t))}function Tu(e){return(t,r=null)=>{let n=!1;return e(o=>{if(!n)return n=!0,t.call(r,o)},null)}}function ME(e,t){return(r=>{let n,o={onWillAddFirstListener(){n=r(i.fire,i)}},i=new Ur(o);return i.event})((r,n=null)=>e(o=>t(o)&&r.call(n,o),null))}function FE(e,t){let r=Math.min(e.length,t.length);for(let n=0;n<r;n++)BE(e[n],t[n])}function BE(e,t){if(Au(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(Su(t)){try{if(e instanceof t)return}catch(r){}if(!wE(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 vu(e,t){return`[${e}]:${t}`}function KE(e,t){gu||(da=new Kn({eventName:"jolibox_invoke",tagNameOrder:["status","method","errNo","errMsg","isForeground"],metricName:"duration",reporter(o){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:o}),-1)}}),fa=new Kn({eventName:"jolibox_invoke_js2native",tagNameOrder:["status","method","isForeground"],metricName:"duration",reporter(o){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:o}),-1)}}),pa=new Kn({eventName:"jolibox_invoke_native2js",tagNameOrder:["status","method","isForeground"],metricName:"duration",reporter(o){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:o}),-1)}}),t("onJoliboxEnterBackground",()=>{da.flush(),fa.flush(),pa.flush()}),gu=!0);function r(o){var i,a;let{method:s,args:l,startTime:c,isForeground:d,errMsg:u=`${s}:fail no errMsg`,errNo:h=0,__timing:p={receiveJSInvoke:0,invokeCallback:0}}=o,{receiveJSInvoke:m,invokeCallback:g}=p,_=(a=(i=u.match(/\S:(\S+)\s?/))==null?void 0:i[1])!=null?a:"fail";da.report({status:_,method:n(s,l),errNo:`${h}`,errMsg:u,isForeground:d,duration:Date.now()-c}),c&&m&&g&&(fa.report({status:_,method:s,isForeground:d,duration:Number((m-c).toFixed(3))}),pa.report({status:_,method:s,isForeground:d,duration:Number((Date.now()-g).toFixed(3))}))}function n(o,i){return(o==="callHostMethod"||o==="callHostMethodSync")&&i!=null&&i.method?`${o}-${i.method}`:o}return r}function QE(e,t){let r=0,n=!0,o=YE.resolveMap,i=KE(e,t);t("onJoliboxEnterBackground",()=>{n=!1}),t("onJoliboxEnterForeground",()=>{n=!0,ha.forEach(l=>zn(this,[l],function*({method:c,args:d,resolve:u}){let h=yield s(c,d);u(h)})),ha.length=0});let a=(l,c)=>{let d=o.get(Number(l));if(!d)return;let u=ma(c);d(u),o.delete(Number(l))},s=(l,c)=>{var d,u;let h=Date.now(),p=`${n}`;r+=1;let m=new yE;if(o.set(r,m.resolve),!n&&JE.includes(l))return new Promise(k=>{ha.push({method:l,args:c,resolve:k})});let g=cE(It({},{method:l,startTime:h,args:c,isForeground:p}),{invokeType:"js-bridge"}),_=!WE&&HE.includes(l),v=hE(c,_),y=_?v:JSON.stringify(v),A;if(l.endsWith("Sync")||VE.includes(l)?A=(d=e.call)==null?void 0:d.call(e,l,v,r):typeof y=="string"?A=e.invoke(l,y,r):A=(u=e.call)==null?void 0:u.call(e,l,y,r),A){try{typeof A=="string"&&(A=JSON.parse(A)),A=ma(A)}catch(k){Ea.error(k)}return o.delete(r),A.errorCode&&(A.errorCode=vu(l,A.errorCode)),i(It(It({},g),A)),A}return l.endsWith("Sync")&&o.delete(r),m.promise.then(k=>(k.errorCode&&(k.errorCode=vu(l,k.errorCode)),i(It(It({},g),k)),k))};return{invokeNative:s,applyNative:(l,c)=>{let d=s(l,c);return EE(d)?d.then(u=>_u(l,u)):_u(l,d)},invokeHandler:a}}function _u(e,t){if(!qr(t)){Ea.warn(`[Jolibox SDK]${e} no response value`);return}let r=t,{errMsg:n,errNo:o,errorType:i,errorCode:a}=r,s=uE(r,["errMsg","errNo","errorType","errorCode"]);if(n&&n!==`${e}:ok`)throw new IE(n,o,i,a);return s}function XE(e){if(globalThis[Gn])return globalThis[Gn];let t=new _a,r=new _a,n=new Kn({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()}),globalThis[Gn]={onNative:t.on.bind(t),offNative:t.off.bind(t),subscribe:r.on.bind(r),unsubscribe:r.off.bind(r),subscribeHandler(o,i,a){let s=ma(i),l;if(s.__extra){l=s.params;let{type:c,startTime:d}=s.__extra;n.report({type:c,event:o,duration:Date.now()-d})}else l=s;if(o===Ru){l.forEach(c=>{let[d,u]=c;try{r.emit(d.slice(Lr.length),u,a)}catch(h){}});return}if(o.startsWith(Lr)){r.emit(o.slice(Lr.length),l,a);return}t.emit(o,l,a)}},globalThis[Gn]}function ZE(e){let t=new Map,r;return(n,o,i,a)=>{if(a){let l=i?[i]:"*";e.publish(`${Lr}${n}`,o,l);return}r||(r=Promise.resolve().then(()=>{t.forEach((l,c)=>{try{let d=c?[c]:"*";e.publish(Ru,l,d)}catch(d){}}),r=void 0,t.clear()}));let s=t.get(i);s||(s=[],t.set(i,s)),s.push([`${Lr}${n}`,o])}}function ex(e){let{subscribeHandler:t,onNative:r,offNative:n,subscribe:o,unsubscribe:i}=XE(e),{invokeNative:a,invokeHandler:s,applyNative:l}=QE(e,r),c=ZE(e);return{invokeHandler:s,subscribeHandler:t,applyNative:l,invokeNative:a,onNative:r,offNative:n,publish:c,subscribe:o,unsubscribe:i}}function ku(e,t){return{params:e,__extra:{startTime:Date.now(),type:t}}}var aE,sE,lE,Wn,bu,wu,pu,It,cE,uE,zn,fE,pE,Eu,mE,vE,xu,gE,yE,xE,AE,Yn,SE,IE,TE,ca,Ea,hu,RE,kE,CE,OE,NE,EU,va,K,DE,qE,Dr,Ur,_a,ya,LE,ua,jE,xU,ba,mu,AU,$E,Lr,HE,JE,VE,Ru,GE,Kn,gu,da,fa,pa,ha,WE,wa,zE,YE,Gn,xa,Je,Cu,Ou,tx,Pu,yu,we,L,Ve,SU,rx,Nu,IU,TU,Ie=T(()=>{"use strict";aE=Object.defineProperty,sE=Object.defineProperties,lE=Object.getOwnPropertyDescriptors,Wn=Object.getOwnPropertySymbols,bu=Object.prototype.hasOwnProperty,wu=Object.prototype.propertyIsEnumerable,pu=(e,t,r)=>t in e?aE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,It=(e,t)=>{for(var r in t||(t={}))bu.call(t,r)&&pu(e,r,t[r]);if(Wn)for(var r of Wn(t))wu.call(t,r)&&pu(e,r,t[r]);return e},cE=(e,t)=>sE(e,lE(t)),uE=(e,t)=>{var r={};for(var n in e)bu.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Wn)for(var n of Wn(e))t.indexOf(n)<0&&wu.call(e,n)&&(r[n]=e[n]);return r},zn=(e,t,r)=>new Promise((n,o)=>{var i=l=>{try{s(r.next(l))}catch(c){o(c)}},a=l=>{try{s(r.throw(l))}catch(c){o(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,a);s((r=r.apply(e,t)).next())});fE=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};pE=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)};Eu=Object.defineProperty,mE=Object.getOwnPropertyDescriptor,vE=(e,t)=>{for(var r in t)Eu(e,r,{get:t[r],enumerable:!0})},xu=(e,t,r,n)=>{for(var o=n>1?void 0:n?mE(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(n?a(t,r,o):a(o))||o);return n&&o&&Eu(t,r,o),o},gE=(e,t,r)=>new Promise((n,o)=>{var i=l=>{try{s(r.next(l))}catch(c){o(c)}},a=l=>{try{s(r.throw(l))}catch(c){o(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,a);s((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}yE=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))}})}};xE=(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))(xE||{}),AE=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}},Yn=class extends AE{constructor(){super(...arguments),this.kind="INTERNAL_ERROR"}},SE=class extends Yn{constructor(){super(...arguments),this.name="INTERNAL_INVOKE_NATIVE_ERROR"}},IE=class extends Yn{constructor(e,t,r,n){super(e),this.errNo=t,this.name="INTERNAL_APPLY_NATIVE_ERROR",this.errorType=r,this.errorCode=n}},TE=class extends Yn{constructor(){super(...arguments),this.name="INTERNAL_JSCORE_ERROR",this.priority="P0"}},ca=class extends Yn{constructor(){super(...arguments),this.name="INTERNAL_METRIC_REPORT_ERROR"}};Ea={log:Nr("log"),warn:Nr("warn"),info:Nr("info"),error:Nr("error"),debug:Nr("debug")};Object.assign(globalThis,{logger:Ea});hu=Symbol.for("Jolibox.canIUseMap"),RE={};globalThis[hu]||(globalThis[hu]=RE);kE=(e=>(e[e.System=1e3]="System",e[e.ErrorTrace=1001]="ErrorTrace",e[e.UserDefined=1002]="UserDefined",e))(kE||{}),CE=(e=>(e.MiniGame="mini-game",e.MiniDrama="mini-drama",e.App="app",e.WebSDK="web-sdk",e.AppSDK="app-sdk",e))(CE||{}),OE=(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))(OE||{});PE();NE=()=>!!(navigator.userAgent||"").includes("JoliboxPlatformSDK"),EU={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")},va=class ga{constructor(t){this.element=t,this.next=ga.Undefined,this.prev=ga.Undefined}};va.Undefined=new va(void 0);K=va,DE=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 t=e.next;e.prev=K.Undefined,e.next=K.Undefined,e=t}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,t){let r=new K(e);if(this._first===K.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!==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 t=e.prev;t.next=e.next,e.next.prev=t}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}},qE=0,Dr=class{constructor(e){this.value=e,this.id=qE++}},Ur=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 Dr&&(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,a,s,l;if(this._disposed)return()=>{console.info("[Jolibox SDK] Emitter is _disposed")};r&&(t=t.bind(r));let c=new Dr(t);return this._listeners?this._listeners instanceof Dr?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)),(l=(s=this.options)==null?void 0:s.onDidAddListener)==null||l.call(s,this),this._size++,()=>{var d,u,h,p;if(!this._disposed){if(this._listeners instanceof Dr)this._listeners.id===c.id&&(this._listeners=void 0,this._size=0,(u=(d=this.options)==null?void 0:d.onDidRemoveLastListener)==null||u.call(d));else if(this._listeners){let m=this._listeners.indexOf(c);m>=0&&(this._listeners.splice(m,1),this._size--,this._size===0&&((p=(h=this.options)==null?void 0:h.onDidRemoveLastListener)==null||p.call(h)))}}}}),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 Dr?this._deliver(this._listeners,e):this._listeners.forEach(t=>this._deliver(t,e)))}hasListeners(){return this._size>0}},_a=class{constructor(){this.listeners=new Map,this.listerHandlerMap=new WeakMap,this.cachedEventQueue=new Map}on(e,t,r=!0){var n;let o=(n=this.listeners.get(e))!=null?n:new Ur,i=l=>t(...l.args),a=o.event(i);this.listerHandlerMap.set(t,{handler:i,dispose:a}),this.listeners.set(e,o);let s=this.cachedEventQueue.get(e);if(s&&r)for(let l of s)t(...l.args)}flushCachedEvent(e){e?this.cachedEventQueue.delete(e):this.cachedEventQueue.clear()}off(e,t){let r=this.listerHandlerMap.get(t);r&&(r.dispose(),this.listerHandlerMap.delete(t))}emit(e,...t){let r=this.listeners.get(e),n=this.cachedEventQueue.get(e);n||(n=new DE,this.cachedEventQueue.set(e,n)),n.push({args:t}),r&&r.fire({event:e,args:t})}once(e,t){let r=(...n)=>{t(...n),this.off(e,r)};this.on(e,r,!1)}},ya={};vE(ya,{None:()=>LE,filter:()=>ME,once:()=>Tu,toPromise:()=>UE});LE=()=>(console.log("[Jolibox SDK] None Event"),()=>{console.log("[Jolibox SDK] None Event dispose")});ua=Symbol.for("Jolibox.hostEmitter"),jE=()=>{let e=new _a;return globalThis[ua]||(globalThis[ua]={on:e.on.bind(e),off:e.off.bind(e),emit:e.emit.bind(e),once:e.once.bind(e)}),globalThis[ua]},xU=jE();ba=class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Ur,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 FE(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}};ba=xu([Iu],ba);mu=class{constructor(){this._onWillExecuteCommand=new Ur,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._onDidExecuteCommand=new Ur,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this.registry=new ba,this._starActivation=null}_activateStar(){return this._starActivation||(this._starActivation=_E(3e4)),this._starActivation}executeCommand(e,...t){return gE(this,null,function*(){return this.registry.getCommand(e)?this._tryExecuteCommand(e,t):(yield Promise.all([Promise.race([this._activateStar(),ya.toPromise(ya.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}}};mu=xu([Iu],mu);AU=Symbol.for("Jolibox.commands");$E=()=>NE(),Lr="custom_event_",HE=[],JE=[],VE=["env","createRequestTask","login"],Ru="__batch_event__",GE=e=>e==="pv"?e:"default",Kn=class{constructor(e){this.interval=30,this.lastReportTime=0,this.cache={};let{reporter:t,interval:r=30,eventName:n,tagNameOrder:o,metricName:i,type:a}=e;this.reporter=t,this.interval=r,this.eventName=n,this.tagNameOrder=o,this.metricName=i,this.type=GE(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 t=(r,n,o,i)=>{let a=n.shift();if(a){let s=i[a];r[s]||(r[s]={}),t(r[s],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,a)=>{let s=o.shift();if(!s&&qr(a))throw new ca(`report value failed to match tagNameOrder, ${JSON.stringify(r)}`);if(s){let l=[];if(qr(a))l.push(...Object.keys(a));else if(Au(a)){if(o.length>0)throw new ca(`report value failed to match tagNameOrder, ${JSON.stringify(r)}`);l.push(a)}else throw new ca(`expected metric value to be a string, but got a(n) ${typeof a}, ${JSON.stringify(r)}`);l.forEach(c=>{n[c]||(n[c]={});let d=qr(a)?a[c]:a;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={}}},gu=!1;ha=[],WE=!1,wa=Symbol.for("Jolibox.invokeResolverInstance"),zE=new Map;globalThis[wa]||(globalThis[wa]=zE);YE={get resolveMap(){return globalThis[wa]}};Gn=Symbol.for("Jolibox.subscribeInstance");Je={trigger(){},exit(){return Promise.resolve(!1)},backPress(){return Promise.resolve(!1)},onReady(e){Je.trigger=e},onDoExit(e){Je.exit=e},onDoBackPress(e){Je.backPress=e}},Cu=e=>{let t=window.prompt("invoke",JSON.stringify({event:"envSync",paramsString:JSON.stringify({})}));if(!t)e.onError(new SE("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="")=>{Je.trigger(),e.onDocumentReady.postMessage({path:o})},r=o=>zn(void 0,null,function*(){let i=yield Je.exit();e.doExit.postMessage({uuid:o,shouldInterrupt:i})});xa={onDocumentReady:t,doExit:r,invoke(o,i,a){e.invoke.postMessage({event:o,paramsString:i,callbackId:a})},publish(o,i,a){let s=ku(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:t,env:Cu,doExit:r};globalThis.joliboxJSCore=It({},n)}if(window.JoliAndroidSDKBridge){let e,t=window.JoliAndroidSDKBridge,r=(i="")=>{Je.trigger(),t.onDocumentReady(JSON.stringify({path:i}))},n=i=>zn(void 0,null,function*(){let a=yield Je.exit();t.doExit(JSON.stringify({uuid:i,shouldInterrupt:a}))});xa={onDocumentReady:r,invoke(i,a,s){t.invoke(JSON.stringify({event:i,paramsString:a,callbackId:s}))},doExit:n,publish(i,a,s){let l=ku(a,"joliboxJSCore");t.publish({event:i,paramsString:JSON.stringify(l),webviewIds:s})},call(i,a,s){let l=window.prompt("invoke",JSON.stringify({event:i,paramsString:JSON.stringify(a),callbackId:s}));if(l)return JSON.parse(l)},doBackPress(i){return zn(this,null,function*(){let a=yield Je.backPress();t.doBackPress(JSON.stringify({uuid:i,shouldInterrupt:a}))})}};let o={onDocumentReady:r,env:Cu,doExit:n};globalThis.joliboxJSCore=It({},o)}Ou=xa;if(!Ou&&$E())throw new TE("No joliboxJScore is found, native bridge not found.");tx=It({},Ou),Pu=ex(tx),{invokeHandler:yu}=Pu,{applyNative:we,invokeNative:L,onNative:Ve,offNative:SU,subscribeHandler:rx,publish:Nu,subscribe:IU,unsubscribe:TU}=Pu;globalThis.joliboxJSBridge={callHandler:yu,invokeHandler:yu,subscribeHandler:rx}});function cx(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}function Br(e){return typeof e=="string"}function Bt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function Mu(e){return typeof e=="object"&&Array.isArray(e)}function $r(e){return e===!0||e===!1}function ju(e){return typeof e=="undefined"}function ux(e){return ju(e)||e===null}function dx(e){return typeof e=="function"}function Fu(e){let t=e,r=null,n=function(...o){return r||(r=new t(...o)),r};return n.prototype=t.prototype,n}function Bu(e,t,r){if(typeof r!="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],l=i[a],c=r(s,l,a,o,i);c!==void 0?o[a]=c:Lu(l)&&Lu(s)?o[a]=n(ax({},s),l):Array.isArray(l)&&Array.isArray(s)?o[a]=[...s,...l]:o[a]=l}return o}return n(e,t)}function Lu(e){return e&&typeof e=="object"&&e.constructor===Object}function $u(e,t){if(Array.isArray(e))return e.concat(t)}function Hr(e,t,r={}){let n=null,o,i,a,{leading:s=!1,trailing:l=!0}=r,c=()=>(a=e.apply(i,o),o=void 0,i=void 0,a),d=function(...u){o=u,i=this;let h=s&&!n;if(n&&clearTimeout(n),n=setTimeout(()=>{n=null,l&&!h&&c()},t),h)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 px(e,t){return(...r)=>t(e,...r)}function Xn(e){return t=>px(t,function(r,...n){if(typeof r=="function")try{return r.apply(this,n)}catch(o){e(new Zt(`${o}`))}})}function Mr(e){return(...t)=>{var r,n;((n=(r=globalThis.VConsole)==null?void 0:r[e])!=null?n:globalThis.console[e])(...t)}}function La(){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 Ex(e){return new Promise(t=>Yu(e)(t))}function Yu(e){return(t,r=null)=>{let n=!1;return e(o=>{if(!n)return n=!0,t.call(r,o)},null)}}function xx(e,t){return(r=>{let n,o={onWillAddFirstListener(){n=r(i.fire,i)}},i=new Fr(o);return i.event})((r,n=null)=>e(o=>t(o)&&r.call(n,o),null))}function Sx(e,t){let r=Math.min(e.length,t.length);for(let n=0;n<r;n++)Ix(e[n],t[n])}function Ix(e,t){if(Br(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(dx(t)){try{if(e instanceof t)return}catch(r){}if(!ux(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 Tx(){return typeof globalThis!="undefined"?globalThis[Qu]:void 0}function Rx(e){typeof globalThis!="undefined"&&(globalThis[Qu]=e)}function Z(){let e=Tx();if(e)return e;let t=new Qn,r=new ka,n={registerCommand(o,i,a){t.registerCommand({id:o,handler:i,metadata:a})},executeCommand(o,...i){return r.executeCommand(o,...i)},excuteCommandSync(o,...i){return r.executeCommandThowErr(o,...i)}};return Rx(n),n}var Ca,nx,Du,ox,ix,qu,ax,sx,Uu,lx,Tt,fx,Oa,Pa,Hu,Ju,Zt,Vu,Gu,Jr,Na,et,Sa,hx,Da,mx,qa,vx,Zn,Vr,gx,_x,Ku,Wu,zu,Ia,W,yx,bx,jr,Fr,tt,Ra,wx,Aa,Ax,de,Qn,ka,Qu,D=T(()=>{"use strict";Ca=Object.defineProperty,nx=Object.getOwnPropertyDescriptor,Du=Object.getOwnPropertySymbols,ox=Object.prototype.hasOwnProperty,ix=Object.prototype.propertyIsEnumerable,qu=(e,t,r)=>t in e?Ca(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ax=(e,t)=>{for(var r in t||(t={}))ox.call(t,r)&&qu(e,r,t[r]);if(Du)for(var r of Du(t))ix.call(t,r)&&qu(e,r,t[r]);return e},sx=(e,t)=>{for(var r in t)Ca(e,r,{get:t[r],enumerable:!0})},Uu=(e,t,r,n)=>{for(var o=n>1?void 0:n?nx(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(n?a(t,r,o):a(o))||o);return n&&o&&Ca(t,r,o),o},lx=(e,t,r)=>new Promise((n,o)=>{var i=l=>{try{s(r.next(l))}catch(c){o(c)}},a=l=>{try{s(r.throw(l))}catch(c){o(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,a);s((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}Tt=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))}})}};fx=(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))(fx||{}),Oa=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}},Pa=class extends Oa{constructor(){super(...arguments),this.kind="INTERNAL_ERROR"}},Hu=class extends Oa{constructor(){super(...arguments),this.kind="USER_ERROR"}},Ju=class extends Hu{constructor(){super(...arguments),this.name="USER_VALIDATE_ERROR"}},Zt=class extends Hu{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))}},Vu=class extends Pa{constructor(){super(...arguments),this.name="INTERNAL_SCHEMA_PARSE_ERROR",this.priority="P0"}},Gu=class extends Pa{constructor(){super(...arguments),this.name="INTERNAL_GLOBAL_JS_ERROR",this.priority="P1"}},Jr=class extends Oa{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}}},Na=class extends Pa{constructor(){super(...arguments),this.name="INTERNAL_REPORTER_ERROR"}};et={log:Mr("log"),warn:Mr("warn"),info:Mr("info"),error:Mr("error"),debug:Mr("debug")};Object.assign(globalThis,{logger:et});Sa=Symbol.for("Jolibox.canIUseMap"),hx={};globalThis[Sa]||(globalThis[Sa]=hx);Da={get config(){return globalThis[Sa]}},mx=(e=>(e[e.System=1e3]="System",e[e.ErrorTrace=1001]="ErrorTrace",e[e.UserDefined=1002]="UserDefined",e))(mx||{}),qa=(e=>(e.MiniGame="mini-game",e.MiniDrama="mini-drama",e.App="app",e.WebSDK="web-sdk",e.AppSDK="app-sdk",e))(qa||{}),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||{}),Zn=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)});La();Vr={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")},gx="device_id",_x="advertising_id",Ku=e=>(window.__joliboxLocalStorage__.getItem(e)||window.__joliboxLocalStorage__.setItem(e,Zn()),window.__joliboxLocalStorage__.getItem(e)),Wu=()=>new URLSearchParams(window.location.search).get("deviceId")||Ku(gx),zu=()=>new URLSearchParams(window.location.search).get("advertisingId")||Ku(_x),Ia=class Ta{constructor(t){this.element=t,this.next=Ta.Undefined,this.prev=Ta.Undefined}};Ia.Undefined=new Ia(void 0);W=Ia,yx=class{constructor(){this._first=W.Undefined,this._last=W.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===W.Undefined}clear(){let e=this._first;for(;e!==W.Undefined;){let t=e.next;e.prev=W.Undefined,e.next=W.Undefined,e=t}this._first=W.Undefined,this._last=W.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new W(e);if(this._first===W.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!==W.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==W.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==W.Undefined&&e.next!==W.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===W.Undefined&&e.next===W.Undefined?(this._first=W.Undefined,this._last=W.Undefined):e.next===W.Undefined?(this._last=this._last.prev,this._last.next=W.Undefined):e.prev===W.Undefined&&(this._first=this._first.next,this._first.prev=W.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==W.Undefined;)yield e.element,e=e.next}},bx=0,jr=class{constructor(e){this.value=e,this.id=bx++}},Fr=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 jr&&(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,a,s,l;if(this._disposed)return()=>{console.info("[Jolibox SDK] Emitter is _disposed")};r&&(t=t.bind(r));let c=new jr(t);return this._listeners?this._listeners instanceof jr?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)),(l=(s=this.options)==null?void 0:s.onDidAddListener)==null||l.call(s,this),this._size++,()=>{var d,u,h,p;if(!this._disposed){if(this._listeners instanceof jr)this._listeners.id===c.id&&(this._listeners=void 0,this._size=0,(u=(d=this.options)==null?void 0:d.onDidRemoveLastListener)==null||u.call(d));else if(this._listeners){let m=this._listeners.indexOf(c);m>=0&&(this._listeners.splice(m,1),this._size--,this._size===0&&((p=(h=this.options)==null?void 0:h.onDidRemoveLastListener)==null||p.call(h)))}}}}),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 jr?this._deliver(this._listeners,e):this._listeners.forEach(t=>this._deliver(t,e)))}hasListeners(){return this._size>0}},tt=class{constructor(){this.listeners=new Map,this.listerHandlerMap=new WeakMap,this.cachedEventQueue=new Map}on(e,t,r=!0){var n;let o=(n=this.listeners.get(e))!=null?n:new Fr,i=l=>t(...l.args),a=o.event(i);this.listerHandlerMap.set(t,{handler:i,dispose:a}),this.listeners.set(e,o);let s=this.cachedEventQueue.get(e);if(s&&r)for(let l of s)t(...l.args)}flushCachedEvent(e){e?this.cachedEventQueue.delete(e):this.cachedEventQueue.clear()}off(e,t){let r=this.listerHandlerMap.get(t);r&&(r.dispose(),this.listerHandlerMap.delete(t))}emit(e,...t){let r=this.listeners.get(e),n=this.cachedEventQueue.get(e);n||(n=new yx,this.cachedEventQueue.set(e,n)),n.push({args:t}),r&&r.fire({event:e,args:t})}once(e,t){let r=(...n)=>{t(...n),this.off(e,r)};this.on(e,r,!1)}},Ra={};sx(Ra,{None:()=>wx,filter:()=>xx,once:()=>Yu,toPromise:()=>Ex});wx=()=>(console.log("[Jolibox SDK] None Event"),()=>{console.log("[Jolibox SDK] None Event dispose")});Aa=Symbol.for("Jolibox.hostEmitter"),Ax=()=>{let e=new tt;return globalThis[Aa]||(globalThis[Aa]={on:e.on.bind(e),off:e.off.bind(e),emit:e.emit.bind(e),once:e.once.bind(e)}),globalThis[Aa]},de=Ax();Qn=class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Fr,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 Sx(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}};Qn=Uu([Fu],Qn);ka=class{constructor(){this._onWillExecuteCommand=new Fr,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._onDidExecuteCommand=new Fr,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this.registry=new Qn,this._starActivation=null}_activateStar(){return this._starActivation||(this._starActivation=cx(3e4)),this._starActivation}executeCommand(e,...t){return lx(this,null,function*(){return this.registry.getCommand(e)?this._tryExecuteCommand(e,t):(yield Promise.all([Promise.race([this._activateStar(),Ra.toPromise(Ra.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}}};ka=Uu([Fu],ka);Qu=Symbol.for("Jolibox.commands")});function Te(e,t={}){Ua.emit("ERROR_REPORT",{error:e,options:t})}var Ua,$t,rt=T(()=>{"use strict";D();D();Ua=new tt,$t=new tt;Te.debounce=Hr(Te,50,{leading:!0})});var Ma,kx,Xu,Zu,ed=T(()=>{"use strict";D();rt();Ma=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{}}},kx=e=>{let t=JSON.stringify(e);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},Xu=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,a,s]=o;return{headerJson:Ma(i),payloadJson:Ma(a),signature:Ma(s)}}else throw"joli_source is missing"}catch(r){return Te(new Vu(`${e} not a valid schema: ${r}`)),{headerJson:{},payloadJson:{},signature:{}}}},Zu=(e,t)=>{let r=t.split(".");if(r&&r.length===3){let n=r[0],o=kx(e),i=r[2];return`${n}.${o}.${i}`}return t}});var Cx,ja,td=T(()=>{"use strict";D();Cx="1.1.21",ja=()=>Cx});var Ox,rd,Fa,nd,me,Px,S,ee=T(()=>{"use strict";D();ed();td();D();Ox={deviceInfo:{brand:"UnknownBrand",model:"UnknownModel",did:Wu(),adId:zu(),pixelRatio:window.devicePixelRatio||1,platform:Vr.isAndroid?"android":Vr.isiOS?"ios":"h5",system:"UnknownSystemVersion",lang:"zh"},sdkInfo:{nativeSDKVersion:"",jssdkVersion:ja()},schema:window.location.href,platform:Vr.isAndroid?"android":Vr.isiOS?"ios":"h5"},Fa=(rd=globalThis.joliboxJSCore)==null?void 0:rd.env,me=Object.assign({},(nd=Fa==null?void 0:Fa())!=null?nd:Ox),Px=()=>{var h,p,m,g,_,v,y,A,k,O,I;let{payloadJson:e,headerJson:t,signature:r}=me.schema.length?Xu(me.schema):{},n=`${me.deviceInfo.did}-${new Date().getTime()}`,i=new URL(me.schema.length?me.schema:window.location.href).searchParams,a=(m=(p=(h=i.get("mpId"))!=null?h:i.get("appId"))!=null?p:i.get("gameId"))!=null?m:"",s=(v=(_=(g=me.clientSessionId)!=null?g:e==null?void 0:e.sessionId)!=null?_:i.get("sessionId"))!=null?v:n,l=!!((A=(y=e==null?void 0:e.testAdsMode)!=null?y:e==null?void 0:e.__testAdsMode)!=null?A:i.get("testAdsMode")==="true"),c=(I=(O=(k=e==null?void 0:e.joliboxEnv)!=null?k:e==null?void 0:e.__joliboxEnv)!=null?O:i.get("joliboxEnv"))!=null?I:"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 w;return(w=i.get("joliSource"))!=null?w:null},get mpId(){var w;return(w=a!=null?a:e==null?void 0:e.id)!=null?w:""},get mpVersion(){var w;return(w=t==null?void 0:t.ver)!=null?w:ja()},get mpType(){var w,B;return(B=(w=t==null?void 0:t.__mpType)!=null?w:e==null?void 0:e.__mpType)!=null?B:"game"},get platform(){var w;return((w=me.platform)!=null?w:me.deviceInfo.platform).toLowerCase()},get deviceInfo(){return me.deviceInfo},get sdkInfo(){return me.sdkInfo},get hostInfo(){return me.hostInfo},get hostUserInfo(){return me.hostUserInfo},get sessionId(){var w,B;return(B=(w=me.clientSessionId)!=null?w:s)!=null?B:n},get channel(){return u},get webviewId(){var w;return(w=me.webviewId)!=null?w:-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"},get adId(){var w;return(w=me.deviceInfo.adId)!=null?w:me.deviceInfo.did},onEnvConfigChanged:w=>{Bu(me,w,$u)},encodeJoliSourceQuery:w=>{var B,$e;return t&&r?Zu(R(R({},e),w),(B=i.get("joliSource"))!=null?B:""):($e=i.get("joliSource"))!=null?$e:""}}},S=Px()});var Ba,id,Nx,Dx,od,qx,ad=T(()=>{"use strict";D();rt();ee();D();Ba=!1,id=(e,t)=>e==null?!1:t in e,Nx=e=>id(e,"kind"),Dx=e=>{let t=e.toLowerCase().split("_");return t[0]+t.slice(1).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join("")},od=(e,t={},r)=>{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:Dx(e.name)},o=q(R({},n),{env:t.environment,isFromUser:r});r?$t.emit("GLOBAL_USER_ERROR",e,o):$t.emit("GLOBAL_ERROR",e,o)},qx=e=>id(e,"kind")&&e.kind==="USER_ERROR";Ua.on("ERROR_REPORT",({error:e,options:t})=>{if(Ba)return;Ba=!0;let r=Nx(e)&&e.raw?e.raw:e;try{let n=qx(e);od(e,t,n)}catch(n){let o=n instanceof Error?n.message:String(n),i=new Na(`${o}, origin error: ${r.message}`);et.error(i),od(new Na(i.message),{environment:t.environment},!1)}finally{Ba=!1}})});var Rt,$a,er=T(()=>{"use strict";rt();D();rt();Rt=(e,t)=>{var r,n;return new Jr((n=(r=t==null?void 0:t.errMsg)!=null?r:e.msg)!=null?n:"",e.code,e.type)},$a=e=>new Ju(e)});var sd=T(()=>{"use strict";ad();er();D();Ie();$t.on("GLOBAL_ERROR",(e,t)=>{var n;let r={message:e.message,stack:(n=e.stack)!=null?n:"",errorType:e.name,source:0};L("trackAsync",{event:"reportJsError",data:r})});$t.on("GLOBAL_USER_ERROR",(e,t)=>{et.log("UserError",e,t)})});var Ha=T(()=>{"use strict"});function ld(e,t){let r=(n,o,i)=>{let a=q(R({tag:n},t),{extra:R({},o)});n=="globalJsError"?Te(new Gu(JSON.stringify(a))):e("systemLog",a,i)};return r.debounce=Hr(r,500,{leading:!0}),r}function cd(e){let t=(r,n,o)=>{var s;let i=(s=o&&JSON.stringify(o))!=null?s:0,a={speed_value_type:r,total_duration:n};i&&Object.assign(a,{extra:i}),e("joliboxSpeedAnalysis",a)};return t.debounce=Hr(t,500,{leading:!0}),t}var ud=T(()=>{"use strict";D();D();rt()});function dd(e,t){let r=ld(e,t),n=cd(r);return{track:r,trackPerformance:n}}var fd=T(()=>{"use strict";ud()});var pd=T(()=>{"use strict";ee();D();D()});var hd=T(()=>{"use strict";fd();Ha();pd()});var eo,md=T(()=>{"use strict";eo=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,a=0,s=()=>{if(!i)return;let p=Date.now(),m=p-r;m>=this.interval&&(this.visible&&(a+=m,t(a)),r=p),n=requestAnimationFrame(s)},l=()=>{d(),r=Date.now(),o=window.setInterval(()=>{if(!i)return;let p=Date.now();p-r>=this.interval&&(r=p)},this.interval)},c=()=>{u(),r=Date.now(),n=requestAnimationFrame(s)},d=()=>{n&&(cancelAnimationFrame(n),n=0)},u=()=>{o&&(clearInterval(o),o=0)};this.eventEmitter.on("visible",p=>{i&&(console.log("visible",p),p?c():l())});let h=this.visible;return{start(){i||(i=!0,h?c():l())},stop(){i=!1,d(),u()}}}}});var Ja=T(()=>{"use strict"});function gd(e,t,r){let{response:n,startTime:o,endTime:i,requestFrom:a}=r,{errMsg:s="",profile:l={}}=n,d={duration:i-o,request_type:e,url:t.split("?")[0],result:r.state,error_msg:r.state==="fail"?s:"",socket_reused:l.socketReused?1:0,request_from:a};(a==="public"&&vd<Ux||a==="inner")&&(d.joli_request_number=vd++,setTimeout(()=>{Le("joliboxNetRequestResult",d)},500))}var vd,Ux,_d=T(()=>{"use strict";Ja();kt();vd=0,Ux=10});function to(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",a=(d=r==null?void 0:r.defaultHeaders)!=null?d:{};return Ve("onRequestTaskStateChange",u=>{if(typeof u.requestTaskId!="string")return;let h=n.get(u.requestTaskId);if(h)if(u.state==="success"){let p=u,{requestTaskId:g,state:_}=p,v=Ze(p,["requestTaskId","state"]);u.statusCode===200?h.resolve(v):h.reject(v),n.delete(g)}else if(u.state==="fail"){let m=u,{requestTaskId:g,state:_}=m,v=Ze(m,["requestTaskId","state"]);h.reject(v),n.delete(g)}else et.warn("onRequestTaskStateChange unknown event",u)}),de.on("onLoginComplete",({isLogin:u,token:h})=>{u&&h&&(a["X-JOLI-TOKEN"]=h)}),(p,...m)=>x(this,[p,...m],function*(u,h={}){let g=Date.now(),_=Mx(u,q(R({},h),{baseUrl:o})),{method:v="GET",responseType:y="text",dataType:A="json",timeout:k,enableCache:O=!1,appendHostCookie:I=!0}=h,w=Object.assign({"content-type":"application/json"},a,h.header),B={url:_,method:v,header:w,enableCache:O,responseType:y,appendHostCookie:I};if(v=="POST"||v=="PUT"){let Xe=Fx(h.data,w["content-type"]);B.data=Xe}k&&Object.assign(B,{timeout:k});let{data:{requestTaskId:$e}}=L(e,B);if(typeof $e!="string")throw Rt({code:-1,msg:"requestTaskId is not a string"});let Xt=(Xe,dt)=>{gd("request",_,{state:Xe,startTime:g,endTime:Date.now(),params:B,response:dt,requestId:$e,requestFrom:i=="public"?"public":"inner"})},{resolve:He,reject:Ft,promise:zw}=new Tt;n.set($e,{resolve:He,reject:Ft});try{let Xe=yield zw;Xt("success",Xe);let{data:dt}=Xe;return A==="json"&&typeof dt=="string"&&(dt=jx(dt)),{url:_,timeout:k,method:v,response:q(R({},Xe),{data:dt})}}catch(Xe){let dt=Xe;if(Bt(dt)){let{errMsg:Hn,prefetchDetail:Yw,isPrefetch:Qw,errNo:Xw}=dt;Br(Hn)&&(Xt("fail",{errMsg:Hn,isPrefetch:Qw,prefetchDetail:Yw}),Te(Rt({code:-1,msg:Hn},{errNo:Xw,errMsg:Hn})))}throw Xe}})}function jx(e){try{return JSON.parse(e.trim())}catch(t){return e}}function Fx(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 Mx,Va=T(()=>{"use strict";D();_d();Ja();Ie();rt();er();Mx=(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 Ga,yd,Ee,Ht=T(()=>{"use strict";Va();ee();Ga={};(yd=S.hostUserInfo)!=null&&yd.token&&(Ga["x-joli-token"]=S.hostUserInfo.token);S.joliSource&&(Ga["x-joli-source"]=S.joliSource);Ee=to("createRequestTaskSync","operateRequestTaskSync",{type:"inner",baseUrl:S.testMode?"https://stg-api.jolibox.com":"https://api.jolibox.com",defaultHeaders:Ga})});var ro,bd=T(()=>{"use strict";ee();md();Ht();Ie();ro=class extends eo{constructor(t,r,n){super(r,n),this.gameId=S.mpId,this.sessionId=S.sessionId,this.track=t,this.taskUrl=S.testMode?"https://stg-api.jolibox.com/api/base/app-event":"https://api.jolibox.com/api/base/app-event"}reporter(t){return x(this,null,function*(){let{event:r,params:n}=t,o={eventType:r,gameInfo:R({gameId:this.gameId,sessionId:this.sessionId},n)};yield S.platform==="android"?Ee("/api/base/app-event",{method:"POST",data:o}):we("trackAppEventAsync",{url:this.taskUrl,body:JSON.stringify(o)})})}reportToNative(t){return x(this,null,function*(){let{event:r,params:n}=t;yield we("userTrackAsync",{event:r,params:R({},n),gameId:this.gameId})})}tracker(t,r=null){this.track(t,r)}}});var Sd={};fu(Sd,{nativeTaskEmitter:()=>Gr,taskTracker:()=>Oe,track:()=>Le,trackPerformance:()=>xd});var Bx,wd,Ed,Le,xd,Ad,Gr,Oe,kt=T(()=>{"use strict";sd();D();Ha();hd();ee();bd();Ie();Bx=(e,t,r)=>{var a,s;let n=t,o=Bt(n.extra)?n.extra:Br(n.extra)?JSON.parse(n.extra):{},i=q(R({},o),{mp_id:(a=n.mp_id)!=null?a:"",mp_version:(s=n.mp_version)!=null?s:""});L("trackAsync",{event:e,data:i,webviewId:r})},{track:Le,trackPerformance:xd}=dd(Bx,{type:qa.AppSDK,platform:"native",jssdk_version:(Ed=(wd=S.sdkInfo)==null?void 0:wd.jssdkVersion)!=null?Ed:"1.0.0",mp_id:S.mpId,mp_version:S.mpVersion}),Ad=Z();Ad.registerCommand("ReportSDK.traceSystemTimeline",({event:e,duration:t,extra:r})=>{xd(e,t,r)});Ad.registerCommand("ReportSDK.traceSystem",({event:e,info:t})=>{Le(e,t)});Gr=new tt,Oe=new ro(Le,Gr)});function Id(){let e=null,t=null,r=window.fetch,n=()=>{t=document.createElement("meta"),t.setAttribute("name","viewport"),t.setAttribute("content","viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"),t.setAttribute("data-jolibox-sdk","viewport-meta"),e=document.createElement("style"),e.setAttribute("data-jolibox-sdk","default-styles");let a=`
1
+ var Zw=Object.create;var Vn=Object.defineProperty,eE=Object.defineProperties,tE=Object.getOwnPropertyDescriptor,rE=Object.getOwnPropertyDescriptors,nE=Object.getOwnPropertyNames,Jn=Object.getOwnPropertySymbols,oE=Object.getPrototypeOf,la=Object.prototype.hasOwnProperty,du=Object.prototype.propertyIsEnumerable;var uu=(e,t,r)=>t in e?Vn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,R=(e,t)=>{for(var r in t||(t={}))la.call(t,r)&&uu(e,r,t[r]);if(Jn)for(var r of Jn(t))du.call(t,r)&&uu(e,r,t[r]);return e},q=(e,t)=>eE(e,rE(t));var Ze=(e,t)=>{var r={};for(var n in e)la.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Jn)for(var n of Jn(e))t.indexOf(n)<0&&du.call(e,n)&&(r[n]=e[n]);return r};var T=(e,t)=>()=>(e&&(t=e(e=0)),t);var f=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fu=(e,t)=>{for(var r in t)Vn(e,r,{get:t[r],enumerable:!0})},iE=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of nE(t))!la.call(e,o)&&o!==r&&Vn(e,o,{get:()=>t[o],enumerable:!(n=tE(t,o))||n.enumerable});return e};var ue=(e,t,r)=>(r=e!=null?Zw(oE(e)):{},iE(t||!e||!e.__esModule?Vn(r,"default",{value:e,enumerable:!0}):r,e));var x=(e,t,r)=>new Promise((n,o)=>{var i=l=>{try{s(r.next(l))}catch(c){o(c)}},a=l=>{try{s(r.throw(l))}catch(c){o(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,a);s((r=r.apply(e,t)).next())});function dE(e){return!!(e!=null&&e.__nativeBuffers__)}function ma(e){if(typeof e=="string")try{e=JSON.parse(e)}catch(r){return{}}if(typeof e!="object"||e===null)return{};if(!dE(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=fE(n.base64)),typeof o!="undefined"&&o instanceof ArrayBuffer&&(e[n.key]=o)}}return e}function hE(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 a=t?{value:i,key:o}:{base64:pE(i),key:o};n.push(a),delete r[o]}return n.length>0&&(r.__nativeBuffers__=n),r}function _E(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}function Au(e){return typeof e=="string"}function qr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function bE(e){return typeof e=="undefined"}function wE(e){return bE(e)||e===null}function Su(e){return typeof e=="function"}function EE(e){return qr(e)&&Su(e.then)}function Iu(e){let t=e,r=null,n=function(...o){return r||(r=new t(...o)),r};return n.prototype=t.prototype,n}function Nr(e){return(...t)=>{var r,n;((n=(r=globalThis.VConsole)==null?void 0:r[e])!=null?n:globalThis.console[e])(...t)}}function PE(){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 UE(e){return new Promise(t=>Tu(e)(t))}function Tu(e){return(t,r=null)=>{let n=!1;return e(o=>{if(!n)return n=!0,t.call(r,o)},null)}}function ME(e,t){return(r=>{let n,o={onWillAddFirstListener(){n=r(i.fire,i)}},i=new Ur(o);return i.event})((r,n=null)=>e(o=>t(o)&&r.call(n,o),null))}function jE(e,t){let r=Math.min(e.length,t.length);for(let n=0;n<r;n++)BE(e[n],t[n])}function BE(e,t){if(Au(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(Su(t)){try{if(e instanceof t)return}catch(r){}if(!wE(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 vu(e,t){return`[${e}]:${t}`}function KE(e,t){gu||(da=new Kn({eventName:"jolibox_invoke",tagNameOrder:["status","method","errNo","errMsg","isForeground"],metricName:"duration",reporter(o){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:o}),-1)}}),fa=new Kn({eventName:"jolibox_invoke_js2native",tagNameOrder:["status","method","isForeground"],metricName:"duration",reporter(o){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:o}),-1)}}),pa=new Kn({eventName:"jolibox_invoke_native2js",tagNameOrder:["status","method","isForeground"],metricName:"duration",reporter(o){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:o}),-1)}}),t("onJoliboxEnterBackground",()=>{da.flush(),fa.flush(),pa.flush()}),gu=!0);function r(o){var i,a;let{method:s,args:l,startTime:c,isForeground:d,errMsg:u=`${s}:fail no errMsg`,errNo:h=0,__timing:p={receiveJSInvoke:0,invokeCallback:0}}=o,{receiveJSInvoke:m,invokeCallback:g}=p,_=(a=(i=u.match(/\S:(\S+)\s?/))==null?void 0:i[1])!=null?a:"fail";da.report({status:_,method:n(s,l),errNo:`${h}`,errMsg:u,isForeground:d,duration:Date.now()-c}),c&&m&&g&&(fa.report({status:_,method:s,isForeground:d,duration:Number((m-c).toFixed(3))}),pa.report({status:_,method:s,isForeground:d,duration:Number((Date.now()-g).toFixed(3))}))}function n(o,i){return(o==="callHostMethod"||o==="callHostMethodSync")&&i!=null&&i.method?`${o}-${i.method}`:o}return r}function QE(e,t){let r=0,n=!0,o=YE.resolveMap,i=KE(e,t);t("onJoliboxEnterBackground",()=>{n=!1}),t("onJoliboxEnterForeground",()=>{n=!0,ha.forEach(l=>zn(this,[l],function*({method:c,args:d,resolve:u}){let h=yield s(c,d);u(h)})),ha.length=0});let a=(l,c)=>{let d=o.get(Number(l));if(!d)return;let u=ma(c);d(u),o.delete(Number(l))},s=(l,c)=>{var d,u;let h=Date.now(),p=`${n}`;r+=1;let m=new yE;if(o.set(r,m.resolve),!n&&JE.includes(l))return new Promise(k=>{ha.push({method:l,args:c,resolve:k})});let g=cE(It({},{method:l,startTime:h,args:c,isForeground:p}),{invokeType:"js-bridge"}),_=!WE&&HE.includes(l),v=hE(c,_),y=_?v:JSON.stringify(v),A;if(l.endsWith("Sync")||VE.includes(l)?A=(d=e.call)==null?void 0:d.call(e,l,v,r):typeof y=="string"?A=e.invoke(l,y,r):A=(u=e.call)==null?void 0:u.call(e,l,y,r),A){try{typeof A=="string"&&(A=JSON.parse(A)),A=ma(A)}catch(k){Ea.error(k)}return o.delete(r),A.errorCode&&(A.errorCode=vu(l,A.errorCode)),i(It(It({},g),A)),A}return l.endsWith("Sync")&&o.delete(r),m.promise.then(k=>(k.errorCode&&(k.errorCode=vu(l,k.errorCode)),i(It(It({},g),k)),k))};return{invokeNative:s,applyNative:(l,c)=>{let d=s(l,c);return EE(d)?d.then(u=>_u(l,u)):_u(l,d)},invokeHandler:a}}function _u(e,t){if(!qr(t)){Ea.warn(`[Jolibox SDK]${e} no response value`);return}let r=t,{errMsg:n,errNo:o,errorType:i,errorCode:a}=r,s=uE(r,["errMsg","errNo","errorType","errorCode"]);if(n&&n!==`${e}:ok`)throw new IE(n,o,i,a);return s}function XE(e){if(globalThis[Gn])return globalThis[Gn];let t=new _a,r=new _a,n=new Kn({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()}),globalThis[Gn]={onNative:t.on.bind(t),offNative:t.off.bind(t),subscribe:r.on.bind(r),unsubscribe:r.off.bind(r),subscribeHandler(o,i,a){let s=ma(i),l;if(s.__extra){l=s.params;let{type:c,startTime:d}=s.__extra;n.report({type:c,event:o,duration:Date.now()-d})}else l=s;if(o===Ru){l.forEach(c=>{let[d,u]=c;try{r.emit(d.slice(Lr.length),u,a)}catch(h){}});return}if(o.startsWith(Lr)){r.emit(o.slice(Lr.length),l,a);return}t.emit(o,l,a)}},globalThis[Gn]}function ZE(e){let t=new Map,r;return(n,o,i,a)=>{if(a){let l=i?[i]:"*";e.publish(`${Lr}${n}`,o,l);return}r||(r=Promise.resolve().then(()=>{t.forEach((l,c)=>{try{let d=c?[c]:"*";e.publish(Ru,l,d)}catch(d){}}),r=void 0,t.clear()}));let s=t.get(i);s||(s=[],t.set(i,s)),s.push([`${Lr}${n}`,o])}}function ex(e){let{subscribeHandler:t,onNative:r,offNative:n,subscribe:o,unsubscribe:i}=XE(e),{invokeNative:a,invokeHandler:s,applyNative:l}=QE(e,r),c=ZE(e);return{invokeHandler:s,subscribeHandler:t,applyNative:l,invokeNative:a,onNative:r,offNative:n,publish:c,subscribe:o,unsubscribe:i}}function ku(e,t){return{params:e,__extra:{startTime:Date.now(),type:t}}}var aE,sE,lE,Wn,bu,wu,pu,It,cE,uE,zn,fE,pE,Eu,mE,vE,xu,gE,yE,xE,AE,Yn,SE,IE,TE,ca,Ea,hu,RE,kE,CE,OE,NE,EU,va,K,DE,qE,Dr,Ur,_a,ya,LE,ua,FE,xU,ba,mu,AU,$E,Lr,HE,JE,VE,Ru,GE,Kn,gu,da,fa,pa,ha,WE,wa,zE,YE,Gn,xa,Je,Cu,Ou,tx,Pu,yu,we,L,Ve,SU,rx,Nu,IU,TU,Ie=T(()=>{"use strict";aE=Object.defineProperty,sE=Object.defineProperties,lE=Object.getOwnPropertyDescriptors,Wn=Object.getOwnPropertySymbols,bu=Object.prototype.hasOwnProperty,wu=Object.prototype.propertyIsEnumerable,pu=(e,t,r)=>t in e?aE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,It=(e,t)=>{for(var r in t||(t={}))bu.call(t,r)&&pu(e,r,t[r]);if(Wn)for(var r of Wn(t))wu.call(t,r)&&pu(e,r,t[r]);return e},cE=(e,t)=>sE(e,lE(t)),uE=(e,t)=>{var r={};for(var n in e)bu.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Wn)for(var n of Wn(e))t.indexOf(n)<0&&wu.call(e,n)&&(r[n]=e[n]);return r},zn=(e,t,r)=>new Promise((n,o)=>{var i=l=>{try{s(r.next(l))}catch(c){o(c)}},a=l=>{try{s(r.throw(l))}catch(c){o(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,a);s((r=r.apply(e,t)).next())});fE=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};pE=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)};Eu=Object.defineProperty,mE=Object.getOwnPropertyDescriptor,vE=(e,t)=>{for(var r in t)Eu(e,r,{get:t[r],enumerable:!0})},xu=(e,t,r,n)=>{for(var o=n>1?void 0:n?mE(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(n?a(t,r,o):a(o))||o);return n&&o&&Eu(t,r,o),o},gE=(e,t,r)=>new Promise((n,o)=>{var i=l=>{try{s(r.next(l))}catch(c){o(c)}},a=l=>{try{s(r.throw(l))}catch(c){o(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,a);s((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}yE=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))}})}};xE=(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))(xE||{}),AE=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}},Yn=class extends AE{constructor(){super(...arguments),this.kind="INTERNAL_ERROR"}},SE=class extends Yn{constructor(){super(...arguments),this.name="INTERNAL_INVOKE_NATIVE_ERROR"}},IE=class extends Yn{constructor(e,t,r,n){super(e),this.errNo=t,this.name="INTERNAL_APPLY_NATIVE_ERROR",this.errorType=r,this.errorCode=n}},TE=class extends Yn{constructor(){super(...arguments),this.name="INTERNAL_JSCORE_ERROR",this.priority="P0"}},ca=class extends Yn{constructor(){super(...arguments),this.name="INTERNAL_METRIC_REPORT_ERROR"}};Ea={log:Nr("log"),warn:Nr("warn"),info:Nr("info"),error:Nr("error"),debug:Nr("debug")};Object.assign(globalThis,{logger:Ea});hu=Symbol.for("Jolibox.canIUseMap"),RE={};globalThis[hu]||(globalThis[hu]=RE);kE=(e=>(e[e.System=1e3]="System",e[e.ErrorTrace=1001]="ErrorTrace",e[e.UserDefined=1002]="UserDefined",e))(kE||{}),CE=(e=>(e.MiniGame="mini-game",e.MiniDrama="mini-drama",e.App="app",e.WebSDK="web-sdk",e.AppSDK="app-sdk",e))(CE||{}),OE=(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))(OE||{});PE();NE=()=>!!(navigator.userAgent||"").includes("JoliboxPlatformSDK"),EU={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")},va=class ga{constructor(t){this.element=t,this.next=ga.Undefined,this.prev=ga.Undefined}};va.Undefined=new va(void 0);K=va,DE=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 t=e.next;e.prev=K.Undefined,e.next=K.Undefined,e=t}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,t){let r=new K(e);if(this._first===K.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!==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 t=e.prev;t.next=e.next,e.next.prev=t}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}},qE=0,Dr=class{constructor(e){this.value=e,this.id=qE++}},Ur=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 Dr&&(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,a,s,l;if(this._disposed)return()=>{console.info("[Jolibox SDK] Emitter is _disposed")};r&&(t=t.bind(r));let c=new Dr(t);return this._listeners?this._listeners instanceof Dr?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)),(l=(s=this.options)==null?void 0:s.onDidAddListener)==null||l.call(s,this),this._size++,()=>{var d,u,h,p;if(!this._disposed){if(this._listeners instanceof Dr)this._listeners.id===c.id&&(this._listeners=void 0,this._size=0,(u=(d=this.options)==null?void 0:d.onDidRemoveLastListener)==null||u.call(d));else if(this._listeners){let m=this._listeners.indexOf(c);m>=0&&(this._listeners.splice(m,1),this._size--,this._size===0&&((p=(h=this.options)==null?void 0:h.onDidRemoveLastListener)==null||p.call(h)))}}}}),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 Dr?this._deliver(this._listeners,e):this._listeners.forEach(t=>this._deliver(t,e)))}hasListeners(){return this._size>0}},_a=class{constructor(){this.listeners=new Map,this.listerHandlerMap=new WeakMap,this.cachedEventQueue=new Map}on(e,t,r=!0){var n;let o=(n=this.listeners.get(e))!=null?n:new Ur,i=l=>t(...l.args),a=o.event(i);this.listerHandlerMap.set(t,{handler:i,dispose:a}),this.listeners.set(e,o);let s=this.cachedEventQueue.get(e);if(s&&r)for(let l of s)t(...l.args)}flushCachedEvent(e){e?this.cachedEventQueue.delete(e):this.cachedEventQueue.clear()}off(e,t){let r=this.listerHandlerMap.get(t);r&&(r.dispose(),this.listerHandlerMap.delete(t))}emit(e,...t){let r=this.listeners.get(e),n=this.cachedEventQueue.get(e);n||(n=new DE,this.cachedEventQueue.set(e,n)),n.push({args:t}),r&&r.fire({event:e,args:t})}once(e,t){let r=(...n)=>{t(...n),this.off(e,r)};this.on(e,r,!1)}},ya={};vE(ya,{None:()=>LE,filter:()=>ME,once:()=>Tu,toPromise:()=>UE});LE=()=>(console.log("[Jolibox SDK] None Event"),()=>{console.log("[Jolibox SDK] None Event dispose")});ua=Symbol.for("Jolibox.hostEmitter"),FE=()=>{let e=new _a;return globalThis[ua]||(globalThis[ua]={on:e.on.bind(e),off:e.off.bind(e),emit:e.emit.bind(e),once:e.once.bind(e)}),globalThis[ua]},xU=FE();ba=class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Ur,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 jE(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}};ba=xu([Iu],ba);mu=class{constructor(){this._onWillExecuteCommand=new Ur,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._onDidExecuteCommand=new Ur,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this.registry=new ba,this._starActivation=null}_activateStar(){return this._starActivation||(this._starActivation=_E(3e4)),this._starActivation}executeCommand(e,...t){return gE(this,null,function*(){return this.registry.getCommand(e)?this._tryExecuteCommand(e,t):(yield Promise.all([Promise.race([this._activateStar(),ya.toPromise(ya.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}}};mu=xu([Iu],mu);AU=Symbol.for("Jolibox.commands");$E=()=>NE(),Lr="custom_event_",HE=[],JE=[],VE=["env","createRequestTask","login"],Ru="__batch_event__",GE=e=>e==="pv"?e:"default",Kn=class{constructor(e){this.interval=30,this.lastReportTime=0,this.cache={};let{reporter:t,interval:r=30,eventName:n,tagNameOrder:o,metricName:i,type:a}=e;this.reporter=t,this.interval=r,this.eventName=n,this.tagNameOrder=o,this.metricName=i,this.type=GE(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 t=(r,n,o,i)=>{let a=n.shift();if(a){let s=i[a];r[s]||(r[s]={}),t(r[s],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,a)=>{let s=o.shift();if(!s&&qr(a))throw new ca(`report value failed to match tagNameOrder, ${JSON.stringify(r)}`);if(s){let l=[];if(qr(a))l.push(...Object.keys(a));else if(Au(a)){if(o.length>0)throw new ca(`report value failed to match tagNameOrder, ${JSON.stringify(r)}`);l.push(a)}else throw new ca(`expected metric value to be a string, but got a(n) ${typeof a}, ${JSON.stringify(r)}`);l.forEach(c=>{n[c]||(n[c]={});let d=qr(a)?a[c]:a;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={}}},gu=!1;ha=[],WE=!1,wa=Symbol.for("Jolibox.invokeResolverInstance"),zE=new Map;globalThis[wa]||(globalThis[wa]=zE);YE={get resolveMap(){return globalThis[wa]}};Gn=Symbol.for("Jolibox.subscribeInstance");Je={trigger(){},exit(){return Promise.resolve(!1)},backPress(){return Promise.resolve(!1)},onReady(e){Je.trigger=e},onDoExit(e){Je.exit=e},onDoBackPress(e){Je.backPress=e}},Cu=e=>{let t=window.prompt("invoke",JSON.stringify({event:"envSync",paramsString:JSON.stringify({})}));if(!t)e.onError(new SE("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="")=>{Je.trigger(),e.onDocumentReady.postMessage({path:o})},r=o=>zn(void 0,null,function*(){let i=yield Je.exit();e.doExit.postMessage({uuid:o,shouldInterrupt:i})});xa={onDocumentReady:t,doExit:r,invoke(o,i,a){e.invoke.postMessage({event:o,paramsString:i,callbackId:a})},publish(o,i,a){let s=ku(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:t,env:Cu,doExit:r};globalThis.joliboxJSCore=It({},n)}if(window.JoliAndroidSDKBridge){let e,t=window.JoliAndroidSDKBridge,r=(i="")=>{Je.trigger(),t.onDocumentReady(JSON.stringify({path:i}))},n=i=>zn(void 0,null,function*(){let a=yield Je.exit();t.doExit(JSON.stringify({uuid:i,shouldInterrupt:a}))});xa={onDocumentReady:r,invoke(i,a,s){t.invoke(JSON.stringify({event:i,paramsString:a,callbackId:s}))},doExit:n,publish(i,a,s){let l=ku(a,"joliboxJSCore");t.publish({event:i,paramsString:JSON.stringify(l),webviewIds:s})},call(i,a,s){let l=window.prompt("invoke",JSON.stringify({event:i,paramsString:JSON.stringify(a),callbackId:s}));if(l)return JSON.parse(l)},doBackPress(i){return zn(this,null,function*(){let a=yield Je.backPress();t.doBackPress(JSON.stringify({uuid:i,shouldInterrupt:a}))})}};let o={onDocumentReady:r,env:Cu,doExit:n};globalThis.joliboxJSCore=It({},o)}Ou=xa;if(!Ou&&$E())throw new TE("No joliboxJScore is found, native bridge not found.");tx=It({},Ou),Pu=ex(tx),{invokeHandler:yu}=Pu,{applyNative:we,invokeNative:L,onNative:Ve,offNative:SU,subscribeHandler:rx,publish:Nu,subscribe:IU,unsubscribe:TU}=Pu;globalThis.joliboxJSBridge={callHandler:yu,invokeHandler:yu,subscribeHandler:rx}});function cx(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}function Br(e){return typeof e=="string"}function $t(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function Mu(e){return typeof e=="object"&&Array.isArray(e)}function $r(e){return e===!0||e===!1}function Fu(e){return typeof e=="undefined"}function ux(e){return Fu(e)||e===null}function dx(e){return typeof e=="function"}function ju(e){let t=e,r=null,n=function(...o){return r||(r=new t(...o)),r};return n.prototype=t.prototype,n}function Bu(e,t,r){if(typeof r!="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],l=i[a],c=r(s,l,a,o,i);c!==void 0?o[a]=c:Lu(l)&&Lu(s)?o[a]=n(ax({},s),l):Array.isArray(l)&&Array.isArray(s)?o[a]=[...s,...l]:o[a]=l}return o}return n(e,t)}function Lu(e){return e&&typeof e=="object"&&e.constructor===Object}function $u(e,t){if(Array.isArray(e))return e.concat(t)}function Hr(e,t,r={}){let n=null,o,i,a,{leading:s=!1,trailing:l=!0}=r,c=()=>(a=e.apply(i,o),o=void 0,i=void 0,a),d=function(...u){o=u,i=this;let h=s&&!n;if(n&&clearTimeout(n),n=setTimeout(()=>{n=null,l&&!h&&c()},t),h)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 px(e,t){return(...r)=>t(e,...r)}function Xn(e){return t=>px(t,function(r,...n){if(typeof r=="function")try{return r.apply(this,n)}catch(o){e(new Zt(`${o}`))}})}function Mr(e){return(...t)=>{var r,n;((n=(r=globalThis.VConsole)==null?void 0:r[e])!=null?n:globalThis.console[e])(...t)}}function La(){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 Ex(e){return new Promise(t=>Yu(e)(t))}function Yu(e){return(t,r=null)=>{let n=!1;return e(o=>{if(!n)return n=!0,t.call(r,o)},null)}}function xx(e,t){return(r=>{let n,o={onWillAddFirstListener(){n=r(i.fire,i)}},i=new jr(o);return i.event})((r,n=null)=>e(o=>t(o)&&r.call(n,o),null))}function Sx(e,t){let r=Math.min(e.length,t.length);for(let n=0;n<r;n++)Ix(e[n],t[n])}function Ix(e,t){if(Br(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(dx(t)){try{if(e instanceof t)return}catch(r){}if(!ux(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 Tx(){return typeof globalThis!="undefined"?globalThis[Qu]:void 0}function Rx(e){typeof globalThis!="undefined"&&(globalThis[Qu]=e)}function Z(){let e=Tx();if(e)return e;let t=new Qn,r=new ka,n={registerCommand(o,i,a){t.registerCommand({id:o,handler:i,metadata:a})},executeCommand(o,...i){return r.executeCommand(o,...i)},excuteCommandSync(o,...i){return r.executeCommandThowErr(o,...i)}};return Rx(n),n}var Ca,nx,Du,ox,ix,qu,ax,sx,Uu,lx,Tt,fx,Oa,Pa,Hu,Ju,Zt,Vu,Gu,Jr,Na,et,Sa,hx,Da,mx,qa,vx,Zn,Vr,gx,_x,Ku,Wu,zu,Ia,W,yx,bx,Fr,jr,tt,Ra,wx,Aa,Ax,de,Qn,ka,Qu,D=T(()=>{"use strict";Ca=Object.defineProperty,nx=Object.getOwnPropertyDescriptor,Du=Object.getOwnPropertySymbols,ox=Object.prototype.hasOwnProperty,ix=Object.prototype.propertyIsEnumerable,qu=(e,t,r)=>t in e?Ca(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ax=(e,t)=>{for(var r in t||(t={}))ox.call(t,r)&&qu(e,r,t[r]);if(Du)for(var r of Du(t))ix.call(t,r)&&qu(e,r,t[r]);return e},sx=(e,t)=>{for(var r in t)Ca(e,r,{get:t[r],enumerable:!0})},Uu=(e,t,r,n)=>{for(var o=n>1?void 0:n?nx(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(n?a(t,r,o):a(o))||o);return n&&o&&Ca(t,r,o),o},lx=(e,t,r)=>new Promise((n,o)=>{var i=l=>{try{s(r.next(l))}catch(c){o(c)}},a=l=>{try{s(r.throw(l))}catch(c){o(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,a);s((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}Tt=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))}})}};fx=(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))(fx||{}),Oa=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}},Pa=class extends Oa{constructor(){super(...arguments),this.kind="INTERNAL_ERROR"}},Hu=class extends Oa{constructor(){super(...arguments),this.kind="USER_ERROR"}},Ju=class extends Hu{constructor(){super(...arguments),this.name="USER_VALIDATE_ERROR"}},Zt=class extends Hu{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))}},Vu=class extends Pa{constructor(){super(...arguments),this.name="INTERNAL_SCHEMA_PARSE_ERROR",this.priority="P0"}},Gu=class extends Pa{constructor(){super(...arguments),this.name="INTERNAL_GLOBAL_JS_ERROR",this.priority="P1"}},Jr=class extends Oa{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}}},Na=class extends Pa{constructor(){super(...arguments),this.name="INTERNAL_REPORTER_ERROR"}};et={log:Mr("log"),warn:Mr("warn"),info:Mr("info"),error:Mr("error"),debug:Mr("debug")};Object.assign(globalThis,{logger:et});Sa=Symbol.for("Jolibox.canIUseMap"),hx={};globalThis[Sa]||(globalThis[Sa]=hx);Da={get config(){return globalThis[Sa]}},mx=(e=>(e[e.System=1e3]="System",e[e.ErrorTrace=1001]="ErrorTrace",e[e.UserDefined=1002]="UserDefined",e))(mx||{}),qa=(e=>(e.MiniGame="mini-game",e.MiniDrama="mini-drama",e.App="app",e.WebSDK="web-sdk",e.AppSDK="app-sdk",e))(qa||{}),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||{}),Zn=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)});La();Vr={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")},gx="device_id",_x="advertising_id",Ku=e=>(window.__joliboxLocalStorage__.getItem(e)||window.__joliboxLocalStorage__.setItem(e,Zn()),window.__joliboxLocalStorage__.getItem(e)),Wu=()=>new URLSearchParams(window.location.search).get("deviceId")||Ku(gx),zu=()=>new URLSearchParams(window.location.search).get("advertisingId")||Ku(_x),Ia=class Ta{constructor(t){this.element=t,this.next=Ta.Undefined,this.prev=Ta.Undefined}};Ia.Undefined=new Ia(void 0);W=Ia,yx=class{constructor(){this._first=W.Undefined,this._last=W.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===W.Undefined}clear(){let e=this._first;for(;e!==W.Undefined;){let t=e.next;e.prev=W.Undefined,e.next=W.Undefined,e=t}this._first=W.Undefined,this._last=W.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new W(e);if(this._first===W.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!==W.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==W.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==W.Undefined&&e.next!==W.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===W.Undefined&&e.next===W.Undefined?(this._first=W.Undefined,this._last=W.Undefined):e.next===W.Undefined?(this._last=this._last.prev,this._last.next=W.Undefined):e.prev===W.Undefined&&(this._first=this._first.next,this._first.prev=W.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==W.Undefined;)yield e.element,e=e.next}},bx=0,Fr=class{constructor(e){this.value=e,this.id=bx++}},jr=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 Fr&&(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,a,s,l;if(this._disposed)return()=>{console.info("[Jolibox SDK] Emitter is _disposed")};r&&(t=t.bind(r));let c=new Fr(t);return this._listeners?this._listeners instanceof Fr?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)),(l=(s=this.options)==null?void 0:s.onDidAddListener)==null||l.call(s,this),this._size++,()=>{var d,u,h,p;if(!this._disposed){if(this._listeners instanceof Fr)this._listeners.id===c.id&&(this._listeners=void 0,this._size=0,(u=(d=this.options)==null?void 0:d.onDidRemoveLastListener)==null||u.call(d));else if(this._listeners){let m=this._listeners.indexOf(c);m>=0&&(this._listeners.splice(m,1),this._size--,this._size===0&&((p=(h=this.options)==null?void 0:h.onDidRemoveLastListener)==null||p.call(h)))}}}}),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 Fr?this._deliver(this._listeners,e):this._listeners.forEach(t=>this._deliver(t,e)))}hasListeners(){return this._size>0}},tt=class{constructor(){this.listeners=new Map,this.listerHandlerMap=new WeakMap,this.cachedEventQueue=new Map}on(e,t,r=!0){var n;let o=(n=this.listeners.get(e))!=null?n:new jr,i=l=>t(...l.args),a=o.event(i);this.listerHandlerMap.set(t,{handler:i,dispose:a}),this.listeners.set(e,o);let s=this.cachedEventQueue.get(e);if(s&&r)for(let l of s)t(...l.args)}flushCachedEvent(e){e?this.cachedEventQueue.delete(e):this.cachedEventQueue.clear()}off(e,t){let r=this.listerHandlerMap.get(t);r&&(r.dispose(),this.listerHandlerMap.delete(t))}emit(e,...t){let r=this.listeners.get(e),n=this.cachedEventQueue.get(e);n||(n=new yx,this.cachedEventQueue.set(e,n)),n.push({args:t}),r&&r.fire({event:e,args:t})}once(e,t){let r=(...n)=>{t(...n),this.off(e,r)};this.on(e,r,!1)}},Ra={};sx(Ra,{None:()=>wx,filter:()=>xx,once:()=>Yu,toPromise:()=>Ex});wx=()=>(console.log("[Jolibox SDK] None Event"),()=>{console.log("[Jolibox SDK] None Event dispose")});Aa=Symbol.for("Jolibox.hostEmitter"),Ax=()=>{let e=new tt;return globalThis[Aa]||(globalThis[Aa]={on:e.on.bind(e),off:e.off.bind(e),emit:e.emit.bind(e),once:e.once.bind(e)}),globalThis[Aa]},de=Ax();Qn=class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new jr,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 Sx(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}};Qn=Uu([ju],Qn);ka=class{constructor(){this._onWillExecuteCommand=new jr,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._onDidExecuteCommand=new jr,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this.registry=new Qn,this._starActivation=null}_activateStar(){return this._starActivation||(this._starActivation=cx(3e4)),this._starActivation}executeCommand(e,...t){return lx(this,null,function*(){return this.registry.getCommand(e)?this._tryExecuteCommand(e,t):(yield Promise.all([Promise.race([this._activateStar(),Ra.toPromise(Ra.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}}};ka=Uu([ju],ka);Qu=Symbol.for("Jolibox.commands")});function Te(e,t={}){Ua.emit("ERROR_REPORT",{error:e,options:t})}var Ua,Ht,rt=T(()=>{"use strict";D();D();Ua=new tt,Ht=new tt;Te.debounce=Hr(Te,50,{leading:!0})});var Ma,kx,Xu,Zu,ed=T(()=>{"use strict";D();rt();Ma=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{}}},kx=e=>{let t=JSON.stringify(e);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},Xu=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,a,s]=o;return{headerJson:Ma(i),payloadJson:Ma(a),signature:Ma(s)}}else throw"joli_source is missing"}catch(r){return Te(new Vu(`${e} not a valid schema: ${r}`)),{headerJson:{},payloadJson:{},signature:{}}}},Zu=(e,t)=>{let r=t.split(".");if(r&&r.length===3){let n=r[0],o=kx(e),i=r[2];return`${n}.${o}.${i}`}return t}});var Cx,Fa,td=T(()=>{"use strict";D();Cx="1.1.22",Fa=()=>Cx});var Ox,rd,ja,nd,me,Px,S,ee=T(()=>{"use strict";D();ed();td();D();Ox={deviceInfo:{brand:"UnknownBrand",model:"UnknownModel",did:Wu(),adId:zu(),pixelRatio:window.devicePixelRatio||1,platform:Vr.isAndroid?"android":Vr.isiOS?"ios":"h5",system:"UnknownSystemVersion",lang:"zh"},sdkInfo:{nativeSDKVersion:"",jssdkVersion:Fa()},schema:window.location.href,platform:Vr.isAndroid?"android":Vr.isiOS?"ios":"h5"},ja=(rd=globalThis.joliboxJSCore)==null?void 0:rd.env,me=Object.assign({},(nd=ja==null?void 0:ja())!=null?nd:Ox),Px=()=>{var h,p,m,g,_,v,y,A,k,O,I;let{payloadJson:e,headerJson:t,signature:r}=me.schema.length?Xu(me.schema):{},n=`${me.deviceInfo.did}-${new Date().getTime()}`,i=new URL(me.schema.length?me.schema:window.location.href).searchParams,a=(m=(p=(h=i.get("mpId"))!=null?h:i.get("appId"))!=null?p:i.get("gameId"))!=null?m:"",s=(v=(_=(g=me.clientSessionId)!=null?g:e==null?void 0:e.sessionId)!=null?_:i.get("sessionId"))!=null?v:n,l=!!((A=(y=e==null?void 0:e.testAdsMode)!=null?y:e==null?void 0:e.__testAdsMode)!=null?A:i.get("testAdsMode")==="true"),c=(I=(O=(k=e==null?void 0:e.joliboxEnv)!=null?k:e==null?void 0:e.__joliboxEnv)!=null?O:i.get("joliboxEnv"))!=null?I:"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 w;return(w=i.get("joliSource"))!=null?w:null},get mpId(){var w;return(w=a!=null?a:e==null?void 0:e.id)!=null?w:""},get mpVersion(){var w;return(w=t==null?void 0:t.ver)!=null?w:Fa()},get mpType(){var w,B;return(B=(w=t==null?void 0:t.__mpType)!=null?w:e==null?void 0:e.__mpType)!=null?B:"game"},get platform(){var w;return((w=me.platform)!=null?w:me.deviceInfo.platform).toLowerCase()},get deviceInfo(){return me.deviceInfo},get sdkInfo(){return me.sdkInfo},get hostInfo(){return me.hostInfo},get hostUserInfo(){return me.hostUserInfo},get sessionId(){var w,B;return(B=(w=me.clientSessionId)!=null?w:s)!=null?B:n},get channel(){return u},get webviewId(){var w;return(w=me.webviewId)!=null?w:-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"},get adId(){var w;return(w=me.deviceInfo.adId)!=null?w:me.deviceInfo.did},onEnvConfigChanged:w=>{Bu(me,w,$u)},encodeJoliSourceQuery:w=>{var B,$e;return t&&r?Zu(R(R({},e),w),(B=i.get("joliSource"))!=null?B:""):($e=i.get("joliSource"))!=null?$e:""}}},S=Px()});var Ba,id,Nx,Dx,od,qx,ad=T(()=>{"use strict";D();rt();ee();D();Ba=!1,id=(e,t)=>e==null?!1:t in e,Nx=e=>id(e,"kind"),Dx=e=>{let t=e.toLowerCase().split("_");return t[0]+t.slice(1).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join("")},od=(e,t={},r)=>{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:Dx(e.name)},o=q(R({},n),{env:t.environment,isFromUser:r});r?Ht.emit("GLOBAL_USER_ERROR",e,o):Ht.emit("GLOBAL_ERROR",e,o)},qx=e=>id(e,"kind")&&e.kind==="USER_ERROR";Ua.on("ERROR_REPORT",({error:e,options:t})=>{if(Ba)return;Ba=!0;let r=Nx(e)&&e.raw?e.raw:e;try{let n=qx(e);od(e,t,n)}catch(n){let o=n instanceof Error?n.message:String(n),i=new Na(`${o}, origin error: ${r.message}`);et.error(i),od(new Na(i.message),{environment:t.environment},!1)}finally{Ba=!1}})});var Rt,$a,er=T(()=>{"use strict";rt();D();rt();Rt=(e,t)=>{var r,n;return new Jr((n=(r=t==null?void 0:t.errMsg)!=null?r:e.msg)!=null?n:"",e.code,e.type)},$a=e=>new Ju(e)});var sd=T(()=>{"use strict";ad();er();D();Ie();Ht.on("GLOBAL_ERROR",(e,t)=>{var n;let r={message:e.message,stack:(n=e.stack)!=null?n:"",errorType:e.name,source:0};L("trackAsync",{event:"reportJsError",data:r})});Ht.on("GLOBAL_USER_ERROR",(e,t)=>{et.log("UserError",e,t)})});var Ha=T(()=>{"use strict"});function ld(e,t){let r=(n,o,i)=>{let a=q(R({tag:n},t),{extra:R({},o)});n=="globalJsError"?Te(new Gu(JSON.stringify(a))):e("systemLog",a,i)};return r.debounce=Hr(r,500,{leading:!0}),r}function cd(e){let t=(r,n,o)=>{var s;let i=(s=o&&JSON.stringify(o))!=null?s:0,a={speed_value_type:r,total_duration:n};i&&Object.assign(a,{extra:i}),e("joliboxSpeedAnalysis",a)};return t.debounce=Hr(t,500,{leading:!0}),t}var ud=T(()=>{"use strict";D();D();rt()});function dd(e,t){let r=ld(e,t),n=cd(r);return{track:r,trackPerformance:n}}var fd=T(()=>{"use strict";ud()});var pd=T(()=>{"use strict";ee();D();D()});var hd=T(()=>{"use strict";fd();Ha();pd()});var eo,md=T(()=>{"use strict";eo=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,a=0,s=()=>{if(!i)return;let p=Date.now(),m=p-r;m>=this.interval&&(this.visible&&(a+=m,t(a)),r=p),n=requestAnimationFrame(s)},l=()=>{d(),r=Date.now(),o=window.setInterval(()=>{if(!i)return;let p=Date.now();p-r>=this.interval&&(r=p)},this.interval)},c=()=>{u(),r=Date.now(),n=requestAnimationFrame(s)},d=()=>{n&&(cancelAnimationFrame(n),n=0)},u=()=>{o&&(clearInterval(o),o=0)};this.eventEmitter.on("visible",p=>{i&&(console.log("visible",p),p?c():l())});let h=this.visible;return{start(){i||(i=!0,h?c():l())},stop(){i=!1,d(),u()}}}}});var Ja=T(()=>{"use strict"});function gd(e,t,r){let{response:n,startTime:o,endTime:i,requestFrom:a}=r,{errMsg:s="",profile:l={}}=n,d={duration:i-o,request_type:e,url:t.split("?")[0],result:r.state,error_msg:r.state==="fail"?s:"",socket_reused:l.socketReused?1:0,request_from:a};(a==="public"&&vd<Ux||a==="inner")&&(d.joli_request_number=vd++,setTimeout(()=>{Le("joliboxNetRequestResult",d)},500))}var vd,Ux,_d=T(()=>{"use strict";Ja();kt();vd=0,Ux=10});function to(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",a=(d=r==null?void 0:r.defaultHeaders)!=null?d:{};return Ve("onRequestTaskStateChange",u=>{if(typeof u.requestTaskId!="string")return;let h=n.get(u.requestTaskId);if(h)if(u.state==="success"){let p=u,{requestTaskId:g,state:_}=p,v=Ze(p,["requestTaskId","state"]);u.statusCode===200?h.resolve(v):h.reject(v),n.delete(g)}else if(u.state==="fail"){let m=u,{requestTaskId:g,state:_}=m,v=Ze(m,["requestTaskId","state"]);h.reject(v),n.delete(g)}else et.warn("onRequestTaskStateChange unknown event",u)}),de.on("onLoginComplete",({isLogin:u,token:h})=>{u&&h&&(a["X-JOLI-TOKEN"]=h)}),(p,...m)=>x(this,[p,...m],function*(u,h={}){let g=Date.now(),_=Mx(u,q(R({},h),{baseUrl:o})),{method:v="GET",responseType:y="text",dataType:A="json",timeout:k,enableCache:O=!1,appendHostCookie:I=!0}=h,w=Object.assign({"content-type":"application/json"},a,h.header),B={url:_,method:v,header:w,enableCache:O,responseType:y,appendHostCookie:I};if(v=="POST"||v=="PUT"){let Xe=jx(h.data,w["content-type"]);B.data=Xe}k&&Object.assign(B,{timeout:k});let{data:{requestTaskId:$e}}=L(e,B);if(typeof $e!="string")throw Rt({code:-1,msg:"requestTaskId is not a string"});let Xt=(Xe,dt)=>{gd("request",_,{state:Xe,startTime:g,endTime:Date.now(),params:B,response:dt,requestId:$e,requestFrom:i=="public"?"public":"inner"})},{resolve:He,reject:Bt,promise:zw}=new Tt;n.set($e,{resolve:He,reject:Bt});try{let Xe=yield zw;Xt("success",Xe);let{data:dt}=Xe;return A==="json"&&typeof dt=="string"&&(dt=Fx(dt)),{url:_,timeout:k,method:v,response:q(R({},Xe),{data:dt})}}catch(Xe){let dt=Xe;if($t(dt)){let{errMsg:Hn,prefetchDetail:Yw,isPrefetch:Qw,errNo:Xw}=dt;Br(Hn)&&(Xt("fail",{errMsg:Hn,isPrefetch:Qw,prefetchDetail:Yw}),Te(Rt({code:-1,msg:Hn},{errNo:Xw,errMsg:Hn})))}throw Xe}})}function Fx(e){try{return JSON.parse(e.trim())}catch(t){return e}}function jx(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 Mx,Va=T(()=>{"use strict";D();_d();Ja();Ie();rt();er();Mx=(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 Ga,yd,Ee,Jt=T(()=>{"use strict";Va();ee();Ga={};(yd=S.hostUserInfo)!=null&&yd.token&&(Ga["x-joli-token"]=S.hostUserInfo.token);S.joliSource&&(Ga["x-joli-source"]=S.joliSource);Ee=to("createRequestTaskSync","operateRequestTaskSync",{type:"inner",baseUrl:S.testMode?"https://stg-api.jolibox.com":"https://api.jolibox.com",defaultHeaders:Ga})});var ro,bd=T(()=>{"use strict";ee();md();Jt();Ie();ro=class extends eo{constructor(t,r,n){super(r,n),this.gameId=S.mpId,this.sessionId=S.sessionId,this.track=t,this.taskUrl=S.testMode?"https://stg-api.jolibox.com/api/base/app-event":"https://api.jolibox.com/api/base/app-event"}reporter(t){return x(this,null,function*(){let{event:r,params:n}=t,o={eventType:r,gameInfo:R({gameId:this.gameId,sessionId:this.sessionId},n)};yield S.platform==="android"?Ee("/api/base/app-event",{method:"POST",data:o}):we("trackAppEventAsync",{url:this.taskUrl,body:JSON.stringify(o)})})}reportToNative(t){return x(this,null,function*(){let{event:r,params:n}=t;yield we("userTrackAsync",{event:r,params:R({},n),gameId:this.gameId})})}tracker(t,r=null){this.track(t,r)}}});var Sd={};fu(Sd,{nativeTaskEmitter:()=>Gr,taskTracker:()=>Oe,track:()=>Le,trackPerformance:()=>xd});var Bx,wd,Ed,Le,xd,Ad,Gr,Oe,kt=T(()=>{"use strict";sd();D();Ha();hd();ee();bd();Ie();Bx=(e,t,r)=>{var a,s;let n=t,o=$t(n.extra)?n.extra:Br(n.extra)?JSON.parse(n.extra):{},i=q(R({},o),{mp_id:(a=n.mp_id)!=null?a:"",mp_version:(s=n.mp_version)!=null?s:""});L("trackAsync",{event:e,data:i,webviewId:r})},{track:Le,trackPerformance:xd}=dd(Bx,{type:qa.AppSDK,platform:"native",jssdk_version:(Ed=(wd=S.sdkInfo)==null?void 0:wd.jssdkVersion)!=null?Ed:"1.0.0",mp_id:S.mpId,mp_version:S.mpVersion}),Ad=Z();Ad.registerCommand("ReportSDK.traceSystemTimeline",({event:e,duration:t,extra:r})=>{xd(e,t,r)});Ad.registerCommand("ReportSDK.traceSystem",({event:e,info:t})=>{Le(e,t)});Gr=new tt,Oe=new ro(Le,Gr)});function Id(){let e=null,t=null,r=window.fetch,n=()=>{t=document.createElement("meta"),t.setAttribute("name","viewport"),t.setAttribute("content","viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"),t.setAttribute("data-jolibox-sdk","viewport-meta"),e=document.createElement("style"),e.setAttribute("data-jolibox-sdk","default-styles");let a=`
2
2
  html[data-jolibox-root] {
3
3
  height: 100%;
4
4
  margin: 0;
@@ -16,8 +16,8 @@ var Zw=Object.create;var Vn=Object.defineProperty,eE=Object.defineProperties,tE=
16
16
  min-height: 100dvh;
17
17
  }
18
18
  }
19
- `;e.textContent=a;let s=document.head||document.getElementsByTagName("head")[0];s.insertBefore(t,s.firstChild),s.insertBefore(e,s.firstChild),document.documentElement.setAttribute("data-jolibox-root","")},o=()=>{function a(l){return x(this,null,function*(){let c=l instanceof URL?l.href:l,d=new Promise((u,h)=>{let p=new XMLHttpRequest;p.open("GET",c),p.responseType="arraybuffer",p.addEventListener("load",()=>u(p.response)),p.addEventListener("error",h),p.send()});try{let u=yield d;return new Response(u,{headers:new Headers([["Content-Type","application/wasm"]])}).clone()}catch(u){throw console.error("Failed to load wasm:",u),u}})}let s=window.fetch;window.fetch=(l,c)=>{let d=l instanceof URL?l.href:l.toString();return d.endsWith(".wasm")?a(d):s(l,c)}},i=()=>{e!=null&&e.parentNode&&(e.parentNode.removeChild(e),e=null),t!=null&&t.parentNode&&(t.parentNode.removeChild(t),t=null),document.documentElement.removeAttribute("data-jolibox-root"),window.fetch=r};return n(),o(),i}var Td=T(()=>{"use strict"});var Rd=T(()=>{"use strict"});var kd=T(()=>{"use strict";D();La()});var Cd=T(()=>{"use strict";ee()});var no,Ka=T(()=>{"use strict";Rd();kd();ee();Cd();D();no=new tt});function ft(e,t){for(var r in t)e[r]=t[r];return e}function Xa(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function nt(e,t,r){var n,o,i,a={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?so.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return io(e,a,n,o,null)}function io(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?++qd:o,__i:-1,__u:0};return o==null&&C.vnode!=null&&C.vnode(i),i}function ot(e){return e.children}function Ue(e,t){this.props=e,this.context=t}function tr(e,t){if(t==null)return e.__?tr(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"?tr(e):null}function Fd(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 Fd(e)}}function Pd(e){(!e.__d&&(e.__d=!0)&&Jt.push(e)&&!ao.__r++||Od!==C.debounceRendering)&&((Od=C.debounceRendering)||Ld)(ao)}function ao(){for(var e,t,r,n,o,i,a,s=1;Jt.length;)Jt.length>s&&Jt.sort(Ud),e=Jt.shift(),s=Jt.length,e.__d&&(r=void 0,o=(n=(t=e).__v).__e,i=[],a=[],t.__P&&((r=ft({},n)).__v=n.__v+1,C.vnode&&C.vnode(r),Za(t.__P,r,n,t.__n,t.__P.namespaceURI,32&n.__u?[o]:null,i,o==null?tr(n):o,!!(32&n.__u),a),r.__v=n.__v,r.__.__k[r.__i]=r,Hd(i,r,a),r.__e!=o&&Fd(r)));ao.__r=0}function Bd(e,t,r,n,o,i,a,s,l,c,d){var u,h,p,m,g,_,v=n&&n.__k||jd,y=t.length;for(l=Jx(r,t,v,l,y),u=0;u<y;u++)(p=r.__k[u])!=null&&(h=p.__i===-1?Kr:v[p.__i]||Kr,p.__i=u,_=Za(e,p,h,o,i,a,s,l,c,d),m=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&es(h.ref,null,p),d.push(p.ref,p.__c||m,p)),g==null&&m!=null&&(g=m),4&p.__u||h.__k===p.__k?l=$d(p,l,e):typeof p.type=="function"&&_!==void 0?l=_:m&&(l=m.nextSibling),p.__u&=-7);return r.__e=g,l}function Jx(e,t,r,n,o){var i,a,s,l,c,d=r.length,u=d,h=0;for(e.__k=new Array(o),i=0;i<o;i++)(a=t[i])!=null&&typeof a!="boolean"&&typeof a!="function"?(l=i+h,(a=e.__k[i]=typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?io(null,a,null,null,null):Wr(a)?io(ot,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?io(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=Vx(a,r,l,u))!==-1&&(u--,(s=r[c])&&(s.__u|=2)),s==null||s.__v===null?(c==-1&&(o>d?h--:o<d&&h++),typeof a.type!="function"&&(a.__u|=4)):c!=l&&(c==l-1?h--:c==l+1?h++:(c>l?h--:h++,a.__u|=4))):e.__k[i]=null;if(u)for(i=0;i<d;i++)(s=r[i])!=null&&!(2&s.__u)&&(s.__e==n&&(n=tr(s)),Vd(s,s));return n}function $d(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=$d(n[o],t,r));return t}e.__e!=t&&(t&&e.type&&!r.contains(t)&&(t=tr(e)),r.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function zr(e,t){return t=t||[],e==null||typeof e=="boolean"||(Wr(e)?e.some(function(r){zr(r,t)}):t.push(e)),t}function Vx(e,t,r,n){var o,i,a=e.key,s=e.type,l=t[r];if(l===null&&e.key==null||l&&a==l.key&&s===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)&&a==l.key&&s===l.type)return o;o--}if(i<t.length){if((l=t[i])&&!(2&l.__u)&&a==l.key&&s===l.type)return i;i++}}return-1}function Nd(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||Hx.test(t)?r:r+"px"}function oo(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||Nd(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Nd(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Md,"$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=Qa,e.addEventListener(t,i?za:Wa,i)):e.removeEventListener(t,i?za:Wa,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(a){}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function Dd(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t.u==null)t.u=Qa++;else if(t.u<r.t)return;return r(C.event?C.event(t):t)}}}function Za(e,t,r,n,o,i,a,s,l,c){var d,u,h,p,m,g,_,v,y,A,k,O,I,w,B,$e,Xt,He=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(l=!!(32&r.__u),i=[s=t.__e=r.__e]),(d=C.__b)&&d(t);e:if(typeof He=="function")try{if(v=t.props,y="prototype"in He&&He.prototype.render,A=(d=He.contextType)&&n[d.__c],k=d?A?A.props.value:d.__:n,r.__c?_=(u=t.__c=r.__c).__=u.__E:(y?t.__c=u=new He(v,k):(t.__c=u=new Ue(v,k),u.constructor=He,u.render=Kx),A&&A.sub(u),u.props=v,u.state||(u.state={}),u.context=k,u.__n=n,h=u.__d=!0,u.__h=[],u._sb=[]),y&&u.__s==null&&(u.__s=u.state),y&&He.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=ft({},u.__s)),ft(u.__s,He.getDerivedStateFromProps(v,u.__s))),p=u.props,m=u.state,u.__v=t,h)y&&He.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),y&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(y&&He.getDerivedStateFromProps==null&&v!==p&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(v,k),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(v,u.__s,k)===!1||t.__v==r.__v)){for(t.__v!=r.__v&&(u.props=v,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(Ft){Ft&&(Ft.__=t)}),O=0;O<u._sb.length;O++)u.__h.push(u._sb[O]);u._sb=[],u.__h.length&&a.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(v,u.__s,k),y&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(p,m,g)})}if(u.context=k,u.props=v,u.__P=e,u.__e=!1,I=C.__r,w=0,y){for(u.state=u.__s,u.__d=!1,I&&I(t),d=u.render(u.props,u.state,u.context),B=0;B<u._sb.length;B++)u.__h.push(u._sb[B]);u._sb=[]}else do u.__d=!1,I&&I(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++w<25);u.state=u.__s,u.getChildContext!=null&&(n=ft(ft({},n),u.getChildContext())),y&&!h&&u.getSnapshotBeforeUpdate!=null&&(g=u.getSnapshotBeforeUpdate(p,m)),$e=d,d!=null&&d.type===ot&&d.key==null&&($e=Jd(d.props.children)),s=Bd(e,Wr($e)?$e:[$e],t,r,n,o,i,a,s,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&a.push(u),_&&(u.__E=u.__=null)}catch(Ft){if(t.__v=null,l||i!=null)if(Ft.then){for(t.__u|=l?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;i[i.indexOf(s)]=null,t.__e=s}else for(Xt=i.length;Xt--;)Xa(i[Xt]);else t.__e=r.__e,t.__k=r.__k;C.__e(Ft,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):s=t.__e=Gx(r.__e,t,r,n,o,i,a,l,c);return(d=C.diffed)&&d(t),128&t.__u?void 0:s}function Hd(e,t,r){for(var n=0;n<r.length;n++)es(r[n],r[++n],r[++n]);C.__c&&C.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){C.__e(i,o.__v)}})}function Jd(e){return typeof e!="object"||e==null?e:Wr(e)?e.map(Jd):ft({},e)}function Gx(e,t,r,n,o,i,a,s,l){var c,d,u,h,p,m,g,_=r.props,v=t.props,y=t.type;if(y=="svg"?o="http://www.w3.org/2000/svg":y=="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((p=i[c])&&"setAttribute"in p==!!y&&(y?p.localName==y:p.nodeType==3)){e=p,i[c]=null;break}}if(e==null){if(y==null)return document.createTextNode(v);e=document.createElementNS(o,y,v.is&&v),s&&(C.__m&&C.__m(t,i),s=!1),i=null}if(y===null)_===v||s&&e.data===v||(e.data=v);else{if(i=i&&so.call(e.childNodes),_=r.props||Kr,!s&&i!=null)for(_={},c=0;c<e.attributes.length;c++)_[(p=e.attributes[c]).name]=p.value;for(c in _)if(p=_[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=p;else if(!(c in v)){if(c=="value"&&"defaultValue"in v||c=="checked"&&"defaultChecked"in v)continue;oo(e,c,null,p,o)}}for(c in v)p=v[c],c=="children"?h=p:c=="dangerouslySetInnerHTML"?d=p:c=="value"?m=p:c=="checked"?g=p:s&&typeof p!="function"||_[c]===p||oo(e,c,p,_[c],o);if(d)s||u&&(d.__html===u.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),Bd(t.type==="template"?e.content:e,Wr(h)?h:[h],t,r,n,y=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,a,i?i[0]:r.__k&&tr(r,0),s,l),i!=null)for(c=i.length;c--;)Xa(i[c]);s||(c="value",y=="progress"&&m==null?e.removeAttribute("value"):m!==void 0&&(m!==e[c]||y=="progress"&&!m||y=="option"&&m!==_[c])&&oo(e,c,m,_[c],o),c="checked",g!==void 0&&g!==e[c]&&oo(e,c,g,_[c],o))}return e}function es(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){C.__e(o,r)}}function Vd(e,t,r){var n,o;if(C.unmount&&C.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||es(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){C.__e(i,t)}n.base=n.__P=null}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&Vd(n[o],t,r||typeof e.type!="function");r||Xa(e.__e),e.__c=e.__=e.__e=void 0}function Kx(e,t,r){return this.constructor(e,r)}function rr(e,t,r){var n,o,i,a;t==document&&(t=document.documentElement),C.__&&C.__(e,t),o=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],a=[],Za(t,e=(!n&&r||t).__k=nt(ot,null,[e]),o||Kr,Kr,t.namespaceURI,!n&&r?[r]:o?null:t.firstChild?so.call(t.childNodes):null,i,!n&&r?r:o?o.__e:t.firstChild,n,a),Hd(i,e,a)}var so,C,qd,Ya,Jt,Od,Ld,Ud,Md,Qa,Wa,za,$x,Kr,jd,Hx,Wr,nr=T(()=>{Kr={},jd=[],Hx=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Wr=Array.isArray;so=jd.slice,C={__e:function(e,t,r,n){for(var o,i,a;t=t.__;)if((o=t.__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}},qd=0,Ya=function(e){return e!=null&&e.constructor==null},Ue.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ft({},this.state),typeof e=="function"&&(e=e(ft({},r),this.props)),e&&ft(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Pd(this))},Ue.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Pd(this))},Ue.prototype.render=ot,Jt=[],Ld=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ud=function(e,t){return e.__v.__b-t.__v.__b},ao.__r=0,Md=/(PointerCapture)$|Capture$/i,Qa=0,Wa=Dd(!1),za=Dd(!0),$x=0});var Y=f((aF,Gd)=>{"use strict";Gd.exports=function(e){try{return!!e()}catch(t){return!0}}});var or=f((sF,Kd)=>{"use strict";var Wx=Y();Kd.exports=!Wx(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var fe=f((lF,Yd)=>{"use strict";var Wd=or(),zd=Function.prototype,ts=zd.call,zx=Wd&&zd.bind.bind(ts,ts);Yd.exports=Wd?zx:function(e){return function(){return ts.apply(e,arguments)}}});var Re=f((cF,Qd)=>{"use strict";var Yx=fe();Qd.exports=Yx({}.isPrototypeOf)});var te=f((rs,Xd)=>{"use strict";var Yr=function(e){return e&&e.Math===Math&&e};Xd.exports=Yr(typeof globalThis=="object"&&globalThis)||Yr(typeof window=="object"&&window)||Yr(typeof self=="object"&&self)||Yr(typeof global=="object"&&global)||Yr(typeof rs=="object"&&rs)||function(){return this}()||Function("return this")()});var ns=f((uF,rf)=>{"use strict";var Qx=or(),tf=Function.prototype,Zd=tf.apply,ef=tf.call;rf.exports=typeof Reflect=="object"&&Reflect.apply||(Qx?ef.bind(Zd):function(){return ef.apply(Zd,arguments)})});var pt=f((dF,of)=>{"use strict";var nf=fe(),Xx=nf({}.toString),Zx=nf("".slice);of.exports=function(e){return Zx(Xx(e),8,-1)}});var Qr=f((fF,af)=>{"use strict";var eA=pt(),tA=fe();af.exports=function(e){if(eA(e)==="Function")return tA(e)}});var ve=f((pF,sf)=>{"use strict";var os=typeof document=="object"&&document.all;sf.exports=typeof os=="undefined"&&os!==void 0?function(e){return typeof e=="function"||e===os}:function(e){return typeof e=="function"}});var Me=f((hF,lf)=>{"use strict";var rA=Y();lf.exports=!rA(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var ht=f((mF,cf)=>{"use strict";var nA=or(),lo=Function.prototype.call;cf.exports=nA?lo.bind(lo):function(){return lo.apply(lo,arguments)}});var is=f(ff=>{"use strict";var uf={}.propertyIsEnumerable,df=Object.getOwnPropertyDescriptor,oA=df&&!uf.call({1:2},1);ff.f=oA?function(t){var r=df(this,t);return!!r&&r.enumerable}:uf});var Xr=f((gF,pf)=>{"use strict";pf.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var co=f((_F,hf)=>{"use strict";var iA=fe(),aA=Y(),sA=pt(),as=Object,lA=iA("".split);hf.exports=aA(function(){return!as("z").propertyIsEnumerable(0)})?function(e){return sA(e)==="String"?lA(e,""):as(e)}:as});var ir=f((yF,mf)=>{"use strict";mf.exports=function(e){return e==null}});var ar=f((bF,vf)=>{"use strict";var cA=ir(),uA=TypeError;vf.exports=function(e){if(cA(e))throw new uA("Can't call method on "+e);return e}});var Ct=f((wF,gf)=>{"use strict";var dA=co(),fA=ar();gf.exports=function(e){return dA(fA(e))}});var pe=f((EF,_f)=>{"use strict";var pA=ve();_f.exports=function(e){return typeof e=="object"?e!==null:pA(e)}});var mt=f((xF,yf)=>{"use strict";yf.exports={}});var uo=f((AF,wf)=>{"use strict";var ss=mt(),ls=te(),hA=ve(),bf=function(e){return hA(e)?e:void 0};wf.exports=function(e,t){return arguments.length<2?bf(ss[e])||bf(ls[e]):ss[e]&&ss[e][t]||ls[e]&&ls[e][t]}});var fo=f((SF,Af)=>{"use strict";var mA=te(),Ef=mA.navigator,xf=Ef&&Ef.userAgent;Af.exports=xf?String(xf):""});var ho=f((IF,Cf)=>{"use strict";var kf=te(),cs=fo(),Sf=kf.process,If=kf.Deno,Tf=Sf&&Sf.versions||If&&If.version,Rf=Tf&&Tf.v8,Ye,po;Rf&&(Ye=Rf.split("."),po=Ye[0]>0&&Ye[0]<4?1:+(Ye[0]+Ye[1]));!po&&cs&&(Ye=cs.match(/Edge\/(\d+)/),(!Ye||Ye[1]>=74)&&(Ye=cs.match(/Chrome\/(\d+)/),Ye&&(po=+Ye[1])));Cf.exports=po});var us=f((TF,Pf)=>{"use strict";var Of=ho(),vA=Y(),gA=te(),_A=gA.String;Pf.exports=!!Object.getOwnPropertySymbols&&!vA(function(){var e=Symbol("symbol detection");return!_A(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Of&&Of<41})});var ds=f((RF,Nf)=>{"use strict";var yA=us();Nf.exports=yA&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var fs=f((kF,Df)=>{"use strict";var bA=uo(),wA=ve(),EA=Re(),xA=ds(),AA=Object;Df.exports=xA?function(e){return typeof e=="symbol"}:function(e){var t=bA("Symbol");return wA(t)&&EA(t.prototype,AA(e))}});var mo=f((CF,qf)=>{"use strict";var SA=String;qf.exports=function(e){try{return SA(e)}catch(t){return"Object"}}});var sr=f((OF,Lf)=>{"use strict";var IA=ve(),TA=mo(),RA=TypeError;Lf.exports=function(e){if(IA(e))return e;throw new RA(TA(e)+" is not a function")}});var vo=f((PF,Uf)=>{"use strict";var kA=sr(),CA=ir();Uf.exports=function(e,t){var r=e[t];return CA(r)?void 0:kA(r)}});var jf=f((NF,Mf)=>{"use strict";var ps=ht(),hs=ve(),ms=pe(),OA=TypeError;Mf.exports=function(e,t){var r,n;if(t==="string"&&hs(r=e.toString)&&!ms(n=ps(r,e))||hs(r=e.valueOf)&&!ms(n=ps(r,e))||t!=="string"&&hs(r=e.toString)&&!ms(n=ps(r,e)))return n;throw new OA("Can't convert object to primitive value")}});var lr=f((DF,Ff)=>{"use strict";Ff.exports=!0});var Hf=f((qF,$f)=>{"use strict";var Bf=te(),PA=Object.defineProperty;$f.exports=function(e,t){try{PA(Bf,e,{value:t,configurable:!0,writable:!0})}catch(r){Bf[e]=t}return t}});var Zr=f((LF,Gf)=>{"use strict";var NA=lr(),DA=te(),qA=Hf(),Jf="__core-js_shared__",Vf=Gf.exports=DA[Jf]||qA(Jf,{});(Vf.versions||(Vf.versions=[])).push({version:"3.41.0",mode:NA?"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 vs=f((UF,Wf)=>{"use strict";var Kf=Zr();Wf.exports=function(e,t){return Kf[e]||(Kf[e]=t||{})}});var cr=f((MF,zf)=>{"use strict";var LA=ar(),UA=Object;zf.exports=function(e){return UA(LA(e))}});var je=f((jF,Yf)=>{"use strict";var MA=fe(),jA=cr(),FA=MA({}.hasOwnProperty);Yf.exports=Object.hasOwn||function(t,r){return FA(jA(t),r)}});var go=f((FF,Qf)=>{"use strict";var BA=fe(),$A=0,HA=Math.random(),JA=BA(1 .toString);Qf.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+JA(++$A+HA,36)}});var ke=f((BF,Zf)=>{"use strict";var VA=te(),GA=vs(),Xf=je(),KA=go(),WA=us(),zA=ds(),ur=VA.Symbol,gs=GA("wks"),YA=zA?ur.for||ur:ur&&ur.withoutSetter||KA;Zf.exports=function(e){return Xf(gs,e)||(gs[e]=WA&&Xf(ur,e)?ur[e]:YA("Symbol."+e)),gs[e]}});var np=f(($F,rp)=>{"use strict";var QA=ht(),ep=pe(),tp=fs(),XA=vo(),ZA=jf(),eS=ke(),tS=TypeError,rS=eS("toPrimitive");rp.exports=function(e,t){if(!ep(e)||tp(e))return e;var r=XA(e,rS),n;if(r){if(t===void 0&&(t="default"),n=QA(r,e,t),!ep(n)||tp(n))return n;throw new tS("Can't convert object to primitive value")}return t===void 0&&(t="number"),ZA(e,t)}});var _s=f((HF,op)=>{"use strict";var nS=np(),oS=fs();op.exports=function(e){var t=nS(e,"string");return oS(t)?t:t+""}});var bs=f((JF,ap)=>{"use strict";var iS=te(),ip=pe(),ys=iS.document,aS=ip(ys)&&ip(ys.createElement);ap.exports=function(e){return aS?ys.createElement(e):{}}});var ws=f((VF,sp)=>{"use strict";var sS=Me(),lS=Y(),cS=bs();sp.exports=!sS&&!lS(function(){return Object.defineProperty(cS("div"),"a",{get:function(){return 7}}).a!==7})});var Es=f(cp=>{"use strict";var uS=Me(),dS=ht(),fS=is(),pS=Xr(),hS=Ct(),mS=_s(),vS=je(),gS=ws(),lp=Object.getOwnPropertyDescriptor;cp.f=uS?lp:function(t,r){if(t=hS(t),r=mS(r),gS)try{return lp(t,r)}catch(n){}if(vS(t,r))return pS(!dS(fS.f,t,r),t[r])}});var dp=f((KF,up)=>{"use strict";var _S=Y(),yS=ve(),bS=/#|\.prototype\./,en=function(e,t){var r=ES[wS(e)];return r===AS?!0:r===xS?!1:yS(t)?_S(t):!!t},wS=en.normalize=function(e){return String(e).replace(bS,".").toLowerCase()},ES=en.data={},xS=en.NATIVE="N",AS=en.POLYFILL="P";up.exports=en});var _o=f((WF,pp)=>{"use strict";var fp=Qr(),SS=sr(),IS=or(),TS=fp(fp.bind);pp.exports=function(e,t){return SS(e),t===void 0?e:IS?TS(e,t):function(){return e.apply(t,arguments)}}});var xs=f((zF,hp)=>{"use strict";var RS=Me(),kS=Y();hp.exports=RS&&kS(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Ot=f((YF,mp)=>{"use strict";var CS=pe(),OS=String,PS=TypeError;mp.exports=function(e){if(CS(e))return e;throw new PS(OS(e)+" is not an object")}});var Pt=f(gp=>{"use strict";var NS=Me(),DS=ws(),qS=xs(),yo=Ot(),vp=_s(),LS=TypeError,As=Object.defineProperty,US=Object.getOwnPropertyDescriptor,Ss="enumerable",Is="configurable",Ts="writable";gp.f=NS?qS?function(t,r,n){if(yo(t),r=vp(r),yo(n),typeof t=="function"&&r==="prototype"&&"value"in n&&Ts in n&&!n[Ts]){var o=US(t,r);o&&o[Ts]&&(t[r]=n.value,n={configurable:Is in n?n[Is]:o[Is],enumerable:Ss in n?n[Ss]:o[Ss],writable:!1})}return As(t,r,n)}:As:function(t,r,n){if(yo(t),r=vp(r),yo(n),DS)try{return As(t,r,n)}catch(o){}if("get"in n||"set"in n)throw new LS("Accessors not supported");return"value"in n&&(t[r]=n.value),t}});var Vt=f((XF,_p)=>{"use strict";var MS=Me(),jS=Pt(),FS=Xr();_p.exports=MS?function(e,t,r){return jS.f(e,t,FS(1,r))}:function(e,t,r){return e[t]=r,e}});var re=f((ZF,bp)=>{"use strict";var tn=te(),BS=ns(),$S=Qr(),HS=ve(),JS=Es().f,VS=dp(),dr=mt(),GS=_o(),fr=Vt(),yp=je();Zr();var KS=function(e){var t=function(r,n,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,o)}return BS(e,this,arguments)};return t.prototype=e.prototype,t};bp.exports=function(e,t){var r=e.target,n=e.global,o=e.stat,i=e.proto,a=n?tn:o?tn[r]:tn[r]&&tn[r].prototype,s=n?dr:dr[r]||fr(dr,r,{})[r],l=s.prototype,c,d,u,h,p,m,g,_,v;for(h in t)c=VS(n?h:r+(o?".":"#")+h,e.forced),d=!c&&a&&yp(a,h),m=s[h],d&&(e.dontCallGetSet?(v=JS(a,h),g=v&&v.value):g=a[h]),p=d&&g?g:t[h],!(!c&&!i&&typeof m==typeof p)&&(e.bind&&d?_=GS(p,tn):e.wrap&&d?_=KS(p):i&&HS(p)?_=$S(p):_=p,(e.sham||p&&p.sham||m&&m.sham)&&fr(_,"sham",!0),fr(s,h,_),i&&(u=r+"Prototype",yp(dr,u)||fr(dr,u,{}),fr(dr[u],h,p),e.real&&l&&(c||!l[h])&&fr(l,h,p)))}});var Ep=f((e2,wp)=>{"use strict";var WS=Math.ceil,zS=Math.floor;wp.exports=Math.trunc||function(t){var r=+t;return(r>0?zS:WS)(r)}});var Rs=f((t2,xp)=>{"use strict";var YS=Ep();xp.exports=function(e){var t=+e;return t!==t||t===0?0:YS(t)}});var ks=f((r2,Ap)=>{"use strict";var QS=Rs(),XS=Math.min;Ap.exports=function(e){var t=QS(e);return t>0?XS(t,9007199254740991):0}});var pr=f((n2,Sp)=>{"use strict";var ZS=ks();Sp.exports=function(e){return ZS(e.length)}});var rn=f((o2,Ip)=>{"use strict";var eI=pt();Ip.exports=Array.isArray||function(t){return eI(t)==="Array"}});var bo=f((i2,Rp)=>{"use strict";var tI=ke(),rI=tI("toStringTag"),Tp={};Tp[rI]="z";Rp.exports=String(Tp)==="[object z]"});var hr=f((a2,kp)=>{"use strict";var nI=bo(),oI=ve(),wo=pt(),iI=ke(),aI=iI("toStringTag"),sI=Object,lI=wo(function(){return arguments}())==="Arguments",cI=function(e,t){try{return e[t]}catch(r){}};kp.exports=nI?wo:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=cI(t=sI(e),aI))=="string"?r:lI?wo(t):(n=wo(t))==="Object"&&oI(t.callee)?"Arguments":n}});var Op=f((s2,Cp)=>{"use strict";var uI=fe(),dI=ve(),Cs=Zr(),fI=uI(Function.toString);dI(Cs.inspectSource)||(Cs.inspectSource=function(e){return fI(e)});Cp.exports=Cs.inspectSource});var Ps=f((l2,Lp)=>{"use strict";var pI=fe(),hI=Y(),Pp=ve(),mI=hr(),vI=uo(),gI=Op(),Np=function(){},Dp=vI("Reflect","construct"),Os=/^\s*(?:class|function)\b/,_I=pI(Os.exec),yI=!Os.test(Np),nn=function(t){if(!Pp(t))return!1;try{return Dp(Np,[],t),!0}catch(r){return!1}},qp=function(t){if(!Pp(t))return!1;switch(mI(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return yI||!!_I(Os,gI(t))}catch(r){return!0}};qp.sham=!0;Lp.exports=!Dp||hI(function(){var e;return nn(nn.call)||!nn(Object)||!nn(function(){e=!0})||e})?qp:nn});var Fp=f((c2,jp)=>{"use strict";var Up=rn(),bI=Ps(),wI=pe(),EI=ke(),xI=EI("species"),Mp=Array;jp.exports=function(e){var t;return Up(e)&&(t=e.constructor,bI(t)&&(t===Mp||Up(t.prototype))?t=void 0:wI(t)&&(t=t[xI],t===null&&(t=void 0))),t===void 0?Mp:t}});var Ns=f((u2,Bp)=>{"use strict";var AI=Fp();Bp.exports=function(e,t){return new(AI(e))(t===0?0:t)}});var Dt=f((d2,Hp)=>{"use strict";var SI=_o(),II=fe(),TI=co(),RI=cr(),kI=pr(),CI=Ns(),$p=II([].push),Nt=function(e){var t=e===1,r=e===2,n=e===3,o=e===4,i=e===6,a=e===7,s=e===5||i;return function(l,c,d,u){for(var h=RI(l),p=TI(h),m=kI(p),g=SI(c,d),_=0,v=u||CI,y=t?v(l,m):r||a?v(l,0):void 0,A,k;m>_;_++)if((s||_ in p)&&(A=p[_],k=g(A,_,h),e))if(t)y[_]=k;else if(k)switch(e){case 3:return!0;case 5:return A;case 6:return _;case 2:$p(y,A)}else switch(e){case 4:return!1;case 7:$p(y,A)}return i?-1:n||o?o:y}};Hp.exports={forEach:Nt(0),map:Nt(1),filter:Nt(2),some:Nt(3),every:Nt(4),find:Nt(5),findIndex:Nt(6),filterReject:Nt(7)}});var on=f((f2,Jp)=>{"use strict";var OI=Y(),PI=ke(),NI=ho(),DI=PI("species");Jp.exports=function(e){return NI>=51||!OI(function(){var t=[],r=t.constructor={};return r[DI]=function(){return{foo:1}},t[e](Boolean).foo!==1})}});var Vp=f(()=>{"use strict";var qI=re(),LI=Dt().filter,UI=on(),MI=UI("filter");qI({target:"Array",proto:!0,forced:!MI},{filter:function(t){return LI(this,t,arguments.length>1?arguments[1]:void 0)}})});var Ge=f((m2,Gp)=>{"use strict";var jI=te(),FI=mt();Gp.exports=function(e,t){var r=FI[e+"Prototype"],n=r&&r[t];if(n)return n;var o=jI[e],i=o&&o.prototype;return i&&i[t]}});var Wp=f((v2,Kp)=>{"use strict";Vp();var BI=Ge();Kp.exports=BI("Array","filter")});var Yp=f((g2,zp)=>{"use strict";var $I=Re(),HI=Wp(),Ds=Array.prototype;zp.exports=function(e){var t=e.filter;return e===Ds||$I(Ds,e)&&t===Ds.filter?HI:t}});var Xp=f((_2,Qp)=>{"use strict";var JI=Yp();Qp.exports=JI});var eh=f((y2,Zp)=>{Zp.exports=Xp()});var an=f((b2,th)=>{"use strict";var VI=Y();th.exports=function(e,t){var r=[][e];return!!r&&VI(function(){r.call(null,t||function(){return 1},1)})}});var rh=f(()=>{"use strict";var GI=re(),KI=Dt().every,WI=an(),zI=WI("every");GI({target:"Array",proto:!0,forced:!zI},{every:function(t){return KI(this,t,arguments.length>1?arguments[1]:void 0)}})});var oh=f((x2,nh)=>{"use strict";rh();var YI=Ge();nh.exports=YI("Array","every")});var ah=f((A2,ih)=>{"use strict";var QI=Re(),XI=oh(),qs=Array.prototype;ih.exports=function(e){var t=e.every;return e===qs||QI(qs,e)&&t===qs.every?XI:t}});var lh=f((S2,sh)=>{"use strict";var ZI=ah();sh.exports=ZI});var uh=f((I2,ch)=>{ch.exports=lh()});var fh=f((T2,dh)=>{"use strict";var eT=Dt().forEach,tT=an(),rT=tT("forEach");dh.exports=rT?[].forEach:function(t){return eT(this,t,arguments.length>1?arguments[1]:void 0)}});var hh=f(()=>{"use strict";var nT=re(),ph=fh();nT({target:"Array",proto:!0,forced:[].forEach!==ph},{forEach:ph})});var vh=f((C2,mh)=>{"use strict";hh();var oT=Ge();mh.exports=oT("Array","forEach")});var _h=f((O2,gh)=>{"use strict";var iT=vh();gh.exports=iT});var yh=f(()=>{});var wh=f((D2,bh)=>{"use strict";var aT=hr(),sT=je(),lT=Re(),cT=_h();yh();var Ls=Array.prototype,uT={DOMTokenList:!0,NodeList:!0};bh.exports=function(e){var t=e.forEach;return e===Ls||lT(Ls,e)&&t===Ls.forEach||sT(uT,aT(e))?cT:t}});var xh=f((q2,Eh)=>{Eh.exports=wh()});var Sh=f((L2,Ah)=>{"use strict";var dT=TypeError,fT=9007199254740991;Ah.exports=function(e){if(e>fT)throw dT("Maximum allowed index exceeded");return e}});var Us=f((U2,Ih)=>{"use strict";var pT=Me(),hT=Pt(),mT=Xr();Ih.exports=function(e,t,r){pT?hT.f(e,t,mT(0,r)):e[t]=r}});var Ch=f(()=>{"use strict";var vT=re(),gT=Y(),_T=rn(),yT=pe(),bT=cr(),wT=pr(),Th=Sh(),Rh=Us(),ET=Ns(),xT=on(),AT=ke(),ST=ho(),kh=AT("isConcatSpreadable"),IT=ST>=51||!gT(function(){var e=[];return e[kh]=!1,e.concat()[0]!==e}),TT=function(e){if(!yT(e))return!1;var t=e[kh];return t!==void 0?!!t:_T(e)},RT=!IT||!xT("concat");vT({target:"Array",proto:!0,arity:1,forced:RT},{concat:function(t){var r=bT(this),n=ET(r,0),o=0,i,a,s,l,c;for(i=-1,s=arguments.length;i<s;i++)if(c=i===-1?r:arguments[i],TT(c))for(l=wT(c),Th(o+l),a=0;a<l;a++,o++)a in c&&Rh(n,o,c[a]);else Th(o+1),Rh(n,o++,c);return n.length=o,n}})});var Ph=f((F2,Oh)=>{"use strict";Ch();var kT=Ge();Oh.exports=kT("Array","concat")});var Dh=f((B2,Nh)=>{"use strict";var CT=Re(),OT=Ph(),Ms=Array.prototype;Nh.exports=function(e){var t=e.concat;return e===Ms||CT(Ms,e)&&t===Ms.concat?OT:t}});var Lh=f(($2,qh)=>{"use strict";var PT=Dh();qh.exports=PT});var Mh=f((H2,Uh)=>{Uh.exports=Lh()});var jh=f(()=>{"use strict";var NT=re(),DT=Dt().some,qT=an(),LT=qT("some");NT({target:"Array",proto:!0,forced:!LT},{some:function(t){return DT(this,t,arguments.length>1?arguments[1]:void 0)}})});var Bh=f((G2,Fh)=>{"use strict";jh();var UT=Ge();Fh.exports=UT("Array","some")});var Hh=f((K2,$h)=>{"use strict";var MT=Re(),jT=Bh(),js=Array.prototype;$h.exports=function(e){var t=e.some;return e===js||MT(js,e)&&t===js.some?jT:t}});var Vh=f((W2,Jh)=>{"use strict";var FT=Hh();Jh.exports=FT});var Kh=f((z2,Gh)=>{Gh.exports=Vh()});var zh=f((Y2,Wh)=>{"use strict";var sn=te(),BT=fo(),$T=pt(),Eo=function(e){return BT.slice(0,e.length)===e};Wh.exports=function(){return Eo("Bun/")?"BUN":Eo("Cloudflare-Workers")?"CLOUDFLARE":Eo("Deno/")?"DENO":Eo("Node.js/")?"NODE":sn.Bun&&typeof Bun.version=="string"?"BUN":sn.Deno&&typeof Deno.version=="object"?"DENO":$T(sn.process)==="process"?"NODE":sn.window&&sn.document?"BROWSER":"REST"}()});var ln=f((Q2,Yh)=>{"use strict";var HT=fe();Yh.exports=HT([].slice)});var Xh=f((X2,Qh)=>{"use strict";var JT=TypeError;Qh.exports=function(e,t){if(e<t)throw new JT("Not enough arguments");return e}});var Fs=f((Z2,em)=>{"use strict";var Zh=te(),VT=ns(),GT=ve(),KT=zh(),WT=fo(),zT=ln(),YT=Xh(),QT=Zh.Function,XT=/MSIE .\./.test(WT)||KT==="BUN"&&function(){var e=Zh.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}();em.exports=function(e,t){var r=t?2:1;return XT?function(n,o){var i=YT(arguments.length,1)>r,a=GT(n)?n:QT(n),s=i?zT(arguments,r):[],l=i?function(){VT(a,this,s)}:a;return t?e(l,o):e(l)}:e}});var nm=f(()=>{"use strict";var ZT=re(),rm=te(),e1=Fs(),tm=e1(rm.setInterval,!0);ZT({global:!0,bind:!0,forced:rm.setInterval!==tm},{setInterval:tm})});var am=f(()=>{"use strict";var t1=re(),im=te(),r1=Fs(),om=r1(im.setTimeout,!0);t1({global:!0,bind:!0,forced:im.setTimeout!==om},{setTimeout:om})});var sm=f(()=>{"use strict";nm();am()});var cm=f((aB,lm)=>{"use strict";sm();var n1=mt();lm.exports=n1.setTimeout});var dm=f((sB,um)=>{um.exports=cm()});function Hs(e,t){Q.__h&&Q.__h(Ce,e,Ao||t),Ao=0;var r=Ce.__H||(Ce.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function Js(e,t){var r=Hs(cn++,3);!Q.__s&&Ks(r.__H,t)&&(r.__=e,r.u=t,Ce.__H.__h.push(r))}function Vs(e,t){var r=Hs(cn++,4);!Q.__s&&Ks(r.__H,t)&&(r.__=e,r.u=t,Ce.__h.push(r))}function Gs(e){return Ao=5,un(function(){return{current:e}},[])}function un(e,t){var r=Hs(cn++,7);return Ks(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function So(e,t){return Ao=8,un(function(){return e},t)}function o1(){for(var e;e=bm.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(xo),e.__H.__h.forEach($s),e.__H.__h=[]}catch(t){e.__H.__h=[],Q.__e(t,e.__v)}}function i1(e){var t,r=function(){clearTimeout(n),ym&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);ym&&(t=requestAnimationFrame(r))}function xo(e){var t=Ce,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),Ce=t}function $s(e){var t=Ce;e.__c=e.__(),Ce=t}function Ks(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}var cn,Ce,Bs,fm,Ao,bm,Q,pm,hm,mm,vm,gm,_m,ym,Ws=T(()=>{nr();Ao=0,bm=[],Q=C,pm=Q.__b,hm=Q.__r,mm=Q.diffed,vm=Q.__c,gm=Q.unmount,_m=Q.__;Q.__b=function(e){Ce=null,pm&&pm(e)},Q.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),_m&&_m(e,t)},Q.__r=function(e){hm&&hm(e),cn=0;var t=(Ce=e.__c).__H;t&&(Bs===Ce?(t.__h=[],Ce.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.forEach(xo),t.__h.forEach($s),t.__h=[],cn=0)),Bs=Ce},Q.diffed=function(e){mm&&mm(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(bm.push(t)!==1&&fm===Q.requestAnimationFrame||((fm=Q.requestAnimationFrame)||i1)(o1)),t.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Bs=Ce=null},Q.__c=function(e,t){t.some(function(r){try{r.__h.forEach(xo),r.__h=r.__h.filter(function(n){return!n.__||$s(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],Q.__e(n,r.__v)}}),vm&&vm(e,t)},Q.unmount=function(e){gm&&gm(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{xo(n)}catch(o){t=o}}),r.__H=void 0,t&&Q.__e(t,r.__v))};ym=typeof requestAnimationFrame=="function"});function Cm(e,t){for(var r in t)e[r]=t[r];return e}function Ys(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 wm(e,t){this.props=e,this.context=t}function Qs(e,t){function r(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:Ys(this.props,o)}function n(o){return this.shouldComponentUpdate=r,nt(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}function Om(e){function t(r){var n=Cm({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=s1,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}function Pm(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=Cm({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Pm(n,t,r)})),e}function Nm(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Nm(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 zs(){this.__u=0,this.o=null,this.__b=null}function Dm(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Io(){this.i=null,this.l=null}function qm(e,t,r){return t.__k==null&&(t.textContent=""),rr(e,t),typeof r=="function"&&r(),e?e.__c:null}function m1(){}function v1(){return this.cancelBubble}function g1(){return this.defaultPrevented}var Em,s1,l1,xm,Am,c1,u1,d1,f1,p1,h1,Sm,Lm,_1,Im,Tm,Rm,Xs=T(()=>{nr();nr();Ws();Ws();(wm.prototype=new Ue).isPureReactComponent=!0,wm.prototype.shouldComponentUpdate=function(e,t){return Ys(this.props,e)||Ys(this.state,t)};Em=C.__b;C.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Em&&Em(e)};s1=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;l1=C.__e;C.__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)}l1(e,t,r,n)};xm=C.unmount;C.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),xm&&xm(e)},(zs.prototype=new Ue).__c=function(e,t){var r=t.__c,n=this;n.o==null&&(n.o=[]),n.o.push(r);var o=Dm(n.__v),i=!1,a=function(){i||(i=!0,r.__R=null,o?o(s):s())};r.__R=a;var s=function(){if(!--n.__u){if(n.state.__a){var l=n.state.__a;n.__v.__k[0]=Nm(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(a,a)},zs.prototype.componentWillUnmount=function(){this.o=[]},zs.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]=Pm(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&nt(ot,null,e.fallback);return o&&(o.__u&=-33),[nt(ot,null,t.__a?null:e.children),o]};Am=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]}};(Io.prototype=new Ue).__a=function(e){var t=this,r=Dm(t.__v),n=t.l.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),Am(t,e,n)):o()};r?r(i):i()}},Io.prototype.render=function(e){this.i=null,this.l=new Map;var t=zr(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},Io.prototype.componentDidUpdate=Io.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,r){Am(e,r,t)})};c1=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,u1=/^(?: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]/,d1=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,f1=/[A-Z0-9]/g,p1=typeof document!="undefined",h1=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};Ue.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ue.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});Sm=C.event;C.event=function(e){return Sm&&(e=Sm(e)),e.persist=m1,e.isPropagationStopped=v1,e.isDefaultPrevented=g1,e.nativeEvent=e};_1={enumerable:!1,configurable:!0,get:function(){return this.class}},Im=C.vnode;C.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={},i=n.indexOf("-")===-1;for(var a in r){var s=r[a];if(!(a==="value"&&"defaultValue"in r&&s==null||p1&&a==="children"&&n==="noscript"||a==="class"||a==="className")){var l=a.toLowerCase();a==="defaultValue"&&"value"in r&&r.value==null?a="value":a==="download"&&s===!0?s="":l==="translate"&&s==="no"?s=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?a="ondblclick":l!=="onchange"||n!=="input"&&n!=="textarea"||h1(r.type)?l==="onfocus"?a="onfocusin":l==="onblur"?a="onfocusout":d1.test(a)&&(a=l):l=a="oninput":i&&u1.test(a)?a=a.replace(f1,"-$&").toLowerCase():s===null&&(s=void 0),l==="oninput"&&o[a=l]&&(a="oninputCapture"),o[a]=s}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=zr(r.children).forEach(function(c){c.props.selected=o.value.indexOf(c.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=zr(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",_1)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=c1,Im&&Im(e)};Tm=C.__r;C.__r=function(e){Tm&&Tm(e),Lm=e.__c};Rm=C.diffed;C.diffed=function(e){Rm&&Rm(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),Lm=null}});var Zs=f((xB,Um)=>{"use strict";var y1=Rs(),b1=Math.max,w1=Math.min;Um.exports=function(e,t){var r=y1(e);return r<0?b1(r+t,0):w1(r,t)}});var Fm=f(()=>{"use strict";var E1=re(),Mm=rn(),x1=Ps(),A1=pe(),jm=Zs(),S1=pr(),I1=Ct(),T1=Us(),R1=ke(),k1=on(),C1=ln(),O1=k1("slice"),P1=R1("species"),el=Array,N1=Math.max;E1({target:"Array",proto:!0,forced:!O1},{slice:function(t,r){var n=I1(this),o=S1(n),i=jm(t,o),a=jm(r===void 0?o:r,o),s,l,c;if(Mm(n)&&(s=n.constructor,x1(s)&&(s===el||Mm(s.prototype))?s=void 0:A1(s)&&(s=s[P1],s===null&&(s=void 0)),s===el||s===void 0))return C1(n,i,a);for(l=new(s===void 0?el:s)(N1(a-i,0)),c=0;i<a;i++,c++)i in n&&T1(l,c,n[i]);return l.length=c,l}})});var $m=f((IB,Bm)=>{"use strict";Fm();var D1=Ge();Bm.exports=D1("Array","slice")});var Jm=f((TB,Hm)=>{"use strict";var q1=Re(),L1=$m(),tl=Array.prototype;Hm.exports=function(e){var t=e.slice;return e===tl||q1(tl,e)&&t===tl.slice?L1:t}});var Gm=f((RB,Vm)=>{"use strict";var U1=Jm();Vm.exports=U1});var Wm=f((kB,Km)=>{Km.exports=Gm()});var zm=f(()=>{"use strict";var M1=re(),j1=rn();M1({target:"Array",stat:!0},{isArray:j1})});var Qm=f((PB,Ym)=>{"use strict";zm();var F1=mt();Ym.exports=F1.Array.isArray});var Zm=f((NB,Xm)=>{"use strict";var B1=Qm();Xm.exports=B1});var tv=f((DB,ev)=>{ev.exports=Zm()});var rl=f((qB,rv)=>{"use strict";var $1=hr(),H1=String;rv.exports=function(e){if($1(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return H1(e)}});var ov=f((LB,nv)=>{"use strict";var J1=pe(),V1=pt(),G1=ke(),K1=G1("match");nv.exports=function(e){var t;return J1(e)&&((t=e[K1])!==void 0?!!t:V1(e)==="RegExp")}});var av=f((UB,iv)=>{"use strict";var W1=ov(),z1=TypeError;iv.exports=function(e){if(W1(e))throw new z1("The method doesn't accept regular expressions");return e}});var lv=f((MB,sv)=>{"use strict";var Y1=ke(),Q1=Y1("match");sv.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Q1]=!1,"/./"[e](t)}catch(n){}}return!1}});var dv=f(()=>{"use strict";var X1=re(),Z1=Qr(),eR=Es().f,tR=ks(),cv=rl(),rR=av(),nR=ar(),oR=lv(),iR=lr(),aR=Z1("".slice),sR=Math.min,uv=oR("startsWith"),lR=!iR&&!uv&&!!function(){var e=eR(String.prototype,"startsWith");return e&&!e.writable}();X1({target:"String",proto:!0,forced:!lR&&!uv},{startsWith:function(t){var r=cv(nR(this));rR(t);var n=tR(sR(arguments.length>1?arguments[1]:void 0,r.length)),o=cv(t);return aR(r,n,n+o.length)===o}})});var pv=f((BB,fv)=>{"use strict";dv();var cR=Ge();fv.exports=cR("String","startsWith")});var mv=f(($B,hv)=>{"use strict";var uR=Re(),dR=pv(),nl=String.prototype;hv.exports=function(e){var t=e.startsWith;return typeof e=="string"||e===nl||uR(nl,e)&&t===nl.startsWith?dR:t}});var gv=f((HB,vv)=>{"use strict";var fR=mv();vv.exports=fR});var yv=f((JB,_v)=>{_v.exports=gv()});var Av=f((VB,xv)=>{"use strict";var wv=fe(),pR=sr(),hR=pe(),mR=je(),bv=ln(),vR=or(),Ev=Function,gR=wv([].concat),_R=wv([].join),ol={},yR=function(e,t,r){if(!mR(ol,t)){for(var n=[],o=0;o<t;o++)n[o]="a["+o+"]";ol[t]=Ev("C,a","return new C("+_R(n,",")+")")}return ol[t](e,r)};xv.exports=vR?Ev.bind:function(t){var r=pR(this),n=r.prototype,o=bv(arguments,1),i=function(){var s=gR(o,bv(arguments));return this instanceof i?yR(r,s.length,s):r.apply(t,s)};return hR(n)&&(i.prototype=n),i}});var Iv=f(()=>{"use strict";var bR=re(),Sv=Av();bR({target:"Function",proto:!0,forced:Function.bind!==Sv},{bind:Sv})});var Rv=f((WB,Tv)=>{"use strict";Iv();var wR=Ge();Tv.exports=wR("Function","bind")});var Cv=f((zB,kv)=>{"use strict";var ER=Re(),xR=Rv(),il=Function.prototype;kv.exports=function(e){var t=e.bind;return e===il||ER(il,e)&&t===il.bind?xR:t}});var Pv=f((YB,Ov)=>{"use strict";var AR=Cv();Ov.exports=AR});var Dv=f((QB,Nv)=>{Nv.exports=Pv()});var Lv=f((XB,qv)=>{"use strict";qv.exports=function(){}});var Gt=f((ZB,Uv)=>{"use strict";Uv.exports={}});var al=f((e5,jv)=>{"use strict";var SR=te(),IR=ve(),Mv=SR.WeakMap;jv.exports=IR(Mv)&&/native code/.test(String(Mv))});var To=f((t5,Bv)=>{"use strict";var TR=vs(),RR=go(),Fv=TR("keys");Bv.exports=function(e){return Fv[e]||(Fv[e]=RR(e))}});var dn=f((r5,$v)=>{"use strict";$v.exports={}});var pn=f((n5,Vv)=>{"use strict";var kR=al(),Jv=te(),CR=pe(),OR=Vt(),sl=je(),ll=Zr(),PR=To(),NR=dn(),Hv="Object already initialized",cl=Jv.TypeError,DR=Jv.WeakMap,Ro,fn,ko,qR=function(e){return ko(e)?fn(e):Ro(e,{})},LR=function(e){return function(t){var r;if(!CR(t)||(r=fn(t)).type!==e)throw new cl("Incompatible receiver, "+e+" required");return r}};kR||ll.state?(Qe=ll.state||(ll.state=new DR),Qe.get=Qe.get,Qe.has=Qe.has,Qe.set=Qe.set,Ro=function(e,t){if(Qe.has(e))throw new cl(Hv);return t.facade=e,Qe.set(e,t),t},fn=function(e){return Qe.get(e)||{}},ko=function(e){return Qe.has(e)}):(Kt=PR("state"),NR[Kt]=!0,Ro=function(e,t){if(sl(e,Kt))throw new cl(Hv);return t.facade=e,OR(e,Kt,t),t},fn=function(e){return sl(e,Kt)?e[Kt]:{}},ko=function(e){return sl(e,Kt)});var Qe,Kt;Vv.exports={set:Ro,get:fn,has:ko,enforce:qR,getterFor:LR}});var fl=f((o5,Kv)=>{"use strict";var ul=Me(),UR=je(),Gv=Function.prototype,MR=ul&&Object.getOwnPropertyDescriptor,dl=UR(Gv,"name"),jR=dl&&(function(){}).name==="something",FR=dl&&(!ul||ul&&MR(Gv,"name").configurable);Kv.exports={EXISTS:dl,PROPER:jR,CONFIGURABLE:FR}});var pl=f((i5,zv)=>{"use strict";var BR=Ct(),$R=Zs(),HR=pr(),Wv=function(e){return function(t,r,n){var o=BR(t),i=HR(o);if(i===0)return!e&&-1;var a=$R(n,i),s;if(e&&r!==r){for(;i>a;)if(s=o[a++],s!==s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===r)return e||a||0;return!e&&-1}};zv.exports={includes:Wv(!0),indexOf:Wv(!1)}});var ml=f((a5,Qv)=>{"use strict";var JR=fe(),hl=je(),VR=Ct(),GR=pl().indexOf,KR=dn(),Yv=JR([].push);Qv.exports=function(e,t){var r=VR(e),n=0,o=[],i;for(i in r)!hl(KR,i)&&hl(r,i)&&Yv(o,i);for(;t.length>n;)hl(r,i=t[n++])&&(~GR(o,i)||Yv(o,i));return o}});var Co=f((s5,Xv)=>{"use strict";Xv.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var vl=f((l5,Zv)=>{"use strict";var WR=ml(),zR=Co();Zv.exports=Object.keys||function(t){return WR(t,zR)}});var tg=f(eg=>{"use strict";var YR=Me(),QR=xs(),XR=Pt(),ZR=Ot(),ek=Ct(),tk=vl();eg.f=YR&&!QR?Object.defineProperties:function(t,r){ZR(t);for(var n=ek(r),o=tk(r),i=o.length,a=0,s;i>a;)XR.f(t,s=o[a++],n[s]);return t}});var ng=f((u5,rg)=>{"use strict";var rk=uo();rg.exports=rk("document","documentElement")});var No=f((d5,ug)=>{"use strict";var nk=Ot(),ok=tg(),og=Co(),ik=dn(),ak=ng(),sk=bs(),lk=To(),ig=">",ag="<",_l="prototype",yl="script",lg=lk("IE_PROTO"),gl=function(){},cg=function(e){return ag+yl+ig+e+ag+"/"+yl+ig},sg=function(e){e.write(cg("")),e.close();var t=e.parentWindow.Object;return e=null,t},ck=function(){var e=sk("iframe"),t="java"+yl+":",r;return e.style.display="none",ak.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(cg("document.F=Object")),r.close(),r.F},Oo,Po=function(){try{Oo=new ActiveXObject("htmlfile")}catch(t){}Po=typeof document!="undefined"?document.domain&&Oo?sg(Oo):ck():sg(Oo);for(var e=og.length;e--;)delete Po[_l][og[e]];return Po()};ik[lg]=!0;ug.exports=Object.create||function(t,r){var n;return t!==null?(gl[_l]=nk(t),n=new gl,gl[_l]=null,n[lg]=t):n=Po(),r===void 0?n:ok.f(n,r)}});var fg=f((f5,dg)=>{"use strict";var uk=Y();dg.exports=!uk(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var wl=f((p5,hg)=>{"use strict";var dk=je(),fk=ve(),pk=cr(),hk=To(),mk=fg(),pg=hk("IE_PROTO"),bl=Object,vk=bl.prototype;hg.exports=mk?bl.getPrototypeOf:function(e){var t=pk(e);if(dk(t,pg))return t[pg];var r=t.constructor;return fk(r)&&t instanceof r?r.prototype:t instanceof bl?vk:null}});var Do=f((h5,mg)=>{"use strict";var gk=Vt();mg.exports=function(e,t,r,n){return n&&n.enumerable?e[t]=r:gk(e,t,r),e}});var Sl=f((m5,_g)=>{"use strict";var _k=Y(),yk=ve(),bk=pe(),wk=No(),vg=wl(),Ek=Do(),xk=ke(),Ak=lr(),Al=xk("iterator"),gg=!1,vt,El,xl;[].keys&&(xl=[].keys(),"next"in xl?(El=vg(vg(xl)),El!==Object.prototype&&(vt=El)):gg=!0);var Sk=!bk(vt)||_k(function(){var e={};return vt[Al].call(e)!==e});Sk?vt={}:Ak&&(vt=wk(vt));yk(vt[Al])||Ek(vt,Al,function(){return this});_g.exports={IteratorPrototype:vt,BUGGY_SAFARI_ITERATORS:gg}});var bg=f((v5,yg)=>{"use strict";var Ik=bo(),Tk=hr();yg.exports=Ik?{}.toString:function(){return"[object "+Tk(this)+"]"}});var hn=f((g5,Eg)=>{"use strict";var Rk=bo(),kk=Pt().f,Ck=Vt(),Ok=je(),Pk=bg(),Nk=ke(),wg=Nk("toStringTag");Eg.exports=function(e,t,r,n){var o=r?e:e&&e.prototype;o&&(Ok(o,wg)||kk(o,wg,{configurable:!0,value:t}),n&&!Rk&&Ck(o,"toString",Pk))}});var Ag=f((_5,xg)=>{"use strict";var Dk=Sl().IteratorPrototype,qk=No(),Lk=Xr(),Uk=hn(),Mk=Gt(),jk=function(){return this};xg.exports=function(e,t,r,n){var o=t+" Iterator";return e.prototype=qk(Dk,{next:Lk(+!n,r)}),Uk(e,o,!1,!0),Mk[o]=jk,e}});var Ig=f((y5,Sg)=>{"use strict";var Fk=fe(),Bk=sr();Sg.exports=function(e,t,r){try{return Fk(Bk(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(n){}}});var Rg=f((b5,Tg)=>{"use strict";var $k=pe();Tg.exports=function(e){return $k(e)||e===null}});var Cg=f((w5,kg)=>{"use strict";var Hk=Rg(),Jk=String,Vk=TypeError;kg.exports=function(e){if(Hk(e))return e;throw new Vk("Can't set "+Jk(e)+" as a prototype")}});var Pg=f((E5,Og)=>{"use strict";var Gk=Ig(),Kk=pe(),Wk=ar(),zk=Cg();Og.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,t={},r;try{r=Gk(Object.prototype,"__proto__","set"),r(t,[]),e=t instanceof Array}catch(n){}return function(o,i){return Wk(o),zk(i),Kk(o)&&(e?r(o,i):o.__proto__=i),o}}():void 0)});var Hg=f((x5,$g)=>{"use strict";var Yk=re(),Qk=ht(),qo=lr(),Fg=fl(),Xk=ve(),Zk=Ag(),Ng=wl(),Dg=Pg(),eC=hn(),tC=Vt(),Il=Do(),rC=ke(),qg=Gt(),Bg=Sl(),nC=Fg.PROPER,oC=Fg.CONFIGURABLE,Lg=Bg.IteratorPrototype,Lo=Bg.BUGGY_SAFARI_ITERATORS,mn=rC("iterator"),Ug="keys",vn="values",Mg="entries",jg=function(){return this};$g.exports=function(e,t,r,n,o,i,a){Zk(r,t,n);var s=function(v){if(v===o&&h)return h;if(!Lo&&v&&v in d)return d[v];switch(v){case Ug:return function(){return new r(this,v)};case vn:return function(){return new r(this,v)};case Mg:return function(){return new r(this,v)}}return function(){return new r(this)}},l=t+" Iterator",c=!1,d=e.prototype,u=d[mn]||d["@@iterator"]||o&&d[o],h=!Lo&&u||s(o),p=t==="Array"&&d.entries||u,m,g,_;if(p&&(m=Ng(p.call(new e)),m!==Object.prototype&&m.next&&(!qo&&Ng(m)!==Lg&&(Dg?Dg(m,Lg):Xk(m[mn])||Il(m,mn,jg)),eC(m,l,!0,!0),qo&&(qg[l]=jg))),nC&&o===vn&&u&&u.name!==vn&&(!qo&&oC?tC(d,"name",vn):(c=!0,h=function(){return Qk(u,this)})),o)if(g={values:s(vn),keys:i?h:s(Ug),entries:s(Mg)},a)for(_ in g)(Lo||c||!(_ in d))&&Il(d,_,g[_]);else Yk({target:t,proto:!0,forced:Lo||c},g);return(!qo||a)&&d[mn]!==h&&Il(d,mn,h,{name:o}),qg[t]=h,g}});var Vg=f((A5,Jg)=>{"use strict";Jg.exports=function(e,t){return{value:e,done:t}}});var Rl=f((S5,Yg)=>{"use strict";var iC=Ct(),Tl=Lv(),Gg=Gt(),Wg=pn(),aC=Pt().f,sC=Hg(),Uo=Vg(),lC=lr(),cC=Me(),zg="Array Iterator",uC=Wg.set,dC=Wg.getterFor(zg);Yg.exports=sC(Array,"Array",function(e,t){uC(this,{type:zg,target:iC(e),index:0,kind:t})},function(){var e=dC(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,Uo(void 0,!0);switch(e.kind){case"keys":return Uo(r,!1);case"values":return Uo(t[r],!1)}return Uo([r,t[r]],!1)},"values");var Kg=Gg.Arguments=Gg.Array;Tl("keys");Tl("values");Tl("entries");if(!lC&&cC&&Kg.name!=="values")try{aC(Kg,"name",{value:"values"})}catch(e){}});var Qg=f(()=>{});var kl=f((R5,Xg)=>{"use strict";var fC=Y();Xg.exports=!fC(function(){return Object.isExtensible(Object.preventExtensions({}))})});var Cl=f((k5,Zg)=>{"use strict";var pC=Do();Zg.exports=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:pC(e,n,t[n],r);return e}});var Ol=f(e_=>{"use strict";var hC=ml(),mC=Co(),vC=mC.concat("length","prototype");e_.f=Object.getOwnPropertyNames||function(t){return hC(t,vC)}});var o_=f((O5,n_)=>{"use strict";var gC=pt(),_C=Ct(),t_=Ol().f,yC=ln(),r_=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],bC=function(e){try{return t_(e)}catch(t){return yC(r_)}};n_.exports.f=function(t){return r_&&gC(t)==="Window"?bC(t):t_(_C(t))}});var a_=f((P5,i_)=>{"use strict";var wC=Y();i_.exports=wC(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})});var c_=f((N5,l_)=>{"use strict";var EC=Y(),xC=pe(),AC=pt(),s_=a_(),Mo=Object.isExtensible,SC=EC(function(){Mo(1)});l_.exports=SC||s_?function(t){return!xC(t)||s_&&AC(t)==="ArrayBuffer"?!1:Mo?Mo(t):!0}:Mo});var jo=f((D5,f_)=>{"use strict";var IC=re(),TC=fe(),RC=dn(),kC=pe(),Pl=je(),CC=Pt().f,u_=Ol(),OC=o_(),Nl=c_(),PC=go(),NC=kl(),d_=!1,gt=PC("meta"),DC=0,Dl=function(e){CC(e,gt,{value:{objectID:"O"+DC++,weakData:{}}})},qC=function(e,t){if(!kC(e))return typeof e=="symbol"?e:(typeof e=="string"?"S":"P")+e;if(!Pl(e,gt)){if(!Nl(e))return"F";if(!t)return"E";Dl(e)}return e[gt].objectID},LC=function(e,t){if(!Pl(e,gt)){if(!Nl(e))return!0;if(!t)return!1;Dl(e)}return e[gt].weakData},UC=function(e){return NC&&d_&&Nl(e)&&!Pl(e,gt)&&Dl(e),e},MC=function(){jC.enable=function(){},d_=!0;var e=u_.f,t=TC([].splice),r={};r[gt]=1,e(r).length&&(u_.f=function(n){for(var o=e(n),i=0,a=o.length;i<a;i++)if(o[i]===gt){t(o,i,1);break}return o},IC({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:OC.f}))},jC=f_.exports={enable:MC,fastKey:qC,getWeakData:LC,onFreeze:UC};RC[gt]=!0});var h_=f((q5,p_)=>{"use strict";var FC=ke(),BC=Gt(),$C=FC("iterator"),HC=Array.prototype;p_.exports=function(e){return e!==void 0&&(BC.Array===e||HC[$C]===e)}});var ql=f((L5,v_)=>{"use strict";var JC=hr(),m_=vo(),VC=ir(),GC=Gt(),KC=ke(),WC=KC("iterator");v_.exports=function(e){if(!VC(e))return m_(e,WC)||m_(e,"@@iterator")||GC[JC(e)]}});var __=f((U5,g_)=>{"use strict";var zC=ht(),YC=sr(),QC=Ot(),XC=mo(),ZC=ql(),eO=TypeError;g_.exports=function(e,t){var r=arguments.length<2?ZC(e):t;if(YC(r))return QC(zC(r,e));throw new eO(XC(e)+" is not iterable")}});var w_=f((M5,b_)=>{"use strict";var tO=ht(),y_=Ot(),rO=vo();b_.exports=function(e,t,r){var n,o;y_(e);try{if(n=rO(e,"return"),!n){if(t==="throw")throw r;return r}n=tO(n,e)}catch(i){o=!0,n=i}if(t==="throw")throw r;if(o)throw n;return y_(n),r}});var Ll=f((j5,S_)=>{"use strict";var nO=_o(),oO=ht(),iO=Ot(),aO=mo(),sO=h_(),lO=pr(),E_=Re(),cO=__(),uO=ql(),x_=w_(),dO=TypeError,Fo=function(e,t){this.stopped=e,this.result=t},A_=Fo.prototype;S_.exports=function(e,t,r){var n=r&&r.that,o=!!(r&&r.AS_ENTRIES),i=!!(r&&r.IS_RECORD),a=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),l=nO(t,n),c,d,u,h,p,m,g,_=function(y){return c&&x_(c,"normal",y),new Fo(!0,y)},v=function(y){return o?(iO(y),s?l(y[0],y[1],_):l(y[0],y[1])):s?l(y,_):l(y)};if(i)c=e.iterator;else if(a)c=e;else{if(d=uO(e),!d)throw new dO(aO(e)+" is not iterable");if(sO(d)){for(u=0,h=lO(e);h>u;u++)if(p=v(e[u]),p&&E_(A_,p))return p;return new Fo(!1)}c=cO(e,d)}for(m=i?e.next:c.next;!(g=oO(m,c)).done;){try{p=v(g.value)}catch(y){x_(c,"throw",y)}if(typeof p=="object"&&p&&E_(A_,p))return p}return new Fo(!1)}});var Ul=f((F5,I_)=>{"use strict";var fO=Re(),pO=TypeError;I_.exports=function(e,t){if(fO(t,e))return e;throw new pO("Incorrect invocation")}});var k_=f((B5,R_)=>{"use strict";var hO=re(),mO=te(),vO=jo(),gO=Y(),_O=Vt(),yO=Ll(),bO=Ul(),wO=ve(),EO=pe(),xO=ir(),AO=hn(),SO=Pt().f,IO=Dt().forEach,TO=Me(),T_=pn(),RO=T_.set,kO=T_.getterFor;R_.exports=function(e,t,r){var n=e.indexOf("Map")!==-1,o=e.indexOf("Weak")!==-1,i=n?"set":"add",a=mO[e],s=a&&a.prototype,l={},c;if(!TO||!wO(a)||!(o||s.forEach&&!gO(function(){new a().entries().next()})))c=r.getConstructor(t,e,n,i),vO.enable();else{c=t(function(h,p){RO(bO(h,d),{type:e,collection:new a}),xO(p)||yO(p,h[i],{that:h,AS_ENTRIES:n})});var d=c.prototype,u=kO(e);IO(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(h){var p=h==="add"||h==="set";h in s&&!(o&&h==="clear")&&_O(d,h,function(m,g){var _=u(this).collection;if(!p&&o&&!EO(m))return h==="get"?void 0:!1;var v=_[h](m===0?0:m,g);return p?this:v})}),o||SO(d,"size",{configurable:!0,get:function(){return u(this).collection.size}})}return AO(c,e,!1,!0),l[e]=c,hO({global:!0,forced:!0},l),o||r.setStrong(c,e,n),c}});var L_=f(($5,q_)=>{"use strict";var CO=fe(),C_=Cl(),Bo=jo().getWeakData,OO=Ul(),PO=Ot(),NO=ir(),Ml=pe(),DO=Ll(),P_=Dt(),O_=je(),N_=pn(),qO=N_.set,LO=N_.getterFor,UO=P_.find,MO=P_.findIndex,jO=CO([].splice),FO=0,$o=function(e){return e.frozen||(e.frozen=new D_)},D_=function(){this.entries=[]},jl=function(e,t){return UO(e.entries,function(r){return r[0]===t})};D_.prototype={get:function(e){var t=jl(this,e);if(t)return t[1]},has:function(e){return!!jl(this,e)},set:function(e,t){var r=jl(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=MO(this.entries,function(r){return r[0]===e});return~t&&jO(this.entries,t,1),!!~t}};q_.exports={getConstructor:function(e,t,r,n){var o=e(function(l,c){OO(l,i),qO(l,{type:t,id:FO++,frozen:null}),NO(c)||DO(c,l[n],{that:l,AS_ENTRIES:r})}),i=o.prototype,a=LO(t),s=function(l,c,d){var u=a(l),h=Bo(PO(c),!0);return h===!0?$o(u).set(c,d):h[u.id]=d,l};return C_(i,{delete:function(l){var c=a(this);if(!Ml(l))return!1;var d=Bo(l);return d===!0?$o(c).delete(l):d&&O_(d,c.id)&&delete d[c.id]},has:function(c){var d=a(this);if(!Ml(c))return!1;var u=Bo(c);return u===!0?$o(d).has(c):u&&O_(u,d.id)}}),C_(i,r?{get:function(c){var d=a(this);if(Ml(c)){var u=Bo(c);if(u===!0)return $o(d).get(c);if(u)return u[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 BO=kl(),U_=te(),Go=fe(),M_=Cl(),$O=jo(),HO=k_(),j_=L_(),Ho=pe(),Jo=pn().enforce,JO=Y(),VO=al(),yn=Object,GO=Array.isArray,Vo=yn.isExtensible,F_=yn.isFrozen,KO=yn.isSealed,B_=yn.freeze,WO=yn.seal,zO=!U_.ActiveXObject&&"ActiveXObject"in U_,gn,$_=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},H_=HO("WeakMap",$_,j_),mr=H_.prototype,Ko=Go(mr.set),YO=function(){return BO&&JO(function(){var e=B_([]);return Ko(new H_,e,1),!F_(e)})};VO&&(zO?(gn=j_.getConstructor($_,"WeakMap",!0),$O.enable(),Fl=Go(mr.delete),_n=Go(mr.has),Bl=Go(mr.get),M_(mr,{delete:function(e){if(Ho(e)&&!Vo(e)){var t=Jo(this);return t.frozen||(t.frozen=new gn),Fl(this,e)||t.frozen.delete(e)}return Fl(this,e)},has:function(t){if(Ho(t)&&!Vo(t)){var r=Jo(this);return r.frozen||(r.frozen=new gn),_n(this,t)||r.frozen.has(t)}return _n(this,t)},get:function(t){if(Ho(t)&&!Vo(t)){var r=Jo(this);return r.frozen||(r.frozen=new gn),_n(this,t)?Bl(this,t):r.frozen.get(t)}return Bl(this,t)},set:function(t,r){if(Ho(t)&&!Vo(t)){var n=Jo(this);n.frozen||(n.frozen=new gn),_n(this,t)?Ko(this,t,r):n.frozen.set(t,r)}else Ko(this,t,r);return this}})):YO()&&M_(mr,{set:function(t,r){var n;return GO(t)&&(F_(t)?n=B_:KO(t)&&(n=WO)),Ko(this,t,r),n&&n(t),this}}));var Fl,_n,Bl});var V_=f(()=>{"use strict";J_()});var K_=f((K5,G_)=>{"use strict";Rl();Qg();V_();var QO=mt();G_.exports=QO.WeakMap});var z_=f((W5,W_)=>{"use strict";W_.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 Q_=f(()=>{"use strict";Rl();var XO=z_(),ZO=te(),eP=hn(),Y_=Gt();for(Wo in XO)eP(ZO[Wo],Wo),Y_[Wo]=Y_.Array;var Wo});var Z_=f((Q5,X_)=>{"use strict";var tP=K_();Q_();X_.exports=tP});var ty=f((X5,ey)=>{ey.exports=Z_()});var ny=f(()=>{"use strict";var rP=re(),nP=Qr(),oP=pl().indexOf,iP=an(),$l=nP([].indexOf),ry=!!$l&&1/$l([1],1,-0)<0,aP=ry||!iP("indexOf");rP({target:"Array",proto:!0,forced:aP},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return ry?$l(this,t,r)||0:oP(this,t,r)}})});var iy=f((t3,oy)=>{"use strict";ny();var sP=Ge();oy.exports=sP("Array","indexOf")});var sy=f((r3,ay)=>{"use strict";var lP=Re(),cP=iy(),Hl=Array.prototype;ay.exports=function(e){var t=e.indexOf;return e===Hl||lP(Hl,e)&&t===Hl.indexOf?cP:t}});var cy=f((n3,ly)=>{"use strict";var uP=sy();ly.exports=uP});var dy=f((o3,uy)=>{uy.exports=cy()});var fy=f(()=>{"use strict";var dP=re(),fP=Me(),pP=No();dP({target:"Object",stat:!0,sham:!fP},{create:pP})});var hy=f((s3,py)=>{"use strict";fy();var hP=mt(),mP=hP.Object;py.exports=function(t,r){return mP.create(t,r)}});var vy=f((l3,my)=>{"use strict";var vP=hy();my.exports=vP});var _y=f((c3,gy)=>{gy.exports=vy()});var yy=f(()=>{"use strict";var gP=re(),_P=Dt().map,yP=on(),bP=yP("map");gP({target:"Array",proto:!0,forced:!bP},{map:function(t){return _P(this,t,arguments.length>1?arguments[1]:void 0)}})});var wy=f((f3,by)=>{"use strict";yy();var wP=Ge();by.exports=wP("Array","map")});var xy=f((p3,Ey)=>{"use strict";var EP=Re(),xP=wy(),Jl=Array.prototype;Ey.exports=function(e){var t=e.map;return e===Jl||EP(Jl,e)&&t===Jl.map?xP:t}});var Sy=f((h3,Ay)=>{"use strict";var AP=xy();Ay.exports=AP});var Ty=f((m3,Iy)=>{Iy.exports=Sy()});var ky=f(Ry=>{"use strict";Ry.f=Object.getOwnPropertySymbols});var Ny=f((g3,Py)=>{"use strict";var Cy=Me(),SP=fe(),IP=ht(),TP=Y(),Vl=vl(),RP=ky(),kP=is(),CP=cr(),OP=co(),vr=Object.assign,Oy=Object.defineProperty,PP=SP([].concat);Py.exports=!vr||TP(function(){if(Cy&&vr({b:1},vr(Oy({},"a",{enumerable:!0,get:function(){Oy(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(o){t[o]=o}),vr({},e)[r]!==7||Vl(vr({},t)).join("")!==n})?function(t,r){for(var n=CP(t),o=arguments.length,i=1,a=RP.f,s=kP.f;o>i;)for(var l=OP(arguments[i++]),c=a?PP(Vl(l),a(l)):Vl(l),d=c.length,u=0,h;d>u;)h=c[u++],(!Cy||IP(s,l,h))&&(n[h]=l[h]);return n}:vr});var qy=f(()=>{"use strict";var NP=re(),Dy=Ny();NP({target:"Object",stat:!0,arity:2,forced:Object.assign!==Dy},{assign:Dy})});var Uy=f((b3,Ly)=>{"use strict";qy();var DP=mt();Ly.exports=DP.Object.assign});var jy=f((w3,My)=>{"use strict";var qP=Uy();My.exports=qP});var By=f((E3,Fy)=>{Fy.exports=jy()});var Gl=f((x3,$y)=>{"use strict";$y.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 Vy=f((A3,Jy)=>{"use strict";var LP=fe(),UP=ar(),MP=rl(),Wl=Gl(),Hy=LP("".replace),jP=RegExp("^["+Wl+"]+"),FP=RegExp("(^|[^"+Wl+"])["+Wl+"]+$"),Kl=function(e){return function(t){var r=MP(UP(t));return e&1&&(r=Hy(r,jP,"")),e&2&&(r=Hy(r,FP,"$1")),r}};Jy.exports={start:Kl(1),end:Kl(2),trim:Kl(3)}});var zy=f((S3,Wy)=>{"use strict";var BP=fl().PROPER,$P=Y(),Gy=Gl(),Ky="\u200B\x85\u180E";Wy.exports=function(e){return $P(function(){return!!Gy[e]()||Ky[e]()!==Ky||BP&&Gy[e].name!==e})}});var Yy=f(()=>{"use strict";var HP=re(),JP=Vy().trim,VP=zy();HP({target:"String",proto:!0,forced:VP("trim")},{trim:function(){return JP(this)}})});var Xy=f((R3,Qy)=>{"use strict";Yy();var GP=Ge();Qy.exports=GP("String","trim")});var eb=f((k3,Zy)=>{"use strict";var KP=Re(),WP=Xy(),zl=String.prototype;Zy.exports=function(e){var t=e.trim;return typeof e=="string"||e===zl||KP(zl,e)&&t===zl.trim?WP:t}});var rb=f((C3,tb)=>{"use strict";var zP=eb();tb.exports=zP});var ob=f((O3,nb)=>{nb.exports=rb()});function uc(e,t){oe.__h&&oe.__h(X,e,En||t),En=0;var r=X.__H||(X.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function yt(e){return En=1,YP(Ob,e)}function YP(e,t,r){var n=uc(wn++,2);if(n.t=e,!n.__c&&(n.__=[Ob(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],c=n.t(l,s);l!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=X,!X.__f)){var o=function(s,l,c){var d;if(!n.__c.__H)return!0;var u=(0,lc.default)(d=n.__c.__H.__).call(d,function(p){return!!p.__c});if((0,bb.default)(u).call(u,function(p){return!p.__N}))return!i||i.call(this,s,l,c);var h=n.__c.props!==s;return(0,Ae.default)(u).call(u,function(p){if(p.__N){var m=p.__[0];p.__=p.__N,p.__N=void 0,m!==p.__[0]&&(h=!0)}}),i&&i.call(this,s,l,c)||h};X.__f=!0;var i=X.shouldComponentUpdate,a=X.componentWillUpdate;X.componentWillUpdate=function(s,l,c){if(this.__e){var d=i;i=void 0,o(s,l,c),i=d}a&&a.call(this,s,l,c)},X.shouldComponentUpdate=o}return n.__N||n.__}function qt(e,t){var r=uc(wn++,3);!oe.__s&&Cb(r.__H,t)&&(r.__=e,r.u=t,X.__H.__h.push(r))}function ri(e){return En=5,kb(function(){return{current:e}},[])}function kb(e,t){var r=uc(wn++,7);return Cb(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function at(e,t){return En=8,kb(function(){return e},t)}function QP(){for(var e;e=Rb.shift();)if(e.__P&&e.__H)try{var t,r;(0,Ae.default)(t=e.__H.__h).call(t,Yo),(0,Ae.default)(r=e.__H.__h).call(r,nc),e.__H.__h=[]}catch(n){e.__H.__h=[],oe.__e(n,e.__v)}}function XP(e){var t,r=function(){clearTimeout(n),fb&&cancelAnimationFrame(t),(0,tc.default)(e)},n=(0,tc.default)(r,100);fb&&(t=requestAnimationFrame(r))}function Yo(e){var t=X,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),X=t}function nc(e){var t=X;e.__c=e.__(),X=t}function Cb(e,t){return!e||e.length!==t.length||(0,ei.default)(t).call(t,function(r,n){return r!==e[n]})}function Ob(e,t){return typeof t=="function"?t(e):t}function b(e,t,r,n,o,i){t||(t={});var a,s,l=t;if("ref"in l)for(s in l={},t)s=="ref"?a=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ZP,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return C.vnode&&C.vnode(c),c}function nN(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function oN(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}function uN(e,t){return ge(e,0)^45?(((t<<2^ge(e,0))<<2^ge(e,1))<<2^ge(e,2))<<2^ge(e,3):0}function Db(e){return(0,Tb.default)(e).call(e)}function dN(e,t){return(e=t.exec(e))?e[0]:e}function M(e,t,r){return e.replace(t,r)}function oc(e,t){return(0,cc.default)(e).call(e,t)}function ge(e,t){return e.charCodeAt(t)|0}function xn(e,t,r){return(0,Eb.default)(e).call(e,t,r)}function it(e){return e.length}function pc(e){return e.length}function zo(e,t){return t.push(e),e}function fN(e,t){return(0,Sb.default)(e).call(e,t).join("")}function si(e,t,r,n,o,i,a){return{value:e,root:t,parent:r,type:n,props:o,children:i,line:ai,column:yr,length:a,return:""}}function bn(e,t){return cN(si("",null,null,"",null,null,0),e,{length:-e.length},t)}function pN(){return ie}function hN(){return ie=Pe>0?ge(br,--Pe):0,yr--,ie===10&&(yr=1,ai--),ie}function Fe(){return ie=Pe<qb?ge(br,Pe++):0,yr++,ie===10&&(yr=1,ai++),ie}function st(){return ge(br,Pe)}function Qo(){return Pe}function Sn(e,t){return xn(br,e,t)}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 Lb(e){return ai=yr=1,qb=it(br=e),Pe=0,[]}function Ub(e){return br="",e}function Xo(e){return Db(Sn(Pe-1,ic(e===91?e+2:e===40?e+1:e)))}function mN(e){for(;(ie=st())&&ie<33;)Fe();return An(e)>2||An(ie)>3?"":" "}function vN(e,t){for(;--t&&Fe()&&!(ie<48||ie>102||ie>57&&ie<65||ie>70&&ie<97););return Sn(e,Qo()+(t<6&&st()==32&&Fe()==32))}function ic(e){for(;Fe();)switch(ie){case e:return Pe;case 34:case 39:e!==34&&e!==39&&ic(ie);break;case 40:e===41&&ic(e);break;case 92:Fe();break}return Pe}function gN(e,t){for(;Fe()&&e+ie!==57&&!(e+ie===84&&st()===47););return"/*"+Sn(t,Pe-1)+"*"+ii(e===47?e:Fe())}function _N(e){for(;!An(st());)Fe();return Sn(e,Pe)}function yN(e){return Ub(Zo("",null,null,null,[""],e=Lb(e),0,[0],e))}function Zo(e,t,r,n,o,i,a,s,l){for(var c=0,d=0,u=a,h=0,p=0,m=0,g=1,_=1,v=1,y=0,A="",k=o,O=i,I=n,w=A;_;)switch(m=y,y=Fe()){case 40:if(m!=108&&ge(w,u-1)==58){oc(w+=M(Xo(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:w+=Xo(y);break;case 9:case 10:case 13:case 32:w+=mN(m);break;case 92:w+=vN(Qo()-1,7);continue;case 47:switch(st()){case 42:case 47:zo(bN(gN(Fe(),Qo()),t,r),l);break;default:w+="/"}break;case 123*g:s[c++]=it(w)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:_=0;case 59+d:v==-1&&(w=M(w,/\f/g,"")),p>0&&it(w)-u&&zo(p>32?hb(w+";",n,r,u-1):hb(M(w," ","")+";",n,r,u-2),l);break;case 59:w+=";";default:if(zo(I=pb(w,t,r,c,d,o,s,A,k=[],O=[],u),i),y===123)if(d===0)Zo(w,t,I,I,k,i,u,s,O);else switch(h===99&&ge(w,3)===110?100:h){case 100:case 108:case 109:case 115:Zo(e,I,I,n&&zo(pb(e,I,I,0,0,o,s,A,o,k=[],u),O),o,O,u,s,n?k:O);break;default:Zo(w,I,I,I,[""],O,0,s,O)}}c=d=p=0,g=v=1,A=w="",u=a;break;case 58:u=1+it(w),p=m;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&hN()==125)continue}switch(w+=ii(y),y*g){case 38:v=d>0?1:(w+="\f",-1);break;case 44:s[c++]=(it(w)-1)*v,v=1;break;case 64:st()===45&&(w+=Xo(Fe())),h=st(),d=u=it(A=w+=_N(Qo())),y++;break;case 45:m===45&&it(w)==2&&(g=0)}}return i}function pb(e,t,r,n,o,i,a,s,l,c,d){for(var u=o-1,h=o===0?i:[""],p=pc(h),m=0,g=0,_=0;m<n;++m)for(var v=0,y=xn(e,u+1,u=lN(g=a[m])),A=e;v<p;++v)(A=Db(g>0?h[v]+" "+y:M(y,/&\f/g,h[v])))&&(l[_++]=A);return si(e,t,r,o===0?dc:s,l,c,d)}function bN(e,t,r){return si(e,t,r,Pb,ii(pN()),xn(e,2,-2),0)}function hb(e,t,r,n){return si(e,t,r,fc,xn(e,0,n),xn(e,n+1,-1),n)}function _r(e,t){for(var r="",n=pc(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function wN(e,t,r,n){switch(e.type){case sN:if(e.children.length)break;case aN:case fc:return e.return=e.return||e.value;case Pb:return"";case Nb:return e.return=e.value+"{"+_r(e.children,n)+"}";case dc:e.value=e.props.join(",")}return it(r=_r(e.children,n))?e.return=e.value+"{"+r+"}":""}function EN(e){var t=pc(e);return function(r,n,o,i){for(var a="",s=0;s<t;s++)a+=e[s](r,n,o,i)||"";return a}}function xN(e){return function(t){t.root||(t=t.return)&&e(t)}}function AN(e){var t=(0,Ab.default)(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}function Mb(e,t){switch(uN(e,t)){case 5103:return U+"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 U+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return U+e+ni+e+xe+e+e;case 6828:case 4268:return U+e+xe+e+e;case 6165:return U+e+xe+"flex-"+e+e;case 5187:return U+e+M(e,/(\w+).+(:[^]+)/,U+"box-$1$2"+xe+"flex-$1$2")+e;case 5443:return U+e+xe+"flex-item-"+M(e,/flex-|-self/,"")+e;case 4675:return U+e+xe+"flex-line-pack"+M(e,/align-content|flex-|-self/,"")+e;case 5548:return U+e+xe+M(e,"shrink","negative")+e;case 5292:return U+e+xe+M(e,"basis","preferred-size")+e;case 6060:return U+"box-"+M(e,"-grow","")+U+e+xe+M(e,"grow","positive")+e;case 4554:return U+M(e,/([^-])(transform)/g,"$1"+U+"$2")+e;case 6187:return M(M(M(e,/(zoom-|grab)/,U+"$1"),/(image-set)/,U+"$1"),e,"")+e;case 5495:case 3959:return M(e,/(image-set\([^]*)/,U+"$1$`$1");case 4968:return M(M(e,/(.+:)(flex-)?(.*)/,U+"box-pack:$3"+xe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+U+e+e;case 4095:case 3583:case 4068:case 2532:return M(e,/(.+)-inline(.+)/,U+"$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(it(e)-1-t>6)switch(ge(e,t+1)){case 109:if(ge(e,t+4)!==45)break;case 102:return M(e,/(.+:)(.+)-([^]+)/,"$1"+U+"$2-$3$1"+ni+(ge(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~oc(e,"stretch")?Mb(M(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ge(e,t+1)!==115)break;case 6444:switch(ge(e,it(e)-3-(~oc(e,"!important")&&10))){case 107:return M(e,":",":"+U)+e;case 101:return M(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+U+(ge(e,14)===45?"inline-":"")+"box$3$1"+U+"$2$3$1"+xe+"$2box$3")+e}break;case 5936:switch(ge(e,t+11)){case 114:return U+e+xe+M(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return U+e+xe+M(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return U+e+xe+M(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return U+e+xe+e+e}return e}function NN(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function oi(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return Lt={name:o.name,styles:o.styles,next:Lt},o.name;var i=r;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Lt={name:a.name,styles:a.styles,next:Lt},a=a.next;var s=i.styles+";";return s}return UN(e,t,r)}}var l=r;if(t==null)return l;var c=t[l];return c!==void 0?c:l}function UN(e,t,r){var n="";if((0,ti.default)(r))for(var o=0;o<r.length;o++)n+=oi(e,t,r[o])+";";else for(var i in r){var a=r[i];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?n+=i+"{"+t[s]+"}":vb(s)&&(n+=Xl(i)+":"+gb(i,s)+";")}else if((0,ti.default)(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)vb(a[l])&&(n+=Xl(i)+":"+gb(i,a[l])+";");else{var c=oi(e,t,a);switch(i){case"animation":case"animationName":{n+=Xl(i)+":"+c+";";break}default:n+=i+"{"+c+"}"}}}return n}function Zl(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";Lt=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,o+=oi(r,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=oi(r,t,e[s]),n){var l=i;o+=l[s]}_b.lastIndex=0;for(var c="",d;(d=_b.exec(o))!==null;)c+="-"+d[1];var u=NN(o)+c;return{name:u,styles:o,next:Lt}}function ac(e,t,r){var n,o="";return(0,Ae.default)(n=r.split(" ")).call(n,function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(o+=i+" ")}),o}function yb(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function ec(e,t,r){var n=[],o=ac(e,n,r);return n.length<2?r:o+t(n)}function hc(){let e=()=>typeof window>"u"?"portrait":window.matchMedia("(orientation: landscape)").matches?"landscape":"portrait",[t,r]=yt(e());return qt(()=>{let n=()=>{r(e())};return window.addEventListener("resize",n),"onorientationchange"in window&&window.addEventListener("orientationchange",n),n(),()=>{window.removeEventListener("resize",n),"onorientationchange"in window&&window.removeEventListener("orientationchange",n)}},[]),t}function GN(s){var l=s,{elementTag:e="Image",src:t="",children:r,handleExposure:n,className:o,imgStyle:i}=l,a=Ze(l,["elementTag","src","children","handleExposure","className","imgStyle"]);let c=VN(()=>{t&&n()});return e==="Image"?b("div",{className:o,style:{borderRadius:"8px"},children:nt("img",q(R({},a),{ref:c,src:t!=null?t:"",style:R({display:"block",width:"100%",height:"auto",objectFit:"cover",maxWidth:"100%",maxHeight:"100%",aspectRatio:"1 / 1",borderRadius:"8px"},i||{})}))}):b("div",q(R({},a),{ref:c,className:o,children:r}))}function KN(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?nt(o.type,q(R({},o.props),{style:q(R({},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?nt(e.type,q(R({},e.props),{style:q(R({},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 lc,bb,Ae,wb,ei,tc,Eb,ti,D3,rc,xb,cc,Ab,Sb,Ib,Tb,wn,X,Yl,ib,En,Rb,oe,ab,sb,lb,cb,ub,db,fb,ZP,Ql,eN,tN,rN,iN,xe,ni,U,Pb,dc,fc,aN,Nb,sN,lN,ii,cN,ai,yr,qb,Pe,ie,br,SN,IN,TN,mb,RN,kN,CN,ON,PN,DN,qN,LN,jb,vb,Xl,gb,_b,Lt,MN,jN,FN,BN,$N,N,HN,JN,mc,VN,vc,gc,Fb,WN,zN,YN,sc,QN,Bb,wr,_t,$b,gr,XN,ZN,eD,tD,rD,ne,nD,oD,Hb,Jb,Vb,Gb,iD,aD,Kb,li=T(()=>{"use strict";nr();lc=ue(eh(),1),bb=ue(uh(),1),Ae=ue(xh(),1),wb=ue(Mh(),1),ei=ue(Kh(),1),tc=ue(dm(),1);Xs();Eb=ue(Wm(),1),ti=ue(tv(),1),D3=ue(yv(),1),rc=ue(Dv(),1),xb=ue(ty(),1),cc=ue(dy(),1),Ab=ue(_y(),1),Sb=ue(Ty(),1),Ib=ue(By(),1),Tb=ue(ob(),1),En=0,Rb=[],oe=C,ab=oe.__b,sb=oe.__r,lb=oe.diffed,cb=oe.__c,ub=oe.unmount,db=oe.__;oe.__b=function(e){X=null,ab&&ab(e)},oe.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),db&&db(e,t)},oe.__r=function(e){var t,r,n;sb&&sb(e),wn=0;var o=(X=e.__c).__H;o&&(Yl===X?(o.__h=[],X.__h=[],(0,Ae.default)(t=o.__).call(t,function(i){i.__N&&(i.__=i.__N),i.u=i.__N=void 0})):((0,Ae.default)(r=o.__h).call(r,Yo),(0,Ae.default)(n=o.__h).call(n,nc),o.__h=[],wn=0)),Yl=X},oe.diffed=function(e){var t;lb&&lb(e);var r=e.__c;r&&r.__H&&(r.__H.__h.length&&(Rb.push(r)!==1&&ib===oe.requestAnimationFrame||((ib=oe.requestAnimationFrame)||XP)(QP)),(0,Ae.default)(t=r.__H.__).call(t,function(n){n.u&&(n.__H=n.u),n.u=void 0})),Yl=X=null},oe.__c=function(e,t){(0,ei.default)(t).call(t,function(r){try{var n,o;(0,Ae.default)(n=r.__h).call(n,Yo),r.__h=(0,lc.default)(o=r.__h).call(o,function(i){return!i.__||nc(i)})}catch(i){(0,ei.default)(t).call(t,function(a){a.__h&&(a.__h=[])}),t=[],oe.__e(i,r.__v)}}),cb&&cb(e,t)},oe.unmount=function(e){var t;ub&&ub(e);var r,n=e.__c;n&&n.__H&&((0,Ae.default)(t=n.__H.__).call(t,function(o){try{Yo(o)}catch(i){r=i}}),n.__H=void 0,r&&oe.__e(r,n.__v))};fb=typeof requestAnimationFrame=="function";ZP=0;Ql={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"}},eN=`
19
+ `;e.textContent=a;let s=document.head||document.getElementsByTagName("head")[0];s.insertBefore(t,s.firstChild),s.insertBefore(e,s.firstChild),document.documentElement.setAttribute("data-jolibox-root","")},o=()=>{function a(l){return x(this,null,function*(){let c=l instanceof URL?l.href:l,d=new Promise((u,h)=>{let p=new XMLHttpRequest;p.open("GET",c),p.responseType="arraybuffer",p.addEventListener("load",()=>u(p.response)),p.addEventListener("error",h),p.send()});try{let u=yield d;return new Response(u,{headers:new Headers([["Content-Type","application/wasm"]])}).clone()}catch(u){throw console.error("Failed to load wasm:",u),u}})}let s=window.fetch;window.fetch=(l,c)=>{let d=l instanceof URL?l.href:l.toString();return d.endsWith(".wasm")?a(d):s(l,c)}},i=()=>{e!=null&&e.parentNode&&(e.parentNode.removeChild(e),e=null),t!=null&&t.parentNode&&(t.parentNode.removeChild(t),t=null),document.documentElement.removeAttribute("data-jolibox-root"),window.fetch=r};return n(),o(),i}var Td=T(()=>{"use strict"});var Rd=T(()=>{"use strict"});var kd=T(()=>{"use strict";D();La()});var Cd=T(()=>{"use strict";ee()});var no,Ka=T(()=>{"use strict";Rd();kd();ee();Cd();D();no=new tt});function ft(e,t){for(var r in t)e[r]=t[r];return e}function Xa(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function nt(e,t,r){var n,o,i,a={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?so.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return io(e,a,n,o,null)}function io(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?++qd:o,__i:-1,__u:0};return o==null&&C.vnode!=null&&C.vnode(i),i}function ot(e){return e.children}function Ue(e,t){this.props=e,this.context=t}function tr(e,t){if(t==null)return e.__?tr(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"?tr(e):null}function jd(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 jd(e)}}function Pd(e){(!e.__d&&(e.__d=!0)&&Vt.push(e)&&!ao.__r++||Od!==C.debounceRendering)&&((Od=C.debounceRendering)||Ld)(ao)}function ao(){for(var e,t,r,n,o,i,a,s=1;Vt.length;)Vt.length>s&&Vt.sort(Ud),e=Vt.shift(),s=Vt.length,e.__d&&(r=void 0,o=(n=(t=e).__v).__e,i=[],a=[],t.__P&&((r=ft({},n)).__v=n.__v+1,C.vnode&&C.vnode(r),Za(t.__P,r,n,t.__n,t.__P.namespaceURI,32&n.__u?[o]:null,i,o==null?tr(n):o,!!(32&n.__u),a),r.__v=n.__v,r.__.__k[r.__i]=r,Hd(i,r,a),r.__e!=o&&jd(r)));ao.__r=0}function Bd(e,t,r,n,o,i,a,s,l,c,d){var u,h,p,m,g,_,v=n&&n.__k||Fd,y=t.length;for(l=Jx(r,t,v,l,y),u=0;u<y;u++)(p=r.__k[u])!=null&&(h=p.__i===-1?Kr:v[p.__i]||Kr,p.__i=u,_=Za(e,p,h,o,i,a,s,l,c,d),m=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&es(h.ref,null,p),d.push(p.ref,p.__c||m,p)),g==null&&m!=null&&(g=m),4&p.__u||h.__k===p.__k?l=$d(p,l,e):typeof p.type=="function"&&_!==void 0?l=_:m&&(l=m.nextSibling),p.__u&=-7);return r.__e=g,l}function Jx(e,t,r,n,o){var i,a,s,l,c,d=r.length,u=d,h=0;for(e.__k=new Array(o),i=0;i<o;i++)(a=t[i])!=null&&typeof a!="boolean"&&typeof a!="function"?(l=i+h,(a=e.__k[i]=typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?io(null,a,null,null,null):Wr(a)?io(ot,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?io(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=Vx(a,r,l,u))!==-1&&(u--,(s=r[c])&&(s.__u|=2)),s==null||s.__v===null?(c==-1&&(o>d?h--:o<d&&h++),typeof a.type!="function"&&(a.__u|=4)):c!=l&&(c==l-1?h--:c==l+1?h++:(c>l?h--:h++,a.__u|=4))):e.__k[i]=null;if(u)for(i=0;i<d;i++)(s=r[i])!=null&&!(2&s.__u)&&(s.__e==n&&(n=tr(s)),Vd(s,s));return n}function $d(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=$d(n[o],t,r));return t}e.__e!=t&&(t&&e.type&&!r.contains(t)&&(t=tr(e)),r.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function zr(e,t){return t=t||[],e==null||typeof e=="boolean"||(Wr(e)?e.some(function(r){zr(r,t)}):t.push(e)),t}function Vx(e,t,r,n){var o,i,a=e.key,s=e.type,l=t[r];if(l===null&&e.key==null||l&&a==l.key&&s===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)&&a==l.key&&s===l.type)return o;o--}if(i<t.length){if((l=t[i])&&!(2&l.__u)&&a==l.key&&s===l.type)return i;i++}}return-1}function Nd(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||Hx.test(t)?r:r+"px"}function oo(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||Nd(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Nd(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Md,"$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=Qa,e.addEventListener(t,i?za:Wa,i)):e.removeEventListener(t,i?za:Wa,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(a){}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function Dd(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t.u==null)t.u=Qa++;else if(t.u<r.t)return;return r(C.event?C.event(t):t)}}}function Za(e,t,r,n,o,i,a,s,l,c){var d,u,h,p,m,g,_,v,y,A,k,O,I,w,B,$e,Xt,He=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(l=!!(32&r.__u),i=[s=t.__e=r.__e]),(d=C.__b)&&d(t);e:if(typeof He=="function")try{if(v=t.props,y="prototype"in He&&He.prototype.render,A=(d=He.contextType)&&n[d.__c],k=d?A?A.props.value:d.__:n,r.__c?_=(u=t.__c=r.__c).__=u.__E:(y?t.__c=u=new He(v,k):(t.__c=u=new Ue(v,k),u.constructor=He,u.render=Kx),A&&A.sub(u),u.props=v,u.state||(u.state={}),u.context=k,u.__n=n,h=u.__d=!0,u.__h=[],u._sb=[]),y&&u.__s==null&&(u.__s=u.state),y&&He.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=ft({},u.__s)),ft(u.__s,He.getDerivedStateFromProps(v,u.__s))),p=u.props,m=u.state,u.__v=t,h)y&&He.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),y&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(y&&He.getDerivedStateFromProps==null&&v!==p&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(v,k),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(v,u.__s,k)===!1||t.__v==r.__v)){for(t.__v!=r.__v&&(u.props=v,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(Bt){Bt&&(Bt.__=t)}),O=0;O<u._sb.length;O++)u.__h.push(u._sb[O]);u._sb=[],u.__h.length&&a.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(v,u.__s,k),y&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(p,m,g)})}if(u.context=k,u.props=v,u.__P=e,u.__e=!1,I=C.__r,w=0,y){for(u.state=u.__s,u.__d=!1,I&&I(t),d=u.render(u.props,u.state,u.context),B=0;B<u._sb.length;B++)u.__h.push(u._sb[B]);u._sb=[]}else do u.__d=!1,I&&I(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++w<25);u.state=u.__s,u.getChildContext!=null&&(n=ft(ft({},n),u.getChildContext())),y&&!h&&u.getSnapshotBeforeUpdate!=null&&(g=u.getSnapshotBeforeUpdate(p,m)),$e=d,d!=null&&d.type===ot&&d.key==null&&($e=Jd(d.props.children)),s=Bd(e,Wr($e)?$e:[$e],t,r,n,o,i,a,s,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&a.push(u),_&&(u.__E=u.__=null)}catch(Bt){if(t.__v=null,l||i!=null)if(Bt.then){for(t.__u|=l?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;i[i.indexOf(s)]=null,t.__e=s}else for(Xt=i.length;Xt--;)Xa(i[Xt]);else t.__e=r.__e,t.__k=r.__k;C.__e(Bt,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):s=t.__e=Gx(r.__e,t,r,n,o,i,a,l,c);return(d=C.diffed)&&d(t),128&t.__u?void 0:s}function Hd(e,t,r){for(var n=0;n<r.length;n++)es(r[n],r[++n],r[++n]);C.__c&&C.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){C.__e(i,o.__v)}})}function Jd(e){return typeof e!="object"||e==null?e:Wr(e)?e.map(Jd):ft({},e)}function Gx(e,t,r,n,o,i,a,s,l){var c,d,u,h,p,m,g,_=r.props,v=t.props,y=t.type;if(y=="svg"?o="http://www.w3.org/2000/svg":y=="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((p=i[c])&&"setAttribute"in p==!!y&&(y?p.localName==y:p.nodeType==3)){e=p,i[c]=null;break}}if(e==null){if(y==null)return document.createTextNode(v);e=document.createElementNS(o,y,v.is&&v),s&&(C.__m&&C.__m(t,i),s=!1),i=null}if(y===null)_===v||s&&e.data===v||(e.data=v);else{if(i=i&&so.call(e.childNodes),_=r.props||Kr,!s&&i!=null)for(_={},c=0;c<e.attributes.length;c++)_[(p=e.attributes[c]).name]=p.value;for(c in _)if(p=_[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=p;else if(!(c in v)){if(c=="value"&&"defaultValue"in v||c=="checked"&&"defaultChecked"in v)continue;oo(e,c,null,p,o)}}for(c in v)p=v[c],c=="children"?h=p:c=="dangerouslySetInnerHTML"?d=p:c=="value"?m=p:c=="checked"?g=p:s&&typeof p!="function"||_[c]===p||oo(e,c,p,_[c],o);if(d)s||u&&(d.__html===u.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),Bd(t.type==="template"?e.content:e,Wr(h)?h:[h],t,r,n,y=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,a,i?i[0]:r.__k&&tr(r,0),s,l),i!=null)for(c=i.length;c--;)Xa(i[c]);s||(c="value",y=="progress"&&m==null?e.removeAttribute("value"):m!==void 0&&(m!==e[c]||y=="progress"&&!m||y=="option"&&m!==_[c])&&oo(e,c,m,_[c],o),c="checked",g!==void 0&&g!==e[c]&&oo(e,c,g,_[c],o))}return e}function es(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){C.__e(o,r)}}function Vd(e,t,r){var n,o;if(C.unmount&&C.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||es(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){C.__e(i,t)}n.base=n.__P=null}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&Vd(n[o],t,r||typeof e.type!="function");r||Xa(e.__e),e.__c=e.__=e.__e=void 0}function Kx(e,t,r){return this.constructor(e,r)}function rr(e,t,r){var n,o,i,a;t==document&&(t=document.documentElement),C.__&&C.__(e,t),o=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],a=[],Za(t,e=(!n&&r||t).__k=nt(ot,null,[e]),o||Kr,Kr,t.namespaceURI,!n&&r?[r]:o?null:t.firstChild?so.call(t.childNodes):null,i,!n&&r?r:o?o.__e:t.firstChild,n,a),Hd(i,e,a)}var so,C,qd,Ya,Vt,Od,Ld,Ud,Md,Qa,Wa,za,$x,Kr,Fd,Hx,Wr,nr=T(()=>{Kr={},Fd=[],Hx=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Wr=Array.isArray;so=Fd.slice,C={__e:function(e,t,r,n){for(var o,i,a;t=t.__;)if((o=t.__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}},qd=0,Ya=function(e){return e!=null&&e.constructor==null},Ue.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ft({},this.state),typeof e=="function"&&(e=e(ft({},r),this.props)),e&&ft(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Pd(this))},Ue.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Pd(this))},Ue.prototype.render=ot,Vt=[],Ld=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ud=function(e,t){return e.__v.__b-t.__v.__b},ao.__r=0,Md=/(PointerCapture)$|Capture$/i,Qa=0,Wa=Dd(!1),za=Dd(!0),$x=0});var Y=f((aj,Gd)=>{"use strict";Gd.exports=function(e){try{return!!e()}catch(t){return!0}}});var or=f((sj,Kd)=>{"use strict";var Wx=Y();Kd.exports=!Wx(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var fe=f((lj,Yd)=>{"use strict";var Wd=or(),zd=Function.prototype,ts=zd.call,zx=Wd&&zd.bind.bind(ts,ts);Yd.exports=Wd?zx:function(e){return function(){return ts.apply(e,arguments)}}});var Re=f((cj,Qd)=>{"use strict";var Yx=fe();Qd.exports=Yx({}.isPrototypeOf)});var te=f((rs,Xd)=>{"use strict";var Yr=function(e){return e&&e.Math===Math&&e};Xd.exports=Yr(typeof globalThis=="object"&&globalThis)||Yr(typeof window=="object"&&window)||Yr(typeof self=="object"&&self)||Yr(typeof global=="object"&&global)||Yr(typeof rs=="object"&&rs)||function(){return this}()||Function("return this")()});var ns=f((uj,rf)=>{"use strict";var Qx=or(),tf=Function.prototype,Zd=tf.apply,ef=tf.call;rf.exports=typeof Reflect=="object"&&Reflect.apply||(Qx?ef.bind(Zd):function(){return ef.apply(Zd,arguments)})});var pt=f((dj,of)=>{"use strict";var nf=fe(),Xx=nf({}.toString),Zx=nf("".slice);of.exports=function(e){return Zx(Xx(e),8,-1)}});var Qr=f((fj,af)=>{"use strict";var eA=pt(),tA=fe();af.exports=function(e){if(eA(e)==="Function")return tA(e)}});var ve=f((pj,sf)=>{"use strict";var os=typeof document=="object"&&document.all;sf.exports=typeof os=="undefined"&&os!==void 0?function(e){return typeof e=="function"||e===os}:function(e){return typeof e=="function"}});var Me=f((hj,lf)=>{"use strict";var rA=Y();lf.exports=!rA(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var ht=f((mj,cf)=>{"use strict";var nA=or(),lo=Function.prototype.call;cf.exports=nA?lo.bind(lo):function(){return lo.apply(lo,arguments)}});var is=f(ff=>{"use strict";var uf={}.propertyIsEnumerable,df=Object.getOwnPropertyDescriptor,oA=df&&!uf.call({1:2},1);ff.f=oA?function(t){var r=df(this,t);return!!r&&r.enumerable}:uf});var Xr=f((gj,pf)=>{"use strict";pf.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var co=f((_j,hf)=>{"use strict";var iA=fe(),aA=Y(),sA=pt(),as=Object,lA=iA("".split);hf.exports=aA(function(){return!as("z").propertyIsEnumerable(0)})?function(e){return sA(e)==="String"?lA(e,""):as(e)}:as});var ir=f((yj,mf)=>{"use strict";mf.exports=function(e){return e==null}});var ar=f((bj,vf)=>{"use strict";var cA=ir(),uA=TypeError;vf.exports=function(e){if(cA(e))throw new uA("Can't call method on "+e);return e}});var Ct=f((wj,gf)=>{"use strict";var dA=co(),fA=ar();gf.exports=function(e){return dA(fA(e))}});var pe=f((Ej,_f)=>{"use strict";var pA=ve();_f.exports=function(e){return typeof e=="object"?e!==null:pA(e)}});var mt=f((xj,yf)=>{"use strict";yf.exports={}});var uo=f((Aj,wf)=>{"use strict";var ss=mt(),ls=te(),hA=ve(),bf=function(e){return hA(e)?e:void 0};wf.exports=function(e,t){return arguments.length<2?bf(ss[e])||bf(ls[e]):ss[e]&&ss[e][t]||ls[e]&&ls[e][t]}});var fo=f((Sj,Af)=>{"use strict";var mA=te(),Ef=mA.navigator,xf=Ef&&Ef.userAgent;Af.exports=xf?String(xf):""});var ho=f((Ij,Cf)=>{"use strict";var kf=te(),cs=fo(),Sf=kf.process,If=kf.Deno,Tf=Sf&&Sf.versions||If&&If.version,Rf=Tf&&Tf.v8,Ye,po;Rf&&(Ye=Rf.split("."),po=Ye[0]>0&&Ye[0]<4?1:+(Ye[0]+Ye[1]));!po&&cs&&(Ye=cs.match(/Edge\/(\d+)/),(!Ye||Ye[1]>=74)&&(Ye=cs.match(/Chrome\/(\d+)/),Ye&&(po=+Ye[1])));Cf.exports=po});var us=f((Tj,Pf)=>{"use strict";var Of=ho(),vA=Y(),gA=te(),_A=gA.String;Pf.exports=!!Object.getOwnPropertySymbols&&!vA(function(){var e=Symbol("symbol detection");return!_A(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Of&&Of<41})});var ds=f((Rj,Nf)=>{"use strict";var yA=us();Nf.exports=yA&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var fs=f((kj,Df)=>{"use strict";var bA=uo(),wA=ve(),EA=Re(),xA=ds(),AA=Object;Df.exports=xA?function(e){return typeof e=="symbol"}:function(e){var t=bA("Symbol");return wA(t)&&EA(t.prototype,AA(e))}});var mo=f((Cj,qf)=>{"use strict";var SA=String;qf.exports=function(e){try{return SA(e)}catch(t){return"Object"}}});var sr=f((Oj,Lf)=>{"use strict";var IA=ve(),TA=mo(),RA=TypeError;Lf.exports=function(e){if(IA(e))return e;throw new RA(TA(e)+" is not a function")}});var vo=f((Pj,Uf)=>{"use strict";var kA=sr(),CA=ir();Uf.exports=function(e,t){var r=e[t];return CA(r)?void 0:kA(r)}});var Ff=f((Nj,Mf)=>{"use strict";var ps=ht(),hs=ve(),ms=pe(),OA=TypeError;Mf.exports=function(e,t){var r,n;if(t==="string"&&hs(r=e.toString)&&!ms(n=ps(r,e))||hs(r=e.valueOf)&&!ms(n=ps(r,e))||t!=="string"&&hs(r=e.toString)&&!ms(n=ps(r,e)))return n;throw new OA("Can't convert object to primitive value")}});var lr=f((Dj,jf)=>{"use strict";jf.exports=!0});var Hf=f((qj,$f)=>{"use strict";var Bf=te(),PA=Object.defineProperty;$f.exports=function(e,t){try{PA(Bf,e,{value:t,configurable:!0,writable:!0})}catch(r){Bf[e]=t}return t}});var Zr=f((Lj,Gf)=>{"use strict";var NA=lr(),DA=te(),qA=Hf(),Jf="__core-js_shared__",Vf=Gf.exports=DA[Jf]||qA(Jf,{});(Vf.versions||(Vf.versions=[])).push({version:"3.41.0",mode:NA?"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 vs=f((Uj,Wf)=>{"use strict";var Kf=Zr();Wf.exports=function(e,t){return Kf[e]||(Kf[e]=t||{})}});var cr=f((Mj,zf)=>{"use strict";var LA=ar(),UA=Object;zf.exports=function(e){return UA(LA(e))}});var Fe=f((Fj,Yf)=>{"use strict";var MA=fe(),FA=cr(),jA=MA({}.hasOwnProperty);Yf.exports=Object.hasOwn||function(t,r){return jA(FA(t),r)}});var go=f((jj,Qf)=>{"use strict";var BA=fe(),$A=0,HA=Math.random(),JA=BA(1 .toString);Qf.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+JA(++$A+HA,36)}});var ke=f((Bj,Zf)=>{"use strict";var VA=te(),GA=vs(),Xf=Fe(),KA=go(),WA=us(),zA=ds(),ur=VA.Symbol,gs=GA("wks"),YA=zA?ur.for||ur:ur&&ur.withoutSetter||KA;Zf.exports=function(e){return Xf(gs,e)||(gs[e]=WA&&Xf(ur,e)?ur[e]:YA("Symbol."+e)),gs[e]}});var np=f(($j,rp)=>{"use strict";var QA=ht(),ep=pe(),tp=fs(),XA=vo(),ZA=Ff(),eS=ke(),tS=TypeError,rS=eS("toPrimitive");rp.exports=function(e,t){if(!ep(e)||tp(e))return e;var r=XA(e,rS),n;if(r){if(t===void 0&&(t="default"),n=QA(r,e,t),!ep(n)||tp(n))return n;throw new tS("Can't convert object to primitive value")}return t===void 0&&(t="number"),ZA(e,t)}});var _s=f((Hj,op)=>{"use strict";var nS=np(),oS=fs();op.exports=function(e){var t=nS(e,"string");return oS(t)?t:t+""}});var bs=f((Jj,ap)=>{"use strict";var iS=te(),ip=pe(),ys=iS.document,aS=ip(ys)&&ip(ys.createElement);ap.exports=function(e){return aS?ys.createElement(e):{}}});var ws=f((Vj,sp)=>{"use strict";var sS=Me(),lS=Y(),cS=bs();sp.exports=!sS&&!lS(function(){return Object.defineProperty(cS("div"),"a",{get:function(){return 7}}).a!==7})});var Es=f(cp=>{"use strict";var uS=Me(),dS=ht(),fS=is(),pS=Xr(),hS=Ct(),mS=_s(),vS=Fe(),gS=ws(),lp=Object.getOwnPropertyDescriptor;cp.f=uS?lp:function(t,r){if(t=hS(t),r=mS(r),gS)try{return lp(t,r)}catch(n){}if(vS(t,r))return pS(!dS(fS.f,t,r),t[r])}});var dp=f((Kj,up)=>{"use strict";var _S=Y(),yS=ve(),bS=/#|\.prototype\./,en=function(e,t){var r=ES[wS(e)];return r===AS?!0:r===xS?!1:yS(t)?_S(t):!!t},wS=en.normalize=function(e){return String(e).replace(bS,".").toLowerCase()},ES=en.data={},xS=en.NATIVE="N",AS=en.POLYFILL="P";up.exports=en});var _o=f((Wj,pp)=>{"use strict";var fp=Qr(),SS=sr(),IS=or(),TS=fp(fp.bind);pp.exports=function(e,t){return SS(e),t===void 0?e:IS?TS(e,t):function(){return e.apply(t,arguments)}}});var xs=f((zj,hp)=>{"use strict";var RS=Me(),kS=Y();hp.exports=RS&&kS(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Ot=f((Yj,mp)=>{"use strict";var CS=pe(),OS=String,PS=TypeError;mp.exports=function(e){if(CS(e))return e;throw new PS(OS(e)+" is not an object")}});var Pt=f(gp=>{"use strict";var NS=Me(),DS=ws(),qS=xs(),yo=Ot(),vp=_s(),LS=TypeError,As=Object.defineProperty,US=Object.getOwnPropertyDescriptor,Ss="enumerable",Is="configurable",Ts="writable";gp.f=NS?qS?function(t,r,n){if(yo(t),r=vp(r),yo(n),typeof t=="function"&&r==="prototype"&&"value"in n&&Ts in n&&!n[Ts]){var o=US(t,r);o&&o[Ts]&&(t[r]=n.value,n={configurable:Is in n?n[Is]:o[Is],enumerable:Ss in n?n[Ss]:o[Ss],writable:!1})}return As(t,r,n)}:As:function(t,r,n){if(yo(t),r=vp(r),yo(n),DS)try{return As(t,r,n)}catch(o){}if("get"in n||"set"in n)throw new LS("Accessors not supported");return"value"in n&&(t[r]=n.value),t}});var Gt=f((Xj,_p)=>{"use strict";var MS=Me(),FS=Pt(),jS=Xr();_p.exports=MS?function(e,t,r){return FS.f(e,t,jS(1,r))}:function(e,t,r){return e[t]=r,e}});var re=f((Zj,bp)=>{"use strict";var tn=te(),BS=ns(),$S=Qr(),HS=ve(),JS=Es().f,VS=dp(),dr=mt(),GS=_o(),fr=Gt(),yp=Fe();Zr();var KS=function(e){var t=function(r,n,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,o)}return BS(e,this,arguments)};return t.prototype=e.prototype,t};bp.exports=function(e,t){var r=e.target,n=e.global,o=e.stat,i=e.proto,a=n?tn:o?tn[r]:tn[r]&&tn[r].prototype,s=n?dr:dr[r]||fr(dr,r,{})[r],l=s.prototype,c,d,u,h,p,m,g,_,v;for(h in t)c=VS(n?h:r+(o?".":"#")+h,e.forced),d=!c&&a&&yp(a,h),m=s[h],d&&(e.dontCallGetSet?(v=JS(a,h),g=v&&v.value):g=a[h]),p=d&&g?g:t[h],!(!c&&!i&&typeof m==typeof p)&&(e.bind&&d?_=GS(p,tn):e.wrap&&d?_=KS(p):i&&HS(p)?_=$S(p):_=p,(e.sham||p&&p.sham||m&&m.sham)&&fr(_,"sham",!0),fr(s,h,_),i&&(u=r+"Prototype",yp(dr,u)||fr(dr,u,{}),fr(dr[u],h,p),e.real&&l&&(c||!l[h])&&fr(l,h,p)))}});var Ep=f((e2,wp)=>{"use strict";var WS=Math.ceil,zS=Math.floor;wp.exports=Math.trunc||function(t){var r=+t;return(r>0?zS:WS)(r)}});var Rs=f((t2,xp)=>{"use strict";var YS=Ep();xp.exports=function(e){var t=+e;return t!==t||t===0?0:YS(t)}});var ks=f((r2,Ap)=>{"use strict";var QS=Rs(),XS=Math.min;Ap.exports=function(e){var t=QS(e);return t>0?XS(t,9007199254740991):0}});var pr=f((n2,Sp)=>{"use strict";var ZS=ks();Sp.exports=function(e){return ZS(e.length)}});var rn=f((o2,Ip)=>{"use strict";var eI=pt();Ip.exports=Array.isArray||function(t){return eI(t)==="Array"}});var bo=f((i2,Rp)=>{"use strict";var tI=ke(),rI=tI("toStringTag"),Tp={};Tp[rI]="z";Rp.exports=String(Tp)==="[object z]"});var hr=f((a2,kp)=>{"use strict";var nI=bo(),oI=ve(),wo=pt(),iI=ke(),aI=iI("toStringTag"),sI=Object,lI=wo(function(){return arguments}())==="Arguments",cI=function(e,t){try{return e[t]}catch(r){}};kp.exports=nI?wo:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=cI(t=sI(e),aI))=="string"?r:lI?wo(t):(n=wo(t))==="Object"&&oI(t.callee)?"Arguments":n}});var Op=f((s2,Cp)=>{"use strict";var uI=fe(),dI=ve(),Cs=Zr(),fI=uI(Function.toString);dI(Cs.inspectSource)||(Cs.inspectSource=function(e){return fI(e)});Cp.exports=Cs.inspectSource});var Ps=f((l2,Lp)=>{"use strict";var pI=fe(),hI=Y(),Pp=ve(),mI=hr(),vI=uo(),gI=Op(),Np=function(){},Dp=vI("Reflect","construct"),Os=/^\s*(?:class|function)\b/,_I=pI(Os.exec),yI=!Os.test(Np),nn=function(t){if(!Pp(t))return!1;try{return Dp(Np,[],t),!0}catch(r){return!1}},qp=function(t){if(!Pp(t))return!1;switch(mI(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return yI||!!_I(Os,gI(t))}catch(r){return!0}};qp.sham=!0;Lp.exports=!Dp||hI(function(){var e;return nn(nn.call)||!nn(Object)||!nn(function(){e=!0})||e})?qp:nn});var jp=f((c2,Fp)=>{"use strict";var Up=rn(),bI=Ps(),wI=pe(),EI=ke(),xI=EI("species"),Mp=Array;Fp.exports=function(e){var t;return Up(e)&&(t=e.constructor,bI(t)&&(t===Mp||Up(t.prototype))?t=void 0:wI(t)&&(t=t[xI],t===null&&(t=void 0))),t===void 0?Mp:t}});var Ns=f((u2,Bp)=>{"use strict";var AI=jp();Bp.exports=function(e,t){return new(AI(e))(t===0?0:t)}});var Dt=f((d2,Hp)=>{"use strict";var SI=_o(),II=fe(),TI=co(),RI=cr(),kI=pr(),CI=Ns(),$p=II([].push),Nt=function(e){var t=e===1,r=e===2,n=e===3,o=e===4,i=e===6,a=e===7,s=e===5||i;return function(l,c,d,u){for(var h=RI(l),p=TI(h),m=kI(p),g=SI(c,d),_=0,v=u||CI,y=t?v(l,m):r||a?v(l,0):void 0,A,k;m>_;_++)if((s||_ in p)&&(A=p[_],k=g(A,_,h),e))if(t)y[_]=k;else if(k)switch(e){case 3:return!0;case 5:return A;case 6:return _;case 2:$p(y,A)}else switch(e){case 4:return!1;case 7:$p(y,A)}return i?-1:n||o?o:y}};Hp.exports={forEach:Nt(0),map:Nt(1),filter:Nt(2),some:Nt(3),every:Nt(4),find:Nt(5),findIndex:Nt(6),filterReject:Nt(7)}});var on=f((f2,Jp)=>{"use strict";var OI=Y(),PI=ke(),NI=ho(),DI=PI("species");Jp.exports=function(e){return NI>=51||!OI(function(){var t=[],r=t.constructor={};return r[DI]=function(){return{foo:1}},t[e](Boolean).foo!==1})}});var Vp=f(()=>{"use strict";var qI=re(),LI=Dt().filter,UI=on(),MI=UI("filter");qI({target:"Array",proto:!0,forced:!MI},{filter:function(t){return LI(this,t,arguments.length>1?arguments[1]:void 0)}})});var Ge=f((m2,Gp)=>{"use strict";var FI=te(),jI=mt();Gp.exports=function(e,t){var r=jI[e+"Prototype"],n=r&&r[t];if(n)return n;var o=FI[e],i=o&&o.prototype;return i&&i[t]}});var Wp=f((v2,Kp)=>{"use strict";Vp();var BI=Ge();Kp.exports=BI("Array","filter")});var Yp=f((g2,zp)=>{"use strict";var $I=Re(),HI=Wp(),Ds=Array.prototype;zp.exports=function(e){var t=e.filter;return e===Ds||$I(Ds,e)&&t===Ds.filter?HI:t}});var Xp=f((_2,Qp)=>{"use strict";var JI=Yp();Qp.exports=JI});var eh=f((y2,Zp)=>{Zp.exports=Xp()});var an=f((b2,th)=>{"use strict";var VI=Y();th.exports=function(e,t){var r=[][e];return!!r&&VI(function(){r.call(null,t||function(){return 1},1)})}});var rh=f(()=>{"use strict";var GI=re(),KI=Dt().every,WI=an(),zI=WI("every");GI({target:"Array",proto:!0,forced:!zI},{every:function(t){return KI(this,t,arguments.length>1?arguments[1]:void 0)}})});var oh=f((x2,nh)=>{"use strict";rh();var YI=Ge();nh.exports=YI("Array","every")});var ah=f((A2,ih)=>{"use strict";var QI=Re(),XI=oh(),qs=Array.prototype;ih.exports=function(e){var t=e.every;return e===qs||QI(qs,e)&&t===qs.every?XI:t}});var lh=f((S2,sh)=>{"use strict";var ZI=ah();sh.exports=ZI});var uh=f((I2,ch)=>{ch.exports=lh()});var fh=f((T2,dh)=>{"use strict";var eT=Dt().forEach,tT=an(),rT=tT("forEach");dh.exports=rT?[].forEach:function(t){return eT(this,t,arguments.length>1?arguments[1]:void 0)}});var hh=f(()=>{"use strict";var nT=re(),ph=fh();nT({target:"Array",proto:!0,forced:[].forEach!==ph},{forEach:ph})});var vh=f((C2,mh)=>{"use strict";hh();var oT=Ge();mh.exports=oT("Array","forEach")});var _h=f((O2,gh)=>{"use strict";var iT=vh();gh.exports=iT});var yh=f(()=>{});var wh=f((D2,bh)=>{"use strict";var aT=hr(),sT=Fe(),lT=Re(),cT=_h();yh();var Ls=Array.prototype,uT={DOMTokenList:!0,NodeList:!0};bh.exports=function(e){var t=e.forEach;return e===Ls||lT(Ls,e)&&t===Ls.forEach||sT(uT,aT(e))?cT:t}});var xh=f((q2,Eh)=>{Eh.exports=wh()});var Sh=f((L2,Ah)=>{"use strict";var dT=TypeError,fT=9007199254740991;Ah.exports=function(e){if(e>fT)throw dT("Maximum allowed index exceeded");return e}});var Us=f((U2,Ih)=>{"use strict";var pT=Me(),hT=Pt(),mT=Xr();Ih.exports=function(e,t,r){pT?hT.f(e,t,mT(0,r)):e[t]=r}});var Ch=f(()=>{"use strict";var vT=re(),gT=Y(),_T=rn(),yT=pe(),bT=cr(),wT=pr(),Th=Sh(),Rh=Us(),ET=Ns(),xT=on(),AT=ke(),ST=ho(),kh=AT("isConcatSpreadable"),IT=ST>=51||!gT(function(){var e=[];return e[kh]=!1,e.concat()[0]!==e}),TT=function(e){if(!yT(e))return!1;var t=e[kh];return t!==void 0?!!t:_T(e)},RT=!IT||!xT("concat");vT({target:"Array",proto:!0,arity:1,forced:RT},{concat:function(t){var r=bT(this),n=ET(r,0),o=0,i,a,s,l,c;for(i=-1,s=arguments.length;i<s;i++)if(c=i===-1?r:arguments[i],TT(c))for(l=wT(c),Th(o+l),a=0;a<l;a++,o++)a in c&&Rh(n,o,c[a]);else Th(o+1),Rh(n,o++,c);return n.length=o,n}})});var Ph=f((j2,Oh)=>{"use strict";Ch();var kT=Ge();Oh.exports=kT("Array","concat")});var Dh=f((B2,Nh)=>{"use strict";var CT=Re(),OT=Ph(),Ms=Array.prototype;Nh.exports=function(e){var t=e.concat;return e===Ms||CT(Ms,e)&&t===Ms.concat?OT:t}});var Lh=f(($2,qh)=>{"use strict";var PT=Dh();qh.exports=PT});var Mh=f((H2,Uh)=>{Uh.exports=Lh()});var Fh=f(()=>{"use strict";var NT=re(),DT=Dt().some,qT=an(),LT=qT("some");NT({target:"Array",proto:!0,forced:!LT},{some:function(t){return DT(this,t,arguments.length>1?arguments[1]:void 0)}})});var Bh=f((G2,jh)=>{"use strict";Fh();var UT=Ge();jh.exports=UT("Array","some")});var Hh=f((K2,$h)=>{"use strict";var MT=Re(),FT=Bh(),Fs=Array.prototype;$h.exports=function(e){var t=e.some;return e===Fs||MT(Fs,e)&&t===Fs.some?FT:t}});var Vh=f((W2,Jh)=>{"use strict";var jT=Hh();Jh.exports=jT});var Kh=f((z2,Gh)=>{Gh.exports=Vh()});var zh=f((Y2,Wh)=>{"use strict";var sn=te(),BT=fo(),$T=pt(),Eo=function(e){return BT.slice(0,e.length)===e};Wh.exports=function(){return Eo("Bun/")?"BUN":Eo("Cloudflare-Workers")?"CLOUDFLARE":Eo("Deno/")?"DENO":Eo("Node.js/")?"NODE":sn.Bun&&typeof Bun.version=="string"?"BUN":sn.Deno&&typeof Deno.version=="object"?"DENO":$T(sn.process)==="process"?"NODE":sn.window&&sn.document?"BROWSER":"REST"}()});var ln=f((Q2,Yh)=>{"use strict";var HT=fe();Yh.exports=HT([].slice)});var Xh=f((X2,Qh)=>{"use strict";var JT=TypeError;Qh.exports=function(e,t){if(e<t)throw new JT("Not enough arguments");return e}});var js=f((Z2,em)=>{"use strict";var Zh=te(),VT=ns(),GT=ve(),KT=zh(),WT=fo(),zT=ln(),YT=Xh(),QT=Zh.Function,XT=/MSIE .\./.test(WT)||KT==="BUN"&&function(){var e=Zh.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}();em.exports=function(e,t){var r=t?2:1;return XT?function(n,o){var i=YT(arguments.length,1)>r,a=GT(n)?n:QT(n),s=i?zT(arguments,r):[],l=i?function(){VT(a,this,s)}:a;return t?e(l,o):e(l)}:e}});var nm=f(()=>{"use strict";var ZT=re(),rm=te(),e1=js(),tm=e1(rm.setInterval,!0);ZT({global:!0,bind:!0,forced:rm.setInterval!==tm},{setInterval:tm})});var am=f(()=>{"use strict";var t1=re(),im=te(),r1=js(),om=r1(im.setTimeout,!0);t1({global:!0,bind:!0,forced:im.setTimeout!==om},{setTimeout:om})});var sm=f(()=>{"use strict";nm();am()});var cm=f((aB,lm)=>{"use strict";sm();var n1=mt();lm.exports=n1.setTimeout});var dm=f((sB,um)=>{um.exports=cm()});function Hs(e,t){Q.__h&&Q.__h(Ce,e,Ao||t),Ao=0;var r=Ce.__H||(Ce.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function Js(e,t){var r=Hs(cn++,3);!Q.__s&&Ks(r.__H,t)&&(r.__=e,r.u=t,Ce.__H.__h.push(r))}function Vs(e,t){var r=Hs(cn++,4);!Q.__s&&Ks(r.__H,t)&&(r.__=e,r.u=t,Ce.__h.push(r))}function Gs(e){return Ao=5,un(function(){return{current:e}},[])}function un(e,t){var r=Hs(cn++,7);return Ks(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function So(e,t){return Ao=8,un(function(){return e},t)}function o1(){for(var e;e=bm.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(xo),e.__H.__h.forEach($s),e.__H.__h=[]}catch(t){e.__H.__h=[],Q.__e(t,e.__v)}}function i1(e){var t,r=function(){clearTimeout(n),ym&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);ym&&(t=requestAnimationFrame(r))}function xo(e){var t=Ce,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),Ce=t}function $s(e){var t=Ce;e.__c=e.__(),Ce=t}function Ks(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}var cn,Ce,Bs,fm,Ao,bm,Q,pm,hm,mm,vm,gm,_m,ym,Ws=T(()=>{nr();Ao=0,bm=[],Q=C,pm=Q.__b,hm=Q.__r,mm=Q.diffed,vm=Q.__c,gm=Q.unmount,_m=Q.__;Q.__b=function(e){Ce=null,pm&&pm(e)},Q.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),_m&&_m(e,t)},Q.__r=function(e){hm&&hm(e),cn=0;var t=(Ce=e.__c).__H;t&&(Bs===Ce?(t.__h=[],Ce.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.forEach(xo),t.__h.forEach($s),t.__h=[],cn=0)),Bs=Ce},Q.diffed=function(e){mm&&mm(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(bm.push(t)!==1&&fm===Q.requestAnimationFrame||((fm=Q.requestAnimationFrame)||i1)(o1)),t.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Bs=Ce=null},Q.__c=function(e,t){t.some(function(r){try{r.__h.forEach(xo),r.__h=r.__h.filter(function(n){return!n.__||$s(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],Q.__e(n,r.__v)}}),vm&&vm(e,t)},Q.unmount=function(e){gm&&gm(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{xo(n)}catch(o){t=o}}),r.__H=void 0,t&&Q.__e(t,r.__v))};ym=typeof requestAnimationFrame=="function"});function Cm(e,t){for(var r in t)e[r]=t[r];return e}function Ys(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 wm(e,t){this.props=e,this.context=t}function Qs(e,t){function r(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:Ys(this.props,o)}function n(o){return this.shouldComponentUpdate=r,nt(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}function Om(e){function t(r){var n=Cm({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=s1,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}function Pm(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=Cm({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Pm(n,t,r)})),e}function Nm(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Nm(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 zs(){this.__u=0,this.o=null,this.__b=null}function Dm(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Io(){this.i=null,this.l=null}function qm(e,t,r){return t.__k==null&&(t.textContent=""),rr(e,t),typeof r=="function"&&r(),e?e.__c:null}function m1(){}function v1(){return this.cancelBubble}function g1(){return this.defaultPrevented}var Em,s1,l1,xm,Am,c1,u1,d1,f1,p1,h1,Sm,Lm,_1,Im,Tm,Rm,Xs=T(()=>{nr();nr();Ws();Ws();(wm.prototype=new Ue).isPureReactComponent=!0,wm.prototype.shouldComponentUpdate=function(e,t){return Ys(this.props,e)||Ys(this.state,t)};Em=C.__b;C.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Em&&Em(e)};s1=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;l1=C.__e;C.__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)}l1(e,t,r,n)};xm=C.unmount;C.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),xm&&xm(e)},(zs.prototype=new Ue).__c=function(e,t){var r=t.__c,n=this;n.o==null&&(n.o=[]),n.o.push(r);var o=Dm(n.__v),i=!1,a=function(){i||(i=!0,r.__R=null,o?o(s):s())};r.__R=a;var s=function(){if(!--n.__u){if(n.state.__a){var l=n.state.__a;n.__v.__k[0]=Nm(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(a,a)},zs.prototype.componentWillUnmount=function(){this.o=[]},zs.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]=Pm(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&nt(ot,null,e.fallback);return o&&(o.__u&=-33),[nt(ot,null,t.__a?null:e.children),o]};Am=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]}};(Io.prototype=new Ue).__a=function(e){var t=this,r=Dm(t.__v),n=t.l.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),Am(t,e,n)):o()};r?r(i):i()}},Io.prototype.render=function(e){this.i=null,this.l=new Map;var t=zr(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},Io.prototype.componentDidUpdate=Io.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,r){Am(e,r,t)})};c1=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,u1=/^(?: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]/,d1=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,f1=/[A-Z0-9]/g,p1=typeof document!="undefined",h1=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};Ue.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ue.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});Sm=C.event;C.event=function(e){return Sm&&(e=Sm(e)),e.persist=m1,e.isPropagationStopped=v1,e.isDefaultPrevented=g1,e.nativeEvent=e};_1={enumerable:!1,configurable:!0,get:function(){return this.class}},Im=C.vnode;C.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={},i=n.indexOf("-")===-1;for(var a in r){var s=r[a];if(!(a==="value"&&"defaultValue"in r&&s==null||p1&&a==="children"&&n==="noscript"||a==="class"||a==="className")){var l=a.toLowerCase();a==="defaultValue"&&"value"in r&&r.value==null?a="value":a==="download"&&s===!0?s="":l==="translate"&&s==="no"?s=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?a="ondblclick":l!=="onchange"||n!=="input"&&n!=="textarea"||h1(r.type)?l==="onfocus"?a="onfocusin":l==="onblur"?a="onfocusout":d1.test(a)&&(a=l):l=a="oninput":i&&u1.test(a)?a=a.replace(f1,"-$&").toLowerCase():s===null&&(s=void 0),l==="oninput"&&o[a=l]&&(a="oninputCapture"),o[a]=s}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=zr(r.children).forEach(function(c){c.props.selected=o.value.indexOf(c.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=zr(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",_1)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=c1,Im&&Im(e)};Tm=C.__r;C.__r=function(e){Tm&&Tm(e),Lm=e.__c};Rm=C.diffed;C.diffed=function(e){Rm&&Rm(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),Lm=null}});var Zs=f((xB,Um)=>{"use strict";var y1=Rs(),b1=Math.max,w1=Math.min;Um.exports=function(e,t){var r=y1(e);return r<0?b1(r+t,0):w1(r,t)}});var jm=f(()=>{"use strict";var E1=re(),Mm=rn(),x1=Ps(),A1=pe(),Fm=Zs(),S1=pr(),I1=Ct(),T1=Us(),R1=ke(),k1=on(),C1=ln(),O1=k1("slice"),P1=R1("species"),el=Array,N1=Math.max;E1({target:"Array",proto:!0,forced:!O1},{slice:function(t,r){var n=I1(this),o=S1(n),i=Fm(t,o),a=Fm(r===void 0?o:r,o),s,l,c;if(Mm(n)&&(s=n.constructor,x1(s)&&(s===el||Mm(s.prototype))?s=void 0:A1(s)&&(s=s[P1],s===null&&(s=void 0)),s===el||s===void 0))return C1(n,i,a);for(l=new(s===void 0?el:s)(N1(a-i,0)),c=0;i<a;i++,c++)i in n&&T1(l,c,n[i]);return l.length=c,l}})});var $m=f((IB,Bm)=>{"use strict";jm();var D1=Ge();Bm.exports=D1("Array","slice")});var Jm=f((TB,Hm)=>{"use strict";var q1=Re(),L1=$m(),tl=Array.prototype;Hm.exports=function(e){var t=e.slice;return e===tl||q1(tl,e)&&t===tl.slice?L1:t}});var Gm=f((RB,Vm)=>{"use strict";var U1=Jm();Vm.exports=U1});var Wm=f((kB,Km)=>{Km.exports=Gm()});var zm=f(()=>{"use strict";var M1=re(),F1=rn();M1({target:"Array",stat:!0},{isArray:F1})});var Qm=f((PB,Ym)=>{"use strict";zm();var j1=mt();Ym.exports=j1.Array.isArray});var Zm=f((NB,Xm)=>{"use strict";var B1=Qm();Xm.exports=B1});var tv=f((DB,ev)=>{ev.exports=Zm()});var rl=f((qB,rv)=>{"use strict";var $1=hr(),H1=String;rv.exports=function(e){if($1(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return H1(e)}});var ov=f((LB,nv)=>{"use strict";var J1=pe(),V1=pt(),G1=ke(),K1=G1("match");nv.exports=function(e){var t;return J1(e)&&((t=e[K1])!==void 0?!!t:V1(e)==="RegExp")}});var av=f((UB,iv)=>{"use strict";var W1=ov(),z1=TypeError;iv.exports=function(e){if(W1(e))throw new z1("The method doesn't accept regular expressions");return e}});var lv=f((MB,sv)=>{"use strict";var Y1=ke(),Q1=Y1("match");sv.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Q1]=!1,"/./"[e](t)}catch(n){}}return!1}});var dv=f(()=>{"use strict";var X1=re(),Z1=Qr(),eR=Es().f,tR=ks(),cv=rl(),rR=av(),nR=ar(),oR=lv(),iR=lr(),aR=Z1("".slice),sR=Math.min,uv=oR("startsWith"),lR=!iR&&!uv&&!!function(){var e=eR(String.prototype,"startsWith");return e&&!e.writable}();X1({target:"String",proto:!0,forced:!lR&&!uv},{startsWith:function(t){var r=cv(nR(this));rR(t);var n=tR(sR(arguments.length>1?arguments[1]:void 0,r.length)),o=cv(t);return aR(r,n,n+o.length)===o}})});var pv=f((BB,fv)=>{"use strict";dv();var cR=Ge();fv.exports=cR("String","startsWith")});var mv=f(($B,hv)=>{"use strict";var uR=Re(),dR=pv(),nl=String.prototype;hv.exports=function(e){var t=e.startsWith;return typeof e=="string"||e===nl||uR(nl,e)&&t===nl.startsWith?dR:t}});var gv=f((HB,vv)=>{"use strict";var fR=mv();vv.exports=fR});var yv=f((JB,_v)=>{_v.exports=gv()});var Av=f((VB,xv)=>{"use strict";var wv=fe(),pR=sr(),hR=pe(),mR=Fe(),bv=ln(),vR=or(),Ev=Function,gR=wv([].concat),_R=wv([].join),ol={},yR=function(e,t,r){if(!mR(ol,t)){for(var n=[],o=0;o<t;o++)n[o]="a["+o+"]";ol[t]=Ev("C,a","return new C("+_R(n,",")+")")}return ol[t](e,r)};xv.exports=vR?Ev.bind:function(t){var r=pR(this),n=r.prototype,o=bv(arguments,1),i=function(){var s=gR(o,bv(arguments));return this instanceof i?yR(r,s.length,s):r.apply(t,s)};return hR(n)&&(i.prototype=n),i}});var Iv=f(()=>{"use strict";var bR=re(),Sv=Av();bR({target:"Function",proto:!0,forced:Function.bind!==Sv},{bind:Sv})});var Rv=f((WB,Tv)=>{"use strict";Iv();var wR=Ge();Tv.exports=wR("Function","bind")});var Cv=f((zB,kv)=>{"use strict";var ER=Re(),xR=Rv(),il=Function.prototype;kv.exports=function(e){var t=e.bind;return e===il||ER(il,e)&&t===il.bind?xR:t}});var Pv=f((YB,Ov)=>{"use strict";var AR=Cv();Ov.exports=AR});var Dv=f((QB,Nv)=>{Nv.exports=Pv()});var Lv=f((XB,qv)=>{"use strict";qv.exports=function(){}});var Kt=f((ZB,Uv)=>{"use strict";Uv.exports={}});var al=f((e5,Fv)=>{"use strict";var SR=te(),IR=ve(),Mv=SR.WeakMap;Fv.exports=IR(Mv)&&/native code/.test(String(Mv))});var To=f((t5,Bv)=>{"use strict";var TR=vs(),RR=go(),jv=TR("keys");Bv.exports=function(e){return jv[e]||(jv[e]=RR(e))}});var dn=f((r5,$v)=>{"use strict";$v.exports={}});var pn=f((n5,Vv)=>{"use strict";var kR=al(),Jv=te(),CR=pe(),OR=Gt(),sl=Fe(),ll=Zr(),PR=To(),NR=dn(),Hv="Object already initialized",cl=Jv.TypeError,DR=Jv.WeakMap,Ro,fn,ko,qR=function(e){return ko(e)?fn(e):Ro(e,{})},LR=function(e){return function(t){var r;if(!CR(t)||(r=fn(t)).type!==e)throw new cl("Incompatible receiver, "+e+" required");return r}};kR||ll.state?(Qe=ll.state||(ll.state=new DR),Qe.get=Qe.get,Qe.has=Qe.has,Qe.set=Qe.set,Ro=function(e,t){if(Qe.has(e))throw new cl(Hv);return t.facade=e,Qe.set(e,t),t},fn=function(e){return Qe.get(e)||{}},ko=function(e){return Qe.has(e)}):(Wt=PR("state"),NR[Wt]=!0,Ro=function(e,t){if(sl(e,Wt))throw new cl(Hv);return t.facade=e,OR(e,Wt,t),t},fn=function(e){return sl(e,Wt)?e[Wt]:{}},ko=function(e){return sl(e,Wt)});var Qe,Wt;Vv.exports={set:Ro,get:fn,has:ko,enforce:qR,getterFor:LR}});var fl=f((o5,Kv)=>{"use strict";var ul=Me(),UR=Fe(),Gv=Function.prototype,MR=ul&&Object.getOwnPropertyDescriptor,dl=UR(Gv,"name"),FR=dl&&(function(){}).name==="something",jR=dl&&(!ul||ul&&MR(Gv,"name").configurable);Kv.exports={EXISTS:dl,PROPER:FR,CONFIGURABLE:jR}});var pl=f((i5,zv)=>{"use strict";var BR=Ct(),$R=Zs(),HR=pr(),Wv=function(e){return function(t,r,n){var o=BR(t),i=HR(o);if(i===0)return!e&&-1;var a=$R(n,i),s;if(e&&r!==r){for(;i>a;)if(s=o[a++],s!==s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===r)return e||a||0;return!e&&-1}};zv.exports={includes:Wv(!0),indexOf:Wv(!1)}});var ml=f((a5,Qv)=>{"use strict";var JR=fe(),hl=Fe(),VR=Ct(),GR=pl().indexOf,KR=dn(),Yv=JR([].push);Qv.exports=function(e,t){var r=VR(e),n=0,o=[],i;for(i in r)!hl(KR,i)&&hl(r,i)&&Yv(o,i);for(;t.length>n;)hl(r,i=t[n++])&&(~GR(o,i)||Yv(o,i));return o}});var Co=f((s5,Xv)=>{"use strict";Xv.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var vl=f((l5,Zv)=>{"use strict";var WR=ml(),zR=Co();Zv.exports=Object.keys||function(t){return WR(t,zR)}});var tg=f(eg=>{"use strict";var YR=Me(),QR=xs(),XR=Pt(),ZR=Ot(),ek=Ct(),tk=vl();eg.f=YR&&!QR?Object.defineProperties:function(t,r){ZR(t);for(var n=ek(r),o=tk(r),i=o.length,a=0,s;i>a;)XR.f(t,s=o[a++],n[s]);return t}});var ng=f((u5,rg)=>{"use strict";var rk=uo();rg.exports=rk("document","documentElement")});var No=f((d5,ug)=>{"use strict";var nk=Ot(),ok=tg(),og=Co(),ik=dn(),ak=ng(),sk=bs(),lk=To(),ig=">",ag="<",_l="prototype",yl="script",lg=lk("IE_PROTO"),gl=function(){},cg=function(e){return ag+yl+ig+e+ag+"/"+yl+ig},sg=function(e){e.write(cg("")),e.close();var t=e.parentWindow.Object;return e=null,t},ck=function(){var e=sk("iframe"),t="java"+yl+":",r;return e.style.display="none",ak.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(cg("document.F=Object")),r.close(),r.F},Oo,Po=function(){try{Oo=new ActiveXObject("htmlfile")}catch(t){}Po=typeof document!="undefined"?document.domain&&Oo?sg(Oo):ck():sg(Oo);for(var e=og.length;e--;)delete Po[_l][og[e]];return Po()};ik[lg]=!0;ug.exports=Object.create||function(t,r){var n;return t!==null?(gl[_l]=nk(t),n=new gl,gl[_l]=null,n[lg]=t):n=Po(),r===void 0?n:ok.f(n,r)}});var fg=f((f5,dg)=>{"use strict";var uk=Y();dg.exports=!uk(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var wl=f((p5,hg)=>{"use strict";var dk=Fe(),fk=ve(),pk=cr(),hk=To(),mk=fg(),pg=hk("IE_PROTO"),bl=Object,vk=bl.prototype;hg.exports=mk?bl.getPrototypeOf:function(e){var t=pk(e);if(dk(t,pg))return t[pg];var r=t.constructor;return fk(r)&&t instanceof r?r.prototype:t instanceof bl?vk:null}});var Do=f((h5,mg)=>{"use strict";var gk=Gt();mg.exports=function(e,t,r,n){return n&&n.enumerable?e[t]=r:gk(e,t,r),e}});var Sl=f((m5,_g)=>{"use strict";var _k=Y(),yk=ve(),bk=pe(),wk=No(),vg=wl(),Ek=Do(),xk=ke(),Ak=lr(),Al=xk("iterator"),gg=!1,vt,El,xl;[].keys&&(xl=[].keys(),"next"in xl?(El=vg(vg(xl)),El!==Object.prototype&&(vt=El)):gg=!0);var Sk=!bk(vt)||_k(function(){var e={};return vt[Al].call(e)!==e});Sk?vt={}:Ak&&(vt=wk(vt));yk(vt[Al])||Ek(vt,Al,function(){return this});_g.exports={IteratorPrototype:vt,BUGGY_SAFARI_ITERATORS:gg}});var bg=f((v5,yg)=>{"use strict";var Ik=bo(),Tk=hr();yg.exports=Ik?{}.toString:function(){return"[object "+Tk(this)+"]"}});var hn=f((g5,Eg)=>{"use strict";var Rk=bo(),kk=Pt().f,Ck=Gt(),Ok=Fe(),Pk=bg(),Nk=ke(),wg=Nk("toStringTag");Eg.exports=function(e,t,r,n){var o=r?e:e&&e.prototype;o&&(Ok(o,wg)||kk(o,wg,{configurable:!0,value:t}),n&&!Rk&&Ck(o,"toString",Pk))}});var Ag=f((_5,xg)=>{"use strict";var Dk=Sl().IteratorPrototype,qk=No(),Lk=Xr(),Uk=hn(),Mk=Kt(),Fk=function(){return this};xg.exports=function(e,t,r,n){var o=t+" Iterator";return e.prototype=qk(Dk,{next:Lk(+!n,r)}),Uk(e,o,!1,!0),Mk[o]=Fk,e}});var Ig=f((y5,Sg)=>{"use strict";var jk=fe(),Bk=sr();Sg.exports=function(e,t,r){try{return jk(Bk(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(n){}}});var Rg=f((b5,Tg)=>{"use strict";var $k=pe();Tg.exports=function(e){return $k(e)||e===null}});var Cg=f((w5,kg)=>{"use strict";var Hk=Rg(),Jk=String,Vk=TypeError;kg.exports=function(e){if(Hk(e))return e;throw new Vk("Can't set "+Jk(e)+" as a prototype")}});var Pg=f((E5,Og)=>{"use strict";var Gk=Ig(),Kk=pe(),Wk=ar(),zk=Cg();Og.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,t={},r;try{r=Gk(Object.prototype,"__proto__","set"),r(t,[]),e=t instanceof Array}catch(n){}return function(o,i){return Wk(o),zk(i),Kk(o)&&(e?r(o,i):o.__proto__=i),o}}():void 0)});var Hg=f((x5,$g)=>{"use strict";var Yk=re(),Qk=ht(),qo=lr(),jg=fl(),Xk=ve(),Zk=Ag(),Ng=wl(),Dg=Pg(),eC=hn(),tC=Gt(),Il=Do(),rC=ke(),qg=Kt(),Bg=Sl(),nC=jg.PROPER,oC=jg.CONFIGURABLE,Lg=Bg.IteratorPrototype,Lo=Bg.BUGGY_SAFARI_ITERATORS,mn=rC("iterator"),Ug="keys",vn="values",Mg="entries",Fg=function(){return this};$g.exports=function(e,t,r,n,o,i,a){Zk(r,t,n);var s=function(v){if(v===o&&h)return h;if(!Lo&&v&&v in d)return d[v];switch(v){case Ug:return function(){return new r(this,v)};case vn:return function(){return new r(this,v)};case Mg:return function(){return new r(this,v)}}return function(){return new r(this)}},l=t+" Iterator",c=!1,d=e.prototype,u=d[mn]||d["@@iterator"]||o&&d[o],h=!Lo&&u||s(o),p=t==="Array"&&d.entries||u,m,g,_;if(p&&(m=Ng(p.call(new e)),m!==Object.prototype&&m.next&&(!qo&&Ng(m)!==Lg&&(Dg?Dg(m,Lg):Xk(m[mn])||Il(m,mn,Fg)),eC(m,l,!0,!0),qo&&(qg[l]=Fg))),nC&&o===vn&&u&&u.name!==vn&&(!qo&&oC?tC(d,"name",vn):(c=!0,h=function(){return Qk(u,this)})),o)if(g={values:s(vn),keys:i?h:s(Ug),entries:s(Mg)},a)for(_ in g)(Lo||c||!(_ in d))&&Il(d,_,g[_]);else Yk({target:t,proto:!0,forced:Lo||c},g);return(!qo||a)&&d[mn]!==h&&Il(d,mn,h,{name:o}),qg[t]=h,g}});var Vg=f((A5,Jg)=>{"use strict";Jg.exports=function(e,t){return{value:e,done:t}}});var Rl=f((S5,Yg)=>{"use strict";var iC=Ct(),Tl=Lv(),Gg=Kt(),Wg=pn(),aC=Pt().f,sC=Hg(),Uo=Vg(),lC=lr(),cC=Me(),zg="Array Iterator",uC=Wg.set,dC=Wg.getterFor(zg);Yg.exports=sC(Array,"Array",function(e,t){uC(this,{type:zg,target:iC(e),index:0,kind:t})},function(){var e=dC(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,Uo(void 0,!0);switch(e.kind){case"keys":return Uo(r,!1);case"values":return Uo(t[r],!1)}return Uo([r,t[r]],!1)},"values");var Kg=Gg.Arguments=Gg.Array;Tl("keys");Tl("values");Tl("entries");if(!lC&&cC&&Kg.name!=="values")try{aC(Kg,"name",{value:"values"})}catch(e){}});var Qg=f(()=>{});var kl=f((R5,Xg)=>{"use strict";var fC=Y();Xg.exports=!fC(function(){return Object.isExtensible(Object.preventExtensions({}))})});var Cl=f((k5,Zg)=>{"use strict";var pC=Do();Zg.exports=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:pC(e,n,t[n],r);return e}});var Ol=f(e_=>{"use strict";var hC=ml(),mC=Co(),vC=mC.concat("length","prototype");e_.f=Object.getOwnPropertyNames||function(t){return hC(t,vC)}});var o_=f((O5,n_)=>{"use strict";var gC=pt(),_C=Ct(),t_=Ol().f,yC=ln(),r_=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],bC=function(e){try{return t_(e)}catch(t){return yC(r_)}};n_.exports.f=function(t){return r_&&gC(t)==="Window"?bC(t):t_(_C(t))}});var a_=f((P5,i_)=>{"use strict";var wC=Y();i_.exports=wC(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})});var c_=f((N5,l_)=>{"use strict";var EC=Y(),xC=pe(),AC=pt(),s_=a_(),Mo=Object.isExtensible,SC=EC(function(){Mo(1)});l_.exports=SC||s_?function(t){return!xC(t)||s_&&AC(t)==="ArrayBuffer"?!1:Mo?Mo(t):!0}:Mo});var Fo=f((D5,f_)=>{"use strict";var IC=re(),TC=fe(),RC=dn(),kC=pe(),Pl=Fe(),CC=Pt().f,u_=Ol(),OC=o_(),Nl=c_(),PC=go(),NC=kl(),d_=!1,gt=PC("meta"),DC=0,Dl=function(e){CC(e,gt,{value:{objectID:"O"+DC++,weakData:{}}})},qC=function(e,t){if(!kC(e))return typeof e=="symbol"?e:(typeof e=="string"?"S":"P")+e;if(!Pl(e,gt)){if(!Nl(e))return"F";if(!t)return"E";Dl(e)}return e[gt].objectID},LC=function(e,t){if(!Pl(e,gt)){if(!Nl(e))return!0;if(!t)return!1;Dl(e)}return e[gt].weakData},UC=function(e){return NC&&d_&&Nl(e)&&!Pl(e,gt)&&Dl(e),e},MC=function(){FC.enable=function(){},d_=!0;var e=u_.f,t=TC([].splice),r={};r[gt]=1,e(r).length&&(u_.f=function(n){for(var o=e(n),i=0,a=o.length;i<a;i++)if(o[i]===gt){t(o,i,1);break}return o},IC({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:OC.f}))},FC=f_.exports={enable:MC,fastKey:qC,getWeakData:LC,onFreeze:UC};RC[gt]=!0});var h_=f((q5,p_)=>{"use strict";var jC=ke(),BC=Kt(),$C=jC("iterator"),HC=Array.prototype;p_.exports=function(e){return e!==void 0&&(BC.Array===e||HC[$C]===e)}});var ql=f((L5,v_)=>{"use strict";var JC=hr(),m_=vo(),VC=ir(),GC=Kt(),KC=ke(),WC=KC("iterator");v_.exports=function(e){if(!VC(e))return m_(e,WC)||m_(e,"@@iterator")||GC[JC(e)]}});var __=f((U5,g_)=>{"use strict";var zC=ht(),YC=sr(),QC=Ot(),XC=mo(),ZC=ql(),eO=TypeError;g_.exports=function(e,t){var r=arguments.length<2?ZC(e):t;if(YC(r))return QC(zC(r,e));throw new eO(XC(e)+" is not iterable")}});var w_=f((M5,b_)=>{"use strict";var tO=ht(),y_=Ot(),rO=vo();b_.exports=function(e,t,r){var n,o;y_(e);try{if(n=rO(e,"return"),!n){if(t==="throw")throw r;return r}n=tO(n,e)}catch(i){o=!0,n=i}if(t==="throw")throw r;if(o)throw n;return y_(n),r}});var Ll=f((F5,S_)=>{"use strict";var nO=_o(),oO=ht(),iO=Ot(),aO=mo(),sO=h_(),lO=pr(),E_=Re(),cO=__(),uO=ql(),x_=w_(),dO=TypeError,jo=function(e,t){this.stopped=e,this.result=t},A_=jo.prototype;S_.exports=function(e,t,r){var n=r&&r.that,o=!!(r&&r.AS_ENTRIES),i=!!(r&&r.IS_RECORD),a=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),l=nO(t,n),c,d,u,h,p,m,g,_=function(y){return c&&x_(c,"normal",y),new jo(!0,y)},v=function(y){return o?(iO(y),s?l(y[0],y[1],_):l(y[0],y[1])):s?l(y,_):l(y)};if(i)c=e.iterator;else if(a)c=e;else{if(d=uO(e),!d)throw new dO(aO(e)+" is not iterable");if(sO(d)){for(u=0,h=lO(e);h>u;u++)if(p=v(e[u]),p&&E_(A_,p))return p;return new jo(!1)}c=cO(e,d)}for(m=i?e.next:c.next;!(g=oO(m,c)).done;){try{p=v(g.value)}catch(y){x_(c,"throw",y)}if(typeof p=="object"&&p&&E_(A_,p))return p}return new jo(!1)}});var Ul=f((j5,I_)=>{"use strict";var fO=Re(),pO=TypeError;I_.exports=function(e,t){if(fO(t,e))return e;throw new pO("Incorrect invocation")}});var k_=f((B5,R_)=>{"use strict";var hO=re(),mO=te(),vO=Fo(),gO=Y(),_O=Gt(),yO=Ll(),bO=Ul(),wO=ve(),EO=pe(),xO=ir(),AO=hn(),SO=Pt().f,IO=Dt().forEach,TO=Me(),T_=pn(),RO=T_.set,kO=T_.getterFor;R_.exports=function(e,t,r){var n=e.indexOf("Map")!==-1,o=e.indexOf("Weak")!==-1,i=n?"set":"add",a=mO[e],s=a&&a.prototype,l={},c;if(!TO||!wO(a)||!(o||s.forEach&&!gO(function(){new a().entries().next()})))c=r.getConstructor(t,e,n,i),vO.enable();else{c=t(function(h,p){RO(bO(h,d),{type:e,collection:new a}),xO(p)||yO(p,h[i],{that:h,AS_ENTRIES:n})});var d=c.prototype,u=kO(e);IO(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(h){var p=h==="add"||h==="set";h in s&&!(o&&h==="clear")&&_O(d,h,function(m,g){var _=u(this).collection;if(!p&&o&&!EO(m))return h==="get"?void 0:!1;var v=_[h](m===0?0:m,g);return p?this:v})}),o||SO(d,"size",{configurable:!0,get:function(){return u(this).collection.size}})}return AO(c,e,!1,!0),l[e]=c,hO({global:!0,forced:!0},l),o||r.setStrong(c,e,n),c}});var L_=f(($5,q_)=>{"use strict";var CO=fe(),C_=Cl(),Bo=Fo().getWeakData,OO=Ul(),PO=Ot(),NO=ir(),Ml=pe(),DO=Ll(),P_=Dt(),O_=Fe(),N_=pn(),qO=N_.set,LO=N_.getterFor,UO=P_.find,MO=P_.findIndex,FO=CO([].splice),jO=0,$o=function(e){return e.frozen||(e.frozen=new D_)},D_=function(){this.entries=[]},Fl=function(e,t){return UO(e.entries,function(r){return r[0]===t})};D_.prototype={get:function(e){var t=Fl(this,e);if(t)return t[1]},has:function(e){return!!Fl(this,e)},set:function(e,t){var r=Fl(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=MO(this.entries,function(r){return r[0]===e});return~t&&FO(this.entries,t,1),!!~t}};q_.exports={getConstructor:function(e,t,r,n){var o=e(function(l,c){OO(l,i),qO(l,{type:t,id:jO++,frozen:null}),NO(c)||DO(c,l[n],{that:l,AS_ENTRIES:r})}),i=o.prototype,a=LO(t),s=function(l,c,d){var u=a(l),h=Bo(PO(c),!0);return h===!0?$o(u).set(c,d):h[u.id]=d,l};return C_(i,{delete:function(l){var c=a(this);if(!Ml(l))return!1;var d=Bo(l);return d===!0?$o(c).delete(l):d&&O_(d,c.id)&&delete d[c.id]},has:function(c){var d=a(this);if(!Ml(c))return!1;var u=Bo(c);return u===!0?$o(d).has(c):u&&O_(u,d.id)}}),C_(i,r?{get:function(c){var d=a(this);if(Ml(c)){var u=Bo(c);if(u===!0)return $o(d).get(c);if(u)return u[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 BO=kl(),U_=te(),Go=fe(),M_=Cl(),$O=Fo(),HO=k_(),F_=L_(),Ho=pe(),Jo=pn().enforce,JO=Y(),VO=al(),yn=Object,GO=Array.isArray,Vo=yn.isExtensible,j_=yn.isFrozen,KO=yn.isSealed,B_=yn.freeze,WO=yn.seal,zO=!U_.ActiveXObject&&"ActiveXObject"in U_,gn,$_=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},H_=HO("WeakMap",$_,F_),mr=H_.prototype,Ko=Go(mr.set),YO=function(){return BO&&JO(function(){var e=B_([]);return Ko(new H_,e,1),!j_(e)})};VO&&(zO?(gn=F_.getConstructor($_,"WeakMap",!0),$O.enable(),jl=Go(mr.delete),_n=Go(mr.has),Bl=Go(mr.get),M_(mr,{delete:function(e){if(Ho(e)&&!Vo(e)){var t=Jo(this);return t.frozen||(t.frozen=new gn),jl(this,e)||t.frozen.delete(e)}return jl(this,e)},has:function(t){if(Ho(t)&&!Vo(t)){var r=Jo(this);return r.frozen||(r.frozen=new gn),_n(this,t)||r.frozen.has(t)}return _n(this,t)},get:function(t){if(Ho(t)&&!Vo(t)){var r=Jo(this);return r.frozen||(r.frozen=new gn),_n(this,t)?Bl(this,t):r.frozen.get(t)}return Bl(this,t)},set:function(t,r){if(Ho(t)&&!Vo(t)){var n=Jo(this);n.frozen||(n.frozen=new gn),_n(this,t)?Ko(this,t,r):n.frozen.set(t,r)}else Ko(this,t,r);return this}})):YO()&&M_(mr,{set:function(t,r){var n;return GO(t)&&(j_(t)?n=B_:KO(t)&&(n=WO)),Ko(this,t,r),n&&n(t),this}}));var jl,_n,Bl});var V_=f(()=>{"use strict";J_()});var K_=f((K5,G_)=>{"use strict";Rl();Qg();V_();var QO=mt();G_.exports=QO.WeakMap});var z_=f((W5,W_)=>{"use strict";W_.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 Q_=f(()=>{"use strict";Rl();var XO=z_(),ZO=te(),eP=hn(),Y_=Kt();for(Wo in XO)eP(ZO[Wo],Wo),Y_[Wo]=Y_.Array;var Wo});var Z_=f((Q5,X_)=>{"use strict";var tP=K_();Q_();X_.exports=tP});var ty=f((X5,ey)=>{ey.exports=Z_()});var ny=f(()=>{"use strict";var rP=re(),nP=Qr(),oP=pl().indexOf,iP=an(),$l=nP([].indexOf),ry=!!$l&&1/$l([1],1,-0)<0,aP=ry||!iP("indexOf");rP({target:"Array",proto:!0,forced:aP},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return ry?$l(this,t,r)||0:oP(this,t,r)}})});var iy=f((t3,oy)=>{"use strict";ny();var sP=Ge();oy.exports=sP("Array","indexOf")});var sy=f((r3,ay)=>{"use strict";var lP=Re(),cP=iy(),Hl=Array.prototype;ay.exports=function(e){var t=e.indexOf;return e===Hl||lP(Hl,e)&&t===Hl.indexOf?cP:t}});var cy=f((n3,ly)=>{"use strict";var uP=sy();ly.exports=uP});var dy=f((o3,uy)=>{uy.exports=cy()});var fy=f(()=>{"use strict";var dP=re(),fP=Me(),pP=No();dP({target:"Object",stat:!0,sham:!fP},{create:pP})});var hy=f((s3,py)=>{"use strict";fy();var hP=mt(),mP=hP.Object;py.exports=function(t,r){return mP.create(t,r)}});var vy=f((l3,my)=>{"use strict";var vP=hy();my.exports=vP});var _y=f((c3,gy)=>{gy.exports=vy()});var yy=f(()=>{"use strict";var gP=re(),_P=Dt().map,yP=on(),bP=yP("map");gP({target:"Array",proto:!0,forced:!bP},{map:function(t){return _P(this,t,arguments.length>1?arguments[1]:void 0)}})});var wy=f((f3,by)=>{"use strict";yy();var wP=Ge();by.exports=wP("Array","map")});var xy=f((p3,Ey)=>{"use strict";var EP=Re(),xP=wy(),Jl=Array.prototype;Ey.exports=function(e){var t=e.map;return e===Jl||EP(Jl,e)&&t===Jl.map?xP:t}});var Sy=f((h3,Ay)=>{"use strict";var AP=xy();Ay.exports=AP});var Ty=f((m3,Iy)=>{Iy.exports=Sy()});var ky=f(Ry=>{"use strict";Ry.f=Object.getOwnPropertySymbols});var Ny=f((g3,Py)=>{"use strict";var Cy=Me(),SP=fe(),IP=ht(),TP=Y(),Vl=vl(),RP=ky(),kP=is(),CP=cr(),OP=co(),vr=Object.assign,Oy=Object.defineProperty,PP=SP([].concat);Py.exports=!vr||TP(function(){if(Cy&&vr({b:1},vr(Oy({},"a",{enumerable:!0,get:function(){Oy(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(o){t[o]=o}),vr({},e)[r]!==7||Vl(vr({},t)).join("")!==n})?function(t,r){for(var n=CP(t),o=arguments.length,i=1,a=RP.f,s=kP.f;o>i;)for(var l=OP(arguments[i++]),c=a?PP(Vl(l),a(l)):Vl(l),d=c.length,u=0,h;d>u;)h=c[u++],(!Cy||IP(s,l,h))&&(n[h]=l[h]);return n}:vr});var qy=f(()=>{"use strict";var NP=re(),Dy=Ny();NP({target:"Object",stat:!0,arity:2,forced:Object.assign!==Dy},{assign:Dy})});var Uy=f((b3,Ly)=>{"use strict";qy();var DP=mt();Ly.exports=DP.Object.assign});var Fy=f((w3,My)=>{"use strict";var qP=Uy();My.exports=qP});var By=f((E3,jy)=>{jy.exports=Fy()});var Gl=f((x3,$y)=>{"use strict";$y.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 Vy=f((A3,Jy)=>{"use strict";var LP=fe(),UP=ar(),MP=rl(),Wl=Gl(),Hy=LP("".replace),FP=RegExp("^["+Wl+"]+"),jP=RegExp("(^|[^"+Wl+"])["+Wl+"]+$"),Kl=function(e){return function(t){var r=MP(UP(t));return e&1&&(r=Hy(r,FP,"")),e&2&&(r=Hy(r,jP,"$1")),r}};Jy.exports={start:Kl(1),end:Kl(2),trim:Kl(3)}});var zy=f((S3,Wy)=>{"use strict";var BP=fl().PROPER,$P=Y(),Gy=Gl(),Ky="\u200B\x85\u180E";Wy.exports=function(e){return $P(function(){return!!Gy[e]()||Ky[e]()!==Ky||BP&&Gy[e].name!==e})}});var Yy=f(()=>{"use strict";var HP=re(),JP=Vy().trim,VP=zy();HP({target:"String",proto:!0,forced:VP("trim")},{trim:function(){return JP(this)}})});var Xy=f((R3,Qy)=>{"use strict";Yy();var GP=Ge();Qy.exports=GP("String","trim")});var eb=f((k3,Zy)=>{"use strict";var KP=Re(),WP=Xy(),zl=String.prototype;Zy.exports=function(e){var t=e.trim;return typeof e=="string"||e===zl||KP(zl,e)&&t===zl.trim?WP:t}});var rb=f((C3,tb)=>{"use strict";var zP=eb();tb.exports=zP});var ob=f((O3,nb)=>{nb.exports=rb()});function uc(e,t){oe.__h&&oe.__h(X,e,En||t),En=0;var r=X.__H||(X.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function yt(e){return En=1,YP(Ob,e)}function YP(e,t,r){var n=uc(wn++,2);if(n.t=e,!n.__c&&(n.__=[Ob(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],c=n.t(l,s);l!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=X,!X.__f)){var o=function(s,l,c){var d;if(!n.__c.__H)return!0;var u=(0,lc.default)(d=n.__c.__H.__).call(d,function(p){return!!p.__c});if((0,bb.default)(u).call(u,function(p){return!p.__N}))return!i||i.call(this,s,l,c);var h=n.__c.props!==s;return(0,Ae.default)(u).call(u,function(p){if(p.__N){var m=p.__[0];p.__=p.__N,p.__N=void 0,m!==p.__[0]&&(h=!0)}}),i&&i.call(this,s,l,c)||h};X.__f=!0;var i=X.shouldComponentUpdate,a=X.componentWillUpdate;X.componentWillUpdate=function(s,l,c){if(this.__e){var d=i;i=void 0,o(s,l,c),i=d}a&&a.call(this,s,l,c)},X.shouldComponentUpdate=o}return n.__N||n.__}function qt(e,t){var r=uc(wn++,3);!oe.__s&&Cb(r.__H,t)&&(r.__=e,r.u=t,X.__H.__h.push(r))}function ri(e){return En=5,kb(function(){return{current:e}},[])}function kb(e,t){var r=uc(wn++,7);return Cb(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function at(e,t){return En=8,kb(function(){return e},t)}function QP(){for(var e;e=Rb.shift();)if(e.__P&&e.__H)try{var t,r;(0,Ae.default)(t=e.__H.__h).call(t,Yo),(0,Ae.default)(r=e.__H.__h).call(r,nc),e.__H.__h=[]}catch(n){e.__H.__h=[],oe.__e(n,e.__v)}}function XP(e){var t,r=function(){clearTimeout(n),fb&&cancelAnimationFrame(t),(0,tc.default)(e)},n=(0,tc.default)(r,100);fb&&(t=requestAnimationFrame(r))}function Yo(e){var t=X,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),X=t}function nc(e){var t=X;e.__c=e.__(),X=t}function Cb(e,t){return!e||e.length!==t.length||(0,ei.default)(t).call(t,function(r,n){return r!==e[n]})}function Ob(e,t){return typeof t=="function"?t(e):t}function b(e,t,r,n,o,i){t||(t={});var a,s,l=t;if("ref"in l)for(s in l={},t)s=="ref"?a=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ZP,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return C.vnode&&C.vnode(c),c}function nN(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function oN(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}function uN(e,t){return ge(e,0)^45?(((t<<2^ge(e,0))<<2^ge(e,1))<<2^ge(e,2))<<2^ge(e,3):0}function Db(e){return(0,Tb.default)(e).call(e)}function dN(e,t){return(e=t.exec(e))?e[0]:e}function M(e,t,r){return e.replace(t,r)}function oc(e,t){return(0,cc.default)(e).call(e,t)}function ge(e,t){return e.charCodeAt(t)|0}function xn(e,t,r){return(0,Eb.default)(e).call(e,t,r)}function it(e){return e.length}function pc(e){return e.length}function zo(e,t){return t.push(e),e}function fN(e,t){return(0,Sb.default)(e).call(e,t).join("")}function si(e,t,r,n,o,i,a){return{value:e,root:t,parent:r,type:n,props:o,children:i,line:ai,column:yr,length:a,return:""}}function bn(e,t){return cN(si("",null,null,"",null,null,0),e,{length:-e.length},t)}function pN(){return ie}function hN(){return ie=Pe>0?ge(br,--Pe):0,yr--,ie===10&&(yr=1,ai--),ie}function je(){return ie=Pe<qb?ge(br,Pe++):0,yr++,ie===10&&(yr=1,ai++),ie}function st(){return ge(br,Pe)}function Qo(){return Pe}function Sn(e,t){return xn(br,e,t)}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 Lb(e){return ai=yr=1,qb=it(br=e),Pe=0,[]}function Ub(e){return br="",e}function Xo(e){return Db(Sn(Pe-1,ic(e===91?e+2:e===40?e+1:e)))}function mN(e){for(;(ie=st())&&ie<33;)je();return An(e)>2||An(ie)>3?"":" "}function vN(e,t){for(;--t&&je()&&!(ie<48||ie>102||ie>57&&ie<65||ie>70&&ie<97););return Sn(e,Qo()+(t<6&&st()==32&&je()==32))}function ic(e){for(;je();)switch(ie){case e:return Pe;case 34:case 39:e!==34&&e!==39&&ic(ie);break;case 40:e===41&&ic(e);break;case 92:je();break}return Pe}function gN(e,t){for(;je()&&e+ie!==57&&!(e+ie===84&&st()===47););return"/*"+Sn(t,Pe-1)+"*"+ii(e===47?e:je())}function _N(e){for(;!An(st());)je();return Sn(e,Pe)}function yN(e){return Ub(Zo("",null,null,null,[""],e=Lb(e),0,[0],e))}function Zo(e,t,r,n,o,i,a,s,l){for(var c=0,d=0,u=a,h=0,p=0,m=0,g=1,_=1,v=1,y=0,A="",k=o,O=i,I=n,w=A;_;)switch(m=y,y=je()){case 40:if(m!=108&&ge(w,u-1)==58){oc(w+=M(Xo(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:w+=Xo(y);break;case 9:case 10:case 13:case 32:w+=mN(m);break;case 92:w+=vN(Qo()-1,7);continue;case 47:switch(st()){case 42:case 47:zo(bN(gN(je(),Qo()),t,r),l);break;default:w+="/"}break;case 123*g:s[c++]=it(w)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:_=0;case 59+d:v==-1&&(w=M(w,/\f/g,"")),p>0&&it(w)-u&&zo(p>32?hb(w+";",n,r,u-1):hb(M(w," ","")+";",n,r,u-2),l);break;case 59:w+=";";default:if(zo(I=pb(w,t,r,c,d,o,s,A,k=[],O=[],u),i),y===123)if(d===0)Zo(w,t,I,I,k,i,u,s,O);else switch(h===99&&ge(w,3)===110?100:h){case 100:case 108:case 109:case 115:Zo(e,I,I,n&&zo(pb(e,I,I,0,0,o,s,A,o,k=[],u),O),o,O,u,s,n?k:O);break;default:Zo(w,I,I,I,[""],O,0,s,O)}}c=d=p=0,g=v=1,A=w="",u=a;break;case 58:u=1+it(w),p=m;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&hN()==125)continue}switch(w+=ii(y),y*g){case 38:v=d>0?1:(w+="\f",-1);break;case 44:s[c++]=(it(w)-1)*v,v=1;break;case 64:st()===45&&(w+=Xo(je())),h=st(),d=u=it(A=w+=_N(Qo())),y++;break;case 45:m===45&&it(w)==2&&(g=0)}}return i}function pb(e,t,r,n,o,i,a,s,l,c,d){for(var u=o-1,h=o===0?i:[""],p=pc(h),m=0,g=0,_=0;m<n;++m)for(var v=0,y=xn(e,u+1,u=lN(g=a[m])),A=e;v<p;++v)(A=Db(g>0?h[v]+" "+y:M(y,/&\f/g,h[v])))&&(l[_++]=A);return si(e,t,r,o===0?dc:s,l,c,d)}function bN(e,t,r){return si(e,t,r,Pb,ii(pN()),xn(e,2,-2),0)}function hb(e,t,r,n){return si(e,t,r,fc,xn(e,0,n),xn(e,n+1,-1),n)}function _r(e,t){for(var r="",n=pc(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function wN(e,t,r,n){switch(e.type){case sN:if(e.children.length)break;case aN:case fc:return e.return=e.return||e.value;case Pb:return"";case Nb:return e.return=e.value+"{"+_r(e.children,n)+"}";case dc:e.value=e.props.join(",")}return it(r=_r(e.children,n))?e.return=e.value+"{"+r+"}":""}function EN(e){var t=pc(e);return function(r,n,o,i){for(var a="",s=0;s<t;s++)a+=e[s](r,n,o,i)||"";return a}}function xN(e){return function(t){t.root||(t=t.return)&&e(t)}}function AN(e){var t=(0,Ab.default)(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}function Mb(e,t){switch(uN(e,t)){case 5103:return U+"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 U+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return U+e+ni+e+xe+e+e;case 6828:case 4268:return U+e+xe+e+e;case 6165:return U+e+xe+"flex-"+e+e;case 5187:return U+e+M(e,/(\w+).+(:[^]+)/,U+"box-$1$2"+xe+"flex-$1$2")+e;case 5443:return U+e+xe+"flex-item-"+M(e,/flex-|-self/,"")+e;case 4675:return U+e+xe+"flex-line-pack"+M(e,/align-content|flex-|-self/,"")+e;case 5548:return U+e+xe+M(e,"shrink","negative")+e;case 5292:return U+e+xe+M(e,"basis","preferred-size")+e;case 6060:return U+"box-"+M(e,"-grow","")+U+e+xe+M(e,"grow","positive")+e;case 4554:return U+M(e,/([^-])(transform)/g,"$1"+U+"$2")+e;case 6187:return M(M(M(e,/(zoom-|grab)/,U+"$1"),/(image-set)/,U+"$1"),e,"")+e;case 5495:case 3959:return M(e,/(image-set\([^]*)/,U+"$1$`$1");case 4968:return M(M(e,/(.+:)(flex-)?(.*)/,U+"box-pack:$3"+xe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+U+e+e;case 4095:case 3583:case 4068:case 2532:return M(e,/(.+)-inline(.+)/,U+"$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(it(e)-1-t>6)switch(ge(e,t+1)){case 109:if(ge(e,t+4)!==45)break;case 102:return M(e,/(.+:)(.+)-([^]+)/,"$1"+U+"$2-$3$1"+ni+(ge(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~oc(e,"stretch")?Mb(M(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ge(e,t+1)!==115)break;case 6444:switch(ge(e,it(e)-3-(~oc(e,"!important")&&10))){case 107:return M(e,":",":"+U)+e;case 101:return M(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+U+(ge(e,14)===45?"inline-":"")+"box$3$1"+U+"$2$3$1"+xe+"$2box$3")+e}break;case 5936:switch(ge(e,t+11)){case 114:return U+e+xe+M(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return U+e+xe+M(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return U+e+xe+M(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return U+e+xe+e+e}return e}function NN(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function oi(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return Lt={name:o.name,styles:o.styles,next:Lt},o.name;var i=r;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Lt={name:a.name,styles:a.styles,next:Lt},a=a.next;var s=i.styles+";";return s}return UN(e,t,r)}}var l=r;if(t==null)return l;var c=t[l];return c!==void 0?c:l}function UN(e,t,r){var n="";if((0,ti.default)(r))for(var o=0;o<r.length;o++)n+=oi(e,t,r[o])+";";else for(var i in r){var a=r[i];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?n+=i+"{"+t[s]+"}":vb(s)&&(n+=Xl(i)+":"+gb(i,s)+";")}else if((0,ti.default)(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)vb(a[l])&&(n+=Xl(i)+":"+gb(i,a[l])+";");else{var c=oi(e,t,a);switch(i){case"animation":case"animationName":{n+=Xl(i)+":"+c+";";break}default:n+=i+"{"+c+"}"}}}return n}function Zl(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";Lt=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,o+=oi(r,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=oi(r,t,e[s]),n){var l=i;o+=l[s]}_b.lastIndex=0;for(var c="",d;(d=_b.exec(o))!==null;)c+="-"+d[1];var u=NN(o)+c;return{name:u,styles:o,next:Lt}}function ac(e,t,r){var n,o="";return(0,Ae.default)(n=r.split(" ")).call(n,function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(o+=i+" ")}),o}function yb(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function ec(e,t,r){var n=[],o=ac(e,n,r);return n.length<2?r:o+t(n)}function hc(){let e=()=>typeof window>"u"?"portrait":window.matchMedia("(orientation: landscape)").matches?"landscape":"portrait",[t,r]=yt(e());return qt(()=>{let n=()=>{r(e())};return window.addEventListener("resize",n),"onorientationchange"in window&&window.addEventListener("orientationchange",n),n(),()=>{window.removeEventListener("resize",n),"onorientationchange"in window&&window.removeEventListener("orientationchange",n)}},[]),t}function GN(s){var l=s,{elementTag:e="Image",src:t="",children:r,handleExposure:n,className:o,imgStyle:i}=l,a=Ze(l,["elementTag","src","children","handleExposure","className","imgStyle"]);let c=VN(()=>{t&&n()});return e==="Image"?b("div",{className:o,style:{borderRadius:"8px"},children:nt("img",q(R({},a),{ref:c,src:t!=null?t:"",style:R({display:"block",width:"100%",height:"auto",objectFit:"cover",maxWidth:"100%",maxHeight:"100%",aspectRatio:"1 / 1",borderRadius:"8px"},i||{})}))}):b("div",q(R({},a),{ref:c,className:o,children:r}))}function KN(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?nt(o.type,q(R({},o.props),{style:q(R({},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?nt(e.type,q(R({},e.props),{style:q(R({},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 lc,bb,Ae,wb,ei,tc,Eb,ti,D3,rc,xb,cc,Ab,Sb,Ib,Tb,wn,X,Yl,ib,En,Rb,oe,ab,sb,lb,cb,ub,db,fb,ZP,Ql,eN,tN,rN,iN,xe,ni,U,Pb,dc,fc,aN,Nb,sN,lN,ii,cN,ai,yr,qb,Pe,ie,br,SN,IN,TN,mb,RN,kN,CN,ON,PN,DN,qN,LN,Fb,vb,Xl,gb,_b,Lt,MN,FN,jN,BN,$N,N,HN,JN,mc,VN,vc,gc,jb,WN,zN,YN,sc,QN,Bb,wr,_t,$b,gr,XN,ZN,eD,tD,rD,ne,nD,oD,Hb,Jb,Vb,Gb,iD,aD,Kb,li=T(()=>{"use strict";nr();lc=ue(eh(),1),bb=ue(uh(),1),Ae=ue(xh(),1),wb=ue(Mh(),1),ei=ue(Kh(),1),tc=ue(dm(),1);Xs();Eb=ue(Wm(),1),ti=ue(tv(),1),D3=ue(yv(),1),rc=ue(Dv(),1),xb=ue(ty(),1),cc=ue(dy(),1),Ab=ue(_y(),1),Sb=ue(Ty(),1),Ib=ue(By(),1),Tb=ue(ob(),1),En=0,Rb=[],oe=C,ab=oe.__b,sb=oe.__r,lb=oe.diffed,cb=oe.__c,ub=oe.unmount,db=oe.__;oe.__b=function(e){X=null,ab&&ab(e)},oe.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),db&&db(e,t)},oe.__r=function(e){var t,r,n;sb&&sb(e),wn=0;var o=(X=e.__c).__H;o&&(Yl===X?(o.__h=[],X.__h=[],(0,Ae.default)(t=o.__).call(t,function(i){i.__N&&(i.__=i.__N),i.u=i.__N=void 0})):((0,Ae.default)(r=o.__h).call(r,Yo),(0,Ae.default)(n=o.__h).call(n,nc),o.__h=[],wn=0)),Yl=X},oe.diffed=function(e){var t;lb&&lb(e);var r=e.__c;r&&r.__H&&(r.__H.__h.length&&(Rb.push(r)!==1&&ib===oe.requestAnimationFrame||((ib=oe.requestAnimationFrame)||XP)(QP)),(0,Ae.default)(t=r.__H.__).call(t,function(n){n.u&&(n.__H=n.u),n.u=void 0})),Yl=X=null},oe.__c=function(e,t){(0,ei.default)(t).call(t,function(r){try{var n,o;(0,Ae.default)(n=r.__h).call(n,Yo),r.__h=(0,lc.default)(o=r.__h).call(o,function(i){return!i.__||nc(i)})}catch(i){(0,ei.default)(t).call(t,function(a){a.__h&&(a.__h=[])}),t=[],oe.__e(i,r.__v)}}),cb&&cb(e,t)},oe.unmount=function(e){var t;ub&&ub(e);var r,n=e.__c;n&&n.__H&&((0,Ae.default)(t=n.__H.__).call(t,function(o){try{Yo(o)}catch(i){r=i}}),n.__H=void 0,r&&oe.__e(r,n.__v))};fb=typeof requestAnimationFrame=="function";ZP=0;Ql={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"}},eN=`
21
21
  @keyframes fadeIn {
22
22
  from { opacity: 0; }
23
23
  to { opacity: 1; }
@@ -53,7 +53,7 @@ var Zw=Object.create;var Vn=Object.defineProperty,eE=Object.defineProperties,tE=
53
53
  .drawer-leave {
54
54
  animation: slideDown 0.3s ease forwards;
55
55
  }
56
- `,tN=({children:e,isOpen:t=!1,onClose:r,height:n="50%",className:o="",backdropColor:i},a)=>{let[s,l]=yt(t),[c,d]=yt(null),u=ri(null),h=ri(!1);qt(()=>{let I=document.createElement("style");return I.innerHTML=eN,document.head.appendChild(I),()=>{document.head.removeChild(I)}},[]),qt(()=>{t!==s&&!h.current&&(l(t),d(t?"enter":"leave"),t?(document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%"):!t&&!h.current&&(document.body.style.overflow="",document.body.style.position="",document.body.style.width=""))},[t,s]),qt(()=>()=>{document.body.style.overflow="",document.body.style.position="",document.body.style.width=""},[]);let p=at(()=>{c==="leave"&&(d(null),l(!1),h.current=!1)},[c]),m=at(I=>{I.preventDefault(),I.stopPropagation(),I.target===u.current&&_()},[]),g=at(()=>{h.current=!1,l(!0),d("enter")},[]),_=at(()=>{h.current=!0,d("leave"),document.body.style.overflow="",document.body.style.position="",document.body.style.width="",r&&r()},[r]),v=at(()=>s&&!h.current,[s]);if(qt(()=>{if(a){let I={show:g,hide:_,isOpen:v};typeof a=="function"?a(I):a&&(a.current=I)}},[g,_,v,a]),!s&&!c)return null;let y=q(R({},Ql.drawer),{height:typeof n=="number"?`${n}px`:n,backgroundColor:i||"rgba(255, 255, 255, 1)"}),A=q(R({},Ql.drawerBackdrop),{pointerEvents:"auto"}),k=c?`drawer-${c}`:"",O=c?`backdrop-${c}`:"";return b("div",{ref:u,style:A,className:O,onClick:m,onTouchMove:I=>I.preventDefault(),onTouchStart:I=>I.stopPropagation(),onTouchEnd:I=>I.stopPropagation(),children:b("div",{style:y,className:`${k} ${o}`,onAnimationEnd:p,onClick:I=>I.stopPropagation(),onTouchMove:I=>{I.stopPropagation()},onTouchStart:I=>I.stopPropagation(),onTouchEnd:I=>I.stopPropagation(),children:b("div",{style:q(R({},Ql.drawerContent),{pointerEvents:"auto"}),onTouchMove:I=>I.stopPropagation(),onClick:I=>I.stopPropagation(),children:e})})})},rN=Om(tN);iN=function(){function e(r){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=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){(0,Ae.default)(r).call(r,this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(oN(this));var n=this.tags[this.tags.length-1];if(this.isSpeedy){var o=nN(n);try{o.insertRule(r,o.cssRules.length)}catch(i){}}else n.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){var r;(0,Ae.default)(r=this.tags).call(r,function(n){var o;return(o=n.parentNode)==null?void 0:o.removeChild(n)}),this.tags=[],this.ctr=0},e}(),xe="-ms-",ni="-moz-",U="-webkit-",Pb="comm",dc="rule",fc="decl",aN="@import",Nb="@keyframes",sN="@layer",lN=Math.abs,ii=String.fromCharCode,cN=Ib.default;ai=1,yr=1,qb=0,Pe=0,ie=0,br="";SN=function(e,t,r){for(var n=0,o=0;n=o,o=st(),n===38&&o===12&&(t[r]=1),!An(o);)Fe();return Sn(e,Pe)},IN=function(e,t){var r=-1,n=44;do switch(An(n)){case 0:n===38&&st()===12&&(t[r]=1),e[r]+=SN(Pe-1,t,r);break;case 2:e[r]+=Xo(n);break;case 4:if(n===44){e[++r]=st()===58?"&\f":"",t[r]=e[r].length;break}default:e[r]+=ii(n)}while(n=Fe());return e},TN=function(e,t){return Ub(IN(Lb(e),t))},mb=new xb.default,RN=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!mb.get(r))&&!n){mb.set(e,!0);for(var o=[],i=TN(t,o),a=r.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},kN=function(e){if(e.type==="decl"){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return="",e.value="")}};CN=function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case fc:e.return=Mb(e.value,e.length);break;case Nb:return _r([bn(e,{value:M(e.value,"@","@"+U)})],n);case dc:if(e.length)return fN(e.props,function(o){switch(dN(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return _r([bn(e,{props:[M(o,/:(read-\w+)/,":"+ni+"$1")]})],n);case"::placeholder":return _r([bn(e,{props:[M(o,/:(plac\w+)/,":"+U+"input-$1")]}),bn(e,{props:[M(o,/:(plac\w+)/,":"+ni+"$1")]}),bn(e,{props:[M(o,/:(plac\w+)/,xe+"input-$1")]})],n)}return""})}},ON=[CN],PN=function(e){var t=e.key;if(t==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");(0,Ae.default)(Array.prototype).call(r,function(m){var g=m.getAttribute("data-emotion");(0,cc.default)(g).call(g," ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var n=e.stylisPlugins||ON,o={},i,a=[];i=e.container||document.head,(0,Ae.default)(Array.prototype).call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(m){for(var g=m.getAttribute("data-emotion").split(" "),_=1;_<g.length;_++)o[g[_]]=!0;a.push(m)});var s,l=[RN,kN];{var c,d=[wN,xN(function(m){c.insert(m)})],u=EN((0,wb.default)(l).call(l,n,d)),h=function(m){return _r(yN(m),u)};s=function(m,g,_,v){c=_,h(m?m+"{"+g.styles+"}":g.styles),v&&(p.inserted[g.name]=!0)}}var p={key:t,sheet:new iN({key:t,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:s};return p.sheet.hydrate(a),p};DN={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},qN=/[A-Z]|^ms/g,LN=/_EMO_([^_]+?)_([^]*?)_EMO_/g,jb=function(e){return e.charCodeAt(1)===45},vb=function(e){return e!=null&&typeof e!="boolean"},Xl=AN(function(e){return jb(e)?e:e.replace(qN,"-$&").toLowerCase()}),gb=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(LN,function(r,n,o){return Lt={name:n,styles:o,next:Lt},n})}return DN[e]!==1&&!jb(e)&&typeof t=="number"&&t!==0?t+"px":t};_b=/label:\s*([^\s;{]+)\s*(;|$)/g;MN=function(e,t,r){var n=e.key+"-"+t.name;e.registered[n]===void 0&&(e.registered[n]=t.styles)},jN=function(e,t,r){MN(e,t);var n=e.key+"-"+t.name;if(e.inserted[t.name]===void 0){var o=t;do e.insert(t===o?"."+n:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};FN=function(e){var t=PN(e);t.sheet.speedy=function(a){this.isSpeedy=a},t.compat=!0;var r=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Zl(s,t.registered,void 0);return jN(t,c),t.key+"-"+c.name},n=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Zl(s,t.registered),d="animation-"+c.name;return yb(t,{name:c.name,styles:"@keyframes "+d+"{"+c.styles+"}"}),d},o=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Zl(s,t.registered);yb(t,c)},i=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return ec(t.registered,r,BN(s))};return{css:r,cx:i,injectGlobal:o,keyframes:n,hydrate:function(a){(0,Ae.default)(a).call(a,function(s){t.inserted[s]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:(0,rc.default)(ac).call(ac,null,t.registered),merge:(0,rc.default)(ec).call(ec,null,t.registered,r)}},BN=function e(t){for(var r="",n=0;n<t.length;n++){var o=t[n];if(o!=null){var i=void 0;switch(typeof o){case"boolean":break;case"object":{if((0,ti.default)(o))i=e(o);else{i="";for(var a in o)o[a]&&a&&(i&&(i+=" "),i+=a)}break}default:i=o}i&&(r&&(r+=" "),r+=i)}}return r},$N=FN({key:"css"}),N=$N.css;HN=({title:e,content:t,noHeader:r,height:n,padding:o="16px",footerButtons:i,onClose:a})=>{let s=hc(),l={container:N`
56
+ `,tN=({children:e,isOpen:t=!1,onClose:r,height:n="50%",className:o="",backdropColor:i},a)=>{let[s,l]=yt(t),[c,d]=yt(null),u=ri(null),h=ri(!1);qt(()=>{let I=document.createElement("style");return I.innerHTML=eN,document.head.appendChild(I),()=>{document.head.removeChild(I)}},[]),qt(()=>{t!==s&&!h.current&&(l(t),d(t?"enter":"leave"),t?(document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%"):!t&&!h.current&&(document.body.style.overflow="",document.body.style.position="",document.body.style.width=""))},[t,s]),qt(()=>()=>{document.body.style.overflow="",document.body.style.position="",document.body.style.width=""},[]);let p=at(()=>{c==="leave"&&(d(null),l(!1),h.current=!1)},[c]),m=at(I=>{I.preventDefault(),I.stopPropagation(),I.target===u.current&&_()},[]),g=at(()=>{h.current=!1,l(!0),d("enter")},[]),_=at(()=>{h.current=!0,d("leave"),document.body.style.overflow="",document.body.style.position="",document.body.style.width="",r&&r()},[r]),v=at(()=>s&&!h.current,[s]);if(qt(()=>{if(a){let I={show:g,hide:_,isOpen:v};typeof a=="function"?a(I):a&&(a.current=I)}},[g,_,v,a]),!s&&!c)return null;let y=q(R({},Ql.drawer),{height:typeof n=="number"?`${n}px`:n,backgroundColor:i||"rgba(255, 255, 255, 1)"}),A=q(R({},Ql.drawerBackdrop),{pointerEvents:"auto"}),k=c?`drawer-${c}`:"",O=c?`backdrop-${c}`:"";return b("div",{ref:u,style:A,className:O,onClick:m,onTouchMove:I=>I.preventDefault(),onTouchStart:I=>I.stopPropagation(),onTouchEnd:I=>I.stopPropagation(),children:b("div",{style:y,className:`${k} ${o}`,onAnimationEnd:p,onClick:I=>I.stopPropagation(),onTouchMove:I=>{I.stopPropagation()},onTouchStart:I=>I.stopPropagation(),onTouchEnd:I=>I.stopPropagation(),children:b("div",{style:q(R({},Ql.drawerContent),{pointerEvents:"auto"}),onTouchMove:I=>I.stopPropagation(),onClick:I=>I.stopPropagation(),children:e})})})},rN=Om(tN);iN=function(){function e(r){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=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){(0,Ae.default)(r).call(r,this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(oN(this));var n=this.tags[this.tags.length-1];if(this.isSpeedy){var o=nN(n);try{o.insertRule(r,o.cssRules.length)}catch(i){}}else n.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){var r;(0,Ae.default)(r=this.tags).call(r,function(n){var o;return(o=n.parentNode)==null?void 0:o.removeChild(n)}),this.tags=[],this.ctr=0},e}(),xe="-ms-",ni="-moz-",U="-webkit-",Pb="comm",dc="rule",fc="decl",aN="@import",Nb="@keyframes",sN="@layer",lN=Math.abs,ii=String.fromCharCode,cN=Ib.default;ai=1,yr=1,qb=0,Pe=0,ie=0,br="";SN=function(e,t,r){for(var n=0,o=0;n=o,o=st(),n===38&&o===12&&(t[r]=1),!An(o);)je();return Sn(e,Pe)},IN=function(e,t){var r=-1,n=44;do switch(An(n)){case 0:n===38&&st()===12&&(t[r]=1),e[r]+=SN(Pe-1,t,r);break;case 2:e[r]+=Xo(n);break;case 4:if(n===44){e[++r]=st()===58?"&\f":"",t[r]=e[r].length;break}default:e[r]+=ii(n)}while(n=je());return e},TN=function(e,t){return Ub(IN(Lb(e),t))},mb=new xb.default,RN=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!mb.get(r))&&!n){mb.set(e,!0);for(var o=[],i=TN(t,o),a=r.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},kN=function(e){if(e.type==="decl"){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return="",e.value="")}};CN=function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case fc:e.return=Mb(e.value,e.length);break;case Nb:return _r([bn(e,{value:M(e.value,"@","@"+U)})],n);case dc:if(e.length)return fN(e.props,function(o){switch(dN(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return _r([bn(e,{props:[M(o,/:(read-\w+)/,":"+ni+"$1")]})],n);case"::placeholder":return _r([bn(e,{props:[M(o,/:(plac\w+)/,":"+U+"input-$1")]}),bn(e,{props:[M(o,/:(plac\w+)/,":"+ni+"$1")]}),bn(e,{props:[M(o,/:(plac\w+)/,xe+"input-$1")]})],n)}return""})}},ON=[CN],PN=function(e){var t=e.key;if(t==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");(0,Ae.default)(Array.prototype).call(r,function(m){var g=m.getAttribute("data-emotion");(0,cc.default)(g).call(g," ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var n=e.stylisPlugins||ON,o={},i,a=[];i=e.container||document.head,(0,Ae.default)(Array.prototype).call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(m){for(var g=m.getAttribute("data-emotion").split(" "),_=1;_<g.length;_++)o[g[_]]=!0;a.push(m)});var s,l=[RN,kN];{var c,d=[wN,xN(function(m){c.insert(m)})],u=EN((0,wb.default)(l).call(l,n,d)),h=function(m){return _r(yN(m),u)};s=function(m,g,_,v){c=_,h(m?m+"{"+g.styles+"}":g.styles),v&&(p.inserted[g.name]=!0)}}var p={key:t,sheet:new iN({key:t,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:s};return p.sheet.hydrate(a),p};DN={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},qN=/[A-Z]|^ms/g,LN=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Fb=function(e){return e.charCodeAt(1)===45},vb=function(e){return e!=null&&typeof e!="boolean"},Xl=AN(function(e){return Fb(e)?e:e.replace(qN,"-$&").toLowerCase()}),gb=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(LN,function(r,n,o){return Lt={name:n,styles:o,next:Lt},n})}return DN[e]!==1&&!Fb(e)&&typeof t=="number"&&t!==0?t+"px":t};_b=/label:\s*([^\s;{]+)\s*(;|$)/g;MN=function(e,t,r){var n=e.key+"-"+t.name;e.registered[n]===void 0&&(e.registered[n]=t.styles)},FN=function(e,t,r){MN(e,t);var n=e.key+"-"+t.name;if(e.inserted[t.name]===void 0){var o=t;do e.insert(t===o?"."+n:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};jN=function(e){var t=PN(e);t.sheet.speedy=function(a){this.isSpeedy=a},t.compat=!0;var r=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Zl(s,t.registered,void 0);return FN(t,c),t.key+"-"+c.name},n=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Zl(s,t.registered),d="animation-"+c.name;return yb(t,{name:c.name,styles:"@keyframes "+d+"{"+c.styles+"}"}),d},o=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Zl(s,t.registered);yb(t,c)},i=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return ec(t.registered,r,BN(s))};return{css:r,cx:i,injectGlobal:o,keyframes:n,hydrate:function(a){(0,Ae.default)(a).call(a,function(s){t.inserted[s]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:(0,rc.default)(ac).call(ac,null,t.registered),merge:(0,rc.default)(ec).call(ec,null,t.registered,r)}},BN=function e(t){for(var r="",n=0;n<t.length;n++){var o=t[n];if(o!=null){var i=void 0;switch(typeof o){case"boolean":break;case"object":{if((0,ti.default)(o))i=e(o);else{i="";for(var a in o)o[a]&&a&&(i&&(i+=" "),i+=a)}break}default:i=o}i&&(r&&(r+=" "),r+=i)}}return r},$N=jN({key:"css"}),N=$N.css;HN=({title:e,content:t,noHeader:r,height:n,padding:o="16px",footerButtons:i,onClose:a})=>{let s=hc(),l={container:N`
57
57
  display: flex;
58
58
  flex-direction: column;
59
59
  height: 100%;
@@ -90,7 +90,7 @@ var Zw=Object.create;var Vn=Object.defineProperty,eE=Object.defineProperties,tE=
90
90
  ${l.button}
91
91
  background-color: ${c.variant==="primary"?"#1677ff":"#fff"};
92
92
  color: ${c.variant==="primary"?"#fff":"#333"};
93
- `,onClick:u=>{var h;return(h=c.onClick)==null?void 0:h.call(c,u,{hide:a})},children:c.text},d))})]})},JN=()=>{let e=document.createElement("div");return e.id=`jolibox-ui-modal-container-${Math.random().toString(36).substring(2,15)}`,e.style.position="absolute",e.style.zIndex=`${1e3+document.querySelectorAll('[id^="jolibox-ui-modal-container-"]').length}`,document.body.appendChild(e),e},mc=e=>{let t=JN(),r=null,n=!1,o=!1,i=()=>{o||(n=!1,e.onClose&&e.onClose(),s(),setTimeout(()=>{o||t.remove()},300))},a=()=>window.innerWidth>window.innerHeight,s=()=>{var c;rr(b(rN,{ref:d=>{r=d},isOpen:n,onClose:i,height:a()?"60vh":(c=e.height)!=null?c:"50vh",backdropColor:e.backdropColor,children:b(HN,q(R({},e),{onClose:i}))}),t)},l=()=>{!o&&n&&s()};return window.addEventListener("resize",l),s(),{show:()=>{o||(n=!0,s(),setTimeout(()=>{r&&(r.show(),e.onOpen&&e.onOpen())},0))},hide:()=>{o||r&&r.hide()},isOpen:()=>n,destroy:()=>{o=!0,t.remove()}}},VN=(e,t={threshold:.6})=>{let r=ri(null),n=ri(!1),o=at(i=>{let[a]=i;a.isIntersecting&&!n.current?(n.current=!0,e()):a.isIntersecting||(n.current=!1)},[e]);return qt(()=>{if(r.current){let i=new IntersectionObserver(o,t);return i.observe(r.current),()=>{r.current&&i.unobserve(r.current)}}},[o,t]),r};vc=i=>{var a=i,{children:e,fluid:t=!1,className:r="",style:n={}}=a,o=Ze(a,["children","fluid","className","style"]);let s=R({width:"100%",marginLeft:"auto",marginRight:"auto",paddingLeft:"15px",paddingRight:"15px",boxSizing:"border-box",maxWidth:t?"100%":void 0},n);return b("div",q(R({className:r,style:s},o),{children:e}))},gc=s=>{var l=s,{children:e,gutter:t=0,justify:r="start",align:n="top",className:o="",style:i={}}=l,a=Ze(l,["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"},u=R({display:"flex",flexWrap:"wrap",boxSizing:"border-box",justifyContent:c[r],alignItems:d[n]},i);if(t){let p=Array.isArray(t)?t[0]:t,m=Array.isArray(t)?t[1]:0;p>0&&(u.marginLeft=`-${p/2}px`,u.marginRight=`-${p/2}px`),m>0&&(u.marginTop=`-${m/2}px`,u.marginBottom=`-${m/2}px`)}let h=t?KN(e,t):e;return b("div",q(R({className:o,style:u},a),{children:h}))};Fb=u=>{var h=u,{children:e,span:t,offset:r,xs:n,sm:o,md:i,lg:a,xl:s,className:l="",style:c={}}=h,d=Ze(h,["children","span","offset","xs","sm","md","lg","xl","className","style"]);let p=R({position:"relative",width:"100%",paddingLeft:"15px",paddingRight:"15px",boxSizing:"border-box"},c);if(t!==void 0){let m=t/24*100;p.flex=`0 0 ${m}%`,p.maxWidth=`${m}%`}return r!==void 0&&(p.marginLeft=`${r/24*100}%`),b("div",q(R({className:l,style:p},d),{children:e}))},WN=({game:e,layerName:t,orientation:r,routeMode:n,onGameClick:o})=>{var s,l;let i=So(c=>{c.preventDefault(),o==null||o(e)},[o,e]),a=So(()=>{},[e,t]);return b(Fb,{span:r==="landscape"?4:8,className:"relative px-[4px] box-border mb-[8px]",style:{marginBottom:r==="landscape"?"8px":"16px"},onClick:i,role:"button",tabIndex:0,onTouchEnd:i,children:[b("div",{className:"relative w-full mb-[2px] ion-no-margin",children:b(GN,{src:(l=(s=e.logo)!=null?s:e.cover)!=null?l:"",className:"w-full h-full absolute top-0 left-0 aspect-square rounded-[8px] object-cover",style:{display:"block",objectFit:"cover"},handleExposure:a})}),b("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:r==="landscape"?"13px":"15px",lineHeight:1.2,fontWeight:"normal",marginTop:"6px",fontFamily:"PingFangSC-Regular"},children:e.name})]},e.gameId)},zN=a=>{var s=a,{list:e,routeMode:t,layerName:r,onGameClick:n,orientation:o}=s,i=Ze(s,["list","routeMode","layerName","onGameClick","orientation"]);return b(vc,{className:"w-full mx-auto flex-grow overflow-y-auto",style:{maxWidth:o==="landscape"?"100%":"440px"},children:b(gc,{gutter:8,className:N`
93
+ `,onClick:u=>{var h;return(h=c.onClick)==null?void 0:h.call(c,u,{hide:a})},children:c.text},d))})]})},JN=()=>{let e=document.createElement("div");return e.id=`jolibox-ui-modal-container-${Math.random().toString(36).substring(2,15)}`,e.style.position="absolute",e.style.zIndex=`${1e3+document.querySelectorAll('[id^="jolibox-ui-modal-container-"]').length}`,document.body.appendChild(e),e},mc=e=>{let t=JN(),r=null,n=!1,o=!1,i=()=>{o||(n=!1,e.onClose&&e.onClose(),s(),setTimeout(()=>{o||t.remove()},300))},a=()=>window.innerWidth>window.innerHeight,s=()=>{var c;rr(b(rN,{ref:d=>{r=d},isOpen:n,onClose:i,height:a()?"60vh":(c=e.height)!=null?c:"50vh",backdropColor:e.backdropColor,children:b(HN,q(R({},e),{onClose:i}))}),t)},l=()=>{!o&&n&&s()};return window.addEventListener("resize",l),s(),{show:()=>{o||(n=!0,s(),setTimeout(()=>{r&&(r.show(),e.onOpen&&e.onOpen())},0))},hide:()=>{o||r&&r.hide()},isOpen:()=>n,destroy:()=>{o=!0,t.remove()}}},VN=(e,t={threshold:.6})=>{let r=ri(null),n=ri(!1),o=at(i=>{let[a]=i;a.isIntersecting&&!n.current?(n.current=!0,e()):a.isIntersecting||(n.current=!1)},[e]);return qt(()=>{if(r.current){let i=new IntersectionObserver(o,t);return i.observe(r.current),()=>{r.current&&i.unobserve(r.current)}}},[o,t]),r};vc=i=>{var a=i,{children:e,fluid:t=!1,className:r="",style:n={}}=a,o=Ze(a,["children","fluid","className","style"]);let s=R({width:"100%",marginLeft:"auto",marginRight:"auto",paddingLeft:"15px",paddingRight:"15px",boxSizing:"border-box",maxWidth:t?"100%":void 0},n);return b("div",q(R({className:r,style:s},o),{children:e}))},gc=s=>{var l=s,{children:e,gutter:t=0,justify:r="start",align:n="top",className:o="",style:i={}}=l,a=Ze(l,["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"},u=R({display:"flex",flexWrap:"wrap",boxSizing:"border-box",justifyContent:c[r],alignItems:d[n]},i);if(t){let p=Array.isArray(t)?t[0]:t,m=Array.isArray(t)?t[1]:0;p>0&&(u.marginLeft=`-${p/2}px`,u.marginRight=`-${p/2}px`),m>0&&(u.marginTop=`-${m/2}px`,u.marginBottom=`-${m/2}px`)}let h=t?KN(e,t):e;return b("div",q(R({className:o,style:u},a),{children:h}))};jb=u=>{var h=u,{children:e,span:t,offset:r,xs:n,sm:o,md:i,lg:a,xl:s,className:l="",style:c={}}=h,d=Ze(h,["children","span","offset","xs","sm","md","lg","xl","className","style"]);let p=R({position:"relative",width:"100%",paddingLeft:"15px",paddingRight:"15px",boxSizing:"border-box"},c);if(t!==void 0){let m=t/24*100;p.flex=`0 0 ${m}%`,p.maxWidth=`${m}%`}return r!==void 0&&(p.marginLeft=`${r/24*100}%`),b("div",q(R({className:l,style:p},d),{children:e}))},WN=({game:e,layerName:t,orientation:r,routeMode:n,onGameClick:o})=>{var s,l;let i=So(c=>{c.preventDefault(),o==null||o(e)},[o,e]),a=So(()=>{},[e,t]);return b(jb,{span:r==="landscape"?4:8,className:"relative px-[4px] box-border mb-[8px]",style:{marginBottom:r==="landscape"?"8px":"16px"},onClick:i,role:"button",tabIndex:0,onTouchEnd:i,children:[b("div",{className:"relative w-full mb-[2px] ion-no-margin",children:b(GN,{src:(l=(s=e.logo)!=null?s:e.cover)!=null?l:"",className:"w-full h-full absolute top-0 left-0 aspect-square rounded-[8px] object-cover",style:{display:"block",objectFit:"cover"},handleExposure:a})}),b("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:r==="landscape"?"13px":"15px",lineHeight:1.2,fontWeight:"normal",marginTop:"6px",fontFamily:"PingFangSC-Regular"},children:e.name})]},e.gameId)},zN=a=>{var s=a,{list:e,routeMode:t,layerName:r,onGameClick:n,orientation:o}=s,i=Ze(s,["list","routeMode","layerName","onGameClick","orientation"]);return b(vc,{className:"w-full mx-auto flex-grow overflow-y-auto",style:{maxWidth:o==="landscape"?"100%":"440px"},children:b(gc,{gutter:8,className:N`
94
94
  display: flex;
95
95
  flex-wrap: ${o==="landscape"?"nowrap":"wrap"};
96
96
  overflow-x: ${o==="landscape"?"auto":"visible"};
@@ -275,7 +275,7 @@ var Zw=Object.create;var Vn=Object.defineProperty,eE=Object.defineProperties,tE=
275
275
  `,eD=e=>b("div",{className:XN,children:b("div",{className:ZN,children:b("div",{className:`${gr.card} ${e.option.id===e.selectedId?gr.selectedCard:""}`,onClick:()=>e.handleSelect(e.option),children:[b("div",{className:gr.coinContainer,children:[b("img",{src:wr,alt:"Coin",className:gr.coinIcon}),b("span",{className:gr.coinValue,children:e.option.coins})]}),b("div",{className:gr.price,children:e.option.price})]})})}),tD=({options:e,defaultSelectedId:t,onSelect:r})=>{let[n,o]=yt(t!=null?t:""),i=a=>{o(a.id),r==null||r(a)};return b(vc,{className:"w-full mx-auto flex-grow overflow-y-auto",style:{padding:"0px"},children:b(gc,{gutter:[10,10],className:N`
276
276
  display: flex;
277
277
  flex-wrap: wrap;
278
- `,children:e.map(a=>b(Fb,{span:8,children:b(eD,{option:a,selectedId:n,coinImageSrc:wr,handleSelect:i})},a.id))})})},rD=Qs(tD),ne={modal:N`
278
+ `,children:e.map(a=>b(jb,{span:8,children:b(eD,{option:a,selectedId:n,coinImageSrc:wr,handleSelect:i})},a.id))})})},rD=Qs(tD),ne={modal:N`
279
279
  font-family: PingFangSC-Regular;
280
280
  background-color: #1a1a1a;
281
281
  color: white;
@@ -416,9 +416,9 @@ var Zw=Object.create;var Vn=Object.defineProperty,eE=Object.defineProperties,tE=
416
416
  transform: ${o?"translate(-50%, 0)":"translate(-50%, -20px)"};
417
417
  text-align: center;
418
418
  word-wrap: break-word;
419
- `;return b("div",{className:`toast toast-${t} ${o?"toast-visible":"toast-hidden"} ${a}`,children:e})},Kb=(e,t)=>{let r=document.createElement("div");document.body.appendChild(r);let n=()=>{document.body.removeChild(r)},o=iD(e,t);rr(b(aD,{message:o,type:t==null?void 0:t.type,duration:t==null?void 0:t.duration,onClose:n}),r)}});function Wb(){return x(this,null,function*(){if(_c)return _c;let t=`${S.testMode?"https://stg-game.jolibox.com":"https://game.jolibox.com"}/api/user-retention/exit-recommendations?objectId=${S.mpId}&from=GAME_DETAIL`,{response:{data:r}}=yield Ee(t);return _c=r,r})}function zb(){return x(this,null,function*(){let e=new Tt;if(S.mpType!=="game")return e.resolve(!1),e.promise;let t=yield Wb();if(t.code!=="SUCCESS")return e.resolve(!1),e.promise;let{gameListInfo:r,title:n,buttons:o}=t.data,i=Bb({games:r.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?sD(a.data.game):e.resolve(!0),i.hide();break;default:e.resolve(!0);break}}});return e.promise})}var _c,sD,Yb=T(()=>{"use strict";ee();Ie();D();li();Ht();_c=null;Wb();sD=e=>{var a;let{data:t}=L("envSync"),r=new URL(t.schema),n=new URLSearchParams(r.search);n.set("gameId",e.gameId),n.set("joliSource",S.encodeJoliSourceQuery({__mpType:"game",__orientation:(a=e.orientation)!=null?a:"VERTICAL"}));let i=`${`https://${e.gameId}.content.jolibox.com/`}index.html?${n.toString()}`;L("openSchemaSync",{schema:i})}});function cD(e){let t=R(R({},lD),e),{url:r,height:n,showCloseButton:o,enableDragClose:i,useAnimation:a,onClose:s,onLoad:l}=t,c=0,d=0,u=!1,h=()=>a?{overlayTransition:"opacity 0.3s ease",containerTransition:"transform 0.3s ease",iframeTransition:"opacity 0.3s ease"}:{overlayTransition:"none",containerTransition:"none",iframeTransition:"none"},p=()=>a?300:0;function m(){let{overlayTransition:y,containerTransition:A,iframeTransition:k}=h();V=document.createElement("div"),V.id="jolibox-modal-overlay",V.style.cssText=`position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.5); z-index:1000; display:flex; justify-content:center; align-items:flex-end; transition:${y}; opacity:0; visibility:hidden;`,$=document.createElement("div"),$.id="jolibox-modal-container",$.style.cssText=`width:100%; height:${n}; background:white; border-radius:12px 12px 0 0; overflow:hidden; box-shadow:0 -2px 10px rgba(0,0,0,0.2); transform:translateY(100%); transition:${A};`;let O=document.createElement("div");O.id="jolibox-modal-loading",O.style.cssText="position:absolute; top:50%; left:50%; transform:translate(-50%, -50%); width:40px; height:40px; border:4px solid #f3f3f3; border-top:4px solid #3498db; border-radius:50%; animation:spin 1s linear infinite;";let I=document.createElement("style");I.textContent="@keyframes spin { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } }",document.head.appendChild(I);let w=document.createElement("div");if(w.style.cssText="width:100%; height:100%; display:flex; flex-direction:column; padding-bottom:env(safe-area-inset-bottom, 0); position:relative;",Ke=document.createElement("iframe"),Ke.style.cssText=`width:100%; flex:1; border:none; opacity:0; transition:${k};`,Ke.src=r,Ke.onload=()=>{O.parentNode&&O.parentNode.removeChild(O),Ke.style.opacity="1",g(),l==null||l(),de.emit("onModalIframeLoaded",{url:r})},w.appendChild(Ke),w.appendChild(O),$.appendChild(w),o){let B=document.createElement("div");B.style.cssText="position:absolute; top:10px; right:10px; width:30px; height:30px; background:rgba(0,0,0,0.1); border-radius:15px; display:flex; justify-content:center; align-items:center; cursor:pointer; z-index:10;",B.innerHTML="\u2715",B.onclick=v,$.appendChild(B)}V.appendChild($),document.body.appendChild(V),V.addEventListener("click",function(B){B.target===V&&v()}),i&&_()}function g(){!V||!$||u||(V.style.visibility="visible",a?requestAnimationFrame(()=>{V&&(V.style.opacity="1"),$&&($.style.transform="translateY(0)"),u=!0}):(V&&(V.style.opacity="1"),$&&($.style.transform="translateY(0)"),u=!0),L("updateContainerConfigSync",{displayCapsuleButton:!1,webviewId:S.webviewId}))}function _(){if(!$)return;let y=O=>{c=O.touches[0].clientY},A=O=>{if(!u)return;d=O.touches[0].clientY;let I=d-c;I>0&&($&&($.style.transition="none",$.style.transform=`translateY(${I}px)`),O.preventDefault())},k=()=>{!u||!$||($.style.transition=a?"transform 0.3s ease":"none",d-c>80?v():$.style.transform="translateY(0)")};$.addEventListener("touchstart",y),$.addEventListener("touchmove",A),$.addEventListener("touchend",k)}function v(){!V||!$||!u||(a?($.style.transform="translateY(100%)",V.style.opacity="0"):V.style.visibility="hidden",u=!1,L("updateContainerConfigSync",{displayCapsuleButton:!0,webviewId:S.webviewId}),setTimeout(()=>{V&&(V.remove(),V=null,$=null,Ke=null,s==null||s(),de.emit("onModalIframeClosed",{url:r}))},p()))}return m(),{close:v}}function Qb(){return window.joliboxUI=q(R({},window.joliboxUI),{createIframeModal:cD}),()=>{window.joliboxUI=void 0,V&&V.parentNode&&V.parentNode.removeChild(V),$&&$.parentNode&&$.parentNode.removeChild($),Ke&&Ke.parentNode&&Ke.parentNode.removeChild(Ke),V=null,$=null,Ke=null}}var lD,V,$,Ke,Xb=T(()=>{"use strict";Ie();ee();D();lD={height:"50%",showCloseButton:!0,enableDragClose:!0,useAnimation:!0},V=null,$=null,Ke=null});var e0={};fu(e0,{config:()=>bD});function dD(){no.on("isAdShowing",e=>{di=e,$r(di)&&L("updateContainerConfigSync",{displayCapsuleButton:!di,webviewId:S.webviewId})})}function fD(){de.on("onInterceptSystemExit",({intercept:e})=>{Zb=e})}function pD(){de.on("onInterceptBackPress",({intercept:e})=>{uD=e}),Ve("onBeforeBackPress",({uuid:e})=>{var t,r;de.emit("onBackPress",{}),(r=(t=globalThis.joliboxJSCore)==null?void 0:t.doBackPress)==null||r.call(t,e)})}function hD(){de.on("onDocumentReady",()=>{var e;(e=globalThis.joliboxJSCore)==null||e.onDocumentReady(window.location.href),Le("onDocumentReady",{start_timestamp:pi,timestamp:Date.now()})})}function mD(){Ve("onI18nChanged",({language:e})=>{de.emit("onI18nChanged",{i18n:e})})}function vD(e){S.mpType==="game"&&Oe.start(e)}function gD(){Ve("onJoliboxServiceReady",({runtimeInfo:e,loadDuration:t})=>{e&&S.onEnvConfigChanged({hostUserInfo:e}),de.emit("LifecycleEvent.onReady",R({},S.hostUserInfo?S.hostUserInfo:{isLogin:!1})),Le("joliboxServiceReady",{start_timestamp:pi,timestamp:Date.now()}),vD(t)}),Ve("onBeforeExit",({uuid:e})=>{var t;(t=globalThis.joliboxJSCore)==null||t.doExit(e)})}function _D(){let e=()=>{Le("onBeforeExit",{timestamp:Date.now()}),ci==null||ci(),ui==null||ui(),Oe.close(Date.now()-pi)},t=()=>di||Zb;Je.onDoExit(()=>x(this,null,function*(){return t()?!0:$r(S.shouldInterupt)?(S.shouldInterupt||e(),S.shouldInterupt):fi!=null&&fi.canShowRecommended&&(yield zb())?!0:(e(),!1)})),Je.onDoBackPress(()=>x(this,null,function*(){return!!t()}))}function yD(){return x(this,null,function*(){let e=`${S.baseApiHost}/api/fe-configs/js-sdk/basic-meta`,{response:{data:t}}=yield Ee(e);t&&(fi=t)})}function bD(){pi=Date.now(),gD(),dD(),fD(),pD(),_D(),hD(),mD(),yD(),ui=Qb(),ci=Id()}var ci,ui,pi,di,fi,Zb,uD,t0=T(()=>{"use strict";Ie();ee();D();kt();Td();Ka();Yb();Ht();Xb();di=!1,fi=null,Zb=!1,uD=!1;Je.onReady(()=>{})});function r0(e){let t=Da.config[e];return t||(t={},Da.config[e]=t),(r,n)=>{if(t[r]){et.warn(`[can i use] ${r} already registered`);return}t[r]=R({},n)}}var n0=T(()=>{"use strict";D()});function yc(e){o0=e}function hi(e){return e===null||typeof e!="object"?e:Array.isArray(e)?e.map(t=>hi(t)):Object.keys(e).reduce((t,r)=>(t[r]=hi(e[r]),t),{})}function bt(e){return typeof e=="number"}function bc(e){let t=wc(e);switch(t){case"string":return`"${e}"`;case"number":case"boolean":case"null":case"undefined":return String(e);default:return`a(n) ${t}`}}function wc(e){return typeof e=="function"?"function":Object.prototype.toString.call(e).slice(8).slice(0,-1).toLowerCase()}var o0,ae,mi,vi,gi,_i,Er,yi,bi,wi,Ei,xi,Ai,Si,Ii,Ti,Ri,ki,Ci,Ec=T(()=>{"use strict";o0=!1;ae=class{constructor(){this.errors=[];this.hasFallback=!1;this.hasDefault=!1;this._optional=!1}fail(t){if(o0)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 ${bc(t.actual)}`,this.errors.push(r)}return!1}fallback(t){return this.hasFallback=!0,this._fallback=t,this}get fallbackValue(){return hi(this._fallback)}default(t){return this.hasDefault=!0,this._default=t,this}get defaultValue(){return typeof this._default=="function"?this._default:hi(this._default)}optional(){return this._optional=!0,this}};mi=class extends ae{validate(t){return this._optional&&t===void 0?!0:bt(t)?bt(this._min)&&t<this._min?this.fail(`the value of ${this.path} should be greater than or equal to ${this._min}`):bt(this._max)&&t>this._max?this.fail(`the value of ${this.path} should be less than or equal to ${this._max}`):bt(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}},vi=class extends ae{validate(t){return this._optional&&t===void 0?!0:typeof t!="boolean"?this.fail({expect:"boolean",actual:t}):!0}},gi=class extends ae{validate(t){if(this._optional&&t===void 0)return!0;if(typeof t!="string")return this.fail({expect:"string",actual:t});if(bt(this._maxLength)&&t.length>this._maxLength)return this.fail(`the length of ${this.path} should be less than or equal to ${this._maxLength}`);if(bt(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}},_i=class extends ae{validate(t){return this._optional&&t===void 0?!0:typeof t!="symbol"?this.fail({expect:"symbol",actual:t}):!0}},Er=class extends ae{validate(t){return!0}},yi=class extends ae{validate(t){return t!==void 0?this.fail({expect:"undefined",actual:t}):!0}},bi=class extends ae{validate(t){return this._optional&&t===void 0?!0:t!==null?this.fail({expect:"null",actual:t}):!0}},wi=class extends ae{validate(t){return this._optional&&t===void 0?!0:typeof t!="function"?this.fail({expect:"function",actual:t}):!0}},Ei=class extends ae{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 ${bc(t)}`)}return!0}},xi=class extends ae{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(bt(this._minItems)&&r.length<this._minItems)return this.fail(`the length of ${this.path} should be greater than or equal to ${this._minItems}`);if(bt(this._maxItems)&&r.length>this._maxItems)return this.fail(`the length of ${this.path} should be less than or equal to ${this._maxItems}`);if(bt(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,a)=>{if(n.path=`${this.path}[${a}]`,n.errors=this.errors,i===void 0&&n.hasDefault){r[a]=n.defaultValue;return}n.validate(i)||(n.hasFallback?r[a]=n.fallbackValue:o=!1)}),this._uniqueItems){let i=new Map;for(let a in r)i.has(r[a])?o=this.fail(`${this.path} should NOT have duplicate items (${this.path}[${i.get(r[a])}] and ${this.path}[${a}] are identical)`):i.set(r[a],a)}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}},Ai=class extends ae{constructor(r){super();this._value=r}validate(r){if(this._optional&&r===void 0)return!0;if(wc(r)!=="object")return this.fail({expect:"object",actual:r});let o=r,i=this._value;i.errors=this.errors;let a=!0;for(let s in o){let l=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}"]`,!(l===void 0&&i._optional)){if(l===void 0&&i.hasDefault){o[s]=i.defaultValue;continue}i.validate(l)||(i.hasFallback?o[s]=i.fallbackValue:a=!1)}}return a}},Si=class extends ae{constructor(r={}){super();this._object=r}validate(r){if(this._optional&&r===void 0)return!0;if(wc(r)!=="object")return this.fail({expect:"object",actual:r});let n=r,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}},Ii=class extends ae{constructor(r){super();this.value=r}validate(r){return r===void 0&&this._optional?!0:r!==this.value?this.fail({expect:bc(this.value),actual:r}):!0}},Ti=class extends ae{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 a=this._items[i];if(a.errors=[],a.path=this.path,!a.validate(t))r.push(a.errors.join("; "));else if(!n){n=!0;break}}if(!n){let i=r.join(`
419
+ `;return b("div",{className:`toast toast-${t} ${o?"toast-visible":"toast-hidden"} ${a}`,children:e})},Kb=(e,t)=>{let r=document.createElement("div");document.body.appendChild(r);let n=()=>{document.body.removeChild(r)},o=iD(e,t);rr(b(aD,{message:o,type:t==null?void 0:t.type,duration:t==null?void 0:t.duration,onClose:n}),r)}});function Wb(){return x(this,null,function*(){if(_c)return _c;let t=`${S.testMode?"https://stg-game.jolibox.com":"https://game.jolibox.com"}/api/user-retention/exit-recommendations?objectId=${S.mpId}&from=GAME_DETAIL`,{response:{data:r}}=yield Ee(t);return _c=r,r})}function zb(){return x(this,null,function*(){let e=new Tt;if(S.mpType!=="game")return e.resolve(!1),e.promise;let t=yield Wb();if(t.code!=="SUCCESS")return e.resolve(!1),e.promise;let{gameListInfo:r,title:n,buttons:o}=t.data,i=Bb({games:r.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?sD(a.data.game):e.resolve(!0),i.hide();break;default:e.resolve(!0);break}}});return e.promise})}var _c,sD,Yb=T(()=>{"use strict";ee();Ie();D();li();Jt();_c=null;Wb();sD=e=>{var a;let{data:t}=L("envSync"),r=new URL(t.schema),n=new URLSearchParams(r.search);n.set("gameId",e.gameId),n.set("joliSource",S.encodeJoliSourceQuery({__mpType:"game",__orientation:(a=e.orientation)!=null?a:"VERTICAL"}));let i=`${`https://${e.gameId}.content.jolibox.com/`}index.html?${n.toString()}`;L("openSchemaSync",{schema:i})}});function cD(e){let t=R(R({},lD),e),{url:r,height:n,showCloseButton:o,enableDragClose:i,useAnimation:a,onClose:s,onLoad:l}=t,c=0,d=0,u=!1,h=()=>a?{overlayTransition:"opacity 0.3s ease",containerTransition:"transform 0.3s ease",iframeTransition:"opacity 0.3s ease"}:{overlayTransition:"none",containerTransition:"none",iframeTransition:"none"},p=()=>a?300:0;function m(){let{overlayTransition:y,containerTransition:A,iframeTransition:k}=h();V=document.createElement("div"),V.id="jolibox-modal-overlay",V.style.cssText=`position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.5); z-index:1000; display:flex; justify-content:center; align-items:flex-end; transition:${y}; opacity:0; visibility:hidden;`,$=document.createElement("div"),$.id="jolibox-modal-container",$.style.cssText=`width:100%; height:${n}; background:white; border-radius:12px 12px 0 0; overflow:hidden; box-shadow:0 -2px 10px rgba(0,0,0,0.2); transform:translateY(100%); transition:${A};`;let O=document.createElement("div");O.id="jolibox-modal-loading",O.style.cssText="position:absolute; top:50%; left:50%; transform:translate(-50%, -50%); width:40px; height:40px; border:4px solid #f3f3f3; border-top:4px solid #3498db; border-radius:50%; animation:spin 1s linear infinite;";let I=document.createElement("style");I.textContent="@keyframes spin { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } }",document.head.appendChild(I);let w=document.createElement("div");if(w.style.cssText="width:100%; height:100%; display:flex; flex-direction:column; padding-bottom:env(safe-area-inset-bottom, 0); position:relative;",Ke=document.createElement("iframe"),Ke.style.cssText=`width:100%; flex:1; border:none; opacity:0; transition:${k};`,Ke.src=r,Ke.onload=()=>{O.parentNode&&O.parentNode.removeChild(O),Ke.style.opacity="1",g(),l==null||l(),de.emit("onModalIframeLoaded",{url:r})},w.appendChild(Ke),w.appendChild(O),$.appendChild(w),o){let B=document.createElement("div");B.style.cssText="position:absolute; top:10px; right:10px; width:30px; height:30px; background:rgba(0,0,0,0.1); border-radius:15px; display:flex; justify-content:center; align-items:center; cursor:pointer; z-index:10;",B.innerHTML="\u2715",B.onclick=v,$.appendChild(B)}V.appendChild($),document.body.appendChild(V),V.addEventListener("click",function(B){B.target===V&&v()}),i&&_()}function g(){!V||!$||u||(V.style.visibility="visible",a?requestAnimationFrame(()=>{V&&(V.style.opacity="1"),$&&($.style.transform="translateY(0)"),u=!0}):(V&&(V.style.opacity="1"),$&&($.style.transform="translateY(0)"),u=!0),L("updateContainerConfigSync",{displayCapsuleButton:!1,webviewId:S.webviewId}))}function _(){if(!$)return;let y=O=>{c=O.touches[0].clientY},A=O=>{if(!u)return;d=O.touches[0].clientY;let I=d-c;I>0&&($&&($.style.transition="none",$.style.transform=`translateY(${I}px)`),O.preventDefault())},k=()=>{!u||!$||($.style.transition=a?"transform 0.3s ease":"none",d-c>80?v():$.style.transform="translateY(0)")};$.addEventListener("touchstart",y),$.addEventListener("touchmove",A),$.addEventListener("touchend",k)}function v(){!V||!$||!u||(a?($.style.transform="translateY(100%)",V.style.opacity="0"):V.style.visibility="hidden",u=!1,L("updateContainerConfigSync",{displayCapsuleButton:!0,webviewId:S.webviewId}),setTimeout(()=>{V&&(V.remove(),V=null,$=null,Ke=null,s==null||s(),de.emit("onModalIframeClosed",{url:r}))},p()))}return m(),{close:v}}function Qb(){return window.joliboxUI=q(R({},window.joliboxUI),{createIframeModal:cD}),()=>{window.joliboxUI=void 0,V&&V.parentNode&&V.parentNode.removeChild(V),$&&$.parentNode&&$.parentNode.removeChild($),Ke&&Ke.parentNode&&Ke.parentNode.removeChild(Ke),V=null,$=null,Ke=null}}var lD,V,$,Ke,Xb=T(()=>{"use strict";Ie();ee();D();lD={height:"50%",showCloseButton:!0,enableDragClose:!0,useAnimation:!0},V=null,$=null,Ke=null});var e0={};fu(e0,{config:()=>bD});function dD(){no.on("isAdShowing",e=>{di=e,$r(di)&&L("updateContainerConfigSync",{displayCapsuleButton:!di,webviewId:S.webviewId})})}function fD(){de.on("onInterceptSystemExit",({intercept:e})=>{Zb=e})}function pD(){de.on("onInterceptBackPress",({intercept:e})=>{uD=e}),Ve("onBeforeBackPress",({uuid:e})=>{var t,r;de.emit("onBackPress",{}),(r=(t=globalThis.joliboxJSCore)==null?void 0:t.doBackPress)==null||r.call(t,e)})}function hD(){de.on("onDocumentReady",()=>{var e;(e=globalThis.joliboxJSCore)==null||e.onDocumentReady(window.location.href),Le("onDocumentReady",{start_timestamp:pi,timestamp:Date.now()})})}function mD(){Ve("onI18nChanged",({language:e})=>{de.emit("onI18nChanged",{i18n:e})})}function vD(e){S.mpType==="game"&&Oe.start(e)}function gD(){Ve("onJoliboxServiceReady",({runtimeInfo:e,loadDuration:t})=>{e&&S.onEnvConfigChanged({hostUserInfo:e}),de.emit("LifecycleEvent.onReady",R({},S.hostUserInfo?S.hostUserInfo:{isLogin:!1})),Le("joliboxServiceReady",{start_timestamp:pi,timestamp:Date.now()}),vD(t)}),Ve("onBeforeExit",({uuid:e})=>{var t;(t=globalThis.joliboxJSCore)==null||t.doExit(e)})}function _D(){let e=()=>{Le("onBeforeExit",{timestamp:Date.now()}),ci==null||ci(),ui==null||ui(),Oe.close(Date.now()-pi)},t=()=>di||Zb;Je.onDoExit(()=>x(this,null,function*(){return t()?!0:$r(S.shouldInterupt)?(S.shouldInterupt||e(),S.shouldInterupt):fi!=null&&fi.canShowRecommended&&(yield zb())?!0:(e(),!1)})),Je.onDoBackPress(()=>x(this,null,function*(){return!!t()}))}function yD(){return x(this,null,function*(){let e=`${S.baseApiHost}/api/fe-configs/js-sdk/basic-meta`,{response:{data:t}}=yield Ee(e);t&&(fi=t)})}function bD(){pi=Date.now(),gD(),dD(),fD(),pD(),_D(),hD(),mD(),yD(),ui=Qb(),ci=Id()}var ci,ui,pi,di,fi,Zb,uD,t0=T(()=>{"use strict";Ie();ee();D();kt();Td();Ka();Yb();Jt();Xb();di=!1,fi=null,Zb=!1,uD=!1;Je.onReady(()=>{})});function r0(e){let t=Da.config[e];return t||(t={},Da.config[e]=t),(r,n)=>{if(t[r]){et.warn(`[can i use] ${r} already registered`);return}t[r]=R({},n)}}var n0=T(()=>{"use strict";D()});function yc(e){o0=e}function hi(e){return e===null||typeof e!="object"?e:Array.isArray(e)?e.map(t=>hi(t)):Object.keys(e).reduce((t,r)=>(t[r]=hi(e[r]),t),{})}function bt(e){return typeof e=="number"}function bc(e){let t=wc(e);switch(t){case"string":return`"${e}"`;case"number":case"boolean":case"null":case"undefined":return String(e);default:return`a(n) ${t}`}}function wc(e){return typeof e=="function"?"function":Object.prototype.toString.call(e).slice(8).slice(0,-1).toLowerCase()}var o0,ae,mi,vi,gi,_i,Er,yi,bi,wi,Ei,xi,Ai,Si,Ii,Ti,Ri,ki,Ci,Ec=T(()=>{"use strict";o0=!1;ae=class{constructor(){this.errors=[];this.hasFallback=!1;this.hasDefault=!1;this._optional=!1}fail(t){if(o0)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 ${bc(t.actual)}`,this.errors.push(r)}return!1}fallback(t){return this.hasFallback=!0,this._fallback=t,this}get fallbackValue(){return hi(this._fallback)}default(t){return this.hasDefault=!0,this._default=t,this}get defaultValue(){return typeof this._default=="function"?this._default:hi(this._default)}optional(){return this._optional=!0,this}};mi=class extends ae{validate(t){return this._optional&&t===void 0?!0:bt(t)?bt(this._min)&&t<this._min?this.fail(`the value of ${this.path} should be greater than or equal to ${this._min}`):bt(this._max)&&t>this._max?this.fail(`the value of ${this.path} should be less than or equal to ${this._max}`):bt(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}},vi=class extends ae{validate(t){return this._optional&&t===void 0?!0:typeof t!="boolean"?this.fail({expect:"boolean",actual:t}):!0}},gi=class extends ae{validate(t){if(this._optional&&t===void 0)return!0;if(typeof t!="string")return this.fail({expect:"string",actual:t});if(bt(this._maxLength)&&t.length>this._maxLength)return this.fail(`the length of ${this.path} should be less than or equal to ${this._maxLength}`);if(bt(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}},_i=class extends ae{validate(t){return this._optional&&t===void 0?!0:typeof t!="symbol"?this.fail({expect:"symbol",actual:t}):!0}},Er=class extends ae{validate(t){return!0}},yi=class extends ae{validate(t){return t!==void 0?this.fail({expect:"undefined",actual:t}):!0}},bi=class extends ae{validate(t){return this._optional&&t===void 0?!0:t!==null?this.fail({expect:"null",actual:t}):!0}},wi=class extends ae{validate(t){return this._optional&&t===void 0?!0:typeof t!="function"?this.fail({expect:"function",actual:t}):!0}},Ei=class extends ae{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 ${bc(t)}`)}return!0}},xi=class extends ae{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(bt(this._minItems)&&r.length<this._minItems)return this.fail(`the length of ${this.path} should be greater than or equal to ${this._minItems}`);if(bt(this._maxItems)&&r.length>this._maxItems)return this.fail(`the length of ${this.path} should be less than or equal to ${this._maxItems}`);if(bt(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,a)=>{if(n.path=`${this.path}[${a}]`,n.errors=this.errors,i===void 0&&n.hasDefault){r[a]=n.defaultValue;return}n.validate(i)||(n.hasFallback?r[a]=n.fallbackValue:o=!1)}),this._uniqueItems){let i=new Map;for(let a in r)i.has(r[a])?o=this.fail(`${this.path} should NOT have duplicate items (${this.path}[${i.get(r[a])}] and ${this.path}[${a}] are identical)`):i.set(r[a],a)}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}},Ai=class extends ae{constructor(r){super();this._value=r}validate(r){if(this._optional&&r===void 0)return!0;if(wc(r)!=="object")return this.fail({expect:"object",actual:r});let o=r,i=this._value;i.errors=this.errors;let a=!0;for(let s in o){let l=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}"]`,!(l===void 0&&i._optional)){if(l===void 0&&i.hasDefault){o[s]=i.defaultValue;continue}i.validate(l)||(i.hasFallback?o[s]=i.fallbackValue:a=!1)}}return a}},Si=class extends ae{constructor(r={}){super();this._object=r}validate(r){if(this._optional&&r===void 0)return!0;if(wc(r)!=="object")return this.fail({expect:"object",actual:r});let n=r,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}},Ii=class extends ae{constructor(r){super();this.value=r}validate(r){return r===void 0&&this._optional?!0:r!==this.value?this.fail({expect:bc(this.value),actual:r}):!0}},Ti=class extends ae{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 a=this._items[i];if(a.errors=[],a.path=this.path,!a.validate(t))r.push(a.errors.join("; "));else if(!n){n=!0;break}}if(!n){let i=r.join(`
420
420
  or `);this.errors.push(i)}return n}},Ri=class extends ae{constructor(...t){super(),this._items=t;let r=0,n=t.length-1;for(;n>=0;n--){let o=t[n];if(o._optional||o.hasDefault)r+=1;else break}this._minItems=t.length-r}validate(t){if(t===void 0&&this._optional)return!0;if(!Array.isArray(t))return this.fail({expect:"array",actual:t});if(t.length<this._minItems)return this.fail(`the length of ${this.path} should be greater than or equal to ${this._minItems}`);let r=!0;return this._items.forEach((n,o)=>{if(n.path=`${this.path}[${o}]`,n.errors=this.errors,t[o]===void 0&&n.hasDefault){t[o]=n.defaultValue;return}n.validate(t[o])||(n.hasFallback?t[o]=n._fallback:r=!1)}),r}},ki=class extends ae{validate(t){return t===void 0&&this._optional||t instanceof ArrayBuffer?!0:this.fail({expect:"arraybuffer",actual:t})}},Ci=class extends ae{constructor(t){super(),this._ctor=t}validate(t){return t===void 0&&this._optional||t instanceof this._ctor?!0:this.fail({expect:`typedarray of ${this._ctor.name}`,actual:t})}}});function xc(e,t,r="param"){if(e.errors=[],e.path=r,yc(!0),!e.validate(t)){let n=e.errors.join(`
421
- `);throw e.errors.length=0,yc(!1),new TypeError(n)}}var E,Ac=T(()=>{"use strict";Ec();Ec();E={object(e){return new Si(e)},array(e){return new xi(e)},tuple(...e){return new Ri(...e)},literal(e){return new Ii(e)},or(...e){return new Ti(...e)},symbol(){return new _i},record(e){return new Ai(e)},function(){return new wi},boolean(){return new vi},string(){return new gi},number(){return new mi},undefined(){return new yi},null(){return new bi},unknown(){return new Er},any(){return new Er},as(){return new Er},arraybuffer(){return new ki},enum(...e){return new Ei(...e)},typedarray(e){return new Ci(e)}}});var Oi,i0,a0=T(()=>{"use strict";D();rt();Ac();er();Oi=1,i0=e=>{function t(n,o){return(...i)=>{var u,h,p,m;let a=Date.now(),s={method:n,trace_id:Oi};Oi+=1;let l="SUCCESS",c=`${n}:ok`,d=0;try{if(o.paramsSchema)try{xc(o.paramsSchema,i,"params")}catch(y){throw $a(`${n}:fail ${y.message}`)}let g=o.implement(...i),_=g,v=`${n}:ok`;if(g&&"code"in g){let{code:y,data:A,message:k}=g;l=y,_=A,v=k}return{code:l,message:v,data:_}}catch(g){let _=g;d=(h=(u=_.code)!=null?u:_.errNo)!=null?h:2e3,l="FAILURE";let v=(m=(p=_.message)!=null?p:_.errMsg)!=null?m:`${g}`;return c=`${n}:${l} ${v.replace(/^\S+:(fail|cancel)\s?/,"")}`,Te(new Jr(c,d)),{code:l,message:c}}finally{let g=Date.now()-a;e("apiInvoked",q(R({},s),{duration:g,status:l}))}}}function r(n,o){return(...i)=>x(this,null,function*(){var h,p,m,g;let a=Mu(i)?i:[i],s=Date.now(),l={method:n,trace_id:Oi};Oi+=1;let c=`${n}:ok`,d="SUCCESS",u={code:d,message:c};try{if(o.paramsSchema)try{xc(o.paramsSchema,a,"params")}catch(y){throw $a(y.message)}let v=yield o.implement(...a);if(v&&"code"in v){let{code:y,data:A,message:k}=v;d=y,c=k,v=A}return Object.assign(u,{code:d,message:c,data:v}),u}catch(_){let v=_,y=(p=(h=v.code)!=null?h:v.errNo)!=null?p:2e3;d="FAILURE";let A=(g=(m=v.message)!=null?m:v.errMsg)!=null?g:`${_}`,k=`${n}:${d} ${A.replace(/^\S+:(fail|cancel)\s?/,"")}`;return Object.assign(u,{code:d,message:k}),Te(new Jr(k,y)),u}finally{let _=Date.now()-s;e("apiInvoked",q(R({},l),{duration:_,status:d}))}})}return{createAPI:r,createSyncAPI:t}}});var se,J,P,lt=T(()=>{"use strict";n0();kt();a0();Ac();({createAPI:se,createSyncAPI:J}=i0(Le)),P=r0("native")});var s0,ED,xD,AD,SD,l0=T(()=>{"use strict";D();lt();Ie();s0=Z(),ED="env",xD="getSystemInfoSync",AD=J(xD,{implement:()=>{var r;let e=L("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}}}),SD=J(ED,{implement:()=>{var t;let e=L("envSync");return(t=e==null?void 0:e.data)!=null?t:void 0}});s0.registerCommand("API.getSystemInfoSync",AD);s0.registerCommand("API.env",SD);P("env",{version:"1.0.0"});P("getSystemInfoSync",{version:"1.0.0"})});var c0=f(Sc=>{"use strict";D();lt();rt();Ie();kt();ee();var ID="exitGame",TD="onReady",RD="onJoliboxShow",kD="onJoliboxHide",Pi=Z(),Ni=Xn(Te),CD=se(ID,{paramsSchema:E.tuple(E.function(),E.boolean().optional().default(!1)),implement:(e,t=!1)=>x(Sc,null,function*(){Ni(e).call(Sc),$r(S.shouldInterupt)&&!S.shouldInterupt&&S.from&&Nu("onRetentionResult",{shouldStay:t},S.from,!0),yield we("exitAppAsync")})}),OD=J(RD,{paramsSchema:E.tuple(E.function()),implement(e){let t=Ni(e);Ve("onJoliboxEnterForeground",()=>{t.call(this),Gr.emit("visible",!0)})}}),PD=J(kD,{paramsSchema:E.tuple(E.function()),implement(e){let t=Ni(e);Ve("onJoliboxEnterBackground",()=>{t.call(this),Gr.emit("visible",!1)})}}),ND=J(TD,{paramsSchema:E.tuple(E.function()),implement(e){let t=Ni(e);de.on("LifecycleEvent.onReady",r=>{t(r)})}});Pi.registerCommand("LifecycleSDK.exit",CD);Pi.registerCommand("LifecycleSDK.onReady",ND);Pi.registerCommand("LifecycleSDK.onJoliboxShow",OD);Pi.registerCommand("LifecycleSDK.onJoliboxHide",PD);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 u0(e){let t={};if(!Bt(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 d0(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 f0(e,t=!1){if(e)return t||e>0&&e<=6e4?Math.ceil(e):6e4}function p0(e,t,r){if(["POST","PUT","PATCH"].includes(t)||!Bt(r))return e;let[n,o=""]=e.split("?"),i=new URLSearchParams(o);for(let[s,l]of Object.entries(r))l!=null&&i.append(s,String(l));let a=i.toString();return a?`${n}?${a}`:n}var h0=T(()=>{"use strict";D()});var DD,qD,Ic,Tc,m0,LD,UD,MD,v0=T(()=>{"use strict";er();Va();lt();h0();D();rt();ee();DD=15,qD=to("createRequestTaskSync","operateRequestTaskSync",{type:"public",baseUrl:S.baseApiHost}),Ic=0,Tc=[],m0=Xn(Te),LD=(e,t)=>{let r=e.filter(t),n=e.filter(o=>!t(o));return e.length=0,e.push(...n),r},UD=e=>{let t=new Tt,r=()=>{};return J("request",{paramsSchema:E.tuple(E.object({url:E.string(),method:E.string(),headers:E.object(),data:E.object().optional(),query:E.object().optional(),dataType:E.string().default("json"),responseType:E.string().default("text"),enableCache:E.boolean().default(!1),appendHostCookie:E.boolean().default(!0),timeout:E.number().default(3e4),success:E.function(),fail:E.function()})),implement(o){let i=()=>x(this,null,function*(){var s,l;let a=m0(o.fail);try{if(Ic+=1,t.state!=="pending")return;let{data:c,dataType:d,responseType:u,enableCache:h,appendHostCookie:p}=o,m=u0(o.headers),g=d0(o.method),_=f0(o.timeout),v=p0(o.url,g,c),y=m0(o.success),A=Object.assign({},o,{method:g,header:m,data:g==="GET"||g==="HEAD"?void 0:c,enableCache:h,query:(s=o.query)!=null?s:{},dataType:d,responseType:u,appendHostCookie:p});_&&(A.timeout=_);let k=qD(v,A);{let{response:O}=yield k,{code:I,data:w,message:B}=O;if(w&&typeof w=="object"&&"status"in w&&w.status!==200)throw Rt({code:w.status||-1,msg:`request:fail status ${w.status}`});t.resolve({code:I!=null?I:"SUCCESS",data:w,message:B!=null?B:"request:ok"}),y({code:"SUCCESS",message:"request:ok",data:w})}}catch(c){t.reject(c),a({code:"FAILURE",message:"httpRequst: failed"})}finally{Ic-=1,(l=Tc.shift())==null||l()}});return Ic>=DD?(r=()=>{LD(Tc,a=>a===i)},Tc.push(i)):i(),t.promise}})(e),{abort(){t.reject(Rt({code:-1,msg:"request:fail abort"})),r()}}},MD=Z();MD.registerCommand("HttpSDK.request",UD);P("request",{version:"1.0.0"})});function g0(e){let t=Object.prototype.toString.call(e).split(" ")[1].split("]")[0].toLocaleLowerCase();return HD.includes(t)?t:""}function _0(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 y0(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 Di,jD,FD,BD,$D,oH,iH,HD,In,Rc,kc=T(()=>{"use strict";lt();Ie();D();Ht();ee();Di=Z(),jD=se("getLocalStorage",{paramsSchema:E.tuple(E.string()),implement(e){return x(this,null,function*(){let{response:t}=yield Ee(`/api/games/user-storage/${S.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:a}}=yield we("getLocalStorageAsync",{key:e}),s=_0(i,a);return{code:r,message:`${n}. fallback to native`,data:s}}catch(i){return{code:"INTERNAL_ERROR",message:"[Jolibox SDK] get local storage failed",data:null}}})}});Di.registerCommand("StorageSDK.getItem",jD);P("storage.getItem",{version:"1.0.0",properties:{key:"1.0.0",value:"1.0.0"}});FD=se("setStorage",{paramsSchema:E.tuple(E.string(),E.or(E.string(),E.boolean(),E.number())),implement(e,t){return x(this,null,function*(){let r=S.mpId,n=typeof t=="string"?t:String(t),{response:o}=yield Ee(`/api/games/user-storage/${r}`,{method:"POST",responseType:"json",appendHostCookie:!0,data:{key:e,value:n}}),{data:{code:i,message:a}}=o,s=g0(t),l=y0(t,s);return yield we("setLocalStorageAsync",{key:e,data:l,dataType:s}),i=="SUCCESS"?{code:i,message:a}:{code:i,message:`${a}. fallback to native`}})}});Di.registerCommand("StorageSDK.setItem",FD);P("storage.setItem",{version:"1.0.0",properties:{key:"1.0.0",value:"1.0.0"}});BD=se("removeStorage",{paramsSchema:E.tuple(E.string()),implement(e){return x(this,null,function*(){let t=S.mpId,{response:r}=yield Ee(`/api/games/user-storage/${t}/remove`,{method:"POST",responseType:"json",appendHostCookie:!0,data:{key:e}}),{data:{code:n,message:o}}=r;return yield we("removeLocalStorageAsync",{key:e}),n==="SUCCESS"?{code:n,message:o}:{code:n,message:"[Jolibox SDK] remove item succ"}})}});Di.registerCommand("StorageSDK.removeItem",BD);P("storage.removeItem",{version:"1.0.0",properties:{key:"1.0.0"}});$D=se("clearStorage",{implement(){return x(this,null,function*(){let e=S.mpId,{response:t}=yield Ee(`/api/games/user-storage/${e}/clear`,{method:"POST",appendHostCookie:!0});we("clearLocalStorageAsync");let{data:{code:r,message:n}}=t;return r==="SUCCESS"?{code:r,message:n}:{code:r,message:`${n}.fallback to native`}})}});Di.registerCommand("StorageSDK.clear",$D);P("storage.clear",{version:"1.0.0"});oH=se("getStorageInfo",{implement(){return x(this,null,function*(){let{data:e}=yield we("getStorageInfoAsync");return e})}});P("getStorageInfo",{version:"1.0.0",success:{keys:"1.0.0",currentSize:"1.0.0",limitSize:"1.0.0"}});iH=J("getStorageInfoSync",{implement(){return L("getStorageInfoSync")}}),HD=["string","number","boolean","object",""];In=se("getGlobalStorage",{paramsSchema:E.tuple(E.string()),implement(e){return x(this,null,function*(){try{let{data:t,dataType:r}=yield we("getGlobalStorageAsync",{key:e});return{code:"SUCCESS",message:"success",data:_0(t,r)}}catch(t){return{code:"INTERNAL_ERROR",message:"[Jolibox SDK] get global storage failed",data:null}}})}}),Rc=se("setGlobalStorage",{paramsSchema:E.tuple(E.string(),E.or(E.string(),E.boolean(),E.number())),implement(e,t){return x(this,null,function*(){try{let r=g0(t),n=y0(t,r);return yield we("setGlobalStorageAsync",{key:e,data:n,dataType:r}),{code:"SUCCESS",message:"success"}}catch(r){return{code:"INTERNAL_ERROR",message:"[Jolibox SDK] set global storage failed"}}})}})});var JD,VD,GD,Cc,b0=T(()=>{"use strict";D();Ie();lt();JD=J("showKeyboard",{paramsSchema:E.tuple(E.object({defaultValue:E.string().optional().default(""),multiple:E.boolean().optional().default(!1),maxLength:E.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)),L("showKeyboardSync",q(R({},e),{defaultValue:r,maxLength:t}))}});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"}});VD=J("updateKeyboard",{paramsSchema:E.tuple(E.object({value:E.string()})),implement(e){L("updateKeyboardSync",e)}});P("keyboard.updateKeyboard",{version:"1.0.0",properties:{params:{value:"1.0.0"}}});GD=J("hideKeyboard",{implement(){L("hideKeyboardSync")}});P("keyboard.hideKeyboard",{version:"1.0.0"});Cc=Z();Cc.registerCommand("KeyboardSDK.showKeyboard",JD);Cc.registerCommand("KeyboardSDK.updateKeyboard",VD);Cc.registerCommand("KeyboardSDK.hideKeyboard",GD)});var w0=f(Wt=>{"use strict";D();lt();kt();var xr=Z(),KD=se("levelFinished",{paramsSchema:E.tuple(E.string(),E.object({result:E.boolean(),duration:E.number()})),implement:(e,t)=>x(Wt,null,function*(){let{result:r,duration:n}=t,o=[];o.push(Oe.tracker("LevelFinished",{levelId:e,result:r,duration:n})),o.push(Oe.reporter({event:"COMPLETE_GAME_LEVEL"})),yield Promise.all(o)})}),WD=se("taskFinished",{paramsSchema:E.tuple(E.string(),E.object({duration:E.number()})),implement:(e,t)=>x(Wt,null,function*(){let{duration:r}=t;return yield Oe.reportToNative({event:"TaskFinished",params:{duration:r,taskId:e}})})}),zD=se("levelUpgrade",{paramsSchema:E.tuple(E.string(),E.string()),implement:(e,t)=>x(Wt,null,function*(){let r=[];r.push(Oe.reportToNative({event:"LevelUpgrade",params:{name:t,levelId:e}})),yield Promise.all(r)})}),YD=se("onHistoryUserLevel",{paramsSchema:E.tuple(E.number()),implement:e=>x(Wt,null,function*(){return yield Oe.reportToNative({event:"HistoryUserLevel",params:{level:e}})})}),QD=se("onHistoryUserScore",{paramsSchema:E.tuple(E.number()),implement:e=>x(Wt,null,function*(){return yield Oe.reportToNative({event:"HistoryUserScore",params:{score:e}})})}),XD=se("taskEvent",{paramsSchema:E.tuple(E.string(),E.object({tools:E.array(E.object({id:E.string(),name:E.string(),count:E.number(),description:E.string().optional(),price:E.object({amount:E.number(),unit:E.string()}).optional()})).optional(),awards:E.array(E.object({id:E.string(),name:E.string()})).optional()})),implement:(e,t)=>x(Wt,null,function*(){var n,o;let r=[];r.push(Oe.reportToNative({event:"TaskEvent",params:R({taskId:e},t)})),(o=(n=t.tools)==null?void 0:n.length)!=null&&o&&(r.push(Oe.reporter({event:"USE_GAME_ITEM"})),r.push(Oe.reportToNative({event:"UseGameItem",params:R({taskId:e},t)}))),yield Promise.all(r)})});xr.registerCommand("TaskTrackerSDK.levelFinished",KD);xr.registerCommand("TaskTrackerSDK.taskFinished",WD);xr.registerCommand("TaskTrackerSDK.levelUpgrade",zD);xr.registerCommand("TaskTrackerSDK.historyUserLevel",YD);xr.registerCommand("TaskTrackerSDK.historyUserScore",QD);xr.registerCommand("TaskTrackerSDK.taskEvent",XD);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 Oc,ZD,E0,Pc=T(()=>{"use strict";ee();Ie();lt();D();er();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"}});Oc=se("login",{implement(){return x(this,null,function*(){var a;let{data:{isLogin:e}}=yield we("checkLoginAsync");if(e)return{isLogin:!0,token:(a=S.hostUserInfo)==null?void 0:a.token};Ve("onLoginStateChange",({isLogin:s,token:l,uuid:c})=>{c==r&&o({isLogin:s,token:l})});let t=L("loginSync"),{data:{uuid:r}}=t;if(!r)throw Rt({code:-1,msg:"login failed"});let{promise:n,resolve:o}=new Tt,i=yield n;return S.onEnvConfigChanged({hostUserInfo:i}),de.emit("onLoginComplete",i),i})}}),ZD=se("checkSession",{implement(){return x(this,null,function*(){let{data:{isLogin:e}}=yield we("checkLoginAsync");return{isLogin:e}})}}),E0=Z();E0.registerCommand("API.login",Oc);E0.registerCommand("API.checkSession",ZD)});var Sr,qi,Ut,Li,Ir,Ui,Ar,eq,G,zt,Yt=T(()=>{"use strict";D();Sr="UNLOCK_OPTIONS_CHANGED",qi="INVOKE_PAYMENT",Ut="ON_PAYMENT_RESULT",Li="ON_USE_MODAL_EVENT",Ir="ON_USE_MODAL_RESULT",Ui="ON_USE_MODAL_FREQUENCY",Ar=new tt,eq=()=>({on:Ar.on.bind(Ar),off:Ar.off.bind(Ar),emit:Ar.emit.bind(Ar)}),G=eq(),zt={charge:{dailyMaxPopUps:2,minInterval:8*60*60*1e3},useJolicoin:{dailyMaxPopUps:2,minInterval:8*60*60*1e3}}});function wt(e,t){let r=null,n=null,o=null,i=()=>{if(o){r=Promise.resolve(o);return}r=new Promise(a=>{n=a})};return i(),e.on(t,(...a)=>{let s=a[0];o=s,n&&(n(s),n=null)}),{getData:()=>(r||i(),r),getCachedData:()=>o,clearCache:()=>{o=null,r=null},getFreshData:()=>(o=null,r=null,i(),r)}}var Tn=T(()=>{"use strict"});var Nc,x0=T(()=>{"use strict";Nc=e=>{let t=new Date,r=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),n=r+24*60*60*1e3;return e.filter(o=>o>=r&&o<n)}});var A0,S0,I0,T0,R0=T(()=>{"use strict";kc();x0();A0=e=>x(void 0,null,function*(){let{dailyMaxPopUps:t,minInterval:r}=e,n=yield In("joli_coin_use_modal_frequency");if(!n.data)return!0;let o=n.data,i=Nc(o);return!(i.length>=t||Date.now()-i[i.length-1]<r)}),S0=()=>x(void 0,null,function*(){var n;let e=Date.now(),r=(n=(yield In("joli_coin_use_modal_frequency")).data)!=null?n:[];r.push(e),r.sort((o,i)=>i-o).splice(8),yield Rc("joli_coin_use_modal_frequency",r)}),I0=e=>x(void 0,null,function*(){let{dailyMaxPopUps:t,minInterval:r}=e,n=yield In("joli_coin_payment_frequency");if(!n.data)return!0;let o=n.data,i=Nc(o);return!(i.length>=t||Date.now()-i[i.length-1]<r)}),T0=()=>x(void 0,null,function*(){var n;let e=Date.now(),r=(n=(yield In("joli_coin_payment_frequency")).data)!=null?n:[];r.push(e),r.sort((o,i)=>i-o).splice(8),yield Rc("joli_coin_payment_frequency",r)})});var k0=f(Rn=>{"use strict";Yt();li();Ht();ee();Pc();Tn();R0();var Dc=wt(G,Ui);Dc.getData();G.on(Li,(e,t)=>x(Rn,null,function*(){if(e==="ADS-JOLI_COIN"){console.log("use modal show by frequency");let n=yield Dc.getData();if(!(yield A0(n.joliCoinUseAndCharge.useJolicoin))){G.emit(Ir,{useModalResult:"CONFIRM"});return}}let r=Hb({data:{enableAutoDeduct:t.enableAutoDeduct,userJolicoin:t.userJoliCoin,joliCoinQuantity:t.joliCoinQuantity},buttons:{confirm:{text:t.confirmButtonText,onPress:()=>{G.emit(Ir,{useModalResult:"CONFIRM"}),r.destroy()}},cancel:{text:t.cancelButtonText,onPress:({type:n})=>{G.emit(Ir,{useModalResult:(n!=null?n:"")==="CANCEL"?"CANCEL":"FAILED"}),r.destroy()}}}});yield S0()}));G.on(qi,(e,t)=>x(Rn,null,function*(){try{if(e==="ADS-JOLI_COIN"){let o=yield Dc.getData();if(!(yield I0(o.joliCoinUseAndCharge.charge))){G.emit(Ut,{paymentResult:"SUCCESS"});return}console.log("show by frequency")}let r=yield tq();if(!r){G.emit(Ut,{paymentResult:"FAILED"});return}let n=Jb({data:{userJolicoin:t.userJoliCoin,joliCoinQuantity:t.joliCoinQuantity,paymentChoices:r.paymentChoices,enableAutoDeduct:r.enableAutoDeduct},buttons:{confirm:{text:t.confirmButtonText,onPress:o=>x(Rn,null,function*(){var i;if(!((i=S.hostUserInfo)!=null&&i.isLogin)){let{data:a}=yield Oc();if(!(a!=null&&a.isLogin)){console.log("login failed");return}}console.log("invokeNativePayment",o),G.emit(Ut,{paymentResult:"SUCCESS"}),n.destroy()})},cancel:{text:t.cancelButtonText,onPress:({type:o})=>{G.emit(Ut,{paymentResult:(o!=null?o:"")==="CANCEL"?"CANCEL":"FAILED"}),n.destroy()}}}});yield T0()}catch(r){console.info("payment failed",r),G.emit(Ut,{paymentResult:"FAILED"})}}));var tq=()=>x(Rn,null,function*(){var t;let{response:e}=yield Ee("/api/joli-coin/balance-detail",{method:"GET",appendHostCookie:!0,responseType:"json"});return(t=e.data)==null?void 0:t.data})});function We(e,t,r){return(t=iq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iq(e){var t=aq(e,"string");return typeof t=="symbol"?t:t+""}function aq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mi(e,t,r){return(t=sq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sq(e){var t=lq(e,"string");return typeof t=="symbol"?t:t+""}function lq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gq(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}function _q(e){return typeof e=="string"}function yq(e){return typeof e=="undefined"}function bq(e){return yq(e)||e===null}function wq(e){return typeof e=="function"}function ew(e){let t=e,r=null,n=function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r||(r=new t(...i)),r};return n.prototype=t.prototype,n}function kn(e){return function(){var t,r;((r=(t=globalThis.VConsole)==null?void 0:t[e])!=null?r:globalThis.console[e])(...arguments)}}function Bi(e,t){return t.map(r=>{if(r==="params"&&e[r]){let n=e[r];return Object.keys(n).reduce((o,i)=>(o[i]=String(n[i]),o),{})}return e[r]})}function Tq(e){let t=e.location?Bi(e.location,D0):null,r=e.target?Bi(e.target,D0):null;return Bi(hq(pq({},e),{location:t,target:r}),Sq)}function Rq(e){let t=e.events.map(n=>Tq(n)),r=Bi(e.device,Iq);return[e.protocolVersion,t,r,e.project]}function kq(){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 Dq(e){return new Promise(t=>ow(e)(t))}function ow(e){return function(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=!1;return e(o=>{if(!n)return n=!0,t.call(r,o)},null)}}function qq(e,t){return(r=>{let n={onWillAddFirstListener(){r(o.fire,o)}},o=new Dn(n);return o.event})(function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e(o=>t(o)&&r.call(n,o),null)})}function Uq(e,t){let r=Math.min(e.length,t.length);for(let n=0;n<r;n++)Mq(e[n],t[n])}function Mq(e,t){if(_q(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(wq(t)){try{if(e instanceof t)return}catch(r){}if(!bq(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 Lc(e,t,r){return(t=jq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jq(e){var t=Fq(e,"string");return typeof t=="symbol"?t:t+""}function Fq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ji(e,t,r){return(t=Bq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bq(e){var t=$q(e,"string");return typeof t=="symbol"?t:t+""}function $q(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Et(e,t,r){return(t=Hq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hq(e){var t=Jq(e,"string");return typeof t=="symbol"?t:t+""}function Jq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vq(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Gq(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}function Xq(e,t){return ye(e,0)^45?(((t<<2^ye(e,0))<<2^ye(e,1))<<2^ye(e,2))<<2^ye(e,3):0}function sw(e){return e.trim()}function Zq(e,t){return(e=t.exec(e))?e[0]:e}function F(e,t,r){return e.replace(t,r)}function Yc(e,t){return e.indexOf(t)}function ye(e,t){return e.charCodeAt(t)|0}function qn(e,t,r){return e.slice(t,r)}function ct(e){return e.length}function au(e){return e.length}function Fi(e,t){return t.push(e),e}function eL(e,t){return e.map(t).join("")}function ta(e,t,r,n,o,i,a){return{value:e,root:t,parent:r,type:n,props:o,children:i,line:ea,column:Rr,length:a,return:""}}function On(e,t){return Qq(ta("",null,null,"",null,null,0),e,{length:-e.length},t)}function tL(){return ce}function rL(){return ce=qe>0?ye(kr,--qe):0,Rr--,ce===10&&(Rr=1,ea--),ce}function Be(){return ce=qe<lw?ye(kr,qe++):0,Rr++,ce===10&&(Rr=1,ea++),ce}function ut(){return ye(kr,qe)}function $i(){return qe}function Un(e,t){return qn(kr,e,t)}function Ln(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 cw(e){return ea=Rr=1,lw=ct(kr=e),qe=0,[]}function uw(e){return kr="",e}function Hi(e){return sw(Un(qe-1,Qc(e===91?e+2:e===40?e+1:e)))}function nL(e){for(;(ce=ut())&&ce<33;)Be();return Ln(e)>2||Ln(ce)>3?"":" "}function oL(e,t){for(;--t&&Be()&&!(ce<48||ce>102||ce>57&&ce<65||ce>70&&ce<97););return Un(e,$i()+(t<6&&ut()==32&&Be()==32))}function Qc(e){for(;Be();)switch(ce){case e:return qe;case 34:case 39:e!==34&&e!==39&&Qc(ce);break;case 40:e===41&&Qc(e);break;case 92:Be();break}return qe}function iL(e,t){for(;Be()&&e+ce!==57&&!(e+ce===84&&ut()===47););return"/*"+Un(t,qe-1)+"*"+Zi(e===47?e:Be())}function aL(e){for(;!Ln(ut());)Be();return Un(e,qe)}function sL(e){return uw(Ji("",null,null,null,[""],e=cw(e),0,[0],e))}function Ji(e,t,r,n,o,i,a,s,l){for(var c=0,d=0,u=a,h=0,p=0,m=0,g=1,_=1,v=1,y=0,A="",k=o,O=i,I=n,w=A;_;)switch(m=y,y=Be()){case 40:if(m!=108&&ye(w,u-1)==58){Yc(w+=F(Hi(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:w+=Hi(y);break;case 9:case 10:case 13:case 32:w+=nL(m);break;case 92:w+=oL($i()-1,7);continue;case 47:switch(ut()){case 42:case 47:Fi(lL(iL(Be(),$i()),t,r),l);break;default:w+="/"}break;case 123*g:s[c++]=ct(w)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:_=0;case 59+d:v==-1&&(w=F(w,/\f/g,"")),p>0&&ct(w)-u&&Fi(p>32?U0(w+";",n,r,u-1):U0(F(w," ","")+";",n,r,u-2),l);break;case 59:w+=";";default:if(Fi(I=L0(w,t,r,c,d,o,s,A,k=[],O=[],u),i),y===123)if(d===0)Ji(w,t,I,I,k,i,u,s,O);else switch(h===99&&ye(w,3)===110?100:h){case 100:case 108:case 109:case 115:Ji(e,I,I,n&&Fi(L0(e,I,I,0,0,o,s,A,o,k=[],u),O),o,O,u,s,n?k:O);break;default:Ji(w,I,I,I,[""],O,0,s,O)}}c=d=p=0,g=v=1,A=w="",u=a;break;case 58:u=1+ct(w),p=m;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&rL()==125)continue}switch(w+=Zi(y),y*g){case 38:v=d>0?1:(w+="\f",-1);break;case 44:s[c++]=(ct(w)-1)*v,v=1;break;case 64:ut()===45&&(w+=Hi(Be())),h=ut(),d=u=ct(A=w+=aL($i())),y++;break;case 45:m===45&&ct(w)==2&&(g=0)}}return i}function L0(e,t,r,n,o,i,a,s,l,c,d){for(var u=o-1,h=o===0?i:[""],p=au(h),m=0,g=0,_=0;m<n;++m)for(var v=0,y=qn(e,u+1,u=Yq(g=a[m])),A=e;v<p;++v)(A=sw(g>0?h[v]+" "+y:F(y,/&\f/g,h[v])))&&(l[_++]=A);return ta(e,t,r,o===0?ou:s,l,c,d)}function lL(e,t,r){return ta(e,t,r,iw,Zi(tL()),qn(e,2,-2),0)}function U0(e,t,r,n){return ta(e,t,r,iu,qn(e,0,n),qn(e,n+1,-1),n)}function Tr(e,t){for(var r="",n=au(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function cL(e,t,r,n){switch(e.type){case zq:if(e.children.length)break;case Wq:case iu:return e.return=e.return||e.value;case iw:return"";case aw:return e.return=e.value+"{"+Tr(e.children,n)+"}";case ou:e.value=e.props.join(",")}return ct(r=Tr(e.children,n))?e.return=e.value+"{"+r+"}":""}function uL(e){var t=au(e);return function(r,n,o,i){for(var a="",s=0;s<t;s++)a+=e[s](r,n,o,i)||"";return a}}function dL(e){return function(t){t.root||(t=t.return)&&e(t)}}function fL(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}function dw(e,t){switch(Xq(e,t)){case 5103:return j+"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 j+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return j+e+Ki+e+Se+e+e;case 6828:case 4268:return j+e+Se+e+e;case 6165:return j+e+Se+"flex-"+e+e;case 5187:return j+e+F(e,/(\w+).+(:[^]+)/,j+"box-$1$2"+Se+"flex-$1$2")+e;case 5443:return j+e+Se+"flex-item-"+F(e,/flex-|-self/,"")+e;case 4675:return j+e+Se+"flex-line-pack"+F(e,/align-content|flex-|-self/,"")+e;case 5548:return j+e+Se+F(e,"shrink","negative")+e;case 5292:return j+e+Se+F(e,"basis","preferred-size")+e;case 6060:return j+"box-"+F(e,"-grow","")+j+e+Se+F(e,"grow","positive")+e;case 4554:return j+F(e,/([^-])(transform)/g,"$1"+j+"$2")+e;case 6187:return F(F(F(e,/(zoom-|grab)/,j+"$1"),/(image-set)/,j+"$1"),e,"")+e;case 5495:case 3959:return F(e,/(image-set\([^]*)/,j+"$1$`$1");case 4968:return F(F(e,/(.+:)(flex-)?(.*)/,j+"box-pack:$3"+Se+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+j+e+e;case 4095:case 3583:case 4068:case 2532:return F(e,/(.+)-inline(.+)/,j+"$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(ct(e)-1-t>6)switch(ye(e,t+1)){case 109:if(ye(e,t+4)!==45)break;case 102:return F(e,/(.+:)(.+)-([^]+)/,"$1"+j+"$2-$3$1"+Ki+(ye(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Yc(e,"stretch")?dw(F(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ye(e,t+1)!==115)break;case 6444:switch(ye(e,ct(e)-3-(~Yc(e,"!important")&&10))){case 107:return F(e,":",":"+j)+e;case 101:return F(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+j+(ye(e,14)===45?"inline-":"")+"box$3$1"+j+"$2$3$1"+Se+"$2box$3")+e}break;case 5936:switch(ye(e,t+11)){case 114:return j+e+Se+F(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return j+e+Se+F(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return j+e+Se+F(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return j+e+Se+e+e}return e}function wL(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function Wi(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return Mt={name:o.name,styles:o.styles,next:Mt},o.name;var i=r;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Mt={name:a.name,styles:a.styles,next:Mt},a=a.next;var s=i.styles+";";return s}return SL(e,t,r)}}var l=r;if(t==null)return l;var c=t[l];return c!==void 0?c:l}function SL(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Wi(e,t,r[o])+";";else for(var i in r){var a=r[i];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?n+=i+"{"+t[s]+"}":j0(s)&&(n+=Uc(i)+":"+F0(i,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)j0(a[l])&&(n+=Uc(i)+":"+F0(i,a[l])+";");else{var c=Wi(e,t,a);switch(i){case"animation":case"animationName":{n+=Uc(i)+":"+c+";";break}default:n+=i+"{"+c+"}"}}}return n}function Mc(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";Mt=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,o+=Wi(r,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=Wi(r,t,e[s]),n){var l=i;o+=l[s]}B0.lastIndex=0;for(var c="",d;(d=B0.exec(o))!==null;)c+="-"+d[1];var u=wL(o)+c;return{name:u,styles:o,next:Mt}}function pw(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}function $0(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function H0(e,t,r){var n=[],o=pw(e,n,r);return n.length<2?r:o+t(n)}function mw(e,t){le.__h&&le.__h(De,e,Xc||t),Xc=0;var r=De.__H||(De.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function OL(e,t){var r=mw(zi++,3);!le.__s&&vw(r.__H,t)&&(r.__=e,r.u=t,De.__H.__h.push(r))}function PL(e){return Xc=5,su(function(){return{current:e}},[])}function su(e,t){var r=mw(zi++,7);return vw(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function NL(){for(var e;e=hw.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Vi),e.__H.__h.forEach(Zc),e.__H.__h=[]}catch(t){e.__H.__h=[],le.__e(t,e.__v)}}function DL(e){var t,r=function(){clearTimeout(n),Q0&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Q0&&(t=requestAnimationFrame(r))}function Vi(e){var t=De,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),De=t}function Zc(e){var t=De;e.__c=e.__(),De=t}function vw(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function ra(){if(jt>1)jt--;else{for(var e,t=!1;Pn!==void 0;){var r=Pn;for(Pn=void 0,eu++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&_w(r))try{r.c()}catch(o){t||(e=o,t=!0)}r=n}}if(eu=0,jt--,t)throw e}}function ze(e){if(jt>0)return e();jt++;try{return e()}finally{ra()}}function gw(e){if(H!==void 0){var t=e.n;if(t===void 0||t.t!==H)return t={i:0,S:e,p:H.s,n:void 0,t:H,e:void 0,x:void 0,r:t},H.s!==void 0&&(H.s.n=t),H.s=t,e.n=t,32&H.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=H.s,t.n=void 0,H.s.n=t,H.s=t),t}}function be(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}function _e(e){return new be(e)}function _w(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function yw(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function bw(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Cr(e){be.call(this,void 0),this.x=e,this.s=void 0,this.g=Yi-1,this.f=4}function Nn(e){return new Cr(e)}function ww(e){var t=e.u;if(e.u=void 0,typeof t=="function"){jt++;var r=H;H=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,lu(e),n}finally{H=r,ra()}}}function lu(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,ww(e)}function LL(e){if(H!==this)throw new Error("Out-of-order effect");bw(this),H=e,this.f&=-2,8&this.f&&lu(this),ra()}function jn(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}function Or(e){var t=new jn(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}function Pr(e,t){C[e]=t.bind(null,C[e]||function(){})}function Qi(e){Fc&&Fc(),Fc=e&&e.S()}function Aw(e){var t=this,r=e.data,n=Sw(r);n.value=r;var o=su(function(){for(var s=t,l=t.__v;l=l.__;)if(l.__c){l.__c.__$f|=4;break}var c=Nn(function(){var p=n.value.value;return p===0?0:p===!0?"":p||""}),d=Nn(function(){return!Array.isArray(c.value)&&!Ya(c.value)}),u=Or(function(){if(this.N=Iw,d.value){var p=c.value;s.__v&&s.__v.__e&&s.__v.__e.nodeType===3&&(s.__v.__e.data=p)}}),h=t.__$u.d;return t.__$u.d=function(){u(),h.call(this)},[d,c]},[]),i=o[0],a=o[1];return i.value?a.peek():a.value}function UL(e,t,r,n){var o=t in e&&e.ownerSVGElement===void 0,i=_e(r);return{o:function(a,s){i.value=a,n=s},d:Or(function(){this.N=Iw;var a=i.value.value;n[t]!==a&&(n[t]=a,o?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}function Sw(e){return su(function(){return _e(e)},[])}function FL(){ze(function(){for(var e;e=Ew.shift();)cu.call(e)})}function BL(){Ew.push(this)===1&&(C.requestAnimationFrame||ML)(FL)}function $L(){ze(function(){for(var e;e=xw.shift();)cu.call(e)})}function Iw(){xw.push(this)===1&&(C.requestAnimationFrame||jL)($L)}function HL(e){var t=PL(e);t.current=e,OL(function(){return Or(function(){return this.N=BL,t.current()})},[])}function JL(e,t){let r=Gs(e);Vs(()=>{r.current=e},[e]),Js(()=>{if(t===null)return;let n=setInterval(()=>{r.current()},t);return()=>{clearInterval(n)}},[t])}function he(e,t,r,n,o,i){t||(t={});var a,s,l=t;if("ref"in l)for(s in l={},t)s=="ref"?a=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--VL,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return C.vnode&&C.vnode(c),c}function xt(e,t,r){return(t=nU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nU(e){var t=oU(e,"string");return typeof t=="symbol"?t:t+""}function oU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qt(e,t,r){return(t=iU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iU(e){var t=aU(e,"string");return typeof t=="symbol"?t:t+""}function aU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var C0,rq,nq,oq,Bc,$c,X0,cq,uq,O0,dq,fq,P0,pq,hq,mq,Z0,vq,Eq,xq,N0,Aq,tw,rw,nw,D0,Sq,Iq,Hc,z,Cq,Oq,Cn,Dn,Pq,Vc,Nq,qc,Lq,Gc,q0,Kc,Wc,zc,Kq,Se,Ki,j,iw,ou,iu,Wq,aw,zq,Yq,Zi,Qq,ea,Rr,lw,qe,ce,kr,pL,hL,mL,M0,vL,gL,_L,yL,bL,EL,xL,AL,fw,j0,Uc,F0,B0,Mt,IL,TL,RL,kL,CL,Mn,zi,De,jc,J0,Xc,hw,le,V0,G0,K0,W0,z0,Y0,Q0,qL,H,Pn,jt,eu,Yi,cu,Fc,Ew,xw,ML,jL,Ne,VL,GL,At,tu,ru,Gi,KL,WL,zL,YL,QL,XL,ZL,eU,tU,rU,nu,Xi,zH,Tw=T(()=>{"use strict";nr();Xs();C0=Object.getOwnPropertySymbols,rq=Object.prototype.hasOwnProperty,nq=Object.prototype.propertyIsEnumerable,oq=(e,t)=>{var r={};for(var n in e)rq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&C0)for(var n of C0(e))t.indexOf(n)<0&&nq.call(e,n)&&(r[n]=e[n]);return r};Bc=class{constructor(t){We(this,"context",void 0),We(this,"continueCallback",void 0),We(this,"isBeforeAdCalled",!1),We(this,"isBeforeRewardCalled",!1),We(this,"isAdDismissedCalled",!1),We(this,"isAdViewedCalled",!1),We(this,"isAfterAdCalled",!1),We(this,"currentProvider",void 0),We(this,"currentClientParams",void 0),We(this,"adsHasResponse",!1),We(this,"videoChecker",window.document.createElement("video")),We(this,"wrapShowAdFn",r=>()=>{this.adsHasResponse=!0;let n=!1;this.videoChecker.play().catch(()=>{n=!1}),n=!this.videoChecker.paused,this.videoChecker.pause(),this.context.track("CallShowAdFn",Object.assign({},{userEvent:n},this.paramsToTrack)),r()}),this.context=t}get paramsToTrack(){var t,r,n,o,i,a;return{provider:(r=(t=this.currentProvider)==null?void 0:t.name)!=null?r:null,type:(n=this.currentClientParams)==null?void 0:n.type,name:((o=this.currentClientParams)==null?void 0:o.type)==="preroll"?null:(a=(i=this.currentClientParams)==null?void 0:i.name)!=null?a:""}}wrapBeforeAd(t){return()=>{this.adsHasResponse=!0,this.context.track("CallBeforeAd",this.paramsToTrack),this.isBeforeAdCalled||(this.isBeforeAdCalled=!0,t==null||t())}}wrapBeforeReward(t){return r=>{this.adsHasResponse=!0,this.isBeforeRewardCalled?this.wrapShowAdFn(r)():(this.isBeforeRewardCalled=!0,t==null||t(this.wrapShowAdFn(r)))}}wrapAdDismissed(t){return()=>{this.adsHasResponse=!0,this.isAdDismissedCalled||(this.isAdDismissedCalled=!0,t==null||t())}}wrapAdViewed(t){return()=>{this.adsHasResponse=!0,this.isAdViewedCalled||(this.isAdViewedCalled=!0,t==null||t())}}wrapAfterAd(t){return()=>{this.adsHasResponse=!0,this.context.track("CallAfterAd",this.paramsToTrack),this.isAfterAdCalled||(this.isAfterAdCalled=!0,t==null||t())}}wrapAdBreakDone(t){return r=>{var n,o,i,a,s;switch(this.adsHasResponse=!0,this.context.track("CallAdBreakDone",{provider:(o=(n=this.currentProvider)==null?void 0:n.name)!=null?o:null,breakType:r.breakType,breakName:(i=r.breakName)!=null?i:"",breakFormat:r.breakFormat,breakStatus:r.breakStatus}),r.breakStatus){case"viewed":case"ignored":case"dismissed":case"error":{t==null||t(r),(a=this.continueCallback)==null||a.call(this,[!1,r]);break}default:{(s=this.continueCallback)==null||s.call(this,[!0,r]);break}}}}callAdBreakAndContinue(t,r,n){return x(this,null,function*(){return this.currentProvider=t,this.currentClientParams=r,this.adsHasResponse=!1,new Promise(o=>{this.continueCallback=o;let i;switch(r.type){case"preroll":{i={type:r.type,adBreakDone:this.wrapAdBreakDone(r.adBreakDone)};break}case"reward":{i={name:r.name,type:r.type,beforeAd:this.wrapBeforeAd(r.beforeAd),beforeReward:this.wrapBeforeReward(r.beforeReward),adDismissed:this.wrapAdDismissed(r.adDismissed),adViewed:this.wrapAdViewed(r.adViewed),afterAd:this.wrapAfterAd(r.afterAd),adBreakDone:this.wrapAdBreakDone(r.adBreakDone)};break}default:{i={name:r.name,type:r.type,beforeAd:this.wrapBeforeAd(r.beforeAd),afterAd:this.wrapAfterAd(r.afterAd),adBreakDone:this.wrapAdBreakDone(r.adBreakDone)};break}}window.setTimeout(()=>{var a,s,l,c;this.adsHasResponse||(this.context.track("CallAdBreakTimeout",{type:r.type,provider:(s=(a=this.currentProvider)==null?void 0:a.name)!=null?s:null}),(c=this.continueCallback)==null||c.call(this,[!0,{breakType:r.type,breakName:r.type==="preroll"?"":(l=r.name)!=null?l:"",breakFormat:r.type==="reward"?"reward":"interstitial",breakStatus:"timeout"}]))},5e3),this.context.track("CallAdBreak",this.paramsToTrack),t.adBreak(i,n),window.JoliTesterBridge&&console.log("joli-fullscreen-ad-show")})})}};$c=class{constructor(t){Mi(this,"context",void 0),Mi(this,"adBreakIsShowing",!1),Mi(this,"reportPageJumpOut",()=>{this.context.track("AdBreakJumpOut",{context:"AdsActionDetection"})}),Mi(this,"reportPageHide",()=>{this.context.track("AdBreakHide",{context:"AdsActionDetection"})}),this.context=t,window.addEventListener("visibilitychange",()=>{document.hidden&&this.adBreakIsShowing&&this.reportPageHide()}),window.addEventListener("beforeunload",r=>{this.adBreakIsShowing&&this.reportPageJumpOut()})}},X0=Object.defineProperty,cq=Object.defineProperties,uq=Object.getOwnPropertyDescriptors,O0=Object.getOwnPropertySymbols,dq=Object.prototype.hasOwnProperty,fq=Object.prototype.propertyIsEnumerable,P0=(e,t,r)=>t in e?X0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pq=(e,t)=>{for(var r in t||(t={}))dq.call(t,r)&&P0(e,r,t[r]);if(O0)for(var r of O0(t))fq.call(t,r)&&P0(e,r,t[r]);return e},hq=(e,t)=>cq(e,uq(t)),mq=(e,t)=>{for(var r in t)X0(e,r,{get:t[r],enumerable:!0})},Z0=(e,t,r,n)=>{for(var o=t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=a(o)||o);return o},vq=(e,t,r)=>new Promise((n,o)=>{var i=l=>{try{s(r.next(l))}catch(c){o(c)}},a=l=>{try{s(r.throw(l))}catch(c){o(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,a);s((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}Eq=(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))(Eq||{});xq={log:kn("log"),warn:kn("warn"),info:kn("info"),error:kn("error"),debug:kn("debug")};Object.assign(globalThis,{logger:xq});N0=Symbol.for("Jolibox.canIUseMap"),Aq={};globalThis[N0]||(globalThis[N0]=Aq);tw=(e=>(e[e.System=1e3]="System",e[e.ErrorTrace=1001]="ErrorTrace",e[e.UserDefined=1002]="UserDefined",e))(tw||{}),rw=(e=>(e.MiniGame="mini-game",e.MiniDrama="mini-drama",e.App="app",e.WebSDK="web-sdk",e.AppSDK="app-sdk",e))(rw||{}),nw=(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))(nw||{}),D0=["name","params"],Sq=["name","type","location","target","extra","timestamp","userId"],Iq=["platform","os","appVersion","appId","model","brand","uuid","jsSdkVersion","extra"];kq();navigator.userAgent.includes("iPhone")||navigator.userAgent.includes("iPod")||navigator.userAgent.includes("iPad")||navigator.userAgent.includes("iPhone OS"),navigator.userAgent.includes("Android"),navigator.userAgent.includes("Mac"),navigator.userAgent.includes("FB_IAB"),!navigator.userAgent.includes("iPhone")&&navigator.userAgent.includes("Android");Hc=class Jc{constructor(t){this.element=t,this.next=Jc.Undefined,this.prev=Jc.Undefined}};Hc.Undefined=new Hc(void 0);z=Hc,Cq=class{constructor(){this._first=z.Undefined,this._last=z.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===z.Undefined}clear(){let e=this._first;for(;e!==z.Undefined;){let t=e.next;e.prev=z.Undefined,e.next=z.Undefined,e=t}this._first=z.Undefined,this._last=z.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new z(e);if(this._first===z.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!==z.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==z.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==z.Undefined&&e.next!==z.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===z.Undefined&&e.next===z.Undefined?(this._first=z.Undefined,this._last=z.Undefined):e.next===z.Undefined?(this._last=this._last.prev,this._last.next=z.Undefined):e.prev===z.Undefined&&(this._first=this._first.next,this._first.prev=z.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==z.Undefined;)yield e.element,e=e.next}},Oq=0,Cn=class{constructor(e){this.value=e,this.id=Oq++}},Dn=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 Cn&&(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(){return this._event!=null||(this._event=(e,t)=>{var r,n,o,i,a,s;if(this._disposed)return()=>{console.info("[Jolibox SDK] Emitter is _disposed")};t&&(e=e.bind(t));let l=new Cn(e);return this._listeners?this._listeners instanceof Cn?this._listeners=[this._listeners,l]:this._listeners.push(l):((n=(r=this.options)==null?void 0:r.onWillAddFirstListener)==null||n.call(r,this),this._listeners=l,(i=(o=this.options)==null?void 0:o.onDidFirstListener)==null||i.call(o,this)),(s=(a=this.options)==null?void 0:a.onDidAddListener)==null||s.call(a,this),this._size++,()=>{var c,d,u,h;if(!this._disposed){if(this._listeners instanceof Cn)this._listeners.id===l.id&&(this._listeners=void 0,this._size=0,(d=(c=this.options)==null?void 0:c.onDidRemoveLastListener)==null||d.call(c));else if(this._listeners){let p=this._listeners.indexOf(l);p>=0&&(this._listeners.splice(p,1),this._size--,this._size===0&&((h=(u=this.options)==null?void 0:u.onDidRemoveLastListener)==null||h.call(u)))}}}}),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 Cn?this._deliver(this._listeners,e):this._listeners.forEach(t=>this._deliver(t,e)))}hasListeners(){return this._size>0}},Pq=class{constructor(){this.listeners=new Map,this.listerHandlerMap=new WeakMap,this.cachedEventQueue=new Map}on(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;var n;let o=(n=this.listeners.get(e))!=null?n:new Dn,i=l=>t(...l.args),a=o.event(i);this.listerHandlerMap.set(t,{handler:i,dispose:a}),this.listeners.set(e,o);let s=this.cachedEventQueue.get(e);if(s&&r)for(let l of s)t(...l.args)}flushCachedEvent(e){e?this.cachedEventQueue.delete(e):this.cachedEventQueue.clear()}off(e,t){let r=this.listerHandlerMap.get(t);r&&(r.dispose(),this.listerHandlerMap.delete(t))}emit(e){let t=this.listeners.get(e),r=this.cachedEventQueue.get(e);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];r||(r=new Cq,this.cachedEventQueue.set(e,r)),r.push({args:o}),t&&t.fire({event:e,args:o})}once(e,t){var r=this;let n=function(){t(...arguments),r.off(e,n)};this.on(e,n,!1)}},Vc={};mq(Vc,{None:()=>Nq,filter:()=>qq,once:()=>ow,toPromise:()=>Dq});Nq=()=>(console.log("[Jolibox SDK] None Event"),()=>{console.log("[Jolibox SDK] None Event dispose")});qc=Symbol.for("Jolibox.hostEmitter"),Lq=()=>{let e=new Pq;return globalThis[qc]||(globalThis[qc]={on:e.on.bind(e),off:e.off.bind(e),emit:e.emit.bind(e),once:e.once.bind(e)}),globalThis[qc]};Lq();Gc=class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Dn,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(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return Uq(i,r),n(...i)}}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}};Gc=Z0([ew],Gc);q0=class{constructor(){this._onWillExecuteCommand=new Dn,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._onDidExecuteCommand=new Dn,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this.registry=new Gc,this._starActivation=null}_activateStar(){return this._starActivation||(this._starActivation=gq(3e4)),this._starActivation}executeCommand(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return vq(this,null,function*(){return this.registry.getCommand(e)?this._tryExecuteCommand(e,r):(yield Promise.all([Promise.race([this._activateStar(),Vc.toPromise(Vc.filter(this.registry.onDidRegisterCommand,o=>o===e))])]),this._tryExecuteCommand(e,r))})}executeCommandThowErr(e){if(!this.registry.getCommand(e))throw new Error(`command '${e}' not found`);let t=this.registry.getCommand(e);for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this._onWillExecuteCommand.fire({commandId:e,args:n});let i=this.invokeFunction(t.handler,...n);return this._onDidExecuteCommand.fire({commandId:e,args:n}),i}_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){try{for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e(...r)}finally{}}};q0=Z0([ew],q0);Kc=class{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"GAME";Lc(this,"context",void 0),Lc(this,"placement","GAME"),Lc(this,"contextInfo",void 0),this.context=t,this.placement=r,this.contextInfo=this.context.getContextInfo()}getLocation(){let t=new URLSearchParams(window.location.search),r={};return t.forEach((n,o)=>{r[o]=n}),{name:this.placement==="GAME"?"GamePage":"DramaPage",params:r}}getDevice(){var t,r,n,o;return{platform:(t=this.contextInfo.platform)!=null?t:nw.WebSDK,os:this.contextInfo.osType+"_"+this.contextInfo.runtimeType,appVersion:"1.0.0",appId:(r=this.contextInfo.hostAppId)!=null?r:"1",model:(n=this.contextInfo.deviceModel)!=null?n:"UnknownModel",brand:(o=this.contextInfo.deviceBrand)!=null?o:"UnknownBrand",uuid:this.contextInfo.deviceId,jsSdkVersion:"1.0.0",extra:{}}}serialize(t,r){var n;let o={protocolVersion:"1.0.0",events:[{name:t,type:tw.System,location:this.getLocation(),target:null,extra:r,timestamp:Date.now(),userId:(n=this.contextInfo.userId)!=null?n:null}],device:this.getDevice(),project:rw.WebSDK};return Rq(o)}};Wc=class{constructor(t){ji(this,"configs",null),ji(this,"firstRun",!0),ji(this,"context",void 0),ji(this,"contextInfo",void 0),this.context=t,this.contextInfo=this.context.getContextInfo(),this.init()}init(){return x(this,null,function*(){try{this.configs=yield this.context.httpClient.get("/api/fe-configs/js-sdk/ads-channel-config",{})}catch(t){}})}shouldBypassCallingInterstitial(){var t,r;let n;if(!this.configs)this.init(),n=!this.firstRun;else{let o=(t=this.contextInfo.channel)!=null?t:"",i=this.configs[o],a=(r=i==null?void 0:i.interstitialRate)!=null?r:1;n=Math.random()<a}return this.firstRun=!1,n}};zc=class{constructor(t,r){Et(this,"name","ADSENSE"),Et(this,"context",void 0),Et(this,"contextInfo",void 0),Et(this,"configured",!1),Et(this,"initParams",void 0),Et(this,"push",function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};window.adsbygoogle.push(n)}),Et(this,"adConfig",n=>{let o=n,{onReady:i}=o,a=oq(o,["onReady"]);this.context.track("CallAdConfig",a),this.configured?console.warn("Ad config already set, skipping"):(this.configured=!0,this.push(n))}),Et(this,"adBreak",n=>{if(!this.contextInfo.objectId){console.warn("Game ID is not set, skip calling adBreak");return}this.push(n)}),Et(this,"adUnit",n=>x(this,null,function*(){var o,i,a,s;if(this.context.track("CallAdUnit",{adFormat:(i=(o=n.adFormat)==null?void 0:o.toString())!=null?i:null,fullWidthResponsive:(a=n.fullWidthResponsive)!=null?a:null}),document.querySelector("#jolibox-ads")){console.warn("Ad unit already set, skipping");return}let{el:l,slot:c,adFormat:d,fullWidthResponsive:u,style:h}=n,p;if(!l)throw new Error("targeting element is required");if(typeof l=="string"?p=document.querySelector(l):p=l,!p)throw new Error("targeting element not found");let m=c;if(m||(m=this.initParams.unitId),!m)throw new Error("slot is required");let g=typeof d=="object"&&Array.isArray(d)?d.join(", "):d,_=document.createElement("ins");if(_.className="adsbygoogle",_.id="jolibox-ads",_.style.display="block",_.setAttribute("data-ad-client",this.initParams.clientId),_.setAttribute("data-ad-slot",m),g&&_.setAttribute("data-ad-format",g),u&&_.setAttribute("data-full-width-responsive",u),h&&_.setAttribute("style",h),(s=this.contextInfo.testAdsMode)!=null?s:!1){let v=document.createElement("div");v.style.position="absolute",v.style.top="0",v.style.left="0",v.style.width="100%",v.style.height="100%",v.style.display="flex",v.style.justifyContent="center",v.style.alignItems="center",v.style.backgroundColor="rgba(0, 0, 0, 0.5)",v.style.color="white",v.innerHTML="Test Ad",_.style.position="relative",p.appendChild(_),_.appendChild(v)}else p.appendChild(_),new MutationObserver(v=>{v.forEach(y=>{if(y.type==="attributes"&&y.attributeName==="data-ad-status"){let A=_.getAttribute("data-ad-status");this.context.track("AdSenseUnitStatusChanged",{status:A!=null?A:"null"})}})}).observe(_,{attributes:!0,attributeFilter:["data-ad-status"]}),this.push({})})),this.context=t,this.contextInfo=this.context.getContextInfo(),this.initParams=r,window.adsbygoogle=window.adsbygoogle||[]}init(){return x(this,null,function*(){var t;if(this.context.track("CallAdsInit",{provider:this.name}),typeof window=="undefined")return;let r="google-adsense",n=(t=this.contextInfo.testAdsMode)!=null?t:!1;if(!document.getElementById(r)&&this.initParams.clientId){let o=document.createElement("script");o.id=r,o.async=!0,o.crossOrigin="anonymous",o.src=`https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=${this.initParams.clientId}`,n&&o.setAttribute("data-adbreak-test","on"),this.initParams.channelId&&o.setAttribute("data-ad-channel",this.initParams.channelId),document.head.appendChild(o),this.context.track("LoadAdsenseCompleted",null)}})}};Kq=function(){function e(r){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=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Gq(this));var n=this.tags[this.tags.length-1];if(this.isSpeedy){var o=Vq(n);try{o.insertRule(r,o.cssRules.length)}catch(i){}}else n.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var n;return(n=r.parentNode)==null?void 0:n.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Se="-ms-",Ki="-moz-",j="-webkit-",iw="comm",ou="rule",iu="decl",Wq="@import",aw="@keyframes",zq="@layer",Yq=Math.abs,Zi=String.fromCharCode,Qq=Object.assign;ea=1,Rr=1,lw=0,qe=0,ce=0,kr="";pL=function(e,t,r){for(var n=0,o=0;n=o,o=ut(),n===38&&o===12&&(t[r]=1),!Ln(o);)Be();return Un(e,qe)},hL=function(e,t){var r=-1,n=44;do switch(Ln(n)){case 0:n===38&&ut()===12&&(t[r]=1),e[r]+=pL(qe-1,t,r);break;case 2:e[r]+=Hi(n);break;case 4:if(n===44){e[++r]=ut()===58?"&\f":"",t[r]=e[r].length;break}default:e[r]+=Zi(n)}while(n=Be());return e},mL=function(e,t){return uw(hL(cw(e),t))},M0=new WeakMap,vL=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!M0.get(r))&&!n){M0.set(e,!0);for(var o=[],i=mL(t,o),a=r.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},gL=function(e){if(e.type==="decl"){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return="",e.value="")}};_L=function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case iu:e.return=dw(e.value,e.length);break;case aw:return Tr([On(e,{value:F(e.value,"@","@"+j)})],n);case ou:if(e.length)return eL(e.props,function(o){switch(Zq(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Tr([On(e,{props:[F(o,/:(read-\w+)/,":"+Ki+"$1")]})],n);case"::placeholder":return Tr([On(e,{props:[F(o,/:(plac\w+)/,":"+j+"input-$1")]}),On(e,{props:[F(o,/:(plac\w+)/,":"+Ki+"$1")]}),On(e,{props:[F(o,/:(plac\w+)/,Se+"input-$1")]})],n)}return""})}},yL=[_L],bL=function(e){var t=e.key;if(t==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var g=m.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var n=e.stylisPlugins||yL,o={},i,a=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(m){for(var g=m.getAttribute("data-emotion").split(" "),_=1;_<g.length;_++)o[g[_]]=!0;a.push(m)});var s,l=[vL,gL];{var c,d=[cL,dL(function(m){c.insert(m)})],u=uL(l.concat(n,d)),h=function(m){return Tr(sL(m),u)};s=function(m,g,_,v){c=_,h(m?m+"{"+g.styles+"}":g.styles),v&&(p.inserted[g.name]=!0)}}var p={key:t,sheet:new Kq({key:t,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:s};return p.sheet.hydrate(a),p};EL={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},xL=/[A-Z]|^ms/g,AL=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fw=function(e){return e.charCodeAt(1)===45},j0=function(e){return e!=null&&typeof e!="boolean"},Uc=fL(function(e){return fw(e)?e:e.replace(xL,"-$&").toLowerCase()}),F0=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(AL,function(r,n,o){return Mt={name:n,styles:o,next:Mt},n})}return EL[e]!==1&&!fw(e)&&typeof t=="number"&&t!==0?t+"px":t};B0=/label:\s*([^\s;{]+)\s*(;|$)/g;IL=function(e,t,r){var n=e.key+"-"+t.name;e.registered[n]===void 0&&(e.registered[n]=t.styles)},TL=function(e,t,r){IL(e,t);var n=e.key+"-"+t.name;if(e.inserted[t.name]===void 0){var o=t;do e.insert(t===o?"."+n:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};RL=function(e){var t=bL(e);t.sheet.speedy=function(a){this.isSpeedy=a},t.compat=!0;var r=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Mc(s,t.registered,void 0);return TL(t,c),t.key+"-"+c.name},n=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Mc(s,t.registered),d="animation-"+c.name;return $0(t,{name:c.name,styles:"@keyframes "+d+"{"+c.styles+"}"}),d},o=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Mc(s,t.registered);$0(t,c)},i=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return H0(t.registered,r,kL(s))};return{css:r,cx:i,injectGlobal:o,keyframes:n,hydrate:function(a){a.forEach(function(s){t.inserted[s]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:pw.bind(null,t.registered),merge:H0.bind(null,t.registered,r)}},kL=function e(t){for(var r="",n=0;n<t.length;n++){var o=t[n];if(o!=null){var i=void 0;switch(typeof o){case"boolean":break;case"object":{if(Array.isArray(o))i=e(o);else{i="";for(var a in o)o[a]&&a&&(i&&(i+=" "),i+=a)}break}default:i=o}i&&(r&&(r+=" "),r+=i)}}return r},CL=RL({key:"css"}),Mn=CL.css,Xc=0,hw=[],le=C,V0=le.__b,G0=le.__r,K0=le.diffed,W0=le.__c,z0=le.unmount,Y0=le.__;le.__b=function(e){De=null,V0&&V0(e)},le.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Y0&&Y0(e,t)},le.__r=function(e){G0&&G0(e),zi=0;var t=(De=e.__c).__H;t&&(jc===De?(t.__h=[],De.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.forEach(Vi),t.__h.forEach(Zc),t.__h=[],zi=0)),jc=De},le.diffed=function(e){K0&&K0(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(hw.push(t)!==1&&J0===le.requestAnimationFrame||((J0=le.requestAnimationFrame)||DL)(NL)),t.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),jc=De=null},le.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Vi),r.__h=r.__h.filter(function(n){return!n.__||Zc(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],le.__e(n,r.__v)}}),W0&&W0(e,t)},le.unmount=function(e){z0&&z0(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Vi(n)}catch(o){t=o}}),r.__H=void 0,t&&le.__e(t,r.__v))};Q0=typeof requestAnimationFrame=="function";qL=Symbol.for("preact-signals");H=void 0,Pn=void 0,jt=0,eu=0,Yi=0;be.prototype.brand=qL;be.prototype.h=function(){return!0};be.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};be.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}};be.prototype.subscribe=function(e){var t=this;return Or(function(){var r=t.value,n=H;H=void 0;try{e(r)}finally{H=n}})};be.prototype.valueOf=function(){return this.value};be.prototype.toString=function(){return this.value+""};be.prototype.toJSON=function(){return this.value};be.prototype.peek=function(){var e=H;H=void 0;try{return this.value}finally{H=e}};Object.defineProperty(be.prototype,"value",{get:function(){var e=gw(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(eu>100)throw new Error("Cycle detected");this.v=e,this.i++,Yi++,jt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{ra()}}}});(Cr.prototype=new be).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Yi))return!0;if(this.g=Yi,this.f|=1,this.i>0&&!_w(this))return this.f&=-2,!0;var e=H;try{yw(this),H=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return H=e,bw(this),this.f&=-2,!0};Cr.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}be.prototype.S.call(this,e)};Cr.prototype.U=function(e){if(this.t!==void 0&&(be.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};Cr.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(Cr.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=gw(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});jn.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};jn.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ww(this),yw(this),jt++;var e=H;return H=this,LL.bind(this,e)};jn.prototype.N=function(){2&this.f||(this.f|=2,this.o=Pn,Pn=this)};jn.prototype.d=function(){this.f|=8,1&this.f||lu(this)};Ew=[],xw=[];Or(function(){cu=this.N})();Aw.displayName="_st";Object.defineProperties(be.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Aw},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});Pr("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var o in n)if(o!=="children"){var i=n[o];i instanceof be&&(r||(t.__np=r={}),r[o]=i,n[o]=i.peek())}}e(t)});Pr("__r",function(e,t){Qi();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(o){var i;return Or(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i}())),Qi(r),e(t)});Pr("__e",function(e,t,r,n){Qi(),e(t,r,n)});Pr("diffed",function(e,t){Qi();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,o=t.props;if(n){var i=r.U;if(i)for(var a in i){var s=i[a];s!==void 0&&!(a in n)&&(s.d(),i[a]=void 0)}else i={},r.U=i;for(var l in n){var c=i[l],d=n[l];c===void 0?(c=UL(r,l,d,o),i[l]=c):c.o(d,o)}}}e(t)});Pr("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var o in n){var i=n[o];i&&i.d()}}}}else{var a=t.__c;if(a){var s=a.__$u;s&&(a.__$u=void 0,s.d())}}e(t)});Pr("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)});Ue.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u,n=r&&r.s!==void 0;for(var o in t)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){var i=2&this.__$f;if(!(n||i||4&this.__$f)||1&this.__$f)return!0}else if(!(n||4&this.__$f)||3&this.__$f)return!0;for(var a in e)if(a!=="__source"&&e[a]!==this.props[a])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};ML=typeof requestAnimationFrame=="undefined"?setTimeout:function(e){var t=function(){clearTimeout(r),cancelAnimationFrame(n),e()},r=setTimeout(t,100),n=requestAnimationFrame(t)},jL=function(e){queueMicrotask(function(){queueMicrotask(e)})};Ne=Mn`
421
+ `);throw e.errors.length=0,yc(!1),new TypeError(n)}}var E,Ac=T(()=>{"use strict";Ec();Ec();E={object(e){return new Si(e)},array(e){return new xi(e)},tuple(...e){return new Ri(...e)},literal(e){return new Ii(e)},or(...e){return new Ti(...e)},symbol(){return new _i},record(e){return new Ai(e)},function(){return new wi},boolean(){return new vi},string(){return new gi},number(){return new mi},undefined(){return new yi},null(){return new bi},unknown(){return new Er},any(){return new Er},as(){return new Er},arraybuffer(){return new ki},enum(...e){return new Ei(...e)},typedarray(e){return new Ci(e)}}});var Oi,i0,a0=T(()=>{"use strict";D();rt();Ac();er();Oi=1,i0=e=>{function t(n,o){return(...i)=>{var u,h,p,m;let a=Date.now(),s={method:n,trace_id:Oi};Oi+=1;let l="SUCCESS",c=`${n}:ok`,d=0;try{if(o.paramsSchema)try{xc(o.paramsSchema,i,"params")}catch(y){throw $a(`${n}:fail ${y.message}`)}let g=o.implement(...i),_=g,v=`${n}:ok`;if(g&&"code"in g){let{code:y,data:A,message:k}=g;l=y,_=A,v=k}return{code:l,message:v,data:_}}catch(g){let _=g;d=(h=(u=_.code)!=null?u:_.errNo)!=null?h:2e3,l="FAILURE";let v=(m=(p=_.message)!=null?p:_.errMsg)!=null?m:`${g}`;return c=`${n}:${l} ${v.replace(/^\S+:(fail|cancel)\s?/,"")}`,Te(new Jr(c,d)),{code:l,message:c}}finally{let g=Date.now()-a;e("apiInvoked",q(R({},s),{duration:g,status:l}))}}}function r(n,o){return(...i)=>x(this,null,function*(){var h,p,m,g;let a=Mu(i)?i:[i],s=Date.now(),l={method:n,trace_id:Oi};Oi+=1;let c=`${n}:ok`,d="SUCCESS",u={code:d,message:c};try{if(o.paramsSchema)try{xc(o.paramsSchema,a,"params")}catch(y){throw $a(y.message)}let v=yield o.implement(...a);if(v&&"code"in v){let{code:y,data:A,message:k}=v;d=y,c=k,v=A}return Object.assign(u,{code:d,message:c,data:v}),u}catch(_){let v=_,y=(p=(h=v.code)!=null?h:v.errNo)!=null?p:2e3;d="FAILURE";let A=(g=(m=v.message)!=null?m:v.errMsg)!=null?g:`${_}`,k=`${n}:${d} ${A.replace(/^\S+:(fail|cancel)\s?/,"")}`;return Object.assign(u,{code:d,message:k}),Te(new Jr(k,y)),u}finally{let _=Date.now()-s;e("apiInvoked",q(R({},l),{duration:_,status:d}))}})}return{createAPI:r,createSyncAPI:t}}});var se,J,P,lt=T(()=>{"use strict";n0();kt();a0();Ac();({createAPI:se,createSyncAPI:J}=i0(Le)),P=r0("native")});var s0,ED,xD,AD,SD,l0=T(()=>{"use strict";D();lt();Ie();s0=Z(),ED="env",xD="getSystemInfoSync",AD=J(xD,{implement:()=>{var r;let e=L("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}}}),SD=J(ED,{implement:()=>{var t;let e=L("envSync");return(t=e==null?void 0:e.data)!=null?t:void 0}});s0.registerCommand("API.getSystemInfoSync",AD);s0.registerCommand("API.env",SD);P("env",{version:"1.0.0"});P("getSystemInfoSync",{version:"1.0.0"})});var c0=f(Sc=>{"use strict";D();lt();rt();Ie();kt();ee();var ID="exitGame",TD="onReady",RD="onJoliboxShow",kD="onJoliboxHide",Pi=Z(),Ni=Xn(Te),CD=se(ID,{paramsSchema:E.tuple(E.function(),E.boolean().optional().default(!1)),implement:(e,t=!1)=>x(Sc,null,function*(){Ni(e).call(Sc),$r(S.shouldInterupt)&&!S.shouldInterupt&&S.from&&Nu("onRetentionResult",{shouldStay:t},S.from,!0),yield we("exitAppAsync")})}),OD=J(RD,{paramsSchema:E.tuple(E.function()),implement(e){let t=Ni(e);Ve("onJoliboxEnterForeground",()=>{t.call(this),Gr.emit("visible",!0)})}}),PD=J(kD,{paramsSchema:E.tuple(E.function()),implement(e){let t=Ni(e);Ve("onJoliboxEnterBackground",()=>{t.call(this),Gr.emit("visible",!1)})}}),ND=J(TD,{paramsSchema:E.tuple(E.function()),implement(e){let t=Ni(e);de.on("LifecycleEvent.onReady",r=>{t(r)})}});Pi.registerCommand("LifecycleSDK.exit",CD);Pi.registerCommand("LifecycleSDK.onReady",ND);Pi.registerCommand("LifecycleSDK.onJoliboxShow",OD);Pi.registerCommand("LifecycleSDK.onJoliboxHide",PD);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 u0(e){let t={};if(!$t(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 d0(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 f0(e,t=!1){if(e)return t||e>0&&e<=6e4?Math.ceil(e):6e4}function p0(e,t,r){if(["POST","PUT","PATCH"].includes(t)||!$t(r))return e;let[n,o=""]=e.split("?"),i=new URLSearchParams(o);for(let[s,l]of Object.entries(r))l!=null&&i.append(s,String(l));let a=i.toString();return a?`${n}?${a}`:n}var h0=T(()=>{"use strict";D()});var DD,qD,Ic,Tc,m0,LD,UD,MD,v0=T(()=>{"use strict";er();Va();lt();h0();D();rt();ee();DD=15,qD=to("createRequestTaskSync","operateRequestTaskSync",{type:"public",baseUrl:S.baseApiHost}),Ic=0,Tc=[],m0=Xn(Te),LD=(e,t)=>{let r=e.filter(t),n=e.filter(o=>!t(o));return e.length=0,e.push(...n),r},UD=e=>{let t=new Tt,r=()=>{};return J("request",{paramsSchema:E.tuple(E.object({url:E.string(),method:E.string(),headers:E.object(),data:E.object().optional(),query:E.object().optional(),dataType:E.string().default("json"),responseType:E.string().default("text"),enableCache:E.boolean().default(!1),appendHostCookie:E.boolean().default(!0),timeout:E.number().default(3e4),success:E.function(),fail:E.function()})),implement(o){let i=()=>x(this,null,function*(){var s,l;let a=m0(o.fail);try{if(Ic+=1,t.state!=="pending")return;let{data:c,dataType:d,responseType:u,enableCache:h,appendHostCookie:p}=o,m=u0(o.headers),g=d0(o.method),_=f0(o.timeout),v=p0(o.url,g,c),y=m0(o.success),A=Object.assign({},o,{method:g,header:m,data:g==="GET"||g==="HEAD"?void 0:c,enableCache:h,query:(s=o.query)!=null?s:{},dataType:d,responseType:u,appendHostCookie:p});_&&(A.timeout=_);let k=qD(v,A);{let{response:O}=yield k,{code:I,data:w,message:B}=O;if(w&&typeof w=="object"&&"status"in w&&w.status!==200)throw Rt({code:w.status||-1,msg:`request:fail status ${w.status}`});t.resolve({code:I!=null?I:"SUCCESS",data:w,message:B!=null?B:"request:ok"}),y({code:"SUCCESS",message:"request:ok",data:w})}}catch(c){t.reject(c),a({code:"FAILURE",message:"httpRequst: failed"})}finally{Ic-=1,(l=Tc.shift())==null||l()}});return Ic>=DD?(r=()=>{LD(Tc,a=>a===i)},Tc.push(i)):i(),t.promise}})(e),{abort(){t.reject(Rt({code:-1,msg:"request:fail abort"})),r()}}},MD=Z();MD.registerCommand("HttpSDK.request",UD);P("request",{version:"1.0.0"})});function g0(e){let t=Object.prototype.toString.call(e).split(" ")[1].split("]")[0].toLocaleLowerCase();return HD.includes(t)?t:""}function _0(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 y0(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 Di,FD,jD,BD,$D,oH,iH,HD,In,Rc,kc=T(()=>{"use strict";lt();Ie();D();Jt();ee();Di=Z(),FD=se("getLocalStorage",{paramsSchema:E.tuple(E.string()),implement(e){return x(this,null,function*(){let{response:t}=yield Ee(`/api/games/user-storage/${S.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:a}}=yield we("getLocalStorageAsync",{key:e}),s=_0(i,a);return{code:r,message:`${n}. fallback to native`,data:s}}catch(i){return{code:"INTERNAL_ERROR",message:"[Jolibox SDK] get local storage failed",data:null}}})}});Di.registerCommand("StorageSDK.getItem",FD);P("storage.getItem",{version:"1.0.0",properties:{key:"1.0.0",value:"1.0.0"}});jD=se("setStorage",{paramsSchema:E.tuple(E.string(),E.or(E.string(),E.boolean(),E.number())),implement(e,t){return x(this,null,function*(){let r=S.mpId,n=typeof t=="string"?t:String(t),{response:o}=yield Ee(`/api/games/user-storage/${r}`,{method:"POST",responseType:"json",appendHostCookie:!0,data:{key:e,value:n}}),{data:{code:i,message:a}}=o,s=g0(t),l=y0(t,s);return yield we("setLocalStorageAsync",{key:e,data:l,dataType:s}),i=="SUCCESS"?{code:i,message:a}:{code:i,message:`${a}. fallback to native`}})}});Di.registerCommand("StorageSDK.setItem",jD);P("storage.setItem",{version:"1.0.0",properties:{key:"1.0.0",value:"1.0.0"}});BD=se("removeStorage",{paramsSchema:E.tuple(E.string()),implement(e){return x(this,null,function*(){let t=S.mpId,{response:r}=yield Ee(`/api/games/user-storage/${t}/remove`,{method:"POST",responseType:"json",appendHostCookie:!0,data:{key:e}}),{data:{code:n,message:o}}=r;return yield we("removeLocalStorageAsync",{key:e}),n==="SUCCESS"?{code:n,message:o}:{code:n,message:"[Jolibox SDK] remove item succ"}})}});Di.registerCommand("StorageSDK.removeItem",BD);P("storage.removeItem",{version:"1.0.0",properties:{key:"1.0.0"}});$D=se("clearStorage",{implement(){return x(this,null,function*(){let e=S.mpId,{response:t}=yield Ee(`/api/games/user-storage/${e}/clear`,{method:"POST",appendHostCookie:!0});we("clearLocalStorageAsync");let{data:{code:r,message:n}}=t;return r==="SUCCESS"?{code:r,message:n}:{code:r,message:`${n}.fallback to native`}})}});Di.registerCommand("StorageSDK.clear",$D);P("storage.clear",{version:"1.0.0"});oH=se("getStorageInfo",{implement(){return x(this,null,function*(){let{data:e}=yield we("getStorageInfoAsync");return e})}});P("getStorageInfo",{version:"1.0.0",success:{keys:"1.0.0",currentSize:"1.0.0",limitSize:"1.0.0"}});iH=J("getStorageInfoSync",{implement(){return L("getStorageInfoSync")}}),HD=["string","number","boolean","object",""];In=se("getGlobalStorage",{paramsSchema:E.tuple(E.string()),implement(e){return x(this,null,function*(){try{let{data:t,dataType:r}=yield we("getGlobalStorageAsync",{key:e});return{code:"SUCCESS",message:"success",data:_0(t,r)}}catch(t){return{code:"INTERNAL_ERROR",message:"[Jolibox SDK] get global storage failed",data:null}}})}}),Rc=se("setGlobalStorage",{paramsSchema:E.tuple(E.string(),E.or(E.string(),E.boolean(),E.number())),implement(e,t){return x(this,null,function*(){try{let r=g0(t),n=y0(t,r);return yield we("setGlobalStorageAsync",{key:e,data:n,dataType:r}),{code:"SUCCESS",message:"success"}}catch(r){return{code:"INTERNAL_ERROR",message:"[Jolibox SDK] set global storage failed"}}})}})});var JD,VD,GD,Cc,b0=T(()=>{"use strict";D();Ie();lt();JD=J("showKeyboard",{paramsSchema:E.tuple(E.object({defaultValue:E.string().optional().default(""),multiple:E.boolean().optional().default(!1),maxLength:E.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)),L("showKeyboardSync",q(R({},e),{defaultValue:r,maxLength:t}))}});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"}});VD=J("updateKeyboard",{paramsSchema:E.tuple(E.object({value:E.string()})),implement(e){L("updateKeyboardSync",e)}});P("keyboard.updateKeyboard",{version:"1.0.0",properties:{params:{value:"1.0.0"}}});GD=J("hideKeyboard",{implement(){L("hideKeyboardSync")}});P("keyboard.hideKeyboard",{version:"1.0.0"});Cc=Z();Cc.registerCommand("KeyboardSDK.showKeyboard",JD);Cc.registerCommand("KeyboardSDK.updateKeyboard",VD);Cc.registerCommand("KeyboardSDK.hideKeyboard",GD)});var w0=f(zt=>{"use strict";D();lt();kt();var xr=Z(),KD=se("levelFinished",{paramsSchema:E.tuple(E.string(),E.object({result:E.boolean(),duration:E.number()})),implement:(e,t)=>x(zt,null,function*(){let{result:r,duration:n}=t,o=[];o.push(Oe.tracker("LevelFinished",{levelId:e,result:r,duration:n})),o.push(Oe.reporter({event:"COMPLETE_GAME_LEVEL"})),yield Promise.all(o)})}),WD=se("taskFinished",{paramsSchema:E.tuple(E.string(),E.object({duration:E.number()})),implement:(e,t)=>x(zt,null,function*(){let{duration:r}=t;return yield Oe.reportToNative({event:"TaskFinished",params:{duration:r,taskId:e}})})}),zD=se("levelUpgrade",{paramsSchema:E.tuple(E.string(),E.string()),implement:(e,t)=>x(zt,null,function*(){let r=[];r.push(Oe.reportToNative({event:"LevelUpgrade",params:{name:t,levelId:e}})),yield Promise.all(r)})}),YD=se("onHistoryUserLevel",{paramsSchema:E.tuple(E.number()),implement:e=>x(zt,null,function*(){return yield Oe.reportToNative({event:"HistoryUserLevel",params:{level:e}})})}),QD=se("onHistoryUserScore",{paramsSchema:E.tuple(E.number()),implement:e=>x(zt,null,function*(){return yield Oe.reportToNative({event:"HistoryUserScore",params:{score:e}})})}),XD=se("taskEvent",{paramsSchema:E.tuple(E.string(),E.object({tools:E.array(E.object({id:E.string(),name:E.string(),count:E.number(),description:E.string().optional(),price:E.object({amount:E.number(),unit:E.string()}).optional()})).optional(),awards:E.array(E.object({id:E.string(),name:E.string()})).optional()})),implement:(e,t)=>x(zt,null,function*(){var n,o;let r=[];r.push(Oe.reportToNative({event:"TaskEvent",params:R({taskId:e},t)})),(o=(n=t.tools)==null?void 0:n.length)!=null&&o&&(r.push(Oe.reporter({event:"USE_GAME_ITEM"})),r.push(Oe.reportToNative({event:"UseGameItem",params:R({taskId:e},t)}))),yield Promise.all(r)})});xr.registerCommand("TaskTrackerSDK.levelFinished",KD);xr.registerCommand("TaskTrackerSDK.taskFinished",WD);xr.registerCommand("TaskTrackerSDK.levelUpgrade",zD);xr.registerCommand("TaskTrackerSDK.historyUserLevel",YD);xr.registerCommand("TaskTrackerSDK.historyUserScore",QD);xr.registerCommand("TaskTrackerSDK.taskEvent",XD);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 Oc,ZD,E0,Pc=T(()=>{"use strict";ee();Ie();lt();D();er();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"}});Oc=se("login",{implement(){return x(this,null,function*(){var a;let{data:{isLogin:e}}=yield we("checkLoginAsync");if(e)return{isLogin:!0,token:(a=S.hostUserInfo)==null?void 0:a.token};Ve("onLoginStateChange",({isLogin:s,token:l,uuid:c})=>{c==r&&o({isLogin:s,token:l})});let t=L("loginSync"),{data:{uuid:r}}=t;if(!r)throw Rt({code:-1,msg:"login failed"});let{promise:n,resolve:o}=new Tt,i=yield n;return S.onEnvConfigChanged({hostUserInfo:i}),de.emit("onLoginComplete",i),i})}}),ZD=se("checkSession",{implement(){return x(this,null,function*(){let{data:{isLogin:e}}=yield we("checkLoginAsync");return{isLogin:e}})}}),E0=Z();E0.registerCommand("API.login",Oc);E0.registerCommand("API.checkSession",ZD)});var Sr,qi,Ut,Li,Ir,Ui,Ar,eq,G,Yt,Qt=T(()=>{"use strict";D();Sr="UNLOCK_OPTIONS_CHANGED",qi="INVOKE_PAYMENT",Ut="ON_PAYMENT_RESULT",Li="ON_USE_MODAL_EVENT",Ir="ON_USE_MODAL_RESULT",Ui="ON_USE_MODAL_FREQUENCY",Ar=new tt,eq=()=>({on:Ar.on.bind(Ar),off:Ar.off.bind(Ar),emit:Ar.emit.bind(Ar)}),G=eq(),Yt={charge:{dailyMaxPopUps:2,minInterval:8*60*60*1e3},useJolicoin:{dailyMaxPopUps:2,minInterval:8*60*60*1e3}}});function wt(e,t){let r=null,n=null,o=null,i=()=>{if(o){r=Promise.resolve(o);return}r=new Promise(a=>{n=a})};return i(),e.on(t,(...a)=>{let s=a[0];o=s,n&&(n(s),n=null)}),{getData:()=>(r||i(),r),getCachedData:()=>o,clearCache:()=>{o=null,r=null},getFreshData:()=>(o=null,r=null,i(),r)}}var Tn=T(()=>{"use strict"});var Nc,x0=T(()=>{"use strict";Nc=e=>{let t=new Date,r=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),n=r+24*60*60*1e3;return e.filter(o=>o>=r&&o<n)}});var A0,S0,I0,T0,R0=T(()=>{"use strict";kc();x0();A0=e=>x(void 0,null,function*(){let{dailyMaxPopUps:t,minInterval:r}=e,n=yield In("joli_coin_use_modal_frequency");if(!n.data)return!0;let o=n.data,i=Nc(o);return!(i.length>=t||Date.now()-i[i.length-1]<r)}),S0=()=>x(void 0,null,function*(){var n;let e=Date.now(),r=(n=(yield In("joli_coin_use_modal_frequency")).data)!=null?n:[];r.push(e),r.sort((o,i)=>i-o).splice(8),yield Rc("joli_coin_use_modal_frequency",r)}),I0=e=>x(void 0,null,function*(){let{dailyMaxPopUps:t,minInterval:r}=e,n=yield In("joli_coin_payment_frequency");if(!n.data)return!0;let o=n.data,i=Nc(o);return!(i.length>=t||Date.now()-i[i.length-1]<r)}),T0=()=>x(void 0,null,function*(){var n;let e=Date.now(),r=(n=(yield In("joli_coin_payment_frequency")).data)!=null?n:[];r.push(e),r.sort((o,i)=>i-o).splice(8),yield Rc("joli_coin_payment_frequency",r)})});var k0=f(Rn=>{"use strict";Qt();li();Jt();ee();Pc();Tn();R0();var Dc=wt(G,Ui);Dc.getData();G.on(Li,(e,t)=>x(Rn,null,function*(){if(e==="ADS-JOLI_COIN"){console.log("use modal show by frequency");let n=yield Dc.getData();if(!(yield A0(n.joliCoinUseAndCharge.useJolicoin))){G.emit(Ir,{useModalResult:"CONFIRM"});return}}let r=Hb({data:{enableAutoDeduct:t.enableAutoDeduct,userJolicoin:t.userJoliCoin,joliCoinQuantity:t.joliCoinQuantity},buttons:{confirm:{text:t.confirmButtonText,onPress:()=>{G.emit(Ir,{useModalResult:"CONFIRM"}),r.destroy()}},cancel:{text:t.cancelButtonText,onPress:({type:n})=>{G.emit(Ir,{useModalResult:(n!=null?n:"")==="CANCEL"?"CANCEL":"FAILED"}),r.destroy()}}}});yield S0()}));G.on(qi,(e,t)=>x(Rn,null,function*(){try{if(e==="ADS-JOLI_COIN"){let o=yield Dc.getData();if(!(yield I0(o.joliCoinUseAndCharge.charge))){G.emit(Ut,{paymentResult:"SUCCESS"});return}console.log("show by frequency")}let r=yield tq();if(!r){G.emit(Ut,{paymentResult:"FAILED"});return}let n=Jb({data:{userJolicoin:t.userJoliCoin,joliCoinQuantity:t.joliCoinQuantity,paymentChoices:r.paymentChoices,enableAutoDeduct:r.enableAutoDeduct},buttons:{confirm:{text:t.confirmButtonText,onPress:o=>x(Rn,null,function*(){var i;if(!((i=S.hostUserInfo)!=null&&i.isLogin)){let{data:a}=yield Oc();if(!(a!=null&&a.isLogin)){console.log("login failed");return}}console.log("invokeNativePayment",o),G.emit(Ut,{paymentResult:"SUCCESS"}),n.destroy()})},cancel:{text:t.cancelButtonText,onPress:({type:o})=>{G.emit(Ut,{paymentResult:(o!=null?o:"")==="CANCEL"?"CANCEL":"FAILED"}),n.destroy()}}}});yield T0()}catch(r){console.info("payment failed",r),G.emit(Ut,{paymentResult:"FAILED"})}}));var tq=()=>x(Rn,null,function*(){var t;let{response:e}=yield Ee("/api/joli-coin/balance-detail",{method:"GET",appendHostCookie:!0,responseType:"json"});return(t=e.data)==null?void 0:t.data})});function We(e,t,r){return(t=iq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iq(e){var t=aq(e,"string");return typeof t=="symbol"?t:t+""}function aq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mi(e,t,r){return(t=sq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sq(e){var t=lq(e,"string");return typeof t=="symbol"?t:t+""}function lq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gq(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}function _q(e){return typeof e=="string"}function yq(e){return typeof e=="undefined"}function bq(e){return yq(e)||e===null}function wq(e){return typeof e=="function"}function ew(e){let t=e,r=null,n=function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r||(r=new t(...i)),r};return n.prototype=t.prototype,n}function kn(e){return function(){var t,r;((r=(t=globalThis.VConsole)==null?void 0:t[e])!=null?r:globalThis.console[e])(...arguments)}}function Bi(e,t){return t.map(r=>{if(r==="params"&&e[r]){let n=e[r];return Object.keys(n).reduce((o,i)=>(o[i]=String(n[i]),o),{})}return e[r]})}function Tq(e){let t=e.location?Bi(e.location,D0):null,r=e.target?Bi(e.target,D0):null;return Bi(hq(pq({},e),{location:t,target:r}),Sq)}function Rq(e){let t=e.events.map(n=>Tq(n)),r=Bi(e.device,Iq);return[e.protocolVersion,t,r,e.project]}function kq(){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 Dq(e){return new Promise(t=>ow(e)(t))}function ow(e){return function(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=!1;return e(o=>{if(!n)return n=!0,t.call(r,o)},null)}}function qq(e,t){return(r=>{let n={onWillAddFirstListener(){r(o.fire,o)}},o=new Dn(n);return o.event})(function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e(o=>t(o)&&r.call(n,o),null)})}function Uq(e,t){let r=Math.min(e.length,t.length);for(let n=0;n<r;n++)Mq(e[n],t[n])}function Mq(e,t){if(_q(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(wq(t)){try{if(e instanceof t)return}catch(r){}if(!bq(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 Lc(e,t,r){return(t=Fq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fq(e){var t=jq(e,"string");return typeof t=="symbol"?t:t+""}function jq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fi(e,t,r){return(t=Bq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bq(e){var t=$q(e,"string");return typeof t=="symbol"?t:t+""}function $q(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Et(e,t,r){return(t=Hq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hq(e){var t=Jq(e,"string");return typeof t=="symbol"?t:t+""}function Jq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vq(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Gq(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}function Xq(e,t){return ye(e,0)^45?(((t<<2^ye(e,0))<<2^ye(e,1))<<2^ye(e,2))<<2^ye(e,3):0}function sw(e){return e.trim()}function Zq(e,t){return(e=t.exec(e))?e[0]:e}function j(e,t,r){return e.replace(t,r)}function Yc(e,t){return e.indexOf(t)}function ye(e,t){return e.charCodeAt(t)|0}function qn(e,t,r){return e.slice(t,r)}function ct(e){return e.length}function au(e){return e.length}function ji(e,t){return t.push(e),e}function eL(e,t){return e.map(t).join("")}function ta(e,t,r,n,o,i,a){return{value:e,root:t,parent:r,type:n,props:o,children:i,line:ea,column:Rr,length:a,return:""}}function On(e,t){return Qq(ta("",null,null,"",null,null,0),e,{length:-e.length},t)}function tL(){return ce}function rL(){return ce=qe>0?ye(kr,--qe):0,Rr--,ce===10&&(Rr=1,ea--),ce}function Be(){return ce=qe<lw?ye(kr,qe++):0,Rr++,ce===10&&(Rr=1,ea++),ce}function ut(){return ye(kr,qe)}function $i(){return qe}function Un(e,t){return qn(kr,e,t)}function Ln(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 cw(e){return ea=Rr=1,lw=ct(kr=e),qe=0,[]}function uw(e){return kr="",e}function Hi(e){return sw(Un(qe-1,Qc(e===91?e+2:e===40?e+1:e)))}function nL(e){for(;(ce=ut())&&ce<33;)Be();return Ln(e)>2||Ln(ce)>3?"":" "}function oL(e,t){for(;--t&&Be()&&!(ce<48||ce>102||ce>57&&ce<65||ce>70&&ce<97););return Un(e,$i()+(t<6&&ut()==32&&Be()==32))}function Qc(e){for(;Be();)switch(ce){case e:return qe;case 34:case 39:e!==34&&e!==39&&Qc(ce);break;case 40:e===41&&Qc(e);break;case 92:Be();break}return qe}function iL(e,t){for(;Be()&&e+ce!==57&&!(e+ce===84&&ut()===47););return"/*"+Un(t,qe-1)+"*"+Zi(e===47?e:Be())}function aL(e){for(;!Ln(ut());)Be();return Un(e,qe)}function sL(e){return uw(Ji("",null,null,null,[""],e=cw(e),0,[0],e))}function Ji(e,t,r,n,o,i,a,s,l){for(var c=0,d=0,u=a,h=0,p=0,m=0,g=1,_=1,v=1,y=0,A="",k=o,O=i,I=n,w=A;_;)switch(m=y,y=Be()){case 40:if(m!=108&&ye(w,u-1)==58){Yc(w+=j(Hi(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:w+=Hi(y);break;case 9:case 10:case 13:case 32:w+=nL(m);break;case 92:w+=oL($i()-1,7);continue;case 47:switch(ut()){case 42:case 47:ji(lL(iL(Be(),$i()),t,r),l);break;default:w+="/"}break;case 123*g:s[c++]=ct(w)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:_=0;case 59+d:v==-1&&(w=j(w,/\f/g,"")),p>0&&ct(w)-u&&ji(p>32?U0(w+";",n,r,u-1):U0(j(w," ","")+";",n,r,u-2),l);break;case 59:w+=";";default:if(ji(I=L0(w,t,r,c,d,o,s,A,k=[],O=[],u),i),y===123)if(d===0)Ji(w,t,I,I,k,i,u,s,O);else switch(h===99&&ye(w,3)===110?100:h){case 100:case 108:case 109:case 115:Ji(e,I,I,n&&ji(L0(e,I,I,0,0,o,s,A,o,k=[],u),O),o,O,u,s,n?k:O);break;default:Ji(w,I,I,I,[""],O,0,s,O)}}c=d=p=0,g=v=1,A=w="",u=a;break;case 58:u=1+ct(w),p=m;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&rL()==125)continue}switch(w+=Zi(y),y*g){case 38:v=d>0?1:(w+="\f",-1);break;case 44:s[c++]=(ct(w)-1)*v,v=1;break;case 64:ut()===45&&(w+=Hi(Be())),h=ut(),d=u=ct(A=w+=aL($i())),y++;break;case 45:m===45&&ct(w)==2&&(g=0)}}return i}function L0(e,t,r,n,o,i,a,s,l,c,d){for(var u=o-1,h=o===0?i:[""],p=au(h),m=0,g=0,_=0;m<n;++m)for(var v=0,y=qn(e,u+1,u=Yq(g=a[m])),A=e;v<p;++v)(A=sw(g>0?h[v]+" "+y:j(y,/&\f/g,h[v])))&&(l[_++]=A);return ta(e,t,r,o===0?ou:s,l,c,d)}function lL(e,t,r){return ta(e,t,r,iw,Zi(tL()),qn(e,2,-2),0)}function U0(e,t,r,n){return ta(e,t,r,iu,qn(e,0,n),qn(e,n+1,-1),n)}function Tr(e,t){for(var r="",n=au(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function cL(e,t,r,n){switch(e.type){case zq:if(e.children.length)break;case Wq:case iu:return e.return=e.return||e.value;case iw:return"";case aw:return e.return=e.value+"{"+Tr(e.children,n)+"}";case ou:e.value=e.props.join(",")}return ct(r=Tr(e.children,n))?e.return=e.value+"{"+r+"}":""}function uL(e){var t=au(e);return function(r,n,o,i){for(var a="",s=0;s<t;s++)a+=e[s](r,n,o,i)||"";return a}}function dL(e){return function(t){t.root||(t=t.return)&&e(t)}}function fL(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}function dw(e,t){switch(Xq(e,t)){case 5103:return F+"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 F+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return F+e+Ki+e+Se+e+e;case 6828:case 4268:return F+e+Se+e+e;case 6165:return F+e+Se+"flex-"+e+e;case 5187:return F+e+j(e,/(\w+).+(:[^]+)/,F+"box-$1$2"+Se+"flex-$1$2")+e;case 5443:return F+e+Se+"flex-item-"+j(e,/flex-|-self/,"")+e;case 4675:return F+e+Se+"flex-line-pack"+j(e,/align-content|flex-|-self/,"")+e;case 5548:return F+e+Se+j(e,"shrink","negative")+e;case 5292:return F+e+Se+j(e,"basis","preferred-size")+e;case 6060:return F+"box-"+j(e,"-grow","")+F+e+Se+j(e,"grow","positive")+e;case 4554:return F+j(e,/([^-])(transform)/g,"$1"+F+"$2")+e;case 6187:return j(j(j(e,/(zoom-|grab)/,F+"$1"),/(image-set)/,F+"$1"),e,"")+e;case 5495:case 3959:return j(e,/(image-set\([^]*)/,F+"$1$`$1");case 4968:return j(j(e,/(.+:)(flex-)?(.*)/,F+"box-pack:$3"+Se+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+F+e+e;case 4095:case 3583:case 4068:case 2532:return j(e,/(.+)-inline(.+)/,F+"$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(ct(e)-1-t>6)switch(ye(e,t+1)){case 109:if(ye(e,t+4)!==45)break;case 102:return j(e,/(.+:)(.+)-([^]+)/,"$1"+F+"$2-$3$1"+Ki+(ye(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Yc(e,"stretch")?dw(j(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ye(e,t+1)!==115)break;case 6444:switch(ye(e,ct(e)-3-(~Yc(e,"!important")&&10))){case 107:return j(e,":",":"+F)+e;case 101:return j(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+F+(ye(e,14)===45?"inline-":"")+"box$3$1"+F+"$2$3$1"+Se+"$2box$3")+e}break;case 5936:switch(ye(e,t+11)){case 114:return F+e+Se+j(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return F+e+Se+j(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return F+e+Se+j(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return F+e+Se+e+e}return e}function wL(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function Wi(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return Ft={name:o.name,styles:o.styles,next:Ft},o.name;var i=r;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Ft={name:a.name,styles:a.styles,next:Ft},a=a.next;var s=i.styles+";";return s}return SL(e,t,r)}}var l=r;if(t==null)return l;var c=t[l];return c!==void 0?c:l}function SL(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Wi(e,t,r[o])+";";else for(var i in r){var a=r[i];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?n+=i+"{"+t[s]+"}":F0(s)&&(n+=Uc(i)+":"+j0(i,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)F0(a[l])&&(n+=Uc(i)+":"+j0(i,a[l])+";");else{var c=Wi(e,t,a);switch(i){case"animation":case"animationName":{n+=Uc(i)+":"+c+";";break}default:n+=i+"{"+c+"}"}}}return n}function Mc(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";Ft=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,o+=Wi(r,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=Wi(r,t,e[s]),n){var l=i;o+=l[s]}B0.lastIndex=0;for(var c="",d;(d=B0.exec(o))!==null;)c+="-"+d[1];var u=wL(o)+c;return{name:u,styles:o,next:Ft}}function pw(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}function $0(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function H0(e,t,r){var n=[],o=pw(e,n,r);return n.length<2?r:o+t(n)}function mw(e,t){le.__h&&le.__h(De,e,Xc||t),Xc=0;var r=De.__H||(De.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function OL(e,t){var r=mw(zi++,3);!le.__s&&vw(r.__H,t)&&(r.__=e,r.u=t,De.__H.__h.push(r))}function PL(e){return Xc=5,su(function(){return{current:e}},[])}function su(e,t){var r=mw(zi++,7);return vw(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function NL(){for(var e;e=hw.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Vi),e.__H.__h.forEach(Zc),e.__H.__h=[]}catch(t){e.__H.__h=[],le.__e(t,e.__v)}}function DL(e){var t,r=function(){clearTimeout(n),Q0&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Q0&&(t=requestAnimationFrame(r))}function Vi(e){var t=De,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),De=t}function Zc(e){var t=De;e.__c=e.__(),De=t}function vw(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function ra(){if(jt>1)jt--;else{for(var e,t=!1;Pn!==void 0;){var r=Pn;for(Pn=void 0,eu++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&_w(r))try{r.c()}catch(o){t||(e=o,t=!0)}r=n}}if(eu=0,jt--,t)throw e}}function ze(e){if(jt>0)return e();jt++;try{return e()}finally{ra()}}function gw(e){if(H!==void 0){var t=e.n;if(t===void 0||t.t!==H)return t={i:0,S:e,p:H.s,n:void 0,t:H,e:void 0,x:void 0,r:t},H.s!==void 0&&(H.s.n=t),H.s=t,e.n=t,32&H.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=H.s,t.n=void 0,H.s.n=t,H.s=t),t}}function be(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}function _e(e){return new be(e)}function _w(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function yw(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function bw(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Cr(e){be.call(this,void 0),this.x=e,this.s=void 0,this.g=Yi-1,this.f=4}function Nn(e){return new Cr(e)}function ww(e){var t=e.u;if(e.u=void 0,typeof t=="function"){jt++;var r=H;H=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,lu(e),n}finally{H=r,ra()}}}function lu(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,ww(e)}function LL(e){if(H!==this)throw new Error("Out-of-order effect");bw(this),H=e,this.f&=-2,8&this.f&&lu(this),ra()}function Fn(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}function Or(e){var t=new Fn(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}function Pr(e,t){C[e]=t.bind(null,C[e]||function(){})}function Qi(e){jc&&jc(),jc=e&&e.S()}function Aw(e){var t=this,r=e.data,n=Sw(r);n.value=r;var o=su(function(){for(var s=t,l=t.__v;l=l.__;)if(l.__c){l.__c.__$f|=4;break}var c=Nn(function(){var p=n.value.value;return p===0?0:p===!0?"":p||""}),d=Nn(function(){return!Array.isArray(c.value)&&!Ya(c.value)}),u=Or(function(){if(this.N=Iw,d.value){var p=c.value;s.__v&&s.__v.__e&&s.__v.__e.nodeType===3&&(s.__v.__e.data=p)}}),h=t.__$u.d;return t.__$u.d=function(){u(),h.call(this)},[d,c]},[]),i=o[0],a=o[1];return i.value?a.peek():a.value}function UL(e,t,r,n){var o=t in e&&e.ownerSVGElement===void 0,i=_e(r);return{o:function(a,s){i.value=a,n=s},d:Or(function(){this.N=Iw;var a=i.value.value;n[t]!==a&&(n[t]=a,o?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}function Sw(e){return su(function(){return _e(e)},[])}function jL(){ze(function(){for(var e;e=Ew.shift();)cu.call(e)})}function BL(){Ew.push(this)===1&&(C.requestAnimationFrame||ML)(jL)}function $L(){ze(function(){for(var e;e=xw.shift();)cu.call(e)})}function Iw(){xw.push(this)===1&&(C.requestAnimationFrame||FL)($L)}function HL(e){var t=PL(e);t.current=e,OL(function(){return Or(function(){return this.N=BL,t.current()})},[])}function JL(e,t){let r=Gs(e);Vs(()=>{r.current=e},[e]),Js(()=>{if(t===null)return;let n=setInterval(()=>{r.current()},t);return()=>{clearInterval(n)}},[t])}function he(e,t,r,n,o,i){t||(t={});var a,s,l=t;if("ref"in l)for(s in l={},t)s=="ref"?a=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--VL,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return C.vnode&&C.vnode(c),c}function xt(e,t,r){return(t=nU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nU(e){var t=oU(e,"string");return typeof t=="symbol"?t:t+""}function oU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mt(e,t,r){return(t=iU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iU(e){var t=aU(e,"string");return typeof t=="symbol"?t:t+""}function aU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var C0,rq,nq,oq,Bc,$c,X0,cq,uq,O0,dq,fq,P0,pq,hq,mq,Z0,vq,Eq,xq,N0,Aq,tw,rw,nw,D0,Sq,Iq,Hc,z,Cq,Oq,Cn,Dn,Pq,Vc,Nq,qc,Lq,Gc,q0,Kc,Wc,zc,Kq,Se,Ki,F,iw,ou,iu,Wq,aw,zq,Yq,Zi,Qq,ea,Rr,lw,qe,ce,kr,pL,hL,mL,M0,vL,gL,_L,yL,bL,EL,xL,AL,fw,F0,Uc,j0,B0,Ft,IL,TL,RL,kL,CL,Mn,zi,De,Fc,J0,Xc,hw,le,V0,G0,K0,W0,z0,Y0,Q0,qL,H,Pn,jt,eu,Yi,cu,jc,Ew,xw,ML,FL,Ne,VL,GL,At,tu,ru,Gi,KL,WL,zL,YL,QL,XL,ZL,eU,tU,rU,nu,Xi,zH,Tw=T(()=>{"use strict";nr();Xs();C0=Object.getOwnPropertySymbols,rq=Object.prototype.hasOwnProperty,nq=Object.prototype.propertyIsEnumerable,oq=(e,t)=>{var r={};for(var n in e)rq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&C0)for(var n of C0(e))t.indexOf(n)<0&&nq.call(e,n)&&(r[n]=e[n]);return r};Bc=class{constructor(t){We(this,"context",void 0),We(this,"continueCallback",void 0),We(this,"isBeforeAdCalled",!1),We(this,"isBeforeRewardCalled",!1),We(this,"isAdDismissedCalled",!1),We(this,"isAdViewedCalled",!1),We(this,"isAfterAdCalled",!1),We(this,"currentProvider",void 0),We(this,"currentClientParams",void 0),We(this,"adsHasResponse",!1),We(this,"videoChecker",window.document.createElement("video")),We(this,"wrapShowAdFn",r=>()=>{this.adsHasResponse=!0;let n=!1;this.videoChecker.play().catch(()=>{n=!1}),n=!this.videoChecker.paused,this.videoChecker.pause(),this.context.track("CallShowAdFn",Object.assign({},{userEvent:n},this.paramsToTrack)),r()}),this.context=t}get paramsToTrack(){var t,r,n,o,i,a;return{provider:(r=(t=this.currentProvider)==null?void 0:t.name)!=null?r:null,type:(n=this.currentClientParams)==null?void 0:n.type,name:((o=this.currentClientParams)==null?void 0:o.type)==="preroll"?null:(a=(i=this.currentClientParams)==null?void 0:i.name)!=null?a:""}}wrapBeforeAd(t){return()=>{this.adsHasResponse=!0,this.context.track("CallBeforeAd",this.paramsToTrack),this.isBeforeAdCalled||(this.isBeforeAdCalled=!0,t==null||t())}}wrapBeforeReward(t){return r=>{this.adsHasResponse=!0,this.isBeforeRewardCalled?this.wrapShowAdFn(r)():(this.isBeforeRewardCalled=!0,t==null||t(this.wrapShowAdFn(r)))}}wrapAdDismissed(t){return()=>{this.adsHasResponse=!0,this.isAdDismissedCalled||(this.isAdDismissedCalled=!0,t==null||t())}}wrapAdViewed(t){return()=>{this.adsHasResponse=!0,this.isAdViewedCalled||(this.isAdViewedCalled=!0,t==null||t())}}wrapAfterAd(t){return()=>{this.adsHasResponse=!0,this.context.track("CallAfterAd",this.paramsToTrack),this.isAfterAdCalled||(this.isAfterAdCalled=!0,t==null||t())}}wrapAdBreakDone(t){return r=>{var n,o,i,a,s;switch(this.adsHasResponse=!0,this.context.track("CallAdBreakDone",{provider:(o=(n=this.currentProvider)==null?void 0:n.name)!=null?o:null,breakType:r.breakType,breakName:(i=r.breakName)!=null?i:"",breakFormat:r.breakFormat,breakStatus:r.breakStatus}),r.breakStatus){case"viewed":case"ignored":case"dismissed":case"error":{t==null||t(r),(a=this.continueCallback)==null||a.call(this,[!1,r]);break}default:{(s=this.continueCallback)==null||s.call(this,[!0,r]);break}}}}callAdBreakAndContinue(t,r,n){return x(this,null,function*(){return this.currentProvider=t,this.currentClientParams=r,this.adsHasResponse=!1,new Promise(o=>{this.continueCallback=o;let i;switch(r.type){case"preroll":{i={type:r.type,adBreakDone:this.wrapAdBreakDone(r.adBreakDone)};break}case"reward":{i={name:r.name,type:r.type,beforeAd:this.wrapBeforeAd(r.beforeAd),beforeReward:this.wrapBeforeReward(r.beforeReward),adDismissed:this.wrapAdDismissed(r.adDismissed),adViewed:this.wrapAdViewed(r.adViewed),afterAd:this.wrapAfterAd(r.afterAd),adBreakDone:this.wrapAdBreakDone(r.adBreakDone)};break}default:{i={name:r.name,type:r.type,beforeAd:this.wrapBeforeAd(r.beforeAd),afterAd:this.wrapAfterAd(r.afterAd),adBreakDone:this.wrapAdBreakDone(r.adBreakDone)};break}}window.setTimeout(()=>{var a,s,l,c;this.adsHasResponse||(this.context.track("CallAdBreakTimeout",{type:r.type,provider:(s=(a=this.currentProvider)==null?void 0:a.name)!=null?s:null}),(c=this.continueCallback)==null||c.call(this,[!0,{breakType:r.type,breakName:r.type==="preroll"?"":(l=r.name)!=null?l:"",breakFormat:r.type==="reward"?"reward":"interstitial",breakStatus:"timeout"}]))},5e3),this.context.track("CallAdBreak",this.paramsToTrack),t.adBreak(i,n),window.JoliTesterBridge&&console.log("joli-fullscreen-ad-show")})})}};$c=class{constructor(t){Mi(this,"context",void 0),Mi(this,"adBreakIsShowing",!1),Mi(this,"reportPageJumpOut",()=>{this.context.track("AdBreakJumpOut",{context:"AdsActionDetection"})}),Mi(this,"reportPageHide",()=>{this.context.track("AdBreakHide",{context:"AdsActionDetection"})}),this.context=t,window.addEventListener("visibilitychange",()=>{document.hidden&&this.adBreakIsShowing&&this.reportPageHide()}),window.addEventListener("beforeunload",r=>{this.adBreakIsShowing&&this.reportPageJumpOut()})}},X0=Object.defineProperty,cq=Object.defineProperties,uq=Object.getOwnPropertyDescriptors,O0=Object.getOwnPropertySymbols,dq=Object.prototype.hasOwnProperty,fq=Object.prototype.propertyIsEnumerable,P0=(e,t,r)=>t in e?X0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pq=(e,t)=>{for(var r in t||(t={}))dq.call(t,r)&&P0(e,r,t[r]);if(O0)for(var r of O0(t))fq.call(t,r)&&P0(e,r,t[r]);return e},hq=(e,t)=>cq(e,uq(t)),mq=(e,t)=>{for(var r in t)X0(e,r,{get:t[r],enumerable:!0})},Z0=(e,t,r,n)=>{for(var o=t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=a(o)||o);return o},vq=(e,t,r)=>new Promise((n,o)=>{var i=l=>{try{s(r.next(l))}catch(c){o(c)}},a=l=>{try{s(r.throw(l))}catch(c){o(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,a);s((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}Eq=(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))(Eq||{});xq={log:kn("log"),warn:kn("warn"),info:kn("info"),error:kn("error"),debug:kn("debug")};Object.assign(globalThis,{logger:xq});N0=Symbol.for("Jolibox.canIUseMap"),Aq={};globalThis[N0]||(globalThis[N0]=Aq);tw=(e=>(e[e.System=1e3]="System",e[e.ErrorTrace=1001]="ErrorTrace",e[e.UserDefined=1002]="UserDefined",e))(tw||{}),rw=(e=>(e.MiniGame="mini-game",e.MiniDrama="mini-drama",e.App="app",e.WebSDK="web-sdk",e.AppSDK="app-sdk",e))(rw||{}),nw=(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))(nw||{}),D0=["name","params"],Sq=["name","type","location","target","extra","timestamp","userId"],Iq=["platform","os","appVersion","appId","model","brand","uuid","jsSdkVersion","extra"];kq();navigator.userAgent.includes("iPhone")||navigator.userAgent.includes("iPod")||navigator.userAgent.includes("iPad")||navigator.userAgent.includes("iPhone OS"),navigator.userAgent.includes("Android"),navigator.userAgent.includes("Mac"),navigator.userAgent.includes("FB_IAB"),!navigator.userAgent.includes("iPhone")&&navigator.userAgent.includes("Android");Hc=class Jc{constructor(t){this.element=t,this.next=Jc.Undefined,this.prev=Jc.Undefined}};Hc.Undefined=new Hc(void 0);z=Hc,Cq=class{constructor(){this._first=z.Undefined,this._last=z.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===z.Undefined}clear(){let e=this._first;for(;e!==z.Undefined;){let t=e.next;e.prev=z.Undefined,e.next=z.Undefined,e=t}this._first=z.Undefined,this._last=z.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new z(e);if(this._first===z.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!==z.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==z.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==z.Undefined&&e.next!==z.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===z.Undefined&&e.next===z.Undefined?(this._first=z.Undefined,this._last=z.Undefined):e.next===z.Undefined?(this._last=this._last.prev,this._last.next=z.Undefined):e.prev===z.Undefined&&(this._first=this._first.next,this._first.prev=z.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==z.Undefined;)yield e.element,e=e.next}},Oq=0,Cn=class{constructor(e){this.value=e,this.id=Oq++}},Dn=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 Cn&&(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(){return this._event!=null||(this._event=(e,t)=>{var r,n,o,i,a,s;if(this._disposed)return()=>{console.info("[Jolibox SDK] Emitter is _disposed")};t&&(e=e.bind(t));let l=new Cn(e);return this._listeners?this._listeners instanceof Cn?this._listeners=[this._listeners,l]:this._listeners.push(l):((n=(r=this.options)==null?void 0:r.onWillAddFirstListener)==null||n.call(r,this),this._listeners=l,(i=(o=this.options)==null?void 0:o.onDidFirstListener)==null||i.call(o,this)),(s=(a=this.options)==null?void 0:a.onDidAddListener)==null||s.call(a,this),this._size++,()=>{var c,d,u,h;if(!this._disposed){if(this._listeners instanceof Cn)this._listeners.id===l.id&&(this._listeners=void 0,this._size=0,(d=(c=this.options)==null?void 0:c.onDidRemoveLastListener)==null||d.call(c));else if(this._listeners){let p=this._listeners.indexOf(l);p>=0&&(this._listeners.splice(p,1),this._size--,this._size===0&&((h=(u=this.options)==null?void 0:u.onDidRemoveLastListener)==null||h.call(u)))}}}}),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 Cn?this._deliver(this._listeners,e):this._listeners.forEach(t=>this._deliver(t,e)))}hasListeners(){return this._size>0}},Pq=class{constructor(){this.listeners=new Map,this.listerHandlerMap=new WeakMap,this.cachedEventQueue=new Map}on(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;var n;let o=(n=this.listeners.get(e))!=null?n:new Dn,i=l=>t(...l.args),a=o.event(i);this.listerHandlerMap.set(t,{handler:i,dispose:a}),this.listeners.set(e,o);let s=this.cachedEventQueue.get(e);if(s&&r)for(let l of s)t(...l.args)}flushCachedEvent(e){e?this.cachedEventQueue.delete(e):this.cachedEventQueue.clear()}off(e,t){let r=this.listerHandlerMap.get(t);r&&(r.dispose(),this.listerHandlerMap.delete(t))}emit(e){let t=this.listeners.get(e),r=this.cachedEventQueue.get(e);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];r||(r=new Cq,this.cachedEventQueue.set(e,r)),r.push({args:o}),t&&t.fire({event:e,args:o})}once(e,t){var r=this;let n=function(){t(...arguments),r.off(e,n)};this.on(e,n,!1)}},Vc={};mq(Vc,{None:()=>Nq,filter:()=>qq,once:()=>ow,toPromise:()=>Dq});Nq=()=>(console.log("[Jolibox SDK] None Event"),()=>{console.log("[Jolibox SDK] None Event dispose")});qc=Symbol.for("Jolibox.hostEmitter"),Lq=()=>{let e=new Pq;return globalThis[qc]||(globalThis[qc]={on:e.on.bind(e),off:e.off.bind(e),emit:e.emit.bind(e),once:e.once.bind(e)}),globalThis[qc]};Lq();Gc=class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Dn,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(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return Uq(i,r),n(...i)}}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}};Gc=Z0([ew],Gc);q0=class{constructor(){this._onWillExecuteCommand=new Dn,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._onDidExecuteCommand=new Dn,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this.registry=new Gc,this._starActivation=null}_activateStar(){return this._starActivation||(this._starActivation=gq(3e4)),this._starActivation}executeCommand(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return vq(this,null,function*(){return this.registry.getCommand(e)?this._tryExecuteCommand(e,r):(yield Promise.all([Promise.race([this._activateStar(),Vc.toPromise(Vc.filter(this.registry.onDidRegisterCommand,o=>o===e))])]),this._tryExecuteCommand(e,r))})}executeCommandThowErr(e){if(!this.registry.getCommand(e))throw new Error(`command '${e}' not found`);let t=this.registry.getCommand(e);for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this._onWillExecuteCommand.fire({commandId:e,args:n});let i=this.invokeFunction(t.handler,...n);return this._onDidExecuteCommand.fire({commandId:e,args:n}),i}_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){try{for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e(...r)}finally{}}};q0=Z0([ew],q0);Kc=class{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"GAME";Lc(this,"context",void 0),Lc(this,"placement","GAME"),Lc(this,"contextInfo",void 0),this.context=t,this.placement=r,this.contextInfo=this.context.getContextInfo()}getLocation(){let t=new URLSearchParams(window.location.search),r={};return t.forEach((n,o)=>{r[o]=n}),{name:this.placement==="GAME"?"GamePage":"DramaPage",params:r}}getDevice(){var t,r,n,o;return{platform:(t=this.contextInfo.platform)!=null?t:nw.WebSDK,os:this.contextInfo.osType+"_"+this.contextInfo.runtimeType,appVersion:"1.0.0",appId:(r=this.contextInfo.hostAppId)!=null?r:"1",model:(n=this.contextInfo.deviceModel)!=null?n:"UnknownModel",brand:(o=this.contextInfo.deviceBrand)!=null?o:"UnknownBrand",uuid:this.contextInfo.deviceId,jsSdkVersion:"1.0.0",extra:{}}}serialize(t,r){var n;let o={protocolVersion:"1.0.0",events:[{name:t,type:tw.System,location:this.getLocation(),target:null,extra:r,timestamp:Date.now(),userId:(n=this.contextInfo.userId)!=null?n:null}],device:this.getDevice(),project:rw.WebSDK};return Rq(o)}};Wc=class{constructor(t){Fi(this,"configs",null),Fi(this,"firstRun",!0),Fi(this,"context",void 0),Fi(this,"contextInfo",void 0),this.context=t,this.contextInfo=this.context.getContextInfo(),this.init()}init(){return x(this,null,function*(){try{this.configs=yield this.context.httpClient.get("/api/fe-configs/js-sdk/ads-channel-config",{})}catch(t){}})}shouldBypassCallingInterstitial(){var t,r;let n;if(!this.configs)this.init(),n=!this.firstRun;else{let o=(t=this.contextInfo.channel)!=null?t:"",i=this.configs[o],a=(r=i==null?void 0:i.interstitialRate)!=null?r:1;n=Math.random()<a}return this.firstRun=!1,n}};zc=class{constructor(t,r){Et(this,"name","ADSENSE"),Et(this,"context",void 0),Et(this,"contextInfo",void 0),Et(this,"configured",!1),Et(this,"initParams",void 0),Et(this,"push",function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};window.adsbygoogle.push(n)}),Et(this,"adConfig",n=>{let o=n,{onReady:i}=o,a=oq(o,["onReady"]);this.context.track("CallAdConfig",a),this.configured?console.warn("Ad config already set, skipping"):(this.configured=!0,this.push(n))}),Et(this,"adBreak",n=>{if(!this.contextInfo.objectId){console.warn("Game ID is not set, skip calling adBreak");return}this.push(n)}),Et(this,"adUnit",n=>x(this,null,function*(){var o,i,a,s;if(this.context.track("CallAdUnit",{adFormat:(i=(o=n.adFormat)==null?void 0:o.toString())!=null?i:null,fullWidthResponsive:(a=n.fullWidthResponsive)!=null?a:null}),document.querySelector("#jolibox-ads")){console.warn("Ad unit already set, skipping");return}let{el:l,slot:c,adFormat:d,fullWidthResponsive:u,style:h}=n,p;if(!l)throw new Error("targeting element is required");if(typeof l=="string"?p=document.querySelector(l):p=l,!p)throw new Error("targeting element not found");let m=c;if(m||(m=this.initParams.unitId),!m)throw new Error("slot is required");let g=typeof d=="object"&&Array.isArray(d)?d.join(", "):d,_=document.createElement("ins");if(_.className="adsbygoogle",_.id="jolibox-ads",_.style.display="block",_.setAttribute("data-ad-client",this.initParams.clientId),_.setAttribute("data-ad-slot",m),g&&_.setAttribute("data-ad-format",g),u&&_.setAttribute("data-full-width-responsive",u),h&&_.setAttribute("style",h),(s=this.contextInfo.testAdsMode)!=null?s:!1){let v=document.createElement("div");v.style.position="absolute",v.style.top="0",v.style.left="0",v.style.width="100%",v.style.height="100%",v.style.display="flex",v.style.justifyContent="center",v.style.alignItems="center",v.style.backgroundColor="rgba(0, 0, 0, 0.5)",v.style.color="white",v.innerHTML="Test Ad",_.style.position="relative",p.appendChild(_),_.appendChild(v)}else p.appendChild(_),new MutationObserver(v=>{v.forEach(y=>{if(y.type==="attributes"&&y.attributeName==="data-ad-status"){let A=_.getAttribute("data-ad-status");this.context.track("AdSenseUnitStatusChanged",{status:A!=null?A:"null"})}})}).observe(_,{attributes:!0,attributeFilter:["data-ad-status"]}),this.push({})})),this.context=t,this.contextInfo=this.context.getContextInfo(),this.initParams=r,window.adsbygoogle=window.adsbygoogle||[]}init(){return x(this,null,function*(){var t;if(this.context.track("CallAdsInit",{provider:this.name}),typeof window=="undefined")return;let r="google-adsense",n=(t=this.contextInfo.testAdsMode)!=null?t:!1;if(!document.getElementById(r)&&this.initParams.clientId){let o=document.createElement("script");o.id=r,o.async=!0,o.crossOrigin="anonymous",o.src=`https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=${this.initParams.clientId}`,n&&o.setAttribute("data-adbreak-test","on"),this.initParams.channelId&&o.setAttribute("data-ad-channel",this.initParams.channelId),document.head.appendChild(o),this.context.track("LoadAdsenseCompleted",null)}})}};Kq=function(){function e(r){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=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Gq(this));var n=this.tags[this.tags.length-1];if(this.isSpeedy){var o=Vq(n);try{o.insertRule(r,o.cssRules.length)}catch(i){}}else n.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var n;return(n=r.parentNode)==null?void 0:n.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Se="-ms-",Ki="-moz-",F="-webkit-",iw="comm",ou="rule",iu="decl",Wq="@import",aw="@keyframes",zq="@layer",Yq=Math.abs,Zi=String.fromCharCode,Qq=Object.assign;ea=1,Rr=1,lw=0,qe=0,ce=0,kr="";pL=function(e,t,r){for(var n=0,o=0;n=o,o=ut(),n===38&&o===12&&(t[r]=1),!Ln(o);)Be();return Un(e,qe)},hL=function(e,t){var r=-1,n=44;do switch(Ln(n)){case 0:n===38&&ut()===12&&(t[r]=1),e[r]+=pL(qe-1,t,r);break;case 2:e[r]+=Hi(n);break;case 4:if(n===44){e[++r]=ut()===58?"&\f":"",t[r]=e[r].length;break}default:e[r]+=Zi(n)}while(n=Be());return e},mL=function(e,t){return uw(hL(cw(e),t))},M0=new WeakMap,vL=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!M0.get(r))&&!n){M0.set(e,!0);for(var o=[],i=mL(t,o),a=r.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},gL=function(e){if(e.type==="decl"){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return="",e.value="")}};_L=function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case iu:e.return=dw(e.value,e.length);break;case aw:return Tr([On(e,{value:j(e.value,"@","@"+F)})],n);case ou:if(e.length)return eL(e.props,function(o){switch(Zq(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Tr([On(e,{props:[j(o,/:(read-\w+)/,":"+Ki+"$1")]})],n);case"::placeholder":return Tr([On(e,{props:[j(o,/:(plac\w+)/,":"+F+"input-$1")]}),On(e,{props:[j(o,/:(plac\w+)/,":"+Ki+"$1")]}),On(e,{props:[j(o,/:(plac\w+)/,Se+"input-$1")]})],n)}return""})}},yL=[_L],bL=function(e){var t=e.key;if(t==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var g=m.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var n=e.stylisPlugins||yL,o={},i,a=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(m){for(var g=m.getAttribute("data-emotion").split(" "),_=1;_<g.length;_++)o[g[_]]=!0;a.push(m)});var s,l=[vL,gL];{var c,d=[cL,dL(function(m){c.insert(m)})],u=uL(l.concat(n,d)),h=function(m){return Tr(sL(m),u)};s=function(m,g,_,v){c=_,h(m?m+"{"+g.styles+"}":g.styles),v&&(p.inserted[g.name]=!0)}}var p={key:t,sheet:new Kq({key:t,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:s};return p.sheet.hydrate(a),p};EL={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},xL=/[A-Z]|^ms/g,AL=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fw=function(e){return e.charCodeAt(1)===45},F0=function(e){return e!=null&&typeof e!="boolean"},Uc=fL(function(e){return fw(e)?e:e.replace(xL,"-$&").toLowerCase()}),j0=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(AL,function(r,n,o){return Ft={name:n,styles:o,next:Ft},n})}return EL[e]!==1&&!fw(e)&&typeof t=="number"&&t!==0?t+"px":t};B0=/label:\s*([^\s;{]+)\s*(;|$)/g;IL=function(e,t,r){var n=e.key+"-"+t.name;e.registered[n]===void 0&&(e.registered[n]=t.styles)},TL=function(e,t,r){IL(e,t);var n=e.key+"-"+t.name;if(e.inserted[t.name]===void 0){var o=t;do e.insert(t===o?"."+n:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};RL=function(e){var t=bL(e);t.sheet.speedy=function(a){this.isSpeedy=a},t.compat=!0;var r=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Mc(s,t.registered,void 0);return TL(t,c),t.key+"-"+c.name},n=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Mc(s,t.registered),d="animation-"+c.name;return $0(t,{name:c.name,styles:"@keyframes "+d+"{"+c.styles+"}"}),d},o=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Mc(s,t.registered);$0(t,c)},i=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return H0(t.registered,r,kL(s))};return{css:r,cx:i,injectGlobal:o,keyframes:n,hydrate:function(a){a.forEach(function(s){t.inserted[s]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:pw.bind(null,t.registered),merge:H0.bind(null,t.registered,r)}},kL=function e(t){for(var r="",n=0;n<t.length;n++){var o=t[n];if(o!=null){var i=void 0;switch(typeof o){case"boolean":break;case"object":{if(Array.isArray(o))i=e(o);else{i="";for(var a in o)o[a]&&a&&(i&&(i+=" "),i+=a)}break}default:i=o}i&&(r&&(r+=" "),r+=i)}}return r},CL=RL({key:"css"}),Mn=CL.css,Xc=0,hw=[],le=C,V0=le.__b,G0=le.__r,K0=le.diffed,W0=le.__c,z0=le.unmount,Y0=le.__;le.__b=function(e){De=null,V0&&V0(e)},le.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Y0&&Y0(e,t)},le.__r=function(e){G0&&G0(e),zi=0;var t=(De=e.__c).__H;t&&(Fc===De?(t.__h=[],De.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.forEach(Vi),t.__h.forEach(Zc),t.__h=[],zi=0)),Fc=De},le.diffed=function(e){K0&&K0(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(hw.push(t)!==1&&J0===le.requestAnimationFrame||((J0=le.requestAnimationFrame)||DL)(NL)),t.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Fc=De=null},le.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Vi),r.__h=r.__h.filter(function(n){return!n.__||Zc(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],le.__e(n,r.__v)}}),W0&&W0(e,t)},le.unmount=function(e){z0&&z0(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Vi(n)}catch(o){t=o}}),r.__H=void 0,t&&le.__e(t,r.__v))};Q0=typeof requestAnimationFrame=="function";qL=Symbol.for("preact-signals");H=void 0,Pn=void 0,jt=0,eu=0,Yi=0;be.prototype.brand=qL;be.prototype.h=function(){return!0};be.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};be.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}};be.prototype.subscribe=function(e){var t=this;return Or(function(){var r=t.value,n=H;H=void 0;try{e(r)}finally{H=n}})};be.prototype.valueOf=function(){return this.value};be.prototype.toString=function(){return this.value+""};be.prototype.toJSON=function(){return this.value};be.prototype.peek=function(){var e=H;H=void 0;try{return this.value}finally{H=e}};Object.defineProperty(be.prototype,"value",{get:function(){var e=gw(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(eu>100)throw new Error("Cycle detected");this.v=e,this.i++,Yi++,jt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{ra()}}}});(Cr.prototype=new be).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Yi))return!0;if(this.g=Yi,this.f|=1,this.i>0&&!_w(this))return this.f&=-2,!0;var e=H;try{yw(this),H=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return H=e,bw(this),this.f&=-2,!0};Cr.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}be.prototype.S.call(this,e)};Cr.prototype.U=function(e){if(this.t!==void 0&&(be.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};Cr.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(Cr.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=gw(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});Fn.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};Fn.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ww(this),yw(this),jt++;var e=H;return H=this,LL.bind(this,e)};Fn.prototype.N=function(){2&this.f||(this.f|=2,this.o=Pn,Pn=this)};Fn.prototype.d=function(){this.f|=8,1&this.f||lu(this)};Ew=[],xw=[];Or(function(){cu=this.N})();Aw.displayName="_st";Object.defineProperties(be.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Aw},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});Pr("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var o in n)if(o!=="children"){var i=n[o];i instanceof be&&(r||(t.__np=r={}),r[o]=i,n[o]=i.peek())}}e(t)});Pr("__r",function(e,t){Qi();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(o){var i;return Or(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i}())),Qi(r),e(t)});Pr("__e",function(e,t,r,n){Qi(),e(t,r,n)});Pr("diffed",function(e,t){Qi();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,o=t.props;if(n){var i=r.U;if(i)for(var a in i){var s=i[a];s!==void 0&&!(a in n)&&(s.d(),i[a]=void 0)}else i={},r.U=i;for(var l in n){var c=i[l],d=n[l];c===void 0?(c=UL(r,l,d,o),i[l]=c):c.o(d,o)}}}e(t)});Pr("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var o in n){var i=n[o];i&&i.d()}}}}else{var a=t.__c;if(a){var s=a.__$u;s&&(a.__$u=void 0,s.d())}}e(t)});Pr("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)});Ue.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u,n=r&&r.s!==void 0;for(var o in t)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){var i=2&this.__$f;if(!(n||i||4&this.__$f)||1&this.__$f)return!0}else if(!(n||4&this.__$f)||3&this.__$f)return!0;for(var a in e)if(a!=="__source"&&e[a]!==this.props[a])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};ML=typeof requestAnimationFrame=="undefined"?setTimeout:function(e){var t=function(){clearTimeout(r),cancelAnimationFrame(n),e()},r=setTimeout(t,100),n=requestAnimationFrame(t)},FL=function(e){queueMicrotask(function(){queueMicrotask(e)})};Ne=Mn`
422
422
  inset: 0;
423
423
  clear: none;
424
424
  float: none;
@@ -563,7 +563,7 @@ or `);this.errors.push(i)}return n}},Ri=class extends ae{constructor(...t){super
563
563
  width: 100%;
564
564
  height: 100%;
565
565
  }
566
- `,rU=e=>{let{state:t}=e,{afterAd:r,adDismissed:n,adViewed:o,adBreakDone:i,adLoaded:a,visible:s,countdown:l,src:c,mode:d}=t,u=un(()=>XL(),[]),h=m=>{var g,_,v,y;s.value=!1,m==="dismiss"?(g=n.value)==null||g.call(n):m==="viewed"&&((_=o.value)==null||_.call(o)),(v=r.value)==null||v.call(r),(y=i.value)==null||y.call(i)},p=()=>{var m;(d.value==="reward"||d.value==="rewarded_insterstitial")&&setTimeout(()=>{u.startTimer()},100),(m=a.value)==null||m.call(a)};return s.value?he("div",{className:tU,children:[he(ZL,{mode:d.value,onClose:h,countdown:l.value,state:u}),s.value&&he("iframe",{src:c.value,onLoad:p,sandbox:"allow-scripts allow-same-origin allow-forms allow-modals allow-downloads allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation allow-top-navigation allow-top-navigation-by-user-activation allow-top-navigation-to-custom-protocols"}),he(YL,{})]}):null};nu=class{constructor(t,r){xt(this,"name","OKSPIN"),xt(this,"initialized",!1),xt(this,"initCompleter",null),xt(this,"context",void 0),xt(this,"initParams",void 0),xt(this,"adsOverlay",null),xt(this,"adsIsShowing",!1),xt(this,"lastUnDisplayedAdBreak",null),xt(this,"state",eU()),this.context=t,this.initParams=r}init(){return x(this,null,function*(){var t;this.adsOverlay=document.createElement("div"),this.adsOverlay.setAttribute("data-placement-info","afg"),qm(he(rU,{state:this.state}),this.adsOverlay),document.documentElement.appendChild(this.adsOverlay),this.initialized=!0,(t=this.initCompleter)==null||t.call(this)})}adConfig(t){var r;if(this.initialized){(r=t.onReady)==null||r.call(t);return}this.initCompleter=()=>{var n;(n=t.onReady)==null||n.call(t)}}adBreak(t,r){return x(this,null,function*(){var n,o,i,a,s,l,c,d;if(!this.initialized||!this.adsOverlay||!r.params.url){(n=t.adBreakDone)==null||n.call(t,{breakType:t.type,breakName:t.type==="preroll"?"":t.name,breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"notReady"});return}if(this.adsIsShowing){(o=t.adBreakDone)==null||o.call(t,{breakType:t.type,breakName:t.type==="preroll"?"":t.name,breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"frequencyCapped"});return}switch(t.type){case"preroll":{(i=t.adBreakDone)==null||i.call(t,{breakType:t.type,breakName:"",breakFormat:"interstitial",breakStatus:"noAdPreloaded"});break}case"start":case"browse":case"next":case"pause":{(a=t.beforeAd)==null||a.call(t);let u=()=>{var p;this.adsIsShowing=!1,(p=t.afterAd)==null||p.call(t)},h=()=>{var p;this.adsIsShowing=!1,(p=t.adBreakDone)==null||p.call(t,{breakType:t.type,breakName:t.name,breakFormat:"interstitial",breakStatus:"viewed"})};ze(()=>{this.adsIsShowing=!0,this.state.afterAd.value=u,this.state.adBreakDone.value=h,this.state.src.value=r.params.url,this.state.mode.value="interstitial",this.state.visible.value=!0});break}case"reward":{this.lastUnDisplayedAdBreak&&((l=(s=this.lastUnDisplayedAdBreak).adBreakDone)==null||l.call(s,{breakType:this.lastUnDisplayedAdBreak.type,breakName:this.lastUnDisplayedAdBreak.type==="preroll"?"":this.lastUnDisplayedAdBreak.name,breakFormat:this.lastUnDisplayedAdBreak.type==="reward"?"reward":"interstitial",breakStatus:"ignored"}),this.lastUnDisplayedAdBreak=null),(c=t.beforeAd)==null||c.call(t);let u=()=>{var v;this.adsIsShowing=!1,(v=t.afterAd)==null||v.call(t)},h={breakType:t.type,breakName:t.name,breakFormat:"reward",breakStatus:"ignored"},p=()=>{var v;this.adsIsShowing=!1,h.breakStatus="dismissed",(v=t.adDismissed)==null||v.call(t)},m=()=>{var v;this.adsIsShowing=!1,h.breakStatus="viewed",(v=t.adViewed)==null||v.call(t)},g=()=>{var v;this.adsIsShowing=!1,(v=t.adBreakDone)==null||v.call(t,h)};ze(()=>{this.state.afterAd.value=u,this.state.adDismissed.value=p,this.state.adViewed.value=m,this.state.adBreakDone.value=g});let _=()=>{var v;if(this.lastUnDisplayedAdBreak=null,!this.adsOverlay){(v=t.adBreakDone)==null||v.call(t,{breakType:t.type,breakName:t.name,breakFormat:"reward",breakStatus:"notReady"});return}this.adsIsShowing=!0,ze(()=>{var y;this.state.countdown.value=(y=r.params.countdown)!=null?y:15,this.state.src.value=r.params.url,this.state.mode.value="reward",this.state.visible.value=!0})};this.lastUnDisplayedAdBreak=t,(d=t.beforeReward)==null||d.call(t,_);break}}})}};Xi=class{constructor(t){if(Qt(this,"context",void 0),Qt(this,"contextInfo",void 0),Qt(this,"providers",{}),Qt(this,"channelPolicy",void 0),Qt(this,"adsActionDetection",void 0),Qt(this,"adsTrackSerializer",void 0),Qt(this,"initialized",!1),t)this.context=t,this.channelPolicy=new Wc(this.context),this.adsActionDetection=new $c(this.context),this.adsTrackSerializer=new Kc(this.context),this.contextInfo=this.context.getContextInfo();else throw new Error("JoliboxAdsForGame requires a configuration object")}getRequestContextData(t){var r,n;return{report:JSON.stringify(this.adsTrackSerializer.serialize(t,{sessionId:this.contextInfo.sessionId,objectType:this.contextInfo.objectType,objectId:this.contextInfo.objectId,testAdsMode:this.contextInfo.testAdsMode})),osType:this.contextInfo.osType,runtimeType:this.contextInfo.runtimeType,sessionId:this.contextInfo.sessionId,deviceId:this.contextInfo.deviceId,adId:this.contextInfo.adId,deviceModel:(r=this.contextInfo.deviceModel)!=null?r:"UnknownModel",deviceBrand:(n=this.contextInfo.deviceBrand)!=null?n:"UnknownBrand"}}getRequestBizParams(){return{objectType:this.contextInfo.objectType,objectId:this.contextInfo.objectId}}init(t){return x(this,null,function*(){window.adsbygoogle=window.adsbygoogle||[];let{data:r}=yield this.context.httpClient.post("/api/ads/init",{data:{contextData:this.getRequestContextData("AdsAFGSDKInit"),bizParams:this.getRequestBizParams(),testAdsMode:this.contextInfo.testAdsMode}});if((r==null?void 0:r.length)>0)for(let n of r)switch(n.provider){case"ADSENSE":{let o=new zc(this.context,n.params);yield o.init(),this.providers.ADSENSE=o;break}case"OKSPIN":{let o=new nu(this.context,n.params);yield o.init(),this.providers.OKSPIN=o;break}}this.initialized=!0})}adConfig(t){this.providers.ADSENSE?this.providers.ADSENSE.adConfig(t):window.adsbygoogle.push(t)}adBreak(t){return x(this,null,function*(){var r,n,o,i,a,s,l,c,d;if((r=this.context.eventEmitter)==null||r.emit("isAdShowing",!0),this.adsActionDetection.adBreakIsShowing=!0,this.initialized||(yield this.init()),t.type!=="reward"&&!this.channelPolicy.shouldBypassCallingInterstitial()){(n=t.adBreakDone)==null||n.call(t,{breakType:t.type,breakName:"skipInterstitials",breakFormat:"interstitial",breakStatus:"viewed"});return}this.context.checkNetwork()||(o=t.adBreakDone)==null||o.call(t,{breakType:t.type,breakName:"NETWORK_NOT_OK",breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"});try{let{data:u,code:h}=yield this.context.httpClient.post("/api/ads/info",{data:{contextData:this.getRequestContextData("AdsAFGSDKAdBreak"),bizParams:this.getRequestBizParams(),adsType:t.type==="reward"?"REWARD":"INTERSTITIAL",testAdsMode:this.contextInfo.testAdsMode,name:t.type==="preroll"?"":t.name}});if(h!=="SUCCESS"){(i=t.adBreakDone)==null||i.call(t,{breakType:t.type,breakName:"UNKNOWN_ERROR",breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"});return}else{let p=u;if(p.length===0){(a=t.adBreakDone)==null||a.call(t,{breakType:t.type,breakName:"NO_ADS",breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"});return}let m=!0,g=null,_=new Bc(this.context);for(;p.length>0;){let v=p.shift(),y=this.providers[v.provider];if(y){let[A,k]=yield _.callAdBreakAndContinue(y,t,v);m=A,g=k}else m=!0,g={breakType:t.type,breakName:t.type==="preroll"?"":(s=t.name)!=null?s:"",breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"notReady"};if(!m)break}m&&g&&((l=t.adBreakDone)==null||l.call(t,g))}}catch(u){(c=t.adBreakDone)==null||c.call(t,{breakType:t.type,breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"})}finally{(d=this.context.eventEmitter)==null||d.emit("isAdShowing",!1),this.adsActionDetection.adBreakIsShowing=!1}})}adUnit(t){console.warn("This method has been deprecated. We will not support AdSense AdUnit in the future.")}},zH=Mn`
566
+ `,rU=e=>{let{state:t}=e,{afterAd:r,adDismissed:n,adViewed:o,adBreakDone:i,adLoaded:a,visible:s,countdown:l,src:c,mode:d}=t,u=un(()=>XL(),[]),h=m=>{var g,_,v,y;s.value=!1,m==="dismiss"?(g=n.value)==null||g.call(n):m==="viewed"&&((_=o.value)==null||_.call(o)),(v=r.value)==null||v.call(r),(y=i.value)==null||y.call(i)},p=()=>{var m;(d.value==="reward"||d.value==="rewarded_insterstitial")&&setTimeout(()=>{u.startTimer()},100),(m=a.value)==null||m.call(a)};return s.value?he("div",{className:tU,children:[he(ZL,{mode:d.value,onClose:h,countdown:l.value,state:u}),s.value&&he("iframe",{src:c.value,onLoad:p,sandbox:"allow-scripts allow-same-origin allow-forms allow-modals allow-downloads allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation allow-top-navigation allow-top-navigation-by-user-activation allow-top-navigation-to-custom-protocols"}),he(YL,{})]}):null};nu=class{constructor(t,r){xt(this,"name","OKSPIN"),xt(this,"initialized",!1),xt(this,"initCompleter",null),xt(this,"context",void 0),xt(this,"initParams",void 0),xt(this,"adsOverlay",null),xt(this,"adsIsShowing",!1),xt(this,"lastUnDisplayedAdBreak",null),xt(this,"state",eU()),this.context=t,this.initParams=r}init(){return x(this,null,function*(){var t;this.adsOverlay=document.createElement("div"),this.adsOverlay.setAttribute("data-placement-info","afg"),qm(he(rU,{state:this.state}),this.adsOverlay),document.documentElement.appendChild(this.adsOverlay),this.initialized=!0,(t=this.initCompleter)==null||t.call(this)})}adConfig(t){var r;if(this.initialized){(r=t.onReady)==null||r.call(t);return}this.initCompleter=()=>{var n;(n=t.onReady)==null||n.call(t)}}adBreak(t,r){return x(this,null,function*(){var n,o,i,a,s,l,c,d;if(!this.initialized||!this.adsOverlay||!r.params.url){(n=t.adBreakDone)==null||n.call(t,{breakType:t.type,breakName:t.type==="preroll"?"":t.name,breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"notReady"});return}if(this.adsIsShowing){(o=t.adBreakDone)==null||o.call(t,{breakType:t.type,breakName:t.type==="preroll"?"":t.name,breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"frequencyCapped"});return}switch(t.type){case"preroll":{(i=t.adBreakDone)==null||i.call(t,{breakType:t.type,breakName:"",breakFormat:"interstitial",breakStatus:"noAdPreloaded"});break}case"start":case"browse":case"next":case"pause":{(a=t.beforeAd)==null||a.call(t);let u=()=>{var p;this.adsIsShowing=!1,(p=t.afterAd)==null||p.call(t)},h=()=>{var p;this.adsIsShowing=!1,(p=t.adBreakDone)==null||p.call(t,{breakType:t.type,breakName:t.name,breakFormat:"interstitial",breakStatus:"viewed"})};ze(()=>{this.adsIsShowing=!0,this.state.afterAd.value=u,this.state.adBreakDone.value=h,this.state.src.value=r.params.url,this.state.mode.value="interstitial",this.state.visible.value=!0});break}case"reward":{this.lastUnDisplayedAdBreak&&((l=(s=this.lastUnDisplayedAdBreak).adBreakDone)==null||l.call(s,{breakType:this.lastUnDisplayedAdBreak.type,breakName:this.lastUnDisplayedAdBreak.type==="preroll"?"":this.lastUnDisplayedAdBreak.name,breakFormat:this.lastUnDisplayedAdBreak.type==="reward"?"reward":"interstitial",breakStatus:"ignored"}),this.lastUnDisplayedAdBreak=null),(c=t.beforeAd)==null||c.call(t);let u=()=>{var v;this.adsIsShowing=!1,(v=t.afterAd)==null||v.call(t)},h={breakType:t.type,breakName:t.name,breakFormat:"reward",breakStatus:"ignored"},p=()=>{var v;this.adsIsShowing=!1,h.breakStatus="dismissed",(v=t.adDismissed)==null||v.call(t)},m=()=>{var v;this.adsIsShowing=!1,h.breakStatus="viewed",(v=t.adViewed)==null||v.call(t)},g=()=>{var v;this.adsIsShowing=!1,(v=t.adBreakDone)==null||v.call(t,h)};ze(()=>{this.state.afterAd.value=u,this.state.adDismissed.value=p,this.state.adViewed.value=m,this.state.adBreakDone.value=g});let _=()=>{var v;if(this.lastUnDisplayedAdBreak=null,!this.adsOverlay){(v=t.adBreakDone)==null||v.call(t,{breakType:t.type,breakName:t.name,breakFormat:"reward",breakStatus:"notReady"});return}this.adsIsShowing=!0,ze(()=>{var y;this.state.countdown.value=(y=r.params.countdown)!=null?y:15,this.state.src.value=r.params.url,this.state.mode.value="reward",this.state.visible.value=!0})};this.lastUnDisplayedAdBreak=t,(d=t.beforeReward)==null||d.call(t,_);break}}})}};Xi=class{constructor(t){if(Mt(this,"context",void 0),Mt(this,"contextInfo",void 0),Mt(this,"providers",{}),Mt(this,"channelPolicy",void 0),Mt(this,"adsActionDetection",void 0),Mt(this,"adsTrackSerializer",void 0),Mt(this,"initialized",!1),Mt(this,"initializedTimeStamp",Date.now()),t)this.context=t,this.channelPolicy=new Wc(this.context),this.adsActionDetection=new $c(this.context),this.adsTrackSerializer=new Kc(this.context),this.contextInfo=this.context.getContextInfo();else throw new Error("JoliboxAdsForGame requires a configuration object")}getRequestContextData(t){var r,n;return{report:JSON.stringify(this.adsTrackSerializer.serialize(t,{sessionId:this.contextInfo.sessionId,objectType:this.contextInfo.objectType,objectId:this.contextInfo.objectId,testAdsMode:this.contextInfo.testAdsMode})),osType:this.contextInfo.osType,runtimeType:this.contextInfo.runtimeType,sessionId:this.contextInfo.sessionId,deviceId:this.contextInfo.deviceId,adId:this.contextInfo.adId,deviceModel:(r=this.contextInfo.deviceModel)!=null?r:"UnknownModel",deviceBrand:(n=this.contextInfo.deviceBrand)!=null?n:"UnknownBrand"}}getRequestBizParams(){return{objectType:this.contextInfo.objectType,objectId:this.contextInfo.objectId}}init(t){return x(this,null,function*(){window.adsbygoogle=window.adsbygoogle||[];let{data:r}=yield this.context.httpClient.post("/api/ads/init",{data:{contextData:this.getRequestContextData("AdsAFGSDKInit"),bizParams:this.getRequestBizParams(),testAdsMode:this.contextInfo.testAdsMode}});if((r==null?void 0:r.length)>0)for(let n of r)switch(n.provider){case"ADSENSE":{let o=new zc(this.context,n.params);yield o.init(),this.providers.ADSENSE=o;break}case"OKSPIN":{let o=new nu(this.context,n.params);yield o.init(),this.providers.OKSPIN=o;break}}this.initialized=!0})}adConfig(t){this.providers.ADSENSE?this.providers.ADSENSE.adConfig(t):window.adsbygoogle.push(t)}adBreak(t){return x(this,null,function*(){var r,n,o,i,a,s,l,c,d;if(Date.now()-this.initializedTimeStamp<3e3){(r=t.adBreakDone)==null||r.call(t,{breakType:t.type,breakName:t.type==="preroll"?void 0:t.name,breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"});return}if(this.initialized||(yield this.init()),t.type!=="reward"&&!this.channelPolicy.shouldBypassCallingInterstitial()){(n=t.adBreakDone)==null||n.call(t,{breakType:t.type,breakName:"skipInterstitials",breakFormat:"interstitial",breakStatus:"viewed"});return}if(!this.context.checkNetwork()){(o=t.adBreakDone)==null||o.call(t,{breakType:t.type,breakName:t.type==="preroll"?void 0:t.name,breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"});return}try{let{data:u,code:h}=yield this.context.httpClient.post("/api/ads/info",{data:{contextData:this.getRequestContextData("AdsAFGSDKAdBreak"),bizParams:this.getRequestBizParams(),adsType:t.type==="reward"?"REWARD":"INTERSTITIAL",testAdsMode:this.contextInfo.testAdsMode,name:t.type==="preroll"?"":t.name}});if(h!=="SUCCESS"){(i=t.adBreakDone)==null||i.call(t,{breakType:t.type,breakName:t.type==="preroll"?void 0:t.name,breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"});return}else{let p=u;if(p.length===0){(a=t.adBreakDone)==null||a.call(t,{breakType:t.type,breakName:t.type==="preroll"?void 0:t.name,breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"});return}let m=!0,g=null,_=new Bc(this.context);for((s=this.context.eventEmitter)==null||s.emit("isAdShowing",!0),this.adsActionDetection.adBreakIsShowing=!0;p.length>0;){let v=p.shift(),y=this.providers[v.provider];if(y){let[A,k]=yield _.callAdBreakAndContinue(y,t,v);m=A,g=k}else m=!0,g={breakType:t.type,breakName:t.type==="preroll"?void 0:t.name,breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"notReady"};if(!m)break}m&&g&&((l=t.adBreakDone)==null||l.call(t,g))}}catch(u){(c=t.adBreakDone)==null||c.call(t,{breakType:t.type,breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"})}finally{(d=this.context.eventEmitter)==null||d.emit("isAdShowing",!1),this.adsActionDetection.adBreakIsShowing=!1}})}adUnit(t){console.warn("This method has been deprecated. We will not support AdSense AdUnit in the future.")}},zH=Mn`
567
567
  ${Ne}
568
568
  position: fixed;
569
569
  left: 0;
@@ -612,4 +612,4 @@ or `);this.errors.push(i)}return n}},Ri=class extends ae{constructor(...t){super
612
612
  cursor: pointer;
613
613
  }
614
614
  }
615
- `});function kw(){let e=new Map,t,r;return{registerRewardHandler(o,i){e.set(o,i)},handleReward(o,...i){return x(this,null,function*(){return yield o.reduce((s,l)=>x(this,null,function*(){let c=yield s;if(c===!0)return!0;Rw&&console.log(`handleReward ${l}`);let d=e.get(l),u=d?yield d(...i):c;return Rw&&console.log(`handleReward ${l} ${u}`),u}),Promise.resolve(!1))})},registerRewardsFetcher(o){return x(this,null,function*(){t=(...i)=>x(this,null,function*(){try{return yield o(...i)}catch(a){return console.error("getRewardOptions error:",a),["ADS"]}})})},registerRewardFrequencyConfigFetcher(o){return x(this,null,function*(){r=(...i)=>x(this,null,function*(){try{return yield o(...i)}catch(a){return console.error("getRewardOptions error:",a),{joliCoinUseAndCharge:zt}}})})},getRewardsTypes(...o){return x(this,null,function*(){return t?yield t(...o):["ADS"]})},getRewardFrequencyConfig(...o){return x(this,null,function*(){return r?yield r(...o):{joliCoinUseAndCharge:zt}})}}}var Rw,Cw=T(()=>{"use strict";ee();Yt();Rw=S.testMode});var sU,lU,Ow,Pw,Nw=T(()=>{"use strict";Yt();sU=()=>(e,t)=>e==="JOLI_COIN"&&t==="ADS"?-1:e==="ADS"&&t==="JOLI_COIN"?1:0,lU=e=>e.length?e.includes("JOLI_COIN")&&e.length<=1?["JOLI_COIN_ONLY"]:e.sort(sU()):["ADS"],Ow=e=>{e.registerRewardsFetcher(t=>x(void 0,null,function*(){var n,o,i,a;let r=["ADS"];try{let s=yield t.post("/api/games/unlock-options",{});if(s.code!=="SUCCESS")return r;G.emit(Sr,{options:((n=s.data)==null?void 0:n.unlockOptions)||[],userJoliCoin:((o=s.extra)==null?void 0:o.joliCoin)||{balance:0,enableAutoDeduct:!1}});let l=((a=(i=s.data)==null?void 0:i.unlockOptions)==null?void 0:a.map(c=>c.type))||Array.from(r);return lU(l)}catch(s){return console.error("getRewardOptions error:",s),r}}))},Pw=e=>{e.registerRewardFrequencyConfigFetcher(t=>x(void 0,null,function*(){var n,o;let r=yield t.get("/api/fe-configs/web-common/global-config",{});return r.code!=="SUCCESS"?{joliCoinUseAndCharge:zt}:(G.emit(Ui,{joliCoinUseAndCharge:((n=r.data)==null?void 0:n.joliCoinUseAndCharge)||zt}),{joliCoinUseAndCharge:((o=r.data)==null?void 0:o.joliCoinUseAndCharge)||zt})}))}});var Dw,qw=T(()=>{"use strict";Dw=e=>t=>x(void 0,null,function*(){return e.adBreak(t),!0})});var Lw,Uw=T(()=>{"use strict";Lw=(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)}))});var na,oa,Mw,ia,aa=T(()=>{"use strict";ee();D();Yt();Uw();Tn();na=(e,t)=>r=>x(void 0,null,function*(){let n=wt(G,Ut);return G.emit(qi,e,{userJoliCoin:r.userJoliCoin,joliCoinQuantity:r.joliCoinQuantity,enableAutoDeduct:r.userJoliCoin.enableAutoDeduct,confirmButtonText:t.confirmButtonText,cancelButtonText:t.cancelButtonText}),(yield n.getFreshData()).paymentResult}),oa=(e,t)=>r=>x(void 0,null,function*(){let n=wt(G,Ir);return G.emit(Li,e,{enableAutoDeduct:r.enableAutoDeduct,userJoliCoin:r.userJoliCoin,joliCoinQuantity:r.joliCoinQuantity,confirmButtonText:t.confirmButtonText,cancelButtonText:t.cancelButtonText}),(yield n.getFreshData()).useModalResult}),Mw=e=>{if(e=="CANCEL")throw new Error("CANCEL")},ia=(e,{handlers:{handleUnlockSuccess:t,handleUnlockFailed:r,unlockOptionsHandler:n,initiateAndAwaitPayment:o,showUnlockWithJolicoinModal:i}})=>a=>x(void 0,null,function*(){var s,l,c,d,u,h,p;try{let m=!1,g=yield n.getData(),_=(c=(l=(s=g==null?void 0:g.options)==null?void 0:s.find(A=>A.type==="JOLI_COIN"))==null?void 0:l.joliCoinChoices[0].joliCoinQuantity)!=null?c:0;if(!Lw((g==null?void 0:g.options)||[],g==null?void 0:g.userJoliCoin)){let A=yield o({userJoliCoin:g==null?void 0:g.userJoliCoin,joliCoinQuantity:_});if(Mw(A),A!=="SUCCESS")return r==null||r(a),!1;m=!0}let v=!!((d=g==null?void 0:g.userJoliCoin)!=null&&d.enableAutoDeduct);if(!m){let A=yield i({enableAutoDeduct:v,userJoliCoin:g==null?void 0:g.userJoliCoin,joliCoinQuantity:_});if(Mw(A),A!=="CONFIRM")return r==null||r(a),!1}let y=yield e.post("/api/joli-coin/unlock",{data:{type:"GAME_REWARD",reqId:`${Zn()}-${S.mpType}-${Date.now()}`,gameInfo:{gameId:S.mpId}}});return y.code=="SUCCESS"?((h=a.adBreakDone)==null||h.call(a,{breakType:a.type,breakName:"name"in a&&(u=a.name)!=null?u:"",breakFormat:"reward",breakStatus:"viewed"}),"adViewed"in a&&((p=a.adViewed)==null||p.call(a)),t==null||t({quantity:y.data.quantity,balance:y.data.balance}),!0):(r==null||r(a),!1)}catch(m){if(console.info("JolicoinRewardHandler error:",m),m instanceof Error&&m.message=="CANCEL")throw m;return r==null||r(a),!1}finally{n.clearCache()}})});var jw,Fw=T(()=>{"use strict";Yt();Tn();aa();aa();jw=(e,{onUnlockSuccess:t,onUnlockFailed:r})=>{let n=wt(G,Sr),o=()=>{r==null||r()},i=oa("ADS-JOLI_COIN",{confirmButtonText:"Use Jolicoin",cancelButtonText:"No watch ads"}),a=na("ADS-JOLI_COIN",{confirmButtonText:"Pay and unlock",cancelButtonText:"No watch ads"});return ia(e,{handlers:{handleUnlockSuccess:t,handleUnlockFailed:o,unlockOptionsHandler:n,initiateAndAwaitPayment:a,showUnlockWithJolicoinModal:i}})}});var Bw,$w=T(()=>{"use strict";Yt();aa();Tn();Bw=(e,{onUnlockSuccess:t,onUnlockFailed:r})=>{let n=wt(G,Sr),o=l=>{var c;r==null||r(),(c=l.adBreakDone)==null||c.call(l,{breakType:l.type,breakFormat:l.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"})},i=oa("JOLI_COIN",{confirmButtonText:"Use Jolicoin",cancelButtonText:"No thanks"}),a=na("JOLI_COIN",{confirmButtonText:"Pay and unlock",cancelButtonText:"No thanks"});return ia(e,{handlers:{handleUnlockSuccess:t,handleUnlockFailed:o,unlockOptionsHandler:n,initiateAndAwaitPayment:a,showUnlockWithJolicoinModal:i}})}});var St,Hw=T(()=>{"use strict";Cw();Nw();qw();Fw();$w();St=kw();Ow(St);Pw(St)});var W4,sa,cU,Fn,uU,Bn,Jw,dU,fU,pU,hU,Vw=T(()=>{"use strict";D();lt();li();W4=ue(k0());Tw();kt();ee();Ht();Ie();Hw();Ka();sa=Z(),cU=()=>{let{data:e}=L("getNetworkStatusSync");return!!(e!=null&&e.isConnected)},Fn={get:(e,t)=>Ee(e,R({method:"GET",responseType:"json",appendHostCookie:!0},t)).then(r=>r.response.data),post:(e,t)=>Ee(e,R({method:"POST",responseType:"json",appendHostCookie:!0},t)).then(r=>r.response.data)},uU={httpClient:Fn,checkNetwork:cU,track:Le,eventEmitter:no,getContextInfo:()=>{var e,t,r,n,o,i,a,s;return{hostAppId:(t=(e=S.hostInfo)==null?void 0:e.aid)!=null?t:"1",deviceId:(r=S.deviceInfo.did)!=null?r:"",adId:(n=S.deviceInfo.adId)!=null?n:"",sessionId:(o=S.sessionId)!=null?o:"",userId:(a=(i=S.hostUserInfo)==null?void 0:i.uid)!=null?a:"",objectType:"GAME",objectId:S.mpId,testAdsMode:S.testAdsMode,channel:(s=S.joliSource)!=null?s:"",deviceBrand:S.deviceInfo.brand,deviceModel:S.deviceInfo.model,osType:S.platform==="android"?"ANDROID":S.platform==="ios"?"IOS":"PC",runtimeType:"APP",platform:1e3}}},Bn=new Xi(uU);St.getRewardFrequencyConfig(Fn).then(e=>{console.log("getRewardFrequencyConfig",e)});St.registerRewardHandler("ADS",Dw(Bn));St.registerRewardHandler("JOLI_COIN",jw(Fn,{onUnlockSuccess:e=>{Jw(e)},onUnlockFailed:()=>{console.log("onUnlockFailed")}}));St.registerRewardHandler("JOLI_COIN_ONLY",Bw(Fn,{onUnlockSuccess:e=>{Jw(e)},onUnlockFailed:()=>{console.log("onUnlockFailed")}}));Jw=e=>{let{quantity:t}=e,r=`{slot-coin} ${t} JoliCoins used`;Kb(r,{customStyle:{mark:{marginRight:"8px"}}})},dU=J("adInit",{implement:e=>{Bn.init(e)}}),fU=J("adConfig",{implement:e=>{Bn.adConfig(e)}}),pU=J("adBreak",{implement:e=>{e.type==="reward"?St.getRewardsTypes(Fn).then(t=>{St.handleReward(t,e).catch(r=>{var n;console.info("handleReward failed in native",r),(n=e.adBreakDone)==null||n.call(e,{breakType:e.type,breakFormat:e.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"})})}):Bn.adBreak(e)}}),hU=J("adUnit",{implement:e=>{Bn.adUnit(e)}});sa.registerCommand("AdsSDK.init",dU);sa.registerCommand("AdsSDK.adConfig",fU);sa.registerCommand("AdsSDK.adBreak",pU);sa.registerCommand("AdsSDK.adUnit",hU);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 $n,mU,vU,gU,_U,yU,Gw=T(()=>{"use strict";D();Ie();lt();ee();$n=Z(),mU=J("openSchemaSync",{paramsSchema:E.tuple(E.string()),implement:e=>{let t=e;e.match(/^https?:\/\//)||(t=`https://${S.mpId}.app.jolibox.com${e.startsWith("/")?"":"/"}${e}`);let r=L("openSchemaSync",{schema:t});if(r.errNo!==0)throw new Zt(r.errMsg,r.errNo)}}),vU=J("openPageSync",{paramsSchema:E.tuple(E.string()),implement:e=>{let{errNo:t,errMsg:r,data:n}=L("openPageSync",{url:e});if(t!==0||!n)throw new Zt(r,t);return{webviewId:n.webviewId}}}),gU=J("closePageSync",{paramsSchema:E.tuple(E.number()),implement:e=>{let{errNo:t,errMsg:r}=L("closePageSync",{webviewId:e});if(t!==0)throw new Zt(r,t)}}),_U=J("interceptSystemExitSync",{paramsSchema:E.tuple(E.boolean()),implement:e=>{de.emit("onInterceptSystemExit",{intercept:e}),de.emit("onInterceptBackPress",{intercept:e})}}),yU=J("navigateToNativePage",{paramsSchema:E.tuple(E.enum("openHistory"),E.object()),implement:(e,t)=>{let{errNo:r,errMsg:n}=L("callHostMethodAsync",{method:e,params:R({},t)});if(r!==0)throw new Zt(n,r)}});$n.registerCommand("RouterSDK.openSchema",mU);$n.registerCommand("RouterSDK.openPage",vU);$n.registerCommand("RouterSDK.closePage",gU);$n.registerCommand("RouterSDK.interceptSystemExit",_U);$n.registerCommand("RouterSDK.navigateToNativePage",yU);P("router.openSchema",{version:"1.1.10"});P("router.openPage",{version:"1.1.10"});P("router.closePage",{version:"1.1.10"});P("router.interceptSystemExit",{version:"1.1.18"});P("router.navigateToNativePage",{version:"1.1.19"})});var bU={};var cJ,pJ,Kw=T(()=>{"use strict";l0();cJ=ue(c0());v0();kc();b0();pJ=ue(w0());Pc();Vw();Gw()});var Ww=Symbol.for("JOLIBOX_IMPLEMENT_INIT");if(window[Ww])throw console.info("Jolibox Implement Already Initialized"),new Error("Jolibox Implement Already Initialized");window[Ww]=!0;x(void 0,null,function*(){let[{config:e}]=yield Promise.all([Promise.resolve().then(()=>(t0(),e0)),Promise.resolve().then(()=>(Kw(),bU)),Promise.resolve().then(()=>(kt(),Sd))]);e()});
615
+ `});function kw(){let e=new Map,t,r;return{registerRewardHandler(o,i){e.set(o,i)},handleReward(o,...i){return x(this,null,function*(){return yield o.reduce((s,l)=>x(this,null,function*(){let c=yield s;if(c===!0)return!0;Rw&&console.log(`handleReward ${l}`);let d=e.get(l),u=d?yield d(...i):c;return Rw&&console.log(`handleReward ${l} ${u}`),u}),Promise.resolve(!1))})},registerRewardsFetcher(o){return x(this,null,function*(){t=(...i)=>x(this,null,function*(){try{return yield o(...i)}catch(a){return console.error("getRewardOptions error:",a),["ADS"]}})})},registerRewardFrequencyConfigFetcher(o){return x(this,null,function*(){r=(...i)=>x(this,null,function*(){try{return yield o(...i)}catch(a){return console.error("getRewardOptions error:",a),{joliCoinUseAndCharge:Yt}}})})},getRewardsTypes(...o){return x(this,null,function*(){return t?yield t(...o):["ADS"]})},getRewardFrequencyConfig(...o){return x(this,null,function*(){return r?yield r(...o):{joliCoinUseAndCharge:Yt}})}}}var Rw,Cw=T(()=>{"use strict";ee();Qt();Rw=S.testMode});var sU,lU,Ow,Pw,Nw=T(()=>{"use strict";Qt();sU=()=>(e,t)=>e==="JOLI_COIN"&&t==="ADS"?-1:e==="ADS"&&t==="JOLI_COIN"?1:0,lU=e=>e.length?e.includes("JOLI_COIN")&&e.length<=1?["JOLI_COIN_ONLY"]:e.sort(sU()):["ADS"],Ow=e=>{e.registerRewardsFetcher(t=>x(void 0,null,function*(){var n,o,i,a;let r=["ADS"];try{let s=yield t.post("/api/games/unlock-options",{});if(s.code!=="SUCCESS")return r;G.emit(Sr,{options:((n=s.data)==null?void 0:n.unlockOptions)||[],userJoliCoin:((o=s.extra)==null?void 0:o.joliCoin)||{balance:0,enableAutoDeduct:!1}});let l=((a=(i=s.data)==null?void 0:i.unlockOptions)==null?void 0:a.map(c=>c.type))||Array.from(r);return lU(l)}catch(s){return console.error("getRewardOptions error:",s),r}}))},Pw=e=>{e.registerRewardFrequencyConfigFetcher(t=>x(void 0,null,function*(){var n,o;let r=yield t.get("/api/fe-configs/web-common/global-config",{});return r.code!=="SUCCESS"?{joliCoinUseAndCharge:Yt}:(G.emit(Ui,{joliCoinUseAndCharge:((n=r.data)==null?void 0:n.joliCoinUseAndCharge)||Yt}),{joliCoinUseAndCharge:((o=r.data)==null?void 0:o.joliCoinUseAndCharge)||Yt})}))}});var Dw,qw=T(()=>{"use strict";Dw=e=>t=>x(void 0,null,function*(){return e.adBreak(t),!0})});var Lw,Uw=T(()=>{"use strict";Lw=(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)}))});var na,oa,Mw,ia,aa=T(()=>{"use strict";ee();D();Qt();Uw();Tn();na=(e,t)=>r=>x(void 0,null,function*(){let n=wt(G,Ut);return G.emit(qi,e,{userJoliCoin:r.userJoliCoin,joliCoinQuantity:r.joliCoinQuantity,enableAutoDeduct:r.userJoliCoin.enableAutoDeduct,confirmButtonText:t.confirmButtonText,cancelButtonText:t.cancelButtonText}),(yield n.getFreshData()).paymentResult}),oa=(e,t)=>r=>x(void 0,null,function*(){let n=wt(G,Ir);return G.emit(Li,e,{enableAutoDeduct:r.enableAutoDeduct,userJoliCoin:r.userJoliCoin,joliCoinQuantity:r.joliCoinQuantity,confirmButtonText:t.confirmButtonText,cancelButtonText:t.cancelButtonText}),(yield n.getFreshData()).useModalResult}),Mw=e=>{if(e=="CANCEL")throw new Error("CANCEL")},ia=(e,{handlers:{handleUnlockSuccess:t,handleUnlockFailed:r,unlockOptionsHandler:n,initiateAndAwaitPayment:o,showUnlockWithJolicoinModal:i}})=>a=>x(void 0,null,function*(){var s,l,c,d,u,h,p;try{let m=!1,g=yield n.getData(),_=(c=(l=(s=g==null?void 0:g.options)==null?void 0:s.find(A=>A.type==="JOLI_COIN"))==null?void 0:l.joliCoinChoices[0].joliCoinQuantity)!=null?c:0;if(!Lw((g==null?void 0:g.options)||[],g==null?void 0:g.userJoliCoin)){let A=yield o({userJoliCoin:g==null?void 0:g.userJoliCoin,joliCoinQuantity:_});if(Mw(A),A!=="SUCCESS")return r==null||r(a),!1;m=!0}let v=!!((d=g==null?void 0:g.userJoliCoin)!=null&&d.enableAutoDeduct);if(!m){let A=yield i({enableAutoDeduct:v,userJoliCoin:g==null?void 0:g.userJoliCoin,joliCoinQuantity:_});if(Mw(A),A!=="CONFIRM")return r==null||r(a),!1}let y=yield e.post("/api/joli-coin/unlock",{data:{type:"GAME_REWARD",reqId:`${Zn()}-${S.mpType}-${Date.now()}`,gameInfo:{gameId:S.mpId}}});return y.code=="SUCCESS"?((h=a.adBreakDone)==null||h.call(a,{breakType:a.type,breakName:"name"in a&&(u=a.name)!=null?u:"",breakFormat:"reward",breakStatus:"viewed"}),"adViewed"in a&&((p=a.adViewed)==null||p.call(a)),t==null||t({quantity:y.data.quantity,balance:y.data.balance}),!0):(r==null||r(a),!1)}catch(m){if(console.info("JolicoinRewardHandler error:",m),m instanceof Error&&m.message=="CANCEL")throw m;return r==null||r(a),!1}finally{n.clearCache()}})});var Fw,jw=T(()=>{"use strict";Qt();Tn();aa();aa();Fw=(e,{onUnlockSuccess:t,onUnlockFailed:r})=>{let n=wt(G,Sr),o=()=>{r==null||r()},i=oa("ADS-JOLI_COIN",{confirmButtonText:"Use Jolicoin",cancelButtonText:"No watch ads"}),a=na("ADS-JOLI_COIN",{confirmButtonText:"Pay and unlock",cancelButtonText:"No watch ads"});return ia(e,{handlers:{handleUnlockSuccess:t,handleUnlockFailed:o,unlockOptionsHandler:n,initiateAndAwaitPayment:a,showUnlockWithJolicoinModal:i}})}});var Bw,$w=T(()=>{"use strict";Qt();aa();Tn();Bw=(e,{onUnlockSuccess:t,onUnlockFailed:r})=>{let n=wt(G,Sr),o=l=>{var c;r==null||r(),(c=l.adBreakDone)==null||c.call(l,{breakType:l.type,breakFormat:l.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"})},i=oa("JOLI_COIN",{confirmButtonText:"Use Jolicoin",cancelButtonText:"No thanks"}),a=na("JOLI_COIN",{confirmButtonText:"Pay and unlock",cancelButtonText:"No thanks"});return ia(e,{handlers:{handleUnlockSuccess:t,handleUnlockFailed:o,unlockOptionsHandler:n,initiateAndAwaitPayment:a,showUnlockWithJolicoinModal:i}})}});var St,Hw=T(()=>{"use strict";Cw();Nw();qw();jw();$w();St=kw();Ow(St);Pw(St)});var W4,sa,cU,jn,uU,Bn,Jw,dU,fU,pU,hU,Vw=T(()=>{"use strict";D();lt();li();W4=ue(k0());Tw();kt();ee();Jt();Ie();Hw();Ka();sa=Z(),cU=()=>{let{data:e}=L("getNetworkStatusSync");return!!(e!=null&&e.isConnected)},jn={get:(e,t)=>Ee(e,R({method:"GET",responseType:"json",appendHostCookie:!0},t)).then(r=>r.response.data),post:(e,t)=>Ee(e,R({method:"POST",responseType:"json",appendHostCookie:!0},t)).then(r=>r.response.data)},uU={httpClient:jn,checkNetwork:cU,track:Le,eventEmitter:no,getContextInfo:()=>{var e,t,r,n,o,i,a,s;return{hostAppId:(t=(e=S.hostInfo)==null?void 0:e.aid)!=null?t:"1",deviceId:(r=S.deviceInfo.did)!=null?r:"",adId:(n=S.deviceInfo.adId)!=null?n:"",sessionId:(o=S.sessionId)!=null?o:"",userId:(a=(i=S.hostUserInfo)==null?void 0:i.uid)!=null?a:"",objectType:"GAME",objectId:S.mpId,testAdsMode:S.testAdsMode,channel:(s=S.joliSource)!=null?s:"",deviceBrand:S.deviceInfo.brand,deviceModel:S.deviceInfo.model,osType:S.platform==="android"?"ANDROID":S.platform==="ios"?"IOS":"PC",runtimeType:"APP",platform:1e3}}},Bn=new Xi(uU);St.getRewardFrequencyConfig(jn).then(e=>{console.log("getRewardFrequencyConfig",e)});St.registerRewardHandler("ADS",Dw(Bn));St.registerRewardHandler("JOLI_COIN",Fw(jn,{onUnlockSuccess:e=>{Jw(e)},onUnlockFailed:()=>{console.log("onUnlockFailed")}}));St.registerRewardHandler("JOLI_COIN_ONLY",Bw(jn,{onUnlockSuccess:e=>{Jw(e)},onUnlockFailed:()=>{console.log("onUnlockFailed")}}));Jw=e=>{let{quantity:t}=e,r=`{slot-coin} ${t} JoliCoins used`;Kb(r,{customStyle:{mark:{marginRight:"8px"}}})},dU=J("adInit",{implement:e=>{Bn.init(e)}}),fU=J("adConfig",{implement:e=>{Bn.adConfig(e)}}),pU=J("adBreak",{implement:e=>{e.type==="reward"?St.getRewardsTypes(jn).then(t=>{St.handleReward(t,e).catch(r=>{var n;console.info("handleReward failed in native",r),(n=e.adBreakDone)==null||n.call(e,{breakType:e.type,breakFormat:e.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"})})}):Bn.adBreak(e)}}),hU=J("adUnit",{implement:e=>{Bn.adUnit(e)}});sa.registerCommand("AdsSDK.init",dU);sa.registerCommand("AdsSDK.adConfig",fU);sa.registerCommand("AdsSDK.adBreak",pU);sa.registerCommand("AdsSDK.adUnit",hU);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 $n,mU,vU,gU,_U,yU,Gw=T(()=>{"use strict";D();Ie();lt();ee();$n=Z(),mU=J("openSchemaSync",{paramsSchema:E.tuple(E.string()),implement:e=>{let t=e;e.match(/^https?:\/\//)||(t=`https://${S.mpId}.app.jolibox.com${e.startsWith("/")?"":"/"}${e}`);let r=L("openSchemaSync",{schema:t});if(r.errNo!==0)throw new Zt(r.errMsg,r.errNo)}}),vU=J("openPageSync",{paramsSchema:E.tuple(E.string()),implement:e=>{let{errNo:t,errMsg:r,data:n}=L("openPageSync",{url:e});if(t!==0||!n)throw new Zt(r,t);return{webviewId:n.webviewId}}}),gU=J("closePageSync",{paramsSchema:E.tuple(E.number()),implement:e=>{let{errNo:t,errMsg:r}=L("closePageSync",{webviewId:e});if(t!==0)throw new Zt(r,t)}}),_U=J("interceptSystemExitSync",{paramsSchema:E.tuple(E.boolean()),implement:e=>{de.emit("onInterceptSystemExit",{intercept:e}),de.emit("onInterceptBackPress",{intercept:e})}}),yU=J("navigateToNativePage",{paramsSchema:E.tuple(E.enum("openHistory"),E.object()),implement:(e,t)=>{let{errNo:r,errMsg:n}=L("callHostMethodAsync",{method:e,params:R({},t)});if(r!==0)throw new Zt(n,r)}});$n.registerCommand("RouterSDK.openSchema",mU);$n.registerCommand("RouterSDK.openPage",vU);$n.registerCommand("RouterSDK.closePage",gU);$n.registerCommand("RouterSDK.interceptSystemExit",_U);$n.registerCommand("RouterSDK.navigateToNativePage",yU);P("router.openSchema",{version:"1.1.10"});P("router.openPage",{version:"1.1.10"});P("router.closePage",{version:"1.1.10"});P("router.interceptSystemExit",{version:"1.1.18"});P("router.navigateToNativePage",{version:"1.1.19"})});var bU={};var cJ,pJ,Kw=T(()=>{"use strict";l0();cJ=ue(c0());v0();kc();b0();pJ=ue(w0());Pc();Vw();Gw()});var Ww=Symbol.for("JOLIBOX_IMPLEMENT_INIT");if(window[Ww])throw console.info("Jolibox Implement Already Initialized"),new Error("Jolibox Implement Already Initialized");window[Ww]=!0;x(void 0,null,function*(){let[{config:e}]=yield Promise.all([Promise.resolve().then(()=>(t0(),e0)),Promise.resolve().then(()=>(Kw(),bU)),Promise.resolve().then(()=>(kt(),Sd))]);e()});