@wxcc-desktop/sdk 2.0.13 → 2.0.15
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,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("WxccDesktopSDK",[],t):"object"==typeof exports?exports.WxccDesktopSDK=t():e.WxccDesktopSDK=t()}(Object("undefined"!=typeof self?self:this),()=>(()=>{var e,t,i={23(e,t,i){"use strict";var n=i(265),s={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!n(e)&&hasOwnProperty.call(s,typeof e)}},131(e,t,i){"use strict";var n=i(566),s=/^\s*class[\s{/}]/,r=Function.prototype.toString;e.exports=function(e){return!!n(e)&&!s.test(r.call(e))}},136(e,t,i){"use strict";var n=i(441)();e.exports=function(e){return e!==n&&null!==e}},176(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>w});var{slice:n,forEach:s}=[],r=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,o={create(e,t,i,n){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};i&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+60*i*1e3)),n&&(s.domain=n),document.cookie=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"},n=encodeURIComponent(t),s="".concat(e,"=").concat(n);if(i.maxAge>0){var o=i.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(o))}if(i.domain){if(!r.test(i.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(i.domain)}if(i.path){if(!r.test(i.path))throw new TypeError("option path is invalid");s+="; Path=".concat(i.path)}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw new TypeError("option expires is invalid");s+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(s+="; HttpOnly"),i.secure&&(s+="; Secure"),i.sameSite)switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i.partitioned&&(s+="; Partitioned"),s}(e,t,s)},read(e){for(var t="".concat(e,"="),i=document.cookie.split(";"),n=0;n<i.length;n++){for(var s=i[n];" "===s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(t))return s.substring(t.length,s.length)}return null},remove(e,t){this.create(e,"",-1,t)}},a={name:"cookie",lookup(e){var{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return o.read(t)||void 0},cacheUserLanguage(e,t){var{lookupCookie:i,cookieMinutes:n,cookieDomain:s,cookieOptions:r}=t;i&&"undefined"!=typeof document&&o.create(i,e,n,s,r)}},l={name:"querystring",lookup(e){var t,{lookupQuerystring:i}=e;if("undefined"!=typeof window){var n,{search:s}=window.location;!window.location.search&&(null===(n=window.location.hash)||void 0===n?void 0:n.indexOf("?"))>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=s.substring(1).split("&"),o=0;o<r.length;o++){var a=r[o].indexOf("=");a>0&&r[o].substring(0,a)===i&&(t=r[o].substring(a+1))}}return t}},c={name:"hash",lookup(e){var t,{lookupHash:i,lookupFromHashIndex:n}=e;if("undefined"!=typeof window){var{hash:s}=window.location;if(s&&s.length>2){var r=s.substring(1);if(i)for(var o=r.split("&"),a=0;a<o.length;a++){var l=o[a].indexOf("=");l>0&&o[a].substring(0,l)===i&&(t=o[a].substring(l+1))}if(t)return t;if(!t&&n>-1){var c,u=s.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(u))return;return null===(c=u["number"==typeof n?n:0])||void 0===c?void 0:c.replace("/","")}}}return t}},u=null,d=()=>{if(null!==u)return u;try{if(!(u="undefined"!=typeof window&&null!==window.localStorage))return!1;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){u=!1}return u},h={name:"localStorage",lookup(e){var{lookupLocalStorage:t}=e;if(t&&d())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){var{lookupLocalStorage:i}=t;i&&d()&&window.localStorage.setItem(i,e)}},f=null,p=()=>{if(null!==f)return f;try{if(!(f="undefined"!=typeof window&&null!==window.sessionStorage))return!1;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){f=!1}return f},g={name:"sessionStorage",lookup(e){var{lookupSessionStorage:t}=e;if(t&&p())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){var{lookupSessionStorage:i}=t;i&&p()&&window.sessionStorage.setItem(i,e)}},m={name:"navigator",lookup(e){var t=[];if("undefined"!=typeof navigator){var{languages:i,userLanguage:n,language:s}=navigator;if(i)for(var r=0;r<i.length;r++)t.push(i[r]);n&&t.push(n),s&&t.push(s)}return t.length>0?t:void 0}},v={name:"htmlTag",lookup(e){var t,{htmlTag:i}=e,n=i||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},y={name:"path",lookup(e){var t,{lookupFromPathIndex:i}=e;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(n))return null===(t=n["number"==typeof i?i:0])||void 0===t?void 0:t.replace("/","")}}},E={name:"subdomain",lookup(e){var t,{lookupFromSubdomainIndex:i}=e,n="number"==typeof i?i+1:1,s="undefined"!=typeof window&&(null===(t=window.location)||void 0===t||null===(t=t.hostname)||void 0===t?void 0:t.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(s)return s[n]}},S=!1;try{document.cookie,S=!0}catch(e){}var b=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];S||b.splice(1,1);class w{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return s.call(n.call(arguments,1),t=>{if(t)for(var i in t)void 0===e[i]&&(e[i]=t[i])}),e}(t,this.options||{},{order:b,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(a),this.addDetector(l),this.addDetector(h),this.addDetector(g),this.addDetector(m),this.addDetector(v),this.addDetector(y),this.addDetector(E),this.addDetector(c)}addDetector(e){return this.detectors[e.name]=e,this}detect(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){var i=this.detectors[e].lookup(this.options);i&&"string"==typeof i&&(i=[i]),i&&(t=t.concat(i))}}),t=t.filter(e=>{return null!=e&&!("string"==typeof(t=e)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(e=>e.test(t)));var t}).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}w.type="languageDetector"},186(e,t,i){"use strict";e.exports=i(665)()?Object.assign:i(573)},206(e,t,i){"use strict";var n=i(136),s=Array.prototype.forEach,r=Object.create;e.exports=function(e){var t=r(null);return s.call(arguments,function(e){n(e)&&function(e,t){var i;for(i in e)t[i]=e[i]}(Object(e),t)}),t}},265(e){"use strict";e.exports=function(e){return null!=e}},322(e,t,i){"use strict";var n,s,r,o,a,l,c,u=i(913),d=i(805),h=Function.prototype.apply,f=Function.prototype.call,p=Object.create,g=Object.defineProperty,m=Object.defineProperties,v=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};s=function(e,t){var i,s;return d(t),s=this,n.call(this,e,i=function(){r.call(s,e,i),h.call(t,this,arguments)}),i.__eeOnceListener__=t,this},o=function(e){var t,i,n,s,r;if(v.call(this,"__ee__")&&(s=this.__ee__[e]))if("object"==typeof s){for(i=arguments.length,r=new Array(i-1),t=1;t<i;++t)r[t-1]=arguments[t];for(s=s.slice(),t=0;n=s[t];++t)h.call(n,this,r)}else switch(arguments.length){case 1:f.call(s,this);break;case 2:f.call(s,this,arguments[1]);break;case 3:f.call(s,this,arguments[1],arguments[2]);break;default:for(i=arguments.length,r=new Array(i-1),t=1;t<i;++t)r[t-1]=arguments[t];h.call(s,this,r)}},a={on:n=function(e,t){var i;return d(t),v.call(this,"__ee__")?i=this.__ee__:(i=y.value=p(null),g(this,"__ee__",y),y.value=null),i[e]?"object"==typeof i[e]?i[e].push(t):i[e]=[i[e],t]:i[e]=t,this},once:s,off:r=function(e,t){var i,n,s,r;if(d(t),!v.call(this,"__ee__"))return this;if(!(i=this.__ee__)[e])return this;if("object"==typeof(n=i[e]))for(r=0;s=n[r];++r)s!==t&&s.__eeOnceListener__!==t||(2===n.length?i[e]=n[r?0:1]:n.splice(r,1));else n!==t&&n.__eeOnceListener__!==t||delete i[e];return this},emit:o},l={on:u(n),once:u(s),off:u(r),emit:u(o)},c=m({},l),e.exports=t=function(e){return null==e?p(c):m(Object(e),l)},t.methods=a},327(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends Error{}class n extends i{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class s extends i{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class r extends i{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class o extends i{}class a extends i{constructor(e){super(`Invalid unit ${e}`)}}class l extends i{}class c extends i{constructor(){super("Zone is an abstract class")}}const u="numeric",d="short",h="long",f={year:u,month:u,day:u},p={year:u,month:d,day:u},g={year:u,month:d,day:u,weekday:d},m={year:u,month:h,day:u},v={year:u,month:h,day:u,weekday:h},y={hour:u,minute:u},E={hour:u,minute:u,second:u},S={hour:u,minute:u,second:u,timeZoneName:d},b={hour:u,minute:u,second:u,timeZoneName:h},w={hour:u,minute:u,hourCycle:"h23"},k={hour:u,minute:u,second:u,hourCycle:"h23"},I={hour:u,minute:u,second:u,hourCycle:"h23",timeZoneName:d},A={hour:u,minute:u,second:u,hourCycle:"h23",timeZoneName:h},C={year:u,month:u,day:u,hour:u,minute:u},O={year:u,month:u,day:u,hour:u,minute:u,second:u},T={year:u,month:d,day:u,hour:u,minute:u},R={year:u,month:d,day:u,hour:u,minute:u,second:u},N={year:u,month:d,day:u,weekday:d,hour:u,minute:u},L={year:u,month:h,day:u,hour:u,minute:u,timeZoneName:d},x={year:u,month:h,day:u,hour:u,minute:u,second:u,timeZoneName:d},D={year:u,month:h,day:u,weekday:h,hour:u,minute:u,timeZoneName:h},U={year:u,month:h,day:u,weekday:h,hour:u,minute:u,second:u,timeZoneName:h};class P{get type(){throw new c}get name(){throw new c}get ianaName(){return this.name}get isUniversal(){throw new c}offsetName(e,t){throw new c}formatOffset(e,t){throw new c}offset(e){throw new c}equals(e){throw new c}get isValid(){throw new c}}let V=null;class _ extends P{static get instance(){return null===V&&(V=new _),V}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Ke(e,t,i)}formatOffset(e,t){return et(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}let M={};const j={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let q={};class F extends P{static create(e){return q[e]||(q[e]=new F(e)),q[e]}static resetCache(){q={},M={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=F.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Ke(e,t,i,this.name)}formatOffset(e,t){return et(this.offset(e),t)}offset(e){const t=new Date(e);if(isNaN(t))return NaN;const i=(n=this.name,M[n]||(M[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",era:"short"})),M[n]);var n;let[s,r,o,a,l,c,u]=i.formatToParts?function(e,t){const i=e.formatToParts(t),n=[];for(let e=0;e<i.length;e++){const{type:t,value:s}=i[e],r=j[t];"era"===t?n[r]=s:Re(r)||(n[r]=parseInt(s,10))}return n}(i,t):function(e,t){const i=e.format(t).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(i),[,s,r,o,a,l,c,u]=n;return[o,s,r,a,l,c,u]}(i,t);"BC"===a&&(s=1-Math.abs(s));let d=+t;const h=d%1e3;return d-=h>=0?h:1e3+h,(We({year:s,month:r,day:o,hour:24===l?0:l,minute:c,second:u,millisecond:0})-d)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let $={},z={};function B(e,t={}){const i=JSON.stringify([e,t]);let n=z[i];return n||(n=new Intl.DateTimeFormat(e,t),z[i]=n),n}let H={},W={},J=null,Z={};function G(e,t,i,n){const s=e.listingMode();return"error"===s?null:"en"===s?i(t):n(t)}class K{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:n,floor:s,...r}=i;if(!t||Object.keys(r).length>0){const t={useGrouping:!1,...i};i.padTo>0&&(t.minimumIntegerDigits=i.padTo),this.inf=function(e,t={}){const i=JSON.stringify([e,t]);let n=H[i];return n||(n=new Intl.NumberFormat(e,t),H[i]=n),n}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Me(this.floor?Math.floor(e):$e(e,3),this.padTo)}}class Y{constructor(e,t,i){let n;if(this.opts=i,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,i=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&F.create(i).valid?(n=i,this.dt=e):(n="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,n=e.zone.name):(n="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const s={...this.opts};s.timeZone=s.timeZone||n,this.dtf=B(t,s)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class X{constructor(e,t,i){this.opts={style:"long",...i},!t&&xe()&&(this.rtf=function(e,t={}){const{base:i,...n}=t,s=JSON.stringify([e,n]);let r=W[s];return r||(r=new Intl.RelativeTimeFormat(e,t),W[s]=r),r}(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,i="always",n=!1){const s={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."]},r=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===i&&r){const i="days"===e;switch(t){case 1:return i?"tomorrow":`next ${s[e][0]}`;case-1:return i?"yesterday":`last ${s[e][0]}`;case 0:return i?"today":`this ${s[e][0]}`}}const o=Object.is(t,-0)||t<0,a=Math.abs(t),l=1===a,c=s[e],u=n?l?c[1]:c[2]||c[1]:l?s[e][0]:e;return o?`${a} ${u} ago`:`in ${a} ${u}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const Q={firstDay:1,minimalDays:4,weekend:[6,7]};class ee{static fromOpts(e){return ee.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,i,n,s=!1){const r=e||fe.defaultLocale,o=r||(s?"en-US":J||(J=(new Intl.DateTimeFormat).resolvedOptions().locale,J)),a=t||fe.defaultNumberingSystem,l=i||fe.defaultOutputCalendar,c=Ve(n)||fe.defaultWeekSettings;return new ee(o,a,l,c,r)}static resetCache(){J=null,z={},H={},W={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i,weekSettings:n}={}){return ee.create(e,t,i,n)}constructor(e,t,i,n,s){const[r,o,a]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const i=e.indexOf("-u-");if(-1===i)return[e];{let t,n;try{t=B(e).resolvedOptions(),n=e}catch(s){const r=e.substring(0,i);t=B(r).resolvedOptions(),n=r}const{numberingSystem:s,calendar:r}=t;return[n,s,r]}}(e);this.locale=r,this.numberingSystem=t||o||null,this.outputCalendar=i||a||null,this.weekSettings=n,this.intl=function(e,t,i){return i||t?(e.includes("-u-")||(e+="-u"),i&&(e+=`-ca-${i}`),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=s,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?ee.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Ve(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return G(this,e,rt,()=>{const i=t?{month:e,day:"numeric"}:{month:e},n=t?"format":"standalone";return this.monthsCache[n][e]||(this.monthsCache[n][e]=function(e){const t=[];for(let i=1;i<=12;i++){const n=an.utc(2009,i,1);t.push(e(n))}return t}(e=>this.extract(e,i,"month"))),this.monthsCache[n][e]})}weekdays(e,t=!1){return G(this,e,ct,()=>{const i=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},n=t?"format":"standalone";return this.weekdaysCache[n][e]||(this.weekdaysCache[n][e]=function(e){const t=[];for(let i=1;i<=7;i++){const n=an.utc(2016,11,13+i);t.push(e(n))}return t}(e=>this.extract(e,i,"weekday"))),this.weekdaysCache[n][e]})}meridiems(){return G(this,void 0,()=>ut,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[an.utc(2016,11,13,9),an.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return G(this,e,pt,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[an.utc(-40,1,1),an.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,i){const n=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===i);return n?n.value:null}numberFormatter(e={}){return new K(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Y(e,this.intl,t)}relFormatter(e={}){return new X(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const i=JSON.stringify([e,t]);let n=$[i];return n||(n=new Intl.ListFormat(e,t),$[i]=n),n}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:De()?function(e){let t=Z[e];if(!t){const i=new Intl.Locale(e);t="getWeekInfo"in i?i.getWeekInfo():i.weekInfo,Z[e]=t}return t}(this.locale):Q}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}let te=null;class ie extends P{static get utcInstance(){return null===te&&(te=new ie(0)),te}static instance(e){return 0===e?ie.utcInstance:new ie(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new ie(Ye(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${et(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${et(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return et(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class ne extends P{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function se(e,t){if(Re(e)||null===e)return t;if(e instanceof P)return e;if("string"==typeof e){const i=e.toLowerCase();return"default"===i?t:"local"===i||"system"===i?_.instance:"utc"===i||"gmt"===i?ie.utcInstance:ie.parseSpecifier(i)||F.create(e)}return Ne(e)?ie.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new ne(e)}let re,oe=()=>Date.now(),ae="system",le=null,ce=null,ue=null,de=60,he=null;class fe{static get now(){return oe}static set now(e){oe=e}static set defaultZone(e){ae=e}static get defaultZone(){return se(ae,_.instance)}static get defaultLocale(){return le}static set defaultLocale(e){le=e}static get defaultNumberingSystem(){return ce}static set defaultNumberingSystem(e){ce=e}static get defaultOutputCalendar(){return ue}static set defaultOutputCalendar(e){ue=e}static get defaultWeekSettings(){return he}static set defaultWeekSettings(e){he=Ve(e)}static get twoDigitCutoffYear(){return de}static set twoDigitCutoffYear(e){de=e%100}static get throwOnInvalid(){return re}static set throwOnInvalid(e){re=e}static resetCaches(){ee.resetCache(),F.resetCache()}}class pe{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const ge=[0,31,59,90,120,151,181,212,243,273,304,334],me=[0,31,60,91,121,152,182,213,244,274,305,335];function ve(e,t){return new pe("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function ye(e,t,i){const n=new Date(Date.UTC(e,t-1,i));e<100&&e>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const s=n.getUTCDay();return 0===s?7:s}function Ee(e,t,i){return i+(ze(e)?me:ge)[t-1]}function Se(e,t){const i=ze(e)?me:ge,n=i.findIndex(e=>e<t);return{month:n+1,day:t-i[n]}}function be(e,t){return(e-t+7)%7+1}function we(e,t=4,i=1){const{year:n,month:s,day:r}=e,o=Ee(n,s,r),a=be(ye(n,s,r),i);let l,c=Math.floor((o-a+14-t)/7);return c<1?(l=n-1,c=Ze(l,t,i)):c>Ze(n,t,i)?(l=n+1,c=1):l=n,{weekYear:l,weekNumber:c,weekday:a,...tt(e)}}function ke(e,t=4,i=1){const{weekYear:n,weekNumber:s,weekday:r}=e,o=be(ye(n,1,t),i),a=Be(n);let l,c=7*s+r-o-7+t;c<1?(l=n-1,c+=Be(l)):c>a?(l=n+1,c-=Be(n)):l=n;const{month:u,day:d}=Se(l,c);return{year:l,month:u,day:d,...tt(e)}}function Ie(e){const{year:t,month:i,day:n}=e;return{year:t,ordinal:Ee(t,i,n),...tt(e)}}function Ae(e){const{year:t,ordinal:i}=e,{month:n,day:s}=Se(t,i);return{year:t,month:n,day:s,...tt(e)}}function Ce(e,t){if(!Re(e.localWeekday)||!Re(e.localWeekNumber)||!Re(e.localWeekYear)){if(!Re(e.weekday)||!Re(e.weekNumber)||!Re(e.weekYear))throw new o("Cannot mix locale-based week fields with ISO-based week fields");return Re(e.localWeekday)||(e.weekday=e.localWeekday),Re(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Re(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Oe(e){const t=Le(e.year),i=_e(e.month,1,12),n=_e(e.day,1,He(e.year,e.month));return t?i?!n&&ve("day",e.day):ve("month",e.month):ve("year",e.year)}function Te(e){const{hour:t,minute:i,second:n,millisecond:s}=e,r=_e(t,0,23)||24===t&&0===i&&0===n&&0===s,o=_e(i,0,59),a=_e(n,0,59),l=_e(s,0,999);return r?o?a?!l&&ve("millisecond",s):ve("second",n):ve("minute",i):ve("hour",t)}function Re(e){return void 0===e}function Ne(e){return"number"==typeof e}function Le(e){return"number"==typeof e&&e%1==0}function xe(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function De(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Ue(e,t,i){if(0!==e.length)return e.reduce((e,n)=>{const s=[t(n),n];return e&&i(e[0],s[0])===e[0]?e:s},null)[1]}function Pe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ve(e){if(null==e)return null;if("object"!=typeof e)throw new l("Week settings must be an object");if(!_e(e.firstDay,1,7)||!_e(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!_e(e,1,7)))throw new l("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function _e(e,t,i){return Le(e)&&e>=t&&e<=i}function Me(e,t=2){let i;return i=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),i}function je(e){return Re(e)||null===e||""===e?void 0:parseInt(e,10)}function qe(e){return Re(e)||null===e||""===e?void 0:parseFloat(e)}function Fe(e){if(!Re(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function $e(e,t,i=!1){const n=10**t;return(i?Math.trunc:Math.round)(e*n)/n}function ze(e){return e%4==0&&(e%100!=0||e%400==0)}function Be(e){return ze(e)?366:365}function He(e,t){const i=(n=t-1)-12*Math.floor(n/12)+1;var n;return 2===i?ze(e+(t-i)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][i-1]}function We(e){let 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),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Je(e,t,i){return-be(ye(e,1,t),i)+t-1}function Ze(e,t=4,i=1){const n=Je(e,t,i),s=Je(e+1,t,i);return(Be(e)-n+s)/7}function Ge(e){return e>99?e:e>fe.twoDigitCutoffYear?1900+e:2e3+e}function Ke(e,t,i,n=null){const s=new Date(e),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(r.timeZone=n);const o={timeZoneName:t,...r},a=new Intl.DateTimeFormat(i,o).formatToParts(s).find(e=>"timezonename"===e.type.toLowerCase());return a?a.value:null}function Ye(e,t){let i=parseInt(e,10);Number.isNaN(i)&&(i=0);const n=parseInt(t,10)||0;return 60*i+(i<0||Object.is(i,-0)?-n:n)}function Xe(e){const t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new l(`Invalid unit value ${e}`);return t}function Qe(e,t){const i={};for(const n in e)if(Pe(e,n)){const s=e[n];if(null==s)continue;i[t(n)]=Xe(s)}return i}function et(e,t){const i=Math.trunc(Math.abs(e/60)),n=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${Me(i,2)}:${Me(n,2)}`;case"narrow":return`${s}${i}${n>0?`:${n}`:""}`;case"techie":return`${s}${Me(i,2)}${Me(n,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function tt(e){return function(e){return["hour","minute","second","millisecond"].reduce((t,i)=>(t[i]=e[i],t),{})}(e)}const it=["January","February","March","April","May","June","July","August","September","October","November","December"],nt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],st=["J","F","M","A","M","J","J","A","S","O","N","D"];function rt(e){switch(e){case"narrow":return[...st];case"short":return[...nt];case"long":return[...it];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}}const ot=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],at=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],lt=["M","T","W","T","F","S","S"];function ct(e){switch(e){case"narrow":return[...lt];case"short":return[...at];case"long":return[...ot];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const ut=["AM","PM"],dt=["Before Christ","Anno Domini"],ht=["BC","AD"],ft=["B","A"];function pt(e){switch(e){case"narrow":return[...ft];case"short":return[...ht];case"long":return[...dt];default:return null}}function gt(e,t){let i="";for(const n of e)n.literal?i+=n.val:i+=t(n.val);return i}const mt={D:f,DD:p,DDD:m,DDDD:v,t:y,tt:E,ttt:S,tttt:b,T:w,TT:k,TTT:I,TTTT:A,f:C,ff:T,fff:L,ffff:D,F:O,FF:R,FFF:x,FFFF:U};class vt{static create(e,t={}){return new vt(e,t)}static parseFormat(e){let t=null,i="",n=!1;const s=[];for(let r=0;r<e.length;r++){const o=e.charAt(r);"'"===o?(i.length>0&&s.push({literal:n||/^\s+$/.test(i),val:i}),t=null,i="",n=!n):n||o===t?i+=o:(i.length>0&&s.push({literal:/^\s+$/.test(i),val:i}),i=o,t=o)}return i.length>0&&s.push({literal:n||/^\s+$/.test(i),val:i}),s}static macroTokenToFormatOpts(e){return mt[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return Me(e,t);const i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const i="en"===this.loc.listingMode(),n=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,s=(t,i)=>this.loc.extract(e,t,i),r=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",o=(t,n)=>i?function(e,t){return rt(t)[e.month-1]}(e,t):s(n?{month:t}:{month:t,day:"numeric"},"month"),a=(t,n)=>i?function(e,t){return ct(t)[e.weekday-1]}(e,t):s(n?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),l=t=>{const i=vt.macroTokenToFormatOpts(t);return i?this.formatWithSystemDefault(e,i):t},c=t=>i?function(e,t){return pt(t)[e.year<0?0:1]}(e,t):s({era:t},"era");return gt(vt.parseFormat(t),t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return r({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return r({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return r({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return i?function(e){return ut[e.hour<12?0:1]}(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return n?s({day:"numeric"},"day"):this.num(e.day);case"dd":return n?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return a("short",!0);case"cccc":return a("long",!0);case"ccccc":return a("narrow",!0);case"EEE":return a("short",!1);case"EEEE":return a("long",!1);case"EEEEE":return a("narrow",!1);case"L":return n?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return n?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return o("short",!0);case"LLLL":return o("long",!0);case"LLLLL":return o("narrow",!0);case"M":return n?s({month:"numeric"},"month"):this.num(e.month);case"MM":return n?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return o("short",!1);case"MMMM":return o("long",!1);case"MMMMM":return o("narrow",!1);case"y":return n?s({year:"numeric"},"year"):this.num(e.year);case"yy":return n?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return n?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return n?s({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return l(t)}})}formatDurationFromString(e,t){const i=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"w":return"week";case"M":return"month";case"y":return"year";default:return null}},n=vt.parseFormat(t),s=n.reduce((e,{literal:t,val:i})=>t?e:e.concat(i),[]);return gt(n,(e=>t=>{const n=i(t);return n?this.num(e.get(n),t.length):t})(e.shiftTo(...s.map(i).filter(e=>e))))}}const yt=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Et(...e){const t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function St(...e){return t=>e.reduce(([e,i,n],s)=>{const[r,o,a]=s(t,n);return[{...e,...r},o||i,a]},[{},null,1]).slice(0,2)}function bt(e,...t){if(null==e)return[null,null];for(const[i,n]of t){const t=i.exec(e);if(t)return n(t)}return[null,null]}function wt(...e){return(t,i)=>{const n={};let s;for(s=0;s<e.length;s++)n[e[s]]=je(t[i+s]);return[n,null,i+s]}}const kt=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,It=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,At=RegExp(`${It.source}(?:${kt.source}?(?:\\[(${yt.source})\\])?)?`),Ct=RegExp(`(?:T${At.source})?`),Ot=wt("weekYear","weekNumber","weekDay"),Tt=wt("year","ordinal"),Rt=RegExp(`${It.source} ?(?:${kt.source}|(${yt.source}))?`),Nt=RegExp(`(?: ${Rt.source})?`);function Lt(e,t,i){const n=e[t];return Re(n)?i:je(n)}function xt(e,t){return[{hours:Lt(e,t,0),minutes:Lt(e,t+1,0),seconds:Lt(e,t+2,0),milliseconds:Fe(e[t+3])},null,t+4]}function Dt(e,t){const i=!e[t]&&!e[t+1],n=Ye(e[t+1],e[t+2]);return[{},i?null:ie.instance(n),t+3]}function Ut(e,t){return[{},e[t]?F.create(e[t]):null,t+1]}const Pt=RegExp(`^T?${It.source}$`),Vt=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function _t(e){const[t,i,n,s,r,o,a,l,c]=e,u="-"===t[0],d=l&&"-"===l[0],h=(e,t=!1)=>void 0!==e&&(t||e&&u)?-e:e;return[{years:h(qe(i)),months:h(qe(n)),weeks:h(qe(s)),days:h(qe(r)),hours:h(qe(o)),minutes:h(qe(a)),seconds:h(qe(l),"-0"===l),milliseconds:h(Fe(c),d)}]}const Mt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function jt(e,t,i,n,s,r,o){const a={year:2===t.length?Ge(je(t)):je(t),month:nt.indexOf(i)+1,day:je(n),hour:je(s),minute:je(r)};return o&&(a.second=je(o)),e&&(a.weekday=e.length>3?ot.indexOf(e)+1:at.indexOf(e)+1),a}const qt=/^(?:(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 Ft(e){const[,t,i,n,s,r,o,a,l,c,u,d]=e,h=jt(t,s,n,i,r,o,a);let f;return f=l?Mt[l]:c?0:Ye(u,d),[h,new ie(f)]}const $t=/^(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$/,zt=/^(Monday|Tuesday|Wednesday|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$/,Bt=/^(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 Ht(e){const[,t,i,n,s,r,o,a]=e;return[jt(t,s,n,i,r,o,a),ie.utcInstance]}function Wt(e){const[,t,i,n,s,r,o,a]=e;return[jt(t,a,i,n,s,r,o),ie.utcInstance]}const Jt=Et(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ct),Zt=Et(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Ct),Gt=Et(/(\d{4})-?(\d{3})/,Ct),Kt=Et(At),Yt=St(function(e,t){return[{year:Lt(e,t),month:Lt(e,t+1,1),day:Lt(e,t+2,1)},null,t+3]},xt,Dt,Ut),Xt=St(Ot,xt,Dt,Ut),Qt=St(Tt,xt,Dt,Ut),ei=St(xt,Dt,Ut),ti=St(xt),ii=Et(/(\d{4})-(\d\d)-(\d\d)/,Nt),ni=Et(Rt),si=St(xt,Dt,Ut),ri="Invalid Duration",oi={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}},ai={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},...oi},li={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:4.3481250000000005,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...oi},ci=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ui=ci.slice(0).reverse();function di(e,t,i=!1){const n={values:i?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new pi(n)}function hi(e,t){var i;let n=null!=(i=t.milliseconds)?i:0;for(const i of ui.slice(1))t[i]&&(n+=t[i]*e[i].milliseconds);return n}function fi(e,t){const i=hi(e,t)<0?-1:1;ci.reduceRight((n,s)=>{if(Re(t[s]))return n;if(n){const r=t[n]*i,o=e[s][n],a=Math.floor(r/o);t[s]+=a*i,t[n]-=a*o*i}return s},null),ci.reduce((i,n)=>{if(Re(t[n]))return i;if(i){const s=t[i]%1;t[i]-=s,t[n]+=s*e[i][n]}return n},null)}class pi{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let i=t?li:ai;e.matrix&&(i=e.matrix),this.values=e.values,this.loc=e.loc||ee.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(e,t){return pi.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new l("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new pi({values:Qe(e,pi.normalizeUnit),loc:ee.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(Ne(e))return pi.fromMillis(e);if(pi.isDuration(e))return e;if("object"==typeof e)return pi.fromObject(e);throw new l(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=function(e){return bt(e,[Vt,_t])}(e);return i?pi.fromObject(i,t):pi.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=function(e){return bt(e,[Pt,ti])}(e);return i?pi.fromObject(i,t):pi.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new l("need to specify a reason the Duration is invalid");const i=e instanceof pe?e:new pe(e,t);if(fe.throwOnInvalid)throw new r(i);return new pi({invalid:i})}static normalizeUnit(e){const 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 a(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const i={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?vt.create(this.loc,i).formatDurationFromString(this,e):ri}toHuman(e={}){if(!this.isValid)return ri;const t=ci.map(t=>{const i=this.values[t];return Re(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:t.slice(0,-1)}).format(i)}).filter(e=>e);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let 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+=$e(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},an.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?hi(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=pi.fromDurationLike(e),i={};for(const e of ci)(Pe(t.values,e)||Pe(this.values,e))&&(i[e]=t.get(e)+this.get(e));return di(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=pi.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const i of Object.keys(this.values))t[i]=Xe(e(this.values[i],i));return di(this,{values:t},!0)}get(e){return this[pi.normalizeUnit(e)]}set(e){return this.isValid?di(this,{values:{...this.values,...Qe(e,pi.normalizeUnit)}}):this}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i,matrix:n}={}){return di(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:n,conversionAccuracy:i})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return fi(this.matrix,e),di(this,{values:e},!0)}rescale(){return this.isValid?di(this,{values:function(e){const t={};for(const[i,n]of Object.entries(e))0!==n&&(t[i]=n);return t}(this.normalize().shiftToAll().toObject())},!0):this}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>pi.normalizeUnit(e));const t={},i={},n=this.toObject();let s;for(const r of ci)if(e.indexOf(r)>=0){s=r;let e=0;for(const t in i)e+=this.matrix[t][r]*i[t],i[t]=0;Ne(n[r])&&(e+=n[r]);const o=Math.trunc(e);t[r]=o,i[r]=(1e3*e-1e3*o)/1e3}else Ne(n[r])&&(i[r]=n[r]);for(const e in i)0!==i[e]&&(t[s]+=e===s?i[e]:i[e]/this.matrix[s][e]);return fi(this.matrix,t),di(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return di(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const i of ci)if(!t(this.values[i],e.values[i]))return!1;return!0}}const gi="Invalid Interval";class mi{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new l("need to specify a reason the Interval is invalid");const i=e instanceof pe?e:new pe(e,t);if(fe.throwOnInvalid)throw new s(i);return new mi({invalid:i})}static fromDateTimes(e,t){const i=ln(e),n=ln(t),s=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?mi.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:mi.invalid("missing or invalid end"):mi.invalid("missing or invalid start")}(i,n);return null==s?new mi({start:i,end:n}):s}static after(e,t){const i=pi.fromDurationLike(t),n=ln(e);return mi.fromDateTimes(n,n.plus(i))}static before(e,t){const i=pi.fromDurationLike(t),n=ln(e);return mi.fromDateTimes(n.minus(i),n)}static fromISO(e,t){const[i,n]=(e||"").split("/",2);if(i&&n){let e,s,r,o;try{e=an.fromISO(i,t),s=e.isValid}catch(n){s=!1}try{r=an.fromISO(n,t),o=r.isValid}catch(n){o=!1}if(s&&o)return mi.fromDateTimes(e,r);if(s){const i=pi.fromISO(n,t);if(i.isValid)return mi.after(e,i)}else if(o){const e=pi.fromISO(i,t);if(e.isValid)return mi.before(r,e)}}return mi.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const i=this.start.startOf(e,t);let n;return n=null!=t&&t.useLocaleWeeks?this.end.reconfigure({locale:i.locale}):this.end,n=n.startOf(e,t),Math.floor(n.diff(i,e).get(e))+(n.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&this.s<=e&&this.e>e}set({start:e,end:t}={}){return this.isValid?mi.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(ln).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),i=[];let{s:n}=this,s=0;for(;n<this.e;){const e=t[s]||this.e,r=+e>+this.e?this.e:e;i.push(mi.fromDateTimes(n,r)),n=r,s+=1}return i}splitBy(e){const t=pi.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let i,{s:n}=this,s=1;const r=[];for(;n<this.e;){const e=this.start.plus(t.mapUnits(e=>e*s));i=+e>+this.e?this.e:e,r.push(mi.fromDateTimes(n,i)),n=i,s+=1}return r}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e===+e.s}abutsEnd(e){return!!this.isValid&&+e.e===+this.s}engulfs(e){return!!this.isValid&&this.s<=e.s&&this.e>=e.e}equals(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,i=this.e<e.e?this.e:e.e;return t>=i?null:mi.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,i=this.e>e.e?this.e:e.e;return mi.fromDateTimes(t,i)}static merge(e){const[t,i]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],i)=>t?t.overlaps(i)||t.abutsStart(i)?[e,t.union(i)]:[e.concat([t]),i]:[e,i],[[],null]);return i&&t.push(i),t}static xor(e){let t=null,i=0;const n=[],s=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),r=Array.prototype.concat(...s).sort((e,t)=>e.time-t.time);for(const e of r)i+="s"===e.type?1:-1,1===i?t=e.time:(t&&+t!==+e.time&&n.push(mi.fromDateTimes(t,e.time)),t=null);return mi.merge(n)}difference(...e){return mi.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:gi}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=f,t={}){return this.isValid?vt.create(this.s.loc.clone(t),e).formatInterval(this):gi}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:gi}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:gi}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:gi}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:gi}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):pi.invalid(this.invalidReason)}mapEndpoints(e){return mi.fromDateTimes(e(this.s),e(this.e))}}class vi{static hasDST(e=fe.defaultZone){const t=an.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return F.isValidZone(e)}static normalizeZone(e){return se(e,fe.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||ee.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||ee.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||ee.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:n=null,outputCalendar:s="gregory"}={}){return(n||ee.create(t,i,s)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:n=null,outputCalendar:s="gregory"}={}){return(n||ee.create(t,i,s)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:n=null}={}){return(n||ee.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:n=null}={}){return(n||ee.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ee.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return ee.create(t,null,"gregory").eras(e)}static features(){return{relative:xe(),localeWeek:De()}}}function yi(e,t){const i=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=i(t)-i(e);return Math.floor(pi.fromMillis(n).as("days"))}const Ei={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Si={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]},bi=Ei.hanidec.replace(/[\[|\]]/g,"").split("");function wi({numberingSystem:e},t=""){return new RegExp(`${Ei[e||"latn"]}${t}`)}function ki(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let i=0;i<e.length;i++){const n=e.charCodeAt(i);if(-1!==e[i].search(Ei.hanidec))t+=bi.indexOf(e[i]);else for(const e in Si){const[i,s]=Si[e];n>=i&&n<=s&&(t+=n-i)}}return parseInt(t,10)}return t}(e))}}const Ii=`[ ${String.fromCharCode(160)}]`,Ai=new RegExp(Ii,"g");function Ci(e){return e.replace(/\./g,"\\.?").replace(Ai,Ii)}function Oi(e){return e.replace(/\./g,"").replace(Ai," ").toLowerCase()}function Ti(e,t){return null===e?null:{regex:RegExp(e.map(Ci).join("|")),deser:([i])=>e.findIndex(e=>Oi(i)===Oi(e))+t}}function Ri(e,t){return{regex:e,deser:([,e,t])=>Ye(e,t),groups:t}}function Ni(e){return{regex:e,deser:([e])=>e}}const Li={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",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let xi=null;function Di(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const i=Pi(vt.macroTokenToFormatOpts(e.val),t);return null==i||i.includes(void 0)?e:i}(e,t)))}function Ui(e,t,i){const n=Di(vt.parseFormat(i),e),s=n.map(t=>function(e,t){const i=wi(t),n=wi(t,"{2}"),s=wi(t,"{3}"),r=wi(t,"{4}"),o=wi(t,"{6}"),a=wi(t,"{1,2}"),l=wi(t,"{1,3}"),c=wi(t,"{1,6}"),u=wi(t,"{1,9}"),d=wi(t,"{2,4}"),h=wi(t,"{4,6}"),f=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},p=(p=>{if(e.literal)return f(p);switch(p.val){case"G":return Ti(t.eras("short"),0);case"GG":return Ti(t.eras("long"),0);case"y":return ki(c);case"yy":case"kk":return ki(d,Ge);case"yyyy":case"kkkk":return ki(r);case"yyyyy":return ki(h);case"yyyyyy":return ki(o);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return ki(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return ki(n);case"MMM":return Ti(t.months("short",!0),1);case"MMMM":return Ti(t.months("long",!0),1);case"LLL":return Ti(t.months("short",!1),1);case"LLLL":return Ti(t.months("long",!1),1);case"o":case"S":return ki(l);case"ooo":case"SSS":return ki(s);case"u":return Ni(u);case"uu":return Ni(a);case"uuu":case"E":case"c":return ki(i);case"a":return Ti(t.meridiems(),0);case"EEE":return Ti(t.weekdays("short",!1),1);case"EEEE":return Ti(t.weekdays("long",!1),1);case"ccc":return Ti(t.weekdays("short",!0),1);case"cccc":return Ti(t.weekdays("long",!0),1);case"Z":case"ZZ":return Ri(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return Ri(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return Ni(/[a-z_+-/]{1,256}?/i);case" ":return Ni(/[^\S\n\r]/);default:return f(p)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return p.token=e,p}(t,e)),r=s.find(e=>e.invalidReason);if(r)return{input:t,tokens:n,invalidReason:r.invalidReason};{const[e,i]=function(e){return[`^${e.map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"")}$`,e]}(s),r=RegExp(e,"i"),[a,l]=function(e,t,i){const n=e.match(t);if(n){const e={};let t=1;for(const s in i)if(Pe(i,s)){const r=i[s],o=r.groups?r.groups+1:1;!r.literal&&r.token&&(e[r.token.val[0]]=r.deser(n.slice(t,t+o))),t+=o}return[n,e]}return[n,{}]}(t,r,i),[c,u,d]=l?function(e){let t,i=null;return Re(e.z)||(i=F.create(e.z)),Re(e.Z)||(i||(i=new ie(e.Z)),t=e.Z),Re(e.q)||(e.M=3*(e.q-1)+1),Re(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),Re(e.u)||(e.S=Fe(e.u)),[Object.keys(e).reduce((t,i)=>{const n=(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}})(i);return n&&(t[n]=e[i]),t},{}),i,t]}(l):[null,null,void 0];if(Pe(l,"a")&&Pe(l,"H"))throw new o("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:n,regex:r,rawMatches:a,matches:l,result:c,zone:u,specificOffset:d}}}function Pi(e,t){if(!e)return null;const i=vt.create(t,e).dtFormatter((xi||(xi=an.fromMillis(1555555555555)),xi)),n=i.formatToParts(),s=i.resolvedOptions();return n.map(t=>function(e,t,i){const{type:n,value:s}=e;if("literal"===n){const e=/^\s+$/.test(s);return{literal:!e,val:e?" ":s}}const r=t[n];let o=n;"hour"===n&&(o=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":i.hour12?"hour12":"hour24");let a=Li[o];if("object"==typeof a&&(a=a[r]),a)return{literal:!1,val:a}}(t,e,s))}const Vi="Invalid DateTime",_i=864e13;function Mi(e){return new pe("unsupported zone",`the zone "${e.name}" is not supported`)}function ji(e){return null===e.weekData&&(e.weekData=we(e.c)),e.weekData}function qi(e){return null===e.localWeekData&&(e.localWeekData=we(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Fi(e,t){const i={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new an({...i,...t,old:i})}function $i(e,t,i){let n=e-60*t*1e3;const s=i.offset(n);if(t===s)return[n,t];n-=60*(s-t)*1e3;const r=i.offset(n);return s===r?[n,s]:[e-60*Math.min(s,r)*1e3,Math.max(s,r)]}function zi(e,t){const i=new Date(e+=60*t*1e3);return{year:i.getUTCFullYear(),month:i.getUTCMonth()+1,day:i.getUTCDate(),hour:i.getUTCHours(),minute:i.getUTCMinutes(),second:i.getUTCSeconds(),millisecond:i.getUTCMilliseconds()}}function Bi(e,t,i){return $i(We(e),t,i)}function Hi(e,t){const i=e.o,n=e.c.year+Math.trunc(t.years),s=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),r={...e.c,year:n,month:s,day:Math.min(e.c.day,He(n,s))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},o=pi.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=We(r);let[l,c]=$i(a,i,e.zone);return 0!==o&&(l+=o,c=e.zone.offset(l)),{ts:l,o:c}}function Wi(e,t,i,n,s,r){const{setZone:o,zone:a}=i;if(e&&0!==Object.keys(e).length||t){const n=t||a,s=an.fromObject(e,{...i,zone:n,specificOffset:r});return o?s:s.setZone(a)}return an.invalid(new pe("unparsable",`the input "${s}" can't be parsed as ${n}`))}function Ji(e,t,i=!0){return e.isValid?vt.create(ee.create("en-US"),{allowZ:i,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Zi(e,t){const i=e.c.year>9999||e.c.year<0;let n="";return i&&e.c.year>=0&&(n+="+"),n+=Me(e.c.year,i?6:4),t?(n+="-",n+=Me(e.c.month),n+="-",n+=Me(e.c.day)):(n+=Me(e.c.month),n+=Me(e.c.day)),n}function Gi(e,t,i,n,s,r){let o=Me(e.c.hour);return t?(o+=":",o+=Me(e.c.minute),0===e.c.millisecond&&0===e.c.second&&i||(o+=":")):o+=Me(e.c.minute),0===e.c.millisecond&&0===e.c.second&&i||(o+=Me(e.c.second),0===e.c.millisecond&&n||(o+=".",o+=Me(e.c.millisecond,3))),s&&(e.isOffsetFixed&&0===e.offset&&!r?o+="Z":e.o<0?(o+="-",o+=Me(Math.trunc(-e.o/60)),o+=":",o+=Me(Math.trunc(-e.o%60))):(o+="+",o+=Me(Math.trunc(e.o/60)),o+=":",o+=Me(Math.trunc(e.o%60)))),r&&(o+="["+e.zone.ianaName+"]"),o}const Ki={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Yi={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Xi={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Qi=["year","month","day","hour","minute","second","millisecond"],en=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],tn=["year","ordinal","hour","minute","second","millisecond"];function nn(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return function(e){const 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 a(e);return t}(e)}}function sn(e,t){const i=se(t.zone,fe.defaultZone),n=ee.fromObject(t),s=fe.now();let r,o;if(Re(e.year))r=s;else{for(const t of Qi)Re(e[t])&&(e[t]=Ki[t]);const t=Oe(e)||Te(e);if(t)return an.invalid(t);const n=i.offset(s);[r,o]=Bi(e,n,i)}return new an({ts:r,zone:i,loc:n,o})}function rn(e,t,i){const n=!!Re(i.round)||i.round,s=(e,s)=>(e=$e(e,n||i.calendary?0:2,!0),t.loc.clone(i).relFormatter(i).format(e,s)),r=n=>i.calendary?t.hasSame(e,n)?0:t.startOf(n).diff(e.startOf(n),n).get(n):t.diff(e,n).get(n);if(i.unit)return s(r(i.unit),i.unit);for(const e of i.units){const t=r(e);if(Math.abs(t)>=1)return s(t,e)}return s(e>t?-0:0,i.units[i.units.length-1])}function on(e){let t,i={};return e.length>0&&"object"==typeof e[e.length-1]?(i=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[i,t]}class an{constructor(e){const t=e.zone||fe.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new pe("invalid input"):null)||(t.isValid?null:Mi(t));this.ts=Re(e.ts)?fe.now():e.ts;let n=null,s=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[n,s]=[e.old.c,e.old.o];else{const e=t.offset(this.ts);n=zi(this.ts,e),i=Number.isNaN(n.year)?new pe("invalid input"):null,n=i?null:n,s=i?null:e}this._zone=t,this.loc=e.loc||ee.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=n,this.o=s,this.isLuxonDateTime=!0}static now(){return new an({})}static local(){const[e,t]=on(arguments),[i,n,s,r,o,a,l]=t;return sn({year:i,month:n,day:s,hour:r,minute:o,second:a,millisecond:l},e)}static utc(){const[e,t]=on(arguments),[i,n,s,r,o,a,l]=t;return e.zone=ie.utcInstance,sn({year:i,month:n,day:s,hour:r,minute:o,second:a,millisecond:l},e)}static fromJSDate(e,t={}){const i=(n=e,"[object Date]"===Object.prototype.toString.call(n)?e.valueOf():NaN);var n;if(Number.isNaN(i))return an.invalid("invalid input");const s=se(t.zone,fe.defaultZone);return s.isValid?new an({ts:i,zone:s,loc:ee.fromObject(t)}):an.invalid(Mi(s))}static fromMillis(e,t={}){if(Ne(e))return e<-_i||e>_i?an.invalid("Timestamp out of range"):new an({ts:e,zone:se(t.zone,fe.defaultZone),loc:ee.fromObject(t)});throw new l(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(Ne(e))return new an({ts:1e3*e,zone:se(t.zone,fe.defaultZone),loc:ee.fromObject(t)});throw new l("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=se(t.zone,fe.defaultZone);if(!i.isValid)return an.invalid(Mi(i));const n=ee.fromObject(t),s=Qe(e,nn),{minDaysInFirstWeek:r,startOfWeek:a}=Ce(s,n),l=fe.now(),c=Re(t.specificOffset)?i.offset(l):t.specificOffset,u=!Re(s.ordinal),d=!Re(s.year),h=!Re(s.month)||!Re(s.day),f=d||h,p=s.weekYear||s.weekNumber;if((f||u)&&p)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&u)throw new o("Can't mix ordinal dates with month/day");const g=p||s.weekday&&!f;let m,v,y=zi(l,c);g?(m=en,v=Yi,y=we(y,r,a)):u?(m=tn,v=Xi,y=Ie(y)):(m=Qi,v=Ki);let E=!1;for(const e of m)Re(s[e])?s[e]=E?v[e]:y[e]:E=!0;const S=g?function(e,t=4,i=1){const n=Le(e.weekYear),s=_e(e.weekNumber,1,Ze(e.weekYear,t,i)),r=_e(e.weekday,1,7);return n?s?!r&&ve("weekday",e.weekday):ve("week",e.weekNumber):ve("weekYear",e.weekYear)}(s,r,a):u?function(e){const t=Le(e.year),i=_e(e.ordinal,1,Be(e.year));return t?!i&&ve("ordinal",e.ordinal):ve("year",e.year)}(s):Oe(s),b=S||Te(s);if(b)return an.invalid(b);const w=g?ke(s,r,a):u?Ae(s):s,[k,I]=Bi(w,c,i),A=new an({ts:k,zone:i,o:I,loc:n});return s.weekday&&f&&e.weekday!==A.weekday?an.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${A.toISO()}`):A}static fromISO(e,t={}){const[i,n]=function(e){return bt(e,[Jt,Yt],[Zt,Xt],[Gt,Qt],[Kt,ei])}(e);return Wi(i,n,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,n]=function(e){return bt(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[qt,Ft])}(e);return Wi(i,n,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,n]=function(e){return bt(e,[$t,Ht],[zt,Ht],[Bt,Wt])}(e);return Wi(i,n,t,"HTTP",t)}static fromFormat(e,t,i={}){if(Re(e)||Re(t))throw new l("fromFormat requires an input string and a format");const{locale:n=null,numberingSystem:s=null}=i,r=ee.fromOpts({locale:n,numberingSystem:s,defaultToEN:!0}),[o,a,c,u]=function(e,t,i){const{result:n,zone:s,specificOffset:r,invalidReason:o}=Ui(e,t,i);return[n,s,r,o]}(r,e,t);return u?an.invalid(u):Wi(o,a,i,`format ${t}`,e,c)}static fromString(e,t,i={}){return an.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,n]=function(e){return bt(e,[ii,Yt],[ni,si])}(e);return Wi(i,n,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new l("need to specify a reason the DateTime is invalid");const i=e instanceof pe?e:new pe(e,t);if(fe.throwOnInvalid)throw new n(i);return new an({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const i=Pi(e,ee.fromObject(t));return i?i.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return Di(vt.parseFormat(e),ee.fromObject(t)).map(e=>e.val).join("")}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ji(this).weekYear:NaN}get weekNumber(){return this.isValid?ji(this).weekNumber:NaN}get weekday(){return this.isValid?ji(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?qi(this).weekday:NaN}get localWeekNumber(){return this.isValid?qi(this).weekNumber:NaN}get localWeekYear(){return this.isValid?qi(this).weekYear:NaN}get ordinal(){return this.isValid?Ie(this.c).ordinal:NaN}get monthShort(){return this.isValid?vi.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?vi.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?vi.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?vi.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,i=We(this.c),n=this.zone.offset(i-e),s=this.zone.offset(i+e),r=this.zone.offset(i-n*t),o=this.zone.offset(i-s*t);if(r===o)return[this];const a=i-r*t,l=i-o*t,c=zi(a,r),u=zi(l,o);return c.hour===u.hour&&c.minute===u.minute&&c.second===u.second&&c.millisecond===u.millisecond?[Fi(this,{ts:a}),Fi(this,{ts:l})]:[this]}get isInLeapYear(){return ze(this.year)}get daysInMonth(){return He(this.year,this.month)}get daysInYear(){return this.isValid?Be(this.year):NaN}get weeksInWeekYear(){return this.isValid?Ze(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Ze(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:n}=vt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:n}}toUTC(e=0,t={}){return this.setZone(ie.instance(e),t)}toLocal(){return this.setZone(fe.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if((e=se(e,fe.defaultZone)).equals(this.zone))return this;if(e.isValid){let n=this.ts;if(t||i){const t=e.offset(this.ts),i=this.toObject();[n]=Bi(i,t,e)}return Fi(this,{ts:n,zone:e})}return an.invalid(Mi(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){return Fi(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=Qe(e,nn),{minDaysInFirstWeek:i,startOfWeek:n}=Ce(t,this.loc),s=!Re(t.weekYear)||!Re(t.weekNumber)||!Re(t.weekday),r=!Re(t.ordinal),a=!Re(t.year),l=!Re(t.month)||!Re(t.day),c=a||l,u=t.weekYear||t.weekNumber;if((c||r)&&u)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new o("Can't mix ordinal dates with month/day");let d;s?d=ke({...we(this.c,i,n),...t},i,n):Re(t.ordinal)?(d={...this.toObject(),...t},Re(t.day)&&(d.day=Math.min(He(d.year,d.month),d.day))):d=Ae({...Ie(this.c),...t});const[h,f]=Bi(d,this.o,this.zone);return Fi(this,{ts:h,o:f})}plus(e){return this.isValid?Fi(this,Hi(this,pi.fromDurationLike(e))):this}minus(e){return this.isValid?Fi(this,Hi(this,pi.fromDurationLike(e).negate())):this}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const i={},n=pi.normalizeUnit(e);switch(n){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0}if("weeks"===n)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(i.weekNumber=this.weekNumber-1),i.weekday=e}else i.weekday=1;if("quarters"===n){const e=Math.ceil(this.month/3);i.month=3*(e-1)+1}return this.set(i)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?vt.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Vi}toLocaleString(e=f,t={}){return this.isValid?vt.create(this.loc.clone(t),e).formatDateTime(this):Vi}toLocaleParts(e={}){return this.isValid?vt.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:n=!0,extendedZone:s=!1}={}){if(!this.isValid)return null;const r="extended"===e;let o=Zi(this,r);return o+="T",o+=Gi(this,r,t,i,n,s),o}toISODate({format:e="extended"}={}){return this.isValid?Zi(this,"extended"===e):null}toISOWeekDate(){return Ji(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:n=!1,extendedZone:s=!1,format:r="extended"}={}){return this.isValid?(n?"T":"")+Gi(this,"extended"===r,t,e,i,s):null}toRFC2822(){return Ji(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ji(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Zi(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let n="HH:mm:ss.SSS";return(t||e)&&(i&&(n+=" "),t?n+="z":e&&(n+="ZZ")),Ji(this,n,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Vi}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",i={}){if(!this.isValid||!e.isValid)return pi.invalid("created by diffing an invalid DateTime");const n={locale:this.locale,numberingSystem:this.numberingSystem,...i},s=(a=t,Array.isArray(a)?a:[a]).map(pi.normalizeUnit),r=e.valueOf()>this.valueOf(),o=function(e,t,i,n){let[s,r,o,a]=function(e,t,i){const n=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const i=yi(e,t);return(i-i%7)/7}],["days",yi]],s={},r=e;let o,a;for(const[l,c]of n)i.indexOf(l)>=0&&(o=l,s[l]=c(e,t),a=r.plus(s),a>t?(s[l]--,(e=r.plus(s))>t&&(a=e,s[l]--,e=r.plus(s))):e=a);return[e,s,a,o]}(e,t,i);const l=t-s,c=i.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===c.length&&(o<t&&(o=s.plus({[a]:1})),o!==s&&(r[a]=(r[a]||0)+l/(o-s)));const u=pi.fromObject(r,n);return c.length>0?pi.fromMillis(l,n).shiftTo(...c).plus(u):u}(r?this:e,r?e:this,s,n);var a;return r?o.negate():o}diffNow(e="milliseconds",t={}){return this.diff(an.now(),e,t)}until(e){return this.isValid?mi.fromDateTimes(this,e):this}hasSame(e,t,i){if(!this.isValid)return!1;const n=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t,i)<=n&&n<=s.endOf(t,i)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||an.fromObject({},{zone:this.zone}),i=e.padding?this<t?-e.padding:e.padding:0;let n=["years","months","days","hours","minutes","seconds"],s=e.unit;return Array.isArray(e.unit)&&(n=e.unit,s=void 0),rn(t,this.plus(i),{...e,numeric:"always",units:n,unit:s})}toRelativeCalendar(e={}){return this.isValid?rn(e.base||an.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(an.isDateTime))throw new l("min requires all arguments be DateTimes");return Ue(e,e=>e.valueOf(),Math.min)}static max(...e){if(!e.every(an.isDateTime))throw new l("max requires all arguments be DateTimes");return Ue(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:n=null,numberingSystem:s=null}=i;return Ui(ee.fromOpts({locale:n,numberingSystem:s,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,i={}){return an.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return f}static get DATE_MED(){return p}static get DATE_MED_WITH_WEEKDAY(){return g}static get DATE_FULL(){return m}static get DATE_HUGE(){return v}static get TIME_SIMPLE(){return y}static get TIME_WITH_SECONDS(){return E}static get TIME_WITH_SHORT_OFFSET(){return S}static get TIME_WITH_LONG_OFFSET(){return b}static get TIME_24_SIMPLE(){return w}static get TIME_24_WITH_SECONDS(){return k}static get TIME_24_WITH_SHORT_OFFSET(){return I}static get TIME_24_WITH_LONG_OFFSET(){return A}static get DATETIME_SHORT(){return C}static get DATETIME_SHORT_WITH_SECONDS(){return O}static get DATETIME_MED(){return T}static get DATETIME_MED_WITH_SECONDS(){return R}static get DATETIME_MED_WITH_WEEKDAY(){return N}static get DATETIME_FULL(){return L}static get DATETIME_FULL_WITH_SECONDS(){return x}static get DATETIME_HUGE(){return D}static get DATETIME_HUGE_WITH_SECONDS(){return U}}function ln(e){if(an.isDateTime(e))return e;if(e&&e.valueOf&&Ne(e.valueOf()))return an.fromJSDate(e);if(e&&"object"==typeof e)return an.fromObject(e);throw new l(`Unknown datetime argument: ${e}, of type ${typeof e}`)}t.DateTime=an,t.Duration=pi,t.FixedOffsetZone=ie,t.IANAZone=F,t.Info=vi,t.Interval=mi,t.InvalidZone=ne,t.Settings=fe,t.SystemZone=_,t.VERSION="3.4.4",t.Zone=P},339(e){"use strict";var t=String.prototype.indexOf;e.exports=function(e){return t.call(this,e,arguments[1])>-1}},441(e){"use strict";e.exports=function(){}},497(e,t,i){"use strict";var n=i(666),s=Object.prototype.hasOwnProperty;e.exports=function(e){var t,i=arguments[1];if(n(e),void 0===i)s.call(e,"__ee__")&&delete e.__ee__;else{if(!(t=s.call(e,"__ee__")&&e.__ee__))return;t[i]&&delete t[i]}}},542(e,t,i){function n(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function s(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?n(Object(i),!0).forEach(function(t){r(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function r(e,t,i){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function o(e,t,i,n,s,r,o){try{var a=e[r](o),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(n,s)}function a(e){return function(){var t=this,i=arguments;return new Promise(function(n,s){var r=e.apply(t,i);function a(e){o(r,n,s,a,l,"next",e)}function l(e){o(r,n,s,a,l,"throw",e)}a(void 0)})}}var l;self,l=()=>(()=>{"use strict";var e={n:t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return e.d(i,{a:i}),i},d:(t,i)=>{for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},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:()=>Y,BrowserNotification:()=>p,Decorator:()=>m,Err:()=>g,Evt:()=>C,I18N:()=>U,Logger:()=>d,NotificationItemsContent:()=>P,Notifications:()=>$,Signal:()=>z,clearInterval:()=>Q,clearTimeout:()=>ee,createBrowserNotifications:()=>y,createHttp:()=>D,createLogger:()=>f,createNotifications:()=>W,ensureError:()=>ne,setInterval:()=>te,setTimeout:()=>ie});var n=i(322),r=e.n(n),o=i(327),l="*********",c=["authorization"];class u{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){var t=e;Object.keys(e).forEach(i=>{"object"==typeof e[i]&&null!==e[i]?this.maskObjectProperty(e[i]):t[i]=l})}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]=l)})}maskAuthorizationValues(e){if(e&&"object"==typeof e)if(Array.isArray(e))e.forEach(e=>this.maskAuthorizationValues(e));else{var t=e,i=/\b[A-Za-z0-9-_]{1,15000}\.[A-Za-z0-9-_]{1,15000}\.[A-Za-z0-9-_]{1,15000}\b/g,n=new RegExp("\\b(".concat(c.join("|"),")\\s*:\\s*[A-Za-z0-9-_.]+"),"gi");for(var[s,r]of Object.entries(t))if("object"!=typeof r||r instanceof Date){if(c.includes(s.toLowerCase()))t[s]=l;else if("string"==typeof r){var o=r.replace(n,"$1: ".concat(l));o.includes("eyJ")&&(o=o.replace(i,l)),t[s]=o}}else this.maskAuthorizationValues(r)}}maskPIIInformation(e){var t=e[e.length-1],i="string"==typeof t?this.tryJSONParse(t):this.copiedObj(t);i&&"object"==typeof i&&(this.maskAuthorizationValues(i),this.maskLogData(i),e.splice(e.length-1,1,i))}}var d,h=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.map(e=>"string"==typeof e?e:JSON.stringify(e))};function f(e,t){var i=new d.Service(e,t);return d.POOL.addLogger(i),i}!function(e){e.MAX_LOGS_SIZE=1048576,e.LS_LOGS_KEY="uuip-client-logs";var t,i="<uuip-eol>",n=/[\u0100-\uFFFF]/g,s="yyyy-LL-dd HH:mm:ss:SSS";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"}(t=e.Level||(e.Level={})),e.Service=class{constructor(e,t){this.loggerEmitter=r()(),this.prefix=e,this.maskKeys=t}log(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];this.maskKeys&&"object"==typeof this.maskKeys&&((e,t)=>{new u(t).maskPIIInformation(e)})(n,this.maskKeys);var a=h(this.prefix?["".concat(this.prefix),...n]:n),l=Date.now(),c=o.DateTime.fromMillis(l).toFormat(s);switch(t){case e.Level.Trace:console.info(c,...a);break;case e.Level.Debug:console.log(c,...a);break;case e.Level.Warn:console.warn(c,...a);break;case e.Level.Error:case e.Level.Fatal:console.error(c,...a);break;default:console.log(...a)}var d={pfx:this.prefix,msgs:[...n],ts:l,lvl:t};this.emit("add",d)}info(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];this.log(t.Trace,...i)}debug(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];this.log(t.Debug,...i)}warn(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];this.log(t.Warn,...i)}error(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];this.log(t.Error,...i)}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this.loggerEmitter.emit(e,...i)}addEventListener(e,t){return this.loggerEmitter.on(e,t),()=>{this.removeEventListener(e,t)}}removeEventListener(e,t){this.loggerEmitter.off(e,t)}};class a{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(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.length;if(t){var i=e.replace(n,"").length;return 1*i+2*(t-i)}return t}get serializedJsonLogsBytesSize(){var e=this.logsCollectionString.split(i).length;return 2+this.logRecordsSerializedLength+1*(e-1)}save(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=Date.now();t&&i-this.lastSaveTime<this.config.saveIntervalMilliSeconds||(this.lastSaveTime=i,window.sessionStorage.setItem(e.LS_LOGS_KEY,this.logsCollectionString))}restore(){try{var t=window.sessionStorage.getItem(e.LS_LOGS_KEY)||"";this.logsCollectionString=t,this.logRecordsSerializedLength+=a.getSerializedJsonLogRecordBytesSize(this.logsCollectionString),this.restorePreFixedLogs()}catch(e){console.warn("Logger failed read logs from sessionStorage: ",e)}}getLogObjectFromString(){try{if(""!==this.logsCollectionString)return JSON.parse("[".concat(this.logsCollectionString.split(i).join(","),"]"))}catch(e){console.log("Error parsing local storage data")}return{}}restorePreFixedLogs(){var 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,i){return"".concat(e.slice(0,t)).concat(e.slice(i+t))}addLogRecord(e){try{var t=JSON.stringify(e),n=this.logsCollectionString;this.logsCollectionString=null==n?void 0:n.concat("".concat(""!==n.trim()?i:"").concat(t))}catch(t){var s=JSON.stringify(e);this.logsCollectionString=s,console.warn("Logger failed read logs from sessionStorage: ",t)}this.logRecordsSerializedLength+=a.getSerializedJsonLogRecordBytesSize(JSON.stringify(e)),this.addPreFixedLogs(e),this.removeOversized()}removeLogRecord(){if(""!==this.logsCollectionString){var e=this.logsCollectionString.indexOf(i);if(-1!==e){var t=this.logsCollectionString.substring(0,e),n=e+10,s=this.removeTextFromString(this.logsCollectionString,0,n);this.logsCollectionString=s,this.logRecordsSerializedLength-=a.getSerializedJsonLogRecordBytesSize(t);try{var r=JSON.parse(t);this.prefixedLogsCollections[r.pfx]&&this.prefixedLogsCollections[r.pfx].forEach(e=>{e.ts===r.ts&&this.prefixedLogsCollections[r.pfx].delete(e)})}catch(e){console.warn("Logger failed to read/parse the first logs from sessionStorage: ",e)}}}}removePreFixedLogs(e){var t=this.getLogObjectFromString();e.forEach(e=>{var i=t.findIndex(t=>t.pfx===e.pfx);-1!==i&&(t.splice(i,1),this.logRecordsSerializedLength-=a.getSerializedJsonLogRecordBytesSize(JSON.stringify(e)),this.prefixedLogsCollections[e.pfx]&&this.prefixedLogsCollections[e.pfx].has(e)&&this.prefixedLogsCollections[e.pfx].delete(e))}),this.logsCollectionString=t.map(e=>JSON.stringify(e)).join(i)}static getLogRecordReadable(e){return e.ts?{prefix:e.pfx,messages:e.msgs,timestamp:o.DateTime.fromMillis(e.ts).toFormat(s),level:t[e.lvl]}:{}}static getLogsReadableJson(e){var t=e=>e.map(e=>a.getLogRecordReadable(e));return JSON.stringify(Array.isArray(e)?t(e):Object.keys(e).reduce((i,n)=>(i[n]=t(e[n]),i),{}),null,2)}static getLogsReadableText(e){var t=e=>e.reduce((e,t)=>{var i=a.getLogRecordReadable(t);return i&&(e+="".concat(i.timestamp," ").concat(i.prefix," ").concat(i.level," ").concat(h(i.messages).join(" ")," \r\n")),e},"");return Array.isArray(e)?t(e):Object.keys(e).reduce((i,n)=>(i+='[SERVICE "'.concat(n,'" LOGS]: '))+t(e[n]),"")}static getLogsUrl(e){return"data:text/plain;charset=utf-8,".concat(encodeURIComponent(e))}static browserDownload(e,t){try{if(document&&document.createElement){var i=document.createElement("a");i.setAttribute("href",e),i.setAttribute("download",t),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)}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 a.getLogsUrl(a.getLogsReadableJson(this.getLogObjectFromString()))}getAllPrefixedLogsJsonUrl(){return a.getLogsUrl(a.getLogsReadableJson(this.getAllPrefixedLogsCollections()))}getPrefixedLogsJsonUrl(e){return a.getLogsUrl(a.getLogsReadableJson(this.getPrefixedLogsCollection(e)))}getAllLogsTextUrl(){return a.getLogsUrl(a.getLogsReadableText(this.getLogObjectFromString()))}getPrefixedLogsTextUrl(e){return a.getLogsUrl(a.getLogsReadableText(this.getPrefixedLogsCollection(e)))}browserDownloadAllLogsJson(){a.browserDownload(this.getAllLogsJsonUrl(),"".concat(new Date,"_all_logs.json"))}browserDownloadAllPrefixedLogsJson(){a.browserDownload(this.getAllPrefixedLogsJsonUrl(),"".concat(new Date,"_all_prefixed_logs.json"))}browserDownloadPrefixedLogsJson(e){a.browserDownload(this.getPrefixedLogsJsonUrl(e),"".concat(new Date,"_").concat(e,"_logs.json"))}browserDownloadAllLogsText(){a.browserDownload(this.getAllLogsTextUrl(),"".concat(new Date,"_all_logs.log"))}browserDownloadPrefixedLogsText(e){a.browserDownload(this.getPrefixedLogsTextUrl(e),"".concat(new Date,"_").concat(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){var 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=a,e.POOL=new e.ServicesPool}(d||(d={}));var p,g,m,v=f("unified-ui-platform-sdk",{title:!0,text:!0});function y(e){return new p.Service(e)}function E(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;var i=e.descriptor.value,n=e.target.constructor.name;return e.descriptor.value=function(){for(var e=[],s=0;s<arguments.length;s++)e[s]=arguments[s];return t.call(this,i,e,n)},e.descriptor}function S(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;return function(t,i,n){var s;return E({target:t,key:i,descriptor:n},function(t,i){clearTimeout(s),s=window.setTimeout(()=>{clearTimeout(s),t.apply(this,i)},e)})}}function b(){return(e,t)=>{var i={get(){return new C(this,void 0!==t?t:e.key)},enumerable:!0,configurable:!0};return void 0!==t?Object.defineProperty(e,t,i):{kind:"method",placement:"prototype",key:e.key,descriptor:i}}}function w(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(i,n,s){return E({target:i,key:n,descriptor:s},function(){var i=a(function*(i,s){var r="_".concat(n,"_exec_flag");if(!t||!this[r]){var o=t=>{if(this[r]=t,"function"==typeof e)e.call(this,{isExec:t,ctx:this});else{var i=e;t?i.before&&i.before.call(this,this):i.after&&i.after.call(this,this)}};o(!0);var a=i.apply(this,s);a instanceof Promise?a.then(()=>o(!1)).catch(()=>o(!1)):(console.warn("Must be async function to use [@Executing] decorator"),o(!1))}});return function(e,t){return i.apply(this,arguments)}}())}}function k(e){return function(t,i,n){return E({target:t,key:i,descriptor:n},function(){var t=a(function*(t,n,s){var r=this,o=function(){var t=a(function*(t){t.id&&"string"==typeof t.id&&"yes"===t.isErr||("string"==typeof t||t instanceof Error?t=new g.Message("system",t):(console.warn("Err must be 'string' or 'new Error()' instance"),t=new g.Message("system","")));var n=t;n.ctx=r;var o="Error] ".concat(s,".").concat(i," [").concat(n.id,"]: ").concat(n.message);if("function"==typeof e){var a=e;console.log("[Handled".concat(o));var l=a.call(r,n);l instanceof Promise&&(yield l)}else{var c=e;if(c[n.id]){console.log("[Handled".concat(o));var u=c[n.id].call(r,n);u instanceof Promise&&(yield u)}else if(c.handle){console.log("[Handled".concat(o));var d=c.handle.call(r,n);d instanceof Promise&&(yield d)}else console.warn("[Unhandled ".concat(o));if(c.fallback){var h=c.fallback.call(r,n);h instanceof Promise&&(yield h)}}});return function(e){return t.apply(this,arguments)}}();try{var l=t.apply(r,n);return l instanceof Promise?new Promise(e=>{l.then(e).catch(function(){var t=a(function*(t){yield o(t),e(void 0)});return function(e){return t.apply(this,arguments)}}())}):l}catch(e){return void(yield o(e))}});return function(e,i,n){return t.apply(this,arguments)}}())}}function I(){return function(e,t,i){return E({target:e,key:t,descriptor:i},function(e,i){var n="_".concat(t,"_once_flag");this[n]||(this[n]=!0,e.call(this,i))})}}function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3/60;return function(t,i,n){var s,r=Date.now();return E({target:t,key:i,descriptor:n},function(t,i){var n=this,o=function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];var c=Date.now();window.clearTimeout(s),!r||c-r>=e?(r=c,t.apply(n,a)):s=window.setTimeout(()=>o(...a),e-(c-r))};o(...i)})}}!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(){var e=this;return a(function*(){e.isBrowserNotificationSupported?t.isBrowserNotificationPromiseSupported?yield window.Notification.requestPermission():yield new Promise(e=>window.Notification.requestPermission(t=>e(t))):v.warn("Browser notification is not supported...")})()}fire(e,t){return new window.Notification(e,s(s({},this.defaultOptions),t||{}))}}e.Service=t}(p||(p={})),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 i extends Error{constructor(e,t){super(),this.isErr="yes",this.id=e,this.stack=(new Error).stack,this.details=t}}e.Details=i}(g||(g={})),function(e){e.Debounce=S,e.Evt=b,e.Exec=w,e.Handle=k,e.Once=I,e.Throttle=A}(m||(m={}));class C{constructor(e,t){this.target=e,this.eventName=t}emit(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{bubbles:!0,composed:!0,cancelable:!1};this.target.dispatchEvent(new CustomEvent(this.eventName,s({detail:e},t)))}}var O=i(901),T=e.n(O),R=i(960),N="uuip",L="1.0",x="1.0";function D(e){var t=T().create();return t.accessToken=e,t.interceptors.request.use(e=>{if(!e.headers.Authorization&&t.accessToken&&(e.headers.Authorization="Bearer ".concat(t.accessToken)),!e.headers.TrackingID){var i=(0,R.v1)();e.headers.TrackingID="".concat(N,"_").concat(i,"_").concat(L,":").concat(x)}return e.headers["Content-Type"]||(e.headers["Content-Type"]="application/json"),e}),t}var U,P,V=i(545),_=e.n(V),M=i(176),j=e.n(M),q=i(855),F=e.n(q);!function(e){e.createService=e=>{var t=_().createInstance(),i=e&&e.backend?e.backend:new(F());t.use(i);var n=e&&e.languageDetector?e.languageDetector:new(j());return t.use(n),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=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Object.assign.call(null,{},...t)},e.createMixin=t=>{var i="i18n"in t?t.i18n:e.createService(),n="i18nInitOptions"in t?t.i18nInitOptions:null;n||v.info("i18n mixin instance waiting service initialization outside...");var s=!1;return e=>class extends e{constructor(){super(...arguments),this.onI18NInitialized=e=>this.requestUpdate(),this.onI18NLanguageChanged=e=>this.requestUpdate(),this.t=_().t.bind(i)}connectedCallback(){super.connectedCallback&&super.connectedCallback(),i.on("initialized",this.onI18NInitialized),i.on("languageChanged",this.onI18NLanguageChanged),i.isInitialized||s||!n||(s=!0,i.init(n).finally(()=>s=!1))}disconnectedCallback(){i.off("initialized",this.onI18NInitialized),i.off("languageChanged",this.onI18NLanguageChanged),super.disconnectedCallback&&super.disconnectedCallback()}}}}(U||(U={})),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={}));var $,z,B=i(497),H=e.n(B);function W(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new $.Service;return t.updateConfig(e),t}!function(e){var t,i;!function(e){var t,i,n;!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"}(i=e.Mode||(e.Mode={})),e.MODES=Object.values(i),function(e){e.Added="added",e.Pended="pended",e.Activated="activated",e.Deactivated="deactivated",e.Removed="removed"}(n=e.Status||(e.Status={})),e.StatusWeight={[n.Added]:0,[n.Pended]:1,[n.Activated]:2,[n.Deactivated]:3,[n.Removed]:4},e.STATUSES=Object.values(n),function(e){e.User="user_add"}(e.AddEventReason||(e.AddEventReason={})),function(e){e.ServiceAutoPropagate="service_auto_propagate_pending",e.ServiceAutoDismiss="service_autodismiss_pending",e.UserSilent="user_silent_pending"}(e.PendingEventReason||(e.PendingEventReason={})),function(e){e.ServiceAutoPropagate="service_auto_propagate_activate"}(e.ActivateEventReason||(e.ActivateEventReason={})),function(e){e.UserNegative="user_negative_deactivate",e.UserPositive="user_positive_deactivate",e.UserNeutral="user_neutral_deactivate"}(e.DeactivateEventReason||(e.DeactivateEventReason={})),function(e){e.User="user_remove"}(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}(i=e.ServiceMeta||(e.ServiceMeta={}));class n{constructor(){this.hubEmitter=r()()}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this.hubEmitter.emit(e,...i)}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(){H()(this.hubEmitter)}}e.Item=class{get status(){return this._status}get reason(){return this._reason}get mode(){return this._mode}validateAuxOptions(e){var i={};return e&&void 0!==e.AUTO_DISMISS_TIMEOUT&&this.mode===t.Mode.AutoDismiss&&(i=s(s({},i),{},{AUTO_DISMISS_TIMEOUT:e.AUTO_DISMISS_TIMEOUT})),i}constructor(e,i){this._serviceHubSubscriptions=[],this._itemEmitter=r()();var{type:n,mode:s,title:a,data:l,timestamp:c}=e.data;this.type=n,this.title=a,this.data=l,this._mode=s,this.timestamp=c||(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||{})),i&&(this._serviceHubAdapter=i,this._status=t.Status.Added,this._reason=t.AddEventReason.User,this.bindItemHubListeners())}bindItemHubListeners(){if(this._serviceHubAdapter){var e=(e,i,n)=>{this.timestamp in e&&(this._status=i,this._reason=n,i===t.Status.Removed&&(this.unbindItemHubListeners(),this.removeAllEventListeners()),this.emit("statusUpdate",i,n))};this._serviceHubAdapter.addEventListener("statusServiceUpdateResponse",e),this._serviceHubSubscriptions.push(()=>{var t;null===(t=this._serviceHubAdapter)||void 0===t||t.removeEventListener("statusServiceUpdateResponse",e)});var i=(e,t)=>{this.timestamp in e&&(this._mode=t,this.emit("modeUpdate",t))};this._serviceHubAdapter.addEventListener("modeStatusUpdateResponse",i),this._serviceHubSubscriptions.push(()=>{var e;null===(e=this._serviceHubAdapter)||void 0===e||e.removeEventListener("modeStatusUpdateResponse",i)})}}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):v.warn("Service hub adapter is not initialized for this notification item instance: ",this):v.warn('Notification should have "'.concat(t.Status.Pended,'" or "').concat(t.Status.Activated,'" status to be able change status to "').concat(t.Status.Deactivated,'".Current notification status is "').concat(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):v.warn("Service hub adapter is not initialized for this notification item instance: ",this):v.warn('Notification should have "'.concat(t.Status.Activated,'" status or not "').concat(t.Mode.Silent,'" mode, to be able change status to "').concat(t.Status.Pended,'" and mode to "').concat(t.Mode.Silent,'".Current notification status is "').concat(this._status,'" and mode is "').concat(this.mode,'". Ignoring this change'))}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this._itemEmitter.emit(e,...i)}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(){H()(this._itemEmitter)}};var a=function(e,t){return[...e,...t].sort(arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>0)},l=(e,t)=>e.reduce((e,i)=>(-1===t.indexOf(i)&&e.push(i),e),[]);class c{constructor(){this.emitter=r()(),this.map={},this.status=c.createStatus(),this.serviceConfig={DISABLED_ITEM_MODE:s({},i.DISABLED_ITEM_MODE),ACTIVATED_ITEM_MODE_LIMIT:s({},i.ACTIVATED_ITEM_MODE_LIMIT),AUTO_DISMISS_TIMEOUT:i.AUTO_DISMISS_TIMEOUT},this.activeAutoDismissTimeoutRefs={},this.serviceHubAdapter=new n,this.bindServiceHubEvents()}static mergeConfig(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];if(!i.length)return e;var s=i.shift(),r=e=>e&&"object"==typeof e&&!Array.isArray(e);if(r(e)&&r(s))for(var o in s)r(s[o])?(e[o]||Object.assign(e,{[o]:{}}),this.mergeConfig(e[o],s[o])):Object.assign(e,{[o]:s[o]});return this.mergeConfig(e,...i)}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([],s(s({ids:[]},this.createStatusHolderSubCollections(t.MODES)),this.createStatusHolderSubCollections(t.TYPES)))}static createStatusHolderSubCollections(e){return s({},e.reduce((e,t)=>(e[t]=[],e),{}))}updateNotificationsCollections(){var e=c.createStatus();this.status.added.ids.forEach(i=>{var n=this.map[i];t.STATUSES.forEach(t=>{-1!==this.status[t].ids.indexOf(n.timestamp)&&(e[t].push(n),e[t].ids.push(i),e[t][n.mode].push(n),e[t][n.type].push(n))})}),this.status=e}setAutoDismiss(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};this.prepareUpdateNotifications(e).forEach(e=>{var n;e.mode===t.Mode.AutoDismiss&&(this.activeAutoDismissTimeoutRefs[e.timestamp]=window.setTimeout(()=>i(e),null!==(n=e.options.AUTO_DISMISS_TIMEOUT)&&void 0!==n?n:this.serviceConfig.AUTO_DISMISS_TIMEOUT))})}removeAutoDismiss(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};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,i){var n=Array.isArray(i)?i:[i];if(n.length){var s=n.map(e=>e.timestamp);switch(e){case"add":n.forEach(e=>this.map[e.timestamp]=e),this.status.added.ids=a(this.status.added.ids,s,c.sortTimestampsFn);break;case"pending":this.status.pended.ids=a(this.status.pended.ids,s,c.sortTimestampsFn),this.status.activated.ids=l(this.status.activated.ids,s),this.status.deactivated.ids=l(this.status.deactivated.ids,s);break;case"activate":this.status.pended.ids=l(this.status.pended.ids,s),this.status.activated.ids=a(this.status.activated.ids,s,c.sortTimestampsFn),this.status.deactivated.ids=l(this.status.deactivated.ids,s);break;case"deactivate":this.status.pended.ids=l(this.status.pended.ids,s),this.status.activated.ids=l(this.status.activated.ids,s),this.status.deactivated.ids=a(this.status.deactivated.ids,s,c.sortTimestampsFn);break;case"remove":this.status.pended.ids=l(this.status.pended.ids,s),this.status.activated.ids=l(this.status.activated.ids,s),this.status.deactivated.ids=l(this.status.deactivated.ids,s),this.status.added.ids=l(this.status.added.ids,s),this.status.removed.ids=a(this.status.removed.ids,s,c.sortTimestampsFn),s.forEach(e=>delete this.map[e])}this.updateNotificationsCollections(),this.emit(e,n,t),this.propagate(e,t,n)}}propagate(e,i,n){var s=Array.isArray(n)?n:[n];if(s.length)switch(e){case"add":this.update("pending",t.PendingEventReason.ServiceAutoPropagate,s);break;case"pending":case"deactivate":s.forEach(e=>{this.removeAutoDismiss(e)}),this.update("activate",t.ActivateEventReason.ServiceAutoPropagate,this.prepareActiveCandidatesNotifications(this.status.pended));break;case"activate":s.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,s)}}prepareAddNotifications(t){var i=Object.keys(this.serviceConfig.DISABLED_ITEM_MODE).reduce((e,t)=>(this.serviceConfig.DISABLED_ITEM_MODE[t]||e.push(t),e),[]).map(e=>'"'.concat(e,'"')).join(", ");return(Array.isArray(t)?t:[t]).filter(e=>!this.serviceConfig.DISABLED_ITEM_MODE[e.data.mode]||(v.error('Trying to .add(...) notification mode "'.concat(e.data.mode,'" that is disabled in this notifications service instance by configuration.Current configuration is: "').concat(JSON.stringify(this.config),'"Only ').concat(i," allowed. Ignoring .add(").concat(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):v.error("Trying to handle untracked notification. Call .add(...) first...",JSON.stringify(t)),e),[])}prepareActiveCandidatesNotifications(e){var i=(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(i).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){var n=e;if(n.ACTIVATED_ITEM_MODE_LIMIT&&n.ACTIVATED_ITEM_MODE_LIMIT.acknowledge>i.ACTIVATED_ITEM_MODE_LIMIT.acknowledge)throw new Error("\n Max ".concat(t.Mode.Acknowledge," limit is ").concat(i.ACTIVATED_ITEM_MODE_LIMIT.acknowledge,"\n "));if(n.DISABLED_ITEM_MODE){if(!Object.keys(n.DISABLED_ITEM_MODE).reduce((e,t)=>(n.DISABLED_ITEM_MODE[t]&&e++,e),0))throw new Error("At least one notifications mode should be allowed in service instance");Object.keys(n.ACTIVATED_ITEM_MODE_LIMIT).forEach(e=>{e in n.DISABLED_ITEM_MODE&&n.DISABLED_ITEM_MODE[e]&&v.warn('Changing configuration limit count for mode "'.concat(e,"\" won't have any effect, because this mode is disabled in notifications service instance"))}),"AUTO_DISMISS_TIMEOUT"in n&&n.DISABLED_ITEM_MODE[t.Mode.AutoDismiss]&&v.warn('Changing "AUTO_DISMISS_TIMEOUT" configuration option won\'t have any effect,because "'.concat(t.Mode.AutoDismiss,'" mode is disabled in notifications service instance'))}return!0}updateConfig(e){c.validateUpdateConfig(e)&&(this.serviceConfig=c.mergeConfig({},this.serviceConfig,e),v.info("Updated notifications service configuration: ",this.config))}add(e){var i=this.prepareAddNotifications(e);return this.update("add",t.AddEventReason.User,i),i}pending(e){var i=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",i,t.Status.Pended,t.PendingEventReason.UserSilent),i}deactivate(e,i){var n=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",n,t.Status.Deactivated,i),n}remove(e){var i=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",i,t.Status.Removed,t.RemoveEventReason.User),i}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(){H()(this.emitter)}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this.emitter.emit(e,...i)}bindServiceHubEvents(){this.serviceHubAdapter.addEventListener("statusServiceUpdateRequest",(e,i,n)=>{var s=Array.isArray(e)?e:[e],r=s.reduce((e,t)=>(e[t.timestamp]=this.getNotificationStatus(t),e),{}),o=s.filter(e=>(r[e.timestamp]===t.Status.Activated||e.mode!==t.Mode.Silent)&&i===t.Status.Pended),a=o.filter(e=>e.mode!==t.Mode.Silent);a.length&&this.serviceHubAdapter.emit("modeStatusUpdateResponse",a.reduce((e,t)=>(e[t.timestamp]=t,e),{}),t.Mode.Silent),o.length&&this.update("pending",n,o);var l=s.filter(e=>{var n=r[e.timestamp];return(n===t.Status.Pended||n===t.Status.Activated)&&i===t.Status.Deactivated});l.length&&this.update("deactivate",n,l),s.filter(e=>{var n=r[e.timestamp];return(n===t.Status.Pended||n===t.Status.Activated||n===t.Status.Deactivated)&&i===t.Status.Removed}).length&&this.update("remove",n,e)}),i.STATUS_EVENTS.forEach(e=>{this.addEventListener(e,(t,n)=>{var s=i.STATUS_EVENT_MAP[e],r=t.reduce((e,t)=>(e[t.timestamp]=t,e),{});this.serviceHubAdapter.emit("statusServiceUpdateResponse",r,s,n)})})}}c.sortTimestampsFn=(e,t)=>e>t?1:e<t?-1:0,e.Service=c}($||($={})),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=>{var t=this.listeners.indexOf(e,0);return t>-1&&(this.listeners.splice(t,1),!0)},this.stopListenOnce=e=>{var 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 i{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=>{var t=this.listeners.indexOf(e,0);return t>-1&&(this.listeners.splice(t,1),!0)},this.stopListenOnce=e=>{var 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(){var e=new t;return{signal:e,send:e.send,stopListenAll:e.stopListenAll}}empty(){var e=new i;return{signal:e,send:e.send,stopListenAll:e.stopListenAll}}}}(z||(z={}));var J=null,Z=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,G=1073741824;class K extends Error{constructor(){super("The timer is in an undefined state.")}}var Y,X=()=>{if(null!==J)return J;var 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 v.info("Worker url established",t),J=(e=>{var t=new Map([[0,()=>{}]]),i=new Map([[0,()=>{}]]),n=new Map,s=new Worker(e);v.info("worker created ",s);var r,o=new WeakMap,a=((e,t)=>i=>{var n=t.get(i),s=void 0===n?i.size:n<G?n+1:0;if(!i.has(s))return e(i,s);if(i.size<536870912){for(;i.has(s);)s=Math.floor(Math.random()*G);return e(i,s)}if(i.size>Z)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;i.has(s);)s=Math.floor(Math.random()*Z);return e(i,s)})((r=o,(e,t)=>(r.set(e,t),t)),o);return s.addEventListener("message",e=>{var s,{data:r}=e;if(void 0!==(s=r).method&&"call"===s.method){var{params:{timerId:o,timerType:a}}=r;if("interval"===a){var l=t.get(o);if("number"==typeof l){var c=n.get(l);if(void 0===c||c.timerId!==o||c.timerType!==a)throw new K}else{if(void 0===l)throw new K;l()}}else if("timeout"===a){var u=i.get(o);if("number"==typeof u){var d=n.get(u);if(void 0===d||d.timerId!==o||d.timerType!==a)throw new K}else{if(void 0===u)throw new K;u(),i.delete(o)}}}else if((e=>null===e.error&&"number"==typeof e.id)(r)){var{id:h}=r,f=n.get(h);if(void 0===f)throw new K;var{timerId:p,timerType:g}=f;n.delete(h),"interval"===g?t.delete(p):i.delete(p)}else{var{error:{message:m}}=r;v.error(m)}}),{clearInterval:e=>{var i=a(n);n.set(i,{timerId:e,timerType:"interval"}),t.set(e,i),s.postMessage({id:i,method:"clear",params:{timerId:e,timerType:"interval"}})},clearTimeout:e=>{var t=a(n);n.set(t,{timerId:e,timerType:"timeout"}),i.set(e,t),s.postMessage({id:t,method:"clear",params:{timerId:e,timerType:"timeout"}})},setInterval:(e,i)=>{var n=a(t);return t.set(n,()=>{e(),"function"==typeof t.get(n)&&s.postMessage({id:null,method:"set",params:{delay:i,now:performance.now(),timerId:n,timerType:"interval"}})}),s.postMessage({id:null,method:"set",params:{delay:i,now:performance.now(),timerId:n,timerType:"interval"}}),n},setTimeout:(e,t)=>{var n=a(i);return i.set(n,e),s.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:n,timerType:"timeout"}}),n}}})(t),J.setTimeout(()=>URL.revokeObjectURL(t),0),J},Q=e=>X().clearInterval(e),ee=e=>X().clearTimeout(e),te=(e,t)=>X().setInterval(e,t),ie=(e,t)=>X().setTimeout(e,t);function ne(e){if(e instanceof Error)return e;var 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: ".concat(t))}return function(e){var t=null;e.setErrorHandler=function(e){t?v.error("Error handler already set"):(v.info("Setting custom error handler: ".concat(e)),t=e)},e.check=function(e,i,n){return e||(t?t(i,n):v.info("Assert failed in ".concat(i,": ").concat(n))),e}}(Y||(Y={})),t})(),e.exports=l()},545(e){"use strict";const t=e=>"string"==typeof e,i=()=>{let e,t;const i=new Promise((i,n)=>{e=i,t=n});return i.resolve=e,i.reject=t,i},n=e=>null==e?"":""+e,s=/###/g,r=e=>e&&e.indexOf("###")>-1?e.replace(s,"."):e,o=e=>!e||t(e),a=(e,i,n)=>{const s=t(i)?i.split("."):i;let a=0;for(;a<s.length-1;){if(o(e))return{};const t=r(s[a]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++a}return o(e)?{}:{obj:e,k:r(s[a])}},l=(e,t,i)=>{const{obj:n,k:s}=a(e,t,Object);if(void 0!==n||1===t.length)return void(n[s]=i);let r=t[t.length-1],o=t.slice(0,t.length-1),l=a(e,o,Object);for(;void 0===l.obj&&o.length;)r=`${o[o.length-1]}.${r}`,o=o.slice(0,o.length-1),l=a(e,o,Object),l&&l.obj&&void 0!==l.obj[`${l.k}.${r}`]&&(l.obj=void 0);l.obj[`${l.k}.${r}`]=i},c=(e,t)=>{const{obj:i,k:n}=a(e,t);if(i)return i[n]},u=(e,i,n)=>{for(const s in i)"__proto__"!==s&&"constructor"!==s&&(s in e?t(e[s])||e[s]instanceof String||t(i[s])||i[s]instanceof String?n&&(e[s]=i[s]):u(e[s],i[s],n):e[s]=i[s]);return e},d=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var h={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const f=e=>t(e)?e.replace(/[&<>"'\/]/g,e=>h[e]):e,p=[" ",",","?","!",";"],g=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}(20),m=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const n=t.split(i);let s=e;for(let e=0;e<n.length;){if(!s||"object"!=typeof s)return;let t,r="";for(let o=e;o<n.length;++o)if(o!==e&&(r+=i),r+=n[o],t=s[r],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&o<n.length-1)continue;e+=o-e+1;break}s=t}return s},v=e=>e&&e.replace("_","-"),y={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class E{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||y,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,i,n,s){return s&&!this.debug?null:(t(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[i](e))}create(e){return new E(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new E(this.logger,e)}}var S=new E;class b{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const i=this.observers[e].get(t)||0;this.observers[e].set(t,i+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(e=>{let[t,n]=e;for(let e=0;e<n;e++)t(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(t=>{let[n,s]=t;for(let t=0;t<s;t++)n.apply(n,[e,...i])})}}class w extends b{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,i,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,o=void 0!==s.ignoreJSONStructure?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,i],n&&(Array.isArray(n)?a.push(...n):t(n)&&r?a.push(...n.split(r)):a.push(n)));const l=c(this.data,a);return!l&&!i&&!n&&e.indexOf(".")>-1&&(e=a[0],i=a[1],n=a.slice(2).join(".")),!l&&o&&t(n)?m(this.data&&this.data[e]&&this.data[e][i],n,r):l}addResource(e,t,i,n){let s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const r=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator;let o=[e,t];i&&(o=o.concat(r?i.split(r):i)),e.indexOf(".")>-1&&(o=e.split("."),n=t,t=o[1]),this.addNamespaces(t),l(this.data,o,n),s.silent||this.emit("added",e,t,i,n)}addResources(e,i,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const s in n)(t(n[s])||Array.isArray(n[s]))&&this.addResource(e,i,s,n[s],{silent:!0});s.silent||this.emit("added",e,i,n)}addResourceBundle(e,t,i,n,s){let r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),n=i,i=t,t=o[1]),this.addNamespaces(t);let a=c(this.data,o)||{};r.skipCopy||(i=JSON.parse(JSON.stringify(i))),n?u(a,i,s):a={...a,...i},l(this.data,o,a),r.silent||this.emit("added",e,t,i)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var k={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,i,n,s){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,i,n,s))}),t}};const I={};class A extends b{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i,n;super(),i=e,n=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{i[e]&&(n[e]=i[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=S.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const i=this.resolve(e,t);return i&&void 0!==i.res}extractFromKey(e,i){let n=void 0!==i.nsSeparator?i.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const s=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let r=i.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||i.keySeparator||this.options.userDefinedNsSeparator||i.nsSeparator||((e,t,i)=>{t=t||"",i=i||"";const n=p.filter(e=>t.indexOf(e)<0&&i.indexOf(e)<0);if(0===n.length)return!0;const s=g.getRegExp(`(${n.map(e=>"?"===e?"\\?":e).join("|")})`);let r=!s.test(e);if(!r){const t=e.indexOf(i);t>0&&!s.test(e.substring(0,t))&&(r=!0)}return r})(e,n,s));if(o&&!a){const i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:t(r)?[r]:r};const o=e.split(n);(n!==s||n===s&&this.options.ns.indexOf(o[0])>-1)&&(r=o.shift()),e=o.join(s)}return{key:e,namespaces:t(r)?[r]:r}}translate(e,i,n){if("object"!=typeof i&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof i&&(i={...i}),i||(i={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const s=void 0!==i.returnDetails?i.returnDetails:this.options.returnDetails,r=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],i),l=a[a.length-1],c=i.lng||this.language,u=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(u){const e=i.nsSeparator||this.options.nsSeparator;return s?{res:`${l}${e}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${e}${o}`}return s?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:o}const d=this.resolve(e,i);let h=d&&d.res;const f=d&&d.usedKey||o,p=d&&d.exactUsedKey||o,g=Object.prototype.toString.apply(h),m=void 0!==i.joinArrays?i.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,y=!t(h)&&"boolean"!=typeof h&&"number"!=typeof h;if(!(v&&h&&y&&["[object Number]","[object Function]","[object RegExp]"].indexOf(g)<0)||t(m)&&Array.isArray(h))if(v&&t(m)&&Array.isArray(h))h=h.join(m),h&&(h=this.extendTranslation(h,e,i,n));else{let s=!1,a=!1;const u=void 0!==i.count&&!t(i.count),f=A.hasDefaultValue(i),p=u?this.pluralResolver.getSuffix(c,i.count,i):"",g=i.ordinal&&u?this.pluralResolver.getSuffix(c,i.count,{ordinal:!1}):"",m=u&&!i.ordinal&&0===i.count&&this.pluralResolver.shouldUseIntlApi(),v=m&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${p}`]||i[`defaultValue${g}`]||i.defaultValue;!this.isValidLookup(h)&&f&&(s=!0,h=v),this.isValidLookup(h)||(a=!0,h=o);const y=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:h,E=f&&v!==h&&this.options.updateMissing;if(a||s||E){if(this.logger.log(E?"updateKey":"missingKey",c,l,o,E?v:h),r){const e=this.resolve(o,{...i,keySeparator:!1});e&&e.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.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let i=0;i<t.length;i++)e.push(t[i]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);const n=(e,t,n)=>{const s=f&&n!==h?n:y;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,s,E,i):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,l,t,s,E,i),this.emit("missingKey",e,l,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&u?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,i);m&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],o+t,i[`defaultValue${t}`]||v)})}):n(e,o,v))}h=this.extendTranslation(h,e,i,d,n),a&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${l}:${o}`),(a||s)&&this.options.parseMissingKeyHandler&&(h="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,s?h:void 0):this.options.parseMissingKeyHandler(h))}else{if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,h,{...i,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return s?(d.res=e,d.usedParams=this.getUsedParamsDetails(i),d):e}if(r){const e=Array.isArray(h),t=e?[]:{},n=e?p:f;for(const e in h)if(Object.prototype.hasOwnProperty.call(h,e)){const s=`${n}${r}${e}`;t[e]=this.translate(s,{...i,joinArrays:!1,ns:a}),t[e]===s&&(t[e]=h[e])}h=t}}return s?(d.res=h,d.usedParams=this.getUsedParamsDetails(i),d):h}extendTranslation(e,i,n,s,r){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a=t(e)&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let l;if(a){const t=e.match(this.interpolator.nestingRegexp);l=t&&t.length}let c=n.replace&&!t(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,n.lng||this.language||s.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);l<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&s&&s.res&&(n.lng=this.language||s.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return r&&r[0]===t[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${t[0]} in key: ${i[0]}`),null):o.translate(...t,i)},n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,l=t(a)?[a]:a;return null!=e&&l&&l.length&&!1!==n.applyPostProcessor&&(e=k.handle(l,e,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let i,n,s,r,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(i))return;const l=this.extractFromKey(e,a),c=l.key;n=c;let u=l.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const d=void 0!==a.count&&!t(a.count),h=d&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&(t(a.context)||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);u.forEach(e=>{this.isValidLookup(i)||(o=e,!I[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(I[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${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!!!")),p.forEach(t=>{if(this.isValidLookup(i))return;r=t;const n=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(n,c,t,e,a);else{let e;d&&(e=this.pluralResolver.getSuffix(t,a.count,a));const i=`${this.options.pluralSeparator}zero`,s=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(n.push(c+e),a.ordinal&&0===e.indexOf(s)&&n.push(c+e.replace(s,this.options.pluralSeparator)),h&&n.push(c+i)),f){const t=`${c}${this.options.contextSeparator}${a.context}`;n.push(t),d&&(n.push(t+e),a.ordinal&&0===e.indexOf(s)&&n.push(t+e.replace(s,this.options.pluralSeparator)),h&&n.push(t+i))}}let o;for(;o=n.pop();)this.isValidLookup(i)||(s=o,i=this.getResource(t,e,o,a))}))})}),{res:i,usedKey:n,exactUsedKey:s,usedLng:r,usedNS:o}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,i,n):this.resourceStore.getResource(e,t,i,n)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!t(e.replace);let s=n?e.replace:e;if(n&&void 0!==e.count&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(const e of i)delete s[e]}return s}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}const C=e=>e.charAt(0).toUpperCase()+e.slice(1);class O{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=S.create("languageUtils")}getScriptPartFromCode(e){if(!(e=v(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=v(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(t(e)&&e.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let t=Intl.getCanonicalLocales(e)[0];if(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)return t}catch(e){}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(e=>e.toLowerCase()):2===i.length?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),t.indexOf(i[1].toLowerCase())>-1&&(i[1]=C(i[1].toLowerCase()))):3===i.length&&(i[0]=i[0].toLowerCase(),2===i[1].length&&(i[1]=i[1].toUpperCase()),"sgn"!==i[0]&&2===i[2].length&&(i[2]=i[2].toUpperCase()),t.indexOf(i[1].toLowerCase())>-1&&(i[1]=C(i[1].toLowerCase())),t.indexOf(i[2].toLowerCase())>-1&&(i[2]=C(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const i=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(i)||(t=i)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const i=this.getLanguagePartFromCode(e);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(e=>e===i?e:e.indexOf("-")<0&&i.indexOf("-")<0?void 0:e.indexOf("-")>0&&i.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===i||0===e.indexOf(i)&&i.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,i){if(!e)return[];if("function"==typeof e&&(e=e(i)),t(e)&&(e=[e]),Array.isArray(e))return e;if(!i)return e.default||[];let n=e[i];return n||(n=e[this.getScriptPartFromCode(i)]),n||(n=e[this.formatLanguageCode(i)]),n||(n=e[this.getLanguagePartFromCode(i)]),n||(n=e.default),n||[]}toResolveHierarchy(e,i){const n=this.getFallbackCodes(i||this.options.fallbackLng||[],e),s=[],r=e=>{e&&(this.isSupportedCode(e)?s.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return t(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(e))):t(e)&&r(this.formatLanguageCode(e)),n.forEach(e=>{s.indexOf(e)<0&&r(this.formatLanguageCode(e))}),s}}let T=[{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","kk","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","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}],R={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)};const N=["v1","v2","v3"],L=["v4"],x={zero:0,one:1,two:2,few:3,many:4,other:5};class D{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=S.create("pluralResolver"),this.options.compatibilityJSON&&!L.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const e={};return T.forEach(t=>{t.lngs.forEach(i=>{e[i]={numbers:t.nr,plurals:R[t.fc]}})}),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi()){const i=v("dev"===e?"en":e),n=t.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:i,type:n});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let r;try{r=new Intl.PluralRules(i,{type:n})}catch(i){if(!e.match(/-|_/))return;const n=this.languageUtils.getLanguagePartFromCode(e);r=this.getRule(n,t)}return this.pluralRulesCache[s]=r,r}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.getRule(e,t);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,i).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.getRule(e,t);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((e,t)=>x[e]-x[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):i.numbers.map(i=>this.getSuffix(e,i,t)):[]}getSuffix(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.getRule(e,i);return n?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:this.getSuffixRetroCompatible(n,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const i=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let n=e.numbers[i];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===n?n="plural":1===n&&(n=""));const s=()=>this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString();return"v1"===this.options.compatibilityJSON?1===n?"":"number"==typeof n?`_plural_${n.toString()}`:s():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?s():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!N.includes(this.options.compatibilityJSON)}}const U=function(e,i,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=((e,t,i)=>{const n=c(e,i);return void 0!==n?n:c(t,i)})(e,i,n);return!o&&r&&t(n)&&(o=m(e,n,s),void 0===o&&(o=m(i,n,s))),o},P=e=>e.replace(/\$/g,"$$$$");class V{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=S.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:i,useRawValueToEscape:n,prefix:s,prefixEscaped:r,suffix:o,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:g,nestingSuffixEscaped:m,nestingOptionsSeparator:v,maxReplaces:y,alwaysFormat:E}=e.interpolation;this.escape=void 0!==t?t:f,this.escapeValue=void 0===i||i,this.useRawValueToEscape=void 0!==n&&n,this.prefix=s?d(s):r||"{{",this.suffix=o?d(o):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=h?d(h):p||d("$t("),this.nestingSuffix=g?d(g):m||d(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=y||1e3,this.alwaysFormat=void 0!==E&&E,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,i,s,r){let o,a,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){const t=U(i,c,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(t,void 0,s,{...r,...i,interpolationkey:e}):t}const t=e.split(this.formatSeparator),n=t.shift().trim(),o=t.join(this.formatSeparator).trim();return this.format(U(i,c,n,this.options.keySeparator,this.options.ignoreJSONStructure),o,s,{...r,...i,interpolationkey:n})};this.resetRegExp();const d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>P(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?P(this.escape(e)):P(e)}].forEach(i=>{for(l=0;o=i.regex.exec(e);){const s=o[1].trim();if(a=u(s),void 0===a)if("function"==typeof d){const i=d(e,o,r);a=t(i)?i:""}else if(r&&Object.prototype.hasOwnProperty.call(r,s))a="";else{if(h){a=o[0];continue}this.logger.warn(`missed to pass in variable ${s} for interpolating ${e}`),a=""}else t(a)||this.useRawValueToEscape||(a=n(a));const c=i.safeValue(a);if(e=e.replace(o[0],c),h?(i.regex.lastIndex+=a.length,i.regex.lastIndex-=o[0].length):i.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,i){let s,r,o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const l=(e,t)=>{const i=this.nestingOptionsSeparator;if(e.indexOf(i)<0)return e;const n=e.split(new RegExp(`${i}[ ]*{`));let s=`{${n[1]}`;e=n[0],s=this.interpolate(s,o);const r=s.match(/'/g),a=s.match(/"/g);(r&&r.length%2==0&&!a||a.length%2!=0)&&(s=s.replace(/'/g,'"'));try{o=JSON.parse(s),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${i}${s}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;s=this.nestingRegexp.exec(e);){let c=[];o={...a},o=o.replace&&!t(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(-1!==s[0].indexOf(this.formatSeparator)&&!/{.*}/.test(s[1])){const e=s[1].split(this.formatSeparator).map(e=>e.trim());s[1]=e.shift(),c=e,u=!0}if(r=i(l.call(this,s[1].trim(),o),o),r&&s[0]===e&&!t(r))return r;t(r)||(r=n(r)),r||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),r=""),u&&(r=c.reduce((e,t)=>this.format(e,t,a.lng,{...a,interpolationkey:s[1].trim()}),r.trim())),e=e.replace(s[0],r),this.regexp.lastIndex=0}return e}}const _=e=>{const t={};return(i,n,s)=>{let r=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(r={...r,[s.interpolationkey]:void 0});const o=n+JSON.stringify(r);let a=t[o];return a||(a=e(v(n),s),t[o]=a),a(i)}};class M{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=S.create("formatter"),this.options=e,this.formats={number:_((e,t)=>{const i=new Intl.NumberFormat(e,{...t});return e=>i.format(e)}),currency:_((e,t)=>{const i=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>i.format(e)}),datetime:_((e,t)=>{const i=new Intl.DateTimeFormat(e,{...t});return e=>i.format(e)}),relativetime:_((e,t)=>{const i=new Intl.RelativeTimeFormat(e,{...t});return e=>i.format(e,t.range||"day")}),list:_((e,t)=>{const i=new Intl.ListFormat(e,{...t});return e=>i.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=_(t)}format(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const s=t.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(e=>e.indexOf(")")>-1)){const e=s.findIndex(e=>e.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,e)].join(this.formatSeparator)}return s.reduce((e,t)=>{const{formatName:s,formatOptions:r}=(e=>{let t=e.toLowerCase().trim();const i={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const s=n[1].substring(0,n[1].length-1);"currency"===t&&s.indexOf(":")<0?i.currency||(i.currency=s.trim()):"relativetime"===t&&s.indexOf(":")<0?i.range||(i.range=s.trim()):s.split(";").forEach(e=>{if(e){const[t,...n]=e.split(":"),s=n.join(":").trim().replace(/^'+|'+$/g,""),r=t.trim();i[r]||(i[r]=s),"false"===s&&(i[r]=!1),"true"===s&&(i[r]=!0),isNaN(s)||(i[r]=parseInt(s,10))}})}return{formatName:t,formatOptions:i}})(t);if(this.formats[s]){let t=e;try{const o=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},a=o.locale||o.lng||n.locale||n.lng||i;t=this.formats[s](e,a,{...r,...n,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${s}`),e},e)}}class j extends b{constructor(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=n,this.logger=S.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,n.backend,n)}queueLoad(e,t,i,n){const s={},r={},o={},a={};return e.forEach(e=>{let n=!0;t.forEach(t=>{const o=`${e}|${t}`;!i.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(1===this.state[o]?void 0===r[o]&&(r[o]=!0):(this.state[o]=1,n=!1,void 0===r[o]&&(r[o]=!0),void 0===s[o]&&(s[o]=!0),void 0===a[t]&&(a[t]=!0)))}),n||(o[e]=!0)}),(Object.keys(s).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(s),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(a)}}loaded(e,t,i){const n=e.split("|"),s=n[0],r=n[1];t&&this.emit("failedLoading",s,r,t),!t&&i&&this.store.addResourceBundle(s,r,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);const o={};this.queue.forEach(i=>{((e,t,i)=>{const{obj:n,k:s}=a(e,t,Object);n[s]=n[s]||[],n[s].push(i)})(i.loaded,[s],r),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(i,e),t&&i.errors.push(t),0!==i.pendingCount||i.done||(Object.keys(i.loaded).forEach(e=>{o[e]||(o[e]={});const t=i.loaded[e];t.length&&t.forEach(t=>{void 0===o[e][t]&&(o[e][t]=!0)})}),i.done=!0,i.errors.length?i.callback(i.errors):i.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,r=arguments.length>5?arguments[5]:void 0;if(!e.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:i,tried:n,wait:s,callback:r});this.readingCalls++;const o=(o,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}o&&a&&n<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,i,n+1,2*s,r)},s):r(o,a)},a=this.backend[i].bind(this.backend);if(2!==a.length)return a(e,t,o);try{const i=a(e,t);i&&"function"==typeof i.then?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}}prepareLoading(e,i){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=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."),s&&s();t(e)&&(e=this.languageUtils.toResolveHierarchy(e)),t(i)&&(i=[i]);const r=this.queueLoad(e,i,n,s);if(!r.toLoad.length)return r.pending.length||s(),null;r.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const i=e.split("|"),n=i[0],s=i[1];this.read(n,s,"read",void 0,void 0,(i,r)=>{i&&this.logger.warn(`${t}loading namespace ${s} for language ${n} failed`,i),!i&&r&&this.logger.log(`${t}loaded namespace ${s} for language ${n}`,r),this.loaded(e,i,r)})}saveMissing(e,t,i,n,s){let r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${i}" as the namespace "${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!!!");else if(null!=i&&""!==i){if(this.backend&&this.backend.create){const a={...r,isUpdate:s},l=this.backend.create.bind(this.backend);if(l.length<6)try{let s;s=5===l.length?l(e,t,i,n,a):l(e,t,i,n),s&&"function"==typeof s.then?s.then(e=>o(null,e)).catch(o):o(null,s)}catch(e){o(e)}else l(e,t,i,n,o,a)}e&&e[0]&&this.store.addResource(e[0],t,i,n)}}}const q=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!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:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let i={};if("object"==typeof e[1]&&(i=e[1]),t(e[1])&&(i.defaultValue=e[1]),t(e[2])&&(i.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const t=e[3]||e[2];Object.keys(t).forEach(e=>{i[e]=t[e]})}return i},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),F=e=>(t(e.ns)&&(e.ns=[e.ns]),t(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),t(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),$=()=>{};class z extends b{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var i;if(super(),this.options=F(e),this.services={},this.logger=S,this.modules={external:[]},i=this,Object.getOwnPropertyNames(Object.getPrototypeOf(i)).forEach(e=>{"function"==typeof i[e]&&(i[e]=i[e].bind(i))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof n&&(s=n,n={}),!n.defaultNS&&!1!==n.defaultNS&&n.ns&&(t(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const r=q();this.options={...r,...this.options,...F(n)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==n.keySeparator&&(this.options.userDefinedKeySeparator=n.keySeparator),void 0!==n.nsSeparator&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?S.init(o(this.modules.logger),this.options):S.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=M);const i=new O(this.options);this.store=new w(this.options.resources,this.options);const n=this.services;n.logger=S,n.resourceStore=this.store,n.languageUtils=i,n.pluralResolver=new D(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(n.formatter=o(t),n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new V(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new j(o(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on("*",function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),s=1;s<i;s++)n[s-1]=arguments[s];e.emit(t,...n)}),this.modules.languageDetector&&(n.languageDetector=o(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=o(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new A(this.services,this.options),this.translator.on("*",function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),s=1;s<i;s++)n[s-1]=arguments[s];e.emit(t,...n)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,s||(s=$),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});const a=i(),l=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(t),s(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),a}loadResources(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$;const n=t(e)?e:this.language;if("function"==typeof e&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return i();const e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};n?t(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload&&this.options.preload.forEach(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),i(e)})}else i(null)}reloadResources(e,t,n){const s=i();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=$),this.services.backendConnector.reload(e,t,e=>{s.resolve(),n(e)}),s}use(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&&k.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,n){var s=this;this.isLanguageChangingTo=e;const r=i();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(e,t)=>{t?(o(t),this.translator.changeLanguage(t),this.isLanguageChangingTo=void 0,this.emit("languageChanged",t),this.logger.log("languageChanged",t)):this.isLanguageChangingTo=void 0,r.resolve(function(){return s.t(...arguments)}),n&&n(e,function(){return s.t(...arguments)})},l=i=>{e||i||!this.services.languageDetector||(i=[]);const n=t(i)?i:this.services.languageUtils.getBestMatchFromCodes(i);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,e=>{a(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e):l(this.services.languageDetector.detect()),r}getFixedT(e,i,n){var s=this;const r=function(e,t){let i;if("object"!=typeof t){for(var o=arguments.length,a=new Array(o>2?o-2:0),l=2;l<o;l++)a[l-2]=arguments[l];i=s.options.overloadTranslationOptionHandler([e,t].concat(a))}else i={...t};i.lng=i.lng||r.lng,i.lngs=i.lngs||r.lngs,i.ns=i.ns||r.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||r.keyPrefix);const c=s.options.keySeparator||".";let u;return u=i.keyPrefix&&Array.isArray(e)?e.map(e=>`${i.keyPrefix}${c}${e}`):i.keyPrefix?`${i.keyPrefix}${c}${e}`:e,s.t(u,i)};return t(e)?r.lng=e:r.lngs=e,r.ns=i,r.keyPrefix=n,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=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;const i=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;const r=(e,t)=>{const i=this.services.backendConnector.state[`${e}|${t}`];return-1===i||0===i||2===i};if(t.precheck){const e=t.precheck(this,r);if(void 0!==e)return e}return!(!this.hasResourceBundle(i,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!r(i,e)||n&&!r(s,e)))}loadNamespaces(e,n){const s=i();return this.options.ns?(t(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{s.resolve(),n&&n(e)}),s):(n&&n(),Promise.resolve())}loadLanguages(e,n){const s=i();t(e)&&(e=[e]);const r=this.options.preload||[],o=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{s.resolve(),n&&n(e)}),s):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new O(q());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","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new z(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const n={...this.options,...e,isClone:!0},s=new z(n);return void 0===e.debug&&void 0===e.prefix||(s.logger=s.logger.clone(e)),["store","services","language"].forEach(e=>{s[e]=this[e]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},i&&(s.store=new w(this.store.data,n),s.services.resourceStore=s.store),s.translator=new A(s.services,n),s.translator.on("*",function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];s.emit(e,...i)}),s.init(n,t),s.translator.options=n,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const B=z.createInstance();B.createInstance=z.createInstance,e.exports=B},555(e,t,i){"use strict";e.exports=i(717)()?Object.keys:i(954)},566(e,t,i){"use strict";var n=i(684);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!n(e)}},573(e,t,i){"use strict";var n=i(555),s=i(856),r=Math.max;e.exports=function(e,t){var i,o,a,l=r(arguments.length,2);for(e=Object(s(e)),a=function(n){try{e[n]=t[n]}catch(e){i||(i=e)}},o=1;o<l;++o)n(t=arguments[o]).forEach(a);if(void 0!==i)throw i;return e}},658(e,t,i){"use strict";var n=i(136),s={function:!0,object:!0};e.exports=function(e){return n(e)&&s[typeof e]||!1}},665(e){"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")}},666(e,t,i){"use strict";var n=i(658);e.exports=function(e){if(!n(e))throw new TypeError(e+" is not an Object");return e}},684(e,t,i){"use strict";var n=i(23);e.exports=function(e){if(!n(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},717(e){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},748(e,t,i){"use strict";e.exports=i(875)()?String.prototype.contains:i(339)},805(e){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},855(e,t,i){"use strict";function n(e){return n="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},n(e)}function s(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":n(XMLHttpRequest))}function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function o(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach(function(t){a(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function a(e,t,i){return(t=function(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=l(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function l(e){return l="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},l(e)}i.r(t),i.d(t,{default:()=>A});var c,u,d="function"==typeof fetch?fetch:void 0;if(void 0!==i.g&&i.g.fetch?d=i.g.fetch:"undefined"!=typeof window&&window.fetch&&(d=window.fetch),s()&&(void 0!==i.g&&i.g.XMLHttpRequest?c=i.g.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(c=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&(void 0!==i.g&&i.g.ActiveXObject?u=i.g.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(u=window.ActiveXObject)),"function"!=typeof d&&(d=void 0),!d&&!c&&!u)try{Promise.resolve().then(i.t.bind(i,911,19)).then(function(e){d=e.default}).catch(function(){})}catch(w){}var h=function(e,t){if(t&&"object"===l(t)){var i="";for(var n in t)i+="&"+encodeURIComponent(n)+"="+encodeURIComponent(t[n]);if(!i)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+i.slice(1)}return e},f=function(e,t,i,n){var s=function(e){if(!e.ok)return i(e.statusText||"Error",{status:e.status});e.text().then(function(t){i(null,{status:e.status,data:t})}).catch(i)};if(n){var r=n(e,t);if(r instanceof Promise)return void r.then(s).catch(i)}"function"==typeof fetch?fetch(e,t).then(s).catch(i):d(e,t).then(s).catch(i)},p=!1;const g=function(e,t,n,r){return"function"==typeof n&&(r=n,n=void 0),r=r||function(){},d&&0!==t.indexOf("file:")?function(e,t,n,s){e.queryStringParams&&(t=h(t,e.queryStringParams));var r=o({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);"undefined"==typeof window&&void 0!==i.g&&void 0!==i.g.process&&i.g.process.versions&&i.g.process.versions.node&&(r["User-Agent"]="i18next-http-backend (node/".concat(i.g.process.version,"; ").concat(i.g.process.platform," ").concat(i.g.process.arch,")")),n&&(r["Content-Type"]="application/json");var a="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,l=o({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:r},p?{}:a),c="function"==typeof e.alternateFetch&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{f(t,l,s,c)}catch(e){if(!a||0===Object.keys(a).length||!e.message||e.message.indexOf("not implemented")<0)return s(e);try{Object.keys(a).forEach(function(e){delete l[e]}),f(t,l,s,c),p=!0}catch(e){s(e)}}}(e,t,n,r):s()||"function"==typeof ActiveXObject?function(e,t,i,n){i&&"object"===l(i)&&(i=h("",i).slice(1)),e.queryStringParams&&(t=h(t,e.queryStringParams));try{var s=c?new c:new u("MSXML2.XMLHTTP.3.0");s.open(i?"POST":"GET",t,1),e.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!e.withCredentials,i&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var r=e.customHeaders;if(r="function"==typeof r?r():r)for(var o in r)s.setRequestHeader(o,r[o]);s.onreadystatechange=function(){s.readyState>3&&n(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(i)}catch(e){console&&console.log(e)}}(e,t,n,r):void r(new Error("No fetch and no xhr implementation found!"))};function m(e){return m="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},m(e)}function v(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function y(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?v(Object(i),!0).forEach(function(t){S(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function E(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,b(n.key),n)}}function S(e,t,i){return(t=b(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function b(e){var t=function(e){if("object"!=m(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=m(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:t+""}var w,k,I=(w=function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.services=t,this.options=i,this.allOptions=n,this.type="backend",this.init(t,i,n)},k=[{key:"init",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.services=e,this.options=y(y(y({},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,i){return S({},t,i||"")},parseLoadPayload:function(e,t){},request:g,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}),this.options||{}),i),this.allOptions=n,this.services&&this.options.reloadInterval){var s=setInterval(function(){return t.reload()},this.options.reloadInterval);"object"===m(s)&&"function"==typeof s.unref&&s.unref()}}},{key:"readMulti",value:function(e,t,i){this._readAny(e,e,t,t,i)}},{key:"read",value:function(e,t,i){this._readAny([e],e,[t],t,i)}},{key:"_readAny",value:function(e,t,i,n,s){var r,o=this,a=this.options.loadPath;"function"==typeof this.options.loadPath&&(a=this.options.loadPath(e,i)),(a=function(e){return!!e&&"function"==typeof e.then}(r=a)?r:Promise.resolve(r)).then(function(r){if(!r)return s(null,{});var a=o.services.interpolator.interpolate(r,{lng:e.join("+"),ns:i.join("+")});o.loadUrl(a,s,t,n)})}},{key:"loadUrl",value:function(e,t,i,n){var s=this,r="string"==typeof i?[i]:i,o="string"==typeof n?[n]:n,a=this.options.parseLoadPayload(r,o);this.options.request(this.options,e,a,function(r,o){if(o&&(o.status>=500&&o.status<600||!o.status))return t("failed loading "+e+"; status code: "+o.status,!0);if(o&&o.status>=400&&o.status<500)return t("failed loading "+e+"; status code: "+o.status,!1);if(!o&&r&&r.message){var a=r.message.toLowerCase();if(["failed","fetch","network","load"].find(function(e){return a.indexOf(e)>-1}))return t("failed loading "+e+": "+r.message,!0)}if(r)return t(r,!1);var l,c;try{l="string"==typeof o.data?s.options.parse(o.data,i,n):o.data}catch(t){c="failed parsing "+e+" to json"}if(c)return t(c,!1);t(null,l)})}},{key:"create",value:function(e,t,i,n,s){var r=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var o=this.options.parsePayload(t,i,n),a=0,l=[],c=[];e.forEach(function(i){var n=r.options.addPath;"function"==typeof r.options.addPath&&(n=r.options.addPath(i,t));var u=r.services.interpolator.interpolate(n,{lng:i,ns:t});r.options.request(r.options,u,o,function(t,i){a+=1,l.push(t),c.push(i),a===e.length&&"function"==typeof s&&s(l,c)})})}}},{key:"reload",value:function(){var e=this,t=this.services,i=t.backendConnector,n=t.languageUtils,s=t.logger,r=i.language;if(!r||"cimode"!==r.toLowerCase()){var o=[],a=function(e){n.toResolveHierarchy(e).forEach(function(e){o.indexOf(e)<0&&o.push(e)})};a(r),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return a(e)}),o.forEach(function(t){e.allOptions.ns.forEach(function(e){i.read(t,e,"read",null,null,function(n,r){n&&s.warn("loading namespace ".concat(e," for language ").concat(t," failed"),n),!n&&r&&s.log("loaded namespace ".concat(e," for language ").concat(t),r),i.loaded("".concat(t,"|").concat(e),n,r)})})})}}}],k&&E(w.prototype,k),Object.defineProperty(w,"prototype",{writable:!1}),w);I.type="backend";const A=I},856(e,t,i){"use strict";var n=i(136);e.exports=function(e){if(!n(e))throw new TypeError("Cannot use null or undefined");return e}},875(e){"use strict";var t="razdwatrzy";e.exports=function(){return"function"==typeof t.contains&&!0===t.contains("dwa")&&!1===t.contains("foo")}},901(e,t,i){"use strict";function n(e,t){return function(){return e.apply(t,arguments)}}const{toString:s}=Object.prototype,{getPrototypeOf:r}=Object,{iterator:o,toStringTag:a}=Symbol,l=(c=Object.create(null),e=>{const t=s.call(e);return c[t]||(c[t]=t.slice(8,-1).toLowerCase())});var c;const u=e=>(e=e.toLowerCase(),t=>l(t)===e),d=e=>t=>typeof t===e,{isArray:h}=Array,f=d("undefined");function p(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&v(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const g=u("ArrayBuffer"),m=d("string"),v=d("function"),y=d("number"),E=e=>null!==e&&"object"==typeof e,S=e=>{if("object"!==l(e))return!1;const t=r(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||a in e||o in e)},b=u("Date"),w=u("File"),k=u("Blob"),I=u("FileList"),A=u("URLSearchParams"),[C,O,T,R]=["ReadableStream","Request","Response","Headers"].map(u);function N(e,t,{allOwnKeys:i=!1}={}){if(null==e)return;let n,s;if("object"!=typeof e&&(e=[e]),h(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{if(p(e))return;const s=i?Object.getOwnPropertyNames(e):Object.keys(e),r=s.length;let o;for(n=0;n<r;n++)o=s[n],t.call(null,e[o],o,e)}}function L(e,t){if(p(e))return null;t=t.toLowerCase();const i=Object.keys(e);let n,s=i.length;for(;s-- >0;)if(n=i[s],t===n.toLowerCase())return n;return null}const x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:i.g,D=e=>!f(e)&&e!==x,U=(P="undefined"!=typeof Uint8Array&&r(Uint8Array),e=>P&&e instanceof P);var P;const V=u("HTMLFormElement"),_=(({hasOwnProperty:e})=>(t,i)=>e.call(t,i))(Object.prototype),M=u("RegExp"),j=(e,t)=>{const i=Object.getOwnPropertyDescriptors(e),n={};N(i,(i,s)=>{let r;!1!==(r=t(i,s,e))&&(n[s]=r||i)}),Object.defineProperties(e,n)},q=u("AsyncFunction"),F=($="function"==typeof setImmediate,z=v(x.postMessage),$?setImmediate:z?(B=`axios@${Math.random()}`,H=[],x.addEventListener("message",({source:e,data:t})=>{e===x&&t===B&&H.length&&H.shift()()},!1),e=>{H.push(e),x.postMessage(B,"*")}):e=>setTimeout(e));var $,z,B,H;const W="undefined"!=typeof queueMicrotask?queueMicrotask.bind(x):"undefined"!=typeof process&&process.nextTick||F;var J={isArray:h,isArrayBuffer:g,isBuffer:p,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||v(e.append)&&("formdata"===(t=l(e))||"object"===t&&v(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:y,isBoolean:e=>!0===e||!1===e,isObject:E,isPlainObject:S,isEmptyObject:e=>{if(!E(e)||p(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:C,isRequest:O,isResponse:T,isHeaders:R,isUndefined:f,isDate:b,isFile:w,isBlob:k,isRegExp:M,isFunction:v,isStream:e=>E(e)&&v(e.pipe),isURLSearchParams:A,isTypedArray:U,isFileList:I,forEach:N,merge:function e(){const{caseless:t,skipUndefined:i}=D(this)&&this||{},n={},s=(s,r)=>{const o=t&&L(n,r)||r;S(n[o])&&S(s)?n[o]=e(n[o],s):S(s)?n[o]=e({},s):h(s)?n[o]=s.slice():i&&f(s)||(n[o]=s)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&N(arguments[e],s);return n},extend:(e,t,i,{allOwnKeys:s}={})=>(N(t,(t,s)=>{i&&v(t)?e[s]=n(t,i):e[s]=t},{allOwnKeys:s}),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,i,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),i&&Object.assign(e.prototype,i)},toFlatObject:(e,t,i,n)=>{let s,o,a;const l={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)a=s[o],n&&!n(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==i&&r(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:u,endsWith:(e,t,i)=>{e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=t.length;const n=e.indexOf(t,i);return-1!==n&&n===i},toArray:e=>{if(!e)return null;if(h(e))return e;let t=e.length;if(!y(t))return null;const i=new Array(t);for(;t-- >0;)i[t]=e[t];return i},forEachEntry:(e,t)=>{const i=(e&&e[o]).call(e);let n;for(;(n=i.next())&&!n.done;){const i=n.value;t.call(e,i[0],i[1])}},matchAll:(e,t)=>{let i;const n=[];for(;null!==(i=e.exec(t));)n.push(i);return n},isHTMLForm:V,hasOwnProperty:_,hasOwnProp:_,reduceDescriptors:j,freezeMethods:e=>{j(e,(t,i)=>{if(v(e)&&-1!==["arguments","caller","callee"].indexOf(i))return!1;const n=e[i];v(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")}))})},toObjectSet:(e,t)=>{const i={},n=e=>{e.forEach(e=>{i[e]=!0})};return h(e)?n(e):n(String(e).split(t)),i},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,i){return t.toUpperCase()+i}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:L,global:x,isContextDefined:D,isSpecCompliantForm:function(e){return!!(e&&v(e.append)&&"FormData"===e[a]&&e[o])},toJSONObject:e=>{const t=new Array(10),i=(e,n)=>{if(E(e)){if(t.indexOf(e)>=0)return;if(p(e))return e;if(!("toJSON"in e)){t[n]=e;const s=h(e)?[]:{};return N(e,(e,t)=>{const r=i(e,n+1);!f(r)&&(s[t]=r)}),t[n]=void 0,s}}return e};return i(e,0)},isAsyncFn:q,isThenable:e=>e&&(E(e)||v(e))&&v(e.then)&&v(e.catch),setImmediate:F,asap:W,isIterable:e=>null!=e&&v(e[o])};function Z(e,t,i,n,s){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),i&&(this.config=i),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}J.inherits(Z,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:J.toJSONObject(this.config),code:this.code,status:this.status}}});const G=Z.prototype,K={};function Y(e){return J.isPlainObject(e)||J.isArray(e)}function X(e){return J.endsWith(e,"[]")?e.slice(0,-2):e}function Q(e,t,i){return e?e.concat(t).map(function(e,t){return e=X(e),!i&&t?"["+e+"]":e}).join(i?".":""):t}["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=>{K[e]={value:e}}),Object.defineProperties(Z,K),Object.defineProperty(G,"isAxiosError",{value:!0}),Z.from=(e,t,i,n,s,r)=>{const o=Object.create(G);J.toFlatObject(e,o,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const a=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return Z.call(o,a,l,i,n,s),e&&null==o.cause&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",r&&Object.assign(o,r),o};const ee=J.toFlatObject(J,{},null,function(e){return/^is[A-Z]/.test(e)});function te(e,t,i){if(!J.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(i=J.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!J.isUndefined(t[e])})).metaTokens,s=i.visitor||c,r=i.dots,o=i.indexes,a=(i.Blob||"undefined"!=typeof Blob&&Blob)&&J.isSpecCompliantForm(t);if(!J.isFunction(s))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(J.isDate(e))return e.toISOString();if(J.isBoolean(e))return e.toString();if(!a&&J.isBlob(e))throw new Z("Blob is not supported. Use a Buffer instead.");return J.isArrayBuffer(e)||J.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,i,s){let a=e;if(e&&!s&&"object"==typeof e)if(J.endsWith(i,"{}"))i=n?i:i.slice(0,-2),e=JSON.stringify(e);else if(J.isArray(e)&&function(e){return J.isArray(e)&&!e.some(Y)}(e)||(J.isFileList(e)||J.endsWith(i,"[]"))&&(a=J.toArray(e)))return i=X(i),a.forEach(function(e,n){!J.isUndefined(e)&&null!==e&&t.append(!0===o?Q([i],n,r):null===o?i:i+"[]",l(e))}),!1;return!!Y(e)||(t.append(Q(s,i,r),l(e)),!1)}const u=[],d=Object.assign(ee,{defaultVisitor:c,convertValue:l,isVisitable:Y});if(!J.isObject(e))throw new TypeError("data must be an object");return function e(i,n){if(!J.isUndefined(i)){if(-1!==u.indexOf(i))throw Error("Circular reference detected in "+n.join("."));u.push(i),J.forEach(i,function(i,r){!0===(!(J.isUndefined(i)||null===i)&&s.call(t,i,J.isString(r)?r.trim():r,n,d))&&e(i,n?n.concat(r):[r])}),u.pop()}}(e),t}function ie(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ne(e,t){this._pairs=[],e&&te(e,this,t)}const se=ne.prototype;function re(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function oe(e,t,i){if(!t)return e;const n=i&&i.encode||re;J.isFunction(i)&&(i={serialize:i});const s=i&&i.serialize;let r;if(r=s?s(t,i):J.isURLSearchParams(t)?t.toString():new ne(t,i).toString(n),r){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}se.append=function(e,t){this._pairs.push([e,t])},se.toString=function(e){const t=e?function(t){return e.call(this,t,ie)}:ie;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var ae=class{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){J.forEach(this.handlers,function(t){null!==t&&e(t)})}},le={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ce={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ne,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ue="undefined"!=typeof window&&"undefined"!=typeof document,de="object"==typeof navigator&&navigator||void 0,he=ue&&(!de||["ReactNative","NativeScript","NS"].indexOf(de.product)<0),fe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,pe=ue&&window.location.href||"http://localhost";var ge={...Object.freeze({__proto__:null,hasBrowserEnv:ue,hasStandardBrowserWebWorkerEnv:fe,hasStandardBrowserEnv:he,navigator:de,origin:pe}),...ce};function me(e){function t(e,i,n,s){let r=e[s++];if("__proto__"===r)return!0;const o=Number.isFinite(+r),a=s>=e.length;return r=!r&&J.isArray(n)?n.length:r,a?(J.hasOwnProp(n,r)?n[r]=[n[r],i]:n[r]=i,!o):(n[r]&&J.isObject(n[r])||(n[r]=[]),t(e,i,n[r],s)&&J.isArray(n[r])&&(n[r]=function(e){const t={},i=Object.keys(e);let n;const s=i.length;let r;for(n=0;n<s;n++)r=i[n],t[r]=e[r];return t}(n[r])),!o)}if(J.isFormData(e)&&J.isFunction(e.entries)){const i={};return J.forEachEntry(e,(e,n)=>{t(function(e){return J.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,i,0)}),i}return null}const ve={transitional:le,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const i=t.getContentType()||"",n=i.indexOf("application/json")>-1,s=J.isObject(e);if(s&&J.isHTMLForm(e)&&(e=new FormData(e)),J.isFormData(e))return n?JSON.stringify(me(e)):e;if(J.isArrayBuffer(e)||J.isBuffer(e)||J.isStream(e)||J.isFile(e)||J.isBlob(e)||J.isReadableStream(e))return e;if(J.isArrayBufferView(e))return e.buffer;if(J.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let r;if(s){if(i.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return te(e,new ge.classes.URLSearchParams,{visitor:function(e,t,i,n){return ge.isNode&&J.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((r=J.isFileList(e))||i.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return te(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||n?(t.setContentType("application/json",!1),function(e){if(J.isString(e))try{return(0,JSON.parse)(e),J.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ve.transitional,i=t&&t.forcedJSONParsing,n="json"===this.responseType;if(J.isResponse(e)||J.isReadableStream(e))return e;if(e&&J.isString(e)&&(i&&!this.responseType||n)){const i=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(i){if("SyntaxError"===e.name)throw Z.from(e,Z.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:ge.classes.FormData,Blob:ge.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};J.forEach(["delete","get","head","post","put","patch"],e=>{ve.headers[e]={}});var ye=ve;const Ee=J.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"]),Se=Symbol("internals");function be(e){return e&&String(e).trim().toLowerCase()}function we(e){return!1===e||null==e?e:J.isArray(e)?e.map(we):String(e)}function ke(e,t,i,n,s){return J.isFunction(n)?n.call(this,t,i):(s&&(t=i),J.isString(t)?J.isString(n)?-1!==t.indexOf(n):J.isRegExp(n)?n.test(t):void 0:void 0)}class Ie{constructor(e){e&&this.set(e)}set(e,t,i){const n=this;function s(e,t,i){const s=be(t);if(!s)throw new Error("header name must be a non-empty string");const r=J.findKey(n,s);(!r||void 0===n[r]||!0===i||void 0===i&&!1!==n[r])&&(n[r||t]=we(e))}const r=(e,t)=>J.forEach(e,(e,i)=>s(e,i,t));if(J.isPlainObject(e)||e instanceof this.constructor)r(e,t);else if(J.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))r((e=>{const t={};let i,n,s;return e&&e.split("\n").forEach(function(e){s=e.indexOf(":"),i=e.substring(0,s).trim().toLowerCase(),n=e.substring(s+1).trim(),!i||t[i]&&Ee[i]||("set-cookie"===i?t[i]?t[i].push(n):t[i]=[n]:t[i]=t[i]?t[i]+", "+n:n)}),t})(e),t);else if(J.isObject(e)&&J.isIterable(e)){let i,n,s={};for(const t of e){if(!J.isArray(t))throw TypeError("Object iterator must return a key-value pair");s[n=t[0]]=(i=s[n])?J.isArray(i)?[...i,t[1]]:[i,t[1]]:t[1]}r(s,t)}else null!=e&&s(t,e,i);return this}get(e,t){if(e=be(e)){const i=J.findKey(this,e);if(i){const e=this[i];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=i.exec(e);)t[n[1]]=n[2];return t}(e);if(J.isFunction(t))return t.call(this,e,i);if(J.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=be(e)){const i=J.findKey(this,e);return!(!i||void 0===this[i]||t&&!ke(0,this[i],i,t))}return!1}delete(e,t){const i=this;let n=!1;function s(e){if(e=be(e)){const s=J.findKey(i,e);!s||t&&!ke(0,i[s],s,t)||(delete i[s],n=!0)}}return J.isArray(e)?e.forEach(s):s(e),n}clear(e){const t=Object.keys(this);let i=t.length,n=!1;for(;i--;){const s=t[i];e&&!ke(0,this[s],s,e,!0)||(delete this[s],n=!0)}return n}normalize(e){const t=this,i={};return J.forEach(this,(n,s)=>{const r=J.findKey(i,s);if(r)return t[r]=we(n),void delete t[s];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,i)=>t.toUpperCase()+i)}(s):String(s).trim();o!==s&&delete t[s],t[o]=we(n),i[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return J.forEach(this,(i,n)=>{null!=i&&!1!==i&&(t[n]=e&&J.isArray(i)?i.join(", "):i)}),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 i=new this(e);return t.forEach(e=>i.set(e)),i}static accessor(e){const t=(this[Se]=this[Se]={accessors:{}}).accessors,i=this.prototype;function n(e){const n=be(e);t[n]||(function(e,t){const i=J.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+i,{value:function(e,i,s){return this[n].call(this,t,e,i,s)},configurable:!0})})}(i,e),t[n]=!0)}return J.isArray(e)?e.forEach(n):n(e),this}}Ie.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),J.reduceDescriptors(Ie.prototype,({value:e},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[i]=e}}}),J.freezeMethods(Ie);var Ae=Ie;function Ce(e,t){const i=this||ye,n=t||i,s=Ae.from(n.headers);let r=n.data;return J.forEach(e,function(e){r=e.call(i,r,s.normalize(),t?t.status:void 0)}),s.normalize(),r}function Oe(e){return!(!e||!e.__CANCEL__)}function Te(e,t,i){Z.call(this,null==e?"canceled":e,Z.ERR_CANCELED,t,i),this.name="CanceledError"}function Re(e,t,i){const n=i.config.validateStatus;i.status&&n&&!n(i.status)?t(new Z("Request failed with status code "+i.status,[Z.ERR_BAD_REQUEST,Z.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):e(i)}J.inherits(Te,Z,{__CANCEL__:!0});const Ne=(e,t,i=3)=>{let n=0;const s=function(e,t){e=e||10;const i=new Array(e),n=new Array(e);let s,r=0,o=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=n[o];s||(s=l),i[r]=a,n[r]=l;let u=o,d=0;for(;u!==r;)d+=i[u++],u%=e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),l-s<t)return;const h=c&&l-c;return h?Math.round(1e3*d/h):void 0}}(50,250);return function(i,r){let o,a,l=0,c=1e3/r;const u=(i,r=Date.now())=>{l=r,o=null,a&&(clearTimeout(a),a=null),(i=>{const r=i.loaded,o=i.lengthComputable?i.total:void 0,a=r-n,l=s(a);n=r,e({loaded:r,total:o,progress:o?r/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&r<=o?(o-r)/l:void 0,event:i,lengthComputable:null!=o,[t?"download":"upload"]:!0})})(...i)};return[(...e)=>{const t=Date.now(),i=t-l;i>=c?u(e,t):(o=e,a||(a=setTimeout(()=>{a=null,u(o)},c-i)))},()=>o&&u(o)]}(0,i)},Le=(e,t)=>{const i=null!=e;return[n=>t[0]({lengthComputable:i,total:e,loaded:n}),t[1]]},xe=e=>(...t)=>J.asap(()=>e(...t));var De=ge.hasStandardBrowserEnv?((e,t)=>i=>(i=new URL(i,ge.origin),e.protocol===i.protocol&&e.host===i.host&&(t||e.port===i.port)))(new URL(ge.origin),ge.navigator&&/(msie|trident)/i.test(ge.navigator.userAgent)):()=>!0,Ue=ge.hasStandardBrowserEnv?{write(e,t,i,n,s,r,o){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];J.isNumber(i)&&a.push(`expires=${new Date(i).toUTCString()}`),J.isString(n)&&a.push(`path=${n}`),J.isString(s)&&a.push(`domain=${s}`),!0===r&&a.push("secure"),J.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Pe(e,t,i){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||0==i)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ve=e=>e instanceof Ae?{...e}:e;function _e(e,t){t=t||{};const i={};function n(e,t,i,n){return J.isPlainObject(e)&&J.isPlainObject(t)?J.merge.call({caseless:n},e,t):J.isPlainObject(t)?J.merge({},t):J.isArray(t)?t.slice():t}function s(e,t,i,s){return J.isUndefined(t)?J.isUndefined(e)?void 0:n(void 0,e,0,s):n(e,t,0,s)}function r(e,t){if(!J.isUndefined(t))return n(void 0,t)}function o(e,t){return J.isUndefined(t)?J.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(i,s,r){return r in t?n(i,s):r in e?n(void 0,i):void 0}const l={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(e,t,i)=>s(Ve(e),Ve(t),0,!0)};return J.forEach(Object.keys({...e,...t}),function(n){const r=l[n]||s,o=r(e[n],t[n],n);J.isUndefined(o)&&r!==a||(i[n]=o)}),i}var Me=e=>{const t=_e({},e);let{data:i,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:r,headers:o,auth:a}=t;if(t.headers=o=Ae.from(o),t.url=oe(Pe(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),J.isFormData(i))if(ge.hasStandardBrowserEnv||ge.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(J.isFunction(i.getHeaders)){const e=i.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,i])=>{t.includes(e.toLowerCase())&&o.set(e,i)})}if(ge.hasStandardBrowserEnv&&(n&&J.isFunction(n)&&(n=n(t)),n||!1!==n&&De(t.url))){const e=s&&r&&Ue.read(r);e&&o.set(s,e)}return t},je="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,i){const n=Me(e);let s=n.data;const r=Ae.from(n.headers).normalize();let o,a,l,c,u,{responseType:d,onUploadProgress:h,onDownloadProgress:f}=n;function p(){c&&c(),u&&u(),n.cancelToken&&n.cancelToken.unsubscribe(o),n.signal&&n.signal.removeEventListener("abort",o)}let g=new XMLHttpRequest;function m(){if(!g)return;const n=Ae.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());Re(function(e){t(e),p()},function(e){i(e),p()},{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g}),g=null}g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout,"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(m)},g.onabort=function(){g&&(i(new Z("Request aborted",Z.ECONNABORTED,e,g)),g=null)},g.onerror=function(t){const n=new Z(t&&t.message?t.message:"Network Error",Z.ERR_NETWORK,e,g);n.event=t||null,i(n),g=null},g.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const s=n.transitional||le;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),i(new Z(t,s.clarifyTimeoutError?Z.ETIMEDOUT:Z.ECONNABORTED,e,g)),g=null},void 0===s&&r.setContentType(null),"setRequestHeader"in g&&J.forEach(r.toJSON(),function(e,t){g.setRequestHeader(t,e)}),J.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),d&&"json"!==d&&(g.responseType=n.responseType),f&&([l,u]=Ne(f,!0),g.addEventListener("progress",l)),h&&g.upload&&([a,c]=Ne(h),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",c)),(n.cancelToken||n.signal)&&(o=t=>{g&&(i(!t||t.type?new Te(null,e,g):t),g.abort(),g=null)},n.cancelToken&&n.cancelToken.subscribe(o),n.signal&&(n.signal.aborted?o():n.signal.addEventListener("abort",o)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);v&&-1===ge.protocols.indexOf(v)?i(new Z("Unsupported protocol "+v+":",Z.ERR_BAD_REQUEST,e)):g.send(s||null)})},qe=(e,t)=>{const{length:i}=e=e?e.filter(Boolean):[];if(t||i){let i,n=new AbortController;const s=function(e){if(!i){i=!0,o();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Z?t:new Te(t instanceof Error?t.message:t))}};let r=t&&setTimeout(()=>{r=null,s(new Z(`timeout ${t} of ms exceeded`,Z.ETIMEDOUT))},t);const o=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)}),e=null)};e.forEach(e=>e.addEventListener("abort",s));const{signal:a}=n;return a.unsubscribe=()=>J.asap(o),a}};const Fe=function*(e,t){let i=e.byteLength;if(!t||i<t)return void(yield e);let n,s=0;for(;s<i;)n=s+t,yield e.slice(s,n),s=n},$e=(e,t,i,n)=>{const s=async function*(e,t){for await(const i of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:i}=await t.read();if(e)break;yield i}}finally{await t.cancel()}}(e))yield*Fe(i,t)}(e,t);let r,o=0,a=e=>{r||(r=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await s.next();if(t)return a(),void e.close();let r=n.byteLength;if(i){let e=o+=r;i(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),s.return())},{highWaterMark:2})},{isFunction:ze}=J,Be=(({Request:e,Response:t})=>({Request:e,Response:t}))(J.global),{ReadableStream:He,TextEncoder:We}=J.global,Je=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Ze=e=>{e=J.merge.call({skipUndefined:!0},Be,e);const{fetch:t,Request:i,Response:n}=e,s=t?ze(t):"function"==typeof fetch,r=ze(i),o=ze(n);if(!s)return!1;const a=s&&ze(He),l=s&&("function"==typeof We?(c=new We,e=>c.encode(e)):async e=>new Uint8Array(await new i(e).arrayBuffer()));var c;const u=r&&a&&Je(()=>{let e=!1;const t=new i(ge.origin,{body:new He,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=o&&a&&Je(()=>J.isReadableStream(new n("").body)),h={stream:d&&(e=>e.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,i)=>{let n=t&&t[e];if(n)return n.call(t);throw new Z(`Response type '${e}' is not supported`,Z.ERR_NOT_SUPPORT,i)})});return async e=>{let{url:s,method:o,data:a,signal:c,cancelToken:f,timeout:p,onDownloadProgress:g,onUploadProgress:m,responseType:v,headers:y,withCredentials:E="same-origin",fetchOptions:S}=Me(e),b=t||fetch;v=v?(v+"").toLowerCase():"text";let w=qe([c,f&&f.toAbortSignal()],p),k=null;const I=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let A;try{if(m&&u&&"get"!==o&&"head"!==o&&0!==(A=await(async(e,t)=>{const n=J.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(J.isBlob(e))return e.size;if(J.isSpecCompliantForm(e)){const t=new i(ge.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return J.isArrayBufferView(e)||J.isArrayBuffer(e)?e.byteLength:(J.isURLSearchParams(e)&&(e+=""),J.isString(e)?(await l(e)).byteLength:void 0)})(t):n})(y,a))){let e,t=new i(s,{method:"POST",body:a,duplex:"half"});if(J.isFormData(a)&&(e=t.headers.get("content-type"))&&y.setContentType(e),t.body){const[e,i]=Le(A,Ne(xe(m)));a=$e(t.body,65536,e,i)}}J.isString(E)||(E=E?"include":"omit");const t=r&&"credentials"in i.prototype,c={...S,signal:w,method:o.toUpperCase(),headers:y.normalize().toJSON(),body:a,duplex:"half",credentials:t?E:void 0};k=r&&new i(s,c);let f=await(r?b(k,S):b(s,c));const p=d&&("stream"===v||"response"===v);if(d&&(g||p&&I)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=f[t]});const t=J.toFiniteNumber(f.headers.get("content-length")),[i,s]=g&&Le(t,Ne(xe(g),!0))||[];f=new n($e(f.body,65536,i,()=>{s&&s(),I&&I()}),e)}v=v||"text";let C=await h[J.findKey(h,v)||"text"](f,e);return!p&&I&&I(),await new Promise((t,i)=>{Re(t,i,{data:C,headers:Ae.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:k})})}catch(t){if(I&&I(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Z("Network Error",Z.ERR_NETWORK,e,k),{cause:t.cause||t});throw Z.from(t,t&&t.code,e,k)}}},Ge=new Map,Ke=e=>{let t=e&&e.env||{};const{fetch:i,Request:n,Response:s}=t,r=[n,s,i];let o,a,l=r.length,c=Ge;for(;l--;)o=r[l],a=c.get(o),void 0===a&&c.set(o,a=l?new Map:Ze(t)),c=a;return a};Ke();const Ye={http:null,xhr:je,fetch:{get:Ke}};J.forEach(Ye,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Xe=e=>`- ${e}`,Qe=e=>J.isFunction(e)||null===e||!1===e;var et=function(e,t){e=J.isArray(e)?e:[e];const{length:i}=e;let n,s;const r={};for(let o=0;o<i;o++){let i;if(n=e[o],s=n,!Qe(n)&&(s=Ye[(i=String(n)).toLowerCase()],void 0===s))throw new Z(`Unknown adapter '${i}'`);if(s&&(J.isFunction(s)||(s=s.get(t))))break;r[i||"#"+o]=s}if(!s){const e=Object.entries(r).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Z("There is no suitable adapter to dispatch the request "+(i?e.length>1?"since :\n"+e.map(Xe).join("\n"):" "+Xe(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return s};function tt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Te(null,e)}function it(e){return tt(e),e.headers=Ae.from(e.headers),e.data=Ce.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),et(e.adapter||ye.adapter,e)(e).then(function(t){return tt(e),t.data=Ce.call(e,e.transformResponse,t),t.headers=Ae.from(t.headers),t},function(t){return Oe(t)||(tt(e),t&&t.response&&(t.response.data=Ce.call(e,e.transformResponse,t.response),t.response.headers=Ae.from(t.response.headers))),Promise.reject(t)})}const nt="1.13.2",st={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{st[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const rt={};st.transitional=function(e,t,i){function n(e,t){return"[Axios v"+nt+"] Transitional option '"+e+"'"+t+(i?". "+i:"")}return(i,s,r)=>{if(!1===e)throw new Z(n(s," has been removed"+(t?" in "+t:"")),Z.ERR_DEPRECATED);return t&&!rt[s]&&(rt[s]=!0,console.warn(n(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,s,r)}},st.spelling=function(e){return(t,i)=>(console.warn(`${i} is likely a misspelling of ${e}`),!0)};var ot={assertOptions:function(e,t,i){if("object"!=typeof e)throw new Z("options must be an object",Z.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const r=n[s],o=t[r];if(o){const t=e[r],i=void 0===t||o(t,r,e);if(!0!==i)throw new Z("option "+r+" must be "+i,Z.ERR_BAD_OPTION_VALUE);continue}if(!0!==i)throw new Z("Unknown option "+r,Z.ERR_BAD_OPTION)}},validators:st};const at=ot.validators;class lt{constructor(e){this.defaults=e||{},this.interceptors={request:new ae,response:new ae}}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 i=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?i&&!String(e.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+i):e.stack=i}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=_e(this.defaults,t);const{transitional:i,paramsSerializer:n,headers:s}=t;void 0!==i&&ot.assertOptions(i,{silentJSONParsing:at.transitional(at.boolean),forcedJSONParsing:at.transitional(at.boolean),clarifyTimeoutError:at.transitional(at.boolean)},!1),null!=n&&(J.isFunction(n)?t.paramsSerializer={serialize:n}:ot.assertOptions(n,{encode:at.function,serialize:at.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ot.assertOptions(t,{baseUrl:at.spelling("baseURL"),withXsrfToken:at.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let r=s&&J.merge(s.common,s[t.method]);s&&J.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=Ae.concat(r,s);const o=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,o.unshift(e.fulfilled,e.rejected))});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,d=0;if(!a){const e=[it.bind(this),void 0];for(e.unshift(...o),e.push(...l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=o.length;let h=t;for(;d<u;){const e=o[d++],t=o[d++];try{h=e(h)}catch(e){t.call(this,e);break}}try{c=it.call(this,h)}catch(e){return Promise.reject(e)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return oe(Pe((e=_e(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}J.forEach(["delete","get","head","options"],function(e){lt.prototype[e]=function(t,i){return this.request(_e(i||{},{method:e,url:t,data:(i||{}).data}))}}),J.forEach(["post","put","patch"],function(e){function t(t){return function(i,n,s){return this.request(_e(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:i,data:n}))}}lt.prototype[e]=t(),lt.prototype[e+"Form"]=t(!0)});var ct=lt;class ut{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 i=this;this.promise.then(e=>{if(!i._listeners)return;let t=i._listeners.length;for(;t-- >0;)i._listeners[t](e);i._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{i.subscribe(e),t=e}).then(e);return n.cancel=function(){i.unsubscribe(t)},n},e(function(e,n,s){i.reason||(i.reason=new Te(e,n,s),t(i.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 ut(function(t){e=t}),cancel:e}}}var dt=ut;const ht={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ht).forEach(([e,t])=>{ht[t]=e});var ft=ht;const pt=function e(t){const i=new ct(t),s=n(ct.prototype.request,i);return J.extend(s,ct.prototype,i,{allOwnKeys:!0}),J.extend(s,i,null,{allOwnKeys:!0}),s.create=function(i){return e(_e(t,i))},s}(ye);pt.Axios=ct,pt.CanceledError=Te,pt.CancelToken=dt,pt.isCancel=Oe,pt.VERSION=nt,pt.toFormData=te,pt.AxiosError=Z,pt.Cancel=pt.CanceledError,pt.all=function(e){return Promise.all(e)},pt.spread=function(e){return function(t){return e.apply(null,t)}},pt.isAxiosError=function(e){return J.isObject(e)&&!0===e.isAxiosError},pt.mergeConfig=_e,pt.AxiosHeaders=Ae,pt.formToJSON=e=>me(J.isHTMLForm(e)?new FormData(e):e),pt.getAdapter=et,pt.HttpStatusCode=ft,pt.default=pt,e.exports=pt},911(e,t,i){var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==i.g&&i.g,s=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var i=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==i&&i,n="URLSearchParams"in i,s="Symbol"in i&&"iterator"in Symbol,r="FileReader"in i&&"Blob"in i&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in i,a="ArrayBuffer"in i;if(a)var l=["[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&&l.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return s&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?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 p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function g(e){return new Promise(function(t,i){e.onload=function(){t(e.result)},e.onerror=function(){i(e.error)}})}function m(e){var t=new FileReader,i=g(t);return t.readAsArrayBuffer(e),i}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,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():a&&r&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=v(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=p(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?p(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(m)}),this.text=function(){var e,t,i,n=p(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,i=g(t=new FileReader),t.readAsText(e),i;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),i=new Array(t.length),n=0;n<t.length;n++)i[n]=String.fromCharCode(t[n]);return i.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}f.prototype.append=function(e,t){e=u(e),t=d(t);var i=this.map[e];this.map[e]=i?i+", "+t:t},f.prototype.delete=function(e){delete this.map[u(e)]},f.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},f.prototype.set=function(e,t){this.map[u(e)]=d(t)},f.prototype.forEach=function(e,t){for(var i in this.map)this.map.hasOwnProperty(i)&&e.call(t,this.map[i],i,this)},f.prototype.keys=function(){var e=[];return this.forEach(function(t,i){e.push(i)}),h(e)},f.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),h(e)},f.prototype.entries=function(){var e=[];return this.forEach(function(t,i){e.push([i,t])}),h(e)},s&&(f.prototype[Symbol.iterator]=f.prototype.entries);var E=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function S(e,t){if(!(this instanceof S))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var i,n,s=(t=t||{}).body;if(e instanceof S){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new f(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,s||null==e._bodyInit||(s=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 f(t.headers)),this.method=(n=(i=t.method||this.method||"GET").toUpperCase(),E.indexOf(n)>-1?n:i),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&s)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(s),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var r=/([?&])_=[^&]*/;r.test(this.url)?this.url=this.url.replace(r,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function b(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var i=e.split("="),n=i.shift().replace(/\+/g," "),s=i.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(s))}}),t}function w(e,t){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}S.prototype.clone=function(){return new S(this,{body:this._bodyInit})},y.call(S.prototype),y.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var k=[301,302,303,307,308];w.redirect=function(e,t){if(-1===k.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=i.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var i=Error(e);this.stack=i.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function I(e,n){return new Promise(function(s,o){var l=new S(e,n);if(l.signal&&l.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function u(){c.abort()}c.onload=function(){var e,t,i={status:c.status,statusText:c.statusText,headers:(e=c.getAllResponseHeaders()||"",t=new f,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var i=e.split(":"),n=i.shift().trim();if(n){var s=i.join(":").trim();t.append(n,s)}}),t)};i.url="responseURL"in c?c.responseURL:i.headers.get("X-Request-URL");var n="response"in c?c.response:c.responseText;setTimeout(function(){s(new w(n,i))},0)},c.onerror=function(){setTimeout(function(){o(new TypeError("Network request failed"))},0)},c.ontimeout=function(){setTimeout(function(){o(new TypeError("Network request failed"))},0)},c.onabort=function(){setTimeout(function(){o(new t.DOMException("Aborted","AbortError"))},0)},c.open(l.method,function(e){try{return""===e&&i.location.href?i.location.href:e}catch(t){return e}}(l.url),!0),"include"===l.credentials?c.withCredentials=!0:"omit"===l.credentials&&(c.withCredentials=!1),"responseType"in c&&(r?c.responseType="blob":a&&l.headers.get("Content-Type")&&-1!==l.headers.get("Content-Type").indexOf("application/octet-stream")&&(c.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof f?l.headers.forEach(function(e,t){c.setRequestHeader(t,e)}):Object.getOwnPropertyNames(n.headers).forEach(function(e){c.setRequestHeader(e,d(n.headers[e]))}),l.signal&&(l.signal.addEventListener("abort",u),c.onreadystatechange=function(){4===c.readyState&&l.signal.removeEventListener("abort",u)}),c.send(void 0===l._bodyInit?null:l._bodyInit)})}I.polyfill=!0,i.fetch||(i.fetch=I,i.Headers=f,i.Request=S,i.Response=w),t.Headers=f,t.Request=S,t.Response=w,t.fetch=I}({})}(s),s.fetch.ponyfill=!0,delete s.fetch.polyfill;var r=n.fetch?n:s;(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},913(e,t,i){"use strict";var n=i(265),s=i(131),r=i(186),o=i(206),a=i(748),l=e.exports=function(e,t){var i,s,l,c,u;return arguments.length<2||"string"!=typeof e?(c=t,t=e,e=null):c=arguments[2],n(e)?(i=a.call(e,"c"),s=a.call(e,"e"),l=a.call(e,"w")):(i=l=!0,s=!1),u={value:t,configurable:i,enumerable:s,writable:l},c?r(o(c),u):u};l.gs=function(e,t,i){var l,c,u,d;return"string"!=typeof e?(u=i,i=t,t=e,e=null):u=arguments[3],n(t)?s(t)?n(i)?s(i)||(u=i,i=void 0):i=void 0:(u=t,t=i=void 0):t=void 0,n(e)?(l=a.call(e,"c"),c=a.call(e,"e")):(l=!0,c=!1),d={get:t,set:i,configurable:l,enumerable:c},u?r(o(u),d):d}},954(e,t,i){"use strict";var n=i(136),s=Object.keys;e.exports=function(e){return s(n(e)?Object(e):e)}},960(e,t,i){"use strict";i.r(t),i.d(t,{v1:()=>f,v3:()=>b,v4:()=>w,v5:()=>A});var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),s=new Uint8Array(16);function r(){if(!n)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(s)}for(var o=[],a=0;a<256;++a)o[a]=(a+256).toString(16).substr(1);const l=function(e,t){var i=t||0,n=o;return[n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]]].join("")};var c,u,d=0,h=0;const f=function(e,t,i){var n=t&&i||0,s=t||[],o=(e=e||{}).node||c,a=void 0!==e.clockseq?e.clockseq:u;if(null==o||null==a){var f=e.random||(e.rng||r)();null==o&&(o=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 p=void 0!==e.msecs?e.msecs:(new Date).getTime(),g=void 0!==e.nsecs?e.nsecs:h+1,m=p-d+(g-h)/1e4;if(m<0&&void 0===e.clockseq&&(a=a+1&16383),(m<0||p>d)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=p,h=g,u=a;var v=(1e4*(268435455&(p+=122192928e5))+g)%4294967296;s[n++]=v>>>24&255,s[n++]=v>>>16&255,s[n++]=v>>>8&255,s[n++]=255&v;var y=p/4294967296*1e4&268435455;s[n++]=y>>>8&255,s[n++]=255&y,s[n++]=y>>>24&15|16,s[n++]=y>>>16&255,s[n++]=a>>>8|128,s[n++]=255&a;for(var E=0;E<6;++E)s[n+E]=o[E];return t||l(s)};function p(e,t,i){var n=function(e,n,s,r){var o=s&&r||0;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=new Array(e.length),i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t}(e)),"string"==typeof n&&(n=function(e){var t=[];return e.replace(/[a-fA-F0-9]{2}/g,function(e){t.push(parseInt(e,16))}),t}(n)),!Array.isArray(e))throw TypeError("value must be an array of bytes");if(!Array.isArray(n)||16!==n.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var a=i(n.concat(e));if(a[6]=15&a[6]|t,a[8]=63&a[8]|128,s)for(var c=0;c<16;++c)s[o+c]=a[c];return s||l(a)};try{n.name=e}catch(e){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}function g(e,t){var i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function m(e,t,i,n,s,r){return g((o=g(g(t,e),g(n,r)))<<(a=s)|o>>>32-a,i);var o,a}function v(e,t,i,n,s,r,o){return m(t&i|~t&n,e,t,s,r,o)}function y(e,t,i,n,s,r,o){return m(t&n|i&~n,e,t,s,r,o)}function E(e,t,i,n,s,r,o){return m(t^i^n,e,t,s,r,o)}function S(e,t,i,n,s,r,o){return m(i^(t|~n),e,t,s,r,o)}const b=p("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Array(t.length);for(var i=0;i<t.length;i++)e[i]=t.charCodeAt(i)}return function(e){var t,i,n,s=[],r=32*e.length,o="0123456789abcdef";for(t=0;t<r;t+=8)i=e[t>>5]>>>t%32&255,n=parseInt(o.charAt(i>>>4&15)+o.charAt(15&i),16),s.push(n);return s}(function(e,t){var i,n,s,r,o;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var a=1732584193,l=-271733879,c=-1732584194,u=271733878;for(i=0;i<e.length;i+=16)n=a,s=l,r=c,o=u,a=v(a,l,c,u,e[i],7,-680876936),u=v(u,a,l,c,e[i+1],12,-389564586),c=v(c,u,a,l,e[i+2],17,606105819),l=v(l,c,u,a,e[i+3],22,-1044525330),a=v(a,l,c,u,e[i+4],7,-176418897),u=v(u,a,l,c,e[i+5],12,1200080426),c=v(c,u,a,l,e[i+6],17,-1473231341),l=v(l,c,u,a,e[i+7],22,-45705983),a=v(a,l,c,u,e[i+8],7,1770035416),u=v(u,a,l,c,e[i+9],12,-1958414417),c=v(c,u,a,l,e[i+10],17,-42063),l=v(l,c,u,a,e[i+11],22,-1990404162),a=v(a,l,c,u,e[i+12],7,1804603682),u=v(u,a,l,c,e[i+13],12,-40341101),c=v(c,u,a,l,e[i+14],17,-1502002290),a=y(a,l=v(l,c,u,a,e[i+15],22,1236535329),c,u,e[i+1],5,-165796510),u=y(u,a,l,c,e[i+6],9,-1069501632),c=y(c,u,a,l,e[i+11],14,643717713),l=y(l,c,u,a,e[i],20,-373897302),a=y(a,l,c,u,e[i+5],5,-701558691),u=y(u,a,l,c,e[i+10],9,38016083),c=y(c,u,a,l,e[i+15],14,-660478335),l=y(l,c,u,a,e[i+4],20,-405537848),a=y(a,l,c,u,e[i+9],5,568446438),u=y(u,a,l,c,e[i+14],9,-1019803690),c=y(c,u,a,l,e[i+3],14,-187363961),l=y(l,c,u,a,e[i+8],20,1163531501),a=y(a,l,c,u,e[i+13],5,-1444681467),u=y(u,a,l,c,e[i+2],9,-51403784),c=y(c,u,a,l,e[i+7],14,1735328473),a=E(a,l=y(l,c,u,a,e[i+12],20,-1926607734),c,u,e[i+5],4,-378558),u=E(u,a,l,c,e[i+8],11,-2022574463),c=E(c,u,a,l,e[i+11],16,1839030562),l=E(l,c,u,a,e[i+14],23,-35309556),a=E(a,l,c,u,e[i+1],4,-1530992060),u=E(u,a,l,c,e[i+4],11,1272893353),c=E(c,u,a,l,e[i+7],16,-155497632),l=E(l,c,u,a,e[i+10],23,-1094730640),a=E(a,l,c,u,e[i+13],4,681279174),u=E(u,a,l,c,e[i],11,-358537222),c=E(c,u,a,l,e[i+3],16,-722521979),l=E(l,c,u,a,e[i+6],23,76029189),a=E(a,l,c,u,e[i+9],4,-640364487),u=E(u,a,l,c,e[i+12],11,-421815835),c=E(c,u,a,l,e[i+15],16,530742520),a=S(a,l=E(l,c,u,a,e[i+2],23,-995338651),c,u,e[i],6,-198630844),u=S(u,a,l,c,e[i+7],10,1126891415),c=S(c,u,a,l,e[i+14],15,-1416354905),l=S(l,c,u,a,e[i+5],21,-57434055),a=S(a,l,c,u,e[i+12],6,1700485571),u=S(u,a,l,c,e[i+3],10,-1894986606),c=S(c,u,a,l,e[i+10],15,-1051523),l=S(l,c,u,a,e[i+1],21,-2054922799),a=S(a,l,c,u,e[i+8],6,1873313359),u=S(u,a,l,c,e[i+15],10,-30611744),c=S(c,u,a,l,e[i+6],15,-1560198380),l=S(l,c,u,a,e[i+13],21,1309151649),a=S(a,l,c,u,e[i+4],6,-145523070),u=S(u,a,l,c,e[i+11],10,-1120210379),c=S(c,u,a,l,e[i+2],15,718787259),l=S(l,c,u,a,e[i+9],21,-343485551),a=g(a,n),l=g(l,s),c=g(c,r),u=g(u,o);return[a,l,c,u]}(function(e){var t,i=[];for(i[(e.length>>2)-1]=void 0,t=0;t<i.length;t+=1)i[t]=0;var n=8*e.length;for(t=0;t<n;t+=8)i[t>>5]|=(255&e[t/8])<<t%32;return i}(e),8*e.length))}),w=function(e,t,i){var n=t&&i||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var o=0;o<16;++o)t[n+o]=s[o];return t||l(s)};function k(e,t,i,n){switch(e){case 0:return t&i^~t&n;case 1:case 3:return t^i^n;case 2:return t&i^t&n^i&n}}function I(e,t){return e<<t|e>>>32-t}const A=p("v5",80,function(e){var t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var n=unescape(encodeURIComponent(e));e=new Array(n.length);for(var s=0;s<n.length;s++)e[s]=n.charCodeAt(s)}e.push(128);var r=e.length/4+2,o=Math.ceil(r/16),a=new Array(o);for(s=0;s<o;s++){a[s]=new Array(16);for(var l=0;l<16;l++)a[s][l]=e[64*s+4*l]<<24|e[64*s+4*l+1]<<16|e[64*s+4*l+2]<<8|e[64*s+4*l+3]}for(a[o-1][14]=8*(e.length-1)/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=8*(e.length-1)&4294967295,s=0;s<o;s++){for(var c=new Array(80),u=0;u<16;u++)c[u]=a[s][u];for(u=16;u<80;u++)c[u]=I(c[u-3]^c[u-8]^c[u-14]^c[u-16],1);var d=i[0],h=i[1],f=i[2],p=i[3],g=i[4];for(u=0;u<80;u++){var m=Math.floor(u/20),v=I(d,5)+k(m,h,f,p)+g+t[m]+c[u]>>>0;g=p,p=f,f=I(h,30)>>>0,h=d,d=v}i[0]=i[0]+d>>>0,i[1]=i[1]+h>>>0,i[2]=i[2]+f>>>0,i[3]=i[3]+p>>>0,i[4]=i[4]+g>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]})}},n={};function s(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return i[e](r,r.exports,s),r.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(i,n){if(1&n&&(i=this(i)),8&n)return i;if("object"==typeof i&&i){if(4&n&&i.__esModule)return i;if(16&n&&"function"==typeof i.then)return i}var r=Object.create(null);s.r(r);var o={};e=e||[null,t({}),t([]),t(t)];for(var a=2&n&&i;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>o[e]=()=>i[e]);return o.default=()=>i,s.d(r,o),r},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";s.r(r),s.d(r,{Desktop:()=>$e});var e=s(542);const t=(0,e.createLogger)("agentx-js-api"),i=(e,t)=>({info:(...i)=>e.info(t,...i),warn:(...i)=>e.warn(t,...i),error:(...i)=>e.error(t,...i)});class n{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 o=e=>new n(e);var a=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const l="jsapi",c={rps:120,tag:l},u={rps:0,tag:l},d={tag:l},h=e=>e.actionsChannels.createSource("fireGeneralSilentNotification/Req",c),f=e=>e.actionsChannels.createSource("fireGeneralAutoDismissNotification/Req",u),p=e=>e.actionsChannels.createDestination("fireGeneralAutoDismissNotification/Res",u),g=e=>e.actionsChannels.createSource("fireGeneralAcknowledgeNotification/Req",u),m=e=>e.actionsChannels.createDestination("fireGeneralAcknowledgeNotification/Res",u),v=e=>e.actionsChannels.createSource("addCustomTask",c),y=e=>e.actionsChannels.createSource("getToken/Req",u),E=e=>e.actionsChannels.createDestination("getToken/Res",d),S=e=>e.actionsChannels.createSource("getTaskMap/Req",u),b=e=>e.actionsChannels.createDestination("getTaskMap/Res",d),w=e=>e.actionsChannels.createSource("getMediaTypeQueue/Req",u),k=e=>e.actionsChannels.createDestination("getMediaTypeQueue/Res",d),I=e=>e.actionsChannels.createSource("getIdleCodes/Req",u),A=e=>e.actionsChannels.createDestination("getIdleCodes/Res",d),C=e=>e.actionsChannels.createSource("getWrapUpCodes/Req",u),O=e=>e.actionsChannels.createDestination("getWrapUpCodes/Res",d);class T{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 i;if(e&&e.target){const n=null===(i=this.getClosestElement(e.target,".dynamic-widget-wrapper"))||void 0===i?void 0:i.id;if(n){const e=new CustomEvent("toggle-maximize-restore",{detail:{widgetId:n}});window.dispatchEvent(e),t.info("Dispatching toggle-maximize-restore event for widgetId:",n)}}},this.toggleVoiceInteractionPanel=()=>{window.dispatchEvent(new CustomEvent("toggle-voice-interaction-panel")),t.info("Dispatching toggl-voice-interaction-panel")},this.toggleMuteUnmuteWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-mute-unmute",{});window.dispatchEvent(e),t.info("Dispatching ax-web-call-mute-unmute event")},this.declineWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-decline",{});window.dispatchEvent(e),t.info("Dispatching ax-web-call-decline event")},this.acceptWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-answer",{});window.dispatchEvent(e),t.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:g(this.SERVICE),addCustomTask:v(this.SERVICE),getToken:y(this.SERVICE),getTaskMap:S(this.SERVICE),getMediaTypeQueue:w(this.SERVICE),getIdleCodes:I(this.SERVICE),getWrapUpCodes:C(this.SERVICE)},this.destinationActionsChannels={fireGeneralAutoDismissNotification:p(this.SERVICE),fireGeneralAcknowledgeNotification:m(this.SERVICE),getToken:E(this.SERVICE),getTaskMap:b(this.SERVICE),getMediaTypeQueue:k(this.SERVICE),getIdleCodes:A(this.SERVICE),getWrapUpCodes:O(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(...t){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(i=>{const n=this.getNextReqId(),s=({args:[t,r,o,a]})=>{a===n&&(o!==e.Notifications.ItemMeta.Mode.AutoDismiss&&o!==e.Notifications.ItemMeta.Mode.Silent||t===e.Notifications.ItemMeta.Status.Deactivated&&(i([t,r,o]),this.destinationActionsChannels.fireGeneralAutoDismissNotification.removeListener(s)))};this.destinationActionsChannels.fireGeneralAutoDismissNotification.addListener(s),this.sourceActionsChannels.fireGeneralAutoDismissNotification.send(...t)})})}fireGeneralAcknowledgeNotification(...t){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(i=>{const n=this.getNextReqId(),s=({args:[t,r,o,a]})=>{a===n&&(o!==e.Notifications.ItemMeta.Mode.Acknowledge&&o!==e.Notifications.ItemMeta.Mode.Silent||t===e.Notifications.ItemMeta.Status.Deactivated&&(i([t,r,o]),this.destinationActionsChannels.fireGeneralAcknowledgeNotification.removeListener(s)))};this.destinationActionsChannels.fireGeneralAcknowledgeNotification.addListener(s),this.sourceActionsChannels.fireGeneralAcknowledgeNotification.send(...t)})})}addCustomTask(...e){this.checkService()&&this.sourceActionsChannels.addCustomTask.send(...e)}getTaskMap(){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(e=>{const t=this.getNextReqId(),i=({args:[n,s]})=>{s===t&&(e(n),this.destinationActionsChannels.getTaskMap.removeListener(i))};this.destinationActionsChannels.getTaskMap.addListener(i),this.sourceActionsChannels.getTaskMap.send(t)})})}getMediaTypeQueue(e){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(t=>{const i=this.getNextReqId(),n=({args:[e,s]})=>{s===i&&(t(e),this.destinationActionsChannels.getMediaTypeQueue.removeListener(n))};this.destinationActionsChannels.getMediaTypeQueue.addListener(n),this.sourceActionsChannels.getMediaTypeQueue.send(e,i)})})}getToken(){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(e=>{const t=this.getNextReqId(),i=({args:[n,s]})=>{s===t&&(e(n),this.destinationActionsChannels.getToken.removeListener(i))};this.destinationActionsChannels.getToken.addListener(i),this.sourceActionsChannels.getToken.send(t)})})}getIdleCodes(){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(e=>{const t=this.getNextReqId(),i=({args:[n,s]})=>{s===t&&(e(n),this.destinationActionsChannels.getIdleCodes.removeListener(i))};this.destinationActionsChannels.getIdleCodes.addListener(i),this.sourceActionsChannels.getIdleCodes.send(t)})})}getWrapUpCodes(){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(e=>{const t=this.getNextReqId(),i=({args:[n,s]})=>{s===t&&(e(n),this.destinationActionsChannels.getWrapUpCodes.removeListener(i))};this.destinationActionsChannels.getWrapUpCodes.addListener(i),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 R=i(t,"[Actions JSAPI] =>");class N{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,i){var n,s,r;const o=i?"listenersOnce":"listeners";this[o].has(e)||this[o].set(e,new Map);const a=this[o].get(e),l=i?"listenOnce":"listen",c=n=>{let s=null;return i&&(s=this.aqmServiceEntity[e].listenOnce(()=>this.removeOnceEventListener(e,t))),()=>{var t;if(n){i?(n.stopListenOnce(),s&&s.stopListenOnce()):n.stopListen();const r=[];r.push(`UnBound "${e.toString()}"`),i&&r.push("Once"),this.aqmServiceEntityString&&r.push(`from "${this.aqmServiceEntityString}"`),null===(t=this.logger)||void 0===t||t.info(r.join(" "))}}};if(this.aqmServiceEntity)if(e in this.aqmServiceEntity&&l in this.aqmServiceEntity[e]){const s=this.aqmServiceEntity[e][l](t);a.set(t,c(s));const r=[];r.push(`Bound "${e.toString()}"`),i&&r.push("Once"),this.aqmServiceEntityString&&r.push(`to "${this.aqmServiceEntityString}"`),null===(n=this.logger)||void 0===n||n.info(r.join(" "))}else null===(s=this.logger)||void 0===s||s.warn(`EventName "${e.toString()}" is not recognized, so won't be subscribed...`);else null===(r=this.logger)||void 0===r||r.error(`"${this.aqmServiceEntityString}" is not ready yet. .init(...) first...`)}_removeEventListener(e,t,i){const n=i?"listenersOnce":"listeners";if(this[n].has(e)){const i=this[n].get(e);i&&(i.has(t)&&(i.get(t)(),i.delete(t)),i.size<1&&this[n].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 N(e);var x,D,U,P,V,_,M,j;!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"}(U||(U={})),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"}(V||(V={})),function(e){e.MIDCALL="midcall",e.ADHOC="adhoc",e.CONTINUOUS="continuous"}(_||(_={})),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"}(M||(M={})),function(t){const i="is not a valid UUID",n="is not a valid media type",s="is not a valid destination type";t.validatePropValueNotNullAndEmpty=e=>null!==e&&""!==e,t.validateAgentState=e=>Object.values(U).includes(e),t.validateURL=e=>/^(https?:\/\/)?(www\.)?[a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e),t.validateChannelName=e=>Object.values(V).includes(e),t.validateStateChannelType=e=>Array.isArray(e)&&e.length>0&&e.every(e=>["telephony","chat","email","social"].includes(e)),t.validateDestinationType=e=>Object.values(D).includes(e),t.validateMediaType=e=>Object.values(x).includes(e),t.validateUTCTimeStampNumberFormat=e=>Number.isInteger(e)&&e>=0&&e<=4102444799999,t.validateNumber=e=>Number.isInteger(e)&&e>=0&&e<=2147483647,t.validateBoolean=e=>"boolean"==typeof e||(0===e||1===e)&&t.validatePropValueNotNullAndEmpty(e),t.validateStringToBoolean=e=>{const t=null==e?void 0:e.toLowerCase();return"true"===t||"false"===t||"0"===t||"1"===t},t.validateChannelType=e=>Object.values(V).includes(e),t.validateMonitorType=e=>Object.values(_).includes(e),t.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),t.validateStringNumberOnly=e=>/^(\+)?\d+$/.test(e),t.validateBuddyAgents=(i,n)=>{e.AssertUtils.check(t.validateUUID(null==i?void 0:i.agentProfileId),n,"agentProfileId is not a valid UUID"),e.AssertUtils.check(t.validateChannelName(null==i?void 0:i.channelName),n,"channelName is not a valid channel name"),void 0!==(null==i?void 0:i.state)&&e.AssertUtils.check(t.validateAgentState(i.state),n,"state is not a valid state"),void 0!==(null==i?void 0:i.trackingId)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.trackingId),n,"trackingId is not a valid string")},t.validateAuxCodeType=(i,n)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i),n,"value is null or empty"),e.AssertUtils.check("IDLE_CODE"===i||"WRAP_UP_CODE"===i,n,"value is not IDLE_CODE or WRAP_UP_CODE")},t.validateAuxCodePayload=(i,n)=>{t.validateAuxCodeType(i.workType,n),void 0!==i.page&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.page),n,"page is is null or empty"),void 0!==i.pageSize&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.pageSize),n,"pageSize is is null or empty"),void 0!==i.search&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.search),n,"search is is null or empty"),void 0!==i.customFilter&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.customFilter),n,"customFilter is is null or empty")},t.validateCancelCtq=(n,s)=>{e.AssertUtils.check(t.validateUUID(null==n?void 0:n.agentId),s,`agentId ${i}`),e.AssertUtils.check(t.validateUUID(null==n?void 0:n.queueId),s,`queueId ${i}`)},t.validateWrapupPayload=(i,n)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.wrapUpReason),n,"wrapUpReason is not a valid string"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.auxCodeId),n,"auxCodeId is not a valid string"),e.AssertUtils.check(t.validateStringToBoolean(null==i?void 0:i.isAutoWrapup),n,"isAutoWrapup is not a valid boolean value")},t.validateVTeamTransferPayload=(i,n)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.vteamId),n,"vteamId is not a valid string"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.vteamType),n,"vteamType is not a valid string")},t.validateBlindTransferPayload=(s,r)=>{e.AssertUtils.check(t.validateUUID(null==s?void 0:s.agentId),r,`agentId ${i}`),e.AssertUtils.check(t.validateUUID(null==s?void 0:s.destAgentId),r,`destAgentId ${i}`),e.AssertUtils.check(t.validateMediaType(null==s?void 0:s.mediaType),r,n),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==s?void 0:s.destAgentTeamId),r,"destAgentTeamId is not a valid string"),e.AssertUtils.check(t.validateStringNumberOnly(null==s?void 0:s.destAgentDN),r,"destAgentDN is not a numbers only string"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==s?void 0:s.destSiteId),r,"destSiteId is not a valid string")},t.validateConsultPayload=(s,r)=>{e.AssertUtils.check(t.validateUUID(null==s?void 0:s.agentId),r,`agentId ${i}`),void 0!==(null==s?void 0:s.destAgentId)&&e.AssertUtils.check(t.validateUUID(null==s?void 0:s.destAgentId),r,`destAgentId ${i}`),void 0!==(null==s?void 0:s.mediaType)&&e.AssertUtils.check(t.validateMediaType(null==s?void 0:s.mediaType),r,n),void 0!==(null==s?void 0:s.holdParticipants)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==s?void 0:s.holdParticipants),r,"holdParticipants is not valid")},t.validateConsultTransferPayLoad=(r,o)=>{void 0!==(null==r?void 0:r.agentId)&&e.AssertUtils.check(t.validateUUID(null==r?void 0:r.agentId),o,`agentId ${i}`),e.AssertUtils.check(t.validateUUID(null==r?void 0:r.destAgentId),o,`destagentId ${i}`),e.AssertUtils.check(t.validateMediaType(null==r?void 0:r.mediaType),o,n),e.AssertUtils.check(t.validateUUID(null==r?void 0:r.mediaResourceId),o,`mediaResourceId ${i}`),e.AssertUtils.check(t.validateDestinationType(null==r?void 0:r.destinationType),o,s)},t.validateWrapUpV2Payload=(i,n)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.wrapUpReason),n,"wrapUpReason is not a valid string"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.auxCodeId),n,"auxCodeId is not a valid string")},t.validateChangeAgentStateType=(i,n)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.state),n,"state is null or empty"),e.AssertUtils.check("available"===i.state.toLowerCase()||"idle"===i.state.toLowerCase(),n,"state is not Available or Idle"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.auxCodeId),n,"auxCodeId is null or empty"),e.AssertUtils.check(t.validateUUID(i.agentId),n,"agentId is not a valid UUID")},t.validateConsultDataV2Payload=(i,n)=>{void 0!==(null==i?void 0:i.to)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.to),n,"to is not a valid string or not undefined"),e.AssertUtils.check(t.validateDestinationType(null==i?void 0:i.destinationType),n,s),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.holdParticipants),n,"holdParticipants is not valid")},t.validateConsultConferenceDataV2Payload=(n,r)=>{void 0!==(null==n?void 0:n.agentId)&&e.AssertUtils.check(t.validateUUID(null==n?void 0:n.agentId),r,`agentId ${i}`),void 0!==(null==n?void 0:n.to)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==n?void 0:n.to),r,"to is not a valid string or not undefined"),e.AssertUtils.check(t.validateDestinationType(null==n?void 0:n.destinationType),r,s)},t.validateTransferV2Payload=(i,n)=>{void 0!==(null==i?void 0:i.to)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.to),n,"to is not a valid string or not undefined"),e.AssertUtils.check(t.validateDestinationType(null==i?void 0:i.destinationType),n,s)},t.validateBuddyAgentsV2Payload=(s,r)=>{e.AssertUtils.check(t.validateUUID(null==s?void 0:s.agentProfileId),r,`agentProfileId ${i}`),e.AssertUtils.check(t.validateMediaType(null==s?void 0:s.mediaType),r,n),e.AssertUtils.check(t.validateAgentState(null==s?void 0:s.state),r,"state is not a valid state")},t.validateVTeam=(i,n)=>{e.AssertUtils.check(t.validateUUID(null==i?void 0:i.agentProfileId),n,"agentProfileId is not a valid UUID"),e.AssertUtils.check(t.validateUUID(null==i?void 0:i.agentSessionId),n,"agentSessionId is not a valid UUID"),e.AssertUtils.check(t.validateChannelType(null==i?void 0:i.channelType),n,"channelType is not a valid channel type"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.type),n,"type is not a valid string"),void 0!==(null==i?void 0:i.trackingId)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.trackingId),n,"trackingId is not a valid string")},t.validateDialerTasks=(i,n)=>{(null==i?void 0:i.id)&&e.AssertUtils.check(t.validateUUID(i.id),n,"id is not a valid UUID"),e.AssertUtils.check(t.validateUUID(null==i?void 0:i.entryPointId),n,"entryPointId is not a valid UUID"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.destination),n,"destination is null or empty"),e.AssertUtils.check(t.validateUUID(null==i?void 0:i.direction),n,"direction is not a valid UUID"),(null==i?void 0:i.origin)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.origin),n,"origin is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.attributes.key),n,"attributes.key is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.attributes.value),n,"attributes.value is null or empty"),e.AssertUtils.check(t.validateMediaType(null==i?void 0:i.mediaType),n,"mediaType is not a valid media type"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.outboundType),n,"outboundType is null or empty")},t.validatePreviewCampaignPayload=(i,n)=>{e.AssertUtils.check(t.validateUUID(null==i?void 0:i.interactionId),n,"interactionId is not a valid UUID"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.campaignId),n,"campaignId is null or empty")},t.validateMonitoringRequest=(i,n)=>{e.AssertUtils.check(t.validateUUID(null==i?void 0:i.id),n,"id is not a valid UUID"),e.AssertUtils.check(t.validateMonitorType(null==i?void 0:i.monitorType),n,"monitorType is not a valid monitor type"),void 0!==(null==i?void 0:i.queueIds)&&i.queueIds.forEach(i=>{e.AssertUtils.check(t.validateUUID(i),n,"queueIds is not a valid UUID")}),void 0!==(null==i?void 0:i.teams)&&i.teams.forEach(i=>{e.AssertUtils.check(t.validateUUID(i),n,"team is not a valid UUID")}),void 0!==(null==i?void 0:i.sites)&&i.sites.forEach(i=>{e.AssertUtils.check(t.validateUUID(i),n,"site is not a valid UUID")}),void 0!==(null==i?void 0:i.agents)&&i.agents.forEach(i=>{e.AssertUtils.check(t.validateUUID(i),n,"agent is not a valid UUID")}),void 0!==(null==i?void 0:i.startUTCTimestamp)&&e.AssertUtils.check(t.validateUTCTimeStampNumberFormat(i.startUTCTimestamp),n,"startUTCTimestamp is not a valid timestamp"),void 0!==(null==i?void 0:i.continuousDuration)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.continuousDuration),n,"continuousDuration is not a valid string or not undefined"),void 0!==(null==i?void 0:i.taskId)&&e.AssertUtils.check(t.validateUUID(i.taskId),n,"taskId is not a valid UUID"),e.AssertUtils.check(t.validateUUID(null==i?void 0:i.trackingId),n,"trackingId is not a valid UUID"),(null==i?void 0:i.invisibleMode)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.invisibleMode),n,"invisibleMode is not a valid string or not undefined")},t.validateMultiConsultPayload=(r,o)=>{r&&Object.entries(r).forEach(([r,a])=>{switch(r){case"agentId":e.AssertUtils.check(t.validateUUID(String(a)),o,`agentId ${i}`);break;case"destAgentId":e.AssertUtils.check(t.validateUUID(String(a)),o,`destAgentId ${i}`);break;case"mediaType":e.AssertUtils.check(t.validateMediaType(a),o,n);break;case"holdParticipants":e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(a),o,"holdParticipants is not valid");break;case"destAgentDN":e.AssertUtils.check(t.validateStringNumberOnly(String(a)),o,"destAgentDN is not a numbers only string");break;case"destinationType":e.AssertUtils.check(t.validateDestinationType(a),o,s);break;case"destAgentTeamId":e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(String(a)),o,"destAgentTeamId is not a valid string");break;case"destSiteId":e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(String(a)),o,"destSiteId is not a valid string");break;case"queueId":e.AssertUtils.check(t.validateUUID(String(a)),o,`queueId ${i}`);break;case"trackingId":e.AssertUtils.check(t.validateUUID(String(a)),o,"trackingId is not a valid string")}})}}(j||(j={}));var q=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const F="interactionId is not a valid UUID";class ${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(Number(e))}accept(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"accept",F),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.accept(t)})}consultAccept(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultAccept",F),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultAccept(t)})}buddyAgents(e){var t;return q(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(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"end",F),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.end(t)})}consultEnd(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultEnd",F),e.AssertUtils.check(j.validateBoolean(t.isConsult),"consultEnd","isConsult is not a valid boolean value"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultEnd(t)})}cancelCtq(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"cancelCtq",F),j.validateCancelCtq(t.data,"cancelCtq"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.cancelCtq(t)})}wrapup(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"wrapup",F),j.validateWrapupPayload(t.data,"wrapup"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.wrapup(t)})}vteamTransfer(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"vteamTransfer",F),j.validateVTeamTransferPayload(t.data,"vteamTransfer"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.vteamTransfer(t)})}blindTransfer(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"blindTransfer",F),j.validateBlindTransferPayload(t.data,"blindTransfer"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.blindTransfer(t)})}hold(t){var i,n;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"hold",F),e.AssertUtils.check(j.validateUUID(null===(i=t.data)||void 0===i?void 0:i.mediaResourceId),"hold","mediaResourceId is not a valid UUID"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.hold(t)})}unHold(t){var i,n;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"unHold",F),e.AssertUtils.check(j.validateUUID(null===(i=t.data)||void 0===i?void 0:i.mediaResourceId),"unHold","mediaResourceId is not a valid UUID"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.unHold(t)})}consult(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consult",F),e.AssertUtils.check(j.validateURL(t.url),"consult","url is not a valid URL"),j.validateMultiConsultPayload(t.data,"consult"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consult(t)})}consultConference(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultConference",F),j.validateConsultPayload(t.data,"consultConference"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultConference(t)})}decline(t){var i,n;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"decline","ERROR_INTERACTION_ID_INVALID"),e.AssertUtils.check(j.validateUUID(null===(i=t.data)||void 0===i?void 0:i.mediaResourceId),"decline","mediaResourceId is not a valid UUID"),e.AssertUtils.check(j.validateBoolean(t.isConsult),"decline","isConsult is not a valid boolean value"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.decline(t)})}consultTransfer(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"decline","ERROR_INTERACTION_ID_INVALID"),j.validateConsultTransferPayLoad(t.data,"consultTransfer"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultTransfer(t)})}vteamList(e){var t;return q(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(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"pauseRecording","ERROR_INTERACTION_ID_INVALID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.pauseRecording(t)})}resumeRecording(t){var i,n;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"resumeRecording","ERROR_INTERACTION_ID_INVALID"),e.AssertUtils.check(j.validateBoolean(null===(i=t.data)||void 0===i?void 0:i.autoResumed),"resumeRecording","autoResumed is not a valid boolean value"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.resumeRecording(t)})}acceptV2(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"acceptV2","ERROR_INTERACTION_ID_INVALID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.acceptV2(t)})}endV2(t){var i,n;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"endV2","ERROR_INTERACTION_ID_INVALID"),t.isEndingFromNonPrimary&&e.AssertUtils.check(j.validateBoolean(t.isEndingFromNonPrimary),"endV2","isEndingFromNonPrimary is not a valid boolean value"),(null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.endV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.endV2(t):void 0})}cancelTaskV2(t){var i,n;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"cancelTaskV2","ERROR_INTERACTION_ID_INVALID"),(null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.cancelTaskV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.cancelTaskV2(t):void 0})}pauseRecordingV2(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"pauseRecordingV2","ERROR_INTERACTION_ID_INVALID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.pauseRecordingV2(t)})}resumeRecordingV2(t){var i,n;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"resumeRecordingV2","ERROR_INTERACTION_ID_INVALID"),e.AssertUtils.check(j.validateBoolean(null===(i=t.data)||void 0===i?void 0:i.autoResumed),"resumeRecordingV2","autoResumed is not a valid boolean value"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.resumeRecordingV2(t)})}wrapupV2(t){var i,n;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"wrapupV2","ERROR_INTERACTION_ID_INVALID"),j.validateWrapUpV2Payload(t.data,"wrapupV2"),(null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.wrapupV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.wrapupV2(t):void 0})}consultV2(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultV2","ERROR_INTERACTION_ID_INVALID"),j.validateConsultDataV2Payload(t.data,"consultV2"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultV2(t)})}consultEndV2(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultEndV2","ERROR_INTERACTION_ID_INVALID"),e.AssertUtils.check(j.validateBoolean(t.isConsult),"consultEndV2","isConsult is not a valid boolean value"),t.isSecondaryEpDnAgent&&e.AssertUtils.check(j.validateBoolean(t.isSecondaryEpDnAgent),"consultEndV2","isSecondaryEpDnAgent is not a valid boolean value"),t.queueId&&e.AssertUtils.check(j.validateUUID(t.queueId),"consultEndV2","queueId is not a valid UUID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultEndV2(t)})}consultConferenceV2(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultConferenceV2","ERROR_INTERACTION_ID_INVALID"),j.validateConsultConferenceDataV2Payload(t.data,"consultConferenceV2"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultConferenceV2(t)})}exitConference(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"exitConference","ERROR_INTERACTION_ID_INVALID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.exitConference(t)})}consultTransferV2(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultTransferV2","ERROR_INTERACTION_ID_INVALID"),j.validateTransferV2Payload(t.data,"consultTransferV2"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultTransferV2(t)})}blindTransferV2(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"blindTransferV2","ERROR_INTERACTION_ID_INVALID"),j.validateTransferV2Payload(t.data,"blindTransferV2"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.blindTransferV2(t)})}vteamTransferV2(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"vteamTransferV2","ERROR_INTERACTION_ID_INVALID"),j.validateTransferV2Payload(t.data,"vteamTransferV2"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.vteamTransferV2(t)})}buddyAgentsV2(e){var t;return q(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)})}dropConferenceParticipant(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"dropConferenceParticipant","ERROR_INTERACTION_ID_INVALID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.dropConferenceParticipant(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 z=i(t,"[AgentContact JSAPI] =>"),B=i(z,"[AqmServiceEvents: Contact] => ");var H=s(322),W=s.n(H),J=s(497),Z=s.n(J),G=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const K={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 Y{stateChangeByChannelType(e){throw new Error("Method not implemented.")}checkService(){return this.serviceChecker.check(this.SERVICE)}emit(e,...t){this.emitter.emit(e,...t)}update(e){const t=Object.keys(e).reduce((t,i)=>{const n=e[i],s=this.latestData[i];return JSON.stringify(n)!==JSON.stringify(s)&&t.push({name:i,value:n,oldValue:s}),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({},K),this.logger=e.logger,this.serviceChecker=e.serviceChecker}static findTeamName(e,t){const i=e.find(e=>e.teamId===t);return(null==i?void 0:i.teamName)||""}init(e){return G(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({},K)),this.logger.info("Cleaned")}fetchLatestData(){var e,t,i,n,s,r,o;return G(this,void 0,void 0,function*(){const a=(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===(i=this.SERVICE)||void 0===i?void 0:i.conf.fetchProfile();if(a){const{teams:e,agentName:t,agentProfileID:i,defaultDn:l,agentSubStatus:c,agentStatus:u,idleCodes:d,wrapupCodes:h,dialPlan:f,isOutboundEnabledForTenant:p,isOutboundEnabledForAgent:g,isAdhocDialingEnabled:m,isEndCallEnabled:v,isEndConsultEnabled:y,allowConsultToQueue:E,isAgentAvailableAfterOutdial:S,isCampaignManagementEnabled:b,agentPersonalStatsEnabled:w}=a;let{idleCode:k}=a;const I=l;let A=u,C=c;if(this.teams=e,null==d||d.forEach(e=>{this.idleCodes[e.id]={id:e.id,name:e.name}}),!k||!(null===(n=this.SERVICE)||void 0===n?void 0:n.conf.isReloginSuccess)){const e=yield null===(s=this.SERVICE)||void 0===s?void 0:s.aqm.agent.reload();(null==e?void 0:e.data)&&(k="0"!==e.data.auxCodeId&&e.data.auxCodeId?this.idleCodes[e.data.auxCodeId]:void 0,A=null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.status,C=null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.subStatus)}const O=Y.getOutdialRegex(f);this.update({agentName:t,agentProfileID:i,dn:I,status:A,subStatus:C,idleCode:k,idleCodes:d,wrapupCodes:h,outDialRegex:O,isOutboundEnabledForTenant:p,isOutboundEnabledForAgent:g,isAdhocDialingEnabled:m,isEndCallEnabled:v,isEndConsultEnabled:y,allowConsultToQueue:E,isAgentAvailableAfterOutdial:S,isCampaignManagementEnabled:b,agentPersonalStatsEnabled:w})}})}subscribeSelfDataEvents(){var e,t,i,n,s,r;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:i="",status:n="",subStatus:s="",auxCodeId:r=""}})=>{const o=Y.findTeamName(this.teams,t);this.update({agentSessionId:e,teamId:t,teamName:o,dn:i,status:n,subStatus:s,idleCode:this.idleCodes[r]})});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:i="",subStatus:n="",auxCodeId:s=""}})=>{const r=Y.findTeamName(this.teams,t);this.update({agentSessionId:e,teamId:t,teamName:r,status:i,subStatus:n,idleCode:this.idleCodes[s]})});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.agent.eAgentStateChangeSuccess.listen(({data:{agentSessionId:e="",status:t="",subStatus:i="",auxCodeId:n=""}})=>{var s;const r=this.idleCodes?null===(s=this.idleCodes[n])||void 0===s?void 0:s.name:"";this.update({agentSessionId:e,status:t,subStatus:i,idleCode:{id:n,name:r}})});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.agent.eAgentDNRegistered.listen(({data:{dn:e=""}})=>{this.update({dn:e})});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(s=this.SERVICE)||void 0===s?void 0:s.aqm.agent.eAgentChannelReloginSuccess.listen(e=>{this.emit("eAgentChannelReloginSuccess",e)});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(r=this.SERVICE)||void 0===r?void 0:r.aqm.agent.eAgentChannelStateChanged.listen(e=>{this.emit("eAgentChannelStateChanged",e)});this.listeners.add(()=>null==e?void 0:e.stopListen())}}}unsubscribeSelfDataEvents(){this.listeners.forEach(e=>e()),this.listeners.clear()}stateChange(t){var i,n,s;return G(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.state),"stateChange","state is null or empty"),e.AssertUtils.check("available"===(null===(i=t.state)||void 0===i?void 0:i.toLowerCase())||"idle"===(null===(n=t.state)||void 0===n?void 0:n.toLowerCase()),"stateChange","state is not Available or Idle"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.auxCodeIdArray),"stateChange","auxCodeIdArray is null or empty"),null===(s=this.SERVICE)||void 0===s?void 0:s.aqm.agent.stateChange({data:t})})}stateChangeV2(i){var n;return G(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(i.state),"stateChange","state is null or empty"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(i.auxCodeId),"stateChange","auxCodeId is null or empty"),e.AssertUtils.check(j.validateStateChannelType(i.channelType),"stateChange","channelType is null or empty or invalid"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.agent.stateChangeV2({data:i});t.info("stateChangeV2 - Service is not available")})}mockOutdialAniList(){var e,t;return G(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 G(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(t,i){var n;return G(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t),"changeAgentState","orgId is not a valid UUID"),j.validateChangeAgentStateType(i,"changeAgentState"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.supervisor.changeAgentState({orgId:t,data:i})})}fetchAgentIdleCodes(t,i){var n;return G(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t),"fetchAgentIdleCodes","orgId is not a valid UUID"),e.AssertUtils.check(j.validateUUID(i),"fetchAgentIdleCodes","agentId is not a valid UUID"),yield null===(n=this.SERVICE)||void 0===n?void 0:n.abs.fetchAgentIdleCodes({orgId:t,agentId:i})})}fetchOrganizationIdleCodes(t){var i;return G(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t),"fetchOrganizationIdleCodes","orgId is not a valid UUID"),yield null===(i=this.SERVICE)||void 0===i?void 0:i.abs.fetchIdleCodes({orgId:t,accessType:"ALL"})})}addEventListener(e,t){this.checkService()&&this.emitter.on(e,t)}removeEventListener(e,t){this.checkService()&&this.emitter.off(e,t)}removeAllEventListeners(){Z()(this.emitter)}}const X=i(t,"[AgentInfo JSAPI] =>");var Q=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const ee=1e3/30;class te{waitUntil(e){return Q(this,void 0,void 0,function*(){"function"==typeof e&&(yield new Promise(e=>setTimeout(e,ee)),!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",t.info(`CRm Connector registered through JS SDK... [crmPlatform: ${this.initEventType.crmPlatform}, widgetProvider: ${this.initEventType.crmConnectorProvider}] `);const i=document.referrer;t.info("This Desktop is loaded inside an iframe.",i),this.publishEvent("agentx-js-sdk-register-crm-connector")}else t.warn("This Desktop is not loaded inside an iframe. CRM Connector is not registered.")}publishEvent(e){const{crmPlatform:i,crmConnectorProvider:n,widgetName:s,widgetProvider:r}=this.initEventType,o=Object.assign({},...Object.entries(this.initEventType).map(([e,t])=>t?{[e]:t}:{}));this.logger.info("initEvent",o),t.info(`Publishing js sdk init ${e} event : [widgetName: ${s}, widgetProvider: ${r}, crmPlatform: ${i}, crmConnectorProvider: ${n}]`),this.agentxSERVICE&&this.agentxSERVICE.isInited&&this.agentxSERVICE.webexMetrics&&(t.info(`tracking behavioral for ${e} event `),this.agentxSERVICE.webexMetrics.trackBehavioralEvent(e,Object.assign({},o)))}cleanup(){this.agentxSERVICE=void 0,this.emit("cleaned"),this.logger.info("Cleaned")}get clientLocale(){return void 0!==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 ie=i(t,"[Config JSAPI] =>");var ne=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};class se{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(t){var i,n,s,r,o;return ne(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"updateCadVariables","interactionId is not valid UUID"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(null===(n=null===(i=t.data)||void 0===i?void 0:i.attributes)||void 0===n?void 0:n.key),"updateCadVariables","attributes.key is not valid"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(null===(r=null===(s=t.data)||void 0===s?void 0:s.attributes)||void 0===r?void 0:r.value),"updateCadVariables","attributes.value is not valid"),t.secureCad&&t.secureCad.forEach(t=>{e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t),"updateCadVariables","secureCad is not valid")}),t.keyId&&e.AssertUtils.check(j.validateUUID(t.keyId),"updateCadVariables","keyId is not valid UUID"),t.keyVersion&&e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.keyVersion),"updateCadVariables","keyVersion is not valid"),null===(o=this.SERVICE)||void 0===o?void 0:o.aqm.dialer.updateCadVariables(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 re=i(t,"[Dialer JSAPI] =>"),oe=i(re,"[AqmServiceEvents: Dialer] =>");class ae{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(t){return e.I18N.createService(t)}createMixin(t){return e.I18N.createMixin(t)}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(...t){return e.I18N.mergeServiceInitOptions(...t)}}const le=i(t,"[I18N JSAPI] =>");class ce{constructor(e){this.clientLoggers=new Map,this.logger=e.logger}createLogger(t){const i=(0,e.createLogger)(t);return this.clientLoggers.set(t,i),this.logger.info(`Client logger created: "${t}"`),i}cleanupLogs(t){this.clientLoggers.has(t)&&e.Logger.POOL.cleanupPrefixedLogs(t)}browserDownloadLogsJson(t){this.clientLoggers.has(t)&&e.Logger.POOL.browserDownloadPrefixedLogsJson(t)}browserDownloadLogsText(t){this.clientLoggers.has(t)&&e.Logger.POOL.browserDownloadPrefixedLogsText(t)}getLogsCollection(t){if(this.clientLoggers.has(t))return e.Logger.POOL.getPrefixedLogsCollection(t)}getLogsJsonUrl(t){if(this.clientLoggers.has(t))return e.Logger.POOL.getPrefixedLogsJsonUrl(t)}getLogsTextUrl(t){if(this.clientLoggers.has(t))return e.Logger.POOL.getPrefixedLogsTextUrl(t)}}const ue=i(t,"[Logger JSAPI] =>");class de{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 he=i(t,"[ScreenPop JSAPI] =>"),fe=i(he,"[AqmServiceEvents: ScreenPop] =>");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("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 ge=i(t,"[ShortcutKey JSAPI] =>");var me=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const ve=1e3/30;class ye{waitUntil(e){return me(this,void 0,void 0,function*(){"function"==typeof e&&(yield new Promise(e=>setTimeout(e,ve)),!e()&&(yield this.waitUntil(e)))})}checkService(){var e,t,i,n,s;return me(this,void 0,void 0,function*(){window.wxcc&&(null===(e=window.wxcc)||void 0===e?void 0:e.rtdwc)?((null===(i=null===(t=window.wxcc)||void 0===t?void 0:t.rtdwc)||void 0===i?void 0:i.error)&&(this.logger.error("RTDWC initialization failed. Awaiting Websocket connection to establish",null===(s=null===(n=window.wxcc)||void 0===n?void 0:n.rtdwc)||void 0===s?void 0:s.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 me(this,void 0,void 0,function*(){yield this.checkService(),this.logger.info("rtdwc initialized")})}subscribe({datasetName:e,update:t,error:i}){var n,s;return me(this,void 0,void 0,function*(){return yield this.checkService(),null===(s=null===(n=window.wxcc)||void 0===n?void 0:n.rtdwc)||void 0===s?void 0:s.subscribe({datasetName:e,update:t,error:i})})}}const Ee=i(t,"[RTDWC JSAPI] =>");var Se=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const be="interactionId is not valid UUID";class we{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,i;return Se(this,void 0,void 0,function*(){if(this.checkService())return j.validateMonitoringRequest(e.data,"startMonitoring"),null===(i=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===i?void 0:i.startMonitoring(e)})}endMonitoring(t){var i,n;return Se(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"endMonitoring",be),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.supervisor)||void 0===n?void 0:n.endMonitoring(t)})}holdMonitoring(t){var i,n;return Se(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"holdMonitoring",be),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.supervisor)||void 0===n?void 0:n.holdMonitoring(t)})}unHoldMonitoring(t){var i,n;return Se(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"unHoldMonitoring",be),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.supervisor)||void 0===n?void 0:n.unHoldMonitoring(t)})}bargeIn(t){var i,n;return Se(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"bargeIn",be),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.supervisor)||void 0===n?void 0:n.bargeIn(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 ke=i(t,"[Call Monitoring JSAPI] =>"),Ie=i(ke,"[AqmServiceEvents: Call Monitoring] =>");class Ae{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 i;if(this.checkService())try{t.info("[webexMetrics Internal JSAPI] => event=trackBehavioralEvent for",e),null===(i=this.SERVICE)||void 0===i||i.webexMetrics.trackBehavioralEvent(...e)}catch(e){t.error("[webexMetrics Internal JSAPI] => event=trackBehavioralEvent Error",e)}}}const Ce=i(t,"[webexMetrics Internal JSAPI] =>");var Oe=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};class Te{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(t){var i,n;return Oe(this,void 0,void 0,function*(){if(!this.checkService())return;const s=yield $e.actions.getTaskMap();if(0!==(null==s?void 0:s.size))throw new Error("You cannot sign out now because you have active conversations. Complete them and try again.");return void 0!==t.data.logoutReason&&e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.data.logoutReason),"desktopLogout","logoutReason is null or empty"),void 0!==t.data.logoutReason&&e.AssertUtils.check("user requested logout"===t.data.logoutReason.toLowerCase()||"inactivity Logout"===t.data.logoutReason.toLowerCase(),"desktopLogout","logoutReason should be either 'User requested logout' or 'Inactivity Logout'"),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.agent)||void 0===n?void 0:n.logout(t)})}signoutAgent(i){var n,s;return Oe(this,void 0,void 0,function*(){if(this.checkService())try{return t.info("[App:TPW] event=signoutAgentBySupervisor for agent ",i.data.agentId),e.AssertUtils.check(j.validateUUID(i.orgId),"signoutAgent","orgId is not a valid UUID"),e.AssertUtils.check(j.validateUUID(i.data.agentId),"signoutAgent","agentId is not a valid UUID"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(i.data.logoutReason),"signoutAgent","logoutReason is null or empty"),null===(s=null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.supervisor)||void 0===s?void 0:s.signoutAgent(i)}catch(e){return void t.error("[App:TPW] event=signoutAgentBySupervisorFailed for agent ",i.data.agentId,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=i(t,"[Station Logout JSAPI] =>"),Ne=i(Re,"[AqmServiceEvents: Call Monitoring] =>");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){var t,i;e&&(this.SERVICE=e),this.checkService()?(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.aiAssistant,aqmServiceEntityString:"SERVICE.aqm.aiAssistant"}),this.logger.info("AiAssistantJsApi inited.")):null===(i=(t=this.logger).warn)||void 0===i||i.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 xe=i(t,"[AI Assistant JSAPI] =>"),De=i(xe,"[AqmServiceEvents: AiAssistant] =>");class Ue{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,i;e&&(this.SERVICE=e),this.checkService()?(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.dataNotifs.aiAssistant,aqmServiceEntityString:"SERVICE.dataNotifs.aiAssistant"}),this.logger.info("AiAssistantJsApi inited.")):null===(i=(t=this.logger).warn)||void 0===i||i.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 Pe=i(t,"[AI Assistant JSAPI] =>"),Ve=i(Pe,"[AqmServiceEvents: AiAssistant] =>");var _e=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};class Me{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(t){var i,n;return _e(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.startTime),"fetchTasks","startTime is null or empty"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.endTime),"fetchTasks","endTime is null or empty"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.pageNumber),"fetchTasks","pageNumber is null or empty"),e.AssertUtils.check(j.validateNumber(t.startTime),"fetchTasks","startTime is not a valid time"),e.AssertUtils.check(j.validateNumber(t.endTime),"fetchTasks","endTime is not a valid time"),e.AssertUtils.check(j.validateNumber(t.pageNumber),"fetchTasks","pageNumber is not a valid number"),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.qmw)||void 0===n?void 0:n.fetchTasks(t)})}fetchCapture(t){var i,n;return _e(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.taskId),"fetchCapture","taskId is not a valid UUID"),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.qmw)||void 0===n?void 0:n.fetchCapture(t)})}}const je=i(t,"[PI JSAPI] =>");class qe{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,i,n,s,r,o;return n=this,s=void 0,o=function*(){if(this.checkService())return j.validateAuxCodePayload(e,"fetchPaginatedAuxCodes"),yield null===(i=null===(t=this.SERVICE)||void 0===t?void 0:t.abs)||void 0===i?void 0:i.fetchPaginatedAuxCodes(e)},new((r=void 0)||(r=Promise))(function(e,t){function i(e){try{l(o.next(e))}catch(e){t(e)}}function a(e){try{l(o.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r(function(e){e(n)})).then(i,a)}l((o=o.apply(n,s||[])).next())})}}const Fe=i(t,"[AGENT CONFIG JSAPI] =>"),$e=(()=>{AGENTX_SERVICE?t.info('Found global "AGENTX_SERVICE"!'):t.error('Missed global "AGENTX_SERVICE"...');const e=(i=AGENTX_SERVICE,new te({logger:ie,SERVICE:i}));var i;const n=new ce({logger:ue}),s=new pe({logger:ge,serviceChecker:o({logger:ge})}),r=new T({logger:R,serviceChecker:o({logger:R})}),a=new Y({logger:X,serviceChecker:o({logger:X})}),l=new $({logger:z,serviceChecker:o({logger:z}),aqmEvents:L({logger:B})}),c=new se({logger:re,aqmEvents:L({logger:oe}),serviceChecker:o({logger:re})}),u=new we({logger:ke,aqmEvents:L({logger:Ie}),serviceChecker:o({logger:ke})}),d=new de({logger:he,aqmEvents:L({logger:fe}),serviceChecker:o({logger:he})}),h=new Te({logger:Re,aqmEvents:L({logger:Ne}),serviceChecker:o({logger:Re})}),f=new Le({logger:xe,aqmEvents:L({logger:De}),serviceChecker:o({logger:xe})}),p=new Ue({logger:Pe,aqmEvents:L({logger:Ve}),serviceChecker:o({logger:Pe})}),g=new ae({logger:le,serviceChecker:o({logger:le})}),m=new ye({logger:Ee});m.init();const v=new Me({logger:je,serviceChecker:o({logger:je})}),y=new qe({logger:Fe,serviceChecker:o({logger:Fe})}),E=new Ae({logger:Ce,serviceChecker:o({logger:Ce})});return e.addEventListener("inited",()=>{l.init(AGENTX_SERVICE),a.init(AGENTX_SERVICE),c.init(AGENTX_SERVICE),u.init(AGENTX_SERVICE),d.init(AGENTX_SERVICE),h.init(AGENTX_SERVICE),f.init(AGENTX_SERVICE),p.init(AGENTX_SERVICE),v.init(AGENTX_SERVICE),s.init(AGENTX_SERVICE),r.init(AGENTX_SERVICE),g.init(AGENTX_SERVICE),y.init(AGENTX_SERVICE),E.init(AGENTX_SERVICE)}),e.addEventListener("cleaned",()=>{l.cleanup(),a.cleanup(),c.cleanup(),u.cleanup(),d.cleanup(),h.cleanup(),f.cleanup(),p.cleanup(),v.cleanup(),s.cleanup(),g.cleanup(),r.cleanup(),y.cleanup(),E.cleanup()}),{config:e,logger:n,monitoring:u,shortcutKey:s,actions:r,agentContact:l,agentStateInfo:a,dialer:c,screenpop:d,aiAssistant:f,dataNotifsAiAssistant:p,i18n:g,rtdwc:m,postInteractions:v,logout:h,agentConfigJsApi:y,webexMetricsInternal:E}})()})(),r})());
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("WxccDesktopSDK",[],t):"object"==typeof exports?exports.WxccDesktopSDK=t():e.WxccDesktopSDK=t()}(Object("undefined"!=typeof self?self:this),()=>(()=>{var e,t,i={911(e,t,i){var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==i.g&&i.g,s=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var i=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==i&&i,n="URLSearchParams"in i,s="Symbol"in i&&"iterator"in Symbol,r="FileReader"in i&&"Blob"in i&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in i,a="ArrayBuffer"in i;if(a)var l=["[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&&l.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return s&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?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 p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function g(e){return new Promise(function(t,i){e.onload=function(){t(e.result)},e.onerror=function(){i(e.error)}})}function m(e){var t=new FileReader,i=g(t);return t.readAsArrayBuffer(e),i}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,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():a&&r&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=v(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=p(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?p(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(m)}),this.text=function(){var e,t,i,n=p(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,i=g(t=new FileReader),t.readAsText(e),i;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),i=new Array(t.length),n=0;n<t.length;n++)i[n]=String.fromCharCode(t[n]);return i.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}f.prototype.append=function(e,t){e=u(e),t=d(t);var i=this.map[e];this.map[e]=i?i+", "+t:t},f.prototype.delete=function(e){delete this.map[u(e)]},f.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},f.prototype.set=function(e,t){this.map[u(e)]=d(t)},f.prototype.forEach=function(e,t){for(var i in this.map)this.map.hasOwnProperty(i)&&e.call(t,this.map[i],i,this)},f.prototype.keys=function(){var e=[];return this.forEach(function(t,i){e.push(i)}),h(e)},f.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),h(e)},f.prototype.entries=function(){var e=[];return this.forEach(function(t,i){e.push([i,t])}),h(e)},s&&(f.prototype[Symbol.iterator]=f.prototype.entries);var E=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function S(e,t){if(!(this instanceof S))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var i,n,s=(t=t||{}).body;if(e instanceof S){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new f(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,s||null==e._bodyInit||(s=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 f(t.headers)),this.method=(n=(i=t.method||this.method||"GET").toUpperCase(),E.indexOf(n)>-1?n:i),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&s)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(s),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var r=/([?&])_=[^&]*/;r.test(this.url)?this.url=this.url.replace(r,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function b(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var i=e.split("="),n=i.shift().replace(/\+/g," "),s=i.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(s))}}),t}function w(e,t){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}S.prototype.clone=function(){return new S(this,{body:this._bodyInit})},y.call(S.prototype),y.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var k=[301,302,303,307,308];w.redirect=function(e,t){if(-1===k.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=i.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var i=Error(e);this.stack=i.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function I(e,n){return new Promise(function(s,o){var l=new S(e,n);if(l.signal&&l.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function u(){c.abort()}c.onload=function(){var e,t,i={status:c.status,statusText:c.statusText,headers:(e=c.getAllResponseHeaders()||"",t=new f,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var i=e.split(":"),n=i.shift().trim();if(n){var s=i.join(":").trim();t.append(n,s)}}),t)};i.url="responseURL"in c?c.responseURL:i.headers.get("X-Request-URL");var n="response"in c?c.response:c.responseText;setTimeout(function(){s(new w(n,i))},0)},c.onerror=function(){setTimeout(function(){o(new TypeError("Network request failed"))},0)},c.ontimeout=function(){setTimeout(function(){o(new TypeError("Network request failed"))},0)},c.onabort=function(){setTimeout(function(){o(new t.DOMException("Aborted","AbortError"))},0)},c.open(l.method,function(e){try{return""===e&&i.location.href?i.location.href:e}catch(t){return e}}(l.url),!0),"include"===l.credentials?c.withCredentials=!0:"omit"===l.credentials&&(c.withCredentials=!1),"responseType"in c&&(r?c.responseType="blob":a&&l.headers.get("Content-Type")&&-1!==l.headers.get("Content-Type").indexOf("application/octet-stream")&&(c.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof f?l.headers.forEach(function(e,t){c.setRequestHeader(t,e)}):Object.getOwnPropertyNames(n.headers).forEach(function(e){c.setRequestHeader(e,d(n.headers[e]))}),l.signal&&(l.signal.addEventListener("abort",u),c.onreadystatechange=function(){4===c.readyState&&l.signal.removeEventListener("abort",u)}),c.send(void 0===l._bodyInit?null:l._bodyInit)})}I.polyfill=!0,i.fetch||(i.fetch=I,i.Headers=f,i.Request=S,i.Response=w),t.Headers=f,t.Request=S,t.Response=w,t.fetch=I}({})}(s),s.fetch.ponyfill=!0,delete s.fetch.polyfill;var r=n.fetch?n:s;(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},913(e,t,i){"use strict";var n=i(265),s=i(131),r=i(186),o=i(206),a=i(748),l=e.exports=function(e,t){var i,s,l,c,u;return arguments.length<2||"string"!=typeof e?(c=t,t=e,e=null):c=arguments[2],n(e)?(i=a.call(e,"c"),s=a.call(e,"e"),l=a.call(e,"w")):(i=l=!0,s=!1),u={value:t,configurable:i,enumerable:s,writable:l},c?r(o(c),u):u};l.gs=function(e,t,i){var l,c,u,d;return"string"!=typeof e?(u=i,i=t,t=e,e=null):u=arguments[3],n(t)?s(t)?n(i)?s(i)||(u=i,i=void 0):i=void 0:(u=t,t=i=void 0):t=void 0,n(e)?(l=a.call(e,"c"),c=a.call(e,"e")):(l=!0,c=!1),d={get:t,set:i,configurable:l,enumerable:c},u?r(o(u),d):d}},441(e){"use strict";e.exports=function(){}},186(e,t,i){"use strict";e.exports=i(665)()?Object.assign:i(573)},665(e){"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")}},573(e,t,i){"use strict";var n=i(555),s=i(856),r=Math.max;e.exports=function(e,t){var i,o,a,l=r(arguments.length,2);for(e=Object(s(e)),a=function(n){try{e[n]=t[n]}catch(e){i||(i=e)}},o=1;o<l;++o)n(t=arguments[o]).forEach(a);if(void 0!==i)throw i;return e}},658(e,t,i){"use strict";var n=i(136),s={function:!0,object:!0};e.exports=function(e){return n(e)&&s[typeof e]||!1}},136(e,t,i){"use strict";var n=i(441)();e.exports=function(e){return e!==n&&null!==e}},555(e,t,i){"use strict";e.exports=i(98)()?Object.keys:i(954)},98(e){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},954(e,t,i){"use strict";var n=i(136),s=Object.keys;e.exports=function(e){return s(n(e)?Object(e):e)}},206(e,t,i){"use strict";var n=i(136),s=Array.prototype.forEach,r=Object.create;e.exports=function(e){var t=r(null);return s.call(arguments,function(e){n(e)&&function(e,t){var i;for(i in e)t[i]=e[i]}(Object(e),t)}),t}},805(e){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},666(e,t,i){"use strict";var n=i(658);e.exports=function(e){if(!n(e))throw new TypeError(e+" is not an Object");return e}},856(e,t,i){"use strict";var n=i(136);e.exports=function(e){if(!n(e))throw new TypeError("Cannot use null or undefined");return e}},748(e,t,i){"use strict";e.exports=i(875)()?String.prototype.contains:i(339)},875(e){"use strict";var t="razdwatrzy";e.exports=function(){return"function"==typeof t.contains&&!0===t.contains("dwa")&&!1===t.contains("foo")}},339(e){"use strict";var t=String.prototype.indexOf;e.exports=function(e){return t.call(this,e,arguments[1])>-1}},497(e,t,i){"use strict";var n=i(666),s=Object.prototype.hasOwnProperty;e.exports=function(e){var t,i=arguments[1];if(n(e),void 0===i)s.call(e,"__ee__")&&delete e.__ee__;else{if(!(t=s.call(e,"__ee__")&&e.__ee__))return;t[i]&&delete t[i]}}},322(e,t,i){"use strict";var n,s,r,o,a,l,c,u=i(913),d=i(805),h=Function.prototype.apply,f=Function.prototype.call,p=Object.create,g=Object.defineProperty,m=Object.defineProperties,v=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};s=function(e,t){var i,s;return d(t),s=this,n.call(this,e,i=function(){r.call(s,e,i),h.call(t,this,arguments)}),i.__eeOnceListener__=t,this},o=function(e){var t,i,n,s,r;if(v.call(this,"__ee__")&&(s=this.__ee__[e]))if("object"==typeof s){for(i=arguments.length,r=new Array(i-1),t=1;t<i;++t)r[t-1]=arguments[t];for(s=s.slice(),t=0;n=s[t];++t)h.call(n,this,r)}else switch(arguments.length){case 1:f.call(s,this);break;case 2:f.call(s,this,arguments[1]);break;case 3:f.call(s,this,arguments[1],arguments[2]);break;default:for(i=arguments.length,r=new Array(i-1),t=1;t<i;++t)r[t-1]=arguments[t];h.call(s,this,r)}},a={on:n=function(e,t){var i;return d(t),v.call(this,"__ee__")?i=this.__ee__:(i=y.value=p(null),g(this,"__ee__",y),y.value=null),i[e]?"object"==typeof i[e]?i[e].push(t):i[e]=[i[e],t]:i[e]=t,this},once:s,off:r=function(e,t){var i,n,s,r;if(d(t),!v.call(this,"__ee__"))return this;if(!(i=this.__ee__)[e])return this;if("object"==typeof(n=i[e]))for(r=0;s=n[r];++r)s!==t&&s.__eeOnceListener__!==t||(2===n.length?i[e]=n[r?0:1]:n.splice(r,1));else n!==t&&n.__eeOnceListener__!==t||delete i[e];return this},emit:o},l={on:u(n),once:u(s),off:u(r),emit:u(o)},c=m({},l),e.exports=t=function(e){return null==e?p(c):m(Object(e),l)},t.methods=a},545(e){"use strict";const t=e=>"string"==typeof e,i=()=>{let e,t;const i=new Promise((i,n)=>{e=i,t=n});return i.resolve=e,i.reject=t,i},n=e=>null==e?"":""+e,s=/###/g,r=e=>e&&e.indexOf("###")>-1?e.replace(s,"."):e,o=e=>!e||t(e),a=(e,i,n)=>{const s=t(i)?i.split("."):i;let a=0;for(;a<s.length-1;){if(o(e))return{};const t=r(s[a]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++a}return o(e)?{}:{obj:e,k:r(s[a])}},l=(e,t,i)=>{const{obj:n,k:s}=a(e,t,Object);if(void 0!==n||1===t.length)return void(n[s]=i);let r=t[t.length-1],o=t.slice(0,t.length-1),l=a(e,o,Object);for(;void 0===l.obj&&o.length;)r=`${o[o.length-1]}.${r}`,o=o.slice(0,o.length-1),l=a(e,o,Object),l&&l.obj&&void 0!==l.obj[`${l.k}.${r}`]&&(l.obj=void 0);l.obj[`${l.k}.${r}`]=i},c=(e,t)=>{const{obj:i,k:n}=a(e,t);if(i)return i[n]},u=(e,i,n)=>{for(const s in i)"__proto__"!==s&&"constructor"!==s&&(s in e?t(e[s])||e[s]instanceof String||t(i[s])||i[s]instanceof String?n&&(e[s]=i[s]):u(e[s],i[s],n):e[s]=i[s]);return e},d=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var h={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const f=e=>t(e)?e.replace(/[&<>"'\/]/g,e=>h[e]):e,p=[" ",",","?","!",";"],g=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}(20),m=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const n=t.split(i);let s=e;for(let e=0;e<n.length;){if(!s||"object"!=typeof s)return;let t,r="";for(let o=e;o<n.length;++o)if(o!==e&&(r+=i),r+=n[o],t=s[r],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&o<n.length-1)continue;e+=o-e+1;break}s=t}return s},v=e=>e&&e.replace("_","-"),y={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class E{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||y,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,i,n,s){return s&&!this.debug?null:(t(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[i](e))}create(e){return new E(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new E(this.logger,e)}}var S=new E;class b{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const i=this.observers[e].get(t)||0;this.observers[e].set(t,i+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(e=>{let[t,n]=e;for(let e=0;e<n;e++)t(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(t=>{let[n,s]=t;for(let t=0;t<s;t++)n.apply(n,[e,...i])})}}class w extends b{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,i,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,o=void 0!==s.ignoreJSONStructure?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,i],n&&(Array.isArray(n)?a.push(...n):t(n)&&r?a.push(...n.split(r)):a.push(n)));const l=c(this.data,a);return!l&&!i&&!n&&e.indexOf(".")>-1&&(e=a[0],i=a[1],n=a.slice(2).join(".")),!l&&o&&t(n)?m(this.data&&this.data[e]&&this.data[e][i],n,r):l}addResource(e,t,i,n){let s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const r=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator;let o=[e,t];i&&(o=o.concat(r?i.split(r):i)),e.indexOf(".")>-1&&(o=e.split("."),n=t,t=o[1]),this.addNamespaces(t),l(this.data,o,n),s.silent||this.emit("added",e,t,i,n)}addResources(e,i,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const s in n)(t(n[s])||Array.isArray(n[s]))&&this.addResource(e,i,s,n[s],{silent:!0});s.silent||this.emit("added",e,i,n)}addResourceBundle(e,t,i,n,s){let r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),n=i,i=t,t=o[1]),this.addNamespaces(t);let a=c(this.data,o)||{};r.skipCopy||(i=JSON.parse(JSON.stringify(i))),n?u(a,i,s):a={...a,...i},l(this.data,o,a),r.silent||this.emit("added",e,t,i)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var k={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,i,n,s){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,i,n,s))}),t}};const I={};class A extends b{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i,n;super(),i=e,n=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{i[e]&&(n[e]=i[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=S.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const i=this.resolve(e,t);return i&&void 0!==i.res}extractFromKey(e,i){let n=void 0!==i.nsSeparator?i.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const s=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let r=i.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||i.keySeparator||this.options.userDefinedNsSeparator||i.nsSeparator||((e,t,i)=>{t=t||"",i=i||"";const n=p.filter(e=>t.indexOf(e)<0&&i.indexOf(e)<0);if(0===n.length)return!0;const s=g.getRegExp(`(${n.map(e=>"?"===e?"\\?":e).join("|")})`);let r=!s.test(e);if(!r){const t=e.indexOf(i);t>0&&!s.test(e.substring(0,t))&&(r=!0)}return r})(e,n,s));if(o&&!a){const i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:t(r)?[r]:r};const o=e.split(n);(n!==s||n===s&&this.options.ns.indexOf(o[0])>-1)&&(r=o.shift()),e=o.join(s)}return{key:e,namespaces:t(r)?[r]:r}}translate(e,i,n){if("object"!=typeof i&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof i&&(i={...i}),i||(i={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const s=void 0!==i.returnDetails?i.returnDetails:this.options.returnDetails,r=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],i),l=a[a.length-1],c=i.lng||this.language,u=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(u){const e=i.nsSeparator||this.options.nsSeparator;return s?{res:`${l}${e}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${e}${o}`}return s?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:o}const d=this.resolve(e,i);let h=d&&d.res;const f=d&&d.usedKey||o,p=d&&d.exactUsedKey||o,g=Object.prototype.toString.apply(h),m=void 0!==i.joinArrays?i.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,y=!t(h)&&"boolean"!=typeof h&&"number"!=typeof h;if(!(v&&h&&y&&["[object Number]","[object Function]","[object RegExp]"].indexOf(g)<0)||t(m)&&Array.isArray(h))if(v&&t(m)&&Array.isArray(h))h=h.join(m),h&&(h=this.extendTranslation(h,e,i,n));else{let s=!1,a=!1;const u=void 0!==i.count&&!t(i.count),f=A.hasDefaultValue(i),p=u?this.pluralResolver.getSuffix(c,i.count,i):"",g=i.ordinal&&u?this.pluralResolver.getSuffix(c,i.count,{ordinal:!1}):"",m=u&&!i.ordinal&&0===i.count&&this.pluralResolver.shouldUseIntlApi(),v=m&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${p}`]||i[`defaultValue${g}`]||i.defaultValue;!this.isValidLookup(h)&&f&&(s=!0,h=v),this.isValidLookup(h)||(a=!0,h=o);const y=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:h,E=f&&v!==h&&this.options.updateMissing;if(a||s||E){if(this.logger.log(E?"updateKey":"missingKey",c,l,o,E?v:h),r){const e=this.resolve(o,{...i,keySeparator:!1});e&&e.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.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let i=0;i<t.length;i++)e.push(t[i]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);const n=(e,t,n)=>{const s=f&&n!==h?n:y;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,s,E,i):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,l,t,s,E,i),this.emit("missingKey",e,l,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&u?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,i);m&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],o+t,i[`defaultValue${t}`]||v)})}):n(e,o,v))}h=this.extendTranslation(h,e,i,d,n),a&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${l}:${o}`),(a||s)&&this.options.parseMissingKeyHandler&&(h="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,s?h:void 0):this.options.parseMissingKeyHandler(h))}else{if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,h,{...i,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return s?(d.res=e,d.usedParams=this.getUsedParamsDetails(i),d):e}if(r){const e=Array.isArray(h),t=e?[]:{},n=e?p:f;for(const e in h)if(Object.prototype.hasOwnProperty.call(h,e)){const s=`${n}${r}${e}`;t[e]=this.translate(s,{...i,joinArrays:!1,ns:a}),t[e]===s&&(t[e]=h[e])}h=t}}return s?(d.res=h,d.usedParams=this.getUsedParamsDetails(i),d):h}extendTranslation(e,i,n,s,r){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a=t(e)&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let l;if(a){const t=e.match(this.interpolator.nestingRegexp);l=t&&t.length}let c=n.replace&&!t(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,n.lng||this.language||s.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);l<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&s&&s.res&&(n.lng=this.language||s.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return r&&r[0]===t[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${t[0]} in key: ${i[0]}`),null):o.translate(...t,i)},n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,l=t(a)?[a]:a;return null!=e&&l&&l.length&&!1!==n.applyPostProcessor&&(e=k.handle(l,e,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let i,n,s,r,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(i))return;const l=this.extractFromKey(e,a),c=l.key;n=c;let u=l.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const d=void 0!==a.count&&!t(a.count),h=d&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&(t(a.context)||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);u.forEach(e=>{this.isValidLookup(i)||(o=e,!I[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(I[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${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!!!")),p.forEach(t=>{if(this.isValidLookup(i))return;r=t;const n=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(n,c,t,e,a);else{let e;d&&(e=this.pluralResolver.getSuffix(t,a.count,a));const i=`${this.options.pluralSeparator}zero`,s=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(n.push(c+e),a.ordinal&&0===e.indexOf(s)&&n.push(c+e.replace(s,this.options.pluralSeparator)),h&&n.push(c+i)),f){const t=`${c}${this.options.contextSeparator}${a.context}`;n.push(t),d&&(n.push(t+e),a.ordinal&&0===e.indexOf(s)&&n.push(t+e.replace(s,this.options.pluralSeparator)),h&&n.push(t+i))}}let o;for(;o=n.pop();)this.isValidLookup(i)||(s=o,i=this.getResource(t,e,o,a))}))})}),{res:i,usedKey:n,exactUsedKey:s,usedLng:r,usedNS:o}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,i,n):this.resourceStore.getResource(e,t,i,n)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!t(e.replace);let s=n?e.replace:e;if(n&&void 0!==e.count&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(const e of i)delete s[e]}return s}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}const C=e=>e.charAt(0).toUpperCase()+e.slice(1);class O{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=S.create("languageUtils")}getScriptPartFromCode(e){if(!(e=v(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=v(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(t(e)&&e.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let t=Intl.getCanonicalLocales(e)[0];if(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)return t}catch(e){}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(e=>e.toLowerCase()):2===i.length?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),t.indexOf(i[1].toLowerCase())>-1&&(i[1]=C(i[1].toLowerCase()))):3===i.length&&(i[0]=i[0].toLowerCase(),2===i[1].length&&(i[1]=i[1].toUpperCase()),"sgn"!==i[0]&&2===i[2].length&&(i[2]=i[2].toUpperCase()),t.indexOf(i[1].toLowerCase())>-1&&(i[1]=C(i[1].toLowerCase())),t.indexOf(i[2].toLowerCase())>-1&&(i[2]=C(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const i=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(i)||(t=i)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const i=this.getLanguagePartFromCode(e);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(e=>e===i?e:e.indexOf("-")<0&&i.indexOf("-")<0?void 0:e.indexOf("-")>0&&i.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===i||0===e.indexOf(i)&&i.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,i){if(!e)return[];if("function"==typeof e&&(e=e(i)),t(e)&&(e=[e]),Array.isArray(e))return e;if(!i)return e.default||[];let n=e[i];return n||(n=e[this.getScriptPartFromCode(i)]),n||(n=e[this.formatLanguageCode(i)]),n||(n=e[this.getLanguagePartFromCode(i)]),n||(n=e.default),n||[]}toResolveHierarchy(e,i){const n=this.getFallbackCodes(i||this.options.fallbackLng||[],e),s=[],r=e=>{e&&(this.isSupportedCode(e)?s.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return t(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(e))):t(e)&&r(this.formatLanguageCode(e)),n.forEach(e=>{s.indexOf(e)<0&&r(this.formatLanguageCode(e))}),s}}let T=[{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","kk","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","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}],R={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)};const N=["v1","v2","v3"],L=["v4"],D={zero:0,one:1,two:2,few:3,many:4,other:5};class U{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=S.create("pluralResolver"),this.options.compatibilityJSON&&!L.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const e={};return T.forEach(t=>{t.lngs.forEach(i=>{e[i]={numbers:t.nr,plurals:R[t.fc]}})}),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi()){const i=v("dev"===e?"en":e),n=t.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:i,type:n});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let r;try{r=new Intl.PluralRules(i,{type:n})}catch(i){if(!e.match(/-|_/))return;const n=this.languageUtils.getLanguagePartFromCode(e);r=this.getRule(n,t)}return this.pluralRulesCache[s]=r,r}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.getRule(e,t);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,i).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.getRule(e,t);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((e,t)=>D[e]-D[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):i.numbers.map(i=>this.getSuffix(e,i,t)):[]}getSuffix(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.getRule(e,i);return n?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:this.getSuffixRetroCompatible(n,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const i=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let n=e.numbers[i];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===n?n="plural":1===n&&(n=""));const s=()=>this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString();return"v1"===this.options.compatibilityJSON?1===n?"":"number"==typeof n?`_plural_${n.toString()}`:s():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?s():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!N.includes(this.options.compatibilityJSON)}}const x=function(e,i,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=((e,t,i)=>{const n=c(e,i);return void 0!==n?n:c(t,i)})(e,i,n);return!o&&r&&t(n)&&(o=m(e,n,s),void 0===o&&(o=m(i,n,s))),o},P=e=>e.replace(/\$/g,"$$$$");class V{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=S.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:i,useRawValueToEscape:n,prefix:s,prefixEscaped:r,suffix:o,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:g,nestingSuffixEscaped:m,nestingOptionsSeparator:v,maxReplaces:y,alwaysFormat:E}=e.interpolation;this.escape=void 0!==t?t:f,this.escapeValue=void 0===i||i,this.useRawValueToEscape=void 0!==n&&n,this.prefix=s?d(s):r||"{{",this.suffix=o?d(o):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=h?d(h):p||d("$t("),this.nestingSuffix=g?d(g):m||d(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=y||1e3,this.alwaysFormat=void 0!==E&&E,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,i,s,r){let o,a,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){const t=x(i,c,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(t,void 0,s,{...r,...i,interpolationkey:e}):t}const t=e.split(this.formatSeparator),n=t.shift().trim(),o=t.join(this.formatSeparator).trim();return this.format(x(i,c,n,this.options.keySeparator,this.options.ignoreJSONStructure),o,s,{...r,...i,interpolationkey:n})};this.resetRegExp();const d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>P(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?P(this.escape(e)):P(e)}].forEach(i=>{for(l=0;o=i.regex.exec(e);){const s=o[1].trim();if(a=u(s),void 0===a)if("function"==typeof d){const i=d(e,o,r);a=t(i)?i:""}else if(r&&Object.prototype.hasOwnProperty.call(r,s))a="";else{if(h){a=o[0];continue}this.logger.warn(`missed to pass in variable ${s} for interpolating ${e}`),a=""}else t(a)||this.useRawValueToEscape||(a=n(a));const c=i.safeValue(a);if(e=e.replace(o[0],c),h?(i.regex.lastIndex+=a.length,i.regex.lastIndex-=o[0].length):i.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,i){let s,r,o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const l=(e,t)=>{const i=this.nestingOptionsSeparator;if(e.indexOf(i)<0)return e;const n=e.split(new RegExp(`${i}[ ]*{`));let s=`{${n[1]}`;e=n[0],s=this.interpolate(s,o);const r=s.match(/'/g),a=s.match(/"/g);(r&&r.length%2==0&&!a||a.length%2!=0)&&(s=s.replace(/'/g,'"'));try{o=JSON.parse(s),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${i}${s}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;s=this.nestingRegexp.exec(e);){let c=[];o={...a},o=o.replace&&!t(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(-1!==s[0].indexOf(this.formatSeparator)&&!/{.*}/.test(s[1])){const e=s[1].split(this.formatSeparator).map(e=>e.trim());s[1]=e.shift(),c=e,u=!0}if(r=i(l.call(this,s[1].trim(),o),o),r&&s[0]===e&&!t(r))return r;t(r)||(r=n(r)),r||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),r=""),u&&(r=c.reduce((e,t)=>this.format(e,t,a.lng,{...a,interpolationkey:s[1].trim()}),r.trim())),e=e.replace(s[0],r),this.regexp.lastIndex=0}return e}}const _=e=>{const t={};return(i,n,s)=>{let r=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(r={...r,[s.interpolationkey]:void 0});const o=n+JSON.stringify(r);let a=t[o];return a||(a=e(v(n),s),t[o]=a),a(i)}};class M{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=S.create("formatter"),this.options=e,this.formats={number:_((e,t)=>{const i=new Intl.NumberFormat(e,{...t});return e=>i.format(e)}),currency:_((e,t)=>{const i=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>i.format(e)}),datetime:_((e,t)=>{const i=new Intl.DateTimeFormat(e,{...t});return e=>i.format(e)}),relativetime:_((e,t)=>{const i=new Intl.RelativeTimeFormat(e,{...t});return e=>i.format(e,t.range||"day")}),list:_((e,t)=>{const i=new Intl.ListFormat(e,{...t});return e=>i.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=_(t)}format(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const s=t.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(e=>e.indexOf(")")>-1)){const e=s.findIndex(e=>e.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,e)].join(this.formatSeparator)}return s.reduce((e,t)=>{const{formatName:s,formatOptions:r}=(e=>{let t=e.toLowerCase().trim();const i={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const s=n[1].substring(0,n[1].length-1);"currency"===t&&s.indexOf(":")<0?i.currency||(i.currency=s.trim()):"relativetime"===t&&s.indexOf(":")<0?i.range||(i.range=s.trim()):s.split(";").forEach(e=>{if(e){const[t,...n]=e.split(":"),s=n.join(":").trim().replace(/^'+|'+$/g,""),r=t.trim();i[r]||(i[r]=s),"false"===s&&(i[r]=!1),"true"===s&&(i[r]=!0),isNaN(s)||(i[r]=parseInt(s,10))}})}return{formatName:t,formatOptions:i}})(t);if(this.formats[s]){let t=e;try{const o=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},a=o.locale||o.lng||n.locale||n.lng||i;t=this.formats[s](e,a,{...r,...n,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${s}`),e},e)}}class j extends b{constructor(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=n,this.logger=S.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,n.backend,n)}queueLoad(e,t,i,n){const s={},r={},o={},a={};return e.forEach(e=>{let n=!0;t.forEach(t=>{const o=`${e}|${t}`;!i.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(1===this.state[o]?void 0===r[o]&&(r[o]=!0):(this.state[o]=1,n=!1,void 0===r[o]&&(r[o]=!0),void 0===s[o]&&(s[o]=!0),void 0===a[t]&&(a[t]=!0)))}),n||(o[e]=!0)}),(Object.keys(s).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(s),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(a)}}loaded(e,t,i){const n=e.split("|"),s=n[0],r=n[1];t&&this.emit("failedLoading",s,r,t),!t&&i&&this.store.addResourceBundle(s,r,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);const o={};this.queue.forEach(i=>{((e,t,i)=>{const{obj:n,k:s}=a(e,t,Object);n[s]=n[s]||[],n[s].push(i)})(i.loaded,[s],r),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(i,e),t&&i.errors.push(t),0!==i.pendingCount||i.done||(Object.keys(i.loaded).forEach(e=>{o[e]||(o[e]={});const t=i.loaded[e];t.length&&t.forEach(t=>{void 0===o[e][t]&&(o[e][t]=!0)})}),i.done=!0,i.errors.length?i.callback(i.errors):i.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,r=arguments.length>5?arguments[5]:void 0;if(!e.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:i,tried:n,wait:s,callback:r});this.readingCalls++;const o=(o,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}o&&a&&n<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,i,n+1,2*s,r)},s):r(o,a)},a=this.backend[i].bind(this.backend);if(2!==a.length)return a(e,t,o);try{const i=a(e,t);i&&"function"==typeof i.then?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}}prepareLoading(e,i){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=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."),s&&s();t(e)&&(e=this.languageUtils.toResolveHierarchy(e)),t(i)&&(i=[i]);const r=this.queueLoad(e,i,n,s);if(!r.toLoad.length)return r.pending.length||s(),null;r.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const i=e.split("|"),n=i[0],s=i[1];this.read(n,s,"read",void 0,void 0,(i,r)=>{i&&this.logger.warn(`${t}loading namespace ${s} for language ${n} failed`,i),!i&&r&&this.logger.log(`${t}loaded namespace ${s} for language ${n}`,r),this.loaded(e,i,r)})}saveMissing(e,t,i,n,s){let r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${i}" as the namespace "${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!!!");else if(null!=i&&""!==i){if(this.backend&&this.backend.create){const a={...r,isUpdate:s},l=this.backend.create.bind(this.backend);if(l.length<6)try{let s;s=5===l.length?l(e,t,i,n,a):l(e,t,i,n),s&&"function"==typeof s.then?s.then(e=>o(null,e)).catch(o):o(null,s)}catch(e){o(e)}else l(e,t,i,n,o,a)}e&&e[0]&&this.store.addResource(e[0],t,i,n)}}}const q=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!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:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let i={};if("object"==typeof e[1]&&(i=e[1]),t(e[1])&&(i.defaultValue=e[1]),t(e[2])&&(i.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const t=e[3]||e[2];Object.keys(t).forEach(e=>{i[e]=t[e]})}return i},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),F=e=>(t(e.ns)&&(e.ns=[e.ns]),t(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),t(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),$=()=>{};class B extends b{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var i;if(super(),this.options=F(e),this.services={},this.logger=S,this.modules={external:[]},i=this,Object.getOwnPropertyNames(Object.getPrototypeOf(i)).forEach(e=>{"function"==typeof i[e]&&(i[e]=i[e].bind(i))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof n&&(s=n,n={}),!n.defaultNS&&!1!==n.defaultNS&&n.ns&&(t(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const r=q();this.options={...r,...this.options,...F(n)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==n.keySeparator&&(this.options.userDefinedKeySeparator=n.keySeparator),void 0!==n.nsSeparator&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?S.init(o(this.modules.logger),this.options):S.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=M);const i=new O(this.options);this.store=new w(this.options.resources,this.options);const n=this.services;n.logger=S,n.resourceStore=this.store,n.languageUtils=i,n.pluralResolver=new U(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(n.formatter=o(t),n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new V(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new j(o(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on("*",function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),s=1;s<i;s++)n[s-1]=arguments[s];e.emit(t,...n)}),this.modules.languageDetector&&(n.languageDetector=o(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=o(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new A(this.services,this.options),this.translator.on("*",function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),s=1;s<i;s++)n[s-1]=arguments[s];e.emit(t,...n)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,s||(s=$),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});const a=i(),l=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(t),s(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),a}loadResources(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$;const n=t(e)?e:this.language;if("function"==typeof e&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return i();const e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};n?t(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload&&this.options.preload.forEach(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),i(e)})}else i(null)}reloadResources(e,t,n){const s=i();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=$),this.services.backendConnector.reload(e,t,e=>{s.resolve(),n(e)}),s}use(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&&k.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,n){var s=this;this.isLanguageChangingTo=e;const r=i();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(e,t)=>{t?(o(t),this.translator.changeLanguage(t),this.isLanguageChangingTo=void 0,this.emit("languageChanged",t),this.logger.log("languageChanged",t)):this.isLanguageChangingTo=void 0,r.resolve(function(){return s.t(...arguments)}),n&&n(e,function(){return s.t(...arguments)})},l=i=>{e||i||!this.services.languageDetector||(i=[]);const n=t(i)?i:this.services.languageUtils.getBestMatchFromCodes(i);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,e=>{a(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e):l(this.services.languageDetector.detect()),r}getFixedT(e,i,n){var s=this;const r=function(e,t){let i;if("object"!=typeof t){for(var o=arguments.length,a=new Array(o>2?o-2:0),l=2;l<o;l++)a[l-2]=arguments[l];i=s.options.overloadTranslationOptionHandler([e,t].concat(a))}else i={...t};i.lng=i.lng||r.lng,i.lngs=i.lngs||r.lngs,i.ns=i.ns||r.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||r.keyPrefix);const c=s.options.keySeparator||".";let u;return u=i.keyPrefix&&Array.isArray(e)?e.map(e=>`${i.keyPrefix}${c}${e}`):i.keyPrefix?`${i.keyPrefix}${c}${e}`:e,s.t(u,i)};return t(e)?r.lng=e:r.lngs=e,r.ns=i,r.keyPrefix=n,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=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;const i=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;const r=(e,t)=>{const i=this.services.backendConnector.state[`${e}|${t}`];return-1===i||0===i||2===i};if(t.precheck){const e=t.precheck(this,r);if(void 0!==e)return e}return!(!this.hasResourceBundle(i,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!r(i,e)||n&&!r(s,e)))}loadNamespaces(e,n){const s=i();return this.options.ns?(t(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{s.resolve(),n&&n(e)}),s):(n&&n(),Promise.resolve())}loadLanguages(e,n){const s=i();t(e)&&(e=[e]);const r=this.options.preload||[],o=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{s.resolve(),n&&n(e)}),s):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new O(q());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","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new B(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const n={...this.options,...e,isClone:!0},s=new B(n);return void 0===e.debug&&void 0===e.prefix||(s.logger=s.logger.clone(e)),["store","services","language"].forEach(e=>{s[e]=this[e]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},i&&(s.store=new w(this.store.data,n),s.services.resourceStore=s.store),s.translator=new A(s.services,n),s.translator.on("*",function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];s.emit(e,...i)}),s.init(n,t),s.translator.options=n,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const z=B.createInstance();z.createInstance=B.createInstance,e.exports=z},327(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends Error{}class n extends i{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class s extends i{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class r extends i{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class o extends i{}class a extends i{constructor(e){super(`Invalid unit ${e}`)}}class l extends i{}class c extends i{constructor(){super("Zone is an abstract class")}}const u="numeric",d="short",h="long",f={year:u,month:u,day:u},p={year:u,month:d,day:u},g={year:u,month:d,day:u,weekday:d},m={year:u,month:h,day:u},v={year:u,month:h,day:u,weekday:h},y={hour:u,minute:u},E={hour:u,minute:u,second:u},S={hour:u,minute:u,second:u,timeZoneName:d},b={hour:u,minute:u,second:u,timeZoneName:h},w={hour:u,minute:u,hourCycle:"h23"},k={hour:u,minute:u,second:u,hourCycle:"h23"},I={hour:u,minute:u,second:u,hourCycle:"h23",timeZoneName:d},A={hour:u,minute:u,second:u,hourCycle:"h23",timeZoneName:h},C={year:u,month:u,day:u,hour:u,minute:u},O={year:u,month:u,day:u,hour:u,minute:u,second:u},T={year:u,month:d,day:u,hour:u,minute:u},R={year:u,month:d,day:u,hour:u,minute:u,second:u},N={year:u,month:d,day:u,weekday:d,hour:u,minute:u},L={year:u,month:h,day:u,hour:u,minute:u,timeZoneName:d},D={year:u,month:h,day:u,hour:u,minute:u,second:u,timeZoneName:d},U={year:u,month:h,day:u,weekday:h,hour:u,minute:u,timeZoneName:h},x={year:u,month:h,day:u,weekday:h,hour:u,minute:u,second:u,timeZoneName:h};class P{get type(){throw new c}get name(){throw new c}get ianaName(){return this.name}get isUniversal(){throw new c}offsetName(e,t){throw new c}formatOffset(e,t){throw new c}offset(e){throw new c}equals(e){throw new c}get isValid(){throw new c}}let V=null;class _ extends P{static get instance(){return null===V&&(V=new _),V}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Ke(e,t,i)}formatOffset(e,t){return et(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}let M={};const j={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let q={};class F extends P{static create(e){return q[e]||(q[e]=new F(e)),q[e]}static resetCache(){q={},M={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=F.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Ke(e,t,i,this.name)}formatOffset(e,t){return et(this.offset(e),t)}offset(e){const t=new Date(e);if(isNaN(t))return NaN;const i=(n=this.name,M[n]||(M[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",era:"short"})),M[n]);var n;let[s,r,o,a,l,c,u]=i.formatToParts?function(e,t){const i=e.formatToParts(t),n=[];for(let e=0;e<i.length;e++){const{type:t,value:s}=i[e],r=j[t];"era"===t?n[r]=s:Re(r)||(n[r]=parseInt(s,10))}return n}(i,t):function(e,t){const i=e.format(t).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(i),[,s,r,o,a,l,c,u]=n;return[o,s,r,a,l,c,u]}(i,t);"BC"===a&&(s=1-Math.abs(s));let d=+t;const h=d%1e3;return d-=h>=0?h:1e3+h,(We({year:s,month:r,day:o,hour:24===l?0:l,minute:c,second:u,millisecond:0})-d)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let $={},B={};function z(e,t={}){const i=JSON.stringify([e,t]);let n=B[i];return n||(n=new Intl.DateTimeFormat(e,t),B[i]=n),n}let H={},W={},J=null,Z={};function G(e,t,i,n){const s=e.listingMode();return"error"===s?null:"en"===s?i(t):n(t)}class K{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:n,floor:s,...r}=i;if(!t||Object.keys(r).length>0){const t={useGrouping:!1,...i};i.padTo>0&&(t.minimumIntegerDigits=i.padTo),this.inf=function(e,t={}){const i=JSON.stringify([e,t]);let n=H[i];return n||(n=new Intl.NumberFormat(e,t),H[i]=n),n}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Me(this.floor?Math.floor(e):$e(e,3),this.padTo)}}class Y{constructor(e,t,i){let n;if(this.opts=i,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,i=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&F.create(i).valid?(n=i,this.dt=e):(n="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,n=e.zone.name):(n="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const s={...this.opts};s.timeZone=s.timeZone||n,this.dtf=z(t,s)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class X{constructor(e,t,i){this.opts={style:"long",...i},!t&&De()&&(this.rtf=function(e,t={}){const{base:i,...n}=t,s=JSON.stringify([e,n]);let r=W[s];return r||(r=new Intl.RelativeTimeFormat(e,t),W[s]=r),r}(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,i="always",n=!1){const s={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."]},r=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===i&&r){const i="days"===e;switch(t){case 1:return i?"tomorrow":`next ${s[e][0]}`;case-1:return i?"yesterday":`last ${s[e][0]}`;case 0:return i?"today":`this ${s[e][0]}`}}const o=Object.is(t,-0)||t<0,a=Math.abs(t),l=1===a,c=s[e],u=n?l?c[1]:c[2]||c[1]:l?s[e][0]:e;return o?`${a} ${u} ago`:`in ${a} ${u}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const Q={firstDay:1,minimalDays:4,weekend:[6,7]};class ee{static fromOpts(e){return ee.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,i,n,s=!1){const r=e||fe.defaultLocale,o=r||(s?"en-US":J||(J=(new Intl.DateTimeFormat).resolvedOptions().locale,J)),a=t||fe.defaultNumberingSystem,l=i||fe.defaultOutputCalendar,c=Ve(n)||fe.defaultWeekSettings;return new ee(o,a,l,c,r)}static resetCache(){J=null,B={},H={},W={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i,weekSettings:n}={}){return ee.create(e,t,i,n)}constructor(e,t,i,n,s){const[r,o,a]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const i=e.indexOf("-u-");if(-1===i)return[e];{let t,n;try{t=z(e).resolvedOptions(),n=e}catch(s){const r=e.substring(0,i);t=z(r).resolvedOptions(),n=r}const{numberingSystem:s,calendar:r}=t;return[n,s,r]}}(e);this.locale=r,this.numberingSystem=t||o||null,this.outputCalendar=i||a||null,this.weekSettings=n,this.intl=function(e,t,i){return i||t?(e.includes("-u-")||(e+="-u"),i&&(e+=`-ca-${i}`),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=s,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?ee.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Ve(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return G(this,e,rt,()=>{const i=t?{month:e,day:"numeric"}:{month:e},n=t?"format":"standalone";return this.monthsCache[n][e]||(this.monthsCache[n][e]=function(e){const t=[];for(let i=1;i<=12;i++){const n=an.utc(2009,i,1);t.push(e(n))}return t}(e=>this.extract(e,i,"month"))),this.monthsCache[n][e]})}weekdays(e,t=!1){return G(this,e,ct,()=>{const i=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},n=t?"format":"standalone";return this.weekdaysCache[n][e]||(this.weekdaysCache[n][e]=function(e){const t=[];for(let i=1;i<=7;i++){const n=an.utc(2016,11,13+i);t.push(e(n))}return t}(e=>this.extract(e,i,"weekday"))),this.weekdaysCache[n][e]})}meridiems(){return G(this,void 0,()=>ut,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[an.utc(2016,11,13,9),an.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return G(this,e,pt,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[an.utc(-40,1,1),an.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,i){const n=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===i);return n?n.value:null}numberFormatter(e={}){return new K(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Y(e,this.intl,t)}relFormatter(e={}){return new X(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const i=JSON.stringify([e,t]);let n=$[i];return n||(n=new Intl.ListFormat(e,t),$[i]=n),n}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Ue()?function(e){let t=Z[e];if(!t){const i=new Intl.Locale(e);t="getWeekInfo"in i?i.getWeekInfo():i.weekInfo,Z[e]=t}return t}(this.locale):Q}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}let te=null;class ie extends P{static get utcInstance(){return null===te&&(te=new ie(0)),te}static instance(e){return 0===e?ie.utcInstance:new ie(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new ie(Ye(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${et(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${et(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return et(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class ne extends P{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function se(e,t){if(Re(e)||null===e)return t;if(e instanceof P)return e;if("string"==typeof e){const i=e.toLowerCase();return"default"===i?t:"local"===i||"system"===i?_.instance:"utc"===i||"gmt"===i?ie.utcInstance:ie.parseSpecifier(i)||F.create(e)}return Ne(e)?ie.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new ne(e)}let re,oe=()=>Date.now(),ae="system",le=null,ce=null,ue=null,de=60,he=null;class fe{static get now(){return oe}static set now(e){oe=e}static set defaultZone(e){ae=e}static get defaultZone(){return se(ae,_.instance)}static get defaultLocale(){return le}static set defaultLocale(e){le=e}static get defaultNumberingSystem(){return ce}static set defaultNumberingSystem(e){ce=e}static get defaultOutputCalendar(){return ue}static set defaultOutputCalendar(e){ue=e}static get defaultWeekSettings(){return he}static set defaultWeekSettings(e){he=Ve(e)}static get twoDigitCutoffYear(){return de}static set twoDigitCutoffYear(e){de=e%100}static get throwOnInvalid(){return re}static set throwOnInvalid(e){re=e}static resetCaches(){ee.resetCache(),F.resetCache()}}class pe{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const ge=[0,31,59,90,120,151,181,212,243,273,304,334],me=[0,31,60,91,121,152,182,213,244,274,305,335];function ve(e,t){return new pe("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function ye(e,t,i){const n=new Date(Date.UTC(e,t-1,i));e<100&&e>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const s=n.getUTCDay();return 0===s?7:s}function Ee(e,t,i){return i+(Be(e)?me:ge)[t-1]}function Se(e,t){const i=Be(e)?me:ge,n=i.findIndex(e=>e<t);return{month:n+1,day:t-i[n]}}function be(e,t){return(e-t+7)%7+1}function we(e,t=4,i=1){const{year:n,month:s,day:r}=e,o=Ee(n,s,r),a=be(ye(n,s,r),i);let l,c=Math.floor((o-a+14-t)/7);return c<1?(l=n-1,c=Ze(l,t,i)):c>Ze(n,t,i)?(l=n+1,c=1):l=n,{weekYear:l,weekNumber:c,weekday:a,...tt(e)}}function ke(e,t=4,i=1){const{weekYear:n,weekNumber:s,weekday:r}=e,o=be(ye(n,1,t),i),a=ze(n);let l,c=7*s+r-o-7+t;c<1?(l=n-1,c+=ze(l)):c>a?(l=n+1,c-=ze(n)):l=n;const{month:u,day:d}=Se(l,c);return{year:l,month:u,day:d,...tt(e)}}function Ie(e){const{year:t,month:i,day:n}=e;return{year:t,ordinal:Ee(t,i,n),...tt(e)}}function Ae(e){const{year:t,ordinal:i}=e,{month:n,day:s}=Se(t,i);return{year:t,month:n,day:s,...tt(e)}}function Ce(e,t){if(!Re(e.localWeekday)||!Re(e.localWeekNumber)||!Re(e.localWeekYear)){if(!Re(e.weekday)||!Re(e.weekNumber)||!Re(e.weekYear))throw new o("Cannot mix locale-based week fields with ISO-based week fields");return Re(e.localWeekday)||(e.weekday=e.localWeekday),Re(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Re(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Oe(e){const t=Le(e.year),i=_e(e.month,1,12),n=_e(e.day,1,He(e.year,e.month));return t?i?!n&&ve("day",e.day):ve("month",e.month):ve("year",e.year)}function Te(e){const{hour:t,minute:i,second:n,millisecond:s}=e,r=_e(t,0,23)||24===t&&0===i&&0===n&&0===s,o=_e(i,0,59),a=_e(n,0,59),l=_e(s,0,999);return r?o?a?!l&&ve("millisecond",s):ve("second",n):ve("minute",i):ve("hour",t)}function Re(e){return void 0===e}function Ne(e){return"number"==typeof e}function Le(e){return"number"==typeof e&&e%1==0}function De(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function Ue(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function xe(e,t,i){if(0!==e.length)return e.reduce((e,n)=>{const s=[t(n),n];return e&&i(e[0],s[0])===e[0]?e:s},null)[1]}function Pe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ve(e){if(null==e)return null;if("object"!=typeof e)throw new l("Week settings must be an object");if(!_e(e.firstDay,1,7)||!_e(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!_e(e,1,7)))throw new l("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function _e(e,t,i){return Le(e)&&e>=t&&e<=i}function Me(e,t=2){let i;return i=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),i}function je(e){return Re(e)||null===e||""===e?void 0:parseInt(e,10)}function qe(e){return Re(e)||null===e||""===e?void 0:parseFloat(e)}function Fe(e){if(!Re(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function $e(e,t,i=!1){const n=10**t;return(i?Math.trunc:Math.round)(e*n)/n}function Be(e){return e%4==0&&(e%100!=0||e%400==0)}function ze(e){return Be(e)?366:365}function He(e,t){const i=(n=t-1)-12*Math.floor(n/12)+1;var n;return 2===i?Be(e+(t-i)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][i-1]}function We(e){let 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),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Je(e,t,i){return-be(ye(e,1,t),i)+t-1}function Ze(e,t=4,i=1){const n=Je(e,t,i),s=Je(e+1,t,i);return(ze(e)-n+s)/7}function Ge(e){return e>99?e:e>fe.twoDigitCutoffYear?1900+e:2e3+e}function Ke(e,t,i,n=null){const s=new Date(e),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(r.timeZone=n);const o={timeZoneName:t,...r},a=new Intl.DateTimeFormat(i,o).formatToParts(s).find(e=>"timezonename"===e.type.toLowerCase());return a?a.value:null}function Ye(e,t){let i=parseInt(e,10);Number.isNaN(i)&&(i=0);const n=parseInt(t,10)||0;return 60*i+(i<0||Object.is(i,-0)?-n:n)}function Xe(e){const t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new l(`Invalid unit value ${e}`);return t}function Qe(e,t){const i={};for(const n in e)if(Pe(e,n)){const s=e[n];if(null==s)continue;i[t(n)]=Xe(s)}return i}function et(e,t){const i=Math.trunc(Math.abs(e/60)),n=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${Me(i,2)}:${Me(n,2)}`;case"narrow":return`${s}${i}${n>0?`:${n}`:""}`;case"techie":return`${s}${Me(i,2)}${Me(n,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function tt(e){return function(e){return["hour","minute","second","millisecond"].reduce((t,i)=>(t[i]=e[i],t),{})}(e)}const it=["January","February","March","April","May","June","July","August","September","October","November","December"],nt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],st=["J","F","M","A","M","J","J","A","S","O","N","D"];function rt(e){switch(e){case"narrow":return[...st];case"short":return[...nt];case"long":return[...it];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}}const ot=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],at=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],lt=["M","T","W","T","F","S","S"];function ct(e){switch(e){case"narrow":return[...lt];case"short":return[...at];case"long":return[...ot];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const ut=["AM","PM"],dt=["Before Christ","Anno Domini"],ht=["BC","AD"],ft=["B","A"];function pt(e){switch(e){case"narrow":return[...ft];case"short":return[...ht];case"long":return[...dt];default:return null}}function gt(e,t){let i="";for(const n of e)n.literal?i+=n.val:i+=t(n.val);return i}const mt={D:f,DD:p,DDD:m,DDDD:v,t:y,tt:E,ttt:S,tttt:b,T:w,TT:k,TTT:I,TTTT:A,f:C,ff:T,fff:L,ffff:U,F:O,FF:R,FFF:D,FFFF:x};class vt{static create(e,t={}){return new vt(e,t)}static parseFormat(e){let t=null,i="",n=!1;const s=[];for(let r=0;r<e.length;r++){const o=e.charAt(r);"'"===o?(i.length>0&&s.push({literal:n||/^\s+$/.test(i),val:i}),t=null,i="",n=!n):n||o===t?i+=o:(i.length>0&&s.push({literal:/^\s+$/.test(i),val:i}),i=o,t=o)}return i.length>0&&s.push({literal:n||/^\s+$/.test(i),val:i}),s}static macroTokenToFormatOpts(e){return mt[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return Me(e,t);const i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const i="en"===this.loc.listingMode(),n=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,s=(t,i)=>this.loc.extract(e,t,i),r=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",o=(t,n)=>i?function(e,t){return rt(t)[e.month-1]}(e,t):s(n?{month:t}:{month:t,day:"numeric"},"month"),a=(t,n)=>i?function(e,t){return ct(t)[e.weekday-1]}(e,t):s(n?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),l=t=>{const i=vt.macroTokenToFormatOpts(t);return i?this.formatWithSystemDefault(e,i):t},c=t=>i?function(e,t){return pt(t)[e.year<0?0:1]}(e,t):s({era:t},"era");return gt(vt.parseFormat(t),t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return r({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return r({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return r({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return i?function(e){return ut[e.hour<12?0:1]}(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return n?s({day:"numeric"},"day"):this.num(e.day);case"dd":return n?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return a("short",!0);case"cccc":return a("long",!0);case"ccccc":return a("narrow",!0);case"EEE":return a("short",!1);case"EEEE":return a("long",!1);case"EEEEE":return a("narrow",!1);case"L":return n?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return n?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return o("short",!0);case"LLLL":return o("long",!0);case"LLLLL":return o("narrow",!0);case"M":return n?s({month:"numeric"},"month"):this.num(e.month);case"MM":return n?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return o("short",!1);case"MMMM":return o("long",!1);case"MMMMM":return o("narrow",!1);case"y":return n?s({year:"numeric"},"year"):this.num(e.year);case"yy":return n?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return n?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return n?s({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return l(t)}})}formatDurationFromString(e,t){const i=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"w":return"week";case"M":return"month";case"y":return"year";default:return null}},n=vt.parseFormat(t),s=n.reduce((e,{literal:t,val:i})=>t?e:e.concat(i),[]);return gt(n,(e=>t=>{const n=i(t);return n?this.num(e.get(n),t.length):t})(e.shiftTo(...s.map(i).filter(e=>e))))}}const yt=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Et(...e){const t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function St(...e){return t=>e.reduce(([e,i,n],s)=>{const[r,o,a]=s(t,n);return[{...e,...r},o||i,a]},[{},null,1]).slice(0,2)}function bt(e,...t){if(null==e)return[null,null];for(const[i,n]of t){const t=i.exec(e);if(t)return n(t)}return[null,null]}function wt(...e){return(t,i)=>{const n={};let s;for(s=0;s<e.length;s++)n[e[s]]=je(t[i+s]);return[n,null,i+s]}}const kt=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,It=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,At=RegExp(`${It.source}(?:${kt.source}?(?:\\[(${yt.source})\\])?)?`),Ct=RegExp(`(?:T${At.source})?`),Ot=wt("weekYear","weekNumber","weekDay"),Tt=wt("year","ordinal"),Rt=RegExp(`${It.source} ?(?:${kt.source}|(${yt.source}))?`),Nt=RegExp(`(?: ${Rt.source})?`);function Lt(e,t,i){const n=e[t];return Re(n)?i:je(n)}function Dt(e,t){return[{hours:Lt(e,t,0),minutes:Lt(e,t+1,0),seconds:Lt(e,t+2,0),milliseconds:Fe(e[t+3])},null,t+4]}function Ut(e,t){const i=!e[t]&&!e[t+1],n=Ye(e[t+1],e[t+2]);return[{},i?null:ie.instance(n),t+3]}function xt(e,t){return[{},e[t]?F.create(e[t]):null,t+1]}const Pt=RegExp(`^T?${It.source}$`),Vt=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function _t(e){const[t,i,n,s,r,o,a,l,c]=e,u="-"===t[0],d=l&&"-"===l[0],h=(e,t=!1)=>void 0!==e&&(t||e&&u)?-e:e;return[{years:h(qe(i)),months:h(qe(n)),weeks:h(qe(s)),days:h(qe(r)),hours:h(qe(o)),minutes:h(qe(a)),seconds:h(qe(l),"-0"===l),milliseconds:h(Fe(c),d)}]}const Mt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function jt(e,t,i,n,s,r,o){const a={year:2===t.length?Ge(je(t)):je(t),month:nt.indexOf(i)+1,day:je(n),hour:je(s),minute:je(r)};return o&&(a.second=je(o)),e&&(a.weekday=e.length>3?ot.indexOf(e)+1:at.indexOf(e)+1),a}const qt=/^(?:(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 Ft(e){const[,t,i,n,s,r,o,a,l,c,u,d]=e,h=jt(t,s,n,i,r,o,a);let f;return f=l?Mt[l]:c?0:Ye(u,d),[h,new ie(f)]}const $t=/^(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$/,Bt=/^(Monday|Tuesday|Wednesday|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$/,zt=/^(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 Ht(e){const[,t,i,n,s,r,o,a]=e;return[jt(t,s,n,i,r,o,a),ie.utcInstance]}function Wt(e){const[,t,i,n,s,r,o,a]=e;return[jt(t,a,i,n,s,r,o),ie.utcInstance]}const Jt=Et(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ct),Zt=Et(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Ct),Gt=Et(/(\d{4})-?(\d{3})/,Ct),Kt=Et(At),Yt=St(function(e,t){return[{year:Lt(e,t),month:Lt(e,t+1,1),day:Lt(e,t+2,1)},null,t+3]},Dt,Ut,xt),Xt=St(Ot,Dt,Ut,xt),Qt=St(Tt,Dt,Ut,xt),ei=St(Dt,Ut,xt),ti=St(Dt),ii=Et(/(\d{4})-(\d\d)-(\d\d)/,Nt),ni=Et(Rt),si=St(Dt,Ut,xt),ri="Invalid Duration",oi={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}},ai={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},...oi},li={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:4.3481250000000005,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...oi},ci=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ui=ci.slice(0).reverse();function di(e,t,i=!1){const n={values:i?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new pi(n)}function hi(e,t){var i;let n=null!=(i=t.milliseconds)?i:0;for(const i of ui.slice(1))t[i]&&(n+=t[i]*e[i].milliseconds);return n}function fi(e,t){const i=hi(e,t)<0?-1:1;ci.reduceRight((n,s)=>{if(Re(t[s]))return n;if(n){const r=t[n]*i,o=e[s][n],a=Math.floor(r/o);t[s]+=a*i,t[n]-=a*o*i}return s},null),ci.reduce((i,n)=>{if(Re(t[n]))return i;if(i){const s=t[i]%1;t[i]-=s,t[n]+=s*e[i][n]}return n},null)}class pi{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let i=t?li:ai;e.matrix&&(i=e.matrix),this.values=e.values,this.loc=e.loc||ee.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(e,t){return pi.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new l("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new pi({values:Qe(e,pi.normalizeUnit),loc:ee.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(Ne(e))return pi.fromMillis(e);if(pi.isDuration(e))return e;if("object"==typeof e)return pi.fromObject(e);throw new l(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=function(e){return bt(e,[Vt,_t])}(e);return i?pi.fromObject(i,t):pi.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=function(e){return bt(e,[Pt,ti])}(e);return i?pi.fromObject(i,t):pi.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new l("need to specify a reason the Duration is invalid");const i=e instanceof pe?e:new pe(e,t);if(fe.throwOnInvalid)throw new r(i);return new pi({invalid:i})}static normalizeUnit(e){const 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 a(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const i={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?vt.create(this.loc,i).formatDurationFromString(this,e):ri}toHuman(e={}){if(!this.isValid)return ri;const t=ci.map(t=>{const i=this.values[t];return Re(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:t.slice(0,-1)}).format(i)}).filter(e=>e);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let 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+=$e(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},an.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?hi(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=pi.fromDurationLike(e),i={};for(const e of ci)(Pe(t.values,e)||Pe(this.values,e))&&(i[e]=t.get(e)+this.get(e));return di(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=pi.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const i of Object.keys(this.values))t[i]=Xe(e(this.values[i],i));return di(this,{values:t},!0)}get(e){return this[pi.normalizeUnit(e)]}set(e){return this.isValid?di(this,{values:{...this.values,...Qe(e,pi.normalizeUnit)}}):this}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i,matrix:n}={}){return di(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:n,conversionAccuracy:i})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return fi(this.matrix,e),di(this,{values:e},!0)}rescale(){return this.isValid?di(this,{values:function(e){const t={};for(const[i,n]of Object.entries(e))0!==n&&(t[i]=n);return t}(this.normalize().shiftToAll().toObject())},!0):this}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>pi.normalizeUnit(e));const t={},i={},n=this.toObject();let s;for(const r of ci)if(e.indexOf(r)>=0){s=r;let e=0;for(const t in i)e+=this.matrix[t][r]*i[t],i[t]=0;Ne(n[r])&&(e+=n[r]);const o=Math.trunc(e);t[r]=o,i[r]=(1e3*e-1e3*o)/1e3}else Ne(n[r])&&(i[r]=n[r]);for(const e in i)0!==i[e]&&(t[s]+=e===s?i[e]:i[e]/this.matrix[s][e]);return fi(this.matrix,t),di(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return di(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const i of ci)if(!t(this.values[i],e.values[i]))return!1;return!0}}const gi="Invalid Interval";class mi{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new l("need to specify a reason the Interval is invalid");const i=e instanceof pe?e:new pe(e,t);if(fe.throwOnInvalid)throw new s(i);return new mi({invalid:i})}static fromDateTimes(e,t){const i=ln(e),n=ln(t),s=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?mi.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:mi.invalid("missing or invalid end"):mi.invalid("missing or invalid start")}(i,n);return null==s?new mi({start:i,end:n}):s}static after(e,t){const i=pi.fromDurationLike(t),n=ln(e);return mi.fromDateTimes(n,n.plus(i))}static before(e,t){const i=pi.fromDurationLike(t),n=ln(e);return mi.fromDateTimes(n.minus(i),n)}static fromISO(e,t){const[i,n]=(e||"").split("/",2);if(i&&n){let e,s,r,o;try{e=an.fromISO(i,t),s=e.isValid}catch(n){s=!1}try{r=an.fromISO(n,t),o=r.isValid}catch(n){o=!1}if(s&&o)return mi.fromDateTimes(e,r);if(s){const i=pi.fromISO(n,t);if(i.isValid)return mi.after(e,i)}else if(o){const e=pi.fromISO(i,t);if(e.isValid)return mi.before(r,e)}}return mi.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const i=this.start.startOf(e,t);let n;return n=null!=t&&t.useLocaleWeeks?this.end.reconfigure({locale:i.locale}):this.end,n=n.startOf(e,t),Math.floor(n.diff(i,e).get(e))+(n.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&this.s<=e&&this.e>e}set({start:e,end:t}={}){return this.isValid?mi.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(ln).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),i=[];let{s:n}=this,s=0;for(;n<this.e;){const e=t[s]||this.e,r=+e>+this.e?this.e:e;i.push(mi.fromDateTimes(n,r)),n=r,s+=1}return i}splitBy(e){const t=pi.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let i,{s:n}=this,s=1;const r=[];for(;n<this.e;){const e=this.start.plus(t.mapUnits(e=>e*s));i=+e>+this.e?this.e:e,r.push(mi.fromDateTimes(n,i)),n=i,s+=1}return r}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e===+e.s}abutsEnd(e){return!!this.isValid&&+e.e===+this.s}engulfs(e){return!!this.isValid&&this.s<=e.s&&this.e>=e.e}equals(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,i=this.e<e.e?this.e:e.e;return t>=i?null:mi.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,i=this.e>e.e?this.e:e.e;return mi.fromDateTimes(t,i)}static merge(e){const[t,i]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],i)=>t?t.overlaps(i)||t.abutsStart(i)?[e,t.union(i)]:[e.concat([t]),i]:[e,i],[[],null]);return i&&t.push(i),t}static xor(e){let t=null,i=0;const n=[],s=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),r=Array.prototype.concat(...s).sort((e,t)=>e.time-t.time);for(const e of r)i+="s"===e.type?1:-1,1===i?t=e.time:(t&&+t!==+e.time&&n.push(mi.fromDateTimes(t,e.time)),t=null);return mi.merge(n)}difference(...e){return mi.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:gi}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=f,t={}){return this.isValid?vt.create(this.s.loc.clone(t),e).formatInterval(this):gi}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:gi}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:gi}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:gi}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:gi}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):pi.invalid(this.invalidReason)}mapEndpoints(e){return mi.fromDateTimes(e(this.s),e(this.e))}}class vi{static hasDST(e=fe.defaultZone){const t=an.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return F.isValidZone(e)}static normalizeZone(e){return se(e,fe.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||ee.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||ee.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||ee.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:n=null,outputCalendar:s="gregory"}={}){return(n||ee.create(t,i,s)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:n=null,outputCalendar:s="gregory"}={}){return(n||ee.create(t,i,s)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:n=null}={}){return(n||ee.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:n=null}={}){return(n||ee.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ee.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return ee.create(t,null,"gregory").eras(e)}static features(){return{relative:De(),localeWeek:Ue()}}}function yi(e,t){const i=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=i(t)-i(e);return Math.floor(pi.fromMillis(n).as("days"))}const Ei={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Si={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]},bi=Ei.hanidec.replace(/[\[|\]]/g,"").split("");function wi({numberingSystem:e},t=""){return new RegExp(`${Ei[e||"latn"]}${t}`)}function ki(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let i=0;i<e.length;i++){const n=e.charCodeAt(i);if(-1!==e[i].search(Ei.hanidec))t+=bi.indexOf(e[i]);else for(const e in Si){const[i,s]=Si[e];n>=i&&n<=s&&(t+=n-i)}}return parseInt(t,10)}return t}(e))}}const Ii=`[ ${String.fromCharCode(160)}]`,Ai=new RegExp(Ii,"g");function Ci(e){return e.replace(/\./g,"\\.?").replace(Ai,Ii)}function Oi(e){return e.replace(/\./g,"").replace(Ai," ").toLowerCase()}function Ti(e,t){return null===e?null:{regex:RegExp(e.map(Ci).join("|")),deser:([i])=>e.findIndex(e=>Oi(i)===Oi(e))+t}}function Ri(e,t){return{regex:e,deser:([,e,t])=>Ye(e,t),groups:t}}function Ni(e){return{regex:e,deser:([e])=>e}}const Li={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",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let Di=null;function Ui(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const i=Pi(vt.macroTokenToFormatOpts(e.val),t);return null==i||i.includes(void 0)?e:i}(e,t)))}function xi(e,t,i){const n=Ui(vt.parseFormat(i),e),s=n.map(t=>function(e,t){const i=wi(t),n=wi(t,"{2}"),s=wi(t,"{3}"),r=wi(t,"{4}"),o=wi(t,"{6}"),a=wi(t,"{1,2}"),l=wi(t,"{1,3}"),c=wi(t,"{1,6}"),u=wi(t,"{1,9}"),d=wi(t,"{2,4}"),h=wi(t,"{4,6}"),f=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},p=(p=>{if(e.literal)return f(p);switch(p.val){case"G":return Ti(t.eras("short"),0);case"GG":return Ti(t.eras("long"),0);case"y":return ki(c);case"yy":case"kk":return ki(d,Ge);case"yyyy":case"kkkk":return ki(r);case"yyyyy":return ki(h);case"yyyyyy":return ki(o);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return ki(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return ki(n);case"MMM":return Ti(t.months("short",!0),1);case"MMMM":return Ti(t.months("long",!0),1);case"LLL":return Ti(t.months("short",!1),1);case"LLLL":return Ti(t.months("long",!1),1);case"o":case"S":return ki(l);case"ooo":case"SSS":return ki(s);case"u":return Ni(u);case"uu":return Ni(a);case"uuu":case"E":case"c":return ki(i);case"a":return Ti(t.meridiems(),0);case"EEE":return Ti(t.weekdays("short",!1),1);case"EEEE":return Ti(t.weekdays("long",!1),1);case"ccc":return Ti(t.weekdays("short",!0),1);case"cccc":return Ti(t.weekdays("long",!0),1);case"Z":case"ZZ":return Ri(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return Ri(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return Ni(/[a-z_+-/]{1,256}?/i);case" ":return Ni(/[^\S\n\r]/);default:return f(p)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return p.token=e,p}(t,e)),r=s.find(e=>e.invalidReason);if(r)return{input:t,tokens:n,invalidReason:r.invalidReason};{const[e,i]=function(e){return[`^${e.map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"")}$`,e]}(s),r=RegExp(e,"i"),[a,l]=function(e,t,i){const n=e.match(t);if(n){const e={};let t=1;for(const s in i)if(Pe(i,s)){const r=i[s],o=r.groups?r.groups+1:1;!r.literal&&r.token&&(e[r.token.val[0]]=r.deser(n.slice(t,t+o))),t+=o}return[n,e]}return[n,{}]}(t,r,i),[c,u,d]=l?function(e){let t,i=null;return Re(e.z)||(i=F.create(e.z)),Re(e.Z)||(i||(i=new ie(e.Z)),t=e.Z),Re(e.q)||(e.M=3*(e.q-1)+1),Re(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),Re(e.u)||(e.S=Fe(e.u)),[Object.keys(e).reduce((t,i)=>{const n=(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}})(i);return n&&(t[n]=e[i]),t},{}),i,t]}(l):[null,null,void 0];if(Pe(l,"a")&&Pe(l,"H"))throw new o("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:n,regex:r,rawMatches:a,matches:l,result:c,zone:u,specificOffset:d}}}function Pi(e,t){if(!e)return null;const i=vt.create(t,e).dtFormatter((Di||(Di=an.fromMillis(1555555555555)),Di)),n=i.formatToParts(),s=i.resolvedOptions();return n.map(t=>function(e,t,i){const{type:n,value:s}=e;if("literal"===n){const e=/^\s+$/.test(s);return{literal:!e,val:e?" ":s}}const r=t[n];let o=n;"hour"===n&&(o=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":i.hour12?"hour12":"hour24");let a=Li[o];if("object"==typeof a&&(a=a[r]),a)return{literal:!1,val:a}}(t,e,s))}const Vi="Invalid DateTime",_i=864e13;function Mi(e){return new pe("unsupported zone",`the zone "${e.name}" is not supported`)}function ji(e){return null===e.weekData&&(e.weekData=we(e.c)),e.weekData}function qi(e){return null===e.localWeekData&&(e.localWeekData=we(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Fi(e,t){const i={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new an({...i,...t,old:i})}function $i(e,t,i){let n=e-60*t*1e3;const s=i.offset(n);if(t===s)return[n,t];n-=60*(s-t)*1e3;const r=i.offset(n);return s===r?[n,s]:[e-60*Math.min(s,r)*1e3,Math.max(s,r)]}function Bi(e,t){const i=new Date(e+=60*t*1e3);return{year:i.getUTCFullYear(),month:i.getUTCMonth()+1,day:i.getUTCDate(),hour:i.getUTCHours(),minute:i.getUTCMinutes(),second:i.getUTCSeconds(),millisecond:i.getUTCMilliseconds()}}function zi(e,t,i){return $i(We(e),t,i)}function Hi(e,t){const i=e.o,n=e.c.year+Math.trunc(t.years),s=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),r={...e.c,year:n,month:s,day:Math.min(e.c.day,He(n,s))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},o=pi.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=We(r);let[l,c]=$i(a,i,e.zone);return 0!==o&&(l+=o,c=e.zone.offset(l)),{ts:l,o:c}}function Wi(e,t,i,n,s,r){const{setZone:o,zone:a}=i;if(e&&0!==Object.keys(e).length||t){const n=t||a,s=an.fromObject(e,{...i,zone:n,specificOffset:r});return o?s:s.setZone(a)}return an.invalid(new pe("unparsable",`the input "${s}" can't be parsed as ${n}`))}function Ji(e,t,i=!0){return e.isValid?vt.create(ee.create("en-US"),{allowZ:i,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Zi(e,t){const i=e.c.year>9999||e.c.year<0;let n="";return i&&e.c.year>=0&&(n+="+"),n+=Me(e.c.year,i?6:4),t?(n+="-",n+=Me(e.c.month),n+="-",n+=Me(e.c.day)):(n+=Me(e.c.month),n+=Me(e.c.day)),n}function Gi(e,t,i,n,s,r){let o=Me(e.c.hour);return t?(o+=":",o+=Me(e.c.minute),0===e.c.millisecond&&0===e.c.second&&i||(o+=":")):o+=Me(e.c.minute),0===e.c.millisecond&&0===e.c.second&&i||(o+=Me(e.c.second),0===e.c.millisecond&&n||(o+=".",o+=Me(e.c.millisecond,3))),s&&(e.isOffsetFixed&&0===e.offset&&!r?o+="Z":e.o<0?(o+="-",o+=Me(Math.trunc(-e.o/60)),o+=":",o+=Me(Math.trunc(-e.o%60))):(o+="+",o+=Me(Math.trunc(e.o/60)),o+=":",o+=Me(Math.trunc(e.o%60)))),r&&(o+="["+e.zone.ianaName+"]"),o}const Ki={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Yi={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Xi={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Qi=["year","month","day","hour","minute","second","millisecond"],en=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],tn=["year","ordinal","hour","minute","second","millisecond"];function nn(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return function(e){const 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 a(e);return t}(e)}}function sn(e,t){const i=se(t.zone,fe.defaultZone),n=ee.fromObject(t),s=fe.now();let r,o;if(Re(e.year))r=s;else{for(const t of Qi)Re(e[t])&&(e[t]=Ki[t]);const t=Oe(e)||Te(e);if(t)return an.invalid(t);const n=i.offset(s);[r,o]=zi(e,n,i)}return new an({ts:r,zone:i,loc:n,o})}function rn(e,t,i){const n=!!Re(i.round)||i.round,s=(e,s)=>(e=$e(e,n||i.calendary?0:2,!0),t.loc.clone(i).relFormatter(i).format(e,s)),r=n=>i.calendary?t.hasSame(e,n)?0:t.startOf(n).diff(e.startOf(n),n).get(n):t.diff(e,n).get(n);if(i.unit)return s(r(i.unit),i.unit);for(const e of i.units){const t=r(e);if(Math.abs(t)>=1)return s(t,e)}return s(e>t?-0:0,i.units[i.units.length-1])}function on(e){let t,i={};return e.length>0&&"object"==typeof e[e.length-1]?(i=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[i,t]}class an{constructor(e){const t=e.zone||fe.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new pe("invalid input"):null)||(t.isValid?null:Mi(t));this.ts=Re(e.ts)?fe.now():e.ts;let n=null,s=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[n,s]=[e.old.c,e.old.o];else{const e=t.offset(this.ts);n=Bi(this.ts,e),i=Number.isNaN(n.year)?new pe("invalid input"):null,n=i?null:n,s=i?null:e}this._zone=t,this.loc=e.loc||ee.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=n,this.o=s,this.isLuxonDateTime=!0}static now(){return new an({})}static local(){const[e,t]=on(arguments),[i,n,s,r,o,a,l]=t;return sn({year:i,month:n,day:s,hour:r,minute:o,second:a,millisecond:l},e)}static utc(){const[e,t]=on(arguments),[i,n,s,r,o,a,l]=t;return e.zone=ie.utcInstance,sn({year:i,month:n,day:s,hour:r,minute:o,second:a,millisecond:l},e)}static fromJSDate(e,t={}){const i=(n=e,"[object Date]"===Object.prototype.toString.call(n)?e.valueOf():NaN);var n;if(Number.isNaN(i))return an.invalid("invalid input");const s=se(t.zone,fe.defaultZone);return s.isValid?new an({ts:i,zone:s,loc:ee.fromObject(t)}):an.invalid(Mi(s))}static fromMillis(e,t={}){if(Ne(e))return e<-_i||e>_i?an.invalid("Timestamp out of range"):new an({ts:e,zone:se(t.zone,fe.defaultZone),loc:ee.fromObject(t)});throw new l(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(Ne(e))return new an({ts:1e3*e,zone:se(t.zone,fe.defaultZone),loc:ee.fromObject(t)});throw new l("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=se(t.zone,fe.defaultZone);if(!i.isValid)return an.invalid(Mi(i));const n=ee.fromObject(t),s=Qe(e,nn),{minDaysInFirstWeek:r,startOfWeek:a}=Ce(s,n),l=fe.now(),c=Re(t.specificOffset)?i.offset(l):t.specificOffset,u=!Re(s.ordinal),d=!Re(s.year),h=!Re(s.month)||!Re(s.day),f=d||h,p=s.weekYear||s.weekNumber;if((f||u)&&p)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&u)throw new o("Can't mix ordinal dates with month/day");const g=p||s.weekday&&!f;let m,v,y=Bi(l,c);g?(m=en,v=Yi,y=we(y,r,a)):u?(m=tn,v=Xi,y=Ie(y)):(m=Qi,v=Ki);let E=!1;for(const e of m)Re(s[e])?s[e]=E?v[e]:y[e]:E=!0;const S=g?function(e,t=4,i=1){const n=Le(e.weekYear),s=_e(e.weekNumber,1,Ze(e.weekYear,t,i)),r=_e(e.weekday,1,7);return n?s?!r&&ve("weekday",e.weekday):ve("week",e.weekNumber):ve("weekYear",e.weekYear)}(s,r,a):u?function(e){const t=Le(e.year),i=_e(e.ordinal,1,ze(e.year));return t?!i&&ve("ordinal",e.ordinal):ve("year",e.year)}(s):Oe(s),b=S||Te(s);if(b)return an.invalid(b);const w=g?ke(s,r,a):u?Ae(s):s,[k,I]=zi(w,c,i),A=new an({ts:k,zone:i,o:I,loc:n});return s.weekday&&f&&e.weekday!==A.weekday?an.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${A.toISO()}`):A}static fromISO(e,t={}){const[i,n]=function(e){return bt(e,[Jt,Yt],[Zt,Xt],[Gt,Qt],[Kt,ei])}(e);return Wi(i,n,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,n]=function(e){return bt(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[qt,Ft])}(e);return Wi(i,n,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,n]=function(e){return bt(e,[$t,Ht],[Bt,Ht],[zt,Wt])}(e);return Wi(i,n,t,"HTTP",t)}static fromFormat(e,t,i={}){if(Re(e)||Re(t))throw new l("fromFormat requires an input string and a format");const{locale:n=null,numberingSystem:s=null}=i,r=ee.fromOpts({locale:n,numberingSystem:s,defaultToEN:!0}),[o,a,c,u]=function(e,t,i){const{result:n,zone:s,specificOffset:r,invalidReason:o}=xi(e,t,i);return[n,s,r,o]}(r,e,t);return u?an.invalid(u):Wi(o,a,i,`format ${t}`,e,c)}static fromString(e,t,i={}){return an.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,n]=function(e){return bt(e,[ii,Yt],[ni,si])}(e);return Wi(i,n,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new l("need to specify a reason the DateTime is invalid");const i=e instanceof pe?e:new pe(e,t);if(fe.throwOnInvalid)throw new n(i);return new an({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const i=Pi(e,ee.fromObject(t));return i?i.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return Ui(vt.parseFormat(e),ee.fromObject(t)).map(e=>e.val).join("")}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ji(this).weekYear:NaN}get weekNumber(){return this.isValid?ji(this).weekNumber:NaN}get weekday(){return this.isValid?ji(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?qi(this).weekday:NaN}get localWeekNumber(){return this.isValid?qi(this).weekNumber:NaN}get localWeekYear(){return this.isValid?qi(this).weekYear:NaN}get ordinal(){return this.isValid?Ie(this.c).ordinal:NaN}get monthShort(){return this.isValid?vi.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?vi.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?vi.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?vi.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,i=We(this.c),n=this.zone.offset(i-e),s=this.zone.offset(i+e),r=this.zone.offset(i-n*t),o=this.zone.offset(i-s*t);if(r===o)return[this];const a=i-r*t,l=i-o*t,c=Bi(a,r),u=Bi(l,o);return c.hour===u.hour&&c.minute===u.minute&&c.second===u.second&&c.millisecond===u.millisecond?[Fi(this,{ts:a}),Fi(this,{ts:l})]:[this]}get isInLeapYear(){return Be(this.year)}get daysInMonth(){return He(this.year,this.month)}get daysInYear(){return this.isValid?ze(this.year):NaN}get weeksInWeekYear(){return this.isValid?Ze(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Ze(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:n}=vt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:n}}toUTC(e=0,t={}){return this.setZone(ie.instance(e),t)}toLocal(){return this.setZone(fe.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if((e=se(e,fe.defaultZone)).equals(this.zone))return this;if(e.isValid){let n=this.ts;if(t||i){const t=e.offset(this.ts),i=this.toObject();[n]=zi(i,t,e)}return Fi(this,{ts:n,zone:e})}return an.invalid(Mi(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){return Fi(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=Qe(e,nn),{minDaysInFirstWeek:i,startOfWeek:n}=Ce(t,this.loc),s=!Re(t.weekYear)||!Re(t.weekNumber)||!Re(t.weekday),r=!Re(t.ordinal),a=!Re(t.year),l=!Re(t.month)||!Re(t.day),c=a||l,u=t.weekYear||t.weekNumber;if((c||r)&&u)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new o("Can't mix ordinal dates with month/day");let d;s?d=ke({...we(this.c,i,n),...t},i,n):Re(t.ordinal)?(d={...this.toObject(),...t},Re(t.day)&&(d.day=Math.min(He(d.year,d.month),d.day))):d=Ae({...Ie(this.c),...t});const[h,f]=zi(d,this.o,this.zone);return Fi(this,{ts:h,o:f})}plus(e){return this.isValid?Fi(this,Hi(this,pi.fromDurationLike(e))):this}minus(e){return this.isValid?Fi(this,Hi(this,pi.fromDurationLike(e).negate())):this}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const i={},n=pi.normalizeUnit(e);switch(n){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0}if("weeks"===n)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(i.weekNumber=this.weekNumber-1),i.weekday=e}else i.weekday=1;if("quarters"===n){const e=Math.ceil(this.month/3);i.month=3*(e-1)+1}return this.set(i)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?vt.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Vi}toLocaleString(e=f,t={}){return this.isValid?vt.create(this.loc.clone(t),e).formatDateTime(this):Vi}toLocaleParts(e={}){return this.isValid?vt.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:n=!0,extendedZone:s=!1}={}){if(!this.isValid)return null;const r="extended"===e;let o=Zi(this,r);return o+="T",o+=Gi(this,r,t,i,n,s),o}toISODate({format:e="extended"}={}){return this.isValid?Zi(this,"extended"===e):null}toISOWeekDate(){return Ji(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:n=!1,extendedZone:s=!1,format:r="extended"}={}){return this.isValid?(n?"T":"")+Gi(this,"extended"===r,t,e,i,s):null}toRFC2822(){return Ji(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ji(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Zi(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let n="HH:mm:ss.SSS";return(t||e)&&(i&&(n+=" "),t?n+="z":e&&(n+="ZZ")),Ji(this,n,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Vi}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",i={}){if(!this.isValid||!e.isValid)return pi.invalid("created by diffing an invalid DateTime");const n={locale:this.locale,numberingSystem:this.numberingSystem,...i},s=(a=t,Array.isArray(a)?a:[a]).map(pi.normalizeUnit),r=e.valueOf()>this.valueOf(),o=function(e,t,i,n){let[s,r,o,a]=function(e,t,i){const n=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const i=yi(e,t);return(i-i%7)/7}],["days",yi]],s={},r=e;let o,a;for(const[l,c]of n)i.indexOf(l)>=0&&(o=l,s[l]=c(e,t),a=r.plus(s),a>t?(s[l]--,(e=r.plus(s))>t&&(a=e,s[l]--,e=r.plus(s))):e=a);return[e,s,a,o]}(e,t,i);const l=t-s,c=i.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===c.length&&(o<t&&(o=s.plus({[a]:1})),o!==s&&(r[a]=(r[a]||0)+l/(o-s)));const u=pi.fromObject(r,n);return c.length>0?pi.fromMillis(l,n).shiftTo(...c).plus(u):u}(r?this:e,r?e:this,s,n);var a;return r?o.negate():o}diffNow(e="milliseconds",t={}){return this.diff(an.now(),e,t)}until(e){return this.isValid?mi.fromDateTimes(this,e):this}hasSame(e,t,i){if(!this.isValid)return!1;const n=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t,i)<=n&&n<=s.endOf(t,i)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||an.fromObject({},{zone:this.zone}),i=e.padding?this<t?-e.padding:e.padding:0;let n=["years","months","days","hours","minutes","seconds"],s=e.unit;return Array.isArray(e.unit)&&(n=e.unit,s=void 0),rn(t,this.plus(i),{...e,numeric:"always",units:n,unit:s})}toRelativeCalendar(e={}){return this.isValid?rn(e.base||an.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(an.isDateTime))throw new l("min requires all arguments be DateTimes");return xe(e,e=>e.valueOf(),Math.min)}static max(...e){if(!e.every(an.isDateTime))throw new l("max requires all arguments be DateTimes");return xe(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:n=null,numberingSystem:s=null}=i;return xi(ee.fromOpts({locale:n,numberingSystem:s,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,i={}){return an.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return f}static get DATE_MED(){return p}static get DATE_MED_WITH_WEEKDAY(){return g}static get DATE_FULL(){return m}static get DATE_HUGE(){return v}static get TIME_SIMPLE(){return y}static get TIME_WITH_SECONDS(){return E}static get TIME_WITH_SHORT_OFFSET(){return S}static get TIME_WITH_LONG_OFFSET(){return b}static get TIME_24_SIMPLE(){return w}static get TIME_24_WITH_SECONDS(){return k}static get TIME_24_WITH_SHORT_OFFSET(){return I}static get TIME_24_WITH_LONG_OFFSET(){return A}static get DATETIME_SHORT(){return C}static get DATETIME_SHORT_WITH_SECONDS(){return O}static get DATETIME_MED(){return T}static get DATETIME_MED_WITH_SECONDS(){return R}static get DATETIME_MED_WITH_WEEKDAY(){return N}static get DATETIME_FULL(){return L}static get DATETIME_FULL_WITH_SECONDS(){return D}static get DATETIME_HUGE(){return U}static get DATETIME_HUGE_WITH_SECONDS(){return x}}function ln(e){if(an.isDateTime(e))return e;if(e&&e.valueOf&&Ne(e.valueOf()))return an.fromJSDate(e);if(e&&"object"==typeof e)return an.fromObject(e);throw new l(`Unknown datetime argument: ${e}, of type ${typeof e}`)}t.DateTime=an,t.Duration=pi,t.FixedOffsetZone=ie,t.IANAZone=F,t.Info=vi,t.Interval=mi,t.InvalidZone=ne,t.Settings=fe,t.SystemZone=_,t.VERSION="3.4.4",t.Zone=P},566(e,t,i){"use strict";var n=i(684);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!n(e)}},23(e,t,i){"use strict";var n=i(265),s={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!n(e)&&hasOwnProperty.call(s,typeof e)}},131(e,t,i){"use strict";var n=i(566),s=/^\s*class[\s{/}]/,r=Function.prototype.toString;e.exports=function(e){return!!n(e)&&!s.test(r.call(e))}},684(e,t,i){"use strict";var n=i(23);e.exports=function(e){if(!n(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},265(e){"use strict";e.exports=function(e){return null!=e}},960(e,t,i){"use strict";i.r(t),i.d(t,{v1:()=>f,v3:()=>b,v4:()=>w,v5:()=>A});var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),s=new Uint8Array(16);function r(){if(!n)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(s)}for(var o=[],a=0;a<256;++a)o[a]=(a+256).toString(16).substr(1);const l=function(e,t){var i=t||0,n=o;return[n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]]].join("")};var c,u,d=0,h=0;const f=function(e,t,i){var n=t&&i||0,s=t||[],o=(e=e||{}).node||c,a=void 0!==e.clockseq?e.clockseq:u;if(null==o||null==a){var f=e.random||(e.rng||r)();null==o&&(o=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 p=void 0!==e.msecs?e.msecs:(new Date).getTime(),g=void 0!==e.nsecs?e.nsecs:h+1,m=p-d+(g-h)/1e4;if(m<0&&void 0===e.clockseq&&(a=a+1&16383),(m<0||p>d)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=p,h=g,u=a;var v=(1e4*(268435455&(p+=122192928e5))+g)%4294967296;s[n++]=v>>>24&255,s[n++]=v>>>16&255,s[n++]=v>>>8&255,s[n++]=255&v;var y=p/4294967296*1e4&268435455;s[n++]=y>>>8&255,s[n++]=255&y,s[n++]=y>>>24&15|16,s[n++]=y>>>16&255,s[n++]=a>>>8|128,s[n++]=255&a;for(var E=0;E<6;++E)s[n+E]=o[E];return t||l(s)};function p(e,t,i){var n=function(e,n,s,r){var o=s&&r||0;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=new Array(e.length),i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t}(e)),"string"==typeof n&&(n=function(e){var t=[];return e.replace(/[a-fA-F0-9]{2}/g,function(e){t.push(parseInt(e,16))}),t}(n)),!Array.isArray(e))throw TypeError("value must be an array of bytes");if(!Array.isArray(n)||16!==n.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var a=i(n.concat(e));if(a[6]=15&a[6]|t,a[8]=63&a[8]|128,s)for(var c=0;c<16;++c)s[o+c]=a[c];return s||l(a)};try{n.name=e}catch(e){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}function g(e,t){var i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function m(e,t,i,n,s,r){return g((o=g(g(t,e),g(n,r)))<<(a=s)|o>>>32-a,i);var o,a}function v(e,t,i,n,s,r,o){return m(t&i|~t&n,e,t,s,r,o)}function y(e,t,i,n,s,r,o){return m(t&n|i&~n,e,t,s,r,o)}function E(e,t,i,n,s,r,o){return m(t^i^n,e,t,s,r,o)}function S(e,t,i,n,s,r,o){return m(i^(t|~n),e,t,s,r,o)}const b=p("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Array(t.length);for(var i=0;i<t.length;i++)e[i]=t.charCodeAt(i)}return function(e){var t,i,n,s=[],r=32*e.length,o="0123456789abcdef";for(t=0;t<r;t+=8)i=e[t>>5]>>>t%32&255,n=parseInt(o.charAt(i>>>4&15)+o.charAt(15&i),16),s.push(n);return s}(function(e,t){var i,n,s,r,o;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var a=1732584193,l=-271733879,c=-1732584194,u=271733878;for(i=0;i<e.length;i+=16)n=a,s=l,r=c,o=u,a=v(a,l,c,u,e[i],7,-680876936),u=v(u,a,l,c,e[i+1],12,-389564586),c=v(c,u,a,l,e[i+2],17,606105819),l=v(l,c,u,a,e[i+3],22,-1044525330),a=v(a,l,c,u,e[i+4],7,-176418897),u=v(u,a,l,c,e[i+5],12,1200080426),c=v(c,u,a,l,e[i+6],17,-1473231341),l=v(l,c,u,a,e[i+7],22,-45705983),a=v(a,l,c,u,e[i+8],7,1770035416),u=v(u,a,l,c,e[i+9],12,-1958414417),c=v(c,u,a,l,e[i+10],17,-42063),l=v(l,c,u,a,e[i+11],22,-1990404162),a=v(a,l,c,u,e[i+12],7,1804603682),u=v(u,a,l,c,e[i+13],12,-40341101),c=v(c,u,a,l,e[i+14],17,-1502002290),a=y(a,l=v(l,c,u,a,e[i+15],22,1236535329),c,u,e[i+1],5,-165796510),u=y(u,a,l,c,e[i+6],9,-1069501632),c=y(c,u,a,l,e[i+11],14,643717713),l=y(l,c,u,a,e[i],20,-373897302),a=y(a,l,c,u,e[i+5],5,-701558691),u=y(u,a,l,c,e[i+10],9,38016083),c=y(c,u,a,l,e[i+15],14,-660478335),l=y(l,c,u,a,e[i+4],20,-405537848),a=y(a,l,c,u,e[i+9],5,568446438),u=y(u,a,l,c,e[i+14],9,-1019803690),c=y(c,u,a,l,e[i+3],14,-187363961),l=y(l,c,u,a,e[i+8],20,1163531501),a=y(a,l,c,u,e[i+13],5,-1444681467),u=y(u,a,l,c,e[i+2],9,-51403784),c=y(c,u,a,l,e[i+7],14,1735328473),a=E(a,l=y(l,c,u,a,e[i+12],20,-1926607734),c,u,e[i+5],4,-378558),u=E(u,a,l,c,e[i+8],11,-2022574463),c=E(c,u,a,l,e[i+11],16,1839030562),l=E(l,c,u,a,e[i+14],23,-35309556),a=E(a,l,c,u,e[i+1],4,-1530992060),u=E(u,a,l,c,e[i+4],11,1272893353),c=E(c,u,a,l,e[i+7],16,-155497632),l=E(l,c,u,a,e[i+10],23,-1094730640),a=E(a,l,c,u,e[i+13],4,681279174),u=E(u,a,l,c,e[i],11,-358537222),c=E(c,u,a,l,e[i+3],16,-722521979),l=E(l,c,u,a,e[i+6],23,76029189),a=E(a,l,c,u,e[i+9],4,-640364487),u=E(u,a,l,c,e[i+12],11,-421815835),c=E(c,u,a,l,e[i+15],16,530742520),a=S(a,l=E(l,c,u,a,e[i+2],23,-995338651),c,u,e[i],6,-198630844),u=S(u,a,l,c,e[i+7],10,1126891415),c=S(c,u,a,l,e[i+14],15,-1416354905),l=S(l,c,u,a,e[i+5],21,-57434055),a=S(a,l,c,u,e[i+12],6,1700485571),u=S(u,a,l,c,e[i+3],10,-1894986606),c=S(c,u,a,l,e[i+10],15,-1051523),l=S(l,c,u,a,e[i+1],21,-2054922799),a=S(a,l,c,u,e[i+8],6,1873313359),u=S(u,a,l,c,e[i+15],10,-30611744),c=S(c,u,a,l,e[i+6],15,-1560198380),l=S(l,c,u,a,e[i+13],21,1309151649),a=S(a,l,c,u,e[i+4],6,-145523070),u=S(u,a,l,c,e[i+11],10,-1120210379),c=S(c,u,a,l,e[i+2],15,718787259),l=S(l,c,u,a,e[i+9],21,-343485551),a=g(a,n),l=g(l,s),c=g(c,r),u=g(u,o);return[a,l,c,u]}(function(e){var t,i=[];for(i[(e.length>>2)-1]=void 0,t=0;t<i.length;t+=1)i[t]=0;var n=8*e.length;for(t=0;t<n;t+=8)i[t>>5]|=(255&e[t/8])<<t%32;return i}(e),8*e.length))}),w=function(e,t,i){var n=t&&i||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var o=0;o<16;++o)t[n+o]=s[o];return t||l(s)};function k(e,t,i,n){switch(e){case 0:return t&i^~t&n;case 1:case 3:return t^i^n;case 2:return t&i^t&n^i&n}}function I(e,t){return e<<t|e>>>32-t}const A=p("v5",80,function(e){var t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var n=unescape(encodeURIComponent(e));e=new Array(n.length);for(var s=0;s<n.length;s++)e[s]=n.charCodeAt(s)}e.push(128);var r=e.length/4+2,o=Math.ceil(r/16),a=new Array(o);for(s=0;s<o;s++){a[s]=new Array(16);for(var l=0;l<16;l++)a[s][l]=e[64*s+4*l]<<24|e[64*s+4*l+1]<<16|e[64*s+4*l+2]<<8|e[64*s+4*l+3]}for(a[o-1][14]=8*(e.length-1)/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=8*(e.length-1)&4294967295,s=0;s<o;s++){for(var c=new Array(80),u=0;u<16;u++)c[u]=a[s][u];for(u=16;u<80;u++)c[u]=I(c[u-3]^c[u-8]^c[u-14]^c[u-16],1);var d=i[0],h=i[1],f=i[2],p=i[3],g=i[4];for(u=0;u<80;u++){var m=Math.floor(u/20),v=I(d,5)+k(m,h,f,p)+g+t[m]+c[u]>>>0;g=p,p=f,f=I(h,30)>>>0,h=d,d=v}i[0]=i[0]+d>>>0,i[1]=i[1]+h>>>0,i[2]=i[2]+f>>>0,i[3]=i[3]+p>>>0,i[4]=i[4]+g>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]})},542(e,t,i){function n(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function s(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?n(Object(i),!0).forEach(function(t){r(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function r(e,t,i){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function o(e,t,i,n,s,r,o){try{var a=e[r](o),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(n,s)}function a(e){return function(){var t=this,i=arguments;return new Promise(function(n,s){var r=e.apply(t,i);function a(e){o(r,n,s,a,l,"next",e)}function l(e){o(r,n,s,a,l,"throw",e)}a(void 0)})}}var l;self,l=()=>(()=>{"use strict";var e={n:t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return e.d(i,{a:i}),i},d:(t,i)=>{for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},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:()=>Y,BrowserNotification:()=>p,Decorator:()=>m,Err:()=>g,Evt:()=>C,I18N:()=>x,Logger:()=>d,NotificationItemsContent:()=>P,Notifications:()=>$,Signal:()=>B,clearInterval:()=>Q,clearTimeout:()=>ee,createBrowserNotifications:()=>y,createHttp:()=>U,createLogger:()=>f,createNotifications:()=>W,ensureError:()=>ne,setInterval:()=>te,setTimeout:()=>ie});var n=i(322),r=e.n(n),o=i(327),l="*********",c=["authorization"];class u{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){var t=e;Object.keys(e).forEach(i=>{"object"==typeof e[i]&&null!==e[i]?this.maskObjectProperty(e[i]):t[i]=l})}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]=l)})}maskAuthorizationValues(e){if(e&&"object"==typeof e)if(Array.isArray(e))e.forEach(e=>this.maskAuthorizationValues(e));else{var t=e,i=/\b[A-Za-z0-9-_]{1,15000}\.[A-Za-z0-9-_]{1,15000}\.[A-Za-z0-9-_]{1,15000}\b/g,n=new RegExp("\\b(".concat(c.join("|"),")\\s*:\\s*[A-Za-z0-9-_.]+"),"gi");for(var[s,r]of Object.entries(t))if("object"!=typeof r||r instanceof Date){if(c.includes(s.toLowerCase()))t[s]=l;else if("string"==typeof r){var o=r.replace(n,"$1: ".concat(l));o.includes("eyJ")&&(o=o.replace(i,l)),t[s]=o}}else this.maskAuthorizationValues(r)}}maskPIIInformation(e){var t=e[e.length-1],i="string"==typeof t?this.tryJSONParse(t):this.copiedObj(t);i&&"object"==typeof i&&(this.maskAuthorizationValues(i),this.maskLogData(i),e.splice(e.length-1,1,i))}}var d,h=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.map(e=>"string"==typeof e?e:JSON.stringify(e))};function f(e,t){var i=new d.Service(e,t);return d.POOL.addLogger(i),i}!function(e){e.MAX_LOGS_SIZE=1048576,e.LS_LOGS_KEY="uuip-client-logs";var t,i="<uuip-eol>",n=/[\u0100-\uFFFF]/g,s="yyyy-LL-dd HH:mm:ss:SSS";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"}(t=e.Level||(e.Level={})),e.Service=class{constructor(e,t){this.loggerEmitter=r()(),this.prefix=e,this.maskKeys=t}log(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];this.maskKeys&&"object"==typeof this.maskKeys&&((e,t)=>{new u(t).maskPIIInformation(e)})(n,this.maskKeys);var a=h(this.prefix?["".concat(this.prefix),...n]:n),l=Date.now(),c=o.DateTime.fromMillis(l).toFormat(s);switch(t){case e.Level.Trace:console.info(c,...a);break;case e.Level.Debug:console.log(c,...a);break;case e.Level.Warn:console.warn(c,...a);break;case e.Level.Error:case e.Level.Fatal:console.error(c,...a);break;default:console.log(...a)}var d={pfx:this.prefix,msgs:[...n],ts:l,lvl:t};this.emit("add",d)}info(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];this.log(t.Trace,...i)}debug(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];this.log(t.Debug,...i)}warn(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];this.log(t.Warn,...i)}error(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];this.log(t.Error,...i)}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this.loggerEmitter.emit(e,...i)}addEventListener(e,t){return this.loggerEmitter.on(e,t),()=>{this.removeEventListener(e,t)}}removeEventListener(e,t){this.loggerEmitter.off(e,t)}};class a{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(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.length;if(t){var i=e.replace(n,"").length;return 1*i+2*(t-i)}return t}get serializedJsonLogsBytesSize(){var e=this.logsCollectionString.split(i).length;return 2+this.logRecordsSerializedLength+1*(e-1)}save(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=Date.now();t&&i-this.lastSaveTime<this.config.saveIntervalMilliSeconds||(this.lastSaveTime=i,window.sessionStorage.setItem(e.LS_LOGS_KEY,this.logsCollectionString))}restore(){try{var t=window.sessionStorage.getItem(e.LS_LOGS_KEY)||"";this.logsCollectionString=t,this.logRecordsSerializedLength+=a.getSerializedJsonLogRecordBytesSize(this.logsCollectionString),this.restorePreFixedLogs()}catch(e){console.warn("Logger failed read logs from sessionStorage: ",e)}}getLogObjectFromString(){try{if(""!==this.logsCollectionString)return JSON.parse("[".concat(this.logsCollectionString.split(i).join(","),"]"))}catch(e){console.log("Error parsing local storage data")}return{}}restorePreFixedLogs(){var 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,i){return"".concat(e.slice(0,t)).concat(e.slice(i+t))}addLogRecord(e){try{var t=JSON.stringify(e),n=this.logsCollectionString;this.logsCollectionString=null==n?void 0:n.concat("".concat(""!==n.trim()?i:"").concat(t))}catch(t){var s=JSON.stringify(e);this.logsCollectionString=s,console.warn("Logger failed read logs from sessionStorage: ",t)}this.logRecordsSerializedLength+=a.getSerializedJsonLogRecordBytesSize(JSON.stringify(e)),this.addPreFixedLogs(e),this.removeOversized()}removeLogRecord(){if(""!==this.logsCollectionString){var e=this.logsCollectionString.indexOf(i);if(-1!==e){var t=this.logsCollectionString.substring(0,e),n=e+10,s=this.removeTextFromString(this.logsCollectionString,0,n);this.logsCollectionString=s,this.logRecordsSerializedLength-=a.getSerializedJsonLogRecordBytesSize(t);try{var r=JSON.parse(t);this.prefixedLogsCollections[r.pfx]&&this.prefixedLogsCollections[r.pfx].forEach(e=>{e.ts===r.ts&&this.prefixedLogsCollections[r.pfx].delete(e)})}catch(e){console.warn("Logger failed to read/parse the first logs from sessionStorage: ",e)}}}}removePreFixedLogs(e){var t=this.getLogObjectFromString();e.forEach(e=>{var i=t.findIndex(t=>t.pfx===e.pfx);-1!==i&&(t.splice(i,1),this.logRecordsSerializedLength-=a.getSerializedJsonLogRecordBytesSize(JSON.stringify(e)),this.prefixedLogsCollections[e.pfx]&&this.prefixedLogsCollections[e.pfx].has(e)&&this.prefixedLogsCollections[e.pfx].delete(e))}),this.logsCollectionString=t.map(e=>JSON.stringify(e)).join(i)}static getLogRecordReadable(e){return e.ts?{prefix:e.pfx,messages:e.msgs,timestamp:o.DateTime.fromMillis(e.ts).toFormat(s),level:t[e.lvl]}:{}}static getLogsReadableJson(e){var t=e=>e.map(e=>a.getLogRecordReadable(e));return JSON.stringify(Array.isArray(e)?t(e):Object.keys(e).reduce((i,n)=>(i[n]=t(e[n]),i),{}),null,2)}static getLogsReadableText(e){var t=e=>e.reduce((e,t)=>{var i=a.getLogRecordReadable(t);return i&&(e+="".concat(i.timestamp," ").concat(i.prefix," ").concat(i.level," ").concat(h(i.messages).join(" ")," \r\n")),e},"");return Array.isArray(e)?t(e):Object.keys(e).reduce((i,n)=>(i+='[SERVICE "'.concat(n,'" LOGS]: '))+t(e[n]),"")}static getLogsUrl(e){return"data:text/plain;charset=utf-8,".concat(encodeURIComponent(e))}static browserDownload(e,t){try{if(document&&document.createElement){var i=document.createElement("a");i.setAttribute("href",e),i.setAttribute("download",t),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)}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 a.getLogsUrl(a.getLogsReadableJson(this.getLogObjectFromString()))}getAllPrefixedLogsJsonUrl(){return a.getLogsUrl(a.getLogsReadableJson(this.getAllPrefixedLogsCollections()))}getPrefixedLogsJsonUrl(e){return a.getLogsUrl(a.getLogsReadableJson(this.getPrefixedLogsCollection(e)))}getAllLogsTextUrl(){return a.getLogsUrl(a.getLogsReadableText(this.getLogObjectFromString()))}getPrefixedLogsTextUrl(e){return a.getLogsUrl(a.getLogsReadableText(this.getPrefixedLogsCollection(e)))}browserDownloadAllLogsJson(){a.browserDownload(this.getAllLogsJsonUrl(),"".concat(new Date,"_all_logs.json"))}browserDownloadAllPrefixedLogsJson(){a.browserDownload(this.getAllPrefixedLogsJsonUrl(),"".concat(new Date,"_all_prefixed_logs.json"))}browserDownloadPrefixedLogsJson(e){a.browserDownload(this.getPrefixedLogsJsonUrl(e),"".concat(new Date,"_").concat(e,"_logs.json"))}browserDownloadAllLogsText(){a.browserDownload(this.getAllLogsTextUrl(),"".concat(new Date,"_all_logs.log"))}browserDownloadPrefixedLogsText(e){a.browserDownload(this.getPrefixedLogsTextUrl(e),"".concat(new Date,"_").concat(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){var 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=a,e.POOL=new e.ServicesPool}(d||(d={}));var p,g,m,v=f("unified-ui-platform-sdk",{title:!0,text:!0});function y(e){return new p.Service(e)}function E(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;var i=e.descriptor.value,n=e.target.constructor.name;return e.descriptor.value=function(){for(var e=[],s=0;s<arguments.length;s++)e[s]=arguments[s];return t.call(this,i,e,n)},e.descriptor}function S(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;return function(t,i,n){var s;return E({target:t,key:i,descriptor:n},function(t,i){clearTimeout(s),s=window.setTimeout(()=>{clearTimeout(s),t.apply(this,i)},e)})}}function b(){return(e,t)=>{var i={get(){return new C(this,void 0!==t?t:e.key)},enumerable:!0,configurable:!0};return void 0!==t?Object.defineProperty(e,t,i):{kind:"method",placement:"prototype",key:e.key,descriptor:i}}}function w(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(i,n,s){return E({target:i,key:n,descriptor:s},function(){var i=a(function*(i,s){var r="_".concat(n,"_exec_flag");if(!t||!this[r]){var o=t=>{if(this[r]=t,"function"==typeof e)e.call(this,{isExec:t,ctx:this});else{var i=e;t?i.before&&i.before.call(this,this):i.after&&i.after.call(this,this)}};o(!0);var a=i.apply(this,s);a instanceof Promise?a.then(()=>o(!1)).catch(()=>o(!1)):(console.warn("Must be async function to use [@Executing] decorator"),o(!1))}});return function(e,t){return i.apply(this,arguments)}}())}}function k(e){return function(t,i,n){return E({target:t,key:i,descriptor:n},function(){var t=a(function*(t,n,s){var r=this,o=function(){var t=a(function*(t){t.id&&"string"==typeof t.id&&"yes"===t.isErr||("string"==typeof t||t instanceof Error?t=new g.Message("system",t):(console.warn("Err must be 'string' or 'new Error()' instance"),t=new g.Message("system","")));var n=t;n.ctx=r;var o="Error] ".concat(s,".").concat(i," [").concat(n.id,"]: ").concat(n.message);if("function"==typeof e){var a=e;console.log("[Handled".concat(o));var l=a.call(r,n);l instanceof Promise&&(yield l)}else{var c=e;if(c[n.id]){console.log("[Handled".concat(o));var u=c[n.id].call(r,n);u instanceof Promise&&(yield u)}else if(c.handle){console.log("[Handled".concat(o));var d=c.handle.call(r,n);d instanceof Promise&&(yield d)}else console.warn("[Unhandled ".concat(o));if(c.fallback){var h=c.fallback.call(r,n);h instanceof Promise&&(yield h)}}});return function(e){return t.apply(this,arguments)}}();try{var l=t.apply(r,n);return l instanceof Promise?new Promise(e=>{l.then(e).catch(function(){var t=a(function*(t){yield o(t),e(void 0)});return function(e){return t.apply(this,arguments)}}())}):l}catch(e){return void(yield o(e))}});return function(e,i,n){return t.apply(this,arguments)}}())}}function I(){return function(e,t,i){return E({target:e,key:t,descriptor:i},function(e,i){var n="_".concat(t,"_once_flag");this[n]||(this[n]=!0,e.call(this,i))})}}function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3/60;return function(t,i,n){var s,r=Date.now();return E({target:t,key:i,descriptor:n},function(t,i){var n=this,o=function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];var c=Date.now();window.clearTimeout(s),!r||c-r>=e?(r=c,t.apply(n,a)):s=window.setTimeout(()=>o(...a),e-(c-r))};o(...i)})}}!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(){var e=this;return a(function*(){e.isBrowserNotificationSupported?t.isBrowserNotificationPromiseSupported?yield window.Notification.requestPermission():yield new Promise(e=>window.Notification.requestPermission(t=>e(t))):v.warn("Browser notification is not supported...")})()}fire(e,t){return new window.Notification(e,s(s({},this.defaultOptions),t||{}))}}e.Service=t}(p||(p={})),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 i extends Error{constructor(e,t){super(),this.isErr="yes",this.id=e,this.stack=(new Error).stack,this.details=t}}e.Details=i}(g||(g={})),function(e){e.Debounce=S,e.Evt=b,e.Exec=w,e.Handle=k,e.Once=I,e.Throttle=A}(m||(m={}));class C{constructor(e,t){this.target=e,this.eventName=t}emit(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{bubbles:!0,composed:!0,cancelable:!1};this.target.dispatchEvent(new CustomEvent(this.eventName,s({detail:e},t)))}}var O=i(901),T=e.n(O),R=i(960),N="uuip",L="1.0",D="1.0";function U(e){var t=T().create();return t.accessToken=e,t.interceptors.request.use(e=>{if(!e.headers.Authorization&&t.accessToken&&(e.headers.Authorization="Bearer ".concat(t.accessToken)),!e.headers.TrackingID){var i=(0,R.v1)();e.headers.TrackingID="".concat(N,"_").concat(i,"_").concat(L,":").concat(D)}return e.headers["Content-Type"]||(e.headers["Content-Type"]="application/json"),e}),t}var x,P,V=i(545),_=e.n(V),M=i(176),j=e.n(M),q=i(855),F=e.n(q);!function(e){e.createService=e=>{var t=_().createInstance(),i=e&&e.backend?e.backend:new(F());t.use(i);var n=e&&e.languageDetector?e.languageDetector:new(j());return t.use(n),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=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Object.assign.call(null,{},...t)},e.createMixin=t=>{var i="i18n"in t?t.i18n:e.createService(),n="i18nInitOptions"in t?t.i18nInitOptions:null;n||v.info("i18n mixin instance waiting service initialization outside...");var s=!1;return e=>class extends e{constructor(){super(...arguments),this.onI18NInitialized=e=>this.requestUpdate(),this.onI18NLanguageChanged=e=>this.requestUpdate(),this.t=_().t.bind(i)}connectedCallback(){super.connectedCallback&&super.connectedCallback(),i.on("initialized",this.onI18NInitialized),i.on("languageChanged",this.onI18NLanguageChanged),i.isInitialized||s||!n||(s=!0,i.init(n).finally(()=>s=!1))}disconnectedCallback(){i.off("initialized",this.onI18NInitialized),i.off("languageChanged",this.onI18NLanguageChanged),super.disconnectedCallback&&super.disconnectedCallback()}}}}(x||(x={})),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={}));var $,B,z=i(497),H=e.n(z);function W(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new $.Service;return t.updateConfig(e),t}!function(e){var t,i;!function(e){var t,i,n;!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"}(i=e.Mode||(e.Mode={})),e.MODES=Object.values(i),function(e){e.Added="added",e.Pended="pended",e.Activated="activated",e.Deactivated="deactivated",e.Removed="removed"}(n=e.Status||(e.Status={})),e.StatusWeight={[n.Added]:0,[n.Pended]:1,[n.Activated]:2,[n.Deactivated]:3,[n.Removed]:4},e.STATUSES=Object.values(n),function(e){e.User="user_add"}(e.AddEventReason||(e.AddEventReason={})),function(e){e.ServiceAutoPropagate="service_auto_propagate_pending",e.ServiceAutoDismiss="service_autodismiss_pending",e.UserSilent="user_silent_pending"}(e.PendingEventReason||(e.PendingEventReason={})),function(e){e.ServiceAutoPropagate="service_auto_propagate_activate"}(e.ActivateEventReason||(e.ActivateEventReason={})),function(e){e.UserNegative="user_negative_deactivate",e.UserPositive="user_positive_deactivate",e.UserNeutral="user_neutral_deactivate"}(e.DeactivateEventReason||(e.DeactivateEventReason={})),function(e){e.User="user_remove"}(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}(i=e.ServiceMeta||(e.ServiceMeta={}));class n{constructor(){this.hubEmitter=r()()}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this.hubEmitter.emit(e,...i)}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(){H()(this.hubEmitter)}}e.Item=class{get status(){return this._status}get reason(){return this._reason}get mode(){return this._mode}validateAuxOptions(e){var i={};return e&&void 0!==e.AUTO_DISMISS_TIMEOUT&&this.mode===t.Mode.AutoDismiss&&(i=s(s({},i),{},{AUTO_DISMISS_TIMEOUT:e.AUTO_DISMISS_TIMEOUT})),i}constructor(e,i){this._serviceHubSubscriptions=[],this._itemEmitter=r()();var{type:n,mode:s,title:a,data:l,timestamp:c}=e.data;this.type=n,this.title=a,this.data=l,this._mode=s,this.timestamp=c||(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||{})),i&&(this._serviceHubAdapter=i,this._status=t.Status.Added,this._reason=t.AddEventReason.User,this.bindItemHubListeners())}bindItemHubListeners(){if(this._serviceHubAdapter){var e=(e,i,n)=>{this.timestamp in e&&(this._status=i,this._reason=n,i===t.Status.Removed&&(this.unbindItemHubListeners(),this.removeAllEventListeners()),this.emit("statusUpdate",i,n))};this._serviceHubAdapter.addEventListener("statusServiceUpdateResponse",e),this._serviceHubSubscriptions.push(()=>{var t;null===(t=this._serviceHubAdapter)||void 0===t||t.removeEventListener("statusServiceUpdateResponse",e)});var i=(e,t)=>{this.timestamp in e&&(this._mode=t,this.emit("modeUpdate",t))};this._serviceHubAdapter.addEventListener("modeStatusUpdateResponse",i),this._serviceHubSubscriptions.push(()=>{var e;null===(e=this._serviceHubAdapter)||void 0===e||e.removeEventListener("modeStatusUpdateResponse",i)})}}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):v.warn("Service hub adapter is not initialized for this notification item instance: ",this):v.warn('Notification should have "'.concat(t.Status.Pended,'" or "').concat(t.Status.Activated,'" status to be able change status to "').concat(t.Status.Deactivated,'".Current notification status is "').concat(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):v.warn("Service hub adapter is not initialized for this notification item instance: ",this):v.warn('Notification should have "'.concat(t.Status.Activated,'" status or not "').concat(t.Mode.Silent,'" mode, to be able change status to "').concat(t.Status.Pended,'" and mode to "').concat(t.Mode.Silent,'".Current notification status is "').concat(this._status,'" and mode is "').concat(this.mode,'". Ignoring this change'))}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this._itemEmitter.emit(e,...i)}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(){H()(this._itemEmitter)}};var a=function(e,t){return[...e,...t].sort(arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>0)},l=(e,t)=>e.reduce((e,i)=>(-1===t.indexOf(i)&&e.push(i),e),[]);class c{constructor(){this.emitter=r()(),this.map={},this.status=c.createStatus(),this.serviceConfig={DISABLED_ITEM_MODE:s({},i.DISABLED_ITEM_MODE),ACTIVATED_ITEM_MODE_LIMIT:s({},i.ACTIVATED_ITEM_MODE_LIMIT),AUTO_DISMISS_TIMEOUT:i.AUTO_DISMISS_TIMEOUT},this.activeAutoDismissTimeoutRefs={},this.serviceHubAdapter=new n,this.bindServiceHubEvents()}static mergeConfig(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];if(!i.length)return e;var s=i.shift(),r=e=>e&&"object"==typeof e&&!Array.isArray(e);if(r(e)&&r(s))for(var o in s)r(s[o])?(e[o]||Object.assign(e,{[o]:{}}),this.mergeConfig(e[o],s[o])):Object.assign(e,{[o]:s[o]});return this.mergeConfig(e,...i)}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([],s(s({ids:[]},this.createStatusHolderSubCollections(t.MODES)),this.createStatusHolderSubCollections(t.TYPES)))}static createStatusHolderSubCollections(e){return s({},e.reduce((e,t)=>(e[t]=[],e),{}))}updateNotificationsCollections(){var e=c.createStatus();this.status.added.ids.forEach(i=>{var n=this.map[i];t.STATUSES.forEach(t=>{-1!==this.status[t].ids.indexOf(n.timestamp)&&(e[t].push(n),e[t].ids.push(i),e[t][n.mode].push(n),e[t][n.type].push(n))})}),this.status=e}setAutoDismiss(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};this.prepareUpdateNotifications(e).forEach(e=>{var n;e.mode===t.Mode.AutoDismiss&&(this.activeAutoDismissTimeoutRefs[e.timestamp]=window.setTimeout(()=>i(e),null!==(n=e.options.AUTO_DISMISS_TIMEOUT)&&void 0!==n?n:this.serviceConfig.AUTO_DISMISS_TIMEOUT))})}removeAutoDismiss(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};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,i){var n=Array.isArray(i)?i:[i];if(n.length){var s=n.map(e=>e.timestamp);switch(e){case"add":n.forEach(e=>this.map[e.timestamp]=e),this.status.added.ids=a(this.status.added.ids,s,c.sortTimestampsFn);break;case"pending":this.status.pended.ids=a(this.status.pended.ids,s,c.sortTimestampsFn),this.status.activated.ids=l(this.status.activated.ids,s),this.status.deactivated.ids=l(this.status.deactivated.ids,s);break;case"activate":this.status.pended.ids=l(this.status.pended.ids,s),this.status.activated.ids=a(this.status.activated.ids,s,c.sortTimestampsFn),this.status.deactivated.ids=l(this.status.deactivated.ids,s);break;case"deactivate":this.status.pended.ids=l(this.status.pended.ids,s),this.status.activated.ids=l(this.status.activated.ids,s),this.status.deactivated.ids=a(this.status.deactivated.ids,s,c.sortTimestampsFn);break;case"remove":this.status.pended.ids=l(this.status.pended.ids,s),this.status.activated.ids=l(this.status.activated.ids,s),this.status.deactivated.ids=l(this.status.deactivated.ids,s),this.status.added.ids=l(this.status.added.ids,s),this.status.removed.ids=a(this.status.removed.ids,s,c.sortTimestampsFn),s.forEach(e=>delete this.map[e])}this.updateNotificationsCollections(),this.emit(e,n,t),this.propagate(e,t,n)}}propagate(e,i,n){var s=Array.isArray(n)?n:[n];if(s.length)switch(e){case"add":this.update("pending",t.PendingEventReason.ServiceAutoPropagate,s);break;case"pending":case"deactivate":s.forEach(e=>{this.removeAutoDismiss(e)}),this.update("activate",t.ActivateEventReason.ServiceAutoPropagate,this.prepareActiveCandidatesNotifications(this.status.pended));break;case"activate":s.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,s)}}prepareAddNotifications(t){var i=Object.keys(this.serviceConfig.DISABLED_ITEM_MODE).reduce((e,t)=>(this.serviceConfig.DISABLED_ITEM_MODE[t]||e.push(t),e),[]).map(e=>'"'.concat(e,'"')).join(", ");return(Array.isArray(t)?t:[t]).filter(e=>!this.serviceConfig.DISABLED_ITEM_MODE[e.data.mode]||(v.error('Trying to .add(...) notification mode "'.concat(e.data.mode,'" that is disabled in this notifications service instance by configuration.Current configuration is: "').concat(JSON.stringify(this.config),'"Only ').concat(i," allowed. Ignoring .add(").concat(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):v.error("Trying to handle untracked notification. Call .add(...) first...",JSON.stringify(t)),e),[])}prepareActiveCandidatesNotifications(e){var i=(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(i).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){var n=e;if(n.ACTIVATED_ITEM_MODE_LIMIT&&n.ACTIVATED_ITEM_MODE_LIMIT.acknowledge>i.ACTIVATED_ITEM_MODE_LIMIT.acknowledge)throw new Error("\n Max ".concat(t.Mode.Acknowledge," limit is ").concat(i.ACTIVATED_ITEM_MODE_LIMIT.acknowledge,"\n "));if(n.DISABLED_ITEM_MODE){if(!Object.keys(n.DISABLED_ITEM_MODE).reduce((e,t)=>(n.DISABLED_ITEM_MODE[t]&&e++,e),0))throw new Error("At least one notifications mode should be allowed in service instance");Object.keys(n.ACTIVATED_ITEM_MODE_LIMIT).forEach(e=>{e in n.DISABLED_ITEM_MODE&&n.DISABLED_ITEM_MODE[e]&&v.warn('Changing configuration limit count for mode "'.concat(e,"\" won't have any effect, because this mode is disabled in notifications service instance"))}),"AUTO_DISMISS_TIMEOUT"in n&&n.DISABLED_ITEM_MODE[t.Mode.AutoDismiss]&&v.warn('Changing "AUTO_DISMISS_TIMEOUT" configuration option won\'t have any effect,because "'.concat(t.Mode.AutoDismiss,'" mode is disabled in notifications service instance'))}return!0}updateConfig(e){c.validateUpdateConfig(e)&&(this.serviceConfig=c.mergeConfig({},this.serviceConfig,e),v.info("Updated notifications service configuration: ",this.config))}add(e){var i=this.prepareAddNotifications(e);return this.update("add",t.AddEventReason.User,i),i}pending(e){var i=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",i,t.Status.Pended,t.PendingEventReason.UserSilent),i}deactivate(e,i){var n=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",n,t.Status.Deactivated,i),n}remove(e){var i=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",i,t.Status.Removed,t.RemoveEventReason.User),i}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(){H()(this.emitter)}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this.emitter.emit(e,...i)}bindServiceHubEvents(){this.serviceHubAdapter.addEventListener("statusServiceUpdateRequest",(e,i,n)=>{var s=Array.isArray(e)?e:[e],r=s.reduce((e,t)=>(e[t.timestamp]=this.getNotificationStatus(t),e),{}),o=s.filter(e=>(r[e.timestamp]===t.Status.Activated||e.mode!==t.Mode.Silent)&&i===t.Status.Pended),a=o.filter(e=>e.mode!==t.Mode.Silent);a.length&&this.serviceHubAdapter.emit("modeStatusUpdateResponse",a.reduce((e,t)=>(e[t.timestamp]=t,e),{}),t.Mode.Silent),o.length&&this.update("pending",n,o);var l=s.filter(e=>{var n=r[e.timestamp];return(n===t.Status.Pended||n===t.Status.Activated)&&i===t.Status.Deactivated});l.length&&this.update("deactivate",n,l),s.filter(e=>{var n=r[e.timestamp];return(n===t.Status.Pended||n===t.Status.Activated||n===t.Status.Deactivated)&&i===t.Status.Removed}).length&&this.update("remove",n,e)}),i.STATUS_EVENTS.forEach(e=>{this.addEventListener(e,(t,n)=>{var s=i.STATUS_EVENT_MAP[e],r=t.reduce((e,t)=>(e[t.timestamp]=t,e),{});this.serviceHubAdapter.emit("statusServiceUpdateResponse",r,s,n)})})}}c.sortTimestampsFn=(e,t)=>e>t?1:e<t?-1:0,e.Service=c}($||($={})),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=>{var t=this.listeners.indexOf(e,0);return t>-1&&(this.listeners.splice(t,1),!0)},this.stopListenOnce=e=>{var 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 i{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=>{var t=this.listeners.indexOf(e,0);return t>-1&&(this.listeners.splice(t,1),!0)},this.stopListenOnce=e=>{var 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(){var e=new t;return{signal:e,send:e.send,stopListenAll:e.stopListenAll}}empty(){var e=new i;return{signal:e,send:e.send,stopListenAll:e.stopListenAll}}}}(B||(B={}));var J=null,Z=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,G=1073741824;class K extends Error{constructor(){super("The timer is in an undefined state.")}}var Y,X=()=>{if(null!==J)return J;var 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 v.info("Worker url established",t),J=(e=>{var t=new Map([[0,()=>{}]]),i=new Map([[0,()=>{}]]),n=new Map,s=new Worker(e);v.info("worker created ",s);var r,o=new WeakMap,a=((e,t)=>i=>{var n=t.get(i),s=void 0===n?i.size:n<G?n+1:0;if(!i.has(s))return e(i,s);if(i.size<536870912){for(;i.has(s);)s=Math.floor(Math.random()*G);return e(i,s)}if(i.size>Z)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;i.has(s);)s=Math.floor(Math.random()*Z);return e(i,s)})((r=o,(e,t)=>(r.set(e,t),t)),o);return s.addEventListener("message",e=>{var s,{data:r}=e;if(void 0!==(s=r).method&&"call"===s.method){var{params:{timerId:o,timerType:a}}=r;if("interval"===a){var l=t.get(o);if("number"==typeof l){var c=n.get(l);if(void 0===c||c.timerId!==o||c.timerType!==a)throw new K}else{if(void 0===l)throw new K;l()}}else if("timeout"===a){var u=i.get(o);if("number"==typeof u){var d=n.get(u);if(void 0===d||d.timerId!==o||d.timerType!==a)throw new K}else{if(void 0===u)throw new K;u(),i.delete(o)}}}else if((e=>null===e.error&&"number"==typeof e.id)(r)){var{id:h}=r,f=n.get(h);if(void 0===f)throw new K;var{timerId:p,timerType:g}=f;n.delete(h),"interval"===g?t.delete(p):i.delete(p)}else{var{error:{message:m}}=r;v.error(m)}}),{clearInterval:e=>{var i=a(n);n.set(i,{timerId:e,timerType:"interval"}),t.set(e,i),s.postMessage({id:i,method:"clear",params:{timerId:e,timerType:"interval"}})},clearTimeout:e=>{var t=a(n);n.set(t,{timerId:e,timerType:"timeout"}),i.set(e,t),s.postMessage({id:t,method:"clear",params:{timerId:e,timerType:"timeout"}})},setInterval:(e,i)=>{var n=a(t);return t.set(n,()=>{e(),"function"==typeof t.get(n)&&s.postMessage({id:null,method:"set",params:{delay:i,now:performance.now(),timerId:n,timerType:"interval"}})}),s.postMessage({id:null,method:"set",params:{delay:i,now:performance.now(),timerId:n,timerType:"interval"}}),n},setTimeout:(e,t)=>{var n=a(i);return i.set(n,e),s.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:n,timerType:"timeout"}}),n}}})(t),J.setTimeout(()=>URL.revokeObjectURL(t),0),J},Q=e=>X().clearInterval(e),ee=e=>X().clearTimeout(e),te=(e,t)=>X().setInterval(e,t),ie=(e,t)=>X().setTimeout(e,t);function ne(e){if(e instanceof Error)return e;var 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: ".concat(t))}return function(e){var t=null;e.setErrorHandler=function(e){t?v.error("Error handler already set"):(v.info("Setting custom error handler: ".concat(e)),t=e)},e.check=function(e,i,n){return e||(t?t(i,n):v.info("Assert failed in ".concat(i,": ").concat(n))),e}}(Y||(Y={})),t})(),e.exports=l()},901(e,t,i){"use strict";function n(e,t){return function(){return e.apply(t,arguments)}}const{toString:s}=Object.prototype,{getPrototypeOf:r}=Object,{iterator:o,toStringTag:a}=Symbol,l=(c=Object.create(null),e=>{const t=s.call(e);return c[t]||(c[t]=t.slice(8,-1).toLowerCase())});var c;const u=e=>(e=e.toLowerCase(),t=>l(t)===e),d=e=>t=>typeof t===e,{isArray:h}=Array,f=d("undefined");function p(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&v(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const g=u("ArrayBuffer"),m=d("string"),v=d("function"),y=d("number"),E=e=>null!==e&&"object"==typeof e,S=e=>{if("object"!==l(e))return!1;const t=r(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||a in e||o in e)},b=u("Date"),w=u("File"),k=u("Blob"),I=u("FileList"),A=u("URLSearchParams"),[C,O,T,R]=["ReadableStream","Request","Response","Headers"].map(u);function N(e,t,{allOwnKeys:i=!1}={}){if(null==e)return;let n,s;if("object"!=typeof e&&(e=[e]),h(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{if(p(e))return;const s=i?Object.getOwnPropertyNames(e):Object.keys(e),r=s.length;let o;for(n=0;n<r;n++)o=s[n],t.call(null,e[o],o,e)}}function L(e,t){if(p(e))return null;t=t.toLowerCase();const i=Object.keys(e);let n,s=i.length;for(;s-- >0;)if(n=i[s],t===n.toLowerCase())return n;return null}const D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:i.g,U=e=>!f(e)&&e!==D,x=(P="undefined"!=typeof Uint8Array&&r(Uint8Array),e=>P&&e instanceof P);var P;const V=u("HTMLFormElement"),_=(({hasOwnProperty:e})=>(t,i)=>e.call(t,i))(Object.prototype),M=u("RegExp"),j=(e,t)=>{const i=Object.getOwnPropertyDescriptors(e),n={};N(i,(i,s)=>{let r;!1!==(r=t(i,s,e))&&(n[s]=r||i)}),Object.defineProperties(e,n)},q=u("AsyncFunction"),F=($="function"==typeof setImmediate,B=v(D.postMessage),$?setImmediate:B?(z=`axios@${Math.random()}`,H=[],D.addEventListener("message",({source:e,data:t})=>{e===D&&t===z&&H.length&&H.shift()()},!1),e=>{H.push(e),D.postMessage(z,"*")}):e=>setTimeout(e));var $,B,z,H;const W="undefined"!=typeof queueMicrotask?queueMicrotask.bind(D):"undefined"!=typeof process&&process.nextTick||F;var J={isArray:h,isArrayBuffer:g,isBuffer:p,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||v(e.append)&&("formdata"===(t=l(e))||"object"===t&&v(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:y,isBoolean:e=>!0===e||!1===e,isObject:E,isPlainObject:S,isEmptyObject:e=>{if(!E(e)||p(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:C,isRequest:O,isResponse:T,isHeaders:R,isUndefined:f,isDate:b,isFile:w,isBlob:k,isRegExp:M,isFunction:v,isStream:e=>E(e)&&v(e.pipe),isURLSearchParams:A,isTypedArray:x,isFileList:I,forEach:N,merge:function e(){const{caseless:t,skipUndefined:i}=U(this)&&this||{},n={},s=(s,r)=>{const o=t&&L(n,r)||r;S(n[o])&&S(s)?n[o]=e(n[o],s):S(s)?n[o]=e({},s):h(s)?n[o]=s.slice():i&&f(s)||(n[o]=s)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&N(arguments[e],s);return n},extend:(e,t,i,{allOwnKeys:s}={})=>(N(t,(t,s)=>{i&&v(t)?Object.defineProperty(e,s,{value:n(t,i),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),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,i,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),i&&Object.assign(e.prototype,i)},toFlatObject:(e,t,i,n)=>{let s,o,a;const l={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)a=s[o],n&&!n(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==i&&r(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:u,endsWith:(e,t,i)=>{e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=t.length;const n=e.indexOf(t,i);return-1!==n&&n===i},toArray:e=>{if(!e)return null;if(h(e))return e;let t=e.length;if(!y(t))return null;const i=new Array(t);for(;t-- >0;)i[t]=e[t];return i},forEachEntry:(e,t)=>{const i=(e&&e[o]).call(e);let n;for(;(n=i.next())&&!n.done;){const i=n.value;t.call(e,i[0],i[1])}},matchAll:(e,t)=>{let i;const n=[];for(;null!==(i=e.exec(t));)n.push(i);return n},isHTMLForm:V,hasOwnProperty:_,hasOwnProp:_,reduceDescriptors:j,freezeMethods:e=>{j(e,(t,i)=>{if(v(e)&&-1!==["arguments","caller","callee"].indexOf(i))return!1;const n=e[i];v(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")}))})},toObjectSet:(e,t)=>{const i={},n=e=>{e.forEach(e=>{i[e]=!0})};return h(e)?n(e):n(String(e).split(t)),i},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,i){return t.toUpperCase()+i}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:L,global:D,isContextDefined:U,isSpecCompliantForm:function(e){return!!(e&&v(e.append)&&"FormData"===e[a]&&e[o])},toJSONObject:e=>{const t=new Array(10),i=(e,n)=>{if(E(e)){if(t.indexOf(e)>=0)return;if(p(e))return e;if(!("toJSON"in e)){t[n]=e;const s=h(e)?[]:{};return N(e,(e,t)=>{const r=i(e,n+1);!f(r)&&(s[t]=r)}),t[n]=void 0,s}}return e};return i(e,0)},isAsyncFn:q,isThenable:e=>e&&(E(e)||v(e))&&v(e.then)&&v(e.catch),setImmediate:F,asap:W,isIterable:e=>null!=e&&v(e[o])};class Z extends Error{static from(e,t,i,n,s,r){const o=new Z(e.message,t||e.code,i,n,s);return o.cause=e,o.name=e.name,r&&Object.assign(o,r),o}constructor(e,t,i,n,s){super(e),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),i&&(this.config=i),n&&(this.request=n),s&&(this.response=s,this.status=s.status)}toJSON(){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:J.toJSONObject(this.config),code:this.code,status:this.status}}}Z.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Z.ERR_BAD_OPTION="ERR_BAD_OPTION",Z.ECONNABORTED="ECONNABORTED",Z.ETIMEDOUT="ETIMEDOUT",Z.ERR_NETWORK="ERR_NETWORK",Z.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Z.ERR_DEPRECATED="ERR_DEPRECATED",Z.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Z.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Z.ERR_CANCELED="ERR_CANCELED",Z.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Z.ERR_INVALID_URL="ERR_INVALID_URL";var G=Z;function K(e){return J.isPlainObject(e)||J.isArray(e)}function Y(e){return J.endsWith(e,"[]")?e.slice(0,-2):e}function X(e,t,i){return e?e.concat(t).map(function(e,t){return e=Y(e),!i&&t?"["+e+"]":e}).join(i?".":""):t}const Q=J.toFlatObject(J,{},null,function(e){return/^is[A-Z]/.test(e)});function ee(e,t,i){if(!J.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(i=J.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!J.isUndefined(t[e])})).metaTokens,s=i.visitor||c,r=i.dots,o=i.indexes,a=(i.Blob||"undefined"!=typeof Blob&&Blob)&&J.isSpecCompliantForm(t);if(!J.isFunction(s))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(J.isDate(e))return e.toISOString();if(J.isBoolean(e))return e.toString();if(!a&&J.isBlob(e))throw new G("Blob is not supported. Use a Buffer instead.");return J.isArrayBuffer(e)||J.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,i,s){let a=e;if(e&&!s&&"object"==typeof e)if(J.endsWith(i,"{}"))i=n?i:i.slice(0,-2),e=JSON.stringify(e);else if(J.isArray(e)&&function(e){return J.isArray(e)&&!e.some(K)}(e)||(J.isFileList(e)||J.endsWith(i,"[]"))&&(a=J.toArray(e)))return i=Y(i),a.forEach(function(e,n){!J.isUndefined(e)&&null!==e&&t.append(!0===o?X([i],n,r):null===o?i:i+"[]",l(e))}),!1;return!!K(e)||(t.append(X(s,i,r),l(e)),!1)}const u=[],d=Object.assign(Q,{defaultVisitor:c,convertValue:l,isVisitable:K});if(!J.isObject(e))throw new TypeError("data must be an object");return function e(i,n){if(!J.isUndefined(i)){if(-1!==u.indexOf(i))throw Error("Circular reference detected in "+n.join("."));u.push(i),J.forEach(i,function(i,r){!0===(!(J.isUndefined(i)||null===i)&&s.call(t,i,J.isString(r)?r.trim():r,n,d))&&e(i,n?n.concat(r):[r])}),u.pop()}}(e),t}function te(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ie(e,t){this._pairs=[],e&&ee(e,this,t)}const ne=ie.prototype;function se(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function re(e,t,i){if(!t)return e;const n=i&&i.encode||se,s=J.isFunction(i)?{serialize:i}:i,r=s&&s.serialize;let o;if(o=r?r(t,s):J.isURLSearchParams(t)?t.toString():new ie(t,s).toString(n),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}ne.append=function(e,t){this._pairs.push([e,t])},ne.toString=function(e){const t=e?function(t){return e.call(this,t,te)}:te;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var oe=class{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){J.forEach(this.handlers,function(t){null!==t&&e(t)})}},ae={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},le={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ie,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ce="undefined"!=typeof window&&"undefined"!=typeof document,ue="object"==typeof navigator&&navigator||void 0,de=ce&&(!ue||["ReactNative","NativeScript","NS"].indexOf(ue.product)<0),he="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,fe=ce&&window.location.href||"http://localhost";var pe={...Object.freeze({__proto__:null,hasBrowserEnv:ce,hasStandardBrowserWebWorkerEnv:he,hasStandardBrowserEnv:de,navigator:ue,origin:fe}),...le};function ge(e){function t(e,i,n,s){let r=e[s++];if("__proto__"===r)return!0;const o=Number.isFinite(+r),a=s>=e.length;return r=!r&&J.isArray(n)?n.length:r,a?(J.hasOwnProp(n,r)?n[r]=[n[r],i]:n[r]=i,!o):(n[r]&&J.isObject(n[r])||(n[r]=[]),t(e,i,n[r],s)&&J.isArray(n[r])&&(n[r]=function(e){const t={},i=Object.keys(e);let n;const s=i.length;let r;for(n=0;n<s;n++)r=i[n],t[r]=e[r];return t}(n[r])),!o)}if(J.isFormData(e)&&J.isFunction(e.entries)){const i={};return J.forEachEntry(e,(e,n)=>{t(function(e){return J.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,i,0)}),i}return null}const me={transitional:ae,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const i=t.getContentType()||"",n=i.indexOf("application/json")>-1,s=J.isObject(e);if(s&&J.isHTMLForm(e)&&(e=new FormData(e)),J.isFormData(e))return n?JSON.stringify(ge(e)):e;if(J.isArrayBuffer(e)||J.isBuffer(e)||J.isStream(e)||J.isFile(e)||J.isBlob(e)||J.isReadableStream(e))return e;if(J.isArrayBufferView(e))return e.buffer;if(J.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let r;if(s){if(i.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ee(e,new pe.classes.URLSearchParams,{visitor:function(e,t,i,n){return pe.isNode&&J.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((r=J.isFileList(e))||i.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ee(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||n?(t.setContentType("application/json",!1),function(e){if(J.isString(e))try{return(0,JSON.parse)(e),J.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||me.transitional,i=t&&t.forcedJSONParsing,n="json"===this.responseType;if(J.isResponse(e)||J.isReadableStream(e))return e;if(e&&J.isString(e)&&(i&&!this.responseType||n)){const i=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(i){if("SyntaxError"===e.name)throw G.from(e,G.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:pe.classes.FormData,Blob:pe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};J.forEach(["delete","get","head","post","put","patch"],e=>{me.headers[e]={}});var ve=me;const ye=J.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"]),Ee=Symbol("internals");function Se(e){return e&&String(e).trim().toLowerCase()}function be(e){return!1===e||null==e?e:J.isArray(e)?e.map(be):String(e)}function we(e,t,i,n,s){return J.isFunction(n)?n.call(this,t,i):(s&&(t=i),J.isString(t)?J.isString(n)?-1!==t.indexOf(n):J.isRegExp(n)?n.test(t):void 0:void 0)}class ke{constructor(e){e&&this.set(e)}set(e,t,i){const n=this;function s(e,t,i){const s=Se(t);if(!s)throw new Error("header name must be a non-empty string");const r=J.findKey(n,s);(!r||void 0===n[r]||!0===i||void 0===i&&!1!==n[r])&&(n[r||t]=be(e))}const r=(e,t)=>J.forEach(e,(e,i)=>s(e,i,t));if(J.isPlainObject(e)||e instanceof this.constructor)r(e,t);else if(J.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))r((e=>{const t={};let i,n,s;return e&&e.split("\n").forEach(function(e){s=e.indexOf(":"),i=e.substring(0,s).trim().toLowerCase(),n=e.substring(s+1).trim(),!i||t[i]&&ye[i]||("set-cookie"===i?t[i]?t[i].push(n):t[i]=[n]:t[i]=t[i]?t[i]+", "+n:n)}),t})(e),t);else if(J.isObject(e)&&J.isIterable(e)){let i,n,s={};for(const t of e){if(!J.isArray(t))throw TypeError("Object iterator must return a key-value pair");s[n=t[0]]=(i=s[n])?J.isArray(i)?[...i,t[1]]:[i,t[1]]:t[1]}r(s,t)}else null!=e&&s(t,e,i);return this}get(e,t){if(e=Se(e)){const i=J.findKey(this,e);if(i){const e=this[i];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=i.exec(e);)t[n[1]]=n[2];return t}(e);if(J.isFunction(t))return t.call(this,e,i);if(J.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Se(e)){const i=J.findKey(this,e);return!(!i||void 0===this[i]||t&&!we(0,this[i],i,t))}return!1}delete(e,t){const i=this;let n=!1;function s(e){if(e=Se(e)){const s=J.findKey(i,e);!s||t&&!we(0,i[s],s,t)||(delete i[s],n=!0)}}return J.isArray(e)?e.forEach(s):s(e),n}clear(e){const t=Object.keys(this);let i=t.length,n=!1;for(;i--;){const s=t[i];e&&!we(0,this[s],s,e,!0)||(delete this[s],n=!0)}return n}normalize(e){const t=this,i={};return J.forEach(this,(n,s)=>{const r=J.findKey(i,s);if(r)return t[r]=be(n),void delete t[s];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,i)=>t.toUpperCase()+i)}(s):String(s).trim();o!==s&&delete t[s],t[o]=be(n),i[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return J.forEach(this,(i,n)=>{null!=i&&!1!==i&&(t[n]=e&&J.isArray(i)?i.join(", "):i)}),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 i=new this(e);return t.forEach(e=>i.set(e)),i}static accessor(e){const t=(this[Ee]=this[Ee]={accessors:{}}).accessors,i=this.prototype;function n(e){const n=Se(e);t[n]||(function(e,t){const i=J.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+i,{value:function(e,i,s){return this[n].call(this,t,e,i,s)},configurable:!0})})}(i,e),t[n]=!0)}return J.isArray(e)?e.forEach(n):n(e),this}}ke.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),J.reduceDescriptors(ke.prototype,({value:e},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[i]=e}}}),J.freezeMethods(ke);var Ie=ke;function Ae(e,t){const i=this||ve,n=t||i,s=Ie.from(n.headers);let r=n.data;return J.forEach(e,function(e){r=e.call(i,r,s.normalize(),t?t.status:void 0)}),s.normalize(),r}function Ce(e){return!(!e||!e.__CANCEL__)}var Oe=class extends G{constructor(e,t,i){super(null==e?"canceled":e,G.ERR_CANCELED,t,i),this.name="CanceledError",this.__CANCEL__=!0}};function Te(e,t,i){const n=i.config.validateStatus;i.status&&n&&!n(i.status)?t(new G("Request failed with status code "+i.status,[G.ERR_BAD_REQUEST,G.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):e(i)}const Re=(e,t,i=3)=>{let n=0;const s=function(e,t){e=e||10;const i=new Array(e),n=new Array(e);let s,r=0,o=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=n[o];s||(s=l),i[r]=a,n[r]=l;let u=o,d=0;for(;u!==r;)d+=i[u++],u%=e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),l-s<t)return;const h=c&&l-c;return h?Math.round(1e3*d/h):void 0}}(50,250);return function(i,r){let o,a,l=0,c=1e3/r;const u=(i,r=Date.now())=>{l=r,o=null,a&&(clearTimeout(a),a=null),(i=>{const r=i.loaded,o=i.lengthComputable?i.total:void 0,a=r-n,l=s(a);n=r,e({loaded:r,total:o,progress:o?r/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&r<=o?(o-r)/l:void 0,event:i,lengthComputable:null!=o,[t?"download":"upload"]:!0})})(...i)};return[(...e)=>{const t=Date.now(),i=t-l;i>=c?u(e,t):(o=e,a||(a=setTimeout(()=>{a=null,u(o)},c-i)))},()=>o&&u(o)]}(0,i)},Ne=(e,t)=>{const i=null!=e;return[n=>t[0]({lengthComputable:i,total:e,loaded:n}),t[1]]},Le=e=>(...t)=>J.asap(()=>e(...t));var De=pe.hasStandardBrowserEnv?((e,t)=>i=>(i=new URL(i,pe.origin),e.protocol===i.protocol&&e.host===i.host&&(t||e.port===i.port)))(new URL(pe.origin),pe.navigator&&/(msie|trident)/i.test(pe.navigator.userAgent)):()=>!0,Ue=pe.hasStandardBrowserEnv?{write(e,t,i,n,s,r,o){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];J.isNumber(i)&&a.push(`expires=${new Date(i).toUTCString()}`),J.isString(n)&&a.push(`path=${n}`),J.isString(s)&&a.push(`domain=${s}`),!0===r&&a.push("secure"),J.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function xe(e,t,i){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||0==i)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Pe=e=>e instanceof Ie?{...e}:e;function Ve(e,t){t=t||{};const i={};function n(e,t,i,n){return J.isPlainObject(e)&&J.isPlainObject(t)?J.merge.call({caseless:n},e,t):J.isPlainObject(t)?J.merge({},t):J.isArray(t)?t.slice():t}function s(e,t,i,s){return J.isUndefined(t)?J.isUndefined(e)?void 0:n(void 0,e,0,s):n(e,t,0,s)}function r(e,t){if(!J.isUndefined(t))return n(void 0,t)}function o(e,t){return J.isUndefined(t)?J.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(i,s,r){return r in t?n(i,s):r in e?n(void 0,i):void 0}const l={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(e,t,i)=>s(Pe(e),Pe(t),0,!0)};return J.forEach(Object.keys({...e,...t}),function(n){const r=l[n]||s,o=r(e[n],t[n],n);J.isUndefined(o)&&r!==a||(i[n]=o)}),i}var _e=e=>{const t=Ve({},e);let{data:i,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:r,headers:o,auth:a}=t;if(t.headers=o=Ie.from(o),t.url=re(xe(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),J.isFormData(i))if(pe.hasStandardBrowserEnv||pe.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(J.isFunction(i.getHeaders)){const e=i.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,i])=>{t.includes(e.toLowerCase())&&o.set(e,i)})}if(pe.hasStandardBrowserEnv&&(n&&J.isFunction(n)&&(n=n(t)),n||!1!==n&&De(t.url))){const e=s&&r&&Ue.read(r);e&&o.set(s,e)}return t},Me="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,i){const n=_e(e);let s=n.data;const r=Ie.from(n.headers).normalize();let o,a,l,c,u,{responseType:d,onUploadProgress:h,onDownloadProgress:f}=n;function p(){c&&c(),u&&u(),n.cancelToken&&n.cancelToken.unsubscribe(o),n.signal&&n.signal.removeEventListener("abort",o)}let g=new XMLHttpRequest;function m(){if(!g)return;const n=Ie.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());Te(function(e){t(e),p()},function(e){i(e),p()},{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g}),g=null}g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout,"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(m)},g.onabort=function(){g&&(i(new G("Request aborted",G.ECONNABORTED,e,g)),g=null)},g.onerror=function(t){const n=t&&t.message?t.message:"Network Error",s=new G(n,G.ERR_NETWORK,e,g);s.event=t||null,i(s),g=null},g.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const s=n.transitional||ae;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),i(new G(t,s.clarifyTimeoutError?G.ETIMEDOUT:G.ECONNABORTED,e,g)),g=null},void 0===s&&r.setContentType(null),"setRequestHeader"in g&&J.forEach(r.toJSON(),function(e,t){g.setRequestHeader(t,e)}),J.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),d&&"json"!==d&&(g.responseType=n.responseType),f&&([l,u]=Re(f,!0),g.addEventListener("progress",l)),h&&g.upload&&([a,c]=Re(h),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",c)),(n.cancelToken||n.signal)&&(o=t=>{g&&(i(!t||t.type?new Oe(null,e,g):t),g.abort(),g=null)},n.cancelToken&&n.cancelToken.subscribe(o),n.signal&&(n.signal.aborted?o():n.signal.addEventListener("abort",o)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);v&&-1===pe.protocols.indexOf(v)?i(new G("Unsupported protocol "+v+":",G.ERR_BAD_REQUEST,e)):g.send(s||null)})},je=(e,t)=>{const{length:i}=e=e?e.filter(Boolean):[];if(t||i){let i,n=new AbortController;const s=function(e){if(!i){i=!0,o();const t=e instanceof Error?e:this.reason;n.abort(t instanceof G?t:new Oe(t instanceof Error?t.message:t))}};let r=t&&setTimeout(()=>{r=null,s(new G(`timeout of ${t}ms exceeded`,G.ETIMEDOUT))},t);const o=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)}),e=null)};e.forEach(e=>e.addEventListener("abort",s));const{signal:a}=n;return a.unsubscribe=()=>J.asap(o),a}};const qe=function*(e,t){let i=e.byteLength;if(!t||i<t)return void(yield e);let n,s=0;for(;s<i;)n=s+t,yield e.slice(s,n),s=n},Fe=(e,t,i,n)=>{const s=async function*(e,t){for await(const i of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:i}=await t.read();if(e)break;yield i}}finally{await t.cancel()}}(e))yield*qe(i,t)}(e,t);let r,o=0,a=e=>{r||(r=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await s.next();if(t)return a(),void e.close();let r=n.byteLength;if(i){let e=o+=r;i(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),s.return())},{highWaterMark:2})},{isFunction:$e}=J,Be=(({Request:e,Response:t})=>({Request:e,Response:t}))(J.global),{ReadableStream:ze,TextEncoder:He}=J.global,We=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Je=e=>{e=J.merge.call({skipUndefined:!0},Be,e);const{fetch:t,Request:i,Response:n}=e,s=t?$e(t):"function"==typeof fetch,r=$e(i),o=$e(n);if(!s)return!1;const a=s&&$e(ze),l=s&&("function"==typeof He?(c=new He,e=>c.encode(e)):async e=>new Uint8Array(await new i(e).arrayBuffer()));var c;const u=r&&a&&We(()=>{let e=!1;const t=new i(pe.origin,{body:new ze,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=o&&a&&We(()=>J.isReadableStream(new n("").body)),h={stream:d&&(e=>e.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,i)=>{let n=t&&t[e];if(n)return n.call(t);throw new G(`Response type '${e}' is not supported`,G.ERR_NOT_SUPPORT,i)})});return async e=>{let{url:s,method:o,data:a,signal:c,cancelToken:f,timeout:p,onDownloadProgress:g,onUploadProgress:m,responseType:v,headers:y,withCredentials:E="same-origin",fetchOptions:S}=_e(e),b=t||fetch;v=v?(v+"").toLowerCase():"text";let w=je([c,f&&f.toAbortSignal()],p),k=null;const I=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let A;try{if(m&&u&&"get"!==o&&"head"!==o&&0!==(A=await(async(e,t)=>{const n=J.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(J.isBlob(e))return e.size;if(J.isSpecCompliantForm(e)){const t=new i(pe.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return J.isArrayBufferView(e)||J.isArrayBuffer(e)?e.byteLength:(J.isURLSearchParams(e)&&(e+=""),J.isString(e)?(await l(e)).byteLength:void 0)})(t):n})(y,a))){let e,t=new i(s,{method:"POST",body:a,duplex:"half"});if(J.isFormData(a)&&(e=t.headers.get("content-type"))&&y.setContentType(e),t.body){const[e,i]=Ne(A,Re(Le(m)));a=Fe(t.body,65536,e,i)}}J.isString(E)||(E=E?"include":"omit");const t=r&&"credentials"in i.prototype,c={...S,signal:w,method:o.toUpperCase(),headers:y.normalize().toJSON(),body:a,duplex:"half",credentials:t?E:void 0};k=r&&new i(s,c);let f=await(r?b(k,S):b(s,c));const p=d&&("stream"===v||"response"===v);if(d&&(g||p&&I)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=f[t]});const t=J.toFiniteNumber(f.headers.get("content-length")),[i,s]=g&&Ne(t,Re(Le(g),!0))||[];f=new n(Fe(f.body,65536,i,()=>{s&&s(),I&&I()}),e)}v=v||"text";let C=await h[J.findKey(h,v)||"text"](f,e);return!p&&I&&I(),await new Promise((t,i)=>{Te(t,i,{data:C,headers:Ie.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:k})})}catch(t){if(I&&I(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new G("Network Error",G.ERR_NETWORK,e,k),{cause:t.cause||t});throw G.from(t,t&&t.code,e,k)}}},Ze=new Map,Ge=e=>{let t=e&&e.env||{};const{fetch:i,Request:n,Response:s}=t,r=[n,s,i];let o,a,l=r.length,c=Ze;for(;l--;)o=r[l],a=c.get(o),void 0===a&&c.set(o,a=l?new Map:Je(t)),c=a;return a};Ge();const Ke={http:null,xhr:Me,fetch:{get:Ge}};J.forEach(Ke,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Ye=e=>`- ${e}`,Xe=e=>J.isFunction(e)||null===e||!1===e;var Qe=function(e,t){e=J.isArray(e)?e:[e];const{length:i}=e;let n,s;const r={};for(let o=0;o<i;o++){let i;if(n=e[o],s=n,!Xe(n)&&(s=Ke[(i=String(n)).toLowerCase()],void 0===s))throw new G(`Unknown adapter '${i}'`);if(s&&(J.isFunction(s)||(s=s.get(t))))break;r[i||"#"+o]=s}if(!s){const e=Object.entries(r).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=i?e.length>1?"since :\n"+e.map(Ye).join("\n"):" "+Ye(e[0]):"as no adapter specified";throw new G("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return s};function et(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Oe(null,e)}function tt(e){return et(e),e.headers=Ie.from(e.headers),e.data=Ae.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Qe(e.adapter||ve.adapter,e)(e).then(function(t){return et(e),t.data=Ae.call(e,e.transformResponse,t),t.headers=Ie.from(t.headers),t},function(t){return Ce(t)||(et(e),t&&t.response&&(t.response.data=Ae.call(e,e.transformResponse,t.response),t.response.headers=Ie.from(t.response.headers))),Promise.reject(t)})}const it="1.13.4",nt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{nt[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const st={};nt.transitional=function(e,t,i){function n(e,t){return"[Axios v"+it+"] Transitional option '"+e+"'"+t+(i?". "+i:"")}return(i,s,r)=>{if(!1===e)throw new G(n(s," has been removed"+(t?" in "+t:"")),G.ERR_DEPRECATED);return t&&!st[s]&&(st[s]=!0,console.warn(n(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,s,r)}},nt.spelling=function(e){return(t,i)=>(console.warn(`${i} is likely a misspelling of ${e}`),!0)};var rt={assertOptions:function(e,t,i){if("object"!=typeof e)throw new G("options must be an object",G.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const r=n[s],o=t[r];if(o){const t=e[r],i=void 0===t||o(t,r,e);if(!0!==i)throw new G("option "+r+" must be "+i,G.ERR_BAD_OPTION_VALUE);continue}if(!0!==i)throw new G("Unknown option "+r,G.ERR_BAD_OPTION)}},validators:nt};const ot=rt.validators;class at{constructor(e){this.defaults=e||{},this.interceptors={request:new oe,response:new oe}}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 i=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?i&&!String(e.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+i):e.stack=i}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ve(this.defaults,t);const{transitional:i,paramsSerializer:n,headers:s}=t;void 0!==i&&rt.assertOptions(i,{silentJSONParsing:ot.transitional(ot.boolean),forcedJSONParsing:ot.transitional(ot.boolean),clarifyTimeoutError:ot.transitional(ot.boolean)},!1),null!=n&&(J.isFunction(n)?t.paramsSerializer={serialize:n}:rt.assertOptions(n,{encode:ot.function,serialize:ot.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),rt.assertOptions(t,{baseUrl:ot.spelling("baseURL"),withXsrfToken:ot.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let r=s&&J.merge(s.common,s[t.method]);s&&J.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=Ie.concat(r,s);const o=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,o.unshift(e.fulfilled,e.rejected))});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,d=0;if(!a){const e=[tt.bind(this),void 0];for(e.unshift(...o),e.push(...l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=o.length;let h=t;for(;d<u;){const e=o[d++],t=o[d++];try{h=e(h)}catch(e){t.call(this,e);break}}try{c=tt.call(this,h)}catch(e){return Promise.reject(e)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return re(xe((e=Ve(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}J.forEach(["delete","get","head","options"],function(e){at.prototype[e]=function(t,i){return this.request(Ve(i||{},{method:e,url:t,data:(i||{}).data}))}}),J.forEach(["post","put","patch"],function(e){function t(t){return function(i,n,s){return this.request(Ve(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:i,data:n}))}}at.prototype[e]=t(),at.prototype[e+"Form"]=t(!0)});var lt=at;class ct{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 i=this;this.promise.then(e=>{if(!i._listeners)return;let t=i._listeners.length;for(;t-- >0;)i._listeners[t](e);i._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{i.subscribe(e),t=e}).then(e);return n.cancel=function(){i.unsubscribe(t)},n},e(function(e,n,s){i.reason||(i.reason=new Oe(e,n,s),t(i.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 ct(function(t){e=t}),cancel:e}}}var ut=ct;const dt={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(dt).forEach(([e,t])=>{dt[t]=e});var ht=dt;const ft=function e(t){const i=new lt(t),s=n(lt.prototype.request,i);return J.extend(s,lt.prototype,i,{allOwnKeys:!0}),J.extend(s,i,null,{allOwnKeys:!0}),s.create=function(i){return e(Ve(t,i))},s}(ve);ft.Axios=lt,ft.CanceledError=Oe,ft.CancelToken=ut,ft.isCancel=Ce,ft.VERSION=it,ft.toFormData=ee,ft.AxiosError=G,ft.Cancel=ft.CanceledError,ft.all=function(e){return Promise.all(e)},ft.spread=function(e){return function(t){return e.apply(null,t)}},ft.isAxiosError=function(e){return J.isObject(e)&&!0===e.isAxiosError},ft.mergeConfig=Ve,ft.AxiosHeaders=Ie,ft.formToJSON=e=>ge(J.isHTMLForm(e)?new FormData(e):e),ft.getAdapter=Qe,ft.HttpStatusCode=ht,ft.default=ft,e.exports=ft},855(e,t,i){"use strict";function n(e){return n="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},n(e)}function s(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":n(XMLHttpRequest))}function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function o(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach(function(t){a(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function a(e,t,i){return(t=function(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=l(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function l(e){return l="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},l(e)}i.r(t),i.d(t,{default:()=>A});var c,u,d="function"==typeof fetch?fetch:void 0;if(void 0!==i.g&&i.g.fetch?d=i.g.fetch:"undefined"!=typeof window&&window.fetch&&(d=window.fetch),s()&&(void 0!==i.g&&i.g.XMLHttpRequest?c=i.g.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(c=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&(void 0!==i.g&&i.g.ActiveXObject?u=i.g.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(u=window.ActiveXObject)),"function"!=typeof d&&(d=void 0),!d&&!c&&!u)try{Promise.resolve().then(i.t.bind(i,911,19)).then(function(e){d=e.default}).catch(function(){})}catch(w){}var h=function(e,t){if(t&&"object"===l(t)){var i="";for(var n in t)i+="&"+encodeURIComponent(n)+"="+encodeURIComponent(t[n]);if(!i)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+i.slice(1)}return e},f=function(e,t,i,n){var s=function(e){if(!e.ok)return i(e.statusText||"Error",{status:e.status});e.text().then(function(t){i(null,{status:e.status,data:t})}).catch(i)};if(n){var r=n(e,t);if(r instanceof Promise)return void r.then(s).catch(i)}"function"==typeof fetch?fetch(e,t).then(s).catch(i):d(e,t).then(s).catch(i)},p=!1;const g=function(e,t,n,r){return"function"==typeof n&&(r=n,n=void 0),r=r||function(){},d&&0!==t.indexOf("file:")?function(e,t,n,s){e.queryStringParams&&(t=h(t,e.queryStringParams));var r=o({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);"undefined"==typeof window&&void 0!==i.g&&void 0!==i.g.process&&i.g.process.versions&&i.g.process.versions.node&&(r["User-Agent"]="i18next-http-backend (node/".concat(i.g.process.version,"; ").concat(i.g.process.platform," ").concat(i.g.process.arch,")")),n&&(r["Content-Type"]="application/json");var a="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,l=o({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:r},p?{}:a),c="function"==typeof e.alternateFetch&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{f(t,l,s,c)}catch(e){if(!a||0===Object.keys(a).length||!e.message||e.message.indexOf("not implemented")<0)return s(e);try{Object.keys(a).forEach(function(e){delete l[e]}),f(t,l,s,c),p=!0}catch(e){s(e)}}}(e,t,n,r):s()||"function"==typeof ActiveXObject?function(e,t,i,n){i&&"object"===l(i)&&(i=h("",i).slice(1)),e.queryStringParams&&(t=h(t,e.queryStringParams));try{var s=c?new c:new u("MSXML2.XMLHTTP.3.0");s.open(i?"POST":"GET",t,1),e.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!e.withCredentials,i&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var r=e.customHeaders;if(r="function"==typeof r?r():r)for(var o in r)s.setRequestHeader(o,r[o]);s.onreadystatechange=function(){s.readyState>3&&n(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(i)}catch(e){console&&console.log(e)}}(e,t,n,r):void r(new Error("No fetch and no xhr implementation found!"))};function m(e){return m="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},m(e)}function v(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function y(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?v(Object(i),!0).forEach(function(t){S(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function E(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,b(n.key),n)}}function S(e,t,i){return(t=b(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function b(e){var t=function(e){if("object"!=m(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=m(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:t+""}var w,k,I=(w=function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.services=t,this.options=i,this.allOptions=n,this.type="backend",this.init(t,i,n)},k=[{key:"init",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.services=e,this.options=y(y(y({},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,i){return S({},t,i||"")},parseLoadPayload:function(e,t){},request:g,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}),this.options||{}),i),this.allOptions=n,this.services&&this.options.reloadInterval){var s=setInterval(function(){return t.reload()},this.options.reloadInterval);"object"===m(s)&&"function"==typeof s.unref&&s.unref()}}},{key:"readMulti",value:function(e,t,i){this._readAny(e,e,t,t,i)}},{key:"read",value:function(e,t,i){this._readAny([e],e,[t],t,i)}},{key:"_readAny",value:function(e,t,i,n,s){var r,o=this,a=this.options.loadPath;"function"==typeof this.options.loadPath&&(a=this.options.loadPath(e,i)),(a=function(e){return!!e&&"function"==typeof e.then}(r=a)?r:Promise.resolve(r)).then(function(r){if(!r)return s(null,{});var a=o.services.interpolator.interpolate(r,{lng:e.join("+"),ns:i.join("+")});o.loadUrl(a,s,t,n)})}},{key:"loadUrl",value:function(e,t,i,n){var s=this,r="string"==typeof i?[i]:i,o="string"==typeof n?[n]:n,a=this.options.parseLoadPayload(r,o);this.options.request(this.options,e,a,function(r,o){if(o&&(o.status>=500&&o.status<600||!o.status))return t("failed loading "+e+"; status code: "+o.status,!0);if(o&&o.status>=400&&o.status<500)return t("failed loading "+e+"; status code: "+o.status,!1);if(!o&&r&&r.message){var a=r.message.toLowerCase();if(["failed","fetch","network","load"].find(function(e){return a.indexOf(e)>-1}))return t("failed loading "+e+": "+r.message,!0)}if(r)return t(r,!1);var l,c;try{l="string"==typeof o.data?s.options.parse(o.data,i,n):o.data}catch(t){c="failed parsing "+e+" to json"}if(c)return t(c,!1);t(null,l)})}},{key:"create",value:function(e,t,i,n,s){var r=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var o=this.options.parsePayload(t,i,n),a=0,l=[],c=[];e.forEach(function(i){var n=r.options.addPath;"function"==typeof r.options.addPath&&(n=r.options.addPath(i,t));var u=r.services.interpolator.interpolate(n,{lng:i,ns:t});r.options.request(r.options,u,o,function(t,i){a+=1,l.push(t),c.push(i),a===e.length&&"function"==typeof s&&s(l,c)})})}}},{key:"reload",value:function(){var e=this,t=this.services,i=t.backendConnector,n=t.languageUtils,s=t.logger,r=i.language;if(!r||"cimode"!==r.toLowerCase()){var o=[],a=function(e){n.toResolveHierarchy(e).forEach(function(e){o.indexOf(e)<0&&o.push(e)})};a(r),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return a(e)}),o.forEach(function(t){e.allOptions.ns.forEach(function(e){i.read(t,e,"read",null,null,function(n,r){n&&s.warn("loading namespace ".concat(e," for language ").concat(t," failed"),n),!n&&r&&s.log("loaded namespace ".concat(e," for language ").concat(t),r),i.loaded("".concat(t,"|").concat(e),n,r)})})})}}}],k&&E(w.prototype,k),Object.defineProperty(w,"prototype",{writable:!1}),w);I.type="backend";const A=I},176(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>w});var{slice:n,forEach:s}=[],r=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,o={create(e,t,i,n){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};i&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+60*i*1e3)),n&&(s.domain=n),document.cookie=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"},n=encodeURIComponent(t),s="".concat(e,"=").concat(n);if(i.maxAge>0){var o=i.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(o))}if(i.domain){if(!r.test(i.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(i.domain)}if(i.path){if(!r.test(i.path))throw new TypeError("option path is invalid");s+="; Path=".concat(i.path)}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw new TypeError("option expires is invalid");s+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(s+="; HttpOnly"),i.secure&&(s+="; Secure"),i.sameSite)switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i.partitioned&&(s+="; Partitioned"),s}(e,t,s)},read(e){for(var t="".concat(e,"="),i=document.cookie.split(";"),n=0;n<i.length;n++){for(var s=i[n];" "===s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(t))return s.substring(t.length,s.length)}return null},remove(e,t){this.create(e,"",-1,t)}},a={name:"cookie",lookup(e){var{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return o.read(t)||void 0},cacheUserLanguage(e,t){var{lookupCookie:i,cookieMinutes:n,cookieDomain:s,cookieOptions:r}=t;i&&"undefined"!=typeof document&&o.create(i,e,n,s,r)}},l={name:"querystring",lookup(e){var t,{lookupQuerystring:i}=e;if("undefined"!=typeof window){var n,{search:s}=window.location;!window.location.search&&(null===(n=window.location.hash)||void 0===n?void 0:n.indexOf("?"))>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=s.substring(1).split("&"),o=0;o<r.length;o++){var a=r[o].indexOf("=");a>0&&r[o].substring(0,a)===i&&(t=r[o].substring(a+1))}}return t}},c={name:"hash",lookup(e){var t,{lookupHash:i,lookupFromHashIndex:n}=e;if("undefined"!=typeof window){var{hash:s}=window.location;if(s&&s.length>2){var r=s.substring(1);if(i)for(var o=r.split("&"),a=0;a<o.length;a++){var l=o[a].indexOf("=");l>0&&o[a].substring(0,l)===i&&(t=o[a].substring(l+1))}if(t)return t;if(!t&&n>-1){var c,u=s.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(u))return;return null===(c=u["number"==typeof n?n:0])||void 0===c?void 0:c.replace("/","")}}}return t}},u=null,d=()=>{if(null!==u)return u;try{if(!(u="undefined"!=typeof window&&null!==window.localStorage))return!1;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){u=!1}return u},h={name:"localStorage",lookup(e){var{lookupLocalStorage:t}=e;if(t&&d())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){var{lookupLocalStorage:i}=t;i&&d()&&window.localStorage.setItem(i,e)}},f=null,p=()=>{if(null!==f)return f;try{if(!(f="undefined"!=typeof window&&null!==window.sessionStorage))return!1;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){f=!1}return f},g={name:"sessionStorage",lookup(e){var{lookupSessionStorage:t}=e;if(t&&p())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){var{lookupSessionStorage:i}=t;i&&p()&&window.sessionStorage.setItem(i,e)}},m={name:"navigator",lookup(e){var t=[];if("undefined"!=typeof navigator){var{languages:i,userLanguage:n,language:s}=navigator;if(i)for(var r=0;r<i.length;r++)t.push(i[r]);n&&t.push(n),s&&t.push(s)}return t.length>0?t:void 0}},v={name:"htmlTag",lookup(e){var t,{htmlTag:i}=e,n=i||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},y={name:"path",lookup(e){var t,{lookupFromPathIndex:i}=e;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(n))return null===(t=n["number"==typeof i?i:0])||void 0===t?void 0:t.replace("/","")}}},E={name:"subdomain",lookup(e){var t,{lookupFromSubdomainIndex:i}=e,n="number"==typeof i?i+1:1,s="undefined"!=typeof window&&(null===(t=window.location)||void 0===t||null===(t=t.hostname)||void 0===t?void 0:t.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(s)return s[n]}},S=!1;try{document.cookie,S=!0}catch(e){}var b=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];S||b.splice(1,1);class w{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return s.call(n.call(arguments,1),t=>{if(t)for(var i in t)void 0===e[i]&&(e[i]=t[i])}),e}(t,this.options||{},{order:b,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(a),this.addDetector(l),this.addDetector(h),this.addDetector(g),this.addDetector(m),this.addDetector(v),this.addDetector(y),this.addDetector(E),this.addDetector(c)}addDetector(e){return this.detectors[e.name]=e,this}detect(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){var i=this.detectors[e].lookup(this.options);i&&"string"==typeof i&&(i=[i]),i&&(t=t.concat(i))}}),t=t.filter(e=>{return null!=e&&!("string"==typeof(t=e)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(e=>e.test(t)));var t}).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}w.type="languageDetector"}},n={};function s(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return i[e](r,r.exports,s),r.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(i,n){if(1&n&&(i=this(i)),8&n)return i;if("object"==typeof i&&i){if(4&n&&i.__esModule)return i;if(16&n&&"function"==typeof i.then)return i}var r=Object.create(null);s.r(r);var o={};e=e||[null,t({}),t([]),t(t)];for(var a=2&n&&i;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>o[e]=()=>i[e]);return o.default=()=>i,s.d(r,o),r},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";s.r(r),s.d(r,{Desktop:()=>He});var e=s(542);const t=(0,e.createLogger)("agentx-js-api"),i=(e,t)=>({info:(...i)=>e.info(t,...i),warn:(...i)=>e.warn(t,...i),error:(...i)=>e.error(t,...i)});class n{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 o=e=>new n(e);var a=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const l="jsapi",c={rps:120,tag:l},u={rps:0,tag:l},d={tag:l},h=e=>e.actionsChannels.createSource("fireGeneralSilentNotification/Req",c),f=e=>e.actionsChannels.createSource("fireGeneralAutoDismissNotification/Req",u),p=e=>e.actionsChannels.createDestination("fireGeneralAutoDismissNotification/Res",u),g=e=>e.actionsChannels.createSource("fireGeneralAcknowledgeNotification/Req",u),m=e=>e.actionsChannels.createDestination("fireGeneralAcknowledgeNotification/Res",u),v=e=>e.actionsChannels.createSource("addCustomTask",c),y=e=>e.actionsChannels.createSource("getToken/Req",u),E=e=>e.actionsChannels.createDestination("getToken/Res",d),S=e=>e.actionsChannels.createSource("getTaskMap/Req",u),b=e=>e.actionsChannels.createDestination("getTaskMap/Res",d),w=e=>e.actionsChannels.createSource("getMediaTypeQueue/Req",u),k=e=>e.actionsChannels.createDestination("getMediaTypeQueue/Res",d),I=e=>e.actionsChannels.createSource("getIdleCodes/Req",u),A=e=>e.actionsChannels.createDestination("getIdleCodes/Res",d),C=e=>e.actionsChannels.createSource("getWrapUpCodes/Req",u),O=e=>e.actionsChannels.createDestination("getWrapUpCodes/Res",d);class T{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 i;if(e&&e.target){const n=null===(i=this.getClosestElement(e.target,".dynamic-widget-wrapper"))||void 0===i?void 0:i.id;if(n){const e=new CustomEvent("toggle-maximize-restore",{detail:{widgetId:n}});window.dispatchEvent(e),t.info("Dispatching toggle-maximize-restore event for widgetId:",n)}}},this.toggleVoiceInteractionPanel=()=>{window.dispatchEvent(new CustomEvent("toggle-voice-interaction-panel")),t.info("Dispatching toggl-voice-interaction-panel")},this.toggleMuteUnmuteWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-mute-unmute",{});window.dispatchEvent(e),t.info("Dispatching ax-web-call-mute-unmute event")},this.declineWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-decline",{});window.dispatchEvent(e),t.info("Dispatching ax-web-call-decline event")},this.acceptWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-answer",{});window.dispatchEvent(e),t.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:g(this.SERVICE),addCustomTask:v(this.SERVICE),getToken:y(this.SERVICE),getTaskMap:S(this.SERVICE),getMediaTypeQueue:w(this.SERVICE),getIdleCodes:I(this.SERVICE),getWrapUpCodes:C(this.SERVICE)},this.destinationActionsChannels={fireGeneralAutoDismissNotification:p(this.SERVICE),fireGeneralAcknowledgeNotification:m(this.SERVICE),getToken:E(this.SERVICE),getTaskMap:b(this.SERVICE),getMediaTypeQueue:k(this.SERVICE),getIdleCodes:A(this.SERVICE),getWrapUpCodes:O(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(...t){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(i=>{const n=this.getNextReqId(),s=({args:[t,r,o,a]})=>{a===n&&(o!==e.Notifications.ItemMeta.Mode.AutoDismiss&&o!==e.Notifications.ItemMeta.Mode.Silent||t===e.Notifications.ItemMeta.Status.Deactivated&&(i([t,r,o]),this.destinationActionsChannels.fireGeneralAutoDismissNotification.removeListener(s)))};this.destinationActionsChannels.fireGeneralAutoDismissNotification.addListener(s),this.sourceActionsChannels.fireGeneralAutoDismissNotification.send(...t)})})}fireGeneralAcknowledgeNotification(...t){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(i=>{const n=this.getNextReqId(),s=({args:[t,r,o,a]})=>{a===n&&(o!==e.Notifications.ItemMeta.Mode.Acknowledge&&o!==e.Notifications.ItemMeta.Mode.Silent||t===e.Notifications.ItemMeta.Status.Deactivated&&(i([t,r,o]),this.destinationActionsChannels.fireGeneralAcknowledgeNotification.removeListener(s)))};this.destinationActionsChannels.fireGeneralAcknowledgeNotification.addListener(s),this.sourceActionsChannels.fireGeneralAcknowledgeNotification.send(...t)})})}addCustomTask(...e){this.checkService()&&this.sourceActionsChannels.addCustomTask.send(...e)}getTaskMap(){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(e=>{const t=this.getNextReqId(),i=({args:[n,s]})=>{s===t&&(e(n),this.destinationActionsChannels.getTaskMap.removeListener(i))};this.destinationActionsChannels.getTaskMap.addListener(i),this.sourceActionsChannels.getTaskMap.send(t)})})}getMediaTypeQueue(e){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(t=>{const i=this.getNextReqId(),n=({args:[e,s]})=>{s===i&&(t(e),this.destinationActionsChannels.getMediaTypeQueue.removeListener(n))};this.destinationActionsChannels.getMediaTypeQueue.addListener(n),this.sourceActionsChannels.getMediaTypeQueue.send(e,i)})})}getToken(){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(e=>{const t=this.getNextReqId(),i=({args:[n,s]})=>{s===t&&(e(n),this.destinationActionsChannels.getToken.removeListener(i))};this.destinationActionsChannels.getToken.addListener(i),this.sourceActionsChannels.getToken.send(t)})})}getIdleCodes(){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(e=>{const t=this.getNextReqId(),i=({args:[n,s]})=>{s===t&&(e(n),this.destinationActionsChannels.getIdleCodes.removeListener(i))};this.destinationActionsChannels.getIdleCodes.addListener(i),this.sourceActionsChannels.getIdleCodes.send(t)})})}getWrapUpCodes(){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(e=>{const t=this.getNextReqId(),i=({args:[n,s]})=>{s===t&&(e(n),this.destinationActionsChannels.getWrapUpCodes.removeListener(i))};this.destinationActionsChannels.getWrapUpCodes.addListener(i),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 R=i(t,"[Actions JSAPI] =>");class N{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,i){var n,s,r;const o=i?"listenersOnce":"listeners";this[o].has(e)||this[o].set(e,new Map);const a=this[o].get(e),l=i?"listenOnce":"listen",c=n=>{let s=null;return i&&(s=this.aqmServiceEntity[e].listenOnce(()=>this.removeOnceEventListener(e,t))),()=>{var t;if(n){i?(n.stopListenOnce(),s&&s.stopListenOnce()):n.stopListen();const r=[];r.push(`UnBound "${e.toString()}"`),i&&r.push("Once"),this.aqmServiceEntityString&&r.push(`from "${this.aqmServiceEntityString}"`),null===(t=this.logger)||void 0===t||t.info(r.join(" "))}}};if(this.aqmServiceEntity)if(e in this.aqmServiceEntity&&l in this.aqmServiceEntity[e]){const s=this.aqmServiceEntity[e][l](t);a.set(t,c(s));const r=[];r.push(`Bound "${e.toString()}"`),i&&r.push("Once"),this.aqmServiceEntityString&&r.push(`to "${this.aqmServiceEntityString}"`),null===(n=this.logger)||void 0===n||n.info(r.join(" "))}else null===(s=this.logger)||void 0===s||s.warn(`EventName "${e.toString()}" is not recognized, so won't be subscribed...`);else null===(r=this.logger)||void 0===r||r.error(`"${this.aqmServiceEntityString}" is not ready yet. .init(...) first...`)}_removeEventListener(e,t,i){const n=i?"listenersOnce":"listeners";if(this[n].has(e)){const i=this[n].get(e);i&&(i.has(t)&&(i.get(t)(),i.delete(t)),i.size<1&&this[n].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 N(e);var D,U,x,P,V,_,M,j;!function(e){e.TELEPHONY="telephony",e.CHAT="chat",e.EMAIL="email",e.SOCIAL="social",e.MIDCALL_TELEPHONY="midcall telephony",e.APPLE_MESSAGES="appleMessages"}(D||(D={})),function(e){e.QUEUE="queue",e.DIAL_NUMBER="dialNumber",e.AGENT="agent",e.EPDN="entrypointDialNumber",e.ENTRY_POINT="entryPoint"}(U||(U={})),function(e){e.IDLE="Idle",e.AVAILABLE="Available",e.RONA="RONA"}(x||(x={})),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"}(V||(V={})),function(e){e.MIDCALL="midcall",e.ADHOC="adhoc",e.CONTINUOUS="continuous"}(_||(_={})),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"}(M||(M={})),function(t){const i="is not a valid UUID",n="is not a valid media type",s="is not a valid destination type";t.validatePropValueNotNullAndEmpty=e=>null!==e&&""!==e,t.validateAgentState=e=>Object.values(x).includes(e),t.validateURL=e=>/^(https?:\/\/)?(www\.)?[a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e),t.validateChannelName=e=>Object.values(V).includes(e),t.validateStateChannelType=e=>Array.isArray(e)&&e.length>0&&e.every(e=>["telephony","chat","email","social"].includes(e)),t.validateDestinationType=e=>Object.values(U).includes(e),t.validateMediaType=e=>Object.values(D).includes(e),t.validateUTCTimeStampNumberFormat=e=>Number.isInteger(e)&&e>=0&&e<=4102444799999,t.validateNumber=e=>Number.isInteger(e)&&e>=0&&e<=2147483647,t.validateBoolean=e=>"boolean"==typeof e||(0===e||1===e)&&t.validatePropValueNotNullAndEmpty(e),t.validateStringToBoolean=e=>{const t=null==e?void 0:e.toLowerCase();return"true"===t||"false"===t||"0"===t||"1"===t},t.validateChannelType=e=>Object.values(V).includes(e),t.validateMonitorType=e=>Object.values(_).includes(e),t.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),t.validateStringNumberOnly=e=>/^(\+)?\d+$/.test(e),t.validateBuddyAgents=(i,n)=>{e.AssertUtils.check(t.validateUUID(null==i?void 0:i.agentProfileId),n,"agentProfileId is not a valid UUID"),e.AssertUtils.check(t.validateChannelName(null==i?void 0:i.channelName),n,"channelName is not a valid channel name"),void 0!==(null==i?void 0:i.state)&&e.AssertUtils.check(t.validateAgentState(i.state),n,"state is not a valid state"),void 0!==(null==i?void 0:i.trackingId)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.trackingId),n,"trackingId is not a valid string")},t.validateAuxCodeType=(i,n)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i),n,"value is null or empty"),e.AssertUtils.check("IDLE_CODE"===i||"WRAP_UP_CODE"===i,n,"value is not IDLE_CODE or WRAP_UP_CODE")},t.validateAuxCodePayload=(i,n)=>{t.validateAuxCodeType(i.workType,n),void 0!==i.page&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.page),n,"page is is null or empty"),void 0!==i.pageSize&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.pageSize),n,"pageSize is is null or empty"),void 0!==i.search&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.search),n,"search is is null or empty"),void 0!==i.customFilter&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.customFilter),n,"customFilter is is null or empty")},t.validateCancelCtq=(n,s)=>{e.AssertUtils.check(t.validateUUID(null==n?void 0:n.agentId),s,`agentId ${i}`),e.AssertUtils.check(t.validateUUID(null==n?void 0:n.queueId),s,`queueId ${i}`)},t.validateWrapupPayload=(i,n)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.wrapUpReason),n,"wrapUpReason is not a valid string"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.auxCodeId),n,"auxCodeId is not a valid string"),e.AssertUtils.check(t.validateStringToBoolean(null==i?void 0:i.isAutoWrapup),n,"isAutoWrapup is not a valid boolean value")},t.validateVTeamTransferPayload=(i,n)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.vteamId),n,"vteamId is not a valid string"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.vteamType),n,"vteamType is not a valid string")},t.validateBlindTransferPayload=(s,r)=>{e.AssertUtils.check(t.validateUUID(null==s?void 0:s.agentId),r,`agentId ${i}`),e.AssertUtils.check(t.validateUUID(null==s?void 0:s.destAgentId),r,`destAgentId ${i}`),e.AssertUtils.check(t.validateMediaType(null==s?void 0:s.mediaType),r,n),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==s?void 0:s.destAgentTeamId),r,"destAgentTeamId is not a valid string"),e.AssertUtils.check(t.validateStringNumberOnly(null==s?void 0:s.destAgentDN),r,"destAgentDN is not a numbers only string"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==s?void 0:s.destSiteId),r,"destSiteId is not a valid string")},t.validateConsultPayload=(s,r)=>{e.AssertUtils.check(t.validateUUID(null==s?void 0:s.agentId),r,`agentId ${i}`),void 0!==(null==s?void 0:s.destAgentId)&&e.AssertUtils.check(t.validateUUID(null==s?void 0:s.destAgentId),r,`destAgentId ${i}`),void 0!==(null==s?void 0:s.mediaType)&&e.AssertUtils.check(t.validateMediaType(null==s?void 0:s.mediaType),r,n),void 0!==(null==s?void 0:s.holdParticipants)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==s?void 0:s.holdParticipants),r,"holdParticipants is not valid")},t.validateConsultTransferPayLoad=(r,o)=>{void 0!==(null==r?void 0:r.agentId)&&e.AssertUtils.check(t.validateUUID(null==r?void 0:r.agentId),o,`agentId ${i}`),e.AssertUtils.check(t.validateUUID(null==r?void 0:r.destAgentId),o,`destagentId ${i}`),e.AssertUtils.check(t.validateMediaType(null==r?void 0:r.mediaType),o,n),e.AssertUtils.check(t.validateUUID(null==r?void 0:r.mediaResourceId),o,`mediaResourceId ${i}`),e.AssertUtils.check(t.validateDestinationType(null==r?void 0:r.destinationType),o,s)},t.validateWrapUpV2Payload=(i,n)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.wrapUpReason),n,"wrapUpReason is not a valid string"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.auxCodeId),n,"auxCodeId is not a valid string")},t.validateChangeAgentStateType=(i,n)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.state),n,"state is null or empty"),e.AssertUtils.check("available"===i.state.toLowerCase()||"idle"===i.state.toLowerCase(),n,"state is not Available or Idle"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.auxCodeId),n,"auxCodeId is null or empty"),e.AssertUtils.check(t.validateUUID(i.agentId),n,"agentId is not a valid UUID")},t.validateConsultDataV2Payload=(i,n)=>{void 0!==(null==i?void 0:i.to)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.to),n,"to is not a valid string or not undefined"),e.AssertUtils.check(t.validateDestinationType(null==i?void 0:i.destinationType),n,s),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.holdParticipants),n,"holdParticipants is not valid")},t.validateConsultConferenceDataV2Payload=(n,r)=>{void 0!==(null==n?void 0:n.agentId)&&e.AssertUtils.check(t.validateUUID(null==n?void 0:n.agentId),r,`agentId ${i}`),void 0!==(null==n?void 0:n.to)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==n?void 0:n.to),r,"to is not a valid string or not undefined"),e.AssertUtils.check(t.validateDestinationType(null==n?void 0:n.destinationType),r,s)},t.validateTransferV2Payload=(i,n)=>{void 0!==(null==i?void 0:i.to)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.to),n,"to is not a valid string or not undefined"),e.AssertUtils.check(t.validateDestinationType(null==i?void 0:i.destinationType),n,s)},t.validateBuddyAgentsV2Payload=(s,r)=>{e.AssertUtils.check(t.validateUUID(null==s?void 0:s.agentProfileId),r,`agentProfileId ${i}`),e.AssertUtils.check(t.validateMediaType(null==s?void 0:s.mediaType),r,n),e.AssertUtils.check(t.validateAgentState(null==s?void 0:s.state),r,"state is not a valid state")},t.validateVTeam=(i,n)=>{e.AssertUtils.check(t.validateUUID(null==i?void 0:i.agentProfileId),n,"agentProfileId is not a valid UUID"),e.AssertUtils.check(t.validateUUID(null==i?void 0:i.agentSessionId),n,"agentSessionId is not a valid UUID"),e.AssertUtils.check(t.validateChannelType(null==i?void 0:i.channelType),n,"channelType is not a valid channel type"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.type),n,"type is not a valid string"),void 0!==(null==i?void 0:i.trackingId)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.trackingId),n,"trackingId is not a valid string")},t.validateDialerTasks=(i,n)=>{(null==i?void 0:i.id)&&e.AssertUtils.check(t.validateUUID(i.id),n,"id is not a valid UUID"),e.AssertUtils.check(t.validateUUID(null==i?void 0:i.entryPointId),n,"entryPointId is not a valid UUID"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.destination),n,"destination is null or empty"),e.AssertUtils.check(t.validateUUID(null==i?void 0:i.direction),n,"direction is not a valid UUID"),(null==i?void 0:i.origin)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.origin),n,"origin is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.attributes.key),n,"attributes.key is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.attributes.value),n,"attributes.value is null or empty"),e.AssertUtils.check(t.validateMediaType(null==i?void 0:i.mediaType),n,"mediaType is not a valid media type"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.outboundType),n,"outboundType is null or empty")},t.validatePreviewCampaignPayload=(i,n)=>{e.AssertUtils.check(t.validateUUID(null==i?void 0:i.interactionId),n,"interactionId is not a valid UUID"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.campaignId),n,"campaignId is null or empty")},t.validateMonitoringRequest=(i,n)=>{e.AssertUtils.check(t.validateUUID(null==i?void 0:i.id),n,"id is not a valid UUID"),e.AssertUtils.check(t.validateMonitorType(null==i?void 0:i.monitorType),n,"monitorType is not a valid monitor type"),void 0!==(null==i?void 0:i.queueIds)&&i.queueIds.forEach(i=>{e.AssertUtils.check(t.validateUUID(i),n,"queueIds is not a valid UUID")}),void 0!==(null==i?void 0:i.teams)&&i.teams.forEach(i=>{e.AssertUtils.check(t.validateUUID(i),n,"team is not a valid UUID")}),void 0!==(null==i?void 0:i.sites)&&i.sites.forEach(i=>{e.AssertUtils.check(t.validateUUID(i),n,"site is not a valid UUID")}),void 0!==(null==i?void 0:i.agents)&&i.agents.forEach(i=>{e.AssertUtils.check(t.validateUUID(i),n,"agent is not a valid UUID")}),void 0!==(null==i?void 0:i.startUTCTimestamp)&&e.AssertUtils.check(t.validateUTCTimeStampNumberFormat(i.startUTCTimestamp),n,"startUTCTimestamp is not a valid timestamp"),void 0!==(null==i?void 0:i.continuousDuration)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.continuousDuration),n,"continuousDuration is not a valid string or not undefined"),void 0!==(null==i?void 0:i.taskId)&&e.AssertUtils.check(t.validateUUID(i.taskId),n,"taskId is not a valid UUID"),e.AssertUtils.check(t.validateUUID(null==i?void 0:i.trackingId),n,"trackingId is not a valid UUID"),(null==i?void 0:i.invisibleMode)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.invisibleMode),n,"invisibleMode is not a valid string or not undefined")},t.validateMultiConsultPayload=(r,o)=>{r&&Object.entries(r).forEach(([r,a])=>{switch(r){case"agentId":e.AssertUtils.check(t.validateUUID(String(a)),o,`agentId ${i}`);break;case"destAgentId":e.AssertUtils.check(t.validateUUID(String(a)),o,`destAgentId ${i}`);break;case"mediaType":e.AssertUtils.check(t.validateMediaType(a),o,n);break;case"holdParticipants":e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(a),o,"holdParticipants is not valid");break;case"destAgentDN":e.AssertUtils.check(t.validateStringNumberOnly(String(a)),o,"destAgentDN is not a numbers only string");break;case"destinationType":e.AssertUtils.check(t.validateDestinationType(a),o,s);break;case"destAgentTeamId":e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(String(a)),o,"destAgentTeamId is not a valid string");break;case"destSiteId":e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(String(a)),o,"destSiteId is not a valid string");break;case"queueId":e.AssertUtils.check(t.validateUUID(String(a)),o,`queueId ${i}`);break;case"trackingId":e.AssertUtils.check(t.validateUUID(String(a)),o,"trackingId is not a valid string")}})},t.validateFetchByAssigneeAgentIdType=(i,n,s)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i),s,"page is is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(n),s,"assigneeAgent is is null or empty"),e.AssertUtils.check(t.validateUUID(n),s,"assigneeAgent is not a valid UUID")},t.validatefetchByCallbackPhoneNumberType=(i,n,s)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i),s,"page is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(n),s,"phoneNumber is is null or empty")},t.validateCreateOrUpdateScheduleCallbackType=(i,n,s=!1)=>{s&&(e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.id),n,"id is null or empty"),i.id&&e.AssertUtils.check(t.validateUUID(i.id),n,"id is not a valid UUID")),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.customerName),n,"customerName is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.callbackNumber),n,"callbackNumber is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.timezone),n,"timezone is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.scheduleDate),n,"scheduleDate is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.startTime),n,"startTime is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.endTime),n,"endTime is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.queueId),n,"queueId is null or empty")},t.validateGetValidCampaignTimesType=(i,n,s)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i),s,"campaignId is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(n),s,"agentId is null or empty"),e.AssertUtils.check(t.validateUUID(n),s,"agentId is not a valid UUID")}}(j||(j={}));var q=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const F="interactionId is not a valid UUID";class ${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(Number(e))}accept(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"accept",F),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.accept(t)})}consultAccept(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultAccept",F),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultAccept(t)})}buddyAgents(e){var t;return q(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(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"end",F),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.end(t)})}consultEnd(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultEnd",F),e.AssertUtils.check(j.validateBoolean(t.isConsult),"consultEnd","isConsult is not a valid boolean value"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultEnd(t)})}cancelCtq(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"cancelCtq",F),j.validateCancelCtq(t.data,"cancelCtq"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.cancelCtq(t)})}wrapup(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"wrapup",F),j.validateWrapupPayload(t.data,"wrapup"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.wrapup(t)})}vteamTransfer(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"vteamTransfer",F),j.validateVTeamTransferPayload(t.data,"vteamTransfer"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.vteamTransfer(t)})}blindTransfer(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"blindTransfer",F),j.validateBlindTransferPayload(t.data,"blindTransfer"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.blindTransfer(t)})}hold(t){var i,n;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"hold",F),e.AssertUtils.check(j.validateUUID(null===(i=t.data)||void 0===i?void 0:i.mediaResourceId),"hold","mediaResourceId is not a valid UUID"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.hold(t)})}unHold(t){var i,n;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"unHold",F),e.AssertUtils.check(j.validateUUID(null===(i=t.data)||void 0===i?void 0:i.mediaResourceId),"unHold","mediaResourceId is not a valid UUID"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.unHold(t)})}consult(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consult",F),e.AssertUtils.check(j.validateURL(t.url),"consult","url is not a valid URL"),j.validateMultiConsultPayload(t.data,"consult"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consult(t)})}consultConference(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultConference",F),j.validateConsultPayload(t.data,"consultConference"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultConference(t)})}decline(t){var i,n;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"decline","ERROR_INTERACTION_ID_INVALID"),e.AssertUtils.check(j.validateUUID(null===(i=t.data)||void 0===i?void 0:i.mediaResourceId),"decline","mediaResourceId is not a valid UUID"),e.AssertUtils.check(j.validateBoolean(t.isConsult),"decline","isConsult is not a valid boolean value"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.decline(t)})}consultTransfer(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"decline","ERROR_INTERACTION_ID_INVALID"),j.validateConsultTransferPayLoad(t.data,"consultTransfer"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultTransfer(t)})}vteamList(e){var t;return q(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(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"pauseRecording","ERROR_INTERACTION_ID_INVALID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.pauseRecording(t)})}resumeRecording(t){var i,n;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"resumeRecording","ERROR_INTERACTION_ID_INVALID"),e.AssertUtils.check(j.validateBoolean(null===(i=t.data)||void 0===i?void 0:i.autoResumed),"resumeRecording","autoResumed is not a valid boolean value"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.resumeRecording(t)})}acceptV2(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"acceptV2","ERROR_INTERACTION_ID_INVALID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.acceptV2(t)})}endV2(t){var i,n;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"endV2","ERROR_INTERACTION_ID_INVALID"),t.isEndingFromNonPrimary&&e.AssertUtils.check(j.validateBoolean(t.isEndingFromNonPrimary),"endV2","isEndingFromNonPrimary is not a valid boolean value"),(null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.endV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.endV2(t):void 0})}cancelTaskV2(t){var i,n;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"cancelTaskV2","ERROR_INTERACTION_ID_INVALID"),(null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.cancelTaskV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.cancelTaskV2(t):void 0})}pauseRecordingV2(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"pauseRecordingV2","ERROR_INTERACTION_ID_INVALID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.pauseRecordingV2(t)})}resumeRecordingV2(t){var i,n;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"resumeRecordingV2","ERROR_INTERACTION_ID_INVALID"),e.AssertUtils.check(j.validateBoolean(null===(i=t.data)||void 0===i?void 0:i.autoResumed),"resumeRecordingV2","autoResumed is not a valid boolean value"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.resumeRecordingV2(t)})}wrapupV2(t){var i,n;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"wrapupV2","ERROR_INTERACTION_ID_INVALID"),j.validateWrapUpV2Payload(t.data,"wrapupV2"),(null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.wrapupV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.wrapupV2(t):void 0})}consultV2(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultV2","ERROR_INTERACTION_ID_INVALID"),j.validateConsultDataV2Payload(t.data,"consultV2"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultV2(t)})}consultEndV2(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultEndV2","ERROR_INTERACTION_ID_INVALID"),e.AssertUtils.check(j.validateBoolean(t.isConsult),"consultEndV2","isConsult is not a valid boolean value"),t.isSecondaryEpDnAgent&&e.AssertUtils.check(j.validateBoolean(t.isSecondaryEpDnAgent),"consultEndV2","isSecondaryEpDnAgent is not a valid boolean value"),t.queueId&&e.AssertUtils.check(j.validateUUID(t.queueId),"consultEndV2","queueId is not a valid UUID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultEndV2(t)})}consultConferenceV2(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultConferenceV2","ERROR_INTERACTION_ID_INVALID"),j.validateConsultConferenceDataV2Payload(t.data,"consultConferenceV2"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultConferenceV2(t)})}exitConference(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"exitConference","ERROR_INTERACTION_ID_INVALID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.exitConference(t)})}consultTransferV2(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultTransferV2","ERROR_INTERACTION_ID_INVALID"),j.validateTransferV2Payload(t.data,"consultTransferV2"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultTransferV2(t)})}blindTransferV2(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"blindTransferV2","ERROR_INTERACTION_ID_INVALID"),j.validateTransferV2Payload(t.data,"blindTransferV2"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.blindTransferV2(t)})}vteamTransferV2(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"vteamTransferV2","ERROR_INTERACTION_ID_INVALID"),j.validateTransferV2Payload(t.data,"vteamTransferV2"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.vteamTransferV2(t)})}buddyAgentsV2(e){var t;return q(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)})}dropConferenceParticipant(t){var i;return q(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"dropConferenceParticipant","ERROR_INTERACTION_ID_INVALID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.dropConferenceParticipant(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 B=i(t,"[AgentContact JSAPI] =>"),z=i(B,"[AqmServiceEvents: Contact] => ");var H=s(322),W=s.n(H),J=s(497),Z=s.n(J),G=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const K={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 Y{stateChangeByChannelType(e){throw new Error("Method not implemented.")}checkService(){return this.serviceChecker.check(this.SERVICE)}emit(e,...t){this.emitter.emit(e,...t)}update(e){const t=Object.keys(e).reduce((t,i)=>{const n=e[i],s=this.latestData[i];return JSON.stringify(n)!==JSON.stringify(s)&&t.push({name:i,value:n,oldValue:s}),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({},K),this.logger=e.logger,this.serviceChecker=e.serviceChecker}static findTeamName(e,t){const i=e.find(e=>e.teamId===t);return(null==i?void 0:i.teamName)||""}init(e){return G(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({},K)),this.logger.info("Cleaned")}fetchLatestData(){var e,t,i,n,s,r,o;return G(this,void 0,void 0,function*(){const a=(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===(i=this.SERVICE)||void 0===i?void 0:i.conf.fetchProfile();if(a){const{teams:e,agentName:t,agentProfileID:i,defaultDn:l,agentSubStatus:c,agentStatus:u,idleCodes:d,wrapupCodes:h,dialPlan:f,isOutboundEnabledForTenant:p,isOutboundEnabledForAgent:g,isAdhocDialingEnabled:m,isEndCallEnabled:v,isEndConsultEnabled:y,allowConsultToQueue:E,isAgentAvailableAfterOutdial:S,isCampaignManagementEnabled:b,agentPersonalStatsEnabled:w}=a;let{idleCode:k}=a;const I=l;let A=u,C=c;if(this.teams=e,null==d||d.forEach(e=>{this.idleCodes[e.id]={id:e.id,name:e.name}}),!k||!(null===(n=this.SERVICE)||void 0===n?void 0:n.conf.isReloginSuccess)){const e=yield null===(s=this.SERVICE)||void 0===s?void 0:s.aqm.agent.reload();(null==e?void 0:e.data)&&(k="0"!==e.data.auxCodeId&&e.data.auxCodeId?this.idleCodes[e.data.auxCodeId]:void 0,A=null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.status,C=null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.subStatus)}const O=Y.getOutdialRegex(f);this.update({agentName:t,agentProfileID:i,dn:I,status:A,subStatus:C,idleCode:k,idleCodes:d,wrapupCodes:h,outDialRegex:O,isOutboundEnabledForTenant:p,isOutboundEnabledForAgent:g,isAdhocDialingEnabled:m,isEndCallEnabled:v,isEndConsultEnabled:y,allowConsultToQueue:E,isAgentAvailableAfterOutdial:S,isCampaignManagementEnabled:b,agentPersonalStatsEnabled:w})}})}subscribeSelfDataEvents(){var e,t,i,n,s,r;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:i="",status:n="",subStatus:s="",auxCodeId:r=""}})=>{const o=Y.findTeamName(this.teams,t);this.update({agentSessionId:e,teamId:t,teamName:o,dn:i,status:n,subStatus:s,idleCode:this.idleCodes[r]})});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:i="",subStatus:n="",auxCodeId:s=""}})=>{const r=Y.findTeamName(this.teams,t);this.update({agentSessionId:e,teamId:t,teamName:r,status:i,subStatus:n,idleCode:this.idleCodes[s]})});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.agent.eAgentStateChangeSuccess.listen(({data:{agentSessionId:e="",status:t="",subStatus:i="",auxCodeId:n=""}})=>{var s;const r=this.idleCodes?null===(s=this.idleCodes[n])||void 0===s?void 0:s.name:"";this.update({agentSessionId:e,status:t,subStatus:i,idleCode:{id:n,name:r}})});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.agent.eAgentDNRegistered.listen(({data:{dn:e=""}})=>{this.update({dn:e})});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(s=this.SERVICE)||void 0===s?void 0:s.aqm.agent.eAgentChannelReloginSuccess.listen(e=>{this.emit("eAgentChannelReloginSuccess",e)});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(r=this.SERVICE)||void 0===r?void 0:r.aqm.agent.eAgentChannelStateChanged.listen(e=>{this.emit("eAgentChannelStateChanged",e)});this.listeners.add(()=>null==e?void 0:e.stopListen())}}}unsubscribeSelfDataEvents(){this.listeners.forEach(e=>e()),this.listeners.clear()}stateChange(t){var i,n,s;return G(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.state),"stateChange","state is null or empty"),e.AssertUtils.check("available"===(null===(i=t.state)||void 0===i?void 0:i.toLowerCase())||"idle"===(null===(n=t.state)||void 0===n?void 0:n.toLowerCase()),"stateChange","state is not Available or Idle"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.auxCodeIdArray),"stateChange","auxCodeIdArray is null or empty"),null===(s=this.SERVICE)||void 0===s?void 0:s.aqm.agent.stateChange({data:t})})}stateChangeV2(i){var n;return G(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(i.state),"stateChange","state is null or empty"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(i.auxCodeId),"stateChange","auxCodeId is null or empty"),e.AssertUtils.check(j.validateStateChannelType(i.channelType),"stateChange","channelType is null or empty or invalid"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.agent.stateChangeV2({data:i});t.info("stateChangeV2 - Service is not available")})}mockOutdialAniList(){var e,t;return G(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 G(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(t,i){var n;return G(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t),"changeAgentState","orgId is not a valid UUID"),j.validateChangeAgentStateType(i,"changeAgentState"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.supervisor.changeAgentState({orgId:t,data:i})})}fetchAgentIdleCodes(t,i){var n;return G(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t),"fetchAgentIdleCodes","orgId is not a valid UUID"),e.AssertUtils.check(j.validateUUID(i),"fetchAgentIdleCodes","agentId is not a valid UUID"),yield null===(n=this.SERVICE)||void 0===n?void 0:n.abs.fetchAgentIdleCodes({orgId:t,agentId:i})})}fetchOrganizationIdleCodes(t){var i;return G(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t),"fetchOrganizationIdleCodes","orgId is not a valid UUID"),yield null===(i=this.SERVICE)||void 0===i?void 0:i.abs.fetchIdleCodes({orgId:t,accessType:"ALL"})})}addEventListener(e,t){this.checkService()&&this.emitter.on(e,t)}removeEventListener(e,t){this.checkService()&&this.emitter.off(e,t)}removeAllEventListeners(){Z()(this.emitter)}}const X=i(t,"[AgentInfo JSAPI] =>");var Q=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const ee=1e3/30;class te{waitUntil(e){return Q(this,void 0,void 0,function*(){"function"==typeof e&&(yield new Promise(e=>setTimeout(e,ee)),!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",t.info(`CRm Connector registered through JS SDK... [crmPlatform: ${this.initEventType.crmPlatform}, widgetProvider: ${this.initEventType.crmConnectorProvider}] `);const i=document.referrer;t.info("This Desktop is loaded inside an iframe.",i),this.publishEvent("agentx-js-sdk-register-crm-connector")}else t.warn("This Desktop is not loaded inside an iframe. CRM Connector is not registered.")}publishEvent(e){const{crmPlatform:i,crmConnectorProvider:n,widgetName:s,widgetProvider:r}=this.initEventType,o=Object.assign({},...Object.entries(this.initEventType).map(([e,t])=>t?{[e]:t}:{}));this.logger.info("initEvent",o),t.info(`Publishing js sdk init ${e} event : [widgetName: ${s}, widgetProvider: ${r}, crmPlatform: ${i}, crmConnectorProvider: ${n}]`),this.agentxSERVICE&&this.agentxSERVICE.isInited&&this.agentxSERVICE.webexMetrics&&(t.info(`tracking behavioral for ${e} event `),this.agentxSERVICE.webexMetrics.trackBehavioralEvent(e,Object.assign({},o)))}cleanup(){this.agentxSERVICE=void 0,this.emit("cleaned"),this.logger.info("Cleaned")}get clientLocale(){return void 0!==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 ie=i(t,"[Config JSAPI] =>");var ne=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};class se{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(t){var i,n,s,r,o;return ne(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"updateCadVariables","interactionId is not valid UUID"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(null===(n=null===(i=t.data)||void 0===i?void 0:i.attributes)||void 0===n?void 0:n.key),"updateCadVariables","attributes.key is not valid"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(null===(r=null===(s=t.data)||void 0===s?void 0:s.attributes)||void 0===r?void 0:r.value),"updateCadVariables","attributes.value is not valid"),t.secureCad&&t.secureCad.forEach(t=>{e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t),"updateCadVariables","secureCad is not valid")}),t.keyId&&e.AssertUtils.check(j.validateUUID(t.keyId),"updateCadVariables","keyId is not valid UUID"),t.keyVersion&&e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.keyVersion),"updateCadVariables","keyVersion is not valid"),null===(o=this.SERVICE)||void 0===o?void 0:o.aqm.dialer.updateCadVariables(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 re=i(t,"[Dialer JSAPI] =>"),oe=i(re,"[AqmServiceEvents: Dialer] =>");class ae{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(t){return e.I18N.createService(t)}createMixin(t){return e.I18N.createMixin(t)}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(...t){return e.I18N.mergeServiceInitOptions(...t)}}const le=i(t,"[I18N JSAPI] =>");class ce{constructor(e){this.clientLoggers=new Map,this.logger=e.logger}createLogger(t){const i=(0,e.createLogger)(t);return this.clientLoggers.set(t,i),this.logger.info(`Client logger created: "${t}"`),i}cleanupLogs(t){this.clientLoggers.has(t)&&e.Logger.POOL.cleanupPrefixedLogs(t)}browserDownloadLogsJson(t){this.clientLoggers.has(t)&&e.Logger.POOL.browserDownloadPrefixedLogsJson(t)}browserDownloadLogsText(t){this.clientLoggers.has(t)&&e.Logger.POOL.browserDownloadPrefixedLogsText(t)}getLogsCollection(t){if(this.clientLoggers.has(t))return e.Logger.POOL.getPrefixedLogsCollection(t)}getLogsJsonUrl(t){if(this.clientLoggers.has(t))return e.Logger.POOL.getPrefixedLogsJsonUrl(t)}getLogsTextUrl(t){if(this.clientLoggers.has(t))return e.Logger.POOL.getPrefixedLogsTextUrl(t)}}const ue=i(t,"[Logger JSAPI] =>");var de=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};class he{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] ScheduleCallbackJsApi Initialized")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}fetchByAssigneeAgentId(e){var t;return de(this,void 0,void 0,function*(){if(!this.checkService())return;const{page:i,assigneeAgent:n,sortBy:s,sortOrder:r}=e.data;return j.validateFetchByAssigneeAgentIdType(i,n,"fetchByAssigneeAgentId"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.scheduleCallback.fetchByAssigneeAgentId(i,n,s,r)})}fetchByCallbackPhoneNumber(e){var t;return de(this,void 0,void 0,function*(){if(!this.checkService())return;const{page:i,phoneNumber:n}=e.data;return j.validatefetchByCallbackPhoneNumberType(i,n,"fetchByCallbackPhoneNumber"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.scheduleCallback.fetchByCallbackPhoneNumber(i,n)})}createScheduleCallback(e){var t;return de(this,void 0,void 0,function*(){if(this.checkService())return j.validateCreateOrUpdateScheduleCallbackType(e.data,"createScheduleCallback"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.scheduleCallback.save(e.data)})}updateCallBackDetails(e){var t;return de(this,void 0,void 0,function*(){if(this.checkService())return j.validateCreateOrUpdateScheduleCallbackType(e.data,"updateCallBackDetails",!0),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.scheduleCallback.updateCallBackDetails(e.data)})}deleteScheduleCallback(t){var i;return de(this,void 0,void 0,function*(){if(!this.checkService())return;const{id:n}=t.data;return e.AssertUtils.check(j.validateUUID(n),"deleteScheduleCallback","id is not a valid UUID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.scheduleCallback.deleteScheduleCallback(n)})}getValidCampaignTimes(e){var t;return de(this,void 0,void 0,function*(){if(!this.checkService())return;const{campaignId:i,agentId:n}=e.data;return j.validateGetValidCampaignTimesType(i,n,"getValidCampaignTimes"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.scheduleCallback.getValidCampaignTimes(i,n)})}}const fe=i(t,"[SCHEDULE CALLBACK JSAPI] =>");class pe{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 ge=i(t,"[ScreenPop JSAPI] =>"),me=i(ge,"[AqmServiceEvents: ScreenPop] =>");class ve{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 ye=i(t,"[ShortcutKey JSAPI] =>");var Ee=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const Se=1e3/30;class be{waitUntil(e){return Ee(this,void 0,void 0,function*(){"function"==typeof e&&(yield new Promise(e=>setTimeout(e,Se)),!e()&&(yield this.waitUntil(e)))})}checkService(){var e,t,i,n,s;return Ee(this,void 0,void 0,function*(){window.wxcc&&(null===(e=window.wxcc)||void 0===e?void 0:e.rtdwc)?((null===(i=null===(t=window.wxcc)||void 0===t?void 0:t.rtdwc)||void 0===i?void 0:i.error)&&(this.logger.error("RTDWC initialization failed. Awaiting Websocket connection to establish",null===(s=null===(n=window.wxcc)||void 0===n?void 0:n.rtdwc)||void 0===s?void 0:s.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 Ee(this,void 0,void 0,function*(){yield this.checkService(),this.logger.info("rtdwc initialized")})}subscribe({datasetName:e,update:t,error:i}){var n,s;return Ee(this,void 0,void 0,function*(){return yield this.checkService(),null===(s=null===(n=window.wxcc)||void 0===n?void 0:n.rtdwc)||void 0===s?void 0:s.subscribe({datasetName:e,update:t,error:i})})}}const we=i(t,"[RTDWC JSAPI] =>");var ke=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const Ie="interactionId is not valid UUID";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.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,i;return ke(this,void 0,void 0,function*(){if(this.checkService())return j.validateMonitoringRequest(e.data,"startMonitoring"),null===(i=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===i?void 0:i.startMonitoring(e)})}endMonitoring(t){var i,n;return ke(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"endMonitoring",Ie),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.supervisor)||void 0===n?void 0:n.endMonitoring(t)})}holdMonitoring(t){var i,n;return ke(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"holdMonitoring",Ie),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.supervisor)||void 0===n?void 0:n.holdMonitoring(t)})}unHoldMonitoring(t){var i,n;return ke(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"unHoldMonitoring",Ie),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.supervisor)||void 0===n?void 0:n.unHoldMonitoring(t)})}bargeIn(t){var i,n;return ke(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"bargeIn",Ie),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.supervisor)||void 0===n?void 0:n.bargeIn(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 Ce=i(t,"[Call Monitoring JSAPI] =>"),Oe=i(Ce,"[AqmServiceEvents: Call Monitoring] =>");class Te{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 i;if(this.checkService())try{t.info("[webexMetrics Internal JSAPI] => event=trackBehavioralEvent for",e),null===(i=this.SERVICE)||void 0===i||i.webexMetrics.trackBehavioralEvent(...e)}catch(e){t.error("[webexMetrics Internal JSAPI] => event=trackBehavioralEvent Error",e)}}}const Re=i(t,"[webexMetrics Internal JSAPI] =>");var Ne=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};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.agent,aqmServiceEntityString:"SERVICE.aqm.agent"}),this.logger.info("[JSAPI] Logout Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}desktopLogout(t){var i,n;return Ne(this,void 0,void 0,function*(){if(!this.checkService())return;const s=yield He.actions.getTaskMap();if(0!==(null==s?void 0:s.size))throw new Error("You cannot sign out now because you have active conversations. Complete them and try again.");return void 0!==t.data.logoutReason&&e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.data.logoutReason),"desktopLogout","logoutReason is null or empty"),void 0!==t.data.logoutReason&&e.AssertUtils.check("user requested logout"===t.data.logoutReason.toLowerCase()||"inactivity Logout"===t.data.logoutReason.toLowerCase(),"desktopLogout","logoutReason should be either 'User requested logout' or 'Inactivity Logout'"),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.agent)||void 0===n?void 0:n.logout(t)})}signoutAgent(i){var n,s;return Ne(this,void 0,void 0,function*(){if(this.checkService())try{return t.info("[App:TPW] event=signoutAgentBySupervisor for agent ",i.data.agentId),e.AssertUtils.check(j.validateUUID(i.orgId),"signoutAgent","orgId is not a valid UUID"),e.AssertUtils.check(j.validateUUID(i.data.agentId),"signoutAgent","agentId is not a valid UUID"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(i.data.logoutReason),"signoutAgent","logoutReason is null or empty"),null===(s=null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.supervisor)||void 0===s?void 0:s.signoutAgent(i)}catch(e){return void t.error("[App:TPW] event=signoutAgentBySupervisorFailed for agent ",i.data.agentId,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 De=i(t,"[Station Logout JSAPI] =>"),Ue=i(De,"[AqmServiceEvents: Call Monitoring] =>");class xe{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,i;e&&(this.SERVICE=e),this.checkService()?(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.aiAssistant,aqmServiceEntityString:"SERVICE.aqm.aiAssistant"}),this.logger.info("AiAssistantJsApi inited.")):null===(i=(t=this.logger).warn)||void 0===i||i.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 Pe=i(t,"[AI Assistant JSAPI] =>"),Ve=i(Pe,"[AqmServiceEvents: AiAssistant] =>");class _e{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,i;e&&(this.SERVICE=e),this.checkService()?(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.dataNotifs.aiAssistant,aqmServiceEntityString:"SERVICE.dataNotifs.aiAssistant"}),this.logger.info("AiAssistantJsApi inited.")):null===(i=(t=this.logger).warn)||void 0===i||i.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 Me=i(t,"[AI Assistant JSAPI] =>"),je=i(Me,"[AqmServiceEvents: AiAssistant] =>");var qe=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};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("[JSAPI] Initialized")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}fetchTasks(t){var i,n;return qe(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.startTime),"fetchTasks","startTime is null or empty"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.endTime),"fetchTasks","endTime is null or empty"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.pageNumber),"fetchTasks","pageNumber is null or empty"),e.AssertUtils.check(j.validateNumber(t.startTime),"fetchTasks","startTime is not a valid time"),e.AssertUtils.check(j.validateNumber(t.endTime),"fetchTasks","endTime is not a valid time"),e.AssertUtils.check(j.validateNumber(t.pageNumber),"fetchTasks","pageNumber is not a valid number"),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.qmw)||void 0===n?void 0:n.fetchTasks(t)})}fetchCapture(t){var i,n;return qe(this,void 0,void 0,function*(){if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.taskId),"fetchCapture","taskId is not a valid UUID"),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.qmw)||void 0===n?void 0:n.fetchCapture(t)})}}const $e=i(t,"[PI JSAPI] =>");class Be{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,i,n,s,r,o;return n=this,s=void 0,o=function*(){if(this.checkService())return j.validateAuxCodePayload(e,"fetchPaginatedAuxCodes"),yield null===(i=null===(t=this.SERVICE)||void 0===t?void 0:t.abs)||void 0===i?void 0:i.fetchPaginatedAuxCodes(e)},new((r=void 0)||(r=Promise))(function(e,t){function i(e){try{l(o.next(e))}catch(e){t(e)}}function a(e){try{l(o.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r(function(e){e(n)})).then(i,a)}l((o=o.apply(n,s||[])).next())})}}const ze=i(t,"[AGENT CONFIG JSAPI] =>"),He=(()=>{AGENTX_SERVICE?t.info('Found global "AGENTX_SERVICE"!'):t.error('Missed global "AGENTX_SERVICE"...');const e=(i=AGENTX_SERVICE,new te({logger:ie,SERVICE:i}));var i;const n=new ce({logger:ue}),s=new ve({logger:ye,serviceChecker:o({logger:ye})}),r=new T({logger:R,serviceChecker:o({logger:R})}),a=new Y({logger:X,serviceChecker:o({logger:X})}),l=new $({logger:B,serviceChecker:o({logger:B}),aqmEvents:L({logger:z})}),c=new se({logger:re,aqmEvents:L({logger:oe}),serviceChecker:o({logger:re})}),u=new Ae({logger:Ce,aqmEvents:L({logger:Oe}),serviceChecker:o({logger:Ce})}),d=new pe({logger:ge,aqmEvents:L({logger:me}),serviceChecker:o({logger:ge})}),h=new Le({logger:De,aqmEvents:L({logger:Ue}),serviceChecker:o({logger:De})}),f=new xe({logger:Pe,aqmEvents:L({logger:Ve}),serviceChecker:o({logger:Pe})}),p=new _e({logger:Me,aqmEvents:L({logger:je}),serviceChecker:o({logger:Me})}),g=new he({logger:fe,serviceChecker:o({logger:fe})}),m=new ae({logger:le,serviceChecker:o({logger:le})}),v=new be({logger:we});v.init();const y=new Fe({logger:$e,serviceChecker:o({logger:$e})}),E=new Be({logger:ze,serviceChecker:o({logger:ze})}),S=new Te({logger:Re,serviceChecker:o({logger:Re})});return e.addEventListener("inited",()=>{l.init(AGENTX_SERVICE),a.init(AGENTX_SERVICE),c.init(AGENTX_SERVICE),u.init(AGENTX_SERVICE),d.init(AGENTX_SERVICE),h.init(AGENTX_SERVICE),f.init(AGENTX_SERVICE),p.init(AGENTX_SERVICE),g.init(AGENTX_SERVICE),y.init(AGENTX_SERVICE),s.init(AGENTX_SERVICE),r.init(AGENTX_SERVICE),m.init(AGENTX_SERVICE),E.init(AGENTX_SERVICE),S.init(AGENTX_SERVICE)}),e.addEventListener("cleaned",()=>{l.cleanup(),a.cleanup(),c.cleanup(),u.cleanup(),d.cleanup(),h.cleanup(),f.cleanup(),p.cleanup(),g.cleanup(),y.cleanup(),s.cleanup(),m.cleanup(),r.cleanup(),E.cleanup(),S.cleanup()}),{config:e,logger:n,monitoring:u,shortcutKey:s,actions:r,agentContact:l,agentStateInfo:a,dialer:c,screenpop:d,aiAssistant:f,dataNotifsAiAssistant:p,i18n:m,rtdwc:v,postInteractions:y,logout:h,agentConfigJsApi:E,webexMetricsInternal:S,scheduleCallback:g}})()})(),r})());
|