@ujet/websdk-headless 3.2.8 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +15 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +27 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ interface SurveyAnswers {
|
|
|
60
60
|
}
|
|
61
61
|
interface ChatEndUserEventRequest {
|
|
62
62
|
event: {
|
|
63
|
-
name:
|
|
63
|
+
name: string;
|
|
64
64
|
payload: Record<string, string>;
|
|
65
65
|
};
|
|
66
66
|
end_user_name?: string;
|
|
@@ -85,6 +85,14 @@ interface EmailRequest {
|
|
|
85
85
|
files?: File[];
|
|
86
86
|
recaptcha?: string;
|
|
87
87
|
}
|
|
88
|
+
interface FormData {
|
|
89
|
+
signature: string;
|
|
90
|
+
data: {
|
|
91
|
+
smart_action_id: number;
|
|
92
|
+
id: number;
|
|
93
|
+
uri: string;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
88
96
|
|
|
89
97
|
interface LanguageOption {
|
|
90
98
|
lang: string;
|
|
@@ -299,6 +307,7 @@ interface ClientOption {
|
|
|
299
307
|
host?: string;
|
|
300
308
|
lang?: string;
|
|
301
309
|
bridge?: string;
|
|
310
|
+
version?: string;
|
|
302
311
|
cobrowse?: {
|
|
303
312
|
enabled: boolean;
|
|
304
313
|
template?: string;
|
|
@@ -322,6 +331,7 @@ interface ConnectOption {
|
|
|
322
331
|
companyId: string;
|
|
323
332
|
location: string;
|
|
324
333
|
host: string;
|
|
334
|
+
version: string;
|
|
325
335
|
lang: string;
|
|
326
336
|
cobrowse: boolean;
|
|
327
337
|
bridge: string;
|
|
@@ -477,6 +487,7 @@ declare class Client {
|
|
|
477
487
|
getAfterHourMessage(lang?: string): Promise<string>;
|
|
478
488
|
getTimeSlots(menuId: number | string, lang?: string): Promise<string[]>;
|
|
479
489
|
getWaitTimes(menuId: number | string, lang?: string): Promise<WaitTimeResponse>;
|
|
490
|
+
verifyForm(data: FormData): Promise<boolean>;
|
|
480
491
|
createCall(menuId: number | string, data: CallRequest): Promise<CallResponse>;
|
|
481
492
|
loadCall(callId: number | string): Promise<CallResponse>;
|
|
482
493
|
cancelCall(callId: number | string): Promise<CallResponse>;
|
|
@@ -489,6 +500,8 @@ declare class Client {
|
|
|
489
500
|
destroyChat(): Promise<void>;
|
|
490
501
|
getChatDeflection(): Promise<ChatDeflectionResponse | null>;
|
|
491
502
|
sendChatTranscripts(emails: string[]): Promise<RequestReturn>;
|
|
503
|
+
downloadChatTranscript(): Promise<any>;
|
|
504
|
+
getPdfStatus(id: number): Promise<RequestReturn>;
|
|
492
505
|
getChatSurvey(): Promise<ChatSurveyResponse>;
|
|
493
506
|
sendChatSurvey(answers: SurveyAnswers): Promise<RequestReturn>;
|
|
494
507
|
sendChatRate(data: RateRequest): Promise<RequestReturn>;
|
|
@@ -577,4 +590,4 @@ declare const OPTIONS: {
|
|
|
577
590
|
version: string;
|
|
578
591
|
};
|
|
579
592
|
|
|
580
|
-
export { BaseProvider, type CallRequest, type CallResponse, Chat, type ChatDeflectionResponse, type ChatEndUserEventRequest, type ChatHistoryItem, type ChatHistoryResponse, type ChatRequest, type ChatResponse, type ChatSurveyResponse, type ChatTaskMessageResponse, Client, type ClientEvent, type ClientOption, type CobrowseMessages, type CobrowseOption, type CobrowseRequest, type CompanyResponse, type ConnectCallback, type ConnectOption, type ConnectRequest, type ConnectResult, ENVIRONMENT, type EmailRequest, type EscalateRequest, type EventHandler, EventManager, type FileTypeItem, type GetServerMessage, type HumanAgent, type IssueChatTokenMethod, type LanguageOption, type LogData, Logger, type LoggerHandler, MediaStore, type MenuChannel, type MenuItem, type MenuResponse, type MessageRequest, type MessageResponse, OPTIONS, type QuestionItem, type RateRequest, type RequestMethod, type RequestReturn, type SurveyAnswers, type TokenResponse, type TriggerItem, type TriggerMessage, type UserProfile, VERSION, type VirtualAgent, type WaitTimeResponse, addProviderType, consoleLoggerHandler };
|
|
593
|
+
export { BaseProvider, type CallRequest, type CallResponse, Chat, type ChatDeflectionResponse, type ChatEndUserEventRequest, type ChatHistoryItem, type ChatHistoryResponse, type ChatRequest, type ChatResponse, type ChatSurveyResponse, type ChatTaskMessageResponse, Client, type ClientEvent, type ClientOption, type CobrowseMessages, type CobrowseOption, type CobrowseRequest, type CompanyResponse, type ConnectCallback, type ConnectOption, type ConnectRequest, type ConnectResult, ENVIRONMENT, type EmailRequest, type EscalateRequest, type EventHandler, EventManager, type FileTypeItem, type FormData, type GetServerMessage, type HumanAgent, type IssueChatTokenMethod, type LanguageOption, type LogData, Logger, type LoggerHandler, MediaStore, type MenuChannel, type MenuItem, type MenuResponse, type MessageRequest, type MessageResponse, OPTIONS, type QuestionItem, type RateRequest, type RequestMethod, type RequestReturn, type SurveyAnswers, type TokenResponse, type TriggerItem, type TriggerMessage, type UserProfile, VERSION, type VirtualAgent, type WaitTimeResponse, addProviderType, consoleLoggerHandler };
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";var W$=Object.defineProperty;var V$=(e,r,t)=>r in e?W$(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var ct=(e,r,t)=>V$(e,typeof r!="symbol"?r+"":r,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H$="prod",Tv="3.2.8",kg="https://main.api.ujet.co",Ar={companyId:"",tenant:"",trackerId:"",deviceId:"",application:"websdk",version:Tv};function K$(e){return(e==null?void 0:e.constructor)===Object}async function Rg(e,r=3){let t=0,n;for(;t<=r;){t+=1;try{return await e()}catch(i){n=i,console.error(i),await J$(1e3*Math.pow(2,t))}}throw n}function J$(e){return new Promise(r=>{setTimeout(()=>{r(0)},e)})}function Y$(){return Math.random().toString(36).slice(2)}const X$=new TextDecoder,Q$=e=>{const r=atob(e),t=new Uint8Array(r.length);for(let n=0;n<r.length;n++)t[n]=r.charCodeAt(n);return X$.decode(t)},$g=[];class ka{constructor(r){ct(this,"channel");this.channel=r}static addHandler(r){$g.push(r)}debug(...r){this._log("debug",...r)}info(...r){this._log("info",...r)}warn(...r){this._log("warn",...r)}error(...r){this._log("error",...r)}_log(r,...t){$g.forEach(n=>{n(this.channel,r,...t)})}}const Z$=(e,r,...t)=>{console[r](`[${r}][${e}]`,...t)},eP=e=>{let r=[],t;return(i,a,...s)=>{a==="debug"||i==="communicator"||(r.push(tP(i,a,...s)),clearTimeout(t),t=window.setTimeout(()=>{if(r.length){const c={num_of_logs:r.length,logs:r};e(c)}r=[]},2e3))}};function tP(e,r,...t){let n=t.pop();typeof n=="string"&&(t.push(n),n={});const i=t.join(" "),a={loglevel:r,channel:e,timestamp:new Date().toISOString(),application:Ar.application,version:Ar.version,device:Ar.deviceId,tenant:Ar.tenant,company_id:Ar.companyId,location_url:location.href,data:iP(n),message:Ev(i)};return Ar.trackerId&&(a.tracker_id=Ar.trackerId),a}const rP=["user","phone","phone_number","phoneNumber","email"],nP=[/(?:3[47]\d|(?:4\d|5[1-5]|65)\d{2}|6011)\d{12}/g,/(?!(000|666|9))\d{3}-(?!00)\d{2}-(?!0000)\d{4}/g,/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+$/g];function Ev(e){return typeof e=="string"?nP.forEach(r=>{e=e.replace(r,"__MASKED__")}):e&&K$(e)&&(e={...e},Object.keys(e).forEach(r=>{rP.indexOf(r)!==-1?e[r]="__MASKED__":Ev(e[r])})),e}function iP(e){if(e.error){const r=e.error;return{error:{name:r.name,message:r.message,stack:r.stack}}}return Ev(e.data)}const Uf=new ka("communicator");let Pg=!1;class aP{constructor(r,t){ct(this,"events");ct(this,"options");ct(this,"channel");ct(this,"authenticate");ct(this,"channelReady",!1);ct(this,"__authed",!1);ct(this,"pending",[]);ct(this,"promises",{});ct(this,"user");ct(this,"iframe");this.authenticate=r.authenticate,this.events=t,this.options=sP(r),this.channel=new MessageChannel,this.useConnect(this.options)}useConnect(r){const t=document.createElement("iframe");t.src=r.bridge,t.setAttribute("style","display:none");let n="*";/^https:/.test(r.bridge)&&(n=new URL(r.bridge).origin),t.addEventListener("load",()=>{if(Uf.debug("iframe bridge ready for",n),!this.channelReady){const i={type:"_init",data:r};t.contentWindow.postMessage(i,n,[this.channel.port2])}}),this.channel.port1.onmessage=i=>{this.receiveMessage(i)},document.body.appendChild(t),this.iframe=t}receiveMessage(r){const t=r.data;if(t){if(Uf.debug("receiveMessage",t),t.type==="ready")this.channelReady=!0,Ar.deviceId=t.result.deviceId,this.runPending(),this.events.triggerEvent("ready");else if(t.type==="callback"&&t.callbackId){const[n,i]=this.promises[t.callbackId];t.error?i(t.error):n(t.result),delete this.promises[t.callbackId]}else if(t.type==="refreshToken")this.refreshToken();else if(t.request==="_auth"&&(this.events.triggerEvent("authenticated"),t.result&&t.result.log_proxy_url&&!Pg)){Pg=!0;const n=eP(i=>{this.postMessage({type:"_log",data:i})});ka.addHandler(n)}}}postMessage(r){this.channelReady?(Uf.debug("postMessage",r),this.channel.port1.postMessage(r)):this.pending.push(r)}runPending(){for(;this.pending.length;){const r=this.pending.shift();this.postMessage(r)}}postPromise(r,t){return new Promise((n,i)=>{const a=Y$()+"_"+Date.now();this.promises[a]=[n,i];const s={type:r,callbackId:a,data:t};this.postMessage(s)})}async refreshToken(){this.__authed=!0;const r=await this.authenticate(),t=["twilio_chat","nexmo_chat"];this.options.cobrowse&&t.push("cobrowse");const i={type:"_auth",data:{modules:t,user:{token:r.token,company_id:this.options.companyId}}};this.postMessage(i);const a=JSON.parse(Q$(r.token.split(".")[1]));this.user={identity:a.identity,name:a.name,email:a.email},this.events.triggerEvent("authenticate")}request(r,t){!this.__authed&&r!=="proactive_chat_triggers"&&this.refreshToken();const n={url:r,options:t};return this.postPromise("request",n)}destroy(){delete this.channel,this.iframe&&(document.body.removeChild(this.iframe),this.iframe=void 0)}}function sP(e){var i;let r=e.host;r||(e.tenant?r=kg.replace("main.api",e.tenant+".api"):r=kg);const t=e.lang||"en",n=!!((i=e.cobrowse)!=null&&i.enabled);return{host:r,lang:t,cobrowse:n,companyId:e.companyId,location:location.href,bridge:e.bridge||"https://websdk.ujet.co/v3/bridge.html"}}class kv{constructor(){ct(this,"handlers",{})}addEventListener(r,t){this.handlers[r]||(this.handlers[r]=[]),this.handlers[r].push(t)}triggerEvent(r,t){const n=this.handlers[r];n&&n.forEach(i=>{i(t)})}removeEventListener(r,t){if(this.handlers[r]){const n=this.handlers[r].indexOf(t);n!==-1&&this.handlers[r].splice(n,1)}}destroy(){this.handlers={}}}function oP(e,r){const t={};return r.forEach(n=>{t[n.id]=n}),e.map(n=>{if(n.type==="server_message"){const i=n.message_id,a=t[i];O0(n,a.content)}return n})}function uP(e,r){return O0(e,r.content)}function O0(e,r){return Object.keys(r).forEach(t=>{e[t]=r[t]}),e}const Ig=new ka("MediaStore"),cP=window.indexedDB||window.webkitIndexedDB||window.mozIndexedDB||window.OIndexedDB||window.msIndexedDB,lP="chat-media",Og=1,ll="file";class A0{constructor(){ct(this,"db")}store(){return new Promise((r,t)=>{if(this.db)return r(Ag(this.db));const n=cP.open(lP,Og);n.onerror=()=>{t(new Error("indexedDB open failed"))},n.onsuccess=()=>{const i=n.result;this.db=i,r(Ag(i))},n.onupgradeneeded=i=>{const a=n.result;i.oldVersion>0&&i.oldVersion<Og&&(Ig.info("deprecating media store"),a.deleteObjectStore(ll)),Ig.info("creating media store"),a.createObjectStore(ll)}})}async save(r,t){(await this.store()).put({index:r,file:t},r)}async getAll(){const r=await this.store();return await new Promise((t,n)=>{const i=r.getAll();i.onerror=()=>{n(new Error("indexedDB getAll failed"))},i.onsuccess=()=>{t(i.result)}})}async getAllFiles(){const r={};return(await this.getAll()).forEach(n=>{r[n.index]=n.file}),r}async clear(){(await this.store()).clear()}}function Ag(e){return e.transaction(ll,"readwrite").objectStore(ll)}const fP=new ka("chat-provider");class Rv{constructor(r,t,n){ct(this,"audio");ct(this,"issueChatToken");ct(this,"identity");ct(this,"channelId");ct(this,"region");ct(this,"inTask",!1);ct(this,"events");this.events=r,this.region=t.region,this.issueChatToken=n}ping(){this.audio||(this.audio=new window.Audio("https://websdk.ujet.co/v3/ping.mp3"));try{this.audio.play()}catch(r){fP.warn("Chat audio play failed",{error:r})}}on(r,t){this.events.addEventListener(r,t)}off(r,t){this.events.removeEventListener(r,t)}trackInTask(r){r.type==="noti"&&r.event==="taskVaStarted"?this.inTask=!0:r.type==="noti"&&r.event==="taskVaFinished"&&(this.inTask=!1)}}ct(Rv,"type","base");const M0={};function $v(e){M0[e.type]=e}function dP(e){return M0[e]}const x0=["assigned","va_assigned"],N0=["dismissed","va_dismissed"],pP=["va_assigned","va_dismissed"],hP=["queued",...x0,...N0],vP=["timeout","canceled","failed","finished"],Bf=new ka("Chat");class mP{constructor(r,t){ct(this,"provider");ct(this,"store");ct(this,"globalEvents");ct(this,"state");ct(this,"connected",!1);ct(this,"allowSkipVirtualAgent",!1);ct(this,"inEscalation",!1);ct(this,"events");ct(this,"cachedFiles");this.state=r,this.store=new A0,this.cachedFiles={},this.events=new kv;const n=dP(this.state.provider_type);this.provider=new n(this.events,r,t)}_setGlobalEvents(r,t){this.globalEvents=r,this.on("message",n=>{if(n.type==="server_message"){const i=n.message_id;t(this.id,i).then(a=>{n=uP(n,a),r.triggerEvent("chat.message",n)})}else n.type==="photo"||n.type==="video"?setTimeout(()=>{const i=n.$index.toString();n.file=this.cachedFiles[i],r.triggerEvent("chat.message",n)},100):(r.triggerEvent("chat.message",n),this.registerMessageEvents(n))}),this.on("memberJoined",n=>{r.triggerEvent("chat.memberJoined",n)}),this.on("memberLeft",n=>{r.triggerEvent("chat.memberLeft",n)}),this.on("typingStarted",n=>{r.triggerEvent("chat.typingStarted",n)}),this.on("typingEnded",n=>{r.triggerEvent("chat.typingEnded",n)})}get id(){return this.state.id}get menuId(){return this.state.menus[this.state.menus.length-1].id}get channelId(){return this.state.provider_channel_id}get lang(){return this.state.lang}get virtual(){return pP.indexOf(this.state.status)!==-1}get agent(){return this.virtual?this.state.external_agent?this.state.external_agent:this.state.virtual_agent:this.state.agent||this.state.virtual_agent}get allAgents(){return{virtual:this.state.all_virtual_agents,human:this.state.all_agents}}get userIdentity(){return this.provider.identity}get status(){return this.state.status}get statusText(){return this.state.status_text}get cobrowsable(){return this.state.features.indexOf("cobrowse")!==-1}get ongoing(){return hP.indexOf(this.state.status)!=-1}get assigned(){return x0.indexOf(this.state.status)!=-1}get dismissed(){return N0.indexOf(this.state.status)!=-1}get ended(){return vP.indexOf(this.state.status)!=-1}get transcriptCount(){return this.state.transcript_requested_count}get createdAt(){return this.state.created_at}get inTask(){return this.provider.inTask}get feedbackType(){var r;return this.state.survey_enabled?"survey":(r=this.state.csat_settings)!=null&&r.enabled?"rate":"none"}update(r){r.id==this.state.id&&(this.state=r,r.status==="canceled"?this.triggerEvent("ended",this):this.triggerEvent("updated",this))}on(r,t){this.events.addEventListener(r,t)}off(r,t){this.events.removeEventListener(r,t)}async connect(){try{return await Rg(()=>{var r;return(r=this.provider)==null?void 0:r.create()},3),await Rg(()=>{var r;return(r=this.provider)==null?void 0:r.join(this.state.provider_channel_id)},3),this.provider?(this.connected=!0,this.triggerEvent("connected",this),Bf.info("connected with provider",this.state.provider_type),!0):(Bf.info("connecting interrupted"),!1)}catch{return!1}}async disconnect(){this.connected=!1,this.triggerEvent("disconnected",this),this.events.destroy(),this.provider&&(await this.provider.destroy(),Bf.info("disconnect with provider",this.state.provider_type))}async sendMessage(r,t){const n=await this.provider.sendMessage(r);return t&&(this.cachedFiles[n.toString()]=t,this.store.save(n,t)),n}preview(r){if(!this.inTask)return this.provider.preview(r)}async fetchMessages(){if(this.connected){const r=await this.store.getAllFiles();return this.provider.fetchMessages(r)}else throw new Error("Please fetchMessages after chat connected.")}startTyping(){return this.provider.startTyping()}stopTyping(){return this.provider.stopTyping()}async destroy(){await this.clearMediaStore(),this.connected&&await this.disconnect(),this.provider&&(this.triggerEvent("destroyed"),this.provider=null),this.events.destroy(),this.state=null}async clearMediaStore(){await this.store.clear()}triggerEvent(r,t){this.events.triggerEvent(r,t),this.globalEvents&&this.globalEvents.triggerEvent("chat."+r,t)}registerMessageEvents(r){r.event==="cobrowseRequestedFromAgent"?this.events.triggerEvent("_requestCobrowse","agent"):r.event==="cobrowseRequestedFromEndUser"?this.events.triggerEvent("_requestCobrowse","end_user"):r.event==="chatDismissed"?(this.state.status="dismissed",this.triggerEvent("dismissed",this)):r.event==="chatEnded"?(this.disconnect(),r.timeout?(this.state.status="timeout",this.triggerEvent("timeout",this)):(this.state.status="finished",this.triggerEvent("ended",this))):r.event==="escalationStarted"?this.inEscalation=!0:(r.event==="escalationFailed"||r.event==="escalationAccepted")&&(this.inEscalation=!1)}}function L0(e){return e.map(gP).filter(r=>r.enabled)}function gP(e){const r={id:e.id,enabled:!0,channels:[]};if(e.hidden||!e.name||!e.name.trim())return r.enabled=!1,r;r.name=e.name.trim();const t=yP(e);if(t&&(r.redirection=e.redirection),e.children&&e.children.length){const n=L0(e.children);return r.enabled=n.length>0||t,r.children=n,r}if(!e.channels)r.enabled=t;else{const{channels:n,deflection:i}=bP(e.channels);r.deflection=i,t||(r.channels=n),r.enabled=n.length>0||t}return r}function yP(e){let r=!1;const t=e.redirection;return t&&(t.option==="message"||t.option==="url")&&(r=!!t.data),r}function bP(e){let r=null;const t=[],n=e.chat,i=a=>{!a.deflection_type&&a.deflected_reason&&(a.deflection_type=a.deflected_reason),a.deflected===void 0&&a.deflection_type&&(a.deflected=!0),t.push(a)};return n&&n.deflected&&(r={enabled:!0,type:n.deflected_reason}),n&&(n.enabled||n.virtual_agent_available)&&i({...e.chat,type:"chat"}),e.voice_call&&e.voice_call.instant_enabled&&i({...e.voice_call,type:"instant_call"}),e.voice_call&&e.voice_call.schedule_enabled&&i({...e.voice_call,type:"scheduled_call",deflection_type:e.voice_call.schedule_deflection_type}),e.email&&e.email.enabled&&i({...e.email,type:"email"}),n&&n.deflected&&n.deflected_reason==="over_capacity"&&n.keep_waiting&&i({...n,enabled:!0,type:"keep_waiting",deflection_type:n.deflected_reason}),e.external_deflection_link&&e.external_deflection_link.enabled&&e.external_deflection_link.links.forEach(s=>{s.enabled&&i({...s,type:"external_link"})}),{channels:t,deflection:r}}const _P={en:"English (US)","en-CA":"English (Canada)","en-GB":"English (UK)",es:"Español (España)","es-MX":"Español (México)",fr:"Français (France)","fr-CA":"Français (Canada)",de:"Deutsch",ja:"日本語",ko:"한국어",it:"Italiano",zh:"中文 (简体)","zh-Hant":"中文 (繁體)",sv:"Svenska",pt:"Português (Portugal)","pt-BR":"Português (Brasil)",fi:"Suomi",nb:"Norsk",da:"Dansk",nl:"Nederlands",tr:"Türk",vi:"Tiếng Việt",th:"คนไทย",ar:"اَلْعَرَبِيَّةُ",cs:"Czech",pl:"Polish",hu:"Hungarian"};function wP(e){var t,n;return{languages:e.languages.filter(i=>i.enabled).map(i=>({lang:i.lang,name:i.name,localeName:_P[i.lang]})),name:e.display_name,subdomain:e.subdomain,support_email:e.support_email,action_tracking:e.action_tracking_enabled,email_transcripts:e.chat_settings.email_transcripts,message_preview:e.chat_settings.message_preview,email_enhancement:e.email_enhancement_enabled,display_history:((t=e.chat_settings.display_history)==null?void 0:t.enabled)&&((n=e.chat_settings.display_history)==null?void 0:n.to_end_user),use_recording:e.use_recording,use_web:e.use_web}}function Mg(e){return e.chats=e.chats.map(r=>(r.entries=r.entries.map((t,n)=>SP(t,`${r.comm_id}-${n}`)),r)),e}function SP(e,r){var t;return{$index:e.timestamp,$sid:r,$timestamp:new Date(e.timestamp),$userType:e.role,$userId:((t=e.user_data)==null?void 0:t.id)||0,user:e.user_data,type:e.type,...e.body}}const js="ujet:",Or={set(e,r){return localStorage.setItem(js+e,r)},get(e){return localStorage.getItem(js+e)},del(e){return localStorage.removeItem(js+e)}},xg={set(e,r){return sessionStorage.setItem(js+e,r)},get(e){return sessionStorage.getItem(js+e)},del(e){return sessionStorage.removeItem(js+e)}},Ng=/Chrome/.test(navigator.userAgent);class CP{constructor(r){ct(this,"request");this.request=r}get(r,t){if(t){const n=[];Object.keys(t).forEach(i=>{const a=t[i];a!==void 0&&n.push(`${encodeURIComponent(i)}=${encodeURIComponent(a)}`)}),r+="?"+n.join("&")}return this.request(r,{method:"GET"})}post(r,t){const n={method:"POST"};return n.body=JSON.stringify(t),this.request(r,n)}patch(r,t){const n={method:"PATCH"};return n.body=JSON.stringify(t),this.request(r,n)}put(r,t){const n={method:"PUT"};return n.body=JSON.stringify(t),this.request(r,n)}async getTriggers(r){const t=`triggersResponse:${r}`,n=xg.get(t);if(n)return new Promise(s=>{s(JSON.parse(n))});const i={"UJET-Company-Id":r},a=await this.request("proactive_chat_triggers",{method:"GET",headers:i});return xg.set(t,JSON.stringify(a.data)),a.data}trackClientEvents(r){return this.post("/client_events",{events:r})}async getCompany(){const r=await this.get("company");return wP(r.data)}async getMenus(r,t){const n={type:"web_menu",lang:r,direct_access_key:t},i=await this.get("menus",n),a={key:!!t,user:!1},s=i.headers["ujet-direct-access"];return s&&s!="false"&&(a.user=!0),{menus:L0(i.data),direct:a}}async getAfterHourMessage(r){return(await this.get(`audible_messages/${r}`)).data["after_hours.message"].text}async getTimeSlots(r,t="en"){return(await this.get(`menus/${r}/time_slots`,{type:"web_menu",lang:t})).data}async getWaitTimes(r,t="en"){return(await this.get(`menus/${r}/wait_times`,{type:"web_menu",lang:t})).data}async finishChat(r){return(await this.patch(`chats/${r}`,{status:"finished"})).data}async getChatDeflection(r){const{data:t}=await this.get(`chats/${r}/deflections`);return t&&t.enabled?t:null}sendChatCustomData(r,t){let n;return typeof t=="string"?n={signed:!0,signed_data:t}:n={signed:!1,data:t},this.post(`chats/${r}/custom_data`,n)}sendChatTranscripts(r,t){return this.post(`chats/${r}/transcripts`,{emails:t.join(",")})}async listChatTaskMessages(r){return(await this.get(`chats/${r}/task_va_messages`)).data}async getChatTaskMessage(r,t){return(await this.get(`chats/${r}/task_va_messages/${t}`)).data}async sendChatTaskMessage(r,t){const n={content:{content:t,type:"text"}};return(await this.post(`chats/${r}/task_va_messages`,n)).data}escalateChat(r,t){return this.post(`chats/${r}/escalations`,t)}trackEscalation(r,t,n){return this.put(`chats/${r}/escalations/${t}`,{escalation_id:t,deflection_channel:n})}requestChatCobrowse(r,t){return this.post(`chats/${r}/cobrowse`,t)}rateChat(r,t){return this.patch(`chats/${r}/rating`,t)}async getChatSurvey(r){return(await this.get(`chats/${r}/survey`)).data}sendChatSurvey(r,t){const n={chat_id:r,answers:t};return this.put(`chats/${r}/survey`,n)}trackChatEndUserEvent(r,t){return this.post(`chats/${r}/end_user_event`,t)}async createChat(r,t,n,i){const a={chat:{menu_id:r,lang:t,email:n.email,greeting:n.greeting,trigger_id:n.trigger_id,ticket_id:n.ticket_id,custom_data:n.custom_data},cobrowsable:n.cobrowsable},c=(await this.post("chats",a)).data;return this.wrapChat(c,i)}async loadChat(r,t){const n=await this.getChat(r);return this.wrapChat(n,t)}async resumeChat(r,t){const n=await this.patch(`chats/${r}`,{status:"queued"});return this.wrapChat(n.data,t)}async getChatHistory(r=1){if(r===1){const{data:t}=await this.get("/chats/histories?page=1&per_page=2");return Mg(t)}else{const{data:t}=await this.get(`/chats/histories?page=${r}&per_page=1`);return Mg(t)}}async uploadChatFile(r,t){let n="file";/^image/.test(t.type)?n="photo":/^video/.test(t.type)?n="video":n="file";const i=t.name.replace(/\.[^.]+$/i,""),a=await this.post(`chats/${r}/${n}s/upload`,{filename:i}),s={file:t,fields:a.data.fields};Ng&&(s.file=await D0(t));const o=(await this.request(a.data.url,s)).data.key,l=(await this.post(`chats/${r}/${n}s`,{chat_id:r,[n]:{s3_path:o,photo_type:n}})).data;return l.type=n,l}async getChat(r){return(await this.get(`chats/${r}`)).data}wrapChat(r,t){const n=async()=>(await this.post(`chats/${r.id}/tokens`,{provider_type:r.provider_type,device_id:t})).data,i=new mP(r,n),a=async s=>{if(i.status==="va_assigned"){const o=(await this.get(`menus/${i.menuId}/virtual_agent_settings`,{lang:i.lang})).data.allow_skip_virtual_agent;i.allowSkipVirtualAgent=o,i.update(s)}};if(i.channelId)i.connect(),a(r);else{const s=setInterval(async()=>{const c=await this.getChat(i.id);c.provider_channel_id?(clearInterval(s),i.state&&(i.update(c),i.connect(),a(c))):(c.status==="canceled"||c.status==="finished")&&clearInterval(s)},1500)}return i.on("initialized",async()=>{if(i.status==="queued"){const s=await this.getChat(i.id);i.update(s)}}),i.on("memberJoined",async()=>{const s=await this.getChat(i.id);i.update(s)}),i}async createCall(r,t,n){const i={type:n.scheduled_at?"web_scheduled_call":"web_instant_call",menu_id:r,lang:t,email:n.email,ticket_id:n.ticket_id,recording_permission:n.recording_permission||"recording_permission_not_asked",scheduled_at:n.scheduled_at,custom_data:n.custom_data,end_user:{phone_number:n.phone_number}},s=(await this.post("calls",{call:i,cobrowsable:!1})).data;return s.menu_id=s.selected_menu.id,s}async fetchCall(r){const n=(await this.get(`calls/${r}`)).data;return n.menu_id=n.selected_menu.id,n}async cancelCall(r){const n=(await this.patch(`calls/${r}`,{status:"failed",fail_reason:"canceled"})).data;return n.menu_id=n.selected_menu.id,n}async listFileTypes(){return(await this.get("email_prohibited_file_types")).data}async createEmail(r,t,n){const i={end_user_email:n.email,email_body:n.content,menu_id:r.toString(),lang:t};return n.name&&(i.end_user_name=n.name),n.recaptcha&&(i.recaptcha_response=n.recaptcha),n.files&&Ng?i["email_attachments[]"]=await TP(n.files):n.files&&(i["email_attachments[]"]=[...n.files]),this.request("emails",{form:i})}}function TP(e){return Promise.all(e.map(D0))}function D0(e){return new Promise((r,t)=>{const n=new FileReader;n.onload=()=>{const i=[n.result],a={type:e.type,lastModified:e.lastModified};r({name:e.name,fileBits:i,options:a})},n.onerror=t,n.readAsArrayBuffer(e)})}const EP=Date.now(),j0={href:window.location.href,interval:24*60*60};function kP(e,r){if(!Array.isArray(e)||!e.length)return null;const t=AP(),n=t===0,i=t+1;return MP(i),e.filter(s=>{const c=$P(s,j0.href),o=PP(s.visitor_type,n),u=IP(s.messages,r),l=i>=s.page_visit_count,f=!OP(s.id);return c&&o&&u&&l&&f}).sort((s,c)=>s.stay_time-c.stay_time)[0]||null}function RP(e,r){const t=e.stay_time*1e3,n=Math.max(t-(Date.now()-EP),0);setTimeout(()=>{r(e),Or.set(`trigger:${e.id}`,(Date.now()/1e3).toString())},n)}function $P(e,r){const t=e.keywords_included||[],n=e.keywords_excluded||[];if(!t.length&&!n.length)return!0;const i=t.filter(s=>r.indexOf(s)!==-1).length,a=n.filter(s=>r.indexOf(s)===-1).length;return!!i||!!a}function PP(e,r){return e==="visitor_type_new"?r:e==="visitor_type_returning"?!r:!0}function IP(e,r){return e.filter(n=>n.lang===r).length>0}function OP(e){try{const r=parseInt(Or.get(`trigger:${e}`),10);return Date.now()/1e3-r<j0.interval}catch{return!1}}function AP(){try{const e=Or.get("visits");return e?parseInt(e,10):0}catch{return 0}}function MP(e){try{Or.set("visits",e.toString())}catch(r){console.error(r)}}const xP=`<dialog open class="cobrowse-dialog">
|
|
1
|
+
"use strict";var W$=Object.defineProperty;var V$=(e,r,t)=>r in e?W$(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var ct=(e,r,t)=>V$(e,typeof r!="symbol"?r+"":r,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H$="prod",Tv="3.3.1",kg="https://main.api.ujet.co",Ar={companyId:"",tenant:"",trackerId:"",deviceId:"",application:"websdk",version:Tv};function K$(e){return(e==null?void 0:e.constructor)===Object}async function Rg(e,r=3){let t=0,n;for(;t<=r;){t+=1;try{return await e()}catch(i){n=i,console.error(i),await J$(1e3*Math.pow(2,t))}}throw n}function J$(e){return new Promise(r=>{setTimeout(()=>{r(0)},e)})}function Y$(){return Math.random().toString(36).slice(2)}const X$=new TextDecoder,Q$=e=>{const r=atob(e),t=new Uint8Array(r.length);for(let n=0;n<r.length;n++)t[n]=r.charCodeAt(n);return X$.decode(t)},$g=[];class ka{constructor(r){ct(this,"channel");this.channel=r}static addHandler(r){$g.push(r)}debug(...r){this._log("debug",...r)}info(...r){this._log("info",...r)}warn(...r){this._log("warn",...r)}error(...r){this._log("error",...r)}_log(r,...t){$g.forEach(n=>{n(this.channel,r,...t)})}}const Z$=(e,r,...t)=>{console[r](`[${r}][${e}]`,...t)},eP=e=>{let r=[],t;return(i,a,...s)=>{a==="debug"||i==="communicator"||(r.push(tP(i,a,...s)),clearTimeout(t),t=window.setTimeout(()=>{if(r.length){const c={num_of_logs:r.length,logs:r};e(c)}r=[]},2e3))}};function tP(e,r,...t){let n=t.pop();typeof n=="string"&&(t.push(n),n={});const i=t.join(" "),a={loglevel:r,channel:e,timestamp:new Date().toISOString(),application:Ar.application,version:Ar.version,device:Ar.deviceId,tenant:Ar.tenant,company_id:Ar.companyId,location_url:location.href,data:iP(n),message:Ev(i)};return Ar.trackerId&&(a.tracker_id=Ar.trackerId),a}const rP=["user","phone","phone_number","phoneNumber","email"],nP=[/(?:3[47]\d|(?:4\d|5[1-5]|65)\d{2}|6011)\d{12}/g,/(?!(000|666|9))\d{3}-(?!00)\d{2}-(?!0000)\d{4}/g,/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+$/g];function Ev(e){return typeof e=="string"?nP.forEach(r=>{e=e.replace(r,"__MASKED__")}):e&&K$(e)&&(e={...e},Object.keys(e).forEach(r=>{rP.indexOf(r)!==-1?e[r]="__MASKED__":Ev(e[r])})),e}function iP(e){if(e.error){const r=e.error;return{error:{name:r.name,message:r.message,stack:r.stack}}}return Ev(e.data)}const Uf=new ka("communicator");let Pg=!1;class aP{constructor(r,t){ct(this,"events");ct(this,"options");ct(this,"channel");ct(this,"authenticate");ct(this,"channelReady",!1);ct(this,"__authed",!1);ct(this,"pending",[]);ct(this,"promises",{});ct(this,"user");ct(this,"iframe");this.authenticate=r.authenticate,this.events=t,this.options=sP(r),this.channel=new MessageChannel,this.useConnect(this.options)}useConnect(r){const t=document.createElement("iframe");t.src=r.bridge,t.setAttribute("style","display:none");let n="*";/^https:/.test(r.bridge)&&(n=new URL(r.bridge).origin),t.addEventListener("load",()=>{if(Uf.debug("iframe bridge ready for",n),!this.channelReady){const i={type:"_init",data:r};t.contentWindow.postMessage(i,n,[this.channel.port2])}}),this.channel.port1.onmessage=i=>{this.receiveMessage(i)},document.body.appendChild(t),this.iframe=t}receiveMessage(r){const t=r.data;if(t){if(Uf.debug("receiveMessage",t),t.type==="ready")this.channelReady=!0,Ar.deviceId=t.result.deviceId,this.runPending(),this.events.triggerEvent("ready");else if(t.type==="callback"&&t.callbackId){const[n,i]=this.promises[t.callbackId];t.error?i(t.error):n(t.result),delete this.promises[t.callbackId]}else if(t.type==="refreshToken")this.refreshToken();else if(t.request==="_auth"&&(this.events.triggerEvent("authenticated"),t.result&&t.result.log_proxy_url&&!Pg)){Pg=!0;const n=eP(i=>{this.postMessage({type:"_log",data:i})});ka.addHandler(n)}}}postMessage(r){this.channelReady?(Uf.debug("postMessage",r),this.channel.port1.postMessage(r)):this.pending.push(r)}runPending(){for(;this.pending.length;){const r=this.pending.shift();this.postMessage(r)}}postPromise(r,t){return new Promise((n,i)=>{const a=Y$()+"_"+Date.now();this.promises[a]=[n,i];const s={type:r,callbackId:a,data:t};this.postMessage(s)})}async refreshToken(){this.__authed=!0;const r=await this.authenticate(),t=["twilio_chat","nexmo_chat"];this.options.cobrowse&&t.push("cobrowse");const i={type:"_auth",data:{modules:t,user:{token:r.token,company_id:this.options.companyId}}};this.postMessage(i);const a=JSON.parse(Q$(r.token.split(".")[1]));this.user={identity:a.identity,name:a.name,email:a.email},this.events.triggerEvent("authenticate")}request(r,t){!this.__authed&&r!=="proactive_chat_triggers"&&this.refreshToken();const n={url:r,options:t};return this.postPromise("request",n)}destroy(){delete this.channel,this.iframe&&(document.body.removeChild(this.iframe),this.iframe=void 0)}}function sP(e){var i;let r=e.host;r||(e.tenant?r=kg.replace("main.api",e.tenant+".api"):r=kg);const t=e.lang||"en",n=!!((i=e.cobrowse)!=null&&i.enabled);return{host:r,lang:t,cobrowse:n,companyId:e.companyId,location:location.href,version:e.version||"3.3.1",bridge:e.bridge||"https://websdk.ujet.co/v3/bridge.html"}}class kv{constructor(){ct(this,"handlers",{})}addEventListener(r,t){this.handlers[r]||(this.handlers[r]=[]),this.handlers[r].push(t)}triggerEvent(r,t){const n=this.handlers[r];n&&n.forEach(i=>{i(t)})}removeEventListener(r,t){if(this.handlers[r]){const n=this.handlers[r].indexOf(t);n!==-1&&this.handlers[r].splice(n,1)}}destroy(){this.handlers={}}}function oP(e,r){const t={};return r.forEach(n=>{t[n.id]=n}),e.map(n=>{if(n.type==="server_message"){const i=n.message_id,a=t[i];O0(n,a.content)}return n})}function uP(e,r){return O0(e,r.content)}function O0(e,r){return Object.keys(r).forEach(t=>{e[t]=r[t]}),e}const Ig=new ka("MediaStore"),cP=window.indexedDB||window.webkitIndexedDB||window.mozIndexedDB||window.OIndexedDB||window.msIndexedDB,lP="chat-media",Og=1,ll="file";class A0{constructor(){ct(this,"db")}store(){return new Promise((r,t)=>{if(this.db)return r(Ag(this.db));const n=cP.open(lP,Og);n.onerror=()=>{t(new Error("indexedDB open failed"))},n.onsuccess=()=>{const i=n.result;this.db=i,r(Ag(i))},n.onupgradeneeded=i=>{const a=n.result;i.oldVersion>0&&i.oldVersion<Og&&(Ig.info("deprecating media store"),a.deleteObjectStore(ll)),Ig.info("creating media store"),a.createObjectStore(ll)}})}async save(r,t){(await this.store()).put({index:r,file:t},r)}async getAll(){const r=await this.store();return await new Promise((t,n)=>{const i=r.getAll();i.onerror=()=>{n(new Error("indexedDB getAll failed"))},i.onsuccess=()=>{t(i.result)}})}async getAllFiles(){const r={};return(await this.getAll()).forEach(n=>{r[n.index]=n.file}),r}async clear(){(await this.store()).clear()}}function Ag(e){return e.transaction(ll,"readwrite").objectStore(ll)}const fP=new ka("chat-provider");class Rv{constructor(r,t,n){ct(this,"audio");ct(this,"issueChatToken");ct(this,"identity");ct(this,"channelId");ct(this,"region");ct(this,"inTask",!1);ct(this,"events");this.events=r,this.region=t.region,this.issueChatToken=n}ping(){this.audio||(this.audio=new window.Audio("https://websdk.ujet.co/v3/ping.mp3"));try{this.audio.play()}catch(r){fP.warn("Chat audio play failed",{error:r})}}on(r,t){this.events.addEventListener(r,t)}off(r,t){this.events.removeEventListener(r,t)}trackInTask(r){r.type==="noti"&&r.event==="taskVaStarted"?this.inTask=!0:r.type==="noti"&&r.event==="taskVaFinished"&&(this.inTask=!1)}}ct(Rv,"type","base");const M0={};function $v(e){M0[e.type]=e}function dP(e){return M0[e]}const x0=["assigned","va_assigned"],N0=["dismissed","va_dismissed"],pP=["va_assigned","va_dismissed"],hP=["queued",...x0,...N0],vP=["timeout","canceled","failed","finished"],Bf=new ka("Chat");class mP{constructor(r,t){ct(this,"provider");ct(this,"store");ct(this,"globalEvents");ct(this,"state");ct(this,"connected",!1);ct(this,"allowSkipVirtualAgent",!1);ct(this,"inEscalation",!1);ct(this,"events");ct(this,"cachedFiles");this.state=r,this.store=new A0,this.cachedFiles={},this.events=new kv;const n=dP(this.state.provider_type);this.provider=new n(this.events,r,t)}_setGlobalEvents(r,t){this.globalEvents=r,this.on("message",n=>{if(n.type==="server_message"){const i=n.message_id;t(this.id,i).then(a=>{n=uP(n,a),r.triggerEvent("chat.message",n)})}else n.type==="photo"||n.type==="video"?setTimeout(()=>{const i=n.$index.toString();n.file=this.cachedFiles[i],r.triggerEvent("chat.message",n)},100):(r.triggerEvent("chat.message",n),this.registerMessageEvents(n))}),this.on("memberJoined",n=>{r.triggerEvent("chat.memberJoined",n)}),this.on("memberLeft",n=>{r.triggerEvent("chat.memberLeft",n)}),this.on("typingStarted",n=>{r.triggerEvent("chat.typingStarted",n)}),this.on("typingEnded",n=>{r.triggerEvent("chat.typingEnded",n)})}get id(){return this.state.id}get menuId(){return this.state.menus[this.state.menus.length-1].id}get channelId(){return this.state.provider_channel_id}get lang(){return this.state.lang}get virtual(){return pP.indexOf(this.state.status)!==-1}get agent(){return this.virtual?this.state.external_agent?this.state.external_agent:this.state.virtual_agent:this.state.agent||this.state.virtual_agent}get allAgents(){return{virtual:this.state.all_virtual_agents,human:this.state.all_agents}}get userIdentity(){return this.provider.identity}get status(){return this.state.status}get statusText(){return this.state.status_text}get cobrowsable(){return this.state.features.indexOf("cobrowse")!==-1}get ongoing(){return hP.indexOf(this.state.status)!=-1}get assigned(){return x0.indexOf(this.state.status)!=-1}get dismissed(){return N0.indexOf(this.state.status)!=-1}get ended(){return vP.indexOf(this.state.status)!=-1}get transcriptCount(){return this.state.transcript_requested_count}get createdAt(){return this.state.created_at}get inTask(){return this.provider.inTask}get feedbackType(){var r;return this.state.survey_enabled?"survey":(r=this.state.csat_settings)!=null&&r.enabled?"rate":"none"}update(r){r.id==this.state.id&&(this.state=r,r.status==="canceled"?this.triggerEvent("ended",this):this.triggerEvent("updated",this))}on(r,t){this.events.addEventListener(r,t)}off(r,t){this.events.removeEventListener(r,t)}async connect(){try{return await Rg(()=>{var r;return(r=this.provider)==null?void 0:r.create()},3),await Rg(()=>{var r;return(r=this.provider)==null?void 0:r.join(this.state.provider_channel_id)},3),this.provider?(this.connected=!0,this.triggerEvent("connected",this),Bf.info("connected with provider",this.state.provider_type),!0):(Bf.info("connecting interrupted"),!1)}catch{return!1}}async disconnect(){this.connected=!1,this.triggerEvent("disconnected",this),this.events.destroy(),this.provider&&(await this.provider.destroy(),Bf.info("disconnect with provider",this.state.provider_type))}async sendMessage(r,t){const n=await this.provider.sendMessage(r);return t&&(this.cachedFiles[n.toString()]=t,this.store.save(n,t)),n}preview(r){if(!this.inTask)return this.provider.preview(r)}async fetchMessages(){if(this.connected){const r=await this.store.getAllFiles();return this.provider.fetchMessages(r)}else throw new Error("Please fetchMessages after chat connected.")}startTyping(){return this.provider.startTyping()}stopTyping(){return this.provider.stopTyping()}async destroy(){await this.clearMediaStore(),this.connected&&await this.disconnect(),this.provider&&(this.triggerEvent("destroyed"),this.provider=null),this.events.destroy(),this.state=null}async clearMediaStore(){await this.store.clear()}triggerEvent(r,t){this.events.triggerEvent(r,t),this.globalEvents&&this.globalEvents.triggerEvent("chat."+r,t)}registerMessageEvents(r){r.event==="cobrowseRequestedFromAgent"?this.events.triggerEvent("_requestCobrowse","agent"):r.event==="cobrowseRequestedFromEndUser"?this.events.triggerEvent("_requestCobrowse","end_user"):r.event==="chatDismissed"?(this.state.status="dismissed",this.triggerEvent("dismissed",this)):r.event==="chatEnded"?(this.disconnect(),r.timeout?(this.state.status="timeout",this.triggerEvent("timeout",this)):(this.state.status="finished",this.triggerEvent("ended",this))):r.event==="escalationStarted"?this.inEscalation=!0:(r.event==="escalationFailed"||r.event==="escalationAccepted")&&(this.inEscalation=!1)}}function L0(e){return e.map(gP).filter(r=>r.enabled)}function gP(e){const r={id:e.id,enabled:!0,channels:[]};if(e.hidden||!e.name||!e.name.trim())return r.enabled=!1,r;r.name=e.name.trim();const t=yP(e);if(t&&(r.redirection=e.redirection),e.children&&e.children.length){const n=L0(e.children);return r.enabled=n.length>0||t,r.children=n,r}if(!e.channels)r.enabled=t;else{const{channels:n,deflection:i}=bP(e.channels);r.deflection=i,t||(r.channels=n),r.enabled=n.length>0||t}return r}function yP(e){let r=!1;const t=e.redirection;return t&&(t.option==="message"||t.option==="url")&&(r=!!t.data),r}function bP(e){let r=null;const t=[],n=e.chat,i=a=>{!a.deflection_type&&a.deflected_reason&&(a.deflection_type=a.deflected_reason),a.deflected===void 0&&a.deflection_type&&(a.deflected=!0),t.push(a)};return n&&n.deflected&&(r={enabled:!0,type:n.deflected_reason}),n&&(n.enabled||n.virtual_agent_available)&&i({...e.chat,type:"chat"}),e.voice_call&&e.voice_call.instant_enabled&&i({...e.voice_call,type:"instant_call"}),e.voice_call&&e.voice_call.schedule_enabled&&i({...e.voice_call,type:"scheduled_call",deflection_type:e.voice_call.schedule_deflection_type}),e.email&&e.email.enabled&&i({...e.email,type:"email"}),n&&n.deflected&&n.deflected_reason==="over_capacity"&&n.keep_waiting&&i({...n,enabled:!0,type:"keep_waiting",deflection_type:n.deflected_reason}),e.external_deflection_link&&e.external_deflection_link.enabled&&e.external_deflection_link.links.forEach(s=>{s.enabled&&i({...s,type:"external_link"})}),{channels:t,deflection:r}}const _P={en:"English (US)","en-CA":"English (Canada)","en-GB":"English (UK)",es:"Español (España)","es-MX":"Español (México)",fr:"Français (France)","fr-CA":"Français (Canada)",de:"Deutsch",ja:"日本語",ko:"한국어",it:"Italiano",zh:"中文 (简体)","zh-Hant":"中文 (繁體)",sv:"Svenska",pt:"Português (Portugal)","pt-BR":"Português (Brasil)",fi:"Suomi",nb:"Norsk",da:"Dansk",nl:"Nederlands",tr:"Türk",vi:"Tiếng Việt",th:"คนไทย",ar:"اَلْعَرَبِيَّةُ",cs:"Czech",pl:"Polish",hu:"Hungarian"};function wP(e){var t,n;return{languages:e.languages.filter(i=>i.enabled).map(i=>({lang:i.lang,name:i.name,localeName:_P[i.lang]})),name:e.display_name,subdomain:e.subdomain,support_email:e.support_email,action_tracking:e.action_tracking_enabled,email_transcripts:e.chat_settings.email_transcripts,message_preview:e.chat_settings.message_preview,email_enhancement:e.email_enhancement_enabled,display_history:((t=e.chat_settings.display_history)==null?void 0:t.enabled)&&((n=e.chat_settings.display_history)==null?void 0:n.to_end_user),use_recording:e.use_recording,use_web:e.use_web}}function Mg(e){return e.chats=e.chats.map(r=>(r.entries=r.entries.map((t,n)=>SP(t,`${r.comm_id}-${n}`)),r)),e}function SP(e,r){var t;return{$index:e.timestamp,$sid:r,$timestamp:new Date(e.timestamp),$userType:e.role,$userId:((t=e.user_data)==null?void 0:t.id)||0,user:e.user_data,type:e.type,...e.body}}const js="ujet:",Or={set(e,r){return localStorage.setItem(js+e,r)},get(e){return localStorage.getItem(js+e)},del(e){return localStorage.removeItem(js+e)}},xg={set(e,r){return sessionStorage.setItem(js+e,r)},get(e){return sessionStorage.getItem(js+e)},del(e){return sessionStorage.removeItem(js+e)}},Ng=/Chrome/.test(navigator.userAgent);class CP{constructor(r){ct(this,"request");this.request=r}get(r,t){if(t){const n=[];Object.keys(t).forEach(i=>{const a=t[i];a!==void 0&&n.push(`${encodeURIComponent(i)}=${encodeURIComponent(a)}`)}),r+="?"+n.join("&")}return this.request(r,{method:"GET"})}post(r,t){const n={method:"POST"};return n.body=JSON.stringify(t),this.request(r,n)}patch(r,t){const n={method:"PATCH"};return n.body=JSON.stringify(t),this.request(r,n)}put(r,t){const n={method:"PUT"};return n.body=JSON.stringify(t),this.request(r,n)}async getTriggers(r){const t=`triggersResponse:${r}`,n=xg.get(t);if(n)return new Promise(s=>{s(JSON.parse(n))});const i={"UJET-Company-Id":r},a=await this.request("proactive_chat_triggers",{method:"GET",headers:i});return xg.set(t,JSON.stringify(a.data)),a.data}trackClientEvents(r){return this.post("/client_events",{events:r})}async getCompany(){const r=await this.get("company");return wP(r.data)}async getMenus(r,t){const n={type:"web_menu",lang:r,direct_access_key:t},i=await this.get("menus",n),a={key:!!t,user:!1},s=i.headers["ujet-direct-access"];return s&&s!="false"&&(a.user=!0),{menus:L0(i.data),direct:a}}async getAfterHourMessage(r){return(await this.get(`audible_messages/${r}`)).data["after_hours.message"].text}async getTimeSlots(r,t="en"){return(await this.get(`menus/${r}/time_slots`,{type:"web_menu",lang:t})).data}async getWaitTimes(r,t="en"){return(await this.get(`menus/${r}/wait_times`,{type:"web_menu",lang:t})).data}async verifyForm(r){try{return await this.post("forms/verify",r),!0}catch{return!1}}async finishChat(r){return(await this.patch(`chats/${r}`,{status:"finished"})).data}async getChatDeflection(r){const{data:t}=await this.get(`chats/${r}/deflections`);return t&&t.enabled?t:null}sendChatCustomData(r,t){let n;return typeof t=="string"?n={signed:!0,signed_data:t}:n={signed:!1,data:t},this.post(`chats/${r}/custom_data`,n)}async downloadChatTranscript(r){return(await this.post(`chats/${r}/generate_transcript_pdf`,{})).data}async getPdfStatus(r){return await this.get(`chat_transcript_pdfs/${r}/download_transcript`)}sendChatTranscripts(r,t){return this.post(`chats/${r}/transcripts`,{emails:t.join(",")})}async listChatTaskMessages(r){return(await this.get(`chats/${r}/task_va_messages`)).data}async getChatTaskMessage(r,t){return(await this.get(`chats/${r}/task_va_messages/${t}`)).data}async sendChatTaskMessage(r,t){const n={content:{content:t,type:"text"}};return(await this.post(`chats/${r}/task_va_messages`,n)).data}escalateChat(r,t){return this.post(`chats/${r}/escalations`,t)}trackEscalation(r,t,n){return this.put(`chats/${r}/escalations/${t}`,{escalation_id:t,deflection_channel:n})}requestChatCobrowse(r,t){return this.post(`chats/${r}/cobrowse`,t)}rateChat(r,t){return this.patch(`chats/${r}/rating`,t)}async getChatSurvey(r){return(await this.get(`chats/${r}/survey`)).data}sendChatSurvey(r,t){const n={chat_id:r,answers:t};return this.put(`chats/${r}/survey`,n)}trackChatEndUserEvent(r,t){return this.post(`chats/${r}/end_user_event`,t)}async createChat(r,t,n,i){const a={chat:{menu_id:r,lang:t,email:n.email,greeting:n.greeting,trigger_id:n.trigger_id,ticket_id:n.ticket_id,custom_data:n.custom_data},cobrowsable:n.cobrowsable},c=(await this.post("chats",a)).data;return this.wrapChat(c,i)}async loadChat(r,t){const n=await this.getChat(r);return this.wrapChat(n,t)}async resumeChat(r,t){const n=await this.patch(`chats/${r}`,{status:"queued"});return this.wrapChat(n.data,t)}async getChatHistory(r=1){if(r===1){const{data:t}=await this.get("/chats/histories?page=1&per_page=2");return Mg(t)}else{const{data:t}=await this.get(`/chats/histories?page=${r}&per_page=1`);return Mg(t)}}async uploadChatFile(r,t){let n="file";/^image/.test(t.type)?n="photo":/^video/.test(t.type)?n="video":n="file";const i=t.name.replace(/\.[^.]+$/i,""),a=await this.post(`chats/${r}/${n}s/upload`,{filename:i}),s={file:t,fields:a.data.fields};Ng&&(s.file=await D0(t));const o=(await this.request(a.data.url,s)).data.key,l=(await this.post(`chats/${r}/${n}s`,{chat_id:r,[n]:{s3_path:o,photo_type:n}})).data;return l.type=n,l}async getChat(r){return(await this.get(`chats/${r}`)).data}wrapChat(r,t){const n=async()=>(await this.post(`chats/${r.id}/tokens`,{provider_type:r.provider_type,device_id:t})).data,i=new mP(r,n),a=async s=>{if(i.status==="va_assigned"){const o=(await this.get(`menus/${i.menuId}/virtual_agent_settings`,{lang:i.lang})).data.allow_skip_virtual_agent;i.allowSkipVirtualAgent=o,i.update(s)}};if(i.channelId)i.connect(),a(r);else{const s=setInterval(async()=>{const c=await this.getChat(i.id);c.provider_channel_id?(clearInterval(s),i.state&&(i.update(c),i.connect(),a(c))):(c.status==="canceled"||c.status==="finished")&&clearInterval(s)},1500)}return i.on("initialized",async()=>{if(i.status==="queued"){const s=await this.getChat(i.id);i.update(s)}}),i.on("memberJoined",async()=>{const s=await this.getChat(i.id);i.update(s)}),i.on("memberLeft",async()=>{const s=await this.getChat(i.id);i.update(s)}),i}async createCall(r,t,n){const i={type:n.scheduled_at?"web_scheduled_call":"web_instant_call",menu_id:r,lang:t,email:n.email,ticket_id:n.ticket_id,recording_permission:n.recording_permission||"recording_permission_not_asked",scheduled_at:n.scheduled_at,custom_data:n.custom_data,end_user:{phone_number:n.phone_number}},s=(await this.post("calls",{call:i,cobrowsable:!1})).data;return s.menu_id=s.selected_menu.id,s}async fetchCall(r){const n=(await this.get(`calls/${r}`)).data;return n.menu_id=n.selected_menu.id,n}async cancelCall(r){const n=(await this.patch(`calls/${r}`,{status:"failed",fail_reason:"canceled"})).data;return n.menu_id=n.selected_menu.id,n}async listFileTypes(){return(await this.get("email_prohibited_file_types")).data}async createEmail(r,t,n){const i={end_user_email:n.email,email_body:n.content,menu_id:r.toString(),lang:t};return n.name&&(i.end_user_name=n.name),n.recaptcha&&(i.recaptcha_response=n.recaptcha),n.files&&Ng?i["email_attachments[]"]=await TP(n.files):n.files&&(i["email_attachments[]"]=[...n.files]),this.request("emails",{form:i})}}function TP(e){return Promise.all(e.map(D0))}function D0(e){return new Promise((r,t)=>{const n=new FileReader;n.onload=()=>{const i=[n.result],a={type:e.type,lastModified:e.lastModified};r({name:e.name,fileBits:i,options:a})},n.onerror=t,n.readAsArrayBuffer(e)})}const EP=Date.now(),j0={href:window.location.href,interval:24*60*60};function kP(e,r){if(!Array.isArray(e)||!e.length)return null;const t=AP(),n=t===0,i=t+1;return MP(i),e.filter(s=>{const c=$P(s,j0.href),o=PP(s.visitor_type,n),u=IP(s.messages,r),l=i>=s.page_visit_count,f=!OP(s.id);return c&&o&&u&&l&&f}).sort((s,c)=>s.stay_time-c.stay_time)[0]||null}function RP(e,r){const t=e.stay_time*1e3,n=Math.max(t-(Date.now()-EP),0);setTimeout(()=>{r(e),Or.set(`trigger:${e.id}`,(Date.now()/1e3).toString())},n)}function $P(e,r){const t=e.keywords_included||[],n=e.keywords_excluded||[];if(!t.length&&!n.length)return!0;const i=t.filter(s=>r.indexOf(s)!==-1).length,a=n.filter(s=>r.indexOf(s)===-1).length;return!!i||!!a}function PP(e,r){return e==="visitor_type_new"?r:e==="visitor_type_returning"?!r:!0}function IP(e,r){return e.filter(n=>n.lang===r).length>0}function OP(e){try{const r=parseInt(Or.get(`trigger:${e}`),10);return Date.now()/1e3-r<j0.interval}catch{return!1}}function AP(){try{const e=Or.get("visits");return e?parseInt(e,10):0}catch{return 0}}function MP(e){try{Or.set("visits",e.toString())}catch(r){console.error(r)}}const xP=`<dialog open class="cobrowse-dialog">
|
|
2
2
|
<h1>$title</h1>
|
|
3
3
|
<div class="cobrowse-dialog_content">$content</div>
|
|
4
4
|
<div class="cobrowse-dialog_footer">
|
|
5
5
|
<button class="cobrowse-dialog_allow js-cobrowse-allow">$allow</button>
|
|
6
6
|
<button class="cobrowse-dialog_deny js-cobrowse-deny">$deny</button>
|
|
7
7
|
</div>
|
|
8
|
-
</dialog>`,NP='<button class="cobrowse-end js-cobrowse-end">$end</button>';class Pv{constructor(r,t){ct(this,"_cobrowse");ct(this,"_options");ct(this,"_started",!1);this._cobrowse=r,this._options=t}get root(){return this._options.root||document.body}get lang(){return this._options.lang}get messages(){return this._options.messages}get template(){return this._options.template||xP}static async create(r){const t=await LP();t.license=r.license;const n=r.trustedOrigins||[];return n.push(location.origin),t.trustedOrigins=n,["api","capabilities","registration","redactedViews","unredactedViews"].forEach(a=>{r[a]!==void 0&&(t[a]=r[a])}),new Pv(t,r)}setCustomData(r){this._cobrowse.customData=r}on(r,t){this._cobrowse.on(r,t)}async start(){this._started||(await this._cobrowse.client(),await this._cobrowse.start(),this._started=!0,this.setupConfirms(),this.setupSessionControl())}async stop(){await this._cobrowse.stop(),this._started=!1}async endSession(){this._cobrowse.currentSession&&await this._cobrowse.currentSession.end()}async createSessionCode(){return this._cobrowse.currentSession?this._cobrowse.currentSession.code():await this._cobrowse.createSessionCode()}createConfirmConsent(r){return()=>{const t=document.createElement("div");t.className="cobrowse-wrapper",t.lang=this.lang,t.innerHTML=r;const n=()=>{t.parentNode&&t.parentNode.removeChild(t)};return new Promise(i=>{this.root.appendChild(t);const a=t.querySelector(".js-cobrowse-allow");a==null||a.addEventListener("click",()=>{i(!0),n()});const s=t.querySelector(".js-cobrowse-deny");s==null||s.addEventListener("click",()=>{i(!1),n()})})}}setupConfirms(){this._cobrowse.confirmSession=this.createConfirmConsent(Wu(this._options.confirmSessionTemplate||this.template,{title:this.messages.confirmSessionTitle,content:this.messages.confirmSessionContent,allow:this.messages.allowText,deny:this.messages.denyText})),this._cobrowse.confirmRemoteControl=this.createConfirmConsent(Wu(this._options.confirmRemoteControlTemplate||this.template,{title:this.messages.confirmRemoteControlTitle,content:this.messages.confirmRemoteControlContent,allow:this.messages.allowText,deny:this.messages.denyText})),this._cobrowse.confirmFullDevice=this.createConfirmConsent(Wu(this._options.confirmFullDeviceTemplate||this.template,{title:this.messages.confirmFullDeviceTitle,content:this.messages.confirmFullDeviceContent,allow:this.messages.allowText,deny:this.messages.denyText}))}setupSessionControl(){const r=this._options.sessionControlsTemplate||NP,t=document.createElement("div");t.className="cobrowse-end-wrapper",t.setAttribute("lang",this.lang),t.innerHTML=Wu(r,{end:this.messages.endSessionText});const n=()=>{this.endSession()};this._cobrowse.showSessionControls=()=>{if(!this.root.contains(t)){const i=t.querySelector(".js-cobrowse-end");i&&i.addEventListener("click",n),this.root.appendChild(t)}},this._cobrowse.hideSessionControls=()=>{if(this.root.contains(t)){const i=t.querySelector(".js-cobrowse-end");i&&i.removeEventListener("click",n),this.root.removeChild(t)}}}}function LP(){return window.CobrowseIO?window.CobrowseIO:new Promise(e=>{const r=document.createElement("script");r.src="https://js.cobrowse.io/CobrowseIO.js",r.async=!0;const t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(r,t),r.onload=function(){e(window.CobrowseIO)}})}function Wu(e,r){let t=e;return Object.keys(r).forEach(n=>{const i=new RegExp("\\$"+n,"g");t=t.replace(i,r[n])}),t}const DP={confirmSessionTitle:"Co-browse Session Request",confirmSessionContent:"Do you want to share your current screen with the agent?",endSessionText:"End Co-browse Session",confirmRemoteControlTitle:"Remote Access Request",confirmRemoteControlContent:"The agent would like to have access to your currently shared screen to further assist you. Do you want to allow this?",confirmFullDeviceTitle:"Screen Share Request",confirmFullDeviceContent:"Do you want to share your full screen with the agent? The agent will not be able to control anything on the screen.",allowText:"Allow",denyText:"Deny"},jP={confirmSessionTitle:"Solicitud de sesión de conavegación",confirmSessionContent:"¿Desea compartir su pantalla actual con el agente?",endSessionText:"Fin de la sesión de conavegación",confirmRemoteControlTitle:"Solicitud de acceso remoto",confirmRemoteControlContent:"El agente desea tener acceso a su pantalla actual compartida para seguir asistiéndole. ¿Desea permitirlo?",confirmFullDeviceTitle:"Solicitud de compartir pantalla",confirmFullDeviceContent:"¿Desea compartir su pantalla completa con el agente? El agente no podrá controlar nada de la pantalla.",allowText:"Permitir",denyText:"Denegar"},FP={confirmSessionTitle:"Demande de session de co-navigation",confirmSessionContent:"Voulez-vous partager votre écran actuel avec l'agent ?",endSessionText:"Terminer la session de co-navigation",confirmRemoteControlTitle:"Demande d'accès à distance",confirmRemoteControlContent:"L'agent souhaite avoir accès à l'écran que vous partagez actuellement pour mieux vous aider. Voulez-vous l'y autoriser ?",confirmFullDeviceTitle:"Demande de partage d'écran",confirmFullDeviceContent:"Voulez-vous partager votre écran complet avec l'agent ? L'agent ne sera pas en mesure de contrôler quoi que ce soit sur l'écran.",allowText:"Autoriser",denyText:"Refuser"},UP={confirmSessionTitle:"Co-Browsing-Sitzungsanfrage",confirmSessionContent:"Möchten Sie Ihren aktuellen Bildschirm für den Agenten freigeben?",endSessionText:"Co-Browsing-Sitzung beenden",confirmRemoteControlTitle:"Fernzugriff-Anfrage",confirmRemoteControlContent:"Der Agent möchte Zugriff auf Ihren aktuell freigegebenen Bildschirm erhalten, um Ihnen weiterhelfen zu können. Möchten Sie dies erlauben?",confirmFullDeviceTitle:"Bildschirmfreigabe",confirmFullDeviceContent:"Möchten Sie Ihren gesamten Bildschirm für den Agenten freigeben? Der Agent ist dadurch nicht in der Lage, Elemente auf Ihrem Bildschirm zu steuern.",allowText:"Erlauben",denyText:"Verweigern"},BP={confirmSessionTitle:"共同ブラウジングセッションリクエスト",confirmSessionContent:"現在の画面を担当者と共有したいですか。",endSessionText:"共同ブラウジングセッションを終了",confirmRemoteControlTitle:"リモートアクセスリクエスト",confirmRemoteControlContent:"担当者は、お客様をさらにお手伝いするために、現在共有中の画面へのアクセスを希望しています。許可しますか。",confirmFullDeviceTitle:"画面共有リクエスト",confirmFullDeviceContent:"画面全体を担当者と共有したいですか。担当者は画面上で一切の操作ができません。",allowText:"許可",denyText:"拒否"},qP={confirmSessionTitle:"코브라우징 세션 요청",confirmSessionContent:"현재 화면을 상담원과 공유하시겠습니까?",endSessionText:"코브라우징 세션 종료",confirmRemoteControlTitle:"원격 액세스 요청",confirmRemoteControlContent:"상담원이 추가 지원을 위해 현재 공유된 화면에 액세스할 수 있기를 원합니다. 허용하시겠습니까?",confirmFullDeviceTitle:"화면 공유 요청",confirmFullDeviceContent:"상담원과 전체 화면을 공유하시겠습니까? 상담원은 화면의 어떤 부분도 제어할 수 없습니다.",allowText:"허용",denyText:"거절"},zP={confirmSessionTitle:"Richiesta di sessione di co-browsing",confirmSessionContent:"Vuoi condividere la tua schermata attuale con l'operatore?",endSessionText:"Termina sessione di co-browsing",confirmRemoteControlTitle:"Richiesta di accesso remoto",confirmRemoteControlContent:"L'operatore vorrebbe accedere alla tua schermata attualmente condivisa per assisterti al meglio. Acconsenti?",confirmFullDeviceTitle:"Richiesta di condivisione schermo",confirmFullDeviceContent:"Vuoi condividere il tuo intero schermo con l'operatore? L'operatore non potrà controllare nessun elemento sullo schermo.",allowText:"Consenti",denyText:"Rifiuta"},GP={confirmSessionTitle:"同步浏览会话请求",confirmSessionContent:"您是否要向该客服代表共享当前的屏幕?",endSessionText:"结束同步浏览会话",confirmRemoteControlTitle:"远程访问请求",confirmRemoteControlContent:"为了进一步协助您,客服代表想访问您当前的共享屏幕。您是否允许这样做?",confirmFullDeviceTitle:"屏幕共享请求",confirmFullDeviceContent:"您是否要向该客服代表共享全屏?客服代表将不能控制屏幕上的任何东西。",allowText:"允许",denyText:"拒绝"},WP={confirmSessionTitle:"Samwebbläsningssession har begärts",confirmSessionContent:"Vill du dela din aktuella skärm med vår medarbetare?",endSessionText:"Avsluta samwebbläsningssession",confirmRemoteControlTitle:"Begäran om fjärråtkomst",confirmRemoteControlContent:"Vår medarbetare skulle vilja få åtkomst till skärmen som du delar just nu för att kunna hjälpa dig vidare. Vill du tillåta detta?",confirmFullDeviceTitle:"Begäran om skärmdelning",confirmFullDeviceContent:"Vill du dela hela skärmen med medarbetaren? Medarbetaren kommer inte kunna kontrollera något på skärmen.",allowText:"Tillåt",denyText:"Neka"},VP={confirmSessionTitle:"Solicitação de Sessão de Co-navegação",confirmSessionContent:"Deseja partilhar o seu ecrã atual com o agente?",endSessionText:"Terminar Sessão de Co-navegação",confirmRemoteControlTitle:"Solicitação de Acesso Remoto",confirmRemoteControlContent:"O agente gostaria de ter acesso ao seu ecrã partilhado atualmente para ajudá-lo ainda mais. Quer permitir isto?",confirmFullDeviceTitle:"Solicitação de Partilha de Ecrã",confirmFullDeviceContent:"Deseja partilhar o seu ecrã inteiro com o agente? O agente não poderá controlar nada no ecrã.",allowText:"Permitir",denyText:"Negar"},HP={confirmSessionTitle:"Pyyntö yhteisselausistunnosta",confirmSessionContent:"Haluatko jakaa nykyisen näyttösi edustajan kanssa?",endSessionText:"Lopeta yhteisselausistunto",confirmRemoteControlTitle:"Etäkäyttöpyyntö",confirmRemoteControlContent:"Edustaja haluaisi saada käyttää tällä hetkellä jakamaasi näyttöä voidakseen auttaa sinua enemmän. Haluatko antaa siihen luvan?",confirmFullDeviceTitle:"Näytön jakamispyyntö",confirmFullDeviceContent:"Haluatko jakaa koko näyttösi edustajan kanssa? Edustaja ei pysty käyttämään mitään näytöllä olevaa.",allowText:"Salli",denyText:"Estä"},KP={confirmSessionTitle:"Samlesingsøkten er startet",confirmSessionContent:"Vil du dele skjermen din med agenten?",endSessionText:"Avslutt samlesingsøkt",confirmRemoteControlTitle:"Forespørsel om fjerntilgang",confirmRemoteControlContent:"Agenten vil ha tilgang til skjermen din for å kunne hjelpe deg videre. Vil du tillate dette?",confirmFullDeviceTitle:"Forespørsel om skjermdeling",confirmFullDeviceContent:"Vil du dele hele skjermen din med agenten? Agenten kan ikke kontrollere noe på skjermen.",allowText:"Tillat",denyText:"Avvis"},JP={confirmSessionTitle:"Forespørgsel om sambrowsingsession",confirmSessionContent:"Vil du dele din nuværende skærm med agenten",endSessionText:"Afslut sambrowsingsession",confirmRemoteControlTitle:"Anmodning om fjernadgang",confirmRemoteControlContent:"Agenten vil gerne have adgang til din nuværende delte skærm for at kunne hjælpe dig yderligere. Ønsker du at tillade dette?",confirmFullDeviceTitle:"Forespørgsel om skærmdeling",confirmFullDeviceContent:"Vil du dele din fulde skærm med agenten? Agenten vil ikke kunne styre noget på skærmen",allowText:"Tillad",denyText:"Afvis"},YP={confirmSessionTitle:"Verzoek om cobrowse-sessie",confirmSessionContent:"Wilt u uw huidige scherm delen met de agent?",endSessionText:"Cobrowse-sessie beëindigen",confirmRemoteControlTitle:"Verzoek om toegang op afstand",confirmRemoteControlContent:"De agent wil graag toegang hebben tot uw momenteel gedeelde scherm om u verder te helpen. Wilt u dit toestaan?",confirmFullDeviceTitle:"Verzoek om scherm te delen",confirmFullDeviceContent:"Wilt u uw volledige scherm delen met de agent? De agent kan niets op het scherm bedienen.",allowText:"Toestaan",denyText:"Weigeren"},XP={confirmSessionTitle:"Oturum İsteğini Eş Zamanlı Tara",confirmSessionContent:"Mevcut ekranınızı temsilciyle paylaşmak ister misiniz?",endSessionText:"Eş zamanlı Oturum Taramayı Sonlandır",confirmRemoteControlTitle:"Uzaktan Erişim İsteği",confirmRemoteControlContent:"Temsilci şu anda paylaşılan ekranınıza size daha fazla yardımcı olabilmek için erişim sağlamak istiyor. Buna izin vermek istiyor musunuz?",confirmFullDeviceTitle:"Ekran Paylaşım İsteği",confirmFullDeviceContent:"Temsilciyle tam ekranınızı paylaşmak istiyor musunuz? Temsilci ekrandaki hiçbir şeyi kontrol edemez.",allowText:"İzin Ver",denyText:"Reddet"},QP={confirmSessionTitle:"Yêu cầu phiên cùng duyệt",confirmSessionContent:"Bạn có muốn chia sẻ màn hình hiện tại của mình với chuyên viên không?",endSessionText:"Kết thúc phiên cùng duyệt",confirmRemoteControlTitle:"Yêu cầu truy cập từ xa",confirmRemoteControlContent:"Chuyên viên muốn được cấp quyền truy cập vào màn hình bạn đang chia sẻ để hỗ trợ bạn nhiều hơn. Bạn có muốn cho phép không?",confirmFullDeviceTitle:"Yêu cầu chia sẻ màn hình",confirmFullDeviceContent:"Bạn có muốn chia sẻ toàn bộ màn hình của mình với chuyên viên không? Chuyên viên sẽ không thể điều khiển bất cứ phần nào trên màn hình.",allowText:"Cho phép",denyText:"Từ chối"},ZP={confirmSessionTitle:"ขอเซสชันเรียกดูร่วม",confirmSessionContent:"คุณต้องการแชร์หน้าจอปัจจุบันกับตัวแทนหรือไม่",endSessionText:"สิ้นสุดเซสชันเรียกดูร่วม",confirmRemoteControlTitle:"ขอการเข้าถึงระยะไกล",confirmRemoteControlContent:"ตัวแทนต้องการเข้าถึงหน้าจอของคุณที่แชร์อยู่ในปัจจุบันเพื่อให้ความช่วยเหลือคุณต่อไป คุณจะอนุญาตหรือไม่",confirmFullDeviceTitle:"ขอแชร์หน้าจอ",confirmFullDeviceContent:"คุณต้องการแชร์ทั้งหน้าของคุณกับตัวแทนหรือไม่ ตัวแทนจะไม่สามารถควบคุมอะไรบนหน้าจอ",allowText:"ยินยอม",denyText:"ปฏิเสธ"},eI={confirmSessionTitle:"طلب جلسة تصفح مشترك",confirmSessionContent:"هل تريد مشاركة شاشتك الحالية مع الموظف؟",endSessionText:"إنهاء جلسة التصفح المشترك",confirmRemoteControlTitle:"طلب التحكم عن بعد",confirmRemoteControlContent:"يرغب مسئول الدعم في رؤية شاشتك المشاركة حالياً لمساعدتك بشكلٍ أكبر. هل تسمح بذلك؟",confirmFullDeviceTitle:"طلب مشاركة الشاشة",confirmFullDeviceContent:"هل تريد مشاركة شاشتك الكاملة مع مسئول الدعم؟ لن يتمكن المسئول من التحكم في أي شيء على الشاشة.",allowText:"السماح",denyText:"الرفض"},tI={confirmSessionTitle:"Žádost o relaci Co-browse",confirmSessionContent:"Chcete svou současnou obrazovku sdílet s agentem?",endSessionText:"Ukončit relaci Co-browse",confirmRemoteControlTitle:"Žádost o vzdálený přístup",confirmRemoteControlContent:"Agent by rád získal přístup k vaší stávající sdílené obrazovce, aby vám mohl dál pomoci. Chcete mu přístup povolit?",confirmFullDeviceTitle:"Žádost o sdílení obrazovky",confirmFullDeviceContent:"Chcete svou celou obrazovku sdílet s agentem? Agent nebude moci ovládat nic, co na obrazovce je.",allowText:"Povolit",denyText:"Zamítnout"},rI={confirmSessionTitle:"Prośba o sesję Co-browse",confirmSessionContent:"Czy chcesz udostępnić konsultantowi swój bieżący ekran?",endSessionText:"Zakończ sesję Co-browse",confirmRemoteControlTitle:"Prośba o zdalny dostęp",confirmRemoteControlContent:"Konsultant prosi o dostęp do Twojego aktualnie udostępnionego ekranu, aby udzielić Ci dalszej pomocy. Czy chcesz na to zezwolić?",confirmFullDeviceTitle:"Prośba o udostępnienie ekranu",confirmFullDeviceContent:"Czy chcesz udostępnić konsultantowi swój cały ekran? Konsultant nie będzie mógł kontrolować niczego na ekranie.",allowText:"Zezwól",denyText:"Odmów"},nI={confirmSessionTitle:"Co-browse munkameneti kérés",confirmSessionContent:"Megosztja az aktuális képernyőjét a képviselővel?",endSessionText:"Co-browse munkamenet befejezése",confirmRemoteControlTitle:"Távoli hozzáférési kérés",confirmRemoteControlContent:"A képviselő szeretne hozzáférni a jelenleg megosztott képernyőjéhez, hogy további segítséget nyújthasson. Engedélyezi ezt?",confirmFullDeviceTitle:"Képernyőmegosztási kérelem",confirmFullDeviceContent:"Megosztja a teljes képernyőjét az ügynökkel? Az ügynök semmit sem tud majd irányítani a képernyőn.",allowText:"Engedélyezés",denyText:"Elutasítás"},iI={confirmSessionTitle:"Запрос сеанса совместного просмотра веб-страниц",confirmSessionContent:"Хотите поделиться вашим текущим экраном с представителем?",endSessionText:"Завершить сеанс совместного просмотра веб-страниц",confirmRemoteControlTitle:"Запрос на удаленный доступ",confirmRemoteControlContent:"Представитель хочет получить доступ к вашему текущему экрану, которым вы делитесь, чтобы помочь вам. Хотите разрешить это?",confirmFullDeviceTitle:"Запрос на совместный просмотр экрана",confirmFullDeviceContent:"Хотите поделиться вашим полный экраном с представителем? Агент не сможет выполнять никаких действий на экране.",allowText:"Разрешить",denyText:"Отказать"},aI={confirmSessionTitle:"सह-ब्राउज़ सत्र अनुरोध किया गया",confirmSessionContent:"क्या आप अपनी वर्तमान स्क्रीन को एजेंट के साथ साझा करना चाहते हैं?",endSessionText:"सह-ब्राउज़ सत्र समाप्त करें",confirmRemoteControlTitle:"रिमोट पहुँच का अनुरोध किया गया",confirmRemoteControlContent:"एजेंट आपकी वर्तमान साझा स्क्रीन तक पहुँच प्राप्त करना चाहेगा ताकि वह आपकी और सहायता कर सके। क्या आप इसकी अनुमति देना चाहते हैं?",confirmFullDeviceTitle:"स्क्रीन साझाकरण अनुरोध",confirmFullDeviceContent:"क्या आप अपनी पूरी स्क्रीन एजेंट के साथ साझा करना चाहते हैं? एजेंट स्क्रीन पर कुछ भी नियंत्रित नहीं कर पाएगा।",allowText:"अनुमति दें",denyText:"अस्वीकार करें"},sI={confirmSessionTitle:"Solicitare sesiune de co-navigare",confirmSessionContent:"Doriți să partajați ecranul dumneavoastră curent cu agentul?",endSessionText:"Încheiați sesiunea de co-navigare",confirmRemoteControlTitle:"Cerere de acces la distanță",confirmRemoteControlContent:"Agentul ar dori să aibă acces la ecranul dumneavoastră partajat pentru a vă ajuta în continuare. Doriți să permiteți acest lucru?",confirmFullDeviceTitle:"Cerere de partajare a ecranului",confirmFullDeviceContent:"Doriți să partajați ecranul dumneavoastră complet cu agentul? Agentul nu va putea controla nimic de pe ecran.",allowText:"Permiteți",denyText:"Refuzați"},oI={confirmSessionTitle:"Zahtjev za sesiju zajedničkog pregledavanja",confirmSessionContent:"Želite li podijeliti svoj trenutni zaslon s agentom?",endSessionText:"Završi sesiju zajedničkog pregledavanja",confirmRemoteControlTitle:"Zahtjev za daljinski pristup",confirmRemoteControlContent:"Agent želi imati pristup vašem trenutno dijeljenom zaslonu kako bi Vam dodatno pomogao. Želite li to dopustiti?",confirmFullDeviceTitle:"Zahtjev za dijeljenje zaslona",confirmFullDeviceContent:"Želite li s agentom podijeliti svoj cijeli zaslon? Agent neće moći ništa kontrolirati na ekranu.",allowText:"Dopustiti",denyText:"Odbiti"},uI={confirmSessionTitle:"Запит на сесію спільного перегляду",confirmSessionContent:"Чи Ви хочете поділитись з агентом своїм поточним екраном?",endSessionText:"Завершити сесію спільного перегляду",confirmRemoteControlTitle:"Запит на віддалений доступ",confirmRemoteControlContent:"Агент хоче отримати доступ до Вашого поточного екрану, який переглядається спільно, щоб допомогти Вам. Ви дозволяєте?",confirmFullDeviceTitle:"Запит на спільний перегляд екрану",confirmFullDeviceContent:"Чи Ви хочете поділитись з агентом своїм екраном повністю? Агент не зможе нічого на ньому контролювати.",allowText:"Дозволити",denyText:"Відмовити"},cI={confirmSessionTitle:"Kahilingan sa Co-browse na Sesyon",confirmSessionContent:"Gusto mo bang ibahagi ang iyong kasalukuyang screen sa agent?",endSessionText:"Tapusin ang Co-browse na Sesyon",confirmRemoteControlTitle:"Kahilingan sa Remote Access",confirmRemoteControlContent:"Gusto ng agent na magkaroon ng access sa iyong nakabahaging screen sa kasalukuyan upang mas matulungan ka. Gusto mo bang payagan ito?",confirmFullDeviceTitle:"Kahilingan sa Pagbahagi ng Screen",confirmFullDeviceContent:"Gusto mo bang ibahagi ang buong screen sa agent? Hindi makokontrol ng agent ang kahit ano sa screen.",allowText:"Payagan",denyText:"Tanggihan"},Eo={en:DP,es:jP,"es-MX":{confirmSessionTitle:"Solicitud de Sesión de Co-navegación",confirmSessionContent:"¿Quiere compartir su pantalla actual con el agente?",endSessionText:"Fin de la sesión de co-navegación",confirmRemoteControlContent:"El agente desea tener acceso a su pantalla actualmente compartida para poder ayudarlo. ¿Quiere permitirlo?",confirmFullDeviceTitle:"Petición de pantalla compartida",confirmFullDeviceContent:"¿Quiere compartir su pantalla completa con el agente? El agente no podrá controlar nada en la pantalla."},fr:FP,"fr-CA":{confirmSessionTitle:"Demande de session co-navigation",confirmSessionContent:"Voulez-vous partager votre écran actuel avec l'agent?",endSessionText:"Fin de la session de co-navigation",confirmRemoteControlContent:"L'agent souhaiterait avoir accès à votre écran actuellement partagé pour mieux vous aider. Voulez-vous l'autoriser?",confirmFullDeviceContent:"Voulez-vous partager votre écran complet avec l'agent? L'agent ne sera pas en mesure de contrôler quoi que ce soit sur l'écran."},de:UP,ja:BP,ko:qP,it:zP,zh:GP,"zh-Hant":{confirmSessionTitle:"共同瀏覽工作階段要求",confirmSessionContent:"要與專員分享您目前的畫面嗎?",endSessionText:"結束共同瀏覽工作階段",confirmRemoteControlTitle:"遠端存取要求",confirmRemoteControlContent:"專員想要存取您目前分享的螢幕畫面以進一步協助您。要允許嗎?",confirmFullDeviceTitle:"螢幕畫面分享要求",confirmFullDeviceContent:"要與專員分享全螢幕嗎?專員將無法控制畫面上的任何項目。",allowText:"允許",denyText:"拒絕"},sv:WP,pt:VP,"pt-BR":{confirmSessionContent:"Você deseja compartilhar sua tela atual com o agente?",endSessionText:"Encerrar Sessão de Co-navegação",confirmRemoteControlContent:"O agente gostaria de acessar sua tela atualmente compartilhada para melhor ajudá-lo. Você deseja permitir isso?",confirmFullDeviceTitle:"Solicitação de Compartilhamento de Tela",confirmFullDeviceContent:"Você deseja compartilhar sua tela inteira com o agente? O agente não poderá controlar nada na tela."},fi:HP,nb:KP,da:JP,nl:YP,tr:XP,vi:QP,th:ZP,ar:eI,cs:tI,pl:rI,hu:nI,ru:iI,hi:aI,ro:sI,hr:oI,uk:uI,tl:cI};function lI(e){const r=e.split("-")[0];return Eo[e]?e===r?Eo[e]:{...Eo[r],...Eo[e]}:Eo[r]}let fI=class{constructor(r){ct(this,"VERSION",Tv);ct(this,"options");ct(this,"communicator");ct(this,"methods");ct(this,"events",new kv);ct(this,"request");ct(this,"chat");ct(this,"cobrowse");this.options=r,this.communicator=new aP(r,this.events);const t=this.communicator.request.bind(this.communicator);this.methods=new CP(t),this.request=t,Ar.companyId=r.companyId,r.tenant&&(Ar.tenant=r.tenant)}get deviceId(){return Ar.deviceId}get user(){return this.communicator.user}get lang(){return this.options.lang?this.options.lang:Or.get("lang")||"en"}set lang(r){this.options.lang||Or.set("lang",r)}destroy(){this.communicator.destroy(),this.events.destroy()}on(r,t){this.events.addEventListener(r,t)}off(r,t){this.events.removeEventListener(r,t)}_triggerEvent(r,t){this.events.triggerEvent(r,t)}async getCompany(){const r=await this.methods.getCompany();return Ar.tenant=r.subdomain,r}async runTrigger(r,t){const n=await this.methods.getTriggers(this.options.companyId),i=kP(n,t||this.lang);i&&RP(i,r)}trackClientEvents(r){return this.methods.trackClientEvents(r)}getProhibitedFileTypes(){return this.methods.listFileTypes()}getMenus(r,t){return this.methods.getMenus(t||this.lang,r)}getAfterHourMessage(r){return this.methods.getAfterHourMessage(r||this.lang)}getTimeSlots(r,t){return this.methods.getTimeSlots(r,t||this.lang)}getWaitTimes(r,t){return this.methods.getWaitTimes(r,t||this.lang)}createCall(r,t){var n;return!t.email&&((n=this.user)!=null&&n.email)&&(t.email=this.user.email),this.methods.createCall(Number(r),t.lang||this.lang,t)}loadCall(r){return this.methods.fetchCall(r)}cancelCall(r){return this.methods.cancelCall(r)}createEmail(r,t){return this.methods.createEmail(r,t.lang||this.lang,t)}async createChat(r,t={}){var i,a;if(this.chat&&this.chat.ongoing)throw new Error("There is an ongoing chat.");!t.email&&((i=this.user)!=null&&i.email)&&(t.email=this.user.email),t.cobrowsable===void 0&&(t.cobrowsable=!!((a=this.options.cobrowse)!=null&&a.enabled));const n=await this.methods.createChat(Number(r),t.lang||this.lang,t,this.deviceId);return this.registerOngoingChat(n),await n.clearMediaStore(),n}async loadChat(r){const t=await this.methods.loadChat(r,this.deviceId);return t.ongoing?this.registerOngoingChat(t):(Or.del("chat"),Or.del("cobrowse")),t}async resumeChat(r){var t;if(((t=this.chat)==null?void 0:t.id)===Number(r)){const n=await this.methods.patch(`chats/${r}`,{status:"queued"});return this.chat.update(n.data),this.chat}else{const n=await this.methods.resumeChat(r,this.deviceId);return this.registerOngoingChat(n),n}}async loadOngoingChat(){const r=Or.get("chat");if(r){const t=await this.loadChat(r);if(t.ongoing)return t;Or.del("chat")}}async finishChat(){if(this.chat){this.chat.connected&&await this.chat.disconnect();const r=await this.methods.finishChat(this.chat.id);this.chat.update(r)}}async destroyChat(){this.chat&&(this.chat.ongoing&&await this.finishChat(),await this.chat.destroy(),this.chat=null,Ar.trackerId="")}getChatDeflection(){return this.methods.getChatDeflection(this.chat.id)}sendChatTranscripts(r){return this.methods.sendChatTranscripts(this.chat.id,r)}getChatSurvey(){return this.methods.getChatSurvey(this.chat.id)}sendChatSurvey(r){if(this.chat.feedbackType!=="survey")throw new Error("Chat feedback type is: "+this.chat.feedbackType);return this.methods.sendChatSurvey(this.chat.id,r)}sendChatRate(r){if(this.chat.feedbackType!=="rate")throw new Error("Chat feedback type is: "+this.chat.feedbackType);return this.methods.rateChat(this.chat.id,r)}escalateChat(r){return this.methods.escalateChat(this.chat.id,r)}trackChatEscalation(r,t){return this.methods.trackEscalation(this.chat.id,r,t)}trackChatEndUserEvent(r){var t;return!r.end_user_name&&((t=this.user)!=null&&t.name)&&(r.end_user_name=this.user.name),this.methods.trackChatEndUserEvent(this.chat.id,r)}getChatHistory(r=1){return this.methods.getChatHistory(r)}async fetchMessages(){const r=await this.chat.fetchMessages();if(r.filter(t=>t.type==="server_message").length>0){const t=await this.methods.listChatTaskMessages(this.chat.id);return oP(r,t)}return r}async sendFileMessage(r){const t=await this.methods.uploadChatFile(this.chat.id,r);return this.chat.sendMessage(t,r)}async sendTextMessage(r){let t;return this.chat.inTask?t={type:"server_message",visibility:"task_virtual_agent",message_id:(await this.methods.sendChatTaskMessage(this.chat.id,r)).id}:t={type:"text",content:r},this.chat.sendMessage(t)}async createCobrowseCode(r,t){var a;await this.initializeCobrowse(r||this.lang);let n=Or.get("cobrowse");n||(n=Date.now().toString(),Or.set("cobrowse",n));const i={device_id:this.deviceId,device_name:`${Ar.application} / ${Ar.version}`,nonce:n,...t};return(a=this.user)!=null&&a.name&&(i.user_name=this.user.name),this.cobrowse.setCustomData(i),this.cobrowse.createSessionCode()}async startCobrowse(r="end_user"){if(!this.chat.cobrowsable)throw new Error(`Chat ${this.chat.id} does not support cobrowse.`);const t={chatId:`chat_${this.chat.id}`},n=await this.createCobrowseCode(this.chat.lang,t);if(n){const i=Or.get("cobrowse");await this.methods.requestChatCobrowse(this.chat.id,{code:n,from:r,nonce:i})}}async initializeCobrowse(r){if(!this.cobrowse){const t=this.options.cobrowse.messages||lI(r),n={...this.options.cobrowse,messages:t,lang:r};this.cobrowse=await Pv.create(n),this.cobrowse.start(),["loaded","updated","ended"].forEach(a=>{this.cobrowse.on(`session.${a}`,s=>{this.events.triggerEvent(`cobrowse.${a}`,s)})})}}registerOngoingChat(r){this.events.triggerEvent("chat.ongoing",r),r._setGlobalEvents(this.events,this.methods.getChatTaskMessage.bind(this.methods)),r.on("_requestCobrowse",t=>{t==="agent"?this.startCobrowse(t):this.initializeCobrowse(r.lang),this.events.triggerEvent("cobrowse.request",{from:t})}),r.on("disconnected",()=>{Or.del("chat"),Or.del("cobrowse")}),this.chat=r,Ar.trackerId=`chat_${r.id}`,Or.set("chat",r.id.toString()),r.cobrowsable&&Or.get("cobrowse")&&this.initializeCobrowse(r.lang)}};var xe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Iv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function F0(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function n(){return this instanceof n?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),t}var U0={},ko=function(e){return e&&e.Math===Math&&e},St=ko(typeof globalThis=="object"&&globalThis)||ko(typeof window=="object"&&window)||ko(typeof self=="object"&&self)||ko(typeof xe=="object"&&xe)||ko(typeof xe=="object"&&xe)||function(){return this}()||Function("return this")(),Gi={},dt=function(e){try{return!!e()}catch{return!0}},dI=dt,Wt=!dI(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),pI=dt,fu=!pI(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),hI=fu,Vu=Function.prototype.call,Ut=hI?Vu.bind(Vu):function(){return Vu.apply(Vu,arguments)},du={},B0={}.propertyIsEnumerable,q0=Object.getOwnPropertyDescriptor,vI=q0&&!B0.call({1:2},1);du.f=vI?function(r){var t=q0(this,r);return!!t&&t.enumerable}:B0;var is=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}},z0=fu,G0=Function.prototype,zp=G0.call,mI=z0&&G0.bind.bind(zp,zp),gt=z0?mI:function(e){return function(){return zp.apply(e,arguments)}},W0=gt,gI=W0({}.toString),yI=W0("".slice),fi=function(e){return yI(gI(e),8,-1)},bI=gt,_I=dt,wI=fi,qf=Object,SI=bI("".split),pu=_I(function(){return!qf("z").propertyIsEnumerable(0)})?function(e){return wI(e)==="String"?SI(e,""):qf(e)}:qf,Kn=function(e){return e==null},CI=Kn,TI=TypeError,Jn=function(e){if(CI(e))throw new TI("Can't call method on "+e);return e},EI=pu,kI=Jn,vn=function(e){return EI(kI(e))},zf=typeof document=="object"&&document.all,Bt=typeof zf>"u"&&zf!==void 0?function(e){return typeof e=="function"||e===zf}:function(e){return typeof e=="function"},RI=Bt,Jt=function(e){return typeof e=="object"?e!==null:RI(e)},Gf=St,$I=Bt,PI=function(e){return $I(e)?e:void 0},Yn=function(e,r){return arguments.length<2?PI(Gf[e]):Gf[e]&&Gf[e][r]},II=gt,Wi=II({}.isPrototypeOf),as=typeof navigator<"u"&&String(navigator.userAgent)||"",V0=St,Wf=as,Lg=V0.process,Dg=V0.Deno,jg=Lg&&Lg.versions||Dg&&Dg.version,Fg=jg&&jg.v8,zn,fl;Fg&&(zn=Fg.split("."),fl=zn[0]>0&&zn[0]<4?1:+(zn[0]+zn[1]));!fl&&Wf&&(zn=Wf.match(/Edge\/(\d+)/),(!zn||zn[1]>=74)&&(zn=Wf.match(/Chrome\/(\d+)/),zn&&(fl=+zn[1])));var uo=fl,Ug=uo,OI=dt,AI=St,MI=AI.String,co=!!Object.getOwnPropertySymbols&&!OI(function(){var e=Symbol("symbol detection");return!MI(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ug&&Ug<41}),xI=co,H0=xI&&!Symbol.sham&&typeof Symbol.iterator=="symbol",NI=Yn,LI=Bt,DI=Wi,jI=H0,FI=Object,lo=jI?function(e){return typeof e=="symbol"}:function(e){var r=NI("Symbol");return LI(r)&&DI(r.prototype,FI(e))},UI=String,ss=function(e){try{return UI(e)}catch{return"Object"}},BI=Bt,qI=ss,zI=TypeError,An=function(e){if(BI(e))return e;throw new zI(qI(e)+" is not a function")},GI=An,WI=Kn,os=function(e,r){var t=e[r];return WI(t)?void 0:GI(t)},Vf=Ut,Hf=Bt,Kf=Jt,VI=TypeError,HI=function(e,r){var t,n;if(r==="string"&&Hf(t=e.toString)&&!Kf(n=Vf(t,e))||Hf(t=e.valueOf)&&!Kf(n=Vf(t,e))||r!=="string"&&Hf(t=e.toString)&&!Kf(n=Vf(t,e)))return n;throw new VI("Can't convert object to primitive value")},K0={exports:{}},J0=!1,Bg=St,KI=Object.defineProperty,Ov=function(e,r){try{KI(Bg,e,{value:r,configurable:!0,writable:!0})}catch{Bg[e]=r}return r},JI=St,YI=Ov,qg="__core-js_shared__",zg=K0.exports=JI[qg]||YI(qg,{});(zg.versions||(zg.versions=[])).push({version:"3.37.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Av=K0.exports,Gg=Av,fo=function(e,r){return Gg[e]||(Gg[e]=r||{})},XI=Jn,QI=Object,Nr=function(e){return QI(XI(e))},ZI=gt,eO=Nr,tO=ZI({}.hasOwnProperty),tr=Object.hasOwn||function(r,t){return tO(eO(r),t)},rO=gt,nO=0,iO=Math.random(),aO=rO(1 .toString),hu=function(e){return"Symbol("+(e===void 0?"":e)+")_"+aO(++nO+iO,36)},sO=St,oO=fo,Wg=tr,uO=hu,cO=co,lO=H0,Ms=sO.Symbol,Jf=oO("wks"),fO=lO?Ms.for||Ms:Ms&&Ms.withoutSetter||uO,qt=function(e){return Wg(Jf,e)||(Jf[e]=cO&&Wg(Ms,e)?Ms[e]:fO("Symbol."+e)),Jf[e]},dO=Ut,Vg=Jt,Hg=lo,pO=os,hO=HI,vO=qt,mO=TypeError,gO=vO("toPrimitive"),Mv=function(e,r){if(!Vg(e)||Hg(e))return e;var t=pO(e,gO),n;if(t){if(r===void 0&&(r="default"),n=dO(t,e,r),!Vg(n)||Hg(n))return n;throw new mO("Can't convert object to primitive value")}return r===void 0&&(r="number"),hO(e,r)},yO=Mv,bO=lo,xl=function(e){var r=yO(e,"string");return bO(r)?r:r+""},_O=St,Kg=Jt,Gp=_O.document,wO=Kg(Gp)&&Kg(Gp.createElement),Nl=function(e){return wO?Gp.createElement(e):{}},SO=Wt,CO=dt,TO=Nl,Y0=!SO&&!CO(function(){return Object.defineProperty(TO("div"),"a",{get:function(){return 7}}).a!==7}),EO=Wt,kO=Ut,RO=du,$O=is,PO=vn,IO=xl,OO=tr,AO=Y0,Jg=Object.getOwnPropertyDescriptor;Gi.f=EO?Jg:function(r,t){if(r=PO(r),t=IO(t),AO)try{return Jg(r,t)}catch{}if(OO(r,t))return $O(!kO(RO.f,r,t),r[t])};var qr={},MO=Wt,xO=dt,X0=MO&&xO(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),NO=Jt,LO=String,DO=TypeError,sr=function(e){if(NO(e))return e;throw new DO(LO(e)+" is not an object")},jO=Wt,FO=Y0,UO=X0,Hu=sr,Yg=xl,BO=TypeError,Yf=Object.defineProperty,qO=Object.getOwnPropertyDescriptor,Xf="enumerable",Qf="configurable",Zf="writable";qr.f=jO?UO?function(r,t,n){if(Hu(r),t=Yg(t),Hu(n),typeof r=="function"&&t==="prototype"&&"value"in n&&Zf in n&&!n[Zf]){var i=qO(r,t);i&&i[Zf]&&(r[t]=n.value,n={configurable:Qf in n?n[Qf]:i[Qf],enumerable:Xf in n?n[Xf]:i[Xf],writable:!1})}return Yf(r,t,n)}:Yf:function(r,t,n){if(Hu(r),t=Yg(t),Hu(n),FO)try{return Yf(r,t,n)}catch{}if("get"in n||"set"in n)throw new BO("Accessors not supported");return"value"in n&&(r[t]=n.value),r};var zO=Wt,GO=qr,WO=is,Vi=zO?function(e,r,t){return GO.f(e,r,WO(1,t))}:function(e,r,t){return e[r]=t,e},Q0={exports:{}},Wp=Wt,VO=tr,Z0=Function.prototype,HO=Wp&&Object.getOwnPropertyDescriptor,xv=VO(Z0,"name"),KO=xv&&(function(){}).name==="something",JO=xv&&(!Wp||Wp&&HO(Z0,"name").configurable),vu={EXISTS:xv,PROPER:KO,CONFIGURABLE:JO},YO=gt,XO=Bt,Vp=Av,QO=YO(Function.toString);XO(Vp.inspectSource)||(Vp.inspectSource=function(e){return QO(e)});var Nv=Vp.inspectSource,ZO=St,eA=Bt,Xg=ZO.WeakMap,tA=eA(Xg)&&/native code/.test(String(Xg)),rA=fo,nA=hu,Qg=rA("keys"),Ll=function(e){return Qg[e]||(Qg[e]=nA(e))},mu={},iA=tA,eC=St,aA=Jt,sA=Vi,ed=tr,td=Av,oA=Ll,uA=mu,Zg="Object already initialized",Hp=eC.TypeError,cA=eC.WeakMap,dl,nu,pl,lA=function(e){return pl(e)?nu(e):dl(e,{})},fA=function(e){return function(r){var t;if(!aA(r)||(t=nu(r)).type!==e)throw new Hp("Incompatible receiver, "+e+" required");return t}};if(iA||td.state){var ri=td.state||(td.state=new cA);ri.get=ri.get,ri.has=ri.has,ri.set=ri.set,dl=function(e,r){if(ri.has(e))throw new Hp(Zg);return r.facade=e,ri.set(e,r),r},nu=function(e){return ri.get(e)||{}},pl=function(e){return ri.has(e)}}else{var bs=oA("state");uA[bs]=!0,dl=function(e,r){if(ed(e,bs))throw new Hp(Zg);return r.facade=e,sA(e,bs,r),r},nu=function(e){return ed(e,bs)?e[bs]:{}},pl=function(e){return ed(e,bs)}}var mn={set:dl,get:nu,has:pl,enforce:lA,getterFor:fA},Lv=gt,dA=dt,pA=Bt,Ku=tr,Kp=Wt,hA=vu.CONFIGURABLE,vA=Nv,tC=mn,mA=tC.enforce,gA=tC.get,ey=String,Qc=Object.defineProperty,yA=Lv("".slice),bA=Lv("".replace),_A=Lv([].join),wA=Kp&&!dA(function(){return Qc(function(){},"length",{value:8}).length!==8}),SA=String(String).split("String"),CA=Q0.exports=function(e,r,t){yA(ey(r),0,7)==="Symbol("&&(r="["+bA(ey(r),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),t&&t.getter&&(r="get "+r),t&&t.setter&&(r="set "+r),(!Ku(e,"name")||hA&&e.name!==r)&&(Kp?Qc(e,"name",{value:r,configurable:!0}):e.name=r),wA&&t&&Ku(t,"arity")&&e.length!==t.arity&&Qc(e,"length",{value:t.arity});try{t&&Ku(t,"constructor")&&t.constructor?Kp&&Qc(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch{}var n=mA(e);return Ku(n,"source")||(n.source=_A(SA,typeof r=="string"?r:"")),e};Function.prototype.toString=CA(function(){return pA(this)&&gA(this).source||vA(this)},"toString");var rC=Q0.exports,TA=Bt,EA=qr,kA=rC,RA=Ov,zr=function(e,r,t,n){n||(n={});var i=n.enumerable,a=n.name!==void 0?n.name:r;if(TA(t)&&kA(t,a,n),n.global)i?e[r]=t:RA(r,t);else{try{n.unsafe?e[r]&&(i=!0):delete e[r]}catch{}i?e[r]=t:EA.f(e,r,{value:t,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},us={},$A=Math.ceil,PA=Math.floor,IA=Math.trunc||function(r){var t=+r;return(t>0?PA:$A)(t)},OA=IA,di=function(e){var r=+e;return r!==r||r===0?0:OA(r)},AA=di,MA=Math.max,xA=Math.min,po=function(e,r){var t=AA(e);return t<0?MA(t+r,0):xA(t,r)},NA=di,LA=Math.min,Hi=function(e){var r=NA(e);return r>0?LA(r,9007199254740991):0},DA=Hi,Lr=function(e){return DA(e.length)},jA=vn,FA=po,UA=Lr,ty=function(e){return function(r,t,n){var i=jA(r),a=UA(i);if(a===0)return!e&&-1;var s=FA(n,a),c;if(e&&t!==t){for(;a>s;)if(c=i[s++],c!==c)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===t)return e||s||0;return!e&&-1}},Dl={includes:ty(!0),indexOf:ty(!1)},BA=gt,rd=tr,qA=vn,zA=Dl.indexOf,GA=mu,ry=BA([].push),nC=function(e,r){var t=qA(e),n=0,i=[],a;for(a in t)!rd(GA,a)&&rd(t,a)&&ry(i,a);for(;r.length>n;)rd(t,a=r[n++])&&(~zA(i,a)||ry(i,a));return i},Dv=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],WA=nC,VA=Dv,HA=VA.concat("length","prototype");us.f=Object.getOwnPropertyNames||function(r){return WA(r,HA)};var gu={};gu.f=Object.getOwnPropertySymbols;var KA=Yn,JA=gt,YA=us,XA=gu,QA=sr,ZA=JA([].concat),iC=KA("Reflect","ownKeys")||function(r){var t=YA.f(QA(r)),n=XA.f;return n?ZA(t,n(r)):t},ny=tr,eM=iC,tM=Gi,rM=qr,jv=function(e,r,t){for(var n=eM(r),i=rM.f,a=tM.f,s=0;s<n.length;s++){var c=n[s];!ny(e,c)&&!(t&&ny(t,c))&&i(e,c,a(r,c))}},nM=dt,iM=Bt,aM=/#|\.prototype\./,yu=function(e,r){var t=oM[sM(e)];return t===cM?!0:t===uM?!1:iM(r)?nM(r):!!r},sM=yu.normalize=function(e){return String(e).replace(aM,".").toLowerCase()},oM=yu.data={},uM=yu.NATIVE="N",cM=yu.POLYFILL="P",jl=yu,Ju=St,lM=Gi.f,fM=Vi,dM=zr,pM=Ov,hM=jv,vM=jl,bt=function(e,r){var t=e.target,n=e.global,i=e.stat,a,s,c,o,u,l;if(n?s=Ju:i?s=Ju[t]||pM(t,{}):s=Ju[t]&&Ju[t].prototype,s)for(c in r){if(u=r[c],e.dontCallGetSet?(l=lM(s,c),o=l&&l.value):o=s[c],a=vM(n?c:t+(i?".":"#")+c,e.forced),!a&&o!==void 0){if(typeof u==typeof o)continue;hM(u,o)}(e.sham||o&&o.sham)&&fM(u,"sham",!0),dM(s,c,u,e)}},mM=qr.f,gM=tr,yM=qt,iy=yM("toStringTag"),pi=function(e,r,t){e&&!t&&(e=e.prototype),e&&!gM(e,iy)&&mM(e,iy,{configurable:!0,value:r})},bM=bt,_M=St,wM=pi;bM({global:!0},{Reflect:{}});wM(_M.Reflect,"Reflect",!0);var SM=fu,aC=Function.prototype,ay=aC.apply,sy=aC.call,cs=typeof Reflect=="object"&&Reflect.apply||(SM?sy.bind(ay):function(){return sy.apply(ay,arguments)}),CM=gt,hi=CM([].slice),sC=gt,TM=An,EM=Jt,kM=tr,oy=hi,RM=fu,oC=Function,$M=sC([].concat),PM=sC([].join),nd={},IM=function(e,r,t){if(!kM(nd,r)){for(var n=[],i=0;i<r;i++)n[i]="a["+i+"]";nd[r]=oC("C,a","return new C("+PM(n,",")+")")}return nd[r](e,t)},OM=RM?oC.bind:function(r){var t=TM(this),n=t.prototype,i=oy(arguments,1),a=function(){var c=$M(i,oy(arguments));return this instanceof a?IM(t,c.length,c):t.apply(r,c)};return EM(n)&&(a.prototype=n),a},AM=qt,MM=AM("toStringTag"),uC={};uC[MM]="z";var Fv=String(uC)==="[object z]",xM=Fv,NM=Bt,Zc=fi,LM=qt,DM=LM("toStringTag"),jM=Object,FM=Zc(function(){return arguments}())==="Arguments",UM=function(e,r){try{return e[r]}catch{}},Ki=xM?Zc:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=UM(r=jM(e),DM))=="string"?t:FM?Zc(r):(n=Zc(r))==="Object"&&NM(r.callee)?"Arguments":n},BM=gt,qM=dt,cC=Bt,zM=Ki,GM=Yn,WM=Nv,lC=function(){},fC=GM("Reflect","construct"),Uv=/^\s*(?:class|function)\b/,VM=BM(Uv.exec),HM=!Uv.test(lC),Ro=function(r){if(!cC(r))return!1;try{return fC(lC,[],r),!0}catch{return!1}},dC=function(r){if(!cC(r))return!1;switch(zM(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return HM||!!VM(Uv,WM(r))}catch{return!0}};dC.sham=!0;var Fl=!fC||qM(function(){var e;return Ro(Ro.call)||!Ro(Object)||!Ro(function(){e=!0})||e})?dC:Ro,KM=Fl,JM=ss,YM=TypeError,Bv=function(e){if(KM(e))return e;throw new YM(JM(e)+" is not a constructor")},qv={},XM=nC,QM=Dv,bu=Object.keys||function(r){return XM(r,QM)},ZM=Wt,ex=X0,tx=qr,rx=sr,nx=vn,ix=bu;qv.f=ZM&&!ex?Object.defineProperties:function(r,t){rx(r);for(var n=nx(t),i=ix(t),a=i.length,s=0,c;a>s;)tx.f(r,c=i[s++],n[c]);return r};var ax=Yn,pC=ax("document","documentElement"),sx=sr,ox=qv,uy=Dv,ux=mu,cx=pC,lx=Nl,fx=Ll,cy=">",ly="<",Jp="prototype",Yp="script",hC=fx("IE_PROTO"),id=function(){},vC=function(e){return ly+Yp+cy+e+ly+"/"+Yp+cy},fy=function(e){e.write(vC("")),e.close();var r=e.parentWindow.Object;return e=null,r},dx=function(){var e=lx("iframe"),r="java"+Yp+":",t;return e.style.display="none",cx.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(vC("document.F=Object")),t.close(),t.F},Yu,el=function(){try{Yu=new ActiveXObject("htmlfile")}catch{}el=typeof document<"u"?document.domain&&Yu?fy(Yu):dx():fy(Yu);for(var e=uy.length;e--;)delete el[Jp][uy[e]];return el()};ux[hC]=!0;var Ra=Object.create||function(r,t){var n;return r!==null?(id[Jp]=sx(r),n=new id,id[Jp]=null,n[hC]=r):n=el(),t===void 0?n:ox.f(n,t)},px=bt,hx=Yn,ad=cs,vx=OM,dy=Bv,mx=sr,py=Jt,gx=Ra,mC=dt,zv=hx("Reflect","construct"),yx=Object.prototype,bx=[].push,gC=mC(function(){function e(){}return!(zv(function(){},[],e)instanceof e)}),yC=!mC(function(){zv(function(){})}),hy=gC||yC;px({target:"Reflect",stat:!0,forced:hy,sham:hy},{construct:function(r,t){dy(r),mx(t);var n=arguments.length<3?r:dy(arguments[2]);if(yC&&!gC)return zv(r,t,n);if(r===n){switch(t.length){case 0:return new r;case 1:return new r(t[0]);case 2:return new r(t[0],t[1]);case 3:return new r(t[0],t[1],t[2]);case 4:return new r(t[0],t[1],t[2],t[3])}var i=[null];return ad(bx,i,t),new(ad(vx,r,i))}var a=n.prototype,s=gx(py(a)?a:yx),c=ad(r,s,t);return py(c)?c:s}});var _x=bt,wx=Nr,bC=bu,Sx=dt,Cx=Sx(function(){bC(1)});_x({target:"Object",stat:!0,forced:Cx},{keys:function(r){return bC(wx(r))}});var Tx=Ki,Ex=String,Sr=function(e){if(Tx(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return Ex(e)},Gv={},kx=fi,Rx=vn,_C=us.f,$x=hi,wC=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Px=function(e){try{return _C(e)}catch{return $x(wC)}};Gv.f=function(r){return wC&&kx(r)==="Window"?Px(r):_C(Rx(r))};var vy=rC,Ix=qr,vi=function(e,r,t){return t.get&&vy(t.get,r,{getter:!0}),t.set&&vy(t.set,r,{setter:!0}),Ix.f(e,r,t)},Wv={},Ox=qt;Wv.f=Ox;var Ax=St,SC=Ax,my=SC,Mx=tr,xx=Wv,Nx=qr.f,CC=function(e){var r=my.Symbol||(my.Symbol={});Mx(r,e)||Nx(r,e,{value:xx.f(e)})},Lx=Ut,Dx=Yn,jx=qt,Fx=zr,Ux=function(){var e=Dx("Symbol"),r=e&&e.prototype,t=r&&r.valueOf,n=jx("toPrimitive");r&&!r[n]&&Fx(r,n,function(i){return Lx(t,this)},{arity:1})},Bx=fi,qx=gt,Vv=function(e){if(Bx(e)==="Function")return qx(e)},gy=Vv,zx=An,Gx=fu,Wx=gy(gy.bind),Ji=function(e,r){return zx(e),r===void 0?e:Gx?Wx(e,r):function(){return e.apply(r,arguments)}},Vx=fi,_u=Array.isArray||function(r){return Vx(r)==="Array"},yy=_u,Hx=Fl,Kx=Jt,Jx=qt,Yx=Jx("species"),by=Array,Xx=function(e){var r;return yy(e)&&(r=e.constructor,Hx(r)&&(r===by||yy(r.prototype))?r=void 0:Kx(r)&&(r=r[Yx],r===null&&(r=void 0))),r===void 0?by:r},Qx=Xx,Hv=function(e,r){return new(Qx(e))(r===0?0:r)},Zx=Ji,eN=gt,tN=pu,rN=Nr,nN=Lr,iN=Hv,_y=eN([].push),ca=function(e){var r=e===1,t=e===2,n=e===3,i=e===4,a=e===6,s=e===7,c=e===5||a;return function(o,u,l,f){for(var v=rN(o),m=tN(v),b=nN(m),C=Zx(u,l),$=0,E=f||iN,A=r?E(o,b):t||s?E(o,0):void 0,N,U;b>$;$++)if((c||$ in m)&&(N=m[$],U=C(N,$,v),e))if(r)A[$]=U;else if(U)switch(e){case 3:return!0;case 5:return N;case 6:return $;case 2:_y(A,N)}else switch(e){case 4:return!1;case 7:_y(A,N)}return a?-1:n||i?i:A}},rn={forEach:ca(0),map:ca(1),filter:ca(2),some:ca(3),every:ca(4),find:ca(5),findIndex:ca(6),filterReject:ca(7)},Ul=bt,wu=St,Kv=Ut,aN=gt,Js=Wt,Ys=co,sN=dt,kr=tr,oN=Wi,Xp=sr,Bl=vn,Jv=xl,uN=Sr,Qp=is,Xs=Ra,TC=bu,cN=us,EC=Gv,lN=gu,kC=Gi,RC=qr,fN=qv,$C=du,sd=zr,dN=vi,Yv=fo,pN=Ll,PC=mu,wy=hu,hN=qt,vN=Wv,mN=CC,gN=Ux,yN=pi,IC=mn,ql=rn.forEach,Zr=pN("hidden"),zl="Symbol",iu="prototype",bN=IC.set,Sy=IC.getterFor(zl),In=Object[iu],Ya=wu.Symbol,Bo=Ya&&Ya[iu],_N=wu.RangeError,wN=wu.TypeError,od=wu.QObject,OC=kC.f,Xa=RC.f,AC=EC.f,SN=$C.f,MC=aN([].push),ji=Yv("symbols"),Su=Yv("op-symbols"),CN=Yv("wks"),Zp=!od||!od[iu]||!od[iu].findChild,xC=function(e,r,t){var n=OC(In,r);n&&delete In[r],Xa(e,r,t),n&&e!==In&&Xa(In,r,n)},eh=Js&&sN(function(){return Xs(Xa({},"a",{get:function(){return Xa(this,"a",{value:7}).a}})).a!==7})?xC:Xa,ud=function(e,r){var t=ji[e]=Xs(Bo);return bN(t,{type:zl,tag:e,description:r}),Js||(t.description=r),t},Gl=function(r,t,n){r===In&&Gl(Su,t,n),Xp(r);var i=Jv(t);return Xp(n),kr(ji,i)?(n.enumerable?(kr(r,Zr)&&r[Zr][i]&&(r[Zr][i]=!1),n=Xs(n,{enumerable:Qp(0,!1)})):(kr(r,Zr)||Xa(r,Zr,Qp(1,Xs(null))),r[Zr][i]=!0),eh(r,i,n)):Xa(r,i,n)},Xv=function(r,t){Xp(r);var n=Bl(t),i=TC(n).concat(DC(n));return ql(i,function(a){(!Js||Kv(th,n,a))&&Gl(r,a,n[a])}),r},TN=function(r,t){return t===void 0?Xs(r):Xv(Xs(r),t)},th=function(r){var t=Jv(r),n=Kv(SN,this,t);return this===In&&kr(ji,t)&&!kr(Su,t)?!1:n||!kr(this,t)||!kr(ji,t)||kr(this,Zr)&&this[Zr][t]?n:!0},NC=function(r,t){var n=Bl(r),i=Jv(t);if(!(n===In&&kr(ji,i)&&!kr(Su,i))){var a=OC(n,i);return a&&kr(ji,i)&&!(kr(n,Zr)&&n[Zr][i])&&(a.enumerable=!0),a}},LC=function(r){var t=AC(Bl(r)),n=[];return ql(t,function(i){!kr(ji,i)&&!kr(PC,i)&&MC(n,i)}),n},DC=function(e){var r=e===In,t=AC(r?Su:Bl(e)),n=[];return ql(t,function(i){kr(ji,i)&&(!r||kr(In,i))&&MC(n,ji[i])}),n};Ys||(Ya=function(){if(oN(Bo,this))throw new wN("Symbol is not a constructor");var r=!arguments.length||arguments[0]===void 0?void 0:uN(arguments[0]),t=wy(r),n=function(i){var a=this===void 0?wu:this;a===In&&Kv(n,Su,i),kr(a,Zr)&&kr(a[Zr],t)&&(a[Zr][t]=!1);var s=Qp(1,i);try{eh(a,t,s)}catch(c){if(!(c instanceof _N))throw c;xC(a,t,s)}};return Js&&Zp&&eh(In,t,{configurable:!0,set:n}),ud(t,r)},Bo=Ya[iu],sd(Bo,"toString",function(){return Sy(this).tag}),sd(Ya,"withoutSetter",function(e){return ud(wy(e),e)}),$C.f=th,RC.f=Gl,fN.f=Xv,kC.f=NC,cN.f=EC.f=LC,lN.f=DC,vN.f=function(e){return ud(hN(e),e)},Js&&(dN(Bo,"description",{configurable:!0,get:function(){return Sy(this).description}}),sd(In,"propertyIsEnumerable",th,{unsafe:!0})));Ul({global:!0,constructor:!0,wrap:!0,forced:!Ys,sham:!Ys},{Symbol:Ya});ql(TC(CN),function(e){mN(e)});Ul({target:zl,stat:!0,forced:!Ys},{useSetter:function(){Zp=!0},useSimple:function(){Zp=!1}});Ul({target:"Object",stat:!0,forced:!Ys,sham:!Js},{create:TN,defineProperty:Gl,defineProperties:Xv,getOwnPropertyDescriptor:NC});Ul({target:"Object",stat:!0,forced:!Ys},{getOwnPropertyNames:LC});gN();yN(Ya,zl);PC[Zr]=!0;var EN=co,jC=EN&&!!Symbol.for&&!!Symbol.keyFor,kN=bt,RN=Yn,$N=tr,PN=Sr,FC=fo,IN=jC,cd=FC("string-to-symbol-registry"),ON=FC("symbol-to-string-registry");kN({target:"Symbol",stat:!0,forced:!IN},{for:function(e){var r=PN(e);if($N(cd,r))return cd[r];var t=RN("Symbol")(r);return cd[r]=t,ON[t]=r,t}});var AN=bt,MN=tr,xN=lo,NN=ss,LN=fo,DN=jC,Cy=LN("symbol-to-string-registry");AN({target:"Symbol",stat:!0,forced:!DN},{keyFor:function(r){if(!xN(r))throw new TypeError(NN(r)+" is not a symbol");if(MN(Cy,r))return Cy[r]}});var jN=gt,Ty=_u,FN=Bt,Ey=fi,UN=Sr,ky=jN([].push),BN=function(e){if(FN(e))return e;if(Ty(e)){for(var r=e.length,t=[],n=0;n<r;n++){var i=e[n];typeof i=="string"?ky(t,i):(typeof i=="number"||Ey(i)==="Number"||Ey(i)==="String")&&ky(t,UN(i))}var a=t.length,s=!0;return function(c,o){if(s)return s=!1,o;if(Ty(this))return o;for(var u=0;u<a;u++)if(t[u]===c)return o}}},qN=bt,UC=Yn,BC=cs,zN=Ut,Cu=gt,qC=dt,Ry=Bt,$y=lo,zC=hi,GN=BN,WN=co,VN=String,_a=UC("JSON","stringify"),Xu=Cu(/./.exec),Py=Cu("".charAt),HN=Cu("".charCodeAt),KN=Cu("".replace),JN=Cu(1 .toString),YN=/[\uD800-\uDFFF]/g,Iy=/^[\uD800-\uDBFF]$/,Oy=/^[\uDC00-\uDFFF]$/,Ay=!WN||qC(function(){var e=UC("Symbol")("stringify detection");return _a([e])!=="[null]"||_a({a:e})!=="{}"||_a(Object(e))!=="{}"}),My=qC(function(){return _a("\uDF06\uD834")!=='"\\udf06\\ud834"'||_a("\uDEAD")!=='"\\udead"'}),XN=function(e,r){var t=zC(arguments),n=GN(r);if(!(!Ry(n)&&(e===void 0||$y(e))))return t[1]=function(i,a){if(Ry(n)&&(a=zN(n,this,VN(i),a)),!$y(a))return a},BC(_a,null,t)},QN=function(e,r,t){var n=Py(t,r-1),i=Py(t,r+1);return Xu(Iy,e)&&!Xu(Oy,i)||Xu(Oy,e)&&!Xu(Iy,n)?"\\u"+JN(HN(e,0),16):e};_a&&qN({target:"JSON",stat:!0,arity:3,forced:Ay||My},{stringify:function(r,t,n){var i=zC(arguments),a=BC(Ay?XN:_a,null,i);return My&&typeof a=="string"?KN(a,YN,QN):a}});var ZN=bt,eL=co,tL=dt,GC=gu,rL=Nr,nL=!eL||tL(function(){GC.f(1)});ZN({target:"Object",stat:!0,forced:nL},{getOwnPropertySymbols:function(r){var t=GC.f;return t?t(rL(r)):[]}});var iL=dt,aL=qt,sL=uo,oL=aL("species"),Tu=function(e){return sL>=51||!iL(function(){var r=[],t=r.constructor={};return t[oL]=function(){return{foo:1}},r[e](Boolean).foo!==1})},uL=bt,cL=rn.filter,lL=Tu,fL=lL("filter");uL({target:"Array",proto:!0,forced:!fL},{filter:function(r){return cL(this,r,arguments.length>1?arguments[1]:void 0)}});var dL=bt,pL=dt,hL=vn,WC=Gi.f,VC=Wt,vL=!VC||pL(function(){WC(1)});dL({target:"Object",stat:!0,forced:vL,sham:!VC},{getOwnPropertyDescriptor:function(r,t){return WC(hL(r),t)}});var mL=Wt,gL=qr,yL=is,Eu=function(e,r,t){mL?gL.f(e,r,yL(0,t)):e[r]=t},bL=bt,_L=Wt,wL=iC,SL=vn,CL=Gi,TL=Eu;bL({target:"Object",stat:!0,sham:!_L},{getOwnPropertyDescriptors:function(r){for(var t=SL(r),n=CL.f,i=wL(t),a={},s=0,c,o;i.length>s;)o=n(t,c=i[s++]),o!==void 0&&TL(a,c,o);return a}});var HC={exports:{}};(function(e){function r(n,i,a,s,c,o,u){try{var l=n[o](u),f=l.value}catch(v){return void a(v)}l.done?i(f):Promise.resolve(f).then(s,c)}function t(n){return function(){var i=this,a=arguments;return new Promise(function(s,c){var o=n.apply(i,a);function u(f){r(o,s,c,u,l,"next",f)}function l(f){r(o,s,c,u,l,"throw",f)}u(void 0)})}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(HC);var ku=HC.exports,KC={exports:{}};(function(e){function r(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(KC);var ls=KC.exports,JC={exports:{}},YC={exports:{}};(function(e){function r(t,n){return e.exports=r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},e.exports.__esModule=!0,e.exports.default=e.exports,r(t,n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(YC);var Qv=YC.exports;(function(e){var r=Qv;function t(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&r(n,i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(JC);var mi=JC.exports,XC={exports:{}},QC={exports:{}};(function(e){function r(t){"@babel/helpers - typeof";return e.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(QC);var Mn=QC.exports;(function(e){var r=Mn.default,t=ls;function n(i,a){if(a&&(r(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return t(i)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(XC);var gi=XC.exports,ZC={exports:{}};(function(e){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(ZC);var xn=ZC.exports,eT={exports:{}},tT={exports:{}},rT={exports:{}};(function(e){var r=Mn.default;function t(n,i){if(r(n)!="object"||!n)return n;var a=n[Symbol.toPrimitive];if(a!==void 0){var s=a.call(n,i||"default");if(r(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(rT);var EL=rT.exports;(function(e){var r=Mn.default,t=EL;function n(i){var a=t(i,"string");return r(a)=="symbol"?a:a+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(tT);var nT=tT.exports;(function(e){var r=nT;function t(n,i,a){return(i=r(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a,n}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(eT);var fs=eT.exports,iT={exports:{}};(function(e){var r=nT;function t(i,a){for(var s=0;s<a.length;s++){var c=a[s];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(i,r(c.key),c)}}function n(i,a,s){return a&&t(i.prototype,a),s&&t(i,s),Object.defineProperty(i,"prototype",{writable:!1}),i}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(iT);var $a=iT.exports,aT={exports:{}};(function(e){function r(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(aT);var yi=aT.exports,kL=Fv,RL=Ki,$L=kL?{}.toString:function(){return"[object "+RL(this)+"]"},PL=Fv,IL=zr,OL=$L;PL||IL(Object.prototype,"toString",OL,{unsafe:!0});var AL=St,ML=fi,Wl=ML(AL.process)==="process",xL=gt,NL=An,LL=function(e,r,t){try{return xL(NL(Object.getOwnPropertyDescriptor(e,r)[t]))}catch{}},DL=Jt,jL=function(e){return DL(e)||e===null},FL=jL,UL=String,BL=TypeError,qL=function(e){if(FL(e))return e;throw new BL("Can't set "+UL(e)+" as a prototype")},zL=LL,GL=Jt,WL=Jn,VL=qL,ho=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=zL(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch{}return function(i,a){return WL(i),VL(a),GL(i)&&(e?t(i,a):i.__proto__=a),i}}():void 0),HL=Yn,KL=vi,JL=qt,YL=Wt,xy=JL("species"),Vl=function(e){var r=HL(e);YL&&r&&!r[xy]&&KL(r,xy,{configurable:!0,get:function(){return this}})},XL=Wi,QL=TypeError,Pa=function(e,r){if(XL(r,e))return e;throw new QL("Incorrect invocation")},Ny=sr,ZL=Bv,eD=Kn,tD=qt,rD=tD("species"),Zv=function(e,r){var t=Ny(e).constructor,n;return t===void 0||eD(n=Ny(t)[rD])?r:ZL(n)},nD=TypeError,em=function(e,r){if(e<r)throw new nD("Not enough arguments");return e},iD=as,sT=/(?:ipad|iphone|ipod).*applewebkit/i.test(iD),pn=St,aD=cs,sD=Ji,Ly=Bt,oD=tr,oT=dt,Dy=pC,uD=hi,jy=Nl,cD=em,lD=sT,fD=Wl,rh=pn.setImmediate,nh=pn.clearImmediate,dD=pn.process,ld=pn.Dispatch,pD=pn.Function,Fy=pn.MessageChannel,hD=pn.String,fd=0,Yo={},Uy="onreadystatechange",au,Ua,dd,pd;oT(function(){au=pn.location});var tm=function(e){if(oD(Yo,e)){var r=Yo[e];delete Yo[e],r()}},hd=function(e){return function(){tm(e)}},By=function(e){tm(e.data)},qy=function(e){pn.postMessage(hD(e),au.protocol+"//"+au.host)};(!rh||!nh)&&(rh=function(r){cD(arguments.length,1);var t=Ly(r)?r:pD(r),n=uD(arguments,1);return Yo[++fd]=function(){aD(t,void 0,n)},Ua(fd),fd},nh=function(r){delete Yo[r]},fD?Ua=function(e){dD.nextTick(hd(e))}:ld&&ld.now?Ua=function(e){ld.now(hd(e))}:Fy&&!lD?(dd=new Fy,pd=dd.port2,dd.port1.onmessage=By,Ua=sD(pd.postMessage,pd)):pn.addEventListener&&Ly(pn.postMessage)&&!pn.importScripts&&au&&au.protocol!=="file:"&&!oT(qy)?(Ua=qy,pn.addEventListener("message",By,!1)):Uy in jy("script")?Ua=function(e){Dy.appendChild(jy("script"))[Uy]=function(){Dy.removeChild(this),tm(e)}}:Ua=function(e){setTimeout(hd(e),0)});var uT={set:rh,clear:nh},zy=St,vD=Wt,mD=Object.getOwnPropertyDescriptor,cT=function(e){if(!vD)return zy[e];var r=mD(zy,e);return r&&r.value},lT=function(){this.head=null,this.tail=null};lT.prototype={add:function(e){var r={item:e,next:null},t=this.tail;t?t.next=r:this.head=r,this.tail=r},get:function(){var e=this.head;if(e){var r=this.head=e.next;return r===null&&(this.tail=null),e.item}}};var fT=lT,gD=as,yD=/ipad|iphone|ipod/i.test(gD)&&typeof Pebble<"u",bD=as,_D=/web0s(?!.*chrome)/i.test(bD),Qs=St,wD=cT,Gy=Ji,vd=uT.set,SD=fT,CD=sT,TD=yD,ED=_D,md=Wl,Wy=Qs.MutationObserver||Qs.WebKitMutationObserver,Vy=Qs.document,Hy=Qs.process,Qu=Qs.Promise,ih=wD("queueMicrotask"),_s,gd,yd,Zu,Ky;if(!ih){var ec=new SD,tc=function(){var e,r;for(md&&(e=Hy.domain)&&e.exit();r=ec.get();)try{r()}catch(t){throw ec.head&&_s(),t}e&&e.enter()};!CD&&!md&&!ED&&Wy&&Vy?(gd=!0,yd=Vy.createTextNode(""),new Wy(tc).observe(yd,{characterData:!0}),_s=function(){yd.data=gd=!gd}):!TD&&Qu&&Qu.resolve?(Zu=Qu.resolve(void 0),Zu.constructor=Qu,Ky=Gy(Zu.then,Zu),_s=function(){Ky(tc)}):md?_s=function(){Hy.nextTick(tc)}:(vd=Gy(vd,Qs),_s=function(){vd(tc)}),ih=function(e){ec.head||_s(),ec.add(e)}}var kD=ih,RD=function(e,r){try{arguments.length===1?console.error(e):console.error(e,r)}catch{}},rm=function(e){try{return{error:!1,value:e()}}catch(r){return{error:!0,value:r}}},$D=St,Hl=$D.Promise,dT=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",PD=dT,ID=Wl,OD=!PD&&!ID&&typeof window=="object"&&typeof document=="object",AD=St,Xo=Hl,MD=Bt,xD=jl,ND=Nv,LD=qt,DD=OD,jD=dT,bd=uo;Xo&&Xo.prototype;var FD=LD("species"),ah=!1,pT=MD(AD.PromiseRejectionEvent),UD=xD("Promise",function(){var e=ND(Xo),r=e!==String(Xo);if(!r&&bd===66)return!0;if(!bd||bd<51||!/native code/.test(e)){var t=new Xo(function(a){a(1)}),n=function(a){a(function(){},function(){})},i=t.constructor={};if(i[FD]=n,ah=t.then(function(){})instanceof n,!ah)return!0}return!r&&(DD||jD)&&!pT}),Ru={CONSTRUCTOR:UD,REJECTION_EVENT:pT,SUBCLASSING:ah},vo={},Jy=An,BD=TypeError,qD=function(e){var r,t;this.promise=new e(function(n,i){if(r!==void 0||t!==void 0)throw new BD("Bad Promise constructor");r=n,t=i}),this.resolve=Jy(r),this.reject=Jy(t)};vo.f=function(e){return new qD(e)};var zD=bt,hl=Wl,Ta=St,Zs=Ut,Yy=zr,Xy=ho,GD=pi,WD=Vl,VD=An,tl=Bt,HD=Jt,KD=Pa,JD=Zv,hT=uT.set,nm=kD,YD=RD,XD=rm,QD=fT,vT=mn,vl=Hl,im=Ru,mT=vo,Kl="Promise",gT=im.CONSTRUCTOR,ZD=im.REJECTION_EVENT,e2=im.SUBCLASSING,_d=vT.getterFor(Kl),t2=vT.set,Ps=vl&&vl.prototype,Ka=vl,rc=Ps,yT=Ta.TypeError,sh=Ta.document,am=Ta.process,oh=mT.f,r2=oh,n2=!!(sh&&sh.createEvent&&Ta.dispatchEvent),bT="unhandledrejection",i2="rejectionhandled",Qy=0,_T=1,a2=2,sm=1,wT=2,nc,Zy,s2,eb,ST=function(e){var r;return HD(e)&&tl(r=e.then)?r:!1},CT=function(e,r){var t=r.value,n=r.state===_T,i=n?e.ok:e.fail,a=e.resolve,s=e.reject,c=e.domain,o,u,l;try{i?(n||(r.rejection===wT&&u2(r),r.rejection=sm),i===!0?o=t:(c&&c.enter(),o=i(t),c&&(c.exit(),l=!0)),o===e.promise?s(new yT("Promise-chain cycle")):(u=ST(o))?Zs(u,o,a,s):a(o)):s(t)}catch(f){c&&!l&&c.exit(),s(f)}},TT=function(e,r){e.notified||(e.notified=!0,nm(function(){for(var t=e.reactions,n;n=t.get();)CT(n,e);e.notified=!1,r&&!e.rejection&&o2(e)}))},ET=function(e,r,t){var n,i;n2?(n=sh.createEvent("Event"),n.promise=r,n.reason=t,n.initEvent(e,!1,!0),Ta.dispatchEvent(n)):n={promise:r,reason:t},!ZD&&(i=Ta["on"+e])?i(n):e===bT&&YD("Unhandled promise rejection",t)},o2=function(e){Zs(hT,Ta,function(){var r=e.facade,t=e.value,n=tb(e),i;if(n&&(i=XD(function(){hl?am.emit("unhandledRejection",t,r):ET(bT,r,t)}),e.rejection=hl||tb(e)?wT:sm,i.error))throw i.value})},tb=function(e){return e.rejection!==sm&&!e.parent},u2=function(e){Zs(hT,Ta,function(){var r=e.facade;hl?am.emit("rejectionHandled",r):ET(i2,r,e.value)})},xs=function(e,r,t){return function(n){e(r,n,t)}},Fs=function(e,r,t){e.done||(e.done=!0,t&&(e=t),e.value=r,e.state=a2,TT(e,!0))},uh=function(e,r,t){if(!e.done){e.done=!0,t&&(e=t);try{if(e.facade===r)throw new yT("Promise can't be resolved itself");var n=ST(r);n?nm(function(){var i={done:!1};try{Zs(n,r,xs(uh,i,e),xs(Fs,i,e))}catch(a){Fs(i,a,e)}}):(e.value=r,e.state=_T,TT(e,!1))}catch(i){Fs({done:!1},i,e)}}};if(gT&&(Ka=function(r){KD(this,rc),VD(r),Zs(nc,this);var t=_d(this);try{r(xs(uh,t),xs(Fs,t))}catch(n){Fs(t,n)}},rc=Ka.prototype,nc=function(r){t2(this,{type:Kl,done:!1,notified:!1,parent:!1,reactions:new QD,rejection:!1,state:Qy,value:void 0})},nc.prototype=Yy(rc,"then",function(r,t){var n=_d(this),i=oh(JD(this,Ka));return n.parent=!0,i.ok=tl(r)?r:!0,i.fail=tl(t)&&t,i.domain=hl?am.domain:void 0,n.state===Qy?n.reactions.add(i):nm(function(){CT(i,n)}),i.promise}),Zy=function(){var e=new nc,r=_d(e);this.promise=e,this.resolve=xs(uh,r),this.reject=xs(Fs,r)},mT.f=oh=function(e){return e===Ka||e===s2?new Zy(e):r2(e)},tl(vl)&&Ps!==Object.prototype)){eb=Ps.then,e2||Yy(Ps,"then",function(r,t){var n=this;return new Ka(function(i,a){Zs(eb,n,i,a)}).then(r,t)},{unsafe:!0});try{delete Ps.constructor}catch{}Xy&&Xy(Ps,rc)}zD({global:!0,constructor:!0,wrap:!0,forced:gT},{Promise:Ka});GD(Ka,Kl,!1);WD(Kl);var $u={},c2=qt,l2=$u,f2=c2("iterator"),d2=Array.prototype,om=function(e){return e!==void 0&&(l2.Array===e||d2[f2]===e)},p2=Ki,rb=os,h2=Kn,v2=$u,m2=qt,g2=m2("iterator"),Pu=function(e){if(!h2(e))return rb(e,g2)||rb(e,"@@iterator")||v2[p2(e)]},y2=Ut,b2=An,_2=sr,w2=ss,S2=Pu,C2=TypeError,Jl=function(e,r){var t=arguments.length<2?S2(e):r;if(b2(t))return _2(y2(t,e));throw new C2(w2(e)+" is not iterable")},T2=Ut,nb=sr,E2=os,kT=function(e,r,t){var n,i;nb(e);try{if(n=E2(e,"return"),!n){if(r==="throw")throw t;return t}n=T2(n,e)}catch(a){i=!0,n=a}if(r==="throw")throw t;if(i)throw n;return nb(n),t},k2=Ji,R2=Ut,$2=sr,P2=ss,I2=om,O2=Lr,ib=Wi,A2=Jl,M2=Pu,ab=kT,x2=TypeError,rl=function(e,r){this.stopped=e,this.result=r},sb=rl.prototype,Iu=function(e,r,t){var n=t&&t.that,i=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_RECORD),s=!!(t&&t.IS_ITERATOR),c=!!(t&&t.INTERRUPTED),o=k2(r,n),u,l,f,v,m,b,C,$=function(A){return u&&ab(u,"normal",A),new rl(!0,A)},E=function(A){return i?($2(A),c?o(A[0],A[1],$):o(A[0],A[1])):c?o(A,$):o(A)};if(a)u=e.iterator;else if(s)u=e;else{if(l=M2(e),!l)throw new x2(P2(e)+" is not iterable");if(I2(l)){for(f=0,v=O2(e);v>f;f++)if(m=E(e[f]),m&&ib(sb,m))return m;return new rl(!1)}u=A2(e,l)}for(b=a?e.next:u.next;!(C=R2(b,u)).done;){try{m=E(C.value)}catch(A){ab(u,"throw",A)}if(typeof m=="object"&&m&&ib(sb,m))return m}return new rl(!1)},N2=qt,RT=N2("iterator"),$T=!1;try{var L2=0,ob={next:function(){return{done:!!L2++}},return:function(){$T=!0}};ob[RT]=function(){return this},Array.from(ob,function(){throw 2})}catch{}var Yl=function(e,r){try{if(!r&&!$T)return!1}catch{return!1}var t=!1;try{var n={};n[RT]=function(){return{next:function(){return{done:t=!0}}}},e(n)}catch{}return t},D2=Hl,j2=Yl,F2=Ru.CONSTRUCTOR,PT=F2||!j2(function(e){D2.all(e).then(void 0,function(){})}),U2=bt,B2=Ut,q2=An,z2=vo,G2=rm,W2=Iu,V2=PT;U2({target:"Promise",stat:!0,forced:V2},{all:function(r){var t=this,n=z2.f(t),i=n.resolve,a=n.reject,s=G2(function(){var c=q2(t.resolve),o=[],u=0,l=1;W2(r,function(f){var v=u++,m=!1;l++,B2(c,t,f).then(function(b){m||(m=!0,o[v]=b,--l||i(o))},a)}),--l||i(o)});return s.error&&a(s.value),n.promise}});var H2=bt,K2=Ru.CONSTRUCTOR,ch=Hl,J2=Yn,Y2=Bt,X2=zr,ub=ch&&ch.prototype;H2({target:"Promise",proto:!0,forced:K2,real:!0},{catch:function(e){return this.then(void 0,e)}});if(Y2(ch)){var cb=J2("Promise").prototype.catch;ub.catch!==cb&&X2(ub,"catch",cb,{unsafe:!0})}var Q2=bt,Z2=Ut,ej=An,tj=vo,rj=rm,nj=Iu,ij=PT;Q2({target:"Promise",stat:!0,forced:ij},{race:function(r){var t=this,n=tj.f(t),i=n.reject,a=rj(function(){var s=ej(t.resolve);nj(r,function(c){Z2(s,t,c).then(n.resolve,i)})});return a.error&&i(a.value),n.promise}});var aj=bt,sj=vo,oj=Ru.CONSTRUCTOR;aj({target:"Promise",stat:!0,forced:oj},{reject:function(r){var t=sj.f(this),n=t.reject;return n(r),t.promise}});var uj=sr,cj=Jt,lj=vo,fj=function(e,r){if(uj(e),cj(r)&&r.constructor===e)return r;var t=lj.f(e),n=t.resolve;return n(r),t.promise},dj=bt,pj=Yn,hj=Ru.CONSTRUCTOR,vj=fj;pj("Promise");dj({target:"Promise",stat:!0,forced:hj},{resolve:function(r){return vj(this,r)}});var mj=bt,gj=rn.map,yj=Tu,bj=yj("map");mj({target:"Array",proto:!0,forced:!bj},{map:function(r){return gj(this,r,arguments.length>1?arguments[1]:void 0)}});var IT={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},_j=Nl,wd=_j("span").classList,lb=wd&&wd.constructor&&wd.constructor.prototype,OT=lb===Object.prototype?void 0:lb,wj=dt,Xl=function(e,r){var t=[][e];return!!t&&wj(function(){t.call(null,r||function(){return 1},1)})},Sj=rn.forEach,Cj=Xl,Tj=Cj("forEach"),Ej=Tj?[].forEach:function(r){return Sj(this,r,arguments.length>1?arguments[1]:void 0)},fb=St,db=IT,kj=OT,Sd=Ej,Rj=Vi,AT=function(e){if(e&&e.forEach!==Sd)try{Rj(e,"forEach",Sd)}catch{e.forEach=Sd}};for(var Cd in db)db[Cd]&&AT(fb[Cd]&&fb[Cd].prototype);AT(kj);var MT={exports:{}};(function(e){var r=Mn.default;function t(){e.exports=t=function(){return i},e.exports.__esModule=!0,e.exports.default=e.exports;var n,i={},a=Object.prototype,s=a.hasOwnProperty,c=Object.defineProperty||function(he,pe,x){he[pe]=x.value},o=typeof Symbol=="function"?Symbol:{},u=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",f=o.toStringTag||"@@toStringTag";function v(he,pe,x){return Object.defineProperty(he,pe,{value:x,enumerable:!0,configurable:!0,writable:!0}),he[pe]}try{v({},"")}catch{v=function(x,Pe,Je){return x[Pe]=Je}}function m(he,pe,x,Pe){var Je=pe&&pe.prototype instanceof U?pe:U,Ae=Object.create(Je.prototype),we=new at(Pe||[]);return c(Ae,"_invoke",{value:Z(he,x,we)}),Ae}function b(he,pe,x){try{return{type:"normal",arg:he.call(pe,x)}}catch(Pe){return{type:"throw",arg:Pe}}}i.wrap=m;var C="suspendedStart",$="suspendedYield",E="executing",A="completed",N={};function U(){}function J(){}function H(){}var W={};v(W,u,function(){return this});var L=Object.getPrototypeOf,ee=L&&L(L(Te([])));ee&&ee!==a&&s.call(ee,u)&&(W=ee);var Y=H.prototype=U.prototype=Object.create(W);function ie(he){["next","throw","return"].forEach(function(pe){v(he,pe,function(x){return this._invoke(pe,x)})})}function me(he,pe){function x(Je,Ae,we,Q){var Rt=b(he[Je],he,Ae);if(Rt.type!=="throw"){var be=Rt.arg,se=be.value;return se&&r(se)=="object"&&s.call(se,"__await")?pe.resolve(se.__await).then(function(_t){x("next",_t,we,Q)},function(_t){x("throw",_t,we,Q)}):pe.resolve(se).then(function(_t){be.value=_t,we(be)},function(_t){return x("throw",_t,we,Q)})}Q(Rt.arg)}var Pe;c(this,"_invoke",{value:function(Ae,we){function Q(){return new pe(function(Rt,be){x(Ae,we,Rt,be)})}return Pe=Pe?Pe.then(Q,Q):Q()}})}function Z(he,pe,x){var Pe=C;return function(Je,Ae){if(Pe===E)throw Error("Generator is already running");if(Pe===A){if(Je==="throw")throw Ae;return{value:n,done:!0}}for(x.method=Je,x.arg=Ae;;){var we=x.delegate;if(we){var Q=Ne(we,x);if(Q){if(Q===N)continue;return Q}}if(x.method==="next")x.sent=x._sent=x.arg;else if(x.method==="throw"){if(Pe===C)throw Pe=A,x.arg;x.dispatchException(x.arg)}else x.method==="return"&&x.abrupt("return",x.arg);Pe=E;var Rt=b(he,pe,x);if(Rt.type==="normal"){if(Pe=x.done?A:$,Rt.arg===N)continue;return{value:Rt.arg,done:x.done}}Rt.type==="throw"&&(Pe=A,x.method="throw",x.arg=Rt.arg)}}}function Ne(he,pe){var x=pe.method,Pe=he.iterator[x];if(Pe===n)return pe.delegate=null,x==="throw"&&he.iterator.return&&(pe.method="return",pe.arg=n,Ne(he,pe),pe.method==="throw")||x!=="return"&&(pe.method="throw",pe.arg=new TypeError("The iterator does not provide a '"+x+"' method")),N;var Je=b(Pe,he.iterator,pe.arg);if(Je.type==="throw")return pe.method="throw",pe.arg=Je.arg,pe.delegate=null,N;var Ae=Je.arg;return Ae?Ae.done?(pe[he.resultName]=Ae.value,pe.next=he.nextLoc,pe.method!=="return"&&(pe.method="next",pe.arg=n),pe.delegate=null,N):Ae:(pe.method="throw",pe.arg=new TypeError("iterator result is not an object"),pe.delegate=null,N)}function Ve(he){var pe={tryLoc:he[0]};1 in he&&(pe.catchLoc=he[1]),2 in he&&(pe.finallyLoc=he[2],pe.afterLoc=he[3]),this.tryEntries.push(pe)}function Tt(he){var pe=he.completion||{};pe.type="normal",delete pe.arg,he.completion=pe}function at(he){this.tryEntries=[{tryLoc:"root"}],he.forEach(Ve,this),this.reset(!0)}function Te(he){if(he||he===""){var pe=he[u];if(pe)return pe.call(he);if(typeof he.next=="function")return he;if(!isNaN(he.length)){var x=-1,Pe=function Je(){for(;++x<he.length;)if(s.call(he,x))return Je.value=he[x],Je.done=!1,Je;return Je.value=n,Je.done=!0,Je};return Pe.next=Pe}}throw new TypeError(r(he)+" is not iterable")}return J.prototype=H,c(Y,"constructor",{value:H,configurable:!0}),c(H,"constructor",{value:J,configurable:!0}),J.displayName=v(H,f,"GeneratorFunction"),i.isGeneratorFunction=function(he){var pe=typeof he=="function"&&he.constructor;return!!pe&&(pe===J||(pe.displayName||pe.name)==="GeneratorFunction")},i.mark=function(he){return Object.setPrototypeOf?Object.setPrototypeOf(he,H):(he.__proto__=H,v(he,f,"GeneratorFunction")),he.prototype=Object.create(Y),he},i.awrap=function(he){return{__await:he}},ie(me.prototype),v(me.prototype,l,function(){return this}),i.AsyncIterator=me,i.async=function(he,pe,x,Pe,Je){Je===void 0&&(Je=Promise);var Ae=new me(m(he,pe,x,Pe),Je);return i.isGeneratorFunction(pe)?Ae:Ae.next().then(function(we){return we.done?we.value:Ae.next()})},ie(Y),v(Y,f,"Generator"),v(Y,u,function(){return this}),v(Y,"toString",function(){return"[object Generator]"}),i.keys=function(he){var pe=Object(he),x=[];for(var Pe in pe)x.push(Pe);return x.reverse(),function Je(){for(;x.length;){var Ae=x.pop();if(Ae in pe)return Je.value=Ae,Je.done=!1,Je}return Je.done=!0,Je}},i.values=Te,at.prototype={constructor:at,reset:function(pe){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(Tt),!pe)for(var x in this)x.charAt(0)==="t"&&s.call(this,x)&&!isNaN(+x.slice(1))&&(this[x]=n)},stop:function(){this.done=!0;var pe=this.tryEntries[0].completion;if(pe.type==="throw")throw pe.arg;return this.rval},dispatchException:function(pe){if(this.done)throw pe;var x=this;function Pe(be,se){return we.type="throw",we.arg=pe,x.next=be,se&&(x.method="next",x.arg=n),!!se}for(var Je=this.tryEntries.length-1;Je>=0;--Je){var Ae=this.tryEntries[Je],we=Ae.completion;if(Ae.tryLoc==="root")return Pe("end");if(Ae.tryLoc<=this.prev){var Q=s.call(Ae,"catchLoc"),Rt=s.call(Ae,"finallyLoc");if(Q&&Rt){if(this.prev<Ae.catchLoc)return Pe(Ae.catchLoc,!0);if(this.prev<Ae.finallyLoc)return Pe(Ae.finallyLoc)}else if(Q){if(this.prev<Ae.catchLoc)return Pe(Ae.catchLoc,!0)}else{if(!Rt)throw Error("try statement without catch or finally");if(this.prev<Ae.finallyLoc)return Pe(Ae.finallyLoc)}}}},abrupt:function(pe,x){for(var Pe=this.tryEntries.length-1;Pe>=0;--Pe){var Je=this.tryEntries[Pe];if(Je.tryLoc<=this.prev&&s.call(Je,"finallyLoc")&&this.prev<Je.finallyLoc){var Ae=Je;break}}Ae&&(pe==="break"||pe==="continue")&&Ae.tryLoc<=x&&x<=Ae.finallyLoc&&(Ae=null);var we=Ae?Ae.completion:{};return we.type=pe,we.arg=x,Ae?(this.method="next",this.next=Ae.finallyLoc,N):this.complete(we)},complete:function(pe,x){if(pe.type==="throw")throw pe.arg;return pe.type==="break"||pe.type==="continue"?this.next=pe.arg:pe.type==="return"?(this.rval=this.arg=pe.arg,this.method="return",this.next="end"):pe.type==="normal"&&x&&(this.next=x),N},finish:function(pe){for(var x=this.tryEntries.length-1;x>=0;--x){var Pe=this.tryEntries[x];if(Pe.finallyLoc===pe)return this.complete(Pe.completion,Pe.afterLoc),Tt(Pe),N}},catch:function(pe){for(var x=this.tryEntries.length-1;x>=0;--x){var Pe=this.tryEntries[x];if(Pe.tryLoc===pe){var Je=Pe.completion;if(Je.type==="throw"){var Ae=Je.arg;Tt(Pe)}return Ae}}throw Error("illegal catch attempt")},delegateYield:function(pe,x,Pe){return this.delegate={iterator:Te(pe),resultName:x,nextLoc:Pe},this.method==="next"&&(this.arg=n),N}},i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(MT);var $j=MT.exports,nl=$j(),Ou=nl;try{regeneratorRuntime=nl}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=nl:Function("r","regeneratorRuntime = r")(nl)}var Pj=TypeError,Ij=9007199254740991,xT=function(e){if(e>Ij)throw Pj("Maximum allowed index exceeded");return e},Oj=bt,Aj=dt,Mj=_u,xj=Jt,Nj=Nr,Lj=Lr,pb=xT,hb=Eu,Dj=Hv,jj=Tu,Fj=qt,Uj=uo,NT=Fj("isConcatSpreadable"),Bj=Uj>=51||!Aj(function(){var e=[];return e[NT]=!1,e.concat()[0]!==e}),qj=function(e){if(!xj(e))return!1;var r=e[NT];return r!==void 0?!!r:Mj(e)},zj=!Bj||!jj("concat");Oj({target:"Array",proto:!0,arity:1,forced:zj},{concat:function(r){var t=Nj(this),n=Dj(t,0),i=0,a,s,c,o,u;for(a=-1,c=arguments.length;a<c;a++)if(u=a===-1?t:arguments[a],qj(u))for(o=Lj(u),pb(i+o),s=0;s<o;s++,i++)s in u&&hb(n,i,u[s]);else pb(i+1),hb(n,i++,u);return n.length=i,n}});var Gj=sr,Wj=kT,Vj=function(e,r,t,n){try{return n?r(Gj(t)[0],t[1]):r(t)}catch(i){Wj(e,"throw",i)}},Hj=Ji,Kj=Ut,Jj=Nr,Yj=Vj,Xj=om,Qj=Fl,Zj=Lr,vb=Eu,eF=Jl,tF=Pu,mb=Array,LT=function(r){var t=Jj(r),n=Qj(this),i=arguments.length,a=i>1?arguments[1]:void 0,s=a!==void 0;s&&(a=Hj(a,i>2?arguments[2]:void 0));var c=tF(t),o=0,u,l,f,v,m,b;if(c&&!(this===mb&&Xj(c)))for(l=n?new this:[],v=eF(t,c),m=v.next;!(f=Kj(m,v)).done;o++)b=s?Yj(v,a,[f.value,o],!0):f.value,vb(l,o,b);else for(u=Zj(t),l=n?new this(u):mb(u);u>o;o++)b=s?a(t[o],o):t[o],vb(l,o,b);return l.length=o,l},rF=bt,nF=LT,iF=Yl,aF=!iF(function(e){Array.from(e)});rF({target:"Array",stat:!0,forced:aF},{from:nF});var um=gt,sF=di,oF=Sr,uF=Jn,cF=um("".charAt),gb=um("".charCodeAt),lF=um("".slice),yb=function(e){return function(r,t){var n=oF(uF(r)),i=sF(t),a=n.length,s,c;return i<0||i>=a?e?"":void 0:(s=gb(n,i),s<55296||s>56319||i+1===a||(c=gb(n,i+1))<56320||c>57343?e?cF(n,i):s:e?lF(n,i,i+2):(s-55296<<10)+(c-56320)+65536)}},cm={codeAt:yb(!1),charAt:yb(!0)},fF=dt,dF=!fF(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),pF=tr,hF=Bt,vF=Nr,mF=Ll,gF=dF,bb=mF("IE_PROTO"),lh=Object,yF=lh.prototype,Au=gF?lh.getPrototypeOf:function(e){var r=vF(e);if(pF(r,bb))return r[bb];var t=r.constructor;return hF(t)&&r instanceof t?t.prototype:r instanceof lh?yF:null},bF=dt,_F=Bt,wF=Jt,_b=Au,SF=zr,CF=qt,fh=CF("iterator"),DT=!1,Za,Td,Ed;[].keys&&(Ed=[].keys(),"next"in Ed?(Td=_b(_b(Ed)),Td!==Object.prototype&&(Za=Td)):DT=!0);var TF=!wF(Za)||bF(function(){var e={};return Za[fh].call(e)!==e});TF&&(Za={});_F(Za[fh])||SF(Za,fh,function(){return this});var jT={IteratorPrototype:Za,BUGGY_SAFARI_ITERATORS:DT},EF=jT.IteratorPrototype,kF=Ra,RF=is,$F=pi,PF=$u,IF=function(){return this},FT=function(e,r,t,n){var i=r+" Iterator";return e.prototype=kF(EF,{next:RF(+!n,t)}),$F(e,i,!1),PF[i]=IF,e},OF=bt,AF=Ut,UT=vu,MF=Bt,xF=FT,wb=Au,Sb=ho,NF=pi,LF=Vi,kd=zr,DF=qt,jF=$u,BT=jT,FF=UT.PROPER,UF=UT.CONFIGURABLE,Cb=BT.IteratorPrototype,ic=BT.BUGGY_SAFARI_ITERATORS,$o=DF("iterator"),Tb="keys",Po="values",Eb="entries",BF=function(){return this},lm=function(e,r,t,n,i,a,s){xF(t,r,n);var c=function(E){if(E===i&&v)return v;if(!ic&&E&&E in l)return l[E];switch(E){case Tb:return function(){return new t(this,E)};case Po:return function(){return new t(this,E)};case Eb:return function(){return new t(this,E)}}return function(){return new t(this)}},o=r+" Iterator",u=!1,l=e.prototype,f=l[$o]||l["@@iterator"]||i&&l[i],v=!ic&&f||c(i),m=r==="Array"&&l.entries||f,b,C,$;if(m&&(b=wb(m.call(new e)),b!==Object.prototype&&b.next&&(wb(b)!==Cb&&(Sb?Sb(b,Cb):MF(b[$o])||kd(b,$o,BF)),NF(b,o,!0))),FF&&i===Po&&f&&f.name!==Po&&(UF?LF(l,"name",Po):(u=!0,v=function(){return AF(f,this)})),i)if(C={values:c(Po),keys:a?v:c(Tb),entries:c(Eb)},s)for($ in C)(ic||u||!($ in l))&&kd(l,$,C[$]);else OF({target:r,proto:!0,forced:ic||u},C);return l[$o]!==v&&kd(l,$o,v,{name:i}),jF[r]=v,C},Ql=function(e,r){return{value:e,done:r}},qF=cm.charAt,zF=Sr,qT=mn,GF=lm,kb=Ql,zT="String Iterator",WF=qT.set,VF=qT.getterFor(zT);GF(String,"String",function(e){WF(this,{type:zT,string:zF(e),index:0})},function(){var r=VF(this),t=r.string,n=r.index,i;return n>=t.length?kb(void 0,!0):(i=qF(t,n),r.index+=i.length,kb(i,!1))});var GT={exports:{}};(function(e){(function(r,t){e.exports?e.exports=t():r.log=t()})(xe,function(){var r=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"],a={},s=null;function c(C,$){var E=C[$];if(typeof E.bind=="function")return E.bind(C);try{return Function.prototype.bind.call(E,C)}catch{return function(){return Function.prototype.apply.apply(E,[C,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(C){return C==="debug"&&(C="log"),typeof console===t?!1:C==="trace"&&n?o:console[C]!==void 0?c(console,C):console.log!==void 0?c(console,"log"):r}function l(){for(var C=this.getLevel(),$=0;$<i.length;$++){var E=i[$];this[E]=$<C?r:this.methodFactory(E,C,this.name)}if(this.log=this.debug,typeof console===t&&C<this.levels.SILENT)return"No console available for logging"}function f(C){return function(){typeof console!==t&&(l.call(this),this[C].apply(this,arguments))}}function v(C,$,E){return u(C)||f.apply(this,arguments)}function m(C,$){var E=this,A,N,U,J="loglevel";typeof C=="string"?J+=":"+C:typeof C=="symbol"&&(J=void 0);function H(ie){var me=(i[ie]||"silent").toUpperCase();if(!(typeof window===t||!J)){try{window.localStorage[J]=me;return}catch{}try{window.document.cookie=encodeURIComponent(J)+"="+me+";"}catch{}}}function W(){var ie;if(!(typeof window===t||!J)){try{ie=window.localStorage[J]}catch{}if(typeof ie===t)try{var me=window.document.cookie,Z=encodeURIComponent(J),Ne=me.indexOf(Z+"=");Ne!==-1&&(ie=/^([^;]+)/.exec(me.slice(Ne+Z.length+1))[1])}catch{}return E.levels[ie]===void 0&&(ie=void 0),ie}}function L(){if(!(typeof window===t||!J)){try{window.localStorage.removeItem(J)}catch{}try{window.document.cookie=encodeURIComponent(J)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function ee(ie){var me=ie;if(typeof me=="string"&&E.levels[me.toUpperCase()]!==void 0&&(me=E.levels[me.toUpperCase()]),typeof me=="number"&&me>=0&&me<=E.levels.SILENT)return me;throw new TypeError("log.setLevel() called with invalid level: "+ie)}E.name=C,E.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},E.methodFactory=$||v,E.getLevel=function(){return U??N??A},E.setLevel=function(ie,me){return U=ee(ie),me!==!1&&H(U),l.call(E)},E.setDefaultLevel=function(ie){N=ee(ie),W()||E.setLevel(ie,!1)},E.resetLevel=function(){U=null,L(),l.call(E)},E.enableAll=function(ie){E.setLevel(E.levels.TRACE,ie)},E.disableAll=function(ie){E.setLevel(E.levels.SILENT,ie)},E.rebuild=function(){if(s!==E&&(A=ee(s.getLevel())),l.call(E),s===E)for(var ie in a)a[ie].rebuild()},A=ee(s?s.getLevel():"WARN");var Y=W();Y!=null&&(U=ee(Y)),l.call(E)}s=new m,s.getLogger=function($){if(typeof $!="symbol"&&typeof $!="string"||$==="")throw new TypeError("You must supply a name when creating a logger.");var E=a[$];return E||(E=a[$]=new m($,s.methodFactory)),E};var b=typeof window!==t?window.log:void 0;return s.noConflict=function(){return typeof window!==t&&window.log===s&&(window.log=b),s},s.getLoggers=function(){return a},s.default=s,s})})(GT);var yr=GT.exports;const Qa="\\d+(?:[\\.,]\\d+)?",HF=`(${Qa}W)`,KF=`(${Qa}Y)?(${Qa}M)?(${Qa}D)?`,JF=`T(${Qa}H)?(${Qa}M)?(${Qa}S)?`,YF=`P(?:${HF}|${KF}(?:${JF})?)`,XF=["weeks","years","months","days","hours","minutes","seconds"],fm=new RegExp(YF),WT=e=>e.match(fm).slice(1).reduce((r,t,n)=>(r[XF[n]]=parseFloat(t)||0,r),{}),dm=(e,r)=>{const t=r?r.getTime():Date.now(),n=new Date(t);return n.setFullYear(n.getFullYear()+e.years),n.setMonth(n.getMonth()+e.months),n.setDate(n.getDate()+e.days),n.setHours(n.getHours()+e.hours),n.setMinutes(n.getMinutes()+e.minutes),n.setMilliseconds(n.getMilliseconds()+e.seconds*1e3),n.setDate(n.getDate()+e.weeks*7),n},VT=(e,r)=>{const t=r?r.getTime():Date.now(),n=new Date(t);return(dm(e,n).getTime()-n.getTime())/1e3},QF={end:dm,toSeconds:VT,pattern:fm,parse:WT},ZF=Object.freeze(Object.defineProperty({__proto__:null,default:QF,end:dm,parse:WT,pattern:fm,toSeconds:VT},Symbol.toStringTag,{value:"Module"})),eU=F0(ZF);var tU=qt,rU=Ra,nU=qr.f,dh=tU("unscopables"),ph=Array.prototype;ph[dh]===void 0&&nU(ph,dh,{configurable:!0,value:rU(null)});var pm=function(e){ph[dh][e]=!0},iU=vn,hm=pm,Rb=$u,HT=mn,aU=qr.f,sU=lm,ac=Ql,oU=Wt,KT="Array Iterator",uU=HT.set,cU=HT.getterFor(KT),JT=sU(Array,"Array",function(e,r){uU(this,{type:KT,target:iU(e),index:0,kind:r})},function(){var e=cU(this),r=e.target,t=e.index++;if(!r||t>=r.length)return e.target=void 0,ac(void 0,!0);switch(e.kind){case"keys":return ac(t,!1);case"values":return ac(r[t],!1)}return ac([t,r[t]],!1)},"values"),$b=Rb.Arguments=Rb.Array;hm("keys");hm("values");hm("entries");if(oU&&$b.name!=="values")try{aU($b,"name",{value:"values"})}catch{}var Pb=St,YT=IT,lU=OT,qo=JT,Ib=Vi,fU=pi,dU=qt,Rd=dU("iterator"),$d=qo.values,XT=function(e,r){if(e){if(e[Rd]!==$d)try{Ib(e,Rd,$d)}catch{e[Rd]=$d}if(fU(e,r,!0),YT[r]){for(var t in qo)if(e[t]!==qo[t])try{Ib(e,t,qo[t])}catch{e[t]=qo[t]}}}};for(var Pd in YT)XT(Pb[Pd]&&Pb[Pd].prototype,Pd);XT(lU,"DOMTokenList");var pU=Bt,hU=Jt,Ob=ho,Zl=function(e,r,t){var n,i;return Ob&&pU(n=r.constructor)&&n!==t&&hU(i=n.prototype)&&i!==t.prototype&&Ob(e,i),e},vU=gt,mU=vU(1 .valueOf),gU=`
|
|
8
|
+
</dialog>`,NP='<button class="cobrowse-end js-cobrowse-end">$end</button>';class Pv{constructor(r,t){ct(this,"_cobrowse");ct(this,"_options");ct(this,"_started",!1);this._cobrowse=r,this._options=t}get root(){return this._options.root||document.body}get lang(){return this._options.lang}get messages(){return this._options.messages}get template(){return this._options.template||xP}static async create(r){const t=await LP();t.license=r.license;const n=r.trustedOrigins||[];return n.push(location.origin),t.trustedOrigins=n,["api","capabilities","registration","redactedViews","unredactedViews"].forEach(a=>{r[a]!==void 0&&(t[a]=r[a])}),new Pv(t,r)}setCustomData(r){this._cobrowse.customData=r}on(r,t){this._cobrowse.on(r,t)}async start(){this._started||(await this._cobrowse.client(),await this._cobrowse.start(),this._started=!0,this.setupConfirms(),this.setupSessionControl())}async stop(){await this._cobrowse.stop(),this._started=!1}async endSession(){this._cobrowse.currentSession&&await this._cobrowse.currentSession.end()}async createSessionCode(){return this._cobrowse.currentSession?this._cobrowse.currentSession.code():await this._cobrowse.createSessionCode()}createConfirmConsent(r){return()=>{const t=document.createElement("div");t.className="cobrowse-wrapper",t.lang=this.lang,t.innerHTML=r;const n=()=>{t.parentNode&&t.parentNode.removeChild(t)};return new Promise(i=>{this.root.appendChild(t);const a=t.querySelector(".js-cobrowse-allow");a==null||a.addEventListener("click",()=>{i(!0),n()});const s=t.querySelector(".js-cobrowse-deny");s==null||s.addEventListener("click",()=>{i(!1),n()})})}}setupConfirms(){this._cobrowse.confirmSession=this.createConfirmConsent(Wu(this._options.confirmSessionTemplate||this.template,{title:this.messages.confirmSessionTitle,content:this.messages.confirmSessionContent,allow:this.messages.allowText,deny:this.messages.denyText})),this._cobrowse.confirmRemoteControl=this.createConfirmConsent(Wu(this._options.confirmRemoteControlTemplate||this.template,{title:this.messages.confirmRemoteControlTitle,content:this.messages.confirmRemoteControlContent,allow:this.messages.allowText,deny:this.messages.denyText})),this._cobrowse.confirmFullDevice=this.createConfirmConsent(Wu(this._options.confirmFullDeviceTemplate||this.template,{title:this.messages.confirmFullDeviceTitle,content:this.messages.confirmFullDeviceContent,allow:this.messages.allowText,deny:this.messages.denyText}))}setupSessionControl(){const r=this._options.sessionControlsTemplate||NP,t=document.createElement("div");t.className="cobrowse-end-wrapper",t.setAttribute("lang",this.lang),t.innerHTML=Wu(r,{end:this.messages.endSessionText});const n=()=>{this.endSession()};this._cobrowse.showSessionControls=()=>{if(!this.root.contains(t)){const i=t.querySelector(".js-cobrowse-end");i&&i.addEventListener("click",n),this.root.appendChild(t)}},this._cobrowse.hideSessionControls=()=>{if(this.root.contains(t)){const i=t.querySelector(".js-cobrowse-end");i&&i.removeEventListener("click",n),this.root.removeChild(t)}}}}function LP(){return window.CobrowseIO?window.CobrowseIO:new Promise(e=>{const r=document.createElement("script");r.src="https://js.cobrowse.io/CobrowseIO.js",r.async=!0;const t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(r,t),r.onload=function(){e(window.CobrowseIO)}})}function Wu(e,r){let t=e;return Object.keys(r).forEach(n=>{const i=new RegExp("\\$"+n,"g");t=t.replace(i,r[n])}),t}const DP={confirmSessionTitle:"Co-browse Session Request",confirmSessionContent:"Do you want to share your current screen with the agent?",endSessionText:"End Co-browse Session",confirmRemoteControlTitle:"Remote Access Request",confirmRemoteControlContent:"The agent would like to have access to your currently shared screen to further assist you. Do you want to allow this?",confirmFullDeviceTitle:"Screen Share Request",confirmFullDeviceContent:"Do you want to share your full screen with the agent? The agent will not be able to control anything on the screen.",allowText:"Allow",denyText:"Deny"},jP={confirmSessionTitle:"Solicitud de sesión de conavegación",confirmSessionContent:"¿Desea compartir su pantalla actual con el agente?",endSessionText:"Fin de la sesión de conavegación",confirmRemoteControlTitle:"Solicitud de acceso remoto",confirmRemoteControlContent:"El agente desea tener acceso a su pantalla actual compartida para seguir asistiéndole. ¿Desea permitirlo?",confirmFullDeviceTitle:"Solicitud de compartir pantalla",confirmFullDeviceContent:"¿Desea compartir su pantalla completa con el agente? El agente no podrá controlar nada de la pantalla.",allowText:"Permitir",denyText:"Denegar"},FP={confirmSessionTitle:"Demande de session de co-navigation",confirmSessionContent:"Voulez-vous partager votre écran actuel avec l'agent ?",endSessionText:"Terminer la session de co-navigation",confirmRemoteControlTitle:"Demande d'accès à distance",confirmRemoteControlContent:"L'agent souhaite avoir accès à l'écran que vous partagez actuellement pour mieux vous aider. Voulez-vous l'y autoriser ?",confirmFullDeviceTitle:"Demande de partage d'écran",confirmFullDeviceContent:"Voulez-vous partager votre écran complet avec l'agent ? L'agent ne sera pas en mesure de contrôler quoi que ce soit sur l'écran.",allowText:"Autoriser",denyText:"Refuser"},UP={confirmSessionTitle:"Co-Browsing-Sitzungsanfrage",confirmSessionContent:"Möchten Sie Ihren aktuellen Bildschirm für den Agenten freigeben?",endSessionText:"Co-Browsing-Sitzung beenden",confirmRemoteControlTitle:"Fernzugriff-Anfrage",confirmRemoteControlContent:"Der Agent möchte Zugriff auf Ihren aktuell freigegebenen Bildschirm erhalten, um Ihnen weiterhelfen zu können. Möchten Sie dies erlauben?",confirmFullDeviceTitle:"Bildschirmfreigabe",confirmFullDeviceContent:"Möchten Sie Ihren gesamten Bildschirm für den Agenten freigeben? Der Agent ist dadurch nicht in der Lage, Elemente auf Ihrem Bildschirm zu steuern.",allowText:"Erlauben",denyText:"Verweigern"},BP={confirmSessionTitle:"共同ブラウジングセッションリクエスト",confirmSessionContent:"現在の画面を担当者と共有したいですか。",endSessionText:"共同ブラウジングセッションを終了",confirmRemoteControlTitle:"リモートアクセスリクエスト",confirmRemoteControlContent:"担当者は、お客様をさらにお手伝いするために、現在共有中の画面へのアクセスを希望しています。許可しますか。",confirmFullDeviceTitle:"画面共有リクエスト",confirmFullDeviceContent:"画面全体を担当者と共有したいですか。担当者は画面上で一切の操作ができません。",allowText:"許可",denyText:"拒否"},qP={confirmSessionTitle:"코브라우징 세션 요청",confirmSessionContent:"현재 화면을 상담원과 공유하시겠습니까?",endSessionText:"코브라우징 세션 종료",confirmRemoteControlTitle:"원격 액세스 요청",confirmRemoteControlContent:"상담원이 추가 지원을 위해 현재 공유된 화면에 액세스할 수 있기를 원합니다. 허용하시겠습니까?",confirmFullDeviceTitle:"화면 공유 요청",confirmFullDeviceContent:"상담원과 전체 화면을 공유하시겠습니까? 상담원은 화면의 어떤 부분도 제어할 수 없습니다.",allowText:"허용",denyText:"거절"},zP={confirmSessionTitle:"Richiesta di sessione di co-browsing",confirmSessionContent:"Vuoi condividere la tua schermata attuale con l'operatore?",endSessionText:"Termina sessione di co-browsing",confirmRemoteControlTitle:"Richiesta di accesso remoto",confirmRemoteControlContent:"L'operatore vorrebbe accedere alla tua schermata attualmente condivisa per assisterti al meglio. Acconsenti?",confirmFullDeviceTitle:"Richiesta di condivisione schermo",confirmFullDeviceContent:"Vuoi condividere il tuo intero schermo con l'operatore? L'operatore non potrà controllare nessun elemento sullo schermo.",allowText:"Consenti",denyText:"Rifiuta"},GP={confirmSessionTitle:"同步浏览会话请求",confirmSessionContent:"您是否要向该客服代表共享当前的屏幕?",endSessionText:"结束同步浏览会话",confirmRemoteControlTitle:"远程访问请求",confirmRemoteControlContent:"为了进一步协助您,客服代表想访问您当前的共享屏幕。您是否允许这样做?",confirmFullDeviceTitle:"屏幕共享请求",confirmFullDeviceContent:"您是否要向该客服代表共享全屏?客服代表将不能控制屏幕上的任何东西。",allowText:"允许",denyText:"拒绝"},WP={confirmSessionTitle:"Samwebbläsningssession har begärts",confirmSessionContent:"Vill du dela din aktuella skärm med vår medarbetare?",endSessionText:"Avsluta samwebbläsningssession",confirmRemoteControlTitle:"Begäran om fjärråtkomst",confirmRemoteControlContent:"Vår medarbetare skulle vilja få åtkomst till skärmen som du delar just nu för att kunna hjälpa dig vidare. Vill du tillåta detta?",confirmFullDeviceTitle:"Begäran om skärmdelning",confirmFullDeviceContent:"Vill du dela hela skärmen med medarbetaren? Medarbetaren kommer inte kunna kontrollera något på skärmen.",allowText:"Tillåt",denyText:"Neka"},VP={confirmSessionTitle:"Solicitação de Sessão de Co-navegação",confirmSessionContent:"Deseja partilhar o seu ecrã atual com o agente?",endSessionText:"Terminar Sessão de Co-navegação",confirmRemoteControlTitle:"Solicitação de Acesso Remoto",confirmRemoteControlContent:"O agente gostaria de ter acesso ao seu ecrã partilhado atualmente para ajudá-lo ainda mais. Quer permitir isto?",confirmFullDeviceTitle:"Solicitação de Partilha de Ecrã",confirmFullDeviceContent:"Deseja partilhar o seu ecrã inteiro com o agente? O agente não poderá controlar nada no ecrã.",allowText:"Permitir",denyText:"Negar"},HP={confirmSessionTitle:"Pyyntö yhteisselausistunnosta",confirmSessionContent:"Haluatko jakaa nykyisen näyttösi edustajan kanssa?",endSessionText:"Lopeta yhteisselausistunto",confirmRemoteControlTitle:"Etäkäyttöpyyntö",confirmRemoteControlContent:"Edustaja haluaisi saada käyttää tällä hetkellä jakamaasi näyttöä voidakseen auttaa sinua enemmän. Haluatko antaa siihen luvan?",confirmFullDeviceTitle:"Näytön jakamispyyntö",confirmFullDeviceContent:"Haluatko jakaa koko näyttösi edustajan kanssa? Edustaja ei pysty käyttämään mitään näytöllä olevaa.",allowText:"Salli",denyText:"Estä"},KP={confirmSessionTitle:"Samlesingsøkten er startet",confirmSessionContent:"Vil du dele skjermen din med agenten?",endSessionText:"Avslutt samlesingsøkt",confirmRemoteControlTitle:"Forespørsel om fjerntilgang",confirmRemoteControlContent:"Agenten vil ha tilgang til skjermen din for å kunne hjelpe deg videre. Vil du tillate dette?",confirmFullDeviceTitle:"Forespørsel om skjermdeling",confirmFullDeviceContent:"Vil du dele hele skjermen din med agenten? Agenten kan ikke kontrollere noe på skjermen.",allowText:"Tillat",denyText:"Avvis"},JP={confirmSessionTitle:"Forespørgsel om sambrowsingsession",confirmSessionContent:"Vil du dele din nuværende skærm med agenten",endSessionText:"Afslut sambrowsingsession",confirmRemoteControlTitle:"Anmodning om fjernadgang",confirmRemoteControlContent:"Agenten vil gerne have adgang til din nuværende delte skærm for at kunne hjælpe dig yderligere. Ønsker du at tillade dette?",confirmFullDeviceTitle:"Forespørgsel om skærmdeling",confirmFullDeviceContent:"Vil du dele din fulde skærm med agenten? Agenten vil ikke kunne styre noget på skærmen",allowText:"Tillad",denyText:"Afvis"},YP={confirmSessionTitle:"Verzoek om cobrowse-sessie",confirmSessionContent:"Wilt u uw huidige scherm delen met de agent?",endSessionText:"Cobrowse-sessie beëindigen",confirmRemoteControlTitle:"Verzoek om toegang op afstand",confirmRemoteControlContent:"De agent wil graag toegang hebben tot uw momenteel gedeelde scherm om u verder te helpen. Wilt u dit toestaan?",confirmFullDeviceTitle:"Verzoek om scherm te delen",confirmFullDeviceContent:"Wilt u uw volledige scherm delen met de agent? De agent kan niets op het scherm bedienen.",allowText:"Toestaan",denyText:"Weigeren"},XP={confirmSessionTitle:"Oturum İsteğini Eş Zamanlı Tara",confirmSessionContent:"Mevcut ekranınızı temsilciyle paylaşmak ister misiniz?",endSessionText:"Eş zamanlı Oturum Taramayı Sonlandır",confirmRemoteControlTitle:"Uzaktan Erişim İsteği",confirmRemoteControlContent:"Temsilci şu anda paylaşılan ekranınıza size daha fazla yardımcı olabilmek için erişim sağlamak istiyor. Buna izin vermek istiyor musunuz?",confirmFullDeviceTitle:"Ekran Paylaşım İsteği",confirmFullDeviceContent:"Temsilciyle tam ekranınızı paylaşmak istiyor musunuz? Temsilci ekrandaki hiçbir şeyi kontrol edemez.",allowText:"İzin Ver",denyText:"Reddet"},QP={confirmSessionTitle:"Yêu cầu phiên cùng duyệt",confirmSessionContent:"Bạn có muốn chia sẻ màn hình hiện tại của mình với chuyên viên không?",endSessionText:"Kết thúc phiên cùng duyệt",confirmRemoteControlTitle:"Yêu cầu truy cập từ xa",confirmRemoteControlContent:"Chuyên viên muốn được cấp quyền truy cập vào màn hình bạn đang chia sẻ để hỗ trợ bạn nhiều hơn. Bạn có muốn cho phép không?",confirmFullDeviceTitle:"Yêu cầu chia sẻ màn hình",confirmFullDeviceContent:"Bạn có muốn chia sẻ toàn bộ màn hình của mình với chuyên viên không? Chuyên viên sẽ không thể điều khiển bất cứ phần nào trên màn hình.",allowText:"Cho phép",denyText:"Từ chối"},ZP={confirmSessionTitle:"ขอเซสชันเรียกดูร่วม",confirmSessionContent:"คุณต้องการแชร์หน้าจอปัจจุบันกับตัวแทนหรือไม่",endSessionText:"สิ้นสุดเซสชันเรียกดูร่วม",confirmRemoteControlTitle:"ขอการเข้าถึงระยะไกล",confirmRemoteControlContent:"ตัวแทนต้องการเข้าถึงหน้าจอของคุณที่แชร์อยู่ในปัจจุบันเพื่อให้ความช่วยเหลือคุณต่อไป คุณจะอนุญาตหรือไม่",confirmFullDeviceTitle:"ขอแชร์หน้าจอ",confirmFullDeviceContent:"คุณต้องการแชร์ทั้งหน้าของคุณกับตัวแทนหรือไม่ ตัวแทนจะไม่สามารถควบคุมอะไรบนหน้าจอ",allowText:"ยินยอม",denyText:"ปฏิเสธ"},eI={confirmSessionTitle:"طلب جلسة تصفح مشترك",confirmSessionContent:"هل تريد مشاركة شاشتك الحالية مع الموظف؟",endSessionText:"إنهاء جلسة التصفح المشترك",confirmRemoteControlTitle:"طلب التحكم عن بعد",confirmRemoteControlContent:"يرغب مسئول الدعم في رؤية شاشتك المشاركة حالياً لمساعدتك بشكلٍ أكبر. هل تسمح بذلك؟",confirmFullDeviceTitle:"طلب مشاركة الشاشة",confirmFullDeviceContent:"هل تريد مشاركة شاشتك الكاملة مع مسئول الدعم؟ لن يتمكن المسئول من التحكم في أي شيء على الشاشة.",allowText:"السماح",denyText:"الرفض"},tI={confirmSessionTitle:"Žádost o relaci Co-browse",confirmSessionContent:"Chcete svou současnou obrazovku sdílet s agentem?",endSessionText:"Ukončit relaci Co-browse",confirmRemoteControlTitle:"Žádost o vzdálený přístup",confirmRemoteControlContent:"Agent by rád získal přístup k vaší stávající sdílené obrazovce, aby vám mohl dál pomoci. Chcete mu přístup povolit?",confirmFullDeviceTitle:"Žádost o sdílení obrazovky",confirmFullDeviceContent:"Chcete svou celou obrazovku sdílet s agentem? Agent nebude moci ovládat nic, co na obrazovce je.",allowText:"Povolit",denyText:"Zamítnout"},rI={confirmSessionTitle:"Prośba o sesję Co-browse",confirmSessionContent:"Czy chcesz udostępnić konsultantowi swój bieżący ekran?",endSessionText:"Zakończ sesję Co-browse",confirmRemoteControlTitle:"Prośba o zdalny dostęp",confirmRemoteControlContent:"Konsultant prosi o dostęp do Twojego aktualnie udostępnionego ekranu, aby udzielić Ci dalszej pomocy. Czy chcesz na to zezwolić?",confirmFullDeviceTitle:"Prośba o udostępnienie ekranu",confirmFullDeviceContent:"Czy chcesz udostępnić konsultantowi swój cały ekran? Konsultant nie będzie mógł kontrolować niczego na ekranie.",allowText:"Zezwól",denyText:"Odmów"},nI={confirmSessionTitle:"Co-browse munkameneti kérés",confirmSessionContent:"Megosztja az aktuális képernyőjét a képviselővel?",endSessionText:"Co-browse munkamenet befejezése",confirmRemoteControlTitle:"Távoli hozzáférési kérés",confirmRemoteControlContent:"A képviselő szeretne hozzáférni a jelenleg megosztott képernyőjéhez, hogy további segítséget nyújthasson. Engedélyezi ezt?",confirmFullDeviceTitle:"Képernyőmegosztási kérelem",confirmFullDeviceContent:"Megosztja a teljes képernyőjét az ügynökkel? Az ügynök semmit sem tud majd irányítani a képernyőn.",allowText:"Engedélyezés",denyText:"Elutasítás"},iI={confirmSessionTitle:"Запрос сеанса совместного просмотра веб-страниц",confirmSessionContent:"Хотите поделиться вашим текущим экраном с представителем?",endSessionText:"Завершить сеанс совместного просмотра веб-страниц",confirmRemoteControlTitle:"Запрос на удаленный доступ",confirmRemoteControlContent:"Представитель хочет получить доступ к вашему текущему экрану, которым вы делитесь, чтобы помочь вам. Хотите разрешить это?",confirmFullDeviceTitle:"Запрос на совместный просмотр экрана",confirmFullDeviceContent:"Хотите поделиться вашим полный экраном с представителем? Агент не сможет выполнять никаких действий на экране.",allowText:"Разрешить",denyText:"Отказать"},aI={confirmSessionTitle:"सह-ब्राउज़ सत्र अनुरोध किया गया",confirmSessionContent:"क्या आप अपनी वर्तमान स्क्रीन को एजेंट के साथ साझा करना चाहते हैं?",endSessionText:"सह-ब्राउज़ सत्र समाप्त करें",confirmRemoteControlTitle:"रिमोट पहुँच का अनुरोध किया गया",confirmRemoteControlContent:"एजेंट आपकी वर्तमान साझा स्क्रीन तक पहुँच प्राप्त करना चाहेगा ताकि वह आपकी और सहायता कर सके। क्या आप इसकी अनुमति देना चाहते हैं?",confirmFullDeviceTitle:"स्क्रीन साझाकरण अनुरोध",confirmFullDeviceContent:"क्या आप अपनी पूरी स्क्रीन एजेंट के साथ साझा करना चाहते हैं? एजेंट स्क्रीन पर कुछ भी नियंत्रित नहीं कर पाएगा।",allowText:"अनुमति दें",denyText:"अस्वीकार करें"},sI={confirmSessionTitle:"Solicitare sesiune de co-navigare",confirmSessionContent:"Doriți să partajați ecranul dumneavoastră curent cu agentul?",endSessionText:"Încheiați sesiunea de co-navigare",confirmRemoteControlTitle:"Cerere de acces la distanță",confirmRemoteControlContent:"Agentul ar dori să aibă acces la ecranul dumneavoastră partajat pentru a vă ajuta în continuare. Doriți să permiteți acest lucru?",confirmFullDeviceTitle:"Cerere de partajare a ecranului",confirmFullDeviceContent:"Doriți să partajați ecranul dumneavoastră complet cu agentul? Agentul nu va putea controla nimic de pe ecran.",allowText:"Permiteți",denyText:"Refuzați"},oI={confirmSessionTitle:"Zahtjev za sesiju zajedničkog pregledavanja",confirmSessionContent:"Želite li podijeliti svoj trenutni zaslon s agentom?",endSessionText:"Završi sesiju zajedničkog pregledavanja",confirmRemoteControlTitle:"Zahtjev za daljinski pristup",confirmRemoteControlContent:"Agent želi imati pristup vašem trenutno dijeljenom zaslonu kako bi Vam dodatno pomogao. Želite li to dopustiti?",confirmFullDeviceTitle:"Zahtjev za dijeljenje zaslona",confirmFullDeviceContent:"Želite li s agentom podijeliti svoj cijeli zaslon? Agent neće moći ništa kontrolirati na ekranu.",allowText:"Dopustiti",denyText:"Odbiti"},uI={confirmSessionTitle:"Запит на сесію спільного перегляду",confirmSessionContent:"Чи Ви хочете поділитись з агентом своїм поточним екраном?",endSessionText:"Завершити сесію спільного перегляду",confirmRemoteControlTitle:"Запит на віддалений доступ",confirmRemoteControlContent:"Агент хоче отримати доступ до Вашого поточного екрану, який переглядається спільно, щоб допомогти Вам. Ви дозволяєте?",confirmFullDeviceTitle:"Запит на спільний перегляд екрану",confirmFullDeviceContent:"Чи Ви хочете поділитись з агентом своїм екраном повністю? Агент не зможе нічого на ньому контролювати.",allowText:"Дозволити",denyText:"Відмовити"},cI={confirmSessionTitle:"Kahilingan sa Co-browse na Sesyon",confirmSessionContent:"Gusto mo bang ibahagi ang iyong kasalukuyang screen sa agent?",endSessionText:"Tapusin ang Co-browse na Sesyon",confirmRemoteControlTitle:"Kahilingan sa Remote Access",confirmRemoteControlContent:"Gusto ng agent na magkaroon ng access sa iyong nakabahaging screen sa kasalukuyan upang mas matulungan ka. Gusto mo bang payagan ito?",confirmFullDeviceTitle:"Kahilingan sa Pagbahagi ng Screen",confirmFullDeviceContent:"Gusto mo bang ibahagi ang buong screen sa agent? Hindi makokontrol ng agent ang kahit ano sa screen.",allowText:"Payagan",denyText:"Tanggihan"},Eo={en:DP,es:jP,"es-MX":{confirmSessionTitle:"Solicitud de Sesión de Co-navegación",confirmSessionContent:"¿Quiere compartir su pantalla actual con el agente?",endSessionText:"Fin de la sesión de co-navegación",confirmRemoteControlContent:"El agente desea tener acceso a su pantalla actualmente compartida para poder ayudarlo. ¿Quiere permitirlo?",confirmFullDeviceTitle:"Petición de pantalla compartida",confirmFullDeviceContent:"¿Quiere compartir su pantalla completa con el agente? El agente no podrá controlar nada en la pantalla."},fr:FP,"fr-CA":{confirmSessionTitle:"Demande de session co-navigation",confirmSessionContent:"Voulez-vous partager votre écran actuel avec l'agent?",endSessionText:"Fin de la session de co-navigation",confirmRemoteControlContent:"L'agent souhaiterait avoir accès à votre écran actuellement partagé pour mieux vous aider. Voulez-vous l'autoriser?",confirmFullDeviceContent:"Voulez-vous partager votre écran complet avec l'agent? L'agent ne sera pas en mesure de contrôler quoi que ce soit sur l'écran."},de:UP,ja:BP,ko:qP,it:zP,zh:GP,"zh-Hant":{confirmSessionTitle:"共同瀏覽工作階段要求",confirmSessionContent:"要與專員分享您目前的畫面嗎?",endSessionText:"結束共同瀏覽工作階段",confirmRemoteControlTitle:"遠端存取要求",confirmRemoteControlContent:"專員想要存取您目前分享的螢幕畫面以進一步協助您。要允許嗎?",confirmFullDeviceTitle:"螢幕畫面分享要求",confirmFullDeviceContent:"要與專員分享全螢幕嗎?專員將無法控制畫面上的任何項目。",allowText:"允許",denyText:"拒絕"},sv:WP,pt:VP,"pt-BR":{confirmSessionContent:"Você deseja compartilhar sua tela atual com o agente?",endSessionText:"Encerrar Sessão de Co-navegação",confirmRemoteControlContent:"O agente gostaria de acessar sua tela atualmente compartilhada para melhor ajudá-lo. Você deseja permitir isso?",confirmFullDeviceTitle:"Solicitação de Compartilhamento de Tela",confirmFullDeviceContent:"Você deseja compartilhar sua tela inteira com o agente? O agente não poderá controlar nada na tela."},fi:HP,nb:KP,da:JP,nl:YP,tr:XP,vi:QP,th:ZP,ar:eI,cs:tI,pl:rI,hu:nI,ru:iI,hi:aI,ro:sI,hr:oI,uk:uI,tl:cI};function lI(e){const r=e.split("-")[0];return Eo[e]?e===r?Eo[e]:{...Eo[r],...Eo[e]}:Eo[r]}let fI=class{constructor(r){ct(this,"VERSION",Tv);ct(this,"options");ct(this,"communicator");ct(this,"methods");ct(this,"events",new kv);ct(this,"request");ct(this,"chat");ct(this,"cobrowse");this.options=r,this.communicator=new aP(r,this.events);const t=this.communicator.request.bind(this.communicator);this.methods=new CP(t),this.request=t,Ar.companyId=r.companyId,r.tenant&&(Ar.tenant=r.tenant)}get deviceId(){return Ar.deviceId}get user(){return this.communicator.user}get lang(){return this.options.lang?this.options.lang:Or.get("lang")||"en"}set lang(r){this.options.lang||Or.set("lang",r)}destroy(){this.communicator.destroy(),this.events.destroy()}on(r,t){this.events.addEventListener(r,t)}off(r,t){this.events.removeEventListener(r,t)}_triggerEvent(r,t){this.events.triggerEvent(r,t)}async getCompany(){const r=await this.methods.getCompany();return Ar.tenant=r.subdomain,r}async runTrigger(r,t){const n=await this.methods.getTriggers(this.options.companyId),i=kP(n,t||this.lang);i&&RP(i,r)}trackClientEvents(r){return this.methods.trackClientEvents(r)}getProhibitedFileTypes(){return this.methods.listFileTypes()}getMenus(r,t){return this.methods.getMenus(t||this.lang,r)}getAfterHourMessage(r){return this.methods.getAfterHourMessage(r||this.lang)}getTimeSlots(r,t){return this.methods.getTimeSlots(r,t||this.lang)}getWaitTimes(r,t){return this.methods.getWaitTimes(r,t||this.lang)}verifyForm(r){return this.methods.verifyForm(r)}createCall(r,t){var n;return!t.email&&((n=this.user)!=null&&n.email)&&(t.email=this.user.email),this.methods.createCall(Number(r),t.lang||this.lang,t)}loadCall(r){return this.methods.fetchCall(r)}cancelCall(r){return this.methods.cancelCall(r)}createEmail(r,t){return this.methods.createEmail(r,t.lang||this.lang,t)}async createChat(r,t={}){var i,a;if(this.chat&&this.chat.ongoing)throw new Error("There is an ongoing chat.");!t.email&&((i=this.user)!=null&&i.email)&&(t.email=this.user.email),t.cobrowsable===void 0&&(t.cobrowsable=!!((a=this.options.cobrowse)!=null&&a.enabled));const n=await this.methods.createChat(Number(r),t.lang||this.lang,t,this.deviceId);return this.registerOngoingChat(n),await n.clearMediaStore(),n}async loadChat(r){const t=await this.methods.loadChat(r,this.deviceId);return t.ongoing?this.registerOngoingChat(t):(Or.del("chat"),Or.del("cobrowse")),t}async resumeChat(r){var t;if(((t=this.chat)==null?void 0:t.id)===Number(r)){const n=await this.methods.patch(`chats/${r}`,{status:"queued"});return this.chat.update(n.data),this.chat}else{const n=await this.methods.resumeChat(r,this.deviceId);return this.registerOngoingChat(n),n}}async loadOngoingChat(){const r=Or.get("chat");if(r){const t=await this.loadChat(r);if(t.ongoing)return t;Or.del("chat")}}async finishChat(){if(this.chat){this.chat.connected&&await this.chat.disconnect();const r=await this.methods.finishChat(this.chat.id);this.chat.update(r)}}async destroyChat(){this.chat&&(this.chat.ongoing&&await this.finishChat(),await this.chat.destroy(),this.chat=null,Ar.trackerId="")}getChatDeflection(){return this.methods.getChatDeflection(this.chat.id)}sendChatTranscripts(r){return this.methods.sendChatTranscripts(this.chat.id,r)}async downloadChatTranscript(){return await this.methods.downloadChatTranscript(this.chat.id)}async getPdfStatus(r){return await this.methods.getPdfStatus(r)}getChatSurvey(){return this.methods.getChatSurvey(this.chat.id)}sendChatSurvey(r){if(this.chat.feedbackType!=="survey")throw new Error("Chat feedback type is: "+this.chat.feedbackType);return this.methods.sendChatSurvey(this.chat.id,r)}sendChatRate(r){if(this.chat.feedbackType!=="rate")throw new Error("Chat feedback type is: "+this.chat.feedbackType);return this.methods.rateChat(this.chat.id,r)}escalateChat(r){return this.methods.escalateChat(this.chat.id,r)}trackChatEscalation(r,t){return this.methods.trackEscalation(this.chat.id,r,t)}trackChatEndUserEvent(r){var t;return!r.end_user_name&&((t=this.user)!=null&&t.name)&&(r.end_user_name=this.user.name),this.methods.trackChatEndUserEvent(this.chat.id,r)}getChatHistory(r=1){return this.methods.getChatHistory(r)}async fetchMessages(){const r=await this.chat.fetchMessages();if(r.filter(t=>t.type==="server_message").length>0){const t=await this.methods.listChatTaskMessages(this.chat.id);return oP(r,t)}return r}async sendFileMessage(r){const t=await this.methods.uploadChatFile(this.chat.id,r);return this.chat.sendMessage(t,r)}async sendTextMessage(r){let t;return this.chat.inTask?t={type:"server_message",visibility:"task_virtual_agent",message_id:(await this.methods.sendChatTaskMessage(this.chat.id,r)).id}:t={type:"text",content:r},this.chat.sendMessage(t)}async createCobrowseCode(r,t){var a;await this.initializeCobrowse(r||this.lang);let n=Or.get("cobrowse");n||(n=Date.now().toString(),Or.set("cobrowse",n));const i={device_id:this.deviceId,device_name:`${Ar.application} / ${Ar.version}`,nonce:n,...t};return(a=this.user)!=null&&a.name&&(i.user_name=this.user.name),this.cobrowse.setCustomData(i),this.cobrowse.createSessionCode()}async startCobrowse(r="end_user"){if(!this.chat.cobrowsable)throw new Error(`Chat ${this.chat.id} does not support cobrowse.`);const t={chatId:`chat_${this.chat.id}`},n=await this.createCobrowseCode(this.chat.lang,t);if(n){const i=Or.get("cobrowse");await this.methods.requestChatCobrowse(this.chat.id,{code:n,from:r,nonce:i})}}async initializeCobrowse(r){if(!this.cobrowse){const t=this.options.cobrowse.messages||lI(r),n={...this.options.cobrowse,messages:t,lang:r};this.cobrowse=await Pv.create(n),this.cobrowse.start(),["loaded","updated","ended"].forEach(a=>{this.cobrowse.on(`session.${a}`,s=>{this.events.triggerEvent(`cobrowse.${a}`,s)})})}}registerOngoingChat(r){this.events.triggerEvent("chat.ongoing",r),r._setGlobalEvents(this.events,this.methods.getChatTaskMessage.bind(this.methods)),r.on("_requestCobrowse",t=>{t==="agent"?this.startCobrowse(t):this.initializeCobrowse(r.lang),this.events.triggerEvent("cobrowse.request",{from:t})}),r.on("disconnected",()=>{Or.del("chat"),Or.del("cobrowse")}),this.chat=r,Ar.trackerId=`chat_${r.id}`,Or.set("chat",r.id.toString()),r.cobrowsable&&Or.get("cobrowse")&&this.initializeCobrowse(r.lang)}};var xe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Iv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function F0(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function n(){return this instanceof n?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),t}var U0={},ko=function(e){return e&&e.Math===Math&&e},St=ko(typeof globalThis=="object"&&globalThis)||ko(typeof window=="object"&&window)||ko(typeof self=="object"&&self)||ko(typeof xe=="object"&&xe)||ko(typeof xe=="object"&&xe)||function(){return this}()||Function("return this")(),Gi={},dt=function(e){try{return!!e()}catch{return!0}},dI=dt,Wt=!dI(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),pI=dt,fu=!pI(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),hI=fu,Vu=Function.prototype.call,Ut=hI?Vu.bind(Vu):function(){return Vu.apply(Vu,arguments)},du={},B0={}.propertyIsEnumerable,q0=Object.getOwnPropertyDescriptor,vI=q0&&!B0.call({1:2},1);du.f=vI?function(r){var t=q0(this,r);return!!t&&t.enumerable}:B0;var is=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}},z0=fu,G0=Function.prototype,zp=G0.call,mI=z0&&G0.bind.bind(zp,zp),gt=z0?mI:function(e){return function(){return zp.apply(e,arguments)}},W0=gt,gI=W0({}.toString),yI=W0("".slice),fi=function(e){return yI(gI(e),8,-1)},bI=gt,_I=dt,wI=fi,qf=Object,SI=bI("".split),pu=_I(function(){return!qf("z").propertyIsEnumerable(0)})?function(e){return wI(e)==="String"?SI(e,""):qf(e)}:qf,Kn=function(e){return e==null},CI=Kn,TI=TypeError,Jn=function(e){if(CI(e))throw new TI("Can't call method on "+e);return e},EI=pu,kI=Jn,vn=function(e){return EI(kI(e))},zf=typeof document=="object"&&document.all,Bt=typeof zf>"u"&&zf!==void 0?function(e){return typeof e=="function"||e===zf}:function(e){return typeof e=="function"},RI=Bt,Jt=function(e){return typeof e=="object"?e!==null:RI(e)},Gf=St,$I=Bt,PI=function(e){return $I(e)?e:void 0},Yn=function(e,r){return arguments.length<2?PI(Gf[e]):Gf[e]&&Gf[e][r]},II=gt,Wi=II({}.isPrototypeOf),as=typeof navigator<"u"&&String(navigator.userAgent)||"",V0=St,Wf=as,Lg=V0.process,Dg=V0.Deno,jg=Lg&&Lg.versions||Dg&&Dg.version,Fg=jg&&jg.v8,zn,fl;Fg&&(zn=Fg.split("."),fl=zn[0]>0&&zn[0]<4?1:+(zn[0]+zn[1]));!fl&&Wf&&(zn=Wf.match(/Edge\/(\d+)/),(!zn||zn[1]>=74)&&(zn=Wf.match(/Chrome\/(\d+)/),zn&&(fl=+zn[1])));var uo=fl,Ug=uo,OI=dt,AI=St,MI=AI.String,co=!!Object.getOwnPropertySymbols&&!OI(function(){var e=Symbol("symbol detection");return!MI(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ug&&Ug<41}),xI=co,H0=xI&&!Symbol.sham&&typeof Symbol.iterator=="symbol",NI=Yn,LI=Bt,DI=Wi,jI=H0,FI=Object,lo=jI?function(e){return typeof e=="symbol"}:function(e){var r=NI("Symbol");return LI(r)&&DI(r.prototype,FI(e))},UI=String,ss=function(e){try{return UI(e)}catch{return"Object"}},BI=Bt,qI=ss,zI=TypeError,An=function(e){if(BI(e))return e;throw new zI(qI(e)+" is not a function")},GI=An,WI=Kn,os=function(e,r){var t=e[r];return WI(t)?void 0:GI(t)},Vf=Ut,Hf=Bt,Kf=Jt,VI=TypeError,HI=function(e,r){var t,n;if(r==="string"&&Hf(t=e.toString)&&!Kf(n=Vf(t,e))||Hf(t=e.valueOf)&&!Kf(n=Vf(t,e))||r!=="string"&&Hf(t=e.toString)&&!Kf(n=Vf(t,e)))return n;throw new VI("Can't convert object to primitive value")},K0={exports:{}},J0=!1,Bg=St,KI=Object.defineProperty,Ov=function(e,r){try{KI(Bg,e,{value:r,configurable:!0,writable:!0})}catch{Bg[e]=r}return r},JI=St,YI=Ov,qg="__core-js_shared__",zg=K0.exports=JI[qg]||YI(qg,{});(zg.versions||(zg.versions=[])).push({version:"3.37.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Av=K0.exports,Gg=Av,fo=function(e,r){return Gg[e]||(Gg[e]=r||{})},XI=Jn,QI=Object,Nr=function(e){return QI(XI(e))},ZI=gt,eO=Nr,tO=ZI({}.hasOwnProperty),tr=Object.hasOwn||function(r,t){return tO(eO(r),t)},rO=gt,nO=0,iO=Math.random(),aO=rO(1 .toString),hu=function(e){return"Symbol("+(e===void 0?"":e)+")_"+aO(++nO+iO,36)},sO=St,oO=fo,Wg=tr,uO=hu,cO=co,lO=H0,Ms=sO.Symbol,Jf=oO("wks"),fO=lO?Ms.for||Ms:Ms&&Ms.withoutSetter||uO,qt=function(e){return Wg(Jf,e)||(Jf[e]=cO&&Wg(Ms,e)?Ms[e]:fO("Symbol."+e)),Jf[e]},dO=Ut,Vg=Jt,Hg=lo,pO=os,hO=HI,vO=qt,mO=TypeError,gO=vO("toPrimitive"),Mv=function(e,r){if(!Vg(e)||Hg(e))return e;var t=pO(e,gO),n;if(t){if(r===void 0&&(r="default"),n=dO(t,e,r),!Vg(n)||Hg(n))return n;throw new mO("Can't convert object to primitive value")}return r===void 0&&(r="number"),hO(e,r)},yO=Mv,bO=lo,xl=function(e){var r=yO(e,"string");return bO(r)?r:r+""},_O=St,Kg=Jt,Gp=_O.document,wO=Kg(Gp)&&Kg(Gp.createElement),Nl=function(e){return wO?Gp.createElement(e):{}},SO=Wt,CO=dt,TO=Nl,Y0=!SO&&!CO(function(){return Object.defineProperty(TO("div"),"a",{get:function(){return 7}}).a!==7}),EO=Wt,kO=Ut,RO=du,$O=is,PO=vn,IO=xl,OO=tr,AO=Y0,Jg=Object.getOwnPropertyDescriptor;Gi.f=EO?Jg:function(r,t){if(r=PO(r),t=IO(t),AO)try{return Jg(r,t)}catch{}if(OO(r,t))return $O(!kO(RO.f,r,t),r[t])};var qr={},MO=Wt,xO=dt,X0=MO&&xO(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),NO=Jt,LO=String,DO=TypeError,sr=function(e){if(NO(e))return e;throw new DO(LO(e)+" is not an object")},jO=Wt,FO=Y0,UO=X0,Hu=sr,Yg=xl,BO=TypeError,Yf=Object.defineProperty,qO=Object.getOwnPropertyDescriptor,Xf="enumerable",Qf="configurable",Zf="writable";qr.f=jO?UO?function(r,t,n){if(Hu(r),t=Yg(t),Hu(n),typeof r=="function"&&t==="prototype"&&"value"in n&&Zf in n&&!n[Zf]){var i=qO(r,t);i&&i[Zf]&&(r[t]=n.value,n={configurable:Qf in n?n[Qf]:i[Qf],enumerable:Xf in n?n[Xf]:i[Xf],writable:!1})}return Yf(r,t,n)}:Yf:function(r,t,n){if(Hu(r),t=Yg(t),Hu(n),FO)try{return Yf(r,t,n)}catch{}if("get"in n||"set"in n)throw new BO("Accessors not supported");return"value"in n&&(r[t]=n.value),r};var zO=Wt,GO=qr,WO=is,Vi=zO?function(e,r,t){return GO.f(e,r,WO(1,t))}:function(e,r,t){return e[r]=t,e},Q0={exports:{}},Wp=Wt,VO=tr,Z0=Function.prototype,HO=Wp&&Object.getOwnPropertyDescriptor,xv=VO(Z0,"name"),KO=xv&&(function(){}).name==="something",JO=xv&&(!Wp||Wp&&HO(Z0,"name").configurable),vu={EXISTS:xv,PROPER:KO,CONFIGURABLE:JO},YO=gt,XO=Bt,Vp=Av,QO=YO(Function.toString);XO(Vp.inspectSource)||(Vp.inspectSource=function(e){return QO(e)});var Nv=Vp.inspectSource,ZO=St,eA=Bt,Xg=ZO.WeakMap,tA=eA(Xg)&&/native code/.test(String(Xg)),rA=fo,nA=hu,Qg=rA("keys"),Ll=function(e){return Qg[e]||(Qg[e]=nA(e))},mu={},iA=tA,eC=St,aA=Jt,sA=Vi,ed=tr,td=Av,oA=Ll,uA=mu,Zg="Object already initialized",Hp=eC.TypeError,cA=eC.WeakMap,dl,nu,pl,lA=function(e){return pl(e)?nu(e):dl(e,{})},fA=function(e){return function(r){var t;if(!aA(r)||(t=nu(r)).type!==e)throw new Hp("Incompatible receiver, "+e+" required");return t}};if(iA||td.state){var ri=td.state||(td.state=new cA);ri.get=ri.get,ri.has=ri.has,ri.set=ri.set,dl=function(e,r){if(ri.has(e))throw new Hp(Zg);return r.facade=e,ri.set(e,r),r},nu=function(e){return ri.get(e)||{}},pl=function(e){return ri.has(e)}}else{var bs=oA("state");uA[bs]=!0,dl=function(e,r){if(ed(e,bs))throw new Hp(Zg);return r.facade=e,sA(e,bs,r),r},nu=function(e){return ed(e,bs)?e[bs]:{}},pl=function(e){return ed(e,bs)}}var mn={set:dl,get:nu,has:pl,enforce:lA,getterFor:fA},Lv=gt,dA=dt,pA=Bt,Ku=tr,Kp=Wt,hA=vu.CONFIGURABLE,vA=Nv,tC=mn,mA=tC.enforce,gA=tC.get,ey=String,Qc=Object.defineProperty,yA=Lv("".slice),bA=Lv("".replace),_A=Lv([].join),wA=Kp&&!dA(function(){return Qc(function(){},"length",{value:8}).length!==8}),SA=String(String).split("String"),CA=Q0.exports=function(e,r,t){yA(ey(r),0,7)==="Symbol("&&(r="["+bA(ey(r),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),t&&t.getter&&(r="get "+r),t&&t.setter&&(r="set "+r),(!Ku(e,"name")||hA&&e.name!==r)&&(Kp?Qc(e,"name",{value:r,configurable:!0}):e.name=r),wA&&t&&Ku(t,"arity")&&e.length!==t.arity&&Qc(e,"length",{value:t.arity});try{t&&Ku(t,"constructor")&&t.constructor?Kp&&Qc(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch{}var n=mA(e);return Ku(n,"source")||(n.source=_A(SA,typeof r=="string"?r:"")),e};Function.prototype.toString=CA(function(){return pA(this)&&gA(this).source||vA(this)},"toString");var rC=Q0.exports,TA=Bt,EA=qr,kA=rC,RA=Ov,zr=function(e,r,t,n){n||(n={});var i=n.enumerable,a=n.name!==void 0?n.name:r;if(TA(t)&&kA(t,a,n),n.global)i?e[r]=t:RA(r,t);else{try{n.unsafe?e[r]&&(i=!0):delete e[r]}catch{}i?e[r]=t:EA.f(e,r,{value:t,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},us={},$A=Math.ceil,PA=Math.floor,IA=Math.trunc||function(r){var t=+r;return(t>0?PA:$A)(t)},OA=IA,di=function(e){var r=+e;return r!==r||r===0?0:OA(r)},AA=di,MA=Math.max,xA=Math.min,po=function(e,r){var t=AA(e);return t<0?MA(t+r,0):xA(t,r)},NA=di,LA=Math.min,Hi=function(e){var r=NA(e);return r>0?LA(r,9007199254740991):0},DA=Hi,Lr=function(e){return DA(e.length)},jA=vn,FA=po,UA=Lr,ty=function(e){return function(r,t,n){var i=jA(r),a=UA(i);if(a===0)return!e&&-1;var s=FA(n,a),c;if(e&&t!==t){for(;a>s;)if(c=i[s++],c!==c)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===t)return e||s||0;return!e&&-1}},Dl={includes:ty(!0),indexOf:ty(!1)},BA=gt,rd=tr,qA=vn,zA=Dl.indexOf,GA=mu,ry=BA([].push),nC=function(e,r){var t=qA(e),n=0,i=[],a;for(a in t)!rd(GA,a)&&rd(t,a)&&ry(i,a);for(;r.length>n;)rd(t,a=r[n++])&&(~zA(i,a)||ry(i,a));return i},Dv=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],WA=nC,VA=Dv,HA=VA.concat("length","prototype");us.f=Object.getOwnPropertyNames||function(r){return WA(r,HA)};var gu={};gu.f=Object.getOwnPropertySymbols;var KA=Yn,JA=gt,YA=us,XA=gu,QA=sr,ZA=JA([].concat),iC=KA("Reflect","ownKeys")||function(r){var t=YA.f(QA(r)),n=XA.f;return n?ZA(t,n(r)):t},ny=tr,eM=iC,tM=Gi,rM=qr,jv=function(e,r,t){for(var n=eM(r),i=rM.f,a=tM.f,s=0;s<n.length;s++){var c=n[s];!ny(e,c)&&!(t&&ny(t,c))&&i(e,c,a(r,c))}},nM=dt,iM=Bt,aM=/#|\.prototype\./,yu=function(e,r){var t=oM[sM(e)];return t===cM?!0:t===uM?!1:iM(r)?nM(r):!!r},sM=yu.normalize=function(e){return String(e).replace(aM,".").toLowerCase()},oM=yu.data={},uM=yu.NATIVE="N",cM=yu.POLYFILL="P",jl=yu,Ju=St,lM=Gi.f,fM=Vi,dM=zr,pM=Ov,hM=jv,vM=jl,bt=function(e,r){var t=e.target,n=e.global,i=e.stat,a,s,c,o,u,l;if(n?s=Ju:i?s=Ju[t]||pM(t,{}):s=Ju[t]&&Ju[t].prototype,s)for(c in r){if(u=r[c],e.dontCallGetSet?(l=lM(s,c),o=l&&l.value):o=s[c],a=vM(n?c:t+(i?".":"#")+c,e.forced),!a&&o!==void 0){if(typeof u==typeof o)continue;hM(u,o)}(e.sham||o&&o.sham)&&fM(u,"sham",!0),dM(s,c,u,e)}},mM=qr.f,gM=tr,yM=qt,iy=yM("toStringTag"),pi=function(e,r,t){e&&!t&&(e=e.prototype),e&&!gM(e,iy)&&mM(e,iy,{configurable:!0,value:r})},bM=bt,_M=St,wM=pi;bM({global:!0},{Reflect:{}});wM(_M.Reflect,"Reflect",!0);var SM=fu,aC=Function.prototype,ay=aC.apply,sy=aC.call,cs=typeof Reflect=="object"&&Reflect.apply||(SM?sy.bind(ay):function(){return sy.apply(ay,arguments)}),CM=gt,hi=CM([].slice),sC=gt,TM=An,EM=Jt,kM=tr,oy=hi,RM=fu,oC=Function,$M=sC([].concat),PM=sC([].join),nd={},IM=function(e,r,t){if(!kM(nd,r)){for(var n=[],i=0;i<r;i++)n[i]="a["+i+"]";nd[r]=oC("C,a","return new C("+PM(n,",")+")")}return nd[r](e,t)},OM=RM?oC.bind:function(r){var t=TM(this),n=t.prototype,i=oy(arguments,1),a=function(){var c=$M(i,oy(arguments));return this instanceof a?IM(t,c.length,c):t.apply(r,c)};return EM(n)&&(a.prototype=n),a},AM=qt,MM=AM("toStringTag"),uC={};uC[MM]="z";var Fv=String(uC)==="[object z]",xM=Fv,NM=Bt,Zc=fi,LM=qt,DM=LM("toStringTag"),jM=Object,FM=Zc(function(){return arguments}())==="Arguments",UM=function(e,r){try{return e[r]}catch{}},Ki=xM?Zc:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=UM(r=jM(e),DM))=="string"?t:FM?Zc(r):(n=Zc(r))==="Object"&&NM(r.callee)?"Arguments":n},BM=gt,qM=dt,cC=Bt,zM=Ki,GM=Yn,WM=Nv,lC=function(){},fC=GM("Reflect","construct"),Uv=/^\s*(?:class|function)\b/,VM=BM(Uv.exec),HM=!Uv.test(lC),Ro=function(r){if(!cC(r))return!1;try{return fC(lC,[],r),!0}catch{return!1}},dC=function(r){if(!cC(r))return!1;switch(zM(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return HM||!!VM(Uv,WM(r))}catch{return!0}};dC.sham=!0;var Fl=!fC||qM(function(){var e;return Ro(Ro.call)||!Ro(Object)||!Ro(function(){e=!0})||e})?dC:Ro,KM=Fl,JM=ss,YM=TypeError,Bv=function(e){if(KM(e))return e;throw new YM(JM(e)+" is not a constructor")},qv={},XM=nC,QM=Dv,bu=Object.keys||function(r){return XM(r,QM)},ZM=Wt,ex=X0,tx=qr,rx=sr,nx=vn,ix=bu;qv.f=ZM&&!ex?Object.defineProperties:function(r,t){rx(r);for(var n=nx(t),i=ix(t),a=i.length,s=0,c;a>s;)tx.f(r,c=i[s++],n[c]);return r};var ax=Yn,pC=ax("document","documentElement"),sx=sr,ox=qv,uy=Dv,ux=mu,cx=pC,lx=Nl,fx=Ll,cy=">",ly="<",Jp="prototype",Yp="script",hC=fx("IE_PROTO"),id=function(){},vC=function(e){return ly+Yp+cy+e+ly+"/"+Yp+cy},fy=function(e){e.write(vC("")),e.close();var r=e.parentWindow.Object;return e=null,r},dx=function(){var e=lx("iframe"),r="java"+Yp+":",t;return e.style.display="none",cx.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(vC("document.F=Object")),t.close(),t.F},Yu,el=function(){try{Yu=new ActiveXObject("htmlfile")}catch{}el=typeof document<"u"?document.domain&&Yu?fy(Yu):dx():fy(Yu);for(var e=uy.length;e--;)delete el[Jp][uy[e]];return el()};ux[hC]=!0;var Ra=Object.create||function(r,t){var n;return r!==null?(id[Jp]=sx(r),n=new id,id[Jp]=null,n[hC]=r):n=el(),t===void 0?n:ox.f(n,t)},px=bt,hx=Yn,ad=cs,vx=OM,dy=Bv,mx=sr,py=Jt,gx=Ra,mC=dt,zv=hx("Reflect","construct"),yx=Object.prototype,bx=[].push,gC=mC(function(){function e(){}return!(zv(function(){},[],e)instanceof e)}),yC=!mC(function(){zv(function(){})}),hy=gC||yC;px({target:"Reflect",stat:!0,forced:hy,sham:hy},{construct:function(r,t){dy(r),mx(t);var n=arguments.length<3?r:dy(arguments[2]);if(yC&&!gC)return zv(r,t,n);if(r===n){switch(t.length){case 0:return new r;case 1:return new r(t[0]);case 2:return new r(t[0],t[1]);case 3:return new r(t[0],t[1],t[2]);case 4:return new r(t[0],t[1],t[2],t[3])}var i=[null];return ad(bx,i,t),new(ad(vx,r,i))}var a=n.prototype,s=gx(py(a)?a:yx),c=ad(r,s,t);return py(c)?c:s}});var _x=bt,wx=Nr,bC=bu,Sx=dt,Cx=Sx(function(){bC(1)});_x({target:"Object",stat:!0,forced:Cx},{keys:function(r){return bC(wx(r))}});var Tx=Ki,Ex=String,Sr=function(e){if(Tx(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return Ex(e)},Gv={},kx=fi,Rx=vn,_C=us.f,$x=hi,wC=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Px=function(e){try{return _C(e)}catch{return $x(wC)}};Gv.f=function(r){return wC&&kx(r)==="Window"?Px(r):_C(Rx(r))};var vy=rC,Ix=qr,vi=function(e,r,t){return t.get&&vy(t.get,r,{getter:!0}),t.set&&vy(t.set,r,{setter:!0}),Ix.f(e,r,t)},Wv={},Ox=qt;Wv.f=Ox;var Ax=St,SC=Ax,my=SC,Mx=tr,xx=Wv,Nx=qr.f,CC=function(e){var r=my.Symbol||(my.Symbol={});Mx(r,e)||Nx(r,e,{value:xx.f(e)})},Lx=Ut,Dx=Yn,jx=qt,Fx=zr,Ux=function(){var e=Dx("Symbol"),r=e&&e.prototype,t=r&&r.valueOf,n=jx("toPrimitive");r&&!r[n]&&Fx(r,n,function(i){return Lx(t,this)},{arity:1})},Bx=fi,qx=gt,Vv=function(e){if(Bx(e)==="Function")return qx(e)},gy=Vv,zx=An,Gx=fu,Wx=gy(gy.bind),Ji=function(e,r){return zx(e),r===void 0?e:Gx?Wx(e,r):function(){return e.apply(r,arguments)}},Vx=fi,_u=Array.isArray||function(r){return Vx(r)==="Array"},yy=_u,Hx=Fl,Kx=Jt,Jx=qt,Yx=Jx("species"),by=Array,Xx=function(e){var r;return yy(e)&&(r=e.constructor,Hx(r)&&(r===by||yy(r.prototype))?r=void 0:Kx(r)&&(r=r[Yx],r===null&&(r=void 0))),r===void 0?by:r},Qx=Xx,Hv=function(e,r){return new(Qx(e))(r===0?0:r)},Zx=Ji,eN=gt,tN=pu,rN=Nr,nN=Lr,iN=Hv,_y=eN([].push),ca=function(e){var r=e===1,t=e===2,n=e===3,i=e===4,a=e===6,s=e===7,c=e===5||a;return function(o,u,l,f){for(var v=rN(o),m=tN(v),b=nN(m),C=Zx(u,l),$=0,E=f||iN,A=r?E(o,b):t||s?E(o,0):void 0,N,U;b>$;$++)if((c||$ in m)&&(N=m[$],U=C(N,$,v),e))if(r)A[$]=U;else if(U)switch(e){case 3:return!0;case 5:return N;case 6:return $;case 2:_y(A,N)}else switch(e){case 4:return!1;case 7:_y(A,N)}return a?-1:n||i?i:A}},rn={forEach:ca(0),map:ca(1),filter:ca(2),some:ca(3),every:ca(4),find:ca(5),findIndex:ca(6),filterReject:ca(7)},Ul=bt,wu=St,Kv=Ut,aN=gt,Js=Wt,Ys=co,sN=dt,kr=tr,oN=Wi,Xp=sr,Bl=vn,Jv=xl,uN=Sr,Qp=is,Xs=Ra,TC=bu,cN=us,EC=Gv,lN=gu,kC=Gi,RC=qr,fN=qv,$C=du,sd=zr,dN=vi,Yv=fo,pN=Ll,PC=mu,wy=hu,hN=qt,vN=Wv,mN=CC,gN=Ux,yN=pi,IC=mn,ql=rn.forEach,Zr=pN("hidden"),zl="Symbol",iu="prototype",bN=IC.set,Sy=IC.getterFor(zl),In=Object[iu],Ya=wu.Symbol,Bo=Ya&&Ya[iu],_N=wu.RangeError,wN=wu.TypeError,od=wu.QObject,OC=kC.f,Xa=RC.f,AC=EC.f,SN=$C.f,MC=aN([].push),ji=Yv("symbols"),Su=Yv("op-symbols"),CN=Yv("wks"),Zp=!od||!od[iu]||!od[iu].findChild,xC=function(e,r,t){var n=OC(In,r);n&&delete In[r],Xa(e,r,t),n&&e!==In&&Xa(In,r,n)},eh=Js&&sN(function(){return Xs(Xa({},"a",{get:function(){return Xa(this,"a",{value:7}).a}})).a!==7})?xC:Xa,ud=function(e,r){var t=ji[e]=Xs(Bo);return bN(t,{type:zl,tag:e,description:r}),Js||(t.description=r),t},Gl=function(r,t,n){r===In&&Gl(Su,t,n),Xp(r);var i=Jv(t);return Xp(n),kr(ji,i)?(n.enumerable?(kr(r,Zr)&&r[Zr][i]&&(r[Zr][i]=!1),n=Xs(n,{enumerable:Qp(0,!1)})):(kr(r,Zr)||Xa(r,Zr,Qp(1,Xs(null))),r[Zr][i]=!0),eh(r,i,n)):Xa(r,i,n)},Xv=function(r,t){Xp(r);var n=Bl(t),i=TC(n).concat(DC(n));return ql(i,function(a){(!Js||Kv(th,n,a))&&Gl(r,a,n[a])}),r},TN=function(r,t){return t===void 0?Xs(r):Xv(Xs(r),t)},th=function(r){var t=Jv(r),n=Kv(SN,this,t);return this===In&&kr(ji,t)&&!kr(Su,t)?!1:n||!kr(this,t)||!kr(ji,t)||kr(this,Zr)&&this[Zr][t]?n:!0},NC=function(r,t){var n=Bl(r),i=Jv(t);if(!(n===In&&kr(ji,i)&&!kr(Su,i))){var a=OC(n,i);return a&&kr(ji,i)&&!(kr(n,Zr)&&n[Zr][i])&&(a.enumerable=!0),a}},LC=function(r){var t=AC(Bl(r)),n=[];return ql(t,function(i){!kr(ji,i)&&!kr(PC,i)&&MC(n,i)}),n},DC=function(e){var r=e===In,t=AC(r?Su:Bl(e)),n=[];return ql(t,function(i){kr(ji,i)&&(!r||kr(In,i))&&MC(n,ji[i])}),n};Ys||(Ya=function(){if(oN(Bo,this))throw new wN("Symbol is not a constructor");var r=!arguments.length||arguments[0]===void 0?void 0:uN(arguments[0]),t=wy(r),n=function(i){var a=this===void 0?wu:this;a===In&&Kv(n,Su,i),kr(a,Zr)&&kr(a[Zr],t)&&(a[Zr][t]=!1);var s=Qp(1,i);try{eh(a,t,s)}catch(c){if(!(c instanceof _N))throw c;xC(a,t,s)}};return Js&&Zp&&eh(In,t,{configurable:!0,set:n}),ud(t,r)},Bo=Ya[iu],sd(Bo,"toString",function(){return Sy(this).tag}),sd(Ya,"withoutSetter",function(e){return ud(wy(e),e)}),$C.f=th,RC.f=Gl,fN.f=Xv,kC.f=NC,cN.f=EC.f=LC,lN.f=DC,vN.f=function(e){return ud(hN(e),e)},Js&&(dN(Bo,"description",{configurable:!0,get:function(){return Sy(this).description}}),sd(In,"propertyIsEnumerable",th,{unsafe:!0})));Ul({global:!0,constructor:!0,wrap:!0,forced:!Ys,sham:!Ys},{Symbol:Ya});ql(TC(CN),function(e){mN(e)});Ul({target:zl,stat:!0,forced:!Ys},{useSetter:function(){Zp=!0},useSimple:function(){Zp=!1}});Ul({target:"Object",stat:!0,forced:!Ys,sham:!Js},{create:TN,defineProperty:Gl,defineProperties:Xv,getOwnPropertyDescriptor:NC});Ul({target:"Object",stat:!0,forced:!Ys},{getOwnPropertyNames:LC});gN();yN(Ya,zl);PC[Zr]=!0;var EN=co,jC=EN&&!!Symbol.for&&!!Symbol.keyFor,kN=bt,RN=Yn,$N=tr,PN=Sr,FC=fo,IN=jC,cd=FC("string-to-symbol-registry"),ON=FC("symbol-to-string-registry");kN({target:"Symbol",stat:!0,forced:!IN},{for:function(e){var r=PN(e);if($N(cd,r))return cd[r];var t=RN("Symbol")(r);return cd[r]=t,ON[t]=r,t}});var AN=bt,MN=tr,xN=lo,NN=ss,LN=fo,DN=jC,Cy=LN("symbol-to-string-registry");AN({target:"Symbol",stat:!0,forced:!DN},{keyFor:function(r){if(!xN(r))throw new TypeError(NN(r)+" is not a symbol");if(MN(Cy,r))return Cy[r]}});var jN=gt,Ty=_u,FN=Bt,Ey=fi,UN=Sr,ky=jN([].push),BN=function(e){if(FN(e))return e;if(Ty(e)){for(var r=e.length,t=[],n=0;n<r;n++){var i=e[n];typeof i=="string"?ky(t,i):(typeof i=="number"||Ey(i)==="Number"||Ey(i)==="String")&&ky(t,UN(i))}var a=t.length,s=!0;return function(c,o){if(s)return s=!1,o;if(Ty(this))return o;for(var u=0;u<a;u++)if(t[u]===c)return o}}},qN=bt,UC=Yn,BC=cs,zN=Ut,Cu=gt,qC=dt,Ry=Bt,$y=lo,zC=hi,GN=BN,WN=co,VN=String,_a=UC("JSON","stringify"),Xu=Cu(/./.exec),Py=Cu("".charAt),HN=Cu("".charCodeAt),KN=Cu("".replace),JN=Cu(1 .toString),YN=/[\uD800-\uDFFF]/g,Iy=/^[\uD800-\uDBFF]$/,Oy=/^[\uDC00-\uDFFF]$/,Ay=!WN||qC(function(){var e=UC("Symbol")("stringify detection");return _a([e])!=="[null]"||_a({a:e})!=="{}"||_a(Object(e))!=="{}"}),My=qC(function(){return _a("\uDF06\uD834")!=='"\\udf06\\ud834"'||_a("\uDEAD")!=='"\\udead"'}),XN=function(e,r){var t=zC(arguments),n=GN(r);if(!(!Ry(n)&&(e===void 0||$y(e))))return t[1]=function(i,a){if(Ry(n)&&(a=zN(n,this,VN(i),a)),!$y(a))return a},BC(_a,null,t)},QN=function(e,r,t){var n=Py(t,r-1),i=Py(t,r+1);return Xu(Iy,e)&&!Xu(Oy,i)||Xu(Oy,e)&&!Xu(Iy,n)?"\\u"+JN(HN(e,0),16):e};_a&&qN({target:"JSON",stat:!0,arity:3,forced:Ay||My},{stringify:function(r,t,n){var i=zC(arguments),a=BC(Ay?XN:_a,null,i);return My&&typeof a=="string"?KN(a,YN,QN):a}});var ZN=bt,eL=co,tL=dt,GC=gu,rL=Nr,nL=!eL||tL(function(){GC.f(1)});ZN({target:"Object",stat:!0,forced:nL},{getOwnPropertySymbols:function(r){var t=GC.f;return t?t(rL(r)):[]}});var iL=dt,aL=qt,sL=uo,oL=aL("species"),Tu=function(e){return sL>=51||!iL(function(){var r=[],t=r.constructor={};return t[oL]=function(){return{foo:1}},r[e](Boolean).foo!==1})},uL=bt,cL=rn.filter,lL=Tu,fL=lL("filter");uL({target:"Array",proto:!0,forced:!fL},{filter:function(r){return cL(this,r,arguments.length>1?arguments[1]:void 0)}});var dL=bt,pL=dt,hL=vn,WC=Gi.f,VC=Wt,vL=!VC||pL(function(){WC(1)});dL({target:"Object",stat:!0,forced:vL,sham:!VC},{getOwnPropertyDescriptor:function(r,t){return WC(hL(r),t)}});var mL=Wt,gL=qr,yL=is,Eu=function(e,r,t){mL?gL.f(e,r,yL(0,t)):e[r]=t},bL=bt,_L=Wt,wL=iC,SL=vn,CL=Gi,TL=Eu;bL({target:"Object",stat:!0,sham:!_L},{getOwnPropertyDescriptors:function(r){for(var t=SL(r),n=CL.f,i=wL(t),a={},s=0,c,o;i.length>s;)o=n(t,c=i[s++]),o!==void 0&&TL(a,c,o);return a}});var HC={exports:{}};(function(e){function r(n,i,a,s,c,o,u){try{var l=n[o](u),f=l.value}catch(v){return void a(v)}l.done?i(f):Promise.resolve(f).then(s,c)}function t(n){return function(){var i=this,a=arguments;return new Promise(function(s,c){var o=n.apply(i,a);function u(f){r(o,s,c,u,l,"next",f)}function l(f){r(o,s,c,u,l,"throw",f)}u(void 0)})}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(HC);var ku=HC.exports,KC={exports:{}};(function(e){function r(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(KC);var ls=KC.exports,JC={exports:{}},YC={exports:{}};(function(e){function r(t,n){return e.exports=r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},e.exports.__esModule=!0,e.exports.default=e.exports,r(t,n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(YC);var Qv=YC.exports;(function(e){var r=Qv;function t(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&r(n,i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(JC);var mi=JC.exports,XC={exports:{}},QC={exports:{}};(function(e){function r(t){"@babel/helpers - typeof";return e.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(QC);var Mn=QC.exports;(function(e){var r=Mn.default,t=ls;function n(i,a){if(a&&(r(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return t(i)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(XC);var gi=XC.exports,ZC={exports:{}};(function(e){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(ZC);var xn=ZC.exports,eT={exports:{}},tT={exports:{}},rT={exports:{}};(function(e){var r=Mn.default;function t(n,i){if(r(n)!="object"||!n)return n;var a=n[Symbol.toPrimitive];if(a!==void 0){var s=a.call(n,i||"default");if(r(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(rT);var EL=rT.exports;(function(e){var r=Mn.default,t=EL;function n(i){var a=t(i,"string");return r(a)=="symbol"?a:a+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(tT);var nT=tT.exports;(function(e){var r=nT;function t(n,i,a){return(i=r(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a,n}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(eT);var fs=eT.exports,iT={exports:{}};(function(e){var r=nT;function t(i,a){for(var s=0;s<a.length;s++){var c=a[s];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(i,r(c.key),c)}}function n(i,a,s){return a&&t(i.prototype,a),s&&t(i,s),Object.defineProperty(i,"prototype",{writable:!1}),i}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(iT);var $a=iT.exports,aT={exports:{}};(function(e){function r(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(aT);var yi=aT.exports,kL=Fv,RL=Ki,$L=kL?{}.toString:function(){return"[object "+RL(this)+"]"},PL=Fv,IL=zr,OL=$L;PL||IL(Object.prototype,"toString",OL,{unsafe:!0});var AL=St,ML=fi,Wl=ML(AL.process)==="process",xL=gt,NL=An,LL=function(e,r,t){try{return xL(NL(Object.getOwnPropertyDescriptor(e,r)[t]))}catch{}},DL=Jt,jL=function(e){return DL(e)||e===null},FL=jL,UL=String,BL=TypeError,qL=function(e){if(FL(e))return e;throw new BL("Can't set "+UL(e)+" as a prototype")},zL=LL,GL=Jt,WL=Jn,VL=qL,ho=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=zL(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch{}return function(i,a){return WL(i),VL(a),GL(i)&&(e?t(i,a):i.__proto__=a),i}}():void 0),HL=Yn,KL=vi,JL=qt,YL=Wt,xy=JL("species"),Vl=function(e){var r=HL(e);YL&&r&&!r[xy]&&KL(r,xy,{configurable:!0,get:function(){return this}})},XL=Wi,QL=TypeError,Pa=function(e,r){if(XL(r,e))return e;throw new QL("Incorrect invocation")},Ny=sr,ZL=Bv,eD=Kn,tD=qt,rD=tD("species"),Zv=function(e,r){var t=Ny(e).constructor,n;return t===void 0||eD(n=Ny(t)[rD])?r:ZL(n)},nD=TypeError,em=function(e,r){if(e<r)throw new nD("Not enough arguments");return e},iD=as,sT=/(?:ipad|iphone|ipod).*applewebkit/i.test(iD),pn=St,aD=cs,sD=Ji,Ly=Bt,oD=tr,oT=dt,Dy=pC,uD=hi,jy=Nl,cD=em,lD=sT,fD=Wl,rh=pn.setImmediate,nh=pn.clearImmediate,dD=pn.process,ld=pn.Dispatch,pD=pn.Function,Fy=pn.MessageChannel,hD=pn.String,fd=0,Yo={},Uy="onreadystatechange",au,Ua,dd,pd;oT(function(){au=pn.location});var tm=function(e){if(oD(Yo,e)){var r=Yo[e];delete Yo[e],r()}},hd=function(e){return function(){tm(e)}},By=function(e){tm(e.data)},qy=function(e){pn.postMessage(hD(e),au.protocol+"//"+au.host)};(!rh||!nh)&&(rh=function(r){cD(arguments.length,1);var t=Ly(r)?r:pD(r),n=uD(arguments,1);return Yo[++fd]=function(){aD(t,void 0,n)},Ua(fd),fd},nh=function(r){delete Yo[r]},fD?Ua=function(e){dD.nextTick(hd(e))}:ld&&ld.now?Ua=function(e){ld.now(hd(e))}:Fy&&!lD?(dd=new Fy,pd=dd.port2,dd.port1.onmessage=By,Ua=sD(pd.postMessage,pd)):pn.addEventListener&&Ly(pn.postMessage)&&!pn.importScripts&&au&&au.protocol!=="file:"&&!oT(qy)?(Ua=qy,pn.addEventListener("message",By,!1)):Uy in jy("script")?Ua=function(e){Dy.appendChild(jy("script"))[Uy]=function(){Dy.removeChild(this),tm(e)}}:Ua=function(e){setTimeout(hd(e),0)});var uT={set:rh,clear:nh},zy=St,vD=Wt,mD=Object.getOwnPropertyDescriptor,cT=function(e){if(!vD)return zy[e];var r=mD(zy,e);return r&&r.value},lT=function(){this.head=null,this.tail=null};lT.prototype={add:function(e){var r={item:e,next:null},t=this.tail;t?t.next=r:this.head=r,this.tail=r},get:function(){var e=this.head;if(e){var r=this.head=e.next;return r===null&&(this.tail=null),e.item}}};var fT=lT,gD=as,yD=/ipad|iphone|ipod/i.test(gD)&&typeof Pebble<"u",bD=as,_D=/web0s(?!.*chrome)/i.test(bD),Qs=St,wD=cT,Gy=Ji,vd=uT.set,SD=fT,CD=sT,TD=yD,ED=_D,md=Wl,Wy=Qs.MutationObserver||Qs.WebKitMutationObserver,Vy=Qs.document,Hy=Qs.process,Qu=Qs.Promise,ih=wD("queueMicrotask"),_s,gd,yd,Zu,Ky;if(!ih){var ec=new SD,tc=function(){var e,r;for(md&&(e=Hy.domain)&&e.exit();r=ec.get();)try{r()}catch(t){throw ec.head&&_s(),t}e&&e.enter()};!CD&&!md&&!ED&&Wy&&Vy?(gd=!0,yd=Vy.createTextNode(""),new Wy(tc).observe(yd,{characterData:!0}),_s=function(){yd.data=gd=!gd}):!TD&&Qu&&Qu.resolve?(Zu=Qu.resolve(void 0),Zu.constructor=Qu,Ky=Gy(Zu.then,Zu),_s=function(){Ky(tc)}):md?_s=function(){Hy.nextTick(tc)}:(vd=Gy(vd,Qs),_s=function(){vd(tc)}),ih=function(e){ec.head||_s(),ec.add(e)}}var kD=ih,RD=function(e,r){try{arguments.length===1?console.error(e):console.error(e,r)}catch{}},rm=function(e){try{return{error:!1,value:e()}}catch(r){return{error:!0,value:r}}},$D=St,Hl=$D.Promise,dT=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",PD=dT,ID=Wl,OD=!PD&&!ID&&typeof window=="object"&&typeof document=="object",AD=St,Xo=Hl,MD=Bt,xD=jl,ND=Nv,LD=qt,DD=OD,jD=dT,bd=uo;Xo&&Xo.prototype;var FD=LD("species"),ah=!1,pT=MD(AD.PromiseRejectionEvent),UD=xD("Promise",function(){var e=ND(Xo),r=e!==String(Xo);if(!r&&bd===66)return!0;if(!bd||bd<51||!/native code/.test(e)){var t=new Xo(function(a){a(1)}),n=function(a){a(function(){},function(){})},i=t.constructor={};if(i[FD]=n,ah=t.then(function(){})instanceof n,!ah)return!0}return!r&&(DD||jD)&&!pT}),Ru={CONSTRUCTOR:UD,REJECTION_EVENT:pT,SUBCLASSING:ah},vo={},Jy=An,BD=TypeError,qD=function(e){var r,t;this.promise=new e(function(n,i){if(r!==void 0||t!==void 0)throw new BD("Bad Promise constructor");r=n,t=i}),this.resolve=Jy(r),this.reject=Jy(t)};vo.f=function(e){return new qD(e)};var zD=bt,hl=Wl,Ta=St,Zs=Ut,Yy=zr,Xy=ho,GD=pi,WD=Vl,VD=An,tl=Bt,HD=Jt,KD=Pa,JD=Zv,hT=uT.set,nm=kD,YD=RD,XD=rm,QD=fT,vT=mn,vl=Hl,im=Ru,mT=vo,Kl="Promise",gT=im.CONSTRUCTOR,ZD=im.REJECTION_EVENT,e2=im.SUBCLASSING,_d=vT.getterFor(Kl),t2=vT.set,Ps=vl&&vl.prototype,Ka=vl,rc=Ps,yT=Ta.TypeError,sh=Ta.document,am=Ta.process,oh=mT.f,r2=oh,n2=!!(sh&&sh.createEvent&&Ta.dispatchEvent),bT="unhandledrejection",i2="rejectionhandled",Qy=0,_T=1,a2=2,sm=1,wT=2,nc,Zy,s2,eb,ST=function(e){var r;return HD(e)&&tl(r=e.then)?r:!1},CT=function(e,r){var t=r.value,n=r.state===_T,i=n?e.ok:e.fail,a=e.resolve,s=e.reject,c=e.domain,o,u,l;try{i?(n||(r.rejection===wT&&u2(r),r.rejection=sm),i===!0?o=t:(c&&c.enter(),o=i(t),c&&(c.exit(),l=!0)),o===e.promise?s(new yT("Promise-chain cycle")):(u=ST(o))?Zs(u,o,a,s):a(o)):s(t)}catch(f){c&&!l&&c.exit(),s(f)}},TT=function(e,r){e.notified||(e.notified=!0,nm(function(){for(var t=e.reactions,n;n=t.get();)CT(n,e);e.notified=!1,r&&!e.rejection&&o2(e)}))},ET=function(e,r,t){var n,i;n2?(n=sh.createEvent("Event"),n.promise=r,n.reason=t,n.initEvent(e,!1,!0),Ta.dispatchEvent(n)):n={promise:r,reason:t},!ZD&&(i=Ta["on"+e])?i(n):e===bT&&YD("Unhandled promise rejection",t)},o2=function(e){Zs(hT,Ta,function(){var r=e.facade,t=e.value,n=tb(e),i;if(n&&(i=XD(function(){hl?am.emit("unhandledRejection",t,r):ET(bT,r,t)}),e.rejection=hl||tb(e)?wT:sm,i.error))throw i.value})},tb=function(e){return e.rejection!==sm&&!e.parent},u2=function(e){Zs(hT,Ta,function(){var r=e.facade;hl?am.emit("rejectionHandled",r):ET(i2,r,e.value)})},xs=function(e,r,t){return function(n){e(r,n,t)}},Fs=function(e,r,t){e.done||(e.done=!0,t&&(e=t),e.value=r,e.state=a2,TT(e,!0))},uh=function(e,r,t){if(!e.done){e.done=!0,t&&(e=t);try{if(e.facade===r)throw new yT("Promise can't be resolved itself");var n=ST(r);n?nm(function(){var i={done:!1};try{Zs(n,r,xs(uh,i,e),xs(Fs,i,e))}catch(a){Fs(i,a,e)}}):(e.value=r,e.state=_T,TT(e,!1))}catch(i){Fs({done:!1},i,e)}}};if(gT&&(Ka=function(r){KD(this,rc),VD(r),Zs(nc,this);var t=_d(this);try{r(xs(uh,t),xs(Fs,t))}catch(n){Fs(t,n)}},rc=Ka.prototype,nc=function(r){t2(this,{type:Kl,done:!1,notified:!1,parent:!1,reactions:new QD,rejection:!1,state:Qy,value:void 0})},nc.prototype=Yy(rc,"then",function(r,t){var n=_d(this),i=oh(JD(this,Ka));return n.parent=!0,i.ok=tl(r)?r:!0,i.fail=tl(t)&&t,i.domain=hl?am.domain:void 0,n.state===Qy?n.reactions.add(i):nm(function(){CT(i,n)}),i.promise}),Zy=function(){var e=new nc,r=_d(e);this.promise=e,this.resolve=xs(uh,r),this.reject=xs(Fs,r)},mT.f=oh=function(e){return e===Ka||e===s2?new Zy(e):r2(e)},tl(vl)&&Ps!==Object.prototype)){eb=Ps.then,e2||Yy(Ps,"then",function(r,t){var n=this;return new Ka(function(i,a){Zs(eb,n,i,a)}).then(r,t)},{unsafe:!0});try{delete Ps.constructor}catch{}Xy&&Xy(Ps,rc)}zD({global:!0,constructor:!0,wrap:!0,forced:gT},{Promise:Ka});GD(Ka,Kl,!1);WD(Kl);var $u={},c2=qt,l2=$u,f2=c2("iterator"),d2=Array.prototype,om=function(e){return e!==void 0&&(l2.Array===e||d2[f2]===e)},p2=Ki,rb=os,h2=Kn,v2=$u,m2=qt,g2=m2("iterator"),Pu=function(e){if(!h2(e))return rb(e,g2)||rb(e,"@@iterator")||v2[p2(e)]},y2=Ut,b2=An,_2=sr,w2=ss,S2=Pu,C2=TypeError,Jl=function(e,r){var t=arguments.length<2?S2(e):r;if(b2(t))return _2(y2(t,e));throw new C2(w2(e)+" is not iterable")},T2=Ut,nb=sr,E2=os,kT=function(e,r,t){var n,i;nb(e);try{if(n=E2(e,"return"),!n){if(r==="throw")throw t;return t}n=T2(n,e)}catch(a){i=!0,n=a}if(r==="throw")throw t;if(i)throw n;return nb(n),t},k2=Ji,R2=Ut,$2=sr,P2=ss,I2=om,O2=Lr,ib=Wi,A2=Jl,M2=Pu,ab=kT,x2=TypeError,rl=function(e,r){this.stopped=e,this.result=r},sb=rl.prototype,Iu=function(e,r,t){var n=t&&t.that,i=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_RECORD),s=!!(t&&t.IS_ITERATOR),c=!!(t&&t.INTERRUPTED),o=k2(r,n),u,l,f,v,m,b,C,$=function(A){return u&&ab(u,"normal",A),new rl(!0,A)},E=function(A){return i?($2(A),c?o(A[0],A[1],$):o(A[0],A[1])):c?o(A,$):o(A)};if(a)u=e.iterator;else if(s)u=e;else{if(l=M2(e),!l)throw new x2(P2(e)+" is not iterable");if(I2(l)){for(f=0,v=O2(e);v>f;f++)if(m=E(e[f]),m&&ib(sb,m))return m;return new rl(!1)}u=A2(e,l)}for(b=a?e.next:u.next;!(C=R2(b,u)).done;){try{m=E(C.value)}catch(A){ab(u,"throw",A)}if(typeof m=="object"&&m&&ib(sb,m))return m}return new rl(!1)},N2=qt,RT=N2("iterator"),$T=!1;try{var L2=0,ob={next:function(){return{done:!!L2++}},return:function(){$T=!0}};ob[RT]=function(){return this},Array.from(ob,function(){throw 2})}catch{}var Yl=function(e,r){try{if(!r&&!$T)return!1}catch{return!1}var t=!1;try{var n={};n[RT]=function(){return{next:function(){return{done:t=!0}}}},e(n)}catch{}return t},D2=Hl,j2=Yl,F2=Ru.CONSTRUCTOR,PT=F2||!j2(function(e){D2.all(e).then(void 0,function(){})}),U2=bt,B2=Ut,q2=An,z2=vo,G2=rm,W2=Iu,V2=PT;U2({target:"Promise",stat:!0,forced:V2},{all:function(r){var t=this,n=z2.f(t),i=n.resolve,a=n.reject,s=G2(function(){var c=q2(t.resolve),o=[],u=0,l=1;W2(r,function(f){var v=u++,m=!1;l++,B2(c,t,f).then(function(b){m||(m=!0,o[v]=b,--l||i(o))},a)}),--l||i(o)});return s.error&&a(s.value),n.promise}});var H2=bt,K2=Ru.CONSTRUCTOR,ch=Hl,J2=Yn,Y2=Bt,X2=zr,ub=ch&&ch.prototype;H2({target:"Promise",proto:!0,forced:K2,real:!0},{catch:function(e){return this.then(void 0,e)}});if(Y2(ch)){var cb=J2("Promise").prototype.catch;ub.catch!==cb&&X2(ub,"catch",cb,{unsafe:!0})}var Q2=bt,Z2=Ut,ej=An,tj=vo,rj=rm,nj=Iu,ij=PT;Q2({target:"Promise",stat:!0,forced:ij},{race:function(r){var t=this,n=tj.f(t),i=n.reject,a=rj(function(){var s=ej(t.resolve);nj(r,function(c){Z2(s,t,c).then(n.resolve,i)})});return a.error&&i(a.value),n.promise}});var aj=bt,sj=vo,oj=Ru.CONSTRUCTOR;aj({target:"Promise",stat:!0,forced:oj},{reject:function(r){var t=sj.f(this),n=t.reject;return n(r),t.promise}});var uj=sr,cj=Jt,lj=vo,fj=function(e,r){if(uj(e),cj(r)&&r.constructor===e)return r;var t=lj.f(e),n=t.resolve;return n(r),t.promise},dj=bt,pj=Yn,hj=Ru.CONSTRUCTOR,vj=fj;pj("Promise");dj({target:"Promise",stat:!0,forced:hj},{resolve:function(r){return vj(this,r)}});var mj=bt,gj=rn.map,yj=Tu,bj=yj("map");mj({target:"Array",proto:!0,forced:!bj},{map:function(r){return gj(this,r,arguments.length>1?arguments[1]:void 0)}});var IT={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},_j=Nl,wd=_j("span").classList,lb=wd&&wd.constructor&&wd.constructor.prototype,OT=lb===Object.prototype?void 0:lb,wj=dt,Xl=function(e,r){var t=[][e];return!!t&&wj(function(){t.call(null,r||function(){return 1},1)})},Sj=rn.forEach,Cj=Xl,Tj=Cj("forEach"),Ej=Tj?[].forEach:function(r){return Sj(this,r,arguments.length>1?arguments[1]:void 0)},fb=St,db=IT,kj=OT,Sd=Ej,Rj=Vi,AT=function(e){if(e&&e.forEach!==Sd)try{Rj(e,"forEach",Sd)}catch{e.forEach=Sd}};for(var Cd in db)db[Cd]&&AT(fb[Cd]&&fb[Cd].prototype);AT(kj);var MT={exports:{}};(function(e){var r=Mn.default;function t(){e.exports=t=function(){return i},e.exports.__esModule=!0,e.exports.default=e.exports;var n,i={},a=Object.prototype,s=a.hasOwnProperty,c=Object.defineProperty||function(he,pe,x){he[pe]=x.value},o=typeof Symbol=="function"?Symbol:{},u=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",f=o.toStringTag||"@@toStringTag";function v(he,pe,x){return Object.defineProperty(he,pe,{value:x,enumerable:!0,configurable:!0,writable:!0}),he[pe]}try{v({},"")}catch{v=function(x,Pe,Je){return x[Pe]=Je}}function m(he,pe,x,Pe){var Je=pe&&pe.prototype instanceof U?pe:U,Ae=Object.create(Je.prototype),we=new at(Pe||[]);return c(Ae,"_invoke",{value:Z(he,x,we)}),Ae}function b(he,pe,x){try{return{type:"normal",arg:he.call(pe,x)}}catch(Pe){return{type:"throw",arg:Pe}}}i.wrap=m;var C="suspendedStart",$="suspendedYield",E="executing",A="completed",N={};function U(){}function J(){}function H(){}var W={};v(W,u,function(){return this});var L=Object.getPrototypeOf,ee=L&&L(L(Te([])));ee&&ee!==a&&s.call(ee,u)&&(W=ee);var Y=H.prototype=U.prototype=Object.create(W);function ie(he){["next","throw","return"].forEach(function(pe){v(he,pe,function(x){return this._invoke(pe,x)})})}function me(he,pe){function x(Je,Ae,we,Q){var Rt=b(he[Je],he,Ae);if(Rt.type!=="throw"){var be=Rt.arg,se=be.value;return se&&r(se)=="object"&&s.call(se,"__await")?pe.resolve(se.__await).then(function(_t){x("next",_t,we,Q)},function(_t){x("throw",_t,we,Q)}):pe.resolve(se).then(function(_t){be.value=_t,we(be)},function(_t){return x("throw",_t,we,Q)})}Q(Rt.arg)}var Pe;c(this,"_invoke",{value:function(Ae,we){function Q(){return new pe(function(Rt,be){x(Ae,we,Rt,be)})}return Pe=Pe?Pe.then(Q,Q):Q()}})}function Z(he,pe,x){var Pe=C;return function(Je,Ae){if(Pe===E)throw Error("Generator is already running");if(Pe===A){if(Je==="throw")throw Ae;return{value:n,done:!0}}for(x.method=Je,x.arg=Ae;;){var we=x.delegate;if(we){var Q=Ne(we,x);if(Q){if(Q===N)continue;return Q}}if(x.method==="next")x.sent=x._sent=x.arg;else if(x.method==="throw"){if(Pe===C)throw Pe=A,x.arg;x.dispatchException(x.arg)}else x.method==="return"&&x.abrupt("return",x.arg);Pe=E;var Rt=b(he,pe,x);if(Rt.type==="normal"){if(Pe=x.done?A:$,Rt.arg===N)continue;return{value:Rt.arg,done:x.done}}Rt.type==="throw"&&(Pe=A,x.method="throw",x.arg=Rt.arg)}}}function Ne(he,pe){var x=pe.method,Pe=he.iterator[x];if(Pe===n)return pe.delegate=null,x==="throw"&&he.iterator.return&&(pe.method="return",pe.arg=n,Ne(he,pe),pe.method==="throw")||x!=="return"&&(pe.method="throw",pe.arg=new TypeError("The iterator does not provide a '"+x+"' method")),N;var Je=b(Pe,he.iterator,pe.arg);if(Je.type==="throw")return pe.method="throw",pe.arg=Je.arg,pe.delegate=null,N;var Ae=Je.arg;return Ae?Ae.done?(pe[he.resultName]=Ae.value,pe.next=he.nextLoc,pe.method!=="return"&&(pe.method="next",pe.arg=n),pe.delegate=null,N):Ae:(pe.method="throw",pe.arg=new TypeError("iterator result is not an object"),pe.delegate=null,N)}function Ve(he){var pe={tryLoc:he[0]};1 in he&&(pe.catchLoc=he[1]),2 in he&&(pe.finallyLoc=he[2],pe.afterLoc=he[3]),this.tryEntries.push(pe)}function Tt(he){var pe=he.completion||{};pe.type="normal",delete pe.arg,he.completion=pe}function at(he){this.tryEntries=[{tryLoc:"root"}],he.forEach(Ve,this),this.reset(!0)}function Te(he){if(he||he===""){var pe=he[u];if(pe)return pe.call(he);if(typeof he.next=="function")return he;if(!isNaN(he.length)){var x=-1,Pe=function Je(){for(;++x<he.length;)if(s.call(he,x))return Je.value=he[x],Je.done=!1,Je;return Je.value=n,Je.done=!0,Je};return Pe.next=Pe}}throw new TypeError(r(he)+" is not iterable")}return J.prototype=H,c(Y,"constructor",{value:H,configurable:!0}),c(H,"constructor",{value:J,configurable:!0}),J.displayName=v(H,f,"GeneratorFunction"),i.isGeneratorFunction=function(he){var pe=typeof he=="function"&&he.constructor;return!!pe&&(pe===J||(pe.displayName||pe.name)==="GeneratorFunction")},i.mark=function(he){return Object.setPrototypeOf?Object.setPrototypeOf(he,H):(he.__proto__=H,v(he,f,"GeneratorFunction")),he.prototype=Object.create(Y),he},i.awrap=function(he){return{__await:he}},ie(me.prototype),v(me.prototype,l,function(){return this}),i.AsyncIterator=me,i.async=function(he,pe,x,Pe,Je){Je===void 0&&(Je=Promise);var Ae=new me(m(he,pe,x,Pe),Je);return i.isGeneratorFunction(pe)?Ae:Ae.next().then(function(we){return we.done?we.value:Ae.next()})},ie(Y),v(Y,f,"Generator"),v(Y,u,function(){return this}),v(Y,"toString",function(){return"[object Generator]"}),i.keys=function(he){var pe=Object(he),x=[];for(var Pe in pe)x.push(Pe);return x.reverse(),function Je(){for(;x.length;){var Ae=x.pop();if(Ae in pe)return Je.value=Ae,Je.done=!1,Je}return Je.done=!0,Je}},i.values=Te,at.prototype={constructor:at,reset:function(pe){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(Tt),!pe)for(var x in this)x.charAt(0)==="t"&&s.call(this,x)&&!isNaN(+x.slice(1))&&(this[x]=n)},stop:function(){this.done=!0;var pe=this.tryEntries[0].completion;if(pe.type==="throw")throw pe.arg;return this.rval},dispatchException:function(pe){if(this.done)throw pe;var x=this;function Pe(be,se){return we.type="throw",we.arg=pe,x.next=be,se&&(x.method="next",x.arg=n),!!se}for(var Je=this.tryEntries.length-1;Je>=0;--Je){var Ae=this.tryEntries[Je],we=Ae.completion;if(Ae.tryLoc==="root")return Pe("end");if(Ae.tryLoc<=this.prev){var Q=s.call(Ae,"catchLoc"),Rt=s.call(Ae,"finallyLoc");if(Q&&Rt){if(this.prev<Ae.catchLoc)return Pe(Ae.catchLoc,!0);if(this.prev<Ae.finallyLoc)return Pe(Ae.finallyLoc)}else if(Q){if(this.prev<Ae.catchLoc)return Pe(Ae.catchLoc,!0)}else{if(!Rt)throw Error("try statement without catch or finally");if(this.prev<Ae.finallyLoc)return Pe(Ae.finallyLoc)}}}},abrupt:function(pe,x){for(var Pe=this.tryEntries.length-1;Pe>=0;--Pe){var Je=this.tryEntries[Pe];if(Je.tryLoc<=this.prev&&s.call(Je,"finallyLoc")&&this.prev<Je.finallyLoc){var Ae=Je;break}}Ae&&(pe==="break"||pe==="continue")&&Ae.tryLoc<=x&&x<=Ae.finallyLoc&&(Ae=null);var we=Ae?Ae.completion:{};return we.type=pe,we.arg=x,Ae?(this.method="next",this.next=Ae.finallyLoc,N):this.complete(we)},complete:function(pe,x){if(pe.type==="throw")throw pe.arg;return pe.type==="break"||pe.type==="continue"?this.next=pe.arg:pe.type==="return"?(this.rval=this.arg=pe.arg,this.method="return",this.next="end"):pe.type==="normal"&&x&&(this.next=x),N},finish:function(pe){for(var x=this.tryEntries.length-1;x>=0;--x){var Pe=this.tryEntries[x];if(Pe.finallyLoc===pe)return this.complete(Pe.completion,Pe.afterLoc),Tt(Pe),N}},catch:function(pe){for(var x=this.tryEntries.length-1;x>=0;--x){var Pe=this.tryEntries[x];if(Pe.tryLoc===pe){var Je=Pe.completion;if(Je.type==="throw"){var Ae=Je.arg;Tt(Pe)}return Ae}}throw Error("illegal catch attempt")},delegateYield:function(pe,x,Pe){return this.delegate={iterator:Te(pe),resultName:x,nextLoc:Pe},this.method==="next"&&(this.arg=n),N}},i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(MT);var $j=MT.exports,nl=$j(),Ou=nl;try{regeneratorRuntime=nl}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=nl:Function("r","regeneratorRuntime = r")(nl)}var Pj=TypeError,Ij=9007199254740991,xT=function(e){if(e>Ij)throw Pj("Maximum allowed index exceeded");return e},Oj=bt,Aj=dt,Mj=_u,xj=Jt,Nj=Nr,Lj=Lr,pb=xT,hb=Eu,Dj=Hv,jj=Tu,Fj=qt,Uj=uo,NT=Fj("isConcatSpreadable"),Bj=Uj>=51||!Aj(function(){var e=[];return e[NT]=!1,e.concat()[0]!==e}),qj=function(e){if(!xj(e))return!1;var r=e[NT];return r!==void 0?!!r:Mj(e)},zj=!Bj||!jj("concat");Oj({target:"Array",proto:!0,arity:1,forced:zj},{concat:function(r){var t=Nj(this),n=Dj(t,0),i=0,a,s,c,o,u;for(a=-1,c=arguments.length;a<c;a++)if(u=a===-1?t:arguments[a],qj(u))for(o=Lj(u),pb(i+o),s=0;s<o;s++,i++)s in u&&hb(n,i,u[s]);else pb(i+1),hb(n,i++,u);return n.length=i,n}});var Gj=sr,Wj=kT,Vj=function(e,r,t,n){try{return n?r(Gj(t)[0],t[1]):r(t)}catch(i){Wj(e,"throw",i)}},Hj=Ji,Kj=Ut,Jj=Nr,Yj=Vj,Xj=om,Qj=Fl,Zj=Lr,vb=Eu,eF=Jl,tF=Pu,mb=Array,LT=function(r){var t=Jj(r),n=Qj(this),i=arguments.length,a=i>1?arguments[1]:void 0,s=a!==void 0;s&&(a=Hj(a,i>2?arguments[2]:void 0));var c=tF(t),o=0,u,l,f,v,m,b;if(c&&!(this===mb&&Xj(c)))for(l=n?new this:[],v=eF(t,c),m=v.next;!(f=Kj(m,v)).done;o++)b=s?Yj(v,a,[f.value,o],!0):f.value,vb(l,o,b);else for(u=Zj(t),l=n?new this(u):mb(u);u>o;o++)b=s?a(t[o],o):t[o],vb(l,o,b);return l.length=o,l},rF=bt,nF=LT,iF=Yl,aF=!iF(function(e){Array.from(e)});rF({target:"Array",stat:!0,forced:aF},{from:nF});var um=gt,sF=di,oF=Sr,uF=Jn,cF=um("".charAt),gb=um("".charCodeAt),lF=um("".slice),yb=function(e){return function(r,t){var n=oF(uF(r)),i=sF(t),a=n.length,s,c;return i<0||i>=a?e?"":void 0:(s=gb(n,i),s<55296||s>56319||i+1===a||(c=gb(n,i+1))<56320||c>57343?e?cF(n,i):s:e?lF(n,i,i+2):(s-55296<<10)+(c-56320)+65536)}},cm={codeAt:yb(!1),charAt:yb(!0)},fF=dt,dF=!fF(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),pF=tr,hF=Bt,vF=Nr,mF=Ll,gF=dF,bb=mF("IE_PROTO"),lh=Object,yF=lh.prototype,Au=gF?lh.getPrototypeOf:function(e){var r=vF(e);if(pF(r,bb))return r[bb];var t=r.constructor;return hF(t)&&r instanceof t?t.prototype:r instanceof lh?yF:null},bF=dt,_F=Bt,wF=Jt,_b=Au,SF=zr,CF=qt,fh=CF("iterator"),DT=!1,Za,Td,Ed;[].keys&&(Ed=[].keys(),"next"in Ed?(Td=_b(_b(Ed)),Td!==Object.prototype&&(Za=Td)):DT=!0);var TF=!wF(Za)||bF(function(){var e={};return Za[fh].call(e)!==e});TF&&(Za={});_F(Za[fh])||SF(Za,fh,function(){return this});var jT={IteratorPrototype:Za,BUGGY_SAFARI_ITERATORS:DT},EF=jT.IteratorPrototype,kF=Ra,RF=is,$F=pi,PF=$u,IF=function(){return this},FT=function(e,r,t,n){var i=r+" Iterator";return e.prototype=kF(EF,{next:RF(+!n,t)}),$F(e,i,!1),PF[i]=IF,e},OF=bt,AF=Ut,UT=vu,MF=Bt,xF=FT,wb=Au,Sb=ho,NF=pi,LF=Vi,kd=zr,DF=qt,jF=$u,BT=jT,FF=UT.PROPER,UF=UT.CONFIGURABLE,Cb=BT.IteratorPrototype,ic=BT.BUGGY_SAFARI_ITERATORS,$o=DF("iterator"),Tb="keys",Po="values",Eb="entries",BF=function(){return this},lm=function(e,r,t,n,i,a,s){xF(t,r,n);var c=function(E){if(E===i&&v)return v;if(!ic&&E&&E in l)return l[E];switch(E){case Tb:return function(){return new t(this,E)};case Po:return function(){return new t(this,E)};case Eb:return function(){return new t(this,E)}}return function(){return new t(this)}},o=r+" Iterator",u=!1,l=e.prototype,f=l[$o]||l["@@iterator"]||i&&l[i],v=!ic&&f||c(i),m=r==="Array"&&l.entries||f,b,C,$;if(m&&(b=wb(m.call(new e)),b!==Object.prototype&&b.next&&(wb(b)!==Cb&&(Sb?Sb(b,Cb):MF(b[$o])||kd(b,$o,BF)),NF(b,o,!0))),FF&&i===Po&&f&&f.name!==Po&&(UF?LF(l,"name",Po):(u=!0,v=function(){return AF(f,this)})),i)if(C={values:c(Po),keys:a?v:c(Tb),entries:c(Eb)},s)for($ in C)(ic||u||!($ in l))&&kd(l,$,C[$]);else OF({target:r,proto:!0,forced:ic||u},C);return l[$o]!==v&&kd(l,$o,v,{name:i}),jF[r]=v,C},Ql=function(e,r){return{value:e,done:r}},qF=cm.charAt,zF=Sr,qT=mn,GF=lm,kb=Ql,zT="String Iterator",WF=qT.set,VF=qT.getterFor(zT);GF(String,"String",function(e){WF(this,{type:zT,string:zF(e),index:0})},function(){var r=VF(this),t=r.string,n=r.index,i;return n>=t.length?kb(void 0,!0):(i=qF(t,n),r.index+=i.length,kb(i,!1))});var GT={exports:{}};(function(e){(function(r,t){e.exports?e.exports=t():r.log=t()})(xe,function(){var r=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"],a={},s=null;function c(C,$){var E=C[$];if(typeof E.bind=="function")return E.bind(C);try{return Function.prototype.bind.call(E,C)}catch{return function(){return Function.prototype.apply.apply(E,[C,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(C){return C==="debug"&&(C="log"),typeof console===t?!1:C==="trace"&&n?o:console[C]!==void 0?c(console,C):console.log!==void 0?c(console,"log"):r}function l(){for(var C=this.getLevel(),$=0;$<i.length;$++){var E=i[$];this[E]=$<C?r:this.methodFactory(E,C,this.name)}if(this.log=this.debug,typeof console===t&&C<this.levels.SILENT)return"No console available for logging"}function f(C){return function(){typeof console!==t&&(l.call(this),this[C].apply(this,arguments))}}function v(C,$,E){return u(C)||f.apply(this,arguments)}function m(C,$){var E=this,A,N,U,J="loglevel";typeof C=="string"?J+=":"+C:typeof C=="symbol"&&(J=void 0);function H(ie){var me=(i[ie]||"silent").toUpperCase();if(!(typeof window===t||!J)){try{window.localStorage[J]=me;return}catch{}try{window.document.cookie=encodeURIComponent(J)+"="+me+";"}catch{}}}function W(){var ie;if(!(typeof window===t||!J)){try{ie=window.localStorage[J]}catch{}if(typeof ie===t)try{var me=window.document.cookie,Z=encodeURIComponent(J),Ne=me.indexOf(Z+"=");Ne!==-1&&(ie=/^([^;]+)/.exec(me.slice(Ne+Z.length+1))[1])}catch{}return E.levels[ie]===void 0&&(ie=void 0),ie}}function L(){if(!(typeof window===t||!J)){try{window.localStorage.removeItem(J)}catch{}try{window.document.cookie=encodeURIComponent(J)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function ee(ie){var me=ie;if(typeof me=="string"&&E.levels[me.toUpperCase()]!==void 0&&(me=E.levels[me.toUpperCase()]),typeof me=="number"&&me>=0&&me<=E.levels.SILENT)return me;throw new TypeError("log.setLevel() called with invalid level: "+ie)}E.name=C,E.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},E.methodFactory=$||v,E.getLevel=function(){return U??N??A},E.setLevel=function(ie,me){return U=ee(ie),me!==!1&&H(U),l.call(E)},E.setDefaultLevel=function(ie){N=ee(ie),W()||E.setLevel(ie,!1)},E.resetLevel=function(){U=null,L(),l.call(E)},E.enableAll=function(ie){E.setLevel(E.levels.TRACE,ie)},E.disableAll=function(ie){E.setLevel(E.levels.SILENT,ie)},E.rebuild=function(){if(s!==E&&(A=ee(s.getLevel())),l.call(E),s===E)for(var ie in a)a[ie].rebuild()},A=ee(s?s.getLevel():"WARN");var Y=W();Y!=null&&(U=ee(Y)),l.call(E)}s=new m,s.getLogger=function($){if(typeof $!="symbol"&&typeof $!="string"||$==="")throw new TypeError("You must supply a name when creating a logger.");var E=a[$];return E||(E=a[$]=new m($,s.methodFactory)),E};var b=typeof window!==t?window.log:void 0;return s.noConflict=function(){return typeof window!==t&&window.log===s&&(window.log=b),s},s.getLoggers=function(){return a},s.default=s,s})})(GT);var yr=GT.exports;const Qa="\\d+(?:[\\.,]\\d+)?",HF=`(${Qa}W)`,KF=`(${Qa}Y)?(${Qa}M)?(${Qa}D)?`,JF=`T(${Qa}H)?(${Qa}M)?(${Qa}S)?`,YF=`P(?:${HF}|${KF}(?:${JF})?)`,XF=["weeks","years","months","days","hours","minutes","seconds"],fm=new RegExp(YF),WT=e=>e.match(fm).slice(1).reduce((r,t,n)=>(r[XF[n]]=parseFloat(t)||0,r),{}),dm=(e,r)=>{const t=r?r.getTime():Date.now(),n=new Date(t);return n.setFullYear(n.getFullYear()+e.years),n.setMonth(n.getMonth()+e.months),n.setDate(n.getDate()+e.days),n.setHours(n.getHours()+e.hours),n.setMinutes(n.getMinutes()+e.minutes),n.setMilliseconds(n.getMilliseconds()+e.seconds*1e3),n.setDate(n.getDate()+e.weeks*7),n},VT=(e,r)=>{const t=r?r.getTime():Date.now(),n=new Date(t);return(dm(e,n).getTime()-n.getTime())/1e3},QF={end:dm,toSeconds:VT,pattern:fm,parse:WT},ZF=Object.freeze(Object.defineProperty({__proto__:null,default:QF,end:dm,parse:WT,pattern:fm,toSeconds:VT},Symbol.toStringTag,{value:"Module"})),eU=F0(ZF);var tU=qt,rU=Ra,nU=qr.f,dh=tU("unscopables"),ph=Array.prototype;ph[dh]===void 0&&nU(ph,dh,{configurable:!0,value:rU(null)});var pm=function(e){ph[dh][e]=!0},iU=vn,hm=pm,Rb=$u,HT=mn,aU=qr.f,sU=lm,ac=Ql,oU=Wt,KT="Array Iterator",uU=HT.set,cU=HT.getterFor(KT),JT=sU(Array,"Array",function(e,r){uU(this,{type:KT,target:iU(e),index:0,kind:r})},function(){var e=cU(this),r=e.target,t=e.index++;if(!r||t>=r.length)return e.target=void 0,ac(void 0,!0);switch(e.kind){case"keys":return ac(t,!1);case"values":return ac(r[t],!1)}return ac([t,r[t]],!1)},"values"),$b=Rb.Arguments=Rb.Array;hm("keys");hm("values");hm("entries");if(oU&&$b.name!=="values")try{aU($b,"name",{value:"values"})}catch{}var Pb=St,YT=IT,lU=OT,qo=JT,Ib=Vi,fU=pi,dU=qt,Rd=dU("iterator"),$d=qo.values,XT=function(e,r){if(e){if(e[Rd]!==$d)try{Ib(e,Rd,$d)}catch{e[Rd]=$d}if(fU(e,r,!0),YT[r]){for(var t in qo)if(e[t]!==qo[t])try{Ib(e,t,qo[t])}catch{e[t]=qo[t]}}}};for(var Pd in YT)XT(Pb[Pd]&&Pb[Pd].prototype,Pd);XT(lU,"DOMTokenList");var pU=Bt,hU=Jt,Ob=ho,Zl=function(e,r,t){var n,i;return Ob&&pU(n=r.constructor)&&n!==t&&hU(i=n.prototype)&&i!==t.prototype&&Ob(e,i),e},vU=gt,mU=vU(1 .valueOf),gU=`
|
|
9
9
|
\v\f\r \u2028\u2029\uFEFF`,yU=gt,bU=Jn,_U=Sr,hh=gU,Ab=yU("".replace),wU=RegExp("^["+hh+"]+"),SU=RegExp("(^|[^"+hh+"])["+hh+"]+$"),Id=function(e){return function(r){var t=_U(bU(r));return e&1&&(t=Ab(t,wU,"")),e&2&&(t=Ab(t,SU,"$1")),t}},CU={start:Id(1),end:Id(2),trim:Id(3)},TU=bt,QT=J0,EU=Wt,ZT=St,eE=SC,tE=gt,kU=jl,Mb=tr,RU=Zl,$U=Wi,PU=lo,rE=Mv,IU=dt,OU=us.f,AU=Gi.f,MU=qr.f,xU=mU,NU=CU.trim,ef="Number",Us=ZT[ef];eE[ef];var vm=Us.prototype,LU=ZT.TypeError,DU=tE("".slice),sc=tE("".charCodeAt),jU=function(e){var r=rE(e,"number");return typeof r=="bigint"?r:FU(r)},FU=function(e){var r=rE(e,"number"),t,n,i,a,s,c,o,u;if(PU(r))throw new LU("Cannot convert a Symbol value to a number");if(typeof r=="string"&&r.length>2){if(r=NU(r),t=sc(r,0),t===43||t===45){if(n=sc(r,2),n===88||n===120)return NaN}else if(t===48){switch(sc(r,1)){case 66:case 98:i=2,a=49;break;case 79:case 111:i=8,a=55;break;default:return+r}for(s=DU(r,2),c=s.length,o=0;o<c;o++)if(u=sc(s,o),u<48||u>a)return NaN;return parseInt(s,i)}}return+r},mm=kU(ef,!Us(" 0o1")||!Us("0b1")||Us("+0x1")),UU=function(e){return $U(vm,e)&&IU(function(){xU(e)})},tf=function(r){var t=arguments.length<1?0:Us(jU(r));return UU(this)?RU(Object(t),this,tf):t};tf.prototype=vm;mm&&!QT&&(vm.constructor=tf);TU({global:!0,constructor:!0,wrap:!0,forced:mm},{Number:tf});var BU=function(e,r){for(var t=EU?OU(r):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),n=0,i;t.length>n;n++)Mb(r,i=t[n])&&!Mb(e,i)&&MU(e,i,AU(r,i))};(mm||QT)&&BU(eE[ef],Us);var qU=sr,nE=function(){var e=qU(this),r="";return e.hasIndices&&(r+="d"),e.global&&(r+="g"),e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.dotAll&&(r+="s"),e.unicode&&(r+="u"),e.unicodeSets&&(r+="v"),e.sticky&&(r+="y"),r},gm=dt,zU=St,ym=zU.RegExp,bm=gm(function(){var e=ym("a","y");return e.lastIndex=2,e.exec("abcd")!==null}),GU=bm||gm(function(){return!ym("a","y").sticky}),WU=bm||gm(function(){var e=ym("^r","gy");return e.lastIndex=2,e.exec("str")!==null}),iE={BROKEN_CARET:WU,MISSED_STICKY:GU,UNSUPPORTED_Y:bm},VU=dt,HU=St,KU=HU.RegExp,JU=VU(function(){var e=KU(".","s");return!(e.dotAll&&e.test(`
|
|
10
10
|
`)&&e.flags==="s")}),YU=dt,XU=St,QU=XU.RegExp,ZU=YU(function(){var e=QU("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Ns=Ut,rf=gt,e3=Sr,t3=nE,r3=iE,n3=fo,i3=Ra,a3=mn.get,s3=JU,o3=ZU,u3=n3("native-string-replace",String.prototype.replace),ml=RegExp.prototype.exec,vh=ml,c3=rf("".charAt),l3=rf("".indexOf),f3=rf("".replace),Od=rf("".slice),mh=function(){var e=/a/,r=/b*/g;return Ns(ml,e,"a"),Ns(ml,r,"a"),e.lastIndex!==0||r.lastIndex!==0}(),aE=r3.BROKEN_CARET,gh=/()??/.exec("")[1]!==void 0,d3=mh||gh||aE||s3||o3;d3&&(vh=function(r){var t=this,n=a3(t),i=e3(r),a=n.raw,s,c,o,u,l,f,v;if(a)return a.lastIndex=t.lastIndex,s=Ns(vh,a,i),t.lastIndex=a.lastIndex,s;var m=n.groups,b=aE&&t.sticky,C=Ns(t3,t),$=t.source,E=0,A=i;if(b&&(C=f3(C,"y",""),l3(C,"g")===-1&&(C+="g"),A=Od(i,t.lastIndex),t.lastIndex>0&&(!t.multiline||t.multiline&&c3(i,t.lastIndex-1)!==`
|
|
11
11
|
`)&&($="(?: "+$+")",A=" "+A,E++),c=new RegExp("^(?:"+$+")",C)),gh&&(c=new RegExp("^"+$+"$(?!\\s)",C)),mh&&(o=t.lastIndex),u=Ns(ml,b?c:t,A),b?u?(u.input=Od(u.input,E),u[0]=Od(u[0],E),u.index=t.lastIndex,t.lastIndex+=u[0].length):t.lastIndex=0:mh&&u&&(t.lastIndex=t.global?u.index+u[0].length:o),gh&&u&&u.length>1&&Ns(u3,u[0],c,function(){for(l=1;l<arguments.length-2;l++)arguments[l]===void 0&&(u[l]=void 0)}),u&&m)for(u.groups=f=i3(null),l=0;l<m.length;l++)v=m[l],f[v[0]]=u[v[1]];return u});var _m=vh,p3=bt,xb=_m;p3({target:"RegExp",proto:!0,forced:/./.exec!==xb},{exec:xb});var Nb=Ut,Lb=zr,h3=_m,Db=dt,sE=qt,v3=Vi,m3=sE("species"),Ad=RegExp.prototype,nf=function(e,r,t,n){var i=sE(e),a=!Db(function(){var u={};return u[i]=function(){return 7},""[e](u)!==7}),s=a&&!Db(function(){var u=!1,l=/a/;return e==="split"&&(l={},l.constructor={},l.constructor[m3]=function(){return l},l.flags="",l[i]=/./[i]),l.exec=function(){return u=!0,null},l[i](""),!u});if(!a||!s||t){var c=/./[i],o=r(i,""[e],function(u,l,f,v,m){var b=l.exec;return b===h3||b===Ad.exec?a&&!m?{done:!0,value:Nb(c,l,f,v)}:{done:!0,value:Nb(u,f,l,v)}:{done:!1}});Lb(String.prototype,e,o[0]),Lb(Ad,i,o[1])}n&&v3(Ad[i],"sham",!0)},g3=cm.charAt,wm=function(e,r,t){return r+(t?g3(e,r).length:1)},Sm=gt,y3=Nr,b3=Math.floor,Md=Sm("".charAt),_3=Sm("".replace),xd=Sm("".slice),w3=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,S3=/\$([$&'`]|\d{1,2})/g,C3=function(e,r,t,n,i,a){var s=t+e.length,c=n.length,o=S3;return i!==void 0&&(i=y3(i),o=w3),_3(a,o,function(u,l){var f;switch(Md(l,0)){case"$":return"$";case"&":return e;case"`":return xd(r,0,t);case"'":return xd(r,s);case"<":f=i[xd(l,1,-1)];break;default:var v=+l;if(v===0)return u;if(v>c){var m=b3(v/10);return m===0?u:m<=c?n[m-1]===void 0?Md(l,1):n[m-1]+Md(l,1):u}f=n[v-1]}return f===void 0?"":f})},jb=Ut,T3=sr,E3=Bt,k3=fi,R3=_m,$3=TypeError,af=function(e,r){var t=e.exec;if(E3(t)){var n=jb(t,e,r);return n!==null&&T3(n),n}if(k3(e)==="RegExp")return jb(R3,e,r);throw new $3("RegExp#exec called on incompatible receiver")},P3=cs,Fb=Ut,sf=gt,I3=nf,O3=dt,A3=sr,M3=Bt,x3=Kn,N3=di,L3=Hi,ws=Sr,D3=Jn,j3=wm,F3=os,U3=C3,B3=af,q3=qt,yh=q3("replace"),z3=Math.max,G3=Math.min,W3=sf([].concat),Nd=sf([].push),Ub=sf("".indexOf),Bb=sf("".slice),V3=function(e){return e===void 0?e:String(e)},H3=function(){return"a".replace(/./,"$0")==="$0"}(),qb=function(){return/./[yh]?/./[yh]("a","$0")==="":!1}(),K3=!O3(function(){var e=/./;return e.exec=function(){var r=[];return r.groups={a:"7"},r},"".replace(e,"$<a>")!=="7"});I3("replace",function(e,r,t){var n=qb?"$":"$0";return[function(a,s){var c=D3(this),o=x3(a)?void 0:F3(a,yh);return o?Fb(o,a,c,s):Fb(r,ws(c),a,s)},function(i,a){var s=A3(this),c=ws(i);if(typeof a=="string"&&Ub(a,n)===-1&&Ub(a,"$<")===-1){var o=t(r,s,c,a);if(o.done)return o.value}var u=M3(a);u||(a=ws(a));var l=s.global,f;l&&(f=s.unicode,s.lastIndex=0);for(var v=[],m;m=B3(s,c),!(m===null||(Nd(v,m),!l));){var b=ws(m[0]);b===""&&(s.lastIndex=j3(c,L3(s.lastIndex),f))}for(var C="",$=0,E=0;E<v.length;E++){m=v[E];for(var A=ws(m[0]),N=z3(G3(N3(m.index),c.length),0),U=[],J,H=1;H<m.length;H++)Nd(U,V3(m[H]));var W=m.groups;if(u){var L=W3([A],U,N,c);W!==void 0&&Nd(L,W),J=ws(P3(a,void 0,L))}else J=U3(A,c,N,U,W,a);N>=$&&(C+=Bb(c,$,N)+J,$=N+A.length)}return C+Bb(c,$)}]},!K3||!H3||qb);var J3=bt,Y3=gt,X3=pu,Q3=vn,Z3=Xl,eB=Y3([].join),tB=X3!==Object,rB=tB||!Z3("join",",");J3({target:"Array",proto:!0,forced:rB},{join:function(r){return eB(Q3(this),r===void 0?",":r)}});var Rr={},nB=bt,zb=_u,iB=Fl,aB=Jt,Gb=po,sB=Lr,oB=vn,uB=Eu,cB=qt,lB=Tu,fB=hi,dB=lB("slice"),pB=cB("species"),Ld=Array,hB=Math.max;nB({target:"Array",proto:!0,forced:!dB},{slice:function(r,t){var n=oB(this),i=sB(n),a=Gb(r,i),s=Gb(t===void 0?i:t,i),c,o,u;if(zb(n)&&(c=n.constructor,iB(c)&&(c===Ld||zb(c.prototype))?c=void 0:aB(c)&&(c=c[pB],c===null&&(c=void 0)),c===Ld||c===void 0))return fB(n,a,s);for(o=new(c===void 0?Ld:c)(hB(s-a,0)),u=0;a<s;a++,u++)a in n&&uB(o,u,n[a]);return o.length=u,o}});var vB=bt,Wb=Ut,mB=Bt,Vb=sr,gB=Sr,yB=function(){var e=!1,r=/[ac]/;return r.exec=function(){return e=!0,/./.exec.apply(this,arguments)},r.test("abc")===!0&&e}(),bB=/./.test;vB({target:"RegExp",proto:!0,forced:!yB},{test:function(e){var r=Vb(this),t=gB(e),n=r.exec;if(!mB(n))return Wb(bB,r,t);var i=Wb(n,r,t);return i===null?!1:(Vb(i),!0)}});var _B=bt,wB=Wt,SB=St,oc=gt,CB=tr,TB=Bt,EB=Wi,kB=Sr,RB=vi,$B=jv,Oi=SB.Symbol,Ba=Oi&&Oi.prototype;if(wB&&TB(Oi)&&(!("description"in Ba)||Oi().description!==void 0)){var Hb={},uc=function(){var r=arguments.length<1||arguments[0]===void 0?void 0:kB(arguments[0]),t=EB(Ba,this)?new Oi(r):r===void 0?Oi():Oi(r);return r===""&&(Hb[t]=!0),t};$B(uc,Oi),uc.prototype=Ba,Ba.constructor=uc;var PB=String(Oi("description detection"))==="Symbol(description detection)",IB=oc(Ba.valueOf),OB=oc(Ba.toString),AB=/^Symbol\((.*)\)[^)]+$/,MB=oc("".replace),xB=oc("".slice);RB(Ba,"description",{configurable:!0,get:function(){var r=IB(this);if(CB(Hb,r))return"";var t=OB(r),n=PB?xB(t,7,-1):MB(t,AB,"$1");return n===""?void 0:n}}),_B({global:!0,constructor:!0,forced:!0},{Symbol:uc})}var NB=CC;NB("iterator");var LB=Wt,DB=vu.EXISTS,oE=gt,jB=vi,uE=Function.prototype,FB=oE(uE.toString),cE=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,UB=oE(cE.exec),BB="name";LB&&!DB&&jB(uE,BB,{configurable:!0,get:function(){try{return UB(cE,FB(this))[1]}catch{return""}}});var lE={exports:{}},fE={exports:{}};(function(e){function r(t){if(Array.isArray(t))return t}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(fE);var qB=fE.exports,dE={exports:{}};(function(e){function r(t,n){var i=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(i!=null){var a,s,c,o,u=[],l=!0,f=!1;try{if(c=(i=i.call(t)).next,n===0){if(Object(i)!==i)return;l=!1}else for(;!(l=(a=c.call(i)).done)&&(u.push(a.value),u.length!==n);l=!0);}catch(v){f=!0,s=v}finally{try{if(!l&&i.return!=null&&(o=i.return(),Object(o)!==o))return}finally{if(f)throw s}}return u}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(dE);var zB=dE.exports,pE={exports:{}},hE={exports:{}};(function(e){function r(t,n){(n==null||n>t.length)&&(n=t.length);for(var i=0,a=Array(n);i<n;i++)a[i]=t[i];return a}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(hE);var vE=hE.exports;(function(e){var r=vE;function t(n,i){if(n){if(typeof n=="string")return r(n,i);var a={}.toString.call(n).slice(8,-1);return a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set"?Array.from(n):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?r(n,i):void 0}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(pE);var mE=pE.exports,gE={exports:{}};(function(e){function r(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var G$ = Object.defineProperty;
|
|
2
2
|
var W$ = (e, r, t) => r in e ? G$(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
|
|
3
3
|
var ct = (e, r, t) => W$(e, typeof r != "symbol" ? r + "" : r, t);
|
|
4
|
-
const $Z = "prod", $0 = "3.
|
|
4
|
+
const $Z = "prod", $0 = "3.3.1", Cg = "https://main.api.ujet.co", xr = {
|
|
5
5
|
companyId: "",
|
|
6
6
|
tenant: "",
|
|
7
7
|
trackerId: "",
|
|
@@ -231,6 +231,7 @@ function nP(e) {
|
|
|
231
231
|
cobrowse: n,
|
|
232
232
|
companyId: e.companyId,
|
|
233
233
|
location: location.href,
|
|
234
|
+
version: e.version || "3.3.1",
|
|
234
235
|
bridge: e.bridge || "https://websdk.ujet.co/v3/bridge.html"
|
|
235
236
|
};
|
|
236
237
|
}
|
|
@@ -738,6 +739,13 @@ class wP {
|
|
|
738
739
|
async getWaitTimes(r, t = "en") {
|
|
739
740
|
return (await this.get(`menus/${r}/wait_times`, { type: "web_menu", lang: t })).data;
|
|
740
741
|
}
|
|
742
|
+
async verifyForm(r) {
|
|
743
|
+
try {
|
|
744
|
+
return await this.post("forms/verify", r), !0;
|
|
745
|
+
} catch {
|
|
746
|
+
return !1;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
741
749
|
async finishChat(r) {
|
|
742
750
|
return (await this.patch(`chats/${r}`, { status: "finished" })).data;
|
|
743
751
|
}
|
|
@@ -755,6 +763,12 @@ class wP {
|
|
|
755
763
|
data: t
|
|
756
764
|
}, this.post(`chats/${r}/custom_data`, n);
|
|
757
765
|
}
|
|
766
|
+
async downloadChatTranscript(r) {
|
|
767
|
+
return (await this.post(`chats/${r}/generate_transcript_pdf`, {})).data;
|
|
768
|
+
}
|
|
769
|
+
async getPdfStatus(r) {
|
|
770
|
+
return await this.get(`chat_transcript_pdfs/${r}/download_transcript`);
|
|
771
|
+
}
|
|
758
772
|
sendChatTranscripts(r, t) {
|
|
759
773
|
return this.post(`chats/${r}/transcripts`, {
|
|
760
774
|
emails: t.join(",")
|
|
@@ -872,6 +886,9 @@ class wP {
|
|
|
872
886
|
}), i.on("memberJoined", async () => {
|
|
873
887
|
const s = await this.getChat(i.id);
|
|
874
888
|
i.update(s);
|
|
889
|
+
}), i.on("memberLeft", async () => {
|
|
890
|
+
const s = await this.getChat(i.id);
|
|
891
|
+
i.update(s);
|
|
875
892
|
}), i;
|
|
876
893
|
}
|
|
877
894
|
async createCall(r, t, n) {
|
|
@@ -1523,6 +1540,9 @@ let IZ = class {
|
|
|
1523
1540
|
getWaitTimes(r, t) {
|
|
1524
1541
|
return this.methods.getWaitTimes(r, t || this.lang);
|
|
1525
1542
|
}
|
|
1543
|
+
verifyForm(r) {
|
|
1544
|
+
return this.methods.verifyForm(r);
|
|
1545
|
+
}
|
|
1526
1546
|
createCall(r, t) {
|
|
1527
1547
|
var n;
|
|
1528
1548
|
return !t.email && ((n = this.user) != null && n.email) && (t.email = this.user.email), this.methods.createCall(Number(r), t.lang || this.lang, t);
|
|
@@ -1583,6 +1603,12 @@ let IZ = class {
|
|
|
1583
1603
|
sendChatTranscripts(r) {
|
|
1584
1604
|
return this.methods.sendChatTranscripts(this.chat.id, r);
|
|
1585
1605
|
}
|
|
1606
|
+
async downloadChatTranscript() {
|
|
1607
|
+
return await this.methods.downloadChatTranscript(this.chat.id);
|
|
1608
|
+
}
|
|
1609
|
+
async getPdfStatus(r) {
|
|
1610
|
+
return await this.methods.getPdfStatus(r);
|
|
1611
|
+
}
|
|
1586
1612
|
getChatSurvey() {
|
|
1587
1613
|
return this.methods.getChatSurvey(this.chat.id);
|
|
1588
1614
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ujet/websdk-headless",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"types": "dist/index.d.ts",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/index.mjs",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
12
13
|
"import": "./dist/index.mjs",
|
|
13
14
|
"require": "./dist/index.js"
|
|
14
15
|
}
|