@wxcc-desktop/sdk 2.0.5 → 2.0.7

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.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(window,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=50)}([function(e,t,n){var i;self,i=()=>(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{AssertUtils:()=>$,BrowserNotification:()=>h,Decorator:()=>E,Err:()=>f,Evt:()=>I,I18N:()=>N,Logger:()=>u,NotificationItemsContent:()=>P,Notifications:()=>V,Signal:()=>j,clearInterval:()=>W,clearTimeout:()=>Z,createBrowserNotifications:()=>v,createHttp:()=>O,createLogger:()=>l,createNotifications:()=>F,ensureError:()=>K,setInterval:()=>G,setTimeout:()=>Y});const i=n(8);var r=e.n(i);const o=n(37),s="*********";class a{constructor(e){this.maskKeys=e}tryJSONParse(e){try{return JSON.parse(e)}catch(e){return}}copiedObj(e){try{return JSON.parse(JSON.stringify(e))}catch(t){return e}}maskObjectProperty(e){const t=e;Object.keys(e).forEach(n=>{"object"==typeof e[n]&&null!==e[n]?this.maskObjectProperty(e[n]):t[n]=s})}maskLogData(e){Object.keys(e).forEach(t=>{"object"==typeof e[t]&&null!==e[t]?this.maskKeys[t]?this.maskObjectProperty(e[t]):this.maskLogData(e[t]):(this.maskKeys[t]&&"string"==typeof e[t]||"value"===t&&this.maskKeys[e.name])&&(e[t]=s)})}maskPIIInformation(e){const t=e[e.length-1],n="string"==typeof t?this.tryJSONParse(t):this.copiedObj(t);n&&"object"==typeof n&&(this.maskLogData(n),e.splice(e.length-1,1,n))}}const c=(...e)=>e.map(e=>"string"==typeof e?e:JSON.stringify(e));var u;function l(e,t){const n=new u.Service(e,t);return u.POOL.addLogger(n),n}!function(e){e.MAX_LOGS_SIZE=1048576,e.LS_LOGS_KEY="uuip-client-logs";const t="<uuip-eol>",n=/[\u0100-\uFFFF]/g,i="yyyy-LL-dd HH:mm:ss:SSS";let s;e.defaultSaveIntervalMilliSeconds=5e3,function(e){e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Warn=3]="Warn",e[e.Error=4]="Error",e[e.Fatal=5]="Fatal"}(s=e.Level||(e.Level={})),e.Service=class{constructor(e,t){this.loggerEmitter=r()(),this.prefix=e,this.maskKeys=t}log(t,...n){this.maskKeys&&"object"==typeof this.maskKeys&&((e,t)=>{new a(t).maskPIIInformation(e)})(n,this.maskKeys);const r=c(this.prefix?[""+this.prefix,...n]:n),s=Date.now(),u=o.DateTime.fromMillis(s).toFormat(i);switch(t){case e.Level.Trace:console.info(u,...r);break;case e.Level.Debug:console.log(u,...r);break;case e.Level.Warn:console.warn(u,...r);break;case e.Level.Error:case e.Level.Fatal:console.error(u,...r);break;default:console.log(...r)}const l={pfx:this.prefix,msgs:[...n],ts:s,lvl:t};this.emit("add",l)}info(...e){this.log(s.Trace,...e)}debug(...e){this.log(s.Debug,...e)}warn(...e){this.log(s.Warn,...e)}error(...e){this.log(s.Error,...e)}emit(e,...t){this.loggerEmitter.emit(e,...t)}addEventListener(e,t){return this.loggerEmitter.on(e,t),()=>{this.removeEventListener(e,t)}}removeEventListener(e,t){this.loggerEmitter.off(e,t)}};class u{constructor(){this.loggers=new Map,this.logsCollectionString="",this.prefixedLogsCollections={},this.lastSaveTime=Date.now(),this.config={saveIntervalMilliSeconds:e.defaultSaveIntervalMilliSeconds},this.logRecordsSerializedLength=0,this.flush=()=>{this.save(!1)},this.onLoggerAddRecord=e=>{this.addLogRecord(e),this.save(!0)},this.restore()}static getSerializedJsonLogRecordBytesSize(e=""){const t=e.length;if(t){const i=e.replace(n,"").length;return 1*i+2*(t-i)}return t}get serializedJsonLogsBytesSize(){const e=this.logsCollectionString.split(t).length;return 2+this.logRecordsSerializedLength+1*(e-1)}save(t=!0){const n=Date.now();t&&n-this.lastSaveTime<this.config.saveIntervalMilliSeconds||(this.lastSaveTime=n,window.sessionStorage.setItem(e.LS_LOGS_KEY,this.logsCollectionString))}restore(){try{const t=window.sessionStorage.getItem(e.LS_LOGS_KEY)||"";this.logsCollectionString=t,this.logRecordsSerializedLength+=u.getSerializedJsonLogRecordBytesSize(this.logsCollectionString),this.restorePreFixedLogs()}catch(e){console.warn("Logger failed read logs from sessionStorage: ",e)}}getLogObjectFromString(){try{return""!==this.logsCollectionString?JSON.parse(`[${this.logsCollectionString.split(t).join(",")}]`):[]}catch(e){console.log("Error parsing local storage data")}}restorePreFixedLogs(){const e=this.getLogObjectFromString();e&&Array.isArray(e)&&e.length>0&&e.forEach(e=>{this.addPreFixedLogs(e),this.removeOversized()})}addPreFixedLogs(e){this.prefixedLogsCollections[e.pfx]=this.prefixedLogsCollections[e.pfx]||new Set,this.prefixedLogsCollections[e.pfx].add(e)}removeOversized(){for(;this.serializedJsonLogsBytesSize>e.MAX_LOGS_SIZE&&""!==this.logsCollectionString;)this.removeLogRecord()}removeTextFromString(e,t,n){return`${e.slice(0,t)}${e.slice(n+t)}`}addLogRecord(e){try{const n=JSON.stringify(e),i=this.logsCollectionString;this.logsCollectionString=null==i?void 0:i.concat(`${""!==i.trim()?t:""}${n}`)}catch(t){const n=JSON.stringify(e);this.logsCollectionString=n,console.warn("Logger failed read logs from sessionStorage: ",t)}this.logRecordsSerializedLength+=u.getSerializedJsonLogRecordBytesSize(JSON.stringify(e)),this.addPreFixedLogs(e),this.removeOversized()}removeLogRecord(){if(""!==this.logsCollectionString){const e=this.logsCollectionString.indexOf(t);if(-1!==e){const t=this.logsCollectionString.substring(0,e),n=e+10,i=this.removeTextFromString(this.logsCollectionString,0,n);this.logsCollectionString=i,this.logRecordsSerializedLength-=u.getSerializedJsonLogRecordBytesSize(t);try{const e=JSON.parse(t);this.prefixedLogsCollections[e.pfx]&&this.prefixedLogsCollections[e.pfx].forEach(t=>{t.ts===e.ts&&this.prefixedLogsCollections[e.pfx].delete(t)})}catch(e){console.warn("Logger failed to read/parse the first logs from sessionStorage: ",e)}}}}removePreFixedLogs(e){const n=this.getLogObjectFromString();e.forEach(e=>{const t=n.findIndex(t=>t.pfx===e.pfx);-1!==t&&(n.splice(t,1),this.logRecordsSerializedLength-=u.getSerializedJsonLogRecordBytesSize(JSON.stringify(e)),this.prefixedLogsCollections[e.pfx]&&this.prefixedLogsCollections[e.pfx].has(e)&&this.prefixedLogsCollections[e.pfx].delete(e))}),this.logsCollectionString=n.map(e=>JSON.stringify(e)).join(t)}static getLogRecordReadable(e){if(e.ts)return{prefix:e.pfx,messages:e.msgs,timestamp:o.DateTime.fromMillis(e.ts).toFormat(i),level:s[e.lvl]}}static getLogsReadableJson(e){const t=e=>e.map(e=>u.getLogRecordReadable(e));return JSON.stringify(Array.isArray(e)?t(e):Object.keys(e).reduce((n,i)=>(n[i]=t(e[i]),n),{}),null,2)}static getLogsReadableText(e){const t=e=>e.reduce((e,t)=>{const n=u.getLogRecordReadable(t);return n&&(e+=`${n.timestamp} ${n.prefix} ${n.level} ${c(n.messages).join(" ")} \r\n`),e},"");return Array.isArray(e)?t(e):Object.keys(e).reduce((n,i)=>(n+=`[SERVICE "${i}" LOGS]: `)+t(e[i]),"")}static getLogsUrl(e){return"data:text/plain;charset=utf-8,"+encodeURIComponent(e)}static browserDownload(e,t){try{if(document&&document.createElement){const n=document.createElement("a");n.setAttribute("href",e),n.setAttribute("download",t),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}else console.warn("Browser is not supported to download logs")}catch(e){}}addLogger(e){this.loggers.set(e.prefix,e),e.removeEventListener("add",this.onLoggerAddRecord),e.addEventListener("add",this.onLoggerAddRecord)}getAllLogsJsonUrl(){return u.getLogsUrl(u.getLogsReadableJson(this.getLogObjectFromString()))}getAllPrefixedLogsJsonUrl(){return u.getLogsUrl(u.getLogsReadableJson(this.getAllPrefixedLogsCollections()))}getPrefixedLogsJsonUrl(e){return u.getLogsUrl(u.getLogsReadableJson(this.getPrefixedLogsCollection(e)))}getAllLogsTextUrl(){return u.getLogsUrl(u.getLogsReadableText(this.getLogObjectFromString()))}getPrefixedLogsTextUrl(e){return u.getLogsUrl(u.getLogsReadableText(this.getPrefixedLogsCollection(e)))}browserDownloadAllLogsJson(){u.browserDownload(this.getAllLogsJsonUrl(),new Date+"_all_logs.json")}browserDownloadAllPrefixedLogsJson(){u.browserDownload(this.getAllPrefixedLogsJsonUrl(),new Date+"_all_prefixed_logs.json")}browserDownloadPrefixedLogsJson(e){u.browserDownload(this.getPrefixedLogsJsonUrl(e),`${new Date}_${e}_logs.json`)}browserDownloadAllLogsText(){u.browserDownload(this.getAllLogsTextUrl(),new Date+"_all_logs.log")}browserDownloadPrefixedLogsText(e){u.browserDownload(this.getPrefixedLogsTextUrl(e),`${new Date}_${e}_logs.log`)}cleanupAllLogs(){this.logRecordsSerializedLength=0,this.logsCollectionString="",Object.keys(this.prefixedLogsCollections).forEach(e=>this.prefixedLogsCollections[e]=new Set),this.save(!0)}cleanupPrefixedLogs(e){const t=this.getPrefixedLogsCollection(e);this.removePreFixedLogs(t),this.prefixedLogsCollections[e]=new Set,this.save(!0)}getAllPrefixedLogsCollections(){return Object.keys(this.prefixedLogsCollections).reduce((e,t)=>(e[t]=this.getPrefixedLogsCollection(t),e),{})}getPrefixedLogsCollection(e){return Array.from(this.prefixedLogsCollections[e]||new Set)}}e.ServicesPool=u,e.POOL=new e.ServicesPool}(u||(u={}));const d=l("unified-ui-platform-sdk",{title:!0,text:!0});var h,f;function v(e){return new h.Service(e)}function p(e,t){if(e.descriptor=e.descriptor||Object.getOwnPropertyDescriptor(e.target,e.key),"function"!=typeof e.descriptor.value)return console.warn(e.key,"Decorator must be used on function"),e.descriptor;const n=e.descriptor.value,i=e.target.constructor.name;return e.descriptor.value=function(){const e=[];for(let t=0;t<arguments.length;t++)e[t]=arguments[t];return t.call(this,n,e,i)},e.descriptor}function g(e=250){return function(t,n,i){let r;return p({target:t,key:n,descriptor:i},(function(t,n){clearTimeout(r),r=window.setTimeout(()=>{clearTimeout(r),t.apply(this,n)},e)}))}}function m(){return(e,t)=>{const n={get(){return new I(this,void 0!==t?t:e.key)},enumerable:!0,configurable:!0};return void 0!==t?Object.defineProperty(e,t,n):{kind:"method",placement:"prototype",key:e.key,descriptor:n}}}function y(e,t=!0){return function(n,i,r){return p({target:n,key:i,descriptor:r},(function(n,r){return o=this,a=function*(){const o="_"+i+"_exec_flag";if(t&&this[o])return void console.log("PREVENTING DOUBLE EXECUTION");const s=t=>{if(this[o]=t,"function"==typeof e)e.call(this,{isExec:t,ctx:this});else{const n=e;t?n.before&&n.before.call(this,this):n.after&&n.after.call(this,this)}};s(!0);const a=n.apply(this,r);return a instanceof Promise?a.then(()=>s(!1)).catch(()=>s(!1)):(console.warn("Must be async function to use [@Executing] decorator"),s(!1)),a},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{r(a.next(e))}catch(e){t(e)}}function i(e){try{r(a.throw(e))}catch(e){t(e)}}function r(t){var r;t.done?e(t.value):(r=t.value,r instanceof s?r:new s((function(e){e(r)}))).then(n,i)}r((a=a.apply(o,[])).next())}));var o,s,a}))}}!function(e){class t{static get isBrowserNotificationPromiseSupported(){try{window.Notification.requestPermission().then()}catch(e){return!1}return!0}constructor(e){this.defaultOptions=e||{}}get isBrowserNotificationSupported(){return!!("Notification"in window)}get isBrowserNotificationIconSupported(){return this.isBrowserNotificationSupported&&"icon"in window.Notification.prototype}get isBrowserNotificationImageSupported(){return this.isBrowserNotificationSupported&&"image"in window.Notification.prototype}get isBrowserNotificationBadgeSupported(){return this.isBrowserNotificationSupported&&"badge"in window.Notification.prototype}get isPermissionGranted(){return"granted"===window.Notification.permission}get isPermissionDenied(){return"denied"===window.Notification.permission}get isPermissionUnknown(){return!this.isPermissionGranted&&!this.isPermissionDenied}requestNotificationUserPermission(){return e=this,i=function*(){this.isBrowserNotificationSupported?t.isBrowserNotificationPromiseSupported?yield window.Notification.requestPermission():yield new Promise(e=>window.Notification.requestPermission(t=>e(t))):d.warn("Browser notification is not supported...")},new((n=void 0)||(n=Promise))((function(t,r){function o(e){try{a(i.next(e))}catch(e){r(e)}}function s(e){try{a(i.throw(e))}catch(e){r(e)}}function a(e){var i;e.done?t(e.value):(i=e.value,i instanceof n?i:new n((function(e){e(i)}))).then(o,s)}a((i=i.apply(e,[])).next())}));var e,n,i}fire(e,t){return new window.Notification(e,Object.assign(Object.assign({},this.defaultOptions),t||{}))}}e.Service=t}(h||(h={})),function(e){class t extends Error{constructor(e,t){super(),this.isErr="yes",this.id=e,this.stack=(new Error).stack,"string"==typeof t?this.message=t:t instanceof Error?(this.message=t.message,this.name=t.name):this.message=""}}e.Message=t;class n extends Error{constructor(e,t){super(),this.isErr="yes",this.id=e,this.stack=(new Error).stack,this.details=t}}e.Details=n}(f||(f={}));var E,b=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};function w(e){return function(t,n,i){return p({target:t,key:n,descriptor:i},(function(t,i,r){return b(this,void 0,void 0,(function*(){const o=this,s=t=>b(this,void 0,void 0,(function*(){t.id&&"string"==typeof t.id&&"yes"===t.isErr||("string"==typeof t||t instanceof Error?t=new f.Message("system",t):(console.warn("Err must be 'string' or 'new Error()' instance"),t=new f.Message("system","")));const i=t;i.ctx=o;const s=`Error] ${r}.${n} [${i.id}]: ${i.message}`;if("function"==typeof e){const t=e;console.log("[Handled"+s);const n=t.call(o,i);n instanceof Promise&&(yield n)}else{const t=e;if(t[i.id]){console.log("[Handled"+s);const e=t[i.id].call(o,i);e instanceof Promise&&(yield e)}else if(t.handle){console.log("[Handled"+s);const e=t.handle.call(o,i);e instanceof Promise&&(yield e)}else console.warn("[Unhandled "+s);if(t.fallback){const e=t.fallback.call(o,i);e instanceof Promise&&(yield e)}}}));try{const e=t.apply(o,i);return e instanceof Promise?new Promise(t=>{e.then(t).catch(e=>b(this,void 0,void 0,(function*(){yield s(e),t(void 0)})))}):e}catch(e){return void(yield s(e))}}))}))}}function S(){return function(e,t,n){return p({target:e,key:t,descriptor:n},(function(e,n){const i="_"+t+"_once_flag";if(!this[i])return this[i]=!0,e.call(this,n)}))}}function k(e=1e3/60){return function(t,n,i){let r,o=Date.now();return p({target:t,key:n,descriptor:i},(function(t,n){const i=(...n)=>{const s=Date.now();window.clearTimeout(r),!o||s-o>=e?(o=s,t.apply(this,n)):r=window.setTimeout(()=>i(...n),e-(s-o))};i(...n)}))}}!function(e){e.Debounce=g,e.Evt=m,e.Exec=y,e.Handle=w,e.Once=S,e.Throttle=k}(E||(E={}));class I{constructor(e,t){this.target=e,this.eventName=t}emit(e,t={bubbles:!0,composed:!0,cancelable:!1}){this.target.dispatchEvent(new CustomEvent(this.eventName,Object.assign({detail:e},t)))}}const A=n(49);var T=e.n(A);const C=n(51);function O(e){const t=T().create();return t.accessToken=e,t.interceptors.request.use(e=>{if(!e.headers.Authorization&&t.accessToken&&(e.headers.Authorization="Bearer "+t.accessToken),!e.headers.TrackingID){const t=(0,C.v1)();e.headers.TrackingID=`uuip_${t}_1.0:1.0`}return e.headers["Content-Type"]||(e.headers["Content-Type"]="application/json"),e}),t}const U=n(52);var R=e.n(U);const L=n(44);var x=e.n(L);const D=n(46);var N,P,_=e.n(D);!function(e){e.createService=e=>{const t=R().createInstance();{const n=e&&e.backend?e.backend:new(x());t.use(n)}{const n=e&&e.languageDetector?e.languageDetector:new(_());t.use(n)}return e&&e.logger&&t.use({log:"log"in e.logger?e.logger.log:e.logger.info,warn:e.logger.warn,error:e.logger.error,type:"logger"}),t},e.mergeServiceInitOptions=(...e)=>Object.assign.call(null,{},...e),e.createMixin=t=>{const n="i18n"in t?t.i18n:e.createService(),i="i18nInitOptions"in t?t.i18nInitOptions:null;i||d.info("i18n mixin instance waiting service initialization outside...");let r=!1;return e=>class extends e{constructor(){super(...arguments),this.onI18NInitialized=e=>this.requestUpdate(),this.onI18NLanguageChanged=e=>this.requestUpdate()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),n.on("initialized",this.onI18NInitialized),n.on("languageChanged",this.onI18NLanguageChanged),n.isInitialized||r||!i||(r=!0,n.init(i).finally(()=>r=!1))}disconnectedCallback(){n.off("initialized",this.onI18NInitialized),n.off("languageChanged",this.onI18NLanguageChanged),super.disconnectedCallback&&super.disconnectedCallback()}t(...e){return n.t(...e)}}}}(N||(N={})),function(e){e.DataController=class{constructor(e){this.localization={closeButtonText:"Close"},this.type=e.type,this.text=e.text,this.link=e.link,this.linkName=e.linkName,this.linkTooltip=e.linkTooltip,this.iconDetail=e.iconDetail,this.linkHandler=e.linkHandler,this.clickHandler=e.clickHandler,this.errorDetail=e.errorDetail,this.taskId=e.taskId,this.localization=e.localization||this.localization,this.dismissHandler=e.dismissHandler,this.actions=e.actions,this.lineClamp=e.lineClamp}}}(P||(P={}));const M=n(15);var V,j,q=e.n(M);function F(e={}){const t=new V.Service;return t.updateConfig(e),t}!function(e){let t,n;!function(e){let t,n,i,r,o,s,a,c;!function(e){e.Info="info",e.Warn="warn",e.Error="error",e.Success="success",e.Chat="chat",e.Default="default"}(t=e.Type||(e.Type={})),e.TYPES=Object.values(t),function(e){e.Silent="silent",e.AutoDismiss="autodismiss",e.Acknowledge="acknowledge"}(n=e.Mode||(e.Mode={})),e.MODES=Object.values(n),function(e){e.Added="added",e.Pended="pended",e.Activated="activated",e.Deactivated="deactivated",e.Removed="removed"}(i=e.Status||(e.Status={})),e.StatusWeight={[i.Added]:0,[i.Pended]:1,[i.Activated]:2,[i.Deactivated]:3,[i.Removed]:4},e.STATUSES=Object.values(i),function(e){e.User="user_add"}(r=e.AddEventReason||(e.AddEventReason={})),function(e){e.ServiceAutoPropagate="service_auto_propagate_pending",e.ServiceAutoDismiss="service_autodismiss_pending",e.UserSilent="user_silent_pending"}(o=e.PendingEventReason||(e.PendingEventReason={})),function(e){e.ServiceAutoPropagate="service_auto_propagate_activate"}(s=e.ActivateEventReason||(e.ActivateEventReason={})),function(e){e.UserNegative="user_negative_deactivate",e.UserPositive="user_positive_deactivate",e.UserNeutral="user_neutral_deactivate"}(a=e.DeactivateEventReason||(e.DeactivateEventReason={})),function(e){e.User="user_remove"}(c=e.RemoveEventReason||(e.RemoveEventReason={}))}(t=e.ItemMeta||(e.ItemMeta={})),function(e){e.STATUS_EVENTS=["add","pending","activate","deactivate","remove"],e.STATUS_EVENT_MAP={add:t.Status.Added,pending:t.Status.Pended,activate:t.Status.Activated,deactivate:t.Status.Deactivated,remove:t.Status.Removed},e.DISABLED_ITEM_MODE={[t.Mode.Silent]:!1,[t.Mode.AutoDismiss]:!1,[t.Mode.Acknowledge]:!1},e.ACTIVATED_ITEM_MODE_LIMIT={[t.Mode.Silent]:0,[t.Mode.AutoDismiss]:10,[t.Mode.Acknowledge]:1},e.AUTO_DISMISS_TIMEOUT=5e3}(n=e.ServiceMeta||(e.ServiceMeta={}));class i{constructor(){this.hubEmitter=r()()}emit(e,...t){this.hubEmitter.emit(e,...t)}addEventListener(e,t){this.hubEmitter.on(e,t)}addOnceEventListener(e,t){this.hubEmitter.once(e,t)}removeEventListener(e,t){this.hubEmitter.off(e,t)}removeAllEventListeners(){q()(this.hubEmitter)}}e.Item=class{get status(){return this._status}get reason(){return this._reason}get mode(){return this._mode}validateAuxOptions(e){let n={};return e&&void 0!==e.AUTO_DISMISS_TIMEOUT&&this.mode===t.Mode.AutoDismiss&&(n=Object.assign(Object.assign({},n),{AUTO_DISMISS_TIMEOUT:e.AUTO_DISMISS_TIMEOUT})),n}constructor(e,n){this._serviceHubSubscriptions=[],this._itemEmitter=r()();const{type:i,mode:s,title:a,data:c,timestamp:u}=e.data;this.type=i,this.title=a,this.data=c,this._mode=s,this.timestamp=u||(new Date).toISOString(),this.datetime=o.DateTime.fromISO(this.timestamp).toLocaleString(o.DateTime.DATETIME_SHORT_WITH_SECONDS),this.options=Object.freeze(this.validateAuxOptions(e.options||{})),n&&(this._serviceHubAdapter=n,this._status=t.Status.Added,this._reason=t.AddEventReason.User,this.bindItemHubListeners())}bindItemHubListeners(){if(this._serviceHubAdapter){{const e=(e,n,i)=>{this.timestamp in e&&(this._status=n,this._reason=i,n===t.Status.Removed&&(this.unbindItemHubListeners(),this.removeAllEventListeners()),this.emit("statusUpdate",n,i))};this._serviceHubAdapter.addEventListener("statusServiceUpdateResponse",e);const n=()=>{var t;null===(t=this._serviceHubAdapter)||void 0===t||t.removeEventListener("statusServiceUpdateResponse",e)};this._serviceHubSubscriptions.push(n)}{const e=(e,t)=>{this.timestamp in e&&(this._mode=t,this.emit("modeUpdate",t))};this._serviceHubAdapter.addEventListener("modeStatusUpdateResponse",e);const t=()=>{var t;null===(t=this._serviceHubAdapter)||void 0===t||t.removeEventListener("modeStatusUpdateResponse",e)};this._serviceHubSubscriptions.push(t)}}}unbindItemHubListeners(){this._serviceHubSubscriptions&&(this._serviceHubSubscriptions.forEach(e=>e()),this._serviceHubSubscriptions.length=0)}deactivate(e){this._status&&t.StatusWeight[this._status]<t.StatusWeight[t.Status.Deactivated]?this._serviceHubAdapter?this._serviceHubAdapter.emit("statusServiceUpdateRequest",this,t.Status.Deactivated,e):d.warn("Service hub adapter is not initialized for this notification item instance: ",this):d.warn(`Notification should have "${t.Status.Pended}" or "${t.Status.Activated}" status to be able change status to "${t.Status.Deactivated}".Current notification status is "${this._status}". Ignoring this change`)}pending(){this._status===t.Status.Activated||this.mode!==t.Mode.Silent?this._serviceHubAdapter?this._serviceHubAdapter.emit("statusServiceUpdateRequest",this,t.Status.Pended,t.PendingEventReason.UserSilent):d.warn("Service hub adapter is not initialized for this notification item instance: ",this):d.warn(`Notification should have "${t.Status.Activated}" status or not "${t.Mode.Silent}" mode, to be able change status to "${t.Status.Pended}" and mode to "${t.Mode.Silent}".Current notification status is "${this._status}" and mode is "${this.mode}". Ignoring this change`)}emit(e,...t){this._itemEmitter.emit(e,...t)}addEventListener(e,t){this._itemEmitter.on(e,t)}addOnceEventListener(e,t){this._itemEmitter.once(e,t)}removeEventListener(e,t){this._itemEmitter.off(e,t)}removeAllEventListeners(){q()(this._itemEmitter)}};const s=(e,t,n=(()=>0))=>[...e,...t].sort(n),a=(e,t)=>e.reduce((e,n)=>(-1===t.indexOf(n)&&e.push(n),e),[]);class c{constructor(){this.emitter=r()(),this.map={},this.status=c.createStatus(),this.serviceConfig={DISABLED_ITEM_MODE:Object.assign({},n.DISABLED_ITEM_MODE),ACTIVATED_ITEM_MODE_LIMIT:Object.assign({},n.ACTIVATED_ITEM_MODE_LIMIT),AUTO_DISMISS_TIMEOUT:n.AUTO_DISMISS_TIMEOUT},this.activeAutoDismissTimeoutRefs={},this.serviceHubAdapter=new i,this.bindServiceHubEvents()}static mergeConfig(e,...t){if(!t.length)return e;const n=t.shift(),i=e=>e&&"object"==typeof e&&!Array.isArray(e);if(i(e)&&i(n))for(const t in n)i(n[t])?(e[t]||Object.assign(e,{[t]:{}}),this.mergeConfig(e[t],n[t])):Object.assign(e,{[t]:n[t]});return this.mergeConfig(e,...t)}static createStatus(){return{[t.Status.Added]:this.createStatusHolderCollection(),[t.Status.Pended]:this.createStatusHolderCollection(),[t.Status.Activated]:this.createStatusHolderCollection(),[t.Status.Deactivated]:this.createStatusHolderCollection(),[t.Status.Removed]:this.createStatusHolderCollection()}}static createStatusHolderCollection(){return Object.assign([],Object.assign(Object.assign({ids:[]},this.createStatusHolderSubCollections(t.MODES)),this.createStatusHolderSubCollections(t.TYPES)))}static createStatusHolderSubCollections(e){return Object.assign({},e.reduce((e,t)=>(e[t]=[],e),{}))}updateNotificationsCollections(){const e=c.createStatus();this.status.added.ids.forEach(n=>{const i=this.map[n];t.STATUSES.forEach(t=>{-1!==this.status[t].ids.indexOf(i.timestamp)&&(e[t].push(i),e[t].ids.push(n),e[t][i.mode].push(i),e[t][i.type].push(i))})}),this.status=e}setAutoDismiss(e,n=(()=>{})){this.prepareUpdateNotifications(e).forEach(e=>{var i;if(e.mode===t.Mode.AutoDismiss){const t=()=>n(e);this.activeAutoDismissTimeoutRefs[e.timestamp]=window.setTimeout(t,null!==(i=e.options.AUTO_DISMISS_TIMEOUT)&&void 0!==i?i:this.serviceConfig.AUTO_DISMISS_TIMEOUT)}})}removeAutoDismiss(e,t=(()=>{})){this.prepareUpdateNotifications(e).forEach(e=>{e.timestamp in this.activeAutoDismissTimeoutRefs&&(t(e),window.clearTimeout(this.activeAutoDismissTimeoutRefs[e.timestamp]),delete this.activeAutoDismissTimeoutRefs[e.timestamp])})}update(e,t,n){const i=Array.isArray(n)?n:[n];if(i.length){const n=i.map(e=>e.timestamp);switch(e){case"add":i.forEach(e=>this.map[e.timestamp]=e),this.status.added.ids=s(this.status.added.ids,n,c.sortTimestampsFn);break;case"pending":this.status.pended.ids=s(this.status.pended.ids,n,c.sortTimestampsFn),this.status.activated.ids=a(this.status.activated.ids,n),this.status.deactivated.ids=a(this.status.deactivated.ids,n);break;case"activate":this.status.pended.ids=a(this.status.pended.ids,n),this.status.activated.ids=s(this.status.activated.ids,n,c.sortTimestampsFn),this.status.deactivated.ids=a(this.status.deactivated.ids,n);break;case"deactivate":this.status.pended.ids=a(this.status.pended.ids,n),this.status.activated.ids=a(this.status.activated.ids,n),this.status.deactivated.ids=s(this.status.deactivated.ids,n,c.sortTimestampsFn);break;case"remove":this.status.pended.ids=a(this.status.pended.ids,n),this.status.activated.ids=a(this.status.activated.ids,n),this.status.deactivated.ids=a(this.status.deactivated.ids,n),this.status.added.ids=a(this.status.added.ids,n),this.status.removed.ids=s(this.status.removed.ids,n,c.sortTimestampsFn),n.forEach(e=>delete this.map[e])}this.updateNotificationsCollections(),this.emit(e,i,t),this.propagate(e,t,i)}}propagate(e,n,i){const r=Array.isArray(i)?i:[i];if(r.length)switch(e){case"add":this.update("pending",t.PendingEventReason.ServiceAutoPropagate,r);break;case"pending":case"deactivate":r.forEach(e=>{this.removeAutoDismiss(e)}),this.update("activate",t.ActivateEventReason.ServiceAutoPropagate,this.prepareActiveCandidatesNotifications(this.status.pended));break;case"activate":r.forEach(e=>{this.setAutoDismiss(e,e=>{e.mode===t.Mode.AutoDismiss&&this.serviceHubAdapter.emit("statusServiceUpdateRequest",e,t.Status.Pended,t.PendingEventReason.ServiceAutoDismiss)})});break;case"remove":this.update("deactivate",t.DeactivateEventReason.UserNegative,r)}}prepareAddNotifications(t){const n=Object.keys(this.serviceConfig.DISABLED_ITEM_MODE).reduce((e,t)=>(this.serviceConfig.DISABLED_ITEM_MODE[t]||e.push(t),e),[]).map(e=>`"${e}"`).join(", ");return(Array.isArray(t)?t:[t]).filter(e=>!this.serviceConfig.DISABLED_ITEM_MODE[e.data.mode]||(d.error(`Trying to .add(...) notification mode "${e.data.mode}" that is disabled in this notifications service instance by configuration.Current configuration is: "${JSON.stringify(this.config)}"Only ${n} allowed. Ignoring .add(${JSON.stringify(e)}) notification...`),!1)).map(t=>new e.Item(t,this.serviceHubAdapter))}prepareUpdateNotifications(e){return(Array.isArray(e)?e:[e]).reduce((e,t)=>(t.timestamp in this.map?e.push(t):d.error("Trying to handle untracked notification. Call .add(...) first...",JSON.stringify(t)),e),[])}prepareActiveCandidatesNotifications(e){const n=(Array.isArray(e)?e:[e]).reduce((e,t)=>(this.status.activated[t.mode].length+e[t.mode].length<this.serviceConfig.ACTIVATED_ITEM_MODE_LIMIT[t.mode]&&e[t.mode].push(t),e),c.createStatusHolderSubCollections(t.MODES));return Object.values(n).reduce((e,t)=>e.concat(t),[])}static sortByTimestampsFn(e,t){return c.sortTimestampsFn(e.timestamp,t.timestamp)}get added(){return this.status.added}get pended(){return this.status.pended}get activated(){return this.status.activated}get deactivated(){return this.status.deactivated}getNotificationStatus(e){return Object.keys(this.status).filter(e=>e!==t.Status.Added).find(t=>-1!==this.status[t].ids.indexOf(e.timestamp))}get config(){return Object.freeze(this.serviceConfig)}static validateUpdateConfig(e){const i=e;if(i.ACTIVATED_ITEM_MODE_LIMIT&&i.ACTIVATED_ITEM_MODE_LIMIT.acknowledge>n.ACTIVATED_ITEM_MODE_LIMIT.acknowledge)throw new Error(`\n Max ${t.Mode.Acknowledge} limit is ${n.ACTIVATED_ITEM_MODE_LIMIT.acknowledge}\n `);if(i.DISABLED_ITEM_MODE){if(!Object.keys(i.DISABLED_ITEM_MODE).reduce((e,t)=>(i.DISABLED_ITEM_MODE[t]&&e++,e),0))throw new Error("At least one notifications mode should be allowed in service instance");Object.keys(i.ACTIVATED_ITEM_MODE_LIMIT).forEach(e=>{e in i.DISABLED_ITEM_MODE&&i.DISABLED_ITEM_MODE[e]&&d.warn(`Changing configuration limit count for mode "${e}" won't have any effect, because this mode is disabled in notifications service instance`)}),"AUTO_DISMISS_TIMEOUT"in i&&i.DISABLED_ITEM_MODE[t.Mode.AutoDismiss]&&d.warn(`Changing "AUTO_DISMISS_TIMEOUT" configuration option won't have any effect,because "${t.Mode.AutoDismiss}" mode is disabled in notifications service instance`)}return!0}updateConfig(e){c.validateUpdateConfig(e)&&(this.serviceConfig=c.mergeConfig({},this.serviceConfig,e),d.info("Updated notifications service configuration: ",this.config))}add(e){const n=this.prepareAddNotifications(e);return this.update("add",t.AddEventReason.User,n),n}pending(e){const n=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",n,t.Status.Pended,t.PendingEventReason.UserSilent),n}deactivate(e,n){const i=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",i,t.Status.Deactivated,n),i}remove(e){const n=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",n,t.Status.Removed,t.RemoveEventReason.User),n}pendingAllActivated(){return this.pending(this.status.activated)}pendingAll(){return this.pending([...this.status.pended,...this.status.activated])}deactivateAllActivated(e){return this.deactivate(this.status.activated,e)}deactivateAll(e){return this.deactivate([...this.status.pended,...this.status.activated],e)}removeAllDeactivated(){return this.remove(this.status.deactivated)}removeAll(){return this.remove(this.status.added)}addEventListener(e,t){this.emitter.on(e,t)}removeEventListener(e,t){this.emitter.off(e,t)}addOnceEventListener(e,t){this.emitter.once(e,t)}removeAllEventListeners(){q()(this.emitter)}emit(e,...t){this.emitter.emit(e,...t)}bindServiceHubEvents(){this.serviceHubAdapter.addEventListener("statusServiceUpdateRequest",(e,n,i)=>{const r=Array.isArray(e)?e:[e],o=r.reduce((e,t)=>(e[t.timestamp]=this.getNotificationStatus(t),e),{});{const e=r.filter(e=>(o[e.timestamp]===t.Status.Activated||e.mode!==t.Mode.Silent)&&n===t.Status.Pended);{const n=e.filter(e=>e.mode!==t.Mode.Silent);n.length&&this.serviceHubAdapter.emit("modeStatusUpdateResponse",n.reduce((e,t)=>(e[t.timestamp]=t,e),{}),t.Mode.Silent)}e.length&&this.update("pending",i,e)}{const e=r.filter(e=>{const i=o[e.timestamp];return(i===t.Status.Pended||i===t.Status.Activated)&&n===t.Status.Deactivated});e.length&&this.update("deactivate",i,e)}r.filter(e=>{const i=o[e.timestamp];return(i===t.Status.Pended||i===t.Status.Activated||i===t.Status.Deactivated)&&n===t.Status.Removed}).length&&this.update("remove",i,e)}),n.STATUS_EVENTS.forEach(e=>{this.addEventListener(e,(t,i)=>{const r=n.STATUS_EVENT_MAP[e],o=t.reduce((e,t)=>(e[t.timestamp]=t,e),{});this.serviceHubAdapter.emit("statusServiceUpdateResponse",o,r,i)})})}}c.sortTimestampsFn=(e,t)=>e>t?1:e<t?-1:0,e.Service=c}(V||(V={})),function(e){class t{constructor(){this.listeners=[],this.listenersOnce=[],this.listen=e=>(this.listeners.push(e),{stopListen:()=>this.stopListen(e)}),this.listenOnce=e=>(this.listenersOnce.push(e),{stopListenOnce:()=>this.stopListenOnce(e)}),this.stopListen=e=>{const t=this.listeners.indexOf(e,0);return t>-1&&(this.listeners.splice(t,1),!0)},this.stopListenOnce=e=>{const t=this.listenersOnce.indexOf(e,0);return t>-1&&(this.listenersOnce.splice(t,1),!0)},this.stopListenAll=()=>{this.listeners=[],this.listenersOnce=[]},this.send=e=>{this.listeners.forEach(t=>t(e)),this.listenersOnce.forEach(t=>t(e)),this.listenersOnce=[]}}}class n{constructor(){this.listeners=[],this.listenersOnce=[],this.listen=e=>(this.listeners.push(e),{stopListen:()=>this.stopListen(e)}),this.listenOnce=e=>(this.listenersOnce.push(e),{stopListenOnce:()=>this.stopListenOnce(e)}),this.stopListen=e=>{const t=this.listeners.indexOf(e,0);return t>-1&&(this.listeners.splice(t,1),!0)},this.stopListenOnce=e=>{const t=this.listenersOnce.indexOf(e,0);return t>-1&&(this.listenersOnce.splice(t,1),!0)},this.stopListenAll=()=>{this.listeners=[],this.listenersOnce=[]},this.send=()=>{this.listeners.forEach(e=>e()),this.listenersOnce.forEach(e=>e()),this.listenersOnce=[]}}}e.create=new class{withData(){const e=new t;return{signal:e,send:e.send,stopListenAll:e.stopListenAll}}empty(){const e=new n;return{signal:e,send:e.send,stopListenAll:e.stopListenAll}}}}(j||(j={}));let B=null;const H=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,z=1073741824,J=()=>{if(null!==B)return B;const e=new Blob(['(()=>{"use strict";\nconst e=new Map,t=new Map,r=(e,t)=>\n{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);\n return{expected:r+o,remainingDelay:o}},\n o=(e,t,r,i)=>{const s=performance.now();\n s>r?postMessage({id:null,method:"call",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};\n addEventListener("message",(i=>{let{data:s}=i;try{if("clear"===s.method){const{id:r,params:{timerId:o,timerType:i}}=s;\n if("interval"===i)\n (t=>{const r=e.get(t);\n if(void 0===r)\n throw new Error(\'There is no interval scheduled with the given id "\'.concat(t,\'".\'));\n clearTimeout(r),e.delete(t)})(o),postMessage({error:null,id:r});\n else{if("timeout"!==i)\n throw new Error(\'The given type "\'.concat(i,\'" is not supported\'));\n (e=>{const r=t.get(e);if(void 0===r)\n throw new Error(\'There is no timeout scheduled with the given id "\'.concat(e,\'".\'));\n clearTimeout(r),t.delete(e)})(o),postMessage({error:null,id:r})}}\n else{if("set"!==s.method)\n throw new Error(\'The given method "\'.concat(s.method,\'" is not supported\'));\n {const{params:{delay:i,now:n,timerId:a,timerType:d}}=s;\n if("interval"===d)\n ((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);\n e.set(i,setTimeout(o,a,e,i,n,"interval"))})(i,a,n);\n else{if("timeout"!==d)\n throw new Error(\'The given type "\'.concat(d,\'" is not supported\'));\n ((e,i,s)=>{const{expected:n,remainingDelay:a}=r(e,s);\n t.set(i,setTimeout(o,a,t,i,n,"timeout"))})(i,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:s.id,result:null})}}))})();'],{type:"application/javascript; charset=utf-8"}),t=URL.createObjectURL(e);return d.info("Worker url established",t),B=(e=>{const t=new Map([[0,()=>{}]]),n=new Map([[0,()=>{}]]),i=new Map,r=new Worker(e);d.info("worker created ",r);const o=new WeakMap;var s;const a=((e,t)=>n=>{const i=t.get(n);let r=void 0===i?n.size:i<z?i+1:0;if(!n.has(r))return e(n,r);if(n.size<536870912){for(;n.has(r);)r=Math.floor(Math.random()*z);return e(n,r)}if(n.size>H)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;n.has(r);)r=Math.floor(Math.random()*H);return e(n,r)})((s=o,(e,t)=>(s.set(e,t),t)),o);return r.addEventListener("message",({data:e})=>{if(void 0!==(r=e).method&&"call"===r.method){const{params:{timerId:r,timerType:o}}=e;if("interval"===o){const e=t.get(r);if("number"==typeof e){const t=i.get(e);if(void 0===t||t.timerId!==r||t.timerType!==o)throw new Error("The timer is in an undefined state.")}else{if(void 0===e)throw new Error("The timer is in an undefined state.");e()}}else if("timeout"===o){const e=n.get(r);if("number"==typeof e){const t=i.get(e);if(void 0===t||t.timerId!==r||t.timerType!==o)throw new Error("The timer is in an undefined state.")}else{if(void 0===e)throw new Error("The timer is in an undefined state.");e(),n.delete(r)}}}else if((e=>null===e.error&&"number"==typeof e.id)(e)){const{id:r}=e,o=i.get(r);if(void 0===o)throw new Error("The timer is in an undefined state.");const{timerId:s,timerType:a}=o;i.delete(r),"interval"===a?t.delete(s):n.delete(s)}else{const{error:{message:t}}=e}var r}),{clearInterval:e=>{const n=a(i);i.set(n,{timerId:e,timerType:"interval"}),t.set(e,n),r.postMessage({id:n,method:"clear",params:{timerId:e,timerType:"interval"}})},clearTimeout:e=>{const t=a(i);i.set(t,{timerId:e,timerType:"timeout"}),n.set(e,t),r.postMessage({id:t,method:"clear",params:{timerId:e,timerType:"timeout"}})},setInterval:(e,n)=>{const i=a(t);return t.set(i,()=>{e(),"function"==typeof t.get(i)&&r.postMessage({id:null,method:"set",params:{delay:n,now:performance.now(),timerId:i,timerType:"interval"}})}),r.postMessage({id:null,method:"set",params:{delay:n,now:performance.now(),timerId:i,timerType:"interval"}}),i},setTimeout:(e,t)=>{const i=a(n);return n.set(i,e),r.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:i,timerType:"timeout"}}),i}}})(t),B.setTimeout(()=>URL.revokeObjectURL(t),0),B},W=e=>J().clearInterval(e),Z=e=>J().clearTimeout(e),G=(e,t)=>J().setInterval(e,t),Y=(e,t)=>J().setTimeout(e,t);var $;function K(e){if(e instanceof Error)return e;let t="[Unable to stringify the thrown value]";try{t=JSON.stringify(e)}catch(e){}return new Error("This value was thrown as is, not through an Error: "+t)}return function(e){let t=null;e.setErrorHandler=function(e){d.info("Setting custom error handler: "+e),t=e},e.check=function(e,n,i){e||(t?t(n,i):d.info(`Assert failed in ${n}: ${i}`))}}($||($={})),t})(),e.exports=i()},function(e,t,n){"use strict";(function(e,i,r){var o=n(11);const{toString:s}=Object.prototype,{getPrototypeOf:a}=Object,{iterator:c,toStringTag:u}=Symbol,l=(d=Object.create(null),e=>{const t=s.call(e);return d[t]||(d[t]=t.slice(8,-1).toLowerCase())});var d;const h=e=>(e=e.toLowerCase(),t=>l(t)===e),f=e=>t=>typeof t===e,{isArray:v}=Array,p=f("undefined");const g=h("ArrayBuffer");const m=f("string"),y=f("function"),E=f("number"),b=e=>null!==e&&"object"==typeof e,w=e=>{if("object"!==l(e))return!1;const t=a(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||u in e||c in e)},S=h("Date"),k=h("File"),I=h("Blob"),A=h("FileList"),T=h("URLSearchParams"),[C,O,U,R]=["ReadableStream","Request","Response","Headers"].map(h);function L(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let i,r;if("object"!=typeof e&&(e=[e]),v(e))for(i=0,r=e.length;i<r;i++)t.call(null,e[i],i,e);else{const r=n?Object.getOwnPropertyNames(e):Object.keys(e),o=r.length;let s;for(i=0;i<o;i++)s=r[i],t.call(null,e[s],s,e)}}function x(e,t){t=t.toLowerCase();const n=Object.keys(e);let i,r=n.length;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:e,N=e=>!p(e)&&e!==D;const P=(_="undefined"!=typeof Uint8Array&&a(Uint8Array),e=>_&&e instanceof _);var _;const M=h("HTMLFormElement"),V=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),j=h("RegExp"),q=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};L(n,(n,r)=>{let o;!1!==(o=t(n,r,e))&&(i[r]=o||n)}),Object.defineProperties(e,i)};const F=h("AsyncFunction"),B=(H="function"==typeof i,z=y(D.postMessage),H?i:z?(J="axios@"+Math.random(),W=[],D.addEventListener("message",({source:e,data:t})=>{e===D&&t===J&&W.length&&W.shift()()},!1),e=>{W.push(e),D.postMessage(J,"*")}):e=>setTimeout(e));var H,z,J,W;const Z="undefined"!=typeof queueMicrotask?queueMicrotask.bind(D):void 0!==r&&r.nextTick||B;t.a={isArray:v,isArrayBuffer:g,isBuffer:function(e){return null!==e&&!p(e)&&null!==e.constructor&&!p(e.constructor)&&y(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||y(e.append)&&("formdata"===(t=l(e))||"object"===t&&y(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&g(e.buffer),t},isString:m,isNumber:E,isBoolean:e=>!0===e||!1===e,isObject:b,isPlainObject:w,isReadableStream:C,isRequest:O,isResponse:U,isHeaders:R,isUndefined:p,isDate:S,isFile:k,isBlob:I,isRegExp:j,isFunction:y,isStream:e=>b(e)&&y(e.pipe),isURLSearchParams:T,isTypedArray:P,isFileList:A,forEach:L,merge:function e(){const{caseless:t}=N(this)&&this||{},n={},i=(i,r)=>{const o=t&&x(n,r)||r;w(n[o])&&w(i)?n[o]=e(n[o],i):w(i)?n[o]=e({},i):v(i)?n[o]=i.slice():n[o]=i};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&L(arguments[e],i);return n},extend:(e,t,n,{allOwnKeys:i}={})=>(L(t,(t,i)=>{n&&y(t)?e[i]=Object(o.a)(t,n):e[i]=t},{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,i)=>{let r,o,s;const c={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),o=r.length;o-- >0;)s=r[o],i&&!i(s,e,t)||c[s]||(t[s]=e[s],c[s]=!0);e=!1!==n&&a(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:h,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return-1!==i&&i===n},toArray:e=>{if(!e)return null;if(v(e))return e;let t=e.length;if(!E(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[c]).call(e);let i;for(;(i=n.next())&&!i.done;){const n=i.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const i=[];for(;null!==(n=e.exec(t));)i.push(n);return i},isHTMLForm:M,hasOwnProperty:V,hasOwnProp:V,reduceDescriptors:q,freezeMethods:e=>{q(e,(t,n)=>{if(y(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=e[n];y(i)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},i=e=>{e.forEach(e=>{n[e]=!0})};return v(e)?i(e):i(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:x,global:D,isContextDefined:N,isSpecCompliantForm:function(e){return!!(e&&y(e.append)&&"FormData"===e[u]&&e[c])},toJSONObject:e=>{const t=new Array(10),n=(e,i)=>{if(b(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[i]=e;const r=v(e)?[]:{};return L(e,(e,t)=>{const o=n(e,i+1);!p(o)&&(r[t]=o)}),t[i]=void 0,r}}return e};return n(e,0)},isAsyncFn:F,isThenable:e=>e&&(b(e)||y(e))&&y(e.then)&&y(e.catch),setImmediate:B,asap:Z,isIterable:e=>null!=e&&y(e[c])}}).call(this,n(9),n(38).setImmediate,n(17))},function(e,t,n){"use strict";var i=n(1);function r(e,t,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}i.a.inherits(r,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:i.a.toJSONObject(this.config),code:this.code,status:this.status}}});const o=r.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{s[e]={value:e}}),Object.defineProperties(r,s),Object.defineProperty(o,"isAxiosError",{value:!0}),r.from=(e,t,n,s,a,c)=>{const u=Object.create(o);return i.a.toFlatObject(e,u,(function(e){return e!==Error.prototype}),e=>"isAxiosError"!==e),r.call(u,e.message,t,n,s,a),u.cause=e,u.name=e.name,c&&Object.assign(u,c),u},t.a=r},function(e,t,n){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(13);function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Object(i.a)(r.key),r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},function(e,t,n){"use strict";(function(e){var i=n(1),r=n(2),o=n(12);function s(e){return i.a.isPlainObject(e)||i.a.isArray(e)}function a(e){return i.a.endsWith(e,"[]")?e.slice(0,-2):e}function c(e,t,n){return e?e.concat(t).map((function(e,t){return e=a(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const u=i.a.toFlatObject(i.a,{},null,(function(e){return/^is[A-Z]/.test(e)}));t.a=function(t,n,l){if(!i.a.isObject(t))throw new TypeError("target must be an object");n=n||new(o.a||FormData);const d=(l=i.a.toFlatObject(l,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!i.a.isUndefined(t[e])}))).metaTokens,h=l.visitor||m,f=l.dots,v=l.indexes,p=(l.Blob||"undefined"!=typeof Blob&&Blob)&&i.a.isSpecCompliantForm(n);if(!i.a.isFunction(h))throw new TypeError("visitor must be a function");function g(t){if(null===t)return"";if(i.a.isDate(t))return t.toISOString();if(!p&&i.a.isBlob(t))throw new r.a("Blob is not supported. Use a Buffer instead.");return i.a.isArrayBuffer(t)||i.a.isTypedArray(t)?p&&"function"==typeof Blob?new Blob([t]):e.from(t):t}function m(e,t,r){let o=e;if(e&&!r&&"object"==typeof e)if(i.a.endsWith(t,"{}"))t=d?t:t.slice(0,-2),e=JSON.stringify(e);else if(i.a.isArray(e)&&function(e){return i.a.isArray(e)&&!e.some(s)}(e)||(i.a.isFileList(e)||i.a.endsWith(t,"[]"))&&(o=i.a.toArray(e)))return t=a(t),o.forEach((function(e,r){!i.a.isUndefined(e)&&null!==e&&n.append(!0===v?c([t],r,f):null===v?t:t+"[]",g(e))})),!1;return!!s(e)||(n.append(c(r,t,f),g(e)),!1)}const y=[],E=Object.assign(u,{defaultVisitor:m,convertValue:g,isVisitable:s});if(!i.a.isObject(t))throw new TypeError("data must be an object");return function e(t,r){if(!i.a.isUndefined(t)){if(-1!==y.indexOf(t))throw Error("Circular reference detected in "+r.join("."));y.push(t),i.a.forEach(t,(function(t,o){!0===(!(i.a.isUndefined(t)||null===t)&&h.call(n,t,i.a.isString(o)?o.trim():o,r,E))&&e(t,r?r.concat(o):[o])})),y.pop()}}(t),n}}).call(this,n(40).Buffer)},function(e,t,n){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u}));var r=[],o=r.forEach,s=r.slice;function a(e){return o.call(s.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}function c(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":i(XMLHttpRequest))}function u(e){return function(e){return!!e&&"function"==typeof e.then}(e)?e:Promise.resolve(e)}},function(e,t,n){"use strict";var i,r,o,s,a,c,u,l=n(19),d=n(36),h=Function.prototype.apply,f=Function.prototype.call,v=Object.create,p=Object.defineProperty,g=Object.defineProperties,m=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var n,r;return d(t),r=this,i.call(this,e,n=function(){o.call(r,e,n),h.call(t,this,arguments)}),n.__eeOnceListener__=t,this},a={on:i=function(e,t){var n;return d(t),m.call(this,"__ee__")?n=this.__ee__:(n=y.value=v(null),p(this,"__ee__",y),y.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:r,off:o=function(e,t){var n,i,r,o;if(d(t),!m.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(i=n[e]))for(o=0;r=i[o];++o)r!==t&&r.__eeOnceListener__!==t||(2===i.length?n[e]=i[o?0:1]:i.splice(o,1));else i!==t&&i.__eeOnceListener__!==t||delete n[e];return this},emit:s=function(e){var t,n,i,r,o;if(m.call(this,"__ee__")&&(r=this.__ee__[e]))if("object"==typeof r){for(n=arguments.length,o=new Array(n-1),t=1;t<n;++t)o[t-1]=arguments[t];for(r=r.slice(),t=0;i=r[t];++t)h.call(i,this,o)}else switch(arguments.length){case 1:f.call(r,this);break;case 2:f.call(r,this,arguments[1]);break;case 3:f.call(r,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),t=1;t<n;++t)o[t-1]=arguments[t];h.call(r,this,o)}}},c={on:l(i),once:l(r),off:l(o),emit:l(s)},u=g({},c),e.exports=t=function(e){return null==e?v(u):g(Object(e),c)},t.methods=a},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var i=n(30)();e.exports=function(e){return e!==i&&null!==e}},function(e,t,n){"use strict";function i(e,t){return function(){return e.apply(t,arguments)}}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";t.a=null},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(3);function r(e){var t=function(e,t){if("object"!=Object(i.a)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Object(i.a)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Object(i.a)(t)?t:t+""}},function(e,t,n){(function(i){var r;if("function"==typeof fetch&&(r=void 0!==i&&i.fetch?i.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),"undefined"==typeof window||void 0===window.document){var o=r||n(45);o.default&&(o=o.default),t.default=o,e.exports=t.default}}).call(this,n(9))},function(e,t,n){"use strict";var i=n(47),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t,n=arguments[1];if(i(e),void 0===n)r.call(e,"__ee__")&&delete e.__ee__;else{if(!(t=r.call(e,"__ee__")&&e.__ee__))return;t[n]&&delete t[n]}}},function(e,t,n){"use strict";e.exports=function(e){return null!=e}},function(e,t){var n,i,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,u=[],l=!1,d=-1;function h(){l&&c&&(l=!1,c.length?u=c.concat(u):d=-1,u.length&&f())}function f(){if(!l){var e=a(h);l=!0;for(var t=u.length;t;){for(c=u,u=[];++d<t;)c&&c[d].run();d=-1,t=u.length}c=null,l=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function v(e,t){this.fun=e,this.array=t}function p(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new v(e,t)),1!==u.length||l||a(f)},v.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=p,r.addListener=p,r.once=p,r.off=p,r.removeListener=p,r.removeAllListeners=p,r.emit=p,r.prependListener=p,r.prependOnceListener=p,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){"use strict";(function(e){var i,r,o,s=n(7),a=n(14),c=n.n(a);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"function"==typeof fetch&&(i=void 0!==e&&e.fetch?e.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),Object(s.b)()&&(void 0!==e&&e.XMLHttpRequest?r=e.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(r=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&(void 0!==e&&e.ActiveXObject?o=e.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(o=window.ActiveXObject)),i||!a||r||o||(i=c.a||a),"function"!=typeof i&&(i=void 0);var l=function(e,t){if(t&&"object"===u(t)){var n="";for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},d=function(e,t,n){i(e,t).then((function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then((function(t){n(null,{status:e.status,data:t})})).catch(n)})).catch(n)},h=!1;t.a=function(e,t,n,a){return"function"==typeof n&&(a=n,n=void 0),a=a||function(){},i?function(e,t,n,i){e.queryStringParams&&(t=l(t,e.queryStringParams));var r=Object(s.a)({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);n&&(r["Content-Type"]="application/json");var o="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,a=Object(s.a)({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:r},h?{}:o);try{d(t,a,i)}catch(e){if(!o||0===Object.keys(o).length||!e.message||e.message.indexOf("not implemented")<0)return i(e);try{Object.keys(o).forEach((function(e){delete a[e]})),d(t,a,i),h=!0}catch(e){i(e)}}}(e,t,n,a):Object(s.b)()||"function"==typeof ActiveXObject?function(e,t,n,i){n&&"object"===u(n)&&(n=l("",n).slice(1)),e.queryStringParams&&(t=l(t,e.queryStringParams));try{var s;(s=r?new r:new o("MSXML2.XMLHTTP.3.0")).open(n?"POST":"GET",t,1),e.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!e.withCredentials,n&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var a=e.customHeaders;if(a="function"==typeof a?a():a)for(var c in a)s.setRequestHeader(c,a[c]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(n)}catch(e){console&&console.log(e)}}(e,t,n,a):void a(new Error("No fetch and no xhr implementation found!"))}}).call(this,n(9))},function(e,t,n){"use strict";var i=n(16),r=n(20),o=n(24),s=n(32),a=n(33);(e.exports=function(e,t){var n,r,c,u,l;return arguments.length<2||"string"!=typeof e?(u=t,t=e,e=null):u=arguments[2],i(e)?(n=a.call(e,"c"),r=a.call(e,"e"),c=a.call(e,"w")):(n=c=!0,r=!1),l={value:t,configurable:n,enumerable:r,writable:c},u?o(s(u),l):l}).gs=function(e,t,n){var c,u,l,d;return"string"!=typeof e?(l=n,n=t,t=e,e=null):l=arguments[3],i(t)?r(t)?i(n)?r(n)||(l=n,n=void 0):n=void 0:(l=t,t=n=void 0):t=void 0,i(e)?(c=a.call(e,"c"),u=a.call(e,"e")):(c=!0,u=!1),d={get:t,set:n,configurable:c,enumerable:u},l?o(s(l),d):d}},function(e,t,n){"use strict";var i=n(21),r=/^\s*class[\s{/}]/,o=Function.prototype.toString;e.exports=function(e){return!!i(e)&&!r.test(o.call(e))}},function(e,t,n){"use strict";var i=n(22);e.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!i(e)}},function(e,t,n){"use strict";var i=n(23);e.exports=function(e){if(!i(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},function(e,t,n){"use strict";var i=n(16),r={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!i(e)&&hasOwnProperty.call(r,typeof e)}},function(e,t,n){"use strict";e.exports=n(25)()?Object.assign:n(26)},function(e,t,n){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var i=n(27),r=n(31),o=Math.max;e.exports=function(e,t){var n,s,a,c=o(arguments.length,2);for(e=Object(r(e)),a=function(i){try{e[i]=t[i]}catch(e){n||(n=e)}},s=1;s<c;++s)i(t=arguments[s]).forEach(a);if(void 0!==n)throw n;return e}},function(e,t,n){"use strict";e.exports=n(28)()?Object.keys:n(29)},function(e,t,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,n){"use strict";var i=n(10),r=Object.keys;e.exports=function(e){return r(i(e)?Object(e):e)}},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var i=n(10);e.exports=function(e){if(!i(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";var i=n(10),r=Array.prototype.forEach,o=Object.create,s=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=o(null);return r.call(arguments,(function(e){i(e)&&s(Object(e),t)})),t}},function(e,t,n){"use strict";e.exports=n(34)()?String.prototype.contains:n(35)},function(e,t,n){"use strict";var i="razdwatrzy";e.exports=function(){return"function"==typeof i.contains&&(!0===i.contains("dwa")&&!1===i.contains("foo"))}},function(e,t,n){"use strict";var i=String.prototype.indexOf;e.exports=function(e){return i.call(this,e,arguments[1])>-1}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function r(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,n){return(u=c()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&a(r,n.prototype),r}).apply(null,arguments)}function l(e){var t="function"==typeof Map?new Map:void 0;return(l=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return u(e,arguments,s(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a(i,e)})(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function h(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}Object.defineProperty(t,"__esModule",{value:!0});var f=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(l(Error)),v=function(e){function t(t){return e.call(this,"Invalid DateTime: "+t.toMessage())||this}return o(t,e),t}(f),p=function(e){function t(t){return e.call(this,"Invalid Interval: "+t.toMessage())||this}return o(t,e),t}(f),g=function(e){function t(t){return e.call(this,"Invalid Duration: "+t.toMessage())||this}return o(t,e),t}(f),m=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(f),y=function(e){function t(t){return e.call(this,"Invalid unit "+t)||this}return o(t,e),t}(f),E=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(f),b=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return o(t,e),t}(f),w="numeric",S="short",k="long",I={year:w,month:w,day:w},A={year:w,month:S,day:w},T={year:w,month:S,day:w,weekday:S},C={year:w,month:k,day:w},O={year:w,month:k,day:w,weekday:k},U={hour:w,minute:w},R={hour:w,minute:w,second:w},L={hour:w,minute:w,second:w,timeZoneName:S},x={hour:w,minute:w,second:w,timeZoneName:k},D={hour:w,minute:w,hour12:!1},N={hour:w,minute:w,second:w,hour12:!1},P={hour:w,minute:w,second:w,hour12:!1,timeZoneName:S},_={hour:w,minute:w,second:w,hour12:!1,timeZoneName:k},M={year:w,month:w,day:w,hour:w,minute:w},V={year:w,month:w,day:w,hour:w,minute:w,second:w},j={year:w,month:S,day:w,hour:w,minute:w},q={year:w,month:S,day:w,hour:w,minute:w,second:w},F={year:w,month:S,day:w,weekday:S,hour:w,minute:w},B={year:w,month:k,day:w,hour:w,minute:w,timeZoneName:S},H={year:w,month:k,day:w,hour:w,minute:w,second:w,timeZoneName:S},z={year:w,month:k,day:w,weekday:k,hour:w,minute:w,timeZoneName:k},J={year:w,month:k,day:w,weekday:k,hour:w,minute:w,second:w,timeZoneName:k};function W(e){return void 0===e}function Z(e){return"number"==typeof e}function G(e){return"number"==typeof e&&e%1==0}function Y(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function $(){return!W(Intl.DateTimeFormat.prototype.formatToParts)}function K(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function X(e,t,n){if(0!==e.length)return e.reduce((function(e,i){var r=[t(i),i];return e&&n(e[0],r[0])===e[0]?e:r}),null)[1]}function Q(e,t){return t.reduce((function(t,n){return t[n]=e[n],t}),{})}function ee(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function te(e,t,n){return G(e)&&e>=t&&e<=n}function ne(e,t){void 0===t&&(t=2);var n=e<0?"-":"",i=n?-1*e:e;return""+n+(i.toString().length<t?("0".repeat(t)+i).slice(-t):i.toString())}function ie(e){return W(e)||null===e||""===e?void 0:parseInt(e,10)}function re(e){if(!W(e)&&null!==e&&""!==e){var t=1e3*parseFloat("0."+e);return Math.floor(t)}}function oe(e,t,n){void 0===n&&(n=!1);var i=Math.pow(10,t);return(n?Math.trunc:Math.round)(e*i)/i}function se(e){return e%4==0&&(e%100!=0||e%400==0)}function ae(e){return se(e)?366:365}function ce(e,t){var n=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===n?se(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function ue(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function le(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,i=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return 4===t||3===i?53:52}function de(e){return e>99?e:e>60?1900+e:2e3+e}function he(e,t,n,i){void 0===i&&(i=null);var r=new Date(e),o={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(o.timeZone=i);var s=Object.assign({timeZoneName:t},o),a=Y();if(a&&$()){var c=new Intl.DateTimeFormat(n,s).formatToParts(r).find((function(e){return"timezonename"===e.type.toLowerCase()}));return c?c.value:null}if(a){var u=new Intl.DateTimeFormat(n,o).format(r);return new Intl.DateTimeFormat(n,s).format(r).substring(u.length).replace(/^[, \u200e]+/,"")}return null}function fe(e,t){var n=parseInt(e,10);Number.isNaN(n)&&(n=0);var i=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-i:i)}function ve(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new E("Invalid unit value "+e);return t}function pe(e,t,n){var i={};for(var r in e)if(ee(e,r)){if(n.indexOf(r)>=0)continue;var o=e[r];if(null==o)continue;i[t(r)]=ve(o)}return i}function ge(e,t){var n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),r=e>=0?"+":"-";switch(t){case"short":return""+r+ne(n,2)+":"+ne(i,2);case"narrow":return""+r+n+(i>0?":"+i:"");case"techie":return""+r+ne(n,2)+ne(i,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function me(e){return Q(e,["hour","minute","second","millisecond"])}var ye=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function Ee(e){return JSON.stringify(e,Object.keys(e).sort())}var be=["January","February","March","April","May","June","July","August","September","October","November","December"],we=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Se=["J","F","M","A","M","J","J","A","S","O","N","D"];function ke(e){switch(e){case"narrow":return[].concat(Se);case"short":return[].concat(we);case"long":return[].concat(be);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var Ie=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ae=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Te=["M","T","W","T","F","S","S"];function Ce(e){switch(e){case"narrow":return[].concat(Te);case"short":return[].concat(Ae);case"long":return[].concat(Ie);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Oe=["AM","PM"],Ue=["Before Christ","Anno Domini"],Re=["BC","AD"],Le=["B","A"];function xe(e){switch(e){case"narrow":return[].concat(Le);case"short":return[].concat(Re);case"long":return[].concat(Ue);default:return null}}function De(e,t){for(var n,i="",r=h(e);!(n=r()).done;){var o=n.value;o.literal?i+=o.val:i+=t(o.val)}return i}var Ne={D:I,DD:A,DDD:C,DDDD:O,t:U,tt:R,ttt:L,tttt:x,T:D,TT:N,TTT:P,TTTT:_,f:M,ff:j,fff:B,ffff:z,F:V,FF:q,FFF:H,FFFF:J},Pe=function(){function e(e,t){this.opts=t,this.loc=e,this.systemLoc=null}e.create=function(t,n){return void 0===n&&(n={}),new e(t,n)},e.parseFormat=function(e){for(var t=null,n="",i=!1,r=[],o=0;o<e.length;o++){var s=e.charAt(o);"'"===s?(n.length>0&&r.push({literal:i,val:n}),t=null,n="",i=!i):i||s===t?n+=s:(n.length>0&&r.push({literal:!1,val:n}),n=s,t=s)}return n.length>0&&r.push({literal:i,val:n}),r},e.macroTokenToFormatOpts=function(e){return Ne[e]};var t=e.prototype;return t.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},t.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},t.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return ne(e,t);var n=Object.assign({},this.opts);return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},t.formatDateTimeFromString=function(t,n){var i=this,r="en"===this.loc.listingMode(),o=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&$(),s=function(e,n){return i.loc.extract(t,e,n)},a=function(e){return t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):""},c=function(){return r?function(e){return Oe[e.hour<12?0:1]}(t):s({hour:"numeric",hour12:!0},"dayperiod")},u=function(e,n){return r?function(e,t){return ke(t)[e.month-1]}(t,e):s(n?{month:e}:{month:e,day:"numeric"},"month")},l=function(e,n){return r?function(e,t){return Ce(t)[e.weekday-1]}(t,e):s(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},d=function(e){return r?function(e,t){return xe(t)[e.year<0?0:1]}(t,e):s({era:e},"era")};return De(e.parseFormat(n),(function(n){switch(n){case"S":return i.num(t.millisecond);case"u":case"SSS":return i.num(t.millisecond,3);case"s":return i.num(t.second);case"ss":return i.num(t.second,2);case"m":return i.num(t.minute);case"mm":return i.num(t.minute,2);case"h":return i.num(t.hour%12==0?12:t.hour%12);case"hh":return i.num(t.hour%12==0?12:t.hour%12,2);case"H":return i.num(t.hour);case"HH":return i.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:i.opts.allowZ});case"ZZ":return a({format:"short",allowZ:i.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:i.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:i.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:i.loc.locale});case"z":return t.zoneName;case"a":return c();case"d":return o?s({day:"numeric"},"day"):i.num(t.day);case"dd":return o?s({day:"2-digit"},"day"):i.num(t.day,2);case"c":return i.num(t.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"E":return i.num(t.weekday);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return o?s({month:"numeric",day:"numeric"},"month"):i.num(t.month);case"LL":return o?s({month:"2-digit",day:"numeric"},"month"):i.num(t.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return o?s({month:"numeric"},"month"):i.num(t.month);case"MM":return o?s({month:"2-digit"},"month"):i.num(t.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return o?s({year:"numeric"},"year"):i.num(t.year);case"yy":return o?s({year:"2-digit"},"year"):i.num(t.year.toString().slice(-2),2);case"yyyy":return o?s({year:"numeric"},"year"):i.num(t.year,4);case"yyyyyy":return o?s({year:"numeric"},"year"):i.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return i.num(t.weekYear.toString().slice(-2),2);case"kkkk":return i.num(t.weekYear,4);case"W":return i.num(t.weekNumber);case"WW":return i.num(t.weekNumber,2);case"o":return i.num(t.ordinal);case"ooo":return i.num(t.ordinal,3);case"q":return i.num(t.quarter);case"qq":return i.num(t.quarter,2);case"X":return i.num(Math.floor(t.ts/1e3));case"x":return i.num(t.ts);default:return function(n){var r=e.macroTokenToFormatOpts(n);return r?i.formatWithSystemDefault(t,r):n}(n)}}))},t.formatDurationFromString=function(t,n){var i,r=this,o=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},s=e.parseFormat(n),a=s.reduce((function(e,t){var n=t.literal,i=t.val;return n?e:e.concat(i)}),[]),c=t.shiftTo.apply(t,a.map(o).filter((function(e){return e})));return De(s,(i=c,function(e){var t=o(e);return t?r.num(i.get(t),e.length):e}))},e}(),_e=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Me=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new b},t.formatOffset=function(e,t){throw new b},t.offset=function(e){throw new b},t.equals=function(e){throw new b},r(e,[{key:"type",get:function(){throw new b}},{key:"name",get:function(){throw new b}},{key:"universal",get:function(){throw new b}},{key:"isValid",get:function(){throw new b}}]),e}(),Ve=null,je=function(e){function t(){return e.apply(this,arguments)||this}o(t,e);var n=t.prototype;return n.offsetName=function(e,t){return he(e,t.format,t.locale)},n.formatOffset=function(e,t){return ge(this.offset(e),t)},n.offset=function(e){return-new Date(e).getTimezoneOffset()},n.equals=function(e){return"local"===e.type},r(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return Y()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===Ve&&(Ve=new t),Ve}}]),t}(Me),qe=RegExp("^"+ye.source+"$"),Fe={};var Be={year:0,month:1,day:2,hour:3,minute:4,second:5};var He={},ze=function(e){function t(n){var i;return(i=e.call(this)||this).zoneName=n,i.valid=t.isValidZone(n),i}o(t,e),t.create=function(e){return He[e]||(He[e]=new t(e)),He[e]},t.resetCache=function(){He={},Fe={}},t.isValidSpecifier=function(e){return!(!e||!e.match(qe))},t.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},t.parseGMTOffset=function(e){if(e){var t=e.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);if(t)return-60*parseInt(t[1])}return null};var n=t.prototype;return n.offsetName=function(e,t){return he(e,t.format,t.locale,this.name)},n.formatOffset=function(e,t){return ge(this.offset(e),t)},n.offset=function(e){var t=new Date(e);if(isNaN(t))return NaN;var n,i=(n=this.name,Fe[n]||(Fe[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Fe[n]),r=i.formatToParts?function(e,t){for(var n=e.formatToParts(t),i=[],r=0;r<n.length;r++){var o=n[r],s=o.type,a=o.value,c=Be[s];W(c)||(i[c]=parseInt(a,10))}return i}(i,t):function(e,t){var n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n),r=i[1],o=i[2];return[i[3],r,o,i[4],i[5],i[6]]}(i,t),o=r[0],s=r[1],a=r[2],c=r[3],u=+t,l=u%1e3;return(ue({year:o,month:s,day:a,hour:24===c?0:c,minute:r[4],second:r[5],millisecond:0})-(u-=l>=0?l:1e3+l))/6e4},n.equals=function(e){return"iana"===e.type&&e.name===this.name},r(t,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),t}(Me),Je=null,We=function(e){function t(t){var n;return(n=e.call(this)||this).fixed=t,n}o(t,e),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){var n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new t(fe(n[1],n[2]))}return null},r(t,null,[{key:"utcInstance",get:function(){return null===Je&&(Je=new t(0)),Je}}]);var n=t.prototype;return n.offsetName=function(){return this.name},n.formatOffset=function(e,t){return ge(this.fixed,t)},n.offset=function(){return this.fixed},n.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},r(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+ge(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Me),Ze=function(e){function t(t){var n;return(n=e.call(this)||this).zoneName=t,n}o(t,e);var n=t.prototype;return n.offsetName=function(){return null},n.formatOffset=function(){return""},n.offset=function(){return NaN},n.equals=function(){return!1},r(t,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),t}(Me);function Ge(e,t){var n;if(W(e)||null===e)return t;if(e instanceof Me)return e;if("string"==typeof e){var i=e.toLowerCase();return"local"===i?t:"utc"===i||"gmt"===i?We.utcInstance:null!=(n=ze.parseGMTOffset(e))?We.instance(n):ze.isValidSpecifier(i)?ze.create(e):We.parseSpecifier(i)||new Ze(e)}return Z(e)?We.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new Ze(e)}var Ye=function(){return Date.now()},$e=null,Ke=null,Xe=null,Qe=null,et=!1,tt=function(){function e(){}return e.resetCaches=function(){ht.resetCache(),ze.resetCache()},r(e,null,[{key:"now",get:function(){return Ye},set:function(e){Ye=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){$e=e?Ge(e):null}},{key:"defaultZone",get:function(){return $e||je.instance}},{key:"defaultLocale",get:function(){return Ke},set:function(e){Ke=e}},{key:"defaultNumberingSystem",get:function(){return Xe},set:function(e){Xe=e}},{key:"defaultOutputCalendar",get:function(){return Qe},set:function(e){Qe=e}},{key:"throwOnInvalid",get:function(){return et},set:function(e){et=e}}]),e}(),nt={};function it(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),i=nt[n];return i||(i=new Intl.DateTimeFormat(e,t),nt[n]=i),i}var rt={};var ot={};function st(e,t){void 0===t&&(t={});var n=t,i=(n.base,function(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(n,["base"])),r=JSON.stringify([e,i]),o=ot[r];return o||(o=new Intl.RelativeTimeFormat(e,t),ot[r]=o),o}var at=null;function ct(e,t,n,i,r){var o=e.listingMode(n);return"error"===o?null:"en"===o?i(t):r(t)}var ut=function(){function e(e,t,n){if(this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&Y()){var i={useGrouping:!1};n.padTo>0&&(i.minimumIntegerDigits=n.padTo),this.inf=function(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),i=rt[n];return i||(i=new Intl.NumberFormat(e,t),rt[n]=i),i}(e,i)}}return e.prototype.format=function(e){if(this.inf){var t=this.floor?Math.floor(e):e;return this.inf.format(t)}return ne(this.floor?Math.floor(e):oe(e,3),this.padTo)},e}(),lt=function(){function e(e,t,n){var i;if(this.opts=n,this.hasIntl=Y(),e.zone.universal&&this.hasIntl){var r=e.offset/60*-1,o=r>=0?"Etc/GMT+"+r:"Etc/GMT"+r,s=ze.isValidZone(o);0!==e.offset&&s?(i=o,this.dt=e):(i="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:li.fromMillis(e.ts+60*e.offset*1e3))}else"local"===e.zone.type?this.dt=e:(this.dt=e,i=e.zone.name);if(this.hasIntl){var a=Object.assign({},this.opts);i&&(a.timeZone=i),this.dtf=it(t,a)}}var t=e.prototype;return t.format=function(){if(this.hasIntl)return this.dtf.format(this.dt.toJSDate());var e=function(e){switch(Ee(Q(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case Ee(I):return"M/d/yyyy";case Ee(A):return"LLL d, yyyy";case Ee(T):return"EEE, LLL d, yyyy";case Ee(C):return"LLLL d, yyyy";case Ee(O):return"EEEE, LLLL d, yyyy";case Ee(U):return"h:mm a";case Ee(R):return"h:mm:ss a";case Ee(L):case Ee(x):return"h:mm a";case Ee(D):return"HH:mm";case Ee(N):return"HH:mm:ss";case Ee(P):case Ee(_):return"HH:mm";case Ee(M):return"M/d/yyyy, h:mm a";case Ee(j):return"LLL d, yyyy, h:mm a";case Ee(B):return"LLLL d, yyyy, h:mm a";case Ee(z):return"EEEE, LLLL d, yyyy, h:mm a";case Ee(V):return"M/d/yyyy, h:mm:ss a";case Ee(q):return"LLL d, yyyy, h:mm:ss a";case Ee(F):return"EEE, d LLL yyyy, h:mm a";case Ee(H):return"LLLL d, yyyy, h:mm:ss a";case Ee(J):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return"EEEE, LLLL d, yyyy, h:mm a"}}(this.opts),t=ht.create("en-US");return Pe.create(t).formatDateTimeFromString(this.dt,e)},t.formatToParts=function(){return this.hasIntl&&$()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),dt=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&K()&&(this.rtf=st(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n,i){void 0===n&&(n="always"),void 0===i&&(i=!1);var r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){var s="days"===e;switch(t){case 1:return s?"tomorrow":"next "+r[e][0];case-1:return s?"yesterday":"last "+r[e][0];case 0:return s?"today":"this "+r[e][0]}}var a=Object.is(t,-0)||t<0,c=Math.abs(t),u=1===c,l=r[e],d=i?u?l[1]:l[2]||l[1]:u?r[e][0]:e;return a?c+" "+d+" ago":"in "+c+" "+d}(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),ht=function(){function e(e,t,n,i){var r=function(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,i=e.substring(0,t);try{n=it(e).resolvedOptions()}catch(e){n=it(i).resolvedOptions()}var r=n;return[i,r.numberingSystem,r.calendar]}(e),o=r[0],s=r[1],a=r[2];this.locale=o,this.numberingSystem=t||s||null,this.outputCalendar=n||a||null,this.intl=function(e,t,n){return Y()?n||t?(e+="-u",n&&(e+="-ca-"+n),t&&(e+="-nu-"+t),e):e:[]}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}e.fromOpts=function(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)},e.create=function(t,n,i,r){void 0===r&&(r=!1);var o=t||tt.defaultLocale;return new e(o||(r?"en-US":function(){if(at)return at;if(Y()){var e=(new Intl.DateTimeFormat).resolvedOptions().locale;return at=e&&"und"!==e?e:"en-US"}return at="en-US"}()),n||tt.defaultNumberingSystem,i||tt.defaultOutputCalendar,o)},e.resetCache=function(){at=null,nt={},rt={},ot={}},e.fromObject=function(t){var n=void 0===t?{}:t,i=n.locale,r=n.numberingSystem,o=n.outputCalendar;return e.create(i,r,o)};var t=e.prototype;return t.listingMode=function(e){void 0===e&&(e=!0);var t=Y()&&$(),n=this.isEnglish(),i=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&i||e?!t||n&&i?"en":"intl":"error"},t.clone=function(t){return t&&0!==Object.getOwnPropertyNames(t).length?e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this},t.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},t.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},t.months=function(e,t,n){var i=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),ct(this,e,n,ke,(function(){var n=t?{month:e,day:"numeric"}:{month:e},r=t?"format":"standalone";return i.monthsCache[r][e]||(i.monthsCache[r][e]=function(e){for(var t=[],n=1;n<=12;n++){var i=li.utc(2016,n,1);t.push(e(i))}return t}((function(e){return i.extract(e,n,"month")}))),i.monthsCache[r][e]}))},t.weekdays=function(e,t,n){var i=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),ct(this,e,n,Ce,(function(){var n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return i.weekdaysCache[r][e]||(i.weekdaysCache[r][e]=function(e){for(var t=[],n=1;n<=7;n++){var i=li.utc(2016,11,13+n);t.push(e(i))}return t}((function(e){return i.extract(e,n,"weekday")}))),i.weekdaysCache[r][e]}))},t.meridiems=function(e){var t=this;return void 0===e&&(e=!0),ct(this,void 0,e,(function(){return Oe}),(function(){if(!t.meridiemCache){var e={hour:"numeric",hour12:!0};t.meridiemCache=[li.utc(2016,11,13,9),li.utc(2016,11,13,19)].map((function(n){return t.extract(n,e,"dayperiod")}))}return t.meridiemCache}))},t.eras=function(e,t){var n=this;return void 0===t&&(t=!0),ct(this,e,t,xe,(function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[li.utc(-40,1,1),li.utc(2017,1,1)].map((function(e){return n.extract(e,t,"era")}))),n.eraCache[e]}))},t.extract=function(e,t,n){var i=this.dtFormatter(e,t).formatToParts().find((function(e){return e.type.toLowerCase()===n}));return i?i.value:null},t.numberFormatter=function(e){return void 0===e&&(e={}),new ut(this.intl,e.forceSimple||this.fastNumbers,e)},t.dtFormatter=function(e,t){return void 0===t&&(t={}),new lt(e,this.intl,t)},t.relFormatter=function(e){return void 0===e&&(e={}),new dt(this.intl,this.isEnglish(),e)},t.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||Y()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},t.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},r(e,[{key:"fastNumbers",get:function(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||Y()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}}]),e}();function ft(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.reduce((function(e,t){return e+t.source}),"");return RegExp("^"+i+"$")}function vt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce((function(t,n){var i=t[0],r=t[1],o=t[2],s=n(e,o),a=s[0],c=s[1],u=s[2];return[Object.assign(i,a),r||c,u]}),[{},null,1]).slice(0,2)}}function pt(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];for(var r=0,o=n;r<o.length;r++){var s=o[r],a=s[0],c=s[1],u=a.exec(e);if(u)return c(u)}return[null,null]}function gt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n){var i,r={};for(i=0;i<t.length;i++)r[t[i]]=ie(e[n+i]);return[r,null,n+i]}}var mt=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,yt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Et=RegExp(""+yt.source+mt.source+"?"),bt=RegExp("(?:T"+Et.source+")?"),wt=gt("weekYear","weekNumber","weekDay"),St=gt("year","ordinal"),kt=RegExp(yt.source+" ?(?:"+mt.source+"|("+ye.source+"))?"),It=RegExp("(?: "+kt.source+")?");function At(e,t,n){var i=e[t];return W(i)?n:ie(i)}function Tt(e,t){return[{year:At(e,t),month:At(e,t+1,1),day:At(e,t+2,1)},null,t+3]}function Ct(e,t){return[{hours:At(e,t,0),minutes:At(e,t+1,0),seconds:At(e,t+2,0),milliseconds:re(e[t+3])},null,t+4]}function Ot(e,t){var n=!e[t]&&!e[t+1],i=fe(e[t+1],e[t+2]);return[{},n?null:We.instance(i),t+3]}function Ut(e,t){return[{},e[t]?ze.create(e[t]):null,t+1]}var Rt=RegExp("^T?"+yt.source+"$"),Lt=/^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function xt(e){var t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],s=e[5],a=e[6],c=e[7],u=e[8],l="-"===t[0],d=c&&"-"===c[0],h=function(e,t){return void 0===t&&(t=!1),void 0!==e&&(t||e&&l)?-e:e};return[{years:h(ie(n)),months:h(ie(i)),weeks:h(ie(r)),days:h(ie(o)),hours:h(ie(s)),minutes:h(ie(a)),seconds:h(ie(c),"-0"===c),milliseconds:h(re(u),d)}]}var Dt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Nt(e,t,n,i,r,o,s){var a={year:2===t.length?de(ie(t)):ie(t),month:we.indexOf(n)+1,day:ie(i),hour:ie(r),minute:ie(o)};return s&&(a.second=ie(s)),e&&(a.weekday=e.length>3?Ie.indexOf(e)+1:Ae.indexOf(e)+1),a}var Pt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function _t(e){var t,n=e[1],i=e[2],r=e[3],o=e[4],s=e[5],a=e[6],c=e[7],u=e[8],l=e[9],d=e[10],h=e[11],f=Nt(n,o,r,i,s,a,c);return t=u?Dt[u]:l?0:fe(d,h),[f,new We(t)]}var Mt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Vt=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,jt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function qt(e){var t=e[1],n=e[2],i=e[3];return[Nt(t,e[4],i,n,e[5],e[6],e[7]),We.utcInstance]}function Ft(e){var t=e[1],n=e[2],i=e[3],r=e[4],o=e[5],s=e[6];return[Nt(t,e[7],n,i,r,o,s),We.utcInstance]}var Bt=ft(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,bt),Ht=ft(/(\d{4})-?W(\d\d)(?:-?(\d))?/,bt),zt=ft(/(\d{4})-?(\d{3})/,bt),Jt=ft(Et),Wt=vt(Tt,Ct,Ot),Zt=vt(wt,Ct,Ot),Gt=vt(St,Ct,Ot),Yt=vt(Ct,Ot);var $t=vt(Ct);var Kt=ft(/(\d{4})-(\d\d)-(\d\d)/,It),Xt=ft(kt),Qt=vt(Tt,Ct,Ot,Ut),en=vt(Ct,Ot,Ut);var tn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},nn=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},tn),rn=Object.assign({years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:30.436875/7,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},tn),on=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],sn=on.slice(0).reverse();function an(e,t,n){void 0===n&&(n=!1);var i={values:n?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new un(i)}function cn(e,t,n,i,r){var o=e[r][n],s=t[n]/o,a=!(Math.sign(s)===Math.sign(i[r]))&&0!==i[r]&&Math.abs(s)<=1?function(e){return e<0?Math.floor(e):Math.ceil(e)}(s):Math.trunc(s);i[r]+=a,t[n]-=a*o}var un=function(){function e(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||ht.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?rn:nn,this.isLuxonDuration=!0}e.fromMillis=function(t,n){return e.fromObject(Object.assign({milliseconds:t},n))},e.fromObject=function(t){if(null==t||"object"!=typeof t)throw new E("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new e({values:pe(t,e.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:ht.fromObject(t),conversionAccuracy:t.conversionAccuracy})},e.fromISO=function(t,n){var i=function(e){return pt(e,[Lt,xt])}(t)[0];if(i){var r=Object.assign(i,n);return e.fromObject(r)}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.fromISOTime=function(t,n){var i=function(e){return pt(e,[Rt,$t])}(t)[0];if(i){var r=Object.assign(i,n);return e.fromObject(r)}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new E("need to specify a reason the Duration is invalid");var i=t instanceof _e?t:new _e(t,n);if(tt.throwOnInvalid)throw new g(i);return new e({invalid:i})},e.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new y(e);return t},e.isDuration=function(e){return e&&e.isLuxonDuration||!1};var t=e.prototype;return t.toFormat=function(e,t){void 0===t&&(t={});var n=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Pe.create(this.loc,n).formatDurationFromString(this,e):"Invalid Duration"},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=oe(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},t.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();if(t<0||t>=864e5)return null;e=Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e);var n=this.shiftTo("hours","minutes","seconds","milliseconds"),i="basic"===e.format?"hhmm":"hh:mm";e.suppressSeconds&&0===n.seconds&&0===n.milliseconds||(i+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===n.milliseconds||(i+=".SSS"));var r=n.toFormat(i);return e.includePrefix&&(r="T"+r),r},t.toJSON=function(){return this.toISO()},t.toString=function(){return this.toISO()},t.toMillis=function(){return this.as("milliseconds")},t.valueOf=function(){return this.toMillis()},t.plus=function(e){if(!this.isValid)return this;for(var t,n=ln(e),i={},r=h(on);!(t=r()).done;){var o=t.value;(ee(n.values,o)||ee(this.values,o))&&(i[o]=n.get(o)+this.get(o))}return an(this,{values:i},!0)},t.minus=function(e){if(!this.isValid)return this;var t=ln(e);return this.plus(t.negate())},t.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,i=Object.keys(this.values);n<i.length;n++){var r=i[n];t[r]=ve(e(this.values[r],r))}return an(this,{values:t},!0)},t.get=function(t){return this[e.normalizeUnit(t)]},t.set=function(t){return this.isValid?an(this,{values:Object.assign(this.values,pe(t,e.normalizeUnit,[]))}):this},t.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,i=t.numberingSystem,r=t.conversionAccuracy,o={loc:this.loc.clone({locale:n,numberingSystem:i})};return r&&(o.conversionAccuracy=r),an(this,o)},t.as=function(e){return this.isValid?this.shiftTo(e).get(e):NaN},t.normalize=function(){if(!this.isValid)return this;var e=this.toObject();return function(e,t){sn.reduce((function(n,i){return W(t[i])?n:(n&&cn(e,t,n,t,i),i)}),null)}(this.matrix,e),an(this,{values:e},!0)},t.shiftTo=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(!this.isValid)return this;if(0===n.length)return this;n=n.map((function(t){return e.normalizeUnit(t)}));for(var r,o,s={},a={},c=this.toObject(),u=h(on);!(o=u()).done;){var l=o.value;if(n.indexOf(l)>=0){r=l;var d=0;for(var f in a)d+=this.matrix[f][l]*a[f],a[f]=0;Z(c[l])&&(d+=c[l]);var v=Math.trunc(d);for(var p in s[l]=v,a[l]=d-v,c)on.indexOf(p)>on.indexOf(l)&&cn(this.matrix,c,p,s,l)}else Z(c[l])&&(a[l]=c[l])}for(var g in a)0!==a[g]&&(s[r]+=g===r?a[g]:a[g]/this.matrix[r][g]);return an(this,{values:s},!0).normalize()},t.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);t<n.length;t++){var i=n[t];e[i]=-this.values[i]}return an(this,{values:e},!0)},t.equals=function(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(var t,n=h(on);!(t=n()).done;){var i=t.value;if(r=this.values[i],o=e.values[i],!(void 0===r||0===r?void 0===o||0===o:r===o))return!1}var r,o;return!0},r(e,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),e}();function ln(e){if(Z(e))return un.fromMillis(e);if(un.isDuration(e))return e;if("object"==typeof e)return un.fromObject(e);throw new E("Unknown duration argument "+e+" of type "+typeof e)}var dn="Invalid Interval";function hn(e,t){return e&&e.isValid?t&&t.isValid?t<e?fn.invalid("end before start","The end of an interval must be after its start, but you had start="+e.toISO()+" and end="+t.toISO()):null:fn.invalid("missing or invalid end"):fn.invalid("missing or invalid start")}var fn=function(){function e(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new E("need to specify a reason the Interval is invalid");var i=t instanceof _e?t:new _e(t,n);if(tt.throwOnInvalid)throw new p(i);return new e({invalid:i})},e.fromDateTimes=function(t,n){var i=di(t),r=di(n),o=hn(i,r);return null==o?new e({start:i,end:r}):o},e.after=function(t,n){var i=ln(n),r=di(t);return e.fromDateTimes(r,r.plus(i))},e.before=function(t,n){var i=ln(n),r=di(t);return e.fromDateTimes(r.minus(i),r)},e.fromISO=function(t,n){var i=(t||"").split("/",2),r=i[0],o=i[1];if(r&&o){var s,a,c,u;try{a=(s=li.fromISO(r,n)).isValid}catch(o){a=!1}try{u=(c=li.fromISO(o,n)).isValid}catch(o){u=!1}if(a&&u)return e.fromDateTimes(s,c);if(a){var l=un.fromISO(o,n);if(l.isValid)return e.after(s,l)}else if(u){var d=un.fromISO(r,n);if(d.isValid)return e.before(c,d)}}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.isInterval=function(e){return e&&e.isLuxonInterval||!1};var t=e.prototype;return t.length=function(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},t.count=function(e){if(void 0===e&&(e="milliseconds"),!this.isValid)return NaN;var t=this.start.startOf(e),n=this.end.startOf(e);return Math.floor(n.diff(t,e).get(e))+1},t.hasSame=function(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))},t.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},t.isAfter=function(e){return!!this.isValid&&this.s>e},t.isBefore=function(e){return!!this.isValid&&this.e<=e},t.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},t.set=function(t){var n=void 0===t?{}:t,i=n.start,r=n.end;return this.isValid?e.fromDateTimes(i||this.s,r||this.e):this},t.splitAt=function(){var t=this;if(!this.isValid)return[];for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];for(var o=i.map(di).filter((function(e){return t.contains(e)})).sort(),s=[],a=this.s,c=0;a<this.e;){var u=o[c]||this.e,l=+u>+this.e?this.e:u;s.push(e.fromDateTimes(a,l)),a=l,c+=1}return s},t.splitBy=function(t){var n=ln(t);if(!this.isValid||!n.isValid||0===n.as("milliseconds"))return[];for(var i,r=this.s,o=1,s=[];r<this.e;){var a=this.start.plus(n.mapUnits((function(e){return e*o})));i=+a>+this.e?this.e:a,s.push(e.fromDateTimes(r,i)),r=i,o+=1}return s},t.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},t.overlaps=function(e){return this.e>e.s&&this.s<e.e},t.abutsStart=function(e){return!!this.isValid&&+this.e==+e.s},t.abutsEnd=function(e){return!!this.isValid&&+e.e==+this.s},t.engulfs=function(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)},t.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},t.intersection=function(t){if(!this.isValid)return this;var n=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return n>=i?null:e.fromDateTimes(n,i)},t.union=function(t){if(!this.isValid)return this;var n=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return e.fromDateTimes(n,i)},e.merge=function(e){var t=e.sort((function(e,t){return e.s-t.s})).reduce((function(e,t){var n=e[0],i=e[1];return i?i.overlaps(t)||i.abutsStart(t)?[n,i.union(t)]:[n.concat([i]),t]:[n,t]}),[[],null]),n=t[0],i=t[1];return i&&n.push(i),n},e.xor=function(t){for(var n,i,r=null,o=0,s=[],a=t.map((function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]})),c=h((n=Array.prototype).concat.apply(n,a).sort((function(e,t){return e.time-t.time})));!(i=c()).done;){var u=i.value;1===(o+="s"===u.type?1:-1)?r=u.time:(r&&+r!=+u.time&&s.push(e.fromDateTimes(r,u.time)),r=null)}return e.merge(s)},t.difference=function(){for(var t=this,n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.xor([this].concat(i)).map((function(e){return t.intersection(e)})).filter((function(e){return e&&!e.isEmpty()}))},t.toString=function(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":dn},t.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):dn},t.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():dn},t.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):dn},t.toFormat=function(e,t){var n=(void 0===t?{}:t).separator,i=void 0===n?" – ":n;return this.isValid?""+this.s.toFormat(e)+i+this.e.toFormat(e):dn},t.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):un.invalid(this.invalidReason)},t.mapEndpoints=function(t){return e.fromDateTimes(t(this.s),t(this.e))},r(e,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),e}(),vn=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=tt.defaultZone);var t=li.now().setZone(e).set({month:12});return!e.universal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return ze.isValidSpecifier(e)&&ze.isValidZone(e)},e.normalizeZone=function(e){return Ge(e,tt.defaultZone)},e.months=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o,a=n.locObj,c=void 0===a?null:a,u=n.outputCalendar,l=void 0===u?"gregory":u;return(c||ht.create(r,s,l)).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o,a=n.locObj,c=void 0===a?null:a,u=n.outputCalendar,l=void 0===u?"gregory":u;return(c||ht.create(r,s,l)).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o,a=n.locObj;return((void 0===a?null:a)||ht.create(r,s,null)).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o,a=n.locObj;return((void 0===a?null:a)||ht.create(r,s,null)).weekdays(e,!0)},e.meridiems=function(e){var t=(void 0===e?{}:e).locale,n=void 0===t?null:t;return ht.create(n).meridiems()},e.eras=function(e,t){void 0===e&&(e="short");var n=(void 0===t?{}:t).locale,i=void 0===n?null:n;return ht.create(i,null,"gregory").eras(e)},e.features=function(){var e=!1,t=!1,n=!1,i=!1;if(Y()){e=!0,t=$(),i=K();try{n="America/New_York"===new Intl.DateTimeFormat("en",{timeZone:"America/New_York"}).resolvedOptions().timeZone}catch(e){n=!1}}return{intl:e,intlTokens:t,zones:n,relative:i}},e}();function pn(e,t){var n=function(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()},i=n(t)-n(e);return Math.floor(un.fromMillis(i).as("days"))}function gn(e,t,n,i){var r=function(e,t,n){for(var i,r,o={},s=0,a=[["years",function(e,t){return t.year-e.year}],["quarters",function(e,t){return t.quarter-e.quarter}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){var n=pn(e,t);return(n-n%7)/7}],["days",pn]];s<a.length;s++){var c=a[s],u=c[0],l=c[1];if(n.indexOf(u)>=0){var d;i=u;var h,f=l(e,t);if((r=e.plus(((d={})[u]=f,d)))>t)e=e.plus(((h={})[u]=f-1,h)),f-=1;else e=r;o[u]=f}}return[e,o,r,i]}(e,t,n),o=r[0],s=r[1],a=r[2],c=r[3],u=t-o,l=n.filter((function(e){return["hours","minutes","seconds","milliseconds"].indexOf(e)>=0}));if(0===l.length){var d;if(a<t)a=o.plus(((d={})[c]=1,d));a!==o&&(s[c]=(s[c]||0)+u/(a-o))}var h,f=un.fromObject(Object.assign(s,i));return l.length>0?(h=un.fromMillis(u,i)).shiftTo.apply(h,l).plus(f):f}var mn={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},yn={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},En=mn.hanidec.replace(/[\[|\]]/g,"").split("");function bn(e,t){var n=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+mn[n||"latn"]+t)}function wn(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){var n=e[0];return t(function(e){var t=parseInt(e,10);if(isNaN(t)){t="";for(var n=0;n<e.length;n++){var i=e.charCodeAt(n);if(-1!==e[n].search(mn.hanidec))t+=En.indexOf(e[n]);else for(var r in yn){var o=yn[r],s=o[0],a=o[1];i>=s&&i<=a&&(t+=i-s)}}return parseInt(t,10)}return t}(n))}}}var Sn="( |"+String.fromCharCode(160)+")",kn=new RegExp(Sn,"g");function In(e){return e.replace(/\./g,"\\.?").replace(kn,Sn)}function An(e){return e.replace(/\./g,"").replace(kn," ").toLowerCase()}function Tn(e,t){return null===e?null:{regex:RegExp(e.map(In).join("|")),deser:function(n){var i=n[0];return e.findIndex((function(e){return An(i)===An(e)}))+t}}}function Cn(e,t){return{regex:e,deser:function(e){return fe(e[1],e[2])},groups:t}}function On(e){return{regex:e,deser:function(e){return e[0]}}}var Un={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};var Rn=null;function Ln(e,t){if(e.literal)return e;var n=Pe.macroTokenToFormatOpts(e.val);if(!n)return e;var i=Pe.create(t,n).formatDateTimeParts((Rn||(Rn=li.fromMillis(1555555555555)),Rn)).map((function(e){return function(e,t,n){var i=e.type,r=e.value;if("literal"===i)return{literal:!0,val:r};var o=n[i],s=Un[i];return"object"==typeof s&&(s=s[o]),s?{literal:!1,val:s}:void 0}(e,0,n)}));return i.includes(void 0)?e:i}function xn(e,t,n){var i=function(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map((function(e){return Ln(e,t)})))}(Pe.parseFormat(n),e),r=i.map((function(t){return n=t,r=bn(i=e),o=bn(i,"{2}"),s=bn(i,"{3}"),a=bn(i,"{4}"),c=bn(i,"{6}"),u=bn(i,"{1,2}"),l=bn(i,"{1,3}"),d=bn(i,"{1,6}"),h=bn(i,"{1,9}"),f=bn(i,"{2,4}"),v=bn(i,"{4,6}"),p=function(e){return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:function(e){return e[0]},literal:!0};var t},(g=function(e){if(n.literal)return p(e);switch(e.val){case"G":return Tn(i.eras("short",!1),0);case"GG":return Tn(i.eras("long",!1),0);case"y":return wn(d);case"yy":return wn(f,de);case"yyyy":return wn(a);case"yyyyy":return wn(v);case"yyyyyy":return wn(c);case"M":return wn(u);case"MM":return wn(o);case"MMM":return Tn(i.months("short",!0,!1),1);case"MMMM":return Tn(i.months("long",!0,!1),1);case"L":return wn(u);case"LL":return wn(o);case"LLL":return Tn(i.months("short",!1,!1),1);case"LLLL":return Tn(i.months("long",!1,!1),1);case"d":return wn(u);case"dd":return wn(o);case"o":return wn(l);case"ooo":return wn(s);case"HH":return wn(o);case"H":return wn(u);case"hh":return wn(o);case"h":return wn(u);case"mm":return wn(o);case"m":case"q":return wn(u);case"qq":return wn(o);case"s":return wn(u);case"ss":return wn(o);case"S":return wn(l);case"SSS":return wn(s);case"u":return On(h);case"a":return Tn(i.meridiems(),0);case"kkkk":return wn(a);case"kk":return wn(f,de);case"W":return wn(u);case"WW":return wn(o);case"E":case"c":return wn(r);case"EEE":return Tn(i.weekdays("short",!1,!1),1);case"EEEE":return Tn(i.weekdays("long",!1,!1),1);case"ccc":return Tn(i.weekdays("short",!0,!1),1);case"cccc":return Tn(i.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Cn(new RegExp("([+-]"+u.source+")(?::("+o.source+"))?"),2);case"ZZZ":return Cn(new RegExp("([+-]"+u.source+")("+o.source+")?"),2);case"z":return On(/[a-z_+-/]{1,256}?/i);default:return p(e)}}(n)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"}).token=n,g;var n,i,r,o,s,a,c,u,l,d,h,f,v,p,g})),o=r.find((function(e){return e.invalidReason}));if(o)return{input:t,tokens:i,invalidReason:o.invalidReason};var s=function(e){return["^"+e.map((function(e){return e.regex})).reduce((function(e,t){return e+"("+t.source+")"}),"")+"$",e]}(r),a=s[0],c=s[1],u=RegExp(a,"i"),l=function(e,t,n){var i=e.match(t);if(i){var r={},o=1;for(var s in n)if(ee(n,s)){var a=n[s],c=a.groups?a.groups+1:1;!a.literal&&a.token&&(r[a.token.val[0]]=a.deser(i.slice(o,o+c))),o+=c}return[i,r]}return[i,{}]}(t,u,c),d=l[0],h=l[1],f=h?function(e){var t;return t=W(e.Z)?W(e.z)?null:ze.create(e.z):new We(e.Z),W(e.q)||(e.M=3*(e.q-1)+1),W(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),W(e.u)||(e.S=re(e.u)),[Object.keys(e).reduce((function(t,n){var i=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(n);return i&&(t[i]=e[n]),t}),{}),t]}(h):[null,null],v=f[0],p=f[1];if(ee(h,"a")&&ee(h,"H"))throw new m("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:i,regex:u,rawMatches:d,matches:h,result:v,zone:p}}var Dn=[0,31,59,90,120,151,181,212,243,273,304,334],Nn=[0,31,60,91,121,152,182,213,244,274,305,335];function Pn(e,t){return new _e("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function _n(e,t,n){var i=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===i?7:i}function Mn(e,t,n){return n+(se(e)?Nn:Dn)[t-1]}function Vn(e,t){var n=se(e)?Nn:Dn,i=n.findIndex((function(e){return e<t}));return{month:i+1,day:t-n[i]}}function jn(e){var t,n=e.year,i=e.month,r=e.day,o=Mn(n,i,r),s=_n(n,i,r),a=Math.floor((o-s+10)/7);return a<1?a=le(t=n-1):a>le(n)?(t=n+1,a=1):t=n,Object.assign({weekYear:t,weekNumber:a,weekday:s},me(e))}function qn(e){var t,n=e.weekYear,i=e.weekNumber,r=e.weekday,o=_n(n,1,4),s=ae(n),a=7*i+r-o-3;a<1?a+=ae(t=n-1):a>s?(t=n+1,a-=ae(n)):t=n;var c=Vn(t,a),u=c.month,l=c.day;return Object.assign({year:t,month:u,day:l},me(e))}function Fn(e){var t=e.year,n=Mn(t,e.month,e.day);return Object.assign({year:t,ordinal:n},me(e))}function Bn(e){var t=e.year,n=Vn(t,e.ordinal),i=n.month,r=n.day;return Object.assign({year:t,month:i,day:r},me(e))}function Hn(e){var t=G(e.year),n=te(e.month,1,12),i=te(e.day,1,ce(e.year,e.month));return t?n?!i&&Pn("day",e.day):Pn("month",e.month):Pn("year",e.year)}function zn(e){var t=e.hour,n=e.minute,i=e.second,r=e.millisecond,o=te(t,0,23)||24===t&&0===n&&0===i&&0===r,s=te(n,0,59),a=te(i,0,59),c=te(r,0,999);return o?s?a?!c&&Pn("millisecond",r):Pn("second",i):Pn("minute",n):Pn("hour",t)}function Jn(e){return new _e("unsupported zone",'the zone "'+e.name+'" is not supported')}function Wn(e){return null===e.weekData&&(e.weekData=jn(e.c)),e.weekData}function Zn(e,t){var n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new li(Object.assign({},n,t,{old:n}))}function Gn(e,t,n){var i=e-60*t*1e3,r=n.offset(i);if(t===r)return[i,t];i-=60*(r-t)*1e3;var o=n.offset(i);return r===o?[i,r]:[e-60*Math.min(r,o)*1e3,Math.max(r,o)]}function Yn(e,t){var n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function $n(e,t,n){return Gn(ue(e),t,n)}function Kn(e,t){var n=e.o,i=e.c.year+Math.trunc(t.years),r=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),o=Object.assign({},e.c,{year:i,month:r,day:Math.min(e.c.day,ce(i,r))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),s=un.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=Gn(ue(o),n,e.zone),c=a[0],u=a[1];return 0!==s&&(c+=s,u=e.zone.offset(c)),{ts:c,o:u}}function Xn(e,t,n,i,r){var o=n.setZone,s=n.zone;if(e&&0!==Object.keys(e).length){var a=t||s,c=li.fromObject(Object.assign(e,n,{zone:a,setZone:void 0}));return o?c:c.setZone(s)}return li.invalid(new _e("unparsable",'the input "'+r+"\" can't be parsed as "+i))}function Qn(e,t,n){return void 0===n&&(n=!0),e.isValid?Pe.create(ht.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function ei(e,t){var n=t.suppressSeconds,i=void 0!==n&&n,r=t.suppressMilliseconds,o=void 0!==r&&r,s=t.includeOffset,a=t.includePrefix,c=void 0!==a&&a,u=t.includeZone,l=void 0!==u&&u,d=t.spaceZone,h=void 0!==d&&d,f=t.format,v=void 0===f?"extended":f,p="basic"===v?"HHmm":"HH:mm";i&&0===e.second&&0===e.millisecond||(p+="basic"===v?"ss":":ss",o&&0===e.millisecond||(p+=".SSS")),(l||s)&&h&&(p+=" "),l?p+="z":s&&(p+="basic"===v?"ZZZ":"ZZ");var g=Qn(e,p);return c&&(g="T"+g),g}var ti={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ni={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ii={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ri=["year","month","day","hour","minute","second","millisecond"],oi=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],si=["year","ordinal","hour","minute","second","millisecond"];function ai(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new y(e);return t}function ci(e,t){for(var n,i=h(ri);!(n=i()).done;){var r=n.value;W(e[r])&&(e[r]=ti[r])}var o=Hn(e)||zn(e);if(o)return li.invalid(o);var s=tt.now(),a=$n(e,t.offset(s),t),c=a[0],u=a[1];return new li({ts:c,zone:t,o:u})}function ui(e,t,n){var i=!!W(n.round)||n.round,r=function(e,r){return e=oe(e,i||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(e,r)},o=function(i){return n.calendary?t.hasSame(e,i)?0:t.startOf(i).diff(e.startOf(i),i).get(i):t.diff(e,i).get(i)};if(n.unit)return r(o(n.unit),n.unit);for(var s,a=h(n.units);!(s=a()).done;){var c=s.value,u=o(c);if(Math.abs(u)>=1)return r(u,c)}return r(e>t?-0:0,n.units[n.units.length-1])}var li=function(){function e(e){var t=e.zone||tt.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new _e("invalid input"):null)||(t.isValid?null:Jn(t));this.ts=W(e.ts)?tt.now():e.ts;var i=null,r=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t)){var o=[e.old.c,e.old.o];i=o[0],r=o[1]}else{var s=t.offset(this.ts);i=Yn(this.ts,s),i=(n=Number.isNaN(i.year)?new _e("invalid input"):null)?null:i,r=n?null:s}this._zone=t,this.loc=e.loc||ht.create(),this.invalid=n,this.weekData=null,this.c=i,this.o=r,this.isLuxonDateTime=!0}e.now=function(){return new e({})},e.local=function(t,n,i,r,o,s,a){return W(t)?e.now():ci({year:t,month:n,day:i,hour:r,minute:o,second:s,millisecond:a},tt.defaultZone)},e.utc=function(t,n,i,r,o,s,a){return W(t)?new e({ts:tt.now(),zone:We.utcInstance}):ci({year:t,month:n,day:i,hour:r,minute:o,second:s,millisecond:a},We.utcInstance)},e.fromJSDate=function(t,n){void 0===n&&(n={});var i,r=(i=t,"[object Date]"===Object.prototype.toString.call(i)?t.valueOf():NaN);if(Number.isNaN(r))return e.invalid("invalid input");var o=Ge(n.zone,tt.defaultZone);return o.isValid?new e({ts:r,zone:o,loc:ht.fromObject(n)}):e.invalid(Jn(o))},e.fromMillis=function(t,n){if(void 0===n&&(n={}),Z(t))return t<-864e13||t>864e13?e.invalid("Timestamp out of range"):new e({ts:t,zone:Ge(n.zone,tt.defaultZone),loc:ht.fromObject(n)});throw new E("fromMillis requires a numerical input, but received a "+typeof t+" with value "+t)},e.fromSeconds=function(t,n){if(void 0===n&&(n={}),Z(t))return new e({ts:1e3*t,zone:Ge(n.zone,tt.defaultZone),loc:ht.fromObject(n)});throw new E("fromSeconds requires a numerical input")},e.fromObject=function(t){var n=Ge(t.zone,tt.defaultZone);if(!n.isValid)return e.invalid(Jn(n));var i=tt.now(),r=n.offset(i),o=pe(t,ai,["zone","locale","outputCalendar","numberingSystem"]),s=!W(o.ordinal),a=!W(o.year),c=!W(o.month)||!W(o.day),u=a||c,l=o.weekYear||o.weekNumber,d=ht.fromObject(t);if((u||s)&&l)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&s)throw new m("Can't mix ordinal dates with month/day");var f,v,p=l||o.weekday&&!u,g=Yn(i,r);p?(f=oi,v=ni,g=jn(g)):s?(f=si,v=ii,g=Fn(g)):(f=ri,v=ti);for(var y,E=!1,b=h(f);!(y=b()).done;){var w=y.value;W(o[w])?o[w]=E?v[w]:g[w]:E=!0}var S=(p?function(e){var t=G(e.weekYear),n=te(e.weekNumber,1,le(e.weekYear)),i=te(e.weekday,1,7);return t?n?!i&&Pn("weekday",e.weekday):Pn("week",e.week):Pn("weekYear",e.weekYear)}(o):s?function(e){var t=G(e.year),n=te(e.ordinal,1,ae(e.year));return t?!n&&Pn("ordinal",e.ordinal):Pn("year",e.year)}(o):Hn(o))||zn(o);if(S)return e.invalid(S);var k=$n(p?qn(o):s?Bn(o):o,r,n),I=new e({ts:k[0],zone:n,o:k[1],loc:d});return o.weekday&&u&&t.weekday!==I.weekday?e.invalid("mismatched weekday","you can't specify both a weekday of "+o.weekday+" and a date of "+I.toISO()):I},e.fromISO=function(e,t){void 0===t&&(t={});var n=function(e){return pt(e,[Bt,Wt],[Ht,Zt],[zt,Gt],[Jt,Yt])}(e);return Xn(n[0],n[1],t,"ISO 8601",e)},e.fromRFC2822=function(e,t){void 0===t&&(t={});var n=function(e){return pt(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Pt,_t])}(e);return Xn(n[0],n[1],t,"RFC 2822",e)},e.fromHTTP=function(e,t){void 0===t&&(t={});var n=function(e){return pt(e,[Mt,qt],[Vt,qt],[jt,Ft])}(e);return Xn(n[0],n[1],t,"HTTP",t)},e.fromFormat=function(t,n,i){if(void 0===i&&(i={}),W(t)||W(n))throw new E("fromFormat requires an input string and a format");var r=i,o=r.locale,s=void 0===o?null:o,a=r.numberingSystem,c=void 0===a?null:a,u=function(e,t,n){var i=xn(e,t,n);return[i.result,i.zone,i.invalidReason]}(ht.fromOpts({locale:s,numberingSystem:c,defaultToEN:!0}),t,n),l=u[0],d=u[1],h=u[2];return h?e.invalid(h):Xn(l,d,i,"format "+n,t)},e.fromString=function(t,n,i){return void 0===i&&(i={}),e.fromFormat(t,n,i)},e.fromSQL=function(e,t){void 0===t&&(t={});var n=function(e){return pt(e,[Kt,Qt],[Xt,en])}(e);return Xn(n[0],n[1],t,"SQL",e)},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new E("need to specify a reason the DateTime is invalid");var i=t instanceof _e?t:new _e(t,n);if(tt.throwOnInvalid)throw new v(i);return new e({invalid:i})},e.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var t=e.prototype;return t.get=function(e){return this[e]},t.resolvedLocaleOpts=function(e){void 0===e&&(e={});var t=Pe.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t.locale,numberingSystem:t.numberingSystem,outputCalendar:t.calendar}},t.toUTC=function(e,t){return void 0===e&&(e=0),void 0===t&&(t={}),this.setZone(We.instance(e),t)},t.toLocal=function(){return this.setZone(tt.defaultZone)},t.setZone=function(t,n){var i=void 0===n?{}:n,r=i.keepLocalTime,o=void 0!==r&&r,s=i.keepCalendarTime,a=void 0!==s&&s;if((t=Ge(t,tt.defaultZone)).equals(this.zone))return this;if(t.isValid){var c=this.ts;if(o||a){var u=t.offset(this.ts);c=$n(this.toObject(),u,t)[0]}return Zn(this,{ts:c,zone:t})}return e.invalid(Jn(t))},t.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,i=t.numberingSystem,r=t.outputCalendar;return Zn(this,{loc:this.loc.clone({locale:n,numberingSystem:i,outputCalendar:r})})},t.setLocale=function(e){return this.reconfigure({locale:e})},t.set=function(e){if(!this.isValid)return this;var t,n=pe(e,ai,[]),i=!W(n.weekYear)||!W(n.weekNumber)||!W(n.weekday),r=!W(n.ordinal),o=!W(n.year),s=!W(n.month)||!W(n.day),a=o||s,c=n.weekYear||n.weekNumber;if((a||r)&&c)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&r)throw new m("Can't mix ordinal dates with month/day");i?t=qn(Object.assign(jn(this.c),n)):W(n.ordinal)?(t=Object.assign(this.toObject(),n),W(n.day)&&(t.day=Math.min(ce(t.year,t.month),t.day))):t=Bn(Object.assign(Fn(this.c),n));var u=$n(t,this.o,this.zone);return Zn(this,{ts:u[0],o:u[1]})},t.plus=function(e){return this.isValid?Zn(this,Kn(this,ln(e))):this},t.minus=function(e){return this.isValid?Zn(this,Kn(this,ln(e).negate())):this},t.startOf=function(e){if(!this.isValid)return this;var t={},n=un.normalizeUnit(e);switch(n){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}if("weeks"===n&&(t.weekday=1),"quarters"===n){var i=Math.ceil(this.month/3);t.month=3*(i-1)+1}return this.set(t)},t.endOf=function(e){var t;return this.isValid?this.plus((t={},t[e]=1,t)).startOf(e).minus(1):this},t.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Pe.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):"Invalid DateTime"},t.toLocaleString=function(e){return void 0===e&&(e=I),this.isValid?Pe.create(this.loc.clone(e),e).formatDateTime(this):"Invalid DateTime"},t.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Pe.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},t.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},t.toISODate=function(e){var t=(void 0===e?{}:e).format,n="basic"===(void 0===t?"extended":t)?"yyyyMMdd":"yyyy-MM-dd";return this.year>9999&&(n="+"+n),Qn(this,n)},t.toISOWeekDate=function(){return Qn(this,"kkkk-'W'WW-c")},t.toISOTime=function(e){var t=void 0===e?{}:e,n=t.suppressMilliseconds,i=void 0!==n&&n,r=t.suppressSeconds,o=void 0!==r&&r,s=t.includeOffset,a=void 0===s||s,c=t.includePrefix,u=void 0!==c&&c,l=t.format;return ei(this,{suppressSeconds:o,suppressMilliseconds:i,includeOffset:a,includePrefix:u,format:void 0===l?"extended":l})},t.toRFC2822=function(){return Qn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},t.toHTTP=function(){return Qn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},t.toSQLDate=function(){return Qn(this,"yyyy-MM-dd")},t.toSQLTime=function(e){var t=void 0===e?{}:e,n=t.includeOffset,i=void 0===n||n,r=t.includeZone;return ei(this,{includeOffset:i,includeZone:void 0!==r&&r,spaceZone:!0})},t.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},t.toString=function(){return this.isValid?this.toISO():"Invalid DateTime"},t.valueOf=function(){return this.toMillis()},t.toMillis=function(){return this.isValid?this.ts:NaN},t.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},t.toJSON=function(){return this.toISO()},t.toBSON=function(){return this.toJSDate()},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},t.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return un.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var i,r=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),o=(i=t,Array.isArray(i)?i:[i]).map(un.normalizeUnit),s=e.valueOf()>this.valueOf(),a=gn(s?this:e,s?e:this,o,r);return s?a.negate():a},t.diffNow=function(t,n){return void 0===t&&(t="milliseconds"),void 0===n&&(n={}),this.diff(e.now(),t,n)},t.until=function(e){return this.isValid?fn.fromDateTimes(this,e):this},t.hasSame=function(e,t){if(!this.isValid)return!1;var n=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t)<=n&&n<=i.endOf(t)},t.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},t.toRelative=function(t){if(void 0===t&&(t={}),!this.isValid)return null;var n=t.base||e.fromObject({zone:this.zone}),i=t.padding?this<n?-t.padding:t.padding:0,r=["years","months","days","hours","minutes","seconds"],o=t.unit;return Array.isArray(t.unit)&&(r=t.unit,o=void 0),ui(n,this.plus(i),Object.assign(t,{numeric:"always",units:r,unit:o}))},t.toRelativeCalendar=function(t){return void 0===t&&(t={}),this.isValid?ui(t.base||e.fromObject({zone:this.zone}),this,Object.assign(t,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},e.min=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(!n.every(e.isDateTime))throw new E("min requires all arguments be DateTimes");return X(n,(function(e){return e.valueOf()}),Math.min)},e.max=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(!n.every(e.isDateTime))throw new E("max requires all arguments be DateTimes");return X(n,(function(e){return e.valueOf()}),Math.max)},e.fromFormatExplain=function(e,t,n){void 0===n&&(n={});var i=n,r=i.locale,o=void 0===r?null:r,s=i.numberingSystem,a=void 0===s?null:s;return xn(ht.fromOpts({locale:o,numberingSystem:a,defaultToEN:!0}),e,t)},e.fromStringExplain=function(t,n,i){return void 0===i&&(i={}),e.fromFormatExplain(t,n,i)},r(e,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?Wn(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?Wn(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?Wn(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?Fn(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?vn.months("short",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?vn.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?vn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?vn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.universal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return se(this.year)}},{key:"daysInMonth",get:function(){return ce(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?ae(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?le(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return I}},{key:"DATE_MED",get:function(){return A}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return T}},{key:"DATE_FULL",get:function(){return C}},{key:"DATE_HUGE",get:function(){return O}},{key:"TIME_SIMPLE",get:function(){return U}},{key:"TIME_WITH_SECONDS",get:function(){return R}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return L}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return x}},{key:"TIME_24_SIMPLE",get:function(){return D}},{key:"TIME_24_WITH_SECONDS",get:function(){return N}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return P}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return _}},{key:"DATETIME_SHORT",get:function(){return M}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return V}},{key:"DATETIME_MED",get:function(){return j}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return q}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return F}},{key:"DATETIME_FULL",get:function(){return B}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return H}},{key:"DATETIME_HUGE",get:function(){return z}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return J}}]),e}();function di(e){if(li.isDateTime(e))return e;if(e&&e.valueOf&&Z(e.valueOf()))return li.fromJSDate(e);if(e&&"object"==typeof e)return li.fromObject(e);throw new E("Unknown datetime argument: "+e+", of type "+typeof e)}t.DateTime=li,t.Duration=un,t.FixedOffsetZone=We,t.IANAZone=ze,t.Info=vn,t.Interval=fn,t.InvalidZone=Ze,t.LocalZone=je,t.Settings=tt,t.VERSION="1.28.1",t.Zone=Me},function(e,t,n){(function(e){var i=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(39),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(9))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var i,r,o,s,a,c=1,u={},l=!1,d=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?i=function(e){t.nextTick((function(){v(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){v(e.data)},i=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,i=function(e){var t=d.createElement("script");t.onreadystatechange=function(){v(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):i=function(e){setTimeout(v,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&v(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),i=function(t){e.postMessage(s+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return u[c]=r,i(c),c++},h.clearImmediate=f}function f(e){delete u[e]}function v(e){if(l)setTimeout(v,0,e);else{var t=u[e];if(t){l=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{f(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(9),n(17))},function(e,t,n){"use strict";(function(e){
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(window,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=50)}([function(e,t,n){var i;self,i=()=>(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{AssertUtils:()=>$,BrowserNotification:()=>h,Decorator:()=>E,Err:()=>f,Evt:()=>I,I18N:()=>N,Logger:()=>u,NotificationItemsContent:()=>P,Notifications:()=>V,Signal:()=>j,clearInterval:()=>W,clearTimeout:()=>Z,createBrowserNotifications:()=>v,createHttp:()=>O,createLogger:()=>l,createNotifications:()=>F,ensureError:()=>K,setInterval:()=>G,setTimeout:()=>Y});const i=n(8);var r=e.n(i);const o=n(37),s="*********";class a{constructor(e){this.maskKeys=e}tryJSONParse(e){try{return JSON.parse(e)}catch(e){return}}copiedObj(e){try{return JSON.parse(JSON.stringify(e))}catch(t){return e}}maskObjectProperty(e){const t=e;Object.keys(e).forEach(n=>{"object"==typeof e[n]&&null!==e[n]?this.maskObjectProperty(e[n]):t[n]=s})}maskLogData(e){Object.keys(e).forEach(t=>{"object"==typeof e[t]&&null!==e[t]?this.maskKeys[t]?this.maskObjectProperty(e[t]):this.maskLogData(e[t]):(this.maskKeys[t]&&"string"==typeof e[t]||"value"===t&&this.maskKeys[e.name])&&(e[t]=s)})}maskPIIInformation(e){const t=e[e.length-1],n="string"==typeof t?this.tryJSONParse(t):this.copiedObj(t);n&&"object"==typeof n&&(this.maskLogData(n),e.splice(e.length-1,1,n))}}const c=(...e)=>e.map(e=>"string"==typeof e?e:JSON.stringify(e));var u;function l(e,t){const n=new u.Service(e,t);return u.POOL.addLogger(n),n}!function(e){e.MAX_LOGS_SIZE=1048576,e.LS_LOGS_KEY="uuip-client-logs";const t="<uuip-eol>",n=/[\u0100-\uFFFF]/g,i="yyyy-LL-dd HH:mm:ss:SSS";let s;e.defaultSaveIntervalMilliSeconds=5e3,function(e){e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Warn=3]="Warn",e[e.Error=4]="Error",e[e.Fatal=5]="Fatal"}(s=e.Level||(e.Level={})),e.Service=class{constructor(e,t){this.loggerEmitter=r()(),this.prefix=e,this.maskKeys=t}log(t,...n){this.maskKeys&&"object"==typeof this.maskKeys&&((e,t)=>{new a(t).maskPIIInformation(e)})(n,this.maskKeys);const r=c(this.prefix?[""+this.prefix,...n]:n),s=Date.now(),u=o.DateTime.fromMillis(s).toFormat(i);switch(t){case e.Level.Trace:console.info(u,...r);break;case e.Level.Debug:console.log(u,...r);break;case e.Level.Warn:console.warn(u,...r);break;case e.Level.Error:case e.Level.Fatal:console.error(u,...r);break;default:console.log(...r)}const l={pfx:this.prefix,msgs:[...n],ts:s,lvl:t};this.emit("add",l)}info(...e){this.log(s.Trace,...e)}debug(...e){this.log(s.Debug,...e)}warn(...e){this.log(s.Warn,...e)}error(...e){this.log(s.Error,...e)}emit(e,...t){this.loggerEmitter.emit(e,...t)}addEventListener(e,t){return this.loggerEmitter.on(e,t),()=>{this.removeEventListener(e,t)}}removeEventListener(e,t){this.loggerEmitter.off(e,t)}};class u{constructor(){this.loggers=new Map,this.logsCollectionString="",this.prefixedLogsCollections={},this.lastSaveTime=Date.now(),this.config={saveIntervalMilliSeconds:e.defaultSaveIntervalMilliSeconds},this.logRecordsSerializedLength=0,this.flush=()=>{this.save(!1)},this.onLoggerAddRecord=e=>{this.addLogRecord(e),this.save(!0)},this.restore()}static getSerializedJsonLogRecordBytesSize(e=""){const t=e.length;if(t){const i=e.replace(n,"").length;return 1*i+2*(t-i)}return t}get serializedJsonLogsBytesSize(){const e=this.logsCollectionString.split(t).length;return 2+this.logRecordsSerializedLength+1*(e-1)}save(t=!0){const n=Date.now();t&&n-this.lastSaveTime<this.config.saveIntervalMilliSeconds||(this.lastSaveTime=n,window.sessionStorage.setItem(e.LS_LOGS_KEY,this.logsCollectionString))}restore(){try{const t=window.sessionStorage.getItem(e.LS_LOGS_KEY)||"";this.logsCollectionString=t,this.logRecordsSerializedLength+=u.getSerializedJsonLogRecordBytesSize(this.logsCollectionString),this.restorePreFixedLogs()}catch(e){console.warn("Logger failed read logs from sessionStorage: ",e)}}getLogObjectFromString(){try{return""!==this.logsCollectionString?JSON.parse(`[${this.logsCollectionString.split(t).join(",")}]`):[]}catch(e){console.log("Error parsing local storage data")}}restorePreFixedLogs(){const e=this.getLogObjectFromString();e&&Array.isArray(e)&&e.length>0&&e.forEach(e=>{this.addPreFixedLogs(e),this.removeOversized()})}addPreFixedLogs(e){this.prefixedLogsCollections[e.pfx]=this.prefixedLogsCollections[e.pfx]||new Set,this.prefixedLogsCollections[e.pfx].add(e)}removeOversized(){for(;this.serializedJsonLogsBytesSize>e.MAX_LOGS_SIZE&&""!==this.logsCollectionString;)this.removeLogRecord()}removeTextFromString(e,t,n){return`${e.slice(0,t)}${e.slice(n+t)}`}addLogRecord(e){try{const n=JSON.stringify(e),i=this.logsCollectionString;this.logsCollectionString=null==i?void 0:i.concat(`${""!==i.trim()?t:""}${n}`)}catch(t){const n=JSON.stringify(e);this.logsCollectionString=n,console.warn("Logger failed read logs from sessionStorage: ",t)}this.logRecordsSerializedLength+=u.getSerializedJsonLogRecordBytesSize(JSON.stringify(e)),this.addPreFixedLogs(e),this.removeOversized()}removeLogRecord(){if(""!==this.logsCollectionString){const e=this.logsCollectionString.indexOf(t);if(-1!==e){const t=this.logsCollectionString.substring(0,e),n=e+10,i=this.removeTextFromString(this.logsCollectionString,0,n);this.logsCollectionString=i,this.logRecordsSerializedLength-=u.getSerializedJsonLogRecordBytesSize(t);try{const e=JSON.parse(t);this.prefixedLogsCollections[e.pfx]&&this.prefixedLogsCollections[e.pfx].forEach(t=>{t.ts===e.ts&&this.prefixedLogsCollections[e.pfx].delete(t)})}catch(e){console.warn("Logger failed to read/parse the first logs from sessionStorage: ",e)}}}}removePreFixedLogs(e){const n=this.getLogObjectFromString();e.forEach(e=>{const t=n.findIndex(t=>t.pfx===e.pfx);-1!==t&&(n.splice(t,1),this.logRecordsSerializedLength-=u.getSerializedJsonLogRecordBytesSize(JSON.stringify(e)),this.prefixedLogsCollections[e.pfx]&&this.prefixedLogsCollections[e.pfx].has(e)&&this.prefixedLogsCollections[e.pfx].delete(e))}),this.logsCollectionString=n.map(e=>JSON.stringify(e)).join(t)}static getLogRecordReadable(e){if(e.ts)return{prefix:e.pfx,messages:e.msgs,timestamp:o.DateTime.fromMillis(e.ts).toFormat(i),level:s[e.lvl]}}static getLogsReadableJson(e){const t=e=>e.map(e=>u.getLogRecordReadable(e));return JSON.stringify(Array.isArray(e)?t(e):Object.keys(e).reduce((n,i)=>(n[i]=t(e[i]),n),{}),null,2)}static getLogsReadableText(e){const t=e=>e.reduce((e,t)=>{const n=u.getLogRecordReadable(t);return n&&(e+=`${n.timestamp} ${n.prefix} ${n.level} ${c(n.messages).join(" ")} \r\n`),e},"");return Array.isArray(e)?t(e):Object.keys(e).reduce((n,i)=>(n+=`[SERVICE "${i}" LOGS]: `)+t(e[i]),"")}static getLogsUrl(e){return"data:text/plain;charset=utf-8,"+encodeURIComponent(e)}static browserDownload(e,t){try{if(document&&document.createElement){const n=document.createElement("a");n.setAttribute("href",e),n.setAttribute("download",t),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}else console.warn("Browser is not supported to download logs")}catch(e){}}addLogger(e){this.loggers.set(e.prefix,e),e.removeEventListener("add",this.onLoggerAddRecord),e.addEventListener("add",this.onLoggerAddRecord)}getAllLogsJsonUrl(){return u.getLogsUrl(u.getLogsReadableJson(this.getLogObjectFromString()))}getAllPrefixedLogsJsonUrl(){return u.getLogsUrl(u.getLogsReadableJson(this.getAllPrefixedLogsCollections()))}getPrefixedLogsJsonUrl(e){return u.getLogsUrl(u.getLogsReadableJson(this.getPrefixedLogsCollection(e)))}getAllLogsTextUrl(){return u.getLogsUrl(u.getLogsReadableText(this.getLogObjectFromString()))}getPrefixedLogsTextUrl(e){return u.getLogsUrl(u.getLogsReadableText(this.getPrefixedLogsCollection(e)))}browserDownloadAllLogsJson(){u.browserDownload(this.getAllLogsJsonUrl(),new Date+"_all_logs.json")}browserDownloadAllPrefixedLogsJson(){u.browserDownload(this.getAllPrefixedLogsJsonUrl(),new Date+"_all_prefixed_logs.json")}browserDownloadPrefixedLogsJson(e){u.browserDownload(this.getPrefixedLogsJsonUrl(e),`${new Date}_${e}_logs.json`)}browserDownloadAllLogsText(){u.browserDownload(this.getAllLogsTextUrl(),new Date+"_all_logs.log")}browserDownloadPrefixedLogsText(e){u.browserDownload(this.getPrefixedLogsTextUrl(e),`${new Date}_${e}_logs.log`)}cleanupAllLogs(){this.logRecordsSerializedLength=0,this.logsCollectionString="",Object.keys(this.prefixedLogsCollections).forEach(e=>this.prefixedLogsCollections[e]=new Set),this.save(!0)}cleanupPrefixedLogs(e){const t=this.getPrefixedLogsCollection(e);this.removePreFixedLogs(t),this.prefixedLogsCollections[e]=new Set,this.save(!0)}getAllPrefixedLogsCollections(){return Object.keys(this.prefixedLogsCollections).reduce((e,t)=>(e[t]=this.getPrefixedLogsCollection(t),e),{})}getPrefixedLogsCollection(e){return Array.from(this.prefixedLogsCollections[e]||new Set)}}e.ServicesPool=u,e.POOL=new e.ServicesPool}(u||(u={}));const d=l("unified-ui-platform-sdk",{title:!0,text:!0});var h,f;function v(e){return new h.Service(e)}function p(e,t){if(e.descriptor=e.descriptor||Object.getOwnPropertyDescriptor(e.target,e.key),"function"!=typeof e.descriptor.value)return console.warn(e.key,"Decorator must be used on function"),e.descriptor;const n=e.descriptor.value,i=e.target.constructor.name;return e.descriptor.value=function(){const e=[];for(let t=0;t<arguments.length;t++)e[t]=arguments[t];return t.call(this,n,e,i)},e.descriptor}function g(e=250){return function(t,n,i){let r;return p({target:t,key:n,descriptor:i},(function(t,n){clearTimeout(r),r=window.setTimeout(()=>{clearTimeout(r),t.apply(this,n)},e)}))}}function m(){return(e,t)=>{const n={get(){return new I(this,void 0!==t?t:e.key)},enumerable:!0,configurable:!0};return void 0!==t?Object.defineProperty(e,t,n):{kind:"method",placement:"prototype",key:e.key,descriptor:n}}}function y(e,t=!0){return function(n,i,r){return p({target:n,key:i,descriptor:r},(function(n,r){return o=this,a=function*(){const o="_"+i+"_exec_flag";if(t&&this[o])return void console.log("PREVENTING DOUBLE EXECUTION");const s=t=>{if(this[o]=t,"function"==typeof e)e.call(this,{isExec:t,ctx:this});else{const n=e;t?n.before&&n.before.call(this,this):n.after&&n.after.call(this,this)}};s(!0);const a=n.apply(this,r);return a instanceof Promise?a.then(()=>s(!1)).catch(()=>s(!1)):(console.warn("Must be async function to use [@Executing] decorator"),s(!1)),a},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{r(a.next(e))}catch(e){t(e)}}function i(e){try{r(a.throw(e))}catch(e){t(e)}}function r(t){var r;t.done?e(t.value):(r=t.value,r instanceof s?r:new s((function(e){e(r)}))).then(n,i)}r((a=a.apply(o,[])).next())}));var o,s,a}))}}!function(e){class t{static get isBrowserNotificationPromiseSupported(){try{window.Notification.requestPermission().then()}catch(e){return!1}return!0}constructor(e){this.defaultOptions=e||{}}get isBrowserNotificationSupported(){return!!("Notification"in window)}get isBrowserNotificationIconSupported(){return this.isBrowserNotificationSupported&&"icon"in window.Notification.prototype}get isBrowserNotificationImageSupported(){return this.isBrowserNotificationSupported&&"image"in window.Notification.prototype}get isBrowserNotificationBadgeSupported(){return this.isBrowserNotificationSupported&&"badge"in window.Notification.prototype}get isPermissionGranted(){return"granted"===window.Notification.permission}get isPermissionDenied(){return"denied"===window.Notification.permission}get isPermissionUnknown(){return!this.isPermissionGranted&&!this.isPermissionDenied}requestNotificationUserPermission(){return e=this,i=function*(){this.isBrowserNotificationSupported?t.isBrowserNotificationPromiseSupported?yield window.Notification.requestPermission():yield new Promise(e=>window.Notification.requestPermission(t=>e(t))):d.warn("Browser notification is not supported...")},new((n=void 0)||(n=Promise))((function(t,r){function o(e){try{a(i.next(e))}catch(e){r(e)}}function s(e){try{a(i.throw(e))}catch(e){r(e)}}function a(e){var i;e.done?t(e.value):(i=e.value,i instanceof n?i:new n((function(e){e(i)}))).then(o,s)}a((i=i.apply(e,[])).next())}));var e,n,i}fire(e,t){return new window.Notification(e,Object.assign(Object.assign({},this.defaultOptions),t||{}))}}e.Service=t}(h||(h={})),function(e){class t extends Error{constructor(e,t){super(),this.isErr="yes",this.id=e,this.stack=(new Error).stack,"string"==typeof t?this.message=t:t instanceof Error?(this.message=t.message,this.name=t.name):this.message=""}}e.Message=t;class n extends Error{constructor(e,t){super(),this.isErr="yes",this.id=e,this.stack=(new Error).stack,this.details=t}}e.Details=n}(f||(f={}));var E,b=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};function w(e){return function(t,n,i){return p({target:t,key:n,descriptor:i},(function(t,i,r){return b(this,void 0,void 0,(function*(){const o=this,s=t=>b(this,void 0,void 0,(function*(){t.id&&"string"==typeof t.id&&"yes"===t.isErr||("string"==typeof t||t instanceof Error?t=new f.Message("system",t):(console.warn("Err must be 'string' or 'new Error()' instance"),t=new f.Message("system","")));const i=t;i.ctx=o;const s=`Error] ${r}.${n} [${i.id}]: ${i.message}`;if("function"==typeof e){const t=e;console.log("[Handled"+s);const n=t.call(o,i);n instanceof Promise&&(yield n)}else{const t=e;if(t[i.id]){console.log("[Handled"+s);const e=t[i.id].call(o,i);e instanceof Promise&&(yield e)}else if(t.handle){console.log("[Handled"+s);const e=t.handle.call(o,i);e instanceof Promise&&(yield e)}else console.warn("[Unhandled "+s);if(t.fallback){const e=t.fallback.call(o,i);e instanceof Promise&&(yield e)}}}));try{const e=t.apply(o,i);return e instanceof Promise?new Promise(t=>{e.then(t).catch(e=>b(this,void 0,void 0,(function*(){yield s(e),t(void 0)})))}):e}catch(e){return void(yield s(e))}}))}))}}function S(){return function(e,t,n){return p({target:e,key:t,descriptor:n},(function(e,n){const i="_"+t+"_once_flag";if(!this[i])return this[i]=!0,e.call(this,n)}))}}function k(e=1e3/60){return function(t,n,i){let r,o=Date.now();return p({target:t,key:n,descriptor:i},(function(t,n){const i=(...n)=>{const s=Date.now();window.clearTimeout(r),!o||s-o>=e?(o=s,t.apply(this,n)):r=window.setTimeout(()=>i(...n),e-(s-o))};i(...n)}))}}!function(e){e.Debounce=g,e.Evt=m,e.Exec=y,e.Handle=w,e.Once=S,e.Throttle=k}(E||(E={}));class I{constructor(e,t){this.target=e,this.eventName=t}emit(e,t={bubbles:!0,composed:!0,cancelable:!1}){this.target.dispatchEvent(new CustomEvent(this.eventName,Object.assign({detail:e},t)))}}const A=n(49);var T=e.n(A);const C=n(51);function O(e){const t=T().create();return t.accessToken=e,t.interceptors.request.use(e=>{if(!e.headers.Authorization&&t.accessToken&&(e.headers.Authorization="Bearer "+t.accessToken),!e.headers.TrackingID){const t=(0,C.v1)();e.headers.TrackingID=`uuip_${t}_1.0:1.0`}return e.headers["Content-Type"]||(e.headers["Content-Type"]="application/json"),e}),t}const U=n(52);var R=e.n(U);const L=n(44);var x=e.n(L);const D=n(46);var N,P,_=e.n(D);!function(e){e.createService=e=>{const t=R().createInstance();{const n=e&&e.backend?e.backend:new(x());t.use(n)}{const n=e&&e.languageDetector?e.languageDetector:new(_());t.use(n)}return e&&e.logger&&t.use({log:"log"in e.logger?e.logger.log:e.logger.info,warn:e.logger.warn,error:e.logger.error,type:"logger"}),t},e.mergeServiceInitOptions=(...e)=>Object.assign.call(null,{},...e),e.createMixin=t=>{const n="i18n"in t?t.i18n:e.createService(),i="i18nInitOptions"in t?t.i18nInitOptions:null;i||d.info("i18n mixin instance waiting service initialization outside...");let r=!1;return e=>class extends e{constructor(){super(...arguments),this.onI18NInitialized=e=>this.requestUpdate(),this.onI18NLanguageChanged=e=>this.requestUpdate()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),n.on("initialized",this.onI18NInitialized),n.on("languageChanged",this.onI18NLanguageChanged),n.isInitialized||r||!i||(r=!0,n.init(i).finally(()=>r=!1))}disconnectedCallback(){n.off("initialized",this.onI18NInitialized),n.off("languageChanged",this.onI18NLanguageChanged),super.disconnectedCallback&&super.disconnectedCallback()}t(...e){return n.t(...e)}}}}(N||(N={})),function(e){e.DataController=class{constructor(e){this.localization={closeButtonText:"Close"},this.type=e.type,this.text=e.text,this.link=e.link,this.linkName=e.linkName,this.linkTooltip=e.linkTooltip,this.iconDetail=e.iconDetail,this.linkHandler=e.linkHandler,this.clickHandler=e.clickHandler,this.errorDetail=e.errorDetail,this.taskId=e.taskId,this.localization=e.localization||this.localization,this.dismissHandler=e.dismissHandler,this.actions=e.actions,this.lineClamp=e.lineClamp}}}(P||(P={}));const M=n(15);var V,j,q=e.n(M);function F(e={}){const t=new V.Service;return t.updateConfig(e),t}!function(e){let t,n;!function(e){let t,n,i,r,o,s,a,c;!function(e){e.Info="info",e.Warn="warn",e.Error="error",e.Success="success",e.Chat="chat",e.Default="default"}(t=e.Type||(e.Type={})),e.TYPES=Object.values(t),function(e){e.Silent="silent",e.AutoDismiss="autodismiss",e.Acknowledge="acknowledge"}(n=e.Mode||(e.Mode={})),e.MODES=Object.values(n),function(e){e.Added="added",e.Pended="pended",e.Activated="activated",e.Deactivated="deactivated",e.Removed="removed"}(i=e.Status||(e.Status={})),e.StatusWeight={[i.Added]:0,[i.Pended]:1,[i.Activated]:2,[i.Deactivated]:3,[i.Removed]:4},e.STATUSES=Object.values(i),function(e){e.User="user_add"}(r=e.AddEventReason||(e.AddEventReason={})),function(e){e.ServiceAutoPropagate="service_auto_propagate_pending",e.ServiceAutoDismiss="service_autodismiss_pending",e.UserSilent="user_silent_pending"}(o=e.PendingEventReason||(e.PendingEventReason={})),function(e){e.ServiceAutoPropagate="service_auto_propagate_activate"}(s=e.ActivateEventReason||(e.ActivateEventReason={})),function(e){e.UserNegative="user_negative_deactivate",e.UserPositive="user_positive_deactivate",e.UserNeutral="user_neutral_deactivate"}(a=e.DeactivateEventReason||(e.DeactivateEventReason={})),function(e){e.User="user_remove"}(c=e.RemoveEventReason||(e.RemoveEventReason={}))}(t=e.ItemMeta||(e.ItemMeta={})),function(e){e.STATUS_EVENTS=["add","pending","activate","deactivate","remove"],e.STATUS_EVENT_MAP={add:t.Status.Added,pending:t.Status.Pended,activate:t.Status.Activated,deactivate:t.Status.Deactivated,remove:t.Status.Removed},e.DISABLED_ITEM_MODE={[t.Mode.Silent]:!1,[t.Mode.AutoDismiss]:!1,[t.Mode.Acknowledge]:!1},e.ACTIVATED_ITEM_MODE_LIMIT={[t.Mode.Silent]:0,[t.Mode.AutoDismiss]:10,[t.Mode.Acknowledge]:1},e.AUTO_DISMISS_TIMEOUT=5e3}(n=e.ServiceMeta||(e.ServiceMeta={}));class i{constructor(){this.hubEmitter=r()()}emit(e,...t){this.hubEmitter.emit(e,...t)}addEventListener(e,t){this.hubEmitter.on(e,t)}addOnceEventListener(e,t){this.hubEmitter.once(e,t)}removeEventListener(e,t){this.hubEmitter.off(e,t)}removeAllEventListeners(){q()(this.hubEmitter)}}e.Item=class{get status(){return this._status}get reason(){return this._reason}get mode(){return this._mode}validateAuxOptions(e){let n={};return e&&void 0!==e.AUTO_DISMISS_TIMEOUT&&this.mode===t.Mode.AutoDismiss&&(n=Object.assign(Object.assign({},n),{AUTO_DISMISS_TIMEOUT:e.AUTO_DISMISS_TIMEOUT})),n}constructor(e,n){this._serviceHubSubscriptions=[],this._itemEmitter=r()();const{type:i,mode:s,title:a,data:c,timestamp:u}=e.data;this.type=i,this.title=a,this.data=c,this._mode=s,this.timestamp=u||(new Date).toISOString(),this.datetime=o.DateTime.fromISO(this.timestamp).toLocaleString(o.DateTime.DATETIME_SHORT_WITH_SECONDS),this.options=Object.freeze(this.validateAuxOptions(e.options||{})),n&&(this._serviceHubAdapter=n,this._status=t.Status.Added,this._reason=t.AddEventReason.User,this.bindItemHubListeners())}bindItemHubListeners(){if(this._serviceHubAdapter){{const e=(e,n,i)=>{this.timestamp in e&&(this._status=n,this._reason=i,n===t.Status.Removed&&(this.unbindItemHubListeners(),this.removeAllEventListeners()),this.emit("statusUpdate",n,i))};this._serviceHubAdapter.addEventListener("statusServiceUpdateResponse",e);const n=()=>{var t;null===(t=this._serviceHubAdapter)||void 0===t||t.removeEventListener("statusServiceUpdateResponse",e)};this._serviceHubSubscriptions.push(n)}{const e=(e,t)=>{this.timestamp in e&&(this._mode=t,this.emit("modeUpdate",t))};this._serviceHubAdapter.addEventListener("modeStatusUpdateResponse",e);const t=()=>{var t;null===(t=this._serviceHubAdapter)||void 0===t||t.removeEventListener("modeStatusUpdateResponse",e)};this._serviceHubSubscriptions.push(t)}}}unbindItemHubListeners(){this._serviceHubSubscriptions&&(this._serviceHubSubscriptions.forEach(e=>e()),this._serviceHubSubscriptions.length=0)}deactivate(e){this._status&&t.StatusWeight[this._status]<t.StatusWeight[t.Status.Deactivated]?this._serviceHubAdapter?this._serviceHubAdapter.emit("statusServiceUpdateRequest",this,t.Status.Deactivated,e):d.warn("Service hub adapter is not initialized for this notification item instance: ",this):d.warn(`Notification should have "${t.Status.Pended}" or "${t.Status.Activated}" status to be able change status to "${t.Status.Deactivated}".Current notification status is "${this._status}". Ignoring this change`)}pending(){this._status===t.Status.Activated||this.mode!==t.Mode.Silent?this._serviceHubAdapter?this._serviceHubAdapter.emit("statusServiceUpdateRequest",this,t.Status.Pended,t.PendingEventReason.UserSilent):d.warn("Service hub adapter is not initialized for this notification item instance: ",this):d.warn(`Notification should have "${t.Status.Activated}" status or not "${t.Mode.Silent}" mode, to be able change status to "${t.Status.Pended}" and mode to "${t.Mode.Silent}".Current notification status is "${this._status}" and mode is "${this.mode}". Ignoring this change`)}emit(e,...t){this._itemEmitter.emit(e,...t)}addEventListener(e,t){this._itemEmitter.on(e,t)}addOnceEventListener(e,t){this._itemEmitter.once(e,t)}removeEventListener(e,t){this._itemEmitter.off(e,t)}removeAllEventListeners(){q()(this._itemEmitter)}};const s=(e,t,n=(()=>0))=>[...e,...t].sort(n),a=(e,t)=>e.reduce((e,n)=>(-1===t.indexOf(n)&&e.push(n),e),[]);class c{constructor(){this.emitter=r()(),this.map={},this.status=c.createStatus(),this.serviceConfig={DISABLED_ITEM_MODE:Object.assign({},n.DISABLED_ITEM_MODE),ACTIVATED_ITEM_MODE_LIMIT:Object.assign({},n.ACTIVATED_ITEM_MODE_LIMIT),AUTO_DISMISS_TIMEOUT:n.AUTO_DISMISS_TIMEOUT},this.activeAutoDismissTimeoutRefs={},this.serviceHubAdapter=new i,this.bindServiceHubEvents()}static mergeConfig(e,...t){if(!t.length)return e;const n=t.shift(),i=e=>e&&"object"==typeof e&&!Array.isArray(e);if(i(e)&&i(n))for(const t in n)i(n[t])?(e[t]||Object.assign(e,{[t]:{}}),this.mergeConfig(e[t],n[t])):Object.assign(e,{[t]:n[t]});return this.mergeConfig(e,...t)}static createStatus(){return{[t.Status.Added]:this.createStatusHolderCollection(),[t.Status.Pended]:this.createStatusHolderCollection(),[t.Status.Activated]:this.createStatusHolderCollection(),[t.Status.Deactivated]:this.createStatusHolderCollection(),[t.Status.Removed]:this.createStatusHolderCollection()}}static createStatusHolderCollection(){return Object.assign([],Object.assign(Object.assign({ids:[]},this.createStatusHolderSubCollections(t.MODES)),this.createStatusHolderSubCollections(t.TYPES)))}static createStatusHolderSubCollections(e){return Object.assign({},e.reduce((e,t)=>(e[t]=[],e),{}))}updateNotificationsCollections(){const e=c.createStatus();this.status.added.ids.forEach(n=>{const i=this.map[n];t.STATUSES.forEach(t=>{-1!==this.status[t].ids.indexOf(i.timestamp)&&(e[t].push(i),e[t].ids.push(n),e[t][i.mode].push(i),e[t][i.type].push(i))})}),this.status=e}setAutoDismiss(e,n=(()=>{})){this.prepareUpdateNotifications(e).forEach(e=>{var i;if(e.mode===t.Mode.AutoDismiss){const t=()=>n(e);this.activeAutoDismissTimeoutRefs[e.timestamp]=window.setTimeout(t,null!==(i=e.options.AUTO_DISMISS_TIMEOUT)&&void 0!==i?i:this.serviceConfig.AUTO_DISMISS_TIMEOUT)}})}removeAutoDismiss(e,t=(()=>{})){this.prepareUpdateNotifications(e).forEach(e=>{e.timestamp in this.activeAutoDismissTimeoutRefs&&(t(e),window.clearTimeout(this.activeAutoDismissTimeoutRefs[e.timestamp]),delete this.activeAutoDismissTimeoutRefs[e.timestamp])})}update(e,t,n){const i=Array.isArray(n)?n:[n];if(i.length){const n=i.map(e=>e.timestamp);switch(e){case"add":i.forEach(e=>this.map[e.timestamp]=e),this.status.added.ids=s(this.status.added.ids,n,c.sortTimestampsFn);break;case"pending":this.status.pended.ids=s(this.status.pended.ids,n,c.sortTimestampsFn),this.status.activated.ids=a(this.status.activated.ids,n),this.status.deactivated.ids=a(this.status.deactivated.ids,n);break;case"activate":this.status.pended.ids=a(this.status.pended.ids,n),this.status.activated.ids=s(this.status.activated.ids,n,c.sortTimestampsFn),this.status.deactivated.ids=a(this.status.deactivated.ids,n);break;case"deactivate":this.status.pended.ids=a(this.status.pended.ids,n),this.status.activated.ids=a(this.status.activated.ids,n),this.status.deactivated.ids=s(this.status.deactivated.ids,n,c.sortTimestampsFn);break;case"remove":this.status.pended.ids=a(this.status.pended.ids,n),this.status.activated.ids=a(this.status.activated.ids,n),this.status.deactivated.ids=a(this.status.deactivated.ids,n),this.status.added.ids=a(this.status.added.ids,n),this.status.removed.ids=s(this.status.removed.ids,n,c.sortTimestampsFn),n.forEach(e=>delete this.map[e])}this.updateNotificationsCollections(),this.emit(e,i,t),this.propagate(e,t,i)}}propagate(e,n,i){const r=Array.isArray(i)?i:[i];if(r.length)switch(e){case"add":this.update("pending",t.PendingEventReason.ServiceAutoPropagate,r);break;case"pending":case"deactivate":r.forEach(e=>{this.removeAutoDismiss(e)}),this.update("activate",t.ActivateEventReason.ServiceAutoPropagate,this.prepareActiveCandidatesNotifications(this.status.pended));break;case"activate":r.forEach(e=>{this.setAutoDismiss(e,e=>{e.mode===t.Mode.AutoDismiss&&this.serviceHubAdapter.emit("statusServiceUpdateRequest",e,t.Status.Pended,t.PendingEventReason.ServiceAutoDismiss)})});break;case"remove":this.update("deactivate",t.DeactivateEventReason.UserNegative,r)}}prepareAddNotifications(t){const n=Object.keys(this.serviceConfig.DISABLED_ITEM_MODE).reduce((e,t)=>(this.serviceConfig.DISABLED_ITEM_MODE[t]||e.push(t),e),[]).map(e=>`"${e}"`).join(", ");return(Array.isArray(t)?t:[t]).filter(e=>!this.serviceConfig.DISABLED_ITEM_MODE[e.data.mode]||(d.error(`Trying to .add(...) notification mode "${e.data.mode}" that is disabled in this notifications service instance by configuration.Current configuration is: "${JSON.stringify(this.config)}"Only ${n} allowed. Ignoring .add(${JSON.stringify(e)}) notification...`),!1)).map(t=>new e.Item(t,this.serviceHubAdapter))}prepareUpdateNotifications(e){return(Array.isArray(e)?e:[e]).reduce((e,t)=>(t.timestamp in this.map?e.push(t):d.error("Trying to handle untracked notification. Call .add(...) first...",JSON.stringify(t)),e),[])}prepareActiveCandidatesNotifications(e){const n=(Array.isArray(e)?e:[e]).reduce((e,t)=>(this.status.activated[t.mode].length+e[t.mode].length<this.serviceConfig.ACTIVATED_ITEM_MODE_LIMIT[t.mode]&&e[t.mode].push(t),e),c.createStatusHolderSubCollections(t.MODES));return Object.values(n).reduce((e,t)=>e.concat(t),[])}static sortByTimestampsFn(e,t){return c.sortTimestampsFn(e.timestamp,t.timestamp)}get added(){return this.status.added}get pended(){return this.status.pended}get activated(){return this.status.activated}get deactivated(){return this.status.deactivated}getNotificationStatus(e){return Object.keys(this.status).filter(e=>e!==t.Status.Added).find(t=>-1!==this.status[t].ids.indexOf(e.timestamp))}get config(){return Object.freeze(this.serviceConfig)}static validateUpdateConfig(e){const i=e;if(i.ACTIVATED_ITEM_MODE_LIMIT&&i.ACTIVATED_ITEM_MODE_LIMIT.acknowledge>n.ACTIVATED_ITEM_MODE_LIMIT.acknowledge)throw new Error(`\n Max ${t.Mode.Acknowledge} limit is ${n.ACTIVATED_ITEM_MODE_LIMIT.acknowledge}\n `);if(i.DISABLED_ITEM_MODE){if(!Object.keys(i.DISABLED_ITEM_MODE).reduce((e,t)=>(i.DISABLED_ITEM_MODE[t]&&e++,e),0))throw new Error("At least one notifications mode should be allowed in service instance");Object.keys(i.ACTIVATED_ITEM_MODE_LIMIT).forEach(e=>{e in i.DISABLED_ITEM_MODE&&i.DISABLED_ITEM_MODE[e]&&d.warn(`Changing configuration limit count for mode "${e}" won't have any effect, because this mode is disabled in notifications service instance`)}),"AUTO_DISMISS_TIMEOUT"in i&&i.DISABLED_ITEM_MODE[t.Mode.AutoDismiss]&&d.warn(`Changing "AUTO_DISMISS_TIMEOUT" configuration option won't have any effect,because "${t.Mode.AutoDismiss}" mode is disabled in notifications service instance`)}return!0}updateConfig(e){c.validateUpdateConfig(e)&&(this.serviceConfig=c.mergeConfig({},this.serviceConfig,e),d.info("Updated notifications service configuration: ",this.config))}add(e){const n=this.prepareAddNotifications(e);return this.update("add",t.AddEventReason.User,n),n}pending(e){const n=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",n,t.Status.Pended,t.PendingEventReason.UserSilent),n}deactivate(e,n){const i=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",i,t.Status.Deactivated,n),i}remove(e){const n=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",n,t.Status.Removed,t.RemoveEventReason.User),n}pendingAllActivated(){return this.pending(this.status.activated)}pendingAll(){return this.pending([...this.status.pended,...this.status.activated])}deactivateAllActivated(e){return this.deactivate(this.status.activated,e)}deactivateAll(e){return this.deactivate([...this.status.pended,...this.status.activated],e)}removeAllDeactivated(){return this.remove(this.status.deactivated)}removeAll(){return this.remove(this.status.added)}addEventListener(e,t){this.emitter.on(e,t)}removeEventListener(e,t){this.emitter.off(e,t)}addOnceEventListener(e,t){this.emitter.once(e,t)}removeAllEventListeners(){q()(this.emitter)}emit(e,...t){this.emitter.emit(e,...t)}bindServiceHubEvents(){this.serviceHubAdapter.addEventListener("statusServiceUpdateRequest",(e,n,i)=>{const r=Array.isArray(e)?e:[e],o=r.reduce((e,t)=>(e[t.timestamp]=this.getNotificationStatus(t),e),{});{const e=r.filter(e=>(o[e.timestamp]===t.Status.Activated||e.mode!==t.Mode.Silent)&&n===t.Status.Pended);{const n=e.filter(e=>e.mode!==t.Mode.Silent);n.length&&this.serviceHubAdapter.emit("modeStatusUpdateResponse",n.reduce((e,t)=>(e[t.timestamp]=t,e),{}),t.Mode.Silent)}e.length&&this.update("pending",i,e)}{const e=r.filter(e=>{const i=o[e.timestamp];return(i===t.Status.Pended||i===t.Status.Activated)&&n===t.Status.Deactivated});e.length&&this.update("deactivate",i,e)}r.filter(e=>{const i=o[e.timestamp];return(i===t.Status.Pended||i===t.Status.Activated||i===t.Status.Deactivated)&&n===t.Status.Removed}).length&&this.update("remove",i,e)}),n.STATUS_EVENTS.forEach(e=>{this.addEventListener(e,(t,i)=>{const r=n.STATUS_EVENT_MAP[e],o=t.reduce((e,t)=>(e[t.timestamp]=t,e),{});this.serviceHubAdapter.emit("statusServiceUpdateResponse",o,r,i)})})}}c.sortTimestampsFn=(e,t)=>e>t?1:e<t?-1:0,e.Service=c}(V||(V={})),function(e){class t{constructor(){this.listeners=[],this.listenersOnce=[],this.listen=e=>(this.listeners.push(e),{stopListen:()=>this.stopListen(e)}),this.listenOnce=e=>(this.listenersOnce.push(e),{stopListenOnce:()=>this.stopListenOnce(e)}),this.stopListen=e=>{const t=this.listeners.indexOf(e,0);return t>-1&&(this.listeners.splice(t,1),!0)},this.stopListenOnce=e=>{const t=this.listenersOnce.indexOf(e,0);return t>-1&&(this.listenersOnce.splice(t,1),!0)},this.stopListenAll=()=>{this.listeners=[],this.listenersOnce=[]},this.send=e=>{this.listeners.forEach(t=>t(e)),this.listenersOnce.forEach(t=>t(e)),this.listenersOnce=[]}}}class n{constructor(){this.listeners=[],this.listenersOnce=[],this.listen=e=>(this.listeners.push(e),{stopListen:()=>this.stopListen(e)}),this.listenOnce=e=>(this.listenersOnce.push(e),{stopListenOnce:()=>this.stopListenOnce(e)}),this.stopListen=e=>{const t=this.listeners.indexOf(e,0);return t>-1&&(this.listeners.splice(t,1),!0)},this.stopListenOnce=e=>{const t=this.listenersOnce.indexOf(e,0);return t>-1&&(this.listenersOnce.splice(t,1),!0)},this.stopListenAll=()=>{this.listeners=[],this.listenersOnce=[]},this.send=()=>{this.listeners.forEach(e=>e()),this.listenersOnce.forEach(e=>e()),this.listenersOnce=[]}}}e.create=new class{withData(){const e=new t;return{signal:e,send:e.send,stopListenAll:e.stopListenAll}}empty(){const e=new n;return{signal:e,send:e.send,stopListenAll:e.stopListenAll}}}}(j||(j={}));let B=null;const H=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,z=1073741824,J=()=>{if(null!==B)return B;const e=new Blob(['(()=>{"use strict";\nconst e=new Map,t=new Map,r=(e,t)=>\n{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);\n return{expected:r+o,remainingDelay:o}},\n o=(e,t,r,i)=>{const s=performance.now();\n s>r?postMessage({id:null,method:"call",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};\n addEventListener("message",(i=>{let{data:s}=i;try{if("clear"===s.method){const{id:r,params:{timerId:o,timerType:i}}=s;\n if("interval"===i)\n (t=>{const r=e.get(t);\n if(void 0===r)\n throw new Error(\'There is no interval scheduled with the given id "\'.concat(t,\'".\'));\n clearTimeout(r),e.delete(t)})(o),postMessage({error:null,id:r});\n else{if("timeout"!==i)\n throw new Error(\'The given type "\'.concat(i,\'" is not supported\'));\n (e=>{const r=t.get(e);if(void 0===r)\n throw new Error(\'There is no timeout scheduled with the given id "\'.concat(e,\'".\'));\n clearTimeout(r),t.delete(e)})(o),postMessage({error:null,id:r})}}\n else{if("set"!==s.method)\n throw new Error(\'The given method "\'.concat(s.method,\'" is not supported\'));\n {const{params:{delay:i,now:n,timerId:a,timerType:d}}=s;\n if("interval"===d)\n ((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);\n e.set(i,setTimeout(o,a,e,i,n,"interval"))})(i,a,n);\n else{if("timeout"!==d)\n throw new Error(\'The given type "\'.concat(d,\'" is not supported\'));\n ((e,i,s)=>{const{expected:n,remainingDelay:a}=r(e,s);\n t.set(i,setTimeout(o,a,t,i,n,"timeout"))})(i,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:s.id,result:null})}}))})();'],{type:"application/javascript; charset=utf-8"}),t=URL.createObjectURL(e);return d.info("Worker url established",t),B=(e=>{const t=new Map([[0,()=>{}]]),n=new Map([[0,()=>{}]]),i=new Map,r=new Worker(e);d.info("worker created ",r);const o=new WeakMap;var s;const a=((e,t)=>n=>{const i=t.get(n);let r=void 0===i?n.size:i<z?i+1:0;if(!n.has(r))return e(n,r);if(n.size<536870912){for(;n.has(r);)r=Math.floor(Math.random()*z);return e(n,r)}if(n.size>H)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;n.has(r);)r=Math.floor(Math.random()*H);return e(n,r)})((s=o,(e,t)=>(s.set(e,t),t)),o);return r.addEventListener("message",({data:e})=>{if(void 0!==(r=e).method&&"call"===r.method){const{params:{timerId:r,timerType:o}}=e;if("interval"===o){const e=t.get(r);if("number"==typeof e){const t=i.get(e);if(void 0===t||t.timerId!==r||t.timerType!==o)throw new Error("The timer is in an undefined state.")}else{if(void 0===e)throw new Error("The timer is in an undefined state.");e()}}else if("timeout"===o){const e=n.get(r);if("number"==typeof e){const t=i.get(e);if(void 0===t||t.timerId!==r||t.timerType!==o)throw new Error("The timer is in an undefined state.")}else{if(void 0===e)throw new Error("The timer is in an undefined state.");e(),n.delete(r)}}}else if((e=>null===e.error&&"number"==typeof e.id)(e)){const{id:r}=e,o=i.get(r);if(void 0===o)throw new Error("The timer is in an undefined state.");const{timerId:s,timerType:a}=o;i.delete(r),"interval"===a?t.delete(s):n.delete(s)}else{const{error:{message:t}}=e}var r}),{clearInterval:e=>{const n=a(i);i.set(n,{timerId:e,timerType:"interval"}),t.set(e,n),r.postMessage({id:n,method:"clear",params:{timerId:e,timerType:"interval"}})},clearTimeout:e=>{const t=a(i);i.set(t,{timerId:e,timerType:"timeout"}),n.set(e,t),r.postMessage({id:t,method:"clear",params:{timerId:e,timerType:"timeout"}})},setInterval:(e,n)=>{const i=a(t);return t.set(i,()=>{e(),"function"==typeof t.get(i)&&r.postMessage({id:null,method:"set",params:{delay:n,now:performance.now(),timerId:i,timerType:"interval"}})}),r.postMessage({id:null,method:"set",params:{delay:n,now:performance.now(),timerId:i,timerType:"interval"}}),i},setTimeout:(e,t)=>{const i=a(n);return n.set(i,e),r.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:i,timerType:"timeout"}}),i}}})(t),B.setTimeout(()=>URL.revokeObjectURL(t),0),B},W=e=>J().clearInterval(e),Z=e=>J().clearTimeout(e),G=(e,t)=>J().setInterval(e,t),Y=(e,t)=>J().setTimeout(e,t);var $;function K(e){if(e instanceof Error)return e;let t="[Unable to stringify the thrown value]";try{t=JSON.stringify(e)}catch(e){}return new Error("This value was thrown as is, not through an Error: "+t)}return function(e){let t=null;e.setErrorHandler=function(e){t?d.error("Error handler already set"):(d.info("Setting custom error handler: "+e),t=e)},e.check=function(e,n,i){return e||(t?t(n,i):d.info(`Assert failed in ${n}: ${i}`)),e}}($||($={})),t})(),e.exports=i()},function(e,t,n){"use strict";(function(e,i,r){var o=n(11);const{toString:s}=Object.prototype,{getPrototypeOf:a}=Object,{iterator:c,toStringTag:u}=Symbol,l=(d=Object.create(null),e=>{const t=s.call(e);return d[t]||(d[t]=t.slice(8,-1).toLowerCase())});var d;const h=e=>(e=e.toLowerCase(),t=>l(t)===e),f=e=>t=>typeof t===e,{isArray:v}=Array,p=f("undefined");const g=h("ArrayBuffer");const m=f("string"),y=f("function"),E=f("number"),b=e=>null!==e&&"object"==typeof e,w=e=>{if("object"!==l(e))return!1;const t=a(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||u in e||c in e)},S=h("Date"),k=h("File"),I=h("Blob"),A=h("FileList"),T=h("URLSearchParams"),[C,O,U,R]=["ReadableStream","Request","Response","Headers"].map(h);function L(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let i,r;if("object"!=typeof e&&(e=[e]),v(e))for(i=0,r=e.length;i<r;i++)t.call(null,e[i],i,e);else{const r=n?Object.getOwnPropertyNames(e):Object.keys(e),o=r.length;let s;for(i=0;i<o;i++)s=r[i],t.call(null,e[s],s,e)}}function x(e,t){t=t.toLowerCase();const n=Object.keys(e);let i,r=n.length;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:e,N=e=>!p(e)&&e!==D;const P=(_="undefined"!=typeof Uint8Array&&a(Uint8Array),e=>_&&e instanceof _);var _;const M=h("HTMLFormElement"),V=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),j=h("RegExp"),q=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};L(n,(n,r)=>{let o;!1!==(o=t(n,r,e))&&(i[r]=o||n)}),Object.defineProperties(e,i)};const F=h("AsyncFunction"),B=(H="function"==typeof i,z=y(D.postMessage),H?i:z?(J="axios@"+Math.random(),W=[],D.addEventListener("message",({source:e,data:t})=>{e===D&&t===J&&W.length&&W.shift()()},!1),e=>{W.push(e),D.postMessage(J,"*")}):e=>setTimeout(e));var H,z,J,W;const Z="undefined"!=typeof queueMicrotask?queueMicrotask.bind(D):void 0!==r&&r.nextTick||B;t.a={isArray:v,isArrayBuffer:g,isBuffer:function(e){return null!==e&&!p(e)&&null!==e.constructor&&!p(e.constructor)&&y(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||y(e.append)&&("formdata"===(t=l(e))||"object"===t&&y(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&g(e.buffer),t},isString:m,isNumber:E,isBoolean:e=>!0===e||!1===e,isObject:b,isPlainObject:w,isReadableStream:C,isRequest:O,isResponse:U,isHeaders:R,isUndefined:p,isDate:S,isFile:k,isBlob:I,isRegExp:j,isFunction:y,isStream:e=>b(e)&&y(e.pipe),isURLSearchParams:T,isTypedArray:P,isFileList:A,forEach:L,merge:function e(){const{caseless:t}=N(this)&&this||{},n={},i=(i,r)=>{const o=t&&x(n,r)||r;w(n[o])&&w(i)?n[o]=e(n[o],i):w(i)?n[o]=e({},i):v(i)?n[o]=i.slice():n[o]=i};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&L(arguments[e],i);return n},extend:(e,t,n,{allOwnKeys:i}={})=>(L(t,(t,i)=>{n&&y(t)?e[i]=Object(o.a)(t,n):e[i]=t},{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,i)=>{let r,o,s;const c={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),o=r.length;o-- >0;)s=r[o],i&&!i(s,e,t)||c[s]||(t[s]=e[s],c[s]=!0);e=!1!==n&&a(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:h,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return-1!==i&&i===n},toArray:e=>{if(!e)return null;if(v(e))return e;let t=e.length;if(!E(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[c]).call(e);let i;for(;(i=n.next())&&!i.done;){const n=i.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const i=[];for(;null!==(n=e.exec(t));)i.push(n);return i},isHTMLForm:M,hasOwnProperty:V,hasOwnProp:V,reduceDescriptors:q,freezeMethods:e=>{q(e,(t,n)=>{if(y(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=e[n];y(i)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},i=e=>{e.forEach(e=>{n[e]=!0})};return v(e)?i(e):i(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:x,global:D,isContextDefined:N,isSpecCompliantForm:function(e){return!!(e&&y(e.append)&&"FormData"===e[u]&&e[c])},toJSONObject:e=>{const t=new Array(10),n=(e,i)=>{if(b(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[i]=e;const r=v(e)?[]:{};return L(e,(e,t)=>{const o=n(e,i+1);!p(o)&&(r[t]=o)}),t[i]=void 0,r}}return e};return n(e,0)},isAsyncFn:F,isThenable:e=>e&&(b(e)||y(e))&&y(e.then)&&y(e.catch),setImmediate:B,asap:Z,isIterable:e=>null!=e&&y(e[c])}}).call(this,n(9),n(38).setImmediate,n(17))},function(e,t,n){"use strict";var i=n(1);function r(e,t,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}i.a.inherits(r,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:i.a.toJSONObject(this.config),code:this.code,status:this.status}}});const o=r.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{s[e]={value:e}}),Object.defineProperties(r,s),Object.defineProperty(o,"isAxiosError",{value:!0}),r.from=(e,t,n,s,a,c)=>{const u=Object.create(o);return i.a.toFlatObject(e,u,(function(e){return e!==Error.prototype}),e=>"isAxiosError"!==e),r.call(u,e.message,t,n,s,a),u.cause=e,u.name=e.name,c&&Object.assign(u,c),u},t.a=r},function(e,t,n){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(13);function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Object(i.a)(r.key),r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},function(e,t,n){"use strict";(function(e){var i=n(1),r=n(2),o=n(12);function s(e){return i.a.isPlainObject(e)||i.a.isArray(e)}function a(e){return i.a.endsWith(e,"[]")?e.slice(0,-2):e}function c(e,t,n){return e?e.concat(t).map((function(e,t){return e=a(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const u=i.a.toFlatObject(i.a,{},null,(function(e){return/^is[A-Z]/.test(e)}));t.a=function(t,n,l){if(!i.a.isObject(t))throw new TypeError("target must be an object");n=n||new(o.a||FormData);const d=(l=i.a.toFlatObject(l,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!i.a.isUndefined(t[e])}))).metaTokens,h=l.visitor||m,f=l.dots,v=l.indexes,p=(l.Blob||"undefined"!=typeof Blob&&Blob)&&i.a.isSpecCompliantForm(n);if(!i.a.isFunction(h))throw new TypeError("visitor must be a function");function g(t){if(null===t)return"";if(i.a.isDate(t))return t.toISOString();if(!p&&i.a.isBlob(t))throw new r.a("Blob is not supported. Use a Buffer instead.");return i.a.isArrayBuffer(t)||i.a.isTypedArray(t)?p&&"function"==typeof Blob?new Blob([t]):e.from(t):t}function m(e,t,r){let o=e;if(e&&!r&&"object"==typeof e)if(i.a.endsWith(t,"{}"))t=d?t:t.slice(0,-2),e=JSON.stringify(e);else if(i.a.isArray(e)&&function(e){return i.a.isArray(e)&&!e.some(s)}(e)||(i.a.isFileList(e)||i.a.endsWith(t,"[]"))&&(o=i.a.toArray(e)))return t=a(t),o.forEach((function(e,r){!i.a.isUndefined(e)&&null!==e&&n.append(!0===v?c([t],r,f):null===v?t:t+"[]",g(e))})),!1;return!!s(e)||(n.append(c(r,t,f),g(e)),!1)}const y=[],E=Object.assign(u,{defaultVisitor:m,convertValue:g,isVisitable:s});if(!i.a.isObject(t))throw new TypeError("data must be an object");return function e(t,r){if(!i.a.isUndefined(t)){if(-1!==y.indexOf(t))throw Error("Circular reference detected in "+r.join("."));y.push(t),i.a.forEach(t,(function(t,o){!0===(!(i.a.isUndefined(t)||null===t)&&h.call(n,t,i.a.isString(o)?o.trim():o,r,E))&&e(t,r?r.concat(o):[o])})),y.pop()}}(t),n}}).call(this,n(40).Buffer)},function(e,t,n){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u}));var r=[],o=r.forEach,s=r.slice;function a(e){return o.call(s.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}function c(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":i(XMLHttpRequest))}function u(e){return function(e){return!!e&&"function"==typeof e.then}(e)?e:Promise.resolve(e)}},function(e,t,n){"use strict";var i,r,o,s,a,c,u,l=n(19),d=n(36),h=Function.prototype.apply,f=Function.prototype.call,v=Object.create,p=Object.defineProperty,g=Object.defineProperties,m=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var n,r;return d(t),r=this,i.call(this,e,n=function(){o.call(r,e,n),h.call(t,this,arguments)}),n.__eeOnceListener__=t,this},a={on:i=function(e,t){var n;return d(t),m.call(this,"__ee__")?n=this.__ee__:(n=y.value=v(null),p(this,"__ee__",y),y.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:r,off:o=function(e,t){var n,i,r,o;if(d(t),!m.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(i=n[e]))for(o=0;r=i[o];++o)r!==t&&r.__eeOnceListener__!==t||(2===i.length?n[e]=i[o?0:1]:i.splice(o,1));else i!==t&&i.__eeOnceListener__!==t||delete n[e];return this},emit:s=function(e){var t,n,i,r,o;if(m.call(this,"__ee__")&&(r=this.__ee__[e]))if("object"==typeof r){for(n=arguments.length,o=new Array(n-1),t=1;t<n;++t)o[t-1]=arguments[t];for(r=r.slice(),t=0;i=r[t];++t)h.call(i,this,o)}else switch(arguments.length){case 1:f.call(r,this);break;case 2:f.call(r,this,arguments[1]);break;case 3:f.call(r,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),t=1;t<n;++t)o[t-1]=arguments[t];h.call(r,this,o)}}},c={on:l(i),once:l(r),off:l(o),emit:l(s)},u=g({},c),e.exports=t=function(e){return null==e?v(u):g(Object(e),c)},t.methods=a},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var i=n(30)();e.exports=function(e){return e!==i&&null!==e}},function(e,t,n){"use strict";function i(e,t){return function(){return e.apply(t,arguments)}}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";t.a=null},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(3);function r(e){var t=function(e,t){if("object"!=Object(i.a)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Object(i.a)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Object(i.a)(t)?t:t+""}},function(e,t,n){(function(i){var r;if("function"==typeof fetch&&(r=void 0!==i&&i.fetch?i.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),"undefined"==typeof window||void 0===window.document){var o=r||n(45);o.default&&(o=o.default),t.default=o,e.exports=t.default}}).call(this,n(9))},function(e,t,n){"use strict";var i=n(47),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t,n=arguments[1];if(i(e),void 0===n)r.call(e,"__ee__")&&delete e.__ee__;else{if(!(t=r.call(e,"__ee__")&&e.__ee__))return;t[n]&&delete t[n]}}},function(e,t,n){"use strict";e.exports=function(e){return null!=e}},function(e,t){var n,i,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,u=[],l=!1,d=-1;function h(){l&&c&&(l=!1,c.length?u=c.concat(u):d=-1,u.length&&f())}function f(){if(!l){var e=a(h);l=!0;for(var t=u.length;t;){for(c=u,u=[];++d<t;)c&&c[d].run();d=-1,t=u.length}c=null,l=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function v(e,t){this.fun=e,this.array=t}function p(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new v(e,t)),1!==u.length||l||a(f)},v.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=p,r.addListener=p,r.once=p,r.off=p,r.removeListener=p,r.removeAllListeners=p,r.emit=p,r.prependListener=p,r.prependOnceListener=p,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){"use strict";(function(e){var i,r,o,s=n(7),a=n(14),c=n.n(a);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"function"==typeof fetch&&(i=void 0!==e&&e.fetch?e.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),Object(s.b)()&&(void 0!==e&&e.XMLHttpRequest?r=e.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(r=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&(void 0!==e&&e.ActiveXObject?o=e.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(o=window.ActiveXObject)),i||!a||r||o||(i=c.a||a),"function"!=typeof i&&(i=void 0);var l=function(e,t){if(t&&"object"===u(t)){var n="";for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},d=function(e,t,n){i(e,t).then((function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then((function(t){n(null,{status:e.status,data:t})})).catch(n)})).catch(n)},h=!1;t.a=function(e,t,n,a){return"function"==typeof n&&(a=n,n=void 0),a=a||function(){},i?function(e,t,n,i){e.queryStringParams&&(t=l(t,e.queryStringParams));var r=Object(s.a)({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);n&&(r["Content-Type"]="application/json");var o="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,a=Object(s.a)({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:r},h?{}:o);try{d(t,a,i)}catch(e){if(!o||0===Object.keys(o).length||!e.message||e.message.indexOf("not implemented")<0)return i(e);try{Object.keys(o).forEach((function(e){delete a[e]})),d(t,a,i),h=!0}catch(e){i(e)}}}(e,t,n,a):Object(s.b)()||"function"==typeof ActiveXObject?function(e,t,n,i){n&&"object"===u(n)&&(n=l("",n).slice(1)),e.queryStringParams&&(t=l(t,e.queryStringParams));try{var s;(s=r?new r:new o("MSXML2.XMLHTTP.3.0")).open(n?"POST":"GET",t,1),e.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!e.withCredentials,n&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var a=e.customHeaders;if(a="function"==typeof a?a():a)for(var c in a)s.setRequestHeader(c,a[c]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(n)}catch(e){console&&console.log(e)}}(e,t,n,a):void a(new Error("No fetch and no xhr implementation found!"))}}).call(this,n(9))},function(e,t,n){"use strict";var i=n(16),r=n(20),o=n(24),s=n(32),a=n(33);(e.exports=function(e,t){var n,r,c,u,l;return arguments.length<2||"string"!=typeof e?(u=t,t=e,e=null):u=arguments[2],i(e)?(n=a.call(e,"c"),r=a.call(e,"e"),c=a.call(e,"w")):(n=c=!0,r=!1),l={value:t,configurable:n,enumerable:r,writable:c},u?o(s(u),l):l}).gs=function(e,t,n){var c,u,l,d;return"string"!=typeof e?(l=n,n=t,t=e,e=null):l=arguments[3],i(t)?r(t)?i(n)?r(n)||(l=n,n=void 0):n=void 0:(l=t,t=n=void 0):t=void 0,i(e)?(c=a.call(e,"c"),u=a.call(e,"e")):(c=!0,u=!1),d={get:t,set:n,configurable:c,enumerable:u},l?o(s(l),d):d}},function(e,t,n){"use strict";var i=n(21),r=/^\s*class[\s{/}]/,o=Function.prototype.toString;e.exports=function(e){return!!i(e)&&!r.test(o.call(e))}},function(e,t,n){"use strict";var i=n(22);e.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!i(e)}},function(e,t,n){"use strict";var i=n(23);e.exports=function(e){if(!i(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},function(e,t,n){"use strict";var i=n(16),r={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!i(e)&&hasOwnProperty.call(r,typeof e)}},function(e,t,n){"use strict";e.exports=n(25)()?Object.assign:n(26)},function(e,t,n){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var i=n(27),r=n(31),o=Math.max;e.exports=function(e,t){var n,s,a,c=o(arguments.length,2);for(e=Object(r(e)),a=function(i){try{e[i]=t[i]}catch(e){n||(n=e)}},s=1;s<c;++s)i(t=arguments[s]).forEach(a);if(void 0!==n)throw n;return e}},function(e,t,n){"use strict";e.exports=n(28)()?Object.keys:n(29)},function(e,t,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,n){"use strict";var i=n(10),r=Object.keys;e.exports=function(e){return r(i(e)?Object(e):e)}},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var i=n(10);e.exports=function(e){if(!i(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";var i=n(10),r=Array.prototype.forEach,o=Object.create,s=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=o(null);return r.call(arguments,(function(e){i(e)&&s(Object(e),t)})),t}},function(e,t,n){"use strict";e.exports=n(34)()?String.prototype.contains:n(35)},function(e,t,n){"use strict";var i="razdwatrzy";e.exports=function(){return"function"==typeof i.contains&&(!0===i.contains("dwa")&&!1===i.contains("foo"))}},function(e,t,n){"use strict";var i=String.prototype.indexOf;e.exports=function(e){return i.call(this,e,arguments[1])>-1}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function r(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,n){return(u=c()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&a(r,n.prototype),r}).apply(null,arguments)}function l(e){var t="function"==typeof Map?new Map:void 0;return(l=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return u(e,arguments,s(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a(i,e)})(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function h(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}Object.defineProperty(t,"__esModule",{value:!0});var f=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(l(Error)),v=function(e){function t(t){return e.call(this,"Invalid DateTime: "+t.toMessage())||this}return o(t,e),t}(f),p=function(e){function t(t){return e.call(this,"Invalid Interval: "+t.toMessage())||this}return o(t,e),t}(f),g=function(e){function t(t){return e.call(this,"Invalid Duration: "+t.toMessage())||this}return o(t,e),t}(f),m=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(f),y=function(e){function t(t){return e.call(this,"Invalid unit "+t)||this}return o(t,e),t}(f),E=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(f),b=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return o(t,e),t}(f),w="numeric",S="short",k="long",I={year:w,month:w,day:w},A={year:w,month:S,day:w},T={year:w,month:S,day:w,weekday:S},C={year:w,month:k,day:w},O={year:w,month:k,day:w,weekday:k},U={hour:w,minute:w},R={hour:w,minute:w,second:w},L={hour:w,minute:w,second:w,timeZoneName:S},x={hour:w,minute:w,second:w,timeZoneName:k},D={hour:w,minute:w,hour12:!1},N={hour:w,minute:w,second:w,hour12:!1},P={hour:w,minute:w,second:w,hour12:!1,timeZoneName:S},_={hour:w,minute:w,second:w,hour12:!1,timeZoneName:k},M={year:w,month:w,day:w,hour:w,minute:w},V={year:w,month:w,day:w,hour:w,minute:w,second:w},j={year:w,month:S,day:w,hour:w,minute:w},q={year:w,month:S,day:w,hour:w,minute:w,second:w},F={year:w,month:S,day:w,weekday:S,hour:w,minute:w},B={year:w,month:k,day:w,hour:w,minute:w,timeZoneName:S},H={year:w,month:k,day:w,hour:w,minute:w,second:w,timeZoneName:S},z={year:w,month:k,day:w,weekday:k,hour:w,minute:w,timeZoneName:k},J={year:w,month:k,day:w,weekday:k,hour:w,minute:w,second:w,timeZoneName:k};function W(e){return void 0===e}function Z(e){return"number"==typeof e}function G(e){return"number"==typeof e&&e%1==0}function Y(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function $(){return!W(Intl.DateTimeFormat.prototype.formatToParts)}function K(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function X(e,t,n){if(0!==e.length)return e.reduce((function(e,i){var r=[t(i),i];return e&&n(e[0],r[0])===e[0]?e:r}),null)[1]}function Q(e,t){return t.reduce((function(t,n){return t[n]=e[n],t}),{})}function ee(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function te(e,t,n){return G(e)&&e>=t&&e<=n}function ne(e,t){void 0===t&&(t=2);var n=e<0?"-":"",i=n?-1*e:e;return""+n+(i.toString().length<t?("0".repeat(t)+i).slice(-t):i.toString())}function ie(e){return W(e)||null===e||""===e?void 0:parseInt(e,10)}function re(e){if(!W(e)&&null!==e&&""!==e){var t=1e3*parseFloat("0."+e);return Math.floor(t)}}function oe(e,t,n){void 0===n&&(n=!1);var i=Math.pow(10,t);return(n?Math.trunc:Math.round)(e*i)/i}function se(e){return e%4==0&&(e%100!=0||e%400==0)}function ae(e){return se(e)?366:365}function ce(e,t){var n=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===n?se(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function ue(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function le(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,i=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return 4===t||3===i?53:52}function de(e){return e>99?e:e>60?1900+e:2e3+e}function he(e,t,n,i){void 0===i&&(i=null);var r=new Date(e),o={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(o.timeZone=i);var s=Object.assign({timeZoneName:t},o),a=Y();if(a&&$()){var c=new Intl.DateTimeFormat(n,s).formatToParts(r).find((function(e){return"timezonename"===e.type.toLowerCase()}));return c?c.value:null}if(a){var u=new Intl.DateTimeFormat(n,o).format(r);return new Intl.DateTimeFormat(n,s).format(r).substring(u.length).replace(/^[, \u200e]+/,"")}return null}function fe(e,t){var n=parseInt(e,10);Number.isNaN(n)&&(n=0);var i=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-i:i)}function ve(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new E("Invalid unit value "+e);return t}function pe(e,t,n){var i={};for(var r in e)if(ee(e,r)){if(n.indexOf(r)>=0)continue;var o=e[r];if(null==o)continue;i[t(r)]=ve(o)}return i}function ge(e,t){var n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),r=e>=0?"+":"-";switch(t){case"short":return""+r+ne(n,2)+":"+ne(i,2);case"narrow":return""+r+n+(i>0?":"+i:"");case"techie":return""+r+ne(n,2)+ne(i,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function me(e){return Q(e,["hour","minute","second","millisecond"])}var ye=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function Ee(e){return JSON.stringify(e,Object.keys(e).sort())}var be=["January","February","March","April","May","June","July","August","September","October","November","December"],we=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Se=["J","F","M","A","M","J","J","A","S","O","N","D"];function ke(e){switch(e){case"narrow":return[].concat(Se);case"short":return[].concat(we);case"long":return[].concat(be);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var Ie=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ae=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Te=["M","T","W","T","F","S","S"];function Ce(e){switch(e){case"narrow":return[].concat(Te);case"short":return[].concat(Ae);case"long":return[].concat(Ie);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Oe=["AM","PM"],Ue=["Before Christ","Anno Domini"],Re=["BC","AD"],Le=["B","A"];function xe(e){switch(e){case"narrow":return[].concat(Le);case"short":return[].concat(Re);case"long":return[].concat(Ue);default:return null}}function De(e,t){for(var n,i="",r=h(e);!(n=r()).done;){var o=n.value;o.literal?i+=o.val:i+=t(o.val)}return i}var Ne={D:I,DD:A,DDD:C,DDDD:O,t:U,tt:R,ttt:L,tttt:x,T:D,TT:N,TTT:P,TTTT:_,f:M,ff:j,fff:B,ffff:z,F:V,FF:q,FFF:H,FFFF:J},Pe=function(){function e(e,t){this.opts=t,this.loc=e,this.systemLoc=null}e.create=function(t,n){return void 0===n&&(n={}),new e(t,n)},e.parseFormat=function(e){for(var t=null,n="",i=!1,r=[],o=0;o<e.length;o++){var s=e.charAt(o);"'"===s?(n.length>0&&r.push({literal:i,val:n}),t=null,n="",i=!i):i||s===t?n+=s:(n.length>0&&r.push({literal:!1,val:n}),n=s,t=s)}return n.length>0&&r.push({literal:i,val:n}),r},e.macroTokenToFormatOpts=function(e){return Ne[e]};var t=e.prototype;return t.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},t.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},t.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return ne(e,t);var n=Object.assign({},this.opts);return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},t.formatDateTimeFromString=function(t,n){var i=this,r="en"===this.loc.listingMode(),o=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&$(),s=function(e,n){return i.loc.extract(t,e,n)},a=function(e){return t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):""},c=function(){return r?function(e){return Oe[e.hour<12?0:1]}(t):s({hour:"numeric",hour12:!0},"dayperiod")},u=function(e,n){return r?function(e,t){return ke(t)[e.month-1]}(t,e):s(n?{month:e}:{month:e,day:"numeric"},"month")},l=function(e,n){return r?function(e,t){return Ce(t)[e.weekday-1]}(t,e):s(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},d=function(e){return r?function(e,t){return xe(t)[e.year<0?0:1]}(t,e):s({era:e},"era")};return De(e.parseFormat(n),(function(n){switch(n){case"S":return i.num(t.millisecond);case"u":case"SSS":return i.num(t.millisecond,3);case"s":return i.num(t.second);case"ss":return i.num(t.second,2);case"m":return i.num(t.minute);case"mm":return i.num(t.minute,2);case"h":return i.num(t.hour%12==0?12:t.hour%12);case"hh":return i.num(t.hour%12==0?12:t.hour%12,2);case"H":return i.num(t.hour);case"HH":return i.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:i.opts.allowZ});case"ZZ":return a({format:"short",allowZ:i.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:i.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:i.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:i.loc.locale});case"z":return t.zoneName;case"a":return c();case"d":return o?s({day:"numeric"},"day"):i.num(t.day);case"dd":return o?s({day:"2-digit"},"day"):i.num(t.day,2);case"c":return i.num(t.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"E":return i.num(t.weekday);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return o?s({month:"numeric",day:"numeric"},"month"):i.num(t.month);case"LL":return o?s({month:"2-digit",day:"numeric"},"month"):i.num(t.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return o?s({month:"numeric"},"month"):i.num(t.month);case"MM":return o?s({month:"2-digit"},"month"):i.num(t.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return o?s({year:"numeric"},"year"):i.num(t.year);case"yy":return o?s({year:"2-digit"},"year"):i.num(t.year.toString().slice(-2),2);case"yyyy":return o?s({year:"numeric"},"year"):i.num(t.year,4);case"yyyyyy":return o?s({year:"numeric"},"year"):i.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return i.num(t.weekYear.toString().slice(-2),2);case"kkkk":return i.num(t.weekYear,4);case"W":return i.num(t.weekNumber);case"WW":return i.num(t.weekNumber,2);case"o":return i.num(t.ordinal);case"ooo":return i.num(t.ordinal,3);case"q":return i.num(t.quarter);case"qq":return i.num(t.quarter,2);case"X":return i.num(Math.floor(t.ts/1e3));case"x":return i.num(t.ts);default:return function(n){var r=e.macroTokenToFormatOpts(n);return r?i.formatWithSystemDefault(t,r):n}(n)}}))},t.formatDurationFromString=function(t,n){var i,r=this,o=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},s=e.parseFormat(n),a=s.reduce((function(e,t){var n=t.literal,i=t.val;return n?e:e.concat(i)}),[]),c=t.shiftTo.apply(t,a.map(o).filter((function(e){return e})));return De(s,(i=c,function(e){var t=o(e);return t?r.num(i.get(t),e.length):e}))},e}(),_e=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Me=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new b},t.formatOffset=function(e,t){throw new b},t.offset=function(e){throw new b},t.equals=function(e){throw new b},r(e,[{key:"type",get:function(){throw new b}},{key:"name",get:function(){throw new b}},{key:"universal",get:function(){throw new b}},{key:"isValid",get:function(){throw new b}}]),e}(),Ve=null,je=function(e){function t(){return e.apply(this,arguments)||this}o(t,e);var n=t.prototype;return n.offsetName=function(e,t){return he(e,t.format,t.locale)},n.formatOffset=function(e,t){return ge(this.offset(e),t)},n.offset=function(e){return-new Date(e).getTimezoneOffset()},n.equals=function(e){return"local"===e.type},r(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return Y()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===Ve&&(Ve=new t),Ve}}]),t}(Me),qe=RegExp("^"+ye.source+"$"),Fe={};var Be={year:0,month:1,day:2,hour:3,minute:4,second:5};var He={},ze=function(e){function t(n){var i;return(i=e.call(this)||this).zoneName=n,i.valid=t.isValidZone(n),i}o(t,e),t.create=function(e){return He[e]||(He[e]=new t(e)),He[e]},t.resetCache=function(){He={},Fe={}},t.isValidSpecifier=function(e){return!(!e||!e.match(qe))},t.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},t.parseGMTOffset=function(e){if(e){var t=e.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);if(t)return-60*parseInt(t[1])}return null};var n=t.prototype;return n.offsetName=function(e,t){return he(e,t.format,t.locale,this.name)},n.formatOffset=function(e,t){return ge(this.offset(e),t)},n.offset=function(e){var t=new Date(e);if(isNaN(t))return NaN;var n,i=(n=this.name,Fe[n]||(Fe[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Fe[n]),r=i.formatToParts?function(e,t){for(var n=e.formatToParts(t),i=[],r=0;r<n.length;r++){var o=n[r],s=o.type,a=o.value,c=Be[s];W(c)||(i[c]=parseInt(a,10))}return i}(i,t):function(e,t){var n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n),r=i[1],o=i[2];return[i[3],r,o,i[4],i[5],i[6]]}(i,t),o=r[0],s=r[1],a=r[2],c=r[3],u=+t,l=u%1e3;return(ue({year:o,month:s,day:a,hour:24===c?0:c,minute:r[4],second:r[5],millisecond:0})-(u-=l>=0?l:1e3+l))/6e4},n.equals=function(e){return"iana"===e.type&&e.name===this.name},r(t,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),t}(Me),Je=null,We=function(e){function t(t){var n;return(n=e.call(this)||this).fixed=t,n}o(t,e),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){var n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new t(fe(n[1],n[2]))}return null},r(t,null,[{key:"utcInstance",get:function(){return null===Je&&(Je=new t(0)),Je}}]);var n=t.prototype;return n.offsetName=function(){return this.name},n.formatOffset=function(e,t){return ge(this.fixed,t)},n.offset=function(){return this.fixed},n.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},r(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+ge(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Me),Ze=function(e){function t(t){var n;return(n=e.call(this)||this).zoneName=t,n}o(t,e);var n=t.prototype;return n.offsetName=function(){return null},n.formatOffset=function(){return""},n.offset=function(){return NaN},n.equals=function(){return!1},r(t,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),t}(Me);function Ge(e,t){var n;if(W(e)||null===e)return t;if(e instanceof Me)return e;if("string"==typeof e){var i=e.toLowerCase();return"local"===i?t:"utc"===i||"gmt"===i?We.utcInstance:null!=(n=ze.parseGMTOffset(e))?We.instance(n):ze.isValidSpecifier(i)?ze.create(e):We.parseSpecifier(i)||new Ze(e)}return Z(e)?We.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new Ze(e)}var Ye=function(){return Date.now()},$e=null,Ke=null,Xe=null,Qe=null,et=!1,tt=function(){function e(){}return e.resetCaches=function(){ht.resetCache(),ze.resetCache()},r(e,null,[{key:"now",get:function(){return Ye},set:function(e){Ye=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){$e=e?Ge(e):null}},{key:"defaultZone",get:function(){return $e||je.instance}},{key:"defaultLocale",get:function(){return Ke},set:function(e){Ke=e}},{key:"defaultNumberingSystem",get:function(){return Xe},set:function(e){Xe=e}},{key:"defaultOutputCalendar",get:function(){return Qe},set:function(e){Qe=e}},{key:"throwOnInvalid",get:function(){return et},set:function(e){et=e}}]),e}(),nt={};function it(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),i=nt[n];return i||(i=new Intl.DateTimeFormat(e,t),nt[n]=i),i}var rt={};var ot={};function st(e,t){void 0===t&&(t={});var n=t,i=(n.base,function(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(n,["base"])),r=JSON.stringify([e,i]),o=ot[r];return o||(o=new Intl.RelativeTimeFormat(e,t),ot[r]=o),o}var at=null;function ct(e,t,n,i,r){var o=e.listingMode(n);return"error"===o?null:"en"===o?i(t):r(t)}var ut=function(){function e(e,t,n){if(this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&Y()){var i={useGrouping:!1};n.padTo>0&&(i.minimumIntegerDigits=n.padTo),this.inf=function(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),i=rt[n];return i||(i=new Intl.NumberFormat(e,t),rt[n]=i),i}(e,i)}}return e.prototype.format=function(e){if(this.inf){var t=this.floor?Math.floor(e):e;return this.inf.format(t)}return ne(this.floor?Math.floor(e):oe(e,3),this.padTo)},e}(),lt=function(){function e(e,t,n){var i;if(this.opts=n,this.hasIntl=Y(),e.zone.universal&&this.hasIntl){var r=e.offset/60*-1,o=r>=0?"Etc/GMT+"+r:"Etc/GMT"+r,s=ze.isValidZone(o);0!==e.offset&&s?(i=o,this.dt=e):(i="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:li.fromMillis(e.ts+60*e.offset*1e3))}else"local"===e.zone.type?this.dt=e:(this.dt=e,i=e.zone.name);if(this.hasIntl){var a=Object.assign({},this.opts);i&&(a.timeZone=i),this.dtf=it(t,a)}}var t=e.prototype;return t.format=function(){if(this.hasIntl)return this.dtf.format(this.dt.toJSDate());var e=function(e){switch(Ee(Q(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case Ee(I):return"M/d/yyyy";case Ee(A):return"LLL d, yyyy";case Ee(T):return"EEE, LLL d, yyyy";case Ee(C):return"LLLL d, yyyy";case Ee(O):return"EEEE, LLLL d, yyyy";case Ee(U):return"h:mm a";case Ee(R):return"h:mm:ss a";case Ee(L):case Ee(x):return"h:mm a";case Ee(D):return"HH:mm";case Ee(N):return"HH:mm:ss";case Ee(P):case Ee(_):return"HH:mm";case Ee(M):return"M/d/yyyy, h:mm a";case Ee(j):return"LLL d, yyyy, h:mm a";case Ee(B):return"LLLL d, yyyy, h:mm a";case Ee(z):return"EEEE, LLLL d, yyyy, h:mm a";case Ee(V):return"M/d/yyyy, h:mm:ss a";case Ee(q):return"LLL d, yyyy, h:mm:ss a";case Ee(F):return"EEE, d LLL yyyy, h:mm a";case Ee(H):return"LLLL d, yyyy, h:mm:ss a";case Ee(J):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return"EEEE, LLLL d, yyyy, h:mm a"}}(this.opts),t=ht.create("en-US");return Pe.create(t).formatDateTimeFromString(this.dt,e)},t.formatToParts=function(){return this.hasIntl&&$()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),dt=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&K()&&(this.rtf=st(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n,i){void 0===n&&(n="always"),void 0===i&&(i=!1);var r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){var s="days"===e;switch(t){case 1:return s?"tomorrow":"next "+r[e][0];case-1:return s?"yesterday":"last "+r[e][0];case 0:return s?"today":"this "+r[e][0]}}var a=Object.is(t,-0)||t<0,c=Math.abs(t),u=1===c,l=r[e],d=i?u?l[1]:l[2]||l[1]:u?r[e][0]:e;return a?c+" "+d+" ago":"in "+c+" "+d}(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),ht=function(){function e(e,t,n,i){var r=function(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,i=e.substring(0,t);try{n=it(e).resolvedOptions()}catch(e){n=it(i).resolvedOptions()}var r=n;return[i,r.numberingSystem,r.calendar]}(e),o=r[0],s=r[1],a=r[2];this.locale=o,this.numberingSystem=t||s||null,this.outputCalendar=n||a||null,this.intl=function(e,t,n){return Y()?n||t?(e+="-u",n&&(e+="-ca-"+n),t&&(e+="-nu-"+t),e):e:[]}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}e.fromOpts=function(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)},e.create=function(t,n,i,r){void 0===r&&(r=!1);var o=t||tt.defaultLocale;return new e(o||(r?"en-US":function(){if(at)return at;if(Y()){var e=(new Intl.DateTimeFormat).resolvedOptions().locale;return at=e&&"und"!==e?e:"en-US"}return at="en-US"}()),n||tt.defaultNumberingSystem,i||tt.defaultOutputCalendar,o)},e.resetCache=function(){at=null,nt={},rt={},ot={}},e.fromObject=function(t){var n=void 0===t?{}:t,i=n.locale,r=n.numberingSystem,o=n.outputCalendar;return e.create(i,r,o)};var t=e.prototype;return t.listingMode=function(e){void 0===e&&(e=!0);var t=Y()&&$(),n=this.isEnglish(),i=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&i||e?!t||n&&i?"en":"intl":"error"},t.clone=function(t){return t&&0!==Object.getOwnPropertyNames(t).length?e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this},t.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},t.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},t.months=function(e,t,n){var i=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),ct(this,e,n,ke,(function(){var n=t?{month:e,day:"numeric"}:{month:e},r=t?"format":"standalone";return i.monthsCache[r][e]||(i.monthsCache[r][e]=function(e){for(var t=[],n=1;n<=12;n++){var i=li.utc(2016,n,1);t.push(e(i))}return t}((function(e){return i.extract(e,n,"month")}))),i.monthsCache[r][e]}))},t.weekdays=function(e,t,n){var i=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),ct(this,e,n,Ce,(function(){var n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return i.weekdaysCache[r][e]||(i.weekdaysCache[r][e]=function(e){for(var t=[],n=1;n<=7;n++){var i=li.utc(2016,11,13+n);t.push(e(i))}return t}((function(e){return i.extract(e,n,"weekday")}))),i.weekdaysCache[r][e]}))},t.meridiems=function(e){var t=this;return void 0===e&&(e=!0),ct(this,void 0,e,(function(){return Oe}),(function(){if(!t.meridiemCache){var e={hour:"numeric",hour12:!0};t.meridiemCache=[li.utc(2016,11,13,9),li.utc(2016,11,13,19)].map((function(n){return t.extract(n,e,"dayperiod")}))}return t.meridiemCache}))},t.eras=function(e,t){var n=this;return void 0===t&&(t=!0),ct(this,e,t,xe,(function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[li.utc(-40,1,1),li.utc(2017,1,1)].map((function(e){return n.extract(e,t,"era")}))),n.eraCache[e]}))},t.extract=function(e,t,n){var i=this.dtFormatter(e,t).formatToParts().find((function(e){return e.type.toLowerCase()===n}));return i?i.value:null},t.numberFormatter=function(e){return void 0===e&&(e={}),new ut(this.intl,e.forceSimple||this.fastNumbers,e)},t.dtFormatter=function(e,t){return void 0===t&&(t={}),new lt(e,this.intl,t)},t.relFormatter=function(e){return void 0===e&&(e={}),new dt(this.intl,this.isEnglish(),e)},t.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||Y()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},t.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},r(e,[{key:"fastNumbers",get:function(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||Y()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}}]),e}();function ft(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.reduce((function(e,t){return e+t.source}),"");return RegExp("^"+i+"$")}function vt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce((function(t,n){var i=t[0],r=t[1],o=t[2],s=n(e,o),a=s[0],c=s[1],u=s[2];return[Object.assign(i,a),r||c,u]}),[{},null,1]).slice(0,2)}}function pt(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];for(var r=0,o=n;r<o.length;r++){var s=o[r],a=s[0],c=s[1],u=a.exec(e);if(u)return c(u)}return[null,null]}function gt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n){var i,r={};for(i=0;i<t.length;i++)r[t[i]]=ie(e[n+i]);return[r,null,n+i]}}var mt=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,yt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Et=RegExp(""+yt.source+mt.source+"?"),bt=RegExp("(?:T"+Et.source+")?"),wt=gt("weekYear","weekNumber","weekDay"),St=gt("year","ordinal"),kt=RegExp(yt.source+" ?(?:"+mt.source+"|("+ye.source+"))?"),It=RegExp("(?: "+kt.source+")?");function At(e,t,n){var i=e[t];return W(i)?n:ie(i)}function Tt(e,t){return[{year:At(e,t),month:At(e,t+1,1),day:At(e,t+2,1)},null,t+3]}function Ct(e,t){return[{hours:At(e,t,0),minutes:At(e,t+1,0),seconds:At(e,t+2,0),milliseconds:re(e[t+3])},null,t+4]}function Ot(e,t){var n=!e[t]&&!e[t+1],i=fe(e[t+1],e[t+2]);return[{},n?null:We.instance(i),t+3]}function Ut(e,t){return[{},e[t]?ze.create(e[t]):null,t+1]}var Rt=RegExp("^T?"+yt.source+"$"),Lt=/^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function xt(e){var t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],s=e[5],a=e[6],c=e[7],u=e[8],l="-"===t[0],d=c&&"-"===c[0],h=function(e,t){return void 0===t&&(t=!1),void 0!==e&&(t||e&&l)?-e:e};return[{years:h(ie(n)),months:h(ie(i)),weeks:h(ie(r)),days:h(ie(o)),hours:h(ie(s)),minutes:h(ie(a)),seconds:h(ie(c),"-0"===c),milliseconds:h(re(u),d)}]}var Dt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Nt(e,t,n,i,r,o,s){var a={year:2===t.length?de(ie(t)):ie(t),month:we.indexOf(n)+1,day:ie(i),hour:ie(r),minute:ie(o)};return s&&(a.second=ie(s)),e&&(a.weekday=e.length>3?Ie.indexOf(e)+1:Ae.indexOf(e)+1),a}var Pt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function _t(e){var t,n=e[1],i=e[2],r=e[3],o=e[4],s=e[5],a=e[6],c=e[7],u=e[8],l=e[9],d=e[10],h=e[11],f=Nt(n,o,r,i,s,a,c);return t=u?Dt[u]:l?0:fe(d,h),[f,new We(t)]}var Mt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Vt=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,jt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function qt(e){var t=e[1],n=e[2],i=e[3];return[Nt(t,e[4],i,n,e[5],e[6],e[7]),We.utcInstance]}function Ft(e){var t=e[1],n=e[2],i=e[3],r=e[4],o=e[5],s=e[6];return[Nt(t,e[7],n,i,r,o,s),We.utcInstance]}var Bt=ft(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,bt),Ht=ft(/(\d{4})-?W(\d\d)(?:-?(\d))?/,bt),zt=ft(/(\d{4})-?(\d{3})/,bt),Jt=ft(Et),Wt=vt(Tt,Ct,Ot),Zt=vt(wt,Ct,Ot),Gt=vt(St,Ct,Ot),Yt=vt(Ct,Ot);var $t=vt(Ct);var Kt=ft(/(\d{4})-(\d\d)-(\d\d)/,It),Xt=ft(kt),Qt=vt(Tt,Ct,Ot,Ut),en=vt(Ct,Ot,Ut);var tn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},nn=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},tn),rn=Object.assign({years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:30.436875/7,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},tn),on=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],sn=on.slice(0).reverse();function an(e,t,n){void 0===n&&(n=!1);var i={values:n?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new un(i)}function cn(e,t,n,i,r){var o=e[r][n],s=t[n]/o,a=!(Math.sign(s)===Math.sign(i[r]))&&0!==i[r]&&Math.abs(s)<=1?function(e){return e<0?Math.floor(e):Math.ceil(e)}(s):Math.trunc(s);i[r]+=a,t[n]-=a*o}var un=function(){function e(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||ht.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?rn:nn,this.isLuxonDuration=!0}e.fromMillis=function(t,n){return e.fromObject(Object.assign({milliseconds:t},n))},e.fromObject=function(t){if(null==t||"object"!=typeof t)throw new E("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new e({values:pe(t,e.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:ht.fromObject(t),conversionAccuracy:t.conversionAccuracy})},e.fromISO=function(t,n){var i=function(e){return pt(e,[Lt,xt])}(t)[0];if(i){var r=Object.assign(i,n);return e.fromObject(r)}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.fromISOTime=function(t,n){var i=function(e){return pt(e,[Rt,$t])}(t)[0];if(i){var r=Object.assign(i,n);return e.fromObject(r)}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new E("need to specify a reason the Duration is invalid");var i=t instanceof _e?t:new _e(t,n);if(tt.throwOnInvalid)throw new g(i);return new e({invalid:i})},e.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new y(e);return t},e.isDuration=function(e){return e&&e.isLuxonDuration||!1};var t=e.prototype;return t.toFormat=function(e,t){void 0===t&&(t={});var n=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Pe.create(this.loc,n).formatDurationFromString(this,e):"Invalid Duration"},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=oe(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},t.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();if(t<0||t>=864e5)return null;e=Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e);var n=this.shiftTo("hours","minutes","seconds","milliseconds"),i="basic"===e.format?"hhmm":"hh:mm";e.suppressSeconds&&0===n.seconds&&0===n.milliseconds||(i+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===n.milliseconds||(i+=".SSS"));var r=n.toFormat(i);return e.includePrefix&&(r="T"+r),r},t.toJSON=function(){return this.toISO()},t.toString=function(){return this.toISO()},t.toMillis=function(){return this.as("milliseconds")},t.valueOf=function(){return this.toMillis()},t.plus=function(e){if(!this.isValid)return this;for(var t,n=ln(e),i={},r=h(on);!(t=r()).done;){var o=t.value;(ee(n.values,o)||ee(this.values,o))&&(i[o]=n.get(o)+this.get(o))}return an(this,{values:i},!0)},t.minus=function(e){if(!this.isValid)return this;var t=ln(e);return this.plus(t.negate())},t.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,i=Object.keys(this.values);n<i.length;n++){var r=i[n];t[r]=ve(e(this.values[r],r))}return an(this,{values:t},!0)},t.get=function(t){return this[e.normalizeUnit(t)]},t.set=function(t){return this.isValid?an(this,{values:Object.assign(this.values,pe(t,e.normalizeUnit,[]))}):this},t.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,i=t.numberingSystem,r=t.conversionAccuracy,o={loc:this.loc.clone({locale:n,numberingSystem:i})};return r&&(o.conversionAccuracy=r),an(this,o)},t.as=function(e){return this.isValid?this.shiftTo(e).get(e):NaN},t.normalize=function(){if(!this.isValid)return this;var e=this.toObject();return function(e,t){sn.reduce((function(n,i){return W(t[i])?n:(n&&cn(e,t,n,t,i),i)}),null)}(this.matrix,e),an(this,{values:e},!0)},t.shiftTo=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(!this.isValid)return this;if(0===n.length)return this;n=n.map((function(t){return e.normalizeUnit(t)}));for(var r,o,s={},a={},c=this.toObject(),u=h(on);!(o=u()).done;){var l=o.value;if(n.indexOf(l)>=0){r=l;var d=0;for(var f in a)d+=this.matrix[f][l]*a[f],a[f]=0;Z(c[l])&&(d+=c[l]);var v=Math.trunc(d);for(var p in s[l]=v,a[l]=d-v,c)on.indexOf(p)>on.indexOf(l)&&cn(this.matrix,c,p,s,l)}else Z(c[l])&&(a[l]=c[l])}for(var g in a)0!==a[g]&&(s[r]+=g===r?a[g]:a[g]/this.matrix[r][g]);return an(this,{values:s},!0).normalize()},t.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);t<n.length;t++){var i=n[t];e[i]=-this.values[i]}return an(this,{values:e},!0)},t.equals=function(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(var t,n=h(on);!(t=n()).done;){var i=t.value;if(r=this.values[i],o=e.values[i],!(void 0===r||0===r?void 0===o||0===o:r===o))return!1}var r,o;return!0},r(e,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),e}();function ln(e){if(Z(e))return un.fromMillis(e);if(un.isDuration(e))return e;if("object"==typeof e)return un.fromObject(e);throw new E("Unknown duration argument "+e+" of type "+typeof e)}var dn="Invalid Interval";function hn(e,t){return e&&e.isValid?t&&t.isValid?t<e?fn.invalid("end before start","The end of an interval must be after its start, but you had start="+e.toISO()+" and end="+t.toISO()):null:fn.invalid("missing or invalid end"):fn.invalid("missing or invalid start")}var fn=function(){function e(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new E("need to specify a reason the Interval is invalid");var i=t instanceof _e?t:new _e(t,n);if(tt.throwOnInvalid)throw new p(i);return new e({invalid:i})},e.fromDateTimes=function(t,n){var i=di(t),r=di(n),o=hn(i,r);return null==o?new e({start:i,end:r}):o},e.after=function(t,n){var i=ln(n),r=di(t);return e.fromDateTimes(r,r.plus(i))},e.before=function(t,n){var i=ln(n),r=di(t);return e.fromDateTimes(r.minus(i),r)},e.fromISO=function(t,n){var i=(t||"").split("/",2),r=i[0],o=i[1];if(r&&o){var s,a,c,u;try{a=(s=li.fromISO(r,n)).isValid}catch(o){a=!1}try{u=(c=li.fromISO(o,n)).isValid}catch(o){u=!1}if(a&&u)return e.fromDateTimes(s,c);if(a){var l=un.fromISO(o,n);if(l.isValid)return e.after(s,l)}else if(u){var d=un.fromISO(r,n);if(d.isValid)return e.before(c,d)}}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.isInterval=function(e){return e&&e.isLuxonInterval||!1};var t=e.prototype;return t.length=function(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},t.count=function(e){if(void 0===e&&(e="milliseconds"),!this.isValid)return NaN;var t=this.start.startOf(e),n=this.end.startOf(e);return Math.floor(n.diff(t,e).get(e))+1},t.hasSame=function(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))},t.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},t.isAfter=function(e){return!!this.isValid&&this.s>e},t.isBefore=function(e){return!!this.isValid&&this.e<=e},t.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},t.set=function(t){var n=void 0===t?{}:t,i=n.start,r=n.end;return this.isValid?e.fromDateTimes(i||this.s,r||this.e):this},t.splitAt=function(){var t=this;if(!this.isValid)return[];for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];for(var o=i.map(di).filter((function(e){return t.contains(e)})).sort(),s=[],a=this.s,c=0;a<this.e;){var u=o[c]||this.e,l=+u>+this.e?this.e:u;s.push(e.fromDateTimes(a,l)),a=l,c+=1}return s},t.splitBy=function(t){var n=ln(t);if(!this.isValid||!n.isValid||0===n.as("milliseconds"))return[];for(var i,r=this.s,o=1,s=[];r<this.e;){var a=this.start.plus(n.mapUnits((function(e){return e*o})));i=+a>+this.e?this.e:a,s.push(e.fromDateTimes(r,i)),r=i,o+=1}return s},t.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},t.overlaps=function(e){return this.e>e.s&&this.s<e.e},t.abutsStart=function(e){return!!this.isValid&&+this.e==+e.s},t.abutsEnd=function(e){return!!this.isValid&&+e.e==+this.s},t.engulfs=function(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)},t.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},t.intersection=function(t){if(!this.isValid)return this;var n=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return n>=i?null:e.fromDateTimes(n,i)},t.union=function(t){if(!this.isValid)return this;var n=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return e.fromDateTimes(n,i)},e.merge=function(e){var t=e.sort((function(e,t){return e.s-t.s})).reduce((function(e,t){var n=e[0],i=e[1];return i?i.overlaps(t)||i.abutsStart(t)?[n,i.union(t)]:[n.concat([i]),t]:[n,t]}),[[],null]),n=t[0],i=t[1];return i&&n.push(i),n},e.xor=function(t){for(var n,i,r=null,o=0,s=[],a=t.map((function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]})),c=h((n=Array.prototype).concat.apply(n,a).sort((function(e,t){return e.time-t.time})));!(i=c()).done;){var u=i.value;1===(o+="s"===u.type?1:-1)?r=u.time:(r&&+r!=+u.time&&s.push(e.fromDateTimes(r,u.time)),r=null)}return e.merge(s)},t.difference=function(){for(var t=this,n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.xor([this].concat(i)).map((function(e){return t.intersection(e)})).filter((function(e){return e&&!e.isEmpty()}))},t.toString=function(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":dn},t.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):dn},t.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():dn},t.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):dn},t.toFormat=function(e,t){var n=(void 0===t?{}:t).separator,i=void 0===n?" – ":n;return this.isValid?""+this.s.toFormat(e)+i+this.e.toFormat(e):dn},t.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):un.invalid(this.invalidReason)},t.mapEndpoints=function(t){return e.fromDateTimes(t(this.s),t(this.e))},r(e,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),e}(),vn=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=tt.defaultZone);var t=li.now().setZone(e).set({month:12});return!e.universal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return ze.isValidSpecifier(e)&&ze.isValidZone(e)},e.normalizeZone=function(e){return Ge(e,tt.defaultZone)},e.months=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o,a=n.locObj,c=void 0===a?null:a,u=n.outputCalendar,l=void 0===u?"gregory":u;return(c||ht.create(r,s,l)).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o,a=n.locObj,c=void 0===a?null:a,u=n.outputCalendar,l=void 0===u?"gregory":u;return(c||ht.create(r,s,l)).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o,a=n.locObj;return((void 0===a?null:a)||ht.create(r,s,null)).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,i=n.locale,r=void 0===i?null:i,o=n.numberingSystem,s=void 0===o?null:o,a=n.locObj;return((void 0===a?null:a)||ht.create(r,s,null)).weekdays(e,!0)},e.meridiems=function(e){var t=(void 0===e?{}:e).locale,n=void 0===t?null:t;return ht.create(n).meridiems()},e.eras=function(e,t){void 0===e&&(e="short");var n=(void 0===t?{}:t).locale,i=void 0===n?null:n;return ht.create(i,null,"gregory").eras(e)},e.features=function(){var e=!1,t=!1,n=!1,i=!1;if(Y()){e=!0,t=$(),i=K();try{n="America/New_York"===new Intl.DateTimeFormat("en",{timeZone:"America/New_York"}).resolvedOptions().timeZone}catch(e){n=!1}}return{intl:e,intlTokens:t,zones:n,relative:i}},e}();function pn(e,t){var n=function(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()},i=n(t)-n(e);return Math.floor(un.fromMillis(i).as("days"))}function gn(e,t,n,i){var r=function(e,t,n){for(var i,r,o={},s=0,a=[["years",function(e,t){return t.year-e.year}],["quarters",function(e,t){return t.quarter-e.quarter}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){var n=pn(e,t);return(n-n%7)/7}],["days",pn]];s<a.length;s++){var c=a[s],u=c[0],l=c[1];if(n.indexOf(u)>=0){var d;i=u;var h,f=l(e,t);if((r=e.plus(((d={})[u]=f,d)))>t)e=e.plus(((h={})[u]=f-1,h)),f-=1;else e=r;o[u]=f}}return[e,o,r,i]}(e,t,n),o=r[0],s=r[1],a=r[2],c=r[3],u=t-o,l=n.filter((function(e){return["hours","minutes","seconds","milliseconds"].indexOf(e)>=0}));if(0===l.length){var d;if(a<t)a=o.plus(((d={})[c]=1,d));a!==o&&(s[c]=(s[c]||0)+u/(a-o))}var h,f=un.fromObject(Object.assign(s,i));return l.length>0?(h=un.fromMillis(u,i)).shiftTo.apply(h,l).plus(f):f}var mn={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},yn={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},En=mn.hanidec.replace(/[\[|\]]/g,"").split("");function bn(e,t){var n=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+mn[n||"latn"]+t)}function wn(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){var n=e[0];return t(function(e){var t=parseInt(e,10);if(isNaN(t)){t="";for(var n=0;n<e.length;n++){var i=e.charCodeAt(n);if(-1!==e[n].search(mn.hanidec))t+=En.indexOf(e[n]);else for(var r in yn){var o=yn[r],s=o[0],a=o[1];i>=s&&i<=a&&(t+=i-s)}}return parseInt(t,10)}return t}(n))}}}var Sn="( |"+String.fromCharCode(160)+")",kn=new RegExp(Sn,"g");function In(e){return e.replace(/\./g,"\\.?").replace(kn,Sn)}function An(e){return e.replace(/\./g,"").replace(kn," ").toLowerCase()}function Tn(e,t){return null===e?null:{regex:RegExp(e.map(In).join("|")),deser:function(n){var i=n[0];return e.findIndex((function(e){return An(i)===An(e)}))+t}}}function Cn(e,t){return{regex:e,deser:function(e){return fe(e[1],e[2])},groups:t}}function On(e){return{regex:e,deser:function(e){return e[0]}}}var Un={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};var Rn=null;function Ln(e,t){if(e.literal)return e;var n=Pe.macroTokenToFormatOpts(e.val);if(!n)return e;var i=Pe.create(t,n).formatDateTimeParts((Rn||(Rn=li.fromMillis(1555555555555)),Rn)).map((function(e){return function(e,t,n){var i=e.type,r=e.value;if("literal"===i)return{literal:!0,val:r};var o=n[i],s=Un[i];return"object"==typeof s&&(s=s[o]),s?{literal:!1,val:s}:void 0}(e,0,n)}));return i.includes(void 0)?e:i}function xn(e,t,n){var i=function(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map((function(e){return Ln(e,t)})))}(Pe.parseFormat(n),e),r=i.map((function(t){return n=t,r=bn(i=e),o=bn(i,"{2}"),s=bn(i,"{3}"),a=bn(i,"{4}"),c=bn(i,"{6}"),u=bn(i,"{1,2}"),l=bn(i,"{1,3}"),d=bn(i,"{1,6}"),h=bn(i,"{1,9}"),f=bn(i,"{2,4}"),v=bn(i,"{4,6}"),p=function(e){return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:function(e){return e[0]},literal:!0};var t},(g=function(e){if(n.literal)return p(e);switch(e.val){case"G":return Tn(i.eras("short",!1),0);case"GG":return Tn(i.eras("long",!1),0);case"y":return wn(d);case"yy":return wn(f,de);case"yyyy":return wn(a);case"yyyyy":return wn(v);case"yyyyyy":return wn(c);case"M":return wn(u);case"MM":return wn(o);case"MMM":return Tn(i.months("short",!0,!1),1);case"MMMM":return Tn(i.months("long",!0,!1),1);case"L":return wn(u);case"LL":return wn(o);case"LLL":return Tn(i.months("short",!1,!1),1);case"LLLL":return Tn(i.months("long",!1,!1),1);case"d":return wn(u);case"dd":return wn(o);case"o":return wn(l);case"ooo":return wn(s);case"HH":return wn(o);case"H":return wn(u);case"hh":return wn(o);case"h":return wn(u);case"mm":return wn(o);case"m":case"q":return wn(u);case"qq":return wn(o);case"s":return wn(u);case"ss":return wn(o);case"S":return wn(l);case"SSS":return wn(s);case"u":return On(h);case"a":return Tn(i.meridiems(),0);case"kkkk":return wn(a);case"kk":return wn(f,de);case"W":return wn(u);case"WW":return wn(o);case"E":case"c":return wn(r);case"EEE":return Tn(i.weekdays("short",!1,!1),1);case"EEEE":return Tn(i.weekdays("long",!1,!1),1);case"ccc":return Tn(i.weekdays("short",!0,!1),1);case"cccc":return Tn(i.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Cn(new RegExp("([+-]"+u.source+")(?::("+o.source+"))?"),2);case"ZZZ":return Cn(new RegExp("([+-]"+u.source+")("+o.source+")?"),2);case"z":return On(/[a-z_+-/]{1,256}?/i);default:return p(e)}}(n)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"}).token=n,g;var n,i,r,o,s,a,c,u,l,d,h,f,v,p,g})),o=r.find((function(e){return e.invalidReason}));if(o)return{input:t,tokens:i,invalidReason:o.invalidReason};var s=function(e){return["^"+e.map((function(e){return e.regex})).reduce((function(e,t){return e+"("+t.source+")"}),"")+"$",e]}(r),a=s[0],c=s[1],u=RegExp(a,"i"),l=function(e,t,n){var i=e.match(t);if(i){var r={},o=1;for(var s in n)if(ee(n,s)){var a=n[s],c=a.groups?a.groups+1:1;!a.literal&&a.token&&(r[a.token.val[0]]=a.deser(i.slice(o,o+c))),o+=c}return[i,r]}return[i,{}]}(t,u,c),d=l[0],h=l[1],f=h?function(e){var t;return t=W(e.Z)?W(e.z)?null:ze.create(e.z):new We(e.Z),W(e.q)||(e.M=3*(e.q-1)+1),W(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),W(e.u)||(e.S=re(e.u)),[Object.keys(e).reduce((function(t,n){var i=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(n);return i&&(t[i]=e[n]),t}),{}),t]}(h):[null,null],v=f[0],p=f[1];if(ee(h,"a")&&ee(h,"H"))throw new m("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:i,regex:u,rawMatches:d,matches:h,result:v,zone:p}}var Dn=[0,31,59,90,120,151,181,212,243,273,304,334],Nn=[0,31,60,91,121,152,182,213,244,274,305,335];function Pn(e,t){return new _e("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function _n(e,t,n){var i=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===i?7:i}function Mn(e,t,n){return n+(se(e)?Nn:Dn)[t-1]}function Vn(e,t){var n=se(e)?Nn:Dn,i=n.findIndex((function(e){return e<t}));return{month:i+1,day:t-n[i]}}function jn(e){var t,n=e.year,i=e.month,r=e.day,o=Mn(n,i,r),s=_n(n,i,r),a=Math.floor((o-s+10)/7);return a<1?a=le(t=n-1):a>le(n)?(t=n+1,a=1):t=n,Object.assign({weekYear:t,weekNumber:a,weekday:s},me(e))}function qn(e){var t,n=e.weekYear,i=e.weekNumber,r=e.weekday,o=_n(n,1,4),s=ae(n),a=7*i+r-o-3;a<1?a+=ae(t=n-1):a>s?(t=n+1,a-=ae(n)):t=n;var c=Vn(t,a),u=c.month,l=c.day;return Object.assign({year:t,month:u,day:l},me(e))}function Fn(e){var t=e.year,n=Mn(t,e.month,e.day);return Object.assign({year:t,ordinal:n},me(e))}function Bn(e){var t=e.year,n=Vn(t,e.ordinal),i=n.month,r=n.day;return Object.assign({year:t,month:i,day:r},me(e))}function Hn(e){var t=G(e.year),n=te(e.month,1,12),i=te(e.day,1,ce(e.year,e.month));return t?n?!i&&Pn("day",e.day):Pn("month",e.month):Pn("year",e.year)}function zn(e){var t=e.hour,n=e.minute,i=e.second,r=e.millisecond,o=te(t,0,23)||24===t&&0===n&&0===i&&0===r,s=te(n,0,59),a=te(i,0,59),c=te(r,0,999);return o?s?a?!c&&Pn("millisecond",r):Pn("second",i):Pn("minute",n):Pn("hour",t)}function Jn(e){return new _e("unsupported zone",'the zone "'+e.name+'" is not supported')}function Wn(e){return null===e.weekData&&(e.weekData=jn(e.c)),e.weekData}function Zn(e,t){var n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new li(Object.assign({},n,t,{old:n}))}function Gn(e,t,n){var i=e-60*t*1e3,r=n.offset(i);if(t===r)return[i,t];i-=60*(r-t)*1e3;var o=n.offset(i);return r===o?[i,r]:[e-60*Math.min(r,o)*1e3,Math.max(r,o)]}function Yn(e,t){var n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function $n(e,t,n){return Gn(ue(e),t,n)}function Kn(e,t){var n=e.o,i=e.c.year+Math.trunc(t.years),r=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),o=Object.assign({},e.c,{year:i,month:r,day:Math.min(e.c.day,ce(i,r))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),s=un.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=Gn(ue(o),n,e.zone),c=a[0],u=a[1];return 0!==s&&(c+=s,u=e.zone.offset(c)),{ts:c,o:u}}function Xn(e,t,n,i,r){var o=n.setZone,s=n.zone;if(e&&0!==Object.keys(e).length){var a=t||s,c=li.fromObject(Object.assign(e,n,{zone:a,setZone:void 0}));return o?c:c.setZone(s)}return li.invalid(new _e("unparsable",'the input "'+r+"\" can't be parsed as "+i))}function Qn(e,t,n){return void 0===n&&(n=!0),e.isValid?Pe.create(ht.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function ei(e,t){var n=t.suppressSeconds,i=void 0!==n&&n,r=t.suppressMilliseconds,o=void 0!==r&&r,s=t.includeOffset,a=t.includePrefix,c=void 0!==a&&a,u=t.includeZone,l=void 0!==u&&u,d=t.spaceZone,h=void 0!==d&&d,f=t.format,v=void 0===f?"extended":f,p="basic"===v?"HHmm":"HH:mm";i&&0===e.second&&0===e.millisecond||(p+="basic"===v?"ss":":ss",o&&0===e.millisecond||(p+=".SSS")),(l||s)&&h&&(p+=" "),l?p+="z":s&&(p+="basic"===v?"ZZZ":"ZZ");var g=Qn(e,p);return c&&(g="T"+g),g}var ti={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ni={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ii={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ri=["year","month","day","hour","minute","second","millisecond"],oi=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],si=["year","ordinal","hour","minute","second","millisecond"];function ai(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new y(e);return t}function ci(e,t){for(var n,i=h(ri);!(n=i()).done;){var r=n.value;W(e[r])&&(e[r]=ti[r])}var o=Hn(e)||zn(e);if(o)return li.invalid(o);var s=tt.now(),a=$n(e,t.offset(s),t),c=a[0],u=a[1];return new li({ts:c,zone:t,o:u})}function ui(e,t,n){var i=!!W(n.round)||n.round,r=function(e,r){return e=oe(e,i||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(e,r)},o=function(i){return n.calendary?t.hasSame(e,i)?0:t.startOf(i).diff(e.startOf(i),i).get(i):t.diff(e,i).get(i)};if(n.unit)return r(o(n.unit),n.unit);for(var s,a=h(n.units);!(s=a()).done;){var c=s.value,u=o(c);if(Math.abs(u)>=1)return r(u,c)}return r(e>t?-0:0,n.units[n.units.length-1])}var li=function(){function e(e){var t=e.zone||tt.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new _e("invalid input"):null)||(t.isValid?null:Jn(t));this.ts=W(e.ts)?tt.now():e.ts;var i=null,r=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t)){var o=[e.old.c,e.old.o];i=o[0],r=o[1]}else{var s=t.offset(this.ts);i=Yn(this.ts,s),i=(n=Number.isNaN(i.year)?new _e("invalid input"):null)?null:i,r=n?null:s}this._zone=t,this.loc=e.loc||ht.create(),this.invalid=n,this.weekData=null,this.c=i,this.o=r,this.isLuxonDateTime=!0}e.now=function(){return new e({})},e.local=function(t,n,i,r,o,s,a){return W(t)?e.now():ci({year:t,month:n,day:i,hour:r,minute:o,second:s,millisecond:a},tt.defaultZone)},e.utc=function(t,n,i,r,o,s,a){return W(t)?new e({ts:tt.now(),zone:We.utcInstance}):ci({year:t,month:n,day:i,hour:r,minute:o,second:s,millisecond:a},We.utcInstance)},e.fromJSDate=function(t,n){void 0===n&&(n={});var i,r=(i=t,"[object Date]"===Object.prototype.toString.call(i)?t.valueOf():NaN);if(Number.isNaN(r))return e.invalid("invalid input");var o=Ge(n.zone,tt.defaultZone);return o.isValid?new e({ts:r,zone:o,loc:ht.fromObject(n)}):e.invalid(Jn(o))},e.fromMillis=function(t,n){if(void 0===n&&(n={}),Z(t))return t<-864e13||t>864e13?e.invalid("Timestamp out of range"):new e({ts:t,zone:Ge(n.zone,tt.defaultZone),loc:ht.fromObject(n)});throw new E("fromMillis requires a numerical input, but received a "+typeof t+" with value "+t)},e.fromSeconds=function(t,n){if(void 0===n&&(n={}),Z(t))return new e({ts:1e3*t,zone:Ge(n.zone,tt.defaultZone),loc:ht.fromObject(n)});throw new E("fromSeconds requires a numerical input")},e.fromObject=function(t){var n=Ge(t.zone,tt.defaultZone);if(!n.isValid)return e.invalid(Jn(n));var i=tt.now(),r=n.offset(i),o=pe(t,ai,["zone","locale","outputCalendar","numberingSystem"]),s=!W(o.ordinal),a=!W(o.year),c=!W(o.month)||!W(o.day),u=a||c,l=o.weekYear||o.weekNumber,d=ht.fromObject(t);if((u||s)&&l)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&s)throw new m("Can't mix ordinal dates with month/day");var f,v,p=l||o.weekday&&!u,g=Yn(i,r);p?(f=oi,v=ni,g=jn(g)):s?(f=si,v=ii,g=Fn(g)):(f=ri,v=ti);for(var y,E=!1,b=h(f);!(y=b()).done;){var w=y.value;W(o[w])?o[w]=E?v[w]:g[w]:E=!0}var S=(p?function(e){var t=G(e.weekYear),n=te(e.weekNumber,1,le(e.weekYear)),i=te(e.weekday,1,7);return t?n?!i&&Pn("weekday",e.weekday):Pn("week",e.week):Pn("weekYear",e.weekYear)}(o):s?function(e){var t=G(e.year),n=te(e.ordinal,1,ae(e.year));return t?!n&&Pn("ordinal",e.ordinal):Pn("year",e.year)}(o):Hn(o))||zn(o);if(S)return e.invalid(S);var k=$n(p?qn(o):s?Bn(o):o,r,n),I=new e({ts:k[0],zone:n,o:k[1],loc:d});return o.weekday&&u&&t.weekday!==I.weekday?e.invalid("mismatched weekday","you can't specify both a weekday of "+o.weekday+" and a date of "+I.toISO()):I},e.fromISO=function(e,t){void 0===t&&(t={});var n=function(e){return pt(e,[Bt,Wt],[Ht,Zt],[zt,Gt],[Jt,Yt])}(e);return Xn(n[0],n[1],t,"ISO 8601",e)},e.fromRFC2822=function(e,t){void 0===t&&(t={});var n=function(e){return pt(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Pt,_t])}(e);return Xn(n[0],n[1],t,"RFC 2822",e)},e.fromHTTP=function(e,t){void 0===t&&(t={});var n=function(e){return pt(e,[Mt,qt],[Vt,qt],[jt,Ft])}(e);return Xn(n[0],n[1],t,"HTTP",t)},e.fromFormat=function(t,n,i){if(void 0===i&&(i={}),W(t)||W(n))throw new E("fromFormat requires an input string and a format");var r=i,o=r.locale,s=void 0===o?null:o,a=r.numberingSystem,c=void 0===a?null:a,u=function(e,t,n){var i=xn(e,t,n);return[i.result,i.zone,i.invalidReason]}(ht.fromOpts({locale:s,numberingSystem:c,defaultToEN:!0}),t,n),l=u[0],d=u[1],h=u[2];return h?e.invalid(h):Xn(l,d,i,"format "+n,t)},e.fromString=function(t,n,i){return void 0===i&&(i={}),e.fromFormat(t,n,i)},e.fromSQL=function(e,t){void 0===t&&(t={});var n=function(e){return pt(e,[Kt,Qt],[Xt,en])}(e);return Xn(n[0],n[1],t,"SQL",e)},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new E("need to specify a reason the DateTime is invalid");var i=t instanceof _e?t:new _e(t,n);if(tt.throwOnInvalid)throw new v(i);return new e({invalid:i})},e.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var t=e.prototype;return t.get=function(e){return this[e]},t.resolvedLocaleOpts=function(e){void 0===e&&(e={});var t=Pe.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t.locale,numberingSystem:t.numberingSystem,outputCalendar:t.calendar}},t.toUTC=function(e,t){return void 0===e&&(e=0),void 0===t&&(t={}),this.setZone(We.instance(e),t)},t.toLocal=function(){return this.setZone(tt.defaultZone)},t.setZone=function(t,n){var i=void 0===n?{}:n,r=i.keepLocalTime,o=void 0!==r&&r,s=i.keepCalendarTime,a=void 0!==s&&s;if((t=Ge(t,tt.defaultZone)).equals(this.zone))return this;if(t.isValid){var c=this.ts;if(o||a){var u=t.offset(this.ts);c=$n(this.toObject(),u,t)[0]}return Zn(this,{ts:c,zone:t})}return e.invalid(Jn(t))},t.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,i=t.numberingSystem,r=t.outputCalendar;return Zn(this,{loc:this.loc.clone({locale:n,numberingSystem:i,outputCalendar:r})})},t.setLocale=function(e){return this.reconfigure({locale:e})},t.set=function(e){if(!this.isValid)return this;var t,n=pe(e,ai,[]),i=!W(n.weekYear)||!W(n.weekNumber)||!W(n.weekday),r=!W(n.ordinal),o=!W(n.year),s=!W(n.month)||!W(n.day),a=o||s,c=n.weekYear||n.weekNumber;if((a||r)&&c)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&r)throw new m("Can't mix ordinal dates with month/day");i?t=qn(Object.assign(jn(this.c),n)):W(n.ordinal)?(t=Object.assign(this.toObject(),n),W(n.day)&&(t.day=Math.min(ce(t.year,t.month),t.day))):t=Bn(Object.assign(Fn(this.c),n));var u=$n(t,this.o,this.zone);return Zn(this,{ts:u[0],o:u[1]})},t.plus=function(e){return this.isValid?Zn(this,Kn(this,ln(e))):this},t.minus=function(e){return this.isValid?Zn(this,Kn(this,ln(e).negate())):this},t.startOf=function(e){if(!this.isValid)return this;var t={},n=un.normalizeUnit(e);switch(n){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}if("weeks"===n&&(t.weekday=1),"quarters"===n){var i=Math.ceil(this.month/3);t.month=3*(i-1)+1}return this.set(t)},t.endOf=function(e){var t;return this.isValid?this.plus((t={},t[e]=1,t)).startOf(e).minus(1):this},t.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Pe.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):"Invalid DateTime"},t.toLocaleString=function(e){return void 0===e&&(e=I),this.isValid?Pe.create(this.loc.clone(e),e).formatDateTime(this):"Invalid DateTime"},t.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Pe.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},t.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},t.toISODate=function(e){var t=(void 0===e?{}:e).format,n="basic"===(void 0===t?"extended":t)?"yyyyMMdd":"yyyy-MM-dd";return this.year>9999&&(n="+"+n),Qn(this,n)},t.toISOWeekDate=function(){return Qn(this,"kkkk-'W'WW-c")},t.toISOTime=function(e){var t=void 0===e?{}:e,n=t.suppressMilliseconds,i=void 0!==n&&n,r=t.suppressSeconds,o=void 0!==r&&r,s=t.includeOffset,a=void 0===s||s,c=t.includePrefix,u=void 0!==c&&c,l=t.format;return ei(this,{suppressSeconds:o,suppressMilliseconds:i,includeOffset:a,includePrefix:u,format:void 0===l?"extended":l})},t.toRFC2822=function(){return Qn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},t.toHTTP=function(){return Qn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},t.toSQLDate=function(){return Qn(this,"yyyy-MM-dd")},t.toSQLTime=function(e){var t=void 0===e?{}:e,n=t.includeOffset,i=void 0===n||n,r=t.includeZone;return ei(this,{includeOffset:i,includeZone:void 0!==r&&r,spaceZone:!0})},t.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},t.toString=function(){return this.isValid?this.toISO():"Invalid DateTime"},t.valueOf=function(){return this.toMillis()},t.toMillis=function(){return this.isValid?this.ts:NaN},t.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},t.toJSON=function(){return this.toISO()},t.toBSON=function(){return this.toJSDate()},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},t.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return un.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var i,r=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),o=(i=t,Array.isArray(i)?i:[i]).map(un.normalizeUnit),s=e.valueOf()>this.valueOf(),a=gn(s?this:e,s?e:this,o,r);return s?a.negate():a},t.diffNow=function(t,n){return void 0===t&&(t="milliseconds"),void 0===n&&(n={}),this.diff(e.now(),t,n)},t.until=function(e){return this.isValid?fn.fromDateTimes(this,e):this},t.hasSame=function(e,t){if(!this.isValid)return!1;var n=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t)<=n&&n<=i.endOf(t)},t.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},t.toRelative=function(t){if(void 0===t&&(t={}),!this.isValid)return null;var n=t.base||e.fromObject({zone:this.zone}),i=t.padding?this<n?-t.padding:t.padding:0,r=["years","months","days","hours","minutes","seconds"],o=t.unit;return Array.isArray(t.unit)&&(r=t.unit,o=void 0),ui(n,this.plus(i),Object.assign(t,{numeric:"always",units:r,unit:o}))},t.toRelativeCalendar=function(t){return void 0===t&&(t={}),this.isValid?ui(t.base||e.fromObject({zone:this.zone}),this,Object.assign(t,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},e.min=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(!n.every(e.isDateTime))throw new E("min requires all arguments be DateTimes");return X(n,(function(e){return e.valueOf()}),Math.min)},e.max=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(!n.every(e.isDateTime))throw new E("max requires all arguments be DateTimes");return X(n,(function(e){return e.valueOf()}),Math.max)},e.fromFormatExplain=function(e,t,n){void 0===n&&(n={});var i=n,r=i.locale,o=void 0===r?null:r,s=i.numberingSystem,a=void 0===s?null:s;return xn(ht.fromOpts({locale:o,numberingSystem:a,defaultToEN:!0}),e,t)},e.fromStringExplain=function(t,n,i){return void 0===i&&(i={}),e.fromFormatExplain(t,n,i)},r(e,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?Wn(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?Wn(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?Wn(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?Fn(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?vn.months("short",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?vn.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?vn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?vn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.universal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return se(this.year)}},{key:"daysInMonth",get:function(){return ce(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?ae(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?le(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return I}},{key:"DATE_MED",get:function(){return A}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return T}},{key:"DATE_FULL",get:function(){return C}},{key:"DATE_HUGE",get:function(){return O}},{key:"TIME_SIMPLE",get:function(){return U}},{key:"TIME_WITH_SECONDS",get:function(){return R}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return L}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return x}},{key:"TIME_24_SIMPLE",get:function(){return D}},{key:"TIME_24_WITH_SECONDS",get:function(){return N}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return P}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return _}},{key:"DATETIME_SHORT",get:function(){return M}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return V}},{key:"DATETIME_MED",get:function(){return j}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return q}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return F}},{key:"DATETIME_FULL",get:function(){return B}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return H}},{key:"DATETIME_HUGE",get:function(){return z}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return J}}]),e}();function di(e){if(li.isDateTime(e))return e;if(e&&e.valueOf&&Z(e.valueOf()))return li.fromJSDate(e);if(e&&"object"==typeof e)return li.fromObject(e);throw new E("Unknown datetime argument: "+e+", of type "+typeof e)}t.DateTime=li,t.Duration=un,t.FixedOffsetZone=We,t.IANAZone=ze,t.Info=vn,t.Interval=fn,t.InvalidZone=Ze,t.LocalZone=je,t.Settings=tt,t.VERSION="1.28.1",t.Zone=Me},function(e,t,n){(function(e){var i=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(39),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(9))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var i,r,o,s,a,c=1,u={},l=!1,d=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?i=function(e){t.nextTick((function(){v(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){v(e.data)},i=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,i=function(e){var t=d.createElement("script");t.onreadystatechange=function(){v(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):i=function(e){setTimeout(v,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&v(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),i=function(t){e.postMessage(s+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return u[c]=r,i(c),c++},h.clearImmediate=f}function f(e){delete u[e]}function v(e){if(l)setTimeout(v,0,e);else{var t=u[e];if(t){l=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{f(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(9),n(17))},function(e,t,n){"use strict";(function(e){
2
2
  /*!
3
3
  * The buffer module from node.js, for the browser.
4
4
  *
@@ -7,4 +7,4 @@
7
7
  */
8
8
  var i=n(41),r=n(42),o=n(43);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return u(this,e,t,n)}function u(e,t,n,i){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,i){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,n):new Uint8Array(t,n,i);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=h(e,t);return e}(e,t,n,i):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|v(t,n),r=(e=a(e,i)).write(t,n);r!==i&&(e=e.slice(0,r));return e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|f(t.length);return 0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(i=t.length)!=i?a(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(l(t),e=a(e,t<0?0:0|f(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|f(t.length);e=a(e,n);for(var i=0;i<n;i+=1)e[i]=255&t[i];return e}function f(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function v(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(e).length;default:if(i)return q(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,n){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return U(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function g(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function m(e,t,n,i,r){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=c.from(t,i)),c.isBuffer(t))return 0===t.length?-1:y(e,t,n,i,r);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,i,r){var o,s=1,a=e.length,c=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(r){var l=-1;for(o=n;o<a;o++)if(u(e,o)===u(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(n+c>a&&(n=a-c),o=n;o>=0;o--){for(var d=!0,h=0;h<c;h++)if(u(e,o+h)!==u(t,h)){d=!1;break}if(d)return o}return-1}function E(e,t,n,i){n=Number(n)||0;var r=e.length-n;i?(i=Number(i))>r&&(i=r):i=r;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;s<i;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function b(e,t,n,i){return B(q(t,e.length-n),e,n,i)}function w(e,t,n,i){return B(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,i)}function S(e,t,n,i){return w(e,t,n,i)}function k(e,t,n,i){return B(F(t),e,n,i)}function I(e,t,n,i){return B(function(e,t){for(var n,i,r,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),i=n>>8,r=n%256,o.push(r),o.push(i);return o}(t,e.length-n),e,n,i)}function A(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function T(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;r<n;){var o,s,a,c,u=e[r],l=null,d=u>239?4:u>223?3:u>191?2:1;if(r+d<=n)switch(d){case 1:u<128&&(l=u);break;case 2:128==(192&(o=e[r+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=e[r+1],s=e[r+2],128==(192&o)&&128==(192&s)&&(c=(15&u)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[r+1],s=e[r+2],a=e[r+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,d=1):l>65535&&(l-=65536,i.push(l>>>10&1023|55296),l=56320|1023&l),i.push(l),r+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",i=0;for(;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=4096));return n}(i)}t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return u(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,i){return l(t),t<=0?a(e,t):void 0!==n?"string"==typeof i?a(e,t).fill(n,i):a(e,t).fill(n):a(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return d(null,e)},c.allocUnsafeSlow=function(e){return d(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,r=0,o=Math.min(n,i);r<o;++r)if(e[r]!==t[r]){n=e[r],i=t[r];break}return n<i?-1:i<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=c.allocUnsafe(t),r=0;for(n=0;n<e.length;++n){var s=e[n];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,r),r+=s.length}return i},c.byteLength=v,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?T(this,0,e):p.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,i,r){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(i>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(i,r),l=e.slice(t,n),d=0;d<a;++d)if(u[d]!==l[d]){o=u[d],s=l[d];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},c.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(127&e[r]);return i}function O(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(e[r]);return i}function U(e,t,n){var i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var r="",o=t;o<n;++o)r+=j(e[o]);return r}function R(e,t,n){for(var i=e.slice(t,n),r="",o=0;o<i.length;o+=2)r+=String.fromCharCode(i[o]+256*i[o+1]);return r}function L(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,n,i,r,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<o)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function D(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r<o;++r)e[n+r]=(t&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function N(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r<o;++r)e[n+r]=t>>>8*(i?r:3-r)&255}function P(e,t,n,i,r,o){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function _(e,t,n,i,o){return o||P(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function M(e,t,n,i,o){return o||P(e,0,n,8),r.write(e,t,n,i,52,8),n+8}c.prototype.slice=function(e,t){var n,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var r=t-e;n=new c(r,void 0);for(var o=0;o<r;++o)n[o]=this[o+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var i=this[e],r=1,o=0;++o<t&&(r*=256);)i+=this[e+o]*r;return i},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var i=this[e+--t],r=1;t>0&&(r*=256);)i+=this[e+--t]*r;return i},c.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var i=this[e],r=1,o=0;++o<t&&(r*=256);)i+=this[e+o]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var i=t,r=1,o=this[e+--i];i>0&&(r*=256);)o+=this[e+--i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),r.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),r.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),r.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),r.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,i){(e=+e,t|=0,n|=0,i)||x(this,e,t,n,Math.pow(2,8*n)-1,0);var r=1,o=0;for(this[t]=255&e;++o<n&&(r*=256);)this[t+o]=e/r&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,i){(e=+e,t|=0,n|=0,i)||x(this,e,t,n,Math.pow(2,8*n)-1,0);var r=n-1,o=1;for(this[t+r]=255&e;--r>=0&&(o*=256);)this[t+r]=e/o&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);x(this,e,t,n,r-1,-r)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);x(this,e,t,n,r-1,-r)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return _(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return _(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return M(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return M(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var r,o=i-n;if(this===e&&n<t&&t<i)for(r=o-1;r>=0;--r)e[r+t]=this[r+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(r=0;r<o;++r)e[r+t]=this[r+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},c.prototype.fill=function(e,t,n,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!c.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=c.isBuffer(e)?e:q(new c(e,i).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var V=/[^+\/0-9A-Za-z-_]/g;function j(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){var n;t=t||1/0;for(var i=e.length,r=null,o=[],s=0;s<i;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function F(e){return i.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(V,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,n,i){for(var r=0;r<i&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}).call(this,n(9))},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],i=t[1];return 3*(n+i)/4-i},t.toByteArray=function(e){var t,n,i=u(e),s=i[0],a=i[1],c=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),l=0,d=a>0?s-4:s;for(n=0;n<d;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===a&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[l++]=255&t);1===a&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,o=[],s=0,a=n-r;s<a;s+=16383)o.push(l(e,s,s+16383>a?a:s+16383));1===r?(t=e[n-1],o.push(i[t>>2]+i[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return o.join("")};for(var i=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a<c;++a)i[a]=s[a],r[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var r,o,s=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(i[(o=r)>>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(e,t){
9
9
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
10
- t.read=function(e,t,n,i,r){var o,s,a=8*r-i-1,c=(1<<a)-1,u=c>>1,l=-7,d=n?r-1:0,h=n?-1:1,f=e[t+d];for(d+=h,o=f&(1<<-l)-1,f>>=-l,l+=a;l>0;o=256*o+e[t+d],d+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=i;l>0;s=256*s+e[t+d],d+=h,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,i),o-=u}return(f?-1:1)*s*Math.pow(2,o-i)},t.write=function(e,t,n,i,r,o){var s,a,c,u=8*o-r-1,l=(1<<u)-1,d=l>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,v=i?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+d>=1?h/c:h*Math.pow(2,1-d))*c>=2&&(s++,c/=2),s+d>=l?(a=0,s=l):s+d>=1?(a=(t*c-1)*Math.pow(2,r),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,r),s=0));r>=8;e[n+f]=255&a,f+=v,a/=256,r-=8);for(s=s<<r|a,u+=r;u>0;e[n+f]=255&s,f+=v,s/=256,u-=8);e[n+f-v]|=128*p}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";n.r(t);var i=n(7),r=n(18);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var a=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n||"")},request:r.a,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},c=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};o(this,e),this.services=t,this.options=n,this.allOptions=i,this.type="backend",this.init(t,n,i)}var t,n,r;return t=e,(n=[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=Object(i.a)(n,this.options||{},a()),this.allOptions=r,this.services&&this.options.reloadInterval&&setInterval((function(){return t.reload()}),this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,r,o){var s=this,a=this.options.loadPath;"function"==typeof this.options.loadPath&&(a=this.options.loadPath(e,n)),(a=Object(i.c)(a)).then((function(i){if(!i)return o(null,{});var a=s.services.interpolator.interpolate(i,{lng:e.join("+"),ns:n.join("+")});s.loadUrl(a,o,t,r)}))}},{key:"loadUrl",value:function(e,t,n,i){var r=this;this.options.request(this.options,e,void 0,(function(o,s){if(s&&(s.status>=500&&s.status<600||!s.status))return t("failed loading "+e+"; status code: "+s.status,!0);if(s&&s.status>=400&&s.status<500)return t("failed loading "+e+"; status code: "+s.status,!1);if(!s&&o&&o.message&&o.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e+": "+o.message,!0);if(o)return t(o,!1);var a,c;try{a="string"==typeof s.data?r.options.parse(s.data,n,i):s.data}catch(t){c="failed parsing "+e+" to json"}if(c)return t(c,!1);t(null,a)}))}},{key:"create",value:function(e,t,n,i,r){var o=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var s=this.options.parsePayload(t,n,i),a=0,c=[],u=[];e.forEach((function(n){var i=o.options.addPath;"function"==typeof o.options.addPath&&(i=o.options.addPath(n,t));var l=o.services.interpolator.interpolate(i,{lng:n,ns:t});o.options.request(o.options,l,s,(function(t,n){a+=1,c.push(t),u.push(n),a===e.length&&r&&r(c,u)}))}))}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,i=t.languageUtils,r=t.logger,o=n.language;if(!o||"cimode"!==o.toLowerCase()){var s=[],a=function(e){i.toResolveHierarchy(e).forEach((function(e){s.indexOf(e)<0&&s.push(e)}))};a(o),this.allOptions.preload&&this.allOptions.preload.forEach((function(e){return a(e)})),s.forEach((function(t){e.allOptions.ns.forEach((function(e){n.read(t,e,"read",null,null,(function(i,o){i&&r.warn("loading namespace ".concat(e," for language ").concat(t," failed"),i),!i&&o&&r.log("loaded namespace ".concat(e," for language ").concat(t),o),n.loaded("".concat(t,"|").concat(e),i,o)}))}))}))}}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();c.type="backend",t.default=c},function(e,t){var n="undefined"!=typeof self?self:this,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,i="Symbol"in e&&"iterator"in Symbol,r="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,s="ArrayBuffer"in e;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function v(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function p(e){var t=new FileReader,n=v(t);return t.readAsArrayBuffer(e),n}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&r&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var e,t,n,i=f(this);if(i)return i;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=v(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),i=0;i<t.length;i++)n[i]=String.fromCharCode(t[i]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=u(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},h.prototype.delete=function(e){delete this.map[u(e)]},h.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},h.prototype.set=function(e,t){this.map[u(e)]=l(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),d(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),d(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),d(e)},i&&(h.prototype[Symbol.iterator]=h.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function E(e,t){var n,i,r=(t=t||{}).body;if(e instanceof E){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(n=t.method||this.method||"GET",i=n.toUpperCase(),y.indexOf(i)>-1?i:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(r))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})},m.call(E.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];w.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function k(e,n){return new Promise((function(i,o){var s=new E(e,n);if(s.signal&&s.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var e,t,n={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),i=n.shift().trim();if(i){var r=n.join(":").trim();t.append(i,r)}})),t)};n.url="responseURL"in a?a.responseURL:n.headers.get("X-Request-URL");var r="response"in a?a.response:a.responseText;i(new w(r,n))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&r&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",c)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}k.polyfill=!0,e.fetch||(e.fetch=k,e.Headers=h,e.Request=E,e.Response=w),t.Headers=h,t.Request=E,t.Response=w,t.fetch=k,Object.defineProperty(t,"__esModule",{value:!0})}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=i;(t=r.fetch).default=r.fetch,t.fetch=r.fetch,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,e.exports=t},function(e,t,n){"use strict";n.r(t);var i=n(4),r=n(5),o=[],s=o.forEach,a=o.slice;function c(e){return s.call(a.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}var u=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,l=function(e,t,n){var i=n||{};i.path=i.path||"/";var r=e+"="+encodeURIComponent(t);if(i.maxAge>0){var o=i.maxAge-0;if(isNaN(o))throw new Error("maxAge should be a Number");r+="; Max-Age="+Math.floor(o)}if(i.domain){if(!u.test(i.domain))throw new TypeError("option domain is invalid");r+="; Domain="+i.domain}if(i.path){if(!u.test(i.path))throw new TypeError("option path is invalid");r+="; Path="+i.path}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw new TypeError("option expires is invalid");r+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(r+="; HttpOnly"),i.secure&&(r+="; Secure"),i.sameSite)switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r},d=function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+60*n*1e3)),i&&(r.domain=i),document.cookie=l(e,encodeURIComponent(t),r)},h=function(e){for(var t=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var r=n[i];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return r.substring(t.length,r.length)}return null},f={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!=typeof document){var n=h(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!=typeof document&&d(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},v={name:"querystring",lookup:function(e){var t;if("undefined"!=typeof window)for(var n=window.location.search.substring(1).split("&"),i=0;i<n.length;i++){var r=n[i].indexOf("=");if(r>0)n[i].substring(0,r)===e.lookupQuerystring&&(t=n[i].substring(r+1))}return t}},p=null,g=function(){if(null!==p)return p;try{p="undefined"!==window&&null!==window.localStorage;window.localStorage.setItem("i18next.translate.boo","foo"),window.localStorage.removeItem("i18next.translate.boo")}catch(e){p=!1}return p},m={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&g()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&g()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},y=null,E=function(){if(null!==y)return y;try{y="undefined"!==window&&null!==window.sessionStorage;window.sessionStorage.setItem("i18next.translate.boo","foo"),window.sessionStorage.removeItem("i18next.translate.boo")}catch(e){y=!1}return y},b={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&E()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&E()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},w={name:"navigator",lookup:function(e){var t=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)t.push(navigator.languages[n]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},S={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},k={name:"path",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"==typeof e.lookupFromPathIndex){if("string"!=typeof n[e.lookupFromPathIndex])return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},I={name:"subdomain",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.href.match(/(?:http[s]*\:\/\/)*(.*?)\.(?=[^\/]*\..{2,5})/gi);n instanceof Array&&(t="number"==typeof e.lookupFromSubdomainIndex?n[e.lookupFromSubdomainIndex].replace("http://","").replace("https://","").replace(".",""):n[0].replace("http://","").replace("https://","").replace(".",""))}return t}};var A=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(i.a)(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return Object(r.a)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=c(t,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(f),this.addDetector(v),this.addDetector(m),this.addDetector(b),this.addDetector(w),this.addDetector(S),this.addDetector(k),this.addDetector(I)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var n=[];return e.forEach((function(e){if(t.detectors[e]){var i=t.detectors[e].lookup(t.options);i&&"string"==typeof i&&(i=[i]),i&&(n=n.concat(i))}})),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var n=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((function(t){n.detectors[t]&&n.detectors[t].cacheUserLanguage(e,n.options)})))}}]),e}();A.type="languageDetector",t.default=A},function(e,t,n){"use strict";var i=n(48);e.exports=function(e){if(!i(e))throw new TypeError(e+" is not an Object");return e}},function(e,t,n){"use strict";var i=n(10),r={function:!0,object:!0};e.exports=function(e){return i(e)&&r[typeof e]||!1}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return Le})),n.d(t,"Axios",(function(){return xe})),n.d(t,"AxiosError",(function(){return De})),n.d(t,"CanceledError",(function(){return Ne})),n.d(t,"isCancel",(function(){return Pe})),n.d(t,"CancelToken",(function(){return _e})),n.d(t,"VERSION",(function(){return Me})),n.d(t,"all",(function(){return Ve})),n.d(t,"Cancel",(function(){return je})),n.d(t,"isAxiosError",(function(){return qe})),n.d(t,"spread",(function(){return Fe})),n.d(t,"toFormData",(function(){return Be})),n.d(t,"AxiosHeaders",(function(){return He})),n.d(t,"HttpStatusCode",(function(){return ze})),n.d(t,"formToJSON",(function(){return Je})),n.d(t,"getAdapter",(function(){return We})),n.d(t,"mergeConfig",(function(){return Ze}));var i={};n.r(i),n.d(i,"hasBrowserEnv",(function(){return m})),n.d(i,"hasStandardBrowserWebWorkerEnv",(function(){return b})),n.d(i,"hasStandardBrowserEnv",(function(){return E})),n.d(i,"navigator",(function(){return y})),n.d(i,"origin",(function(){return w}));var r=n(1),o=n(11),s=n(6);function a(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function c(e,t){this._pairs=[],e&&Object(s.a)(e,this,t)}const u=c.prototype;u.append=function(e,t){this._pairs.push([e,t])},u.toString=function(e){const t=e?function(t){return e.call(this,t,a)}:a;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var l=c;function d(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function h(e,t,n){if(!t)return e;const i=n&&n.encode||d;r.a.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(s=o?o(t,n):r.a.isURLSearchParams(t)?t.toString():new l(t,n).toString(i),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}var f=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){r.a.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},v=n(2),p={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},g={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:l,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const m="undefined"!=typeof window&&"undefined"!=typeof document,y="object"==typeof navigator&&navigator||void 0,E=m&&(!y||["ReactNative","NativeScript","NS"].indexOf(y.product)<0),b="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,w=m&&window.location.href||"http://localhost";var S={...i,...g};var k=function(e){function t(e,n,i,o){let s=e[o++];if("__proto__"===s)return!0;const a=Number.isFinite(+s),c=o>=e.length;if(s=!s&&r.a.isArray(i)?i.length:s,c)return r.a.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!a;i[s]&&r.a.isObject(i[s])||(i[s]=[]);return t(e,n,i[s],o)&&r.a.isArray(i[s])&&(i[s]=function(e){const t={},n=Object.keys(e);let i;const r=n.length;let o;for(i=0;i<r;i++)o=n[i],t[o]=e[o];return t}(i[s])),!a}if(r.a.isFormData(e)&&r.a.isFunction(e.entries)){const n={};return r.a.forEachEntry(e,(e,i)=>{t(function(e){return r.a.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),i,n,0)}),n}return null};const I={transitional:p,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=r.a.isObject(e);o&&r.a.isHTMLForm(e)&&(e=new FormData(e));if(r.a.isFormData(e))return i?JSON.stringify(k(e)):e;if(r.a.isArrayBuffer(e)||r.a.isBuffer(e)||r.a.isStream(e)||r.a.isFile(e)||r.a.isBlob(e)||r.a.isReadableStream(e))return e;if(r.a.isArrayBufferView(e))return e.buffer;if(r.a.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Object(s.a)(e,new S.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,i){return S.isNode&&r.a.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=r.a.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Object(s.a)(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),function(e,t,n){if(r.a.isString(e))try{return(t||JSON.parse)(e),r.a.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||I.transitional,n=t&&t.forcedJSONParsing,i="json"===this.responseType;if(r.a.isResponse(e)||r.a.isReadableStream(e))return e;if(e&&r.a.isString(e)&&(n&&!this.responseType||i)){const n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw v.a.from(e,v.a.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:S.classes.FormData,Blob:S.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};r.a.forEach(["delete","get","head","post","put","patch"],e=>{I.headers[e]={}});var A=I;const T=r.a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const C=Symbol("internals");function O(e){return e&&String(e).trim().toLowerCase()}function U(e){return!1===e||null==e?e:r.a.isArray(e)?e.map(U):String(e)}function R(e,t,n,i,o){return r.a.isFunction(i)?i.call(this,t,n):(o&&(t=n),r.a.isString(t)?r.a.isString(i)?-1!==t.indexOf(i):r.a.isRegExp(i)?i.test(t):void 0:void 0)}class L{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function o(e,t,n){const o=O(t);if(!o)throw new Error("header name must be a non-empty string");const s=r.a.findKey(i,o);(!s||void 0===i[s]||!0===n||void 0===n&&!1!==i[s])&&(i[s||t]=U(e))}const s=(e,t)=>r.a.forEach(e,(e,n)=>o(e,n,t));if(r.a.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(r.a.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,i,r;return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),i=e.substring(r+1).trim(),!n||t[n]&&T[n]||("set-cookie"===n?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)})),t})(e),t);else if(r.a.isObject(e)&&r.a.isIterable(e)){let n,i,o={};for(const t of e){if(!r.a.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[i=t[0]]=(n=o[i])?r.a.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}s(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=O(e)){const n=r.a.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}(e);if(r.a.isFunction(t))return t.call(this,e,n);if(r.a.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=O(e)){const n=r.a.findKey(this,e);return!(!n||void 0===this[n]||t&&!R(0,this[n],n,t))}return!1}delete(e,t){const n=this;let i=!1;function o(e){if(e=O(e)){const o=r.a.findKey(n,e);!o||t&&!R(0,n[o],o,t)||(delete n[o],i=!0)}}return r.a.isArray(e)?e.forEach(o):o(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const r=t[n];e&&!R(0,this[r],r,e,!0)||(delete this[r],i=!0)}return i}normalize(e){const t=this,n={};return r.a.forEach(this,(i,o)=>{const s=r.a.findKey(n,o);if(s)return t[s]=U(i),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();a!==o&&delete t[o],t[a]=U(i),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return r.a.forEach(this,(n,i)=>{null!=n&&!1!==n&&(t[i]=e&&r.a.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[C]=this[C]={accessors:{}}).accessors,n=this.prototype;function i(e){const i=O(e);t[i]||(!function(e,t){const n=r.a.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(e,n,r){return this[i].call(this,t,e,n,r)},configurable:!0})})}(n,e),t[i]=!0)}return r.a.isArray(e)?e.forEach(i):i(e),this}}L.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),r.a.reduceDescriptors(L.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),r.a.freezeMethods(L);var x=L;function D(e,t){const n=this||A,i=t||n,o=x.from(i.headers);let s=i.data;return r.a.forEach(e,(function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function N(e){return!(!e||!e.__CANCEL__)}function P(e,t,n){v.a.call(this,null==e?"canceled":e,v.a.ERR_CANCELED,t,n),this.name="CanceledError"}r.a.inherits(P,v.a,{__CANCEL__:!0});var _=P,M=n(12);function V(e,t,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new v.a("Request failed with status code "+n.status,[v.a.ERR_BAD_REQUEST,v.a.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}var j=function(e,t){e=e||10;const n=new Array(e),i=new Array(e);let r,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=i[s];r||(r=c),n[o]=a,i[o]=c;let l=s,d=0;for(;l!==o;)d+=n[l++],l%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-r<t)return;const h=u&&c-u;return h?Math.round(1e3*d/h):void 0}};var q=function(e,t){let n,i,r=0,o=1e3/t;const s=(t,o=Date.now())=>{r=o,n=null,i&&(clearTimeout(i),i=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-r;a>=o?s(e,t):(n=e,i||(i=setTimeout(()=>{i=null,s(n)},o-a)))},()=>n&&s(n)]};const F=(e,t,n=3)=>{let i=0;const r=j(50,250);return q(n=>{const o=n.loaded,s=n.lengthComputable?n.total:void 0,a=o-i,c=r(a);i=o;e({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&o<=s?(s-o)/c:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})},n)},B=(e,t)=>{const n=null!=e;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},H=e=>(...t)=>r.a.asap(()=>e(...t));var z,J,W=S.hasStandardBrowserEnv?(z=new URL(S.origin),J=S.navigator&&/(msie|trident)/i.test(S.navigator.userAgent),e=>(e=new URL(e,S.origin),z.protocol===e.protocol&&z.host===e.host&&(J||z.port===e.port))):()=>!0,Z=S.hasStandardBrowserEnv?{write(e,t,n,i,o,s){const a=[e+"="+encodeURIComponent(t)];r.a.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.a.isString(i)&&a.push("path="+i),r.a.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function G(e,t,n){let i=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(i||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Y=e=>e instanceof x?{...e}:e;function $(e,t){t=t||{};const n={};function i(e,t,n,i){return r.a.isPlainObject(e)&&r.a.isPlainObject(t)?r.a.merge.call({caseless:i},e,t):r.a.isPlainObject(t)?r.a.merge({},t):r.a.isArray(t)?t.slice():t}function o(e,t,n,o){return r.a.isUndefined(t)?r.a.isUndefined(e)?void 0:i(void 0,e,0,o):i(e,t,0,o)}function s(e,t){if(!r.a.isUndefined(t))return i(void 0,t)}function a(e,t){return r.a.isUndefined(t)?r.a.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function c(n,r,o){return o in t?i(n,r):o in e?i(void 0,n):void 0}const u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(e,t,n)=>o(Y(e),Y(t),0,!0)};return r.a.forEach(Object.keys(Object.assign({},e,t)),(function(i){const s=u[i]||o,a=s(e[i],t[i],i);r.a.isUndefined(a)&&s!==c||(n[i]=a)})),n}var K=e=>{const t=$({},e);let n,{data:i,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:a,headers:c,auth:u}=t;if(t.headers=c=x.from(c),t.url=h(G(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),u&&c.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),r.a.isFormData(i))if(S.hasStandardBrowserEnv||S.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if(!1!==(n=c.getContentType())){const[e,...t]=n?n.split(";").map(e=>e.trim()).filter(Boolean):[];c.setContentType([e||"multipart/form-data",...t].join("; "))}if(S.hasStandardBrowserEnv&&(o&&r.a.isFunction(o)&&(o=o(t)),o||!1!==o&&W(t.url))){const e=s&&a&&Z.read(a);e&&c.set(s,e)}return t};var X="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const i=K(e);let o=i.data;const s=x.from(i.headers).normalize();let a,c,u,l,d,{responseType:h,onUploadProgress:f,onDownloadProgress:g}=i;function m(){l&&l(),d&&d(),i.cancelToken&&i.cancelToken.unsubscribe(a),i.signal&&i.signal.removeEventListener("abort",a)}let y=new XMLHttpRequest;function E(){if(!y)return;const i=x.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());V((function(e){t(e),m()}),(function(e){n(e),m()}),{data:h&&"text"!==h&&"json"!==h?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:i,config:e,request:y}),y=null}y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout,"onloadend"in y?y.onloadend=E:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(E)},y.onabort=function(){y&&(n(new v.a("Request aborted",v.a.ECONNABORTED,e,y)),y=null)},y.onerror=function(){n(new v.a("Network Error",v.a.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let t=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const r=i.transitional||p;i.timeoutErrorMessage&&(t=i.timeoutErrorMessage),n(new v.a(t,r.clarifyTimeoutError?v.a.ETIMEDOUT:v.a.ECONNABORTED,e,y)),y=null},void 0===o&&s.setContentType(null),"setRequestHeader"in y&&r.a.forEach(s.toJSON(),(function(e,t){y.setRequestHeader(t,e)})),r.a.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),h&&"json"!==h&&(y.responseType=i.responseType),g&&([u,d]=F(g,!0),y.addEventListener("progress",u)),f&&y.upload&&([c,l]=F(f),y.upload.addEventListener("progress",c),y.upload.addEventListener("loadend",l)),(i.cancelToken||i.signal)&&(a=t=>{y&&(n(!t||t.type?new _(null,e,y):t),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(a),i.signal&&(i.signal.aborted?a():i.signal.addEventListener("abort",a)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(i.url);b&&-1===S.protocols.indexOf(b)?n(new v.a("Unsupported protocol "+b+":",v.a.ERR_BAD_REQUEST,e)):y.send(o||null)}))};var Q=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,i=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;i.abort(t instanceof v.a?t:new _(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,o(new v.a(`timeout ${t} of ms exceeded`,v.a.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:c}=i;return c.unsubscribe=()=>r.a.asap(a),c}};const ee=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let i,r=0;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},te=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},ne=(e,t,n,i)=>{const r=async function*(e,t){for await(const n of te(e))yield*ee(n,t)}(e,t);let o,s=0,a=e=>{o||(o=!0,i&&i(e))};return new ReadableStream({async pull(e){try{const{done:t,value:i}=await r.next();if(t)return a(),void e.close();let o=i.byteLength;if(n){let e=s+=o;n(e)}e.enqueue(new Uint8Array(i))}catch(e){throw a(e),e}},cancel:e=>(a(e),r.return())},{highWaterMark:2})},ie="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,re=ie&&"function"==typeof ReadableStream,oe=ie&&("function"==typeof TextEncoder?(se=new TextEncoder,e=>se.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var se;const ae=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},ce=re&&ae(()=>{let e=!1;const t=new Request(S.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ue=re&&ae(()=>r.a.isReadableStream(new Response("").body)),le={stream:ue&&(e=>e.body)};var de;ie&&(de=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!le[e]&&(le[e]=r.a.isFunction(de[e])?t=>t[e]():(t,n)=>{throw new v.a(`Response type '${e}' is not supported`,v.a.ERR_NOT_SUPPORT,n)})}));const he=async(e,t)=>{const n=r.a.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(r.a.isBlob(e))return e.size;if(r.a.isSpecCompliantForm(e)){const t=new Request(S.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return r.a.isArrayBufferView(e)||r.a.isArrayBuffer(e)?e.byteLength:(r.a.isURLSearchParams(e)&&(e+=""),r.a.isString(e)?(await oe(e)).byteLength:void 0)})(t):n};var fe=ie&&(async e=>{let{url:t,method:n,data:i,signal:o,cancelToken:s,timeout:a,onDownloadProgress:c,onUploadProgress:u,responseType:l,headers:d,withCredentials:h="same-origin",fetchOptions:f}=K(e);l=l?(l+"").toLowerCase():"text";let p,g=Q([o,s&&s.toAbortSignal()],a);const m=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let y;try{if(u&&ce&&"get"!==n&&"head"!==n&&0!==(y=await he(d,i))){let e,n=new Request(t,{method:"POST",body:i,duplex:"half"});if(r.a.isFormData(i)&&(e=n.headers.get("content-type"))&&d.setContentType(e),n.body){const[e,t]=B(y,F(H(u)));i=ne(n.body,65536,e,t)}}r.a.isString(h)||(h=h?"include":"omit");const o="credentials"in Request.prototype;p=new Request(t,{...f,signal:g,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:i,duplex:"half",credentials:o?h:void 0});let s=await fetch(p);const a=ue&&("stream"===l||"response"===l);if(ue&&(c||a&&m)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=s[t]});const t=r.a.toFiniteNumber(s.headers.get("content-length")),[n,i]=c&&B(t,F(H(c),!0))||[];s=new Response(ne(s.body,65536,n,()=>{i&&i(),m&&m()}),e)}l=l||"text";let v=await le[r.a.findKey(le,l)||"text"](s,e);return!a&&m&&m(),await new Promise((t,n)=>{V(t,n,{data:v,headers:x.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:p})})}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new v.a("Network Error",v.a.ERR_NETWORK,e,p),{cause:t.cause||t});throw v.a.from(t,t&&t.code,e,p)}});const ve={http:M.a,xhr:X,fetch:fe};r.a.forEach(ve,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const pe=e=>"- "+e,ge=e=>r.a.isFunction(e)||null===e||!1===e;var me=e=>{e=r.a.isArray(e)?e:[e];const{length:t}=e;let n,i;const o={};for(let r=0;r<t;r++){let t;if(n=e[r],i=n,!ge(n)&&(i=ve[(t=String(n)).toLowerCase()],void 0===i))throw new v.a(`Unknown adapter '${t}'`);if(i)break;o[t||"#"+r]=i}if(!i){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let n=t?e.length>1?"since :\n"+e.map(pe).join("\n"):" "+pe(e[0]):"as no adapter specified";throw new v.a("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return i};function ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new _(null,e)}function Ee(e){ye(e),e.headers=x.from(e.headers),e.data=D.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return me(e.adapter||A.adapter)(e).then((function(t){return ye(e),t.data=D.call(e,e.transformResponse,t),t.headers=x.from(t.headers),t}),(function(t){return N(t)||(ye(e),t&&t.response&&(t.response.data=D.call(e,e.transformResponse,t.response),t.response.headers=x.from(t.response.headers))),Promise.reject(t)}))}const be={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{be[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const we={};be.transitional=function(e,t,n){function i(e,t){return"[Axios v1.9.0] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,o)=>{if(!1===e)throw new v.a(i(r," has been removed"+(t?" in "+t:"")),v.a.ERR_DEPRECATED);return t&&!we[r]&&(we[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,o)}},be.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var Se={assertOptions:function(e,t,n){if("object"!=typeof e)throw new v.a("options must be an object",v.a.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let r=i.length;for(;r-- >0;){const o=i[r],s=t[o];if(s){const t=e[o],n=void 0===t||s(t,o,e);if(!0!==n)throw new v.a("option "+o+" must be "+n,v.a.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new v.a("Unknown option "+o,v.a.ERR_BAD_OPTION)}},validators:be};const ke=Se.validators;class Ie{constructor(e){this.defaults=e||{},this.interceptors={request:new f,response:new f}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=$(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:o}=t;void 0!==n&&Se.assertOptions(n,{silentJSONParsing:ke.transitional(ke.boolean),forcedJSONParsing:ke.transitional(ke.boolean),clarifyTimeoutError:ke.transitional(ke.boolean)},!1),null!=i&&(r.a.isFunction(i)?t.paramsSerializer={serialize:i}:Se.assertOptions(i,{encode:ke.function,serialize:ke.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Se.assertOptions(t,{baseUrl:ke.spelling("baseURL"),withXsrfToken:ke.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&r.a.merge(o.common,o[t.method]);o&&r.a.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=x.concat(s,o);const a=[];let c=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const u=[];let l;this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));let d,h=0;if(!c){const e=[Ee.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,u),d=e.length,l=Promise.resolve(t);h<d;)l=l.then(e[h++],e[h++]);return l}d=a.length;let f=t;for(h=0;h<d;){const e=a[h++],t=a[h++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=Ee.call(this,f)}catch(e){return Promise.reject(e)}for(h=0,d=u.length;h<d;)l=l.then(u[h++],u[h++]);return l}getUri(e){return h(G((e=$(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}r.a.forEach(["delete","get","head","options"],(function(e){Ie.prototype[e]=function(t,n){return this.request($(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.a.forEach(["post","put","patch"],(function(e){function t(t){return function(n,i,r){return this.request($(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Ie.prototype[e]=t(),Ie.prototype[e+"Form"]=t(!0)}));var Ae=Ie;class Te{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const i=new Promise(e=>{n.subscribe(e),t=e}).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e((function(e,i,r){n.reason||(n.reason=new _(e,i,r),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Te((function(t){e=t})),cancel:e}}}var Ce=Te;const Oe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Oe).forEach(([e,t])=>{Oe[t]=e});var Ue=Oe;const Re=function e(t){const n=new Ae(t),i=Object(o.a)(Ae.prototype.request,n);return r.a.extend(i,Ae.prototype,n,{allOwnKeys:!0}),r.a.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return e($(t,n))},i}(A);Re.Axios=Ae,Re.CanceledError=_,Re.CancelToken=Ce,Re.isCancel=N,Re.VERSION="1.9.0",Re.toFormData=s.a,Re.AxiosError=v.a,Re.Cancel=Re.CanceledError,Re.all=function(e){return Promise.all(e)},Re.spread=function(e){return function(t){return e.apply(null,t)}},Re.isAxiosError=function(e){return r.a.isObject(e)&&!0===e.isAxiosError},Re.mergeConfig=$,Re.AxiosHeaders=x,Re.formToJSON=e=>k(r.a.isHTMLForm(e)?new FormData(e):e),Re.getAdapter=me,Re.HttpStatusCode=Ue,Re.default=Re;var Le=Re;const{Axios:xe,AxiosError:De,CanceledError:Ne,isCancel:Pe,CancelToken:_e,VERSION:Me,all:Ve,Cancel:je,isAxiosError:qe,spread:Fe,toFormData:Be,AxiosHeaders:He,HttpStatusCode:ze,formToJSON:Je,getAdapter:We,mergeConfig:Ze}=Le},function(e,t,n){"use strict";n.r(t),n.d(t,"Desktop",(function(){return Ne}));var i=n(0);const r=Object(i.createLogger)("agentx-js-api"),o=(e,t)=>({info:(...n)=>e.info(t,...n),warn:(...n)=>e.warn(t,...n),error:(...n)=>e.error(t,...n)});class s{constructor(e){this.logger=e.logger}check(e){return e?!!e.isInited||(this.logger.error("SERVICE still not initialized... Await it's init(...) first."),!1):(this.logger.error("SERVICE is not defined..."),!1)}}const a=e=>new s(e);var c=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};const u={rps:120,tag:"jsapi"},l={rps:0,tag:"jsapi"},d={tag:"jsapi"},h=e=>e.actionsChannels.createSource("fireGeneralSilentNotification/Req",u),f=e=>e.actionsChannels.createSource("fireGeneralAutoDismissNotification/Req",l),v=e=>e.actionsChannels.createDestination("fireGeneralAutoDismissNotification/Res",l),p=e=>e.actionsChannels.createSource("fireGeneralAcknowledgeNotification/Req",l),g=e=>e.actionsChannels.createDestination("fireGeneralAcknowledgeNotification/Res",l),m=e=>e.actionsChannels.createSource("addCustomTask",u),y=e=>e.actionsChannels.createSource("getToken/Req",l),E=e=>e.actionsChannels.createDestination("getToken/Res",d),b=e=>e.actionsChannels.createSource("getTaskMap/Req",l),w=e=>e.actionsChannels.createDestination("getTaskMap/Res",d),S=e=>e.actionsChannels.createSource("getMediaTypeQueue/Req",l),k=e=>e.actionsChannels.createDestination("getMediaTypeQueue/Res",d),I=e=>e.actionsChannels.createSource("getIdleCodes/Req",l),A=e=>e.actionsChannels.createDestination("getIdleCodes/Res",d),T=e=>e.actionsChannels.createSource("getWrapUpCodes/Req",l),C=e=>e.actionsChannels.createDestination("getWrapUpCodes/Res",d);class O{checkService(){return this.serviceChecker.check(this.SERVICE)}getNextReqId(){const e=Date.now();return this.lastReqTs!==e?(this.lastReqTs=e,this.lastReqN=0):this.lastReqN++,`${this.lastReqTs}_${this.lastReqN}`}constructor(e){this.lastReqTs=Date.now(),this.lastReqN=0,this.toggleMiximizeRestore=e=>{var t;if(e&&e.target){const n=null===(t=this.getClosestElement(e.target,".dynamic-widget-wrapper"))||void 0===t?void 0:t.id;if(n){const e=new CustomEvent("toggle-maximize-restore",{detail:{widgetId:n}});window.dispatchEvent(e),r.info("Dispatching toggle-maximize-restore event for widgetId:",n)}}},this.toggleVoiceInteractionPanel=()=>{window.dispatchEvent(new CustomEvent("toggle-voice-interaction-panel")),r.info("Dispatching toggl-voice-interaction-panel")},this.toggleMuteUnmuteWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-mute-unmute",{});window.dispatchEvent(e),r.info("Dispatching ax-web-call-mute-unmute event")},this.declineWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-decline",{});window.dispatchEvent(e),r.info("Dispatching ax-web-call-decline event")},this.acceptWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-answer",{});window.dispatchEvent(e),r.info("Dispatching ax-web-call-answer event")},this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.sourceActionsChannels={fireGeneralSilentNotification:h(this.SERVICE),fireGeneralAutoDismissNotification:f(this.SERVICE),fireGeneralAcknowledgeNotification:p(this.SERVICE),addCustomTask:m(this.SERVICE),getToken:y(this.SERVICE),getTaskMap:b(this.SERVICE),getMediaTypeQueue:S(this.SERVICE),getIdleCodes:I(this.SERVICE),getWrapUpCodes:T(this.SERVICE)},this.destinationActionsChannels={fireGeneralAutoDismissNotification:v(this.SERVICE),fireGeneralAcknowledgeNotification:g(this.SERVICE),getToken:E(this.SERVICE),getTaskMap:w(this.SERVICE),getMediaTypeQueue:k(this.SERVICE),getIdleCodes:A(this.SERVICE),getWrapUpCodes:C(this.SERVICE)},this.logger.info("Inited"))}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}fireGeneralSilentNotification(...e){this.checkService()&&this.sourceActionsChannels.fireGeneralSilentNotification.send(...e)}fireGeneralAutoDismissNotification(...e){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(t=>{const n=this.getNextReqId(),r=({args:[e,o,s,a]})=>{a===n&&(s!==i.Notifications.ItemMeta.Mode.AutoDismiss&&s!==i.Notifications.ItemMeta.Mode.Silent||e===i.Notifications.ItemMeta.Status.Deactivated&&(t([e,o,s]),this.destinationActionsChannels.fireGeneralAutoDismissNotification.removeListener(r)))};this.destinationActionsChannels.fireGeneralAutoDismissNotification.addListener(r),this.sourceActionsChannels.fireGeneralAutoDismissNotification.send(...e)})}))}fireGeneralAcknowledgeNotification(...e){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(t=>{const n=this.getNextReqId(),r=({args:[e,o,s,a]})=>{a===n&&(s!==i.Notifications.ItemMeta.Mode.Acknowledge&&s!==i.Notifications.ItemMeta.Mode.Silent||e===i.Notifications.ItemMeta.Status.Deactivated&&(t([e,o,s]),this.destinationActionsChannels.fireGeneralAcknowledgeNotification.removeListener(r)))};this.destinationActionsChannels.fireGeneralAcknowledgeNotification.addListener(r),this.sourceActionsChannels.fireGeneralAcknowledgeNotification.send(...e)})}))}addCustomTask(...e){this.checkService()&&this.sourceActionsChannels.addCustomTask.send(...e)}getTaskMap(){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(e=>{const t=this.getNextReqId(),n=({args:[i,r]})=>{r===t&&(e(i),this.destinationActionsChannels.getTaskMap.removeListener(n))};this.destinationActionsChannels.getTaskMap.addListener(n),this.sourceActionsChannels.getTaskMap.send(t)})}))}getMediaTypeQueue(e){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(t=>{const n=this.getNextReqId(),i=({args:[e,r]})=>{r===n&&(t(e),this.destinationActionsChannels.getMediaTypeQueue.removeListener(i))};this.destinationActionsChannels.getMediaTypeQueue.addListener(i),this.sourceActionsChannels.getMediaTypeQueue.send(e,n)})}))}getToken(){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(e=>{const t=this.getNextReqId(),n=({args:[i,r]})=>{r===t&&(e(i),this.destinationActionsChannels.getToken.removeListener(n))};this.destinationActionsChannels.getToken.addListener(n),this.sourceActionsChannels.getToken.send(t)})}))}getIdleCodes(){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(e=>{const t=this.getNextReqId(),n=({args:[i,r]})=>{r===t&&(e(i),this.destinationActionsChannels.getIdleCodes.removeListener(n))};this.destinationActionsChannels.getIdleCodes.addListener(n),this.sourceActionsChannels.getIdleCodes.send(t)})}))}getWrapUpCodes(){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(e=>{const t=this.getNextReqId(),n=({args:[i,r]})=>{r===t&&(e(i),this.destinationActionsChannels.getWrapUpCodes.removeListener(n))};this.destinationActionsChannels.getWrapUpCodes.addListener(n),this.sourceActionsChannels.getWrapUpCodes.send(t)})}))}getClosestElement(e,t){return e&&e!==document&&e!==window?e instanceof ShadowRoot?this.getClosestElement(e.host,t):e instanceof HTMLElement&&e.matches(t)?e:this.getClosestElement(e.parentNode,t):null}}const U=o(r,"[Actions JSAPI] =>");class R{constructor(e){this.isInited=!1,this.listeners=new Map,this.listenersOnce=new Map,this.logger=e.logger}init(e){this.aqmServiceEntity=e.aqmServiceEntity,this.aqmServiceEntityString=e.aqmServiceEntityString,this.isInited=!0}cleanup(){this.removeAllEventListeners(),this.aqmServiceEntity=void 0,this.aqmServiceEntityString=void 0,this.isInited=!1}_addEventListener(e,t,n){var i,r,o;const s=n?"listenersOnce":"listeners";this[s].has(e)||this[s].set(e,new Map);const a=this[s].get(e),c=n?"listenOnce":"listen",u=i=>{let r=null;return n&&(r=this.aqmServiceEntity[e].listenOnce(()=>this.removeOnceEventListener(e,t))),()=>{var t;if(i){n?(i.stopListenOnce(),r&&r.stopListenOnce()):i.stopListen();const o=[];o.push(`UnBound "${e.toString()}"`),n&&o.push("Once"),this.aqmServiceEntityString&&o.push(`from "${this.aqmServiceEntityString}"`),null===(t=this.logger)||void 0===t||t.info(o.join(" "))}}};if(this.aqmServiceEntity)if(e in this.aqmServiceEntity&&c in this.aqmServiceEntity[e]){const r=this.aqmServiceEntity[e][c](t);a.set(t,u(r));const o=[];o.push(`Bound "${e.toString()}"`),n&&o.push("Once"),this.aqmServiceEntityString&&o.push(`to "${this.aqmServiceEntityString}"`),null===(i=this.logger)||void 0===i||i.info(o.join(" "))}else null===(r=this.logger)||void 0===r||r.warn(`EventName "${e.toString()}" is not recognized, so won't be subscribed...`);else null===(o=this.logger)||void 0===o||o.error(`"${this.aqmServiceEntityString}" is not ready yet. .init(...) first...`)}_removeEventListener(e,t,n){const i=n?"listenersOnce":"listeners";if(this[i].has(e)){const n=this[i].get(e);if(n){if(n.has(t)){n.get(t)(),n.delete(t)}n.size<1&&this[i].delete(e)}}}addEventListener(e,t){this._addEventListener(e,t,!1)}addOnceEventListener(e,t){this._addEventListener(e,t,!0)}removeEventListener(e,t){this._removeEventListener(e,t,!1)}removeOnceEventListener(e,t){this._removeEventListener(e,t,!0)}removeAllEventListeners(){["listeners","listenersOnce"].forEach(e=>{this[e].forEach((e,t)=>{e.forEach((e,t)=>e()),e.clear()}),this[e].clear()})}}const L=e=>new R(e);var x,D,N,P,_,M,V,j,q;!function(e){e.TELEPHONY="telephony",e.CHAT="chat",e.EMAIL="email",e.SOCIAL="social",e.MIDCALL_TELEPHONY="midcall telephony",e.APPLE_MESSAGES="appleMessages"}(x||(x={})),function(e){e.QUEUE="queue",e.DIAL_NUMBER="dialNumber",e.AGENT="agent",e.EPDN="entrypointDialNumber",e.ENTRY_POINT="entryPoint"}(D||(D={})),function(e){e.IDLE="Idle",e.AVAILABLE="Available",e.RONA="RONA"}(N||(N={})),function(e){e.All="All",e.TELEPHONY="telephony",e.CHAT="chat",e.EMAIL="email",e.SOCIAL="social"}(P||(P={})),function(e){e.SMS="SMS",e.TELEPHONY="Call",e.CHAT="Chat",e.EMAIL="Email",e.MESSENGER="Messenger",e.WHATSAPP="WhatsApp",e.APPLE_BUSINESS_CHAT="Apple Business Chat",e.GOOGLE_BUSINESS_MESSAGES="Google's Business Messages"}(_||(_={})),function(e){e.MIDCALL="midcall",e.ADHOC="adhoc",e.CONTINUOUS="continuous"}(M||(M={})),function(e){e.EMAIL="email",e.CHAT="chat",e.TELEPHONY="telephony",e.SOCIAL="social",e.SMS="sms",e.FACEBOOK="facebook",e.WHATSAPP="whatsapp",e.APPLEMESSAGES="appleMessages",e.GOOGLEMESSAGES="googleMessages"}(V||(V={})),(q=j||(j={})).validateAgentState=e=>Object.values(N).includes(e),q.validateURL=e=>/^[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/.test(e),q.validateChannelName=e=>Object.values(_).includes(e),q.validateDestinationType=e=>Object.values(D).includes(e),q.validateMediaType=e=>Object.values(x).includes(e),q.validateUTCTimeStampNumberFormat=e=>Number.isInteger(e)&&e>=0&&e<=4102444799999,q.validateNumber=e=>Number.isInteger(e)&&e>=0&&e<=2147483647,q.validateBoolean=e=>"boolean"==typeof e||(0===e||1===e)&&q.validatePropValueNotNullAndEmpty(e),q.validateStringToBoolean=e=>{const t=e.toLowerCase();return"true"===t||"false"===t||"0"===t||"1"===t},q.validatePropValueNotNullAndEmpty=e=>null!==e&&""!==e,q.validateChannelType=e=>Object.values(_).includes(e),q.validateMonitorType=e=>Object.values(M).includes(e),q.validateUUID=e=>/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(e),q.validateStringNumberOnly=e=>/^(\+)?\d+$/.test(e),q.validateBuddyAgents=(e,t)=>{i.AssertUtils.check(q.validateUUID(e.agentProfileId),t,"agentProfileId is not a valid UUID"),i.AssertUtils.check(q.validateChannelName(e.channelName),t,"channelName is not a valid channel name"),void 0!==e.state&&i.AssertUtils.check(q.validateAgentState(e.state),t,"state is not a valid state"),void 0!==e.trackingId&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.trackingId),t,"trackingId is not a valid string")},q.validateAuxCodeType=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e),t,"value is null or empty"),i.AssertUtils.check("IDLE_CODE"===e||"WRAP_UP_CODE"===e,t,"value is not IDLE_CODE or WRAP_UP_CODE")},q.validateAuxCodePayload=(e,t)=>{q.validateAuxCodeType(e.workType,t),void 0!==e.page&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.page),t,"page is is null or empty"),void 0!==e.pageSize&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.pageSize),t,"pageSize is is null or empty"),void 0!==e.search&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.search),t,"search is is null or empty"),void 0!==e.customFilter&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.customFilter),t,"customFilter is is null or empty")},q.validateCancelCtq=(e,t)=>{i.AssertUtils.check(q.validateUUID(e.agentId),t,"agentId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(e.queueId),t,"queueId is not a valid UUID")},q.validateWrapupPayload=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.wrapUpReason),t,"wrapUpReason is not a valid string"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.auxCodeId),t,"auxCodeId is not a valid string"),i.AssertUtils.check(q.validateStringToBoolean(e.isAutoWrapup),t,"isAutoWrapup is not a valid boolean value")},q.validateVTeamTransferPayload=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.vteamId),t,"vteamId is not a valid string"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.vteamType),t,"vteamType is not a valid string")},q.validateBlindTransferPayload=(e,t)=>{i.AssertUtils.check(q.validateUUID(e.agentId),t,"agentId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(e.destAgentId),t,"destAgentId is not a valid UUID"),i.AssertUtils.check(q.validateMediaType(e.mediaType),t,"mediaType is not a valid media type"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.destAgentTeamId),t,"destAgentTeamId is not a valid string"),i.AssertUtils.check(q.validateStringNumberOnly(e.destAgentDN),t,"destAgentDN is not a numbers only string"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.destSiteId),t,"destSiteId is not a valid string")},q.validateConsultPayload=(e,t)=>{i.AssertUtils.check(q.validateUUID(e.agentId),t,"agentId is not a valid UUID"),void 0!==e.destAgentId&&i.AssertUtils.check(q.validateUUID(e.destAgentId),t,"destAgentId is not a valid UUID"),void 0!==e.mediaType&&i.AssertUtils.check(q.validateMediaType(e.mediaType),t,"mediaType is not a valid media type"),void 0!==e.holdParticipants&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.holdParticipants),t,"holdParticipants is not valid")},q.validateConsultTransferPayLoad=(e,t)=>{void 0!==e.agentId&&i.AssertUtils.check(q.validateUUID(e.agentId),t,"agentId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(e.destAgentId),t,"destagentId is not a valid UUID"),i.AssertUtils.check(q.validateMediaType(e.mediaType),t,"mediaType is not a valid media type"),i.AssertUtils.check(q.validateUUID(e.mediaResourceId),t,"mediaResourceId is not a valid UUID"),i.AssertUtils.check(q.validateDestinationType(e.destinationType),t,"destinationType is not a valid destination type")},q.validateWrapUpV2Payload=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.wrapUpReason),t,"wrapUpReason is not a valid string"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.auxCodeId),t,"auxCodeId is not a valid string")},q.validateChangeAgentStateType=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.state),t,"state is null or empty"),i.AssertUtils.check("available"===e.state.toLowerCase()||"idle"===e.state.toLowerCase(),t,"state is not Available or Idle"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.auxCodeId),t,"auxCodeId is null or empty"),i.AssertUtils.check(q.validateUUID(e.agentId),t,"agentId is not a valid UUID")},q.validateConsultDataV2Payload=(e,t)=>{void 0!==e.to&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.to),t,"to is not a valid string or not undefined"),i.AssertUtils.check(q.validateDestinationType(e.destinationType),t,"destinationType is not a valid destination type"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.holdParticipants),t,"holdParticipants is not valid")},q.validateConsultConferenceDataV2Payload=(e,t)=>{void 0!==e.agentId&&i.AssertUtils.check(q.validateUUID(e.agentId),t,"agentId is not a valid UUID"),void 0!==e.to&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.to),t,"to is not a valid string or not undefined"),i.AssertUtils.check(q.validateDestinationType(e.destinationType),t,"destinationType is not a valid destination type")},q.validateTransferV2Payload=(e,t)=>{void 0!==e.to&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.to),t,"to is not a valid string or not undefined"),i.AssertUtils.check(q.validateDestinationType(e.destinationType),t,"destinationType is not a valid destination type")},q.validateBuddyAgentsV2Payload=(e,t)=>{i.AssertUtils.check(q.validateUUID(e.agentProfileId),t,"agentProfileId is not a valid UUID"),i.AssertUtils.check(q.validateMediaType(e.mediaType),t,"mediaType is not a valid media type"),i.AssertUtils.check(q.validateAgentState(e.state),t,"state is not a valid state")},q.validateVTeam=(e,t)=>{i.AssertUtils.check(q.validateUUID(e.agentProfileId),t,"agentProfileId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(e.agentSessionId),t,"agentSessionId is not a valid UUID"),i.AssertUtils.check(q.validateChannelType(e.channelType),t,"channelType is not a valid channel type"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.type),t,"type is not a valid string"),void 0!==e.trackingId&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.trackingId),t,"trackingId is not a valid string")},q.validateDialerTasks=(e,t)=>{e.id&&i.AssertUtils.check(q.validateUUID(e.id),t,"id is not a valid UUID"),i.AssertUtils.check(q.validateUUID(e.entryPointId),t,"entryPointId is not a valid UUID"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.destination),t,"destination is null or empty"),i.AssertUtils.check(q.validateUUID(e.direction),t,"direction is not a valid UUID"),e.origin&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.origin),t,"origin is null or empty"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.attributes.key),t,"attributes.key is null or empty"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.attributes.value),t,"attributes.value is null or empty"),i.AssertUtils.check(q.validateMediaType(e.mediaType),t,"mediaType is not a valid media type"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.outboundType),t,"outboundType is null or empty")},q.validatePreviewCampaignPayload=(e,t)=>{i.AssertUtils.check(q.validateUUID(e.interactionId),t,"interactionId is not a valid UUID"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.campaignId),t,"campaignId is null or empty")},q.validateMonitoringRequest=(e,t)=>{i.AssertUtils.check(q.validateUUID(e.id),t,"id is not a valid UUID"),i.AssertUtils.check(q.validateMonitorType(e.monitorType),t,"monitorType is not a valid monitor type"),void 0!==e.queueIds&&e.queueIds.forEach(e=>{i.AssertUtils.check(q.validateUUID(e),t,"queueIds is not a valid UUID")}),void 0!==e.teams&&e.teams.forEach(e=>{i.AssertUtils.check(q.validateUUID(e),t,"team is not a valid UUID")}),void 0!==e.sites&&e.sites.forEach(e=>{i.AssertUtils.check(q.validateUUID(e),t,"site is not a valid UUID")}),void 0!==e.agents&&e.agents.forEach(e=>{i.AssertUtils.check(q.validateUUID(e),t,"agent is not a valid UUID")}),void 0!==e.startUTCTimestamp&&i.AssertUtils.check(q.validateUTCTimeStampNumberFormat(e.startUTCTimestamp),t,"startUTCTimestamp is not a valid timestamp"),void 0!==e.continuousDuration&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.continuousDuration),t,"continuousDuration is not a valid string or not undefined"),void 0!==e.taskId&&i.AssertUtils.check(q.validateUUID(e.taskId),t,"taskId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(e.trackingId),t,"trackingId is not a valid UUID"),e.invisibleMode&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.invisibleMode),t,"invisibleMode is not a valid string or not undefined")},q.validateMultiConsultPayload=(e,t)=>{Object.entries(e).forEach(([e,n])=>{switch(e){case"agentId":i.AssertUtils.check(q.validateUUID(String(n)),t,"agentId is not a valid UUID");break;case"destAgentId":i.AssertUtils.check(q.validateUUID(String(n)),t,"destAgentId is not a valid UUID");break;case"mediaType":i.AssertUtils.check(q.validateMediaType(n),t,"mediaType is not a valid media type");break;case"holdParticipants":i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(n),t,"holdParticipants is not valid");break;case"destAgentDN":i.AssertUtils.check(q.validateStringNumberOnly(String(n)),t,"destAgentDN is not a numbers only string");break;case"destinationType":i.AssertUtils.check(q.validateDestinationType(n),t,"destinationType is not a valid destination type");break;case"destAgentTeamId":i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(String(n)),t,"destAgentTeamId is not a valid string");break;case"destSiteId":i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(String(n)),t,"destSiteId is not a valid string");break;case"queueId":i.AssertUtils.check(q.validateUUID(String(n)),t,"queueId is not a valid UUID");break;case"trackingId":i.AssertUtils.check(q.validateUUID(String(n)),t,"trackingId is not a valid string")}})};var F=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class B{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.contact,aqmServiceEntityString:"SERVICE.aqm.contact"}),this.logger.info("Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}sendDtmf(e){this.checkService()&&this.SERVICE.webCalling.sendDTMF(e)}accept(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"accept","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.accept(e)}))}consultAccept(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultAccept","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultAccept(e)}))}buddyAgents(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return j.validateBuddyAgents(e.data,"buddyAgents"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.buddyAgents(e)}))}end(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"end","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.end(e)}))}consultEnd(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultEnd","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(e.isConsult),"consultEnd","isConsult is not a valid boolean value"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultEnd(e)}))}cancelCtq(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"cancelCtq","interactionId is not a valid UUID"),j.validateCancelCtq(e.data,"cancelCtq"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.cancelCtq(e)}))}wrapup(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"cancelCtq","interactionId is not a valid UUID"),j.validateWrapupPayload(e.data,"wrapup"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.wrapup(e)}))}vteamTransfer(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"cancelCtq","interactionId is not a valid UUID"),j.validateVTeamTransferPayload(e.data,"vteamTransfer"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.vteamTransfer(e)}))}blindTransfer(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"blindTransfer","interactionId is not a valid UUID"),j.validateBlindTransferPayload(e.data,"blindTransfer"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.blindTransfer(e)}))}hold(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"hold","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(e.data.mediaResourceId),"hold","mediaResourceId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.hold(e)}))}unHold(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"unHold","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(e.data.mediaResourceId),"unHold","mediaResourceId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.unHold(e)}))}consult(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consult","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateURL(e.url),"consult","url is not a valid URL"),j.validateMultiConsultPayload(e.data,"consult"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consult(e)}))}consultConference(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultConference","interactionId is not a valid UUID"),j.validateConsultPayload(e.data,"consultConference"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultConference(e)}))}decline(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"decline","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(e.data.mediaResourceId),"decline","mediaResourceId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(e.isConsult),"decline","isConsult is not a valid boolean value"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.decline(e)}))}consultTransfer(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"decline","interactionId is not a valid UUID"),j.validateConsultTransferPayLoad(e.data,"consultTransfer"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultTransfer(e)}))}vteamList(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return j.validateVTeam(e.data,"vteamList"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.vteamList(e)}))}pauseRecording(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"pauseRecording","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.pauseRecording(e)}))}resumeRecording(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"resumeRecording","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(e.data.autoResumed),"resumeRecording","autoResumed is not a valid boolean value"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.resumeRecording(e)}))}acceptV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"acceptV2","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.acceptV2(e)}))}endV2(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endV2","interactionId is not a valid UUID"),e.isEndingFromNonPrimary&&i.AssertUtils.check(j.validateBoolean(e.isEndingFromNonPrimary),"endV2","isEndingFromNonPrimary is not a valid boolean value"),(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.endV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.endV2(e):void 0}))}cancelTaskV2(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"cancelTaskV2","interactionId is not a valid UUID"),(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.cancelTaskV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.cancelTaskV2(e):void 0}))}pauseRecordingV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"pauseRecordingV2","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.pauseRecordingV2(e)}))}resumeRecordingV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"resumeRecordingV2","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(e.data.autoResumed),"resumeRecordingV2","autoResumed is not a valid boolean value"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.resumeRecordingV2(e)}))}wrapupV2(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"wrapupV2","interactionId is not a valid UUID"),j.validateWrapUpV2Payload(e.data,"wrapupV2"),(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.wrapupV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.wrapupV2(e):void 0}))}consultV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultV2","interactionId is not a valid UUID"),j.validateConsultDataV2Payload(e.data,"consultV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultV2(e)}))}consultEndV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultEndV2","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(e.isConsult),"consultEndV2","isConsult is not a valid boolean value"),e.isSecondaryEpDnAgent&&i.AssertUtils.check(j.validateBoolean(e.isSecondaryEpDnAgent),"consultEndV2","isSecondaryEpDnAgent is not a valid boolean value"),e.queueId&&i.AssertUtils.check(j.validateUUID(e.queueId),"consultEndV2","queueId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultEndV2(e)}))}consultConferenceV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultConferenceV2","interactionId is not a valid UUID"),j.validateConsultConferenceDataV2Payload(e.data,"consultConferenceV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultConferenceV2(e)}))}exitConference(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"exitConference","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.exitConference(e)}))}consultTransferV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultTransferV2","interactionId is not a valid UUID"),j.validateTransferV2Payload(e.data,"consultTransferV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultTransferV2(e)}))}blindTransferV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"blindTransferV2","interactionId is not a valid UUID"),j.validateTransferV2Payload(e.data,"blindTransferV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.blindTransferV2(e)}))}vteamTransferV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"vteamTransferV2","interactionId is not a valid UUID"),j.validateTransferV2Payload(e.data,"vteamTransferV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.vteamTransferV2(e)}))}buddyAgentsV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return j.validateBuddyAgentsV2Payload(e.data,"buddyAgentsV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.buddyAgentsV2(e)}))}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const H=o(r,"[AgentContact JSAPI] =>"),z=o(H,"[AqmServiceEvents: Contact] => ");var J=n(8),W=n.n(J),Z=n(15),G=n.n(Z),Y=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};const $={agentName:void 0,agentProfileID:void 0,agentSessionId:void 0,idleCode:void 0,teamId:void 0,teamName:void 0,dn:void 0,status:void 0,subStatus:void 0,idleCodes:void 0,wrapupCodes:void 0,outDialRegex:void 0,isOutboundEnabledForTenant:void 0,isOutboundEnabledForAgent:void 0,isEndCallEnabled:void 0,isEndConsultEnabled:void 0,allowConsultToQueue:void 0,isAdhocDialingEnabled:void 0,isAgentAvailableAfterOutdial:void 0,isCampaignManagementEnabled:void 0,agentPersonalStatsEnabled:void 0};class K{checkService(){return this.serviceChecker.check(this.SERVICE)}emit(e,...t){this.emitter.emit(e,...t)}update(e){const t=Object.keys(e).reduce((t,n)=>{const i=e[n],r=this.latestData[n];return JSON.stringify(i)!==JSON.stringify(r)&&t.push({name:n,value:i,oldValue:r}),t},[]);t.length&&(t.forEach(e=>this.latestData[e.name]=e.value),this.emit("updated",t))}static getOutdialRegex(e){if(e&&e.dialPlanEntity){const t=e.dialPlanEntity.find(e=>"Any Format"===e.name);if(t)return t.regex}return""}constructor(e){this.emitter=W()(),this.listeners=new Set,this.teams=[],this.idleCodes={},this.latestData=Object.assign({},$),this.logger=e.logger,this.serviceChecker=e.serviceChecker}static findTeamName(e,t){const n=e.find(e=>e.teamId===t);return(null==n?void 0:n.teamName)||""}init(e){return Y(this,void 0,void 0,(function*(){e&&(this.SERVICE=e),this.checkService()&&(yield this.fetchLatestData(),this.subscribeSelfDataEvents(),this.logger.info("Inited"))}))}cleanup(){this.unsubscribeSelfDataEvents(),this.removeAllEventListeners(),this.SERVICE=void 0,this.update(Object.assign({},$)),this.logger.info("Cleaned")}fetchLatestData(){var e,t,n,i,r,o;return Y(this,void 0,void 0,(function*(){const s=(null===(e=this.SERVICE)||void 0===e?void 0:e.conf.profile)?null===(t=this.SERVICE)||void 0===t?void 0:t.conf.profile:yield null===(n=this.SERVICE)||void 0===n?void 0:n.conf.fetchProfile();if(s){const{teams:e,agentName:t,agentProfileID:n,defaultDn:a,agentSubStatus:c,agentStatus:u,idleCodes:l,wrapupCodes:d,dialPlan:h,isOutboundEnabledForTenant:f,isOutboundEnabledForAgent:v,isAdhocDialingEnabled:p,isEndCallEnabled:g,isEndConsultEnabled:m,allowConsultToQueue:y,isAgentAvailableAfterOutdial:E,isCampaignManagementEnabled:b,agentPersonalStatsEnabled:w}=s;let{idleCode:S}=s;const k=a;let I=u,A=c;this.teams=e,null==l||l.forEach(e=>{this.idleCodes[e.id]={id:e.id,name:e.name}});const T=yield null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.agent.reload();(null==T?void 0:T.data)&&(S="0"!=T.data.auxCodeId&&T.data.auxCodeId?this.idleCodes[T.data.auxCodeId]:void 0,I=null===(r=null==T?void 0:T.data)||void 0===r?void 0:r.status,A=null===(o=null==T?void 0:T.data)||void 0===o?void 0:o.subStatus);const C=K.getOutdialRegex(h);this.update({agentName:t,agentProfileID:n,dn:k,status:I,subStatus:A,idleCode:S,idleCodes:l,wrapupCodes:d,outDialRegex:C,isOutboundEnabledForTenant:f,isOutboundEnabledForAgent:v,isAdhocDialingEnabled:p,isEndCallEnabled:g,isEndConsultEnabled:m,allowConsultToQueue:y,isAgentAvailableAfterOutdial:E,isCampaignManagementEnabled:b,agentPersonalStatsEnabled:w})}}))}subscribeSelfDataEvents(){var e,t,n,i;if(this.checkService()){{const t=null===(e=this.SERVICE)||void 0===e?void 0:e.aqm.agent.eAgentReloginSuccess.listen(({data:{agentSessionId:e="",teamId:t="",dn:n="",status:i="",subStatus:r="",auxCodeId:o=""}})=>{const s=K.findTeamName(this.teams,t);this.update({agentSessionId:e,teamId:t,teamName:s,dn:n,status:i,subStatus:r,idleCode:this.idleCodes[o]})});this.listeners.add(()=>null==t?void 0:t.stopListen())}{const e=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent.eAgentStationLoginSuccess.listen(({data:{agentSessionId:e="",teamId:t="",status:n="",subStatus:i="",auxCodeId:r=""}})=>{const o=K.findTeamName(this.teams,t);this.update({agentSessionId:e,teamId:t,teamName:o,status:n,subStatus:i,idleCode:this.idleCodes[r]})});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.agent.eAgentStateChangeSuccess.listen(({data:{agentSessionId:e="",status:t="",subStatus:n="",auxCodeId:i=""}})=>{var r;const o=this.idleCodes?null===(r=this.idleCodes[i])||void 0===r?void 0:r.name:"";this.update({agentSessionId:e,status:t,subStatus:n,idleCode:{id:i,name:o}})});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.agent.eAgentDNRegistered.listen(({data:{dn:e=""}})=>{this.update({dn:e})});this.listeners.add(()=>null==e?void 0:e.stopListen())}}}unsubscribeSelfDataEvents(){this.listeners.forEach(e=>e()),this.listeners.clear()}stateChange(e){var t,n,r;return Y(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.state),"stateChange","state is null or empty"),i.AssertUtils.check("available"===(null===(t=e.state)||void 0===t?void 0:t.toLowerCase())||"idle"===(null===(n=e.state)||void 0===n?void 0:n.toLowerCase()),"stateChange","state is not Available or Idle"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.auxCodeIdArray),"stateChange","auxCodeIdArray is null or empty"),null===(r=this.SERVICE)||void 0===r?void 0:r.aqm.agent.stateChange({data:e})}))}mockOutdialAniList(){var e,t;return Y(this,void 0,void 0,(function*(){if(this.checkService())return(null===(e=this.SERVICE)||void 0===e?void 0:e.aqm.agent.mockOutdialAniList)&&(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent.mockOutdialAniList())}))}fetchAddressBooks(){var e,t;return Y(this,void 0,void 0,(function*(){if(this.checkService())return(null===(e=this.SERVICE)||void 0===e?void 0:e.aqm.agent.fetchAddressBooks)&&(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent.fetchAddressBooks())}))}changeAgentState(e,t){var n;return Y(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e),"changeAgentState","orgId is not a valid UUID"),j.validateChangeAgentStateType(t,"changeAgentState"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.supervisor.changeAgentState({orgId:e,data:t})}))}fetchAgentIdleCodes(e,t){var n;return Y(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e),"fetchAgentIdleCodes","orgId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(t),"fetchAgentIdleCodes","agentId is not a valid UUID"),yield null===(n=this.SERVICE)||void 0===n?void 0:n.abs.fetchAgentIdleCodes({orgId:e,agentId:t})}))}fetchOrganizationIdleCodes(e){var t;return Y(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e),"fetchOrganizationIdleCodes","orgId is not a valid UUID"),yield null===(t=this.SERVICE)||void 0===t?void 0:t.abs.fetchIdleCodes({orgId:e,accessType:"ALL"})}))}addEventListener(e,t){this.checkService()&&this.emitter.on(e,t)}removeEventListener(e,t){this.checkService()&&this.emitter.off(e,t)}removeAllEventListeners(){G()(this.emitter)}}const X=o(r,"[AgentInfo JSAPI] =>");var Q=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class ee{waitUntil(e){return Q(this,void 0,void 0,(function*(){if("function"==typeof e){yield new Promise(e=>setTimeout(e,1e3/30));!e()&&(yield this.waitUntil(e))}}))}constructor(e){this.initEventType={},this.emitter=W()(),this.logger=e.logger,this.agentxSERVICE=e.SERVICE}checkService(e){return Q(this,void 0,void 0,(function*(){e?(e.isInited||(this.logger.warn("SERVICE is not inited. Awaiting it's initAgentxServices(...)..."),yield this.waitUntil(()=>e.isInited)),this.logger.info("SERVICE is inited. Continuing..."),this.emit("inited")):this.logger.error("SERVICE is not defiend...")}))}emit(e,...t){this.emitter.emit(e,...t)}init(e){return Q(this,void 0,void 0,(function*(){this.agentxSERVICE?yield this.checkService(this.agentxSERVICE):this.logger.error("SERVICE is not defined..."),this.initEventType.widgetName=e.widgetName,this.initEventType.widgetProvider=e.widgetProvider,this.publishEvent("agentx-js-sdk-init")}))}registerCrmConnector(e){if(window.self!==window.top){this.initEventType.crmPlatform=e.crmPlatform,this.initEventType.crmConnectorProvider=e.crmConnectorProvider||"Cisco",r.info(`CRm Connector registered through JS SDK... [crmPlatform: ${this.initEventType.crmPlatform}, widgetProvider: ${this.initEventType.crmConnectorProvider}] `);const t=document.referrer;r.info("This Desktop is loaded inside an iframe.",t),this.publishEvent("agentx-js-sdk-register-crm-connector")}else r.warn("This Desktop is not loaded inside an iframe. CRM Connector is not registered.")}publishEvent(e){const{crmPlatform:t,crmConnectorProvider:n,widgetName:i,widgetProvider:o}=this.initEventType,s=Object.assign({},...Object.entries(this.initEventType).map(([e,t])=>t?{[e]:t}:{}));this.logger.info("initEvent",s),r.info(`Publishing js sdk init ${e} event : [widgetName: ${i}, widgetProvider: ${o}, crmPlatform: ${t}, crmConnectorProvider: ${n}]`),this.agentxSERVICE&&this.agentxSERVICE.isInited&&this.agentxSERVICE.webexMetrics&&(r.info(`tracking behavioral for ${e} event `),this.agentxSERVICE.webexMetrics.trackBehavioralEvent(e,Object.assign({},s)))}cleanup(){this.agentxSERVICE=void 0,this.emit("cleaned"),this.logger.info("Cleaned")}get clientLocale(){return null!=window.navigator.languages?window.navigator.languages[0]:window.navigator.language}addEventListener(e,t){this.emitter.on(e,t)}removeEventListener(e,t){this.emitter.off(e,t)}}const te=o(r,"[Config JSAPI] =>");var ne=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class ie{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.dialer,aqmServiceEntityString:"SERVICE.aqm.dialer"}),this.logger.info("Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}startOutdial(e){var t;return ne(this,void 0,void 0,(function*(){if(this.checkService())return j.validateDialerTasks(e.data,"startOutdial"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.startOutdial(e)}))}previewCampaignAccept(e){var t;return ne(this,void 0,void 0,(function*(){if(this.checkService())return j.validatePreviewCampaignPayload(e.data,"previewCampaignAccept"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.acceptPreviewContact(e)}))}previewCampaignSkip(e){var t;return ne(this,void 0,void 0,(function*(){if(this.checkService())return j.validatePreviewCampaignPayload(e.data,"previewCampaignSkip"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.skipPreviewContact(e)}))}removePreviewContact(e){var t;return ne(this,void 0,void 0,(function*(){if(this.checkService())return j.validatePreviewCampaignPayload(e.data,"removePreviewContact"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.removePreviewContact(e)}))}updateCadVariables(e){var t;return ne(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"updateCadVariables","interactionId is not valid UUID"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.data.attributes.key),"updateCadVariables","attributes.key is not valid"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.data.attributes.value),"updateCadVariables","attributes.value is not valid"),e.secureCad&&e.secureCad.forEach(e=>{i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e),"updateCadVariables","secureCad is not valid")}),e.keyId&&i.AssertUtils.check(j.validateUUID(e.keyId),"updateCadVariables","keyId is not valid UUID"),e.keyVersion&&i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.keyVersion),"updateCadVariables","keyVersion is not valid"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.updateCadVariables(e)}))}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const re=o(r,"[Dialer JSAPI] =>"),oe=o(re,"[AqmServiceEvents: Dialer] =>");class se{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("Inited")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}createInstance(e){return i.I18N.createService(e)}createMixin(e){return i.I18N.createMixin(e)}get DEFAULT_INIT_OPTIONS(){var e;if(this.checkService())return null===(e=this.SERVICE)||void 0===e?void 0:e.i18n.DEFAULT_INIT_OPTIONS}getMergedInitOptions(...e){return i.I18N.mergeServiceInitOptions(...e)}}const ae=o(r,"[I18N JSAPI] =>");class ce{constructor(e){this.clientLoggers=new Map,this.logger=e.logger}createLogger(e){const t=Object(i.createLogger)(e);return this.clientLoggers.set(e,t),this.logger.info(`Client logger created: "${e}"`),t}cleanupLogs(e){this.clientLoggers.has(e)&&i.Logger.POOL.cleanupPrefixedLogs(e)}browserDownloadLogsJson(e){this.clientLoggers.has(e)&&i.Logger.POOL.browserDownloadPrefixedLogsJson(e)}browserDownloadLogsText(e){this.clientLoggers.has(e)&&i.Logger.POOL.browserDownloadPrefixedLogsText(e)}getLogsCollection(e){if(this.clientLoggers.has(e))return i.Logger.POOL.getPrefixedLogsCollection(e)}getLogsJsonUrl(e){if(this.clientLoggers.has(e))return i.Logger.POOL.getPrefixedLogsJsonUrl(e)}getLogsTextUrl(e){if(this.clientLoggers.has(e))return i.Logger.POOL.getPrefixedLogsTextUrl(e)}}const ue=o(r,"[Logger JSAPI] =>");class le{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.screenpop,aqmServiceEntityString:"SERVICE.aqm.screenpop"}),this.logger.info("Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const de=o(r,"[ScreenPop JSAPI] =>"),he=o(de,"[AqmServiceEvents: ScreenPop] =>");class fe{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("Inited")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}listenKeyPress(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.event.listenKeyPress(...e))}listenKeyConflict(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.event.listenKeyConflict(...e))}listenConflictResolved(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.event.listenConflictResolved(...e))}register(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.register(...e))}unregisterKeys(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.unregisterKeys(...e))}getRegisteredKeys(){var e;if(this.checkService())return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.getRegisteredKeys()}get DEFAULT_SHORTCUT_KEYS(){var e;return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.DEFAULT_SHORTCUT_KEYS}get MODIFIERS(){var e;return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.MODIFIERS}get REGISTERED_KEYS(){var e;return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.REGISTERED_KEYS}}const ve=o(r,"[ShortcutKey JSAPI] =>");var pe=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class ge{waitUntil(e){return pe(this,void 0,void 0,(function*(){if("function"==typeof e){yield new Promise(e=>setTimeout(e,1e3/30));!e()&&(yield this.waitUntil(e))}}))}checkService(){var e,t,n,i,r;return pe(this,void 0,void 0,(function*(){window.wxcc&&(null===(e=window.wxcc)||void 0===e?void 0:e.rtdwc)?((null===(n=null===(t=window.wxcc)||void 0===t?void 0:t.rtdwc)||void 0===n?void 0:n.error)&&(this.logger.error("RTDWC initialization failed. Awaiting Websocket connection to establish",null===(r=null===(i=window.wxcc)||void 0===i?void 0:i.rtdwc)||void 0===r?void 0:r.error),yield this.waitUntil(()=>{var e,t;return!(null===(t=null===(e=window.wxcc)||void 0===e?void 0:e.rtdwc)||void 0===t?void 0:t.error)})),this.logger.info("Websocket connection established successfully. Continue to subscribe...")):this.logger.error("issue in loading rtdwc")}))}constructor(e){this.emitter=W()(),this.logger=e.logger}init(){return pe(this,void 0,void 0,(function*(){yield this.checkService(),this.logger.info("rtdwc initialized")}))}subscribe({datasetName:e,update:t,error:n}){var i,r;return pe(this,void 0,void 0,(function*(){return yield this.checkService(),yield null===(r=null===(i=window.wxcc)||void 0===i?void 0:i.rtdwc)||void 0===r?void 0:r.subscribe({datasetName:e,update:t,error:n})}))}}const me=o(r,"[RTDWC JSAPI] =>");var ye=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class Ee{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.supervisor,aqmServiceEntityString:"SERVICE.aqm.supervisor"}),this.logger.info("[JSAPI] Monitoring Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}startMonitoring(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return j.validateMonitoringRequest(e.data,"startMonitoring"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.startMonitoring(e)}))}endMonitoring(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endMonitoring","interactionId is not valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.endMonitoring(e)}))}holdMonitoring(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endMonitoring","interactionId is not valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.holdMonitoring(e)}))}unHoldMonitoring(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endMonitoring","interactionId is not valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.unHoldMonitoring(e)}))}bargeIn(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endMonitoring","interactionId is not valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.bargeIn(e)}))}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const be=o(r,"[Call Monitoring JSAPI] =>"),we=o(be,"[AqmServiceEvents: Call Monitoring] =>");class Se{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("Inited")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}trackBehavioralEvent(...e){var t;if(this.checkService())try{r.info("[webexMetrics Internal JSAPI] => event=trackBehavioralEvent for",e),null===(t=this.SERVICE)||void 0===t||t.webexMetrics.trackBehavioralEvent(...e)}catch(e){r.error("[webexMetrics Internal JSAPI] => event=trackBehavioralEvent Error",e)}}}const ke=o(r,"[webexMetrics Internal JSAPI] =>");var Ie=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class Ae{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.agent,aqmServiceEntityString:"SERVICE.aqm.agent"}),this.logger.info("[JSAPI] Logout Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}desktopLogout(e){var t,n;return Ie(this,void 0,void 0,(function*(){if(!this.checkService())return;const r=yield Ne.actions.getTaskMap();if(0!==(null==r?void 0:r.size))throw new Error("You cannot sign out now because you have active conversations. Complete them and try again.");return void 0!==e.data.logoutReason&&i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.data.logoutReason),"desktopLogout","logoutReason is null or empty"),void 0!==e.data.logoutReason&&i.AssertUtils.check("user requested logout"===e.data.logoutReason.toLowerCase()||"inactivity Logout"===e.data.logoutReason.toLowerCase(),"desktopLogout","logoutReason should be either 'User requested logout' or 'Inactivity Logout'"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent)||void 0===n?void 0:n.logout(e)}))}signoutAgent(e){var t,n;return Ie(this,void 0,void 0,(function*(){if(this.checkService())try{return r.info("[App:TPW] event=signoutAgentBySupervisor for agent ",e.data.agentId),i.AssertUtils.check(j.validateUUID(e.orgId),"signoutAgent","orgId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(e.data.agentId),"signoutAgent","agentId is not a valid UUID"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.data.logoutReason),"signoutAgent","logoutReason is null or empty"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.signoutAgent(e)}catch(t){r.error("[App:TPW] event=signoutAgentBySupervisorFailed for agent ",e.data.agentId,t)}}))}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const Te=o(r,"[Station Logout JSAPI] =>"),Ce=o(Te,"[AqmServiceEvents: Call Monitoring] =>");var Oe=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class Ue{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("[JSAPI] Initialized")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}fetchTasks(e){var t,n;return Oe(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.startTime),"fetchTasks","startTime is null or empty"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.endTime),"fetchTasks","endTime is null or empty"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.pageNumber),"fetchTasks","pageNumber is null or empty"),i.AssertUtils.check(j.validateNumber(e.startTime),"fetchTasks","startTime is not a valid time"),i.AssertUtils.check(j.validateNumber(e.endTime),"fetchTasks","endTime is not a valid time"),i.AssertUtils.check(j.validateNumber(e.pageNumber),"fetchTasks","pageNumber is not a valid number"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.qmw)||void 0===n?void 0:n.fetchTasks(e)}))}fetchCapture(e){var t,n;return Oe(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.taskId),"fetchCapture","taskId is not a valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.qmw)||void 0===n?void 0:n.fetchCapture(e)}))}}const Re=o(r,"[PI JSAPI] =>");var Le=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class xe{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("[JSAPI] AgentConfigJsApi Initialized")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}fetchPaginatedAuxCodes(e){var t,n;return Le(this,void 0,void 0,(function*(){if(this.checkService())return j.validateAuxCodePayload(e,"fetchPaginatedAuxCodes"),yield null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.abs)||void 0===n?void 0:n.fetchPaginatedAuxCodes(e)}))}}const De=o(r,"[AGENT CONFIG JSAPI] =>"),Ne=(()=>{AGENTX_SERVICE?r.info('Found global "AGENTX_SERVICE"!'):r.error('Missed global "AGENTX_SERVICE"...');const e=(t=AGENTX_SERVICE,new ee({logger:te,SERVICE:t}));var t;const n=new ce({logger:ue}),i=new fe({logger:ve,serviceChecker:a({logger:ve})}),o=new O({logger:U,serviceChecker:a({logger:U})}),s=new K({logger:X,serviceChecker:a({logger:X})}),c=new B({logger:H,serviceChecker:a({logger:H}),aqmEvents:L({logger:z})}),u=new ie({logger:re,aqmEvents:L({logger:oe}),serviceChecker:a({logger:re})}),l=new Ee({logger:be,aqmEvents:L({logger:we}),serviceChecker:a({logger:be})}),d=new le({logger:de,aqmEvents:L({logger:he}),serviceChecker:a({logger:de})}),h=new Ae({logger:Te,aqmEvents:L({logger:Ce}),serviceChecker:a({logger:Te})}),f=new se({logger:ae,serviceChecker:a({logger:ae})}),v=new ge({logger:me});v.init();const p=new Ue({logger:Re,serviceChecker:a({logger:Re})}),g=new xe({logger:De,serviceChecker:a({logger:De})}),m=new Se({logger:ke,serviceChecker:a({logger:ke})});return e.addEventListener("inited",()=>{c.init(AGENTX_SERVICE),s.init(AGENTX_SERVICE),u.init(AGENTX_SERVICE),l.init(AGENTX_SERVICE),d.init(AGENTX_SERVICE),h.init(AGENTX_SERVICE),p.init(AGENTX_SERVICE),i.init(AGENTX_SERVICE),o.init(AGENTX_SERVICE),f.init(AGENTX_SERVICE),g.init(AGENTX_SERVICE),m.init(AGENTX_SERVICE)}),e.addEventListener("cleaned",()=>{c.cleanup(),s.cleanup(),u.cleanup(),l.cleanup(),d.cleanup(),h.cleanup(),p.cleanup(),i.cleanup(),f.cleanup(),o.cleanup(),g.cleanup(),m.cleanup()}),{config:e,logger:n,monitoring:l,shortcutKey:i,actions:o,agentContact:c,agentStateInfo:s,dialer:u,screenpop:d,i18n:f,rtdwc:v,postInteractions:p,logout:h,agentConfigJsApi:g,webexMetricsInternal:m}})()},function(e,t,n){"use strict";n.r(t),n.d(t,"v1",(function(){return f})),n.d(t,"v3",(function(){return w})),n.d(t,"v4",(function(){return S})),n.d(t,"v5",(function(){return A}));var i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),r=new Uint8Array(16);function o(){if(!i)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(r)}for(var s=[],a=0;a<256;++a)s[a]=(a+256).toString(16).substr(1);var c,u,l=function(e,t){var n=t||0,i=s;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")},d=0,h=0;var f=function(e,t,n){var i=t&&n||0,r=t||[],s=(e=e||{}).node||c,a=void 0!==e.clockseq?e.clockseq:u;if(null==s||null==a){var f=e.random||(e.rng||o)();null==s&&(s=c=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==a&&(a=u=16383&(f[6]<<8|f[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),p=void 0!==e.nsecs?e.nsecs:h+1,g=v-d+(p-h)/1e4;if(g<0&&void 0===e.clockseq&&(a=a+1&16383),(g<0||v>d)&&void 0===e.nsecs&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=v,h=p,u=a;var m=(1e4*(268435455&(v+=122192928e5))+p)%4294967296;r[i++]=m>>>24&255,r[i++]=m>>>16&255,r[i++]=m>>>8&255,r[i++]=255&m;var y=v/4294967296*1e4&268435455;r[i++]=y>>>8&255,r[i++]=255&y,r[i++]=y>>>24&15|16,r[i++]=y>>>16&255,r[i++]=a>>>8|128,r[i++]=255&a;for(var E=0;E<6;++E)r[i+E]=s[E];return t||l(r)};var v=function(e,t,n){var i=function(e,i,r,o){var s=r&&o||0;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(e)),"string"==typeof i&&(i=function(e){var t=[];return e.replace(/[a-fA-F0-9]{2}/g,(function(e){t.push(parseInt(e,16))})),t}(i)),!Array.isArray(e))throw TypeError("value must be an array of bytes");if(!Array.isArray(i)||16!==i.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var a=n(i.concat(e));if(a[6]=15&a[6]|t,a[8]=63&a[8]|128,r)for(var c=0;c<16;++c)r[s+c]=a[c];return r||l(a)};try{i.name=e}catch(e){}return i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",i};function p(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function g(e,t,n,i,r,o){return p((s=p(p(t,e),p(i,o)))<<(a=r)|s>>>32-a,n);var s,a}function m(e,t,n,i,r,o,s){return g(t&n|~t&i,e,t,r,o,s)}function y(e,t,n,i,r,o,s){return g(t&i|n&~i,e,t,r,o,s)}function E(e,t,n,i,r,o,s){return g(t^n^i,e,t,r,o,s)}function b(e,t,n,i,r,o,s){return g(n^(t|~i),e,t,r,o,s)}var w=v("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Array(t.length);for(var n=0;n<t.length;n++)e[n]=t.charCodeAt(n)}return function(e){var t,n,i,r=[],o=32*e.length;for(t=0;t<o;t+=8)n=e[t>>5]>>>t%32&255,i=parseInt("0123456789abcdef".charAt(n>>>4&15)+"0123456789abcdef".charAt(15&n),16),r.push(i);return r}(function(e,t){var n,i,r,o,s;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var a=1732584193,c=-271733879,u=-1732584194,l=271733878;for(n=0;n<e.length;n+=16)i=a,r=c,o=u,s=l,a=m(a,c,u,l,e[n],7,-680876936),l=m(l,a,c,u,e[n+1],12,-389564586),u=m(u,l,a,c,e[n+2],17,606105819),c=m(c,u,l,a,e[n+3],22,-1044525330),a=m(a,c,u,l,e[n+4],7,-176418897),l=m(l,a,c,u,e[n+5],12,1200080426),u=m(u,l,a,c,e[n+6],17,-1473231341),c=m(c,u,l,a,e[n+7],22,-45705983),a=m(a,c,u,l,e[n+8],7,1770035416),l=m(l,a,c,u,e[n+9],12,-1958414417),u=m(u,l,a,c,e[n+10],17,-42063),c=m(c,u,l,a,e[n+11],22,-1990404162),a=m(a,c,u,l,e[n+12],7,1804603682),l=m(l,a,c,u,e[n+13],12,-40341101),u=m(u,l,a,c,e[n+14],17,-1502002290),c=m(c,u,l,a,e[n+15],22,1236535329),a=y(a,c,u,l,e[n+1],5,-165796510),l=y(l,a,c,u,e[n+6],9,-1069501632),u=y(u,l,a,c,e[n+11],14,643717713),c=y(c,u,l,a,e[n],20,-373897302),a=y(a,c,u,l,e[n+5],5,-701558691),l=y(l,a,c,u,e[n+10],9,38016083),u=y(u,l,a,c,e[n+15],14,-660478335),c=y(c,u,l,a,e[n+4],20,-405537848),a=y(a,c,u,l,e[n+9],5,568446438),l=y(l,a,c,u,e[n+14],9,-1019803690),u=y(u,l,a,c,e[n+3],14,-187363961),c=y(c,u,l,a,e[n+8],20,1163531501),a=y(a,c,u,l,e[n+13],5,-1444681467),l=y(l,a,c,u,e[n+2],9,-51403784),u=y(u,l,a,c,e[n+7],14,1735328473),c=y(c,u,l,a,e[n+12],20,-1926607734),a=E(a,c,u,l,e[n+5],4,-378558),l=E(l,a,c,u,e[n+8],11,-2022574463),u=E(u,l,a,c,e[n+11],16,1839030562),c=E(c,u,l,a,e[n+14],23,-35309556),a=E(a,c,u,l,e[n+1],4,-1530992060),l=E(l,a,c,u,e[n+4],11,1272893353),u=E(u,l,a,c,e[n+7],16,-155497632),c=E(c,u,l,a,e[n+10],23,-1094730640),a=E(a,c,u,l,e[n+13],4,681279174),l=E(l,a,c,u,e[n],11,-358537222),u=E(u,l,a,c,e[n+3],16,-722521979),c=E(c,u,l,a,e[n+6],23,76029189),a=E(a,c,u,l,e[n+9],4,-640364487),l=E(l,a,c,u,e[n+12],11,-421815835),u=E(u,l,a,c,e[n+15],16,530742520),c=E(c,u,l,a,e[n+2],23,-995338651),a=b(a,c,u,l,e[n],6,-198630844),l=b(l,a,c,u,e[n+7],10,1126891415),u=b(u,l,a,c,e[n+14],15,-1416354905),c=b(c,u,l,a,e[n+5],21,-57434055),a=b(a,c,u,l,e[n+12],6,1700485571),l=b(l,a,c,u,e[n+3],10,-1894986606),u=b(u,l,a,c,e[n+10],15,-1051523),c=b(c,u,l,a,e[n+1],21,-2054922799),a=b(a,c,u,l,e[n+8],6,1873313359),l=b(l,a,c,u,e[n+15],10,-30611744),u=b(u,l,a,c,e[n+6],15,-1560198380),c=b(c,u,l,a,e[n+13],21,1309151649),a=b(a,c,u,l,e[n+4],6,-145523070),l=b(l,a,c,u,e[n+11],10,-1120210379),u=b(u,l,a,c,e[n+2],15,718787259),c=b(c,u,l,a,e[n+9],21,-343485551),a=p(a,i),c=p(c,r),u=p(u,o),l=p(l,s);return[a,c,u,l]}(function(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var i=8*e.length;for(t=0;t<i;t+=8)n[t>>5]|=(255&e[t/8])<<t%32;return n}(e),8*e.length))}));var S=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var r=(e=e||{}).random||(e.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t)for(var s=0;s<16;++s)t[i+s]=r[s];return t||l(r)};function k(e,t,n,i){switch(e){case 0:return t&n^~t&i;case 1:return t^n^i;case 2:return t&n^t&i^n&i;case 3:return t^n^i}}function I(e,t){return e<<t|e>>>32-t}var A=v("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var i=unescape(encodeURIComponent(e));e=new Array(i.length);for(var r=0;r<i.length;r++)e[r]=i.charCodeAt(r)}e.push(128);var o=e.length/4+2,s=Math.ceil(o/16),a=new Array(s);for(r=0;r<s;r++){a[r]=new Array(16);for(var c=0;c<16;c++)a[r][c]=e[64*r+4*c]<<24|e[64*r+4*c+1]<<16|e[64*r+4*c+2]<<8|e[64*r+4*c+3]}for(a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295,r=0;r<s;r++){for(var u=new Array(80),l=0;l<16;l++)u[l]=a[r][l];for(l=16;l<80;l++)u[l]=I(u[l-3]^u[l-8]^u[l-14]^u[l-16],1);var d=n[0],h=n[1],f=n[2],v=n[3],p=n[4];for(l=0;l<80;l++){var g=Math.floor(l/20),m=I(d,5)+k(g,h,f,v)+p+t[g]+u[l]>>>0;p=v,v=f,f=I(h,30)>>>0,h=d,d=m}n[0]=n[0]+d>>>0,n[1]=n[1]+h>>>0,n[2]=n[2]+f>>>0,n[3]=n[3]+v>>>0,n[4]=n[4]+p>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}))},function(e,t,n){"use strict";n.r(t);var i=n(3),r=n(13);function o(e,t,n){return(t=Object(r.a)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach((function(t){o(e,t,n[t])}))}return e}var a=n(4),c=n(5);function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){if(t&&("object"==Object(i.a)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return u(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}var v={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},p=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(a.a)(this,e),this.init(t,n)}return Object(c.a)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||v,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,i){return i&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,s({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),g=function(){function e(){Object(a.a)(this,e),this.observers={}}return Object(c.a)(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(this.observers[e]){var r=[].concat(this.observers[e]);r.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function m(){var e,t,n=new Promise((function(n,i){e=n,t=i}));return n.resolve=e,n.reject=t,n}function y(e){return null==e?"":""+e}function E(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function b(e,t,n){function i(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function r(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(r())return{};var s=i(o.shift());!e[s]&&n&&(e[s]=new n),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return r()?{}:{obj:e,k:i(o.shift())}}function w(e,t,n){var i=b(e,t,Object);i.obj[i.k]=n}function S(e,t){var n=b(e,t),i=n.obj,r=n.k;if(i)return i[r]}function k(e,t,n){var i=S(e,n);return void 0!==i?i:S(t,n)}function I(e,t,n){for(var i in t)"__proto__"!==i&&"constructor"!==i&&(i in e?"string"==typeof e[i]||e[i]instanceof String||"string"==typeof t[i]||t[i]instanceof String?n&&(e[i]=t[i]):I(e[i],t[i],n):e[i]=t[i]);return e}function A(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var T={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function C(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return T[e]})):e}var O="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,U=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Object(a.a)(this,t),n=l(this,d(t).call(this)),O&&g.call(u(n)),n.data=e||{},n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return f(t,e),Object(c.a)(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,o=[e,t];return n&&"string"!=typeof n&&(o=o.concat(n)),n&&"string"==typeof n&&(o=o.concat(r?n.split(r):n)),e.indexOf(".")>-1&&(o=e.split(".")),S(this.data,o)}},{key:"addResource",value:function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var s=[e,t];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=t,t=(s=e.split("."))[1]),this.addNamespaces(t),w(this.data,s,i),r.silent||this.emit("added",e,t,n,i)}},{key:"addResources",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var r in n)"string"!=typeof n[r]&&"[object Array]"!==Object.prototype.toString.apply(n[r])||this.addResource(e,t,r,n[r],{silent:!0});i.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(i=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var c=S(this.data,a)||{};i?I(c,n,r):c=s({},c,n),w(this.data,a,c),o.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?s({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(g),R={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,i,r){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,n,i,r))})),t}},L={},x=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(a.a)(this,t),n=l(this,d(t).call(this)),O&&g.call(u(n)),E(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,u(n)),n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=p.create("translator"),n}return f(t,e),Object(c.a)(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,r=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var o=e.match(this.interpolator.nestingRegexp);if(o&&o.length>0)return{key:e,namespaces:r};var s=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(s[0])>-1)&&(r=s.shift()),e=s.join(i)}return"string"==typeof r&&(r=[r]),{key:e,namespaces:r}}},{key:"translate",value:function(e,n,r){var o=this;if("object"!==Object(i.a)(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var a=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,c=this.extractFromKey(e[e.length-1],n),u=c.key,l=c.namespaces,d=l[l.length-1],h=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&"cimode"===h.toLowerCase()){if(f){var v=n.nsSeparator||this.options.nsSeparator;return d+v+u}return u}var p=this.resolve(e,n),g=p&&p.res,m=p&&p.usedKey||u,y=p&&p.exactUsedKey||u,E=Object.prototype.toString.apply(g),b=["[object Number]","[object Function]","[object RegExp]"],w=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,k="string"!=typeof g&&"boolean"!=typeof g&&"number"!=typeof g;if(S&&g&&k&&b.indexOf(E)<0&&("string"!=typeof w||"[object Array]"!==E)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,g,n):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");if(a){var I="[object Array]"===E,A=I?[]:{},T=I?y:m;for(var C in g)if(Object.prototype.hasOwnProperty.call(g,C)){var O="".concat(T).concat(a).concat(C);A[C]=this.translate(O,s({},n,{joinArrays:!1,ns:l})),A[C]===O&&(A[C]=g[C])}g=A}}else if(S&&"string"==typeof w&&"[object Array]"===E)(g=g.join(w))&&(g=this.extendTranslation(g,e,n,r));else{var U=!1,R=!1,L=void 0!==n.count&&"string"!=typeof n.count,x=t.hasDefaultValue(n),D=L?this.pluralResolver.getSuffix(h,n.count):"",N=n["defaultValue".concat(D)]||n.defaultValue;!this.isValidLookup(g)&&x&&(U=!0,g=N),this.isValidLookup(g)||(R=!0,g=u);var P=x&&N!==g&&this.options.updateMissing;if(R||U||P){if(this.logger.log(P?"updateKey":"missingKey",h,d,u,P?N:g),a){var _=this.resolve(u,s({},n,{keySeparator:!1}));_&&_.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var M=[],V=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&V&&V[0])for(var j=0;j<V.length;j++)M.push(V[j]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(n.lng||this.language):M.push(n.lng||this.language);var q=function(e,t,i){o.options.missingKeyHandler?o.options.missingKeyHandler(e,d,t,P?i:g,P,n):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,d,t,P?i:g,P,n),o.emit("missingKey",e,d,t,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&L?M.forEach((function(e){o.pluralResolver.getSuffixes(e).forEach((function(t){q([e],u+t,n["defaultValue".concat(t)]||N)}))})):q(M,u,N))}g=this.extendTranslation(g,e,n,p,r),R&&g===u&&this.options.appendNamespaceToMissingKey&&(g="".concat(d,":").concat(u)),R&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(g))}return g}},{key:"extendTranslation",value:function(e,t,n,i,r){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(s({},n,{interpolation:s({},this.options.interpolation,n.interpolation)}));var a,c=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(c){var u=e.match(this.interpolator.nestingRegexp);a=u&&u.length}var l=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=s({},this.options.interpolation.defaultVariables,l)),e=this.interpolator.interpolate(e,l,n.lng||this.language,n),c){var d=e.match(this.interpolator.nestingRegexp);a<(d&&d.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,i=new Array(e),s=0;s<e;s++)i[s]=arguments[s];return r&&r[0]===i[0]&&!n.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(i[0]," in key: ").concat(t[0])),null):o.translate.apply(o,i.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var h=n.postProcess||this.options.postProcess,f="string"==typeof h?[h]:h;return null!=e&&f&&f.length&&!1!==n.applyPostProcessor&&(e=R.handle(f,e,t,this.options&&this.options.postProcessPassResolved?s({i18nResolved:i},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,i,r,o,s=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!s.isValidLookup(t)){var c=s.extractFromKey(e,a),u=c.key;n=u;var l=c.namespaces;s.options.fallbackNS&&(l=l.concat(s.options.fallbackNS));var d=void 0!==a.count&&"string"!=typeof a.count,h=void 0!==a.context&&"string"==typeof a.context&&""!==a.context,f=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);l.forEach((function(e){s.isValidLookup(t)||(o=e,!L["".concat(f[0],"-").concat(e)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(o)&&(L["".concat(f[0],"-").concat(e)]=!0,s.logger.warn('key "'.concat(n,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((function(n){if(!s.isValidLookup(t)){r=n;var o,c,l=u,f=[l];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(f,u,n,e,a);else d&&(o=s.pluralResolver.getSuffix(n,a.count)),d&&h&&f.push(l+o),h&&f.push(l+="".concat(s.options.contextSeparator).concat(a.context)),d&&f.push(l+=o);for(;c=f.pop();)s.isValidLookup(t)||(i=c,t=s.getResource(n,e,c,a))}})))}))}})),{res:t,usedKey:n,exactUsedKey:i,usedLng:r,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,"defaultValue".length)&&void 0!==e[t])return!0;return!1}}]),t}(g);function D(e){return e.charAt(0).toUpperCase()+e.slice(1)}var N=function(){function e(t){Object(a.a)(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=p.create("languageUtils")}return Object(c.a)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=D(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=D(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=D(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var i=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(i)||(t=i)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var i=n.getLanguagePartFromCode(e);if(n.isSupportedCode(i))return t=i;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(i))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,i=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=function(e){e&&(n.isSupportedCode(e)?r.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),i.forEach((function(e){r.indexOf(e)<0&&o(n.formatLanguageCode(e))})),r}}]),e}(),P=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],_={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function M(){var e={};return P.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:_[t.fc]}}))})),e}var V=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(a.a)(this,e),this.languageUtils=t,this.options=n,this.logger=p.create("pluralResolver"),this.rules=M()}return Object(c.a)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,i=this.getRule(e);if(i){var r=i.noAbs?i.plurals(t):i.plurals(Math.abs(t)),o=i.numbers[r];this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var s=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):s():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]?s():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),j=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(this,e),this.logger=p.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return Object(c.a)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:C,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?A(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?A(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?A(t.nestingPrefix):t.nestingPrefixEscaped||A("$t("),this.nestingSuffix=t.nestingSuffix?A(t.nestingSuffix):t.nestingSuffixEscaped||A(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,i){var r,o,s,a=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(a.formatSeparator)<0){var r=k(t,c,e);return a.alwaysFormat?a.format(r,void 0,n):r}var o=e.split(a.formatSeparator),s=o.shift().trim(),u=o.join(a.formatSeparator).trim();return a.format(k(t,c,s),u,n,i)};this.resetRegExp();var d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,h=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return u(e)}},{regex:this.regexp,safeValue:function(e){return a.escapeValue?u(a.escape(e)):u(e)}}].forEach((function(t){for(s=0;r=t.regex.exec(e);){if(void 0===(o=l(r[1].trim())))if("function"==typeof d){var n=d(e,r,i);o="string"==typeof n?n:""}else{if(h){o=r[0];continue}a.logger.warn("missed to pass in variable ".concat(r[1]," for interpolating ").concat(e)),o=""}else"string"==typeof o||a.useRawValueToEscape||(o=y(o));if(e=e.replace(r[0],t.safeValue(o)),t.regex.lastIndex=0,++s>=a.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,i,r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=s({},o);function c(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var i=e.split(new RegExp("".concat(n,"[ ]*{"))),r="{".concat(i[1]);e=i[0],r=(r=this.interpolate(r,a)).replace(/'/g,'"');try{a=JSON.parse(r),t&&(a=s({},t,a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(r)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var u=[],l=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var d=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=d.shift(),u=d,l=!0}if((i=t(c.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof i)return i;"string"!=typeof i&&(i=y(i)),i||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),i=""),l&&(i=u.reduce((function(e,t){return r.format(e,t,o.lng,o)}),i.trim())),e=e.replace(n[0],i),this.regexp.lastIndex=0}return e}}]),e}();var q=function(e){function t(e,n,i){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(a.a)(this,t),r=l(this,d(t).call(this)),O&&g.call(u(r)),r.backend=e,r.store=n,r.services=i,r.languageUtils=i.languageUtils,r.options=o,r.logger=p.create("backendConnector"),r.state={},r.queue=[],r.backend&&r.backend.init&&r.backend.init(i,o.backend,o),r}return f(t,e),Object(c.a)(t,[{key:"queueLoad",value:function(e,t,n,i){var r=this,o=[],s=[],a=[],c=[];return e.forEach((function(e){var i=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!n.reload&&r.store.hasResourceBundle(e,t)?r.state[a]=2:r.state[a]<0||(1===r.state[a]?s.indexOf(a)<0&&s.push(a):(r.state[a]=1,i=!1,s.indexOf(a)<0&&s.push(a),o.indexOf(a)<0&&o.push(a),c.indexOf(t)<0&&c.push(t)))})),i||a.push(e)})),(o.length||s.length)&&this.queue.push({pending:s,loaded:{},errors:[],callback:i}),{toLoad:o,pending:s,toLoadLanguages:a,toLoadNamespaces:c}}},{key:"loaded",value:function(e,t,n){var i=e.split("|"),r=i[0],o=i[1];t&&this.emit("failedLoading",r,o,t),n&&this.store.addResourceBundle(r,o,n),this.state[e]=t?-1:2;var s={};this.queue.forEach((function(n){var i,a,c,u,l,d;i=n.loaded,a=o,u=b(i,[r],Object),l=u.obj,d=u.k,l[d]=l[d]||[],c&&(l[d]=l[d].concat(a)),c||l[d].push(a),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){s[e]||(s[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){s[e].indexOf(t)<0&&s[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var i=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,s=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(a,c){a&&c&&r<5?setTimeout((function(){i.read.call(i,e,t,n,r+1,2*o,s)}),o):s(a,c)})):s(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,i,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.split("|"),r=i[0],o=i[1];this.read(r,o,"read",void 0,void 0,(function(i,s){i&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(r," failed"),i),!i&&s&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(r),s),t.loaded(e,i,s)}))}},{key:"saveMissing",value:function(e,t,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,i,null,s({},o,{isUpdate:r})),e&&e[0]&&this.store.addResource(e[0],t,n,i))}}]),t}(g);function F(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===Object(i.a)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===Object(i.a)(e[2])||"object"===Object(i.a)(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function B(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function H(){}var z=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(Object(a.a)(this,t),e=l(this,d(t).call(this)),O&&g.call(u(e)),e.options=B(n),e.services={},e.logger=p,e.modules={external:[]},i&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,i),l(e,u(e));setTimeout((function(){e.init(n,i)}),0)}return e}return f(t,e),Object(c.a)(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function i(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=s({},F(),this.options,B(t)),this.format=this.options.interpolation.format,n||(n=H),!this.options.isClone){this.modules.logger?p.init(i(this.modules.logger),this.options):p.init(null,this.options);var r=new N(this.options);this.store=new U(this.options.resources,this.options);var o=this.services;o.logger=p,o.resourceStore=this.store,o.languageUtils=r,o.pluralResolver=new V(r,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),o.interpolator=new j(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new q(i(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit.apply(e,[t].concat(i))})),this.modules.languageDetector&&(o.languageDetector=i(this.modules.languageDetector),o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=i(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new x(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit.apply(e,[t].concat(i))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.length>0&&"dev"!==a[0]&&(this.options.lng=a[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var c=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];c.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var u=["addResource","addResources","addResourceBundle","removeResourceBundle"];u.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var l=m(),d=function(){var t=function(t,i){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(i),n(t,i)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),l}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H,i=n,r="string"==typeof e?e:this.language;if("function"==typeof e&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return i();var o=[],s=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};if(r)s(r);else{var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.forEach((function(e){return s(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return s(e)})),this.services.backendConnector.load(o,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function(e,t,n){var i=m();return e||(e=this.languages),t||(t=this.options.ns),n||(n=H),this.services.backendConnector.reload(e,t,(function(e){i.resolve(),n(e)})),i}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&R.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var i=m();this.emit("languageChanging",e);var r=function(e){var r="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);r&&(n.language||(n.language=r,n.languages=n.services.languageUtils.toResolveHierarchy(r)),n.translator.language||n.translator.changeLanguage(r),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(r)),n.loadResources(r,(function(e){!function(e,r){r?(n.language=r,n.languages=n.services.languageUtils.toResolveHierarchy(r),n.translator.changeLanguage(r),n.isLanguageChangingTo=void 0,n.emit("languageChanged",r),n.logger.log("languageChanged",r)):n.isLanguageChangingTo=void 0,i.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,r)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(r):r(e):r(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function(e,t){var n=this,r=function e(t,r){var o;if("object"!==Object(i.a)(r)){for(var a=arguments.length,c=new Array(a>2?a-2:0),u=2;u<a;u++)c[u-2]=arguments[u];o=n.options.overloadTranslationOptionHandler([t,r].concat(c))}else o=s({},r);return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,n.t(t,o)};return"string"==typeof e?r.lng=e:r.lngs=e,r.ns=t,r}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var s=function(e,n){var i=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===i||2===i};if(n.precheck){var a=n.precheck(this,s);if(void 0!==a)return a}return!!this.hasResourceBundle(i,e)||(!this.services.backendConnector.backend||!(!s(i,e)||r&&!s(o,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,i=m();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){i.resolve(),t&&t(e)})),i):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=m();"string"==typeof e&&(e=[e]);var i=this.options.preload||[],r=e.filter((function(e){return i.indexOf(e)<0}));return r.length?(this.options.preload=i.concat(r),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H,r=s({},this.options,n,{isClone:!0}),o=new t(r),a=["store","services","language"];return a.forEach((function(t){o[t]=e[t]})),o.services=s({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new x(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];o.emit.apply(o,[e].concat(n))})),o.init(r,i),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}}]),t}(g));t.default=z}])}));
10
+ t.read=function(e,t,n,i,r){var o,s,a=8*r-i-1,c=(1<<a)-1,u=c>>1,l=-7,d=n?r-1:0,h=n?-1:1,f=e[t+d];for(d+=h,o=f&(1<<-l)-1,f>>=-l,l+=a;l>0;o=256*o+e[t+d],d+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=i;l>0;s=256*s+e[t+d],d+=h,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,i),o-=u}return(f?-1:1)*s*Math.pow(2,o-i)},t.write=function(e,t,n,i,r,o){var s,a,c,u=8*o-r-1,l=(1<<u)-1,d=l>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,v=i?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+d>=1?h/c:h*Math.pow(2,1-d))*c>=2&&(s++,c/=2),s+d>=l?(a=0,s=l):s+d>=1?(a=(t*c-1)*Math.pow(2,r),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,r),s=0));r>=8;e[n+f]=255&a,f+=v,a/=256,r-=8);for(s=s<<r|a,u+=r;u>0;e[n+f]=255&s,f+=v,s/=256,u-=8);e[n+f-v]|=128*p}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";n.r(t);var i=n(7),r=n(18);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var a=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n||"")},request:r.a,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},c=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};o(this,e),this.services=t,this.options=n,this.allOptions=i,this.type="backend",this.init(t,n,i)}var t,n,r;return t=e,(n=[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=Object(i.a)(n,this.options||{},a()),this.allOptions=r,this.services&&this.options.reloadInterval&&setInterval((function(){return t.reload()}),this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,r,o){var s=this,a=this.options.loadPath;"function"==typeof this.options.loadPath&&(a=this.options.loadPath(e,n)),(a=Object(i.c)(a)).then((function(i){if(!i)return o(null,{});var a=s.services.interpolator.interpolate(i,{lng:e.join("+"),ns:n.join("+")});s.loadUrl(a,o,t,r)}))}},{key:"loadUrl",value:function(e,t,n,i){var r=this;this.options.request(this.options,e,void 0,(function(o,s){if(s&&(s.status>=500&&s.status<600||!s.status))return t("failed loading "+e+"; status code: "+s.status,!0);if(s&&s.status>=400&&s.status<500)return t("failed loading "+e+"; status code: "+s.status,!1);if(!s&&o&&o.message&&o.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e+": "+o.message,!0);if(o)return t(o,!1);var a,c;try{a="string"==typeof s.data?r.options.parse(s.data,n,i):s.data}catch(t){c="failed parsing "+e+" to json"}if(c)return t(c,!1);t(null,a)}))}},{key:"create",value:function(e,t,n,i,r){var o=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var s=this.options.parsePayload(t,n,i),a=0,c=[],u=[];e.forEach((function(n){var i=o.options.addPath;"function"==typeof o.options.addPath&&(i=o.options.addPath(n,t));var l=o.services.interpolator.interpolate(i,{lng:n,ns:t});o.options.request(o.options,l,s,(function(t,n){a+=1,c.push(t),u.push(n),a===e.length&&r&&r(c,u)}))}))}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,i=t.languageUtils,r=t.logger,o=n.language;if(!o||"cimode"!==o.toLowerCase()){var s=[],a=function(e){i.toResolveHierarchy(e).forEach((function(e){s.indexOf(e)<0&&s.push(e)}))};a(o),this.allOptions.preload&&this.allOptions.preload.forEach((function(e){return a(e)})),s.forEach((function(t){e.allOptions.ns.forEach((function(e){n.read(t,e,"read",null,null,(function(i,o){i&&r.warn("loading namespace ".concat(e," for language ").concat(t," failed"),i),!i&&o&&r.log("loaded namespace ".concat(e," for language ").concat(t),o),n.loaded("".concat(t,"|").concat(e),i,o)}))}))}))}}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();c.type="backend",t.default=c},function(e,t){var n="undefined"!=typeof self?self:this,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,i="Symbol"in e&&"iterator"in Symbol,r="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,s="ArrayBuffer"in e;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function v(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function p(e){var t=new FileReader,n=v(t);return t.readAsArrayBuffer(e),n}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&r&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var e,t,n,i=f(this);if(i)return i;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=v(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),i=0;i<t.length;i++)n[i]=String.fromCharCode(t[i]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=u(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},h.prototype.delete=function(e){delete this.map[u(e)]},h.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},h.prototype.set=function(e,t){this.map[u(e)]=l(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),d(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),d(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),d(e)},i&&(h.prototype[Symbol.iterator]=h.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function E(e,t){var n,i,r=(t=t||{}).body;if(e instanceof E){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(n=t.method||this.method||"GET",i=n.toUpperCase(),y.indexOf(i)>-1?i:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(r))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})},m.call(E.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];w.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function k(e,n){return new Promise((function(i,o){var s=new E(e,n);if(s.signal&&s.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var e,t,n={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),i=n.shift().trim();if(i){var r=n.join(":").trim();t.append(i,r)}})),t)};n.url="responseURL"in a?a.responseURL:n.headers.get("X-Request-URL");var r="response"in a?a.response:a.responseText;i(new w(r,n))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&r&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",c)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}k.polyfill=!0,e.fetch||(e.fetch=k,e.Headers=h,e.Request=E,e.Response=w),t.Headers=h,t.Request=E,t.Response=w,t.fetch=k,Object.defineProperty(t,"__esModule",{value:!0})}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=i;(t=r.fetch).default=r.fetch,t.fetch=r.fetch,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,e.exports=t},function(e,t,n){"use strict";n.r(t);var i=n(4),r=n(5),o=[],s=o.forEach,a=o.slice;function c(e){return s.call(a.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}var u=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,l=function(e,t,n){var i=n||{};i.path=i.path||"/";var r=e+"="+encodeURIComponent(t);if(i.maxAge>0){var o=i.maxAge-0;if(isNaN(o))throw new Error("maxAge should be a Number");r+="; Max-Age="+Math.floor(o)}if(i.domain){if(!u.test(i.domain))throw new TypeError("option domain is invalid");r+="; Domain="+i.domain}if(i.path){if(!u.test(i.path))throw new TypeError("option path is invalid");r+="; Path="+i.path}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw new TypeError("option expires is invalid");r+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(r+="; HttpOnly"),i.secure&&(r+="; Secure"),i.sameSite)switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r},d=function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+60*n*1e3)),i&&(r.domain=i),document.cookie=l(e,encodeURIComponent(t),r)},h=function(e){for(var t=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var r=n[i];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return r.substring(t.length,r.length)}return null},f={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!=typeof document){var n=h(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!=typeof document&&d(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},v={name:"querystring",lookup:function(e){var t;if("undefined"!=typeof window)for(var n=window.location.search.substring(1).split("&"),i=0;i<n.length;i++){var r=n[i].indexOf("=");if(r>0)n[i].substring(0,r)===e.lookupQuerystring&&(t=n[i].substring(r+1))}return t}},p=null,g=function(){if(null!==p)return p;try{p="undefined"!==window&&null!==window.localStorage;window.localStorage.setItem("i18next.translate.boo","foo"),window.localStorage.removeItem("i18next.translate.boo")}catch(e){p=!1}return p},m={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&g()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&g()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},y=null,E=function(){if(null!==y)return y;try{y="undefined"!==window&&null!==window.sessionStorage;window.sessionStorage.setItem("i18next.translate.boo","foo"),window.sessionStorage.removeItem("i18next.translate.boo")}catch(e){y=!1}return y},b={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&E()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&E()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},w={name:"navigator",lookup:function(e){var t=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)t.push(navigator.languages[n]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},S={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},k={name:"path",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"==typeof e.lookupFromPathIndex){if("string"!=typeof n[e.lookupFromPathIndex])return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},I={name:"subdomain",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.href.match(/(?:http[s]*\:\/\/)*(.*?)\.(?=[^\/]*\..{2,5})/gi);n instanceof Array&&(t="number"==typeof e.lookupFromSubdomainIndex?n[e.lookupFromSubdomainIndex].replace("http://","").replace("https://","").replace(".",""):n[0].replace("http://","").replace("https://","").replace(".",""))}return t}};var A=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(i.a)(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return Object(r.a)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=c(t,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(f),this.addDetector(v),this.addDetector(m),this.addDetector(b),this.addDetector(w),this.addDetector(S),this.addDetector(k),this.addDetector(I)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var n=[];return e.forEach((function(e){if(t.detectors[e]){var i=t.detectors[e].lookup(t.options);i&&"string"==typeof i&&(i=[i]),i&&(n=n.concat(i))}})),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var n=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((function(t){n.detectors[t]&&n.detectors[t].cacheUserLanguage(e,n.options)})))}}]),e}();A.type="languageDetector",t.default=A},function(e,t,n){"use strict";var i=n(48);e.exports=function(e){if(!i(e))throw new TypeError(e+" is not an Object");return e}},function(e,t,n){"use strict";var i=n(10),r={function:!0,object:!0};e.exports=function(e){return i(e)&&r[typeof e]||!1}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return Le})),n.d(t,"Axios",(function(){return xe})),n.d(t,"AxiosError",(function(){return De})),n.d(t,"CanceledError",(function(){return Ne})),n.d(t,"isCancel",(function(){return Pe})),n.d(t,"CancelToken",(function(){return _e})),n.d(t,"VERSION",(function(){return Me})),n.d(t,"all",(function(){return Ve})),n.d(t,"Cancel",(function(){return je})),n.d(t,"isAxiosError",(function(){return qe})),n.d(t,"spread",(function(){return Fe})),n.d(t,"toFormData",(function(){return Be})),n.d(t,"AxiosHeaders",(function(){return He})),n.d(t,"HttpStatusCode",(function(){return ze})),n.d(t,"formToJSON",(function(){return Je})),n.d(t,"getAdapter",(function(){return We})),n.d(t,"mergeConfig",(function(){return Ze}));var i={};n.r(i),n.d(i,"hasBrowserEnv",(function(){return m})),n.d(i,"hasStandardBrowserWebWorkerEnv",(function(){return b})),n.d(i,"hasStandardBrowserEnv",(function(){return E})),n.d(i,"navigator",(function(){return y})),n.d(i,"origin",(function(){return w}));var r=n(1),o=n(11),s=n(6);function a(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function c(e,t){this._pairs=[],e&&Object(s.a)(e,this,t)}const u=c.prototype;u.append=function(e,t){this._pairs.push([e,t])},u.toString=function(e){const t=e?function(t){return e.call(this,t,a)}:a;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var l=c;function d(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function h(e,t,n){if(!t)return e;const i=n&&n.encode||d;r.a.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(s=o?o(t,n):r.a.isURLSearchParams(t)?t.toString():new l(t,n).toString(i),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}var f=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){r.a.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},v=n(2),p={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},g={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:l,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const m="undefined"!=typeof window&&"undefined"!=typeof document,y="object"==typeof navigator&&navigator||void 0,E=m&&(!y||["ReactNative","NativeScript","NS"].indexOf(y.product)<0),b="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,w=m&&window.location.href||"http://localhost";var S={...i,...g};var k=function(e){function t(e,n,i,o){let s=e[o++];if("__proto__"===s)return!0;const a=Number.isFinite(+s),c=o>=e.length;if(s=!s&&r.a.isArray(i)?i.length:s,c)return r.a.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!a;i[s]&&r.a.isObject(i[s])||(i[s]=[]);return t(e,n,i[s],o)&&r.a.isArray(i[s])&&(i[s]=function(e){const t={},n=Object.keys(e);let i;const r=n.length;let o;for(i=0;i<r;i++)o=n[i],t[o]=e[o];return t}(i[s])),!a}if(r.a.isFormData(e)&&r.a.isFunction(e.entries)){const n={};return r.a.forEachEntry(e,(e,i)=>{t(function(e){return r.a.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),i,n,0)}),n}return null};const I={transitional:p,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=r.a.isObject(e);o&&r.a.isHTMLForm(e)&&(e=new FormData(e));if(r.a.isFormData(e))return i?JSON.stringify(k(e)):e;if(r.a.isArrayBuffer(e)||r.a.isBuffer(e)||r.a.isStream(e)||r.a.isFile(e)||r.a.isBlob(e)||r.a.isReadableStream(e))return e;if(r.a.isArrayBufferView(e))return e.buffer;if(r.a.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Object(s.a)(e,new S.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,i){return S.isNode&&r.a.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=r.a.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Object(s.a)(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),function(e,t,n){if(r.a.isString(e))try{return(t||JSON.parse)(e),r.a.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||I.transitional,n=t&&t.forcedJSONParsing,i="json"===this.responseType;if(r.a.isResponse(e)||r.a.isReadableStream(e))return e;if(e&&r.a.isString(e)&&(n&&!this.responseType||i)){const n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw v.a.from(e,v.a.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:S.classes.FormData,Blob:S.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};r.a.forEach(["delete","get","head","post","put","patch"],e=>{I.headers[e]={}});var A=I;const T=r.a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const C=Symbol("internals");function O(e){return e&&String(e).trim().toLowerCase()}function U(e){return!1===e||null==e?e:r.a.isArray(e)?e.map(U):String(e)}function R(e,t,n,i,o){return r.a.isFunction(i)?i.call(this,t,n):(o&&(t=n),r.a.isString(t)?r.a.isString(i)?-1!==t.indexOf(i):r.a.isRegExp(i)?i.test(t):void 0:void 0)}class L{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function o(e,t,n){const o=O(t);if(!o)throw new Error("header name must be a non-empty string");const s=r.a.findKey(i,o);(!s||void 0===i[s]||!0===n||void 0===n&&!1!==i[s])&&(i[s||t]=U(e))}const s=(e,t)=>r.a.forEach(e,(e,n)=>o(e,n,t));if(r.a.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(r.a.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,i,r;return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),i=e.substring(r+1).trim(),!n||t[n]&&T[n]||("set-cookie"===n?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)})),t})(e),t);else if(r.a.isObject(e)&&r.a.isIterable(e)){let n,i,o={};for(const t of e){if(!r.a.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[i=t[0]]=(n=o[i])?r.a.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}s(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=O(e)){const n=r.a.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}(e);if(r.a.isFunction(t))return t.call(this,e,n);if(r.a.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=O(e)){const n=r.a.findKey(this,e);return!(!n||void 0===this[n]||t&&!R(0,this[n],n,t))}return!1}delete(e,t){const n=this;let i=!1;function o(e){if(e=O(e)){const o=r.a.findKey(n,e);!o||t&&!R(0,n[o],o,t)||(delete n[o],i=!0)}}return r.a.isArray(e)?e.forEach(o):o(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const r=t[n];e&&!R(0,this[r],r,e,!0)||(delete this[r],i=!0)}return i}normalize(e){const t=this,n={};return r.a.forEach(this,(i,o)=>{const s=r.a.findKey(n,o);if(s)return t[s]=U(i),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();a!==o&&delete t[o],t[a]=U(i),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return r.a.forEach(this,(n,i)=>{null!=n&&!1!==n&&(t[i]=e&&r.a.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[C]=this[C]={accessors:{}}).accessors,n=this.prototype;function i(e){const i=O(e);t[i]||(!function(e,t){const n=r.a.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(e,n,r){return this[i].call(this,t,e,n,r)},configurable:!0})})}(n,e),t[i]=!0)}return r.a.isArray(e)?e.forEach(i):i(e),this}}L.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),r.a.reduceDescriptors(L.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),r.a.freezeMethods(L);var x=L;function D(e,t){const n=this||A,i=t||n,o=x.from(i.headers);let s=i.data;return r.a.forEach(e,(function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function N(e){return!(!e||!e.__CANCEL__)}function P(e,t,n){v.a.call(this,null==e?"canceled":e,v.a.ERR_CANCELED,t,n),this.name="CanceledError"}r.a.inherits(P,v.a,{__CANCEL__:!0});var _=P,M=n(12);function V(e,t,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new v.a("Request failed with status code "+n.status,[v.a.ERR_BAD_REQUEST,v.a.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}var j=function(e,t){e=e||10;const n=new Array(e),i=new Array(e);let r,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=i[s];r||(r=c),n[o]=a,i[o]=c;let l=s,d=0;for(;l!==o;)d+=n[l++],l%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-r<t)return;const h=u&&c-u;return h?Math.round(1e3*d/h):void 0}};var q=function(e,t){let n,i,r=0,o=1e3/t;const s=(t,o=Date.now())=>{r=o,n=null,i&&(clearTimeout(i),i=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-r;a>=o?s(e,t):(n=e,i||(i=setTimeout(()=>{i=null,s(n)},o-a)))},()=>n&&s(n)]};const F=(e,t,n=3)=>{let i=0;const r=j(50,250);return q(n=>{const o=n.loaded,s=n.lengthComputable?n.total:void 0,a=o-i,c=r(a);i=o;e({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&o<=s?(s-o)/c:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})},n)},B=(e,t)=>{const n=null!=e;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},H=e=>(...t)=>r.a.asap(()=>e(...t));var z,J,W=S.hasStandardBrowserEnv?(z=new URL(S.origin),J=S.navigator&&/(msie|trident)/i.test(S.navigator.userAgent),e=>(e=new URL(e,S.origin),z.protocol===e.protocol&&z.host===e.host&&(J||z.port===e.port))):()=>!0,Z=S.hasStandardBrowserEnv?{write(e,t,n,i,o,s){const a=[e+"="+encodeURIComponent(t)];r.a.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.a.isString(i)&&a.push("path="+i),r.a.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function G(e,t,n){let i=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(i||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Y=e=>e instanceof x?{...e}:e;function $(e,t){t=t||{};const n={};function i(e,t,n,i){return r.a.isPlainObject(e)&&r.a.isPlainObject(t)?r.a.merge.call({caseless:i},e,t):r.a.isPlainObject(t)?r.a.merge({},t):r.a.isArray(t)?t.slice():t}function o(e,t,n,o){return r.a.isUndefined(t)?r.a.isUndefined(e)?void 0:i(void 0,e,0,o):i(e,t,0,o)}function s(e,t){if(!r.a.isUndefined(t))return i(void 0,t)}function a(e,t){return r.a.isUndefined(t)?r.a.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function c(n,r,o){return o in t?i(n,r):o in e?i(void 0,n):void 0}const u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(e,t,n)=>o(Y(e),Y(t),0,!0)};return r.a.forEach(Object.keys(Object.assign({},e,t)),(function(i){const s=u[i]||o,a=s(e[i],t[i],i);r.a.isUndefined(a)&&s!==c||(n[i]=a)})),n}var K=e=>{const t=$({},e);let n,{data:i,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:a,headers:c,auth:u}=t;if(t.headers=c=x.from(c),t.url=h(G(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),u&&c.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),r.a.isFormData(i))if(S.hasStandardBrowserEnv||S.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if(!1!==(n=c.getContentType())){const[e,...t]=n?n.split(";").map(e=>e.trim()).filter(Boolean):[];c.setContentType([e||"multipart/form-data",...t].join("; "))}if(S.hasStandardBrowserEnv&&(o&&r.a.isFunction(o)&&(o=o(t)),o||!1!==o&&W(t.url))){const e=s&&a&&Z.read(a);e&&c.set(s,e)}return t};var X="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const i=K(e);let o=i.data;const s=x.from(i.headers).normalize();let a,c,u,l,d,{responseType:h,onUploadProgress:f,onDownloadProgress:g}=i;function m(){l&&l(),d&&d(),i.cancelToken&&i.cancelToken.unsubscribe(a),i.signal&&i.signal.removeEventListener("abort",a)}let y=new XMLHttpRequest;function E(){if(!y)return;const i=x.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());V((function(e){t(e),m()}),(function(e){n(e),m()}),{data:h&&"text"!==h&&"json"!==h?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:i,config:e,request:y}),y=null}y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout,"onloadend"in y?y.onloadend=E:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(E)},y.onabort=function(){y&&(n(new v.a("Request aborted",v.a.ECONNABORTED,e,y)),y=null)},y.onerror=function(){n(new v.a("Network Error",v.a.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let t=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const r=i.transitional||p;i.timeoutErrorMessage&&(t=i.timeoutErrorMessage),n(new v.a(t,r.clarifyTimeoutError?v.a.ETIMEDOUT:v.a.ECONNABORTED,e,y)),y=null},void 0===o&&s.setContentType(null),"setRequestHeader"in y&&r.a.forEach(s.toJSON(),(function(e,t){y.setRequestHeader(t,e)})),r.a.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),h&&"json"!==h&&(y.responseType=i.responseType),g&&([u,d]=F(g,!0),y.addEventListener("progress",u)),f&&y.upload&&([c,l]=F(f),y.upload.addEventListener("progress",c),y.upload.addEventListener("loadend",l)),(i.cancelToken||i.signal)&&(a=t=>{y&&(n(!t||t.type?new _(null,e,y):t),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(a),i.signal&&(i.signal.aborted?a():i.signal.addEventListener("abort",a)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(i.url);b&&-1===S.protocols.indexOf(b)?n(new v.a("Unsupported protocol "+b+":",v.a.ERR_BAD_REQUEST,e)):y.send(o||null)}))};var Q=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,i=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;i.abort(t instanceof v.a?t:new _(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,o(new v.a(`timeout ${t} of ms exceeded`,v.a.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:c}=i;return c.unsubscribe=()=>r.a.asap(a),c}};const ee=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let i,r=0;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},te=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},ne=(e,t,n,i)=>{const r=async function*(e,t){for await(const n of te(e))yield*ee(n,t)}(e,t);let o,s=0,a=e=>{o||(o=!0,i&&i(e))};return new ReadableStream({async pull(e){try{const{done:t,value:i}=await r.next();if(t)return a(),void e.close();let o=i.byteLength;if(n){let e=s+=o;n(e)}e.enqueue(new Uint8Array(i))}catch(e){throw a(e),e}},cancel:e=>(a(e),r.return())},{highWaterMark:2})},ie="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,re=ie&&"function"==typeof ReadableStream,oe=ie&&("function"==typeof TextEncoder?(se=new TextEncoder,e=>se.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var se;const ae=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},ce=re&&ae(()=>{let e=!1;const t=new Request(S.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ue=re&&ae(()=>r.a.isReadableStream(new Response("").body)),le={stream:ue&&(e=>e.body)};var de;ie&&(de=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!le[e]&&(le[e]=r.a.isFunction(de[e])?t=>t[e]():(t,n)=>{throw new v.a(`Response type '${e}' is not supported`,v.a.ERR_NOT_SUPPORT,n)})}));const he=async(e,t)=>{const n=r.a.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(r.a.isBlob(e))return e.size;if(r.a.isSpecCompliantForm(e)){const t=new Request(S.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return r.a.isArrayBufferView(e)||r.a.isArrayBuffer(e)?e.byteLength:(r.a.isURLSearchParams(e)&&(e+=""),r.a.isString(e)?(await oe(e)).byteLength:void 0)})(t):n};var fe=ie&&(async e=>{let{url:t,method:n,data:i,signal:o,cancelToken:s,timeout:a,onDownloadProgress:c,onUploadProgress:u,responseType:l,headers:d,withCredentials:h="same-origin",fetchOptions:f}=K(e);l=l?(l+"").toLowerCase():"text";let p,g=Q([o,s&&s.toAbortSignal()],a);const m=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let y;try{if(u&&ce&&"get"!==n&&"head"!==n&&0!==(y=await he(d,i))){let e,n=new Request(t,{method:"POST",body:i,duplex:"half"});if(r.a.isFormData(i)&&(e=n.headers.get("content-type"))&&d.setContentType(e),n.body){const[e,t]=B(y,F(H(u)));i=ne(n.body,65536,e,t)}}r.a.isString(h)||(h=h?"include":"omit");const o="credentials"in Request.prototype;p=new Request(t,{...f,signal:g,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:i,duplex:"half",credentials:o?h:void 0});let s=await fetch(p);const a=ue&&("stream"===l||"response"===l);if(ue&&(c||a&&m)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=s[t]});const t=r.a.toFiniteNumber(s.headers.get("content-length")),[n,i]=c&&B(t,F(H(c),!0))||[];s=new Response(ne(s.body,65536,n,()=>{i&&i(),m&&m()}),e)}l=l||"text";let v=await le[r.a.findKey(le,l)||"text"](s,e);return!a&&m&&m(),await new Promise((t,n)=>{V(t,n,{data:v,headers:x.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:p})})}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new v.a("Network Error",v.a.ERR_NETWORK,e,p),{cause:t.cause||t});throw v.a.from(t,t&&t.code,e,p)}});const ve={http:M.a,xhr:X,fetch:fe};r.a.forEach(ve,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const pe=e=>"- "+e,ge=e=>r.a.isFunction(e)||null===e||!1===e;var me=e=>{e=r.a.isArray(e)?e:[e];const{length:t}=e;let n,i;const o={};for(let r=0;r<t;r++){let t;if(n=e[r],i=n,!ge(n)&&(i=ve[(t=String(n)).toLowerCase()],void 0===i))throw new v.a(`Unknown adapter '${t}'`);if(i)break;o[t||"#"+r]=i}if(!i){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let n=t?e.length>1?"since :\n"+e.map(pe).join("\n"):" "+pe(e[0]):"as no adapter specified";throw new v.a("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return i};function ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new _(null,e)}function Ee(e){ye(e),e.headers=x.from(e.headers),e.data=D.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return me(e.adapter||A.adapter)(e).then((function(t){return ye(e),t.data=D.call(e,e.transformResponse,t),t.headers=x.from(t.headers),t}),(function(t){return N(t)||(ye(e),t&&t.response&&(t.response.data=D.call(e,e.transformResponse,t.response),t.response.headers=x.from(t.response.headers))),Promise.reject(t)}))}const be={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{be[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const we={};be.transitional=function(e,t,n){function i(e,t){return"[Axios v1.9.0] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,o)=>{if(!1===e)throw new v.a(i(r," has been removed"+(t?" in "+t:"")),v.a.ERR_DEPRECATED);return t&&!we[r]&&(we[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,o)}},be.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var Se={assertOptions:function(e,t,n){if("object"!=typeof e)throw new v.a("options must be an object",v.a.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let r=i.length;for(;r-- >0;){const o=i[r],s=t[o];if(s){const t=e[o],n=void 0===t||s(t,o,e);if(!0!==n)throw new v.a("option "+o+" must be "+n,v.a.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new v.a("Unknown option "+o,v.a.ERR_BAD_OPTION)}},validators:be};const ke=Se.validators;class Ie{constructor(e){this.defaults=e||{},this.interceptors={request:new f,response:new f}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=$(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:o}=t;void 0!==n&&Se.assertOptions(n,{silentJSONParsing:ke.transitional(ke.boolean),forcedJSONParsing:ke.transitional(ke.boolean),clarifyTimeoutError:ke.transitional(ke.boolean)},!1),null!=i&&(r.a.isFunction(i)?t.paramsSerializer={serialize:i}:Se.assertOptions(i,{encode:ke.function,serialize:ke.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Se.assertOptions(t,{baseUrl:ke.spelling("baseURL"),withXsrfToken:ke.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&r.a.merge(o.common,o[t.method]);o&&r.a.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=x.concat(s,o);const a=[];let c=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const u=[];let l;this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));let d,h=0;if(!c){const e=[Ee.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,u),d=e.length,l=Promise.resolve(t);h<d;)l=l.then(e[h++],e[h++]);return l}d=a.length;let f=t;for(h=0;h<d;){const e=a[h++],t=a[h++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=Ee.call(this,f)}catch(e){return Promise.reject(e)}for(h=0,d=u.length;h<d;)l=l.then(u[h++],u[h++]);return l}getUri(e){return h(G((e=$(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}r.a.forEach(["delete","get","head","options"],(function(e){Ie.prototype[e]=function(t,n){return this.request($(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.a.forEach(["post","put","patch"],(function(e){function t(t){return function(n,i,r){return this.request($(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Ie.prototype[e]=t(),Ie.prototype[e+"Form"]=t(!0)}));var Ae=Ie;class Te{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const i=new Promise(e=>{n.subscribe(e),t=e}).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e((function(e,i,r){n.reason||(n.reason=new _(e,i,r),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Te((function(t){e=t})),cancel:e}}}var Ce=Te;const Oe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Oe).forEach(([e,t])=>{Oe[t]=e});var Ue=Oe;const Re=function e(t){const n=new Ae(t),i=Object(o.a)(Ae.prototype.request,n);return r.a.extend(i,Ae.prototype,n,{allOwnKeys:!0}),r.a.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return e($(t,n))},i}(A);Re.Axios=Ae,Re.CanceledError=_,Re.CancelToken=Ce,Re.isCancel=N,Re.VERSION="1.9.0",Re.toFormData=s.a,Re.AxiosError=v.a,Re.Cancel=Re.CanceledError,Re.all=function(e){return Promise.all(e)},Re.spread=function(e){return function(t){return e.apply(null,t)}},Re.isAxiosError=function(e){return r.a.isObject(e)&&!0===e.isAxiosError},Re.mergeConfig=$,Re.AxiosHeaders=x,Re.formToJSON=e=>k(r.a.isHTMLForm(e)?new FormData(e):e),Re.getAdapter=me,Re.HttpStatusCode=Ue,Re.default=Re;var Le=Re;const{Axios:xe,AxiosError:De,CanceledError:Ne,isCancel:Pe,CancelToken:_e,VERSION:Me,all:Ve,Cancel:je,isAxiosError:qe,spread:Fe,toFormData:Be,AxiosHeaders:He,HttpStatusCode:ze,formToJSON:Je,getAdapter:We,mergeConfig:Ze}=Le},function(e,t,n){"use strict";n.r(t),n.d(t,"Desktop",(function(){return Me}));var i=n(0);const r=Object(i.createLogger)("agentx-js-api"),o=(e,t)=>({info:(...n)=>e.info(t,...n),warn:(...n)=>e.warn(t,...n),error:(...n)=>e.error(t,...n)});class s{constructor(e){this.logger=e.logger}check(e){return e?!!e.isInited||(this.logger.error("SERVICE still not initialized... Await it's init(...) first."),!1):(this.logger.error("SERVICE is not defined..."),!1)}}const a=e=>new s(e);var c=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};const u={rps:120,tag:"jsapi"},l={rps:0,tag:"jsapi"},d={tag:"jsapi"},h=e=>e.actionsChannels.createSource("fireGeneralSilentNotification/Req",u),f=e=>e.actionsChannels.createSource("fireGeneralAutoDismissNotification/Req",l),v=e=>e.actionsChannels.createDestination("fireGeneralAutoDismissNotification/Res",l),p=e=>e.actionsChannels.createSource("fireGeneralAcknowledgeNotification/Req",l),g=e=>e.actionsChannels.createDestination("fireGeneralAcknowledgeNotification/Res",l),m=e=>e.actionsChannels.createSource("addCustomTask",u),y=e=>e.actionsChannels.createSource("getToken/Req",l),E=e=>e.actionsChannels.createDestination("getToken/Res",d),b=e=>e.actionsChannels.createSource("getTaskMap/Req",l),w=e=>e.actionsChannels.createDestination("getTaskMap/Res",d),S=e=>e.actionsChannels.createSource("getMediaTypeQueue/Req",l),k=e=>e.actionsChannels.createDestination("getMediaTypeQueue/Res",d),I=e=>e.actionsChannels.createSource("getIdleCodes/Req",l),A=e=>e.actionsChannels.createDestination("getIdleCodes/Res",d),T=e=>e.actionsChannels.createSource("getWrapUpCodes/Req",l),C=e=>e.actionsChannels.createDestination("getWrapUpCodes/Res",d);class O{checkService(){return this.serviceChecker.check(this.SERVICE)}getNextReqId(){const e=Date.now();return this.lastReqTs!==e?(this.lastReqTs=e,this.lastReqN=0):this.lastReqN++,`${this.lastReqTs}_${this.lastReqN}`}constructor(e){this.lastReqTs=Date.now(),this.lastReqN=0,this.toggleMiximizeRestore=e=>{var t;if(e&&e.target){const n=null===(t=this.getClosestElement(e.target,".dynamic-widget-wrapper"))||void 0===t?void 0:t.id;if(n){const e=new CustomEvent("toggle-maximize-restore",{detail:{widgetId:n}});window.dispatchEvent(e),r.info("Dispatching toggle-maximize-restore event for widgetId:",n)}}},this.toggleVoiceInteractionPanel=()=>{window.dispatchEvent(new CustomEvent("toggle-voice-interaction-panel")),r.info("Dispatching toggl-voice-interaction-panel")},this.toggleMuteUnmuteWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-mute-unmute",{});window.dispatchEvent(e),r.info("Dispatching ax-web-call-mute-unmute event")},this.declineWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-decline",{});window.dispatchEvent(e),r.info("Dispatching ax-web-call-decline event")},this.acceptWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-answer",{});window.dispatchEvent(e),r.info("Dispatching ax-web-call-answer event")},this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.sourceActionsChannels={fireGeneralSilentNotification:h(this.SERVICE),fireGeneralAutoDismissNotification:f(this.SERVICE),fireGeneralAcknowledgeNotification:p(this.SERVICE),addCustomTask:m(this.SERVICE),getToken:y(this.SERVICE),getTaskMap:b(this.SERVICE),getMediaTypeQueue:S(this.SERVICE),getIdleCodes:I(this.SERVICE),getWrapUpCodes:T(this.SERVICE)},this.destinationActionsChannels={fireGeneralAutoDismissNotification:v(this.SERVICE),fireGeneralAcknowledgeNotification:g(this.SERVICE),getToken:E(this.SERVICE),getTaskMap:w(this.SERVICE),getMediaTypeQueue:k(this.SERVICE),getIdleCodes:A(this.SERVICE),getWrapUpCodes:C(this.SERVICE)},this.logger.info("Inited"))}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}fireGeneralSilentNotification(...e){this.checkService()&&this.sourceActionsChannels.fireGeneralSilentNotification.send(...e)}fireGeneralAutoDismissNotification(...e){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(t=>{const n=this.getNextReqId(),r=({args:[e,o,s,a]})=>{a===n&&(s!==i.Notifications.ItemMeta.Mode.AutoDismiss&&s!==i.Notifications.ItemMeta.Mode.Silent||e===i.Notifications.ItemMeta.Status.Deactivated&&(t([e,o,s]),this.destinationActionsChannels.fireGeneralAutoDismissNotification.removeListener(r)))};this.destinationActionsChannels.fireGeneralAutoDismissNotification.addListener(r),this.sourceActionsChannels.fireGeneralAutoDismissNotification.send(...e)})}))}fireGeneralAcknowledgeNotification(...e){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(t=>{const n=this.getNextReqId(),r=({args:[e,o,s,a]})=>{a===n&&(s!==i.Notifications.ItemMeta.Mode.Acknowledge&&s!==i.Notifications.ItemMeta.Mode.Silent||e===i.Notifications.ItemMeta.Status.Deactivated&&(t([e,o,s]),this.destinationActionsChannels.fireGeneralAcknowledgeNotification.removeListener(r)))};this.destinationActionsChannels.fireGeneralAcknowledgeNotification.addListener(r),this.sourceActionsChannels.fireGeneralAcknowledgeNotification.send(...e)})}))}addCustomTask(...e){this.checkService()&&this.sourceActionsChannels.addCustomTask.send(...e)}getTaskMap(){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(e=>{const t=this.getNextReqId(),n=({args:[i,r]})=>{r===t&&(e(i),this.destinationActionsChannels.getTaskMap.removeListener(n))};this.destinationActionsChannels.getTaskMap.addListener(n),this.sourceActionsChannels.getTaskMap.send(t)})}))}getMediaTypeQueue(e){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(t=>{const n=this.getNextReqId(),i=({args:[e,r]})=>{r===n&&(t(e),this.destinationActionsChannels.getMediaTypeQueue.removeListener(i))};this.destinationActionsChannels.getMediaTypeQueue.addListener(i),this.sourceActionsChannels.getMediaTypeQueue.send(e,n)})}))}getToken(){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(e=>{const t=this.getNextReqId(),n=({args:[i,r]})=>{r===t&&(e(i),this.destinationActionsChannels.getToken.removeListener(n))};this.destinationActionsChannels.getToken.addListener(n),this.sourceActionsChannels.getToken.send(t)})}))}getIdleCodes(){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(e=>{const t=this.getNextReqId(),n=({args:[i,r]})=>{r===t&&(e(i),this.destinationActionsChannels.getIdleCodes.removeListener(n))};this.destinationActionsChannels.getIdleCodes.addListener(n),this.sourceActionsChannels.getIdleCodes.send(t)})}))}getWrapUpCodes(){return c(this,void 0,void 0,(function*(){if(this.checkService())return yield new Promise(e=>{const t=this.getNextReqId(),n=({args:[i,r]})=>{r===t&&(e(i),this.destinationActionsChannels.getWrapUpCodes.removeListener(n))};this.destinationActionsChannels.getWrapUpCodes.addListener(n),this.sourceActionsChannels.getWrapUpCodes.send(t)})}))}getClosestElement(e,t){return e&&e!==document&&e!==window?e instanceof ShadowRoot?this.getClosestElement(e.host,t):e instanceof HTMLElement&&e.matches(t)?e:this.getClosestElement(e.parentNode,t):null}}const U=o(r,"[Actions JSAPI] =>");class R{constructor(e){this.isInited=!1,this.listeners=new Map,this.listenersOnce=new Map,this.logger=e.logger}init(e){this.aqmServiceEntity=e.aqmServiceEntity,this.aqmServiceEntityString=e.aqmServiceEntityString,this.isInited=!0}cleanup(){this.removeAllEventListeners(),this.aqmServiceEntity=void 0,this.aqmServiceEntityString=void 0,this.isInited=!1}_addEventListener(e,t,n){var i,r,o;const s=n?"listenersOnce":"listeners";this[s].has(e)||this[s].set(e,new Map);const a=this[s].get(e),c=n?"listenOnce":"listen",u=i=>{let r=null;return n&&(r=this.aqmServiceEntity[e].listenOnce(()=>this.removeOnceEventListener(e,t))),()=>{var t;if(i){n?(i.stopListenOnce(),r&&r.stopListenOnce()):i.stopListen();const o=[];o.push(`UnBound "${e.toString()}"`),n&&o.push("Once"),this.aqmServiceEntityString&&o.push(`from "${this.aqmServiceEntityString}"`),null===(t=this.logger)||void 0===t||t.info(o.join(" "))}}};if(this.aqmServiceEntity)if(e in this.aqmServiceEntity&&c in this.aqmServiceEntity[e]){const r=this.aqmServiceEntity[e][c](t);a.set(t,u(r));const o=[];o.push(`Bound "${e.toString()}"`),n&&o.push("Once"),this.aqmServiceEntityString&&o.push(`to "${this.aqmServiceEntityString}"`),null===(i=this.logger)||void 0===i||i.info(o.join(" "))}else null===(r=this.logger)||void 0===r||r.warn(`EventName "${e.toString()}" is not recognized, so won't be subscribed...`);else null===(o=this.logger)||void 0===o||o.error(`"${this.aqmServiceEntityString}" is not ready yet. .init(...) first...`)}_removeEventListener(e,t,n){const i=n?"listenersOnce":"listeners";if(this[i].has(e)){const n=this[i].get(e);if(n){if(n.has(t)){n.get(t)(),n.delete(t)}n.size<1&&this[i].delete(e)}}}addEventListener(e,t){this._addEventListener(e,t,!1)}addOnceEventListener(e,t){this._addEventListener(e,t,!0)}removeEventListener(e,t){this._removeEventListener(e,t,!1)}removeOnceEventListener(e,t){this._removeEventListener(e,t,!0)}removeAllEventListeners(){["listeners","listenersOnce"].forEach(e=>{this[e].forEach((e,t)=>{e.forEach((e,t)=>e()),e.clear()}),this[e].clear()})}}const L=e=>new R(e);var x,D,N,P,_,M,V,j,q;!function(e){e.TELEPHONY="telephony",e.CHAT="chat",e.EMAIL="email",e.SOCIAL="social",e.MIDCALL_TELEPHONY="midcall telephony",e.APPLE_MESSAGES="appleMessages"}(x||(x={})),function(e){e.QUEUE="queue",e.DIAL_NUMBER="dialNumber",e.AGENT="agent",e.EPDN="entrypointDialNumber",e.ENTRY_POINT="entryPoint"}(D||(D={})),function(e){e.IDLE="Idle",e.AVAILABLE="Available",e.RONA="RONA"}(N||(N={})),function(e){e.All="All",e.TELEPHONY="telephony",e.CHAT="chat",e.EMAIL="email",e.SOCIAL="social"}(P||(P={})),function(e){e.SMS="SMS",e.TELEPHONY="Call",e.CHAT="Chat",e.EMAIL="Email",e.MESSENGER="Messenger",e.WHATSAPP="WhatsApp",e.APPLE_BUSINESS_CHAT="Apple Business Chat",e.GOOGLE_BUSINESS_MESSAGES="Google's Business Messages"}(_||(_={})),function(e){e.MIDCALL="midcall",e.ADHOC="adhoc",e.CONTINUOUS="continuous"}(M||(M={})),function(e){e.EMAIL="email",e.CHAT="chat",e.TELEPHONY="telephony",e.SOCIAL="social",e.SMS="sms",e.FACEBOOK="facebook",e.WHATSAPP="whatsapp",e.APPLEMESSAGES="appleMessages",e.GOOGLEMESSAGES="googleMessages"}(V||(V={})),(q=j||(j={})).validateAgentState=e=>Object.values(N).includes(e),q.validateURL=e=>/^[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/.test(e),q.validateChannelName=e=>Object.values(_).includes(e),q.validateDestinationType=e=>Object.values(D).includes(e),q.validateMediaType=e=>Object.values(x).includes(e),q.validateUTCTimeStampNumberFormat=e=>Number.isInteger(e)&&e>=0&&e<=4102444799999,q.validateNumber=e=>Number.isInteger(e)&&e>=0&&e<=2147483647,q.validateBoolean=e=>"boolean"==typeof e||(0===e||1===e)&&q.validatePropValueNotNullAndEmpty(e),q.validateStringToBoolean=e=>{const t=e.toLowerCase();return"true"===t||"false"===t||"0"===t||"1"===t},q.validatePropValueNotNullAndEmpty=e=>null!==e&&""!==e,q.validateChannelType=e=>Object.values(_).includes(e),q.validateMonitorType=e=>Object.values(M).includes(e),q.validateUUID=e=>/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(e),q.validateStringNumberOnly=e=>/^(\+)?\d+$/.test(e),q.validateBuddyAgents=(e,t)=>{i.AssertUtils.check(q.validateUUID(e.agentProfileId),t,"agentProfileId is not a valid UUID"),i.AssertUtils.check(q.validateChannelName(e.channelName),t,"channelName is not a valid channel name"),void 0!==e.state&&i.AssertUtils.check(q.validateAgentState(e.state),t,"state is not a valid state"),void 0!==e.trackingId&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.trackingId),t,"trackingId is not a valid string")},q.validateAuxCodeType=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e),t,"value is null or empty"),i.AssertUtils.check("IDLE_CODE"===e||"WRAP_UP_CODE"===e,t,"value is not IDLE_CODE or WRAP_UP_CODE")},q.validateAuxCodePayload=(e,t)=>{q.validateAuxCodeType(e.workType,t),void 0!==e.page&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.page),t,"page is is null or empty"),void 0!==e.pageSize&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.pageSize),t,"pageSize is is null or empty"),void 0!==e.search&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.search),t,"search is is null or empty"),void 0!==e.customFilter&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.customFilter),t,"customFilter is is null or empty")},q.validateCancelCtq=(e,t)=>{i.AssertUtils.check(q.validateUUID(e.agentId),t,"agentId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(e.queueId),t,"queueId is not a valid UUID")},q.validateWrapupPayload=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.wrapUpReason),t,"wrapUpReason is not a valid string"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.auxCodeId),t,"auxCodeId is not a valid string"),i.AssertUtils.check(q.validateStringToBoolean(e.isAutoWrapup),t,"isAutoWrapup is not a valid boolean value")},q.validateVTeamTransferPayload=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.vteamId),t,"vteamId is not a valid string"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.vteamType),t,"vteamType is not a valid string")},q.validateBlindTransferPayload=(e,t)=>{i.AssertUtils.check(q.validateUUID(e.agentId),t,"agentId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(e.destAgentId),t,"destAgentId is not a valid UUID"),i.AssertUtils.check(q.validateMediaType(e.mediaType),t,"mediaType is not a valid media type"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.destAgentTeamId),t,"destAgentTeamId is not a valid string"),i.AssertUtils.check(q.validateStringNumberOnly(e.destAgentDN),t,"destAgentDN is not a numbers only string"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.destSiteId),t,"destSiteId is not a valid string")},q.validateConsultPayload=(e,t)=>{i.AssertUtils.check(q.validateUUID(e.agentId),t,"agentId is not a valid UUID"),void 0!==e.destAgentId&&i.AssertUtils.check(q.validateUUID(e.destAgentId),t,"destAgentId is not a valid UUID"),void 0!==e.mediaType&&i.AssertUtils.check(q.validateMediaType(e.mediaType),t,"mediaType is not a valid media type"),void 0!==e.holdParticipants&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.holdParticipants),t,"holdParticipants is not valid")},q.validateConsultTransferPayLoad=(e,t)=>{void 0!==e.agentId&&i.AssertUtils.check(q.validateUUID(e.agentId),t,"agentId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(e.destAgentId),t,"destagentId is not a valid UUID"),i.AssertUtils.check(q.validateMediaType(e.mediaType),t,"mediaType is not a valid media type"),i.AssertUtils.check(q.validateUUID(e.mediaResourceId),t,"mediaResourceId is not a valid UUID"),i.AssertUtils.check(q.validateDestinationType(e.destinationType),t,"destinationType is not a valid destination type")},q.validateWrapUpV2Payload=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.wrapUpReason),t,"wrapUpReason is not a valid string"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.auxCodeId),t,"auxCodeId is not a valid string")},q.validateChangeAgentStateType=(e,t)=>{i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.state),t,"state is null or empty"),i.AssertUtils.check("available"===e.state.toLowerCase()||"idle"===e.state.toLowerCase(),t,"state is not Available or Idle"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.auxCodeId),t,"auxCodeId is null or empty"),i.AssertUtils.check(q.validateUUID(e.agentId),t,"agentId is not a valid UUID")},q.validateConsultDataV2Payload=(e,t)=>{void 0!==e.to&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.to),t,"to is not a valid string or not undefined"),i.AssertUtils.check(q.validateDestinationType(e.destinationType),t,"destinationType is not a valid destination type"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.holdParticipants),t,"holdParticipants is not valid")},q.validateConsultConferenceDataV2Payload=(e,t)=>{void 0!==e.agentId&&i.AssertUtils.check(q.validateUUID(e.agentId),t,"agentId is not a valid UUID"),void 0!==e.to&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.to),t,"to is not a valid string or not undefined"),i.AssertUtils.check(q.validateDestinationType(e.destinationType),t,"destinationType is not a valid destination type")},q.validateTransferV2Payload=(e,t)=>{void 0!==e.to&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.to),t,"to is not a valid string or not undefined"),i.AssertUtils.check(q.validateDestinationType(e.destinationType),t,"destinationType is not a valid destination type")},q.validateBuddyAgentsV2Payload=(e,t)=>{i.AssertUtils.check(q.validateUUID(e.agentProfileId),t,"agentProfileId is not a valid UUID"),i.AssertUtils.check(q.validateMediaType(e.mediaType),t,"mediaType is not a valid media type"),i.AssertUtils.check(q.validateAgentState(e.state),t,"state is not a valid state")},q.validateVTeam=(e,t)=>{i.AssertUtils.check(q.validateUUID(e.agentProfileId),t,"agentProfileId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(e.agentSessionId),t,"agentSessionId is not a valid UUID"),i.AssertUtils.check(q.validateChannelType(e.channelType),t,"channelType is not a valid channel type"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.type),t,"type is not a valid string"),void 0!==e.trackingId&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.trackingId),t,"trackingId is not a valid string")},q.validateDialerTasks=(e,t)=>{e.id&&i.AssertUtils.check(q.validateUUID(e.id),t,"id is not a valid UUID"),i.AssertUtils.check(q.validateUUID(e.entryPointId),t,"entryPointId is not a valid UUID"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.destination),t,"destination is null or empty"),i.AssertUtils.check(q.validateUUID(e.direction),t,"direction is not a valid UUID"),e.origin&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.origin),t,"origin is null or empty"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.attributes.key),t,"attributes.key is null or empty"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.attributes.value),t,"attributes.value is null or empty"),i.AssertUtils.check(q.validateMediaType(e.mediaType),t,"mediaType is not a valid media type"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.outboundType),t,"outboundType is null or empty")},q.validatePreviewCampaignPayload=(e,t)=>{i.AssertUtils.check(q.validateUUID(e.interactionId),t,"interactionId is not a valid UUID"),i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.campaignId),t,"campaignId is null or empty")},q.validateMonitoringRequest=(e,t)=>{i.AssertUtils.check(q.validateUUID(e.id),t,"id is not a valid UUID"),i.AssertUtils.check(q.validateMonitorType(e.monitorType),t,"monitorType is not a valid monitor type"),void 0!==e.queueIds&&e.queueIds.forEach(e=>{i.AssertUtils.check(q.validateUUID(e),t,"queueIds is not a valid UUID")}),void 0!==e.teams&&e.teams.forEach(e=>{i.AssertUtils.check(q.validateUUID(e),t,"team is not a valid UUID")}),void 0!==e.sites&&e.sites.forEach(e=>{i.AssertUtils.check(q.validateUUID(e),t,"site is not a valid UUID")}),void 0!==e.agents&&e.agents.forEach(e=>{i.AssertUtils.check(q.validateUUID(e),t,"agent is not a valid UUID")}),void 0!==e.startUTCTimestamp&&i.AssertUtils.check(q.validateUTCTimeStampNumberFormat(e.startUTCTimestamp),t,"startUTCTimestamp is not a valid timestamp"),void 0!==e.continuousDuration&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.continuousDuration),t,"continuousDuration is not a valid string or not undefined"),void 0!==e.taskId&&i.AssertUtils.check(q.validateUUID(e.taskId),t,"taskId is not a valid UUID"),i.AssertUtils.check(q.validateUUID(e.trackingId),t,"trackingId is not a valid UUID"),e.invisibleMode&&i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(e.invisibleMode),t,"invisibleMode is not a valid string or not undefined")},q.validateMultiConsultPayload=(e,t)=>{Object.entries(e).forEach(([e,n])=>{switch(e){case"agentId":i.AssertUtils.check(q.validateUUID(String(n)),t,"agentId is not a valid UUID");break;case"destAgentId":i.AssertUtils.check(q.validateUUID(String(n)),t,"destAgentId is not a valid UUID");break;case"mediaType":i.AssertUtils.check(q.validateMediaType(n),t,"mediaType is not a valid media type");break;case"holdParticipants":i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(n),t,"holdParticipants is not valid");break;case"destAgentDN":i.AssertUtils.check(q.validateStringNumberOnly(String(n)),t,"destAgentDN is not a numbers only string");break;case"destinationType":i.AssertUtils.check(q.validateDestinationType(n),t,"destinationType is not a valid destination type");break;case"destAgentTeamId":i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(String(n)),t,"destAgentTeamId is not a valid string");break;case"destSiteId":i.AssertUtils.check(q.validatePropValueNotNullAndEmpty(String(n)),t,"destSiteId is not a valid string");break;case"queueId":i.AssertUtils.check(q.validateUUID(String(n)),t,"queueId is not a valid UUID");break;case"trackingId":i.AssertUtils.check(q.validateUUID(String(n)),t,"trackingId is not a valid string")}})};var F=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class B{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.contact,aqmServiceEntityString:"SERVICE.aqm.contact"}),this.logger.info("Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}sendDtmf(e){this.checkService()&&this.SERVICE.webCalling.sendDTMF(e)}accept(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"accept","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.accept(e)}))}consultAccept(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultAccept","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultAccept(e)}))}buddyAgents(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return j.validateBuddyAgents(e.data,"buddyAgents"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.buddyAgents(e)}))}end(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"end","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.end(e)}))}consultEnd(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultEnd","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(e.isConsult),"consultEnd","isConsult is not a valid boolean value"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultEnd(e)}))}cancelCtq(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"cancelCtq","interactionId is not a valid UUID"),j.validateCancelCtq(e.data,"cancelCtq"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.cancelCtq(e)}))}wrapup(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"cancelCtq","interactionId is not a valid UUID"),j.validateWrapupPayload(e.data,"wrapup"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.wrapup(e)}))}vteamTransfer(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"cancelCtq","interactionId is not a valid UUID"),j.validateVTeamTransferPayload(e.data,"vteamTransfer"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.vteamTransfer(e)}))}blindTransfer(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"blindTransfer","interactionId is not a valid UUID"),j.validateBlindTransferPayload(e.data,"blindTransfer"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.blindTransfer(e)}))}hold(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"hold","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(e.data.mediaResourceId),"hold","mediaResourceId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.hold(e)}))}unHold(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"unHold","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(e.data.mediaResourceId),"unHold","mediaResourceId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.unHold(e)}))}consult(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consult","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateURL(e.url),"consult","url is not a valid URL"),j.validateMultiConsultPayload(e.data,"consult"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consult(e)}))}consultConference(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultConference","interactionId is not a valid UUID"),j.validateConsultPayload(e.data,"consultConference"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultConference(e)}))}decline(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"decline","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(e.data.mediaResourceId),"decline","mediaResourceId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(e.isConsult),"decline","isConsult is not a valid boolean value"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.decline(e)}))}consultTransfer(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"decline","interactionId is not a valid UUID"),j.validateConsultTransferPayLoad(e.data,"consultTransfer"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultTransfer(e)}))}vteamList(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return j.validateVTeam(e.data,"vteamList"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.vteamList(e)}))}pauseRecording(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"pauseRecording","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.pauseRecording(e)}))}resumeRecording(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"resumeRecording","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(e.data.autoResumed),"resumeRecording","autoResumed is not a valid boolean value"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.resumeRecording(e)}))}acceptV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"acceptV2","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.acceptV2(e)}))}endV2(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endV2","interactionId is not a valid UUID"),e.isEndingFromNonPrimary&&i.AssertUtils.check(j.validateBoolean(e.isEndingFromNonPrimary),"endV2","isEndingFromNonPrimary is not a valid boolean value"),(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.endV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.endV2(e):void 0}))}cancelTaskV2(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"cancelTaskV2","interactionId is not a valid UUID"),(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.cancelTaskV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.cancelTaskV2(e):void 0}))}pauseRecordingV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"pauseRecordingV2","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.pauseRecordingV2(e)}))}resumeRecordingV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"resumeRecordingV2","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(e.data.autoResumed),"resumeRecordingV2","autoResumed is not a valid boolean value"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.resumeRecordingV2(e)}))}wrapupV2(e){var t,n;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"wrapupV2","interactionId is not a valid UUID"),j.validateWrapUpV2Payload(e.data,"wrapupV2"),(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.wrapupV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.wrapupV2(e):void 0}))}consultV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultV2","interactionId is not a valid UUID"),j.validateConsultDataV2Payload(e.data,"consultV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultV2(e)}))}consultEndV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultEndV2","interactionId is not a valid UUID"),i.AssertUtils.check(j.validateBoolean(e.isConsult),"consultEndV2","isConsult is not a valid boolean value"),e.isSecondaryEpDnAgent&&i.AssertUtils.check(j.validateBoolean(e.isSecondaryEpDnAgent),"consultEndV2","isSecondaryEpDnAgent is not a valid boolean value"),e.queueId&&i.AssertUtils.check(j.validateUUID(e.queueId),"consultEndV2","queueId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultEndV2(e)}))}consultConferenceV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultConferenceV2","interactionId is not a valid UUID"),j.validateConsultConferenceDataV2Payload(e.data,"consultConferenceV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultConferenceV2(e)}))}exitConference(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"exitConference","interactionId is not a valid UUID"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.exitConference(e)}))}consultTransferV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"consultTransferV2","interactionId is not a valid UUID"),j.validateTransferV2Payload(e.data,"consultTransferV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.consultTransferV2(e)}))}blindTransferV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"blindTransferV2","interactionId is not a valid UUID"),j.validateTransferV2Payload(e.data,"blindTransferV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.blindTransferV2(e)}))}vteamTransferV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"vteamTransferV2","interactionId is not a valid UUID"),j.validateTransferV2Payload(e.data,"vteamTransferV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.vteamTransferV2(e)}))}buddyAgentsV2(e){var t;return F(this,void 0,void 0,(function*(){if(this.checkService())return j.validateBuddyAgentsV2Payload(e.data,"buddyAgentsV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.buddyAgentsV2(e)}))}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const H=o(r,"[AgentContact JSAPI] =>"),z=o(H,"[AqmServiceEvents: Contact] => ");var J=n(8),W=n.n(J),Z=n(15),G=n.n(Z),Y=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};const $={agentName:void 0,agentProfileID:void 0,agentSessionId:void 0,idleCode:void 0,teamId:void 0,teamName:void 0,dn:void 0,status:void 0,subStatus:void 0,idleCodes:void 0,wrapupCodes:void 0,outDialRegex:void 0,isOutboundEnabledForTenant:void 0,isOutboundEnabledForAgent:void 0,isEndCallEnabled:void 0,isEndConsultEnabled:void 0,allowConsultToQueue:void 0,isAdhocDialingEnabled:void 0,isAgentAvailableAfterOutdial:void 0,isCampaignManagementEnabled:void 0,agentPersonalStatsEnabled:void 0};class K{checkService(){return this.serviceChecker.check(this.SERVICE)}emit(e,...t){this.emitter.emit(e,...t)}update(e){const t=Object.keys(e).reduce((t,n)=>{const i=e[n],r=this.latestData[n];return JSON.stringify(i)!==JSON.stringify(r)&&t.push({name:n,value:i,oldValue:r}),t},[]);t.length&&(t.forEach(e=>this.latestData[e.name]=e.value),this.emit("updated",t))}static getOutdialRegex(e){if(e&&e.dialPlanEntity){const t=e.dialPlanEntity.find(e=>"Any Format"===e.name);if(t)return t.regex}return""}constructor(e){this.emitter=W()(),this.listeners=new Set,this.teams=[],this.idleCodes={},this.latestData=Object.assign({},$),this.logger=e.logger,this.serviceChecker=e.serviceChecker}static findTeamName(e,t){const n=e.find(e=>e.teamId===t);return(null==n?void 0:n.teamName)||""}init(e){return Y(this,void 0,void 0,(function*(){e&&(this.SERVICE=e),this.checkService()&&(yield this.fetchLatestData(),this.subscribeSelfDataEvents(),this.logger.info("Inited"))}))}cleanup(){this.unsubscribeSelfDataEvents(),this.removeAllEventListeners(),this.SERVICE=void 0,this.update(Object.assign({},$)),this.logger.info("Cleaned")}fetchLatestData(){var e,t,n,i,r,o;return Y(this,void 0,void 0,(function*(){const s=(null===(e=this.SERVICE)||void 0===e?void 0:e.conf.profile)?null===(t=this.SERVICE)||void 0===t?void 0:t.conf.profile:yield null===(n=this.SERVICE)||void 0===n?void 0:n.conf.fetchProfile();if(s){const{teams:e,agentName:t,agentProfileID:n,defaultDn:a,agentSubStatus:c,agentStatus:u,idleCodes:l,wrapupCodes:d,dialPlan:h,isOutboundEnabledForTenant:f,isOutboundEnabledForAgent:v,isAdhocDialingEnabled:p,isEndCallEnabled:g,isEndConsultEnabled:m,allowConsultToQueue:y,isAgentAvailableAfterOutdial:E,isCampaignManagementEnabled:b,agentPersonalStatsEnabled:w}=s;let{idleCode:S}=s;const k=a;let I=u,A=c;this.teams=e,null==l||l.forEach(e=>{this.idleCodes[e.id]={id:e.id,name:e.name}});const T=yield null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.agent.reload();(null==T?void 0:T.data)&&(S="0"!=T.data.auxCodeId&&T.data.auxCodeId?this.idleCodes[T.data.auxCodeId]:void 0,I=null===(r=null==T?void 0:T.data)||void 0===r?void 0:r.status,A=null===(o=null==T?void 0:T.data)||void 0===o?void 0:o.subStatus);const C=K.getOutdialRegex(h);this.update({agentName:t,agentProfileID:n,dn:k,status:I,subStatus:A,idleCode:S,idleCodes:l,wrapupCodes:d,outDialRegex:C,isOutboundEnabledForTenant:f,isOutboundEnabledForAgent:v,isAdhocDialingEnabled:p,isEndCallEnabled:g,isEndConsultEnabled:m,allowConsultToQueue:y,isAgentAvailableAfterOutdial:E,isCampaignManagementEnabled:b,agentPersonalStatsEnabled:w})}}))}subscribeSelfDataEvents(){var e,t,n,i;if(this.checkService()){{const t=null===(e=this.SERVICE)||void 0===e?void 0:e.aqm.agent.eAgentReloginSuccess.listen(({data:{agentSessionId:e="",teamId:t="",dn:n="",status:i="",subStatus:r="",auxCodeId:o=""}})=>{const s=K.findTeamName(this.teams,t);this.update({agentSessionId:e,teamId:t,teamName:s,dn:n,status:i,subStatus:r,idleCode:this.idleCodes[o]})});this.listeners.add(()=>null==t?void 0:t.stopListen())}{const e=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent.eAgentStationLoginSuccess.listen(({data:{agentSessionId:e="",teamId:t="",status:n="",subStatus:i="",auxCodeId:r=""}})=>{const o=K.findTeamName(this.teams,t);this.update({agentSessionId:e,teamId:t,teamName:o,status:n,subStatus:i,idleCode:this.idleCodes[r]})});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.agent.eAgentStateChangeSuccess.listen(({data:{agentSessionId:e="",status:t="",subStatus:n="",auxCodeId:i=""}})=>{var r;const o=this.idleCodes?null===(r=this.idleCodes[i])||void 0===r?void 0:r.name:"";this.update({agentSessionId:e,status:t,subStatus:n,idleCode:{id:i,name:o}})});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.agent.eAgentDNRegistered.listen(({data:{dn:e=""}})=>{this.update({dn:e})});this.listeners.add(()=>null==e?void 0:e.stopListen())}}}unsubscribeSelfDataEvents(){this.listeners.forEach(e=>e()),this.listeners.clear()}stateChange(e){var t,n,r;return Y(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.state),"stateChange","state is null or empty"),i.AssertUtils.check("available"===(null===(t=e.state)||void 0===t?void 0:t.toLowerCase())||"idle"===(null===(n=e.state)||void 0===n?void 0:n.toLowerCase()),"stateChange","state is not Available or Idle"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.auxCodeIdArray),"stateChange","auxCodeIdArray is null or empty"),null===(r=this.SERVICE)||void 0===r?void 0:r.aqm.agent.stateChange({data:e})}))}mockOutdialAniList(){var e,t;return Y(this,void 0,void 0,(function*(){if(this.checkService())return(null===(e=this.SERVICE)||void 0===e?void 0:e.aqm.agent.mockOutdialAniList)&&(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent.mockOutdialAniList())}))}fetchAddressBooks(){var e,t;return Y(this,void 0,void 0,(function*(){if(this.checkService())return(null===(e=this.SERVICE)||void 0===e?void 0:e.aqm.agent.fetchAddressBooks)&&(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent.fetchAddressBooks())}))}changeAgentState(e,t){var n;return Y(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e),"changeAgentState","orgId is not a valid UUID"),j.validateChangeAgentStateType(t,"changeAgentState"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.supervisor.changeAgentState({orgId:e,data:t})}))}fetchAgentIdleCodes(e,t){var n;return Y(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e),"fetchAgentIdleCodes","orgId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(t),"fetchAgentIdleCodes","agentId is not a valid UUID"),yield null===(n=this.SERVICE)||void 0===n?void 0:n.abs.fetchAgentIdleCodes({orgId:e,agentId:t})}))}fetchOrganizationIdleCodes(e){var t;return Y(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e),"fetchOrganizationIdleCodes","orgId is not a valid UUID"),yield null===(t=this.SERVICE)||void 0===t?void 0:t.abs.fetchIdleCodes({orgId:e,accessType:"ALL"})}))}addEventListener(e,t){this.checkService()&&this.emitter.on(e,t)}removeEventListener(e,t){this.checkService()&&this.emitter.off(e,t)}removeAllEventListeners(){G()(this.emitter)}}const X=o(r,"[AgentInfo JSAPI] =>");var Q=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class ee{waitUntil(e){return Q(this,void 0,void 0,(function*(){if("function"==typeof e){yield new Promise(e=>setTimeout(e,1e3/30));!e()&&(yield this.waitUntil(e))}}))}constructor(e){this.initEventType={},this.emitter=W()(),this.logger=e.logger,this.agentxSERVICE=e.SERVICE}checkService(e){return Q(this,void 0,void 0,(function*(){e?(e.isInited||(this.logger.warn("SERVICE is not inited. Awaiting it's initAgentxServices(...)..."),yield this.waitUntil(()=>e.isInited)),this.logger.info("SERVICE is inited. Continuing..."),this.emit("inited")):this.logger.error("SERVICE is not defiend...")}))}emit(e,...t){this.emitter.emit(e,...t)}init(e){return Q(this,void 0,void 0,(function*(){this.agentxSERVICE?yield this.checkService(this.agentxSERVICE):this.logger.error("SERVICE is not defined..."),this.initEventType.widgetName=e.widgetName,this.initEventType.widgetProvider=e.widgetProvider,this.publishEvent("agentx-js-sdk-init")}))}registerCrmConnector(e){if(window.self!==window.top){this.initEventType.crmPlatform=e.crmPlatform,this.initEventType.crmConnectorProvider=e.crmConnectorProvider||"Cisco",r.info(`CRm Connector registered through JS SDK... [crmPlatform: ${this.initEventType.crmPlatform}, widgetProvider: ${this.initEventType.crmConnectorProvider}] `);const t=document.referrer;r.info("This Desktop is loaded inside an iframe.",t),this.publishEvent("agentx-js-sdk-register-crm-connector")}else r.warn("This Desktop is not loaded inside an iframe. CRM Connector is not registered.")}publishEvent(e){const{crmPlatform:t,crmConnectorProvider:n,widgetName:i,widgetProvider:o}=this.initEventType,s=Object.assign({},...Object.entries(this.initEventType).map(([e,t])=>t?{[e]:t}:{}));this.logger.info("initEvent",s),r.info(`Publishing js sdk init ${e} event : [widgetName: ${i}, widgetProvider: ${o}, crmPlatform: ${t}, crmConnectorProvider: ${n}]`),this.agentxSERVICE&&this.agentxSERVICE.isInited&&this.agentxSERVICE.webexMetrics&&(r.info(`tracking behavioral for ${e} event `),this.agentxSERVICE.webexMetrics.trackBehavioralEvent(e,Object.assign({},s)))}cleanup(){this.agentxSERVICE=void 0,this.emit("cleaned"),this.logger.info("Cleaned")}get clientLocale(){return null!=window.navigator.languages?window.navigator.languages[0]:window.navigator.language}addEventListener(e,t){this.emitter.on(e,t)}removeEventListener(e,t){this.emitter.off(e,t)}}const te=o(r,"[Config JSAPI] =>");var ne=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class ie{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.dialer,aqmServiceEntityString:"SERVICE.aqm.dialer"}),this.logger.info("Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}startOutdial(e){var t;return ne(this,void 0,void 0,(function*(){if(this.checkService())return j.validateDialerTasks(e.data,"startOutdial"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.startOutdial(e)}))}previewCampaignAccept(e){var t;return ne(this,void 0,void 0,(function*(){if(this.checkService())return j.validatePreviewCampaignPayload(e.data,"previewCampaignAccept"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.acceptPreviewContact(e)}))}previewCampaignSkip(e){var t;return ne(this,void 0,void 0,(function*(){if(this.checkService())return j.validatePreviewCampaignPayload(e.data,"previewCampaignSkip"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.skipPreviewContact(e)}))}removePreviewContact(e){var t;return ne(this,void 0,void 0,(function*(){if(this.checkService())return j.validatePreviewCampaignPayload(e.data,"removePreviewContact"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.removePreviewContact(e)}))}updateCadVariables(e){var t;return ne(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"updateCadVariables","interactionId is not valid UUID"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.data.attributes.key),"updateCadVariables","attributes.key is not valid"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.data.attributes.value),"updateCadVariables","attributes.value is not valid"),e.secureCad&&e.secureCad.forEach(e=>{i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e),"updateCadVariables","secureCad is not valid")}),e.keyId&&i.AssertUtils.check(j.validateUUID(e.keyId),"updateCadVariables","keyId is not valid UUID"),e.keyVersion&&i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.keyVersion),"updateCadVariables","keyVersion is not valid"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.updateCadVariables(e)}))}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const re=o(r,"[Dialer JSAPI] =>"),oe=o(re,"[AqmServiceEvents: Dialer] =>");class se{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("Inited")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}createInstance(e){return i.I18N.createService(e)}createMixin(e){return i.I18N.createMixin(e)}get DEFAULT_INIT_OPTIONS(){var e;if(this.checkService())return null===(e=this.SERVICE)||void 0===e?void 0:e.i18n.DEFAULT_INIT_OPTIONS}getMergedInitOptions(...e){return i.I18N.mergeServiceInitOptions(...e)}}const ae=o(r,"[I18N JSAPI] =>");class ce{constructor(e){this.clientLoggers=new Map,this.logger=e.logger}createLogger(e){const t=Object(i.createLogger)(e);return this.clientLoggers.set(e,t),this.logger.info(`Client logger created: "${e}"`),t}cleanupLogs(e){this.clientLoggers.has(e)&&i.Logger.POOL.cleanupPrefixedLogs(e)}browserDownloadLogsJson(e){this.clientLoggers.has(e)&&i.Logger.POOL.browserDownloadPrefixedLogsJson(e)}browserDownloadLogsText(e){this.clientLoggers.has(e)&&i.Logger.POOL.browserDownloadPrefixedLogsText(e)}getLogsCollection(e){if(this.clientLoggers.has(e))return i.Logger.POOL.getPrefixedLogsCollection(e)}getLogsJsonUrl(e){if(this.clientLoggers.has(e))return i.Logger.POOL.getPrefixedLogsJsonUrl(e)}getLogsTextUrl(e){if(this.clientLoggers.has(e))return i.Logger.POOL.getPrefixedLogsTextUrl(e)}}const ue=o(r,"[Logger JSAPI] =>");class le{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.screenpop,aqmServiceEntityString:"SERVICE.aqm.screenpop"}),this.logger.info("Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const de=o(r,"[ScreenPop JSAPI] =>"),he=o(de,"[AqmServiceEvents: ScreenPop] =>");class fe{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("Inited")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}listenKeyPress(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.event.listenKeyPress(...e))}listenKeyConflict(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.event.listenKeyConflict(...e))}listenConflictResolved(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.event.listenConflictResolved(...e))}register(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.register(...e))}unregisterKeys(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.unregisterKeys(...e))}getRegisteredKeys(){var e;if(this.checkService())return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.getRegisteredKeys()}get DEFAULT_SHORTCUT_KEYS(){var e;return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.DEFAULT_SHORTCUT_KEYS}get MODIFIERS(){var e;return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.MODIFIERS}get REGISTERED_KEYS(){var e;return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.REGISTERED_KEYS}}const ve=o(r,"[ShortcutKey JSAPI] =>");var pe=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class ge{waitUntil(e){return pe(this,void 0,void 0,(function*(){if("function"==typeof e){yield new Promise(e=>setTimeout(e,1e3/30));!e()&&(yield this.waitUntil(e))}}))}checkService(){var e,t,n,i,r;return pe(this,void 0,void 0,(function*(){window.wxcc&&(null===(e=window.wxcc)||void 0===e?void 0:e.rtdwc)?((null===(n=null===(t=window.wxcc)||void 0===t?void 0:t.rtdwc)||void 0===n?void 0:n.error)&&(this.logger.error("RTDWC initialization failed. Awaiting Websocket connection to establish",null===(r=null===(i=window.wxcc)||void 0===i?void 0:i.rtdwc)||void 0===r?void 0:r.error),yield this.waitUntil(()=>{var e,t;return!(null===(t=null===(e=window.wxcc)||void 0===e?void 0:e.rtdwc)||void 0===t?void 0:t.error)})),this.logger.info("Websocket connection established successfully. Continue to subscribe...")):this.logger.error("issue in loading rtdwc")}))}constructor(e){this.emitter=W()(),this.logger=e.logger}init(){return pe(this,void 0,void 0,(function*(){yield this.checkService(),this.logger.info("rtdwc initialized")}))}subscribe({datasetName:e,update:t,error:n}){var i,r;return pe(this,void 0,void 0,(function*(){return yield this.checkService(),yield null===(r=null===(i=window.wxcc)||void 0===i?void 0:i.rtdwc)||void 0===r?void 0:r.subscribe({datasetName:e,update:t,error:n})}))}}const me=o(r,"[RTDWC JSAPI] =>");var ye=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class Ee{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.supervisor,aqmServiceEntityString:"SERVICE.aqm.supervisor"}),this.logger.info("[JSAPI] Monitoring Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}startMonitoring(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return j.validateMonitoringRequest(e.data,"startMonitoring"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.startMonitoring(e)}))}endMonitoring(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endMonitoring","interactionId is not valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.endMonitoring(e)}))}holdMonitoring(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endMonitoring","interactionId is not valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.holdMonitoring(e)}))}unHoldMonitoring(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endMonitoring","interactionId is not valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.unHoldMonitoring(e)}))}bargeIn(e){var t,n;return ye(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.interactionId),"endMonitoring","interactionId is not valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.bargeIn(e)}))}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const be=o(r,"[Call Monitoring JSAPI] =>"),we=o(be,"[AqmServiceEvents: Call Monitoring] =>");class Se{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("Inited")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}trackBehavioralEvent(...e){var t;if(this.checkService())try{r.info("[webexMetrics Internal JSAPI] => event=trackBehavioralEvent for",e),null===(t=this.SERVICE)||void 0===t||t.webexMetrics.trackBehavioralEvent(...e)}catch(e){r.error("[webexMetrics Internal JSAPI] => event=trackBehavioralEvent Error",e)}}}const ke=o(r,"[webexMetrics Internal JSAPI] =>");var Ie=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class Ae{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.agent,aqmServiceEntityString:"SERVICE.aqm.agent"}),this.logger.info("[JSAPI] Logout Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}desktopLogout(e){var t,n;return Ie(this,void 0,void 0,(function*(){if(!this.checkService())return;const r=yield Me.actions.getTaskMap();if(0!==(null==r?void 0:r.size))throw new Error("You cannot sign out now because you have active conversations. Complete them and try again.");return void 0!==e.data.logoutReason&&i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.data.logoutReason),"desktopLogout","logoutReason is null or empty"),void 0!==e.data.logoutReason&&i.AssertUtils.check("user requested logout"===e.data.logoutReason.toLowerCase()||"inactivity Logout"===e.data.logoutReason.toLowerCase(),"desktopLogout","logoutReason should be either 'User requested logout' or 'Inactivity Logout'"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent)||void 0===n?void 0:n.logout(e)}))}signoutAgent(e){var t,n;return Ie(this,void 0,void 0,(function*(){if(this.checkService())try{return r.info("[App:TPW] event=signoutAgentBySupervisor for agent ",e.data.agentId),i.AssertUtils.check(j.validateUUID(e.orgId),"signoutAgent","orgId is not a valid UUID"),i.AssertUtils.check(j.validateUUID(e.data.agentId),"signoutAgent","agentId is not a valid UUID"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.data.logoutReason),"signoutAgent","logoutReason is null or empty"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===n?void 0:n.signoutAgent(e)}catch(t){r.error("[App:TPW] event=signoutAgentBySupervisorFailed for agent ",e.data.agentId,t)}}))}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const Te=o(r,"[Station Logout JSAPI] =>"),Ce=o(Te,"[AqmServiceEvents: Call Monitoring] =>");class Oe{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){var t,n;e&&(this.SERVICE=e),this.checkService()?(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.aiAssistant,aqmServiceEntityString:"SERVICE.aqm.aiAssistant"}),this.logger.info("AiAssistantJsApi inited.")):null===(n=(t=this.logger).warn)||void 0===n||n.call(t,"Service check failed")}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned AiAssistantJsApi.")}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const Ue=o(r,"[AI Assistant JSAPI] =>"),Re=o(Ue,"[AqmServiceEvents: AiAssistant] =>");var Le=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class xe{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("[JSAPI] Initialized")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}fetchTasks(e){var t,n;return Le(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.startTime),"fetchTasks","startTime is null or empty"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.endTime),"fetchTasks","endTime is null or empty"),i.AssertUtils.check(j.validatePropValueNotNullAndEmpty(e.pageNumber),"fetchTasks","pageNumber is null or empty"),i.AssertUtils.check(j.validateNumber(e.startTime),"fetchTasks","startTime is not a valid time"),i.AssertUtils.check(j.validateNumber(e.endTime),"fetchTasks","endTime is not a valid time"),i.AssertUtils.check(j.validateNumber(e.pageNumber),"fetchTasks","pageNumber is not a valid number"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.qmw)||void 0===n?void 0:n.fetchTasks(e)}))}fetchCapture(e){var t,n;return Le(this,void 0,void 0,(function*(){if(this.checkService())return i.AssertUtils.check(j.validateUUID(e.taskId),"fetchCapture","taskId is not a valid UUID"),null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.qmw)||void 0===n?void 0:n.fetchCapture(e)}))}}const De=o(r,"[PI JSAPI] =>");var Ne=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class Pe{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("[JSAPI] AgentConfigJsApi Initialized")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}fetchPaginatedAuxCodes(e){var t,n;return Ne(this,void 0,void 0,(function*(){if(this.checkService())return j.validateAuxCodePayload(e,"fetchPaginatedAuxCodes"),yield null===(n=null===(t=this.SERVICE)||void 0===t?void 0:t.abs)||void 0===n?void 0:n.fetchPaginatedAuxCodes(e)}))}}const _e=o(r,"[AGENT CONFIG JSAPI] =>"),Me=(()=>{AGENTX_SERVICE?r.info('Found global "AGENTX_SERVICE"!'):r.error('Missed global "AGENTX_SERVICE"...');const e=(t=AGENTX_SERVICE,new ee({logger:te,SERVICE:t}));var t;const n=new ce({logger:ue}),i=new fe({logger:ve,serviceChecker:a({logger:ve})}),o=new O({logger:U,serviceChecker:a({logger:U})}),s=new K({logger:X,serviceChecker:a({logger:X})}),c=new B({logger:H,serviceChecker:a({logger:H}),aqmEvents:L({logger:z})}),u=new ie({logger:re,aqmEvents:L({logger:oe}),serviceChecker:a({logger:re})}),l=new Ee({logger:be,aqmEvents:L({logger:we}),serviceChecker:a({logger:be})}),d=new le({logger:de,aqmEvents:L({logger:he}),serviceChecker:a({logger:de})}),h=new Ae({logger:Te,aqmEvents:L({logger:Ce}),serviceChecker:a({logger:Te})}),f=new Oe({logger:Ue,aqmEvents:L({logger:Re}),serviceChecker:a({logger:Ue})}),v=new se({logger:ae,serviceChecker:a({logger:ae})}),p=new ge({logger:me});p.init();const g=new xe({logger:De,serviceChecker:a({logger:De})}),m=new Pe({logger:_e,serviceChecker:a({logger:_e})}),y=new Se({logger:ke,serviceChecker:a({logger:ke})});return e.addEventListener("inited",()=>{c.init(AGENTX_SERVICE),s.init(AGENTX_SERVICE),u.init(AGENTX_SERVICE),l.init(AGENTX_SERVICE),d.init(AGENTX_SERVICE),h.init(AGENTX_SERVICE),f.init(AGENTX_SERVICE),g.init(AGENTX_SERVICE),i.init(AGENTX_SERVICE),o.init(AGENTX_SERVICE),v.init(AGENTX_SERVICE),m.init(AGENTX_SERVICE),y.init(AGENTX_SERVICE)}),e.addEventListener("cleaned",()=>{c.cleanup(),s.cleanup(),u.cleanup(),l.cleanup(),d.cleanup(),h.cleanup(),f.cleanup(),g.cleanup(),i.cleanup(),v.cleanup(),o.cleanup(),m.cleanup(),y.cleanup()}),{config:e,logger:n,monitoring:l,shortcutKey:i,actions:o,agentContact:c,agentStateInfo:s,dialer:u,screenpop:d,aiAssistant:f,i18n:v,rtdwc:p,postInteractions:g,logout:h,agentConfigJsApi:m,webexMetricsInternal:y}})()},function(e,t,n){"use strict";n.r(t),n.d(t,"v1",(function(){return f})),n.d(t,"v3",(function(){return w})),n.d(t,"v4",(function(){return S})),n.d(t,"v5",(function(){return A}));var i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),r=new Uint8Array(16);function o(){if(!i)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(r)}for(var s=[],a=0;a<256;++a)s[a]=(a+256).toString(16).substr(1);var c,u,l=function(e,t){var n=t||0,i=s;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")},d=0,h=0;var f=function(e,t,n){var i=t&&n||0,r=t||[],s=(e=e||{}).node||c,a=void 0!==e.clockseq?e.clockseq:u;if(null==s||null==a){var f=e.random||(e.rng||o)();null==s&&(s=c=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==a&&(a=u=16383&(f[6]<<8|f[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),p=void 0!==e.nsecs?e.nsecs:h+1,g=v-d+(p-h)/1e4;if(g<0&&void 0===e.clockseq&&(a=a+1&16383),(g<0||v>d)&&void 0===e.nsecs&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=v,h=p,u=a;var m=(1e4*(268435455&(v+=122192928e5))+p)%4294967296;r[i++]=m>>>24&255,r[i++]=m>>>16&255,r[i++]=m>>>8&255,r[i++]=255&m;var y=v/4294967296*1e4&268435455;r[i++]=y>>>8&255,r[i++]=255&y,r[i++]=y>>>24&15|16,r[i++]=y>>>16&255,r[i++]=a>>>8|128,r[i++]=255&a;for(var E=0;E<6;++E)r[i+E]=s[E];return t||l(r)};var v=function(e,t,n){var i=function(e,i,r,o){var s=r&&o||0;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(e)),"string"==typeof i&&(i=function(e){var t=[];return e.replace(/[a-fA-F0-9]{2}/g,(function(e){t.push(parseInt(e,16))})),t}(i)),!Array.isArray(e))throw TypeError("value must be an array of bytes");if(!Array.isArray(i)||16!==i.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var a=n(i.concat(e));if(a[6]=15&a[6]|t,a[8]=63&a[8]|128,r)for(var c=0;c<16;++c)r[s+c]=a[c];return r||l(a)};try{i.name=e}catch(e){}return i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",i};function p(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function g(e,t,n,i,r,o){return p((s=p(p(t,e),p(i,o)))<<(a=r)|s>>>32-a,n);var s,a}function m(e,t,n,i,r,o,s){return g(t&n|~t&i,e,t,r,o,s)}function y(e,t,n,i,r,o,s){return g(t&i|n&~i,e,t,r,o,s)}function E(e,t,n,i,r,o,s){return g(t^n^i,e,t,r,o,s)}function b(e,t,n,i,r,o,s){return g(n^(t|~i),e,t,r,o,s)}var w=v("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Array(t.length);for(var n=0;n<t.length;n++)e[n]=t.charCodeAt(n)}return function(e){var t,n,i,r=[],o=32*e.length;for(t=0;t<o;t+=8)n=e[t>>5]>>>t%32&255,i=parseInt("0123456789abcdef".charAt(n>>>4&15)+"0123456789abcdef".charAt(15&n),16),r.push(i);return r}(function(e,t){var n,i,r,o,s;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var a=1732584193,c=-271733879,u=-1732584194,l=271733878;for(n=0;n<e.length;n+=16)i=a,r=c,o=u,s=l,a=m(a,c,u,l,e[n],7,-680876936),l=m(l,a,c,u,e[n+1],12,-389564586),u=m(u,l,a,c,e[n+2],17,606105819),c=m(c,u,l,a,e[n+3],22,-1044525330),a=m(a,c,u,l,e[n+4],7,-176418897),l=m(l,a,c,u,e[n+5],12,1200080426),u=m(u,l,a,c,e[n+6],17,-1473231341),c=m(c,u,l,a,e[n+7],22,-45705983),a=m(a,c,u,l,e[n+8],7,1770035416),l=m(l,a,c,u,e[n+9],12,-1958414417),u=m(u,l,a,c,e[n+10],17,-42063),c=m(c,u,l,a,e[n+11],22,-1990404162),a=m(a,c,u,l,e[n+12],7,1804603682),l=m(l,a,c,u,e[n+13],12,-40341101),u=m(u,l,a,c,e[n+14],17,-1502002290),c=m(c,u,l,a,e[n+15],22,1236535329),a=y(a,c,u,l,e[n+1],5,-165796510),l=y(l,a,c,u,e[n+6],9,-1069501632),u=y(u,l,a,c,e[n+11],14,643717713),c=y(c,u,l,a,e[n],20,-373897302),a=y(a,c,u,l,e[n+5],5,-701558691),l=y(l,a,c,u,e[n+10],9,38016083),u=y(u,l,a,c,e[n+15],14,-660478335),c=y(c,u,l,a,e[n+4],20,-405537848),a=y(a,c,u,l,e[n+9],5,568446438),l=y(l,a,c,u,e[n+14],9,-1019803690),u=y(u,l,a,c,e[n+3],14,-187363961),c=y(c,u,l,a,e[n+8],20,1163531501),a=y(a,c,u,l,e[n+13],5,-1444681467),l=y(l,a,c,u,e[n+2],9,-51403784),u=y(u,l,a,c,e[n+7],14,1735328473),c=y(c,u,l,a,e[n+12],20,-1926607734),a=E(a,c,u,l,e[n+5],4,-378558),l=E(l,a,c,u,e[n+8],11,-2022574463),u=E(u,l,a,c,e[n+11],16,1839030562),c=E(c,u,l,a,e[n+14],23,-35309556),a=E(a,c,u,l,e[n+1],4,-1530992060),l=E(l,a,c,u,e[n+4],11,1272893353),u=E(u,l,a,c,e[n+7],16,-155497632),c=E(c,u,l,a,e[n+10],23,-1094730640),a=E(a,c,u,l,e[n+13],4,681279174),l=E(l,a,c,u,e[n],11,-358537222),u=E(u,l,a,c,e[n+3],16,-722521979),c=E(c,u,l,a,e[n+6],23,76029189),a=E(a,c,u,l,e[n+9],4,-640364487),l=E(l,a,c,u,e[n+12],11,-421815835),u=E(u,l,a,c,e[n+15],16,530742520),c=E(c,u,l,a,e[n+2],23,-995338651),a=b(a,c,u,l,e[n],6,-198630844),l=b(l,a,c,u,e[n+7],10,1126891415),u=b(u,l,a,c,e[n+14],15,-1416354905),c=b(c,u,l,a,e[n+5],21,-57434055),a=b(a,c,u,l,e[n+12],6,1700485571),l=b(l,a,c,u,e[n+3],10,-1894986606),u=b(u,l,a,c,e[n+10],15,-1051523),c=b(c,u,l,a,e[n+1],21,-2054922799),a=b(a,c,u,l,e[n+8],6,1873313359),l=b(l,a,c,u,e[n+15],10,-30611744),u=b(u,l,a,c,e[n+6],15,-1560198380),c=b(c,u,l,a,e[n+13],21,1309151649),a=b(a,c,u,l,e[n+4],6,-145523070),l=b(l,a,c,u,e[n+11],10,-1120210379),u=b(u,l,a,c,e[n+2],15,718787259),c=b(c,u,l,a,e[n+9],21,-343485551),a=p(a,i),c=p(c,r),u=p(u,o),l=p(l,s);return[a,c,u,l]}(function(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var i=8*e.length;for(t=0;t<i;t+=8)n[t>>5]|=(255&e[t/8])<<t%32;return n}(e),8*e.length))}));var S=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var r=(e=e||{}).random||(e.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t)for(var s=0;s<16;++s)t[i+s]=r[s];return t||l(r)};function k(e,t,n,i){switch(e){case 0:return t&n^~t&i;case 1:return t^n^i;case 2:return t&n^t&i^n&i;case 3:return t^n^i}}function I(e,t){return e<<t|e>>>32-t}var A=v("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var i=unescape(encodeURIComponent(e));e=new Array(i.length);for(var r=0;r<i.length;r++)e[r]=i.charCodeAt(r)}e.push(128);var o=e.length/4+2,s=Math.ceil(o/16),a=new Array(s);for(r=0;r<s;r++){a[r]=new Array(16);for(var c=0;c<16;c++)a[r][c]=e[64*r+4*c]<<24|e[64*r+4*c+1]<<16|e[64*r+4*c+2]<<8|e[64*r+4*c+3]}for(a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295,r=0;r<s;r++){for(var u=new Array(80),l=0;l<16;l++)u[l]=a[r][l];for(l=16;l<80;l++)u[l]=I(u[l-3]^u[l-8]^u[l-14]^u[l-16],1);var d=n[0],h=n[1],f=n[2],v=n[3],p=n[4];for(l=0;l<80;l++){var g=Math.floor(l/20),m=I(d,5)+k(g,h,f,v)+p+t[g]+u[l]>>>0;p=v,v=f,f=I(h,30)>>>0,h=d,d=m}n[0]=n[0]+d>>>0,n[1]=n[1]+h>>>0,n[2]=n[2]+f>>>0,n[3]=n[3]+v>>>0,n[4]=n[4]+p>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}))},function(e,t,n){"use strict";n.r(t);var i=n(3),r=n(13);function o(e,t,n){return(t=Object(r.a)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach((function(t){o(e,t,n[t])}))}return e}var a=n(4),c=n(5);function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){if(t&&("object"==Object(i.a)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return u(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}var v={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},p=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(a.a)(this,e),this.init(t,n)}return Object(c.a)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||v,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,i){return i&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,s({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),g=function(){function e(){Object(a.a)(this,e),this.observers={}}return Object(c.a)(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(this.observers[e]){var r=[].concat(this.observers[e]);r.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function m(){var e,t,n=new Promise((function(n,i){e=n,t=i}));return n.resolve=e,n.reject=t,n}function y(e){return null==e?"":""+e}function E(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function b(e,t,n){function i(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function r(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(r())return{};var s=i(o.shift());!e[s]&&n&&(e[s]=new n),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return r()?{}:{obj:e,k:i(o.shift())}}function w(e,t,n){var i=b(e,t,Object);i.obj[i.k]=n}function S(e,t){var n=b(e,t),i=n.obj,r=n.k;if(i)return i[r]}function k(e,t,n){var i=S(e,n);return void 0!==i?i:S(t,n)}function I(e,t,n){for(var i in t)"__proto__"!==i&&"constructor"!==i&&(i in e?"string"==typeof e[i]||e[i]instanceof String||"string"==typeof t[i]||t[i]instanceof String?n&&(e[i]=t[i]):I(e[i],t[i],n):e[i]=t[i]);return e}function A(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var T={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function C(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return T[e]})):e}var O="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,U=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Object(a.a)(this,t),n=l(this,d(t).call(this)),O&&g.call(u(n)),n.data=e||{},n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return f(t,e),Object(c.a)(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,o=[e,t];return n&&"string"!=typeof n&&(o=o.concat(n)),n&&"string"==typeof n&&(o=o.concat(r?n.split(r):n)),e.indexOf(".")>-1&&(o=e.split(".")),S(this.data,o)}},{key:"addResource",value:function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var s=[e,t];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=t,t=(s=e.split("."))[1]),this.addNamespaces(t),w(this.data,s,i),r.silent||this.emit("added",e,t,n,i)}},{key:"addResources",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var r in n)"string"!=typeof n[r]&&"[object Array]"!==Object.prototype.toString.apply(n[r])||this.addResource(e,t,r,n[r],{silent:!0});i.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(i=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var c=S(this.data,a)||{};i?I(c,n,r):c=s({},c,n),w(this.data,a,c),o.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?s({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(g),R={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,i,r){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,n,i,r))})),t}},L={},x=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(a.a)(this,t),n=l(this,d(t).call(this)),O&&g.call(u(n)),E(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,u(n)),n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=p.create("translator"),n}return f(t,e),Object(c.a)(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,r=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var o=e.match(this.interpolator.nestingRegexp);if(o&&o.length>0)return{key:e,namespaces:r};var s=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(s[0])>-1)&&(r=s.shift()),e=s.join(i)}return"string"==typeof r&&(r=[r]),{key:e,namespaces:r}}},{key:"translate",value:function(e,n,r){var o=this;if("object"!==Object(i.a)(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var a=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,c=this.extractFromKey(e[e.length-1],n),u=c.key,l=c.namespaces,d=l[l.length-1],h=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&"cimode"===h.toLowerCase()){if(f){var v=n.nsSeparator||this.options.nsSeparator;return d+v+u}return u}var p=this.resolve(e,n),g=p&&p.res,m=p&&p.usedKey||u,y=p&&p.exactUsedKey||u,E=Object.prototype.toString.apply(g),b=["[object Number]","[object Function]","[object RegExp]"],w=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,k="string"!=typeof g&&"boolean"!=typeof g&&"number"!=typeof g;if(S&&g&&k&&b.indexOf(E)<0&&("string"!=typeof w||"[object Array]"!==E)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,g,n):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");if(a){var I="[object Array]"===E,A=I?[]:{},T=I?y:m;for(var C in g)if(Object.prototype.hasOwnProperty.call(g,C)){var O="".concat(T).concat(a).concat(C);A[C]=this.translate(O,s({},n,{joinArrays:!1,ns:l})),A[C]===O&&(A[C]=g[C])}g=A}}else if(S&&"string"==typeof w&&"[object Array]"===E)(g=g.join(w))&&(g=this.extendTranslation(g,e,n,r));else{var U=!1,R=!1,L=void 0!==n.count&&"string"!=typeof n.count,x=t.hasDefaultValue(n),D=L?this.pluralResolver.getSuffix(h,n.count):"",N=n["defaultValue".concat(D)]||n.defaultValue;!this.isValidLookup(g)&&x&&(U=!0,g=N),this.isValidLookup(g)||(R=!0,g=u);var P=x&&N!==g&&this.options.updateMissing;if(R||U||P){if(this.logger.log(P?"updateKey":"missingKey",h,d,u,P?N:g),a){var _=this.resolve(u,s({},n,{keySeparator:!1}));_&&_.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var M=[],V=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&V&&V[0])for(var j=0;j<V.length;j++)M.push(V[j]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(n.lng||this.language):M.push(n.lng||this.language);var q=function(e,t,i){o.options.missingKeyHandler?o.options.missingKeyHandler(e,d,t,P?i:g,P,n):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,d,t,P?i:g,P,n),o.emit("missingKey",e,d,t,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&L?M.forEach((function(e){o.pluralResolver.getSuffixes(e).forEach((function(t){q([e],u+t,n["defaultValue".concat(t)]||N)}))})):q(M,u,N))}g=this.extendTranslation(g,e,n,p,r),R&&g===u&&this.options.appendNamespaceToMissingKey&&(g="".concat(d,":").concat(u)),R&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(g))}return g}},{key:"extendTranslation",value:function(e,t,n,i,r){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(s({},n,{interpolation:s({},this.options.interpolation,n.interpolation)}));var a,c=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(c){var u=e.match(this.interpolator.nestingRegexp);a=u&&u.length}var l=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=s({},this.options.interpolation.defaultVariables,l)),e=this.interpolator.interpolate(e,l,n.lng||this.language,n),c){var d=e.match(this.interpolator.nestingRegexp);a<(d&&d.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,i=new Array(e),s=0;s<e;s++)i[s]=arguments[s];return r&&r[0]===i[0]&&!n.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(i[0]," in key: ").concat(t[0])),null):o.translate.apply(o,i.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var h=n.postProcess||this.options.postProcess,f="string"==typeof h?[h]:h;return null!=e&&f&&f.length&&!1!==n.applyPostProcessor&&(e=R.handle(f,e,t,this.options&&this.options.postProcessPassResolved?s({i18nResolved:i},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,i,r,o,s=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!s.isValidLookup(t)){var c=s.extractFromKey(e,a),u=c.key;n=u;var l=c.namespaces;s.options.fallbackNS&&(l=l.concat(s.options.fallbackNS));var d=void 0!==a.count&&"string"!=typeof a.count,h=void 0!==a.context&&"string"==typeof a.context&&""!==a.context,f=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);l.forEach((function(e){s.isValidLookup(t)||(o=e,!L["".concat(f[0],"-").concat(e)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(o)&&(L["".concat(f[0],"-").concat(e)]=!0,s.logger.warn('key "'.concat(n,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((function(n){if(!s.isValidLookup(t)){r=n;var o,c,l=u,f=[l];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(f,u,n,e,a);else d&&(o=s.pluralResolver.getSuffix(n,a.count)),d&&h&&f.push(l+o),h&&f.push(l+="".concat(s.options.contextSeparator).concat(a.context)),d&&f.push(l+=o);for(;c=f.pop();)s.isValidLookup(t)||(i=c,t=s.getResource(n,e,c,a))}})))}))}})),{res:t,usedKey:n,exactUsedKey:i,usedLng:r,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,"defaultValue".length)&&void 0!==e[t])return!0;return!1}}]),t}(g);function D(e){return e.charAt(0).toUpperCase()+e.slice(1)}var N=function(){function e(t){Object(a.a)(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=p.create("languageUtils")}return Object(c.a)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=D(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=D(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=D(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var i=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(i)||(t=i)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var i=n.getLanguagePartFromCode(e);if(n.isSupportedCode(i))return t=i;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(i))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,i=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=function(e){e&&(n.isSupportedCode(e)?r.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),i.forEach((function(e){r.indexOf(e)<0&&o(n.formatLanguageCode(e))})),r}}]),e}(),P=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],_={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function M(){var e={};return P.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:_[t.fc]}}))})),e}var V=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(a.a)(this,e),this.languageUtils=t,this.options=n,this.logger=p.create("pluralResolver"),this.rules=M()}return Object(c.a)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,i=this.getRule(e);if(i){var r=i.noAbs?i.plurals(t):i.plurals(Math.abs(t)),o=i.numbers[r];this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var s=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):s():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]?s():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),j=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(this,e),this.logger=p.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return Object(c.a)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:C,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?A(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?A(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?A(t.nestingPrefix):t.nestingPrefixEscaped||A("$t("),this.nestingSuffix=t.nestingSuffix?A(t.nestingSuffix):t.nestingSuffixEscaped||A(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,i){var r,o,s,a=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(a.formatSeparator)<0){var r=k(t,c,e);return a.alwaysFormat?a.format(r,void 0,n):r}var o=e.split(a.formatSeparator),s=o.shift().trim(),u=o.join(a.formatSeparator).trim();return a.format(k(t,c,s),u,n,i)};this.resetRegExp();var d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,h=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return u(e)}},{regex:this.regexp,safeValue:function(e){return a.escapeValue?u(a.escape(e)):u(e)}}].forEach((function(t){for(s=0;r=t.regex.exec(e);){if(void 0===(o=l(r[1].trim())))if("function"==typeof d){var n=d(e,r,i);o="string"==typeof n?n:""}else{if(h){o=r[0];continue}a.logger.warn("missed to pass in variable ".concat(r[1]," for interpolating ").concat(e)),o=""}else"string"==typeof o||a.useRawValueToEscape||(o=y(o));if(e=e.replace(r[0],t.safeValue(o)),t.regex.lastIndex=0,++s>=a.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,i,r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=s({},o);function c(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var i=e.split(new RegExp("".concat(n,"[ ]*{"))),r="{".concat(i[1]);e=i[0],r=(r=this.interpolate(r,a)).replace(/'/g,'"');try{a=JSON.parse(r),t&&(a=s({},t,a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(r)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var u=[],l=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var d=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=d.shift(),u=d,l=!0}if((i=t(c.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof i)return i;"string"!=typeof i&&(i=y(i)),i||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),i=""),l&&(i=u.reduce((function(e,t){return r.format(e,t,o.lng,o)}),i.trim())),e=e.replace(n[0],i),this.regexp.lastIndex=0}return e}}]),e}();var q=function(e){function t(e,n,i){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(a.a)(this,t),r=l(this,d(t).call(this)),O&&g.call(u(r)),r.backend=e,r.store=n,r.services=i,r.languageUtils=i.languageUtils,r.options=o,r.logger=p.create("backendConnector"),r.state={},r.queue=[],r.backend&&r.backend.init&&r.backend.init(i,o.backend,o),r}return f(t,e),Object(c.a)(t,[{key:"queueLoad",value:function(e,t,n,i){var r=this,o=[],s=[],a=[],c=[];return e.forEach((function(e){var i=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!n.reload&&r.store.hasResourceBundle(e,t)?r.state[a]=2:r.state[a]<0||(1===r.state[a]?s.indexOf(a)<0&&s.push(a):(r.state[a]=1,i=!1,s.indexOf(a)<0&&s.push(a),o.indexOf(a)<0&&o.push(a),c.indexOf(t)<0&&c.push(t)))})),i||a.push(e)})),(o.length||s.length)&&this.queue.push({pending:s,loaded:{},errors:[],callback:i}),{toLoad:o,pending:s,toLoadLanguages:a,toLoadNamespaces:c}}},{key:"loaded",value:function(e,t,n){var i=e.split("|"),r=i[0],o=i[1];t&&this.emit("failedLoading",r,o,t),n&&this.store.addResourceBundle(r,o,n),this.state[e]=t?-1:2;var s={};this.queue.forEach((function(n){var i,a,c,u,l,d;i=n.loaded,a=o,u=b(i,[r],Object),l=u.obj,d=u.k,l[d]=l[d]||[],c&&(l[d]=l[d].concat(a)),c||l[d].push(a),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){s[e]||(s[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){s[e].indexOf(t)<0&&s[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var i=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,s=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(a,c){a&&c&&r<5?setTimeout((function(){i.read.call(i,e,t,n,r+1,2*o,s)}),o):s(a,c)})):s(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,i,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.split("|"),r=i[0],o=i[1];this.read(r,o,"read",void 0,void 0,(function(i,s){i&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(r," failed"),i),!i&&s&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(r),s),t.loaded(e,i,s)}))}},{key:"saveMissing",value:function(e,t,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,i,null,s({},o,{isUpdate:r})),e&&e[0]&&this.store.addResource(e[0],t,n,i))}}]),t}(g);function F(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===Object(i.a)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===Object(i.a)(e[2])||"object"===Object(i.a)(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function B(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function H(){}var z=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(Object(a.a)(this,t),e=l(this,d(t).call(this)),O&&g.call(u(e)),e.options=B(n),e.services={},e.logger=p,e.modules={external:[]},i&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,i),l(e,u(e));setTimeout((function(){e.init(n,i)}),0)}return e}return f(t,e),Object(c.a)(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function i(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=s({},F(),this.options,B(t)),this.format=this.options.interpolation.format,n||(n=H),!this.options.isClone){this.modules.logger?p.init(i(this.modules.logger),this.options):p.init(null,this.options);var r=new N(this.options);this.store=new U(this.options.resources,this.options);var o=this.services;o.logger=p,o.resourceStore=this.store,o.languageUtils=r,o.pluralResolver=new V(r,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),o.interpolator=new j(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new q(i(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit.apply(e,[t].concat(i))})),this.modules.languageDetector&&(o.languageDetector=i(this.modules.languageDetector),o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=i(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new x(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit.apply(e,[t].concat(i))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.length>0&&"dev"!==a[0]&&(this.options.lng=a[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var c=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];c.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var u=["addResource","addResources","addResourceBundle","removeResourceBundle"];u.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var l=m(),d=function(){var t=function(t,i){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(i),n(t,i)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),l}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H,i=n,r="string"==typeof e?e:this.language;if("function"==typeof e&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return i();var o=[],s=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};if(r)s(r);else{var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.forEach((function(e){return s(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return s(e)})),this.services.backendConnector.load(o,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function(e,t,n){var i=m();return e||(e=this.languages),t||(t=this.options.ns),n||(n=H),this.services.backendConnector.reload(e,t,(function(e){i.resolve(),n(e)})),i}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&R.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var i=m();this.emit("languageChanging",e);var r=function(e){var r="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);r&&(n.language||(n.language=r,n.languages=n.services.languageUtils.toResolveHierarchy(r)),n.translator.language||n.translator.changeLanguage(r),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(r)),n.loadResources(r,(function(e){!function(e,r){r?(n.language=r,n.languages=n.services.languageUtils.toResolveHierarchy(r),n.translator.changeLanguage(r),n.isLanguageChangingTo=void 0,n.emit("languageChanged",r),n.logger.log("languageChanged",r)):n.isLanguageChangingTo=void 0,i.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,r)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(r):r(e):r(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function(e,t){var n=this,r=function e(t,r){var o;if("object"!==Object(i.a)(r)){for(var a=arguments.length,c=new Array(a>2?a-2:0),u=2;u<a;u++)c[u-2]=arguments[u];o=n.options.overloadTranslationOptionHandler([t,r].concat(c))}else o=s({},r);return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,n.t(t,o)};return"string"==typeof e?r.lng=e:r.lngs=e,r.ns=t,r}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var s=function(e,n){var i=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===i||2===i};if(n.precheck){var a=n.precheck(this,s);if(void 0!==a)return a}return!!this.hasResourceBundle(i,e)||(!this.services.backendConnector.backend||!(!s(i,e)||r&&!s(o,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,i=m();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){i.resolve(),t&&t(e)})),i):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=m();"string"==typeof e&&(e=[e]);var i=this.options.preload||[],r=e.filter((function(e){return i.indexOf(e)<0}));return r.length?(this.options.preload=i.concat(r),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H,r=s({},this.options,n,{isClone:!0}),o=new t(r),a=["store","services","language"];return a.forEach((function(t){o[t]=e[t]})),o.services=s({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new x(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];o.emit.apply(o,[e].concat(n))})),o.init(r,i),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}}]),t}(g));t.default=z}])}));